Repository navigation
fix(conductor)!: narrow the conductor API and fix multi-version chains - #475
Merged
Merged
Conversation
…nitialize - Treat `session/fork` as a session setup method in every build. Without `unstable_session_fork` the polyfill used to forward `McpServer::Acp` entries of forked sessions unchanged; now it rewrites them and leaves validation to the agent (G80). - Answer an invalid or version-changing `proxy/initialize` with an error instead of closing the polyfill's connection, and forward a repeated `proxy/initialize` on the same version (F33). - Drop the conductor's `unstable_protocol_v2` -> polyfill feature edge. It only applied to the conductor's dev-dependency, so real users got a v1-only polyfill anyway. Document that the polyfill needs its own feature and negotiates the chain down to v1 without it (G79). - Mark `McpOverAcpPolyfill` `#[non_exhaustive]` (F45). - Add docs.rs metadata to the conductor and polyfill crates (G81). BREAKING CHANGE: `McpOverAcpPolyfill` is `#[non_exhaustive]`; create it with `McpOverAcpPolyfill::http()`. The conductor's `unstable_protocol_v2` feature no longer enables `agent-client-protocol-polyfill/unstable_protocol_v2`. Co-Authored-By: Claude <noreply@anthropic.com>
…aceSource `TraceViewerConfig` gains `port` and `open_browser` setters and is `#[non_exhaustive]`, so new options can be added later (F45). `TraceSource` appeared in no public signature, so it is now private (F46). BREAKING CHANGE: build `TraceViewerConfig` from `TraceViewerConfig::default()` with the setters instead of a struct literal. `TraceSource` is no longer public. Co-Authored-By: Claude <noreply@anthropic.com>
- Replace the `pub use conductor::*` glob with explicit re-exports. `ConductorRunner`, `ConductorMessage`, `ConductorSuccessor`, `ComponentIndex` and `SourceComponentIndex` are no longer public. `ConductorHostRole` becomes a sealed marker trait; its `Instantiator` type and methods move to a private supertrait, and `ConductorImpl::new` is private (F12). - Mark `ConductorArgs`, `ConductorCommand` and its variants `#[non_exhaustive]` (F13). - Instantiators return `#[non_exhaustive]` `InstantiatedChain` / `InstantiatedProxies` structs instead of tuples, and the `ProxiesAndAgentComponents` alias is removed (F44). - Rename `trace::Protocol` to `trace::MessageProtocol` (F16). - `SelectedInitializeRequest::into_v1` negotiates a v2 request down to v1, and the conductor accepts an instantiator's request at or below the selected version. A v1-only instantiator no longer rejects v2 clients and leaves the connection failed (F02). - Fix `ComponentIndex::successor_of`, which never returned `Agent`, so traces now include traffic between the last proxy and the agent (F34). - Name `proxy/initialize` correctly in the outside-initialize error (F59). BREAKING CHANGE: instantiators return `InstantiatedChain::new(request, proxies, agent)` / `InstantiatedProxies::new(request, proxies)` instead of tuples; conductor routing internals are no longer exported; `ConductorHostRole` has no public items; `ConductorImpl::new` is private; `ConductorArgs`/`ConductorCommand` are `#[non_exhaustive]`; `trace::Protocol` is renamed to `trace::MessageProtocol`; `into_v1()` downgrades a v2 request instead of failing. Co-Authored-By: Claude <noreply@anthropic.com>
`ConductorHostRole` hid its methods on a private supertrait, but code outside the crate could still call them through a `ConductorHostRole` bound, since a bound's supertrait methods need no import. That kept `handle_dispatch` and its `futures` mpsc sender in the public API. Each sealed method now takes a `Token` that only the conductor crate can create, so outside code can no longer call them. Co-Authored-By: Claude <noreply@anthropic.com>
…or changes - Format the polyfill's protocol as "v1"/"v2" in the version-mismatch error instead of `Some(V1)`. - Test that a malformed repeated `initialize` keeps the polyfill's connection open. - Gate the conductor's v2 polyfill test on the polyfill's own `unstable_protocol_v2` feature with `required-features`, so running the conductor tests with only its own feature skips the test instead of failing it. - List the polyfill and trace behavior changes in the migration guide. Co-Authored-By: Claude <noreply@anthropic.com>
benbrandt
force-pushed
the
cleanup-conductor
branch
from
November 1, 2026 20:18
69a0ba0 to
1fe2731
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.
Pre-release (5.0) cleanup of the conductor, polyfill and trace viewer crates.
Addressed
ConductorRunner,ConductorMessage,ConductorSuccessor,ComponentIndex,SourceComponentIndexare no longer public.ConductorHostRoleis a sealed marker trait. Its methods andInstantiatormoved to a private supertrait, and each method takes a crate-privateToken, so code outside the crate cannot call them through aConductorHostRolebound.ConductorImpl::newis private.#[non_exhaustive]onConductorArgs,ConductorCommandand its variants.#[non_exhaustive]InstantiatedChain/InstantiatedProxiesinstead of tuples.ProxiesAndAgentComponentsis removed.trace::Protocolis renamed totrace::MessageProtocol.SelectedInitializeRequest::into_v1()negotiates a v2 request down to v1, and the conductor accepts an instantiator request at or below the selected version. A v1-only instantiator now serves v2 clients with v1 instead of failing the connection permanently.successor_ofnow returnsAgentfor the last proxy, so traces include last-proxy-to-agent traffic. Snapshots are regenerated.proxy/initializeinstead ofinitialize/proxy.unstable_protocol_v2edge, and fixed the docs: a v1-only polyfill negotiates the chain down to v1, it does not reject.session/forkin every build and only validates it typed withunstable_session_fork.proxy/initializewith an error instead of closing its connection, and forwards a repeat on the same version. The mismatch error names the versions asv1/v2. Regression tests cover a valid and a malformed repeatedinitialize.#[non_exhaustive]onMcpOverAcpPolyfillandTraceViewerConfig.TraceViewerConfiggetsport/open_browsersetters.TraceSourceis private because it appeared in no public signature.md/migration-v5.md(conductor section, including the polyfill and trace behavior changes),md/conductor.md,md/protocol-v2.md,md/mcp-bridge.mdand the polyfill README are updated.Skipped / partial
serve_memorystill returnsanyhow::Resulteven though it can't fail, andVIEWER_HTMLis still public. Neither blocks additive changes later.Notes
tests/mcp_over_acp_polyfill_v2.rsneeds the polyfill's own v2 feature. Itsrequired-featuresincludeagent-client-protocol-polyfill/unstable_protocol_v2, socargo test -p agent-client-protocol-conductor --features unstable_protocol_v2skips the test instead of failing it.proxy/initializebefore the polyfill handler sees it, so through a conductor a malformed version is answered with v1. The handler's error path for invalid or mismatched requests is a defensive fallback.Co-Authored-By: Claude noreply@anthropic.com