Skip to content

Commit 12c675a

Browse files
authored
feat: Update to 0.10.8 of the schema (#51)
1 parent 960aaef commit 12c675a

File tree

9 files changed

+84
-98
lines changed

9 files changed

+84
-98
lines changed

Cargo.lock

Lines changed: 77 additions & 77 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
@@ -27,7 +27,7 @@ tokio = { version = "1.48", features = ["full"] }
2727
tokio-util = { version = "0.7", features = ["compat"] }
2828

2929
# Protocol
30-
agent-client-protocol-schema = { version = "=0.10.6" }
30+
agent-client-protocol-schema = { version = "=0.10.8" }
3131

3232
# Serialization
3333
serde = { version = "1.0", features = ["derive", "rc"] }

examples/agent.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ impl acp::Agent for ExampleAgent {
142142
Ok(acp::SetSessionModelResponse::default())
143143
}
144144

145-
#[cfg(feature = "unstable_session_config_options")]
146145
async fn set_session_config_option(
147146
&self,
148147
args: acp::SetSessionConfigOptionRequest,

src/agent-client-protocol/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ categories = ["development-tools", "api-bindings"]
1515
[features]
1616
unstable = [
1717
"unstable_cancel_request",
18-
"unstable_session_config_options",
1918
"unstable_session_fork",
2019
"unstable_session_info_update",
2120
"unstable_session_list",
2221
"unstable_session_model",
2322
"unstable_session_resume",
23+
"unstable_session_usage",
2424
]
2525
unstable_cancel_request = ["agent-client-protocol-schema/unstable_cancel_request"]
26-
unstable_session_config_options = ["agent-client-protocol-schema/unstable_session_config_options"]
2726
unstable_session_fork = ["agent-client-protocol-schema/unstable_session_fork"]
2827
unstable_session_info_update = ["agent-client-protocol-schema/unstable_session_info_update"]
2928
unstable_session_list = ["agent-client-protocol-schema/unstable_session_list"]
3029
unstable_session_model = ["agent-client-protocol-schema/unstable_session_model"]
3130
unstable_session_resume = ["agent-client-protocol-schema/unstable_session_resume"]
31+
unstable_session_usage = ["agent-client-protocol-schema/unstable_session_usage"]
3232

3333
[dependencies]
3434
agent-client-protocol-schema.workspace = true

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ use agent_client_protocol_schema::{
44
AuthenticateRequest, AuthenticateResponse, CancelNotification, Error, ExtNotification,
55
ExtRequest, ExtResponse, InitializeRequest, InitializeResponse, LoadSessionRequest,
66
LoadSessionResponse, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse,
7-
Result, SetSessionModeRequest, SetSessionModeResponse,
7+
Result, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest,
8+
SetSessionModeResponse,
89
};
910
#[cfg(feature = "unstable_session_fork")]
1011
use agent_client_protocol_schema::{ForkSessionRequest, ForkSessionResponse};
1112
#[cfg(feature = "unstable_session_list")]
1213
use agent_client_protocol_schema::{ListSessionsRequest, ListSessionsResponse};
1314
#[cfg(feature = "unstable_session_resume")]
1415
use agent_client_protocol_schema::{ResumeSessionRequest, ResumeSessionResponse};
15-
#[cfg(feature = "unstable_session_config_options")]
16-
use agent_client_protocol_schema::{SetSessionConfigOptionRequest, SetSessionConfigOptionResponse};
1716
#[cfg(feature = "unstable_session_model")]
1817
use agent_client_protocol_schema::{SetSessionModelRequest, SetSessionModelResponse};
1918
use serde_json::value::RawValue;
@@ -134,18 +133,13 @@ pub trait Agent {
134133
Err(Error::method_not_found())
135134
}
136135

137-
/// **UNSTABLE**
138-
///
139-
/// This capability is not part of the spec yet, and may be removed or changed at any point.
140-
///
141136
/// Sets the current value for a session configuration option.
142137
///
143138
/// Configuration options allow agents to expose arbitrary selectors (like model choice,
144139
/// reasoning level, etc.) that clients can display and modify.
145140
///
146141
/// The response returns the full list of configuration options with their current values,
147142
/// as changing one option may affect others.
148-
#[cfg(feature = "unstable_session_config_options")]
149143
async fn set_session_config_option(
150144
&self,
151145
_args: SetSessionConfigOptionRequest,
@@ -246,7 +240,6 @@ impl<T: Agent> Agent for Rc<T> {
246240
) -> Result<SetSessionModelResponse> {
247241
self.as_ref().set_session_model(args).await
248242
}
249-
#[cfg(feature = "unstable_session_config_options")]
250243
async fn set_session_config_option(
251244
&self,
252245
args: SetSessionConfigOptionRequest,
@@ -306,7 +299,6 @@ impl<T: Agent> Agent for Arc<T> {
306299
) -> Result<SetSessionModelResponse> {
307300
self.as_ref().set_session_model(args).await
308301
}
309-
#[cfg(feature = "unstable_session_config_options")]
310302
async fn set_session_config_option(
311303
&self,
312304
args: SetSessionConfigOptionRequest,

src/agent-client-protocol/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ impl Agent for ClientSideConnection {
185185
.await
186186
}
187187

188-
#[cfg(feature = "unstable_session_config_options")]
189188
async fn set_session_config_option(
190189
&self,
191190
args: SetSessionConfigOptionRequest,
@@ -573,7 +572,6 @@ impl Side for AgentSide {
573572
m if m == AGENT_METHOD_NAMES.session_resume => serde_json::from_str(params.get())
574573
.map(ClientRequest::ResumeSessionRequest)
575574
.map_err(Into::into),
576-
#[cfg(feature = "unstable_session_config_options")]
577575
m if m == AGENT_METHOD_NAMES.session_set_config_option => {
578576
serde_json::from_str(params.get())
579577
.map(ClientRequest::SetSessionConfigOptionRequest)
@@ -663,7 +661,6 @@ impl<T: Agent> MessageHandler<AgentSide> for T {
663661
let response = self.resume_session(args).await?;
664662
Ok(AgentResponse::ResumeSessionResponse(response))
665663
}
666-
#[cfg(feature = "unstable_session_config_options")]
667664
ClientRequest::SetSessionConfigOptionRequest(args) => {
668665
let response = self.set_session_config_option(args).await?;
669666
Ok(AgentResponse::SetSessionConfigOptionResponse(response))

src/agent-client-protocol/src/rpc_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ impl Agent for TestAgent {
252252
Ok(agent_client_protocol_schema::ResumeSessionResponse::new())
253253
}
254254

255-
#[cfg(feature = "unstable_session_config_options")]
256255
async fn set_session_config_option(
257256
&self,
258257
args: agent_client_protocol_schema::SetSessionConfigOptionRequest,
@@ -897,7 +896,6 @@ async fn test_session_info_update() {
897896
.await;
898897
}
899898

900-
#[cfg(feature = "unstable_session_config_options")]
901899
#[tokio::test]
902900
async fn test_set_session_config_option() {
903901
let local_set = tokio::task::LocalSet::new();

src/sacp-conductor/tests/mcp-integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async fn test_agent_handles_prompt() -> Result<(), sacp::Error> {
183183
[
184184
"SessionNotification { session_id: SessionId(\"test-session-123\"), update: AgentMessageChunk(ContentChunk { content: Text(TextContent { annotations: None, text: \"Hello. I will now use the MCP tool\", meta: None }), meta: None }), meta: None }",
185185
"SessionNotification { session_id: SessionId(\"test-session-123\"), update: AgentMessageChunk(ContentChunk { content: Text(TextContent { annotations: None, text: \"MCP tool result: CallToolResult { content: [Annotated { raw: Text(RawTextContent { text: \\\"Echo: Hello from the agent!\\\", meta: None }), annotations: None }], structured_content: None, is_error: Some(false), meta: None }\", meta: None }), meta: None }), meta: None }",
186-
"PromptResponse { stop_reason: EndTurn, meta: None }",
186+
"PromptResponse { stop_reason: EndTurn, usage: None, meta: None }",
187187
]
188188
"#]]
189189
.assert_debug_eq(&log_entries);

src/sacp-tee/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ publish = false
66

77
[dependencies]
88
anyhow.workspace = true
9-
chrono = "0.4.42"
9+
chrono.workspace = true
1010
clap = { workspace = true, features = ["derive"] }
1111
sacp = { version = "1.0.0", path = "../sacp" }
1212
sacp-proxy = { version = "1.0.0", path = "../sacp-proxy" }

0 commit comments

Comments
 (0)