SDK Parity Requirements
This document defines what MACP SDKs must implement to be considered conformant, and the sync mechanisms that keep them aligned.
MUST Implement
Every official MACP SDK MUST provide:
Transport Layer
- MacpClient — gRPC client implementing all RPCs in
MACPRuntimeService(currently 20) - MacpStream — bidirectional streaming wrapper for
StreamSession - Authentication — dev agent (
x-macp-agent-id) and bearer token modes
Session Helpers
- One session class per standards-track mode (Decision, Proposal, Task, Handoff, Quorum)
- Each session wraps start, mode-specific actions, commit, cancel, metadata
Projections
- One projection class per standards-track mode
- Client-side state machines tracking transcript, phase, and commitment
- Must pass the canonical conformance fixture suite (see below)
Policy Framework
- Policy builder functions for all 5 modes (typed rule inputs →
PolicyDescriptor) - Client methods:
registerPolicy,unregisterPolicy,getPolicy,listPolicies
Error Hierarchy
MacpSdkError— base SDK errorMacpTransportError— gRPC communication failureMacpAckError— runtime rejected the message (NACK)MacpSessionError— session-level error (wrong state)MacpTimeoutError— operation timed outMacpRetryError— all retry attempts exhausted
Retry
RetryPolicywith configurable max retries, backoff base/max, retryable error codesretrySend()/retry_send()with exponential backoff
Convenience Methods
sendSignal()/send_signal()— Ambient Signal emissionsendProgress()/send_progress()— progress tracking
Envelope Utilities
- Envelope builder with auto-generated message IDs and timestamps
- SessionStart and Commitment payload builders with defaults
- ID generators (session, message, commitment)
MAY Implement
Optional features that enhance the SDK but are not required for conformance:
- Watcher classes — convenience wrappers around streaming RPCs (vs raw iterators)
- HTTP transport adapter — polling transport for non-gRPC environments
- Base session/projection classes — shared inheritance (vs standalone classes)
- Agent framework — Participant abstraction, dispatcher, strategies, bootstrap
- Logging — structured logging helpers
Sync Mechanisms
Proto Sync
- Source of truth: Buf Schema Registry at
buf.build/multiagentcoordinationprotocol/macp - Local sync:
make sync-protos(from BSR) ormake sync-protos-local(from sibling RFC checkout) - CI enforcement:
proto-syncjob in each SDK's CI verifies no drift against BSR
Conformance Fixture Sync
- Source of truth:
schemas/conformance/in this RFC repo (copied from Runtime, which is authoritative) - Local sync:
make sync-fixturesin each SDK - CI enforcement:
fixture-syncjob verifies fixtures match canonical source
Adding a New RPC or Mode
- Define in RFC repo's proto files
- Publish to BSR
- Each SDK runs
make sync-protos→ implements the new RPC/mode → adds tests - If the change affects projections, add a conformance fixture and run
make sync-fixturesdownstream
Conformance Test Suite
Each SDK must include a conformance test runner that:
- Loads all
*.jsonfixtures fromtests/conformance/ - Replays accepted messages (where
expect == "accept") through the matching projection - Verifies transcript length, commitment presence, and commitment field values
- Skips
multi_roundfixtures (extension mode, no required projection) - Skips
reject_pathsfixtures (test runtime rejection, not projection replay)
The fixture format is documented in schemas/conformance/README.md.