Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 77 additions & 77 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tokio = { version = "1.48", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] }

# Protocol
agent-client-protocol-schema = { version = "=0.10.6" }
agent-client-protocol-schema = { version = "=0.10.8" }

# Serialization
serde = { version = "1.0", features = ["derive", "rc"] }
Expand Down
1 change: 0 additions & 1 deletion examples/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ impl acp::Agent for ExampleAgent {
Ok(acp::SetSessionModelResponse::default())
}

#[cfg(feature = "unstable_session_config_options")]
async fn set_session_config_option(
&self,
args: acp::SetSessionConfigOptionRequest,
Expand Down
4 changes: 2 additions & 2 deletions src/agent-client-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ categories = ["development-tools", "api-bindings"]
[features]
unstable = [
"unstable_cancel_request",
"unstable_session_config_options",
"unstable_session_fork",
"unstable_session_info_update",
"unstable_session_list",
"unstable_session_model",
"unstable_session_resume",
"unstable_session_usage",
]
unstable_cancel_request = ["agent-client-protocol-schema/unstable_cancel_request"]
unstable_session_config_options = ["agent-client-protocol-schema/unstable_session_config_options"]
unstable_session_fork = ["agent-client-protocol-schema/unstable_session_fork"]
unstable_session_info_update = ["agent-client-protocol-schema/unstable_session_info_update"]
unstable_session_list = ["agent-client-protocol-schema/unstable_session_list"]
unstable_session_model = ["agent-client-protocol-schema/unstable_session_model"]
unstable_session_resume = ["agent-client-protocol-schema/unstable_session_resume"]
unstable_session_usage = ["agent-client-protocol-schema/unstable_session_usage"]

[dependencies]
agent-client-protocol-schema.workspace = true
Expand Down
12 changes: 2 additions & 10 deletions src/agent-client-protocol/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ use agent_client_protocol_schema::{
AuthenticateRequest, AuthenticateResponse, CancelNotification, Error, ExtNotification,
ExtRequest, ExtResponse, InitializeRequest, InitializeResponse, LoadSessionRequest,
LoadSessionResponse, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse,
Result, SetSessionModeRequest, SetSessionModeResponse,
Result, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest,
SetSessionModeResponse,
};
#[cfg(feature = "unstable_session_fork")]
use agent_client_protocol_schema::{ForkSessionRequest, ForkSessionResponse};
#[cfg(feature = "unstable_session_list")]
use agent_client_protocol_schema::{ListSessionsRequest, ListSessionsResponse};
#[cfg(feature = "unstable_session_resume")]
use agent_client_protocol_schema::{ResumeSessionRequest, ResumeSessionResponse};
#[cfg(feature = "unstable_session_config_options")]
use agent_client_protocol_schema::{SetSessionConfigOptionRequest, SetSessionConfigOptionResponse};
#[cfg(feature = "unstable_session_model")]
use agent_client_protocol_schema::{SetSessionModelRequest, SetSessionModelResponse};
use serde_json::value::RawValue;
Expand Down Expand Up @@ -134,18 +133,13 @@ pub trait Agent {
Err(Error::method_not_found())
}

/// **UNSTABLE**
///
/// This capability is not part of the spec yet, and may be removed or changed at any point.
///
/// Sets the current value for a session configuration option.
///
/// Configuration options allow agents to expose arbitrary selectors (like model choice,
/// reasoning level, etc.) that clients can display and modify.
///
/// The response returns the full list of configuration options with their current values,
/// as changing one option may affect others.
#[cfg(feature = "unstable_session_config_options")]
async fn set_session_config_option(
&self,
_args: SetSessionConfigOptionRequest,
Expand Down Expand Up @@ -246,7 +240,6 @@ impl<T: Agent> Agent for Rc<T> {
) -> Result<SetSessionModelResponse> {
self.as_ref().set_session_model(args).await
}
#[cfg(feature = "unstable_session_config_options")]
async fn set_session_config_option(
&self,
args: SetSessionConfigOptionRequest,
Expand Down Expand Up @@ -306,7 +299,6 @@ impl<T: Agent> Agent for Arc<T> {
) -> Result<SetSessionModelResponse> {
self.as_ref().set_session_model(args).await
}
#[cfg(feature = "unstable_session_config_options")]
async fn set_session_config_option(
&self,
args: SetSessionConfigOptionRequest,
Expand Down
3 changes: 0 additions & 3 deletions src/agent-client-protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ impl Agent for ClientSideConnection {
.await
}

#[cfg(feature = "unstable_session_config_options")]
async fn set_session_config_option(
&self,
args: SetSessionConfigOptionRequest,
Expand Down Expand Up @@ -573,7 +572,6 @@ impl Side for AgentSide {
m if m == AGENT_METHOD_NAMES.session_resume => serde_json::from_str(params.get())
.map(ClientRequest::ResumeSessionRequest)
.map_err(Into::into),
#[cfg(feature = "unstable_session_config_options")]
m if m == AGENT_METHOD_NAMES.session_set_config_option => {
serde_json::from_str(params.get())
.map(ClientRequest::SetSessionConfigOptionRequest)
Expand Down Expand Up @@ -663,7 +661,6 @@ impl<T: Agent> MessageHandler<AgentSide> for T {
let response = self.resume_session(args).await?;
Ok(AgentResponse::ResumeSessionResponse(response))
}
#[cfg(feature = "unstable_session_config_options")]
ClientRequest::SetSessionConfigOptionRequest(args) => {
let response = self.set_session_config_option(args).await?;
Ok(AgentResponse::SetSessionConfigOptionResponse(response))
Expand Down
2 changes: 0 additions & 2 deletions src/agent-client-protocol/src/rpc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ impl Agent for TestAgent {
Ok(agent_client_protocol_schema::ResumeSessionResponse::new())
}

#[cfg(feature = "unstable_session_config_options")]
async fn set_session_config_option(
&self,
args: agent_client_protocol_schema::SetSessionConfigOptionRequest,
Expand Down Expand Up @@ -897,7 +896,6 @@ async fn test_session_info_update() {
.await;
}

#[cfg(feature = "unstable_session_config_options")]
#[tokio::test]
async fn test_set_session_config_option() {
let local_set = tokio::task::LocalSet::new();
Expand Down
2 changes: 1 addition & 1 deletion src/sacp-conductor/tests/mcp-integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async fn test_agent_handles_prompt() -> Result<(), sacp::Error> {
[
"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 }",
"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 }",
"PromptResponse { stop_reason: EndTurn, meta: None }",
"PromptResponse { stop_reason: EndTurn, usage: None, meta: None }",
]
"#]]
.assert_debug_eq(&log_entries);
Expand Down
2 changes: 1 addition & 1 deletion src/sacp-tee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dependencies]
anyhow.workspace = true
chrono = "0.4.42"
chrono.workspace = true
clap = { workspace = true, features = ["derive"] }
sacp = { version = "1.0.0", path = "../sacp" }
sacp-proxy = { version = "1.0.0", path = "../sacp-proxy" }
Expand Down