Transport Capabilities
Every transport should expose normalized capabilities:
const capabilities = { modes: { submit: true, stream: false, session: false }, safety: { idempotent: false, retrySafe: false, cacheable: false, hedgeSafe: false }, limits: { maxPayloadBytes: 512_000, maxBufferedMessages: 100 }, auth: { kinds: ["bearer", "transport-context"] }, delivery: { mode: "request-response", consistency: "best-effort", backpressure: "none" },};Use assertTransportCapabilities(transport, requirement, context) when you need hard policy enforcement.
Examples:
withRetryrequiressafety.retrySafe === trueunless explicitly overridden.withCacherequiressafety.cacheable === trueunless explicitly overridden.createHedgedTransportrequiressafety.hedgeSafe === trueunless explicitly overridden.- payload-aware adapters compare
SubmitRequest.metadata.estimatedPayloadBytesagainstlimits.maxPayloadBytes.