Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ These instructions apply to the `peer-cli` repo.

## Working Rules
- Treat `src/commands/registry.ts`, `src/mcp/cash.ts`, and `src/output/errors.ts` as runtime sources of truth. The files under `agents/` are their generated agent contracts.
- `src/mcp/cash.ts` sells through `@zkp2p/sdk` `peer.sell`. Only the Relay source tools and `peer_cash_prepare_access_policy` use `@zkp2p/cash`, because the SDK has no source routing or access policies.
- Do not hand-edit generated catalog files. Rebuild after changing command metadata.
- Prefer dry-run previews for write paths. Use the single `--yes` execution flag only when immediate broadcast is intended.
- Keep `peer mcp --profile read-only` as the default. The `cash` profile may prepare unsigned transactions but must never accept signer material, sign, or broadcast. Use `full` only for the complete operator surface.
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## Unreleased

- Run the Peer Cash MCP tools on `peer.sell` from `@zkp2p/sdk` 0.16.0-rc.1.
The Relay source tools (`peer_cash_source_capabilities`,
`peer_cash_quote_source`, `peer_cash_relay_status`) and
`peer_cash_prepare_access_policy` stay on `@zkp2p/cash`, which the SDK does
not replace for source routing or access policies.
- Remove the `includeRelaySources` argument of `peer_cash_capabilities`.
`PeerCashMcpConfig.client` is now a `PeerSell`; inject the Cash-only tools'
client through `cashOnlyClient`.
- `peer intent release` sends the `releaseAmount` that `@zkp2p/sdk` 0.15+
requires: the full on-chain intent amount by default (a depositor must
release all of it), or `--amount` in USDC for an arbitrator's partial release.
- Every Cash corridor binds the oracle rate when a buyer signals an intent.
Unknown payee handles fail with `PAYEE_NOT_FOUND` (not retryable).

## 0.4.1

- Adopt Peer Cash 0.6.1 and SDK 0.14.2, which ship optional Venmo receipt
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,19 @@ custody boundary are unchanged:
7. `peer_cash_order` / `peer_cash_orders` — resume and inspect orders.
8. `peer_cash_prepare_withdraw` and `peer_cash_prepare_top_up` — prepare a withdrawal or top-up.

After 0.4.1, these tools sell through `peer.sell` from `@zkp2p/sdk`
`0.16.0-rc.1`. The SDK has no source routing or access policies, so the Relay
source tools (`peer_cash_source_capabilities`, `peer_cash_quote_source`,
`peer_cash_relay_status`) and `peer_cash_prepare_access_policy` still use
`@zkp2p/cash`. `peer_cash_capabilities` no
longer takes `includeRelaySources`; call `peer_cash_source_capabilities`
instead. A payee handle that does not exist on its platform fails with
`PAYEE_NOT_FOUND`, which is not retryable.

Version 0.4.1 still exposes `peer_cash_prepare_access_policy`. Skip this legacy step for new orders. Finalize the confirmed create-deposit receipt and persist the deposit ID, even when the plan reports `accessPolicyRequired`. Applying the old policy would add a retired group to the deposit.

Base USDC amounts are decimal strings in 6-decimal base units: 100 USDC is
`100000000`. For pricing, read the corridor’s `pricing.kind` in `peer_cash_capabilities`. In the published CLI 0.4.1, Alipay/CNY and UPI/INR fix the rate at deposit creation. Other supported corridors bind the oracle rate when a buyer signals an intent.
`100000000`. For pricing, read the corridor’s `pricing.kind` in `peer_cash_capabilities`. In the published CLI 0.4.1, Alipay/CNY and UPI/INR fix the rate at deposit creation. Other supported corridors bind the oracle rate when a buyer signals an intent. After 0.4.1, every corridor binds the oracle rate when a buyer signals an intent.

Install the packaged portable skill from
[`skills/peer-cash/SKILL.md`](skills/peer-cash/SKILL.md) when the agent host
Expand Down
4 changes: 4 additions & 0 deletions agents/tool-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,10 @@
"type": "string",
"description": "Intent hash."
},
"amount": {
"type": "number",
"description": "USDC to release. Defaults to the full intent amount, which a depositor must release; an arbitrator may release less."
},
"params": {
"type": "object",
"description": "Optional raw JSON params object merged underneath the typed CLI flags."
Expand Down
2 changes: 2 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ local stdio profiles.
5. peer_cash_finalize after the confirmed createDeposit receipt
6. persist depositId and resume with peer_cash_order. Skip the retired group policy even when the 0.4.1 plan reports accessPolicyRequired.

After 0.4.1, peer_cash_* sells through @zkp2p/sdk peer.sell. Only peer_cash_source_capabilities, peer_cash_quote_source, peer_cash_relay_status and peer_cash_prepare_access_policy still use @zkp2p/cash.

Base USDC uses 6 decimals. Treat estimates as approximate. Retry read failures
as reads; never retry an uncertain transaction without hash, wallet, and order
inspection.
Expand Down
Loading
Loading