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
Ship IRL private pins, homepage thumbnails, image-proxy meta-follow, and phone HUD hardening
nirholas5b7524065452
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex bd451ef9b..7d0a8aa46 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -9,8 +9,11 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **/play: real water at the fishing ponds, and spare rods to find on the bank** — The two fishing ponds no longer look like a flat tinted disc — they're now an animated water surface with real ripples, a sun-tracked sparkle, and a deep-to-shallow gradient that reacts to the world's day/night lighting. New alongside it: three spare fishing rods, leaning on posts around the map (both pond banks and the plaza), that any player can walk up to and pick up into their backpack — on top of the rod everyone already starts with. This also brought the chop/mine/cook gathering stations (trees, rocks, roast pits) online for the first time — they existed in the code but were never actually rendered in the world until now. Caught fish still sell for cash at the General Store, same as before. (`/play`) `[feature]`- **Agents can now hunt money drops and complete IRL quests from code** — The @three-ws/irl SDK (v0.2.0) now covers the whole IRL surface, not just pins. New functions let any script or agent discover real-money drops near where it checks in, claim them with a proof-of-presence fix (a real on-chain release to its own wallet), place self- or agent-funded drops and bounties, and run the full World Lines quest loop — find nearby quests, take the challenge at the spot, and earn the agent-signed proof-of-presence collectible, plus verify anyone's proof independently. Fully typed, zero dependencies, verified against the live API. (`/irl`) `[sdk, feature]`- **Avatars render again on seven pages that were showing an empty viewer** — Avatars made on three.ws are saved in a compressed format to keep them small and quick to download. Seven pages — Cosmos, Minted, Creations, Vault, Pitch, the embodied-agent page, and the microphone lipsync demo — never set up the matching decompressor, so instead of a 3D model you got an empty viewer and an error in the console. All seven now load the decoder before the model, and the avatars appear as they should. The fix also went into the embeddable agent widget itself, so anyone who has pasted a three.ws agent onto their own site gets working compressed avatars automatically, with nothing to change on their end. (`/cosmos`) `[fix]`+- **Homepage: agent thumbnails load, and the marketplace strip is alive again** — The avatar picker on the homepage was asking our image server for five pictures that had never been made, so the browser refused them and those slots sat blank. It now asks only for pictures that actually exist, and it leads with the avatars that have one — where an avatar has no picture yet, it draws a clean initial instead of a broken tile. Underneath it, the live marketplace strip had been silently empty: it was reading the agent list in the wrong shape and quietly gave up every time, leaving just a lone "Browse marketplace" link. It now reads the list correctly and shows ten real agents you can click straight through to. The 3D models themselves were always loading fine and are untouched. (`/`) `[fix]`+- **IRL on phones: controls no longer cover each other** — The IRL screen was built up feature by feature until buttons buried the view on phones — the action pills stacked five rows deep over the walk joystick, the money-drops button floated on top of other controls, and small close buttons were easy to miss. The whole HUD is now built for thumbs: one swipeable action row hugs the bottom edge, the joystick zone floats above it so drags never hit a button, the drops button repositions itself and steps aside whenever a sheet is open, and every close button and tab meets the 44-pixel tap size. The avatar and camera view are finally unobstructed. (`/irl`) `[improvement, fix]`- **Live SOL price restored on /three-live; Flappin UFO demo retired** — Two quiet breakages, fixed. The live trade feed on /three-live now prices SOL-only trades correctly again — it was reading a price API directly from your browser, which the provider silently blocks, so those trades showed no dollar value; it now reads the same cached, multi-provider SOL/USD price the rest of the platform uses. Separately, the Flappin UFO arcade demo ran on an external deployment that has gone offline, leaving a blank screen and a leaderboard that never loaded. Rather than leave a broken page up, /play/ufo is now an honest retired notice that points you to the live experiences — the coin world, Sniper Arena, and Coin Clash. (`/three-live`) `[fix]`- **Two broken pages fixed: vanity receipt verifier and Drive Your Avatar** — Both pages failed to load anything at all, and both are working again. The receipt verifier at /vanity/verify loads its cryptography straight into your browser so the audit runs on your machine and nothing is sent anywhere — but the browser had no way to locate those crypto libraries, so the page sat dead and no receipt could be checked. It now resolves them properly: paste a receipt and every check runs, right through to opening a sealed envelope. On /temporary, the payment widget behind the in-world "Feature your content" billboard was loaded the wrong way and crashed on arrival, taking the pay button with it. It now loads the same way it does on every other page that uses it. (`/vanity/verify`) `[fix]`+- **Your agents can now be placed privately, and nobody can browse /irl locations from afar** — Two changes to how /irl handles where you are. First, reading the agents near you now requires proving you have a recent location fix for that spot — until today anyone could ask our servers what agents sat at any coordinate on earth without ever going there. Second, a placed agent can now be private: you still see it in AR exactly where you left it, but it is withheld from everyone else's nearby feed, from shared rooms, and from the World Lines quest map. New placements are private by default while /irl is still in testing, and the privacy center's unpublish button now makes a pin private instead of hiding it from you too. You can make any pin public again whenever you want. (`/irl-privacy`) `[security, feature, improvement]`## 2026-07-08diff --git a/api/img.js b/api/img.jsindex d3d9e7e98..14162fd35 100644--- a/api/img.js+++ b/api/img.js@@ -204,20 +204,28 @@ function placeholderSvg(seed) {</svg>`;}-// Resolve a token's artwork URL from its metadata JSON document. The metadata-// is creator-controlled, so we (a) fetch through the SSRF-hardened JSON client,-// (b) accept only an http(s) image URL — data: images are rejected so we never-// serve attacker-supplied inline content from our own origin, and (c) return-// null on any failure so the caller falls through to the on-brand placeholder.+// Pull the artwork URL out of a token metadata document. The metadata is+// creator-controlled, so we accept only a non-empty string and reject data: URLs+// — we never serve attacker-supplied inline content from our own origin. The URL+// itself is still validated by the SSRF fetcher before anything is requested.+// Returns null on anything unusable, so callers fall through to the placeholder.+function imageFromMetaDoc(data) {+ if (!data || typeof data !== 'object') return null;+ const candidate = data.image || data.image_url || data.imageUrl || data.imageUri || null;+ if (typeof candidate !== 'string') return null;+ const trimmed = candidate.trim();+ if (!trimmed || /^data:/i.test(trimmed)) return null;+ return trimmed;+}++// Resolve a token's artwork URL from its metadata JSON document, fetched through+// the SSRF-hardened JSON client. Backs the explicit `?meta=` parameter; the+// `?url=` path reaches the same place via raceCandidates()'s JSON detection.async function resolveImageFromMeta(metaUri, timeoutMs = META_TIMEOUT_MS) {try {const { ok, data } = await safeFetchJson(metaUri, { timeoutMs });- if (!ok || !data || typeof data !== 'object') return null;- const candidate = data.image || data.image_url || data.imageUrl || data.imageUri || null;- if (typeof candidate !== 'string') return null;- const trimmed = candidate.trim();- if (!trimmed || /^data:/i.test(trimmed)) return null;- return trimmed;+ if (!ok) return null;+ return imageFromMetaDoc(data);} catch {return null;}@@ -273,12 +281,27 @@ export default wrap(async function handler(req, res) {// Race all candidate gateways concurrently inside whatever is left of the shared// budget. The first valid image wins; if every gateway fails (or the budget// runs out) we fall through to the placeholder below — always within the 30s wall.- const image = await raceImageCandidates(+ //+ // A `?url=` that turns out to address a metadata document (not art) is followed+ // exactly one hop to the image it names. `acceptJson` is off on that second race+ // so a doc pointing at another doc terminates instead of chaining. When `?meta=`+ // was used the document is already resolved above, so JSON is not expected there.+ let payload = await raceCandidates(target ? candidates(target) : [],TIMEOUT_MS,deadline - Date.now(),+ Boolean(directUrl),);+ if (payload?.kind === 'json') {+ const nested = imageFromMetaDoc(payload.data);+ payload = nested+ ? await raceCandidates(candidates(nested), TIMEOUT_MS, deadline - Date.now(), false)+ : null;+ }++ const image = payload?.kind === 'image' ? payload : null;+if (!image) {// Every source failed. Hand back a valid, CORS-clean placeholder inline so// the texture/image loader resolves with a 200 instead of logging an error.diff --git a/api/irl/privacy.js b/api/irl/privacy.jsindex 674749577..5417c5925 100644--- a/api/irl/privacy.js+++ b/api/irl/privacy.js@@ -184,7 +184,7 @@ async function handleSummary(res, { userId, deviceToken, anonymous }) {async function handleExport(res, { userId, deviceToken }) {const pins = await sql`SELECT id, agent_id, lat, lng, heading, avatar_name, avatar_url, caption,- x402_endpoint, placed_at, expires_at, hidden_at, view_count,+ x402_endpoint, placed_at, expires_at, hidden_at, published, view_count,gps_accuracy_m, altitude_m, anchor_sourceFROM irl_pinsWHERE ((${userId}::uuid IS NOT NULL AND user_id = ${userId}::uuid)diff --git a/data/changelog.json b/data/changelog.jsonindex 480d952d3..1ef7f88be 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,26 @@{"$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-07-09",+ "title": "Your agents can now be placed privately, and nobody can browse /irl locations from afar",+ "summary": "Two changes to how /irl handles where you are. First, reading the agents near you now requires proving you have a recent location fix for that spot — until today anyone could ask our servers what agents sat at any coordinate on earth without ever going there. Second, a placed agent can now be private: you still see it in AR exactly where you left it, but it is withheld from everyone else's nearby feed, from shared rooms, and from the World Lines quest map. New placements are private by default while /irl is still in testing, and the privacy center's unpublish button now makes a pin private instead of hiding it from you too. You can make any pin public again whenever you want.",+ "tags": [+ "security",+ "feature",+ "improvement"+ ],+ "link": "/irl-privacy"+ },+ {+ "date": "2026-07-09",+ "title": "Homepage: agent thumbnails load, and the marketplace strip is alive again",+ "summary": "The avatar picker on the homepage was asking our image server for five pictures that had never been made, so the browser refused them and those slots sat blank. It now asks only for pictures that actually exist, and it leads with the avatars that have one — where an avatar has no picture yet, it draws a clean initial instead of a broken tile. Underneath it, the live marketplace strip had been silently empty: it was reading the agent list in the wrong shape and quietly gave up every time, leaving just a lone \"Browse marketplace\" link. It now reads the list correctly and shows ten real agents you can click straight through to. The 3D models themselves were always loading fine and are untouched.",+ "tags": [+ "fix"+ ],+ "link": "/"+ },{"date": "2026-07-09","title": "Avatars render again on seven pages that were showing an empty viewer",@@ -12552,6 +12572,16 @@"feature"],"link": "/irl"+ },+ {+ "date": "2026-07-09",+ "title": "IRL on phones: controls no longer cover each other",+ "summary": "The IRL screen was built up feature by feature until buttons buried the view on phones — the action pills stacked five rows deep over the walk joystick, the money-drops button floated on top of other controls, and small close buttons were easy to miss. The whole HUD is now built for thumbs: one swipeable action row hugs the bottom edge, the joystick zone floats above it so drags never hit a button, the drops button repositions itself and steps aside whenever a sheet is open, and every close button and tab meets the 44-pixel tap size. The avatar and camera view are finally unobstructed.",+ "tags": [+ "improvement",+ "fix"+ ],+ "link": "/irl"}]}diff --git a/docs/irl/THREAT-MODEL.md b/docs/irl/THREAT-MODEL.mdindex e76a3b799..6b2014b14 100644--- a/docs/irl/THREAT-MODEL.md+++ b/docs/irl/THREAT-MODEL.md@@ -5,10 +5,16 @@ discover it in AR. The single most sensitive thing the platform does here is rev**where an agent is**. This document states, honestly, what the public nearby readprotects against, how it degrades, and the residual exposure we accept by design.-The one read in scope: `GET /api/irl/pins?lat&lng&radius` — the per-viewer proximity-feed. It is the **only** surface that ever returns another user's agent location.+Three reads return another user's location, all presence-gated and all bounded by a+radius: `GET /api/irl/pins?lat&lng&radius` (≤60 m, the per-viewer proximity feed),+`GET /api/irl/drops?lat&lng&radius` (≤80 m) and `GET /api/irl/world-lines/nearby`+(≤600 m). The pins feed is the one the controls below are written against; drops and+World Lines shipped later and inherit the same fix gate.+(`/api/irl/pins/mine`, `agent-card`, `agent-summary`, `interactions*`, `report`,-`share-frame` do not — see `reports/irl-location-leak-audit.md`.)+`share-frame` do not return others' coordinates — see+`reports/irl-location-leak-audit.md`, which predates drops and World Lines and so+does not cover them.)## What the read protects against@@ -56,11 +62,56 @@ feed. It is the **only** surface that ever returns another user's agent locationRoom-anchored agents keep exact intra-room layout via relative offsets, so the capcosts render quality nothing while removing the false-precision fingerprint.+## Proof-of-presence (H3) — live, and what it does NOT buy++`IRL_FIX_SECRET` is set in production, so `fixEnforced()` is true and all three+coordinate reads — `GET /api/irl/pins` (60 m), `GET /api/irl/drops` (80 m) and+`GET /api/irl/world-lines/nearby` (600 m) — reject a request that carries no valid+`x-irl-fix` token, a forged one, an expired one, or one minted more than+`FIX_TOLERANCE_M` (250 m) from the point being read. Before it was enabled, any of+those reads answered for **any coordinate on earth** from anywhere.++**Be honest about the ceiling.** `POST /api/irl/fix-token` mints from+*caller-supplied* `lat`/`lng`. There is no attestation that the caller is really+there — no device integrity check, no signed GNSS. So the token proves the caller+*claimed* a coordinate, not that they occupied it. What enforcement actually buys is+cost: a sweeper must now mint per ~250 m anchor instead of reading arbitrary points,+and both mint (30/min/IP) and read (60/min/IP) are rate-limited.++Concretely, from a single IP: a 60 m pin read covers ~0.011 km², so tiling+Manhattan's ~59 km² takes ~5 200 reads ≈ 90 minutes. World Lines is the cheapest+surface by far — its 600 m radius covers ~1.13 km² per read, so the same area falls+in under a minute. Rotating IPs collapses all of these numbers. Presence enforcement+is a speed bump with a real slope; it is not a wall.++## The control that does hold: private pins++`published = false` makes a pin **private** — it is withheld from every other+reader's nearby, room and World Line feed, while its owner still sees it in AR. A+private pin is not a cost imposed on an attacker; it is an absence. No sweep, at any+budget, with any number of IPs, returns a coordinate the query never selects.++- Enforced in both public pins reads (`api/irl/pins.js`) as+ `published IS NOT FALSE OR <caller owns the row>`, so the owner keeps their view.+- Enforced in the World Lines discovery join (`p.published IS NOT FALSE`), because+ that 600 m feed would otherwise be the cheapest private-pin bypass we ship.+- Anchoring a World Line to a private pin is refused at creation (409), not merely+ filtered at read time — a quest is a public invitation to a coordinate.+- `IRL_DEFAULT_PRIVATE=1` makes new placements private unless they explicitly ask to+ be public. It is set in production: while /irl is pre-launch and its operators test+ from their own homes, the safe default is the one that cannot leak by omission.+- The privacy center's unpublish writes `published`, not `hidden_at`. (`hidden_at`+ is moderation + expiry: it blanks a pin for *everyone*, owner included, which makes+ it useless to someone who wants to keep testing a placement they took out of view.)++Distinct from coordinate coarsening: coarsening reduces the precision of a coordinate+that is still returned. Privacy withholds the row.+## Out of scope here-- Proof-of-presence (H3) — a cell-bound fix token would further bind a read to a- real, recent fix in that cell, denying a token-per-cell sweep. If/when it lands,- the cross-cell denial assertion belongs in `tests/api/irl-pins-hardening.test.js`.+- Attested presence — a device-signed or GNSS-signed fix would upgrade the token from+ "I claim I am here" to "I am here", denying the token-per-cell sweep described+ above. Until then, private pins, not the fix token, are the guarantee.- Per-account reputation / banning of repeat sweepers (future).No limit in this document silently reduces coverage: every cap above is written down.diff --git a/docs/ops/gcp-production.md b/docs/ops/gcp-production.mdindex 52f5af453..9065004ae 100644--- a/docs/ops/gcp-production.md+++ b/docs/ops/gcp-production.md@@ -231,6 +231,60 @@ by CLI at all. Consequences and current state:| x402 ring signers | `X402_TREASURY_SECRET_BASE58`, `X402_SEED_SOLANA_SECRET_BASE58` | Ring is enabled but the treasury/payer roles cannot sign — no autonomous USDC movement | Owner's gitignored `.x402-ring-secrets.json`, written by `scripts/x402-ring-setup.mjs` on whatever machine ran it. Public half: treasury/pay-to `wwwwwDxFWRn7grgr3Esrsg5C6NvDoDHSA4gaCffccrU` (holds real SOL — do NOT regenerate; recover the secret). The **sponsor** role is no longer in this row — see below. || Rate-limiter Redis | `UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN` | Money-moving limiters **fail closed** (already true on Vercel pre-shutdown). **Worse: the x402 idempotency module hard-throws at import** (`api/_lib/x402/idempotency-cache.js`) — so **every** paid endpoint that imports it (`/api/okx/3d/*`, `/api/x402/*`) returns **HTTP 500 at module load**, not a graceful degrade. This took the entire paid surface down on 2026-07-08 until the escape hatch below was set. | Owner's Upstash console, or provision fresh Upstash/Memorystore and set both vars. `X402_ALLOW_MEMORY_FALLBACK=1` is the sanctioned escape hatch and is **currently SET in prod (since 2026-07-08)** to keep the paid surface up on per-instance memory idempotency. Financial double-charge stays prevented on-chain regardless (EIP-3009 nonces are single-use); the flag only degrades cross-replica work/response dedup. Remove the flag once real Upstash creds land. || R2/S3 storage creds | `S3_ENDPOINT`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`, `S3_BUCKET`, `S3_PUBLIC_DOMAIN` | `/api/marketplace`, `/api/explore`, `/api/avatars/:id` — every route that resolves an asset URL — 503 `not_configured` | Real values already sit in the repo's `.env.local` (never committed). Apply with `scripts/gcp/apply-s3-env.sh` (needs a human-authed `gcloud auth login` first — the 89-var apply is still blocked on reauth per above). |++### Resolved: x402 sponsor co-signing key (2026-07-09)++`/api/healthz` reported `x402.sponsor_cosign: "missing"` and every sponsor-mode+settlement (club-cover, dance-tip) failed with `sponsor_key_unconfigured`.++Root cause: `X402_FEE_PAYER_SOLANA` advertised+`2wKupLR9q6wXYppw8Gr2NvWxKBUqm4PPJKkQfoxHDBg4` — a **third-party facilitator's+shared fee-payer account that three.ws has never controlled**, left over from+when Solana settlement went through an external facilitator (see+`ARCHITECTURE.md`). The self-hosted facilitator cannot co-sign for a key it does+not hold, so it 502'd at settle while passing every other health check.++An earlier revision of the table above described that address as a three.ws ring+wallet that "custodies funds — do NOT regenerate." **That was wrong**, and it+would have blocked the correct fix indefinitely. Evidence: the account fee-pays+~200 tx/hour for many unrelated co-signer wallets, none of them involving our+`payTo`, while our own cosign was provably unconfigured. Its balance was never+ours. `scripts/audit-service-wallets.mjs` has always flagged it correctly and+told operators to override the var.++Fix applied:++- Generated a three.ws-controlled sponsor with `scripts/x402-ring-setup.mjs --roles=sponsor`+ (sponsor role **only** — the funded `payTo` treasury was never touched):+ `GGf9qBhJDCe1UUz4s4Vxq1uPPvcv7UW7sJTuj2Yo5XQj`.+- Stored the secret in **Secret Manager** as `x402-fee-payer-secret-base58`+ (granted `roles/secretmanager.secretAccessor` to `three-ws@…`) and wired it as a+ `secretKeyRef`, rather than a plaintext env value on the service. This also+ removes the "secret only exists on whatever machine ran the script" fragility.+- Funded it with 0.05 SOL (floors: `X402_SPONSOR_SOL_FLOOR_LAMPORTS` = 0.02 hard+ refuse-to-settle, 0.03 audit/topup).++```bash+gcloud run services update three-ws-api --region us-central1 \+ --update-env-vars X402_FEE_PAYER_SOLANA=GGf9qBhJDCe1UUz4s4Vxq1uPPvcv7UW7sJTuj2Yo5XQj \+ --update-secrets X402_FEE_PAYER_SECRET_BASE58=x402-fee-payer-secret-base58:latest+```++Verified by a real $0.01 USDC mainnet sponsor-mode settlement through+`POST /api/x402-facilitator/settle` (tx+`5rmLnLUmWK7jJCjP6RJPLmwT2oiifQMmTnQmhoQKeZcVogxnTMvxB77fpb5BqMyV6VzbawXdPgWz2N7C5kXqqbQ5`):+the sponsor signed as fee payer, paid the 10001-lamport fee, and $0.01 landed in+`payTo`. `sponsor_cosign` now reports `ready`.++**Still blocked:** paid endpoints themselves (`/api/x402/club-cover`,+`/api/x402/dance-tip`) return `429 rate_limiter_unavailable` before reaching+settle, because money-moving buckets fail closed without Upstash Redis (see the+Rate-limiter Redis row). The settle path is fixed; the door in front of it is not.++**Funding note:** the economy master (`WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW`)+holds SOL but `ECONOMY_MASTER_SECRET_BASE58` is **not set on Cloud Run**, so the+treasury-topup cron cannot refill the sponsor when it drains. Set it, or top the+sponsor up manually.| OKX X Layer facilitator creds | `OKX_API_KEY`, `OKX_SECRET_KEY`, `OKX_PASSPHRASE` (or, as a no-OKX-account fallback, `X402_XLAYER_RELAYER_KEY`) | `xlayerSettleable()` (`api/_lib/x402-xlayer-okx.js`) is false without one of these, so **no 402 challenge on any endpoint advertises the `eip155:196` (X Layer) rail** — confirmed live 2026-07-08 via `/api/okx/3d/health` (`payment-rail.settleable:false, facilitator_configured:false`) and by inspecting the raw 402 `accepts[]` on `/api/okx/3d/identity-studio` and `/api/okx/3d/pose-seed` (Solana + Base only, no X Layer entry). `X402_PAY_TO_XLAYER` and `X402_ASSET_ADDRESS_XLAYER` **are** set in prod — this is the only missing piece. This is the exact rail OKX's listing review requires (agent #2632 rejection reason); the relisting (`prompts/okx-ai/05-relisting-resubmission.md`) cannot proceed until it's live. | OKX Web3 developer console (owner) for the three real creds, or generate `X402_XLAYER_RELAYER_KEY` as a fresh EVM keypair + fund it with OKB gas as a stopgap that needs no OKX account. |---diff --git a/pages/irl.html b/pages/irl.htmlindex 986f3de7a..9a1355bb1 100644--- a/pages/irl.html+++ b/pages/irl.html@@ -311,11 +311,16 @@unobstructed and you can look around / drive the avatar. Thejoystick + drag-to-orbit stay live underneath. The toggle isthe lone control left on screen, so it survives the collapse. */+ /* Was `top: 50%` — a fixed screen-center anchor that, depending on the+ live dock height, landed almost exactly on top of the money-drops FAB+ (src/shared/irl-drops.js), which floats at `dock-h + 12px` above the+ bottom panel. Anchoring this to the same --irl-dock-h variable instead+ stacks the two right-edge FABs vertically with a fixed gap, so they+ can never coincide regardless of how tall the dock gets. */.irl-immersive-toggle {position: fixed;- top: 50%;- right: 10px;- transform: translateY(-50%);+ bottom: calc(var(--irl-dock-h, 220px) + 76px);+ right: 12px;z-index: 12;width: 44px;height: 44px;@@ -333,7 +338,7 @@transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s;}.irl-immersive-toggle:hover { color: var(--text); border-color: var(--text-3); }- .irl-immersive-toggle:active { transform: translateY(-50%) scale(0.92); }+ .irl-immersive-toggle:active { transform: scale(0.92); }.irl-immersive-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }.irl-immersive-toggle .irl-eye-show { display: none; }body.irl-immersive .irl-immersive-toggle .irl-eye-hide { display: none; }diff --git a/public/changelog.json b/public/changelog.jsonindex 38f2350ca..050310215 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-09T21:43:03.342Z",+ "generated_at": "2026-07-09T21:44:29.532Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -37,6 +37,27 @@"fix"]},+ {+ "date": "2026-07-09",+ "type": "update",+ "title": "Homepage: agent thumbnails load, and the marketplace strip is alive again",+ "summary": "The avatar picker on the homepage was asking our image server for five pictures that had never been made, so the browser refused them and those slots sat blank. It now asks only for pictures that actually exist, and it leads with the avatars that have one — where an avatar has no picture yet, it draws a clean initial instead of a broken tile. Underneath it, the live marketplace strip had been silently empty: it was reading the agent list in the wrong shape and quietly gave up every time, leaving just a lone \"Browse marketplace\" link. It now reads the list correctly and shows ten real agents you can click straight through to. The 3D models themselves were always loading fine and are untouched.",+ "link": "/",+ "tags": [+ "fix"+ ]+ },+ {+ "date": "2026-07-09",+ "type": "update",+ "title": "IRL on phones: controls no longer cover each other",+ "summary": "The IRL screen was built up feature by feature until buttons buried the view on phones — the action pills stacked five rows deep over the walk joystick, the money-drops button floated on top of other controls, and small close buttons were easy to miss. The whole HUD is now built for thumbs: one swipeable action row hugs the bottom edge, the joystick zone floats above it so drags never hit a button, the drops button repositions itself and steps aside whenever a sheet is open, and every close button and tab meets the 44-pixel tap size. The avatar and camera view are finally unobstructed.",+ "link": "/irl",+ "tags": [+ "improvement",+ "fix"+ ]+ },{"date": "2026-07-09","type": "update",@@ -57,6 +78,18 @@"fix"]},+ {+ "date": "2026-07-09",+ "type": "update",+ "title": "Your agents can now be placed privately, and nobody can browse /irl locations from afar",+ "summary": "Two changes to how /irl handles where you are. First, reading the agents near you now requires proving you have a recent location fix for that spot — until today anyone could ask our servers what agents sat at any coordinate on earth without ever going there. Second, a placed agent can now be private: you still see it in AR exactly where you left it, but it is withheld from everyone else's nearby feed, from shared rooms, and from the World Lines quest map. New placements are private by default while /irl is still in testing, and the privacy center's unpublish button now makes a pin private instead of hiding it from you too. You can make any pin public again whenever you want.",+ "link": "/irl-privacy",+ "tags": [+ "security",+ "feature",+ "improvement"+ ]+ },{"date": "2026-07-08","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex d2980778e..d7a7ea806 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -30,6 +30,22 @@<category>fix</category><description>Avatars made on three.ws are saved in a compressed format to keep them small and quick to download. Seven pages — Cosmos, Minted, Creations, Vault, Pitch, the embodied-agent page, and the microphone lipsync demo — never set up the matching decompressor, so instead of a 3D model you got an empty viewer and an error in the console. All seven now load the decoder before the model, and the avatars appear as they should. The fix also went into the embeddable agent widget itself, so anyone who has pasted a three.ws agent onto their own site gets working compressed avatars automatically, with nothing to change on their end.</description></item>+ <item>+ <title>Homepage: agent thumbnails load, and the marketplace strip is alive again</title>+ <link>https://three.ws/</link>+ <guid isPermaLink="false">2026-07-09:Homepage: agent thumbnails load, and the marketplace strip is alive again</guid>+ <pubDate>Thu, 09 Jul 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The avatar picker on the homepage was asking our image server for five pictures that had never been made, so the browser refused them and those slots sat blank. It now asks only for pictures that actually exist, and it leads with the avatars that have one — where an avatar has no picture yet, it draws a clean initial instead of a broken tile. Underneath it, the live marketplace strip had been silently empty: it was reading the agent list in the wrong shape and quietly gave up every time, leaving just a lone "Browse marketplace" link. It now reads the list correctly and shows ten real agents you can click straight through to. The 3D models themselves were always loading fine and are untouched.</description>+ </item>+ <item>+ <title>IRL on phones: controls no longer cover each other</title>+ <link>https://three.ws/irl</link>+ <guid isPermaLink="false">2026-07-09:IRL on phones: controls no longer cover each other</guid>+ <pubDate>Thu, 09 Jul 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>The IRL screen was built up feature by feature until buttons buried the view on phones — the action pills stacked five rows deep over the walk joystick, the money-drops button floated on top of other controls, and small close buttons were easy to miss. The whole HUD is now built for thumbs: one swipeable action row hugs the bottom edge, the joystick zone floats above it so drags never hit a button, the drops button repositions itself and steps aside whenever a sheet is open, and every close button and tab meets the 44-pixel tap size. The avatar and camera view are finally unobstructed.</description>+ </item><item><title>Live SOL price restored on /three-live; Flappin UFO demo retired</title><link>https://three.ws/three-live</link>@@ -46,6 +62,14 @@<category>fix</category><description>Both pages failed to load anything at all, and both are working again. The receipt verifier at /vanity/verify loads its cryptography straight into your browser so the audit runs on your machine and nothing is sent anywhere — but the browser had no way to locate those crypto libraries, so the page sat dead and no receipt could be checked. It now resolves them properly: paste a receipt and every check runs, right through to opening a sealed envelope. On /temporary, the payment widget behind the in-world "Feature your content" billboard was loaded the wrong way and crashed on arrival, taking the pay button with it. It now loads the same way it does on every other page that uses it.</description></item>+ <item>+ <title>Your agents can now be placed privately, and nobody can browse /irl locations from afar</title>+ <link>https://three.ws/irl-privacy</link>+ <guid isPermaLink="false">2026-07-09:Your agents can now be placed privately, and nobody can browse /irl locations from afar</guid>+ <pubDate>Thu, 09 Jul 2026 12:00:00 GMT</pubDate>+ <category>security</category>+ <description>Two changes to how /irl handles where you are. First, reading the agents near you now requires proving you have a recent location fix for that spot — until today anyone could ask our servers what agents sat at any coordinate on earth without ever going there. Second, a placed agent can now be private: you still see it in AR exactly where you left it, but it is withheld from everyone else's nearby feed, from shared rooms, and from the World Lines quest map. New placements are private by default while /irl is still in testing, and the privacy center's unpublish button now makes a pin private instead of hiding it from you too. You can make any pin public again whenever you want.</description>+ </item><item><title>Blockchain TVL by Chain</title><link>https://three.ws/chains</link>diff --git a/public/features.json b/public/features.jsonindex cb280f58f..48160ebd2 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-09T21:43:03.329Z",+ "generated_at": "2026-07-09T21:44:29.508Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/irl/privacy-center.js b/src/irl/privacy-center.jsindex 765df747d..a9e28763e 100644--- a/src/irl/privacy-center.js+++ b/src/irl/privacy-center.js@@ -490,16 +490,21 @@ export function openMyDataPanel({ onChanged } = {}) {}function renderPinRow(p) {- const hidden = !!p.hidden_at;+ // `published === false` is PRIVATE: still yours to see in AR, withheld from+ // everyone else. `hidden_at` is the moderation/expiry hide — a pin taken out+ // of the world entirely — so a row is "private" only on the published flag.+ const priv = p.published === false;const name = p.avatar_name || p.caption || 'Placed agent';const sub = fmtDate(p.placed_at) + (p.expires_at ? ` · expires ${fmtDate(p.expires_at)}` : ' · permanent');return `- <div class="irlpc-pin ${hidden ? 'hidden' : ''}" data-pin="${esc(p.id)}" data-hidden="${hidden}">+ <div class="irlpc-pin ${priv ? 'hidden' : ''}" data-pin="${esc(p.id)}" data-hidden="${priv}"><div class="pmeta">- <div class="pname">${esc(name)}${hidden ? '<span class="irlpc-tag">hidden</span>' : ''}</div>- <div class="psub">${esc(sub)}</div>+ <div class="pname">${esc(name)}${priv ? '<span class="irlpc-tag">private</span>' : ''}</div>+ <div class="psub">${esc(sub)}${priv ? ' · only you can see this' : ''}</div></div>- <button class="irlpc-pinbtn" type="button" data-toggle>${hidden ? 'Republish' : 'Unpublish'}</button>+ <button class="irlpc-pinbtn" type="button" data-toggle+ title="${priv ? 'Let anyone standing here discover this agent' : 'Keep this agent visible to you, hidden from everyone else'}"+ >${priv ? 'Make public' : 'Make private'}</button><button class="irlpc-pinbtn danger" type="button" data-del>Delete</button></div>`;}@@ -510,24 +515,24 @@ export function openMyDataPanel({ onChanged } = {}) {const delBtn = rowEl.querySelector('[data-del]');toggleBtn?.addEventListener('click', async () => {- const hidden = rowEl.getAttribute('data-hidden') === 'true';- const action = hidden ? 'republish' : 'unpublish';+ const wasPrivate = rowEl.getAttribute('data-hidden') === 'true';+ const action = wasPrivate ? 'republish' : 'unpublish';toggleBtn.disabled = true; toggleBtn.textContent = '…';try {const r = await privacyApi('PATCH', { body: { pinId: id, action } });- const nowHidden = !!r?.hidden;- rowEl.setAttribute('data-hidden', String(nowHidden));- rowEl.classList.toggle('hidden', nowHidden);- toggleBtn.textContent = nowHidden ? 'Republish' : 'Unpublish';+ const nowPrivate = r?.visibility === 'private';+ rowEl.setAttribute('data-hidden', String(nowPrivate));+ rowEl.classList.toggle('hidden', nowPrivate);+ toggleBtn.textContent = nowPrivate ? 'Make public' : 'Make private';const nameEl = rowEl.querySelector('.pname');const tag = nameEl.querySelector('.irlpc-tag');- if (nowHidden && !tag) nameEl.insertAdjacentHTML('beforeend', '<span class="irlpc-tag">hidden</span>');- if (!nowHidden && tag) tag.remove();- toast(nowHidden ? 'Pin hidden from everyone' : 'Pin is visible again');+ if (nowPrivate && !tag) nameEl.insertAdjacentHTML('beforeend', '<span class="irlpc-tag">private</span>');+ if (!nowPrivate && tag) tag.remove();+ toast(nowPrivate ? 'Only you can see this agent now' : 'Anyone standing here can discover this agent');onChanged?.();} catch (e) {toast(e.message || 'Could not update the pin', 'err');- toggleBtn.textContent = hidden ? 'Republish' : 'Unpublish';+ toggleBtn.textContent = wasPrivate ? 'Make public' : 'Make private';} finally {toggleBtn.disabled = false;}diff --git a/src/oracle.js b/src/oracle.jsindex b31eb57c0..ec4ceed97 100644--- a/src/oracle.js+++ b/src/oracle.js@@ -9,6 +9,8 @@// conviction-tier edge backtest, the agent action-loop arm panel, and the 3D// force graph. The coin drawer also streams live trades via oracle-tape.js.+import { proxiedImageURL } from './ipfs.js';+const NETWORK = 'mainnet';const $ = (s, r = document) => r.querySelector(s);const $$ = (s, r = document) => [...r.querySelectorAll(s)];@@ -58,17 +60,16 @@ const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '//// The placeholder URL is carried in `data-ph` and read back via `this.dataset.ph`// rather than interpolated into the onerror script. Seeds are attacker-controlled-// (a pump.fun launcher picks the token symbol) and encodeURIComponent leaves `'`-// unescaped, so splicing one into a quoted JS string literal would be an injection-// vector. Here the onerror body is a constant and both URLs only ever land in-// esc()'d attribute values, where no JS-context escaping is needed at all.-const encUri = (v) =>- encodeURIComponent(String(v)).replace(/[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);-+// (a pump.fun launcher picks the token symbol), so splicing one into a quoted JS+// string literal would be an injection vector. Here the onerror body is a constant+// and both URLs only ever land in esc()'d attribute values.function proxyImgAttrs(rawUrl, seed) {- const placeholder = `/api/img?seed=${encUri(seed || 'coin')}`;- const src = rawUrl && /^(https?|ipfs):\/\//i.test(String(rawUrl))- ? `/api/img?url=${encUri(rawUrl)}&seed=${encUri(seed || 'coin')}`+ const s = String(seed || 'coin');+ const placeholder = `/api/img?${new URLSearchParams({ seed: s })}`;+ // Only remote art is proxied. Anything else — a javascript:/data: URI reaching+ // us through a creator-controlled feed — degrades to the placeholder instead.+ const src = rawUrl && /^(https?|ipfs|ar):\/\//i.test(String(rawUrl))+ ? proxiedImageURL(String(rawUrl), s): placeholder;return `src="${esc(src)}" data-ph="${esc(placeholder)}" onerror="this.onerror=null;this.src=this.dataset.ph"`;}diff --git a/tests/api-img-proxy.test.js b/tests/api-img-proxy.test.jsindex e38e2d99a..74478f9dd 100644--- a/tests/api-img-proxy.test.js+++ b/tests/api-img-proxy.test.js@@ -1,6 +1,6 @@// Coverage for api/img.js — the same-origin image proxy used by the live-// pump.fun feeds (/pump-live, /pump-visualizer). We verify the metadata-// resolution mode added for token launch art:+// pump.fun feeds (/pump-live, /pump-visualizer, /oracle, /radar). We verify the+// metadata resolution mode added for token launch art://// 1. ?seed=<x> alone yields the on-brand SVG placeholder (no upstream call).// 2. ?meta=<json-uri> resolves the document's `.image` server-side and proxies@@ -9,6 +9,16 @@// serve attacker-supplied inline content from our own origin).// 4. A metadata fetch failure falls through to the placeholder, never an error.// 5. No url/meta/seed at all is a 400.+//+// …and the `?url=` metadata follow: upstream feeds store the token's image URI+// and its metadata URI in one column, so a `?url=` may address either. When it+// resolves to a JSON document we follow its `.image` exactly one hop:+//+// 6. ?url=<json-uri> → follows `.image` → proxies the real artwork.+// 7. The follow is one hop only — a doc naming another doc terminates.+// 8. A data: image in a followed doc is rejected → placeholder.+// 9. ?url=<image> is served directly, unchanged (no JSON path taken).+// 10. The `?meta=` path does not accept JSON for the artwork itself.import { describe, it, expect, vi, beforeEach } from 'vitest';