ADR-0057: Autonomous Provider Capability Negotiation & Protocol Handshake v0.3.6
Context & Problem Statement
In heterogeneous multi-provider agent swarms, client agents request domain capabilities (e.g. ast.parse, embedding.dense, eval.matrix) with differing semantic version constraints and feature flags. Without a standardized, bidirectional capability negotiation protocol, version mismatches result in silent runtime deserialization errors, unexpected schema failures, and dropped task executions.
Existing provider discovery scans static manifests on disk, but lacks real-time handshake negotiation, feature flag intersection, and fallback version negotiation.
Proposed Architecture
The Autonomous Provider Capability Negotiation & Protocol Handshake subsystem introduces a structured negotiation engine:
-
Client Negotiation Request (
NegotiationRequest): - Declares required and optional capability sets. - Specifies semver constraint ranges (e.g.>= 1.2.0, < 2.0.0). - Includes client protocol version and supported compression/encoding schemes. -
Handshake Negotiation Engine (
HandshakeEngine): - Matches requested capabilities against candidate provider manifests. - Evaluates semver compatibility and selects the optimal compatible provider. - Generates a cryptographically signedNegotiationReceiptcontaining negotiated protocol parameters. -
Graceful Fallback & Feature Downgrade: - When preferred capabilities are unavailable, negotiates acceptable fallback tiers. - Rejects unresolvable capability sets with
ErrIncompatibleCapabilities.
Verification & Compliance
- Static Floor Invariant: Enforces schema validation across negotiation requests, capability constraints, and handshake receipts.
- Operational Dynamic Proof: Validates live bidirectional handshake negotiation, semver resolution, and receipt generation.
- Negative Adversarial Boundary: Rejects incompatible versions, unfulfillable capability sets, and empty requests.
- Hygiene & Concurrency: Zero naked goroutines; strict thread safety.