Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Title: Sync runtime with upstream RFC spec — full proto realignment, new RPCs, and decision mode rewrite
Summary
Brings the MACP runtime into exact compliance with the upstream RFC specification. This is a comprehensive update spanning proto schema restructuring, error code
alignment, new RPC implementations, and a complete decision mode rewrite.
Details
Phase 1: Proto Schema Realignment
capability messages (ClientInfo, RuntimeInfo, Capabilities), AgentManifest, ModeDescriptor
Phase 2: Server + Runtime Adaptation
Phase 3: Error Code Alignment
Aligned MacpError variants with the spec's registries/error-codes.md:
┌────────────────────────┬──────────────────────────────┐
│ Variant │ Wire Code │
├────────────────────────┼──────────────────────────────┤
│ InvalidMacpVersion │ UNSUPPORTED_PROTOCOL_VERSION │
├────────────────────────┼──────────────────────────────┤
│ InvalidEnvelope │ INVALID_ENVELOPE │
├────────────────────────┼──────────────────────────────┤
│ DuplicateSession │ INVALID_ENVELOPE │
├────────────────────────┼──────────────────────────────┤
│ UnknownSession │ SESSION_NOT_FOUND │
├────────────────────────┼──────────────────────────────┤
│ SessionNotOpen │ SESSION_NOT_OPEN │
├────────────────────────┼──────────────────────────────┤
│ TtlExpired │ SESSION_NOT_OPEN │
├────────────────────────┼──────────────────────────────┤
│ InvalidTtl │ INVALID_ENVELOPE │
├────────────────────────┼──────────────────────────────┤
│ UnknownMode │ MODE_NOT_SUPPORTED │
├────────────────────────┼──────────────────────────────┤
│ InvalidModeState │ INVALID_ENVELOPE │
├────────────────────────┼──────────────────────────────┤
│ InvalidPayload │ INVALID_ENVELOPE │
├────────────────────────┼──────────────────────────────┤
│ Forbidden │ FORBIDDEN │
├────────────────────────┼──────────────────────────────┤
│ Unauthenticated (new) │ UNAUTHENTICATED │
├────────────────────────┼──────────────────────────────┤
│ DuplicateMessage (new) │ DUPLICATE_MESSAGE │
├────────────────────────┼──────────────────────────────┤
│ PayloadTooLarge (new) │ PAYLOAD_TOO_LARGE │
├────────────────────────┼──────────────────────────────┤
│ RateLimited (new) │ RATE_LIMITED │
└────────────────────────┴──────────────────────────────┘
Phase 4: Initialize RPC
Phase 5: Discovery RPCs
Phase 6: Decision Mode Rewrite
Full RFC-compliant lifecycle replacing the toy implementation:
Phase 7: StreamSession
Phase 8: Client Binaries
convergence, CancelSession, participant validation
Stats
Test plan