Skip to content

Align control plane with MACP spec d31ffb1 and runtime 168ab31#4

Merged
ajit-zer07 merged 1 commit intomainfrom
align-with-runtime
Mar 23, 2026
Merged

Align control plane with MACP spec d31ffb1 and runtime 168ab31#4
ajit-zer07 merged 1 commit intomainfrom
align-with-runtime

Conversation

@ajit-zer07
Copy link
Contributor


PR Description:

Summary

  • Remove SessionWatch from reconnect path — the spec no longer includes passive attach in the base protocol. Reconnection
    now uses getSession() polling with exponential backoff until terminal state. Recovery service passes pollOnly: true to skip
    the stream path entirely.
  • Fix sender auth mismatchopenSession() now sets sender: '' so the runtime fills it from the authenticated identity,
    preventing rejection of mismatched senders.
  • Add INVALID_SESSION_ID error handlingstartSession() and send() now map this runtime error code to HTTP 400 instead
    of a blanket 502.
  • Contract alignment — capture instructions field from InitializeResponse, advertise listChanged: true for modeRegistry
    and roots capabilities, log runtime instructions during execution.
  • Extension mode supportContribute message type (used by ext.multi_round.v1) maps to proposal.updated in the event
    normalizer. Proto registry registers extension modes with __json__ sentinel for JSON decode fallback.

Test plan

  • npx tsc --noEmit — TypeScript compiles clean
  • npx jest — all 253 tests pass across 20 suites
  • npx eslint "src/**/*.ts" — 0 errors (pre-existing warnings only)
  • Manual: start control plane against updated runtime, create a run with Decision mode, verify stream events flow
  • Manual: verify stream reconnect uses getSession() polling (not SessionWatch)
  • Manual: create a run with ext.multi_round.v1, verify Contribute events normalize correctly
  • Manual: verify run recovery without stream handle uses polling path

  Remove SessionWatch/passive-attach reconnect path (spec forbids it),
  replace with getSession() polling fallback. Fix sender auth mismatch
  by setting empty sender on openSession() envelope. Add INVALID_SESSION_ID
  error code mapping (HTTP 400), instructions field from InitializeResponse,
  listChanged capability declaration, Contribute message type for
  ext.multi_round.v1 extension mode, and JSON decode fallback in proto
  registry for extension modes without proto definitions.
@ajit-zer07 ajit-zer07 merged commit a3306ac into main Mar 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant