fix: bump agent-client-protocol to >=0.8.1#587
Conversation
Resolves dependency conflict with openhands-sdk v1.12.0 which requires agent-client-protocol>=0.8.1. The CLI's previous constraint (<0.8.0) prevented upgrading the SDK and blocked CLI releases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ibility - Rename StdioMcpServer -> McpServerStdio (renamed in ACP 0.8.1) - Replace SessionUpdate2-6 with named types (AgentMessageChunk, AgentThoughtChunk, ToolCallStart, ToolCallProgress, AgentPlanUpdate) - Add stub implementations for new Protocol methods (fork_session, resume_session, set_config_option) to satisfy pyright Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Import ForkSessionResponse/ResumeSessionResponse from acp.schema (not exported from acp top-level) - Fix RequestError.method_not_found() calls (takes str, not dict) - Fix new_session signature: mcp_servers is now optional (list | None) - Fix load_session parameter order to match Protocol (cwd, session_id, mcp_servers) and make mcp_servers optional Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||
|
I have run simple manual tests (single prompt) against the CLI, acp via Zed and acp via JetBrains IntelliJ IDEA. All looks good. |
🟢 Good Taste - Clean, Mechanical Dependency UpgradeLinus-Style Analysis: This PR is boring in the best possible way. It's a dependency version bump that does exactly what it needs to do and nothing more. The changes fall into three categories: 1. Symbol Renames (Mechanical, correct)
These are upstream API renames. You have no choice. The new names are better anyway — 2. Signature Compliance (Mechanical, correct)
Again, upstream dictates this. The optional 3. Protocol Stub Implementations (Correct approach)async def fork_session(...) -> ForkSessionResponse:
"""Fork a session (not supported)."""
raise RequestError.method_not_found("session/fork")This is exactly what you should do when a Protocol forces you to implement methods you don't support. Raise The only slight smell is What's not here (good):
✅ VERDICT: Worth merging This is a dependency upgrade PR that doesn't try to be anything else. The code changes are 100% mechanical consequences of the upstream API changes. All CI checks pass. The PR description explains why every change exists. KEY INSIGHT: One Minor Note (Non-blocking): [pyproject.toml, Line 26] The constraint changed from |
|
@simonrosenberg Since this |
Prevent future breakage from ACP minor version bumps which tend to include breaking changes (pre-1.0 semver). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
agent-client-protocolfrom>=0.7.0,<0.8.0to>=0.8.1openhands-sdkv1.12.0 which requiresagent-client-protocol>=0.8.1<0.8.0) prevented the CLI from upgrading to newer SDK versions, blocking releases that include other SDK fixesContext
PR #2133 added
agent-client-protocol>=0.8.1as a required dependency ofopenhands-sdk. This created a mutual exclusion with the CLI's<0.8.0constraint, making it impossible to release CLI versions that include SDK v1.12.0+.What changed in ACP 0.8.1
All code changes in this PR are direct consequences of the
agent-client-protocol0.7.x → 0.8.1 upgrade:Renamed symbols (runtime ImportError without these):
StdioMcpServer→McpServerStdio(1 production file, 2 test files)SessionUpdate2–SessionUpdate6→ named types:AgentMessageChunk,AgentThoughtChunk,ToolCallStart,ToolCallProgress,AgentPlanUpdate(1 test file)Protocol signature changes (pyright errors without these):
new_session:mcp_serversparameter changed fromlist[Any]tolist[...] | None = Noneload_session: parameter order changed from(cwd, mcp_servers, session_id)to(cwd, session_id, mcp_servers), andmcp_serversbecame optionalNew Protocol methods (pyright errors without these):
fork_session,resume_session,set_config_optionwere added to theAgentProtocol in 0.8.1 — stub implementations added toBaseOpenHandsACPAgentTest plan
uv lockresolves without conflicts🤖 Generated with Claude Code
🚀 Try this PR