Expand description
The bridge use case.
Five modules, each one part of a bridge that would otherwise be one
oversized file: the lossless translation of ToolResult across revisions,
the downstream handshake a bridge owes the client in front of it, the
forwarding path itself, the loop that drives it, and the out-of-band frames
neither side asked for.
Re-exports§
pub use crate::domain::bridge::a2a_mcp::CrossProtocolReport;pub use crate::domain::bridge::a2a_mcp::Direction;pub use crate::domain::bridge::a2a_mcp::Protocol;pub use crate::domain::bridge::a2a_mcp::Step;pub use crate::domain::bridge::a2a_mcp::StepKind;pub use crate::domain::bridge::a2a_mcp::a2a_message_to_mcp_content;pub use crate::domain::bridge::a2a_mcp::a2a_message_to_mcp_text;pub use crate::domain::bridge::a2a_mcp::a2a_skill_to_mcp_tool;pub use crate::domain::bridge::a2a_mcp::mcp_content_to_a2a_part;
Structs§
- A2aMcp
Codec - The codec that turns
SendMessage↔tools/callinto the bridge’s canonical envelopes. - Bridge
- Carries envelopes to
upstreamunder one agreement and brings the answers back. - Bridge
Loop - Carries frames from a downstream peer, through a
Bridge, back to it. - Cross
Bridge Peer - A bridge peer that runs every request and reply through a cross-protocol codec before reaching the inner peer.
- Downstream
- A settled downstream leg: what to answer, and what the bridge may forward.
- Downstream
Config - What this bridge presents to a client, before any client has connected.
- Forwarded
- What one forward produced.
- Identity
- What this bridge calls itself in
serverInfo. - Loop
Report - What one pass of the loop moved.
- Opened
Upstream - One upstream connection, and the leg describing it.
- Request
Codec Report - What translating a request and its reply produced.
- Translated
- What translating a reply produced.
- Translator
- Turns a reply into one the downstream client can read.
- Transport
Peer - Forwards envelopes through a
ClientTransport. - Unsolicited
- A queue of frames the peer pushed while some other call was in flight.
- Wiring
- The two peers a loop forwards between, and the policy it degrades under.
Enums§
- Bridge
Client Error - Why one client’s bridge stopped.
- Bridge
Error - Why a bridge could not carry an envelope.
- Cross
Protocol Error - What a cross-protocol codec can refuse.
- Downstream
Error - Why a downstream handshake could not be settled.
- Loop
Error - Why the loop stopped.
- Protocol
Side - The two sides of a cross-protocol translation, recorded for the operator.
- Request
Codec Step - One named step in a request/reply translation.
- Upstream
Error - Why an upstream could not be opened.
Traits§
- Bridge
Peer - One side of the bridge, at envelope granularity.
- Cross
Protocol Codec - A codec that translates request and reply envelopes between the downstream leg’s protocol and the upstream’s protocol.
- Tool
Result Codec - Reads and writes a
ToolResultin one revision’s wire encoding. - Upstream
- Opens upstreams, one per downstream client.
Functions§
- negotiate_
downstream - Settles the downstream leg of a handshake.
- run_
client - Runs one client from end to end against its own upstream.
Type Aliases§
- Send
Future - The future
BridgePeer::sendreturns.