Skip to content

Commit 7c366f9

Browse files
authored
feat: Stabilize session/delete, message ids, and context usage (#199)
* feat: Stabilize session/delete, message ids, and context usage * Less partitions
1 parent 6b099b9 commit 7c366f9

8 files changed

Lines changed: 18 additions & 89 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,14 @@ jobs:
6868
fail-fast: false
6969
matrix:
7070
partition:
71-
- "1/16"
72-
- "2/16"
73-
- "3/16"
74-
- "4/16"
75-
- "5/16"
76-
- "6/16"
77-
- "7/16"
78-
- "8/16"
79-
- "9/16"
80-
- "10/16"
81-
- "11/16"
82-
- "12/16"
83-
- "13/16"
84-
- "14/16"
85-
- "15/16"
86-
- "16/16"
71+
- "1/8"
72+
- "2/8"
73+
- "3/8"
74+
- "4/8"
75+
- "5/8"
76+
- "6/8"
77+
- "7/8"
78+
- "8/8"
8779

8880
steps:
8981
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ agent-client-protocol-trace-viewer = { path = "src/agent-client-protocol-trace-v
3535
yopo = { package = "agent-client-protocol-yopo", path = "src/yopo" }
3636

3737
# Protocol
38-
agent-client-protocol-schema = { version = "=0.13.5", features = ["tracing"] }
38+
agent-client-protocol-schema = { version = "=0.13.6", features = ["tracing"] }
3939

4040
# Core async runtime
4141
tokio = { version = "1.52", features = ["full"] }

src/agent-client-protocol/Cargo.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@ unstable = [
2323
"unstable_auth_methods",
2424
"unstable_boolean_config",
2525
"unstable_elicitation",
26+
"unstable_end_turn_token_usage",
2627
"unstable_mcp_over_acp",
27-
"unstable_message_id",
28-
"unstable_session_delete",
2928
"unstable_session_fork",
30-
"unstable_session_usage",
3129
]
3230
unstable_auth_methods = ["agent-client-protocol-schema/unstable_auth_methods"]
3331
unstable_boolean_config = ["agent-client-protocol-schema/unstable_boolean_config"]
3432
unstable_elicitation = ["agent-client-protocol-schema/unstable_elicitation"]
33+
unstable_end_turn_token_usage = ["agent-client-protocol-schema/unstable_end_turn_token_usage"]
3534
unstable_mcp_over_acp = ["agent-client-protocol-schema/unstable_mcp_over_acp"]
36-
unstable_message_id = ["agent-client-protocol-schema/unstable_message_id"]
37-
unstable_session_delete = ["agent-client-protocol-schema/unstable_session_delete"]
3835
unstable_session_fork = ["agent-client-protocol-schema/unstable_session_fork"]
39-
unstable_session_usage = ["agent-client-protocol-schema/unstable_session_usage"]
4036
unstable_protocol_v2 = ["agent-client-protocol-schema/unstable_protocol_v2"]
4137

4238
[dependencies]

src/agent-client-protocol/src/schema/client_to_agent/requests.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
use crate::schema::{
22
AuthenticateRequest, AuthenticateResponse, CloseSessionRequest, CloseSessionResponse,
3-
InitializeRequest, InitializeResponse, ListSessionsRequest, ListSessionsResponse,
4-
LoadSessionRequest, LoadSessionResponse, LogoutRequest, LogoutResponse, NewSessionRequest,
5-
NewSessionResponse, PromptRequest, PromptResponse, ResumeSessionRequest, ResumeSessionResponse,
6-
SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest,
7-
SetSessionModeResponse,
3+
DeleteSessionRequest, DeleteSessionResponse, InitializeRequest, InitializeResponse,
4+
ListSessionsRequest, ListSessionsResponse, LoadSessionRequest, LoadSessionResponse,
5+
LogoutRequest, LogoutResponse, NewSessionRequest, NewSessionResponse, PromptRequest,
6+
PromptResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionConfigOptionRequest,
7+
SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse,
88
};
9-
#[cfg(feature = "unstable_session_delete")]
10-
use crate::schema::{DeleteSessionRequest, DeleteSessionResponse};
119
#[cfg(feature = "unstable_session_fork")]
1210
use crate::schema::{ForkSessionRequest, ForkSessionResponse};
1311

@@ -16,7 +14,6 @@ impl_jsonrpc_request!(AuthenticateRequest, AuthenticateResponse, "authenticate")
1614
impl_jsonrpc_request!(LogoutRequest, LogoutResponse, "logout");
1715
impl_jsonrpc_request!(LoadSessionRequest, LoadSessionResponse, "session/load");
1816
impl_jsonrpc_request!(ListSessionsRequest, ListSessionsResponse, "session/list");
19-
#[cfg(feature = "unstable_session_delete")]
2017
impl_jsonrpc_request!(
2118
DeleteSessionRequest,
2219
DeleteSessionResponse,

src/agent-client-protocol/src/schema/enum_impls.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ impl_jsonrpc_request_enum!(ClientRequest {
1717
NewSessionRequest => "session/new",
1818
LoadSessionRequest => "session/load",
1919
ListSessionsRequest => "session/list",
20-
#[cfg(feature = "unstable_session_delete")]
2120
DeleteSessionRequest => "session/delete",
2221
#[cfg(feature = "unstable_session_fork")]
2322
ForkSessionRequest => "session/fork",
@@ -38,7 +37,6 @@ impl_jsonrpc_response_enum!(AgentResponse {
3837
NewSessionResponse => "session/new",
3938
LoadSessionResponse => "session/load",
4039
ListSessionsResponse => "session/list",
41-
#[cfg(feature = "unstable_session_delete")]
4240
DeleteSessionResponse => "session/delete",
4341
#[cfg(feature = "unstable_session_fork")]
4442
ForkSessionResponse => "session/fork",

src/agent-client-protocol/src/schema/v2_impls.rs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ impl_v2_jsonrpc_request!(
227227
v2::ListSessionsResponse,
228228
"session/list"
229229
);
230-
#[cfg(feature = "unstable_session_delete")]
231230
impl_v2_jsonrpc_request!(
232231
v2::DeleteSessionRequest,
233232
v2::DeleteSessionResponse,
@@ -262,46 +261,11 @@ impl_v2_jsonrpc_notification!(v2::CancelNotification, "session/cancel");
262261
#[cfg(feature = "unstable_mcp_over_acp")]
263262
impl_v2_jsonrpc_notification!(v2::MessageMcpNotification, "mcp/message");
264263

265-
impl_v2_jsonrpc_request!(
266-
v2::WriteTextFileRequest,
267-
v2::WriteTextFileResponse,
268-
"fs/write_text_file"
269-
);
270-
impl_v2_jsonrpc_request!(
271-
v2::ReadTextFileRequest,
272-
v2::ReadTextFileResponse,
273-
"fs/read_text_file"
274-
);
275264
impl_v2_jsonrpc_request!(
276265
v2::RequestPermissionRequest,
277266
v2::RequestPermissionResponse,
278267
"session/request_permission"
279268
);
280-
impl_v2_jsonrpc_request!(
281-
v2::CreateTerminalRequest,
282-
v2::CreateTerminalResponse,
283-
"terminal/create"
284-
);
285-
impl_v2_jsonrpc_request!(
286-
v2::TerminalOutputRequest,
287-
v2::TerminalOutputResponse,
288-
"terminal/output"
289-
);
290-
impl_v2_jsonrpc_request!(
291-
v2::ReleaseTerminalRequest,
292-
v2::ReleaseTerminalResponse,
293-
"terminal/release"
294-
);
295-
impl_v2_jsonrpc_request!(
296-
v2::WaitForTerminalExitRequest,
297-
v2::WaitForTerminalExitResponse,
298-
"terminal/wait_for_exit"
299-
);
300-
impl_v2_jsonrpc_request!(
301-
v2::KillTerminalRequest,
302-
v2::KillTerminalResponse,
303-
"terminal/kill"
304-
);
305269
#[cfg(feature = "unstable_elicitation")]
306270
impl_v2_jsonrpc_request!(
307271
v2::CreateElicitationRequest,
@@ -328,7 +292,6 @@ impl_v2_jsonrpc_request_enum!(v2::ClientRequest {
328292
NewSessionRequest => "session/new",
329293
LoadSessionRequest => "session/load",
330294
ListSessionsRequest => "session/list",
331-
#[cfg(feature = "unstable_session_delete")]
332295
DeleteSessionRequest => "session/delete",
333296
#[cfg(feature = "unstable_session_fork")]
334297
ForkSessionRequest => "session/fork",
@@ -348,7 +311,6 @@ impl_v2_jsonrpc_response_enum!(v2::AgentResponse {
348311
NewSessionResponse => "session/new",
349312
LoadSessionResponse => "session/load",
350313
ListSessionsResponse => "session/list",
351-
#[cfg(feature = "unstable_session_delete")]
352314
DeleteSessionResponse => "session/delete",
353315
#[cfg(feature = "unstable_session_fork")]
354316
ForkSessionResponse => "session/fork",
@@ -369,14 +331,7 @@ impl_v2_jsonrpc_notification_enum!(v2::ClientNotification {
369331
});
370332

371333
impl_v2_jsonrpc_request_enum!(v2::AgentRequest {
372-
WriteTextFileRequest => "fs/write_text_file",
373-
ReadTextFileRequest => "fs/read_text_file",
374334
RequestPermissionRequest => "session/request_permission",
375-
CreateTerminalRequest => "terminal/create",
376-
TerminalOutputRequest => "terminal/output",
377-
ReleaseTerminalRequest => "terminal/release",
378-
WaitForTerminalExitRequest => "terminal/wait_for_exit",
379-
KillTerminalRequest => "terminal/kill",
380335
#[cfg(feature = "unstable_elicitation")]
381336
CreateElicitationRequest => "elicitation/create",
382337
#[cfg(feature = "unstable_mcp_over_acp")]
@@ -389,14 +344,7 @@ impl_v2_jsonrpc_request_enum!(v2::AgentRequest {
389344
});
390345

391346
impl_v2_jsonrpc_response_enum!(v2::ClientResponse {
392-
WriteTextFileResponse => "fs/write_text_file",
393-
ReadTextFileResponse => "fs/read_text_file",
394347
RequestPermissionResponse => "session/request_permission",
395-
CreateTerminalResponse => "terminal/create",
396-
TerminalOutputResponse => "terminal/output",
397-
ReleaseTerminalResponse => "terminal/release",
398-
WaitForTerminalExitResponse => "terminal/wait_for_exit",
399-
KillTerminalResponse => "terminal/kill",
400348
#[cfg(feature = "unstable_elicitation")]
401349
CreateElicitationResponse => "elicitation/create",
402350
#[cfg(feature = "unstable_mcp_over_acp")]

src/agent-client-protocol/tests/schema_session_delete.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(feature = "unstable_session_delete")]
2-
31
use agent_client_protocol::schema::{ClientRequest, DeleteSessionRequest, DeleteSessionResponse};
42
use agent_client_protocol::{JsonRpcMessage, JsonRpcRequest, JsonRpcResponse};
53
use serde_json::json;

0 commit comments

Comments
 (0)