Skip to content

fix(v2): enforce method contracts - #229

Merged
benbrandt merged 2 commits into
mainfrom
fix/v2-method-contracts
Aug 14, 2026
Merged

fix(v2): enforce method contracts#229
benbrandt merged 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)

@benbrandt
benbrandt merged commit 0101014 into main Aug 14, 2026
6 checks passed
@benbrandt
benbrandt deleted the fix/v2-method-contracts branch August 14, 2026 00:13
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