diff --git a/include/copilot/types.hpp b/include/copilot/types.hpp index ddbf186..7313a15 100644 --- a/include/copilot/types.hpp +++ b/include/copilot/types.hpp @@ -32,7 +32,7 @@ struct SessionEvent; // ============================================================================= /// SDK protocol version - must match copilot-agent-runtime server -inline constexpr int kSdkProtocolVersion = 1; +inline constexpr int kSdkProtocolVersion = 2; // ============================================================================= // Enums diff --git a/tests/test_types.cpp b/tests/test_types.cpp index 4d07e0b..c1c653f 100644 --- a/tests/test_types.cpp +++ b/tests/test_types.cpp @@ -153,17 +153,17 @@ TEST(TypesTest, MessageOptions) TEST(TypesTest, PingResponse) { - json input = {{"message", "pong"}, {"timestamp", 1234567890}, {"protocolVersion", 1}}; + json input = {{"message", "pong"}, {"timestamp", 1234567890}, {"protocolVersion", 2}}; auto resp = input.get(); EXPECT_EQ(resp.message, "pong"); EXPECT_EQ(resp.timestamp, 1234567890); - EXPECT_EQ(resp.protocol_version, 1); + EXPECT_EQ(resp.protocol_version, 2); } TEST(TypesTest, ProtocolVersion) { - EXPECT_EQ(kSdkProtocolVersion, 1); + EXPECT_EQ(kSdkProtocolVersion, 2); } TEST(TypesTest, SessionMetadataParsesIso8601Timestamps)