Part of #23. References #26 (stays closed) and PR #69.
Corrected 2026-07-10 (codebase re-verified): the "cherry-pick ecfe2ac / ~1,770 LOC absent" framing was wrong. The daemon + core + wire + GUI swap path already landed on main via #24/#25. What is actually missing is only the MCP-sidecar layer + the demo stub + the e2e harness. Re-scoped below.
What actually happened
PR #69 — "Swap v1 agent + demo: 3 MCP tools, fork-demo stub, swap-e2e" — merged onto branch hellno/test-merged-prs-gui, not main, so its work never reached trunk. But most of what it delivered has since arrived on main independently, so this is NOT a clean cherry-pick.
Already on main (do NOT rebuild — verified 2026-07-10)
- Full CoW orderbook client
cow_client.rs with the cow-client feature default-on.
SwapOrder + ProposeOrder / SignOrder / CancelOrder wire, dispatched by the daemon (daemon.rs:363/369/375, sign_order at :940) including the shaped GPv2 relayer-approve (daemon.rs:541-563).
evaluate_order policy admission (policy.rs:807; always NeedsApproval, receiver==wallet, token allowlist).
- The Swap GUI (
swap.rs / swap_view.rs) and app swap_quote plumbing.
- Swap parity tests (
signerd/tests/swap_parity.rs).
So the trust-critical, test-covered swap engine is present.
What is actually missing (the real scope of this issue)
Verified absent from main:
- 3 MCP tool wrappers in
deckard-mcp/src/server.rs (deckard_swap_quote, deckard_swap, deckard_submit_order) — the sidecar today has 8 tools and none are swap tools.
- The
sidecar.rs wire-call methods for orders (today only a "swap" log string exists there).
DECKARD_DEMO_SWAP_STUB in env.rs (deterministic fixture quote + simulated fill via anvil setStorageAt, every stubbed response marked simulated:true) — not on main.
swap_e2e.rs (~339 LOC) and the env-gated just swap-e2e live-Sepolia harness — not on main.
- Doc reconciliation: tool count everywhere goes 8 → 11 (
server.rs self-description, README, docs/build/30-mcp-shape.md, 31-agent-quickstart.md, STATUS). deckard_execute stays tx-only.
Because server.rs went 5 → 8 tools and env.rs/sidecar.rs were reorganized since June 16, ecfe2ac cherry-picks with conflicts in server.rs, sidecar.rs, env.rs, tests/common/mod.rs — treat this as a re-implementation onto today's main, not a cherry-pick. No new deps (cow-client already default-on).
Sizing & priority
More than "~1 day" (the demo stub + e2e harness + docs are net-new), but still an M-sized focused PR since the hard part is done. Not on the critical path to either flagship demo (browser connect→approve→revoke, or x402 $5/day) — it is an agent-does-real-DeFi capability expansion. Do it after both flagship demos rehearse.
Scope checklist
Acceptance
- 11 tools documented consistently;
deckard_execute stays tx-only.
just demo swap flow completes with the simulated fill + visible "simulated" banner.
just swap-e2e produces an accepted+open order on live Sepolia (output pasted in the PR).
- DoD green; codex adversarial pass.
Part of #23. References #26 (stays closed) and PR #69.
What actually happened
PR #69 — "Swap v1 agent + demo: 3 MCP tools, fork-demo stub, swap-e2e" — merged onto branch
hellno/test-merged-prs-gui, notmain, so its work never reached trunk. But most of what it delivered has since arrived onmainindependently, so this is NOT a clean cherry-pick.Already on
main(do NOT rebuild — verified 2026-07-10)cow_client.rswith thecow-clientfeature default-on.SwapOrder+ProposeOrder/SignOrder/CancelOrderwire, dispatched by the daemon (daemon.rs:363/369/375,sign_orderat:940) including the shaped GPv2 relayer-approve (daemon.rs:541-563).evaluate_orderpolicy admission (policy.rs:807; always NeedsApproval, receiver==wallet, token allowlist).swap.rs/swap_view.rs) and appswap_quoteplumbing.signerd/tests/swap_parity.rs).So the trust-critical, test-covered swap engine is present.
What is actually missing (the real scope of this issue)
Verified absent from
main:deckard-mcp/src/server.rs(deckard_swap_quote,deckard_swap,deckard_submit_order) — the sidecar today has 8 tools and none are swap tools.sidecar.rswire-call methods for orders (today only a "swap" log string exists there).DECKARD_DEMO_SWAP_STUBinenv.rs(deterministic fixture quote + simulated fill via anvilsetStorageAt, every stubbed response markedsimulated:true) — not on main.swap_e2e.rs(~339 LOC) and the env-gatedjust swap-e2elive-Sepolia harness — not on main.server.rsself-description, README,docs/build/30-mcp-shape.md,31-agent-quickstart.md, STATUS).deckard_executestays tx-only.Because
server.rswent 5 → 8 tools andenv.rs/sidecar.rswere reorganized since June 16,ecfe2accherry-picks with conflicts inserver.rs,sidecar.rs,env.rs,tests/common/mod.rs— treat this as a re-implementation onto today'smain, not a cherry-pick. No new deps (cow-clientalready default-on).Sizing & priority
More than "~1 day" (the demo stub + e2e harness + docs are net-new), but still an M-sized focused PR since the hard part is done. Not on the critical path to either flagship demo (browser connect→approve→revoke, or x402 $5/day) — it is an agent-does-real-DeFi capability expansion. Do it after both flagship demos rehearse.
Scope checklist
ProposalOrigin::Agentso Activity attributes swap requests to the agent handle.swap-e2eenv-gated.Acceptance
deckard_executestays tx-only.just demoswap flow completes with the simulated fill + visible "simulated" banner.just swap-e2eproduces an accepted+open order on live Sepolia (output pasted in the PR).