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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(spotlight): add /stories and a Verified results block so builders can show results anyone can check
nirholas0faed571f64a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e68e9f117..ef826a569 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-09-30- **Platform Analytics** (`/analytics`): Every three.ws platform total on one page, read live: agents, agents with a wallet, coins launched, 3D models generated, LLM tokens processed, x402 settlements and volume, marketplace sales and agent-to-agent hire volume, each with a daily growth chart over 30 days, 90 days or all time and a note on exactly how it is counted.+- **Success Stories** (`/stories`): Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.- **Trader Duels: call the winner** (`/duels`): Call which of two pump.fun trader agents books more realized profit over a fixed UTC window. Free to play with a daily points allowance; points have no cash value. Resolved from the on-chain trade ledger, with a season leaderboard and badges.- **3D models no longer arrive glued to a floor slab**: The 3D generators sometimes built a thin, wide plate under whatever you asked for: a teapot sitting on a black marble square, a telescope standing in the middle of a grey sheet many times its size. Every finished model is now checked for that plate and has it cut away before it is saved, while anything that really has a base, like a lamp foot, a plinth or a tripod, is left exactly as it was. (`/forge`) `[fix]`- **59 more pages now read in your language**: Pick any of the 85 languages in the language menu and 59 more pages now follow it, including the Airdrop Checker, Portfolio, Drops, Crews, Launch, the Agent Monitor and the rig and embed doctors. Titles, buttons, form labels, hints, error messages and the text shown when a page is shared all translate. Live numbers and statuses on those pages (counters, balances, scan results, play and pause buttons) keep updating in every language: the translation step now recognises a value the page has already filled in and leaves it alone, instead of putting a placeholder like "Loading" back over it. (`/airdrops`) `[improvement, fix]`@@ -15,6 +16,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **See what every agent has earned**: Agent profiles, avatar pages and coin pages now show an Earned card: lifetime creator fees from the coins the agent launched, in SOL with USD beside it, what has been claimed and what is still waiting, a per-coin breakdown and every recorded claim with its Solscan link, plus income from selling its skills and services. The figures come from a snapshot refreshed twice an hour, and are also readable over MCP. `[feature]`- **See where every $100 paid in $THREE goes**: The $THREE page now shows, for paid compute, marketplace sales, scarcity mints, spins and copy-trading fees, how every $100 splits between the seller, the treasury that funds buybacks, and holder rewards. The numbers are read live from the same config the payment code enforces, and the treasury and holder-rewards wallets are listed with their live $THREE and USDC balances, or marked not yet published. The platform never burns $THREE. The page also follows your light or dark theme now. (`/three-token`) `[feature]`- **Sell your whole agent as a paid API**: Flip one switch on your agent's Earn tab, set a price per call and a short description, and your agent becomes a pay-per-call API anyone can use. Buyers pay in USDC on Solana straight to your agent's own wallet, so there is nothing to withdraw, and they talk to exactly the agent you configured. Agents on sale are listed in the x402 catalog and discovery feed so other agents can find and hire them. `[feature]`+- **Spotlight entries now show verified results, and success stories are opt-in**: Every Agent Spotlight entry now has a Verified results block: coins the agent launched, creator fees it earned and income from other agents paying for its skills, computed by three.ws and linked to where you can check them. The builder cannot edit these numbers. The new Success Stories page shows entries whose owners chose to feature them, grouped by category, and never shows an agent without its owner's yes. (`/stories`) `[feature]`- **The coming iPhone app gains notifications, a share sheet entry and quick actions**: The three.ws iOS app, on its way to the App Store, now matches the Android app and goes further. Turn on notifications and sales, follows and remixes arrive on your iPhone with your unread count on the app icon, and a tap opens the page it is about. three.ws appears in the share sheet: share one to three photos and they wait in Create as the front, left and right views of a new 3D avatar, or share a .glb from Files to upload it. Press and hold the icon for Create avatar, Discover, My agents and Notifications. (`/docs/ios-app`) `[feature]`- **The language menu now offers 69 languages**: The language menu grew from 14 languages to 69, each one fully translated. 55 more pages now follow the language you pick, including Hood Desk, Portfolios, Fee Bridge, Agent Cards, Connect, the CLI sign-in approval, Motion, Docs World and the legal pages. Their titles, headings, buttons and the text shown when a page is shared all translate, and so does the sitemap, so you can find every page on three.ws in your own language. (`/sitemap`) `[feature, improvement]`- **The Oracle's model now downloads from any website**: The Oracle's conviction model is published data, and the @three-ws/oracle-model package is meant to score coins anywhere. Until now its download endpoint only answered pages on three.ws and a short list of partners, so a browser app on any other site could not load the model. It now answers every origin, the same as the rest of the Oracle's public reads, so any web page can fetch the model once and score coins locally with no key. (`/oracle-lab`) `[improvement]`diff --git a/data/changelog.json b/data/changelog.jsonindex 12f6832a7..7ae7eb24a 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,13 @@{"$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, desktop (desktop entries become the desktop app's release notes). `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-09-30",+ "title": "Spotlight entries now show verified results, and success stories are opt-in",+ "summary": "Every Agent Spotlight entry now has a Verified results block: coins the agent launched, creator fees it earned and income from other agents paying for its skills, computed by three.ws and linked to where you can check them. The builder cannot edit these numbers. The new Success Stories page shows entries whose owners chose to feature them, grouped by category, and never shows an agent without its owner's yes.",+ "tags": ["feature"],+ "link": "/stories"+ },{"date": "2026-09-30","title": "Trader duels: call which trader wins, free to play",diff --git a/data/pages.json b/data/pages.jsonindex 8c6bf141a..86f8025df 100644--- a/data/pages.json+++ b/data/pages.json@@ -2732,6 +2732,14 @@"added": "2026-09-01","showcase": true},+ {+ "path": "/stories",+ "title": "Success Stories",+ "description": "Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.",+ "priority": 0.7,+ "changefreq": "daily",+ "added": "2026-09-30"+ },{"path": "/ledger","title": "Reasoning Ledger",diff --git a/docs/spotlight.md b/docs/spotlight.mdindex b6dd4aadf..a5e966631 100644--- a/docs/spotlight.md+++ b/docs/spotlight.md@@ -111,6 +111,64 @@ node scripts/seed-spotlight.mjs # dry run, reports what would landnode scripts/seed-spotlight.mjs --apply # write the entries```+## Verified results++Every entry page carries a **Verified results** block under the headline. The+write-up is the builder's claim; these figures are the opposite, computed by+three.ws on every read from tables the builder cannot type into+([`api/_lib/spotlight-metrics.js`](../api/_lib/spotlight-metrics.js)), each with+the link a reader can check it against:++| Metric | Source | Check it at |+| --- | --- | --- |+| Coins launched | `pump_agent_mints` (mainnet only) | Each coin's `/launches/<mint>` page and its Solscan token page |+| Creator fees | The agent earnings read model behind `GET /api/agents/:id/earnings` (pump.fun creator fees on the agent's own coins) | `/api/agents/<agentId>/earnings` |+| Service income | `agent_revenue_events` (x402 skill sales, USDC net of the platform fee) plus completed `agent_hires`, USDC at 1:1 | `/api/agents/<agentId>/earnings` |+| Activity | Conversations and logged actions, read live off the agent | The facts panel on the entry page |++A metric that is not measured on a deployment says "Not measured yet" and is+left out of `verified.live`; it never renders as a zero. If the metrics read+fails outright, `verified` is `null` and the page says the results could not be+read, while the write-up still loads.++## Success stories++[`/stories`](https://three.ws/stories) shows entries whose agent has a result+worth a story, but only with the agent owner's consent. A story makes claims+about someone's results, and curated entries are written by three.ws without+their builders opting in, so consent is explicit and owner-only:++- **New entry:** tick **Feature this as a success story** on the submit form. It+ is off by default. Unticking it on a later edit withdraws consent.+- **Existing entry (including a curated one):** the agent's owner opens the+ entry page and presses **Feature as a success story**; the same button then+ reads **Withdraw from stories**.+- Consent records who gave it. If the agent changes hands, the old owner's+ consent no longer counts.++A consented entry appears on `/stories` once its agent has at least one+verified result: a coin launched, creator fees above zero, or service income+above zero. Conversations alone never make a story. `/stories` groups the+qualifying entries by category, and each card links to the full entry, the+agent, and every coin on Solscan. Nothing is seeded: when no entry qualifies,+the page says so and tells builders how to get on it.++## Moderation++An admin can hide an entry that breaks the rules and restore it later.+Hiding keeps the row (the builder's words are not destroyed) but drops it from+`/spotlight`, `/stories`, the entry page, the category counts and the share+card, because every public read filters on `status = 'published'`. Each hide and+unhide writes an `audit_log` row (`spotlight_hide` / `spotlight_unhide`) with+the admin, the entry and the reason, and the entry row keeps `hidden_at`,+`hidden_by` and `hidden_reason`.++```bash+curl -s -X POST https://three.ws/api/spotlight/moderate \+ -H 'content-type: application/json' -H "x-csrf-token: $CSRF" -b "$SESSION_COOKIE" \+ -d '{"id":"<entry uuid>","action":"hide","reason":"spam report"}'+```+## Categories`trading`, `research`, `creative`, `productivity`, `developer`, `social`,@@ -183,8 +241,58 @@ and is CDN-cached for 30 seconds.### `GET /api/spotlight/get?id=<uuid>`One entry, in the same shape, plus a view count bump. This is what-`/spotlight/<id>` renders. `404` once the entry is removed or its agent stops-being public.+`/spotlight/<id>` renders. `404` once the entry is removed, hidden by a+moderator, or its agent stops being public.++The single-entry read also carries `verified` (see+[Verified results](#verified-results)), plus `story_consent`,+`story_consented_at`, and `owned_by_me` (true only for the agent's owner, who+alone can consent):++```json+{+ "verified": {+ "coins": {+ "count": 2,+ "items": [+ {+ "mint": "…",+ "symbol": "…",+ "launch_url": "/launches/…",+ "solscan_url": "https://solscan.io/token/…"+ }+ ]+ },+ "creator_fees": { "available": true, "sol": 0.0324, "usd": 3.82, "source_url": "/api/agents/…/earnings" },+ "service_income": { "usd": 0, "skill_sales_count": 0, "hires_count": 0, "source_url": "/api/agents/…/earnings" },+ "live": ["coins", "service_income", "creator_fees"],+ "qualifies": true+ }+}+```++### `GET /api/spotlight/stories`++Public. The consented entries whose agent has a verified result, grouped by+category (`groups[].slug`, `groups[].label`, `groups[].entries[]`, each entry+carrying `verified`), plus `total`, `consented` (how many opted in, qualifying+or not) and a plain-language `method`. Cached 60 seconds.++```bash+curl -s https://three.ws/api/spotlight/stories | jq '{total, consented, groups: [.groups[] | {slug, n: (.entries | length)}]}'+```++### `POST /api/spotlight/consent`++Session + CSRF. Body `{ "id": "<entry uuid>", "consent": true }` (or `false` to+withdraw). Only the agent's owner may call it; anyone else gets `403`. Returns+`{ "story_consent": true, "story_consented_at": "…" }`.++### `POST /api/spotlight/moderate`++Admin session + CSRF. Body `{ "id": "<entry uuid>", "action": "hide" | "unhide",+"reason": "optional, up to 280 characters" }`. Returns the entry's new+`status`. `401` signed out, `403` for a non-admin, `404` for an unknown entry.### `GET /api/spotlight/categories`@@ -208,11 +316,13 @@ Session + CSRF. Body:"story": "up to 4000 characters, optional","demoUrl": "https://… (http or https only, optional)","category": "trading",- "tags": ["solana", "autonomous"]+ "tags": ["solana", "autonomous"],+ "featureStory": false}```-Returns the created or updated entry. `403` if the agent is not yours, `409` if+`featureStory` is story consent (see [Success stories](#success-stories)); only a+literal `true` consents. Returns the created or updated entry. `403` if the agent is not yours, `409` ifit is not public.### `POST /api/spotlight/vote`@@ -251,7 +361,11 @@ to `/spotlight` rather than unfurling a 404.| Styles | [`src/spotlight.css`](../src/spotlight.css) || HTTP boundary | [`api/spotlight/[action].js`](../api/spotlight/[action].js) || Queries + ranking | [`api/_lib/spotlight-store.js`](../api/_lib/spotlight-store.js) |-| Schema | `api/_lib/migrations/20260901160000_agent_showcase.sql` |+| Verified results + story cards | [`src/spotlight-verified.js`](../src/spotlight-verified.js) |+| Success stories page | [`pages/stories.html`](../pages/stories.html) + [`src/stories.js`](../src/stories.js) |+| Verified metrics | [`api/_lib/spotlight-metrics.js`](../api/_lib/spotlight-metrics.js) |+| Schema | `api/_lib/migrations/20260901160000_agent_showcase.sql`, consent + moderation `api/_lib/migrations/20260930171500_agent_showcase_story_consent.sql` |+| Tests | [`tests/spotlight-ranking.test.js`](../tests/spotlight-ranking.test.js), [`tests/spotlight-stories.test.js`](../tests/spotlight-stories.test.js) || Curated seed | [`scripts/seed-spotlight.mjs`](../scripts/seed-spotlight.mjs) |## Relateddiff --git a/pages/stories.html b/pages/stories.htmlnew file mode 100644index 000000000..91dc67874--- /dev/null+++ b/pages/stories.html@@ -0,0 +1,80 @@+<!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>Success Stories · three.ws</title>+ <meta+ name="description"+ content="Builders who opted in to show what their three.ws agents achieved: coins launched, creator fees and service income, every figure computed by three.ws from launch records and settled payments, with a link to check it."+ />+ <meta name="theme-color" content="#0a0a0a" />+ <link rel="canonical" href="https://three.ws/stories" />+ <link rel="icon" href="/favicon.ico" sizes="any" />+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="manifest" href="/manifest.webmanifest" />+ <link rel="stylesheet" href="/fonts/fonts.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/src/spotlight.css" />+ <link rel="stylesheet" href="/footer.css" />+ <script defer src="/footer-newsletter.js"></script>+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:title" content="Success Stories · three.ws" />+ <meta property="og:description" content="Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws and shown only with the builder's consent." />+ <meta property="og:url" content="https://three.ws/stories" />+ <meta property="og:image" content="https://three.ws/api/page-og?s=agent-tools&t=Success+Stories&d=Agents+with+results+anyone+can+check%2C+shown+only+with+the+builder%27s+consent.&p=%2Fstories" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Success Stories · three.ws" />+ <meta name="twitter:description" content="Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws and shown only with the builder's consent." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=agent-tools&t=Success+Stories&d=Agents+with+results+anyone+can+check%2C+shown+only+with+the+builder%27s+consent.&p=%2Fstories" />+ </head>+ <body>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>++ <main class="sp-shell">+ <section class="sp-hero">+ <p class="sp-kicker"><span class="sp-dot" aria-hidden="true"></span> Verified results</p>+ <h1 class="sp-title">Success <em>Stories</em></h1>+ <p class="sp-sub">+ Agents whose builders chose to show what they achieved. Every figure below is computed+ by three.ws from launch records, settled payments and on-chain fees, never typed by the+ builder, and every one links to where you can check it.+ </p>+ <div class="sp-ctas">+ <a class="sp-btn sp-btn-primary" href="/spotlight?submit=1">Share your agent's story</a>+ <a class="sp-btn" href="/spotlight">Browse the full showcase</a>+ </div>+ <p class="st-method" id="st-method"></p>+ </section>++ <div id="st-root" aria-busy="true" aria-live="polite">+ <div class="st-grid" aria-hidden="true">+ <div class="sp-skeleton st-skel"></div>+ <div class="sp-skeleton st-skel"></div>+ <div class="sp-skeleton st-skel"></div>+ </div>+ </div>+ <noscript>+ <section class="sp-empty">+ <h3>Success Stories</h3>+ <p>This page loads verified results live. Enable JavaScript to read it, or browse the showcase.</p>+ <a class="sp-btn sp-btn-primary" href="/spotlight">Open the showcase</a>+ </section>+ </noscript>+ </main>++ <script type="module" src="/src/stories.js"></script>+ <script src="/brand.js" defer></script>+ <div id="footer-container"></div>+ <script src="/footer.js"></script>+ <script type="module" src="/i18n.js"></script>+ </body>+</html>diff --git a/prompts/finish/020-parity-06-success-stories.md b/prompts/finish/020-parity-06-success-stories.mddeleted file mode 100644index eb8414a45..000000000--- a/prompts/finish/020-parity-06-success-stories.md+++ /dev/null@@ -1,61 +0,0 @@-# parity 06: /stories, opt-in case studies with metrics anyone can verify--How to run: paste this file's repo path into a fresh Claude Code chat in this repository and say "run this work order". Runnable now; it reads order 015's earnings when present and degrades cleanly when not.--## Operating clause (binding)--- Read CLAUDE.md first, then [_context/parity-00-CONTEXT.md](_context/parity-00-CONTEXT.md). CLAUDE.md overrides everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option list, or an unexecuted plan. A judgment call goes in one line of the final report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real funds or any irreversible on-chain write, git push or a production deploy, committing content that names a crypto project other than $THREE, and destroying unrecoverable data. Where this order hits one, it says so, and you batch every such ask into ONE message after everything else is done.-- Never name Competitor X in anything you commit. If a reference is unavoidable, write "Competitor X".-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a bare add-everything), re-check `git status` before each commit, and commit finished work promptly.-- Before committing, run `npm run check:rules -- --paths <files you touched>`. It must exit 0.--## Why this matters--Competitor X's `/stories` is five case studies, one per kind of builder (a breakout, a creative marketplace, an infrastructure protocol, a trader, a community operator), each with market cap, SOL earned and links to the coin and the builder's X account. It makes different builders see themselves, and every metric can be checked on-chain.--three.ws has the right foundation in `/spotlight` (`pages/spotlight.html` + `src/spotlight.js`, entries at `/spotlight/<id>`, API `api/spotlight/[action].js`, store `api/_lib/spotlight-store.js`, table `agent_showcase` with `title`, `tagline`, `story` up to 4,000 characters, `category`, `demo_url`, `tags`, one live entry per agent, plus `agent_showcase_votes`). Measured 2026-09-30: 15 live entries, 14 `source='curated'` and 1 `community`. What it lacks: no verified metrics on an entry (no coin, fees or revenue), and no moderation path (`status='hidden'` exists in the schema but nothing writes it).--**Consent rule for this order:** `scripts/seed-spotlight.mjs` inserts `curated` entries about public agents without their owners opting in. A story makes claims about someone's results, so only owner-submitted entries (`source='community'`) or entries whose owner explicitly accepted a feature invitation may become stories. `/stories` is free.--## Step 0: re-derive the current state-- sed -n 1,80p api/_lib/migrations/20260901160000_agent_showcase.sql- grep -n "case '\|action ===" api/spotlight/\[action\].js | head- sed -n 90,140p api/_lib/spotlight-store.js- ls prompts/finish/015-parity-01-creator-earnings.md 2>/dev/null && echo "015 open: earnings not available yet"--Count live `agent_showcase` entries by `source` with a SELECT-only throwaway script.--## Tasks--1. **Verified metrics on every spotlight entry**, keyed by `agent_id` and computed server-side (never typed by the builder): coins launched (from `pump_agent_mints`, with mint and Solscan link), creator fees earned (order 015's `/api/agents/:id/earnings` data when present), service income (`agent_revenue_events`, `agent_hires`), chats and actions (already on the entry). Each metric shows its source link. Add them to the entry API response and render a "Verified results" block on `/spotlight/<id>`.-2. **Story consent.** A `featured_story` consent on the entry, set only by the agent's owner (a checkbox on the submit form, off by default, and an "accept feature" action for an existing entry). Curated entries never become stories without it.-3. **Moderation.** An admin-only `hide` / `unhide` action (reuse the repo's admin auth pattern; find it in `api/_lib`), logged, with a test.-4. **`/stories`.** Wired per the context file: consented entries that have at least one verified metric, grouped by category, each card showing the verified numbers, the builder, the coin and a link to the full entry. A strong empty state inviting builders to submit on `/spotlight`, since few entries will qualify at first. Never pad the page with non-consented or curated entries.-5. **Docs.** Extend the spotlight doc (find it under `docs/`) with verified metrics, consent and moderation; `STRUCTURE.md` row; changelog entry.--## Definition of done--- [ ] Entry API responses carry verified metrics from real tables; a test covers an agent with a coin and one without.-- [ ] Only owner-consented entries appear on `/stories` (a test proves a curated, non-consented entry is excluded).-- [ ] Admin hide and unhide work and are tested; a hidden entry disappears from `/spotlight` and `/stories`.-- [ ] `/stories` and the updated entry page are browser-verified at 375, 768 and 1440 px, both themes, zero console errors, empty state exercised.-- [ ] Migration applied if one was added (`npm run db:status` first); docs, `STRUCTURE.md` and changelog updated.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| No entry qualifies yet | Ship with the empty state; that is correct. Do not seed, invent or auto-consent entries. |-| 015 not shipped | Show coins and service income; add creator fees when 015 lands (the block says which metrics are live). |--## Close out (required)--1. Verify every Definition of done line with the actual command output in front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house style: `type(scope): what changed and why a reader cares`).-3. If every Definition of done line passes, delete this file in that same commit (`git rm prompts/finish/020-parity-06-success-stories.md`) and append a dated entry to [_context/parity-PROGRESS.md](_context/parity-PROGRESS.md) with the commit SHAs. If a line cannot pass inside this session because an owner action or an outside party is the last step, finish everything else, leave this file in place, and log exactly which line remains and who owns it. Never delete this file on a partial.-4. Final report, in this order: what step 0 measured; what changed (file list with commit SHAs); evidence for each Definition of done line; the single batched owner message, if the order has a gate; one-line judgment calls. No trailing questions.diff --git a/prompts/finish/_context/parity-PROGRESS.md b/prompts/finish/_context/parity-PROGRESS.mdindex a2e860054..52f821e27 100644--- a/prompts/finish/_context/parity-PROGRESS.md+++ b/prompts/finish/_context/parity-PROGRESS.md@@ -21,3 +21,11 @@ Cross-session handoff for the `parity-` orders ([parity-00-CONTEXT.md](parity-00- Shipped: `0af815c5b` (data layer `api/_lib/platform-analytics.js` + `GET /api/platform/analytics`), `7a739e177` (page module), `d0212823a` (page, route, build input, tests), `f04f022ce` (footer and nav links), `85318b030` (`data/pages.json` entry, `llms.txt` "Economy and $THREE" group, regenerated feeds), `f60d919b8` (STRUCTURE.md row), `a4187c39f` (changelog), `796803608` (link-audit fix in `src/syndicates.js`, a `#` stub that failed `npm run audit:links`), and the close-out commit that carries this entry (creator fees from order 015's snapshot, API reference update). The API reference section and the `/docs/start-here` link were swept into `1806064d3` by a concurrent agent.- Measured on production data 2026-09-30 (30d window): 4,165 agents (+724), 920 with a wallet (+176), 90 mainnet coins (+3), 39,488 finished 3D models (+19,646), 244.3M LLM tokens (+109.1M), 191,488 x402 settlements (+60,572) moving $11,760.36 in USDC (+$9,141.69), 0 paid marketplace sales, $0 agent-to-agent hire volume, 5.515 SOL lifetime creator fees across 48 counted creator wallets. Every source answered in under 5 s, so no rollup table was needed; the response is cached 5 minutes.- Note for readers of these numbers: the x402 settlement count includes the platform's self-cycled ring (`/api/x402-ring`), and the method string says so.++## 2026-09-30: order 020, /stories and verified Spotlight results++- Shipped: migration `api/_lib/migrations/20260930171500_agent_showcase_story_consent.sql` (applied alone with `apply-migrations.mjs --file`; landed in `716131b4f`), metrics + consent + moderation backend (`1ef826a16`), PGlite handler tests `tests/spotlight-stories.test.js` (`d866ed2a0`), STRUCTURE row (swept into `625cbb8a6`), and the close-out commit that carries this entry (`/stories` page, Verified results block and owner toggle on `/spotlight/:id`, submit-form consent checkbox, docs, route, nav, changelog).+- Measured: 15 live `agent_showcase` entries (14 curated, 1 community), 0 with story consent, so `/stories` ships on its empty state by design. `agent_revenue_events` and `agent_hires` are empty in the database today, so service income reads $0 everywhere; coins come from 90 mainnet `pump_agent_mints` rows.+- Creator fees: order 015's read model (`api/_lib/agent-earnings.js`) was present and is loaded lazily, so creator fees are live on entries (e.g. an entry with two coins shows 0.0324 SOL). If that module is ever absent the metric degrades to "Not measured yet", never zero.+- Judgment call: a story needs a RESULT (coin, creator fees above zero, or service income above zero); conversations and actions alone do not qualify.+- Not browser-exercised: the owner-only "Feature as a success story" button, because no QA account owns a Spotlight entry and creating one would write a public production entry. The consent API behind it is covered by the handler tests.diff --git a/public/changelog-recent.json b/public/changelog-recent.jsonindex bc42c4776..20cd794f9 100644--- a/public/changelog-recent.json+++ b/public/changelog-recent.json@@ -1,11 +1,11 @@{- "generated_at": "2026-09-30T08:30:15.454Z",+ "generated_at": "2026-09-30T08:30:10.238Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},- "total": 3792,+ "total": 3794,"complete": false,"full_feed": "/changelog.json","entries": [@@ -19,6 +19,16 @@"launch"]},+ {+ "date": "2026-09-30",+ "type": "launch",+ "title": "Success Stories",+ "summary": "Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.",+ "link": "/stories",+ "tags": [+ "launch"+ ]+ },{"date": "2026-09-30","type": "launch",@@ -101,6 +111,16 @@"feature"]},+ {+ "date": "2026-09-30",+ "type": "update",+ "title": "Spotlight entries now show verified results, and success stories are opt-in",+ "summary": "Every Agent Spotlight entry now has a Verified results block: coins the agent launched, creator fees it earned and income from other agents paying for its skills, computed by three.ws and linked to where you can check them. The builder cannot edit these numbers. The new Success Stories page shows entries whose owners chose to feature them, grouped by category, and never shows an agent without its owner's yes.",+ "link": "/stories",+ "tags": [+ "feature"+ ]+ },{"date": "2026-09-30","type": "update",@@ -1564,26 +1584,6 @@"fix","improvement"]- },- {- "date": "2026-09-09",- "type": "update",- "title": "Every translated news page is advertised as translated again",- "summary": "The site publishes a manifest of which pages carry translated copy, and it was missing 113 of them: every news page. The build wrote that manifest before the news pages had been through the translation pass, so it read them as English-only and shipped a list 113 pages short. Nothing was untranslated, the translations were there and served correctly, but anything reading the manifest to decide what to offer in a reader's language (the language picker's page-level hints, and crawlers looking for alternates) was told those pages had no other language. The build now annotates the news pages first and counts afterwards, so the published count is 357 rather than 244.",- "link": "/news",- "tags": [- "fix"- ]- },- {- "date": "2026-09-09",- "type": "update",- "title": "Fact-check now reads the part of a source that is actually about your claim",- "summary": "When the fact-checker fell back to Wikipedia, it only ever read each article's opening summary. An opening summary says what a page is about, so it carries the answer only when your claim is about the page's subject. Ask whether Napoleon was unusually short and it read the first lines of \"Napoleon\", \"Napoleon III\" and \"Napoleonic Wars\", none of which mention height at all, so every source was scored as saying nothing and the verdict came back \"not enough evidence\" while the passage about his height sat further down the same article. The checker now reads each article in full and picks the paragraphs that actually discuss your claim, so that question returns the \"Appearance and image\" and \"Napoleon's height\" sections instead. Reference lists are skipped, since they repeat your words without asserting anything, and the deeper read is bounded by the time the check already had, so a slow source can never cost you the evidence that already arrived.",- "link": "/docs/fact-check",- "tags": [- "improvement"- ]}]}diff --git a/public/changelog.json b/public/changelog.jsonindex 0b7205b28..da9309be5 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-30T08:30:15.416Z",+ "generated_at": "2026-09-30T08:30:10.207Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -16,6 +16,16 @@"launch"]},+ {+ "date": "2026-09-30",+ "type": "launch",+ "title": "Success Stories",+ "summary": "Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.",+ "link": "/stories",+ "tags": [+ "launch"+ ]+ },{"date": "2026-09-30","type": "launch",@@ -98,6 +108,16 @@"feature"]},+ {+ "date": "2026-09-30",+ "type": "update",+ "title": "Spotlight entries now show verified results, and success stories are opt-in",+ "summary": "Every Agent Spotlight entry now has a Verified results block: coins the agent launched, creator fees it earned and income from other agents paying for its skills, computed by three.ws and linked to where you can check them. The builder cannot edit these numbers. The new Success Stories page shows entries whose owners chose to feature them, grouped by category, and never shows an agent without its owner's yes.",+ "link": "/stories",+ "tags": [+ "feature"+ ]+ },{"date": "2026-09-30","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 7c5d2e6a0..f2d5994d0 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -14,6 +14,14 @@<category>launch</category><description>Every three.ws platform total on one page, read live: agents, agents with a wallet, coins launched, 3D models generated, LLM tokens processed, x402 settlements and volume, marketplace sales and agent-to-agent hire volume, each with a daily growth chart over 30 days, 90 days or all time and a note on exactly how it is counted.</description></item>+ <item>+ <title>Success Stories</title>+ <link>https://three.ws/stories</link>+ <guid isPermaLink="false">2026-09-30:Success Stories</guid>+ <pubDate>Wed, 30 Sep 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.</description>+ </item><item><title>Trader Duels: call the winner</title><link>https://three.ws/duels</link>@@ -78,6 +86,14 @@<category>feature</category><description>Flip one switch on your agent's Earn tab, set a price per call and a short description, and your agent becomes a pay-per-call API anyone can use. Buyers pay in USDC on Solana straight to your agent's own wallet, so there is nothing to withdraw, and they talk to exactly the agent you configured. Agents on sale are listed in the x402 catalog and discovery feed so other agents can find and hire them.</description></item>+ <item>+ <title>Spotlight entries now show verified results, and success stories are opt-in</title>+ <link>https://three.ws/stories</link>+ <guid isPermaLink="false">2026-09-30:Spotlight entries now show verified results, and success stories are opt-in</guid>+ <pubDate>Wed, 30 Sep 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Every Agent Spotlight entry now has a Verified results block: coins the agent launched, creator fees it earned and income from other agents paying for its skills, computed by three.ws and linked to where you can check them. The builder cannot edit these numbers. The new Success Stories page shows entries whose owners chose to feature them, grouped by category, and never shows an agent without its owner's yes.</description>+ </item><item><title>The coming iPhone app gains notifications, a share sheet entry and quick actions</title><link>https://three.ws/docs/ios-app</link>diff --git a/public/features.json b/public/features.jsonindex c1d771b91..1c053b327 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-30T08:30:15.396Z",+ "generated_at": "2026-09-30T08:30:10.181Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -3373,6 +3373,16 @@"tags": [],"showcase": true},+ {+ "path": "/stories",+ "title": "Success Stories",+ "description": "Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.",+ "added": "2026-09-30",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },{"path": "/ledger","title": "Reasoning Ledger",diff --git a/public/llms-full.txt b/public/llms-full.txtindex 5d6557007..5f257f8f4 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -2014,6 +2014,12 @@ URL: https://three.ws/spotlightThe three.ws community showcase: agents people actually built something with, written up by the builder and ranked by community upvotes. Filter by category, open any entry in 3D, upvote what you like, and submit your own.+### Success Stories++URL: https://three.ws/stories++Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.+### Reasoning LedgerURL: https://three.ws/ledgerdiff --git a/public/llms.txt b/public/llms.txtindex 7617b4ff4..3c08424da 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -95,6 +95,6 @@ Machine-readable entry points. Fetch these instead of scraping HTML.## Optional-- [llms-full.txt](https://three.ws/llms-full.txt): Every public page (917), grouped by section, with full descriptions.+- [llms-full.txt](https://three.ws/llms-full.txt): Every public page (918), grouped by section, with full descriptions.- [Sitemap](https://three.ws/sitemap): The same index for people, with search.- [sitemap.xml](https://three.ws/sitemap.xml): XML sitemap for crawlers, including every agent and avatar page.diff --git a/public/nav-data.js b/public/nav-data.jsindex a4ae38026..95be329da 100644--- a/public/nav-data.js+++ b/public/nav-data.js@@ -259,6 +259,12 @@ export const NAV_GROUPS = [badge: 'New',desc: 'The community showcase: agents people actually built something with, ranked by upvotes',},+ {+ title: 'Success Stories',+ href: '/stories',+ tier: 'advanced',+ desc: 'Agents with verified results: coins launched, creator fees and service income, shown with the builder\'s consent',+ },{title: 'Pocket Console',href: '/pocket',diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 46e99497f..c484a2984 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -96,7 +96,7 @@<main class="sm-wrap"><div class="sm-hero"><h1 data-i18n="sitemap_index.sitemap">Sitemap</h1>- <p><span>967</span> <span data-i18n="sitemap_index.pages_grouped">pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</span></p>+ <p><span>968</span> <span data-i18n="sitemap_index.pages_grouped">pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</span></p><div class="sm-formats"><a href="/sitemap.xml" data-i18n-html="sitemap_index.for_search_engines"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt" data-i18n-html="sitemap_index.for_ai_agents"><code>llms.txt</code> · for AI agents</a>@@ -108,7 +108,7 @@</div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 967 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 968 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd id="sm-filter-kbd" aria-hidden="true">/</kbd></div><p class="sm-filter-count" role="status" aria-live="polite"><span id="sm-filter-count"></span><span id="sm-filter-hint" aria-hidden="true"></span></p>@@ -132,6 +132,14 @@<span class="sm-desc" data-i18n="sitemap_index.d_analytics">Every three.ws platform total on one page, read live: agents, agents with a wallet, coins launched, 3D models generated, LLM tokens processed, x402 settlements and volume, marketplace sales and agent-to-agent hire volume, each with a daily growth chart over 30 days, 90 days or all time and a note on exactly how it is counted.</span></a></li>+ <li>+ <a href="/stories">+ <span class="sm-new-date" translate="no">Sep 30, 2026</span>+ <span class="sm-title"><span data-i18n="sitemap_index.t_stories">Success Stories</span></span>+ <span class="sm-path" translate="no">/stories</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_stories">Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.</span>+ </a>+ </li><li><a href="/trade-rooms"><span class="sm-new-date" translate="no">Sep 29, 2026</span>@@ -180,14 +188,6 @@<span class="sm-desc" data-i18n="sitemap_index.d_connect">Add three.ws to your AI client in two clicks: one connector URL gives Claude, ChatGPT, Cursor, VS Code or Claude Code the three.ws MCP tools for 3D generation, agents, wallets and x402 payments. Sign in once in your browser, with no API key to copy.</span></a></li>- <li>- <a href="/docs/syndicates">- <span class="sm-new-date" translate="no">Sep 29, 2026</span>- <span class="sm-title"><span data-i18n="sitemap_index.t_docs_syndicates">Docs · Syndicates</span></span>- <span class="sm-path" translate="no">/docs/syndicates</span>- <span class="sm-desc" data-i18n="sitemap_index.d_docs_syndicates">How copy-trading syndicates work: founding around copyable leaders, joining with your own wallet and caps, how the group curve and rival standing are computed from real copies, and the full API.</span>- </a>- </li></ul></section><nav class="sm-toc" aria-label="Sections">@@ -2481,7 +2481,7 @@<section class="sm-section" id="agent-tools"><header>- <h2><span data-i18n="sitemap_index.section_agent-tools">Agent Tools</span><span class="sm-count" data-count>9</span></h2>+ <h2><span data-i18n="sitemap_index.section_agent-tools">Agent Tools</span><span class="sm-count" data-count>10</span></h2><p class="sm-section-desc" data-i18n="sitemap_index.manage_talk_to_and_deploy_individual_agents">Manage, talk to, and deploy individual agents.</p></header><ul class="sm-list">@@ -2513,6 +2513,13 @@<span class="sm-desc" data-i18n="sitemap_index.d_spotlight">The three.ws community showcase: agents people actually built something with, written up by the builder and ranked by community upvotes. Filter by category, open any entry in 3D, upvote what you like, and submit your own.</span></a></li>+ <li>+ <a href="/stories">+ <span class="sm-title"><span data-i18n="sitemap_index.t_stories">Success Stories</span></span>+ <span class="sm-path" translate="no">/stories</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_stories">Agents with results anyone can check: coins launched, creator fees and service income, computed by three.ws from launch records and settled payments and shown only when the agent's owner opts in. Grouped by category, each linking to the full Spotlight entry and the coin on Solscan.</span>+ </a>+ </li><li><a href="/ledger"><span class="sm-title"><span data-i18n="sitemap_index.t_ledger">Reasoning Ledger</span></span>diff --git a/src/spotlight-entry.js b/src/spotlight-entry.jsindex c339996ba..12e778f18 100644--- a/src/spotlight-entry.js+++ b/src/spotlight-entry.js@@ -26,6 +26,7 @@ import {validate,} from './spotlight-form.js';import { el, entryPath, errorMessage, monogram, relativeTime, stageFor, voteButton } from './spotlight-shared.js';+import { verifiedBlock } from './spotlight-verified.js';const root = document.getElementById('sp-entry');const live = document.getElementById('sp-live');@@ -236,10 +237,61 @@ function ownerControls(e) {return el('div', { class: 'sp-owner-bar' }, [el('span', { class: 'sp-owner-label', text: 'You can edit this entry' }),edit,+ storyToggle(e),remove,]);}+// Story consent is the owner's alone. A curated entry never becomes a success+// story until this button is pressed by the agent's owner; pressing it again+// withdraws, and the entry leaves /stories on the next read.+function storyToggle(e) {+ if (!e.owned_by_me) return null;+ const label = () => (entry.story_consent ? 'Withdraw from stories' : 'Feature as a success story');+ const button = el('button', {+ type: 'button',+ class: `sp-btn sp-btn-sm${e.story_consent ? '' : ' sp-btn-primary'}`,+ 'aria-pressed': e.story_consent ? 'true' : 'false',+ title: 'Show this entry and its verified results on /stories',+ text: label(),+ });+ button.addEventListener('click', async () => {+ const next = !entry.story_consent;+ button.disabled = true;+ button.textContent = next ? 'Featuring…' : 'Withdrawing…';+ try {+ const res = await apiFetch('/api/spotlight/consent', {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ id: entry.id, consent: next }),+ allowAnonymous: true,+ });+ const data = await res.json().catch(() => null);+ if (res.status === 401) throw new Error('your session expired; sign in and try again');+ if (!res.ok) throw new Error(errorMessage(data, `the change returned ${res.status}`));+ entry.story_consent = Boolean(data.story_consent);+ entry.story_consented_at = data.story_consented_at || null;+ const qualifies = Boolean(entry.verified?.qualifies);+ renderNote(+ entry.story_consent+ ? qualifies+ ? 'Featured. This entry now appears on /stories with its verified results.'+ : 'Consent saved. It appears on /stories as soon as the agent has a verified result: a coin launched, creator fees, or service income.'+ : 'Withdrawn. This entry no longer appears on /stories.',+ );+ announce(entry.story_consent ? 'Featured as a success story.' : 'Withdrawn from stories.');+ } catch (err) {+ renderNote(err?.message || 'the change did not save', 'error');+ } finally {+ button.disabled = false;+ button.textContent = label();+ button.setAttribute('aria-pressed', entry.story_consent ? 'true' : 'false');+ button.classList.toggle('sp-btn-primary', !entry.story_consent);+ }+ });+ return button;+}+// Two-step, in place: a destructive action gets a real confirmation, and the// second click is a different button than the first so a double click cannot// delete an entry by accident.@@ -433,6 +485,7 @@ function render() {const sections = [el('div', { class: 'sp-detail-hero' }, [stageFor(entry, { eager: true }), header]),ownerControls(entry),+ verifiedBlock(entry),entry.editable_by_me ? editorPanel() : null,el('p', { class: 'sp-form-note', id: 'sp-detail-note', role: 'status', 'aria-live': 'polite' }),el('div', { class: 'sp-detail-body' }, [main, factsPanel(entry)]),diff --git a/src/spotlight-form.js b/src/spotlight-form.jsindex e5362af85..8173e591a 100644--- a/src/spotlight-form.js+++ b/src/spotlight-form.js@@ -106,6 +106,20 @@ export function buildFields(container, { prefix = 'sp', withAgentPicker = true }autocomplete: 'off',});+ // Story consent: off by default, and only ever set by the builder ticking it.+ // Stories make claims about results, so this is the owner saying yes to that.+ const storyCheckbox = el('input', { type: 'checkbox', id: id('story-consent'), class: 'sp-check-input' });+ const storyConsent = el('div', { class: 'sp-field sp-check' }, [+ storyCheckbox,+ el('label', { for: id('story-consent') }, [+ el('strong', { text: 'Feature this as a success story' }),+ el('span', {+ class: 'sp-hint',+ text: ' Show it on /stories with its verified results (coins launched, creator fees, service income), computed by three.ws. Untick any time to withdraw.',+ }),+ ]),+ ]);+const nodes = [];if (withAgentPicker) {nodes.push(@@ -145,6 +159,7 @@ export function buildFields(container, { prefix = 'sp', withAgentPicker = true }hint: 'Comma separated. Lowercase letters, digits and hyphens.',}),]),+ storyConsent,);container.replaceChildren(...nodes);@@ -157,6 +172,7 @@ export function buildFields(container, { prefix = 'sp', withAgentPicker = true }story: storyArea,demo: demoInput,tags: tagsInput,+ featureStory: storyCheckbox,};wireCounters(container);return refs;@@ -191,6 +207,7 @@ export function fillEntry(refs, entry) {refs.story.value = entry.story || '';refs.demo.value = entry.demo_url || '';refs.tags.value = (entry.tags || []).join(', ');+ refs.featureStory.checked = Boolean(entry.story_consent);for (const input of [refs.title, refs.tagline, refs.story]) {input.dispatchEvent(new Event('input'));}@@ -214,6 +231,7 @@ export function readValues(refs, agentId) {demoUrl: refs.demo.value.trim() || null,category: refs.category.value,tags: parseTags(refs.tags.value),+ featureStory: Boolean(refs.featureStory?.checked),};}diff --git a/src/spotlight-verified.js b/src/spotlight-verified.jsnew file mode 100644index 000000000..cac1af2eb--- /dev/null+++ b/src/spotlight-verified.js@@ -0,0 +1,142 @@+/**+ * "Verified results" for Agent Spotlight entries, shared by /spotlight/:id and+ * /stories.+ *+ * Everything drawn here comes from `entry.verified`, which the server computes+ * from tables the builder cannot type into (api/_lib/spotlight-metrics.js):+ * coins from pump.fun launch records, service income from settled payments and+ * completed hires, creator fees from the agent earnings read model. Each figure+ * carries the link a reader can check it against. A metric that is not measured+ * on this deployment says so; it never renders as a zero.+ */++import { el } from './spotlight-shared.js';++const fmtUsd = (n) =>+ Number(n).toLocaleString('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 2 });++const fmtSol = (n) => `${Number(n).toLocaleString('en-US', { maximumFractionDigits: 4 })} SOL`;++const shortMint = (m) => (m && m.length > 10 ? `${m.slice(0, 4)}…${m.slice(-4)}` : m || '');++function plural(n, one, many) {+ return `${Number(n).toLocaleString('en-US')} ${n === 1 ? one : many}`;+}++function metric(label, value, detail, { muted = false } = {}) {+ return el('div', { class: `sp-vr-metric${muted ? ' is-muted' : ''}` }, [+ el('dt', { class: 'sp-vr-label', text: label }),+ el('dd', { class: 'sp-vr-value', text: value }),+ detail ? el('dd', { class: 'sp-vr-detail' }, detail) : null,+ ]);+}++function sourceLink(href, text) {+ return el('a', { class: 'sp-vr-src', href, target: href.startsWith('http') ? '_blank' : null, rel: href.startsWith('http') ? 'noopener' : null, text });+}++function coinsMetric(v) {+ const n = v.coins.count;+ return metric(+ 'Coins launched',+ n.toLocaleString('en-US'),+ n ? [document.createTextNode('pump.fun launch records')] : [document.createTextNode('None launched yet')],+ );+}++function creatorFeesMetric(v) {+ const f = v.creator_fees;+ if (!f.available) {+ return metric('Creator fees', 'Not measured yet', [document.createTextNode('Earnings tracking is not live here yet')], {+ muted: true,+ });+ }+ const detail = [+ f.usd != null ? document.createTextNode(`${fmtUsd(f.usd)} · `) : null,+ sourceLink(f.source_url, 'Earnings record'),+ ];+ return metric('Creator fees', fmtSol(f.sol), detail);+}++function serviceIncomeMetric(v, { earningsLive }) {+ const s = v.service_income;+ const parts = [];+ if (s.skill_sales_count) parts.push(plural(s.skill_sales_count, 'skill sale', 'skill sales'));+ if (s.hires_count) parts.push(plural(s.hires_count, 'hire', 'hires'));+ const detail = [document.createTextNode(parts.length ? parts.join(' · ') : 'x402 sales and hires')];+ if (earningsLive) detail.push(document.createTextNode(' · '), sourceLink(s.source_url, 'Earnings record'));+ return metric('Service income', fmtUsd(s.usd), detail);+}++function coinList(v, { limit }) {+ const items = v.coins.items.slice(0, limit);+ if (!items.length) return null;+ const more = v.coins.count - items.length;+ return el('ul', { class: 'sp-vr-coins', 'aria-label': 'Coins this agent launched' }, [+ ...items.map((c) =>+ el('li', { class: 'sp-vr-coin' }, [+ el('span', { class: 'sp-vr-coin-name' }, [+ el('strong', { text: c.symbol ? `$${c.symbol}` : c.name || 'Unnamed coin' }),+ c.symbol && c.name ? el('span', { text: c.name }) : null,+ ]),+ el('code', { class: 'sp-vr-mint', title: c.mint, text: shortMint(c.mint) }),+ el('span', { class: 'sp-vr-coin-links' }, [+ el('a', { href: c.launch_url, text: 'Launch page', 'aria-label': `Launch page for ${c.symbol || c.name || c.mint}` }),+ el('a', {+ href: c.solscan_url,+ target: '_blank',+ rel: 'noopener',+ text: 'Solscan ↗',+ 'aria-label': `${c.symbol || c.name || c.mint} on Solscan (opens in a new tab)`,+ }),+ ]),+ ]),+ ),+ more > 0 ? el('li', { class: 'sp-vr-more', text: `and ${plural(more, 'more coin', 'more coins')}` }) : null,+ ]);+}++/**+ * The full block for an entry page. `entry.verified` null means the metrics+ * read failed server-side: say so instead of hiding the section.+ */+export function verifiedBlock(entry, { coinLimit = 6 } = {}) {+ const v = entry.verified;+ const head = el('div', { class: 'sp-vr-head' }, [+ el('h2', { class: 'sp-vr-title', id: 'sp-vr-title', text: 'Verified results' }),+ el('p', {+ class: 'sp-vr-note',+ text: 'Computed by three.ws from launch records, settled payments and on-chain fees. The builder cannot edit these.',+ }),+ ]);+ if (!v) {+ return el('section', { class: 'sp-vr', 'aria-labelledby': 'sp-vr-title' }, [+ head,+ el('p', { class: 'sp-vr-unavailable', role: 'status', text: 'Verified results could not be read right now. Reload in a moment.' }),+ ]);+ }+ const earningsLive = v.live.includes('creator_fees');+ const activity = [];+ if (entry.agent.chat_count > 0) activity.push(plural(entry.agent.chat_count, 'conversation', 'conversations'));+ if (entry.agent.action_count > 0) activity.push(plural(entry.agent.action_count, 'logged action', 'logged actions'));+ return el('section', { class: 'sp-vr', 'aria-labelledby': 'sp-vr-title' }, [+ head,+ el('dl', { class: 'sp-vr-grid' }, [coinsMetric(v), creatorFeesMetric(v), serviceIncomeMetric(v, { earningsLive })]),+ coinList(v, { limit: coinLimit }),+ activity.length ? el('p', { class: 'sp-vr-activity', text: `Activity: ${activity.join(' · ')}.` }) : null,+ ]);+}++/** Compact figures for a /stories card: only the metrics that have a result. */+export function verifiedSummary(entry) {+ const v = entry.verified;+ const chips = [];+ if (v.coins.count) chips.push(['Coins launched', v.coins.count.toLocaleString('en-US')]);+ if (v.creator_fees.available && Number(v.creator_fees.sol) > 0) chips.push(['Creator fees', fmtSol(v.creator_fees.sol)]);+ if (v.service_income.usd > 0) chips.push(['Service income', fmtUsd(v.service_income.usd)]);+ return el('dl', { class: 'sp-vr-grid sp-vr-grid-compact' }, [+ ...chips.map(([k, val]) => metric(k, val, null)),+ ]);+}++export { coinList as verifiedCoinList };diff --git a/src/spotlight.css b/src/spotlight.cssindex 0e221fd5a..99f801ef0 100644--- a/src/spotlight.css+++ b/src/spotlight.css@@ -1245,3 +1245,342 @@min-height: 300px;}}++/* ── story consent checkbox (submit + edit form) ─────────────────────── */++.sp-check {+ display: grid;+ grid-template-columns: auto minmax(0, 1fr);+ gap: var(--space-sm, 12px);+ align-items: start;+ padding: var(--space-sm, 12px) var(--space-md, 16px);+ border: 1px solid var(--stroke, rgba(255, 255, 255, 0.1));+ border-radius: var(--radius-md, 10px);+ background: var(--surface-1, rgba(255, 255, 255, 0.03));+}++.sp-check label {+ font-size: var(--text-md, 13px);+ line-height: var(--leading-normal, 1.6);+ color: var(--ink, rgba(255, 255, 255, 0.86));+ cursor: pointer;+}++.sp-check-input {+ width: 18px;+ height: 18px;+ margin: 2px 0 0;+ accent-color: var(--success, #4ade80);+ cursor: pointer;+}++.sp-check-input:focus-visible {+ outline: 2px solid var(--focus-ring, var(--ink-bright, #fff));+ outline-offset: 2px;+}++/* ── verified results (entry page + /stories) ────────────────────────── */++.sp-vr {+ display: grid;+ gap: var(--space-md, 16px);+ padding: var(--space-lg, 24px);+ border: 1px solid color-mix(in srgb, var(--success, #4ade80) 28%, var(--stroke, rgba(255, 255, 255, 0.1)));+ border-radius: var(--radius-lg, 14px);+ background: color-mix(in srgb, var(--success, #4ade80) 4%, var(--surface-1, rgba(255, 255, 255, 0.03)));+}++.sp-vr-head {+ display: grid;+ gap: 4px;+}++.sp-vr-title {+ margin: 0;+ font-family: var(--font-display);+ font-size: var(--text-lg, 20px);+ color: var(--ink-bright, #fff);+}++.sp-vr-note,+.sp-vr-activity,+.sp-vr-unavailable {+ margin: 0;+ font-size: var(--text-md, 13px);+ line-height: var(--leading-normal, 1.6);+ color: var(--ink-dim, rgba(255, 255, 255, 0.6));+}++.sp-vr-grid {+ display: grid;+ gap: var(--space-sm, 12px);+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));+ margin: 0;+}++.sp-vr-metric {+ display: grid;+ gap: 2px;+ align-content: start;+ padding: var(--space-sm, 12px) var(--space-md, 16px);+ border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));+ border-radius: var(--radius-md, 10px);+ background: var(--surface-1, rgba(255, 255, 255, 0.03));+ min-width: 0;+}++.sp-vr-label {+ font-family: var(--font-mono);+ font-size: var(--text-2xs, 11px);+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--ink-faint, rgba(255, 255, 255, 0.45));+}++.sp-vr-value {+ margin: 0;+ font-size: var(--text-lg, 20px);+ font-weight: var(--weight-semibold, 600);+ font-variant-numeric: tabular-nums;+ color: var(--ink-bright, #fff);+ overflow-wrap: anywhere;+}++.sp-vr-metric.is-muted .sp-vr-value {+ font-size: var(--text-ui, 14px);+ font-weight: var(--weight-medium, 500);+ color: var(--ink-dim, rgba(255, 255, 255, 0.6));+}++.sp-vr-detail {+ margin: 0;+ font-size: var(--text-2xs, 11px);+ line-height: 1.5;+ color: var(--ink-faint, rgba(255, 255, 255, 0.5));+}++.sp-vr-src,+.sp-vr-coin-links a {+ color: var(--ink, rgba(255, 255, 255, 0.86));+ text-decoration: underline;+ text-decoration-color: var(--stroke-strong, rgba(255, 255, 255, 0.3));+ text-underline-offset: 2px;+ transition: text-decoration-color var(--duration-fast, 120ms) var(--ease-standard, ease);+}++.sp-vr-src:hover,+.sp-vr-coin-links a:hover {+ text-decoration-color: currentColor;+}++.sp-vr-src:focus-visible,+.sp-vr-coin-links a:focus-visible {+ outline: 2px solid var(--focus-ring, var(--ink-bright, #fff));+ outline-offset: 2px;+ border-radius: 3px;+}++.sp-vr-coins {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ gap: 6px;+}++.sp-vr-coin {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto auto;+ gap: var(--space-sm, 12px);+ align-items: center;+ padding: 8px var(--space-sm, 12px);+ border-radius: var(--radius-md, 10px);+ background: var(--surface-1, rgba(255, 255, 255, 0.03));+ font-size: var(--text-md, 13px);+}++.sp-vr-coin-name {+ display: flex;+ gap: 8px;+ align-items: baseline;+ min-width: 0;+ overflow: hidden;+ white-space: nowrap;+ text-overflow: ellipsis;+}++.sp-vr-coin-name strong {+ color: var(--ink-bright, #fff);+}++.sp-vr-coin-name span {+ color: var(--ink-faint, rgba(255, 255, 255, 0.5));+ overflow: hidden;+ text-overflow: ellipsis;+}++.sp-vr-mint {+ font-family: var(--font-mono);+ font-size: var(--text-2xs, 11px);+ color: var(--ink-dim, rgba(255, 255, 255, 0.6));+}++.sp-vr-coin-links {+ display: flex;+ gap: var(--space-sm, 12px);+ white-space: nowrap;+}++.sp-vr-more {+ padding: 0 var(--space-sm, 12px);+ font-size: var(--text-md, 13px);+ color: var(--ink-faint, rgba(255, 255, 255, 0.5));+}++@media (max-width: 560px) {+ .sp-vr {+ padding: var(--space-md, 16px);+ }++ .sp-vr-coin {+ grid-template-columns: minmax(0, 1fr) auto;+ }++ .sp-vr-coin-links {+ grid-column: 1 / -1;+ }+}++/* ── /stories ────────────────────────────────────────────────────────── */++.st-method {+ margin: var(--space-md, 16px) 0 0;+ max-width: 72ch;+ font-size: var(--text-md, 13px);+ line-height: var(--leading-normal, 1.6);+ color: var(--ink-faint, rgba(255, 255, 255, 0.5));+}++.st-group {+ display: grid;+ gap: var(--space-md, 16px);+ margin-top: var(--space-xl, 32px);+}++.st-group-title {+ margin: 0;+ font-family: var(--font-display);+ font-size: var(--text-lg, 20px);+ color: var(--ink-bright, #fff);+}++.st-grid {+ display: grid;+ gap: var(--space-md, 16px);+ grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));+}++@media (max-width: 400px) {+ .st-grid {+ grid-template-columns: minmax(0, 1fr);+ }+}++.st-card {+ display: grid;+ gap: var(--space-sm, 12px);+ align-content: start;+ padding: var(--space-md, 16px);+ border: 1px solid var(--stroke, rgba(255, 255, 255, 0.1));+ border-radius: var(--radius-lg, 14px);+ background: var(--surface-1, rgba(255, 255, 255, 0.03));+ transition:+ border-color var(--duration-fast, 120ms) var(--ease-standard, ease),+ transform var(--duration-fast, 120ms) var(--ease-standard, ease);+}++.st-card:hover,+.st-card:focus-within {+ border-color: var(--stroke-strong, rgba(255, 255, 255, 0.24));+ transform: translateY(-1px);+}++.st-card-head {+ display: grid;+ grid-template-columns: 56px minmax(0, 1fr);+ gap: var(--space-sm, 12px);+ align-items: center;+}++.st-card-head img,+.st-card-head .sp-mono {+ width: 56px;+ height: 56px;+ border-radius: var(--radius-md, 10px);+ object-fit: cover;+ position: static;+ font-size: var(--text-lg, 20px);+}++.st-card-title {+ margin: 0;+ font-size: var(--text-base, 16px);+ font-weight: var(--weight-semibold, 600);+ line-height: var(--leading-tight, 1.3);+ color: var(--ink-bright, #fff);+}++.st-card-by {+ margin: 2px 0 0;+ font-size: var(--text-md, 13px);+ color: var(--ink-faint, rgba(255, 255, 255, 0.5));+}++.st-card-by a {+ color: inherit;+}++.st-card-tagline {+ margin: 0;+ font-size: var(--text-ui, 14px);+ line-height: var(--leading-normal, 1.6);+ color: var(--ink-dim, rgba(255, 255, 255, 0.7));+}++.sp-vr-grid-compact {+ grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));+ gap: 8px;+}++.sp-vr-grid-compact .sp-vr-metric {+ padding: 8px 10px;+}++.sp-vr-grid-compact .sp-vr-value {+ font-size: var(--text-base, 16px);+}++.st-card-foot {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ margin-top: 4px;+}++.st-skel {+ height: 260px;+ border-radius: var(--radius-lg, 14px);+}++@media (prefers-reduced-motion: reduce) {+ .st-card,+ .sp-vr-src,+ .sp-vr-coin-links a {+ transition: none;+ }++ .st-card:hover,+ .st-card:focus-within {+ transform: none;+ }+}diff --git a/src/stories.js b/src/stories.jsnew file mode 100644index 000000000..cb0d9a928--- /dev/null+++ b/src/stories.js@@ -0,0 +1,122 @@+/**+ * /stories: success stories with results anyone can check.+ *+ * Reads GET /api/spotlight/stories, which returns only Agent Spotlight entries+ * whose agent OWNER opted in (curated write-ups never qualify on their own) and+ * whose agent has at least one verified result: a coin launched, creator fees,+ * or service income. Figures are computed server-side+ * (api/_lib/spotlight-metrics.js); this page only draws them, grouped by+ * category, each card linking to the full entry and to the coin on Solscan.+ *+ * Few entries qualify at first, so the empty state is the page most visitors+ * see early on. It tells a builder exactly how to get on it.+ */++import { apiFetch } from './api.js';+import { el, entryPath, errorMessage, monogram } from './spotlight-shared.js';+import { verifiedSummary, verifiedCoinList } from './spotlight-verified.js';++const root = document.getElementById('st-root');+const methodEl = document.getElementById('st-method');++function card(entry) {+ const art = entry.agent.thumbnail+ ? el('img', { src: entry.agent.thumbnail, alt: '', loading: 'lazy', decoding: 'async', width: 56, height: 56 })+ : monogram(entry.agent);+ const by = [el('span', { text: entry.agent.name })];+ if (entry.builder?.name) {+ by.push(document.createTextNode(' · built by '));+ by.push(+ entry.builder.profile_url+ ? el('a', { href: entry.builder.profile_url, text: entry.builder.name })+ : el('span', { text: entry.builder.name }),+ );+ }+ return el('article', { class: 'st-card', 'aria-labelledby': `st-${entry.id}` }, [+ el('div', { class: 'st-card-head' }, [+ art,+ el('div', {}, [+ el('h3', { class: 'st-card-title', id: `st-${entry.id}`, text: entry.title }),+ el('p', { class: 'st-card-by' }, by),+ ]),+ ]),+ el('p', { class: 'st-card-tagline', text: entry.tagline }),+ verifiedSummary(entry),+ verifiedCoinList(entry.verified, { limit: 3 }),+ el('div', { class: 'st-card-foot' }, [+ el('a', { class: 'sp-btn sp-btn-sm sp-btn-primary', href: entryPath(entry), text: 'Read the full story' }),+ el('a', { class: 'sp-btn sp-btn-sm', href: `/agents/${entry.agent.id}`, text: `Talk to ${entry.agent.name}` }),+ ]),+ ]);+}++function renderGroups(groups) {+ root.replaceChildren(+ ...groups.map((g) =>+ el('section', { class: 'st-group', 'aria-labelledby': `st-g-${g.slug}` }, [+ el('h2', { class: 'st-group-title', id: `st-g-${g.slug}`, text: g.label }),+ el('div', { class: 'st-grid' }, g.entries.map(card)),+ ]),+ ),+ );+}++function renderEmpty(consented) {+ const waiting =+ consented > 0+ ? `${consented.toLocaleString('en-US')} ${consented === 1 ? 'builder has' : 'builders have'} opted in and will appear here as soon as their agent has a verified result.`+ : null;+ root.replaceChildren(+ el('section', { class: 'sp-empty' }, [+ el('h3', { text: 'No success stories yet. Yours could be the first.' }),+ el('p', {+ text: 'A story is a Spotlight entry whose builder chose to feature it, for an agent with a result anyone can check: a coin it launched, creator fees it earned, or income from other agents paying for its skills.',+ }),+ waiting ? el('p', { text: waiting }) : null,+ el('p', {+ text: 'New entry: tick "Feature this as a success story" when you submit. Already showcased: open your entry and choose "Feature as a success story".',+ }),+ el('div', { class: 'sp-ctas' }, [+ el('a', { class: 'sp-btn sp-btn-primary', href: '/spotlight?submit=1', text: 'Submit your agent' }),+ el('a', { class: 'sp-btn', href: '/launch', text: 'Launch a coin for your agent' }),+ ]),+ ]),+ );+}++function renderError(message) {+ const retry = el('button', { type: 'button', class: 'sp-btn sp-btn-primary', text: 'Try again' });+ retry.addEventListener('click', load);+ root.replaceChildren(+ el('section', { class: 'sp-error', role: 'alert' }, [+ el('h3', { text: 'Stories did not load' }),+ el('p', { text: `${message}. The showcase itself is unaffected.` }),+ el('div', { class: 'sp-ctas' }, [retry, el('a', { class: 'sp-btn', href: '/spotlight', text: 'Open the showcase' })]),+ ]),+ );+}++function renderSkeleton() {+ root.replaceChildren(+ el('div', { class: 'st-grid', 'aria-hidden': 'true' }, [1, 2, 3].map(() => el('div', { class: 'sp-skeleton st-skel' }))),+ );+}++async function load() {+ root.setAttribute('aria-busy', 'true');+ renderSkeleton();+ try {+ const res = await apiFetch('/api/spotlight/stories', { allowAnonymous: true });+ const data = await res.json().catch(() => null);+ if (!res.ok) throw new Error(errorMessage(data, `the stories feed returned ${res.status}`));+ if (methodEl && data.method) methodEl.textContent = `How it works: ${data.method}`;+ if (!data.total) renderEmpty(data.consented || 0);+ else renderGroups(data.groups || []);+ } catch (err) {+ renderError(err?.message || 'could not reach the stories feed');+ } finally {+ root.setAttribute('aria-busy', 'false');+ }+}++load();diff --git a/vercel.json b/vercel.jsonindex 6d732cb4e..644fcee8e 100644--- a/vercel.json+++ b/vercel.json@@ -1058,6 +1058,10 @@"src": "/spotlight/?$","dest": "/spotlight.html"},+ {+ "src": "/stories/?$",+ "dest": "/stories.html"+ },{"src": "/pocket/?$","headers": {diff --git a/vite.config.js b/vite.config.jsindex c9b6eabff..eefb5c78c 100644--- a/vite.config.js+++ b/vite.config.js@@ -673,6 +673,7 @@ const appConfig = {spotlight: resolve(__dirname, 'pages/spotlight.html'),'skills-community': resolve(__dirname, 'pages/skills-community.html'),'spotlight-entry': resolve(__dirname, 'pages/spotlight-entry.html'),+ stories: resolve(__dirname, 'pages/stories.html'),certificate: resolve(__dirname, 'pages/certificate.html'),'print-insert': resolve(__dirname, 'pages/print-insert.html'),app: resolve(__dirname, 'pages/app.html'),@@ -1667,6 +1668,8 @@ const appConfig = {'/skills/community/': resolve(root, 'pages/skills-community.html'),'/spotlight': resolve(root, 'pages/spotlight.html'),'/spotlight/': resolve(root, 'pages/spotlight.html'),+ '/stories': resolve(root, 'pages/stories.html'),+ '/stories/': resolve(root, 'pages/stories.html'),'/cert': resolve(root, 'pages/certificate.html'),'/cert/': resolve(root, 'pages/certificate.html'),'/airdrops': resolve(root, 'pages/airdrops.html'),