Skip to content

Conversation

@nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Oct 30, 2025

This branch

  1. replaces a dependency on agent-client-protocol with a dependency on agent-client-protocol-schema
  2. re-exports various types so that users don't have to use multiple crates

nikomatsakis and others added 7 commits October 30, 2025 10:01
…usage

Add example showing how to create a minimal ACP agent using the sacp
JsonRpcConnection API. Demonstrates handling initialize request and
routing other messages through untyped handler.
…tocol-schema

Updated all crates to depend on agent-client-protocol-schema (v0.6.3)
instead of the full agent-client-protocol package. This makes the sacp
crate more standalone by only depending on the schema definitions.

Changes:
- Updated workspace dependency to [email protected]
- Updated all crate Cargo.toml files (sacp, sacp-proxy, sacp-conductor)
- Replaced all import statements across the codebase
- Verified build and all tests pass (32 tests)
Renamed all JsonRpc-prefixed types to Jr (JSON-RPC) prefix:
- JsonRpcConnection → JrConnection
- JsonRpcConnectionCx → JrConnectionCx
- JsonRpcHandler → JrHandler
- JsonRpcMessage → JrMessage
- JsonRpcRequest → JrRequest
- JsonRpcNotification → JrNotification
- JsonRpcRequestCx → JrRequestCx
- JsonRpcResponse → JrResponse
- JsonRpcResponsePayload → JrResponsePayload

This prepares for extracting the generic JSON-RPC handling into a
separate 'jr' crate that is not tied to the Agent Client Protocol.

All tests pass (32 tests across sacp, sacp-proxy, sacp-conductor).

Co-authored-by: Claude <[email protected]>
Re-export all types from agent-client-protocol-schema at the root of sacp.
This makes ACP protocol types directly available as sacp::InitializeRequest,
sacp::SessionId, etc. without requiring users to import from both crates.

No naming conflicts detected - the Jr* rename resolved the only conflict
(JrMessage trait vs agent-client-protocol-schema's JsonRpcMessage struct).

All tests pass (32 tests across sacp, sacp-proxy, sacp-conductor).

Co-authored-by: Claude <[email protected]>
Replace agent_client_protocol_schema imports and acp:: usages:
- Within sacp: use crate:: to reference re-exported types
- In sacp-proxy/conductor: use sacp:: instead of acp::
- In tests and examples: use sacp:: instead of acp::

This makes the code clearer by using the actual source (sacp) for
all ACP types, now that sacp re-exports them all.

All 32 tests pass.

Co-authored-by: Claude <[email protected]>
Replace incorrect crate::Error references with sacp::Error in sacp-proxy,
sacp-conductor, and test files. The Error type is defined in sacp and should
be referenced as sacp::Error from other crates.

Also remove unused 'self as acp' imports from agent_client_protocol_schema.
@nikomatsakis nikomatsakis changed the title Refactor/remove acp dependency remove dependency on ACP Oct 30, 2025
@nikomatsakis nikomatsakis merged commit 421f440 into agentclientprotocol:main Oct 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant