feat(acp): implement protocol completeness (#922)#952
Merged
Conversation
This was
linked to
issues
Feb 26, 2026
577715f to
fe45515
Compare
Implements gaps G1-G14 identified in the ACP gap analysis. Protocol compliance (P0): - set_session_mode with ask/code/architect modes and current_mode_update notifications on change (G2, G11) - AgentCapabilities now advertises session_capabilities: list/fork/resume (G3) - ext_notification handler: accepts fire-and-forget notifications (G4) Behavioral improvements (P1): - Tool call lifecycle: emit InProgress then Completed per tool output (G5) - Terminal command timeout via kill_terminal_command; configurable via terminal_timeout_secs (default 120s) (G6) - ToolCallContent::Terminal emitted for bash tool calls with terminal_id (G7) - MCP HTTP server transport support in mcp_bridge (G8) - UserMessageChunk echo notification after user prompt is sent (G10) - Structured tracing::warn for unsupported Audio/ResourceLink blocks (G9) Unstable session management (behind feature flags, default-on): - list_sessions (unstable_session_list) (G12) - fork_session with LRU eviction guard (unstable_session_fork) (G13) - resume_session with LRU eviction guard (unstable_session_resume) (G14) Security: ext_method_mcp internal errors logged via tracing::error, generic "internal error" returned to client. ToolOutput and LoopbackEvent::ToolOutput gain terminal_id: Option<String>; all call sites updated. 4 new unit tests added for G2/G3/G4/G11. 2859 tests pass.
fe45515 to
8e38a51
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements all P0/P1 ACP protocol gaps identified in the gap analysis for issue #922.
set_session_modewith ask/code/architect modes;current_mode_updatenotification on changeAgentCapabilitiesadvertises session capabilities (list/fork/resume)ext_notificationhandler (fire-and-forget)InProgressthenCompletedper outputkill_terminal_command;terminal_timeout_secsconfig (default 120s)ToolCallContent::Terminalfor bash tool calls;terminal_idpropagated throughToolOutput/LoopbackEventmcp_bridgetracing::warnfor unsupportedAudio/ResourceLinkblocksUserMessageChunkecho after user promptlist_sessions,fork_session,resume_sessionbehindunstable_session_*feature flags (default-on); LRU eviction guard on fork/resumeSecurity
fork_sessionandresume_sessioncheckmax_sessionsand apply LRU eviction before insertext_method_mcpinternal errors logged viatracing::error!, generic "internal error" returned to clientCommand::new, no shell)Test plan
cargo +nightly fmt --checkpassescargo clippy --workspace -- -D warningspasses (0 warnings)cargo nextest run --workspace --lib --bins— 2859 passed, 11 skippedinitialize_advertises_session_capabilities,set_session_mode_valid_updates_current_mode,set_session_mode_unknown_mode_errors,ext_notification_always_ok