Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(assistant): tell the visitor whether the live preview is starting, running, or broken

nirholas0855f7104b47
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed539fbd8..98a9f54a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,8 +35,11 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Splitting a model into parts finishes in seconds instead of hours**: Parts Studio splits a 3D model into named, separately editable pieces. On detailed models that split could take hours: the step that merges tiny fragments back together got dramatically slower as the fragment count grew, and the longest real jobs ran close to four hours before returning anything, sometimes exhausting the service's memory and taking other people's jobs down with it. That step has been rebuilt and now runs hundreds of times faster while producing exactly the same parts, so a detailed model splits in seconds. Three related fixes came with it: a finished split is no longer lost when a network hiccup interrupts the upload, results stay available if the service restarts while you are waiting, and a rejected request now tells you why (for example, which part names actually exist) instead of showing a generic error. (`/segment`) `[fix, improvement, infra]`
- **Stylizing a model no longer throws away the finished result over a momentary network hiccup, and plain models keep their intended color**: The stylize filters (voxel, brick, voronoi shell, low-poly) rebuild your model and then upload the result to storage. A brief interruption on that last upload step was not retried, so roughly once a week a job that had already done all its work was reported to you as failed. That upload now retries by itself. Three more repairs ride along. The low-poly filter was returning every model in flat gray: it read the colors off its own simplified copy, which the simplification step hands back stripped of them, so your model's colors were discarded on the way through. It now reads them from your model. A model that carries no colors at all comes back in the soft neutral tone the filters were designed around rather than the geometry library's default gray. And a model with no size at all is refused with a clear reason instead of returning a file with nothing visible in it. (`/forge`) `[fix, improvement]`
- **The 3D forge now tells a broken GPU worker apart from a healthy one, and stops routing your generation at it**: Our own Hunyuan3D image-to-3D workers answer web requests within seconds of starting, then spend several minutes loading multi-gigabyte model weights in the background. The platform checked only whether a worker answered at all, so a worker that had answered but then failed to load its model looked exactly as healthy as a working one: the forge status page showed it green and generations kept being sent to it. Both the status page and the routing that picks a backend now read the worker's real readiness, so a worker that cannot generate is reported as down and skipped, and one that is still warming up is marked as such instead of promising a fast turnaround it cannot deliver. (`/forge`) `[fix, infra]`
+- **The agent economy dashboard now reads clearly while it loads, when it breaks, and on a phone**: The agent-to-agent volume page got a full pass. Every settlement in the live feed now links to the agents on both sides of it, the way the leaderboards already did, and never to a deleted or private profile. Hovering the volume chart shows that day's date, amount and hire count, and the same series is exposed to screen readers as a table instead of being trapped in a canvas. When the stats cannot load, the page says so and offers Retry instead of shimmering forever, and a failed background refresh keeps the numbers already on screen. Empty sections now point at what to do next, the day buckets line up with the server's UTC days no matter where you are, and the page no longer scrolls sideways on a narrow phone. (`/agent-economy-volume`) `[improvement, fix]`
- **The Agent Identity Studio showcase is live data now, and its 3D button goes both ways**: The gallery at /agent-identities shows what the Identity Studio produces: a brand brief in, a rigged 3D avatar and a set of studio renders out. Until now those demo identities were frozen into the page at build time, and the price in the header was typed into the copy, so a fresh demo run or a price change only showed up at the next site build. The page now reads a live feed at /api/agent-identities, which is also public for anyone else to call: it carries every demo identity, its renders, its rigged model, and the verified joint count, plus the service price read straight from the marketplace catalogue the paid endpoint charges from. Because the page now waits on something, it was given the states to match: shimmering placeholder cards while the feed loads, a real error panel with a working retry if it never arrives, and an honest empty state instead of a blank grid. View in 3D is a proper toggle at last, turning into Back to renders rather than becoming a dead button after one click, and it shows a spinner while the avatar downloads and a link to the full viewer if it fails. A render whose image is missing now says so instead of leaving a broken-image icon. On a phone-width screen the cards no longer push the page sideways. (`/agent-identities`) `[improvement, feature, fix]`
- **The agent-to-agent invocation SDK now states the truth about its Solana program**: @three-ws/agent-protocol-sdk records agent-to-agent skill calls on Solana against the agent_invocation program. Its docs described that program as live and deployed on mainnet and devnet; the account is not on-chain yet, so anyone building on the promise hit a cluster rejection with no explanation. The README, the package constants table and the architecture reference now say exactly where the program stands and how to check the account yourself. The on-chain smoke harness that covers this path was checking a build artifact instead of the chain, so it reported a missing file rather than the deployment state; it now asks the cluster directly and runs from a clean checkout. Separately, the Solana address guard that verifies the $THREE mint and the pump.fun programs against mainnet on every build was reading a single RPC provider, so an exhausted provider key left it verifying nothing while still printing a clean result. It now walks the same provider failover chain the platform runs on. `[fix, sdk, docs]`
+- **The arbitrage board now compares like with like, and finds four times as many real price gaps**: The x402 arbitrage board groups listings by what they actually do, so it can show you the same capability priced differently by competing providers. Two things were making it lie. When a provider's URL ended in a parameter (a wallet address, a token mint), the board treated that parameter as the capability, so ten unrelated endpoints from one vendor were being presented as a single opportunity with a 1400% spread. And a vendor charging different prices for its own different endpoints was being counted as cross-provider competition. Both are fixed: an opportunity now needs either two genuinely different provider hosts, or one resource quoted at two prices by two different venues. Grouping also stopped mistaking real words for random URL suffixes, which had been hiding matches. The live board went from 24 mostly-noise cards to 99 real ones. The page picked up polish alongside: a filtered view is now shareable by URL, deep links from the catalog land pre-filtered, the empty state offers a way out instead of a dead end, and cards fit a 320px phone without sideways scrolling. (`/arbitrage`) `[fix, improvement]`
+- **The Avatar CLI page now shows the exact snippet the CLI prints**: The /avatar-cli page claims the embed snippet it displays is the real output of `three-ws-avatar preview`, pasted in unchanged. It was not: the loader URL and the sizing had been hand-edited, so anyone copying it got markup that differed from what their own terminal would produce. The displayed snippet, the viewer running beside it, and the replayed terminal session are now captured verbatim from the CLI, including the resolver URL and the next-step hint that init actually prints. The live viewer also no longer gets cropped on narrow phones, and the page's stated package version matches the published one. (`/avatar-cli`) `[fix, docs]`
- **The Avatar Engines Atlas tells the truth about Ready Player Me, and two of its links now go where they say**: The atlas at /avatar-engines is a reference for builders choosing an engine to make a realistic 3D human, so a stale entry there sends someone down a dead end. Ready Player Me, listed as a live commercial platform you could call, shut its avatar creator and developer API on 31 January 2026 after Netflix acquired it. Its card now carries a Retired badge and says plainly what closed and what still works: GLB files exported before the shutdown are ordinary rigged glTF and still load and animate here. Every one of the atlas's 63 outbound links was checked. IMavatar's project page had moved and returned a 404, and the FLAME entry's Paper button opened an unrelated aerodynamics preprint rather than the FLAME paper; both now resolve. Documentation sites that had been sitting in the paper field, and so rendered as a Paper button, are labelled Docs. The page also handles its own bad day now: a skeleton grid while the registry loads, and, if the registry never arrives, an error state that offers a reload and the atlas documentation instead of an empty page. (`/avatar-engines`) `[fix, improvement]`
- **The character library opens instantly instead of downloading 122 MB first**: Every card in the 107-character library started streaming its full 3D model the moment the page opened, four of them at once and more than 120 MB before you had asked for anything. Cards now show their picture and load the model when you hover or tab onto one, so the page opens immediately, a phone never pays for a preview it did not ask for, and sweeping the mouse across the grid costs nothing. (`/character-library`) `[improvement]`
- **The Claude artifact builder now picks your agent for you**: Embedding an agent in a Claude conversation used to start with a blank box asking for an agent ID that nothing on the page told you how to find. The builder at /artifact now lists real public agents that carry an embeddable avatar, with their thumbnails; click one and the artifact builds, previews in a sandboxed frame and is ready to paste. Everything you configure (agent, theme, idle clip, background) is now carried in the page's address, so the link you copy rebuilds the same artifact for whoever you send it to. Typing an ID that was not an agent UUID used to come back as an internal error with a support reference; it now says plainly that agent IDs are UUIDs and where to find one. The sandbox CSP panel reads from three.ws instead of a third-party mirror, so it fills in even when GitHub is unreachable, and the whole page fits a 320px phone screen without sideways scrolling. (`/artifact`) `[improvement, fix]`
diff --git a/docs/ux-flows/09-x402-agent-commerce.md b/docs/ux-flows/09-x402-agent-commerce.md
index fadda2638..d1496da1e 100644
--- a/docs/ux-flows/09-x402-agent-commerce.md
+++ b/docs/ux-flows/09-x402-agent-commerce.md
@@ -79,18 +79,20 @@ choreographed two-agent narrative driven by Server-Sent Events.
### x402 Arbitrage — `/arbitrage`
- **Source:** `public/arbitrage.html` + `public/arbitrage.js` + `/x402.js` (loaded on-demand); backend `api/bazaar/arbitrage`.
-- **Entry point:** Cross-provider price-disparity board — one card per capability, ranked providers, spread %.
+- **Entry point:** Cross-provider price-disparity board, one card per capability, ranked providers, spread %.
- **Prerequisites / gates:** None to browse; wallet only to pay.
+- **Deep links in:** `/arbitrage?focus=<capability>` (what `/bazaar` sends from a listing's priced-peers hint), `?q=<text>`, `?type=http|mcp`. The page writes its own filter state back with `replaceState`, so any filtered view is shareable.
- **Steps (3 required + 3 optional):**
1. Page loads → `GET /api/bazaar/arbitrage?minSpreadPct=0&limit=200` → skeleton then arb cards (spread %, up to 5 providers cheapest-first, metrics).
2. (optional) Filter type All/HTTP/MCP; (optional) search by capability/host.
3. Click **Pay cheapest · $X** → lazy-loads `/x402.js`, then `window.X402.pay({ endpoint: cheapest.resource, method:'GET', merchant: host, action: capability })`.
4. Result shows on the button: "✓ Paid" (auto-revert 4s) / "Failed: …" / revert on cancel.
- 5. (optional) Click **Avoid · $Y** → navigates to `/bazaar?q=<capability>` to see the full spectrum.
-- **Decision points / branches:** MCP capability → "Pay" redirects to `/bazaar?q=` (can't call MCP directly); on-demand x402 load; button state management.
+ 5. (optional) Click **Avoid · $Y** → navigates to `/bazaar?q=<capability>` (plus `&type=mcp` for MCP capabilities, since the catalog defaults to the HTTP tab) to see the full spectrum.
+- **Decision points / branches:** MCP capability → "Pay" redirects to the catalog (can't call MCP directly); on-demand x402 load; button state management.
+- **What counts as an opportunity (backend):** listings are grouped by capability key (MCP tool name, else service name, else the last literal URL segment; route placeholders like `/:solana_address` and `/{mint}` are skipped because they name the argument, not the capability). A group ships only if it spans two or more provider hosts, or if one host has a single resource quoted at two different prices by two different facilitators (a genuine cross-venue gap). A vendor charging different prices for its own distinct endpoints is not arbitrage and is dropped.
- **External calls / dependencies:** `/api/bazaar/arbitrage`, `/x402.js`, the cheapest live endpoint, Solscan/Basescan.
- **Success state:** "✓ Paid" on the cheapest provider; payment settled on-chain.
-- **Empty / error states:** no opportunities → "No arbitrage opportunities right now…"; timeout (20s) → "Request timed out… Retry"; feed error → "Couldn't reach the arbitrage feed…"; modal fail → "Payment modal failed to load".
+- **Empty / error states:** filters exclude everything → "No opportunities match these filters" with a Clear-filters button and a catalog link; feed genuinely has no gap → "No cross-provider price gaps right now" with links to `/bazaar` and `/providers`; timeout (20s) → "Request timed out… Retry"; feed error → "Couldn't reach the arbitrage feed…"; modal fail → "Payment modal failed to load".
- **Step count:** 3 required (+3 optional).
### x402 Providers — `/providers`
diff --git a/pages/assistant-frame.html b/pages/assistant-frame.html
index a52d26d5a..57b0cb83a 100644
--- a/pages/assistant-frame.html
+++ b/pages/assistant-frame.html
@@ -496,9 +496,13 @@
</div>
<div id="assistant-composer">
- <div id="assistant-modes" role="tablist" aria-label="Assistant mode">
- <button type="button" class="mode-btn" data-mode="chat" role="tab" aria-pressed="true" data-i18n="assistant_frame.chat">Chat</button>
- <button type="button" class="mode-btn" data-mode="speak" role="tab" aria-pressed="false" data-i18n="assistant_frame.speak">Speak</button>
+ <!-- A pair of toggle buttons, not tabs: role="tab" would promise a
+ tabpanel relationship and an aria-selected state this control
+ does not have. Same pattern as the /assistant builder's
+ segmented control. -->
+ <div id="assistant-modes" role="group" aria-label="Assistant mode">
+ <button type="button" class="mode-btn" data-mode="chat" aria-pressed="true" data-i18n="assistant_frame.chat">Chat</button>
+ <button type="button" class="mode-btn" data-mode="speak" aria-pressed="false" data-i18n="assistant_frame.speak">Speak</button>
</div>
<div id="assistant-input-row">
<textarea id="assistant-input" rows="1" placeholder="Type a question..." aria-label="Message the assistant" maxlength="4000"></textarea>
diff --git a/pages/assistant.html b/pages/assistant.html
index e26e42afd..4bded90aa 100644
--- a/pages/assistant.html
+++ b/pages/assistant.html
@@ -213,6 +213,57 @@
.snippet-note { font-size: 12px; color: var(--dim); line-height: 1.6; margin-top: 12px; }
.snippet-note a { color: var(--ink); }
+ /* Live-preview state line: the page mounts the real widget, so it says
+ whether that mount is starting, running, or broken (and offers a
+ retry) instead of leaving a silent empty corner. */
+ .preview-status {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex-wrap: wrap;
+ margin-top: 12px;
+ padding: 9px 11px;
+ border-radius: 10px;
+ border: 1px solid var(--border);
+ background: rgba(255, 255, 255, 0.03);
+ font-size: 12px;
+ line-height: 1.5;
+ color: var(--dim);
+ }
+ .preview-status .dot {
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
+ flex: 0 0 auto;
+ background: var(--dim);
+ }
+ .preview-status[data-state='loading'] .dot { background: #fbbf24; }
+ .preview-status[data-state='ready'] .dot { background: #4ade80; }
+ .preview-status[data-state='error'] {
+ border-color: rgba(248, 113, 113, 0.45);
+ background: rgba(248, 113, 113, 0.08);
+ color: #fecaca;
+ }
+ .preview-status[data-state='error'] .dot { background: #f87171; }
+ .preview-status button {
+ margin-left: auto;
+ appearance: none;
+ border: 1px solid var(--border);
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 0.06);
+ color: var(--ink);
+ font: 600 12px/1 'Inter', system-ui, sans-serif;
+ padding: 6px 11px;
+ cursor: pointer;
+ transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
+ }
+ .preview-status button:hover { background: rgba(255, 255, 255, 0.12); }
+ .preview-status button:active { transform: scale(0.97); }
+ .preview-status button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
+ @media (prefers-reduced-motion: reduce) {
+ .preview-status button { transition: none; }
+ }
+
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
@@ -235,7 +286,7 @@
<body>
<main>
<section class="hero">
- <h1 data-i18n-html="assistant.a_3d_avatar_assistant_on_any_website">A 3D avatar assistant<br /><span class="accent">on any website.</span></h1>
+ <h1 data-i18n-html="assistant.a_3d_avatar_assistant_on_any_website">A 3D avatar assistant <br /><span class="accent">on any website.</span></h1>
<p class="lede" data-i18n="assistant.one_script_tag_adds_a_floating_launcher">
One script tag adds a floating launcher to your site. Click it and a real,
animated 3D avatar pops up — against your page, a color, or a gradient — with
@@ -264,7 +315,7 @@
<option value="/avatars/xbot.glb" data-i18n="assistant.x_bot">X Bot</option>
<option value="custom" data-i18n="assistant.custom_glb_url">Custom GLB URL…</option>
</select>
- <input type="text" id="cfg-avatar-url" placeholder="https://… .glb (or a three.ws avatar id)" hidden style="margin-top: 8px" />
+ <input type="text" id="cfg-avatar-url" placeholder="https://… .glb (or a three.ws avatar id)" hidden style="margin-top: 8px" aria-label="Custom avatar GLB URL or three.ws avatar id" data-i18n-attr="aria-label:assistant.custom_avatar_glb_url_arialabel" />
</div>
<div class="field">
@@ -326,6 +377,11 @@
<h2 data-i18n="assistant.your_snippet">Your snippet</h2>
<div class="snippet" id="snippet" tabindex="0" aria-label="Embed code"></div>
<button type="button" class="copy-btn" id="copy-btn" data-i18n="assistant.copy_snippet">Copy snippet</button>
+ <p class="preview-status" id="preview-status" data-state="loading" role="status" aria-live="polite">
+ <span class="dot" aria-hidden="true"></span>
+ <span id="preview-status-text" data-i18n="assistant.starting_the_live_preview">Starting the live preview...</span>
+ <button type="button" id="preview-retry" hidden data-i18n="assistant.retry">Retry</button>
+ </p>
<p class="snippet-note" data-i18n-html="assistant.paste_it_before_on_any_site_chat">
Paste it before <code>&lt;/body&gt;</code> on any site. Chat answers come from the
free model chain (Groq → OpenRouter → NVIDIA) by default; visitors can switch to
diff --git a/prompts/swarm-100/route-agent-identities.md b/prompts/swarm-100/route-agent-identities.md
deleted file mode 100644
index c48fc257b..000000000
--- a/prompts/swarm-100/route-agent-identities.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Route audit: /agent-identities (Agent Identity Studio: 3D avatars for AI agents)
-
-How to run: paste this file's repo path into a fresh Claude Code chat in this
-repository and say "run this work order". This file is fully self-contained:
-it depends on no other prompt file anywhere. If neighboring files in
-prompts/swarm-100/ are gone, that work is done; if present, ignore them.
-Every claim below rots; step 0 re-measures, and what you measure wins.
-
-## Operating clause (binding)
-
-- Read CLAUDE.md first. Its rules override everything, including this file.
-- Finish 100% in this session. Never end the turn with a question, an option
- list, or an unexecuted plan. A judgment call goes in one line of the final
- report; it never becomes a question that halts work.
-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real
- funds or any irreversible on-chain write, git push or a production deploy,
- committing content that references a crypto project other than $THREE, and
- destroying unrecoverable data.
-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no
- commented-out code. Real APIs and real integrations only.
-- The em-dash and en-dash characters are banned in everything you write.
-- Concurrent agents share this worktree: stage explicit paths only (never a
- bare add-everything), and commit finished work promptly.
-- Before committing, run: npm run check:rules -- --paths <files you touched>.
- It must exit 0.
-
-## Step 0: re-derive the current state
-
-1. This route's declared entry (path, description, added date):
-
- node -e "const p=require('./data/pages.json');for(const s of p.sections)for(const g of s.pages)if(g.path==='/agent-identities')console.log(JSON.stringify(g,null,2))"
-
-2. Find the serving implementation: grep "/agent-identities" in vercel.json (the live
- route table server/index.mjs boots from), then list matching files in
- pages/ and src/. STRUCTURE.md maps every surface to its directory if the
- grep is ambiguous.
-3. Production right now:
-
- curl -so /dev/null -w '%{http_code}\n' https://three.ws/agent-identities
-
-4. Start (or reuse) the local dev server: npm run dev (vite, port 3000).
-
-## Task: audit this one route end to end, then fix everything found
-
-Route: /agent-identities ("Agent Identity Studio: 3D avatars for AI agents", section "agent-tools").
-Declared purpose: Every AI agent deserves a face. A brand brief becomes a rigged 3D avatar plus posed studio renders: see the demo identities generated end-to-end by the pipeline.
-
-Drive the page in a real headless browser. Playwright is already a dev
-dependency; keep your probe script in the session scratchpad, never in the
-repo.
-
-1. Load http://localhost:3000/agent-identities. Record the HTTP status, every console
- error and warning, and every failed network request.
-2. Exercise it like a first-time user: click the primary actions, run the
- primary flow if one exists, follow the page's internal links. Every button
- must do something real; every link must resolve. If the page renders data,
- prove in the network log that it came from a live endpoint, not a baked-in
- fallback array.
-3. States: verify populated, empty, loading, and error states are designed and
- reachable. Block the page's primary fetch in Playwright and confirm an
- actionable error state appears, not a blank void or a raw exception.
-4. Responsive: render at 320, 768, and 1440 px. No horizontal page scroll, no
- overlapping or clipped controls.
-5. Accessibility basics: one h1; interactive elements are real buttons or
- links with visible focus states; images carry alt text; form fields have
- labels.
-6. Head: a specific title tag and meta description that match the declared
- purpose above.
-7. Fix every defect at its root in the page's real source files and re-run the
- probe until clean. Defects in shared modules are in scope when this route
- exercises them.
-
-## Definition of done
-
-- [ ] Local load of /agent-identities: HTTP 200, zero console errors, zero unhandled
- failed requests (a third-party outage must land in a designed fallback,
- not a broken page).
-- [ ] No dead interactive element on the page: no stub href="#", no button
- without a handler, no link to a missing path.
-- [ ] Empty, loading, error, and populated states verified.
-- [ ] 320 / 768 / 1440 px renders verified clean.
-- [ ] Title and meta description present and specific.
-- [ ] npm test passes; npm run check:rules -- --paths <touched files> exits 0.
-- [ ] Production status from step 0 recorded in the report; if production
- needs a deploy to pick up a fix, the report says so (deploys stay
- owner-gated).
-
-## Never blocked
-
-| Blocker | Resolution (act, do not ask) |
-|---|---|
-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |
-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |
-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |
-| Playwright browser missing | npx playwright install chromium |
-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |
-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |
-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |
-
-## Close out (required)
-
-1. Verify every Definition of done line with the actual command output in
- front of you. Never claim a line you did not verify.
-2. Commit with explicit paths and a subject that describes the diff (house
- style: type(scope): what changed and why a reader cares).
-3. Delete this prompt file in that same commit:
-
- git rm prompts/swarm-100/route-agent-identities.md
-
- The shrinking directory is this campaign's only progress ledger; there is
- no progress log to update.
-4. Final report: what step 0 measured, what changed (file list), evidence per
- Definition of done line, and any one-line judgment calls. No trailing
- questions, no unexecuted plans.
-
-If a line genuinely cannot pass inside this session (an external party must
-respond, or an owner-gated action is the final step), finish everything else,
-leave this file in place, and state exactly which line remains and who owns
-it. Never delete this file on a partial.
diff --git a/prompts/swarm-100/route-airdrops.md b/prompts/swarm-100/route-airdrops.md
deleted file mode 100644
index 8e4e077d6..000000000
--- a/prompts/swarm-100/route-airdrops.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Route audit: /airdrops (Airdrop Checker)
-
-How to run: paste this file's repo path into a fresh Claude Code chat in this
-repository and say "run this work order". This file is fully self-contained:
-it depends on no other prompt file anywhere. If neighboring files in
-prompts/swarm-100/ are gone, that work is done; if present, ignore them.
-Every claim below rots; step 0 re-measures, and what you measure wins.
-
-## Operating clause (binding)
-
-- Read CLAUDE.md first. Its rules override everything, including this file.
-- Finish 100% in this session. Never end the turn with a question, an option
- list, or an unexecuted plan. A judgment call goes in one line of the final
- report; it never becomes a question that halts work.
-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real
- funds or any irreversible on-chain write, git push or a production deploy,
- committing content that references a crypto project other than $THREE, and
- destroying unrecoverable data.
-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no
- commented-out code. Real APIs and real integrations only.
-- The em-dash and en-dash characters are banned in everything you write.
-- Concurrent agents share this worktree: stage explicit paths only (never a
- bare add-everything), and commit finished work promptly.
-- Before committing, run: npm run check:rules -- --paths <files you touched>.
- It must exit 0.
-
-## Step 0: re-derive the current state
-
-1. This route's declared entry (path, description, added date):
-
- node -e "const p=require('./data/pages.json');for(const s of p.sections)for(const g of s.pages)if(g.path==='/airdrops')console.log(JSON.stringify(g,null,2))"
-
-2. Find the serving implementation: grep "/airdrops" in vercel.json (the live
- route table server/index.mjs boots from), then list matching files in
- pages/ and src/. STRUCTURE.md maps every surface to its directory if the
- grep is ambiguous.
-3. Production right now:
-
- curl -so /dev/null -w '%{http_code}\n' https://three.ws/airdrops
-
-4. Start (or reuse) the local dev server: npm run dev (vite, port 3000).
-
-## Task: audit this one route end to end, then fix everything found
-
-Route: /airdrops ("Airdrop Checker", section "crypto").
-Declared purpose: Check any Solana or Ethereum wallet against tracked airdrop criteria: a real on-chain activity scan, a 0-100 eligibility score per program, exactly what is missing with next steps, and the manual protocol actions a scan cannot see. Free, keyless, deep-linkable.
-
-Drive the page in a real headless browser. Playwright is already a dev
-dependency; keep your probe script in the session scratchpad, never in the
-repo.
-
-1. Load http://localhost:3000/airdrops. Record the HTTP status, every console
- error and warning, and every failed network request.
-2. Exercise it like a first-time user: click the primary actions, run the
- primary flow if one exists, follow the page's internal links. Every button
- must do something real; every link must resolve. If the page renders data,
- prove in the network log that it came from a live endpoint, not a baked-in
- fallback array.
-3. States: verify populated, empty, loading, and error states are designed and
- reachable. Block the page's primary fetch in Playwright and confirm an
- actionable error state appears, not a blank void or a raw exception.
-4. Responsive: render at 320, 768, and 1440 px. No horizontal page scroll, no
- overlapping or clipped controls.
-5. Accessibility basics: one h1; interactive elements are real buttons or
- links with visible focus states; images carry alt text; form fields have
- labels.
-6. Head: a specific title tag and meta description that match the declared
- purpose above.
-7. Fix every defect at its root in the page's real source files and re-run the
- probe until clean. Defects in shared modules are in scope when this route
- exercises them.
-
-## Definition of done
-
-- [ ] Local load of /airdrops: HTTP 200, zero console errors, zero unhandled
- failed requests (a third-party outage must land in a designed fallback,
- not a broken page).
-- [ ] No dead interactive element on the page: no stub href="#", no button
- without a handler, no link to a missing path.
-- [ ] Empty, loading, error, and populated states verified.
-- [ ] 320 / 768 / 1440 px renders verified clean.
-- [ ] Title and meta description present and specific.
-- [ ] npm test passes; npm run check:rules -- --paths <touched files> exits 0.
-- [ ] Production status from step 0 recorded in the report; if production
- needs a deploy to pick up a fix, the report says so (deploys stay
- owner-gated).
-
-## Never blocked
-
-| Blocker | Resolution (act, do not ask) |
-|---|---|
-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |
-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |
-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |
-| Playwright browser missing | npx playwright install chromium |
-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |
-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |
-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |
-
-## Close out (required)
-
-1. Verify every Definition of done line with the actual command output in
- front of you. Never claim a line you did not verify.
-2. Commit with explicit paths and a subject that describes the diff (house
- style: type(scope): what changed and why a reader cares).
-3. Delete this prompt file in that same commit:
-
- git rm prompts/swarm-100/route-airdrops.md
-
- The shrinking directory is this campaign's only progress ledger; there is
- no progress log to update.
-4. Final report: what step 0 measured, what changed (file list), evidence per
- Definition of done line, and any one-line judgment calls. No trailing
- questions, no unexecuted plans.
-
-If a line genuinely cannot pass inside this session (an external party must
-respond, or an owner-gated action is the final step), finish everything else,
-leave this file in place, and state exactly which line remains and who owns
-it. Never delete this file on a partial.
diff --git a/public/artifact/index.html b/public/artifact/index.html
index 764aa0593..2b0878993 100644
--- a/public/artifact/index.html
+++ b/public/artifact/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Artifact Viewer · three.ws</title>
+ <title data-i18n="artifact_index.meta_title">Artifact Viewer · three.ws</title>
<meta
name="description"
content="Embed an interactive three.ws agent inside a Claude.ai artifact. Self-contained HTML, zero external dependencies."
@@ -634,7 +634,7 @@
<header class="hero">
<span class="eyebrow" data-i18n="artifact_index.claude_ai_artifact">Claude.ai artifact</span>
<h1 class="headline" data-i18n="artifact_index.embed_your_agent_in_claude_ai">Embed your agent in Claude.ai</h1>
- <p class="lede">
+ <p class="lede" data-i18n="artifact_index.paste_a_single_url_into_a_claude">
Paste a single URL into a Claude conversation. The response is one self-contained
HTML document: three.js, GLTFLoader, and your agent's GLB are all inlined. No
script blocked by Claude's sandbox CSP, no fetch that ever leaves the page.
@@ -658,8 +658,8 @@
<div class="picker">
<div class="picker-head">
- <h3 id="picker-h">Public agents you can embed</h3>
- <a class="linklike" href="/agents">Browse all</a>
+ <h3 id="picker-h" data-i18n="artifact_index.public_agents_you_can_embed">Public agents you can embed</h3>
+ <a class="linklike" href="/agents" data-i18n="artifact_index.browse_all">Browse all</a>
</div>
<div id="pickerBody" role="group" aria-labelledby="picker-h" aria-busy="true">
<div class="picker-grid" aria-hidden="true">
@@ -764,7 +764,7 @@
<section class="facts">
<div class="fact">
<h3 data-i18n="artifact_index.self_contained">Self-contained</h3>
- <p>
+ <p data-i18n="artifact_index.three_js_gltfloader_and_the_glb_are">
three.js, GLTFLoader, and the GLB are all inlined. The page renders with zero
network calls, fully compatible with Claude's sandbox CSP that forbids fetch
and external scripts.
@@ -772,14 +772,14 @@
</div>
<div class="fact">
<h3 data-i18n="artifact_index.sandbox_locked_csp">Sandbox-locked CSP</h3>
- <p>
+ <p data-i18n="artifact_index.the_response_sets_a_csp_mirroring_claude">
The response sets a CSP mirroring Claude's own, so behavior in the live preview
matches behavior inside Claude.ai. No surprises between staging and prod.
</p>
</div>
<div class="fact">
<h3 data-i18n="artifact_index.size_budget">Size budget</h3>
- <p>
+ <p data-i18n="artifact_index.glbs_over_6_mb_are_rejected_because">
GLBs over 6 MB are rejected, because Claude's artifact panel can hang on huge
inlined payloads. The viewer adds a flat 565 KB on top of the model.
</p>
diff --git a/public/changelog.json b/public/changelog.json
index 577d99b8c..c1a4ca94e 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-11T21:45:57.459Z",
+ "generated_at": "2026-08-11T23:25:01.689Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -312,6 +312,17 @@
"infra"
]
},
+ {
+ "date": "2026-08-11",
+ "type": "update",
+ "title": "The agent economy dashboard now reads clearly while it loads, when it breaks, and on a phone",
+ "summary": "The agent-to-agent volume page got a full pass. Every settlement in the live feed now links to the agents on both sides of it, the way the leaderboards already did, and never to a deleted or private profile. Hovering the volume chart shows that day's date, amount and hire count, and the same series is exposed to screen readers as a table instead of being trapped in a canvas. When the stats cannot load, the page says so and offers Retry instead of shimmering forever, and a failed background refresh keeps the numbers already on screen. Empty sections now point at what to do next, the day buckets line up with the server's UTC days no matter where you are, and the page no longer scrolls sideways on a narrow phone.",
+ "link": "/agent-economy-volume",
+ "tags": [
+ "improvement",
+ "fix"
+ ]
+ },
{
"date": "2026-08-11",
"type": "update",
@@ -336,6 +347,28 @@
"docs"
]
},
+ {
+ "date": "2026-08-11",
+ "type": "update",
+ "title": "The arbitrage board now compares like with like, and finds four times as many real price gaps",
+ "summary": "The x402 arbitrage board groups listings by what they actually do, so it can show you the same capability priced differently by competing providers. Two things were making it lie. When a provider's URL ended in a parameter (a wallet address, a token mint), the board treated that parameter as the capability, so ten unrelated endpoints from one vendor were being presented as a single opportunity with a 1400% spread. And a vendor charging different prices for its own different endpoints was being counted as cross-provider competition. Both are fixed: an opportunity now needs either two genuinely different provider hosts, or one resource quoted at two prices by two different venues. Grouping also stopped mistaking real words for random URL suffixes, which had been hiding matches. The live board went from 24 mostly-noise cards to 99 real ones. The page picked up polish alongside: a filtered view is now shareable by URL, deep links from the catalog land pre-filtered, the empty state offers a way out instead of a dead end, and cards fit a 320px phone without sideways scrolling.",
+ "link": "/arbitrage",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
+ {
+ "date": "2026-08-11",
+ "type": "update",
+ "title": "The Avatar CLI page now shows the exact snippet the CLI prints",
+ "summary": "The /avatar-cli page claims the embed snippet it displays is the real output of `three-ws-avatar preview`, pasted in unchanged. It was not: the loader URL and the sizing had been hand-edited, so anyone copying it got markup that differed from what their own terminal would produce. The displayed snippet, the viewer running beside it, and the replayed terminal session are now captured verbatim from the CLI, including the resolver URL and the next-step hint that init actually prints. The live viewer also no longer gets cropped on narrow phones, and the page's stated package version matches the published one.",
+ "link": "/avatar-cli",
+ "tags": [
+ "fix",
+ "docs"
+ ]
+ },
{
"date": "2026-08-11",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index eb3d911b4..d2ac23f0f 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -238,6 +238,14 @@
<category>fix</category>
<description>Our own Hunyuan3D image-to-3D workers answer web requests within seconds of starting, then spend several minutes loading multi-gigabyte model weights in the background. The platform checked only whether a worker answered at all, so a worker that had answered but then failed to load its model looked exactly as healthy as a working one: the forge status page showed it green and generations kept being sent to it. Both the status page and the routing that picks a backend now read the worker's real readiness, so a worker that cannot generate is reported as down and skipped, and one that is still warming up is marked as such instead of promising a fast turnaround it cannot deliver.</description>
</item>
+ <item>
+ <title>The agent economy dashboard now reads clearly while it loads, when it breaks, and on a phone</title>
+ <link>https://three.ws/agent-economy-volume</link>
+ <guid isPermaLink="false">2026-08-11:The agent economy dashboard now reads clearly while it loads, when it breaks, and on a phone</guid>
+ <pubDate>Tue, 11 Aug 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>The agent-to-agent volume page got a full pass. Every settlement in the live feed now links to the agents on both sides of it, the way the leaderboards already did, and never to a deleted or private profile. Hovering the volume chart shows that day's date, amount and hire count, and the same series is exposed to screen readers as a table instead of being trapped in a canvas. When the stats cannot load, the page says so and offers Retry instead of shimmering forever, and a failed background refresh keeps the numbers already on screen. Empty sections now point at what to do next, the day buckets line up with the server's UTC days no matter where you are, and the page no longer scrolls sideways on a narrow phone.</description>
+ </item>
<item>
<title>The Agent Identity Studio showcase is live data now, and its 3D button goes both ways</title>
<link>https://three.ws/agent-identities</link>
@@ -254,6 +262,22 @@
<category>fix</category>
<description>@three-ws/agent-protocol-sdk records agent-to-agent skill calls on Solana against the agent_invocation program. Its docs described that program as live and deployed on mainnet and devnet; the account is not on-chain yet, so anyone building on the promise hit a cluster rejection with no explanation. The README, the package constants table and the architecture reference now say exactly where the program stands and how to check the account yourself. The on-chain smoke harness that covers this path was checking a build artifact instead of the chain, so it reported a missing file rather than the deployment state; it now asks the cluster directly and runs from a clean checkout. Separately, the Solana address guard that verifies the $THREE mint and the pump.fun programs against mainnet on every build was reading a single RPC provider, so an exhausted provider key left it verifying nothing while still printing a clean result. It now walks the same provider failover chain the platform runs on.</description>
</item>
+ <item>
+ <title>The arbitrage board now compares like with like, and finds four times as many real price gaps</title>
+ <link>https://three.ws/arbitrage</link>
+ <guid isPermaLink="false">2026-08-11:The arbitrage board now compares like with like, and finds four times as many real price gaps</guid>
+ <pubDate>Tue, 11 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The x402 arbitrage board groups listings by what they actually do, so it can show you the same capability priced differently by competing providers. Two things were making it lie. When a provider's URL ended in a parameter (a wallet address, a token mint), the board treated that parameter as the capability, so ten unrelated endpoints from one vendor were being presented as a single opportunity with a 1400% spread. And a vendor charging different prices for its own different endpoints was being counted as cross-provider competition. Both are fixed: an opportunity now needs either two genuinely different provider hosts, or one resource quoted at two prices by two different venues. Grouping also stopped mistaking real words for random URL suffixes, which had been hiding matches. The live board went from 24 mostly-noise cards to 99 real ones. The page picked up polish alongside: a filtered view is now shareable by URL, deep links from the catalog land pre-filtered, the empty state offers a way out instead of a dead end, and cards fit a 320px phone without sideways scrolling.</description>
+ </item>
+ <item>
+ <title>The Avatar CLI page now shows the exact snippet the CLI prints</title>
+ <link>https://three.ws/avatar-cli</link>
+ <guid isPermaLink="false">2026-08-11:The Avatar CLI page now shows the exact snippet the CLI prints</guid>
+ <pubDate>Tue, 11 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The /avatar-cli page claims the embed snippet it displays is the real output of `three-ws-avatar preview`, pasted in unchanged. It was not: the loader URL and the sizing had been hand-edited, so anyone copying it got markup that differed from what their own terminal would produce. The displayed snippet, the viewer running beside it, and the replayed terminal session are now captured verbatim from the CLI, including the resolver URL and the next-step hint that init actually prints. The live viewer also no longer gets cropped on narrow phones, and the page's stated package version matches the published one.</description>
+ </item>
<item>
<title>The Avatar Engines Atlas tells the truth about Ready Player Me, and two of its links now go where they say</title>
<link>https://three.ws/avatar-engines</link>
diff --git a/public/features.json b/public/features.json
index 1e534c5f5..71193063f 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-11T21:45:57.452Z",
+ "generated_at": "2026-08-11T23:25:01.602Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/locales/en.json b/public/locales/en.json
index 776d122f1..0dca0da48 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -959,10 +959,10 @@
},
"agent_wallet": {
"home_agents_wallet": "<a href=\"/\">Home</a> / <a href=\"/agents\">Agents</a> / Wallet",
- "meta_description": "Manage a three.ws 3D AI agent's self-custodied Solana wallet — live balance, deposits, trading, sniping, x402 payments, and withdrawals, all in one place.",
+ "meta_description": "Manage a three.ws 3D AI agent's self-custodied Solana wallet: live balance, deposits, trading, sniping, x402 payments, and withdrawals, all in one place.",
"meta_og_description": "Your 3D AI agent's own Solana wallet: balance, deposit, trade, snipe, pay, and withdraw.",
- "meta_og_title": "Agent wallet — three.ws",
- "meta_title": "Agent wallet — three.ws",
+ "meta_og_title": "Agent Wallet · three.ws",
+ "meta_title": "Agent Wallet · three.ws",
"meta_twitter_description": "The wallet surface for your agents: balances, funding, and activity.",
"meta_twitter_title": "Agent Wallet · three.ws"
},
@@ -1383,12 +1383,13 @@
"arbitrage": {
"all": "All",
"http": "HTTP",
- "live_opportunities_surfaced_from_the_merged": "Live opportunities surfaced from the merged x402 facilitator catalog. Same tool, same intent — different price.",
+ "filter_label": "Filter by capability or provider",
+ "live_opportunities_surfaced_from_the_merged": "Live opportunities surfaced from the merged x402 facilitator catalog. Same tool, same intent, different price.",
"mcp": "MCP",
"meta_description": "Cross-provider price disparities surfaced live from the merged x402 facilitator catalog. Find the cheapest endpoint for any capability.",
"meta_og_description": "Live cross-provider price disparities from the merged x402 catalog.",
- "meta_og_title": "x402 Arbitrage — same capability, different price",
- "meta_title": "x402 Arbitrage — same capability, different price",
+ "meta_og_title": "x402 Arbitrage: same capability, different price",
+ "meta_title": "x402 Arbitrage: same capability, different price",
"meta_twitter_description": "Cross-provider price disparities surfaced live from the merged x402 facilitator catalog. Find the cheapest endpoint for any capability.",
"meta_twitter_title": "x402 Arbitrage · three.ws",
"spot_the_same_capability_priced_differently": "Spot the same capability priced differently."
@@ -1465,6 +1466,7 @@
"agent_id": "Agent ID",
"artifact": "Artifact",
"background_hex_optional": "Background hex (optional)",
+ "browse_all": "Browse all",
"claude_ai_artifact": "Claude.ai artifact",
"claude_artifact_sandbox_csp": "Claude artifact sandbox CSP",
"configure": "Configure",
@@ -1475,6 +1477,7 @@
"first_paint": "First paint",
"generate": "Generate",
"generate_2": "Generate",
+ "glbs_over_6_mb_are_rejected_because": "GLBs over 6 MB are rejected, because Claude's artifact panel can hang on huge inlined payloads. The viewer adds a flat 565 KB on top of the model.",
"glbs_over_6_mb_are_rejected_claude": "GLBs over 6 MB are rejected — Claude's artifact panel can hang on huge inlined payloads. The viewer adds a flat 565 KB on top of the model.",
"idle_clip": "Idle clip",
"light": "light",
@@ -1482,20 +1485,21 @@
"meta_description": "Embed an interactive three.ws agent inside a Claude.ai artifact. Self-contained HTML, zero external dependencies.",
"meta_og_description": "Renders Claude artifact bundles as standalone embeddable apps.",
"meta_og_title": "Artifact Viewer · three.ws",
- "meta_title": "three.ws — Claude.ai artifact",
+ "meta_title": "Artifact Viewer · three.ws",
"meta_twitter_description": "Renders Claude artifact bundles as standalone embeddable apps.",
"meta_twitter_title": "Artifact Viewer · three.ws",
"open_in_tab": "Open in tab",
- "paste_a_single_url_into_a_claude": "Paste a single URL into a Claude conversation. The response is one self-contained HTML document — three.js, GLTFLoader, and your agent's GLB are all inlined. No script blocked by Claude's sandbox CSP, no fetch that ever leaves the page.",
+ "paste_a_single_url_into_a_claude": "Paste a single URL into a Claude conversation. The response is one self-contained HTML document: three.js, GLTFLoader, and your agent's GLB are all inlined. No script blocked by Claude's sandbox CSP, no fetch that ever leaves the page.",
"paste_into_claude_snippet": "Paste-into-Claude snippet",
+ "public_agents_you_can_embed": "Public agents you can embed",
"reload": "Reload",
"sandbox": "Sandbox",
"sandbox_locked_csp": "Sandbox-locked CSP",
"self_contained": "Self-contained",
"size_budget": "Size budget",
- "the_response_sets_a_csp_mirroring_claude": "The response sets a CSP mirroring Claude's own. Behavior in the live preview matches behavior inside Claude.ai — no surprises between staging and prod.",
+ "the_response_sets_a_csp_mirroring_claude": "The response sets a CSP mirroring Claude's own, so behavior in the live preview matches behavior inside Claude.ai. No surprises between staging and prod.",
"theme": "Theme",
- "three_js_gltfloader_and_the_glb_are": "three.js, GLTFLoader, and the GLB are all inlined. The page renders with zero network calls — fully compatible with Claude's sandbox CSP that forbids fetch and external scripts."
+ "three_js_gltfloader_and_the_glb_are": "three.js, GLTFLoader, and the GLB are all inlined. The page renders with zero network calls, fully compatible with Claude's sandbox CSP that forbids fetch and external scripts."
},
"assistant": {
"a_3d_avatar_assistant_on_any_website": "A 3D avatar assistant<br><span class=\"accent\">on any website.</span>",
@@ -1610,12 +1614,12 @@
"all_your_agents": "All your agents",
"autopilot_activity": "Autopilot activity",
"dashboard": "Dashboard",
- "every_action_your_agent_took_on_your": "Every action your agent took on your behalf — each grounded in the memory that motivated it, signed, and reversible where it can be. This is autonomy you can audit.",
+ "every_action_your_agent_took_on_your": "Every action your agent took on your behalf, each grounded in the memory that motivated it, signed, and reversible where it can be. This is autonomy you can audit.",
"load_more": "Load more",
- "meta_description": "Every autonomous action your three.ws agent took — each with the memory that motivated it, a signed receipt, and a one-tap undo. Explainable autonomy you can trust.",
+ "meta_description": "Every autonomous action your three.ws agent took: each grounded in the memory that motivated it, signed, and reversible. Explainable autonomy you can audit.",
"meta_og_description": "Explainable autonomy: every action your agent took, with the memory that motivated it and a signed receipt.",
- "meta_og_title": "Autopilot Activity — three.ws",
- "meta_title": "Autopilot Activity — three.ws",
+ "meta_og_title": "Autopilot Activity · three.ws",
+ "meta_title": "Autopilot Activity · three.ws",
"three_ws": "<span class=\"glyph\"></span> three.ws",
"three_ws_arialabel": "three.ws"
},
diff --git a/src/agent-exchange.js b/src/agent-exchange.js
index 3348303cb..033f30133 100644
--- a/src/agent-exchange.js
+++ b/src/agent-exchange.js
@@ -375,9 +375,9 @@ async function doPurchase() {
const res = await fetch('/api/x402-pay', {
method: 'POST',
headers: { 'content-type': 'application/json', accept: 'text/event-stream' },
+ // `endpoint` selects the showcase-pay branch in api/x402-pay.js, which
+ // allowlists it server-side and forwards `body` to the paid route.
body: JSON.stringify({
- tool: 'crypto_intel',
- topic: activeTopic,
endpoint: '/api/x402/crypto-intel',
body: { topic: activeTopic },
}),
diff --git a/src/agent-wallet.js b/src/agent-wallet.js
index cae35292b..2780ccc08 100644
--- a/src/agent-wallet.js
+++ b/src/agent-wallet.js
@@ -119,8 +119,23 @@ async function fetchAgent(agentId) {
return { agent: data.agent };
}
-/** Fetch the caller's own agents. Returns { agents } or { state: 'signed_out' }. */
+/**
+ * Fetch the caller's own agents. Returns { agents } or { state: 'signed_out' }.
+ *
+ * The session is resolved first through /api/auth/me, which answers 200 with a
+ * null user for anonymous visitors. GET /api/agents answers 401 for them, and
+ * the browser logs every 401 response as a console error, so the signed-out
+ * path stops before it fires one.
+ */
async function fetchOwnAgents() {
+ const me = await fetch('/api/auth/me', {
+ credentials: 'include',
+ headers: { accept: 'application/json' },
+ });
+ if (!me.ok) throw new Error(`HTTP ${me.status}`);
+ const session = await me.json();
+ if (!session?.user?.id) return { state: 'signed_out' };
+
const res = await fetch('/api/agents', {
credentials: 'include',
headers: { accept: 'application/json' },
diff --git a/src/assistant-page.js b/src/assistant-page.js
index d6fb2d86f..8af4fd697 100644
--- a/src/assistant-page.js
+++ b/src/assistant-page.js
@@ -27,6 +27,9 @@ const nameInput = document.getElementById('cfg-name');
const greetingInput = document.getElementById('cfg-greeting');
const contextInput = document.getElementById('cfg-context');
const accentInput = document.getElementById('cfg-accent');
+const previewStatusEl = document.getElementById('preview-status');
+const previewStatusTextEl = document.getElementById('preview-status-text');
+const previewRetryBtn = document.getElementById('preview-retry');
// ── Snippet rendering ─────────────────────────────────────────────────────
function escapeAttr(value) {
@@ -64,30 +67,68 @@ function snippetText() {
}
// ── Live widget (the real loader, re-inited on every change) ──────────────
+const PREVIEW_COPY = {
+ loading: 'Starting the live preview...',
+ ready: 'Live preview running in the corner. Every change above re-mounts it.',
+ error:
+ "The live preview couldn't start (the widget script didn't load). Your snippet " +
+ 'above is still correct, and the widget works on your own site.',
+};
+
+function setPreviewState(state) {
+ previewStatusEl.dataset.state = state;
+ previewStatusTextEl.textContent = PREVIEW_COPY[state];
+ previewRetryBtn.hidden = state !== 'error';
+}
+
let loaderReady = null;
function ensureLoader() {
if (loaderReady) return loaderReady;
+ setPreviewState('loading');
loaderReady = new Promise((resolve, reject) => {
const s = document.createElement('script');
s.src = '/assistant/v1.js';
s.setAttribute('data-manual', ''); // we drive init ourselves
- s.onload = resolve;
+ s.onload = () => {
+ if (window.ThreeAssistant) resolve();
+ else reject(new Error('assistant loader loaded without ThreeAssistant'));
+ };
s.onerror = () => reject(new Error('assistant loader failed to load'));
document.head.appendChild(s);
+ }).catch((err) => {
+ // Drop the rejected promise so Retry re-fetches instead of replaying it.
+ loaderReady = null;
+ removeLoaderTag();
+ throw err;
});
return loaderReady;
}
+/** Remove a failed loader tag so a retry isn't blocked by a dead script node. */
+function removeLoaderTag() {
+ for (const tag of document.querySelectorAll('script[src="/assistant/v1.js"]')) tag.remove();
+}
+
let applyTimer = 0;
function applyLive() {
clearTimeout(applyTimer);
applyTimer = setTimeout(async () => {
- await ensureLoader();
- const wasOpen = Boolean(window.ThreeAssistant?.instance?.isOpen);
- window.ThreeAssistant.init({ ...config, open: wasOpen });
+ try {
+ await ensureLoader();
+ const wasOpen = Boolean(window.ThreeAssistant?.instance?.isOpen);
+ window.ThreeAssistant.init({ ...config, open: wasOpen });
+ setPreviewState('ready');
+ } catch {
+ setPreviewState('error');
+ }
}, 250);
}
+previewRetryBtn.addEventListener('click', () => {
+ setPreviewState('loading');
+ applyLive();
+});
+
function update(patch) {
Object.assign(config, patch);
renderSnippet();
@@ -135,7 +176,11 @@ greetingInput.addEventListener('input', () => update({ greeting: greetingInput.v
contextInput.addEventListener('input', () => update({ context: contextInput.value.trim() }));
accentInput.addEventListener('input', () => update({ accent: sanitizeAccent(accentInput.value) }));
+let copyBtnLabel = '';
copyBtn.addEventListener('click', async () => {
+ // Read the resting label at click time: i18n may have translated it, and
+ // restoring a hardcoded English string below would undo that.
+ if (!copyBtnLabel) copyBtnLabel = copyBtn.textContent.trim();
try {
await navigator.clipboard.writeText(snippetText());
copyBtn.textContent = 'Copied!';
@@ -150,7 +195,7 @@ copyBtn.addEventListener('click', async () => {
copyBtn.textContent = 'Press Ctrl+C';
}
setTimeout(() => {
- copyBtn.textContent = 'Copy snippet';
+ copyBtn.textContent = copyBtnLabel;
}, 1600);
});