Repository navigation
feat(mcp): run every Peer Cash tool on @zkp2p/sdk 0.16.0-rc.2 and drop @zkp2p/cash - #49
Merged
Merged
Conversation
…p @zkp2p/cash - peer_cash_source_capabilities, peer_cash_quote_source and peer_cash_relay_status now call peer.sell.sourceCapabilities(), quoteSource() and relayStatus() from the SDK. - peer_cash_prepare_access_policy stays registered with the same inputs and answers accessPolicyRequired: false with no transaction; its description says the merchant group it configured was retired in @zkp2p/sdk 0.15. - PEER_CASH_RELAY_API_KEY (or config.relayApiKey) reaches the SDK's Relay client: Relay's quote endpoint now requires a key. - @zkp2p/cash leaves package.json and the bundle; every tool name stays. The lockfile is regenerated once @zkp2p/sdk 0.16.0-rc.2 is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ake it - peer_cash_quote_source without a Relay key returns RELAY_API_KEY_REQUIRED (retryable: false) naming PEER_CASH_RELAY_API_KEY, instead of a retryable Relay failure an agent would repeat. An injected client skips the check. - deploy/runtime.cjs accepts PEER_CASH_RELAY_API_KEY as an optional string key (redacted from logs like other values); NODE_ENV stays required. - CHANGELOG notes the access-policy result shape and the 'relay' source label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ADWilkinson
marked this pull request as ready for review
November 23, 2026 16:19
ADWilkinson
approved these changes
Nov 23, 2026
ADWilkinson
left a comment
Collaborator
There was a problem hiding this comment.
Approved at 4355e12 on Davy's re-review.
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.
Created by @kohai-peer at the request of @ADWilkinson.
Summary
Every
peer_cash_*MCP tool now runs on@zkp2p/sdk0.16.0-rc.2, and@zkp2p/cashis removed from the CLI. Every tool name keeps working.@zkp2p/sdk@0.16.0-rc.2is published onrc(from zkp2p-clients88bcfc62);package-lock.jsonlocks it from the registry and no longer contains@zkp2p/cash.Tools, before and after
All 14
cash-profile tools are registered on both sides, with the same names, the same write gating, and the same inputs except where noted. The generatedagents/runtime-manifest.jsonandagents/tool-catalog.jsonare unchanged.peer_cash_capabilities,peer_cash_fill_stats,peer_cash_estimate,peer_cash_finalize,peer_cash_buyer,peer_cash_order,peer_cash_orders,peer_cash_prepare,peer_cash_prepare_withdraw,peer_cash_prepare_top_up@zkp2p/sdkpeer.sell(rc.1)@zkp2p/sdkpeer.sell(rc.2), unchangedpeer_cash_source_capabilities@zkp2p/cash0.7.0sourceCapabilities()peer.sell.sourceCapabilities()peer_cash_quote_source@zkp2p/cash0.7.0quoteSource()peer.sell.quoteSource()peer_cash_relay_status@zkp2p/cash0.7.0relayStatus()peer.sell.relayStatus()peer_cash_prepare_access_policy@zkp2p/cash0.7.0prepareAccessPolicy(): an unsigned transaction configuring a retired merchant group{ accessPolicyRequired: false, transaction: null, reason }with nothing to sign. Its description says why. Still a write-profile tool, now annotated read-only.Other changes
PEER_CASH_RELAY_API_KEY(orconfig.relayApiKey) is passed to the SDK asrelay.apiKey. Relay's quote endpoint now requires an API key; without one,peer_cash_quote_sourcereturnsRELAY_API_KEY_REQUIRED(retryable: false) naming the env var, instead of a retryable Relay failure. An injected client skips that check.deploy/runtime.cjsacceptsPEER_CASH_RELAY_API_KEYas an optional string key (redacted from logs);NODE_ENVstays required. Setting it in the mcp Infisical project is a separate step.peer_cash_source_capabilitiesreportssource: "relay"(Cash said"relay-sdk"). The CHANGELOG records that and the access-policy result change.PeerCashMcpConfig.cashOnlyClient/PeerCashOnlyClientare removed (never released). The SDK client covers every tool.tsup.config.tsno longer bundles@zkp2p/cash.llms.txt,AGENTS.md,skills/peer-cash/SKILL.mdand the Unreleased CHANGELOG entry describe the single SDK client and the retired access-policy step. The notes about published 0.4.1 behaviour are kept.Verification
npm cifrom the regenerated lockfile, thennpm run check(lint, typecheck, 265 tests with coverage, build) against the published@zkp2p/sdk@0.16.0-rc.2.Live smoke of the MCP handlers on production with a Relay key:
peer_cash_source_capabilities: 49 chains,source: "relay";peer_cash_quote_source: 5 USDC Optimism → Base USDC, 2 transactions, request id;peer_cash_relay_status:waiting;peer_cash_prepare_access_policy:accessPolicyRequired: false, no transaction.All 14 tools registered. Without the key,
quote_sourcereturnsRELAY_API_KEY_REQUIRED,retryable: false.CI: see the checks on this head.
🤖 Generated with Claude Code