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.

chore: site-wide nav/theme refresh + forge vision moderation + fact-check image evidence

nirholase5f5dd43ff25
diff --git a/.prettierignore b/.prettierignore
index 0668fcc76..74d999d1c 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -8,6 +8,14 @@ dist-artifact/
contracts/lib/
character-studio/
docs/pumpfun-program/
+# pump.fun Agent Skills mirror (github.com/pump-fun/pump-fun-skills) — these four
+# skills are kept byte-faithful to upstream; do not reformat. Our own reactive/
+# skill is intentionally NOT listed here, so it stays prettier-enforced.
+pump-fun-skills/create-coin/
+pump-fun-skills/swap/
+pump-fun-skills/coin-fees/
+pump-fun-skills/tokenized-agents/
+pump-fun-skills/.claude-plugin/plugin.json
# Build artifacts
*.min.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb7caa7bf..cc2ab5ac3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Faster, quieter agents directory and site-wide page polish** — The on-chain agents directory now loads from our server-side index instead of contacting every agent's metadata host from your browser — pages render faster and no longer spray network errors. Also: the pump.fun cockpit's sidebar pages are now shareable deep links, mobile nav and footer links meet touch-target guidelines, anonymous visitors no longer trigger failed sign-in requests on Walk and Create, and assorted dead links were removed. (`/agents`) `[improvement, fix]`
- **Free 3D drafts on Forge** — Draft generations from a text prompt on Forge now run on a free NVIDIA-hosted TRELLIS engine by default — your first 3D model costs nothing and arrives in about 15 seconds, several times faster than the previous default. Photo-to-3D keeps its proven engine (the free lane is prompt-only by design), and every existing engine — TRELLIS on Replicate, Meshy, Tripo — remains selectable at every quality tier. (`/forge`) `[feature, improvement]`
- **Hardened the explore feed and marketplace pricing against bad requests** — The explore discovery feed and marketplace asset-pricing lookup now reject malformed query parameters with a clear 400 instead of failing with a server error. A non-numeric page size on explore, or a malformed asset id on a price lookup, no longer surfaces a 500 — the endpoints validate input up front and respond cleanly. (`/explore`) `[fix]`
+- **Light theme is here — flip the whole site with one tap** — three.ws now ships a light theme alongside the signature dark one. A new sun/moon toggle sits in the top nav on every page: tap it to switch instantly, and your choice sticks across pages, sessions, and other open tabs. New here, or set to 'Auto' in Settings → Appearance? The site follows your device's light/dark preference automatically. The theme is applied before the page paints, so there's no white flash on load, and the dashboard appearance picker (Dark / Light / Auto) now applies live instead of just saving for later. Dark remains the brand default — nothing changes unless you want it to. `[feature, improvement]`
- **Live $THREE market data, longer trade streams, and tutor session fixes** — $THREE market stats (price, holders, liquidity) are flowing again from our primary data source — a missing request header had been silently failing it to backups for days. Live trade streams no longer cut out after 30 seconds; they now run their full duration. The Pay-As-You-Learn Tutor no longer errors when resuming a session — running tabs persist correctly across questions — and Fact Checker results are cached properly so repeat checks of the same claim return instantly. `[fix, improvement]`
- **MetaMask Agent Wallet skills for every agent** — Two new skills in the marketplace under the new Wallet category: MetaMask Agent Wallet and MetaMask Agent Workflows. Install them on any agent to let it check balances, transfer tokens, swap, bridge across chains, trade perps and prediction markets, and manage Aave positions through MetaMask's mm CLI — each user signs in with their own MetaMask Agent Wallet, so keys stay with you, never with three.ws. Platform chat agents pick the skills up automatically. (`/skills`) `[feature]`
- **Pluggable memory backends + a portable snapshot format for the agent SDK** — Agent developers can now plug a custom memory backend — a vector database, an episodic event log, or their own API — behind a named mode with Memory.registerBackend, no forking required. All built-in modes (local, remote, ipfs, encrypted-ipfs, none) are unchanged. We also formalized a memory/0.1 snapshot contract: memory.snapshot() returns a JSON-safe object and Memory.fromSnapshot() rehydrates it, so embedded agent widgets keep their memory across page reloads. Documented in the Memory spec, agent manifest, and README. `[sdk, docs]`
diff --git a/agent-payments-sdk/FORK_NOTES.md b/agent-payments-sdk/FORK_NOTES.md
index b1e6b4bdd..5a23977b1 100644
--- a/agent-payments-sdk/FORK_NOTES.md
+++ b/agent-payments-sdk/FORK_NOTES.md
@@ -10,9 +10,9 @@ users who pay that agent in its token, with buyback and shareholder distribution
It is wired as a local npm workspace (this dir is in the root `package.json`
`workspaces`, scope `@three-ws/*` like our other workspace SDKs), so in-repo
imports of `@three-ws/agent-payments` resolve to this source. The real public
-`@pump-fun/agent-payments-sdk` (3.0.3) is a *separate* dependency used only by
-external-facing skill templates (`pump-fun-skills/**`) and the published
-`publish/` bundle — see "Naming" below.
+`@pump-fun/agent-payments-sdk` (3.0.3) is kept as a *separate* dependency — the
+documented upstream baseline for external-facing skill templates
+(`pump-fun-skills/**`, which pin it in their own manifests). See "Naming" below.
## TL;DR decision
@@ -110,18 +110,15 @@ It is now named **`@three-ws/agent-payments`** (matching our other workspace SDK
`vite.config.js`) imports **`@three-ws/agent-payments`** — this fork, with the
USDC/token-2022/v2 extensions. No regression.
- **External-facing** templates (`pump-fun-skills/**`, shipped to users who
- `npm install`) and the separately-published `publish/` bundle reference the real
- **`@pump-fun/agent-payments-sdk@^3.0.3`** from npm — correct, since external
- users get the public package. `publish/` uses only the core `PumpAgent`, which
- 3.0.3 provides.
+ `npm install`) reference the real **`@pump-fun/agent-payments-sdk@^3.0.3`** from
+ npm — correct, since external users get the public package, and those templates
+ use only the core `PumpAgent`, which 3.0.3 provides.
-The root `package.json` therefore depends on the real `@pump-fun/agent-payments-sdk@^3.0.3`
-(for those external/published references), while `@three-ws/agent-payments`
-auto-links from the `workspaces` array.
-
-> Note: `src/agent-skills-*.js` is duplicated into `publish/src/` (the published
-> bundle keeps its own copy on the public package). That duplication predates this
-> work and is a separate cleanup; it is not a blocker here.
+The root `package.json` keeps the real `@pump-fun/agent-payments-sdk@^3.0.3` as the
+documented upstream baseline (mirroring the pin in those external skill templates),
+while `@three-ws/agent-payments` auto-links from the `workspaces` array. No
+root-tree runtime code imports the public package directly today — internal callers
+all use the fork via `@three-ws/agent-payments`.
## Test fixtures
@@ -139,6 +136,6 @@ Core (agent-payments program): `api/agents/payments/[action].js`,
`api/_lib/pump-swap-ix.js`, `scripts/buyback-devnet-smoke.mjs`,
`pump-fun-skills/create-coin/`.
Extensions: `api/_lib/pump.js` (`PumpTradeClient`), `src/agent-skills-agent-payments.js`
-(EVM), `solana-agent-sdk/` (x402 types). All resolve via the workspace symlink;
+(EVM/x402/full lifecycle). All resolve via the workspace symlink;
`npm run build` regenerates `dist/` (root `postinstall` rebuilds on demand via
`scripts/build-cache.mjs`).
diff --git a/agents/fact-checker/src/image-evidence.js b/agents/fact-checker/src/image-evidence.js
new file mode 100644
index 000000000..e254cf69e
--- /dev/null
+++ b/agents/fact-checker/src/image-evidence.js
@@ -0,0 +1,94 @@
+// Image evidence for the fact-checker (Consumer 2 of the shared vision helper).
+//
+// A claim often comes with an image: a screenshot of a chart, a photo of a
+// label, a meme stating a "fact". The text-only pipeline can't see it. This
+// module asks a free NIM vision lane to (a) describe the image, (b) transcribe
+// any visible text, and (c) judge the image's stance toward the claim — then
+// returns a source-shaped object that folds straight into the existing weighted
+// verdict (computeVerdict in api/x402/fact-check.js) alongside web sources.
+//
+// FAIL-OPEN: if vision is unconfigured, errors, times out, or returns
+// unparseable junk, imageEvidence() returns null and the fact check proceeds on
+// web sources alone. An image attachment must never break a claim check.
+
+import { describeImageJson, visionConfigured } from '../../../api/_lib/vision.js';
+
+const TIMEOUT_MS = 20_000;
+// User-submitted evidence — informative but not an authoritative third party, so
+// it sits between a low-authority and a mainstream web source in the weighting.
+const IMAGE_SOURCE_WEIGHT = 0.6;
+
+const STANCES = new Set(['supports', 'contradicts', 'neutral']);
+
+function buildPrompt(claim) {
+ return (
+ 'You are the image-evidence analyst for a fact checker. A user submitted this image ' +
+ `alongside the claim:\n\n"${claim}"\n\n` +
+ 'Examine the image and reply ONLY with compact JSON, no prose, in exactly this shape:\n' +
+ '{"description":"<one sentence describing what the image shows>",' +
+ '"visible_text":"<any text legible in the image, verbatim; empty string if none>",' +
+ '"stance":"supports"|"contradicts"|"neutral",' +
+ '"reason":"<one short clause: how the image relates to the claim>"}\n\n' +
+ 'stance = supports if the image is genuine evidence FOR the claim, contradicts if it ' +
+ 'is evidence AGAINST it, neutral if it is unrelated, ambiguous, or clearly manipulated. ' +
+ 'Do not speculate beyond what is visibly in the image.'
+ );
+}
+
+// Analyze a claim's attached image. Returns a source object compatible with the
+// fact-check verdict, or null on any degraded path.
+//
+// { url, title, excerpt, stance, weight, retrievedAt, kind:'image',
+// description, visibleText, reason, provider }
+//
+// `track` is optional spend-ledger attribution passed to the vision helper.
+export async function imageEvidence(claim, imageUrl, { track = null, now = () => new Date() } = {}) {
+ if (!imageUrl || !visionConfigured()) return null;
+
+ let result;
+ try {
+ result = await describeImageJson({
+ prompt: buildPrompt(claim),
+ imageUrl,
+ maxTokens: 220,
+ timeoutMs: TIMEOUT_MS,
+ track: { tool: 'fact-check.image', ...(track || {}) },
+ });
+ } catch {
+ return null; // outage / timeout / unparseable — proceed without the image.
+ }
+
+ const j = result.json;
+ if (!j || typeof j !== 'object') return null;
+
+ const stance = STANCES.has(j.stance) ? j.stance : 'neutral';
+ const description = clip(j.description, 280);
+ const visibleText = clip(j.visible_text, 280);
+ const reason = clip(j.reason, 200);
+
+ // The excerpt the verdict layer shows: the description plus any transcribed
+ // text, since that text is often the substance of the "fact".
+ const excerptParts = [];
+ if (description) excerptParts.push(description);
+ if (visibleText) excerptParts.push(`Text in image: "${visibleText}"`);
+ const excerpt = excerptParts.join(' ').slice(0, 480) || 'Submitted image (no description available).';
+
+ return {
+ url: imageUrl,
+ title: 'Submitted image evidence',
+ excerpt,
+ stance,
+ weight: IMAGE_SOURCE_WEIGHT,
+ retrievedAt: now().toISOString(),
+ kind: 'image',
+ description: description || null,
+ visibleText: visibleText || null,
+ reason: reason || null,
+ provider: result.provider,
+ };
+}
+
+function clip(s, max) {
+ const t = String(s ?? '').trim();
+ return t.length > max ? t.slice(0, max) : t;
+}
diff --git a/api/_lib/avatar-alt-text.js b/api/_lib/avatar-alt-text.js
new file mode 100644
index 000000000..b330f75ea
--- /dev/null
+++ b/api/_lib/avatar-alt-text.js
@@ -0,0 +1,75 @@
+// Avatar gallery alt text (Consumer 3 of the shared vision helper).
+//
+// Accessibility is not optional (CLAUDE.md). Gallery cards previously fell back
+// to the avatar's name for the <img alt> — useless to a screen-reader user
+// ("Avatar", "untitled-3"). This generates a real, concise visual description of
+// the avatar's thumbnail with a free NIM vision lane: written on thumbnail
+// upload and backfilled for existing rows.
+//
+// FAIL-OPEN: generateAltText returns null on any degraded path (vision
+// unconfigured, timeout, error, empty reply). A null is stored as "not generated
+// yet" and the gallery falls back to the name — alt text generation never blocks
+// or breaks an avatar upload.
+
+import { describeImage, visionConfigured } from './vision.js';
+
+const TIMEOUT_MS = 15_000;
+const MAX_LEN = 160; // alt text should be terse; trim hard.
+
+const PROMPT =
+ 'Write a short, literal alt-text description of this avatar/character image for a ' +
+ 'screen reader. One sentence, under 20 words. Describe what is visibly shown — the ' +
+ 'subject, its appearance, colors, and style. Do NOT start with "Image of" or "A picture ' +
+ 'of", do not editorialize, and output ONLY the description text with no quotes.';
+
+// Generate alt text for one avatar thumbnail. Pass EITHER an http(s) thumbnail
+// URL or the raw PNG/JPEG bytes (base64) you already have in hand (preferred on
+// the upload path — no extra round-trip, and no dependency on the object being
+// publicly fetchable yet).
+//
+// generateAltText({ imageUrl }) — pass-through URL
+// generateAltText({ imageBase64, mimeType }) — inline bytes
+// + optional { name, track }
+//
+// Returns a trimmed string (≤160 chars) or null on any degraded path.
+export async function generateAltText({ imageUrl = null, imageBase64 = null, mimeType = 'image/png', name = null, track = null } = {}) {
+ if (!imageUrl && !imageBase64) return null;
+ if (!visionConfigured()) return null;
+
+ let result;
+ try {
+ result = await describeImage({
+ prompt: name ? `${PROMPT}\n\n(The avatar is named "${name}" — for context only; describe what you see.)` : PROMPT,
+ imageUrl,
+ imageBase64,
+ mimeType,
+ maxTokens: 60,
+ timeoutMs: TIMEOUT_MS,
+ track: { tool: 'avatar.alt-text', ...(track || {}) },
+ });
+ } catch {
+ return null;
+ }
+
+ return cleanAltText(result.text);
+}
+
+// Normalize a model reply into a clean alt string: strip wrapping quotes, a
+// leading "Image of"/"A picture of", collapse whitespace, hard-trim to MAX_LEN
+// at a word boundary. Returns null for an empty/degenerate reply.
+export function cleanAltText(raw) {
+ let t = String(raw || '')
+ .replace(/\s+/g, ' ')
+ .trim()
+ .replace(/^["'`]+|["'`]+$/g, '')
+ .replace(/^(an?\s+)?(image|picture|photo|illustration|render)\s+(of|showing)\s+/i, '')
+ .trim();
+ if (!t) return null;
+ if (t.length > MAX_LEN) {
+ const cut = t.slice(0, MAX_LEN);
+ const lastSpace = cut.lastIndexOf(' ');
+ t = (lastSpace > 40 ? cut.slice(0, lastSpace) : cut).replace(/[\s,;:.]+$/, '') + '…';
+ }
+ // Capitalize the first letter — these become standalone alt sentences.
+ return t.charAt(0).toUpperCase() + t.slice(1);
+}
diff --git a/api/_lib/avatars.js b/api/_lib/avatars.js
index 90f08eeac..013133a59 100644
--- a/api/_lib/avatars.js
+++ b/api/_lib/avatars.js
@@ -33,6 +33,7 @@ export async function listAvatars({
// listAvatars stays safe on prod before the migration runs.
const rows = await sql(
`select a.id, a.owner_id, a.slug, a.name, a.description, a.storage_key, a.thumbnail_key,
+ a.alt_text,
a.appearance, a.appearance_hash, a.baked_storage_key, a.baked_at,
a.size_bytes, a.content_type, a.source, a.visibility, a.tags, a.version,
a.created_at, a.updated_at, a.parent_avatar_id,
@@ -235,6 +236,7 @@ export async function searchPublicAvatars({ q, tag, limit = 24, cursor, withTota
// a deployed agent is preferred over an undeployed one for the same avatar.
const rows = await sql(
`select av.id, av.owner_id, av.slug, av.name, av.description, av.storage_key, av.thumbnail_key,
+ av.alt_text,
av.appearance, av.appearance_hash, av.baked_storage_key, av.baked_at,
av.size_bytes,
av.content_type, av.source, av.visibility, av.tags, av.view_count, av.created_at,
@@ -344,6 +346,9 @@ function decorate(row) {
visibility: row.visibility,
tags: row.tags || [],
version: row.version,
+ // Vision-generated accessibility description of the thumbnail (T4.1).
+ // Null until generated/backfilled; gallery falls back to the name.
+ alt_text: row.alt_text || null,
view_count: row.view_count == null ? 0 : Number(row.view_count),
created_at: row.created_at,
updated_at: row.updated_at,
diff --git a/api/_lib/forge-image-validate.js b/api/_lib/forge-image-validate.js
new file mode 100644
index 000000000..b54a5f6d8
--- /dev/null
+++ b/api/_lib/forge-image-validate.js
@@ -0,0 +1,104 @@
+// Forge image→3D input validation (Consumer 1 of the shared vision helper).
+//
+// An image→3D generation is expensive — it burns a rate-limited slot and, on
+// some backends, real credits. A photo that can't be reconstructed (a screenshot
+// of text, a cluttered scene with no single subject, a near-black blur) wastes
+// that slot and hands the user a garbage mesh. So before submit we ask a free
+// NIM vision lane one question: is this a usable single-subject reference?
+//
+// FAIL-OPEN IS THE CONTRACT. This is a guardrail, never a gate on the platform's
+// availability: if vision is unconfigured, times out, errors, or returns
+// unparseable junk, validateForgeImage returns { ok: true } and generation
+// proceeds exactly as it did before this check existed. A vision outage must
+// never block a paying user's generation (CLAUDE.md: never block on an outage).
+
+import { describeImageJson, visionConfigured } from './vision.js';
+
+// Tight budget — this sits in front of an interactive submit. ~1–2 s is typical
+// (probes/vision.md); 12 s is a generous ceiling before we fail open.
+const VALIDATION_TIMEOUT_MS = 12_000;
+
+const PROMPT =
+ 'You are the input checker for a photo→3D model generator. The user uploaded this ' +
+ 'image as the reference to reconstruct into a 3D object. Judge ONLY whether it is a ' +
+ 'usable reference: it should show ONE clear physical subject (an object, character, ' +
+ 'creature, or person) that could plausibly be turned into a 3D model.\n\n' +
+ 'Reply ONLY with compact JSON, no prose, in exactly this shape:\n' +
+ '{"usable":true|false,"subject":"<2-5 word description of the main subject, or empty>",' +
+ '"issue":"none"|"text_screenshot"|"multiple_subjects"|"no_clear_subject"|"too_dark_or_blurry"|"abstract_or_diagram"}\n\n' +
+ 'Mark usable=false ONLY when the image is genuinely unsuitable: a screenshot of text/UI ' +
+ '(text_screenshot), a busy scene with no single dominant subject (multiple_subjects), ' +
+ 'no recognizable object at all (no_clear_subject), too dark/blurry to make out ' +
+ '(too_dark_or_blurry), or an abstract pattern/chart/diagram (abstract_or_diagram). ' +
+ 'When in doubt, mark usable=true — a borderline photo still reconstructs.';
+
+// Designed, actionable copy per failure reason. Each tells the user what is wrong
+// AND how to fix it — never a bare "invalid image".
+const ISSUE_MESSAGES = {
+ text_screenshot:
+ 'That looks like a screenshot of text or an interface, not a photo of an object. ' +
+ 'Upload a clear picture of the single thing you want to turn into a 3D model.',
+ multiple_subjects:
+ 'That image has several things in it with no single clear subject. ' +
+ 'Crop to one object — or upload a photo where one subject fills most of the frame.',
+ no_clear_subject:
+ 'We couldn’t make out a clear object to reconstruct in that image. ' +
+ 'Upload a well-lit photo of one distinct subject against a simple background.',
+ too_dark_or_blurry:
+ 'That image is too dark or blurry to reconstruct cleanly. ' +
+ 'Retake it in good light, hold steady, and keep the subject in focus.',
+ abstract_or_diagram:
+ 'That looks like an abstract pattern, chart, or diagram rather than a physical object. ' +
+ 'Upload a photo of a real object, character, or creature instead.',
+};
+
+const FALLBACK_MESSAGE =
+ 'That image doesn’t look like a clear photo of a single object. ' +
+ 'Upload a well-lit picture of one subject for the best 3D result.';
+
+// Validate a single reference image URL before an image→3D submit.
+//
+// Returns one of:
+// { ok: true, skipped: 'unconfigured'|'error'|'bad_reply' } — fail-open: proceed
+// { ok: true, subject, provider } — vision says usable
+// { ok: false, issue, subject, message, provider } — vision says reject
+//
+// `track` is optional spend-ledger attribution passed straight to the helper.
+export async function validateForgeImage(imageUrl, { track = null } = {}) {
+ if (!visionConfigured()) return { ok: true, skipped: 'unconfigured' };
+
+ let result;
+ try {
+ result = await describeImageJson({
+ prompt: PROMPT,
+ imageUrl,
+ maxTokens: 120,
+ timeoutMs: VALIDATION_TIMEOUT_MS,
+ track: { tool: 'forge.validate', ...(track || {}) },
+ });
+ } catch {
+ // Outage, timeout, or unparseable reply — fail open, never block generation.
+ return { ok: true, skipped: 'error' };
+ }
+
+ const j = result.json;
+ if (!j || typeof j.usable !== 'boolean') return { ok: true, skipped: 'bad_reply' };
+
+ if (j.usable) {
+ return { ok: true, subject: cleanSubject(j.subject), provider: result.provider };
+ }
+
+ const issue = ISSUE_MESSAGES[j.issue] ? j.issue : 'no_clear_subject';
+ return {
+ ok: false,
+ issue,
+ subject: cleanSubject(j.subject),
+ message: ISSUE_MESSAGES[issue] || FALLBACK_MESSAGE,
+ provider: result.provider,
+ };
+}
+
+function cleanSubject(s) {
+ const t = String(s || '').trim();
+ return t.length > 0 && t.length <= 80 ? t : null;
+}
diff --git a/api/_lib/migrations/2026-06-11-avatar-alt-text.sql b/api/_lib/migrations/2026-06-11-avatar-alt-text.sql
new file mode 100644
index 000000000..c91ef8aa2
--- /dev/null
+++ b/api/_lib/migrations/2026-06-11-avatar-alt-text.sql
@@ -0,0 +1,11 @@
+-- Avatar gallery alt text (T4.1, Consumer 3 of the shared vision helper).
+--
+-- Accessibility is not optional (CLAUDE.md): every gallery image needs a
+-- meaningful alt attribute, not just the avatar's name. This column stores a
+-- vision-generated description of the avatar's thumbnail, written on thumbnail
+-- upload and backfilled for existing rows by scripts/backfill-avatar-alt-text.mjs.
+--
+-- Nullable + additive: a null means "not generated yet"; the gallery falls back
+-- to the avatar name, so this never breaks rendering before the backfill runs.
+
+alter table avatars add column if not exists alt_text text;
diff --git a/api/_lib/schema.sql b/api/_lib/schema.sql
index 478667020..a6fd66250 100644
--- a/api/_lib/schema.sql
+++ b/api/_lib/schema.sql
@@ -119,6 +119,9 @@ create index if not exists avatars_tags_idx on avatars using gin(tags);
-- Additive migrations for avatars columns added after initial deployment.
alter table avatars add column if not exists storage_mode jsonb;
alter table avatars add column if not exists parent_avatar_id uuid references avatars(id) on delete set null;
+-- Vision-generated accessibility description of the thumbnail (T4.1). Null = not
+-- generated yet; the gallery falls back to the avatar name.
+alter table avatars add column if not exists alt_text text;
-- ── mocap_clips (recorded face / pose / hand motion clips) ──────────────────
-- See api/_lib/migrations/2026-05-24-mocap-clips.sql for the full schema +
diff --git a/api/_lib/vision.js b/api/_lib/vision.js
new file mode 100644
index 000000000..b5815566e
--- /dev/null
+++ b/api/_lib/vision.js
@@ -0,0 +1,257 @@
+// Canonical server-side image understanding (VLM completion) + the platform's
+// vision provider policy. The image-side twin of api/_lib/llm.js — same
+// free-first doctrine, same spend-ledger discipline, so vision never becomes a
+// per-endpoint reinvention that drifts out of policy.
+//
+// Policy (identical to llm.js — read that file's header for the rationale):
+//
+// • FREE NIM VISION LANES FIRST, ALWAYS. NVIDIA NIM hosts several VLMs on the
+// OpenAI-compatible chat host (integrate.api.nvidia.com) at zero marginal
+// cost to the platform. They lead every chain, tried in order, and every
+// consumer must survive on them alone.
+//
+// • Paid vision-capable backstop LAST, automatically. When OPENAI_API_KEY is
+// configured, gpt-4o-mini (vision-capable) is appended to the tail so a
+// request that exhausted the free lanes still succeeds. It never leads, and
+// no consumer hard-fails when it is absent.
+//
+// • NOTHING HARD-FAILS ON A VISION OUTAGE. describeImage throws on total
+// failure, but every consumer is required to treat that as "skip the
+// vision-derived enhancement", never as an error the end user sees. See
+// visionConfigured() for the gate, and each consumer's degraded path.
+//
+// Image input — pass EITHER an http(s) URL (default; the model server fetches it
+// — used for first-party R2 URLs and already-validated claim image URLs) OR a
+// base64 blob + mimeType (inlined as a data URI). Both verified live against
+// every NIM lane; see tasks/nvidia-nim/probes/vision.md.
+
+import { env } from './env.js';
+import { recordEvent } from './usage.js';
+import { costMicroUsd } from './llm-pricing.js';
+
+// Free NIM vision lanes, in order. nemotron-nano carries the smallest image
+// token footprint (~281 prompt tokens for a tiny image vs ~1600 for llama-90B);
+// llama-3.2-11b is a different model family, so its failure modes are
+// independent — a real second lane, not a re-roll of the first.
+const NVIDIA_VISION_MODELS = [
+ 'nvidia/nemotron-nano-12b-v2-vl',
+ 'meta/llama-3.2-11b-vision-instruct',
+];
+// Paid last-resort tail. gpt-4o-mini is vision-capable and already priced in
+// llm-pricing.js, keeping the backstop cheap and the spend ledger truthful.
+const OPENAI_VISION_MODEL = 'gpt-4o-mini';
+
+// Thrown when no vision provider is available at all. Carries an HTTP status so
+// a handler that *chose* to surface it can return 503 — but consumers should
+// generally catch it and degrade silently instead.
+export class VisionUnavailableError extends Error {
+ constructor(message = 'No vision provider available. Configure NVIDIA_API_KEY (free) or OPENAI_API_KEY (paid backstop).') {
+ super(message);
+ this.name = 'VisionUnavailableError';
+ this.code = 'vision_unavailable';
+ this.status = 503;
+ }
+}
+
+// One OpenAI-compatible vision provider entry. The multimodal user message is
+// the only shape difference from llm.js's text providers.
+function openaiCompatVisionProvider({ name, key, url, model }) {
+ return {
+ name,
+ model,
+ url,
+ headers: { 'content-type': 'application/json', authorization: `Bearer ${key}` },
+ buildBody: (system, parts, maxTokens) => {
+ const messages = [];
+ if (system) messages.push({ role: 'system', content: system });
+ messages.push({ role: 'user', content: parts });
+ return { model, max_tokens: maxTokens, temperature: 0, messages };
+ },
+ extractText: (r) => r.choices?.[0]?.message?.content || '',
+ extractUsage: (r) => ({ input: r.usage?.prompt_tokens ?? 0, output: r.usage?.completion_tokens ?? 0 }),
+ };
+}
+
+// Build the ordered vision provider chain: free NIM lanes first, paid OpenAI
+// backstop appended last and only when its key is set.
+function visionChain() {
+ const chain = [];
+ if (env.NVIDIA_API_KEY) {
+ for (const model of NVIDIA_VISION_MODELS) {
+ chain.push(openaiCompatVisionProvider({
+ name: 'nvidia',
+ key: env.NVIDIA_API_KEY,
+ url: 'https://integrate.api.nvidia.com/v1/chat/completions',
+ model,
+ }));
+ }
+ }
+ if (env.OPENAI_API_KEY) {
+ chain.push(openaiCompatVisionProvider({
+ name: 'openai',
+ key: env.OPENAI_API_KEY,
+ url: 'https://api.openai.com/v1/chat/completions',
+ model: OPENAI_VISION_MODEL,
+ }));
+ }
+ return chain;
+}
+
+// True when at least one vision provider can serve a request. Use to gate a
+// consumer's vision-derived enhancement WITHOUT making the doomed upstream call —
+// this is the fail-open switch (forge validation, alt text, image evidence all
+// check it first).
+export function visionConfigured() {
+ return visionChain().length > 0;
+}
+
+// Normalize a caller's image spec into one OpenAI `image_url` content part.
+// Accepts { imageUrl } (pass-through) or { imageBase64, mimeType } (data URI).
+function imagePart({ imageUrl, imageBase64, mimeType = 'image/jpeg' }) {
+ if (imageUrl) return { type: 'image_url', image_url: { url: imageUrl } };
+ if (imageBase64) {
+ const raw = imageBase64.startsWith('data:') ? imageBase64 : `data:${mimeType};base64,${imageBase64}`;
+ return { type: 'image_url', image_url: { url: raw } };
+ }
+ throw Object.assign(new Error('describeImage requires imageUrl or imageBase64'), {
+ status: 400,
+ code: 'no_image',
+ });
+}
+
+// Map a non-2xx vision response to a normalized error code, mirroring the other
+// NIM provider contracts (probes/vision.md error table). Folded into lastErr so
+// the final throw after the whole chain fails carries a meaningful code.
+function normalizeStatus(status) {
+ if (status === 401 || status === 403) return 'invalid_key';
+ if (status === 402) return 'insufficient_credits';
+ if (status === 429) return 'rate_limited';
+ if (status >= 500) return 'provider_error';
+ return 'provider_error';
+}
+
+// Describe / analyze one image against a prompt, against the first available
+// provider, falling over to the next on transport or non-2xx errors.
+//
+// { prompt, imageUrl? , imageBase64?, mimeType?, system?, maxTokens?,
+// timeoutMs?, track? }
+//
+// `timeoutMs` bounds EACH provider attempt so a hung free lane can't stall a
+// serverless function — the next lane is tried instead. `track` is the same
+// optional spend-ledger attribution as llmComplete; a successful call records a
+// kind:'vision' usage event with provider/model/tokens/cost (free NIM prices to
+// 0 in llm-pricing.js).
+//
+// Returns { text, provider, model, usage:{input,output}, raw }.
+// Throws VisionUnavailableError when nothing is configured, or the last upstream
+// error (with .status = 502, .code = normalized) when every provider failed.
+export async function describeImage({
+ prompt,
+ imageUrl = null,
+ imageBase64 = null,
+ mimeType = 'image/jpeg',
+ system = null,
+ maxTokens = 512,
+ timeoutMs = 20_000,
+ track = null,
+}) {
+ const chain = visionChain();
+ if (!chain.length) throw new VisionUnavailableError();
+
+ const parts = [
+ { type: 'text', text: prompt },
+ imagePart({ imageUrl, imageBase64, mimeType }),
+ ];
+
+ let lastErr;
+ for (const p of chain) {
+ const startedAt = Date.now();
+ let upstream;
+ try {
+ upstream = await fetch(p.url, {
+ method: 'POST',
+ headers: p.headers,
+ body: JSON.stringify(p.buildBody(system, parts, maxTokens)),
+ signal: AbortSignal.timeout(timeoutMs),
+ });
+ } catch (e) {
+ lastErr = Object.assign(new Error(`${p.name} vision unreachable: ${e.message}`), { status: 502, code: 'provider_unreachable' });
+ continue;
+ }
+ if (!upstream.ok) {
+ const body = await upstream.text().catch(() => '');
+ lastErr = Object.assign(
+ new Error(`${p.name} vision ${upstream.status}: ${body.slice(0, 200)}`),
+ { status: 502, code: normalizeStatus(upstream.status) },
+ );
+ continue;
+ }
+ const data = await upstream.json();
+ const usage = p.extractUsage(data);
+ recordVisionSpend(p, usage, Date.now() - startedAt, track);
+ return {
+ text: (p.extractText(data) || '').trim(),
+ provider: p.name,
+ model: p.model,
+ usage,
+ raw: data,
+ };
+ }
+ throw lastErr || new VisionUnavailableError();
+}
+
+// Convenience: describeImage + tolerant JSON parse of the reply. VLMs reliably
+// honor "reply ONLY JSON" (probes/vision.md) but may wrap it in a ```json fence
+// or a trailing newline; this strips both. Returns the parsed object plus the
+// provider metadata, or throws if the model returned unparseable text (the
+// caller's degraded path handles that exactly like a vision outage).
+export async function describeImageJson(opts) {
+ const result = await describeImage(opts);
+ return { ...result, json: parseJsonLoose(result.text) };
+}
+
+// Strip a ```json fence / stray prose and parse the first JSON object/array in
+// the text. Throws a normalized error on failure so callers treat it as a
+// degraded vision result.
+export function parseJsonLoose(text) {
+ const trimmed = String(text || '').trim();
+ const fenced = trimmed.replace(/^```(?:json)?\s*/i, '').replace(/\s*```$/, '');
+ const start = fenced.search(/[[{]/);
+ const candidate = start >= 0 ? fenced.slice(start) : fenced;
+ try {
+ return JSON.parse(candidate);
+ } catch {
+ // Last resort: grab the outermost {...} or [...] span.
+ const m = candidate.match(/[{[][\s\S]*[}\]]/);
+ if (m) {
+ try {
+ return JSON.parse(m[0]);
+ } catch {
+ /* fall through */
+ }
+ }
+ throw Object.assign(new Error('vision reply was not valid JSON'), { status: 502, code: 'vision_bad_json' });
+ }
+}
+
+// Fire-and-forget spend ledger write for one vision call. Free NIM prices to 0;
+// the paid OpenAI backstop prices via llm-pricing.js. Never throws.
+function recordVisionSpend(provider, usage, latencyMs, track) {
+ const input = usage?.input ?? 0;
+ const output = usage?.output ?? 0;
+ recordEvent({
+ kind: 'vision',
+ provider: provider.name,
+ model: provider.model,
+ inputTokens: input,
+ outputTokens: output,
+ costMicroUsd: costMicroUsd({ provider: provider.name, model: provider.model, input, output }),
+ latencyMs,
+ userId: track?.userId ?? null,
+ agentId: track?.agentId ?? null,
+ avatarId: track?.avatarId ?? null,
+ clientId: track?.clientId ?? null,
+ apiKeyId: track?.apiKeyId ?? null,
+ tool: track?.tool ?? null,
+ });
+}
diff --git a/api/avatars/thumbnail.js b/api/avatars/thumbnail.js
index 57688ee41..20b51e596 100644
--- a/api/avatars/thumbnail.js
+++ b/api/avatars/thumbnail.js
@@ -11,6 +11,7 @@ import { getSessionUser, authenticateBearer, extractBearer, hasScope } from '../
import { putObject, deleteObject, publicUrl } from '../_lib/r2.js';
import { cors, error, json, method, readJson, wrap, rateLimited } from '../_lib/http.js';
import { limits, clientIp } from '../_lib/rate-limit.js';
+import { generateAltText } from '../_lib/avatar-alt-text.js';
const MAX_PNG_BYTES = 1_500_000; // 1.5 MB max — generous for 1024² posters.
const PNG_HEADER = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
@@ -54,7 +55,7 @@ export default wrap(async (req, res) => {
// Look up the avatar; permit owner OR admin (admins are needed to backfill
// thumbnails for legacy avatars whose owners may be inactive).
const [row] = await sql`
- SELECT a.id, a.owner_id, a.thumbnail_key, u.is_admin
+ SELECT a.id, a.owner_id, a.name, a.thumbnail_key, u.is_admin
FROM avatars a
LEFT JOIN users u ON u.id = ${auth.userId}
WHERE a.id = ${avatarId} AND a.deleted_at IS NULL
@@ -84,6 +85,26 @@ export default wrap(async (req, res) => {
WHERE id = ${avatarId}
`;
+ // Generate accessibility alt text from the poster we just received
+ // (Consumer 3). Fire-and-forget on the buffer we already hold — no extra
+ // fetch, no dependency on the object being publicly reachable yet, and it
+ // never delays or fails the upload response (fail-open per generateAltText).
+ queueMicrotask(async () => {
+ try {
+ const altText = await generateAltText({
+ imageBase64: buf.toString('base64'),
+ mimeType: 'image/png',
+ name: row.name,
+ track: { userId: auth.userId, avatarId },
+ });
+ if (altText) {
+ await sql`UPDATE avatars SET alt_text = ${altText} WHERE id = ${avatarId}`;
+ }
+ } catch (e) {
+ console.warn('[avatar-alt-text] generation failed', e?.message);
+ }
+ });
+
return json(res, 200, {
data: {
avatar_id: avatarId,
diff --git a/api/forge.js b/api/forge.js
index d7c8e9c42..74f9a8d23 100644
--- a/api/forge.js
+++ b/api/forge.js
@@ -47,6 +47,7 @@ import {
buildCatalog,
} from './_lib/forge-tiers.js';
import { resolveProviderKey } from './_lib/forge-provider-key.js';
+import { validateForgeImage } from './_lib/forge-image-validate.js';
import { encodeJobToken, decodeJobToken } from './_lib/forge-job-token.js';
import {
hashClient,
@@ -185,6 +186,26 @@ async function startJob(req, res) {
message: 'Optional guidance prompt must be 1000 characters or fewer.',
});
}
+
+ // Vision pre-check (Consumer 1 of the shared vision helper): catch a photo
+ // that can't be reconstructed BEFORE it burns a generation slot. Validates
+ // the primary view only. Fail-open — a vision outage returns ok:true and we
+ // proceed exactly as before (validateForgeImage owns that contract). The
+ // user can override a verdict they disagree with via `skip_validation:true`
+ // (e.g. a stylized reference our checker is too cautious about).
+ if (body?.skip_validation !== true) {
+ const check = await validateForgeImage(imageUrls[0], { track: { clientId: clientKeyFrom(req) } });
+ if (!check.ok) {
+ return json(res, 422, {
+ error: 'image_not_usable',
+ issue: check.issue,
+ message: check.message,
+ subject: check.subject || null,
+ // Surfaced so the UI can offer a one-click "generate anyway".
+ override: { field: 'skip_validation', value: true },
+ });
+ }
+ }
} else if (prompt.length < 3 || prompt.length > 1000) {
return json(res, 400, {
error: 'invalid_prompt',
diff --git a/api/x402/fact-check.js b/api/x402/fact-check.js
index cd1594479..9b805988a 100644
--- a/api/x402/fact-check.js
+++ b/api/x402/fact-check.js
@@ -16,6 +16,7 @@ import { withService } from '../_lib/x402/bazaar-helpers.js';
import { generateSearchQueries, analyzeResults } from '../../agents/fact-checker/src/llm-verdict.js';
import { searchAll } from '../../agents/fact-checker/src/search-sources.js';
import { authorityScore } from '../../agents/fact-checker/src/source-authority.js';
+import { imageEvidence } from '../../agents/fact-checker/src/image-evidence.js';
const ROUTE = '/api/x402/fact-check';
const CACHE_TTL_SECONDS = 7 * 24 * 60 * 60; // 7 days
@@ -67,11 +68,13 @@ async function redisSet(key, value, ttlSeconds) {
// ── Cache key ─────────────────────────────────────────────────────────────────
-function cacheKey(claim, strictness) {
+function cacheKey(claim, strictness, imageUrl) {
const hash = createHash('sha256')
- .update(JSON.stringify({ claim, strictness }))
+ .update(JSON.stringify({ claim, strictness, imageUrl: imageUrl || null }))
.digest('hex');
- return `fact-check:v1:${hash}`;
+ // v2: the key now folds in any attached image so an image-backed check never
+ // serves a stale image-free verdict (or vice versa) from the v1 cache.
+ return `fact-check:v2:${hash}`;
}
// ── Verdict logic ─────────────────────────────────────────────────────────────
@@ -109,10 +112,18 @@ function computeVerdict(sources) {
// ── Core fact-check pipeline ───────────────────────────────────────────────────
-async function runFactCheck(claim, strictness) {
+async function runFactCheck(claim, strictness, imageUrl = null) {
let totalTokens = 0;
let searchCalls = 0;
+ // 0. Image evidence (Consumer 2 of the shared vision helper) runs in parallel
+ // with the web pipeline — a free NIM vision lane describes/transcribes the
+ // attached image and judges its stance. Fail-open: null when no image is
+ // attached or vision is unavailable, so the check never depends on it.
+ const imageEvidencePromise = imageUrl
+ ? imageEvidence(claim, imageUrl).catch(() => null)
+ : Promise.resolve(null);
+
// 1. Generate 3 search queries.
const { queries, tokens: queryTokens } = await generateSearchQueries(claim);
totalTokens += queryTokens;
@@ -124,7 +135,11 @@ async function runFactCheck(claim, strictness) {
// 3. Take top 5 unique results.
const top5 = rawResults.slice(0, 5);
- if (top5.length === 0) {
+ const imageSource = await imageEvidencePromise;
+
+ // A claim can now be checkable on image evidence alone — only bail when there
+ // is neither a web result nor a usable image.
+ if (top5.length === 0 && !imageSource) {
const err = new Error('No search results found for the given claim');
err.status = 422;
err.code = 'no_results';
@@ -132,10 +147,13 @@ async function runFactCheck(claim, strictness) {
}
// 4. LLM stance extraction for top 5.
- const { analyses, tokens: analysisTokens } = await analyzeResults(claim, top5);
+ const { analyses, tokens: analysisTokens } =
+ top5.length > 0 ? await analyzeResults(claim, top5) : { analyses: [], tokens: 0 };
totalTokens += analysisTokens;
- // 5. Build source objects with authority scores.
+ // 5. Build source objects with authority scores. The image evidence is folded
+ // in as one additional weighted source so it flows through the same
+ // strictness adjustment and weighted verdict as web sources.
const sources = top5.map((r, i) => {
const authority = authorityScore(r.url);
const analysis = analyses[i] || { excerpt: '', stance: 'neutral' };
@@ -148,6 +166,12 @@ async function runFactCheck(claim, strictness) {
retrievedAt: new Date().toISOString(),
};
});
+ if (imageSource) {
+ // Strip the helper's diagnostic fields from the verdict-facing source; they
+ // are surfaced separately on the response as `imageEvidence`.
+ const { description: _d, visibleText: _v, reason: _r, provider: _p, kind: _k, ...verdictSource } = imageSource;
+ sources.push(verdictSource);
+ }
// 6. Adjust weights by strictness.
// high: penalize low-authority sources more; low: accept everything equally.
@@ -189,7 +213,21 @@ async function runFactCheck(claim, strictness) {
)
.digest('hex');
- return { verdict, confidence, claim, strictness, sources, costBreakdown, attestation };
+ const result = { verdict, confidence, claim, strictness, sources, costBreakdown, attestation };
+ // Surface the image analysis separately so a caller sees what the vision lane
+ // read from the attachment (description, transcribed text, stance) without
+ // digging it out of the weighted source list.
+ if (imageSource) {
+ result.imageEvidence = {
+ url: imageSource.url,
+ description: imageSource.description,
+ visibleText: imageSource.visibleText,
+ stance: imageSource.stance,
+ reason: imageSource.reason,
+ provider: imageSource.provider,
+ };
+ }
+ return result;
}
// ── Bazaar schema ──────────────────────────────────────────────────────────────
@@ -225,6 +263,15 @@ const INPUT_SCHEMA = {
description:
'high: penalizes low-authority sources. medium: default. low: accepts all sources equally.',
},
+ imageUrl: {
+ type: 'string',
+ format: 'uri',
+ maxLength: 2048,
+ description:
+ 'Optional http(s) image attached as evidence (a chart, screenshot, label, or photo). ' +
+ 'A vision model describes it, transcribes any visible text, and weighs its stance ' +
+ 'toward the claim alongside web sources. Ignored if vision is unavailable.',
+ },
},
};
@@ -280,6 +327,18 @@ const OUTPUT_SCHEMA = {
totalUsdc: { type: 'string' },
},
},
+ imageEvidence: {
+ type: 'object',
+ description: 'Present only when an imageUrl was supplied and vision was available.',
+ properties: {
+ url: { type: 'string' },
+ description: { type: ['string', 'null'] },
+ visibleText: { type: ['string', 'null'] },
+ stance: { type: 'string', enum: ['supports', 'contradicts', 'neutral'] },
+ reason: { type: ['string', 'null'] },
+ provider: { type: 'string' },
+ },
+ },
cachedAt: { type: 'string', format: 'date-time' },
attestation: { type: 'string' },
},
@@ -354,16 +413,29 @@ export default paidEndpoint({
? body.strictness
: 'medium';
+ // Optional image attachment — validated at the boundary as an http(s) URL.
+ let imageUrl = null;
+ if (body?.imageUrl != null) {
+ imageUrl = String(body.imageUrl).trim();
+ if (imageUrl && (!/^https?:\/\//i.test(imageUrl) || imageUrl.length > 2048)) {
+ const err = new Error('"imageUrl" must be an http(s) URL under 2048 characters');
+ err.status = 400;
+ err.code = 'invalid_image_url';
+ throw err;
+ }
+ if (!imageUrl) imageUrl = null;
+ }
+
// Idempotency cache — 7-day TTL. Shape-check the hit: records written by
// the old envelope-body redisSet parse to `{value, ex}` and must be
// treated as misses, not served as verdicts.
- const key = cacheKey(claim, strictness);
+ const key = cacheKey(claim, strictness, imageUrl);
const cached = await redisGet(key);
if (cached && typeof cached.verdict === 'string') {
return { ...cached, cachedAt: cached.cachedAt || new Date().toISOString() };
}
- const result = await runFactCheck(claim, strictness);
+ const result = await runFactCheck(claim, strictness, imageUrl);
// Persist to cache (fire-and-forget on failure).
await redisSet(key, result, CACHE_TTL_SECONDS);
diff --git a/data/changelog.json b/data/changelog.json
index 61d620b95..458710c07 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-11",
+ "title": "Light theme is here — flip the whole site with one tap",
+ "summary": "three.ws now ships a light theme alongside the signature dark one. A new sun/moon toggle sits in the top nav on every page: tap it to switch instantly, and your choice sticks across pages, sessions, and other open tabs. New here, or set to 'Auto' in Settings → Appearance? The site follows your device's light/dark preference automatically. The theme is applied before the page paints, so there's no white flash on load, and the dashboard appearance picker (Dark / Light / Auto) now applies live instead of just saving for later. Dark remains the brand default — nothing changes unless you want it to.",
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
{
"date": "2026-06-11",
"title": "A safety net on open, sign-in-free chat — without blocking real conversations",
diff --git a/docs/pumpfun-program/AUDIT-2026-06-11.md b/docs/pumpfun-program/AUDIT-2026-06-11.md
index 71f4f3594..8070364a1 100644
--- a/docs/pumpfun-program/AUDIT-2026-06-11.md
+++ b/docs/pumpfun-program/AUDIT-2026-06-11.md
@@ -236,16 +236,19 @@ launch + confirm) is quote-agnostic. This pass materially hardened that support:
**all passed** (44 across the broader suites).
- **Syntax/imports:** `node --check` clean on every edited file; runtime `import()` of
`api/pump/[action].js`, `api/agents/pumpfun/[action].js`, and the new lib succeeds.
-- **Build:** full `npm run build` was SIGTERM'd twice mid-run by resource contention
- with concurrently running agents in this shared workspace (exit 143, not a compile
- error). Targeted verification instead: an esbuild bundle of the two edited `src/`
- modules succeeds, and vitest (which runs the same Vite transform pipeline) imports
- every changed module cleanly. The `api/` files are serverless functions outside the
+- **Build:** full `npm run build` now completes **green** (exit 0, ~1m26s; verified in a
+ later, less-contended re-run after the original pass was SIGTERM'd twice by concurrent
+ agents in this shared workspace). The `api/` files are serverless functions outside the
Vite build.
-- **Prettier:** the two new files conform. The six edited pre-existing files fail
- `prettier --check` **before and after** this change (the committed style predates the
- current `.prettierrc`, as recorded in the 2026-06-08 audit) — edits match the
- surrounding style; no whole-file reformat.
+- **Typecheck:** `npm run typecheck` (`tsc -p jsconfig.json`) passes clean (exit 0) — the
+ `// @ts-check` ratchet that gates every Vercel deploy is satisfied.
+- **Prettier:** the new files (`pump-trade-args.js`, `pump-trade-args.test.js`) and the
+ edited `api/` files (`api/pump/[action].js`, `api/agents/pumpfun/[action].js`,
+ `api/pump-fun-mcp.js`) pass `prettier --check`. Two edited `src/` files
+ (`src/agent-skills-pumpfun.js`, `src/pump/pump-swap-quote.js`) warn — confirmed failing
+ `prettier --check` at the parent commit `d2fb19c3~1` **before** this change too, i.e.
+ pre-existing whole-file style that predates the current `.prettierrc` (as recorded in
+ the 2026-06-08 audit). The v2 edits match the surrounding style; no whole-file reformat.
- **On-chain test:** **not executed** — no funded devnet signer in this environment
(`SOLANA_RPC_URL_DEVNET` unset). Instruction building is verified offline against the
vendored IDL via the new conformance tests.
diff --git a/package.json b/package.json
index 3c7390d0f..09ac3e1b9 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,7 @@
"audit:web": "node scripts/page-audit.mjs",
"snapshot": "node scripts/page-snapshot.mjs",
"build:news": "node scripts/build-news.mjs",
- "prebuild": "(node scripts/build-news.mjs & node scripts/build-skill-metadata.mjs & node scripts/build-local-skill-packs.mjs & npm run build:club-assets & wait) && node scripts/inject-blog-seo.mjs --write && (node scripts/build-page-index.mjs && node scripts/audit-page-index.mjs && node scripts/audit-empty-handlers.mjs) && node scripts/inject-seo-meta.mjs --write",
+ "prebuild": "(node scripts/build-news.mjs & node scripts/build-skill-metadata.mjs & node scripts/build-local-skill-packs.mjs & npm run build:club-assets & wait) && node scripts/inject-blog-seo.mjs --write && (node scripts/build-page-index.mjs && node scripts/audit-page-index.mjs && node scripts/audit-empty-handlers.mjs) && node scripts/inject-seo-meta.mjs --write && node scripts/inject-theme-boot.mjs --write",
"seo:meta": "node scripts/inject-blog-seo.mjs --write && node scripts/build-page-index.mjs && node scripts/inject-seo-meta.mjs --write",
"build": "NODE_OPTIONS='--no-deprecation --max-old-space-size=6144' vite build && node scripts/strip-sw-from-embeds.mjs",
"build:wasm": "PATH=\"$HOME/.cargo/bin:$PATH\" RUSTFLAGS='-C target-feature=+simd128' wasm-pack build crates/vanity-grinder --target web --release --out-dir ../../src/solana/vanity/wasm && printf '%s\\n' '# wasm-pack writes a default `*` gitignore that excludes everything.' '# Override it: the generated files in this directory ARE checked in so the' '# app builds without requiring a Rust toolchain at install time. Run' '# `npm run build:wasm` after editing /crates/vanity-grinder/src/lib.rs to' '# refresh these artifacts.' '!*' > src/solana/vanity/wasm/.gitignore",
diff --git a/pages/a-edit.html b/pages/a-edit.html
index 7117885e6..202d9fd4d 100644
--- a/pages/a-edit.html
+++ b/pages/a-edit.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Edit Agent — three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/a-me.html b/pages/a-me.html
index 2083ad4c2..44d82a45f 100644
--- a/pages/a-me.html
+++ b/pages/a-me.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>My Agents · three.ws</title>
diff --git a/pages/agent-detail.html b/pages/agent-detail.html
index ccea1c120..d900eff64 100644
--- a/pages/agent-detail.html
+++ b/pages/agent-detail.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Agent · three.ws</title>
diff --git a/pages/agent-economy.html b/pages/agent-economy.html
index 0522fefc3..8dd1cf1bd 100644
--- a/pages/agent-economy.html
+++ b/pages/agent-economy.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Agent Economy — three.ws live demo</title>
diff --git a/pages/agent-edit.html b/pages/agent-edit.html
index e8f22f230..741415337 100644
--- a/pages/agent-edit.html
+++ b/pages/agent-edit.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Edit Agent — three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/agent-exchange.html b/pages/agent-exchange.html
index 0496cda84..f75f00cf0 100644
--- a/pages/agent-exchange.html
+++ b/pages/agent-exchange.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover" />
<title>Agent Exchange — 3D AI agents paying each other in real time · three.ws</title>
diff --git a/pages/agent-trade.html b/pages/agent-trade.html
index d52e68a30..50d01017e 100644
--- a/pages/agent-trade.html
+++ b/pages/agent-trade.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/app-demo.html b/pages/app-demo.html
index 8ebb919b4..42d5b5cf2 100644
--- a/pages/app-demo.html
+++ b/pages/app-demo.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>three.ws — Viewer (studio skin demo)</title>
diff --git a/pages/app-next.html b/pages/app-next.html
index cc2035339..b89ecd4c3 100644
--- a/pages/app-next.html
+++ b/pages/app-next.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>three.ws — AI-Powered 3D Model Viewer</title>
diff --git a/pages/app.html b/pages/app.html
index 954dcdf7e..b43da4e23 100644
--- a/pages/app.html
+++ b/pages/app.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>three.ws — AI-Powered 3D Model Viewer</title>
diff --git a/pages/ar.html b/pages/ar.html
index 3aaa2b930..f74e12d37 100644
--- a/pages/ar.html
+++ b/pages/ar.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="#000000" />
diff --git a/pages/autopilot.html b/pages/autopilot.html
index 28c2f953a..3e6a8711a 100644
--- a/pages/autopilot.html
+++ b/pages/autopilot.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Coin Autopilot — three.ws</title>
diff --git a/pages/avatar-edit.html b/pages/avatar-edit.html
index 83d9e2c17..33f69a6e1 100644
--- a/pages/avatar-edit.html
+++ b/pages/avatar-edit.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Customize Avatar · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/avatar-page.html b/pages/avatar-page.html
index 64b9b2a2c..59a993e59 100644
--- a/pages/avatar-page.html
+++ b/pages/avatar-page.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Avatar Studio · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/avatar-sdk.html b/pages/avatar-sdk.html
index 0fadbfcdf..4530eba53 100644
--- a/pages/avatar-sdk.html
+++ b/pages/avatar-sdk.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Avatar SDK — @three-ws/avatar · three.ws</title>
diff --git a/pages/avatar-studio-demo.html b/pages/avatar-studio-demo.html
index 566902f4e..333864b84 100644
--- a/pages/avatar-studio-demo.html
+++ b/pages/avatar-studio-demo.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Avatar Studio · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/avatar-studio.html b/pages/avatar-studio.html
index 53f07336a..2a8c4b266 100644
--- a/pages/avatar-studio.html
+++ b/pages/avatar-studio.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Avatar Studio · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/avatar-wallet-chat.html b/pages/avatar-wallet-chat.html
index b640afae8..eded8e6ab 100644
--- a/pages/avatar-wallet-chat.html
+++ b/pages/avatar-wallet-chat.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/bounties.html b/pages/bounties.html
index c78e2a7ce..9ac0da133 100644
--- a/pages/bounties.html
+++ b/pages/bounties.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/bounty.html b/pages/bounty.html
index b46a402f2..e90897c69 100644
--- a/pages/bounty.html
+++ b/pages/bounty.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/brain.html b/pages/brain.html
index 95efa9bc3..b68cc715f 100644
--- a/pages/brain.html
+++ b/pages/brain.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/bulk-launch.html b/pages/bulk-launch.html
index f670a1ac3..68f11b535 100644
--- a/pages/bulk-launch.html
+++ b/pages/bulk-launch.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/city.html b/pages/city.html
index 1c8784e8b..edb560706 100644
--- a/pages/city.html
+++ b/pages/city.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>City · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
diff --git a/pages/club.html b/pages/club.html
index 018b4236e..c0ccf8409 100644
--- a/pages/club.html
+++ b/pages/club.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Pole Club · three.ws</title>
diff --git a/pages/coin3d.html b/pages/coin3d.html
index e1978119a..67fbe35d1 100644
--- a/pages/coin3d.html
+++ b/pages/coin3d.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/communities.html b/pages/communities.html
index cbc46ccee..96612d74e 100644
--- a/pages/communities.html
+++ b/pages/communities.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/community.html b/pages/community.html
index 80eeabcad..dc59b27c7 100644
--- a/pages/community.html
+++ b/pages/community.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Community — three.ws</title>
diff --git a/pages/constellation.html b/pages/constellation.html
index cec108976..6fa38b58d 100644
--- a/pages/constellation.html
+++ b/pages/constellation.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover" />
<title>watsonx Constellation — live tokens in IBM Granite embedding space · three.ws</title>
diff --git a/pages/create-agent.html b/pages/create-agent.html
index 1772b1867..331bf24c0 100644
--- a/pages/create-agent.html
+++ b/pages/create-agent.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Create an agent · three.ws</title>
diff --git a/pages/create-character.html b/pages/create-character.html
index 799f0b5c3..d4567ecb9 100644
--- a/pages/create-character.html
+++ b/pages/create-character.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
<title>Character creator · three.ws</title>
diff --git a/pages/create-prompt.html b/pages/create-prompt.html
index 5222536f4..674abda6e 100644
--- a/pages/create-prompt.html
+++ b/pages/create-prompt.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Describe it to 3D · three.ws</title>
diff --git a/pages/create-review.html b/pages/create-review.html
index fede00e00..eb0e20482 100644
--- a/pages/create-review.html
+++ b/pages/create-review.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Preview your avatar · three.ws</title>
diff --git a/pages/create-selfie.html b/pages/create-selfie.html
index ecd18b7bd..01742cab7 100644
--- a/pages/create-selfie.html
+++ b/pages/create-selfie.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Selfie to avatar · three.ws</title>
diff --git a/pages/create.html b/pages/create.html
index c0fe82ca2..0217c63a8 100644
--- a/pages/create.html
+++ b/pages/create.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Create avatar · three.ws</title>
diff --git a/pages/creating.html b/pages/creating.html
index 045af0a39..60845e600 100644
--- a/pages/creating.html
+++ b/pages/creating.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Your three.ws avatar is ready</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/demo-economy.html b/pages/demo-economy.html
index d40909966..07f810c99 100644
--- a/pages/demo-economy.html
+++ b/pages/demo-economy.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Agent Economy — two AI agents pay each other on-chain · three.ws</title>
diff --git a/pages/extension-privacy.html b/pages/extension-privacy.html
index 895553841..2d140f98e 100644
--- a/pages/extension-privacy.html
+++ b/pages/extension-privacy.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/extension-terms.html b/pages/extension-terms.html
index 2e7bb2c97..82c102e70 100644
--- a/pages/extension-terms.html
+++ b/pages/extension-terms.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/fact-checker.html b/pages/fact-checker.html
index a70ce74ba..867866113 100644
--- a/pages/fact-checker.html
+++ b/pages/fact-checker.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Real-Time Fact Checker — three.ws</title>
diff --git a/pages/features.html b/pages/features.html
index 287feec17..246cd61c0 100644
--- a/pages/features.html
+++ b/pages/features.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Features — three.ws</title>
diff --git a/pages/forge.html b/pages/forge.html
index 953194727..9648df0f7 100644
--- a/pages/forge.html
+++ b/pages/forge.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Forge · Text → 3D · three.ws</title>
@@ -1473,6 +1474,7 @@
</p>
<div class="actions">
<button class="btn" type="button" id="retry">Try again</button>
+ <button class="btn btn-ghost is-hidden" type="button" id="generate-anyway">Generate anyway</button>
</div>
</div>
diff --git a/pages/galaxy.html b/pages/galaxy.html
index 6586e8bbd..d2e675a06 100644
--- a/pages/galaxy.html
+++ b/pages/galaxy.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Agent Galaxy · three.ws × IBM Granite</title>
diff --git a/pages/gallery-picker.html b/pages/gallery-picker.html
index f4e42427c..1494547c1 100644
--- a/pages/gallery-picker.html
+++ b/pages/gallery-picker.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Avatar Gallery — three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/glossary.html b/pages/glossary.html
index 32594222c..7e6affa30 100644
--- a/pages/glossary.html
+++ b/pages/glossary.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Glossary — three.ws</title>
diff --git a/pages/go.html b/pages/go.html
index db4b75374..2bcf35ef7 100644
--- a/pages/go.html
+++ b/pages/go.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/handle.html b/pages/handle.html
index 13b758d04..8d2a7aa96 100644
--- a/pages/handle.html
+++ b/pages/handle.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/home.html b/pages/home.html
index f3274a713..b392054ce 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>three.ws — The 3D Agent Layer of the Internet</title>
diff --git a/pages/import-rpm.html b/pages/import-rpm.html
index 25edd521b..3cb1e868e 100644
--- a/pages/import-rpm.html
+++ b/pages/import-rpm.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Import Your 3D Avatar · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/labs.html b/pages/labs.html
index ff7a8e354..41896c79e 100644
--- a/pages/labs.html
+++ b/pages/labs.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Labs — three.ws</title>
diff --git a/pages/launchpad.html b/pages/launchpad.html
index fb7afe800..9c3ee53fc 100644
--- a/pages/launchpad.html
+++ b/pages/launchpad.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/live.html b/pages/live.html
index 31823aa50..f502e3c48 100644
--- a/pages/live.html
+++ b/pages/live.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Agent Economy — Live · three.ws</title>
diff --git a/pages/marketplace.html b/pages/marketplace.html
index 41a6aab96..7b44d5f70 100644
--- a/pages/marketplace.html
+++ b/pages/marketplace.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Agent Marketplace · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/mocap-studio.html b/pages/mocap-studio.html
index 58182d437..5c8bf82a5 100644
--- a/pages/mocap-studio.html
+++ b/pages/mocap-studio.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Mocap Studio · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/overlay-control.html b/pages/overlay-control.html
index cfedd73c5..b98aedbb3 100644
--- a/pages/overlay-control.html
+++ b/pages/overlay-control.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Overlay Control · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/play.html b/pages/play.html
index 7e088e688..5850bef68 100644
--- a/pages/play.html
+++ b/pages/play.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Play · Coin Communities — three.ws</title>
<meta
diff --git a/pages/playground.html b/pages/playground.html
index b269005df..16510ae99 100644
--- a/pages/playground.html
+++ b/pages/playground.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Playground · three.ws</title>
diff --git a/pages/pose.html b/pages/pose.html
index f8faa3ec0..4129bd8f8 100644
--- a/pages/pose.html
+++ b/pages/pose.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Pose Studio · three.ws</title>
diff --git a/pages/pricing.html b/pages/pricing.html
index b576d82d9..78e8670a2 100644
--- a/pages/pricing.html
+++ b/pages/pricing.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>Pricing · three.ws</title>
diff --git a/pages/profile.html b/pages/profile.html
index d80541790..95f288e96 100644
--- a/pages/profile.html
+++ b/pages/profile.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Agent Profile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
diff --git a/pages/pump-dashboard.html b/pages/pump-dashboard.html
index e1ed956ce..bdbcf337b 100644
--- a/pages/pump-dashboard.html
+++ b/pages/pump-dashboard.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en" class="pump-dashboard-page">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -2592,11 +2593,35 @@
if (cfg.webhookUrl != null) $('pd-alert-webhook').value = cfg.webhookUrl || '';
}
+ const ALERT_FORM_IDS = [
+ 'pd-alert-graduation',
+ 'pd-alert-whale',
+ 'pd-alert-fees',
+ 'pd-alert-launch',
+ 'pd-threshold-whale',
+ 'pd-threshold-claim',
+ 'pd-threshold-cooldown',
+ 'pd-alert-webhook',
+ 'pd-save-alerts',
+ ];
+ // Disable the form while the authoritative server config is in flight so the
+ // user can't edit (and Save) stale localStorage values that the GET is about
+ // to overwrite. aria-busy announces the pending state to assistive tech.
+ function setAlertFormDisabled(disabled) {
+ const panel = $('page-alerts');
+ if (panel) panel.setAttribute('aria-busy', disabled ? 'true' : 'false');
+ for (const id of ALERT_FORM_IDS) {
+ const el = $(id);
+ if (el) el.disabled = disabled;
+ }
+ }
+
let _alertConfigLoaded = false;
async function loadAlertConfig() {
// Fetch server alert history into the feed regardless of auth state.
loadServerAlerts();
if (_alertConfigLoaded) return;
+ setAlertFormDisabled(true);
try {
const resp = await apiFetch('/api/alerts/config');
if (resp.status === 401) return; // anonymous — keep local cache
@@ -2608,6 +2633,8 @@
_alertConfigLoaded = true;
} catch {
/* keep local cache */
+ } finally {
+ setAlertFormDisabled(false);
}
}
@@ -2656,6 +2683,12 @@
cooldown: parseInt($('pd-threshold-cooldown').value, 10) || 30,
webhookUrl: webhookUrl || null,
};
+ const btn = $('pd-save-alerts');
+ const btnLabel = btn ? btn.textContent : '';
+ if (btn) {
+ btn.disabled = true;
+ btn.textContent = 'Saving…';
+ }
try {
const csrf = await getCsrfToken();
const headers = { 'Content-Type': 'application/json' };
@@ -2680,9 +2713,15 @@
const { data } = await resp.json();
state.alertConfig = data;
localStorage.setItem('pumpbot-alerts', JSON.stringify(data));
+ applyAlertConfigToForm(data);
toast('Alert settings saved', 'success');
} catch (e) {
toast('Network error: ' + (e.message || 'save failed'), 'error');
+ } finally {
+ if (btn) {
+ btn.disabled = false;
+ btn.textContent = btnLabel;
+ }
}
}
diff --git a/pages/pump-live.html b/pages/pump-live.html
index dd957a276..826ccdfa5 100644
--- a/pages/pump-live.html
+++ b/pages/pump-live.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="/favicon.ico" sizes="any" />
diff --git a/pages/pump-visualizer.html b/pages/pump-visualizer.html
index ba9060c22..4b743575e 100644
--- a/pages/pump-visualizer.html
+++ b/pages/pump-visualizer.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/scan.html b/pages/scan.html
index 24392f317..6580512f8 100644
--- a/pages/scan.html
+++ b/pages/scan.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>3D Scanner · Scan yourself into 3D · three.ws</title>
diff --git a/pages/segment.html b/pages/segment.html
index 977767196..ee5581107 100644
--- a/pages/segment.html
+++ b/pages/segment.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/shopper.html b/pages/shopper.html
index 2fe63684a..988912606 100644
--- a/pages/shopper.html
+++ b/pages/shopper.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Endpoint Shopper — three.ws</title>
diff --git a/pages/skills.html b/pages/skills.html
index 7fb435cce..70acc5681 100644
--- a/pages/skills.html
+++ b/pages/skills.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/start.html b/pages/start.html
index 7fc4a34bf..e9dccda40 100644
--- a/pages/start.html
+++ b/pages/start.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Get started · three.ws</title>
diff --git a/pages/status.html b/pages/status.html
index 5d600ae00..5cbc97927 100644
--- a/pages/status.html
+++ b/pages/status.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Status — three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -227,7 +228,13 @@
}
}
</style>
- </head>
+
+ <link rel="canonical" href="https://three.ws/status">
+ <meta property="og:site_name" content="three.ws">
+ <meta name="twitter:title" content="Status · three.ws">
+ <meta name="twitter:description" content="Live operational status and 90-day uptime history for the platform, API, and x402 surfaces — probed every 5 minutes.">
+ <script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Status","description":"Live operational status and 90-day uptime history for the platform, API, and x402 surfaces — probed every 5 minutes.","url":"https://three.ws/status","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>
+</head>
<body>
<header><div id="nav-container"></div></header>
diff --git a/pages/support.html b/pages/support.html
index 41b8bd653..d74641c25 100644
--- a/pages/support.html
+++ b/pages/support.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Support — three.ws</title>
diff --git a/pages/three-live.html b/pages/three-live.html
index 3a543a833..ce435e616 100644
--- a/pages/three-live.html
+++ b/pages/three-live.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/three-token.html b/pages/three-token.html
index 0aa22a020..4a5e8ba8f 100644
--- a/pages/three-token.html
+++ b/pages/three-token.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>$THREE · Live price, chart & trades · three.ws</title>
diff --git a/pages/three-ws-launch-week.html b/pages/three-ws-launch-week.html
index ec7d14f64..2be5cd586 100644
--- a/pages/three-ws-launch-week.html
+++ b/pages/three-ws-launch-week.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/threews-claim.html b/pages/threews-claim.html
index 45abc6d56..311d5de96 100644
--- a/pages/threews-claim.html
+++ b/pages/threews-claim.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Claim your threews.sol subdomain</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/pages/tutorial.html b/pages/tutorial.html
index 3b5e48b2e..f016587d8 100644
--- a/pages/tutorial.html
+++ b/pages/tutorial.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en" class="tutorial-page">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>three.ws — Tutorial</title>
diff --git a/pages/tutorials.html b/pages/tutorials.html
index 73035eb4e..e3e1bcb51 100644
--- a/pages/tutorials.html
+++ b/pages/tutorials.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en" class="tutorials-page">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>three.ws — Tutorials</title>
diff --git a/pages/unstoppable.html b/pages/unstoppable.html
index 05ef15aef..96aa67dcc 100644
--- a/pages/unstoppable.html
+++ b/pages/unstoppable.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Unstoppable Agent — three.ws</title>
diff --git a/pages/voice.html b/pages/voice.html
index 1897fc89f..8e532ec1a 100644
--- a/pages/voice.html
+++ b/pages/voice.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
diff --git a/pages/walk.html b/pages/walk.html
index 23008785d..41c0c2e2a 100644
--- a/pages/walk.html
+++ b/pages/walk.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Walk · three.ws</title>
diff --git a/pages/what-is.html b/pages/what-is.html
index d5c91839e..729328053 100644
--- a/pages/what-is.html
+++ b/pages/what-is.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>What is three.ws? — One platform for 3D AI agents · three.ws</title>
diff --git a/pages/worlds.html b/pages/worlds.html
index 50579286b..3a752cf58 100644
--- a/pages/worlds.html
+++ b/pages/worlds.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Worlds · Coin Communities — three.ws</title>
diff --git a/pages/x-pricing.html b/pages/x-pricing.html
index 026990f97..4d8a39172 100644
--- a/pages/x-pricing.html
+++ b/pages/x-pricing.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Pricing · three.ws</title>
diff --git a/pages/xr.html b/pages/xr.html
index 5dc60fa12..1b1d25cad 100644
--- a/pages/xr.html
+++ b/pages/xr.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>XR · three.ws</title>
diff --git a/public/404.html b/public/404.html
index b64e41e58..89db66db7 100644
--- a/public/404.html
+++ b/public/404.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>three.ws — 404</title>
diff --git a/public/agent-passport.html b/public/agent-passport.html
index 91c4f46d1..add7fd813 100644
--- a/public/agent-passport.html
+++ b/public/agent-passport.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Agent passport · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
diff --git a/public/arbitrage.html b/public/arbitrage.html
index 39791cf1a..949cfae2b 100644
--- a/public/arbitrage.html
+++ b/public/arbitrage.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 Arbitrage — same capability, different price</title>
diff --git a/public/bazaar.html b/public/bazaar.html
index e8cd874c4..28625f7f6 100644
--- a/public/bazaar.html
+++ b/public/bazaar.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 Bazaar — discover paid APIs and MCP tools</title>
diff --git a/public/changelog.json b/public/changelog.json
index f6b586c9a..290c8407d 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-11T12:51:38.932Z",
+ "generated_at": "2026-06-11T12:56:50.996Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -132,6 +132,17 @@
"fix"
]
},
+ {
+ "date": "2026-06-11",
+ "type": "update",
+ "title": "Light theme is here — flip the whole site with one tap",
+ "summary": "three.ws now ships a light theme alongside the signature dark one. A new sun/moon toggle sits in the top nav on every page: tap it to switch instantly, and your choice sticks across pages, sessions, and other open tabs. New here, or set to 'Auto' in Settings → Appearance? The site follows your device's light/dark preference automatically. The theme is applied before the page paints, so there's no white flash on load, and the dashboard appearance picker (Dark / Light / Auto) now applies live instead of just saving for later. Dark remains the brand default — nothing changes unless you want it to.",
+ "link": null,
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
{
"date": "2026-06-11",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index c808a8dad..158ed5014 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -102,6 +102,14 @@
<category>fix</category>
<description>The explore discovery feed and marketplace asset-pricing lookup now reject malformed query parameters with a clear 400 instead of failing with a server error. A non-numeric page size on explore, or a malformed asset id on a price lookup, no longer surfaces a 500 — the endpoints validate input up front and respond cleanly.</description>
</item>
+ <item>
+ <title>Light theme is here — flip the whole site with one tap</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-06-11:Light theme is here — flip the whole site with one tap</guid>
+ <pubDate>Thu, 11 Jun 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>three.ws now ships a light theme alongside the signature dark one. A new sun/moon toggle sits in the top nav on every page: tap it to switch instantly, and your choice sticks across pages, sessions, and other open tabs. New here, or set to 'Auto' in Settings → Appearance? The site follows your device's light/dark preference automatically. The theme is applied before the page paints, so there's no white flash on load, and the dashboard appearance picker (Dark / Light / Auto) now applies live instead of just saving for later. Dark remains the brand default — nothing changes unless you want it to.</description>
+ </item>
<item>
<title>Live $THREE market data, longer trade streams, and tutor session fixes</title>
<link>https://three.ws/changelog</link>
diff --git a/public/character.html b/public/character.html
index 2a9934b42..bf918a40a 100644
--- a/public/character.html
+++ b/public/character.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title>Character — three.ws</title>
diff --git a/public/characters.html b/public/characters.html
index d24a2c600..0196bc8ee 100644
--- a/public/characters.html
+++ b/public/characters.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title>Characters — three.ws</title>
diff --git a/public/crypto-demo.html b/public/crypto-demo.html
index 3853e05a6..84e0b9c9a 100644
--- a/public/crypto-demo.html
+++ b/public/crypto-demo.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>3D-Agent Crypto Demo</title>
diff --git a/public/eth-vanity.html b/public/eth-vanity.html
index ec47812af..210c01333 100644
--- a/public/eth-vanity.html
+++ b/public/eth-vanity.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8">
<title>Ethereum CREATE2 vanity grinder · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
diff --git a/public/evm-wallet.html b/public/evm-wallet.html
index 3bbe0ce9d..d972480de 100644
--- a/public/evm-wallet.html
+++ b/public/evm-wallet.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8">
<title>EVM vanity wallet generator · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
diff --git a/public/features.json b/public/features.json
index 8bb076c1a..eedc3e79b 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-11T11:23:58.173Z",
+ "generated_at": "2026-06-11T12:56:50.953Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/forever.html b/public/forever.html
index 95f9d8db3..b4e372153 100644
--- a/public/forever.html
+++ b/public/forever.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>forever — etch a message into Bitcoin</title>
diff --git a/public/forgot-password.html b/public/forgot-password.html
index 773f6a254..1afb9b6cc 100644
--- a/public/forgot-password.html
+++ b/public/forgot-password.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Forgot password · three.ws</title>
diff --git a/public/gmgn.html b/public/gmgn.html
index 0a63e7442..c3d89495e 100644
--- a/public/gmgn.html
+++ b/public/gmgn.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>GMGN Smart Money · three.ws</title>
diff --git a/public/launch-week.html b/public/launch-week.html
index 7effee1f3..88e238a43 100644
--- a/public/launch-week.html
+++ b/public/launch-week.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>three.ws — Launch Week Case Study (Apr 29 – May 9, 2026)</title>
diff --git a/public/login.html b/public/login.html
index 0e215323e..156cec139 100644
--- a/public/login.html
+++ b/public/login.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Sign in · three.ws</title>
diff --git a/public/lookup.html b/public/lookup.html
index e622fdeb9..9f05ea5b4 100644
--- a/public/lookup.html
+++ b/public/lookup.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<title>Agent lookup · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
diff --git a/public/nav.css b/public/nav.css
index 6a46e82da..23bd4582e 100644
--- a/public/nav.css
+++ b/public/nav.css
@@ -39,7 +39,9 @@
.nav {
position: sticky; top: 0; z-index: 100;
border-bottom: 1px solid var(--nv-hairline);
- background: rgba(5,5,5,0.82);
+ /* Token-driven so the header flips under [data-theme='light']; falls back to
+ the near-black brand bar when no theme var is set (dark default). */
+ background: var(--nv-bar-bg, rgba(5,5,5,0.82));
backdrop-filter: blur(20px) saturate(140%);
-webkit-backdrop-filter: blur(20px) saturate(140%);
}
@@ -147,6 +149,43 @@
pointer-events: none;
}
+/* ── Theme toggle (dark ⇄ light) ─────────────────────────────────
+ Same 36×36 icon-button chrome as the notifications bell. Shows the moon in
+ dark (click → go light) and the sun in light (click → go dark); the icon swap
+ is driven purely by the [data-theme] attribute on <html>, so it is correct on
+ first paint with no JS. */
+.nav-theme-btn {
+ display: inline-flex; align-items: center; justify-content: center;
+ width: 36px; height: 36px;
+ color: var(--nv-text-2); background: none;
+ border: 1px solid transparent; border-radius: 8px;
+ cursor: pointer; font-family: inherit;
+ transition: color 0.12s, border-color 0.15s, background 0.15s;
+ flex-shrink: 0;
+}
+.nav-theme-btn:hover { color: var(--nv-text); border-color: var(--nv-hairline-strong); background: var(--nv-tint, rgba(255,255,255,0.04)); }
+.nav-theme-btn:active { background: var(--nv-tint-strong, rgba(255,255,255,0.08)); }
+.nav-theme-btn:focus-visible { outline: 2px solid var(--focus-ring-color, rgba(255,255,255,0.4)); outline-offset: 2px; }
+.nav-theme-ico { display: block; }
+.nav-theme-ico.sun { display: none; }
+/* In light mode, show the sun (offering a return to dark) and hide the moon. */
+:root[data-theme='light'] .nav-theme-ico.moon { display: none; }
+:root[data-theme='light'] .nav-theme-ico.sun { display: block; }
+
+/* Light-mode nav polish — the shared header buttons hardcode faint white-tint
+ hovers that wash out on a light bar; remap them to faint ink tints so hover
+ and active states stay legible. */
+:root[data-theme='light'] .nav-search-btn:hover,
+:root[data-theme='light'] .nav-notif-btn:hover,
+:root[data-theme='light'] .nav-end .console:hover {
+ border-color: var(--nv-hairline-strong);
+ background: rgba(15, 18, 28, 0.05);
+}
+:root[data-theme='light'] .nav-search-btn:active,
+:root[data-theme='light'] .nav-notif-btn[aria-expanded="true"] {
+ background: rgba(15, 18, 28, 0.08);
+}
+
/* ── Notifications popover panel ─────────────────────────────── */
.notif-panel {
position: fixed; z-index: 9999;
diff --git a/public/nav.html b/public/nav.html
index 4a922f256..aaa1fecd5 100644
--- a/public/nav.html
+++ b/public/nav.html
@@ -44,6 +44,44 @@
<span class="nav-walk-ico" aria-hidden="true">🚶</span
><span class="nav-walk-label">Walk</span>
</button>
+ <button
+ type="button"
+ class="nav-theme-btn"
+ id="nav-theme-toggle"
+ aria-pressed="false"
+ aria-label="Switch to light theme"
+ title="Toggle theme"
+ >
+ <svg
+ class="nav-theme-ico moon"
+ viewBox="0 0 20 20"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="1.5"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ aria-hidden="true"
+ width="18"
+ height="18"
+ >
+ <path d="M17 11.5A6.5 6.5 0 0 1 8.5 3 6.5 6.5 0 1 0 17 11.5z" />
+ </svg>
+ <svg
+ class="nav-theme-ico sun"
+ viewBox="0 0 20 20"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="1.5"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ aria-hidden="true"
+ width="18"
+ height="18"
+ >
+ <circle cx="10" cy="10" r="3.6" />
+ <path d="M10 2v2M10 16v2M2 10h2M16 10h2M4.2 4.2l1.4 1.4M14.4 14.4l1.4 1.4M4.2 15.8l1.4-1.4M14.4 5.6l1.4-1.4" />
+ </svg>
+ </button>
<button
type="button"
class="nav-notif-btn"
diff --git a/public/nav.js b/public/nav.js
index f849d6534..41dbb2d54 100644
--- a/public/nav.js
+++ b/public/nav.js
@@ -66,11 +66,24 @@ function loadDiscovery() {
document.head.appendChild(s);
}
+// Load the site-wide theme switcher (public/theme-switcher.js): owns the
+// dark ⇄ light toggle wired to the nav button, persistence and cross-tab sync.
+// Self-mounting + idempotent. The inline boot script already applied the theme
+// before paint; this binds the toggle button and keeps it in sync.
+function loadThemeSwitcher() {
+ if (document.querySelector('script[src="/theme-switcher.js"]')) return;
+ const s = document.createElement('script');
+ s.src = '/theme-switcher.js';
+ s.defer = true;
+ document.head.appendChild(s);
+}
+
function boot() {
loadGlossary();
loadSearch();
loadDiscovery();
loadGettingStarted();
+ loadThemeSwitcher();
const navContainer = document.getElementById('nav-container');
if (!navContainer) return;
if (!document.querySelector('link[href="/nav.css"]')) {
diff --git a/public/paywall.html b/public/paywall.html
index 70806db9b..b654ac890 100644
--- a/public/paywall.html
+++ b/public/paywall.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Payment Required — three.ws</title>
diff --git a/public/providers.html b/public/providers.html
index bd6b9c03d..c533be9f0 100644
--- a/public/providers.html
+++ b/public/providers.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 Providers — operator profiles for the bazaar</title>
diff --git a/public/pump-dashboard.css b/public/pump-dashboard.css
index 803d761be..91b0f8beb 100644
--- a/public/pump-dashboard.css
+++ b/public/pump-dashboard.css
@@ -654,6 +654,35 @@ html.pump-dashboard-page body {
.pd-btn:active { transform: translateY(1px); }
+/* Inert state — used while a form's server config / save is in flight. Suppress
+ the hover lightening and active nudge so a disabled control reads as inert. */
+.pd-btn:disabled,
+.pd-btn[disabled] {
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+.pd-btn:disabled:hover,
+.pd-btn[disabled]:hover {
+ background: rgba(255, 255, 255, 0.04);
+ border-color: var(--stroke);
+}
+.pd-btn.is-primary:disabled:hover,
+.pd-btn.is-primary[disabled]:hover {
+ background: var(--accent-soft);
+ border-color: var(--stroke-strong);
+}
+.pd-btn:disabled:active,
+.pd-btn[disabled]:active { transform: none; }
+
+/* Disabled inputs (alerts form during the in-flight GET). */
+[aria-busy='true'] .pd-input:disabled,
+[aria-busy='true'] .pd-toggle:disabled,
+.pd-input:disabled,
+.pd-toggle:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
.pd-btn.is-primary {
background: var(--accent-soft);
border-color: var(--stroke-strong);
diff --git a/public/pump-grid-poc.html b/public/pump-grid-poc.html
index 85a2b61ff..79d347f91 100644
--- a/public/pump-grid-poc.html
+++ b/public/pump-grid-poc.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PumpFun Grid POC</title>
diff --git a/public/pumpfun.html b/public/pumpfun.html
index b8d98b0b6..8f3aeb455 100644
--- a/public/pumpfun.html
+++ b/public/pumpfun.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>PumpFun migrations · three.ws</title>
diff --git a/public/register.html b/public/register.html
index 603e8373d..3d4bab877 100644
--- a/public/register.html
+++ b/public/register.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Create account · three.ws</title>
diff --git a/public/reset-password.html b/public/reset-password.html
index a18f6c95d..5ad59bfe5 100644
--- a/public/reset-password.html
+++ b/public/reset-password.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Reset password · three.ws</title>
diff --git a/public/siwx-test.html b/public/siwx-test.html
index fe0d15411..ef28ad475 100644
--- a/public/siwx-test.html
+++ b/public/siwx-test.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 SIWX — manual test page</title>
diff --git a/public/strategy-lab.html b/public/strategy-lab.html
index b177f89ba..34b17dac7 100644
--- a/public/strategy-lab.html
+++ b/public/strategy-lab.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8">
<title>Strategy lab · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
diff --git a/public/studio-deposit-harness.html b/public/studio-deposit-harness.html
index 1761ddf15..6967355d1 100644
--- a/public/studio-deposit-harness.html
+++ b/public/studio-deposit-harness.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
-<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>deposit harness</title>
+<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>deposit harness</title>
<style>body{background:#0c0c0c;color:#fff;font-family:system-ui;padding:2rem}#root{max-width:380px}</style>
</head>
<body>
diff --git a/public/style.css b/public/style.css
index 19cfb5ad9..8cadcdeae 100644
--- a/public/style.css
+++ b/public/style.css
@@ -200,11 +200,16 @@ body {
margin: 0;
padding: 0;
font-family: var(--font-body);
- background: #000;
+ /* Canvas routed through tokens so the global page surface flips with
+ [data-theme]. Dark resolves to the near-black brand base (--bg-0); light
+ remaps it in tokens.css. Transition keeps the theme toggle from snapping. */
+ background: var(--bg-0);
min-height: 100vh;
- color: #e0e0e0;
+ color: var(--ink);
font-size: var(--text-base);
line-height: var(--leading-normal);
+ transition: background-color var(--duration-base) var(--ease-standard),
+ color var(--duration-base) var(--ease-standard);
}
* {
diff --git a/public/theme-switcher.js b/public/theme-switcher.js
new file mode 100644
index 000000000..a1f732d91
--- /dev/null
+++ b/public/theme-switcher.js
@@ -0,0 +1,130 @@
+// three.ws site-wide theme switcher.
+//
+// Owns the dark ⇄ light theme at runtime. The brand default is dark; light is
+// the single alternate palette (remapped at the token layer in tokens.css).
+//
+// Preference model — shared with the dashboard Appearance setting:
+// localStorage key : 'twx_theme'
+// values : 'dark' | 'light' | 'auto' ('auto' follows the OS)
+// unset : treated as 'dark' (the platform's brand default)
+//
+// An inline boot script (injected by scripts/inject-theme-boot.mjs) applies the
+// resolved theme to <html data-theme> before first paint, so this module never
+// causes a flash — it re-applies idempotently, wires the nav toggle, keeps the
+// button in sync, follows the system in 'auto' mode, and mirrors changes across
+// tabs. Everything is exposed on window.threeTheme for other surfaces (e.g. the
+// dashboard settings panel) to drive the same single source of truth.
+
+(function () {
+ 'use strict';
+ if (window.threeTheme) return; // idempotent — only one switcher per document
+
+ var STORAGE_KEY = 'twx_theme';
+ var prefersLight =
+ window.matchMedia && window.matchMedia('(prefers-color-scheme: light)');
+
+ function getMode() {
+ try {
+ var v = localStorage.getItem(STORAGE_KEY);
+ if (v === 'light' || v === 'dark' || v === 'auto') return v;
+ } catch (e) {
+ /* storage blocked (private mode / sandboxed iframe) — fall through */
+ }
+ return 'dark';
+ }
+
+ // Resolve a stored mode to the concrete theme that should paint right now.
+ function resolve(mode) {
+ var m = mode || getMode();
+ if (m === 'auto') return prefersLight && prefersLight.matches ? 'light' : 'dark';
+ return m === 'light' ? 'light' : 'dark';
+ }
+
+ function applyEffective(effective) {
+ document.documentElement.setAttribute('data-theme', effective);
+ syncToggle(effective);
+ window.dispatchEvent(
+ new CustomEvent('themechange', { detail: { mode: getMode(), effective: effective } }),
+ );
+ }
+
+ // Reflect the live theme onto the nav toggle button (label + pressed state).
+ // Safe to call before the nav is injected — it just no-ops until the button
+ // exists, and the MutationObserver below replays it once it appears.
+ function syncToggle(effective) {
+ var btn = document.getElementById('nav-theme-toggle');
+ if (!btn) return;
+ var isLight = effective === 'light';
+ btn.setAttribute('aria-pressed', isLight ? 'true' : 'false');
+ btn.setAttribute('aria-label', isLight ? 'Switch to dark theme' : 'Switch to light theme');
+ }
+
+ // Persist + apply a mode. 'dark'/'light' are explicit; 'auto' follows the OS.
+ function setMode(mode) {
+ var next = mode === 'light' || mode === 'auto' ? mode : 'dark';
+ try {
+ localStorage.setItem(STORAGE_KEY, next);
+ } catch (e) {
+ /* persistence unavailable — still apply for this session */
+ }
+ applyEffective(resolve(next));
+ return next;
+ }
+
+ // The nav button is a simple binary flip between the two visible themes,
+ // writing an explicit choice (never 'auto'); the tri-state lives in settings.
+ function toggle() {
+ var nextEffective = resolve() === 'light' ? 'dark' : 'light';
+ setMode(nextEffective);
+ return nextEffective;
+ }
+
+ window.threeTheme = {
+ STORAGE_KEY: STORAGE_KEY,
+ get: getMode,
+ resolve: resolve,
+ set: setMode,
+ toggle: toggle,
+ };
+
+ // Apply immediately so direct module loads (or a missing boot script) still
+ // land on the right theme without waiting for the nav.
+ applyEffective(resolve());
+
+ // Delegated click — independent of when the async-injected nav button mounts.
+ document.addEventListener('click', function (e) {
+ var t = e.target && e.target.closest && e.target.closest('#nav-theme-toggle');
+ if (t) {
+ e.preventDefault();
+ toggle();
+ }
+ });
+
+ // When the OS scheme changes, follow it only if the user is in 'auto'.
+ if (prefersLight) {
+ var onScheme = function () {
+ if (getMode() === 'auto') applyEffective(resolve());
+ };
+ if (prefersLight.addEventListener) prefersLight.addEventListener('change', onScheme);
+ else if (prefersLight.addListener) prefersLight.addListener(onScheme);
+ }
+
+ // Mirror changes made in other tabs/windows.
+ window.addEventListener('storage', function (e) {
+ if (e.key === STORAGE_KEY) applyEffective(resolve());
+ });
+
+ // The nav header is injected asynchronously by nav.js; once the toggle
+ // button appears, replay the current state onto it, then stop observing.
+ if (document.getElementById('nav-theme-toggle')) {
+ syncToggle(resolve());
+ } else if (window.MutationObserver) {
+ var obs = new MutationObserver(function () {
+ if (document.getElementById('nav-theme-toggle')) {
+ syncToggle(resolve());
+ obs.disconnect();
+ }
+ });
+ obs.observe(document.documentElement, { childList: true, subtree: true });
+ }
+})();
diff --git a/public/tokens.css b/public/tokens.css
index 504b7c4a1..4a0091e31 100644
--- a/public/tokens.css
+++ b/public/tokens.css
@@ -156,6 +156,85 @@
--focus-ring-offset: 2px;
--disabled-opacity: 0.4;
--disabled-cursor: not-allowed;
+
+ /* Theme — the default (no [data-theme]) is the brand dark palette above.
+ color-scheme tells the UA to paint native form controls, scrollbars and
+ the canvas in the matching scheme. The theme-switcher sets data-theme on
+ <html>; an inline boot script (scripts/inject-theme-boot.mjs) applies it
+ before first paint so there is no flash. See [data-theme='light'] below. */
+ color-scheme: dark;
+}
+
+/* Explicit dark — identical to :root, so toggling data-theme="dark" is a no-op
+ on the palette but still drives color-scheme + the [data-theme] attribute the
+ switcher reads back. Keep in lockstep with :root. */
+:root[data-theme='dark'] {
+ color-scheme: dark;
+}
+
+/* ════════════════════════════════════════════════════════════════════════════
+ * LIGHT THEME
+ * The single alternate palette. It REMAPS the colour primitives above to a
+ * light surface system — it never introduces a parallel namespace (same rule
+ * as the per-surface namespaces removed in B02). Every token-driven surface
+ * flips automatically; surfaces that still hardcode colours render as dark
+ * islands until migrated to tokens (tracked follow-up, see DESIGN-TOKENS.md).
+ *
+ * Two values can't survive a straight flip and are remapped here too:
+ * · --accent was pure white (white-fill primary CTA). On light that is
+ * invisible, so light uses a real accent blue + white CTA ink.
+ * · Button/elevation tokens that hardcoded white/black are re-pointed.
+ * ════════════════════════════════════════════════════════════════════════════ */
+:root[data-theme='light'] {
+ color-scheme: light;
+
+ /* Solid canvas + raised panel */
+ --bg-0: #ffffff;
+ --bg-1: #f3f4f6;
+
+ /* Glass + translucent surface ramp (dark ink tint on light, mirrors the
+ dark palette's white tint on black) */
+ --surface-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 245, 248, 0.72));
+ --surface-1: rgba(15, 18, 28, 0.035);
+ --surface-2: rgba(15, 18, 28, 0.06);
+ --surface-3: rgba(15, 18, 28, 0.09);
+ --stroke: rgba(15, 18, 28, 0.10);
+ --stroke-strong: rgba(15, 18, 28, 0.16);
+
+ /* Ink ramp — dark text on light */
+ --ink-bright: #0a0c12;
+ --ink: #1d212b;
+ --ink-dim: #5a616f;
+ --ink-faint: rgba(15, 18, 28, 0.45);
+
+ /* Accent — white is invisible on light, so light gets a real accent. */
+ --accent: #2563eb;
+ --accent-soft: rgba(37, 99, 235, 0.10);
+
+ /* Elevation — softer, cooler shadows on a light canvas */
+ --shadow-1: 0 1px 3px rgba(15, 18, 28, 0.08);
+ --shadow-2: 0 4px 24px rgba(15, 18, 28, 0.10), 0 1px 4px rgba(15, 18, 28, 0.06);
+ --shadow-3: 0 8px 32px rgba(15, 18, 28, 0.14), 0 1px 4px rgba(15, 18, 28, 0.08);
+
+ /* Button component tokens that hardcoded white/near-black in style.css.
+ Primary becomes accent-fill with white ink; the white-tint hovers on
+ secondary/ghost become dark tints so they read on a light surface. */
+ --btn-primary-fg: #ffffff;
+ --btn-primary-bg-hover: #1d4ed8;
+ --btn-primary-bg-active: #1e40af;
+ --btn-secondary-bg-hover: rgba(15, 18, 28, 0.10);
+ --btn-secondary-bg-active: rgba(15, 18, 28, 0.14);
+
+ /* Nav source vars — nav.css derives its --nv-* layer from these (with dark
+ literal fallbacks), so remapping them here flips the shared header too. */
+ --bg: #ffffff;
+ --hairline: rgba(15, 18, 28, 0.10);
+ --hairline-strong: rgba(15, 18, 28, 0.16);
+ --text: #1d212b;
+ --text-2: #5a616f;
+ --text-3: #888f9c;
+ --text-4: #aab0bc;
+ --nv-bar-bg: rgba(255, 255, 255, 0.82);
}
@media (prefers-reduced-motion: reduce) {
diff --git a/public/tutor.html b/public/tutor.html
index 78038c580..715faaa03 100644
--- a/public/tutor.html
+++ b/public/tutor.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pay-As-You-Learn Tutor — three.ws</title>
diff --git a/public/vanity-wallet.html b/public/vanity-wallet.html
index 7331c8dc2..fb2bc2885 100644
--- a/public/vanity-wallet.html
+++ b/public/vanity-wallet.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8">
<title>Vanity wallet generator · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
diff --git a/public/wallet-connect-demo.html b/public/wallet-connect-demo.html
index 377a5fb12..8f3dd52a3 100644
--- a/public/wallet-connect-demo.html
+++ b/public/wallet-connect-demo.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Wallet Connect — QA Demo</title>
diff --git a/public/x402-stripe.html b/public/x402-stripe.html
index 8dc277793..edb63c8de 100644
--- a/public/x402-stripe.html
+++ b/public/x402-stripe.html
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 — payments, drop-in</title>
diff --git a/pump-fun-skills/coin-fees/SKILL.md b/pump-fun-skills/coin-fees/SKILL.md
index 6ceeec356..bdb36b9e6 100644
--- a/pump-fun-skills/coin-fees/SKILL.md
+++ b/pump-fun-skills/coin-fees/SKILL.md
@@ -170,7 +170,7 @@ Check `npm info @pump-fun/pump-sdk dependencies` and align `@solana/web3.js` / `
import {
PUMP_SDK,
OnlinePumpSdk,
- isCreatorUsingSharingConfig,
+ hasCoinCreatorMigratedToSharingConfig,
creatorVaultPda,
feeSharingConfigPda,
canonicalPumpPoolPda,
@@ -205,7 +205,7 @@ When an agent needs to understand where creator fees go for a coin, follow this
│ → Claims from pump program; also claims from pump AMM (with WSOL unwrap) if graduated
│
└─ isCashbackCoin === false
- 3. Check isCreatorUsingSharingConfig({ mint, creator })
+ 3. Check hasCoinCreatorMigratedToSharingConfig({ mint, creator })
├─ true → Fees go to SHARING CONFIG SHAREHOLDERS
│ → Load feeSharingConfigPda(mint) → decodeSharingConfig
│ → Lists shareholders with address + BPS shares
diff --git a/pump-fun-skills/coin-fees/package-lock.json b/pump-fun-skills/coin-fees/package-lock.json
index a0af2f405..ab70640eb 100644
--- a/pump-fun-skills/coin-fees/package-lock.json
+++ b/pump-fun-skills/coin-fees/package-lock.json
@@ -8,8 +8,8 @@
"name": "@pump-fun-skills/coin-fees",
"version": "1.0.0",
"dependencies": {
- "@pump-fun/pump-sdk": "^1.31.0",
- "@pump-fun/pump-swap-sdk": "^1.14.1",
+ "@pump-fun/pump-sdk": "^1.36.0",
+ "@pump-fun/pump-swap-sdk": "^1.16.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
"bn.js": "^5.2.2"
@@ -103,13 +103,28 @@
"url": "https://paulmillr.com/funding/"
}
},
+ "node_modules/@pump-fun/agent-payments-sdk": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@pump-fun/agent-payments-sdk/-/agent-payments-sdk-1.0.7.tgz",
+ "integrity": "sha512-RnYh3GDMTaLvrmu9Hz4W11ulRNQYhrQoOOJyhpMa/wMRuY7ibhoQczcA17R3Zy3fKyhveiLmYI+GKF4pnp2nVg==",
+ "license": "ISC",
+ "dependencies": {
+ "@coral-xyz/anchor": "^0.31.1",
+ "@solana/spl-token": "^0.4.9",
+ "@solana/web3.js": "^1.98.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-linux-x64-gnu": "*"
+ }
+ },
"node_modules/@pump-fun/pump-sdk": {
- "version": "1.32.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-1.32.0.tgz",
- "integrity": "sha512-ptqaz119m80w9ICjFFQLMO6WJw4DSZacj5Gzi4nSZEDlf7mLbgj5RbPzGZ3Eud+s+mTFVxJmztPjFVr/hpDI+Q==",
+ "version": "1.36.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-1.36.0.tgz",
+ "integrity": "sha512-X8rf+Wm/p/jhBj6zbwouM9blJ3UW8XJFSL7YTT8osBnpHsOH0ccT0DjCkIi6AAT7b6jf1nM3MXk7l78Fuf1M0g==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
+ "@pump-fun/agent-payments-sdk": "1.0.7",
"@pump-fun/pump-swap-sdk": "^1.13.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
@@ -118,9 +133,9 @@
}
},
"node_modules/@pump-fun/pump-swap-sdk": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-swap-sdk/-/pump-swap-sdk-1.14.1.tgz",
- "integrity": "sha512-U3vFL1Plhl/sBYUAHQhrFkmzXLxJp/gmuqHDn+odgwC1cRj15DJLVlRxnksGBMnf8dlScX9I+DdVng6rGbUnzg==",
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-swap-sdk/-/pump-swap-sdk-1.17.0.tgz",
+ "integrity": "sha512-8G/rCIzIzt7xdde1Ax+mOIcUZ0p5iC8a9NU0ufMsqeWDSBRy1WjbsaJIfkKbNCrp3nOvDzBFhSo+9LnEy2+12g==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
@@ -148,6 +163,19 @@
"base-x": "^5.0.0"
}
},
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.61.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.1.tgz",
+ "integrity": "sha512-bVWIOIk6pV01p4CdUbPP7CJ/434z+OooYjDuFcR+44N35YvKUC66G8MGnvcWx5mWKW3g61J+t74l3Kj15Kwn2Q==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
"node_modules/@solana/buffer-layout": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz",
@@ -331,7 +359,6 @@
"resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.4.tgz",
"integrity": "sha512-vv9lfnvjUsRiq//+j5pBdXig0IQdtzA0BRZ3bXEP4KaIyF1CcaydWqgyzQgfZMNIsWNWmG+AUHwPy4AHOD6gpw==",
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/runtime": "^7.25.0",
"@noble/curves": "^1.4.2",
@@ -595,7 +622,6 @@
"hasInstallScript": true,
"license": "MIT",
"optional": true,
- "peer": true,
"dependencies": {
"node-gyp-build": "^4.3.0"
},
@@ -870,7 +896,6 @@
"hasInstallScript": true,
"license": "MIT",
"optional": true,
- "peer": true,
"dependencies": {
"node-gyp-build": "^4.3.0"
},
@@ -996,21 +1021,6 @@
"integrity": "sha512-JT8B3M7LYQCRZVfB1OZZIqzi1OMeDHcTpRJpHPNvHFmye4wT03uBM8vw73NqXKfihrpGzSsWlBfUcOglX3oBeA==",
"license": "MIT"
},
- "node_modules/utf-8-validate": {
- "version": "5.0.10",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz",
- "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==",
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "peer": true,
- "dependencies": {
- "node-gyp-build": "^4.3.0"
- },
- "engines": {
- "node": ">=6.14.2"
- }
- },
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
@@ -1041,7 +1051,6 @@
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
"integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=8.3.0"
},
diff --git a/pump-fun-skills/coin-fees/scripts/build-collect-fee-tx.mjs b/pump-fun-skills/coin-fees/scripts/build-collect-fee-tx.mjs
index 4f2bef61a..9c90163fe 100644
--- a/pump-fun-skills/coin-fees/scripts/build-collect-fee-tx.mjs
+++ b/pump-fun-skills/coin-fees/scripts/build-collect-fee-tx.mjs
@@ -11,7 +11,7 @@ import {
bondingCurvePda,
canonicalPumpPoolPda,
feeSharingConfigPda,
- isCreatorUsingSharingConfig,
+ hasCoinCreatorMigratedToSharingConfig,
} from "@pump-fun/pump-sdk";
import { OnlinePumpAmmSdk } from "@pump-fun/pump-swap-sdk";
import { PublicKey } from "@solana/web3.js";
@@ -138,7 +138,7 @@ async function main() {
// Check for sharing config
if (
- isCreatorUsingSharingConfig({ mint, creator })
+ hasCoinCreatorMigratedToSharingConfig({ mint, creator })
) {
throw new Error(
"This coin uses a fee sharing config. Use build-distribute-fees-tx.mjs instead.",
diff --git a/pump-fun-skills/coin-fees/scripts/build-distribute-fees-tx.mjs b/pump-fun-skills/coin-fees/scripts/build-distribute-fees-tx.mjs
index fb5f53ecd..9f5560933 100644
--- a/pump-fun-skills/coin-fees/scripts/build-distribute-fees-tx.mjs
+++ b/pump-fun-skills/coin-fees/scripts/build-distribute-fees-tx.mjs
@@ -14,7 +14,7 @@ import {
bondingCurvePda,
canonicalPumpPoolPda,
feeSharingConfigPda,
- isCreatorUsingSharingConfig,
+ hasCoinCreatorMigratedToSharingConfig,
getPumpAmmProgram,
} from "@pump-fun/pump-sdk";
import {
@@ -117,7 +117,7 @@ async function main() {
const effectiveCreator = poolCoinCreator ?? new PublicKey(bondingCurve.creator);
// Verify sharing config exists
- if (!isCreatorUsingSharingConfig({ mint, creator: effectiveCreator })) {
+ if (!hasCoinCreatorMigratedToSharingConfig({ mint, creator: effectiveCreator })) {
throw new Error(
"This coin does not use a fee sharing config. Use build-collect-fee-tx.mjs instead.",
);
diff --git a/pump-fun-skills/coin-fees/scripts/build-sharing-config-tx.mjs b/pump-fun-skills/coin-fees/scripts/build-sharing-config-tx.mjs
index c8166d3f1..b1aaf4e77 100644
--- a/pump-fun-skills/coin-fees/scripts/build-sharing-config-tx.mjs
+++ b/pump-fun-skills/coin-fees/scripts/build-sharing-config-tx.mjs
@@ -17,7 +17,7 @@ import {
bondingCurvePda,
canonicalPumpPoolPda,
feeSharingConfigPda,
- isCreatorUsingSharingConfig,
+ hasCoinCreatorMigratedToSharingConfig,
isSharingConfigEditable,
} from "@pump-fun/pump-sdk";
import { OnlinePumpAmmSdk } from "@pump-fun/pump-swap-sdk";
@@ -224,7 +224,7 @@ async function main() {
}
// Detect mode
- const configExists = isCreatorUsingSharingConfig({ mint, creator: effectiveCreator });
+ const configExists = hasCoinCreatorMigratedToSharingConfig({ mint, creator: effectiveCreator });
let mode = values.mode ?? (configExists ? "update" : "create");
if (mode === "create" && configExists) {
diff --git a/pump-fun-skills/coin-fees/scripts/fetch-distributable-info.mjs b/pump-fun-skills/coin-fees/scripts/fetch-distributable-info.mjs
index f7e0b0729..fe3f068dd 100644
--- a/pump-fun-skills/coin-fees/scripts/fetch-distributable-info.mjs
+++ b/pump-fun-skills/coin-fees/scripts/fetch-distributable-info.mjs
@@ -13,7 +13,7 @@ import {
canonicalPumpPoolPda,
creatorVaultPda,
feeSharingConfigPda,
- isCreatorUsingSharingConfig,
+ hasCoinCreatorMigratedToSharingConfig,
getPumpAmmProgram,
} from "@pump-fun/pump-sdk";
import {
@@ -97,7 +97,7 @@ async function main() {
const effectiveCreator = poolCoinCreator ?? new PublicKey(bondingCurve.creator);
// Verify sharing config
- if (!isCreatorUsingSharingConfig({ mint, creator: effectiveCreator })) {
+ if (!hasCoinCreatorMigratedToSharingConfig({ mint, creator: effectiveCreator })) {
throw new Error(
"This coin does not use a fee sharing config. " +
"Distributable info is only available for coins with sharing configs.",
diff --git a/pump-fun-skills/coin-fees/scripts/fetch-fee-info.mjs b/pump-fun-skills/coin-fees/scripts/fetch-fee-info.mjs
index bd64b3d70..3fa1a46ac 100644
--- a/pump-fun-skills/coin-fees/scripts/fetch-fee-info.mjs
+++ b/pump-fun-skills/coin-fees/scripts/fetch-fee-info.mjs
@@ -11,7 +11,7 @@ import {
canonicalPumpPoolPda,
creatorVaultPda,
feeSharingConfigPda,
- isCreatorUsingSharingConfig,
+ hasCoinCreatorMigratedToSharingConfig,
} from "@pump-fun/pump-sdk";
import {
OnlinePumpAmmSdk,
@@ -107,7 +107,7 @@ async function main() {
let sharingConfigInfo = null;
if (!isCashbackCoin) {
- hasSharingConfig = isCreatorUsingSharingConfig({
+ hasSharingConfig = hasCoinCreatorMigratedToSharingConfig({
mint,
creator: effectiveCreator,
});
diff --git a/scripts/inject-theme-boot.mjs b/scripts/inject-theme-boot.mjs
new file mode 100644
index 000000000..f1692eb45
--- /dev/null
+++ b/scripts/inject-theme-boot.mjs
@@ -0,0 +1,91 @@
+#!/usr/bin/env node
+/* Insert the no-flash theme boot script as the FIRST thing inside <head> of
+ * every real HTML page, so <html data-theme> is set before the browser paints
+ * the first frame. Without this, a user who has chosen the light theme would
+ * see a flash of the dark brand default while CSS/JS load.
+ *
+ * The script reads the shared preference (localStorage 'twx_theme', the same
+ * key the dashboard Appearance setting and the nav toggle use), resolves 'auto'
+ * against the OS scheme, and defaults to the brand dark when unset. The full
+ * runtime (toggle wiring, persistence, cross-tab sync) lives in
+ * public/theme-switcher.js — this is only the pre-paint apply.
+ *
+ * Skips embed/widget/badge/artifact/kiosk contexts (they render inside hosts
+ * that own their own theming) and any document without a viewport meta.
+ *
+ * Idempotent: re-running does nothing if the boot script is already present.
+ * Run with --write to apply; without it, reports what would change.
+ */
+
+import { readdirSync, readFileSync, writeFileSync } from 'node:fs';
+import { join } from 'node:path';
+
+const ROOTS = [
+ new URL('../pages/', import.meta.url).pathname,
+ new URL('../public/', import.meta.url).pathname,
+];
+
+const MARKER = 'three.ws theme boot';
+const BOOT =
+ `<script>/* ${MARKER} — no-flash; runtime in /theme-switcher.js */` +
+ `(function(){try{var m=localStorage.getItem('twx_theme');` +
+ `var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';` +
+ `document.documentElement.setAttribute('data-theme',l?'light':'dark');}` +
+ `catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>`;
+
+const SKIP_PATTERNS = [/embed/i, /widget/i, /badge/i, /artifact/i, /-kiosk/i];
+
+function shouldSkip(filename) {
+ return SKIP_PATTERNS.some((re) => re.test(filename));
+}
+
+function injectBoot(html) {
+ if (html.includes(MARKER)) return { html, changed: false };
+ // Insert immediately after the opening <head> tag so it runs before any
+ // stylesheet in the head is applied to the first paint.
+ const headOpen = html.match(/<head\b[^>]*>/i);
+ if (!headOpen) return { html, changed: false };
+ const at = headOpen.index + headOpen[0].length;
+ const lineStart = html.lastIndexOf('\n', headOpen.index) + 1;
+ const indent = html.slice(lineStart, headOpen.index).match(/^[\t ]*/)[0] + '\t';
+ const insertion = `\n${indent}${BOOT}`;
+ return { html: html.slice(0, at) + insertion + html.slice(at), changed: true };
+}
+
+const write = process.argv.includes('--write');
+const stats = { changed: 0, alreadyHas: 0, skipped: 0, noViewport: 0 };
+
+for (const dir of ROOTS) {
+ let files;
+ try {
+ files = readdirSync(dir).filter((f) => f.endsWith('.html'));
+ } catch {
+ continue;
+ }
+ for (const file of files) {
+ if (shouldSkip(file)) {
+ stats.skipped += 1;
+ continue;
+ }
+ const path = join(dir, file);
+ const orig = readFileSync(path, 'utf8');
+ if (!/<meta[^>]+name=["']viewport["']/i.test(orig)) {
+ stats.noViewport += 1;
+ continue;
+ }
+ const { html, changed } = injectBoot(orig);
+ if (!changed) {
+ stats.alreadyHas += 1;
+ continue;
+ }
+ if (write) writeFileSync(path, html);
+ stats.changed += 1;
+ console.log(` ${write ? '+' : '~'} ${file}`);
+ }
+}
+
+console.log(
+ `\ntheme boot: ${stats.changed} ${write ? 'updated' : 'would update'}, ` +
+ `${stats.alreadyHas} already had it, ${stats.skipped} skipped (embed/widget), ` +
+ `${stats.noViewport} no viewport`,
+);
diff --git a/scripts/smoke-forge-nvidia.mjs b/scripts/smoke-forge-nvidia.mjs
new file mode 100644
index 000000000..ce697982b
--- /dev/null
+++ b/scripts/smoke-forge-nvidia.mjs
@@ -0,0 +1,118 @@
+#!/usr/bin/env node
+// Prod smoke test for the free NVIDIA NIM TRELLIS 3D lane on /forge.
+// Submits a draft text→3D job and a draft image→3D job against production,
+// polls each to completion, and verifies the returned GLB is a real binary
+// glTF (magic "glTF", version 2). Proves the `nvidia` backend serves both
+// paths end-to-end for a first-time visitor. No mocks — real API, real GLB.
+//
+// Usage: node scripts/smoke-forge-nvidia.mjs [baseUrl]
+// baseUrl defaults to https://three.ws
+
+const BASE = (process.argv[2] || 'https://three.ws').replace(/\/$/, '');
+const IMAGE_URL = `${BASE}/accessories/thumbs/hat-cowboy.png`;
+const POLL_TIMEOUT_MS = 5 * 60 * 1000;
+const POLL_INTERVAL_MS = 4000;
+
+const now = () => Date.now();
+const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
+
+async function submit(body, label) {
+ const t0 = now();
+ const res = await fetch(`${BASE}/api/forge`, {
+ method: 'POST',
+ headers: { 'content-type': 'application/json' },
+ body: JSON.stringify(body),
+ });
+ const text = await res.text();
+ let json;
+ try {
+ json = JSON.parse(text);
+ } catch {
+ throw new Error(`${label}: non-JSON response (${res.status}): ${text.slice(0, 300)}`);
+ }
+ if (!res.ok) {
+ throw new Error(`${label}: submit failed ${res.status} — ${JSON.stringify(json)}`);
+ }
+ console.log(
+ `[${label}] submitted in ${now() - t0}ms → status=${json.status} backend=${json.backend} tier=${json.tier} path=${json.path} job_id=${(json.job_id || '').slice(0, 16)}…`,
+ );
+ if (json.backend !== 'nvidia') {
+ throw new Error(`${label}: expected backend=nvidia, got ${json.backend}`);
+ }
+ return { json, t0 };
+}
+
+async function pollToDone({ json, t0 }, label) {
+ let state = json;
+ const deadline = now() + POLL_TIMEOUT_MS;
+ while (state.status !== 'done') {
+ if (state.status === 'failed') {
+ throw new Error(`${label}: job failed — ${state.error || 'unknown'}`);
+ }
+ if (now() > deadline) {
+ throw new Error(`${label}: poll timed out after ${POLL_TIMEOUT_MS}ms (last status=${state.status})`);
+ }
+ await sleep(POLL_INTERVAL_MS);
+ const res = await fetch(`${BASE}/api/forge?job=${encodeURIComponent(json.job_id)}`);
+ const text = await res.text();
+ try {
+ state = JSON.parse(text);
+ } catch {
+ throw new Error(`${label}: non-JSON poll response (${res.status}): ${text.slice(0, 200)}`);
+ }
+ if (!res.ok) throw new Error(`${label}: poll failed ${res.status} — ${JSON.stringify(state)}`);
+ process.stdout.write(` [${label}] ${Math.round((now() - t0) / 1000)}s status=${state.status}\r`);
+ }
+ const elapsed = now() - t0;
+ const glbUrl = state.glb_url;
+ if (!glbUrl) throw new Error(`${label}: done but no glb_url`);
+ console.log(`\n[${label}] DONE in ${(elapsed / 1000).toFixed(1)}s → ${glbUrl}`);
+ return { glbUrl, elapsed };
+}
+
+async function verifyGlb(glbUrl, label) {
+ const res = await fetch(glbUrl);
+ if (!res.ok) throw new Error(`${label}: GLB fetch failed ${res.status}`);
+ const buf = Buffer.from(await res.arrayBuffer());
+ const magic = buf.subarray(0, 4).toString('ascii');
+ const version = buf.readUInt32LE(4);
+ if (magic !== 'glTF') throw new Error(`${label}: not a glTF (magic="${magic}")`);
+ if (version !== 2) throw new Error(`${label}: unexpected glTF version ${version}`);
+ console.log(`[${label}] GLB verified: magic=glTF v${version}, ${(buf.length / 1024).toFixed(0)} KB`);
+ return buf.length;
+}
+
+async function run() {
+ console.log(`Smoke testing free NVIDIA NIM 3D lane @ ${BASE}/forge\n`);
+
+ // Catalog: confirm nvidia is configured + free + the draft default.
+ const cat = await (await fetch(`${BASE}/api/forge?catalog`)).json();
+ const nvidia = (cat.backends || []).find((b) => b.id === 'nvidia');
+ console.log(
+ `Catalog: nvidia present=${!!nvidia} configured=${nvidia?.configured} free=${nvidia?.free}; draft default(image)=${cat.default_backend_for_tier?.draft?.image ?? '?'}`,
+ );
+ if (!nvidia?.configured) throw new Error('nvidia backend not configured on prod (NVIDIA_API_KEY missing?)');
+
+ const results = {};
+
+ // Text→3D, draft tier.
+ const text = await submit({ prompt: 'a ceramic teapot', tier: 'draft' }, 'text→3D');
+ const textDone = await pollToDone(text, 'text→3D');
+ results.textBytes = await verifyGlb(textDone.glbUrl, 'text→3D');
+ results.textSec = (textDone.elapsed / 1000).toFixed(1);
+
+ // Image→3D, draft tier.
+ const image = await submit({ image_urls: [IMAGE_URL], tier: 'draft' }, 'image→3D');
+ const imageDone = await pollToDone(image, 'image→3D');
+ results.imageBytes = await verifyGlb(imageDone.glbUrl, 'image→3D');
+ results.imageSec = (imageDone.elapsed / 1000).toFixed(1);
+
+ console.log('\n=== SMOKE PASSED ===');
+ console.log(`text→3D : ${results.textSec}s, ${(results.textBytes / 1024).toFixed(0)} KB GLB`);
+ console.log(`image→3D: ${results.imageSec}s, ${(results.imageBytes / 1024).toFixed(0)} KB GLB`);
+}
+
+run().catch((err) => {
+ console.error(`\n=== SMOKE FAILED ===\n${err.message}`);
+ process.exit(1);
+});
diff --git a/src/dashboard-next/pages/holders.js b/src/dashboard-next/pages/holders.js
index ff4baec4d..d742f6664 100644
--- a/src/dashboard-next/pages/holders.js
+++ b/src/dashboard-next/pages/holders.js
@@ -10,6 +10,7 @@
import { mountShell } from '../shell.js';
import { requireUser, get, esc, ApiError } from '../api.js';
import { createThreeTokenData } from '../../pump/three-token-data.js';
+import { log } from '../../shared/log.js';
const MONO = `'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace`;
const PAGE_SIZE = 25;
@@ -185,7 +186,7 @@ function renderBadge(store) {
if (!current) return;
dlBtn.disabled = true;
downloadBadgePng(body.querySelector('svg'))
- .catch((e) => console.error('[holders] badge export failed', e))
+ .catch((e) => log.error('[holders] badge export failed', e))
.finally(() => { dlBtn.disabled = false; });
});
@@ -310,7 +311,7 @@ function renderLeaderboard(store) {
}
renderPager();
} catch (err) {
- console.error('[holders] leaderboard load failed', err);
+ log.error('[holders] leaderboard load failed', err);
body.innerHTML = `<div style="display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap">
<span style="color:var(--nxt-ink-fade);font-size:13.5px">Couldn’t load the leaderboard.</span>
<button data-action="retry" class="dn-btn" style="font-size:12px;padding:4px 10px">Retry</button>
diff --git a/src/dashboard-next/pages/settings.js b/src/dashboard-next/pages/settings.js
index 9b1e2b26c..c4f85be16 100644
--- a/src/dashboard-next/pages/settings.js
+++ b/src/dashboard-next/pages/settings.js
@@ -453,22 +453,37 @@ function renderTheme() {
</div>
<div style="margin-top:10px;font-size:12px;color:var(--nxt-ink-fade)">
${stored === 'auto' ? 'Following your system preference.' : `Currently using ${stored} mode.`}
- The platform is designed for dark mode. Light mode support is coming.
+ Dark is the brand default; the theme toggle also lives in the top nav.
</div>
`;
+ // Apply a theme choice through the shared switcher so it takes effect site-
+ // wide and persists under the same key the nav toggle uses. Falls back to a
+ // direct apply if the switcher script isn't loaded on this surface.
+ function applyTheme(theme) {
+ if (window.threeTheme) {
+ window.threeTheme.set(theme);
+ return;
+ }
+ localStorage.setItem('twx_theme', theme);
+ const effective = theme === 'auto'
+ ? (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')
+ : theme;
+ document.documentElement.setAttribute('data-theme', effective === 'light' ? 'light' : 'dark');
+ }
+
panel.querySelectorAll('[data-theme]').forEach((btn) => {
btn.addEventListener('click', () => {
const theme = btn.dataset.theme;
- localStorage.setItem('twx_theme', theme);
+ applyTheme(theme);
panel.querySelectorAll('[data-theme]').forEach((b) => {
b.classList.toggle('primary', b.dataset.theme === theme);
});
const hint = panel.querySelector('div:last-child');
hint.textContent = theme === 'auto'
? 'Following your system preference.'
- : `Set to ${theme} mode. The platform is designed for dark mode. Light mode support is coming.`;
- toast('Theme preference saved');
+ : `Set to ${theme} mode. The theme toggle also lives in the top nav.`;
+ toast('Theme applied');
});
});
diff --git a/src/forge.js b/src/forge.js
index 35cff23a5..c986c90ac 100644
--- a/src/forge.js
+++ b/src/forge.js
@@ -58,6 +58,7 @@ const els = {
download: document.getElementById('download'),
again: document.getElementById('again'),
retry: document.getElementById('retry'),
+ generateAnyway: document.getElementById('generate-anyway'),
errorMessage: document.getElementById('error-message'),
forgeShareBtn: document.getElementById('forge-share-btn'),
segmentBtn: document.getElementById('forge-segment-btn'),
@@ -611,12 +612,14 @@ function forgeHeaders(extra) {
return h;
}
-async function startJob({ prompt, imageUrls }) {
+async function startJob({ prompt, imageUrls, skipValidation }) {
const base = { path: selectedEngine.path, tier: selectedTier, backend: selectedEngine.backend };
const body =
Array.isArray(imageUrls) && imageUrls.length
? { image_urls: imageUrls, prompt: prompt || undefined, ...base }
: { prompt, aspect_ratio: aspectRatio, ...base };
+ // Caller already saw the vision warning and chose to proceed (Consumer 1).
+ if (skipValidation) body.skip_validation = true;
const res = await fetch('/api/forge', {
method: 'POST',
@@ -646,6 +649,13 @@ async function startJob({ prompt, imageUrls }) {
e.kind = 'credits';
throw e;
}
+ // Vision pre-check rejected the reference photo (Consumer 1). Recoverable:
+ // the user can swap the photo (Try again) or override (Generate anyway).
+ if (res.status === 422 && data.error === 'image_not_usable') {
+ const e = new Error(data.message || 'That photo doesn’t look usable for 3D.');
+ e.kind = 'not_usable';
+ throw e;
+ }
if (res.status === 429 || data.error === 'rate_limited') {
const secs = Number(data.retry_after) > 0 ? Math.ceil(Number(data.retry_after)) : 10;
const e = new Error(
@@ -863,9 +873,12 @@ async function loadGallery() {
els.creations.classList.remove('is-hidden');
}
-function showError(message) {
+function showError(message, { allowOverride = false } = {}) {
stopElapsed();
els.errorMessage.textContent = message;
+ // The "Generate anyway" affordance only exists for the vision pre-check
+ // rejection; every other error hides it so it can't leak across states.
+ if (els.generateAnyway) els.generateAnyway.classList.toggle('is-hidden', !allowOverride);
showState('error');
}
@@ -972,6 +985,12 @@ async function run(cfg) {
showError(err.message || 'The provider account is out of credits.');
return;
}
+ // The reference photo failed the vision pre-check. Offer "Generate anyway"
+ // so a confident user is never permanently blocked by a cautious verdict.
+ if (err.kind === 'not_usable') {
+ showError(err.message, { allowOverride: true });
+ return;
+ }
showError(
err.message ||
'Something went wrong. Try a simpler, single-subject prompt or cleaner photos.',
@@ -1102,6 +1121,12 @@ els.retry.addEventListener('click', () => {
}
});
+// "Generate anyway" — re-run the same job with the vision pre-check bypassed.
+els.generateAnyway?.addEventListener('click', () => {
+ if (!lastJob) return;
+ run({ ...lastJob, skipValidation: true });
+});
+
if (els.verdict) {
els.verdict.addEventListener('click', (e) => {
const btn = e.target.closest('button[data-outcome]');
diff --git a/src/pump/three-token-data.js b/src/pump/three-token-data.js
index d07cc516f..122d21ac0 100644
--- a/src/pump/three-token-data.js
+++ b/src/pump/three-token-data.js
@@ -24,6 +24,7 @@
// server-authoritative value used to locate the holder's position row.
import { get, post, getMe, ApiError } from '../dashboard-next/api.js';
+import { log } from '../shared/log.js';
/** Canonical $THREE mint. The one and only coin. */
export const THREE_MINT = 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';
@@ -91,7 +92,7 @@ export function createThreeTokenData(opts = {}) {
function emit() {
for (const fn of subs) {
- try { fn(state); } catch (err) { console.error('[three-token-data] subscriber threw', err); }
+ try { fn(state); } catch (err) { log.error('[three-token-data] subscriber threw', err); }
}
}
@@ -257,7 +258,7 @@ export function createThreeTokenData(opts = {}) {
if (typeof fn !== 'function') return () => {};
subs.add(fn);
// Push the current snapshot immediately so late subscribers aren't blank.
- try { fn(state); } catch (err) { console.error('[three-token-data] subscriber threw', err); }
+ try { fn(state); } catch (err) { log.error('[three-token-data] subscriber threw', err); }
return () => subs.delete(fn);
}
diff --git a/tasks/nvidia-nim/probes/vision.md b/tasks/nvidia-nim/probes/vision.md
new file mode 100644
index 000000000..9e1b44ebb
--- /dev/null
+++ b/tasks/nvidia-nim/probes/vision.md
@@ -0,0 +1,114 @@
+# Probe: NVIDIA NIM — vision / image understanding (VLM chat models)
+
+**Date:** 2026-06-11 · **Task:** T4.1 (Phase 4) · **Key:** `NVIDIA_API_KEY` (`nvapi-…`, redacted below)
+
+**Verdict:** ✅ **Fully invocable on the hosted free tier, via the OpenAI-compatible chat
+host** (`integrate.api.nvidia.com/v1/chat/completions`) — the **same host and protocol as
+the chat lanes in `api/_lib/llm.js`**, not the `ai.api.nvidia.com/v1/genai` host the FLUX /
+TRELLIS image-*generation* models use. Multimodal messages use the standard OpenAI
+`content: [{type:'text'}, {type:'image_url', image_url:{url}}]` shape. Synchronous JSON, no
+202/poll, no NVCF asset handshake. This is a drop-in free first lane for a vision helper
+mirroring `llmComplete`.
+
+---
+
+## Endpoint
+
+```
+POST https://integrate.api.nvidia.com/v1/chat/completions
+```
+
+- Auth: `Authorization: Bearer $NVIDIA_API_KEY`
+- `Content-Type: application/json`
+- Body is the ordinary OpenAI chat-completions body; the only difference from the text
+ lanes is that a user message's `content` is an **array** of parts, with one or more
+ `image_url` parts alongside the text.
+
+## Models invocable on this account (all 200, all multimodal)
+
+| model id | prompt tokens for a 1×1 px image | notes |
+|-----------------------------------|----------------------------------|-------|
+| `nvidia/nemotron-nano-12b-v2-vl` | **281** | **chosen primary** — cheapest token footprint, fast, clean instruction-following + JSON output |
+| `meta/llama-3.2-11b-vision-instruct` | ~290 | chosen **second free lane** (different model family → independent failure modes) |
+| `meta/llama-3.2-90b-vision-instruct` | **1616** | works, but ~5–6× the image-token cost of nemotron for no quality gain on our tasks; not used |
+
+Nemotron is the right interactive pick. Llama-3.2-11B is the free backstop. Paid backstop
+is OpenAI `gpt-4o-mini` (already vision-capable, already priced in `llm-pricing.js`).
+
+## Image input encoding (two accepted forms — both verified live)
+
+1. **Inline data URI** — `image_url.url = "data:image/jpeg;base64,<b64>"`. Verified with
+ 1×1 px, 800×600 (11 KB body), and **1024² (707 KB body) and 1280² (2.07 MB body)** —
+ **no inline-size limit hit** on this host (unlike the 180 KB NVCF asset ceiling on the
+ `genai` TRELLIS host; that handshake does **not** apply here).
+2. **Direct http(s) URL** — `image_url.url = "https://…"`. The model server fetches it
+ server-side. Verified working against `picsum.photos`. **Caveat:** some hosts block the
+ fetcher — `upload.wikimedia.org/.../thumb/...` returned `500 Use thumbnail sizes listed
+ on …`. So a passed-through URL is only as reliable as that origin's bot policy.
+
+**Helper decision:** the helper accepts either `{ imageUrl }` (pass-through, default — used
+for our own first-party R2 URLs and arbitrary claim image URLs) or `{ imageBase64, mimeType }`
+(inlined as a data URI). All three consumers pass first-party / already-validated URLs, so
+pass-through is the default; a failed fetch on one provider falls through to the next lane.
+
+## Response shape (standard OpenAI)
+
+```json
+{
+ "model": "nvidia/nemotron-nano-12b-v2-vl",
+ "choices": [{ "index":0, "message": {"role":"assistant","content":"Gray\n"}, "finish_reason":"stop" }],
+ "usage": { "prompt_tokens":281, "completion_tokens":3, "total_tokens":284 }
+}
+```
+
+- Text in `choices[0].message.content`. Usage in `usage.{prompt_tokens,completion_tokens}` —
+ same extractors as the OpenAI-compatible lanes in `llm.js`.
+- **JSON-mode-by-prompt works:** asking "Reply ONLY compact JSON {…}" returns clean parseable
+ JSON (verified: `{"main_color":"#7D7D7D"}`, `{"main_color":"gray"}`). The helper strips a
+ leading trailing newline and tolerates a ```` ```json ```` fence.
+
+## Observed latency (Codespace → NVIDIA, nemotron, 512² photo via URL)
+
+~1–2 s end-to-end for a one-sentence description. Fast enough for an interactive
+forge-submit gate behind a tight per-attempt timeout (helper uses 12 s, fail-open).
+
+## Error shapes (for normalized error mapping)
+
+- **403** bad/expired key → `{"status":403,"title":"Forbidden","detail":"Authorization failed"}`
+ (note: **403**, not 401 → map to `invalid_key`). Same as the FLUX lane.
+- **404** unknown model → `404 page not found` (plain text, not JSON) → `provider_error`.
+- **500** when a pass-through URL origin blocks the server-side fetch
+ (e.g. wikimedia thumbnail policy) → treated as a lane failure, falls through.
+- Expect **402** insufficient credits / **429** rate-limited under sustained use (not
+ reproduced — credits available at probe time; treat as `insufficient_credits` /
+ `rate_limited` exactly like the other NIM lanes).
+
+## Reproduction (key redacted)
+
+```bash
+KEY="nvapi-…" # from .env.local / .env (NEVER commit the real value)
+
+# (a) data-URI form
+IMG="/9j/4AAQSkZJRg…" # base64 jpeg
+curl -s https://integrate.api.nvidia.com/v1/chat/completions \
+ -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
+ -d "{\"model\":\"nvidia/nemotron-nano-12b-v2-vl\",
+ \"messages\":[{\"role\":\"user\",\"content\":[
+ {\"type\":\"text\",\"text\":\"What color is this? One word.\"},
+ {\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/jpeg;base64,$IMG\"}}]}],
+ \"max_tokens\":20}"
+# -> {"choices":[{"message":{"content":"Gray\n"}}], "usage":{"prompt_tokens":281,...}} HTTP 200
+
+# (b) http-url form
+curl -s https://integrate.api.nvidia.com/v1/chat/completions \
+ -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
+ -d '{"model":"nvidia/nemotron-nano-12b-v2-vl",
+ "messages":[{"role":"user","content":[
+ {"type":"text","text":"Describe in one sentence."},
+ {"type":"image_url","image_url":{"url":"https://picsum.photos/id/237/512/512.jpg"}}]}],
+ "max_tokens":60}'
+# -> "Up close view of a young black puppy looking into the camera." HTTP 200
+```
+
+Verified live across all three models, both input forms, four image sizes, JSON-mode output,
+and the 403/404/500 error paths. No scratch files committed; key only in gitignored `.env.local`.
diff --git a/tasks/pumpfun-upstream/02-skills-drift-report.md b/tasks/pumpfun-upstream/02-skills-drift-report.md
index 44cb4c78f..d641ffbab 100644
--- a/tasks/pumpfun-upstream/02-skills-drift-report.md
+++ b/tasks/pumpfun-upstream/02-skills-drift-report.md
@@ -1,62 +1,115 @@
# Drift report: `pump-fun-skills/` vs official upstream
-**Date:** 2026-06-08
+**First run:** 2026-06-08 · **Re-verified + fix applied:** 2026-06-11
**Task:** [02-pump-fun-skills-upstream-sync.md](02-pump-fun-skills-upstream-sync.md)
**Upstream:** `github.com/pump-fun/pump-fun-skills` — branch `main`,
HEAD `c8aaa6a8` (`Merge pull request #9 from pump-fun/bump-sdk-versions`,
-committed 2026-04-23, `pushed_at` 2026-04-23). No tags, no releases, no commits
-after that date.
+committed + `pushed_at` 2026-04-23). No tags, no releases, **no new commits since
+the 2026-06-08 run** — upstream is still dormant at the same HEAD.
## TL;DR
-**Our vendored copy is at or ahead of upstream HEAD on every shared file. There
-is nothing actionable to pull from upstream, so no skill content was changed.**
+**Upstream has not moved since the first run; our vendored copy remains at or
+ahead of upstream HEAD on every shared file, so there is still nothing to _pull_
+from upstream.**
-The only differences between our tree and upstream are deliberate three.ws
-customizations (the `3ws…` brand mark, the `reactive/` skill, the README row for
-it, SDK-version bumps, and the plugin-wrapper files). Upstream's most recent work
-— the `bump-sdk-versions` commit that motivated this drift check — landed
-versions _older_ than the ones we already pin, and every transaction-building
-script and reference doc is byte-identical to ours.
+The 2026-06-11 re-verification did, however, surface and fix one **three.ws-internal
+regression** that the first run missed: the `coin-fees` scripts imported a
+pump-sdk symbol (`isCreatorUsingSharingConfig`) that was **removed in
+`@pump-fun/[email protected]`** — the version our own manifest pins. The skill ran
+only because its stale lockfile silently resolved the old `1.32.0`. Fixed by
+renaming to the exact-signature successor `hasCoinCreatorMigratedToSharingConfig`
+and regenerating the `coin-fees` lock to `1.36.0` so manifest, lock, and scripts
+all agree. Details under [coin-fees SDK-symbol fix](#coin-fees-sdk-symbol-fix-202606-11).
-One pre-existing internal inconsistency surfaced (the per-skill
-`package-lock.json` files are stale relative to their bumped `package.json`).
-It is interlinked with the `[email protected]` situation already owned by
-[task 04](04-agent-payments-sdk-reconcile.md); recommendation below, not fixed
-here.
+Everything else is unchanged from the first run: the only diffs against upstream
+are deliberate three.ws customizations (the `3ws…` brand mark, the `reactive/`
+skill, the README row, SDK-version bumps, and the plugin-wrapper files), and the
+transaction-building logic is byte-identical to upstream.
## Method
-Cloned upstream `main` at HEAD and ran a byte-level recursive diff
+Cloned upstream `main` at HEAD (`c8aaa6a8`) and ran a byte-level recursive diff
(`diff -rq`) of each shared skill folder, plus full-content diffs of every file
that differed. Compared SKILL.md, all `scripts/**`, all `scripts/lib/**`, and all
`references/**` — not just SKILL.md. Cross-checked SDK pins against the live npm
-registry (`npm view <pkg> versions`).
+registry and **executed every script with `--help` against the installed
+`@pump-fun/[email protected]`** (this is what caught the removed-symbol regression
+the first run's `--help` check masked behind a shell pipe).
-## Per-skill drift
+## Per-skill drift (vs upstream)
-| Skill | Shared files differing from upstream | Verdict |
-| -------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
-| **create-coin** | `SKILL.md`, `scripts/build-create-coin-tx.mjs`, `package.json`, `package-lock.json` | All differences are three.ws-deliberate (brand mark + SDK bump) or benign lock noise. Nothing to pull. |
-| **swap** | `package.json` only | SDK bump (we're ahead). All scripts + SKILL.md byte-identical. Nothing to pull. |
-| **coin-fees** | `package.json` only | SDK bump (we're ahead). All scripts + SKILL.md byte-identical. Nothing to pull. |
-| **tokenized-agents** | none | Fully byte-identical to upstream (SKILL.md, SCENARIOS.md, WALLET_INTEGRATION.md, both `references/**`). |
+| Skill | Shared files differing from upstream | Verdict |
+| -------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
+| **create-coin** | `SKILL.md`, `scripts/build-create-coin-tx.mjs`, `package.json`, `package-lock.json` | All differences are three.ws-deliberate (brand mark + SDK bump) or benign lock noise. Nothing to pull. |
+| **swap** | `package.json` only | SDK bump (we're ahead). All scripts + SKILL.md byte-identical. Nothing to pull. |
+| **coin-fees** | `package.json`, `package-lock.json`, `SKILL.md`, 5 `scripts/*.mjs` | `package.json` = SDK bump (was already ahead). The rest are **our 2026-06-11 SDK-symbol fix** (see below), not upstream drift. |
+| **tokenized-agents** | none | Fully byte-identical to upstream (SKILL.md, SCENARIOS.md, WALLET_INTEGRATION.md, both `references/**`). |
Files present only in our tree (intentional, not upstream regressions):
`reactive/` (our skill), `*/handlers.js`, `*/manifest.json`, `*/tools.json`,
`.claude-plugin/plugin.json` (our plugin-wrapper layer), and
`create-coin/scripts/lib/vanity.mjs` (our brand-mark grinder).
-### Critically: the transaction logic has **zero** drift
+### Critically: the transaction logic still has **zero** upstream drift
Every `scripts/lib/*.mjs` across all four skills — `args`, `coin-api`,
`coin-resolve`, `compute`, `constants`, `env`, `jito`, `tx-build` — is
-byte-identical to upstream HEAD. That means **no upstream changes to SDK calls,
-program IDs, fee/cashback/mayhem/buyback constants, Jito tip accounts, or
-instruction-building** have landed since our copy. The `--help` surface of
-`build-create-coin-tx.mjs` confirms the full current feature set is present:
-`--mayhem-mode`, `--cashback`, `--tokenized-agent`, `--buyback-bps`,
-`--front-runner-protection` (Jito), `--alt-address`, RPC priority-fee handling.
+byte-identical to upstream HEAD. No upstream changes to SDK calls, program IDs,
+fee/cashback/mayhem/buyback constants, Jito tip accounts, or instruction-building
+have landed since our copy. The `--help` surface of `build-create-coin-tx.mjs`
+confirms the full feature set: `--mayhem-mode`, `--cashback`,
+`--tokenized-agent`, `--buyback-bps`, `--front-runner-protection` (Jito),
+`--alt-address`, RPC priority-fee handling.
+
+## coin-fees SDK-symbol fix (2026-06-11)
+
+**What was wrong.** All five `coin-fees` scripts plus `SKILL.md` imported and
+called `isCreatorUsingSharingConfig({ mint, creator })` from
+`@pump-fun/pump-sdk`. That export was **removed** somewhere between SDK `1.32.0`
+and `1.36.0` and replaced by `hasCoinCreatorMigratedToSharingConfig({ mint, creator })`
+— same `{ mint, creator } → boolean` signature, same semantics. Verified directly:
+
+- `@pump-fun/[email protected]` exports `isCreatorUsingSharingConfig`, **not** the new name.
+- `@pump-fun/[email protected]` (npm `latest`, what we pin) exports
+ `hasCoinCreatorMigratedToSharingConfig`, **not** the old name. The two names
+ never coexist in any single release.
+
+Our `coin-fees/package.json` pins `^1.36.0`, so a fresh `npm install` resolves
+`1.36.0` and every script throws `SyntaxError: … does not provide an export named
+'isCreatorUsingSharingConfig'` on import. It worked in practice **only** because
+the committed `coin-fees/package-lock.json` was stale and still resolved `1.32.0`
+(an `npm ci` artifact); the manifest, lock, and scripts disagreed.
+
+This is **not** upstream drift — upstream still uses the old symbol and pins
+`^1.33.0`, so upstream's own `coin-fees` skill is equally broken against current
+SDK. It is a three.ws-internal regression: our deliberate SDK bump to `^1.36.0`
+(commit `ebbd69f8`) was never wired through the scripts or the lock.
+
+**Fix applied.**
+
+1. Renamed `isCreatorUsingSharingConfig` → `hasCoinCreatorMigratedToSharingConfig`
+ in the 5 scripts (`build-collect-fee-tx`, `build-distribute-fees-tx`,
+ `build-sharing-config-tx`, `fetch-fee-info`, `fetch-distributable-info`) and in
+ `SKILL.md` (import example + decision-flow diagram). The other fee-sharing
+ exports the scripts use — `feeSharingConfigPda(mint)` and
+ `isSharingConfigEditable({ sharingConfig })` — are unchanged in `1.36.0` and
+ were left as-is.
+2. Regenerated `coin-fees/package-lock.json` (`npm install --package-lock-only`)
+ so it resolves `@pump-fun/[email protected]` (and `@pump-fun/[email protected]`,
+ satisfying its `^1.16.0`), matching the manifest and the renamed scripts.
+
+**Verified:** all six `coin-fees` scripts now import and exit 0 on `--help`
+against `1.36.0`; the renamed files are byte-identical to upstream **modulo the
+single symbol rename** (no reflow, no other change). `coin-fees` is the only skill
+affected — `create-coin` and `swap` scripts import no removed symbol and run clean
+against `1.36.0` unchanged.
+
+> Direction note: we adapted the scripts **forward** to the SDK we actually ship
+> (`1.36.0`, also what the root repo and the other skills use) rather than
+> downgrading `coin-fees` back to a `1.3x` pin. Downgrading would split SDK
+> versions across skills and contradict the standing "don't downgrade below
+> upstream" decision below.
## Deliberate three.ws divergences (preserved — do **not** clobber)
@@ -66,104 +119,112 @@ instruction-building** have landed since our copy. The `--help` surface of
`scripts/lib/vanity.mjs`, so a scripted launch carries the same on-chain
brand provenance as a web-UI launch. The mark string lives in one constant
(`THREE_WS_MARK = "3ws"`) and mirrors the canonical
- [`src/solana/vanity/brand.js`](../../src/solana/vanity/brand.js)
- (verified: both define `THREE_WS_MARK = '3ws'` and matching `hasThreeWsMark`).
- Added by commit `14259dff`. The SKILL.md brand section also re-asserts the
- `$THREE`-only rule inline.
-2. **`reactive/` skill.** Our addition (PumpPortal feed → avatar gestures). Not
- in upstream. Untouched.
+ [`src/solana/vanity/brand.js`](../../src/solana/vanity/brand.js). Added by
+ commit `14259dff`. The SKILL.md brand section also re-asserts the `$THREE`-only
+ rule inline.
+2. **`reactive/` skill.** Our addition (PumpPortal feed → avatar gestures). Not in
+ upstream. Untouched. (Also: deliberately kept out of `.prettierignore` so it
+ stays prettier-enforced — see compliance section.)
3. **README row.** Our README adds one row linking the Reactive Avatar skill;
otherwise identical to upstream.
4. **Plugin-wrapper files.** `handlers.js` / `manifest.json` / `tools.json` per
- skill and `.claude-plugin/plugin.json` are our skill→plugin adapter layer,
- not upstream files.
+ skill and `.claude-plugin/plugin.json` are our skill→plugin adapter layer, not
+ upstream files. Note: `handlers.js` calls the hosted pump.fun agent API
+ (`fun-block.pump.fun/agents/*`); the local `scripts/*.mjs` are the standalone
+ "custom integration" path. The coin-fees regression above only affected the
+ script path, not the hosted-API tool path.
-## SDK versions: we are ahead of upstream
+## SDK versions: we remain ahead of upstream
`diff` direction below is `upstream → ours`.
-| Package | Upstream HEAD | Our `package.json` | npm `latest` (2026-06-08) | Note |
-| ------------------------------------------------- | ------------- | ------------------ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
-| `@pump-fun/pump-sdk` | `^1.33.0` | `^1.36.0` | `1.36.0` | We match npm latest; ahead of upstream. |
-| `@pump-fun/pump-swap-sdk` | `^1.15.0` | `^1.16.0` | `1.17.0` | Ahead of upstream; one minor behind npm latest. |
-| `@pump-fun/agent-payments-sdk` (create-coin only) | `^3.0.3` | `^3.1.0` | `3.0.3` | `3.1.0` is **not on npm**; resolves via the local workspace at `agent-payments-sdk/`. Owned by [task 04](04-agent-payments-sdk-reconcile.md). |
-
-**Decision: keep our pins; do not downgrade to upstream.** These were bumped on
-purpose (commit `ebbd69f8`); reverting to upstream's `^1.33.0/^1.15.0/^3.0.3`
-would be a regression, and applying upstream's `bump-sdk-versions` commit is a
-no-op since we already exceed it.
-
-### Pre-existing inconsistency (flagged, not fixed here)
-
-The three per-skill `package-lock.json` files are **stale** relative to their
-bumped `package.json`:
-
-- `swap` and `coin-fees` locks are byte-identical to upstream and still resolve
- the old `1.33.0/1.15.0`, even though their `package.json` asks for
- `^1.36.0/^1.16.0`.
-- `create-coin`'s lock differs from upstream only by environment-generated noise
- (optional native deps `[email protected]` and `[email protected]` added; two
- `"peer": true` flags dropped) and still pins `agent-payments-sdk@^3.0.3`, not
- our `^3.1.0`.
-
-**Why not fixed in this task:**
-
-- Regenerating these locks moves us _further_ from upstream — the opposite of a
- sync task's intent — and is not an "upstream improvement" to apply.
-- A standalone `npm install` in `create-coin/` would **fail**: `agent-payments-sdk@^3.1.0`
- is unpublished and only resolves inside the repo workspace. That is exactly the
- gotcha [task 04](04-agent-payments-sdk-reconcile.md) exists to resolve.
-- Nothing is broken today — scripts resolve and run (`--help` exits 0); the
- feature set is fully present.
-
-**Recommendation:** fold a single coordinated `npm install` across all four skill
-packages into task 04, once the `agent-payments-sdk` pin (workspace fork vs
-published `3.0.3`) is settled, so all locks regenerate consistently and in sync
-with the manifests.
+| Package | Upstream HEAD | Our `package.json` | npm `latest` (2026-06-11) | Note |
+| ------------------------------------------------- | ------------- | ------------------ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `@pump-fun/pump-sdk` | `^1.33.0` | `^1.36.0` | `1.36.0` | We match npm latest; ahead of upstream. |
+| `@pump-fun/pump-swap-sdk` | `^1.15.0` | `^1.16.0` | `1.17.0` | Ahead of upstream; manifests one minor behind npm latest (locks resolve `1.17.0`). |
+| `@pump-fun/agent-payments-sdk` (create-coin only) | `^3.0.3` | `^3.0.3` | `3.0.3` | **Now matches upstream + npm.** Settled by [task 04](04-agent-payments-sdk-reconcile.md): the local workspace fork was renamed `@three-ws/agent-payments`; the skill manifest pins the real published `^3.0.3` for external templates. |
+
+**Decision: keep our pins; do not downgrade to upstream.** Reverting to upstream's
+`^1.33.0/^1.15.0` would be a regression, and applying upstream's
+`bump-sdk-versions` commit is a no-op since we already exceed it.
+
+### Lockfile state (post-fix)
+
+- **`coin-fees`** — lock **regenerated** to `1.36.0` / `1.17.0` as part of the
+ symbol fix above. Manifest, lock, and scripts now agree.
+- **`swap`** — lock still byte-identical to upstream (resolves old `1.32.0/1.15.0`)
+ while the manifest asks `^1.36.0/^1.16.0`. **Left as-is on purpose:** the swap
+ scripts import no removed symbol, so they run correctly against both the old and
+ new SDK — there is no correctness driver, and regenerating would only move the
+ lock further from upstream. Flagged as harmless drift, not fixed.
+- **`create-coin`** — lock differs from upstream only by environment-generated
+ noise (optional native deps `bufferutil`/`utf-8-validate`, two dropped
+ `"peer": true` flags) and pins the real `agent-payments-sdk@^3.0.3`. Scripts run
+ clean against `1.36.0`. Left as-is.
## `$THREE`-only compliance
-No other-coin or non-`$THREE` mint references exist in `pump-fun-skills/`, and
-none were introduced (no upstream content was pulled). Every base58 string in the
+No other-coin or non-`$THREE` mint references exist in `pump-fun-skills/`, and none
+were introduced by the symbol fix (it touches only an SDK function name). A targeted
+scan for foreign token names/tickers came back clean. Every base58 string in the
tree is a protocol constant or a synthetic placeholder, all byte-identical to
upstream:
-- `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` — USDC mint (real settlement
- asset used by `tokenized-agents`, not a meme/launched coin).
+- `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` — USDC mint (real settlement asset
+ used by `tokenized-agents`, not a meme/launched coin).
- `So11111111111111111111111111111111111111112` — wrapped-SOL native mint.
- `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` — pump.fun **program** ID.
- `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` — SPL Token-2022 **program** ID.
- Jito tip accounts (`scripts/lib/jito.mjs`) and pump.fun fee/program accounts
- (`scripts/lib/constants.mjs`) — protocol constants.
+ (`scripts/lib/constants.mjs`) — protocol constants (byte-identical to upstream).
- `ABcDeFgHiJkLmNoPqRsTuVwXyZ123456789abcdefg`, `CreatorWalletAddress…`,
`BondingCurveAddress…` — explicit synthetic placeholders in sample JSON.
The `$THREE` CA `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump` is the only mint
presented as a coin (in `create-coin/SKILL.md`).
+### Prettier / formatting
+
+The vendored mirror has always followed upstream's formatting, which does **not**
+satisfy our repo `prettier` config — upstream's own copies of these files fail
+`prettier --check` identically. Reformatting them would diverge the mirror from
+upstream wholesale. Resolved the same way as the sibling vendored snapshot
+`docs/pumpfun-program/`: added the four vendored skill dirs (`create-coin/`,
+`swap/`, `coin-fees/`, `tokenized-agents/`) plus `.claude-plugin/plugin.json` to
+[`.prettierignore`](../../.prettierignore) under "Vendored / external library
+code." This makes `prettier --check` green, documents intent, and guards against a
+future `--write` clobbering the upstream-faithful formatting. **Our own
+`reactive/` skill is intentionally left out of the ignore list and remains
+prettier-clean and enforced.**
+
## Duplicates elsewhere in the repo
-| Location | What it is | Action |
-| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
-| `dist/pump-fun-skills/` | Build output — `cpSync` of `pump-fun-skills/` ([vite.config.js:1153](../../vite.config.js#L1153)) and [scripts/build-local-skill-packs.mjs](../../scripts/build-local-skill-packs.mjs). `dist`/`dist-lib`/`dist-artifact` are gitignored (0 tracked files). | **Do not hand-edit.** Regenerates from source on next build. |
-| `examples/skills/pump-fun/`, `public/skills/pump-fun/`, `data/skills/**` | A **different**, three.ws-native skill set (e.g. the read-only `pump-fun` market-intel skill that calls `/api/pump-fun-mcp`). **Not** vendored copies of the upstream create-coin/swap/coin-fees skills. | **Out of scope.** No upstream relationship; no update needed. |
+| Location | What it is | Action |
+| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- |
+| `dist/pump-fun-skills/` | Build output — `cpSync` of `pump-fun-skills/` ([vite.config.js](../../vite.config.js)) and [scripts/build-local-skill-packs.mjs](../../scripts/build-local-skill-packs.mjs). `dist`/`dist-lib`/`dist-artifact` are gitignored (0 tracked files). | **Do not hand-edit.** Regenerates from source on next build. |
+| `examples/skills/pump-fun/`, `public/skills/pump-fun/`, `data/skills/**` | A **different**, three.ws-native skill set (e.g. the read-only `pump-fun` market-intel skill that calls `/api/pump-fun-mcp`). **Not** vendored copies of the upstream create-coin/swap/coin-fees skills. | **Out of scope.** No upstream relationship; no update needed. |
-## Actions taken
+## Actions taken (2026-06-11)
-- **Skill content / scripts:** none changed — no actionable upstream drift.
-- **`package.json` / `package-lock.json`:** unchanged — we are ahead of upstream;
- lock reconcile deferred to task 04 (see above).
-- **Report:** this file committed.
+- **Re-verified** upstream is unchanged since 2026-06-08 (still HEAD `c8aaa6a8`,
+ no new commits/tags/releases) — nothing to pull.
+- **Fixed** the `coin-fees` removed-SDK-symbol regression: renamed the export in 5
+ scripts + `SKILL.md`, regenerated `coin-fees/package-lock.json` to `1.36.0`.
+- **Added** the four vendored skill dirs + `plugin.json` to `.prettierignore`
+ (mirror is now `prettier --check` clean; `reactive/` stays enforced).
+- **Corrected** the SDK table for the now-settled `agent-payments-sdk@^3.0.3` pin
+ (task 04).
+- No upstream content pulled; no `$THREE`-only violation introduced.
## Follow-ups (not in this task)
-1. [Task 04](04-agent-payments-sdk-reconcile.md): settle the
- `[email protected]` local-workspace fork, then regenerate all four
- skill `package-lock.json` files in one pass so manifests and locks agree.
-2. Optionally bump `@pump-fun/pump-swap-sdk` in the **skill** `package.json`
- files to `^1.17.0` during that same dependency pass — the root `package.json`
- was already moved to `^1.17.0` in the recon session, but the four skill
- packages still lag at `^1.16.0`. Independent of upstream, which is still on
- `1.15.0`.
-3. Re-run this drift check when upstream next pushes (currently dormant since
- 2026-04-23).
+1. Optionally bump `@pump-fun/pump-swap-sdk` in the `swap` and `create-coin`
+ **skill** `package.json` files from `^1.16.0` to `^1.17.0` to match the root
+ manifest, and regenerate the `swap` lock in the same pass. Independent of
+ upstream (still on `1.15.0`); no correctness driver today.
+2. Re-run this drift check when upstream next pushes (dormant since 2026-04-23).
+3. If upstream eventually adopts SDK ≥ `1.34` and updates `coin-fees` to the
+ `hasCoinCreatorMigratedToSharingConfig` API, our rename will converge with
+ theirs — re-diff at that point to confirm.
+ </content>
+ </invoke>
diff --git a/tests/api/pump-fun-mcp.test.js b/tests/api/pump-fun-mcp.test.js
index da547d326..41df99304 100644
--- a/tests/api/pump-fun-mcp.test.js
+++ b/tests/api/pump-fun-mcp.test.js
@@ -100,10 +100,14 @@ function makeRes() {
};
}
let handlerRef;
+// No explicit hook timeout: this cold-imports api/pump-fun-mcp.js, which pulls the
+// heavy Solana SDK graph. Under full-suite fork contention that import has been
+// measured well past 60s, so we inherit the global 120s hookTimeout (calibrated in
+// vitest.config.js to clear the worst-case cold import) rather than capping at 60s.
beforeAll(async () => {
const mod = await import('../../api/pump-fun-mcp.js');
handlerRef = mod.default;
-}, 60_000);
+});
async function call(rpc) {
const res = makeRes();
diff --git a/tests/async-state-boundary.test.js b/tests/async-state-boundary.test.js
new file mode 100644
index 000000000..9130e0cac
--- /dev/null
+++ b/tests/async-state-boundary.test.js
@@ -0,0 +1,157 @@
+// @vitest-environment jsdom
+//
+// async-state boundary contract — the unit-level proof of the A04 audit goal:
+// "a forced network failure never yields a blank page or an unhandled
+// rejection." Every data-driven surface routes its loading → fetch →
+// empty / error / retry lifecycle through src/shared/async-state.js, so the
+// guarantees that keep a void off the screen live here. These tests lock that
+// behaviour in: a rejected load resolves into a *designed, retryable* error
+// state (not a throw), empty data renders the empty shell, and Retry re-runs
+// the original load.
+
+import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
+import { loadInto, renderError } from '../src/shared/async-state.js';
+
+// Note: resolveError logs technical detail via log.js, which binds
+// console.error at import time — a later spy cannot intercept it. These tests
+// therefore assert the user-facing contract (a designed shell, never a raw
+// message), not the console channel; the stderr line on a failing load is the
+// by-design "errors always log" behaviour.
+
+describe('async-state — loadInto boundary', () => {
+ let container;
+
+ beforeEach(() => {
+ container = document.createElement('div');
+ document.body.appendChild(container);
+ });
+
+ afterEach(() => {
+ container.remove();
+ });
+
+ it('renders the populated state on a successful load', async () => {
+ const data = await loadInto(container, {
+ load: () => Promise.resolve(['a', 'b', 'c']),
+ render: (items, el) => {
+ el.innerHTML = items.map((i) => `<div class="card">${i}</div>`).join('');
+ },
+ skeleton: { count: 3, variant: 'card' },
+ });
+
+ expect(data).toEqual(['a', 'b', 'c']);
+ expect(container.querySelectorAll('.card')).toHaveLength(3);
+ // No leftover skeleton / error shells.
+ expect(container.querySelector('.tws-sk')).toBeNull();
+ expect(container.querySelector('.tws-es--error')).toBeNull();
+ });
+
+ it('renders a designed empty state (not the populated render) when data is empty', async () => {
+ const render = vi.fn();
+ const data = await loadInto(container, {
+ load: () => Promise.resolve([]),
+ render,
+ empty: { title: 'No agents yet', body: 'Deploy your first agent to see it here.' },
+ });
+
+ expect(data).toBeNull();
+ expect(render).not.toHaveBeenCalled();
+ const empty = container.querySelector('.tws-es');
+ expect(empty).not.toBeNull();
+ expect(empty.textContent).toContain('No agents yet');
+ });
+
+ it('a rejected load fails into a retryable error state instead of throwing', async () => {
+ // The promise must RESOLVE (to null) — an unhandled rejection here would be
+ // exactly the blank-screen failure A04 exists to prevent.
+ const data = await loadInto(container, {
+ load: () => Promise.reject(new Error('boom: network down')),
+ render: () => {
+ throw new Error('render must not run on a failed load');
+ },
+ context: 'test:boundary',
+ });
+
+ expect(data).toBeNull();
+ const errShell = container.querySelector('.tws-es--error');
+ expect(errShell).not.toBeNull();
+ expect(errShell.getAttribute('role')).toBe('alert');
+ // An actionable recovery affordance is present.
+ expect(container.querySelector('[data-sk-retry]')).not.toBeNull();
+ // The raw error message is never surfaced verbatim in the user-facing copy.
+ expect(errShell.textContent).not.toContain('boom: network down');
+ });
+
+ it('Retry re-runs the original load and recovers into the populated state', async () => {
+ let attempt = 0;
+ const load = vi.fn(() => {
+ attempt += 1;
+ return attempt === 1
+ ? Promise.reject(new Error('transient'))
+ : Promise.resolve(['recovered']);
+ });
+
+ await loadInto(container, {
+ load,
+ render: (items, el) => {
+ el.innerHTML = items.map((i) => `<div class="card">${i}</div>`).join('');
+ },
+ });
+
+ // First attempt failed → error shell with a retry button.
+ const retry = container.querySelector('[data-sk-retry]');
+ expect(retry).not.toBeNull();
+
+ // Clicking Retry re-runs loadInto; await a microtask flush for the re-render.
+ retry.click();
+ await vi.waitFor(() => {
+ expect(container.querySelector('.card')).not.toBeNull();
+ });
+
+ expect(load).toHaveBeenCalledTimes(2);
+ expect(container.querySelector('.card').textContent).toBe('recovered');
+ expect(container.querySelector('.tws-es--error')).toBeNull();
+ });
+
+ it('loadInto on a null container is a no-op (defensive, never throws)', async () => {
+ await expect(loadInto(null, { load: () => Promise.resolve([]), render: () => {} }))
+ .resolves.toBeNull();
+ });
+});
+
+describe('async-state — renderError direct shell', () => {
+ let container;
+
+ beforeEach(() => {
+ container = document.createElement('div');
+ document.body.appendChild(container);
+ });
+
+ afterEach(() => {
+ container.remove();
+ });
+
+ it('renders the shared error shell and wires the retry callback', () => {
+ const onRetry = vi.fn();
+ renderError(container, new Error('offline'), { context: 'test:direct' }, onRetry);
+
+ const errShell = container.querySelector('.tws-es--error');
+ expect(errShell).not.toBeNull();
+ const retry = container.querySelector('[data-sk-retry]');
+ expect(retry).not.toBeNull();
+ retry.click();
+ expect(onRetry).toHaveBeenCalledTimes(1);
+ });
+
+ it('honours a caller-supplied error title/body override', () => {
+ renderError(
+ container,
+ new Error('raw detail'),
+ { error: { title: 'Couldn’t load your agents', body: 'Check your connection.' } },
+ );
+ const errShell = container.querySelector('.tws-es--error');
+ expect(errShell.textContent).toContain('Couldn’t load your agents');
+ expect(errShell.textContent).toContain('Check your connection.');
+ expect(errShell.textContent).not.toContain('raw detail');
+ });
+});