Skip to content

fix(mcp): snapshot 402 accepts before scheme enrichers - #25

Closed
PhilBot402 wants to merge 1 commit into
mainfrom
philbotfix-ts-mcp-402-snapshot-accepts-3cec
Closed

PhilBot402 wants to merge 1 commit into
mainfrom
philbotfix-ts-mcp-402-snapshot-accepts-3cec

Conversation

@PhilBot402

Copy link
Copy Markdown
Owner

Port of x402-foundation#3482 from Go to TypeScript SDK.

Go MCP snapshots accepts before building corrective 402s so enricher in-place mutations (for example batch-settlement channelState) do not break the wrapper match baseline. TypeScript createPaymentRequiredResult still passed live config.accepts. This clones accepts with snapshotPaymentRequirementsList before createPaymentRequiredResponse, matching Go paymentRequiredResult. Related to x402-foundation#3493. This PR covers the TypeScript snapshot item only and does not close x402-foundation#3493, which also tracks Python drift.

AI disclosure: Automated by @phdargen. Use your own judgement

Open in Web Open in Cursor 

createPaymentRequiredResult now clones wrapper accepts before scheme
enrichers run. Batch-settlement channelState writes must not change the
match baseline used on the next paid tool call.

Co-authored-by: phdargen <phdargen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK drift detected 2026-09-16

1 participant