Skip to content

Commit 5f83844

Browse files
committed
fix: update SDK protocol version to v2
Copilot CLI v0.0.394 uses protocol version 2. Update kSdkProtocolVersion from 1 to 2 to match.
1 parent 4bff03b commit 5f83844

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/copilot/types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct SessionEvent;
3232
// =============================================================================
3333

3434
/// SDK protocol version - must match copilot-agent-runtime server
35-
inline constexpr int kSdkProtocolVersion = 1;
35+
inline constexpr int kSdkProtocolVersion = 2;
3636

3737
// =============================================================================
3838
// Enums

tests/test_types.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,17 @@ TEST(TypesTest, MessageOptions)
153153

154154
TEST(TypesTest, PingResponse)
155155
{
156-
json input = {{"message", "pong"}, {"timestamp", 1234567890}, {"protocolVersion", 1}};
156+
json input = {{"message", "pong"}, {"timestamp", 1234567890}, {"protocolVersion", 2}};
157157

158158
auto resp = input.get<PingResponse>();
159159
EXPECT_EQ(resp.message, "pong");
160160
EXPECT_EQ(resp.timestamp, 1234567890);
161-
EXPECT_EQ(resp.protocol_version, 1);
161+
EXPECT_EQ(resp.protocol_version, 2);
162162
}
163163

164164
TEST(TypesTest, ProtocolVersion)
165165
{
166-
EXPECT_EQ(kSdkProtocolVersion, 1);
166+
EXPECT_EQ(kSdkProtocolVersion, 2);
167167
}
168168

169169
TEST(TypesTest, SessionMetadataParsesIso8601Timestamps)

0 commit comments

Comments
 (0)