Skip to content

fix(v2): enforce method contracts - #229

Open
benbrandt wants to merge 2 commits into
mainfrom
fix/v2-method-contracts
Open

fix(v2): enforce method contracts#229
benbrandt wants to merge 2 commits into
mainfrom
fix/v2-method-contracts

Conversation

@benbrandt

@benbrandt benbrandt commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • keep _ as the custom-extension convention while allowing unrecognized method strings for compatibility with other unstable ACP drafts
  • add method-safe, direction-safe v2 batch descriptors
  • validate every built-in direct and batch response before returning it
  • keep local void handlers encoded as an empty object while rejecting peer null results

Current protocol method literals continue to use their generated contracts; only method names unrecognized by this SDK use the permissive compatibility path. The existing experimental v2 entrypoint and protocol lane remain unchanged.

Testing

  • npm run check (840 tests)

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