Same fix as ADR-080 (ChannelClient) applied to the call crate. The existing code already had the right structure — spawn_dispatch is not feature-gated (transport-agnostic), connect is #[cfg(feature = "quinn")] — but the docs inverted the framing: connect was 'primary,' spawn_dispatch was 'lower-level.' That welding masked the call protocol's transport-agnosticism (ADR-012 EventEnvelope; ADR-065 from_stream/from_bidi accept any AsyncRead + AsyncWrite). Changes: - client-and-adapters.md: reframe spawn_dispatch as the transport- agnostic primary constructor (one-way door), connect as the QUIC convenience (two-way door, feature-gated on quinn). Mirror the from_connection / connect_quic pattern from ADR-080/channel-client.md. Fix all 'QUIC-backed' / 'over QUIC' / 'opens a QUIC connection' framing to be transport-agnostic. Fix from_call description, adapter location map, exchange-of-operations example, Constraints section. - call-protocol.md: 'runs over QUIC bidirectional streams' → 'runs over any ordered, reliable bidirectional stream.' Fix stream model, stream lifecycle (connection drop / stream reset now list all transports, not just QUIC). Fix CallConnection.connection doc comment. - operation-registry.md: FromCall provenance comment 'QUIC forwarding stub' → 'call-protocol forwarding stub.' Fix from_call description. - call README.md: fix client-and-adapters.md description, fix design principle #11 framing. - ADR-017: add Amendment (2026-07-13) documenting the spawn_dispatch / connect reframe, mirroring ADR-080's amendment. - overview.md, architecture README: update ADR-017 and client-and-adapters.md table summaries. - OQ-015, OQ-007: fix 'opens QUIC connections' / 'bidirectional QUIC streams' framing in resolution text. No code changes — spawn_dispatch and connect already exist with the right feature-gate structure. This is a documentation reframe.
1.4 KiB
1.4 KiB
OQ-15: Call Protocol Client and Adapter Contract
- Origin: call-protocol.md, operation-registry.md, ADR-013
- Status: resolved
- Door type: One-way
- Priority: high
- Resolution:
CallClienttakes over transport connections (spawn_dispatchtransport-agnostic primary,connectQUIC convenience — ADR-017 Am. 2026-07-13) and shares the dispatch loop withCallAdapter— both sides can send and receivecall.requestedonce connected. Connection direction (who opened the connection) is independent of call direction (who calls whom).from_calladapter discovers remote operations viaservices/list+services/schemaand registers them with forwarding handlers — same pattern asfrom_openapiandfrom_mcp.to_openapiandto_mcpproject local operations to external protocols. Adapter contract trait (OperationAdapter) producesHandlerRegistrationbundles. Cross-node call tree: abort cascade (ADR-016) propagates across node boundaries throughfrom_callhandlers. Credentials for connections come from capabilities (ADR-014). Adapter-registered operations areInternalby default (ADR-015). See ADR-017. - Cross-references: ADR-005, ADR-013, ADR-014, ADR-015, ADR-016, ADR-017, call-protocol.md, operation-registry.md