From d1ecb86e6482c6e605bf264846e38bee558be7d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 13:20:05 +0000 Subject: [PATCH 1/3] chore(deps): bump agent-client-protocol from 0.14.0 to 2.0.0 Bumps [agent-client-protocol](https://github.com/agentclientprotocol/rust-sdk) from 0.14.0 to 2.0.0. - [Release notes](https://github.com/agentclientprotocol/rust-sdk/releases) - [Commits](https://github.com/agentclientprotocol/rust-sdk/compare/agent-client-protocol-rmcp-v0.14.0...agent-client-protocol-http-v2.0.0) --- updated-dependencies: - dependency-name: agent-client-protocol dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 28 ++++++++++------------------ Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eefa3fa7..9083e703 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -516,41 +516,43 @@ dependencies = [ [[package]] name = "agent-client-protocol" -version = "0.14.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efba6592048ef8a9ac97de8d79b2d9933d8ac4d94f7a2de102348fed0c61103" +checksum = "6d87bc7769eba641753ba5dc52f73ec3765d51022c6753bf040967125ddc86a8" dependencies = [ "agent-client-protocol-derive", "agent-client-protocol-schema", + "async-io", "async-process", "blocking", "futures", "futures-concurrency", - "jsonrpcmsg", "rustc-hash", + "rustix", "schemars 1.2.2", "serde", "serde_json", "shell-words", "tracing", "uuid", + "windows-sys 0.61.2", ] [[package]] name = "agent-client-protocol-derive" -version = "0.14.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d176a10d4cb06e0262a738c3c5bf21ff0968db13a666e31cbca94a3d3d72e7c" +checksum = "3abd4080f51e4f24f5042beb7fb7a66ede29a2dc1c2582c329532e1c27264ddc" dependencies = [ "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "agent-client-protocol-schema" -version = "0.13.6" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c290bfa00c6b52339db66f8e9cf711d5f08530800529f7d619ff24d6cba253d0" +checksum = "d5c231915b4ab578c722eca2d1bd7df4d300bfd6cac3b8e9f0d1e3ddc95b187c" dependencies = [ "anyhow", "derive_more", @@ -3891,16 +3893,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonrpcmsg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d833a15225c779251e13929203518c2ff26e2fe0f322d584b213f4f4dad37bd" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "keccak" version = "0.1.6" diff --git a/Cargo.toml b/Cargo.toml index 0fe96406..a2361573 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ tracing-subscriber = { version = "0.3.23", features = ["env-filter", "json"] } tracing-appender = "0.2" # ACP -agent-client-protocol = "0.14.0" +agent-client-protocol = "2.0.0" # MCP and API clients rmcp = { version = "^1.7.0", default-features = false } From 7e61620970c7d041937d78ca309e54e8ad5f13b1 Mon Sep 17 00:00:00 2001 From: PatchWave Date: Wed, 29 Jul 2026 14:09:50 +0000 Subject: [PATCH 2/3] fix: migrate ACP schema imports for v2 --- crates/acp-utils/src/client/event.rs | 4 +-- crates/acp-utils/src/client/prompt_handle.rs | 4 +-- crates/acp-utils/src/client/session.rs | 4 +-- crates/acp-utils/src/client/tokio_agent.rs | 35 +++++++----------- crates/acp-utils/src/content.rs | 2 +- crates/acp-utils/src/notifications.rs | 18 +++++----- crates/acp-utils/src/testing.rs | 2 +- crates/acp-utils/tests/client_session.rs | 5 +-- crates/acp-utils/tests/tokio_agent.rs | 36 +++++++++---------- crates/aether-cli/src/acp/agent.rs | 2 +- crates/aether-cli/src/acp/model_config.rs | 4 +-- .../aether-cli/src/acp/protocol/commands.rs | 2 +- crates/aether-cli/src/acp/protocol/content.rs | 2 +- crates/aether-cli/src/acp/protocol/events.rs | 2 +- crates/aether-cli/src/acp/protocol/mcp.rs | 4 +-- crates/aether-cli/src/acp/protocol/replay.rs | 4 +-- crates/aether-cli/src/acp/session_actor.rs | 2 +- .../src/acp/session_config_state.rs | 2 +- crates/aether-cli/src/acp/session_factory.rs | 2 +- crates/aether-cli/src/acp/slash_commands.rs | 2 +- crates/aether-cli/src/acp/state.rs | 16 ++++++--- crates/aether-cli/src/acp/testing.rs | 2 +- crates/aether-cli/src/slash_commands.rs | 2 +- .../tests/integration/acp_agent_switching.rs | 5 +-- .../tests/integration/acp_cancellation.rs | 2 +- .../aether-cli/tests/integration/acp_stdio.rs | 3 +- .../tests/integration/acp_workspace_move.rs | 4 +-- .../tests/integration/slash_commands.rs | 2 +- crates/wisp/examples/wisp_gallery.rs | 2 +- crates/wisp/src/components/app/attachments.rs | 2 +- crates/wisp/src/components/app/mod.rs | 6 ++-- .../src/components/conversation_screen.rs | 2 +- .../src/components/conversation_window.rs | 4 +-- crates/wisp/src/components/plan_tracker.rs | 4 +-- crates/wisp/src/components/plan_view.rs | 4 +-- crates/wisp/src/components/session_picker.rs | 2 +- crates/wisp/src/components/status_line.rs | 2 +- .../src/components/tool_call_status_view.rs | 2 +- .../wisp/src/components/tool_call_statuses.rs | 2 +- .../wisp/src/components/tracked_tool_call.rs | 2 +- crates/wisp/src/runtime_state.rs | 7 ++-- crates/wisp/src/session_loading_buffer.rs | 2 +- crates/wisp/src/settings/menu.rs | 6 ++-- crates/wisp/src/settings/mod.rs | 4 +-- crates/wisp/src/settings/overlay.rs | 4 +-- .../tests/app_tests/command_picker_tests.rs | 2 +- crates/wisp/tests/app_tests/common.rs | 2 +- .../app_tests/message_streaming_tests.rs | 2 +- .../tests/app_tests/mode_cycling_tests.rs | 2 +- .../tests/app_tests/notifications_tests.rs | 2 +- .../app_tests/progress_indicator_tests.rs | 2 +- crates/wisp/tests/app_tests/session_tests.rs | 2 +- .../tests/app_tests/settings_menu_tests.rs | 2 +- .../wisp/tests/app_tests/status_line_tests.rs | 2 +- .../tests/app_tests/workspace_move_tests.rs | 2 +- .../tests/component_tests/settings_menu.rs | 6 ++-- .../tests/component_tests/settings_overlay.rs | 18 +++++----- .../wisp/tests/component_tests/status_line.rs | 2 +- .../component_tests/support/tool_events.rs | 2 +- .../component_tests/tool_call_statuses.rs | 2 +- 60 files changed, 142 insertions(+), 139 deletions(-) diff --git a/crates/acp-utils/src/client/event.rs b/crates/acp-utils/src/client/event.rs index 40af1200..05e9c082 100644 --- a/crates/acp-utils/src/client/event.rs +++ b/crates/acp-utils/src/client/event.rs @@ -1,8 +1,8 @@ use acp::Error; use acp::Responder; -use acp::schema::{SessionUpdate, StopReason}; +use acp::schema::v1::{SessionUpdate, StopReason}; use agent_client_protocol as acp; -use agent_client_protocol::schema::{SessionConfigOption, SessionId, SessionInfo}; +use agent_client_protocol::schema::v1::{SessionConfigOption, SessionId, SessionInfo}; use crate::notifications::{ AuthMethodsUpdatedParams, ContextClearedParams, ContextCompactionParams, ContextUsageParams, ElicitationParams, diff --git a/crates/acp-utils/src/client/prompt_handle.rs b/crates/acp-utils/src/client/prompt_handle.rs index 163abb1b..d88ca720 100644 --- a/crates/acp-utils/src/client/prompt_handle.rs +++ b/crates/acp-utils/src/client/prompt_handle.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema::{ContentBlock, SessionId}; +use agent_client_protocol::schema::v1::{ContentBlock, SessionId}; use std::path::{Path, PathBuf}; use tokio::sync::mpsc; @@ -118,7 +118,7 @@ impl AcpPromptHandle { #[cfg(test)] mod tests { - use agent_client_protocol::schema::TextContent; + use agent_client_protocol::schema::v1::TextContent; use super::*; diff --git a/crates/acp-utils/src/client/session.rs b/crates/acp-utils/src/client/session.rs index bc73239d..9fc7ac8b 100644 --- a/crates/acp-utils/src/client/session.rs +++ b/crates/acp-utils/src/client/session.rs @@ -5,7 +5,7 @@ use crate::notifications::{ AuthMethodsUpdatedParams, ContextClearedParams, ContextCompactionParams, ContextUsageParams, ElicitationParams, McpNotification, McpRequest, SubAgentProgressParams, }; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ AuthMethod, AuthenticateRequest, CancelNotification, ConfigOptionUpdate, ContentBlock, InitializeRequest, InitializeResponse, ListSessionsRequest, LoadSessionRequest, NewSessionRequest, NewSessionResponse, PermissionOptionId, PermissionOptionKind, PromptCapabilities, PromptRequest, RequestPermissionOutcome, @@ -274,7 +274,7 @@ async fn handle_command( } } PromptCommand::SetConfigOption { session_id, config_id, value } => { - let req = SetSessionConfigOptionRequest::new(session_id.clone(), config_id, value); + let req = SetSessionConfigOptionRequest::new(session_id.clone(), config_id, value.as_str()); spawn_request_to_event( cx, event_tx, diff --git a/crates/acp-utils/src/client/tokio_agent.rs b/crates/acp-utils/src/client/tokio_agent.rs index 13c525ef..dada1607 100644 --- a/crates/acp-utils/src/client/tokio_agent.rs +++ b/crates/acp-utils/src/client/tokio_agent.rs @@ -4,9 +4,8 @@ //! `async_process::Command`, which wraps stdio in `blocking::Unblock`. Inside a //! tokio runtime that causes a busy loop. This avoids the issue by spawning stdio agents with `tokio::process::Command` //! -use agent_client_protocol::schema::{McpServer, McpServerStdio}; use agent_client_protocol::util::internal_error; -use agent_client_protocol::{AcpAgent, ByteStreams, ConnectTo, Error, Role, util}; +use agent_client_protocol::{AcpAgent, AcpAgentConfig, ByteStreams, ConnectTo, Error, Role, util}; use std::path::PathBuf; use std::process::Stdio; use std::str::FromStr; @@ -16,26 +15,22 @@ use tokio::sync::oneshot; use tokio_util::compat::{TokioAsyncReadCompatExt, TokioAsyncWriteCompatExt}; pub struct TokioAcpAgent { - stdio: McpServerStdio, + config: AcpAgentConfig, } impl TokioAcpAgent { pub fn from_command(command: impl Into, args: Vec) -> Self { - let command = command.into(); - let name = command.file_name().and_then(|name| name.to_str()).unwrap_or("acp-agent").to_string(); - let mut stdio = McpServerStdio::new(name, command); - stdio.args = args; - Self { stdio } + Self { config: AcpAgentConfig::new(command).args(args) } } - pub fn stdio(&self) -> &McpServerStdio { - &self.stdio + pub fn config(&self) -> &AcpAgentConfig { + &self.config } } impl ConnectTo for TokioAcpAgent { async fn connect_to(self, client: impl ConnectTo) -> Result<(), Error> { - connect_stdio::(self.stdio, client).await + connect_stdio::(self.config, client).await } } @@ -43,20 +38,15 @@ impl FromStr for TokioAcpAgent { type Err = Error; fn from_str(s: &str) -> Result { - match AcpAgent::from_str(s)?.into_server() { - McpServer::Stdio(stdio) => Ok(Self { stdio }), - _ => Err(util::internal_error("unsupported ACP agent transport")), - } + Ok(Self { config: AcpAgent::from_str(s)?.into_config() }) } } -async fn connect_stdio(server: McpServerStdio, client: impl ConnectTo) -> Result<(), Error> { +async fn connect_stdio(config: AcpAgentConfig, client: impl ConnectTo) -> Result<(), Error> { let (stdin, stdout, stderr, mut child) = { - let mut cmd = Command::new(&server.command); - cmd.args(&server.args); - for env_var in &server.env { - cmd.env(&env_var.name, &env_var.value); - } + let mut cmd = Command::new(config.command()); + cmd.args(config.arguments()); + cmd.envs(config.environment()); let mut child = cmd .stdin(Stdio::piped()) @@ -98,7 +88,8 @@ async fn connect_stdio(server: McpServerStdio, client: impl ConnectTo::connect_to(bytes, client) => result, + biased; result = child_fut => result, + result = ConnectTo::::connect_to(bytes, client) => result, } } diff --git a/crates/acp-utils/src/content.rs b/crates/acp-utils/src/content.rs index 64d6fbfa..50c6a9eb 100644 --- a/crates/acp-utils/src/content.rs +++ b/crates/acp-utils/src/content.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; /// Converts ACP `ContentBlock` to plain text. /// diff --git a/crates/acp-utils/src/notifications.rs b/crates/acp-utils/src/notifications.rs index 93428927..17588110 100644 --- a/crates/acp-utils/src/notifications.rs +++ b/crates/acp-utils/src/notifications.rs @@ -2,7 +2,7 @@ //! notifications. use std::path::PathBuf; -use agent_client_protocol::schema::AuthMethod; +use agent_client_protocol::schema::v1::AuthMethod; use agent_client_protocol::{JsonRpcNotification, JsonRpcRequest, JsonRpcResponse}; pub use mcp_utils::display_meta::{ToolDisplayMeta, ToolResultMeta}; pub use rmcp::model::CreateElicitationRequestParams; @@ -234,12 +234,12 @@ impl SessionDisplayMeta { } #[must_use] - pub fn to_meta(&self) -> agent_client_protocol::schema::Meta { + pub fn to_meta(&self) -> agent_client_protocol::schema::v1::Meta { to_aether_meta(self) } #[must_use] - pub fn from_meta(meta: Option<&agent_client_protocol::schema::Meta>) -> Self { + pub fn from_meta(meta: Option<&agent_client_protocol::schema::v1::Meta>) -> Self { from_aether_meta(meta) } } @@ -257,23 +257,23 @@ pub struct AetherCapabilities { impl AetherCapabilities { #[must_use] - pub fn to_meta(self) -> agent_client_protocol::schema::Meta { + pub fn to_meta(self) -> agent_client_protocol::schema::v1::Meta { to_aether_meta(&self) } #[must_use] - pub fn from_meta(meta: Option<&agent_client_protocol::schema::Meta>) -> Self { + pub fn from_meta(meta: Option<&agent_client_protocol::schema::v1::Meta>) -> Self { from_aether_meta(meta) } } -fn to_aether_meta(value: &T) -> agent_client_protocol::schema::Meta { - let mut meta = agent_client_protocol::schema::Meta::new(); +fn to_aether_meta(value: &T) -> agent_client_protocol::schema::v1::Meta { + let mut meta = agent_client_protocol::schema::v1::Meta::new(); meta.insert(AETHER_META_NAMESPACE.to_string(), serde_json::json!(value)); meta } -fn from_aether_meta(meta: Option<&agent_client_protocol::schema::Meta>) -> T { +fn from_aether_meta(meta: Option<&agent_client_protocol::schema::v1::Meta>) -> T { meta.and_then(|m| m.get(AETHER_META_NAMESPACE)) .cloned() .and_then(|value| serde_json::from_value(value).ok()) @@ -360,7 +360,7 @@ pub struct SubAgentToolError { #[cfg(test)] mod tests { use agent_client_protocol::JsonRpcMessage; - use agent_client_protocol::schema::AuthMethodAgent; + use agent_client_protocol::schema::v1::AuthMethodAgent; use super::*; diff --git a/crates/acp-utils/src/testing.rs b/crates/acp-utils/src/testing.rs index b935f0e9..04be2661 100644 --- a/crates/acp-utils/src/testing.rs +++ b/crates/acp-utils/src/testing.rs @@ -12,7 +12,7 @@ //! and returns a receiver that resolves when the responder is consumed. use crate::notifications::{ElicitationParams, ElicitationResponse, McpNotification}; -use agent_client_protocol::schema::SessionNotification; +use agent_client_protocol::schema::v1::SessionNotification; use agent_client_protocol::{ self as acp, Agent, Builder, ByteStreams, Client, ConnectionTo, HandleDispatchFrom, NullRun, Responder, }; diff --git a/crates/acp-utils/tests/client_session.rs b/crates/acp-utils/tests/client_session.rs index 6a5c2bcc..a870d54f 100644 --- a/crates/acp-utils/tests/client_session.rs +++ b/crates/acp-utils/tests/client_session.rs @@ -1,8 +1,9 @@ use acp_utils::client::spawn_acp_session; use acp_utils::testing::duplex_pair; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::ProtocolVersion; +use agent_client_protocol::schema::v1::{ CancelNotification, Implementation, InitializeRequest, InitializeResponse, NewSessionRequest, NewSessionResponse, - PromptRequest, ProtocolVersion, SessionId, SetSessionConfigOptionRequest, + PromptRequest, SessionId, SetSessionConfigOptionRequest, }; use agent_client_protocol::{self as acp, Agent}; use std::path::PathBuf; diff --git a/crates/acp-utils/tests/tokio_agent.rs b/crates/acp-utils/tests/tokio_agent.rs index adebba86..eedf8c10 100644 --- a/crates/acp-utils/tests/tokio_agent.rs +++ b/crates/acp-utils/tests/tokio_agent.rs @@ -7,41 +7,39 @@ use tokio::task::LocalSet; #[test] fn parses_shell_command() { let agent = TokioAcpAgent::from_str("aether acp --foo bar").expect("parses"); - let server = agent.stdio(); - assert_eq!(server.command.as_path(), Path::new("aether")); - assert_eq!(server.args.as_slice(), &["acp", "--foo", "bar"]); + let config = agent.config(); + assert_eq!(config.command(), Path::new("aether")); + assert_eq!(config.arguments(), ["acp", "--foo", "bar"]); } #[test] fn parses_quoted_shell_command() { let agent = TokioAcpAgent::from_str(r#"python "my agent.py" --name "Test Agent""#).expect("parses"); - let server = agent.stdio(); - assert_eq!(server.command.as_path(), Path::new("python")); - assert_eq!(server.args.as_slice(), &["my agent.py", "--name", "Test Agent"]); + let config = agent.config(); + assert_eq!(config.command(), Path::new("python")); + assert_eq!(config.arguments(), ["my agent.py", "--name", "Test Agent"]); } #[test] fn parses_leading_environment_variables() { let agent = TokioAcpAgent::from_str("RUST_LOG=debug aether acp").expect("parses"); - let server = agent.stdio(); - assert_eq!(server.command.as_path(), Path::new("aether")); - assert_eq!(server.args.as_slice(), &["acp"]); - assert_eq!(server.env[0].name, "RUST_LOG"); - assert_eq!(server.env[0].value, "debug"); + let config = agent.config(); + assert_eq!(config.command(), Path::new("aether")); + assert_eq!(config.arguments(), ["acp"]); + assert_eq!(config.environment().get("RUST_LOG"), Some(&"debug".to_string())); } #[test] fn parses_json_stdio_agent_config() { let agent = TokioAcpAgent::from_str( - r#"{"type":"stdio","name":"test-agent","command":"/usr/bin/python","args":["agent.py","--verbose"],"env":[{"name":"RUST_LOG","value":"debug"}]}"#, + r#"{"command":"/usr/bin/python","args":["agent.py","--verbose"],"env":{"RUST_LOG":"debug"}}"#, ) .expect("parses"); - let server = agent.stdio(); - assert_eq!(server.command.as_path(), Path::new("/usr/bin/python")); - assert_eq!(server.args.as_slice(), &["agent.py", "--verbose"]); - assert_eq!(server.env[0].name, "RUST_LOG"); - assert_eq!(server.env[0].value, "debug"); + let config = agent.config(); + assert_eq!(config.command(), Path::new("/usr/bin/python")); + assert_eq!(config.arguments(), ["agent.py", "--verbose"]); + assert_eq!(config.environment().get("RUST_LOG"), Some(&"debug".to_string())); } #[test] @@ -51,8 +49,8 @@ fn rejects_empty_command() { } #[test] -fn rejects_non_stdio_transport_at_parse_time() { - let json = r#"{"type":"http","name":"remote","url":"https://example.com/agent","headers":[]}"#; +fn rejects_invalid_agent_config() { + let json = r#"{"url":"https://example.com/agent"}"#; assert!(TokioAcpAgent::from_str(json).is_err()); } diff --git a/crates/aether-cli/src/acp/agent.rs b/crates/aether-cli/src/acp/agent.rs index 2741448f..b40108cd 100644 --- a/crates/aether-cli/src/acp/agent.rs +++ b/crates/aether-cli/src/acp/agent.rs @@ -2,7 +2,7 @@ use super::state::AcpState; use acp_utils::notifications::{ McpRequest, PromptSearchParams, SessionPreviewParams, WorkspaceListParams, WorkspaceMoveParams, }; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ AuthenticateRequest, CancelNotification, InitializeRequest, ListSessionsRequest, LoadSessionRequest, NewSessionRequest, PromptRequest, SetSessionConfigOptionRequest, }; diff --git a/crates/aether-cli/src/acp/model_config.rs b/crates/aether-cli/src/acp/model_config.rs index 4634b78a..aa0b49dc 100644 --- a/crates/aether-cli/src/acp/model_config.rs +++ b/crates/aether-cli/src/acp/model_config.rs @@ -2,7 +2,7 @@ use acp_utils::config_meta::{ConfigOptionMeta, SelectOptionMeta}; use acp_utils::config_option_id::ConfigOptionId; use aether_auth::OAuthCredentialStorage; use aether_core::agent_spec::AgentSpec; -use agent_client_protocol::schema::{self as acp, SessionConfigOption, SessionConfigOptionCategory}; +use agent_client_protocol::schema::v1::{self as acp, SessionConfigOption, SessionConfigOptionCategory}; use llm::ReasoningEffort; use llm::catalog::{LlmModel, ModelSpec}; use std::collections::{BTreeMap, HashSet}; @@ -252,7 +252,7 @@ mod tests { use super::*; use aether_auth::FakeOAuthCredentialStore; use aether_core::agent_spec::{AgentSpecExposure, ToolFilter}; - use agent_client_protocol::schema::{SessionConfigKind, SessionConfigSelectOption, SessionConfigSelectOptions}; + use agent_client_protocol::schema::v1::{SessionConfigKind, SessionConfigSelectOption, SessionConfigSelectOptions}; use llm::catalog::{AnthropicModel, BedrockFoundationModel, BedrockModel, DeepSeekModel, GeminiModel}; fn test_models() -> Vec { diff --git a/crates/aether-cli/src/acp/protocol/commands.rs b/crates/aether-cli/src/acp/protocol/commands.rs index 8add4262..a7e3f169 100644 --- a/crates/aether-cli/src/acp/protocol/commands.rs +++ b/crates/aether-cli/src/acp/protocol/commands.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use rmcp::model::Prompt as McpPrompt; /// Converts an MCP Prompt to an ACP `AvailableCommand` diff --git a/crates/aether-cli/src/acp/protocol/content.rs b/crates/aether-cli/src/acp/protocol/content.rs index f02b6676..b9c236d6 100644 --- a/crates/aether-cli/src/acp/protocol/content.rs +++ b/crates/aether-cli/src/acp/protocol/content.rs @@ -1,5 +1,5 @@ use acp_utils::content::format_embedded_resource; -use agent_client_protocol::schema::{self as acp, ContentBlock, TextContent}; +use agent_client_protocol::schema::v1::{self as acp, ContentBlock, TextContent}; use llm::ContentBlock as LlmContentBlock; /// Convert client-supplied ACP content blocks into LLM content blocks for the diff --git a/crates/aether-cli/src/acp/protocol/events.rs b/crates/aether-cli/src/acp/protocol/events.rs index 0c227283..ba0c2ed3 100644 --- a/crates/aether-cli/src/acp/protocol/events.rs +++ b/crates/aether-cli/src/acp/protocol/events.rs @@ -6,7 +6,7 @@ use aether_core::events::{ AgentEvent, ContextEvent, MessageEvent, ModelEvent, SubAgentProgressPayload, ToolEvent, TurnEvent, TurnOutcome, aether_tool_name_meta, humanize_tool_name, parse_tool_call_chunk, }; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ self as acp, Content, ContentBlock, ContentChunk, Diff, MessageId, PlanEntry, PlanEntryPriority, PlanEntryStatus, SessionId, SessionNotification, SessionUpdate, TextContent, ToolCall, ToolCallContent, ToolCallId, ToolCallStatus, ToolCallUpdate, ToolCallUpdateFields, diff --git a/crates/aether-cli/src/acp/protocol/mcp.rs b/crates/aether-cli/src/acp/protocol/mcp.rs index 603a5ba5..4773a0d5 100644 --- a/crates/aether-cli/src/acp/protocol/mcp.rs +++ b/crates/aether-cli/src/acp/protocol/mcp.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema::{HttpHeader, McpServer}; +use agent_client_protocol::schema::v1::{HttpHeader, McpServer}; use mcp_utils::client::{McpServer as RuntimeMcpServer, McpTransport}; use rmcp::transport::streamable_http_client::StreamableHttpClientTransportConfig; @@ -60,7 +60,7 @@ fn http_config(url: String, headers: &[HttpHeader]) -> StreamableHttpClientTrans #[cfg(test)] mod tests { use super::*; - use agent_client_protocol::schema as acp; + use agent_client_protocol::schema::v1 as acp; #[test] fn test_map_acp_stdio_server() { diff --git a/crates/aether-cli/src/acp/protocol/replay.rs b/crates/aether-cli/src/acp/protocol/replay.rs index d1c88494..46191ec9 100644 --- a/crates/aether-cli/src/acp/protocol/replay.rs +++ b/crates/aether-cli/src/acp/protocol/replay.rs @@ -1,6 +1,6 @@ use acp_utils::server::AcpServerError; use aether_core::session::{SessionEvent, UserEvent}; -use agent_client_protocol::schema::{ContentChunk, SessionId, SessionNotification, SessionUpdate}; +use agent_client_protocol::schema::v1::{ContentChunk, SessionId, SessionNotification, SessionUpdate}; use agent_client_protocol::{Client, ConnectionTo}; use super::content::map_user_content_block; @@ -42,7 +42,7 @@ pub fn map_session_events_to_notifications( #[cfg(test)] mod tests { use super::*; - use agent_client_protocol::schema as acp; + use agent_client_protocol::schema::v1 as acp; #[test] fn replay_emits_user_media_chunks_in_order() { diff --git a/crates/aether-cli/src/acp/session_actor.rs b/crates/aether-cli/src/acp/session_actor.rs index 2c81c602..8be93ca3 100644 --- a/crates/aether-cli/src/acp/session_actor.rs +++ b/crates/aether-cli/src/acp/session_actor.rs @@ -5,7 +5,7 @@ use aether_core::agent_spec::AgentSpec; use aether_core::context::ext::conversation_messages_from_events; use aether_core::events::{AgentCommand, AgentEvent, Command, ToolEvent, TurnOutcome}; use aether_core::session::{SessionControlEvent, SessionEvent, UserEvent}; -use agent_client_protocol::schema::{self as acp, PromptResponse, SessionId, SetSessionConfigOptionResponse}; +use agent_client_protocol::schema::v1::{self as acp, PromptResponse, SessionId, SetSessionConfigOptionResponse}; use agent_client_protocol::{Client, ConnectionTo, JsonRpcNotification, Responder}; use llm::catalog::LlmModel; use llm::parser::ModelProviderParser; diff --git a/crates/aether-cli/src/acp/session_config_state.rs b/crates/aether-cli/src/acp/session_config_state.rs index db32216b..994ae0ef 100644 --- a/crates/aether-cli/src/acp/session_config_state.rs +++ b/crates/aether-cli/src/acp/session_config_state.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use llm::ReasoningEffort; use llm::catalog::{LlmModel, validate_reasoning_effort}; use tracing::error; diff --git a/crates/aether-cli/src/acp/session_factory.rs b/crates/aether-cli/src/acp/session_factory.rs index c4c08798..949a779b 100644 --- a/crates/aether-cli/src/acp/session_factory.rs +++ b/crates/aether-cli/src/acp/session_factory.rs @@ -3,7 +3,7 @@ use aether_core::agent_spec::AgentSpec; use aether_core::core::AgentDeps; use aether_core::events::DynObserverFactory; use aether_core::session::{SessionEvent, SessionMeta, last_agent_from_events}; -use agent_client_protocol::schema::{self as acp, LoadSessionRequest, NewSessionRequest, SessionId}; +use agent_client_protocol::schema::v1::{self as acp, LoadSessionRequest, NewSessionRequest, SessionId}; use agent_client_protocol::{Client, ConnectionTo}; use llm::catalog::{LlmModel, get_local_models}; use llm::types::IsoString; diff --git a/crates/aether-cli/src/acp/slash_commands.rs b/crates/aether-cli/src/acp/slash_commands.rs index 4632eeae..4a3a1574 100644 --- a/crates/aether-cli/src/acp/slash_commands.rs +++ b/crates/aether-cli/src/acp/slash_commands.rs @@ -1,5 +1,5 @@ use acp_utils::server::AcpServerError; -use agent_client_protocol::schema::{self as acp, SessionId}; +use agent_client_protocol::schema::v1::{self as acp, SessionId}; use agent_client_protocol::{Client, ConnectionTo}; use llm::ContentBlock; use tracing::{error, info}; diff --git a/crates/aether-cli/src/acp/state.rs b/crates/aether-cli/src/acp/state.rs index a7bc33d0..265719bd 100644 --- a/crates/aether-cli/src/acp/state.rs +++ b/crates/aether-cli/src/acp/state.rs @@ -6,12 +6,13 @@ use acp_utils::notifications::{ use acp_utils::server::AcpServerError; use aether_auth::OAuthCredentialStorage; use aether_telemetry::TelemetryRuntime; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::ProtocolVersion; +use agent_client_protocol::schema::v1::{ self as acp, AgentCapabilities, AuthMethod, AuthenticateRequest, AuthenticateResponse, CancelNotification, ConfigOptionUpdate, Implementation, InitializeRequest, InitializeResponse, ListSessionsRequest, ListSessionsResponse, LoadSessionRequest, LoadSessionResponse, McpCapabilities, NewSessionRequest, - NewSessionResponse, PromptCapabilities, PromptRequest, PromptResponse, ProtocolVersion, SessionId, - SessionNotification, SessionUpdate, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, + NewSessionResponse, PromptCapabilities, PromptRequest, PromptResponse, SessionId, SessionNotification, + SessionUpdate, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, }; use agent_client_protocol::{Client, ConnectionTo, Responder}; use llm::catalog::{LlmModel, ModelSpec, get_local_models}; @@ -291,7 +292,14 @@ impl AcpState { ) { let session_id = args.session_id.0.to_string(); let config_id = args.config_id.0.to_string(); - let value = args.value.0.to_string(); + let value = match args.value { + acp::SessionConfigOptionValue::Boolean { value } => value.to_string(), + acp::SessionConfigOptionValue::ValueId { value } => value.0.to_string(), + _ => { + respond_err(responder, acp::Error::invalid_params()); + return; + } + }; info!("set_session_config_option: session={session_id}, config={config_id}, value={value}"); let setting = match ConfigSetting::parse(&config_id, &value) { diff --git a/crates/aether-cli/src/acp/testing.rs b/crates/aether-cli/src/acp/testing.rs index 944b245f..3f0c7fbf 100644 --- a/crates/aether-cli/src/acp/testing.rs +++ b/crates/aether-cli/src/acp/testing.rs @@ -22,7 +22,7 @@ use aether_core::events::{AgentEvent, Command, MessageEvent}; use aether_core::mcp::McpSpawnResult; use aether_core::mcp::mcp; use aether_core::session::{SessionControlEvent, SessionEvent, SessionMeta, UserEvent, last_agent_from_events}; -use agent_client_protocol::schema::{SessionId, SessionUpdate}; +use agent_client_protocol::schema::v1::{SessionId, SessionUpdate}; use agent_client_protocol::{Agent, Client, ConnectionTo}; use llm::ProviderConnectionOverrides; use llm::testing::FakeLlmProvider; diff --git a/crates/aether-cli/src/slash_commands.rs b/crates/aether-cli/src/slash_commands.rs index 42d42f95..94277e5f 100644 --- a/crates/aether-cli/src/slash_commands.rs +++ b/crates/aether-cli/src/slash_commands.rs @@ -1,5 +1,5 @@ use aether_core::mcp::run_mcp_task::McpCommand; -use agent_client_protocol::schema::AvailableCommand; +use agent_client_protocol::schema::v1::AvailableCommand; use rmcp::model::{GetPromptResult, Prompt as McpPrompt, PromptMessageContent}; use std::collections::HashSet; use thiserror::Error; diff --git a/crates/aether-cli/tests/integration/acp_agent_switching.rs b/crates/aether-cli/tests/integration/acp_agent_switching.rs index 570a5c21..e6436098 100644 --- a/crates/aether-cli/tests/integration/acp_agent_switching.rs +++ b/crates/aether-cli/tests/integration/acp_agent_switching.rs @@ -1,6 +1,6 @@ use acp_utils::config_option_id::ConfigOptionId; use aether_cli::acp::testing::{AcpTestHarness, FakeAgentSwitchingSession}; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ ContentBlock, PromptRequest, SetSessionConfigOptionRequest, StopReason, TextContent, }; use std::future::Future; @@ -200,7 +200,8 @@ fn send_prompt( harness: &AcpTestHarness, fake: &FakeAgentSwitchingSession, text: &str, -) -> impl Future> + use<> { +) -> impl Future> + use<> +{ let response = harness.client_cx.send_request(PromptRequest::new( fake.session_id().clone(), vec![ContentBlock::Text(TextContent::new(text.to_string()))], diff --git a/crates/aether-cli/tests/integration/acp_cancellation.rs b/crates/aether-cli/tests/integration/acp_cancellation.rs index 578fd23c..dd94f6c4 100644 --- a/crates/aether-cli/tests/integration/acp_cancellation.rs +++ b/crates/aether-cli/tests/integration/acp_cancellation.rs @@ -1,6 +1,6 @@ use aether_cli::acp::testing::AcpTestHarness; use aether_core::core::agent; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ CancelNotification, ContentBlock, PromptRequest, SessionId, SessionUpdate, StopReason, TextContent, }; use llm::LlmResponse; diff --git a/crates/aether-cli/tests/integration/acp_stdio.rs b/crates/aether-cli/tests/integration/acp_stdio.rs index fc264a5f..4b826da7 100644 --- a/crates/aether-cli/tests/integration/acp_stdio.rs +++ b/crates/aether-cli/tests/integration/acp_stdio.rs @@ -1,6 +1,7 @@ use agent_client_protocol::JsonRpcMessage; use agent_client_protocol::jsonrpcmsg::{Id, Params, Request}; -use agent_client_protocol::schema::{InitializeRequest, ProtocolVersion}; +use agent_client_protocol::schema::ProtocolVersion; +use agent_client_protocol::schema::v1::InitializeRequest; use std::error::Error; use std::io::{BufRead, BufReader, Error as IoError, Write}; use std::os::fd::OwnedFd; diff --git a/crates/aether-cli/tests/integration/acp_workspace_move.rs b/crates/aether-cli/tests/integration/acp_workspace_move.rs index d0970e4e..7039d575 100644 --- a/crates/aether-cli/tests/integration/acp_workspace_move.rs +++ b/crates/aether-cli/tests/integration/acp_workspace_move.rs @@ -3,7 +3,7 @@ use acp_utils::notifications::{ }; use aether_cli::acp::testing::AcpTestHarness; use aether_cli::workspace::testing::{clone_repo, git, git_status, init_repo}; -use agent_client_protocol::schema::ListSessionsRequest; +use agent_client_protocol::schema::v1::ListSessionsRequest; use std::fs; use std::future::Future; use tokio::task::LocalSet; @@ -223,7 +223,7 @@ async fn move_workspace( harness: &AcpTestHarness, session_id: &str, target: WorkspaceMoveTarget, -) -> Result { +) -> Result { harness .client_cx .send_request(WorkspaceMoveParams { session_id: session_id.to_string(), target }) diff --git a/crates/aether-cli/tests/integration/slash_commands.rs b/crates/aether-cli/tests/integration/slash_commands.rs index 7b71ba6a..4989b570 100644 --- a/crates/aether-cli/tests/integration/slash_commands.rs +++ b/crates/aether-cli/tests/integration/slash_commands.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use rmcp::model::{Prompt, PromptArgument}; /// Create an MCP prompt with no arguments. diff --git a/crates/wisp/examples/wisp_gallery.rs b/crates/wisp/examples/wisp_gallery.rs index 3701ce70..661cbcc5 100644 --- a/crates/wisp/examples/wisp_gallery.rs +++ b/crates/wisp/examples/wisp_gallery.rs @@ -1,6 +1,6 @@ use std::time::Duration; -use agent_client_protocol::schema::{PlanEntry, PlanEntryPriority, PlanEntryStatus}; +use agent_client_protocol::schema::v1::{PlanEntry, PlanEntryPriority, PlanEntryStatus}; use tui::{ Component, CrosstermEvent, Event, Frame, Gallery, GalleryMessage, Line, MouseCapture, TerminalConfig, TerminalRuntime, Theme, ViewContext, terminal_size, diff --git a/crates/wisp/src/components/app/attachments.rs b/crates/wisp/src/components/app/attachments.rs index 316e286d..5af835ab 100644 --- a/crates/wisp/src/components/app/attachments.rs +++ b/crates/wisp/src/components/app/attachments.rs @@ -1,5 +1,5 @@ use super::PromptAttachment; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use base64::Engine; use base64::engine::general_purpose::STANDARD as BASE64; use std::path::Path; diff --git a/crates/wisp/src/components/app/mod.rs b/crates/wisp/src/components/app/mod.rs index b645a6e0..32412ae3 100644 --- a/crates/wisp/src/components/app/mod.rs +++ b/crates/wisp/src/components/app/mod.rs @@ -9,8 +9,8 @@ use crate::settings::cycle_quick_option; use crate::settings::cycle_reasoning_option; use crate::settings::resolve_content_padding; use crate::settings::resolve_status_line_settings; -use agent_client_protocol::schema::SessionConfigKind; -use agent_client_protocol::schema::SessionUpdate; +use agent_client_protocol::schema::v1::SessionConfigKind; +use agent_client_protocol::schema::v1::SessionUpdate; pub use git_diff_mode::{GitDiffLoadState, GitDiffMode, GitDiffViewMessage}; pub use plan_review_mode::{PlanReviewAction, PlanReviewInput, PlanReviewMode}; use screen_router::ScreenRouter; @@ -32,7 +32,7 @@ use acp_utils::notifications::{ AetherCapabilities, CreateElicitationRequestParams, ElicitationAction, ElicitationResponse, }; use agent_client_protocol::Responder; -use agent_client_protocol::schema::{self as acp, SessionId}; +use agent_client_protocol::schema::v1::{self as acp, SessionId}; use attachments::build_attachment_blocks; use std::path::{Path, PathBuf}; use std::time::{Duration, Instant}; diff --git a/crates/wisp/src/components/conversation_screen.rs b/crates/wisp/src/components/conversation_screen.rs index 6302cf7e..7b7c7d88 100644 --- a/crates/wisp/src/components/conversation_screen.rs +++ b/crates/wisp/src/components/conversation_screen.rs @@ -16,7 +16,7 @@ use acp_utils::notifications::{ WorkspaceEntry, WorkspaceMoveTarget, }; use agent_client_protocol::Responder; -use agent_client_protocol::schema::{self as acp, SessionId}; +use agent_client_protocol::schema::v1::{self as acp, SessionId}; use std::collections::HashSet; use std::path::PathBuf; use std::time::Instant; diff --git a/crates/wisp/src/components/conversation_window.rs b/crates/wisp/src/components/conversation_window.rs index 5cc2c025..49b0d8b6 100644 --- a/crates/wisp/src/components/conversation_window.rs +++ b/crates/wisp/src/components/conversation_window.rs @@ -366,7 +366,7 @@ mod tests { #[test] fn drain_completed_returns_content_and_tool_ids() { - use agent_client_protocol::schema as acp; + use agent_client_protocol::schema::v1 as acp; let mut buffer = ConversationBuffer::new(); buffer.append_text_chunk("hello"); @@ -390,7 +390,7 @@ mod tests { #[test] fn drain_completed_keeps_running_tools() { - use agent_client_protocol::schema as acp; + use agent_client_protocol::schema::v1 as acp; let mut buffer = ConversationBuffer::new(); buffer.append_text_chunk("hello"); diff --git a/crates/wisp/src/components/plan_tracker.rs b/crates/wisp/src/components/plan_tracker.rs index f51f53c6..2702f98f 100644 --- a/crates/wisp/src/components/plan_tracker.rs +++ b/crates/wisp/src/components/plan_tracker.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema::{self as acp}; +use agent_client_protocol::schema::v1::{self as acp}; use std::collections::{HashMap, HashSet}; use std::time::{Duration, Instant}; @@ -129,7 +129,7 @@ impl PlanTracker { #[cfg(test)] mod tests { use super::*; - use agent_client_protocol::schema::{PlanEntryPriority, PlanEntryStatus}; + use agent_client_protocol::schema::v1::{PlanEntryPriority, PlanEntryStatus}; const GRACE_PERIOD: Duration = Duration::from_secs(3); diff --git a/crates/wisp/src/components/plan_view.rs b/crates/wisp/src/components/plan_view.rs index 394ce5f7..a0052447 100644 --- a/crates/wisp/src/components/plan_view.rs +++ b/crates/wisp/src/components/plan_view.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema::{PlanEntry, PlanEntryStatus}; +use agent_client_protocol::schema::v1::{PlanEntry, PlanEntryStatus}; use tui::{FitOptions, Frame, Line, Style, ViewContext}; @@ -58,7 +58,7 @@ impl PlanView<'_> { #[cfg(test)] mod tests { use super::*; - use agent_client_protocol::schema::{PlanEntry, PlanEntryPriority, PlanEntryStatus}; + use agent_client_protocol::schema::v1::{PlanEntry, PlanEntryPriority, PlanEntryStatus}; fn ctx() -> ViewContext { ViewContext::new((80, 24)) diff --git a/crates/wisp/src/components/session_picker.rs b/crates/wisp/src/components/session_picker.rs index f0f08f1b..5ae1ca3f 100644 --- a/crates/wisp/src/components/session_picker.rs +++ b/crates/wisp/src/components/session_picker.rs @@ -1,6 +1,6 @@ use crate::components::common::input_box_frame; use acp_utils::notifications::{SessionDisplayMeta, SessionPreviewResponse, SessionPreviewRole}; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use chrono::{DateTime, Utc}; use std::collections::HashMap; use std::path::{Path, PathBuf}; diff --git a/crates/wisp/src/components/status_line.rs b/crates/wisp/src/components/status_line.rs index 0770be1c..2783606f 100644 --- a/crates/wisp/src/components/status_line.rs +++ b/crates/wisp/src/components/status_line.rs @@ -3,7 +3,7 @@ use crate::components::reasoning_bar::{reasoning_bar, reasoning_color}; use crate::settings::{ResolvedStatusLineSettings, StatusLineSegmentConfig, StatusLineStyle}; use crate::workspace_status::WorkspaceStatus; use acp_utils::config_option_id::ConfigOptionId; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ self as acp, SessionConfigKind, SessionConfigOption, SessionConfigOptionCategory, SessionConfigSelectOptions, }; use tui::{Color, FitOptions, Frame, Line, ViewContext, display_width_text}; diff --git a/crates/wisp/src/components/tool_call_status_view.rs b/crates/wisp/src/components/tool_call_status_view.rs index cc3c52f2..75185a89 100644 --- a/crates/wisp/src/components/tool_call_status_view.rs +++ b/crates/wisp/src/components/tool_call_status_view.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use std::collections::HashMap; use std::path::Path; diff --git a/crates/wisp/src/components/tool_call_statuses.rs b/crates/wisp/src/components/tool_call_statuses.rs index 1d9b8c0d..65c6fc3e 100644 --- a/crates/wisp/src/components/tool_call_statuses.rs +++ b/crates/wisp/src/components/tool_call_statuses.rs @@ -1,5 +1,5 @@ use acp_utils::notifications::SubAgentProgressParams; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use std::collections::HashMap; use std::time::Instant; diff --git a/crates/wisp/src/components/tracked_tool_call.rs b/crates/wisp/src/components/tracked_tool_call.rs index ac6a0a43..c6f4e52b 100644 --- a/crates/wisp/src/components/tracked_tool_call.rs +++ b/crates/wisp/src/components/tracked_tool_call.rs @@ -1,5 +1,5 @@ use acp_utils::notifications::ToolResultMeta; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use std::collections::HashMap; use crate::components::tool_call_status_view::ToolCallStatus; diff --git a/crates/wisp/src/runtime_state.rs b/crates/wisp/src/runtime_state.rs index e7d7e8f0..57724c8c 100644 --- a/crates/wisp/src/runtime_state.rs +++ b/crates/wisp/src/runtime_state.rs @@ -3,9 +3,10 @@ use crate::error::AppError; use crate::settings::{StatusLineSettings, WispSettings}; use crate::workspace_status::WorkspaceStatus; use acp_utils::client::{AcpClientError, AcpEvent, AcpPromptHandle, TokioAcpAgent, spawn_acp_session}; -use agent_client_protocol::schema::{ - AuthMethod, Implementation, InitializeRequest, NewSessionRequest, PromptCapabilities, ProtocolVersion, - SessionCapabilities, SessionConfigOption, SessionId, +use agent_client_protocol::schema::ProtocolVersion; +use agent_client_protocol::schema::v1::{ + AuthMethod, Implementation, InitializeRequest, NewSessionRequest, PromptCapabilities, SessionCapabilities, + SessionConfigOption, SessionId, }; use std::env::current_dir; use std::str::FromStr; diff --git a/crates/wisp/src/session_loading_buffer.rs b/crates/wisp/src/session_loading_buffer.rs index 518b3ad7..9255c797 100644 --- a/crates/wisp/src/session_loading_buffer.rs +++ b/crates/wisp/src/session_loading_buffer.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema::{SessionId, SessionUpdate}; +use agent_client_protocol::schema::v1::{SessionId, SessionUpdate}; use std::collections::HashMap; #[derive(Default)] diff --git a/crates/wisp/src/settings/menu.rs b/crates/wisp/src/settings/menu.rs index d5328ef2..0197e619 100644 --- a/crates/wisp/src/settings/menu.rs +++ b/crates/wisp/src/settings/menu.rs @@ -1,7 +1,7 @@ pub use super::types::{SettingsChange, SettingsMenuEntry, SettingsMenuEntryKind, SettingsMenuValue}; use acp_utils::config_meta::{ConfigOptionMeta, SelectOptionMeta}; use acp_utils::config_option_id::{ConfigOptionId, THEME_CONFIG_ID}; -use agent_client_protocol::schema::{SessionConfigKind, SessionConfigOption, SessionConfigSelectOptions}; +use agent_client_protocol::schema::v1::{SessionConfigKind, SessionConfigOption, SessionConfigSelectOptions}; use tui::{Component, Event, Frame, Line, SelectItem, SelectList, SelectListMessage, ViewContext}; pub struct SettingsMenu { @@ -256,7 +256,9 @@ impl SettingsMenu { #[cfg(test)] mod tests { use super::*; - use agent_client_protocol::schema::{SessionConfigOption, SessionConfigOptionCategory, SessionConfigSelectOption}; + use agent_client_protocol::schema::v1::{ + SessionConfigOption, SessionConfigOptionCategory, SessionConfigSelectOption, + }; use tui::{KeyCode, KeyEvent, KeyModifiers}; fn sel(id: &str, name: &str, current: &str, values: &[(&str, &str)]) -> SessionConfigOption { diff --git a/crates/wisp/src/settings/mod.rs b/crates/wisp/src/settings/mod.rs index b1fce687..64707fee 100644 --- a/crates/wisp/src/settings/mod.rs +++ b/crates/wisp/src/settings/mod.rs @@ -9,7 +9,7 @@ use crate::components::provider_login::{ProviderLoginEntry, ProviderLoginStatus, use crate::components::server_status::server_status_summary; use acp_utils::notifications::McpServerStatusEntry; use acp_utils::settings::SettingsStore; -use agent_client_protocol::schema::{AuthMethod, SessionConfigOption}; +use agent_client_protocol::schema::v1::{AuthMethod, SessionConfigOption}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use std::path::{Path, PathBuf}; use tracing::warn; @@ -418,7 +418,7 @@ fn theme_file_from_picker_value(value: &str) -> Option { pub(crate) fn cycle_quick_option(config_options: &[SessionConfigOption]) -> Option<(String, String)> { use crate::components::status_line::is_cycleable_mode_option; - use agent_client_protocol::schema::{SessionConfigKind, SessionConfigSelectOptions}; + use agent_client_protocol::schema::v1::{SessionConfigKind, SessionConfigSelectOptions}; let option = config_options.iter().find(|option| is_cycleable_mode_option(option))?; diff --git a/crates/wisp/src/settings/overlay.rs b/crates/wisp/src/settings/overlay.rs index 5e47014d..a451bf9c 100644 --- a/crates/wisp/src/settings/overlay.rs +++ b/crates/wisp/src/settings/overlay.rs @@ -9,7 +9,7 @@ use acp_utils::notifications::{ ElicitationParams, ElicitationResponse, McpServerStatusEntry, UrlElicitationCompleteParams, }; use agent_client_protocol::Responder; -use agent_client_protocol::schema::{self as acp, SessionConfigKind, SessionConfigOption}; +use agent_client_protocol::schema::v1::{self as acp, SessionConfigKind, SessionConfigOption}; use tui::Panel; use tui::{Component, Cursor, Event, Frame, Line, ViewContext}; use unicode_width::UnicodeWidthStr; @@ -415,7 +415,7 @@ mod tests { use crate::test_helpers::key; use acp_utils::config_option_id::THEME_CONFIG_ID; use acp_utils::notifications::{McpServerAuthCapability, McpServerStatus}; - use agent_client_protocol::schema::{SessionConfigOption, SessionConfigSelectOption}; + use agent_client_protocol::schema::v1::{SessionConfigOption, SessionConfigSelectOption}; use tui::KeyCode; fn select_opt(id: &'static str, name: &'static str) -> SessionConfigSelectOption { diff --git a/crates/wisp/tests/app_tests/command_picker_tests.rs b/crates/wisp/tests/app_tests/command_picker_tests.rs index a7fbb70f..d1c9cf08 100644 --- a/crates/wisp/tests/app_tests/command_picker_tests.rs +++ b/crates/wisp/tests/app_tests/command_picker_tests.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use tui::{KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers}; use super::common::*; diff --git a/crates/wisp/tests/app_tests/common.rs b/crates/wisp/tests/app_tests/common.rs index aee7f3c8..75ee90a3 100644 --- a/crates/wisp/tests/app_tests/common.rs +++ b/crates/wisp/tests/app_tests/common.rs @@ -4,7 +4,7 @@ use acp_utils::notifications::{AetherCapabilities, WorkspaceListResponse}; use acp_utils::notifications::{ElicitationParams, WorkspaceEntry}; use acp_utils::notifications::{ElicitationResponse, WorkspaceMoveResponse}; use agent_client_protocol::Responder; -use agent_client_protocol::schema::{self as acp, AuthMethod, SessionCapabilities, SessionConfigOption}; +use agent_client_protocol::schema::v1::{self as acp, AuthMethod, SessionCapabilities, SessionConfigOption}; use std::path::PathBuf; use tokio::sync::mpsc::UnboundedReceiver; pub(super) use tui::KeyCode::{Backspace, Down, Enter, Esc, Up}; diff --git a/crates/wisp/tests/app_tests/message_streaming_tests.rs b/crates/wisp/tests/app_tests/message_streaming_tests.rs index a6b195f8..32f314f3 100644 --- a/crates/wisp/tests/app_tests/message_streaming_tests.rs +++ b/crates/wisp/tests/app_tests/message_streaming_tests.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use tui::testing::assert_buffer_eq; use super::common::*; diff --git a/crates/wisp/tests/app_tests/mode_cycling_tests.rs b/crates/wisp/tests/app_tests/mode_cycling_tests.rs index ce4b8ae1..3285beba 100644 --- a/crates/wisp/tests/app_tests/mode_cycling_tests.rs +++ b/crates/wisp/tests/app_tests/mode_cycling_tests.rs @@ -1,5 +1,5 @@ use acp_utils::client::PromptCommand; -use agent_client_protocol::schema::{ +use agent_client_protocol::schema::v1::{ self as acp, SessionConfigOption, SessionConfigOptionCategory, SessionConfigSelectOption, }; use tui::{KeyCode, KeyEvent, KeyModifiers}; diff --git a/crates/wisp/tests/app_tests/notifications_tests.rs b/crates/wisp/tests/app_tests/notifications_tests.rs index a579058e..7b69a6eb 100644 --- a/crates/wisp/tests/app_tests/notifications_tests.rs +++ b/crates/wisp/tests/app_tests/notifications_tests.rs @@ -1,7 +1,7 @@ use acp_utils::notifications::{ ContextUsage, ContextUsageParams, SubAgentEvent, SubAgentProgressParams, SubAgentToolRequest, }; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use super::common::*; diff --git a/crates/wisp/tests/app_tests/progress_indicator_tests.rs b/crates/wisp/tests/app_tests/progress_indicator_tests.rs index 88f3c534..3415bdb2 100644 --- a/crates/wisp/tests/app_tests/progress_indicator_tests.rs +++ b/crates/wisp/tests/app_tests/progress_indicator_tests.rs @@ -77,7 +77,7 @@ async fn test_spinner_visible_after_prompt_submit() -> TestResult { #[tokio::test] async fn test_spinner_persists_on_session_update() -> TestResult { - use agent_client_protocol::schema as acp; + use agent_client_protocol::schema::v1 as acp; let mut renderer = RendererTest::new().size((TEST_WIDTH, 40)).build()?; diff --git a/crates/wisp/tests/app_tests/session_tests.rs b/crates/wisp/tests/app_tests/session_tests.rs index 195c347b..241ffdf1 100644 --- a/crates/wisp/tests/app_tests/session_tests.rs +++ b/crates/wisp/tests/app_tests/session_tests.rs @@ -1,6 +1,6 @@ use acp_utils::client::PromptCommand; use acp_utils::notifications::{SessionDisplayMeta, SessionPreviewResponse, SessionPreviewRole, SessionPreviewTurn}; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use std::path::PathBuf; use tokio::sync::mpsc::UnboundedReceiver; use tui::testing::assert_buffer_eq; diff --git a/crates/wisp/tests/app_tests/settings_menu_tests.rs b/crates/wisp/tests/app_tests/settings_menu_tests.rs index 8c6ca2fb..6521e82d 100644 --- a/crates/wisp/tests/app_tests/settings_menu_tests.rs +++ b/crates/wisp/tests/app_tests/settings_menu_tests.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use tui::KeyCode; use tui::KeyEvent; use tui::KeyEventKind; diff --git a/crates/wisp/tests/app_tests/status_line_tests.rs b/crates/wisp/tests/app_tests/status_line_tests.rs index 130f3f2c..678c6b0b 100644 --- a/crates/wisp/tests/app_tests/status_line_tests.rs +++ b/crates/wisp/tests/app_tests/status_line_tests.rs @@ -1,4 +1,4 @@ -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use tui::KeyCode; use super::common::*; diff --git a/crates/wisp/tests/app_tests/workspace_move_tests.rs b/crates/wisp/tests/app_tests/workspace_move_tests.rs index bff7333d..a5014f10 100644 --- a/crates/wisp/tests/app_tests/workspace_move_tests.rs +++ b/crates/wisp/tests/app_tests/workspace_move_tests.rs @@ -1,6 +1,6 @@ use acp_utils::client::PromptCommand; use acp_utils::notifications::{WorkspaceEntry, WorkspaceMoveTarget}; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use std::{io, path::PathBuf}; use tokio::sync::mpsc::UnboundedReceiver; diff --git a/crates/wisp/tests/component_tests/settings_menu.rs b/crates/wisp/tests/component_tests/settings_menu.rs index 0939df07..e59148d9 100644 --- a/crates/wisp/tests/component_tests/settings_menu.rs +++ b/crates/wisp/tests/component_tests/settings_menu.rs @@ -1,5 +1,5 @@ use acp_utils::config_meta::SelectOptionMeta; -use agent_client_protocol::schema::SessionConfigSelectOption; +use agent_client_protocol::schema::v1::SessionConfigSelectOption; use tui::Component; use tui::ViewContext; use tui::testing::render_component; @@ -11,10 +11,10 @@ fn make_select_option( name: &str, current: &str, values: &[(&str, &str)], -) -> agent_client_protocol::schema::SessionConfigOption { +) -> agent_client_protocol::schema::v1::SessionConfigOption { let options: Vec = values.iter().map(|(v, n)| SessionConfigSelectOption::new((*v).to_string(), (*n).to_string())).collect(); - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( id.to_string(), name.to_string(), current.to_string(), diff --git a/crates/wisp/tests/component_tests/settings_overlay.rs b/crates/wisp/tests/component_tests/settings_overlay.rs index 0bcc4096..db07c529 100644 --- a/crates/wisp/tests/component_tests/settings_overlay.rs +++ b/crates/wisp/tests/component_tests/settings_overlay.rs @@ -1,5 +1,5 @@ use acp_utils::notifications::{McpServerAuthCapability, McpServerStatus, McpServerStatusEntry}; -use agent_client_protocol::schema::{self as acp, SessionConfigSelectOption}; +use agent_client_protocol::schema::v1::{self as acp, SessionConfigSelectOption}; use tui::testing::render_component; use tui::{Component, Event, KeyCode, KeyEvent, KeyModifiers, ViewContext}; use wisp::settings::menu::SettingsMenu; @@ -7,7 +7,7 @@ use wisp::settings::overlay::{SettingsMessage, SettingsOverlay}; fn make_menu() -> SettingsMenu { let options = vec![ - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( "provider", "Provider", "openrouter", @@ -16,7 +16,7 @@ fn make_menu() -> SettingsMenu { SessionConfigSelectOption::new("ollama", "Ollama"), ], ), - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( "model", "Model", "gpt-4o", @@ -33,7 +33,7 @@ fn make_multi_select_menu() -> SettingsMenu { let mut meta = serde_json::Map::new(); meta.insert("multi_select".to_string(), serde_json::Value::Bool(true)); let options = vec![ - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( "provider", "Provider", "openrouter", @@ -42,7 +42,7 @@ fn make_multi_select_menu() -> SettingsMenu { SessionConfigSelectOption::new("ollama", "Ollama"), ], ), - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( "model", "Model", "gpt-4o", @@ -297,7 +297,7 @@ fn very_small_terminal_shows_fallback() { fn update_settings_options_never_renders_reasoning_row() { // Initial options include model + reasoning_effort let initial_options = vec![ - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( "model", "Model", "claude-opus", @@ -306,7 +306,7 @@ fn update_settings_options_never_renders_reasoning_row() { SessionConfigSelectOption::new("deepseek-chat", "DeepSeek Chat"), ], ), - agent_client_protocol::schema::SessionConfigOption::select( + agent_client_protocol::schema::v1::SessionConfigOption::select( "reasoning_effort", "Reasoning Effort", "high", @@ -327,7 +327,7 @@ fn update_settings_options_never_renders_reasoning_row() { assert!(!text.contains("Reasoning Effort"), "Reasoning Effort should NOT appear initially; got:\n{text}"); // After update to model-only options, still no Reasoning Effort - let updated_options = vec![agent_client_protocol::schema::SessionConfigOption::select( + let updated_options = vec![agent_client_protocol::schema::v1::SessionConfigOption::select( "model", "Model", "deepseek-chat", @@ -365,7 +365,7 @@ async fn tall_terminal_shows_more_picker_items() { let many_models: Vec = (0..20).map(|i| SessionConfigSelectOption::new(format!("model-{i}"), format!("Model {i}"))).collect(); let options = - vec![agent_client_protocol::schema::SessionConfigOption::select("model", "Model", "model-0", many_models)]; + vec![agent_client_protocol::schema::v1::SessionConfigOption::select("model", "Model", "model-0", many_models)]; let menu = SettingsMenu::from_config_options(&options); let mut overlay = SettingsOverlay::new(menu, vec![], vec![]); overlay.on_event(&Event::Key(key(KeyCode::Enter))).await; // open picker diff --git a/crates/wisp/tests/component_tests/status_line.rs b/crates/wisp/tests/component_tests/status_line.rs index 7360a6b8..169720b0 100644 --- a/crates/wisp/tests/component_tests/status_line.rs +++ b/crates/wisp/tests/component_tests/status_line.rs @@ -1,5 +1,5 @@ use acp_utils::config_option_id::ConfigOptionId; -use agent_client_protocol::schema::{self as acp, SessionConfigOption, SessionConfigOptionCategory}; +use agent_client_protocol::schema::v1::{self as acp, SessionConfigOption, SessionConfigOptionCategory}; use tui::ViewContext; use tui::testing::render_lines; use wisp::components::status_line::{ContextUsageDisplay, StatusLine}; diff --git a/crates/wisp/tests/component_tests/support/tool_events.rs b/crates/wisp/tests/component_tests/support/tool_events.rs index 3fc433ba..7032d2aa 100644 --- a/crates/wisp/tests/component_tests/support/tool_events.rs +++ b/crates/wisp/tests/component_tests/support/tool_events.rs @@ -1,5 +1,5 @@ use acp_utils::notifications::SubAgentProgressParams; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use serde_json::{Value, json}; use wisp::components::tool_call_status_view::{ToolCallStatus, ToolCallStatusView}; diff --git a/crates/wisp/tests/component_tests/tool_call_statuses.rs b/crates/wisp/tests/component_tests/tool_call_statuses.rs index 801cbe72..38496782 100644 --- a/crates/wisp/tests/component_tests/tool_call_statuses.rs +++ b/crates/wisp/tests/component_tests/tool_call_statuses.rs @@ -1,5 +1,5 @@ use super::support::tool_events::*; -use agent_client_protocol::schema as acp; +use agent_client_protocol::schema::v1 as acp; use serde_json::json; use tui::testing::{assert_buffer_eq, render_component, render_lines}; use tui::{BRAILLE_FRAMES as FRAMES, DiffLine, DiffPreview, DiffTag, Line, SplitDiffEntry, SplitDiffRow, ViewContext}; From 0bedf2f0b74ebad238808c6a4cdd11aa59a08bea Mon Sep 17 00:00:00 2001 From: PatchWave Date: Wed, 29 Jul 2026 18:31:20 +0000 Subject: [PATCH 3/3] fix(deps): complete ACP v2 migration --- crates/acp-utils/src/notifications.rs | 16 ++++++++-------- .../tests/integration/acp_agent_switching.rs | 2 +- .../aether-cli/tests/integration/acp_stdio.rs | 8 +++----- .../wisp/tests/component_tests/settings_menu.rs | 16 +++------------- .../tests/component_tests/settings_overlay.rs | 17 ++++++++--------- 5 files changed, 23 insertions(+), 36 deletions(-) diff --git a/crates/acp-utils/src/notifications.rs b/crates/acp-utils/src/notifications.rs index 17588110..6572c418 100644 --- a/crates/acp-utils/src/notifications.rs +++ b/crates/acp-utils/src/notifications.rs @@ -2,7 +2,7 @@ //! notifications. use std::path::PathBuf; -use agent_client_protocol::schema::v1::AuthMethod; +use agent_client_protocol::schema::v1::{AuthMethod, Meta}; use agent_client_protocol::{JsonRpcNotification, JsonRpcRequest, JsonRpcResponse}; pub use mcp_utils::display_meta::{ToolDisplayMeta, ToolResultMeta}; pub use rmcp::model::CreateElicitationRequestParams; @@ -234,12 +234,12 @@ impl SessionDisplayMeta { } #[must_use] - pub fn to_meta(&self) -> agent_client_protocol::schema::v1::Meta { + pub fn to_meta(&self) -> Meta { to_aether_meta(self) } #[must_use] - pub fn from_meta(meta: Option<&agent_client_protocol::schema::v1::Meta>) -> Self { + pub fn from_meta(meta: Option<&Meta>) -> Self { from_aether_meta(meta) } } @@ -257,23 +257,23 @@ pub struct AetherCapabilities { impl AetherCapabilities { #[must_use] - pub fn to_meta(self) -> agent_client_protocol::schema::v1::Meta { + pub fn to_meta(self) -> Meta { to_aether_meta(&self) } #[must_use] - pub fn from_meta(meta: Option<&agent_client_protocol::schema::v1::Meta>) -> Self { + pub fn from_meta(meta: Option<&Meta>) -> Self { from_aether_meta(meta) } } -fn to_aether_meta(value: &T) -> agent_client_protocol::schema::v1::Meta { - let mut meta = agent_client_protocol::schema::v1::Meta::new(); +fn to_aether_meta(value: &T) -> Meta { + let mut meta = Meta::new(); meta.insert(AETHER_META_NAMESPACE.to_string(), serde_json::json!(value)); meta } -fn from_aether_meta(meta: Option<&agent_client_protocol::schema::v1::Meta>) -> T { +fn from_aether_meta(meta: Option<&Meta>) -> T { meta.and_then(|m| m.get(AETHER_META_NAMESPACE)) .cloned() .and_then(|value| serde_json::from_value(value).ok()) diff --git a/crates/aether-cli/tests/integration/acp_agent_switching.rs b/crates/aether-cli/tests/integration/acp_agent_switching.rs index e6436098..f16973de 100644 --- a/crates/aether-cli/tests/integration/acp_agent_switching.rs +++ b/crates/aether-cli/tests/integration/acp_agent_switching.rs @@ -223,7 +223,7 @@ async fn select_mode(harness: &AcpTestHarness, fake: &FakeAgentSwitchingSession, .send_request(SetSessionConfigOptionRequest::new( fake.session_id().clone(), ConfigOptionId::Mode.as_str(), - mode.to_string(), + mode, )) .block_task() .await diff --git a/crates/aether-cli/tests/integration/acp_stdio.rs b/crates/aether-cli/tests/integration/acp_stdio.rs index 4b826da7..b7da7c8d 100644 --- a/crates/aether-cli/tests/integration/acp_stdio.rs +++ b/crates/aether-cli/tests/integration/acp_stdio.rs @@ -1,7 +1,6 @@ -use agent_client_protocol::JsonRpcMessage; -use agent_client_protocol::jsonrpcmsg::{Id, Params, Request}; use agent_client_protocol::schema::ProtocolVersion; -use agent_client_protocol::schema::v1::InitializeRequest; +use agent_client_protocol::schema::v1::{InitializeRequest, RequestId}; +use agent_client_protocol::{JsonRpcMessage, RawJsonRpcMessage}; use std::error::Error; use std::io::{BufRead, BufReader, Error as IoError, Write}; use std::os::fd::OwnedFd; @@ -80,8 +79,7 @@ fn acp_command(log_dir: &std::path::Path) -> Command { fn initialize_line() -> TestResult { let message = InitializeRequest::new(ProtocolVersion::LATEST).to_untyped_message()?; - let params = serde_json::from_value::(message.params)?; - let request = Request::new_v2(message.method, Some(params), Some(Id::Number(1))); + let request = RawJsonRpcMessage::request(message.method, message.params, RequestId::Number(1))?; Ok(format!("{}\n", serde_json::to_string(&request)?)) } diff --git a/crates/wisp/tests/component_tests/settings_menu.rs b/crates/wisp/tests/component_tests/settings_menu.rs index e59148d9..0230a45e 100644 --- a/crates/wisp/tests/component_tests/settings_menu.rs +++ b/crates/wisp/tests/component_tests/settings_menu.rs @@ -1,25 +1,15 @@ use acp_utils::config_meta::SelectOptionMeta; -use agent_client_protocol::schema::v1::SessionConfigSelectOption; +use agent_client_protocol::schema::v1::{SessionConfigOption, SessionConfigSelectOption}; use tui::Component; use tui::ViewContext; use tui::testing::render_component; use wisp::settings::menu::SettingsMenu; use wisp::settings::types::{SettingsMenuEntry, SettingsMenuEntryKind, SettingsMenuValue}; -fn make_select_option( - id: &str, - name: &str, - current: &str, - values: &[(&str, &str)], -) -> agent_client_protocol::schema::v1::SessionConfigOption { +fn make_select_option(id: &str, name: &str, current: &str, values: &[(&str, &str)]) -> SessionConfigOption { let options: Vec = values.iter().map(|(v, n)| SessionConfigSelectOption::new((*v).to_string(), (*n).to_string())).collect(); - agent_client_protocol::schema::v1::SessionConfigOption::select( - id.to_string(), - name.to_string(), - current.to_string(), - options, - ) + SessionConfigOption::select(id.to_string(), name.to_string(), current.to_string(), options) } #[test] diff --git a/crates/wisp/tests/component_tests/settings_overlay.rs b/crates/wisp/tests/component_tests/settings_overlay.rs index db07c529..a47b7167 100644 --- a/crates/wisp/tests/component_tests/settings_overlay.rs +++ b/crates/wisp/tests/component_tests/settings_overlay.rs @@ -7,7 +7,7 @@ use wisp::settings::overlay::{SettingsMessage, SettingsOverlay}; fn make_menu() -> SettingsMenu { let options = vec![ - agent_client_protocol::schema::v1::SessionConfigOption::select( + acp::SessionConfigOption::select( "provider", "Provider", "openrouter", @@ -16,7 +16,7 @@ fn make_menu() -> SettingsMenu { SessionConfigSelectOption::new("ollama", "Ollama"), ], ), - agent_client_protocol::schema::v1::SessionConfigOption::select( + acp::SessionConfigOption::select( "model", "Model", "gpt-4o", @@ -33,7 +33,7 @@ fn make_multi_select_menu() -> SettingsMenu { let mut meta = serde_json::Map::new(); meta.insert("multi_select".to_string(), serde_json::Value::Bool(true)); let options = vec![ - agent_client_protocol::schema::v1::SessionConfigOption::select( + acp::SessionConfigOption::select( "provider", "Provider", "openrouter", @@ -42,7 +42,7 @@ fn make_multi_select_menu() -> SettingsMenu { SessionConfigSelectOption::new("ollama", "Ollama"), ], ), - agent_client_protocol::schema::v1::SessionConfigOption::select( + acp::SessionConfigOption::select( "model", "Model", "gpt-4o", @@ -297,7 +297,7 @@ fn very_small_terminal_shows_fallback() { fn update_settings_options_never_renders_reasoning_row() { // Initial options include model + reasoning_effort let initial_options = vec![ - agent_client_protocol::schema::v1::SessionConfigOption::select( + acp::SessionConfigOption::select( "model", "Model", "claude-opus", @@ -306,7 +306,7 @@ fn update_settings_options_never_renders_reasoning_row() { SessionConfigSelectOption::new("deepseek-chat", "DeepSeek Chat"), ], ), - agent_client_protocol::schema::v1::SessionConfigOption::select( + acp::SessionConfigOption::select( "reasoning_effort", "Reasoning Effort", "high", @@ -327,7 +327,7 @@ fn update_settings_options_never_renders_reasoning_row() { assert!(!text.contains("Reasoning Effort"), "Reasoning Effort should NOT appear initially; got:\n{text}"); // After update to model-only options, still no Reasoning Effort - let updated_options = vec![agent_client_protocol::schema::v1::SessionConfigOption::select( + let updated_options = vec![acp::SessionConfigOption::select( "model", "Model", "deepseek-chat", @@ -364,8 +364,7 @@ async fn tall_terminal_shows_more_picker_items() { // Create a menu with many model options let many_models: Vec = (0..20).map(|i| SessionConfigSelectOption::new(format!("model-{i}"), format!("Model {i}"))).collect(); - let options = - vec![agent_client_protocol::schema::v1::SessionConfigOption::select("model", "Model", "model-0", many_models)]; + let options = vec![acp::SessionConfigOption::select("model", "Model", "model-0", many_models)]; let menu = SettingsMenu::from_config_options(&options); let mut overlay = SettingsOverlay::new(menu, vec![], vec![]); overlay.on_event(&Event::Key(key(KeyCode::Enter))).await; // open picker