1+ <!-- Rendered from apps/web's own `.top-nav` by `scripts/render-nav-panel.mjs`;
2+ re-run that script after a brand token, mark, or nav label change. -->
3+ <picture >
4+ <source
5+ media="(prefers-color-scheme: dark)"
6+ srcset="docs/assets/nav-panel-dark.svg"
7+ />
8+ <img
9+ src="docs/assets/nav-panel-light.svg"
10+ alt="OneShot settlement engine — Arc Testnet, USDC, open workspace"
11+ width="1000"
12+ />
13+ </picture >
14+
115# OneShot
216
317** One job. Many retries. One settlement.**
@@ -8,10 +22,10 @@ parallel workers, and multiple agent instances.
822
923Product direction: ** resumable paid tools for business agents** — resume the
1024job, not the payment. The settlement engine includes one team-operated testnet
11- report supplier, task-bound order/result delivery, and separate public ( ` / ` )
12- and authenticated cabinet (` /app ` ) routes. Resumable external work requires
13- supplier support; this is not a guarantee of exactly-once execution for
14- arbitrary tools.
25+ report supplier, task-bound order/result delivery, a one-tool MCP endpoint for
26+ agents, and separate public (` / ` ), agent-docs ( ` /docs/mcp ` ), and authenticated
27+ cabinet ( ` /app ` ) routes. Resumable external work requires supplier support; this
28+ is not a guarantee of exactly-once execution for arbitrary tools.
1529
1630The cardinality it protects is:
1731
@@ -137,9 +151,10 @@ lock: OneShot's durable state is.
137151## Repository layout
138152
139153``` text
140- apps/api HTTP seam
141- apps/web composed operator UI (intent, settlement, recovery)
154+ apps/api HTTP seam, MCP endpoint, personal MCP credentials
155+ apps/web landing, agent docs, and operator workspace
142156apps/worker settlement and reconciliation workers
157+ packages/brand brand tokens, commit-ring mark, hero geometry
143158packages/supplier-adapter idempotent team-operated testnet report connector
144159packages/contracts frozen v1 contract pack, OpenAPI, fixtures
145160packages/domain intent, attempt, and settlement state
@@ -166,26 +181,36 @@ pnpm build:frontend
166181pnpm --filter @oneshot/web dev
167182```
168183
169- Open ` http://localhost:3000/ ` . The app shell composes create/replay,
170- authoritative status, settlement evidence, and recovery evidence tabs. The
171- settlement tab reads the configured OneShot API; the recovery tab projects the
172- frozen ` recovery-view ` API into the C05 timeline model, with labelled
173- fail-closed fallbacks for legacy or unavailable evidence. The P5 browser
174- acceptance suite runs with Playwright/Chromium in CI.
184+ Open ` http://localhost:3000/ ` for the public landing page, ` /docs/mcp ` for the
185+ agent connection guide, and ` /app ` for the authenticated workspace. The
186+ workspace composes five sections — Overview, Payment services, Requests,
187+ Payment proof, and Profile. Payment proof reads the configured OneShot API and
188+ projects the frozen ` recovery-view ` API into the C05 timeline model, with
189+ labelled fail-closed fallbacks for legacy or unavailable evidence, and
190+ distinguishes a Graph observation that is still pending from proof that no
191+ payment happened. Profile issues and rotates the personal MCP bearer. The P5
192+ browser acceptance suite runs with Playwright/Chromium in CI.
175193
176194Authenticated wallet activity is read-only: the API records bounded Graph
177- observations, links indexed transfers to settlements in the configured
178- workspace, and surfaces unmatched transfers. Graph absence or lag never changes
195+ observations, links indexed transfers to settlements in the caller's workspace,
196+ and surfaces unmatched transfers. Every committed settlement captures Graph
197+ evidence through a durable, idempotent outbox job, including a backfill for
198+ settlements that predate that capture. Graph absence or lag never changes
179199payment authority.
180200
201+ A browser caller's workspace is derived from its verified Privy subject, so
202+ jobs, results, and activity are scoped to the signed-in operator rather than to
203+ a caller-supplied identifier.
204+
181205Integration tests need a database:
182206
183207``` bash
184208pnpm test:integration
185209```
186210
187- Copy ` .env.example ` to ` .env ` and fill in placeholders. Never commit a real
188- secret; see ` docs/settlement/SETTLEMENT_CONFIG_V1.md ` for how each variable is
211+ Copy ` .env.example ` to ` .env ` and ` apps/web/.env.example ` to
212+ ` apps/web/.env.local ` , then fill in placeholders. Never commit a real secret;
213+ see ` docs/settlement/SETTLEMENT_CONFIG_V1.md ` for how each variable is
189214classified.
190215
191216### Operator sign-in
@@ -237,12 +262,10 @@ Cloudflare Workers Build checkout.
237262### Arc Testnet transfer demo
238263
239264The resumable job flow uses a deliberately labelled team-operated supplier
240- until an external supplier is selected. In Tools, enter the exact Arc Testnet
241- recipient and USDC amount for the purchase. The amount must be within the
242- settlement cap. The existing worker authorizes and submits the exact quote
243- through Privy on Arc Testnet. A committed job's settlement and ArcScan
244- evidence remain authoritative; delivery resume never submits a replacement
245- payment.
265+ until an external supplier is selected. In Payment services, enter the exact Arc
266+ Testnet recipient and USDC amount for the purchase. The amount must be within
267+ the settlement cap. A committed job's settlement and ArcScan evidence remain
268+ authoritative; delivery resume never submits a replacement payment.
246269
247270` pnpm demo:r4 ` runs the response-loss drill offline by default. The live mode
248271requires an explicit Arc Testnet confirmation and the reviewed worker hook;
@@ -261,26 +284,54 @@ shown for retries; users do not need to invent one. After settlement, the job
261284list links directly to ArcScan and keeps the supplier result separate from
262285payment evidence.
263286
264- | Method | Path | Purpose |
265- | ------ | -------------------------------- | ------------------------------------------------------------- |
266- | ` POST ` | ` /v1/intents ` | Create an intent; an identical replay returns the same result |
267- | ` GET ` | ` /v1/intents/{id} ` | Authoritative intent, attempts, settlement, evidence |
268- | ` POST ` | ` /v1/intents/{id}/reconcile ` | Trigger read-only reconciliation; never submits |
269- | ` GET ` | ` /v1/intents/{id}/recovery-view ` | Local authority plus labelled provider observations |
270- | ` POST ` | ` /v1/jobs ` | Start/replay one workspace-scoped team report task |
271- | ` POST ` | ` /v1/jobs/quote ` | Return a non-chargeable quote before explicit approval |
272- | ` GET ` | ` /v1/jobs ` | List workspace jobs and delivery state |
273- | ` GET ` | ` /v1/jobs/{jobId} ` | Read a workspace-owned job |
274- | ` POST ` | ` /v1/jobs/{jobId}/resume ` | Resume original supplier delivery; never submits payment |
275- | ` GET ` | ` /v1/jobs/{jobId}/result ` | Retrieve an existing supplier result; never submits payment |
276- | ` GET ` | ` /v1/activity ` | Last bounded Graph activity observation and local comparison |
277- | ` POST ` | ` /v1/activity/refresh ` | Manually refresh Graph activity; no settlement action |
278- | ` GET ` | ` /v1/metrics ` | Operational metrics |
279- | ` GET ` | ` /health/live ` | Process liveness |
280- | ` GET ` | ` /health/ready ` | Configuration and Arc identity readiness |
287+ | Method | Path | Purpose |
288+ | ------ | ------------------------------------- | -------------------------------------------------------------- |
289+ | ` POST ` | ` /v1/intents ` | Create an intent; an identical replay returns the same result |
290+ | ` GET ` | ` /v1/intents/{id} ` | Authoritative intent, attempts, settlement, evidence |
291+ | ` POST ` | ` /v1/intents/{id}/reconcile ` | Trigger read-only reconciliation; never submits |
292+ | ` GET ` | ` /v1/intents/{id}/recovery-view ` | Local authority plus labelled provider observations |
293+ | ` POST ` | ` /v1/jobs ` | Start/replay one workspace-scoped team report task |
294+ | ` POST ` | ` /v1/jobs/quote ` | Return a non-chargeable quote before explicit approval |
295+ | ` POST ` | ` /v1/jobs/user-wallet/prepare ` | Bind a payer wallet and return the exact transfer to sign |
296+ | ` GET ` | ` /v1/jobs ` | List workspace jobs and delivery state |
297+ | ` GET ` | ` /v1/jobs/{jobId} ` | Read a workspace-owned job |
298+ | ` POST ` | ` /v1/jobs/{jobId}/user-wallet/submit ` | Bind a signed transaction hash and verify its receipt |
299+ | ` POST ` | ` /v1/jobs/{jobId}/resume ` | Resume original supplier delivery; never submits payment |
300+ | ` GET ` | ` /v1/jobs/{jobId}/result ` | Retrieve an existing supplier result; never submits payment |
301+ | ` GET ` | ` /v1/activity ` | Last bounded Graph activity observation and local comparison |
302+ | ` POST ` | ` /v1/activity/refresh ` | Manually refresh Graph activity; no settlement action |
303+ | ` GET ` | ` /v1/metrics ` | Operational metrics |
304+ | ` GET ` | ` /health/live ` | Process liveness |
305+ | ` GET ` | ` /health/ready ` | Configuration and Arc identity readiness |
281306
282307The contract is defined in ` packages/contracts/openapi/openapi.v1.json ` .
283308
309+ ### Agent access (MCP)
310+
311+ Agents reach the same durable job path through one Streamable HTTP MCP
312+ endpoint. The flow is non-custodial: ` arc_payment ` creates or replays a
313+ payer-bound job and returns the exact Arc Testnet USDC transaction request, the
314+ user's own wallet signs and broadcasts it, and ` arc_payment_submit ` hands back
315+ the transaction hash so OneShot can bind it and verify the receipt and its
316+ single matching ` Transfer ` log.
317+
318+ The MCP bearer authenticates a workspace. It does not authorize a server payer
319+ and cannot sign or broadcast anything. Personal bearers are issued from the
320+ authenticated Profile and stored only as SHA-256 digests; the legacy
321+ operator-controlled ` ONESHOT_MCP_BEARER_TOKEN ` remains optional.
322+
323+ | Method | Path | Purpose |
324+ | ------ | ------------------------------ | -------------------------------------------------------------- |
325+ | ` ALL ` | ` /mcp ` | MCP endpoint exposing ` arc_payment ` and ` arc_payment_submit ` |
326+ | ` GET ` | ` /v1/profile/mcp-token ` | Report whether this workspace holds a personal MCP bearer |
327+ | ` POST ` | ` /v1/profile/mcp-token ` | Issue a personal MCP bearer; only its digest is stored |
328+ | ` POST ` | ` /v1/profile/mcp-token/rotate ` | Replace the personal MCP bearer |
329+
330+ These operator and agent-transport routes sit outside the frozen v1 contract
331+ pack. See [ ` docs/MCP_ARC_PAYMENT.md ` ] ( docs/MCP_ARC_PAYMENT.md ) for deployment,
332+ client configuration, and the live walkthrough, or open ` /docs/mcp ` in the
333+ running web app.
334+
284335## Project status
285336
286337Under active development. ** Testnet only.**
@@ -292,15 +343,18 @@ Under active development. **Testnet only.**
292343| Recovery evidence and safety core | Live Graph/Vertex path implemented; deterministic core remains authoritative |
293344| Graph discovery and LLM recovery agent | Studio GraphQL path implemented; fresh sponsor trace pending; deterministic core remains final |
294345| Resumable team report job | Local code: task/order/intent binding, separate delivery and result retrieval |
295- | Public landing and cabinet | Local code at ` / ` and ` /app ` ; live R4 demonstration evidence remains pending |
346+ | User-wallet payments (browser and MCP) | Local code: payer binding, wallet-side signing, receipt and ` Transfer ` verification |
347+ | Agent MCP endpoint | Deployed; bearer authentication and tool discovery verified, no live MCP payment trace yet |
348+ | Public landing, agent docs, cabinet | Local code at ` / ` , ` /docs/mcp ` , and ` /app ` ; live R4 demonstration evidence remains pending |
296349
297350** One live testnet settlement has been executed.** A Privy-controlled execution
298351wallet and scoped policy authorized one 1.00 USDC Arc Testnet transfer; live
299352wrong-recipient and above-cap denials produced zero broadcasts. A lost-response
300353drill entered ` UNKNOWN ` and reconciled to that original settlement without a
301354replacement payment. Privy and Arc are ` QUALIFIED ` for the documented testnet
302355claim; see ` docs/settlement/LIVE_EVIDENCE.md ` and
303- ` packages/reconciliation/docs/c06/QUALIFICATION_REPORT.md ` . The Graph live
356+ ` packages/reconciliation/docs/c06/QUALIFICATION_REPORT.md ` .
357+
304358The Graph recovery path is currently ` NOT VERIFIED ` for sponsor qualification:
305359Studio GraphQL is implemented, but a fresh live trace showing its material
306360effect on the model and deterministic core is still required.
0 commit comments