arc-builder-kit 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. arc_builder_kit/__init__.py +4 -0
  2. arc_builder_kit/__main__.py +6 -0
  3. arc_builder_kit/_paths.py +47 -0
  4. arc_builder_kit/cli.py +277 -0
  5. arc_builder_kit/config/arc_testnet.facts.json +31 -0
  6. arc_builder_kit/doctor.py +936 -0
  7. arc_builder_kit/examples/agent-commerce-components/components.js +200 -0
  8. arc_builder_kit/examples/agent-commerce-components/index.html +120 -0
  9. arc_builder_kit/examples/agent-commerce-flows/flows.js +271 -0
  10. arc_builder_kit/examples/agent-commerce-flows/index.html +114 -0
  11. arc_builder_kit/examples/agent-commerce-live/commerce-live.js +190 -0
  12. arc_builder_kit/examples/agent-commerce-live/index.html +105 -0
  13. arc_builder_kit/examples/agent-commerce-review-packet/index.html +96 -0
  14. arc_builder_kit/examples/agent-commerce-review-packet/packet.js +125 -0
  15. arc_builder_kit/examples/agent-identity-profile-preview/identity.js +126 -0
  16. arc_builder_kit/examples/agent-identity-profile-preview/index.html +104 -0
  17. arc_builder_kit/examples/arc-agent-treasury-lab/index.html +152 -0
  18. arc_builder_kit/examples/arc-agent-treasury-lab/treasury.js +532 -0
  19. arc_builder_kit/examples/arc-testnet-operator-evidence/evidence.example.json +47 -0
  20. arc_builder_kit/examples/arc-testnet-wallet-send-gate/index.html +233 -0
  21. arc_builder_kit/examples/arc-testnet-wallet-send-gate/live-infrastructure-policy.example.json +59 -0
  22. arc_builder_kit/examples/arc-testnet-wallet-send-gate/wallet-send-gate.js +472 -0
  23. arc_builder_kit/examples/circle-wallet-integration/index.html +155 -0
  24. arc_builder_kit/examples/circle-wallet-integration/wallet-lab.js +91 -0
  25. arc_builder_kit/examples/job-escrow-simulator/index.html +121 -0
  26. arc_builder_kit/examples/job-escrow-simulator/simulator.js +162 -0
  27. arc_builder_kit/examples/payment-intent-demo/index.html +132 -0
  28. arc_builder_kit/examples/payment-intent-playground/index.html +301 -0
  29. arc_builder_kit/examples/payment-intent-playground/playground.js +835 -0
  30. arc_builder_kit/examples/payment-intent-receipt-matcher/index.html +157 -0
  31. arc_builder_kit/examples/payment-intent-receipt-matcher/matcher.js +877 -0
  32. arc_builder_kit/examples/receipt-verifier-playground/index.html +120 -0
  33. arc_builder_kit/examples/receipt-verifier-playground/verifier.js +226 -0
  34. arc_builder_kit/examples/receipt-viewer/index.html +138 -0
  35. arc_builder_kit/examples/receipt-viewer/receipt-viewer.js +472 -0
  36. arc_builder_kit/examples/transaction-status-playground/index.html +135 -0
  37. arc_builder_kit/examples/transaction-status-playground/status.js +518 -0
  38. arc_builder_kit/examples/x402-local-challenge-server/.env.example +25 -0
  39. arc_builder_kit/examples/x402-local-challenge-server/README.md +111 -0
  40. arc_builder_kit/examples/x402-local-challenge-server/server.py +711 -0
  41. arc_builder_kit/mcp_server.py +463 -0
  42. arc_builder_kit/release_packet.py +469 -0
  43. arc_builder_kit/templates/README.md +25 -0
  44. arc_builder_kit/templates/job-escrow-starter/README.md +25 -0
  45. arc_builder_kit/templates/job-escrow-starter/index.html +41 -0
  46. arc_builder_kit/templates/job-escrow-starter/index.js +14 -0
  47. arc_builder_kit/templates/payment-intent-starter/README.md +25 -0
  48. arc_builder_kit/templates/payment-intent-starter/index.html +42 -0
  49. arc_builder_kit/templates/payment-intent-starter/index.js +7 -0
  50. arc_builder_kit/templates/x402-agent-starter/README.md +29 -0
  51. arc_builder_kit/templates/x402-agent-starter/server.py +201 -0
  52. arc_builder_kit/validate_repo.py +2212 -0
  53. arc_builder_kit-0.2.0.dist-info/METADATA +543 -0
  54. arc_builder_kit-0.2.0.dist-info/RECORD +58 -0
  55. arc_builder_kit-0.2.0.dist-info/WHEEL +5 -0
  56. arc_builder_kit-0.2.0.dist-info/entry_points.txt +3 -0
  57. arc_builder_kit-0.2.0.dist-info/licenses/LICENSE +21 -0
  58. arc_builder_kit-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,114 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Local-only agent commerce flow library for Arc paid API calls, creator payouts, and AI-agent commerce." />
7
+ <title>Agent Commerce Flows · Arc MCP Builder Assistant</title>
8
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'; upgrade-insecure-requests" />
9
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%232563eb'/%3E%3Cstop offset='1' stop-color='%2306b6d4'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='16' fill='url(%23g)'/%3E%3Ctext x='50%25' y='55%25' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='38' font-weight='900' fill='white'%3EA%3C/text%3E%3C/svg%3E" />
10
+ <style>
11
+ :root { color-scheme: dark; --bg: #070a12; --panel: rgba(255,255,255,.075); --line: rgba(255,255,255,.15); --text: #fbf7ff; --muted: #c8c0df; --accent: #7cf7d4; --accent2: #b388ff; --warn: #ffd166; --good: #80ffa9; }
12
+ * { box-sizing: border-box; }
13
+ html { scroll-behavior: smooth; }
14
+ body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: radial-gradient(circle at 10% 6%, rgba(124,247,212,.2), transparent 34rem), radial-gradient(circle at 90% 2%, rgba(179,136,255,.22), transparent 36rem), linear-gradient(180deg, #070a12 0%, #11172c 68%, #070a12 100%); line-height: 1.65; }
15
+ a { color: var(--accent); text-decoration: none; }
16
+ a:hover { text-decoration: underline; }
17
+ a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
18
+ .skip-link { position: absolute; left: -9999px; top: 12px; z-index: 10; padding: 10px 14px; border-radius: 999px; background: var(--accent); color: #07110e; font-weight: 950; }
19
+ .skip-link:focus { left: 12px; }
20
+ .wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
21
+ header { padding: 26px 0 8px; }
22
+ .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
23
+ .brand { color: var(--text); font-weight: 950; letter-spacing: -.02em; }
24
+ nav { display: flex; gap: 10px; flex-wrap: wrap; }
25
+ nav a, button, .pill { border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.055); color: var(--text); padding: 10px 14px; font-weight: 850; cursor: pointer; }
26
+ button.primary, .pill.active { background: var(--accent); color: #07110e; border-color: transparent; }
27
+ button:disabled { opacity: .48; cursor: not-allowed; }
28
+ .hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; padding: 34px 0 22px; align-items: stretch; }
29
+ .eyebrow { color: var(--accent); font-size: .78rem; font-weight: 950; text-transform: uppercase; letter-spacing: .16em; }
30
+ h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; }
31
+ h1 { margin: 12px 0 14px; font-size: clamp(2.1rem, 7vw, 4.7rem); }
32
+ h2 { margin-top: 0; font-size: clamp(1.35rem, 3vw, 2.05rem); }
33
+ p, li, label, .meta { color: var(--muted); }
34
+ .panel, .flow-card { border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.095), var(--panel)); box-shadow: 0 24px 80px rgba(0,0,0,.34); padding: clamp(20px, 4vw, 32px); }
35
+ .flow-nav, .actions { display: flex; gap: 10px; flex-wrap: wrap; }
36
+ .layout { display: grid; grid-template-columns: .86fr 1.14fr; gap: 18px; padding-bottom: 72px; align-items: start; }
37
+ .field { display: grid; gap: 8px; margin-bottom: 14px; }
38
+ input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.25); color: var(--text); padding: 12px 14px; font: inherit; }
39
+ textarea { min-height: 82px; resize: vertical; }
40
+ pre { white-space: pre-wrap; word-break: break-word; overflow-x: auto; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.4); color: #eafff8; }
41
+ code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
42
+ .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
43
+ .status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(124,247,212,.3); color: var(--accent); background: rgba(124,247,212,.08); padding: 8px 12px; border-radius: 999px; font-weight: 900; }
44
+ .warning { border-color: rgba(255,209,102,.38); background: rgba(255,209,102,.08); }
45
+ .event-log { list-style: none; padding: 0; display: grid; gap: 10px; }
46
+ .event-log li { border-left: 3px solid var(--good); padding-left: 12px; }
47
+ @media (max-width: 940px) { .hero, .layout, .grid { grid-template-columns: 1fr; } nav { display: none; } }
48
+ @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
49
+ </style>
50
+ </head>
51
+ <body>
52
+ <a class="skip-link" href="#content">Skip to content</a>
53
+ <header class="wrap">
54
+ <div class="topbar">
55
+ <a class="brand" href="../../">Arc MCP Builder Assistant</a>
56
+ <nav aria-label="Flow navigation">
57
+ <a href="../../">Home</a>
58
+ <a href="../../docs/view.html#agent-commerce-flow-library.md">Flow docs</a>
59
+ <a href="../agent-commerce-components/">Components</a>
60
+ <a href="../../docs/view.html#x402-mcp-manifest.md">x402 boundary</a>
61
+ </nav>
62
+ </div>
63
+ </header>
64
+ <main id="content" class="wrap">
65
+ <section class="hero">
66
+ <div>
67
+ <p class="eyebrow">Phase 3 · product flows, not settlement</p>
68
+ <h1>Paid API, creator payout, and AI-agent commerce flows.</h1>
69
+ <p>Choose a scenario, edit the review fields, freeze money-critical data, and export a local artifact. This is a product contract for future Arc Testnet work, not a wallet flow.</p>
70
+ <p class="status" id="flow-status">draft_review</p>
71
+ </div>
72
+ <div class="panel warning">
73
+ <h2>No wallet surface in this slice</h2>
74
+ <ul>
75
+ <li>No private keys, browser wallet requests, signing, or transaction broadcast.</li>
76
+ <li>No backend calls, remote RPC calls, or live x402/Gateway proof verification.</li>
77
+ <li>Every flow keeps `humanApprovalRequired: true` and `transactionBroadcast: false`.</li>
78
+ </ul>
79
+ </div>
80
+ </section>
81
+ <section class="panel" aria-label="Choose flow">
82
+ <h2>Flow templates</h2>
83
+ <div class="flow-nav" id="flow-nav"></div>
84
+ </section>
85
+ <section class="layout">
86
+ <div class="panel">
87
+ <h2 id="selected-title">Flow editor</h2>
88
+ <p id="selected-description"></p>
89
+ <div class="field"><label for="agent-name">Agent name</label><input id="agent-name" /></div>
90
+ <div class="field"><label for="recipient">Recipient placeholder</label><input id="recipient" /></div>
91
+ <div class="field"><label for="amount">Amount, USDC</label><input id="amount" type="number" min="0" step="0.01" /></div>
92
+ <div class="field"><label for="purpose">Purpose</label><input id="purpose" /></div>
93
+ <div class="field"><label for="evidence">Evidence / source note</label><textarea id="evidence"></textarea></div>
94
+ <div class="actions">
95
+ <button class="primary" id="freeze-flow">Freeze flow request</button>
96
+ <button id="approve-flow" disabled>Record local approval</button>
97
+ <button id="simulate-receipt" disabled>Simulate receipt</button>
98
+ <button id="reset-flow">Reset flow</button>
99
+ </div>
100
+ </div>
101
+ <div>
102
+ <div class="grid">
103
+ <article class="flow-card"><h3>Agent</h3><pre id="agent-json"></pre></article>
104
+ <article class="flow-card"><h3>Request</h3><pre id="request-json"></pre></article>
105
+ <article class="flow-card"><h3>Receipt</h3><pre id="receipt-json"></pre></article>
106
+ </div>
107
+ <article class="panel" style="margin-top:16px"><h2>Event log</h2><ol class="event-log" id="event-log"></ol></article>
108
+ <article class="panel" style="margin-top:16px"><h2>Combined flow object</h2><pre id="flow-json"></pre></article>
109
+ </div>
110
+ </section>
111
+ </main>
112
+ <script src="./flows.js" defer></script>
113
+ </body>
114
+ </html>
@@ -0,0 +1,190 @@
1
+ // Agent commerce live — real on-chain evidence from Arc Testnet.
2
+ // This page shows static verified transaction data. No network calls.
3
+
4
+ const ARC_TESTNET_CHAIN_ID = 5042002;
5
+ const ARC_TESTNET_CHAIN_HEX = "0x4cef52";
6
+ const WALLET_ADDRESS = "0x0cd9b933302d90bfe295471deac7f4eafd9ea401";
7
+ const USDC_CONTRACT = "0x3600000000000000000000000000000000000000";
8
+ const EXPLORER_BASE = "https://testnet.arcscan.app";
9
+
10
+ const walletState = [
11
+ ["Wallet address", "0x0cd9…a401"],
12
+ ["Wallet type", "Circle agent (SCA)"],
13
+ ["Chain", "Arc Testnet"],
14
+ ["Chain ID", "5042002 / 0x4cef52"],
15
+ ["USDC contract", "0x3600…0000"],
16
+ ["USDC decimals", "6 (ERC-20) / 18 (native)"],
17
+ ["Gateway domain", "26 (Arc)"],
18
+ ["Session", "testnet (OTP)"],
19
+ ["Starting balance", "20.00 USDC"],
20
+ ["On-chain balance", "~14.05 USDC"],
21
+ ["Gateway balance", "3.9965 USDC (Arc)"],
22
+ ];
23
+
24
+ const transactions = [
25
+ {
26
+ op: "TRANSFER (faucet)",
27
+ status: "COMPLETE",
28
+ amount: "20 USDC",
29
+ block: "48020204",
30
+ txHash: "0xd52b5296112b3ef7e6…",
31
+ detail: "Circle faucet drip: 20 USDC native + 20 USDC ERC-20",
32
+ },
33
+ {
34
+ op: "TRANSFER (self-test)",
35
+ status: "COMPLETE",
36
+ amount: "1 USDC",
37
+ block: "48020319",
38
+ txHash: "0xb570a204eb4d81d361…",
39
+ detail: "Self-transfer: wallet deployment and functionality test",
40
+ },
41
+ {
42
+ op: "CCTP APPROVE",
43
+ status: "COMPLETE",
44
+ amount: "—",
45
+ block: "48020338",
46
+ txHash: "0x044184a5ce5760a276…",
47
+ detail: "USDC approve for TokenMessengerV2 (CCTP bridge)",
48
+ },
49
+ {
50
+ op: "CCTP BURN (bridge)",
51
+ status: "COMPLETE",
52
+ amount: "1 USDC",
53
+ block: "48020350",
54
+ txHash: "0x7855802e76412ee50a…",
55
+ detail: "Bridge: Arc Testnet → Base Sepolia via CCTP (domain 26 → 6)",
56
+ },
57
+ {
58
+ op: "TRANSFER (agent payment)",
59
+ status: "COMPLETE",
60
+ amount: "0.5 USDC",
61
+ block: "48027390",
62
+ txHash: "0x490df63904f7722c36…",
63
+ detail: "Agent pays 0.5 USDC for paid API call simulation → 0xdEaD",
64
+ },
65
+ {
66
+ op: "TRANSFER (micro-payment)",
67
+ status: "COMPLETE",
68
+ amount: "0.25 USDC",
69
+ block: "48027419",
70
+ txHash: "0xda2ed5d09c781cbf5c…",
71
+ detail: "Agent pays 0.25 USDC for micro-service call → 0xdEaD",
72
+ },
73
+ {
74
+ op: "GATEWAY DEPOSIT",
75
+ status: "COMPLETE",
76
+ amount: "5 USDC",
77
+ block: "48028452",
78
+ txHash: "0x2f458c54c4d65868170…",
79
+ detail: "Deposit 5 USDC into Circle Gateway on Arc (domain 26) via direct",
80
+ },
81
+ {
82
+ op: "GATEWAY WITHDRAW",
83
+ status: "COMPLETE",
84
+ amount: "1 USDC",
85
+ block: "—",
86
+ txHash: "0x3ffb115ba2c453f5c07…",
87
+ detail: "Withdraw 1 USDC from Gateway back to wallet (fee: 0.0035)",
88
+ },
89
+ {
90
+ op: "ESCROW: approve(spender, 1M)",
91
+ status: "COMPLETE",
92
+ amount: "1 USDC approved",
93
+ block: "48029256",
94
+ txHash: "0x61751274d823349308…",
95
+ detail: "approve(0xdEaD, 1000000) — escrow agent can spend 1 USDC",
96
+ },
97
+ {
98
+ op: "ESCROW: fund (job posting)",
99
+ status: "COMPLETE",
100
+ amount: "0.75 USDC",
101
+ block: "48029281",
102
+ txHash: "0x95584de37f93d4233a…",
103
+ detail: "Job poster funds escrow with 0.75 USDC for data analysis task",
104
+ },
105
+ {
106
+ op: "ESCROW: worker payout",
107
+ status: "COMPLETE",
108
+ amount: "0.5 USDC",
109
+ block: "48029312",
110
+ txHash: "0xbe8651d059314d2993…",
111
+ detail: "Escrow releases 0.5 USDC to worker after human review",
112
+ },
113
+ ];
114
+
115
+ const unitEconomics = [
116
+ ["Starting balance", "20.00 USDC"],
117
+ ["Total payments sent", "1.75 USDC"],
118
+ ["Gateway deposit", "5.00 USDC"],
119
+ ["Gateway withdraw", "1.00 USDC (fee: 0.0035)"],
120
+ ["Gateway balance", "3.9965 USDC (domain 26)"],
121
+ ["Total network fees", "~0.09 USDC"],
122
+ ["Bridge amount", "1.00 USDC"],
123
+ ["On-chain balance", "~14.05 USDC"],
124
+ ["Cost per payment", "~0.004 USDC"],
125
+ ["Total transactions", "10 (all COMPLETE)"],
126
+ ];
127
+
128
+ function renderWalletState() {
129
+ const el = document.getElementById("wallet-state");
130
+ if (!el) return;
131
+ el.innerHTML = walletState
132
+ .map(
133
+ (row) =>
134
+ '<div class="info-row"><span class="info-label">' +
135
+ row[0] +
136
+ '</span><span class="info-value">' +
137
+ row[1] +
138
+ "</span></div>"
139
+ )
140
+ .join("");
141
+ }
142
+
143
+ function renderTxLog() {
144
+ const el = document.getElementById("tx-log");
145
+ if (!el) return;
146
+ el.innerHTML = transactions
147
+ .map(
148
+ (tx) =>
149
+ '<div class="tx-card">' +
150
+ '<div class="tx-card-header">' +
151
+ '<span class="tx-op">' +
152
+ tx.op +
153
+ '</span><span class="tx-status complete">' +
154
+ tx.status +
155
+ "</span></div>" +
156
+ '<div class="tx-detail">Amount: <strong>' +
157
+ tx.amount +
158
+ "</strong> | Block: " +
159
+ tx.block +
160
+ "</div>" +
161
+ '<div class="tx-detail tx-hash">Tx: ' +
162
+ tx.txHash +
163
+ "</div>" +
164
+ '<div class="tx-detail">' +
165
+ tx.detail +
166
+ "</div></div>"
167
+ )
168
+ .join("");
169
+ }
170
+
171
+ function renderUnitEconomics() {
172
+ const el = document.getElementById("unit-economics");
173
+ if (!el) return;
174
+ el.innerHTML = unitEconomics
175
+ .map(
176
+ (row) =>
177
+ '<div class="info-row"><span class="info-label">' +
178
+ row[0] +
179
+ '</span><span class="info-value">' +
180
+ row[1] +
181
+ "</span></div>"
182
+ )
183
+ .join("");
184
+ }
185
+
186
+ document.addEventListener("DOMContentLoaded", function () {
187
+ renderWalletState();
188
+ renderTxLog();
189
+ renderUnitEconomics();
190
+ });
@@ -0,0 +1,105 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Live agent commerce evidence on Arc Testnet — real USDC transactions via Circle agent wallet." />
7
+ <title>Agent Commerce Live · Arc MCP Builder Assistant</title>
8
+ <style>
9
+ :root { color-scheme: dark; --bg: #070916; --panel: rgba(255,255,255,.075); --line: rgba(255,255,255,.16); --text: #fbf9ff; --muted: #c6bedc; --accent: #7cf7d4; --circle: #00d4ff; --good: #89ffb8; --warn: #ffd166; }
10
+ * { box-sizing: border-box; }
11
+ html { scroll-behavior: smooth; }
12
+ body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); line-height: 1.64; background: radial-gradient(circle at 12% 2%, rgba(0,212,255,.18), transparent 34rem), radial-gradient(circle at 90% 6%, rgba(124,247,212,.24), transparent 38rem), linear-gradient(180deg, #070916 0%, #121832 70%, #070916 100%); }
13
+ a { color: var(--accent); text-decoration: none; }
14
+ a:hover { text-decoration: underline; }
15
+ a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
16
+ .wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
17
+ header { padding: 26px 0 12px; }
18
+ .topbar, nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
19
+ .topbar { justify-content: space-between; }
20
+ .brand { color: var(--text); font-weight: 950; letter-spacing: -.02em; }
21
+ nav a, .badge { border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: rgba(255,255,255,.055); color: var(--text); font-weight: 850; }
22
+ .badge { display: inline-flex; width: fit-content; }
23
+ .badge.good { color: var(--good); border-color: rgba(137,255,184,.36); background: rgba(137,255,184,.08); }
24
+ .badge.circle { color: var(--circle); border-color: rgba(0,212,255,.36); background: rgba(0,212,255,.08); }
25
+ .hero { padding: 34px 0 22px; }
26
+ .layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 72px; align-items: start; }
27
+ .panel { border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 32px); background: linear-gradient(180deg, rgba(255,255,255,.1), var(--panel)); box-shadow: 0 22px 80px rgba(0,0,0,.34); }
28
+ .warning { border-color: rgba(255,209,102,.36); background: rgba(255,209,102,.08); }
29
+ .eyebrow { color: var(--circle); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 950; }
30
+ h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; }
31
+ h1 { margin: 12px 0 14px; font-size: clamp(2.15rem, 7vw, 4.6rem); }
32
+ h2 { margin-top: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
33
+ p, li, label { color: var(--muted); }
34
+ .info-grid { display: grid; gap: 10px; }
35
+ .info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.2); gap: 12px; }
36
+ .info-label { color: var(--muted); font-size: .85rem; white-space: nowrap; }
37
+ .info-value { color: var(--text); font-weight: 800; font-family: ui-monospace, "SF Mono", monospace; font-size: .82rem; text-align: right; word-break: break-all; }
38
+ .tx-list { display: grid; gap: 12px; }
39
+ .tx-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: rgba(0,0,0,.2); }
40
+ .tx-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
41
+ .tx-op { font-weight: 900; font-size: .85rem; }
42
+ .tx-status { font-size: .75rem; padding: 3px 10px; border-radius: 999px; }
43
+ .tx-status.complete { background: rgba(137,255,184,.12); color: var(--good); }
44
+ .tx-detail { font-size: .8rem; color: var(--muted); font-family: ui-monospace, monospace; word-break: break-all; }
45
+ .tx-hash { color: var(--accent); font-size: .78rem; }
46
+ code { font-family: ui-monospace, "SF Mono", monospace; font-size: .85rem; background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 6px; }
47
+ @media (max-width: 920px) { .layout { grid-template-columns: 1fr; } nav { display: none; } }
48
+ @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
49
+ </style>
50
+ </head>
51
+ <body>
52
+ <a class="skip-link" href="#agent-commerce-live" style="position:absolute;top:12px;left:-9999px;z-index:10;padding:10px 14px;border-radius:999px;background:var(--accent);color:#06110f;font-weight:950;">Skip to content</a>
53
+ <header class="wrap">
54
+ <div class="topbar">
55
+ <a class="brand" href="../../">Arc MCP Builder Assistant</a>
56
+ <nav aria-label="Agent commerce live navigation">
57
+ <a href="../../">Home</a>
58
+ <a href="../../docs/view.html#agent-commerce-live-evidence.md">Docs</a>
59
+ <a href="../circle-wallet-integration/">Circle wallet lab</a>
60
+ <a href="../arc-agent-treasury-lab/">Treasury lab</a>
61
+ </nav>
62
+ </div>
63
+ </header>
64
+ <main id="agent-commerce-live" class="wrap">
65
+ <section class="hero">
66
+ <p class="eyebrow">Live on-chain evidence · Arc Testnet</p>
67
+ <h1>Agent commerce live</h1>
68
+ <p>Real USDC transactions on Arc Testnet via Circle agent wallet. First agent-to-service payments on Arc, verified on-chain.</p>
69
+ <div style="display:flex;gap:10px;flex-wrap:wrap;margin-top:14px">
70
+ <span class="badge circle">Circle agent wallet</span>
71
+ <span class="badge good">10 transactions · all COMPLETE</span>
72
+ <span class="badge good">Arc Testnet · 5042002</span>
73
+ </div>
74
+ </section>
75
+ <section class="layout">
76
+ <div class="panel">
77
+ <h2>Wallet state</h2>
78
+ <div class="info-grid" id="wallet-state"></div>
79
+ </div>
80
+ <div class="panel">
81
+ <h2>Transaction log</h2>
82
+ <div class="tx-list" id="tx-log"></div>
83
+ </div>
84
+ </section>
85
+ <section class="layout">
86
+ <div class="panel">
87
+ <h2>Unit economics</h2>
88
+ <div class="info-grid" id="unit-economics"></div>
89
+ </div>
90
+ <div class="panel warning">
91
+ <h2>Safety boundaries</h2>
92
+ <ul>
93
+ <li>Testnet only — faucet USDC has no real value.</li>
94
+ <li>No private keys in repo — Circle CLI manages keys internally.</li>
95
+ <li>No custody, no mainnet, no autonomous spending.</li>
96
+ <li>Every transaction was human-approved via Circle CLI.</li>
97
+ <li>Burn address (0xdEaD) simulates service provider without real counterparty.</li>
98
+ <li>No secrets committed — wallet address is public information.</li>
99
+ </ul>
100
+ </div>
101
+ </section>
102
+ </main>
103
+ <script src="./commerce-live.js" defer></script>
104
+ </body>
105
+ </html>
@@ -0,0 +1,96 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Local-only review packet exporter for Arc agent commerce demos." />
7
+ <title>Agent Commerce Review Packet · Arc MCP Builder Assistant</title>
8
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'; upgrade-insecure-requests" />
9
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%232563eb'/%3E%3Cstop offset='1' stop-color='%2306b6d4'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='16' fill='url(%23g)'/%3E%3Ctext x='50%25' y='55%25' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='38' font-weight='900' fill='white'%3EA%3C/text%3E%3C/svg%3E" />
10
+ <style>
11
+ :root { color-scheme: dark; --bg: #070916; --panel: rgba(255,255,255,.075); --line: rgba(255,255,255,.16); --text: #fbf9ff; --muted: #c6bedc; --accent: #7cf7d4; --violet: #b597ff; --warn: #ffd166; --good: #89ffb8; }
12
+ * { box-sizing: border-box; }
13
+ html { scroll-behavior: smooth; }
14
+ body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); line-height: 1.64; background: radial-gradient(circle at 12% 2%, rgba(124,247,212,.18), transparent 34rem), radial-gradient(circle at 90% 6%, rgba(181,151,255,.24), transparent 38rem), linear-gradient(180deg, #070916 0%, #121832 70%, #070916 100%); }
15
+ a { color: var(--accent); text-decoration: none; }
16
+ a:hover { text-decoration: underline; }
17
+ a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
18
+ .skip-link { position: absolute; top: 12px; left: -9999px; z-index: 10; padding: 10px 14px; border-radius: 999px; background: var(--accent); color: #06110f; font-weight: 950; }
19
+ .skip-link:focus { left: 12px; }
20
+ .wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
21
+ header { padding: 26px 0 12px; }
22
+ .topbar, nav, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
23
+ .topbar { justify-content: space-between; }
24
+ .brand { color: var(--text); font-weight: 950; letter-spacing: -.02em; }
25
+ nav a, button, .badge { border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: rgba(255,255,255,.055); color: var(--text); font-weight: 850; }
26
+ button { cursor: pointer; }
27
+ button.primary { background: var(--accent); color: #06110f; border-color: transparent; }
28
+ .hero, .layout { display: grid; grid-template-columns: .95fr 1.05fr; gap: 18px; align-items: start; }
29
+ .hero { padding: 34px 0 22px; }
30
+ .layout { padding-bottom: 72px; }
31
+ .panel { border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 32px); background: linear-gradient(180deg, rgba(255,255,255,.1), var(--panel)); box-shadow: 0 22px 80px rgba(0,0,0,.34); }
32
+ .warning { border-color: rgba(255,209,102,.36); background: rgba(255,209,102,.08); }
33
+ .eyebrow { color: var(--accent); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 950; }
34
+ h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; }
35
+ h1 { margin: 12px 0 14px; font-size: clamp(2.15rem, 7vw, 4.6rem); }
36
+ h2 { margin-top: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
37
+ p, li, label { color: var(--muted); }
38
+ .field { display: grid; gap: 8px; margin-bottom: 14px; }
39
+ input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.24); color: var(--text); padding: 12px 14px; font: inherit; }
40
+ textarea { min-height: 86px; resize: vertical; }
41
+ pre { white-space: pre-wrap; word-break: break-word; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: rgba(0,0,0,.42); color: #eafff8; }
42
+ .badge { display: inline-flex; width: fit-content; color: var(--accent); border-color: rgba(124,247,212,.36); background: rgba(124,247,212,.08); }
43
+ @media (max-width: 920px) { .hero, .layout { grid-template-columns: 1fr; } nav { display: none; } }
44
+ @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
45
+ </style>
46
+ </head>
47
+ <body>
48
+ <a class="skip-link" href="#content">Skip to content</a>
49
+ <header class="wrap">
50
+ <div class="topbar">
51
+ <a class="brand" href="../../">Arc MCP Builder Assistant</a>
52
+ <nav aria-label="Review packet navigation">
53
+ <a href="../../">Home</a>
54
+ <a href="../../docs/view.html#agent-commerce-review-packet.md">Packet docs</a>
55
+ <a href="../agent-identity-profile-preview/">Identity preview</a>
56
+ <a href="../agent-commerce-flows/">Commerce flows</a>
57
+ <a href="../job-escrow-simulator/">Escrow simulator</a>
58
+ </nav>
59
+ </div>
60
+ </header>
61
+ <main id="content" class="wrap">
62
+ <section class="hero">
63
+ <div>
64
+ <p class="eyebrow">Local review artifact · no spend authority</p>
65
+ <h1>Export a reviewer packet before live agent commerce.</h1>
66
+ <p>Compose agent identity, commerce flow, escrow outcome, approval notes, and safety controls into one local JSON object. This is not a wallet handoff or transaction request.</p>
67
+ <p class="badge" id="packet-status">draft_packet</p>
68
+ </div>
69
+ <div class="panel warning">
70
+ <h2>Safety boundary</h2>
71
+ <ul>
72
+ <li>No wallet connection, signing, broadcast, RPC, backend, or settlement.</li>
73
+ <li>Terminal no-payout outcomes keep payout release disabled.</li>
74
+ <li>Human approval notes are local review data, not spend authorization.</li>
75
+ </ul>
76
+ </div>
77
+ </section>
78
+ <section class="layout">
79
+ <div class="panel">
80
+ <h2>Packet fields</h2>
81
+ <div class="field"><label for="agent-name">Agent name</label><input id="agent-name" value="Research Buyer Agent" /></div>
82
+ <div class="field"><label for="flow-kind">Commerce flow</label><select id="flow-kind"><option value="paid_api_call">Paid API call</option><option value="creator_payout">Creator payout</option><option value="ai_agent_commerce">AI-agent commerce</option><option value="job_escrow">Job escrow</option></select></div>
83
+ <div class="field"><label for="amount">Amount, USDC</label><input id="amount" type="number" min="0" step="0.01" value="2.50" /></div>
84
+ <div class="field"><label for="outcome">Review outcome</label><select id="outcome"><option value="pending_local_review">Pending local review</option><option value="approved_for_local_demo">Approved for local demo</option><option value="rejected_no_payout">Rejected no payout</option><option value="disputed_manual_review">Disputed manual review</option><option value="expired_no_payout">Expired no payout</option><option value="cancelled_no_payout">Cancelled no payout</option></select></div>
85
+ <div class="field"><label for="approval-note">Approval / close note</label><textarea id="approval-note">Reviewer checked money fields, disabled wallet controls, and local-only status.</textarea></div>
86
+ <div class="actions"><button class="primary" id="freeze-packet">Freeze packet</button><button id="reset-packet">Reset</button></div>
87
+ </div>
88
+ <div class="panel">
89
+ <h2>Review packet JSON</h2>
90
+ <pre id="packet-json"></pre>
91
+ </div>
92
+ </section>
93
+ </main>
94
+ <script src="./packet.js" defer></script>
95
+ </body>
96
+ </html>
@@ -0,0 +1,125 @@
1
+ const ARC_REVIEW_PACKET = Object.freeze({
2
+ schema: 'arc-mcp-builder-assistant.agentCommerce.reviewPacket.v1',
3
+ network: {
4
+ name: 'arc-testnet',
5
+ chainId: 5042002,
6
+ chainIdHex: '0x4cef52',
7
+ },
8
+ });
9
+
10
+ const fields = {
11
+ agentName: document.querySelector('#agent-name'),
12
+ flowKind: document.querySelector('#flow-kind'),
13
+ amount: document.querySelector('#amount'),
14
+ outcome: document.querySelector('#outcome'),
15
+ approvalNote: document.querySelector('#approval-note'),
16
+ };
17
+ const nodes = {
18
+ status: document.querySelector('#packet-status'),
19
+ packet: document.querySelector('#packet-json'),
20
+ };
21
+ const buttons = {
22
+ freeze: document.querySelector('#freeze-packet'),
23
+ reset: document.querySelector('#reset-packet'),
24
+ };
25
+
26
+ let packetState = 'draft_packet';
27
+ let frozenAt = null;
28
+
29
+ function isNoPayoutOutcome(outcome) {
30
+ return ['rejected_no_payout', 'disputed_manual_review', 'expired_no_payout', 'cancelled_no_payout'].includes(outcome);
31
+ }
32
+
33
+ function amountIsValid(value) {
34
+ return /^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/.test(String(value || '').trim())
35
+ && Number(value) > 0;
36
+ }
37
+
38
+ function moneyAmount() {
39
+ return amountIsValid(fields.amount.value) ? Number(fields.amount.value).toFixed(2) : '0.00';
40
+ }
41
+
42
+ function controls() {
43
+ return {
44
+ localOnly: true,
45
+ walletConnected: false,
46
+ walletActionEnabled: false,
47
+ signingEnabled: false,
48
+ transactionBroadcast: false,
49
+ networkCallsEnabled: false,
50
+ backendCalls: false,
51
+ remoteRpcCalls: false,
52
+ settlementEnabled: false,
53
+ reputationWritten: false,
54
+ validationRequested: false,
55
+ secretRequired: false,
56
+ mainnetEnabled: false,
57
+ humanApprovalRequired: true,
58
+ };
59
+ }
60
+
61
+ function packetObject() {
62
+ const outcome = fields.outcome.value;
63
+ return {
64
+ schema: ARC_REVIEW_PACKET.schema,
65
+ state: packetState,
66
+ status: 'local_review_packet',
67
+ frozenAt,
68
+ network: ARC_REVIEW_PACKET.network,
69
+ agentIdentity: {
70
+ status: 'unregistered_local_preview',
71
+ agentName: fields.agentName.value.trim(),
72
+ registrationTransactionPrepared: false,
73
+ },
74
+ commerceFlow: {
75
+ kind: fields.flowKind.value,
76
+ asset: 'USDC',
77
+ amount: moneyAmount(),
78
+ moneyFieldsFrozen: packetState === 'packet_frozen_for_review',
79
+ sourceExamples: [
80
+ 'examples/agent-identity-profile-preview/',
81
+ 'examples/agent-commerce-flows/',
82
+ 'examples/job-escrow-simulator/',
83
+ ],
84
+ },
85
+ escrowReview: {
86
+ outcome,
87
+ noPayoutOutcome: isNoPayoutOutcome(outcome),
88
+ payoutReleased: false,
89
+ payoutReleaseReason: isNoPayoutOutcome(outcome) ? 'terminal_no_payout_local_state' : 'wallet_and_settlement_disabled',
90
+ approvalNote: fields.approvalNote.value.trim(),
91
+ },
92
+ controls: controls(),
93
+ };
94
+ }
95
+
96
+ function render() {
97
+ const packetFrozen = packetState === 'packet_frozen_for_review';
98
+ nodes.status.textContent = packetState;
99
+ nodes.packet.textContent = JSON.stringify(packetObject(), null, 2);
100
+ for (const field of Object.values(fields)) {
101
+ field.disabled = packetFrozen;
102
+ }
103
+ buttons.freeze.disabled = packetFrozen || !amountIsValid(fields.amount.value);
104
+ }
105
+
106
+ buttons.freeze.addEventListener('click', () => {
107
+ packetState = 'packet_frozen_for_review';
108
+ frozenAt = new Date().toISOString();
109
+ render();
110
+ });
111
+ buttons.reset.addEventListener('click', () => {
112
+ packetState = 'draft_packet';
113
+ frozenAt = null;
114
+ fields.agentName.value = 'Research Buyer Agent';
115
+ fields.flowKind.value = 'paid_api_call';
116
+ fields.amount.value = '2.50';
117
+ fields.outcome.value = 'pending_local_review';
118
+ fields.approvalNote.value = 'Reviewer checked money fields, disabled wallet controls, and local-only status.';
119
+ render();
120
+ });
121
+ for (const field of Object.values(fields)) {
122
+ field.addEventListener('input', render);
123
+ field.addEventListener('change', render);
124
+ }
125
+ render();