Standalone; sequenced after #34 (x402 phase 2) and the build-shape spike. The $5/day recipe consumes this.
Why: this is the hands of the paying agent — it turns "402 Payment Required" into a policy-checked purchase without the agent ever touching a key.
Scope
The agent-side HTTP wrapper (transport is deliberately agent-side per the #32 /#34 decision — the daemon signs, it never speaks HTTP):
Perform the request; on 402 parse the payment requirements (v2 PAYMENT-REQUIRED header, v1 JSON-body fallback).
Ask the daemon to authorize + sign via x402 phase 2: exact/EIP-3009 payments on the Ethereum reference path, fully local demo loop #34 's wire; the daemon's policy/budget decision happens here.
Retry with PAYMENT-SIGNATURE (v2) / X-PAYMENT (v1); surface the receipt/response to the agent.
Shape: lean toward a deckard_fetch_paid MCP tool (keeps the pay loop visible in deckard_status and Activity) over a bare CLI helper — decide in-issue.
Invariants:
Tests
Acceptance
An agent (Claude over MCP) fetches a paid resource end-to-end on the local fixture stack, with the payment visible in Activity; DoD green.
Standalone; sequenced after #34 (x402 phase 2) and the build-shape spike. The $5/day recipe consumes this.
Why: this is the hands of the paying agent — it turns "402 Payment Required" into a policy-checked purchase without the agent ever touching a key.
Scope
The agent-side HTTP wrapper (transport is deliberately agent-side per the #32/#34 decision — the daemon signs, it never speaks HTTP):
402parse the payment requirements (v2PAYMENT-REQUIREDheader, v1 JSON-body fallback).PAYMENT-SIGNATURE(v2) /X-PAYMENT(v1); surface the receipt/response to the agent.Shape: lean toward a
deckard_fetch_paidMCP tool (keeps the pay loop visible indeckard_statusand Activity) over a bare CLI helper — decide in-issue.Invariants:
Tests
Acceptance
An agent (Claude over MCP) fetches a paid resource end-to-end on the local fixture stack, with the payment visible in Activity; DoD green.