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
fix(dashboard): show which API keys are still usable instead of rendering dead ones as live
nirholasa5de1eda119c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0ca1f4ef6..5e68dbcf3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,8 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-08-13- **A shared walk card no longer sends people to an avatar that is gone**: Sharing a walk produces a card you can post on Farcaster, with a button that opens that avatar walking. A cast stays up forever, but the avatar behind it does not: it can be deleted, or switched to private. When that happened the button still pointed at the missing avatar, so anyone who tapped it landed on a walk that could never load, and the card's second button pointed at the same place as the first, so both said the same thing. The card now checks the avatar before it builds. If the avatar is gone or private it drops the link and invites you to walk your own instead of handing you a dead button, and if the check itself cannot run the link is kept rather than thrown away. The second button now goes to the avatar builder, so the two buttons finally offer two different things. The card also carries its image dimensions now, which stops the preview from reflowing while it loads. (`/walk`) `[fix]`+- **A Terms acceptance is only recorded when we could actually read the request**: When you agree to the Terms of Service or the real-funds risk disclosure, three.ws keeps a durable, permanent record of which version you accepted and when. The Terms endpoint could write one of those records from a request whose contents it never managed to read: a request sent in the wrong format, or one too large to accept, was answered as a successful acceptance of the current Terms even though nothing in it had been understood. That is the one thing an evidentiary record must never do, and it no longer happens. Both acceptance endpoints now refuse an unreadable request and say precisely what was wrong with it (too large, wrong format, or unreadable) instead of blaming the version field, and they record nothing on those paths. (`/legal/tos`) `[fix, security]`+- **Adding your agent to a LobeHub chat no longer loses its name when one lookup stumbles**: Before a chat host renders your agent, it asks three.ws to confirm the agent exists and to hand back the sites you allow it to be embedded on. Those are two separate reads, and if the second one hiccuped the whole answer was thrown away: the host was told the agent could not be confirmed and was given no name, even though the first read had just found it. The confirmation and the name now survive a stumble on the embed settings. Separately, a misspelled address in a host's setup returned an explanation the browser refused to show, so integrators saw an unexplained network failure instead of the message naming their typo. That message now reaches them. `[fix]`- **An avatar rendered through the MCP server can no longer be turned into a tracking beacon**: When an AI assistant renders one of your avatars through the three.ws MCP server, the server builds a small viewer page and the assistant displays it. The caller picks the background for that page. The check on that value blocked anything that could break out of the styling, but it still allowed a CSS url(), so a caller could point the background at an image on a server they control and quietly collect the address and referring page of everyone who ever viewed that avatar. Backgrounds and gradients never need url(), so it is refused outright now and the safe default is used instead. A second fix went in with it: the server works out its own public web address to build the links it hands back, and its test for a local development address matched anywhere in the name instead of the whole name, so a request arriving with a forged host like evil-127.0.0.1.example.com was treated as local and got plain http links rather than https. That test is now anchored to the whole host, and IPv6 loopback is recognised properly. The animation tools also stopped treating built-in JavaScript property names as though they were real animation clips, and the shared MCP helpers behind all of this are now covered by tests. (`/docs/mcp`) `[security, fix]`- **An expired Bitcoin inscription order now says so, instead of looking like a broken server**: The Forever page writes your message into Bitcoin, then keeps a pay screen open while you send the payment from your own wallet. That screen is restored when you come back to the tab. If the inscription order behind it had since expired, the page had no way to say so: the server reported an order it could not find as a server fault, so the pay screen either sat there polling an order that no longer existed, or repainted itself empty with no charge address and no explanation. An order that no longer exists is now reported as exactly that, and the page retires it, tells you nothing was charged, and puts you back at the message box to start a new one. Three related fixes went in with it. An inscription that the provider rejected could come back marked as success, which briefly showed a pay screen for an order that was never created; every provider failure is now reported as one. A receive address with a typo is now caught by its checksum before the order is created, and tells you to recopy it from your wallet, rather than failing later with a message that explained nothing. And an order that expired unpaid is no longer counted as paid. (`/forever`) `[fix]`- **Copy-trading set up by an agent now keeps its alerts and can pay its leader**: Agents that arrange copy-trading through the MCP tools hit three problems. A Telegram chat supplied for copy alerts was thrown away, and worse, adjusting an existing subscription erased the chat already set on the dashboard, so the alerts stopped. Subscriptions created this way also never recorded the leader payout wallet, which meant the leader performance fee could not be settled on them. And when the database was briefly unreachable, the tools answered with a confident wrong answer: your leader does not exist, or you have no subscriptions at all. Alerts and the payout wallet are now stored correctly, an outage says plainly that the service is temporarily unavailable, two agents subscribing at the same moment no longer collide, and a trader profile now returns the open positions it always advertised so a leader can be vetted before being copied. (`/dashboard/copy`) `[fix]`@@ -23,10 +25,14 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **The decentralized inference demo stops sending your prompt to a gateway that is no longer Livepeer**: The decentralized inference lab runs the same prompt through our own inference chain and through a Livepeer AI gateway, side by side. The free no-key gateway it used has not been Livepeer since early August: that hostname now points at an unrelated server. The demo kept posting prompts to it on every run and showing a bare connection error. It no longer dials that host at all. The decentralized card now reports the gateway as unavailable and names the two settings that bring it back (a Livepeer Studio key, or the address of a self-hosted gateway), and a self-hosted address is now honored by both this demo and the Forge Livepeer lane from one shared setting. The call also has a time limit, so a gateway that accepts the connection and then goes quiet can no longer hold up the reply from the other side of the comparison. (`/demos`) `[fix, improvement]`- **The extra views behind a 3D generation stop being rejected for the wrong file type**: Before a prompt becomes a 3D model, the forge draws a reference picture, then draws two more views of it so the reconstruction can see the sides and back instead of guessing them. Those extra views sent the reference picture to the image model labelled as a PNG no matter what it actually was, so a JPEG or WebP reference could be refused outright and you would quietly get fewer views and a rougher model. The real format is now read from the picture and sent with it. A reference that is unreachable, oversized, or not actually an image is now refused with a clear reason instead of being forwarded as-is and failing further down. And every image this step fetches, including the optional edit mask, now goes through the same address safety check the rest of the platform uses, so a supplied link cannot be aimed at an internal address. (`/create`) `[fix, security]`- **The image step behind 3D generation now times out, checks its inputs, and stops mislabelling them**: Before a prompt becomes a 3D model, the forge draws a reference picture, then draws two extra views of it so the reconstruction can see the sides and back instead of guessing them. Three problems sat in that step. The calls to the image service had no time limit, so a connection that opened and then stalled held a generation open indefinitely rather than falling back to the free image lane; they now give up after ninety seconds and hand off. The extra views sent the reference picture to the model labelled as a PNG no matter what it actually was, so a JPEG or WebP reference could be rejected and you would quietly get fewer views; the real format is now read from the picture and sent with it. And a reference that is unreachable or oversized is refused with a clear reason instead of being forwarded as-is. Alongside that, every image this step fetches, including the optional mask, now goes through the same address safety check the rest of the platform uses, so a supplied URL cannot be aimed at an internal address. (`/create`) `[fix, security]`+- **The Livepeer comparison demo reads every answer shape an orchestrator can return**: The side-by-side inference demo runs your prompt on the three.ws provider chain and on a Livepeer AI gateway at the same time. Orchestrators on that network run different inference servers, and some return the answer as a list of text pieces rather than one block of text. The demo could not read that form: a perfectly good answer came back as a card reading 'leg_failed' with a programming error in it, and the gateway and timing details vanished from the card. Those answers now render normally, and a reply in a shape nobody recognises is reported as an empty response with the gateway, latency, and model still shown. (`/demos/livepeer-inference`) `[fix]`- **The Money-Cam stops going dark when its feed stumbles, and stops replaying old transfers as new light**: The Agent Galaxy renders real money moving between agent wallets: every pulse of light is one on-chain transfer you can open in an explorer. The map loads a window of recent flows, then asks every few seconds for only the ones newer than the last it saw. If the feed query failed or ran long, the map was supposed to fall back to the last good window it had built, so it kept its picture instead of blanking. It never could: the saved copy and the small update polls shared one slot, so each poll (which by design carries almost nothing) overwrote the saved window seconds after it was written, leaving nothing to fall back to. Worse, when an update poll itself failed it was answered with that saved window, which is older than what the viewer already had, so the map rewound its place in the stream and could re-animate long-past transfers as if the money were moving right now. The saved window now belongs to the full load alone. A failed update poll returns nothing new and hands the viewer's own position straight back, so it waits for the next poll instead of travelling backwards, and a failed request for older history honestly reports that there is no more to load. Separately, a fractional page size in the address bar (?limit=1.5) made the feed query fail outright and the whole galaxy report itself as quiet while it was busy; page sizes are now rounded before they are used. (`/galaxy`) `[fix]`- **The Rankings remix board now counts only real remixes from other creators**: The Remixes Received board on /rankings was meant to answer one question: how many other people built on top of your work. It was counting more than that. Every time you refined one of your own models the forge recorded the new version as a derivative of the old one, and the board counted it, so re-refining your own model climbed the ranking exactly like someone else remixing you would. Generations that failed partway through were counted too. Both are gone: a row only counts when it is a finished model made by a different creator, and an anonymous remix of your work still counts because that really is someone else. Ranks on that one metric will shift accordingly. Separately, the Daily Match standings endpoint now sends the cross-origin header the rest of our public read-only endpoints send, so anything reading the board from outside three.ws (dashboards, agent tooling, embeds) gets the data instead of a blocked request. (`/rankings`) `[fix, improvement]`- **The Reasoning Ledger stops hiding older history, and private agents stay private**: Every agent's Reasoning Ledger is a public, tamper-evident record of what it decided and why, so the reads behind it have to be honest. Three things were not. Asking for a page larger than the 200-decision maximum quietly returned a trimmed page and then reported that there was nothing after it, so a caller reading the whole history could stop early believing they had seen all of it; page sizes are now checked against the real maximum and the follow-on cursor is always correct. A malformed page cursor (a word where a sequence number belongs) came back as a generic internal error instead of saying what was wrong, and an unbounded search filter could drive a full scan of an agent's history; both now return a clear bad-request reply. And the timeline was publishing the name and picture of agents whose owners had made them private or deleted them: the decision history stays public, but an unlisted agent now appears as its id alone. The independent verification endpoint also shows the on-chain anchor even when verification fails, which is exactly when an auditor needs to see the commitment the altered history no longer matches. (`/ledger`) `[fix, security]`- **The three.ws launchpad directory answers a bad filter instead of erroring out**: The public directory of coins launched on the three.ws bonding curve accepts an agent filter, so a page can show only the coins one agent launched. A filter value that was not a real agent id went straight to the database, which rejected it and turned the whole request into an unexplained server error. Anything that is not a valid agent id now comes back immediately as a plain validation error naming the problem, so a mistyped link fails clearly instead of looking like the launchpad is down. The endpoint documentation now states the same contract, including the page-size and offset limits, and the behaviour is pinned by tests. (`/launches`) `[fix]`+- **The trial queue headline now names the mint that actually holds the most**: Trial Conversions shows sellers one headline number: the revenue waiting in the trial queue, with the token it is denominated in. Totals are kept separately per token, because ten of a six-decimal token and ten of a nine-decimal one are not the same amount, but the choice of which total to promote to the headline was made by comparing the raw stored integers across tokens. Those integers are scaled differently per token, so 0.9 of one token outranked 5 of another: a seller pricing skills in two currencies saw the smaller pile in the headline while the larger one sat below it. The totals are now compared at the same scale, so the headline is the biggest real one and the per-token list under it is ordered to match. (`/conversions`) `[fix]`+- **Your API keys now show whether they still work, and a key can no longer be issued with no permissions at all**: The API keys table in your developer dashboard listed every key you had ever created, but nothing on the row said which ones were still usable. A key you had already revoked looked exactly like a live one, right down to a Revoke button that could only ever fail, and a key that had passed its expiry date looked perfectly healthy until a request mysteriously stopped working. Every key now carries an Active, Expired, or Revoked label, dead keys are dimmed, and the Revoke button is only shown where it can do something. The connection tester also stops picking an expired key to test with. Separately, creating a key through the API with an explicitly empty permission list used to succeed and hand back a credential that could not do anything, with nothing to tell you so; that request is now rejected with a clear message, and a permission listed twice is stored once. (`/dashboard/api`) `[fix, improvement]`+- **Your friends list no longer goes blank when the database is mid-upgrade, and search finds unusual names**: Two problems in the friends area. The friends list is built to survive an environment where the social tables have not been created yet: it shows an empty list instead of an error. That safety net was matching on the wording of the database error rather than its type, and the wording it looked for also appears when a single column is missing, which is what a partly-applied upgrade looks like. So during an upgrade the page answered normally and told you that you had no friends, no incoming requests, and no pending invites, with nothing anywhere reporting a fault. The safety net now recognises only a genuinely missing table, and any other database problem is reported as the error it is. Separately, friend search could not find a display name containing a backslash, and a search term ending in one quietly searched for something else, because the search was not escaping the backslash before handing the term to the database. (`/walk`) `[fix]`## 2026-08-12diff --git a/data/changelog.json b/data/changelog.jsonindex 8accc7e9e..04a8f437b 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,60 @@{"$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-08-13",+ "title": "Retro computing prompts are no longer refused by the 3D Studio safety gate",+ "summary": "The free 3D Studio screens every prompt for age-inappropriate content before it starts generating. That screen matched the bare abbreviation \"cp\" as a whole word, so ordinary modeling prompts like \"a CP/M retro computer terminal\" or \"a CP violation physics diagram\" were refused, and refused under the harshest category the screen has. The abbreviation is gone and the spelled-out terms it stood for are now matched directly, so those prompts generate normally while the genuinely harmful ones are still blocked before any work starts.",+ "tags": [+ "fix"+ ]+ },+ {+ "date": "2026-08-13",+ "title": "Adding your agent to a LobeHub chat no longer loses its name when one lookup stumbles",+ "summary": "Before a chat host renders your agent, it asks three.ws to confirm the agent exists and to hand back the sites you allow it to be embedded on. Those are two separate reads, and if the second one hiccuped the whole answer was thrown away: the host was told the agent could not be confirmed and was given no name, even though the first read had just found it. The confirmation and the name now survive a stumble on the embed settings. Separately, a misspelled address in a host's setup returned an explanation the browser refused to show, so integrators saw an unexplained network failure instead of the message naming their typo. That message now reaches them.",+ "tags": [+ "fix"+ ]+ },+ {+ "date": "2026-08-13",+ "title": "The trial queue headline now names the mint that actually holds the most",+ "summary": "Trial Conversions shows sellers one headline number: the revenue waiting in the trial queue, with the token it is denominated in. Totals are kept separately per token, because ten of a six-decimal token and ten of a nine-decimal one are not the same amount, but the choice of which total to promote to the headline was made by comparing the raw stored integers across tokens. Those integers are scaled differently per token, so 0.9 of one token outranked 5 of another: a seller pricing skills in two currencies saw the smaller pile in the headline while the larger one sat below it. The totals are now compared at the same scale, so the headline is the biggest real one and the per-token list under it is ordered to match.",+ "tags": [+ "fix"+ ],+ "link": "/conversions"+ },+ {+ "date": "2026-08-13",+ "title": "Your API keys now show whether they still work, and a key can no longer be issued with no permissions at all",+ "summary": "The API keys table in your developer dashboard listed every key you had ever created, but nothing on the row said which ones were still usable. A key you had already revoked looked exactly like a live one, right down to a Revoke button that could only ever fail, and a key that had passed its expiry date looked perfectly healthy until a request mysteriously stopped working. Every key now carries an Active, Expired, or Revoked label, dead keys are dimmed, and the Revoke button is only shown where it can do something. The connection tester also stops picking an expired key to test with. Separately, creating a key through the API with an explicitly empty permission list used to succeed and hand back a credential that could not do anything, with nothing to tell you so; that request is now rejected with a clear message, and a permission listed twice is stored once.",+ "tags": [+ "fix",+ "improvement"+ ],+ "link": "/dashboard/api"+ },+ {+ "date": "2026-08-13",+ "title": "A Terms acceptance is only recorded when we could actually read the request",+ "summary": "When you agree to the Terms of Service or the real-funds risk disclosure, three.ws keeps a durable, permanent record of which version you accepted and when. The Terms endpoint could write one of those records from a request whose contents it never managed to read: a request sent in the wrong format, or one too large to accept, was answered as a successful acceptance of the current Terms even though nothing in it had been understood. That is the one thing an evidentiary record must never do, and it no longer happens. Both acceptance endpoints now refuse an unreadable request and say precisely what was wrong with it (too large, wrong format, or unreadable) instead of blaming the version field, and they record nothing on those paths.",+ "tags": [+ "fix",+ "security"+ ],+ "link": "/legal/tos"+ },+ {+ "date": "2026-08-13",+ "title": "The Livepeer comparison demo reads every answer shape an orchestrator can return",+ "summary": "The side-by-side inference demo runs your prompt on the three.ws provider chain and on a Livepeer AI gateway at the same time. Orchestrators on that network run different inference servers, and some return the answer as a list of text pieces rather than one block of text. The demo could not read that form: a perfectly good answer came back as a card reading 'leg_failed' with a programming error in it, and the gateway and timing details vanished from the card. Those answers now render normally, and a reply in a shape nobody recognises is reported as an empty response with the gateway, latency, and model still shown.",+ "tags": [+ "fix"+ ],+ "link": "/demos/livepeer-inference"+ },{"date": "2026-08-13","title": "Your friends list no longer goes blank when the database is mid-upgrade, and search finds unusual names",diff --git a/docs/developer-platform.md b/docs/developer-platform.mdindex 7d0d10484..4e3b8555c 100644--- a/docs/developer-platform.md+++ b/docs/developer-platform.md@@ -66,8 +66,11 @@ Keys are stored as a SHA-256 hash. The plaintext secret is returned **exactlyonce**, in the create response. Only the 12-character prefix is kept fordisplay.-All three key-management routes share one rate limit bucket: **30 requests per-hour** per user.+Each key-management route has its own rate limit bucket, per user, so that one+cannot starve another: minting is **30 per hour**, listing is **120 per+minute** (the dashboard lists on every load and after every mutation), and+revoking is **60 per hour** (killing a leaked key must never be blocked by a+spent mint budget).### POST /api/keys@@ -114,9 +117,14 @@ Response, `201`:Store `secret` now; it is never returned again.+Repeated scopes are stored once. Sending `scope` as an empty or whitespace-only+string is rejected rather than defaulted: it would mint a key that grants+nothing. Omit the field entirely to take the default.+Errors: `401 unauthorized`, `403 csrf_missing` / `csrf_invalid`,-`400 validation_error` (zod issues, or `unknown scopes: <list>` for a scope-outside the allowed set), `429 rate_limited`.+`400 validation_error` (zod issues, `unknown scopes: <list>` for a scope+outside the allowed set, or `scope must name at least one permission`),+`429 rate_limited`.### GET /api/keys@@ -161,8 +169,9 @@ curl -s -X DELETE "https://three.ws/api/keys/$KEY_ID" \Response, `200`: `{ "ok": true }`-Errors: `404 not_found` when the key does not exist, belongs to someone else,-or is already revoked.+Errors: `400 invalid_id` when `:id` is not a UUID, `401 unauthorized`,+`403 csrf_missing` / `csrf_invalid`, `404 not_found` when the key does not+exist, belongs to someone else, or is already revoked, `429 rate_limited`.---diff --git a/prompts/swarm-100/api-lobehub-01.md b/prompts/swarm-100/api-lobehub-01.mddeleted file mode 100644index 6506efc43..000000000--- a/prompts/swarm-100/api-lobehub-01.md+++ /dev/null@@ -1,101 +0,0 @@-# API audit: api/lobehub batch 01 (1 files)--How to run: paste this file's repo path into a fresh Claude Code chat in this-repository and say "run this work order". This file is fully self-contained:-it depends on no other prompt file anywhere. If neighboring files in-prompts/swarm-100/ are gone, that work is done; if present, ignore them.-Every claim below rots; step 0 re-measures, and what you measure wins.--## Operating clause (binding)--- Read CLAUDE.md first. Its rules override everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option- list, or an unexecuted plan. A judgment call goes in one line of the final- report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real- funds or any irreversible on-chain write, git push or a production deploy,- committing content that references a crypto project other than $THREE, and- destroying unrecoverable data.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no- commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a- bare add-everything), and commit finished work promptly.-- Before committing, run: npm run check:rules -- --paths <files you touched>.- It must exit 0.--## Step 0: re-derive the current state--1. Confirm each file below still exists; deleted ones are done, skip them.-2. For each, decide routability: grep its path in vercel.json and read how- server/index.mjs maps filesystem handlers. Routed files get an endpoint- audit; internal modules get a code and test audit.-3. Start a local server for endpoint checks: node server/index.mjs with .env- loaded, on a free PORT if 3000 is busy.--## Task: audit these api files, then fix everything found--Files in this batch:--- api/lobehub/[action].js--For every routed handler:--1. Exercise it with curl against the local server: the success path returns- real data with the correct status; malformed input returns a 4xx JSON- error, never a stack trace or an HTML error page; auth is enforced where- the code intends it; CORS matches neighboring handlers.-2. Hard-rule scan: no mock fallbacks, no fake-data arrays, no stubbed- responses, no unfinished markers. Errors are handled at the boundary and- internal code trusts itself.-3. Do not spend funds or sign anything on-chain while probing. Payment and- trading handlers get their validation and error paths exercised, never a- live settlement.--For every internal (non-routed) module:--4. Something must import it; if nothing does, delete it as dead code (verify- with a repo-wide grep first).-5. Its main path and one failure path must be covered in tests/; add the- missing test if not.--## Definition of done--- [ ] Every listed file has recorded evidence: a curl transcript for routed- handlers, a passing test or a deletion for internal modules.-- [ ] Zero hard-rule violations remain in these files.-- [ ] vitest run passes; npm run check:rules -- --paths <touched files>- exits 0.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |-| Playwright browser missing | npx playwright install chromium |-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in- front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house- style: type(scope): what changed and why a reader cares).-3. Delete this prompt file in that same commit:-- git rm prompts/swarm-100/api-lobehub-01.md-- The shrinking directory is this campaign's only progress ledger; there is- no progress log to update.-4. Final report: what step 0 measured, what changed (file list), evidence per- Definition of done line, and any one-line judgment calls. No trailing- questions, no unexecuted plans.--If a line genuinely cannot pass inside this session (an external party must-respond, or an owner-gated action is the final step), finish everything else,-leave this file in place, and state exactly which line remains and who owns-it. Never delete this file on a partial.diff --git a/public/changelog.json b/public/changelog.jsonindex 6786049cb..c8fa2dd90 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-13T02:08:12.489Z",+ "generated_at": "2026-08-13T04:24:00.804Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -16,6 +16,27 @@"fix"]},+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "A Terms acceptance is only recorded when we could actually read the request",+ "summary": "When you agree to the Terms of Service or the real-funds risk disclosure, three.ws keeps a durable, permanent record of which version you accepted and when. The Terms endpoint could write one of those records from a request whose contents it never managed to read: a request sent in the wrong format, or one too large to accept, was answered as a successful acceptance of the current Terms even though nothing in it had been understood. That is the one thing an evidentiary record must never do, and it no longer happens. Both acceptance endpoints now refuse an unreadable request and say precisely what was wrong with it (too large, wrong format, or unreadable) instead of blaming the version field, and they record nothing on those paths.",+ "link": "/legal/tos",+ "tags": [+ "fix",+ "security"+ ]+ },+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "Adding your agent to a LobeHub chat no longer loses its name when one lookup stumbles",+ "summary": "Before a chat host renders your agent, it asks three.ws to confirm the agent exists and to hand back the sites you allow it to be embedded on. Those are two separate reads, and if the second one hiccuped the whole answer was thrown away: the host was told the agent could not be confirmed and was given no name, even though the first read had just found it. The confirmation and the name now survive a stumble on the embed settings. Separately, a misspelled address in a host's setup returned an explanation the browser refused to show, so integrators saw an unexplained network failure instead of the message naming their typo. That message now reaches them.",+ "link": null,+ "tags": [+ "fix"+ ]+ },{"date": "2026-08-13","type": "update",@@ -185,6 +206,16 @@"security"]},+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "The Livepeer comparison demo reads every answer shape an orchestrator can return",+ "summary": "The side-by-side inference demo runs your prompt on the three.ws provider chain and on a Livepeer AI gateway at the same time. Orchestrators on that network run different inference servers, and some return the answer as a list of text pieces rather than one block of text. The demo could not read that form: a perfectly good answer came back as a card reading 'leg_failed' with a programming error in it, and the gateway and timing details vanished from the card. Those answers now render normally, and a reply in a shape nobody recognises is reported as an empty response with the gateway, latency, and model still shown.",+ "link": "/demos/livepeer-inference",+ "tags": [+ "fix"+ ]+ },{"date": "2026-08-13","type": "update",@@ -227,6 +258,37 @@"fix"]},+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "The trial queue headline now names the mint that actually holds the most",+ "summary": "Trial Conversions shows sellers one headline number: the revenue waiting in the trial queue, with the token it is denominated in. Totals are kept separately per token, because ten of a six-decimal token and ten of a nine-decimal one are not the same amount, but the choice of which total to promote to the headline was made by comparing the raw stored integers across tokens. Those integers are scaled differently per token, so 0.9 of one token outranked 5 of another: a seller pricing skills in two currencies saw the smaller pile in the headline while the larger one sat below it. The totals are now compared at the same scale, so the headline is the biggest real one and the per-token list under it is ordered to match.",+ "link": "/conversions",+ "tags": [+ "fix"+ ]+ },+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "Your API keys now show whether they still work, and a key can no longer be issued with no permissions at all",+ "summary": "The API keys table in your developer dashboard listed every key you had ever created, but nothing on the row said which ones were still usable. A key you had already revoked looked exactly like a live one, right down to a Revoke button that could only ever fail, and a key that had passed its expiry date looked perfectly healthy until a request mysteriously stopped working. Every key now carries an Active, Expired, or Revoked label, dead keys are dimmed, and the Revoke button is only shown where it can do something. The connection tester also stops picking an expired key to test with. Separately, creating a key through the API with an explicitly empty permission list used to succeed and hand back a credential that could not do anything, with nothing to tell you so; that request is now rejected with a clear message, and a permission listed twice is stored once.",+ "link": "/dashboard/api",+ "tags": [+ "fix",+ "improvement"+ ]+ },+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "Your friends list no longer goes blank when the database is mid-upgrade, and search finds unusual names",+ "summary": "Two problems in the friends area. The friends list is built to survive an environment where the social tables have not been created yet: it shows an empty list instead of an error. That safety net was matching on the wording of the database error rather than its type, and the wording it looked for also appears when a single column is missing, which is what a partly-applied upgrade looks like. So during an upgrade the page answered normally and told you that you had no friends, no incoming requests, and no pending invites, with nothing anywhere reporting a fault. The safety net now recognises only a genuinely missing table, and any other database problem is reported as the error it is. Separately, friend search could not find a display name containing a backslash, and a search term ending in one quietly searched for something else, because the search was not escaping the backslash before handing the term to the database.",+ "link": "/walk",+ "tags": [+ "fix"+ ]+ },{"date": "2026-08-12","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex 5aae84a60..7c771f4dd 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -14,6 +14,22 @@<category>fix</category><description>Sharing a walk produces a card you can post on Farcaster, with a button that opens that avatar walking. A cast stays up forever, but the avatar behind it does not: it can be deleted, or switched to private. When that happened the button still pointed at the missing avatar, so anyone who tapped it landed on a walk that could never load, and the card's second button pointed at the same place as the first, so both said the same thing. The card now checks the avatar before it builds. If the avatar is gone or private it drops the link and invites you to walk your own instead of handing you a dead button, and if the check itself cannot run the link is kept rather than thrown away. The second button now goes to the avatar builder, so the two buttons finally offer two different things. The card also carries its image dimensions now, which stops the preview from reflowing while it loads.</description></item>+ <item>+ <title>A Terms acceptance is only recorded when we could actually read the request</title>+ <link>https://three.ws/legal/tos</link>+ <guid isPermaLink="false">2026-08-13:A Terms acceptance is only recorded when we could actually read the request</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>When you agree to the Terms of Service or the real-funds risk disclosure, three.ws keeps a durable, permanent record of which version you accepted and when. The Terms endpoint could write one of those records from a request whose contents it never managed to read: a request sent in the wrong format, or one too large to accept, was answered as a successful acceptance of the current Terms even though nothing in it had been understood. That is the one thing an evidentiary record must never do, and it no longer happens. Both acceptance endpoints now refuse an unreadable request and say precisely what was wrong with it (too large, wrong format, or unreadable) instead of blaming the version field, and they record nothing on those paths.</description>+ </item>+ <item>+ <title>Adding your agent to a LobeHub chat no longer loses its name when one lookup stumbles</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-13:Adding your agent to a LobeHub chat no longer loses its name when one lookup stumbles</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Before a chat host renders your agent, it asks three.ws to confirm the agent exists and to hand back the sites you allow it to be embedded on. Those are two separate reads, and if the second one hiccuped the whole answer was thrown away: the host was told the agent could not be confirmed and was given no name, even though the first read had just found it. The confirmation and the name now survive a stumble on the embed settings. Separately, a misspelled address in a host's setup returned an explanation the browser refused to show, so integrators saw an unexplained network failure instead of the message naming their typo. That message now reaches them.</description>+ </item><item><title>An avatar rendered through the MCP server can no longer be turned into a tracking beacon</title><link>https://three.ws/docs/mcp</link>@@ -142,6 +158,14 @@<category>fix</category><description>Before a prompt becomes a 3D model, the forge draws a reference picture, then draws two extra views of it so the reconstruction can see the sides and back instead of guessing them. Three problems sat in that step. The calls to the image service had no time limit, so a connection that opened and then stalled held a generation open indefinitely rather than falling back to the free image lane; they now give up after ninety seconds and hand off. The extra views sent the reference picture to the model labelled as a PNG no matter what it actually was, so a JPEG or WebP reference could be rejected and you would quietly get fewer views; the real format is now read from the picture and sent with it. And a reference that is unreachable or oversized is refused with a clear reason instead of being forwarded as-is. Alongside that, every image this step fetches, including the optional mask, now goes through the same address safety check the rest of the platform uses, so a supplied URL cannot be aimed at an internal address.</description></item>+ <item>+ <title>The Livepeer comparison demo reads every answer shape an orchestrator can return</title>+ <link>https://three.ws/demos/livepeer-inference</link>+ <guid isPermaLink="false">2026-08-13:The Livepeer comparison demo reads every answer shape an orchestrator can return</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The side-by-side inference demo runs your prompt on the three.ws provider chain and on a Livepeer AI gateway at the same time. Orchestrators on that network run different inference servers, and some return the answer as a list of text pieces rather than one block of text. The demo could not read that form: a perfectly good answer came back as a card reading 'leg_failed' with a programming error in it, and the gateway and timing details vanished from the card. Those answers now render normally, and a reply in a shape nobody recognises is reported as an empty response with the gateway, latency, and model still shown.</description>+ </item><item><title>The Money-Cam stops going dark when its feed stumbles, and stops replaying old transfers as new light</title><link>https://three.ws/galaxy</link>@@ -174,6 +198,30 @@<category>fix</category><description>The public directory of coins launched on the three.ws bonding curve accepts an agent filter, so a page can show only the coins one agent launched. A filter value that was not a real agent id went straight to the database, which rejected it and turned the whole request into an unexplained server error. Anything that is not a valid agent id now comes back immediately as a plain validation error naming the problem, so a mistyped link fails clearly instead of looking like the launchpad is down. The endpoint documentation now states the same contract, including the page-size and offset limits, and the behaviour is pinned by tests.</description></item>+ <item>+ <title>The trial queue headline now names the mint that actually holds the most</title>+ <link>https://three.ws/conversions</link>+ <guid isPermaLink="false">2026-08-13:The trial queue headline now names the mint that actually holds the most</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Trial Conversions shows sellers one headline number: the revenue waiting in the trial queue, with the token it is denominated in. Totals are kept separately per token, because ten of a six-decimal token and ten of a nine-decimal one are not the same amount, but the choice of which total to promote to the headline was made by comparing the raw stored integers across tokens. Those integers are scaled differently per token, so 0.9 of one token outranked 5 of another: a seller pricing skills in two currencies saw the smaller pile in the headline while the larger one sat below it. The totals are now compared at the same scale, so the headline is the biggest real one and the per-token list under it is ordered to match.</description>+ </item>+ <item>+ <title>Your API keys now show whether they still work, and a key can no longer be issued with no permissions at all</title>+ <link>https://three.ws/dashboard/api</link>+ <guid isPermaLink="false">2026-08-13:Your API keys now show whether they still work, and a key can no longer be issued with no permissions at all</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The API keys table in your developer dashboard listed every key you had ever created, but nothing on the row said which ones were still usable. A key you had already revoked looked exactly like a live one, right down to a Revoke button that could only ever fail, and a key that had passed its expiry date looked perfectly healthy until a request mysteriously stopped working. Every key now carries an Active, Expired, or Revoked label, dead keys are dimmed, and the Revoke button is only shown where it can do something. The connection tester also stops picking an expired key to test with. Separately, creating a key through the API with an explicitly empty permission list used to succeed and hand back a credential that could not do anything, with nothing to tell you so; that request is now rejected with a clear message, and a permission listed twice is stored once.</description>+ </item>+ <item>+ <title>Your friends list no longer goes blank when the database is mid-upgrade, and search finds unusual names</title>+ <link>https://three.ws/walk</link>+ <guid isPermaLink="false">2026-08-13:Your friends list no longer goes blank when the database is mid-upgrade, and search finds unusual names</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Two problems in the friends area. The friends list is built to survive an environment where the social tables have not been created yet: it shows an empty list instead of an error. That safety net was matching on the wording of the database error rather than its type, and the wording it looked for also appears when a single column is missing, which is what a partly-applied upgrade looks like. So during an upgrade the page answered normally and told you that you had no friends, no incoming requests, and no pending invites, with nothing anywhere reporting a fault. The safety net now recognises only a genuinely missing table, and any other database problem is reported as the error it is. Separately, friend search could not find a display name containing a backslash, and a search term ending in one quietly searched for something else, because the search was not escaping the backslash before handing the term to the database.</description>+ </item><item><title>Docs · GitHub memory seeding</title><link>https://three.ws/docs/github-memory-seeding</link>diff --git a/public/features.json b/public/features.jsonindex a3838c26b..af62d1ab0 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-13T02:08:12.401Z",+ "generated_at": "2026-08-13T04:24:00.596Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/dashboard-next/pages/api.js b/src/dashboard-next/pages/api.jsindex 428739a8f..682c93c01 100644--- a/src/dashboard-next/pages/api.js+++ b/src/dashboard-next/pages/api.js@@ -156,9 +156,11 @@ const KEY_PLACEHOLDER = 'YOUR_API_KEY';// ── Helpers ────────────────────────────────────────────────────────────────+// The MCP section pre-fills its snippets and its live handshake test with this+// key, so it has to be one that can still authenticate: an expired key is as+// unusable as a revoked one and would fail the test with no visible reason.function pickDisplayKey(keys) {- const live = keys.find((k) => !k.revoked_at);- return live || null;+ return keys.find((k) => !keyStatus(k).dead) || null;}function pickDefaultEmbedTarget(avatars, widgets, agents) {@@ -492,7 +494,19 @@ function renderKeysEmpty() {});}-function renderKeysTable(keys) {+// GET /api/keys returns the caller's full history, revoked and expired keys+// included, so the table has to say which rows are still usable. Without this a+// revoked key rendered identically to a live one and kept an armed Revoke+// button that could only ever answer 404, and an expired key looked healthy+// right up until a request failed with no explanation.+export function keyStatus(k) {+ if (k.revoked_at) return { label: 'Revoked', tag: 'danger', dead: true, at: k.revoked_at };+ if (k.expires_at && new Date(k.expires_at) <= new Date())+ return { label: 'Expired', tag: 'warn', dead: true, at: k.expires_at };+ return { label: 'Active', tag: 'success', dead: false, at: null };+}++export function renderKeysTable(keys) {return `<div class="dn-table-wrap"><table class="dn-table">@@ -500,6 +514,7 @@ function renderKeysTable(keys) {<tr><th>Name</th><th>Prefix</th>+ <th>Status</th><th>Scopes</th><th>Created</th><th>Last used</th>@@ -507,10 +522,15 @@ function renderKeysTable(keys) {</tr></thead><tbody>- ${keys.map((k) => `- <tr>+ ${keys.map((k) => {+ const st = keyStatus(k);+ return `+ <tr${st.dead ? ' class="dn-row-muted"' : ''}><td>${esc(k.name)}</td><td><code class="dn-mono-sm">${esc(k.prefix)}…</code></td>+ <td>+ <span class="dn-tag ${st.tag}"${st.at ? ` title="${esc(st.label)} ${esc(relTime(st.at))}"` : ''}>${st.label}</span>+ </td><td><div class="dn-chip-row">${(k.scope || '').split(/\s+/).filter(Boolean).map((s) => `<span class="dn-tag">${esc(s)}</span>`).join('')}@@ -519,10 +539,13 @@ function renderKeysTable(keys) {<td><span class="dn-dim">${esc(relTime(k.created_at))}</span></td><td><span class="dn-dim">${k.last_used_at ? esc(relTime(k.last_used_at)) : 'never'}</span></td><td style="text-align:right">- <button class="dn-btn danger" data-act="revoke" data-key-id="${esc(k.id)}" data-key-name="${esc(k.name)}" aria-label="Revoke API key ${esc(k.name)}">Revoke</button>+ ${k.revoked_at+ ? '<span class="dn-dim">Revoked</span>'+ : `<button class="dn-btn danger" data-act="revoke" data-key-id="${esc(k.id)}" data-key-name="${esc(k.name)}" aria-label="Revoke API key ${esc(k.name)}">Revoke</button>`}</td></tr>- `).join('')}+ `;+ }).join('')}</tbody></table></div>@@ -1346,6 +1369,10 @@ function injectStyles() {.dn-chip-row { display: flex; flex-wrap: wrap; gap: 4px; }.dn-mono-sm { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--nxt-ink-dim); }.dn-dim { color: var(--nxt-ink-dim); }+ /* A key that can no longer authenticate (revoked or past its expiry) stays+ in the table for the record but recedes behind the usable ones. */+ .dn-table tbody tr.dn-row-muted td { opacity: 0.55; }+ .dn-table tbody tr.dn-row-muted:hover td { opacity: 1; }/* Tabs (pill style — matches Library page) */.dn-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--nxt-stroke); border-radius: var(--nxt-radius-pill); background: rgba(255,255,255,0.03); margin-bottom: 12px; }diff --git a/tests/api/keys-endpoint.test.js b/tests/api/keys-endpoint.test.jsindex 5b813fbc4..988628292 100644--- a/tests/api/keys-endpoint.test.js+++ b/tests/api/keys-endpoint.test.js@@ -158,6 +158,33 @@ describe('POST /api/keys', () => {expect(sqlState.calls).toHaveLength(0);});+ it('rejects an explicitly empty scope instead of minting a powerless key', async () => {+ const { status, body } = await invoke(keysHandler, {+ method: 'POST',+ url: '/api/keys',+ body: { name: 'scopeless', scope: ' ' },+ });+ expect(status).toBe(400);+ expect(body.error).toBe('validation_error');+ expect(sqlState.calls).toHaveLength(0);+ });++ it('applies the default scope when the field is omitted entirely', async () => {+ sqlState.queue.push([{ id: KEY_ID, name: 'defaults', prefix: 'sk_live_abcd', scope: '', expires_at: null, created_at: '2026-08-13T01:04:36.801Z' }]);+ await invoke(keysHandler, { method: 'POST', url: '/api/keys', body: { name: 'defaults' } });+ expect(sqlState.calls[0].values).toContain('avatars:read avatars:write');+ });++ it('stores a repeated scope once', async () => {+ sqlState.queue.push([{ id: KEY_ID, name: 'dupes', prefix: 'sk_live_abcd', scope: '', expires_at: null, created_at: '2026-08-13T01:04:36.801Z' }]);+ await invoke(keysHandler, {+ method: 'POST',+ url: '/api/keys',+ body: { name: 'dupes', scope: 'avatars:read avatars:read profile' },+ });+ expect(sqlState.calls[0].values).toContain('avatars:read profile');+ });+it('rejects a missing name with a structured 400', async () => {const { status, body } = await invoke(keysHandler, {method: 'POST',diff --git a/tests/dashboard-api-keys-table.test.js b/tests/dashboard-api-keys-table.test.jsnew file mode 100644index 000000000..c87812433--- /dev/null+++ b/tests/dashboard-api-keys-table.test.js@@ -0,0 +1,92 @@+// @vitest-environment jsdom+//+// The API keys table on /dashboard/api.+//+// GET /api/keys deliberately returns the caller's whole key history, revoked+// and expired rows included, so the dashboard can show it (docs/developer-+// platform.md pins that contract). The table used to ignore both flags: a+// revoked key rendered exactly like a live one and kept an armed Revoke button+// whose only possible answer was 404, and an expired key looked healthy until a+// request failed somewhere else with no explanation. These pin the status+// derivation and the button gating that fixed it.++import { describe, it, expect } from 'vitest';++const { keyStatus, renderKeysTable } = await import('../src/dashboard-next/pages/api.js');++const DAY = 86_400_000;+const base = {+ id: '2c25ec0c-f1a3-475d-9a9f-fe926c832db5',+ name: 'ci runner',+ prefix: 'sk_live_abcd',+ scope: 'avatars:read',+ created_at: new Date(Date.now() - 30 * DAY).toISOString(),+ last_used_at: null,+ expires_at: null,+ revoked_at: null,+};++describe('keyStatus', () => {+ it('calls a usable key active', () => {+ expect(keyStatus(base)).toMatchObject({ label: 'Active', dead: false });+ });++ it('calls a revoked key dead even when its expiry is still in the future', () => {+ const k = { ...base, revoked_at: new Date().toISOString(), expires_at: new Date(Date.now() + DAY).toISOString() };+ expect(keyStatus(k)).toMatchObject({ label: 'Revoked', dead: true });+ });++ it('calls a key past its expiry dead', () => {+ expect(keyStatus({ ...base, expires_at: new Date(Date.now() - DAY).toISOString() })).toMatchObject({+ label: 'Expired',+ dead: true,+ });+ });++ it('leaves a key with a future expiry active', () => {+ expect(keyStatus({ ...base, expires_at: new Date(Date.now() + DAY).toISOString() })).toMatchObject({+ label: 'Active',+ dead: false,+ });+ });+});++describe('renderKeysTable', () => {+ function rowFor(key) {+ const host = document.createElement('div');+ host.innerHTML = renderKeysTable([key]);+ return host.querySelector('tbody tr');+ }++ it('gives a live key a revoke button and no muted styling', () => {+ const row = rowFor(base);+ expect(row.querySelector('[data-act="revoke"]')).toBeTruthy();+ expect(row.classList.contains('dn-row-muted')).toBe(false);+ expect(row.textContent).toContain('Active');+ });++ it('disarms the revoke button on an already-revoked key', () => {+ const row = rowFor({ ...base, revoked_at: new Date().toISOString() });+ expect(row.querySelector('[data-act="revoke"]')).toBeNull();+ expect(row.classList.contains('dn-row-muted')).toBe(true);+ expect(row.textContent).toContain('Revoked');+ });++ it('marks an expired key but leaves it revocable', () => {+ const row = rowFor({ ...base, expires_at: new Date(Date.now() - DAY).toISOString() });+ expect(row.textContent).toContain('Expired');+ expect(row.querySelector('[data-act="revoke"]')).toBeTruthy();+ });++ it('escapes a hostile key name instead of injecting it', () => {+ const row = rowFor({ ...base, name: '<img src=x onerror=alert(1)>' });+ expect(row.querySelector('img')).toBeNull();+ expect(row.textContent).toContain('<img src=x onerror=alert(1)>');+ });++ it('renders one chip per granted scope', () => {+ const row = rowFor({ ...base, scope: 'avatars:read agents:write' });+ const chips = [...row.querySelectorAll('.dn-chip-row .dn-tag')].map((el) => el.textContent);+ expect(chips).toEqual(['avatars:read', 'agents:write']);+ });+});