Skip to main content

Module bridge

Module bridge 

Source
Expand description

What a bridge can honestly promise.

A bridge sits between two peers that negotiated independently. The client on one side agreed to a set of features with the bridge; the server on the other side agreed to a set with the bridge. Neither negotiation saw the other, and neither one is the truth on its own.

§Why the intersection is the only honest answer

A bridge that advertised the downstream profile would be promising the client things it cannot deliver. The client sees tools/call supported, so it calls — and the request dies somewhere behind the bridge that the client cannot see and has no way to attribute. That is strictly worse than a refusal at handshake time, where the client learns the truth before it acts.

So the bridge advertises the intersection, and keeps every feature it had to drop together with the side that refused it. A dropped feature with a recorded reason is a limitation an operator can see; a dropped feature with no record is a bug that only shows up as a failed tool call.

§Two versions, not one

The downstream and upstream sessions each pin their own ProtocolVersion. They are frequently different — that is the whole reason to run a bridge — and they are stored separately rather than collapsed, because “the client speaks 2025-03-26 and the server speaks 2026-07-28” is exactly the fact an operator needs when a message is translated.

§What a bridge does not claim

Agreement is not reachability. Both peers negotiated with the bridge, and the bridge has still not proved either one is currently answering. A bridge that reported success here would be reporting on a connection it has not made.

Modules§

a2a_mcp
Cross-protocol mapping rules: A2A v1.0 ↔ MCP (any negotiated revision).

Structs§

Agreement
Both sides, and what the bridge can therefore serve.
Leg
The two sides of a bridge, each having negotiated with it independently.
Withheld
A feature the bridge cannot serve, and which side refused it.

Enums§

RefusedBy
Which of the two peers could not provide a feature.

Functions§

agree
Resolves both legs from their negotiations and reconciles them.