Skip to content

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

Ship IRL agent-card endpoint, irl.js camera awareness, and dashboard polish

nirholas1c31343af8dd
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3a347c0e..277d463af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,7 +46,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **IRL and XR: choose any of your 3D avatars from a bottom-sheet picker** — Both /irl and /xr now let you swap your 3D avatar without leaving the page. Tap Avatar (IRL) or Change (XR) to open a thumbnail grid of all your uploaded avatars. Selecting one hot-swaps the model in the scene instantly — camera, animations, half-body mode, and AR state all carry over. Signed-out users see a prompt to sign in; empty accounts link to the creation flow. (`/irl`) `[feature]`
- **IRL mode now remembers your scene between visits** — Refreshing or returning to the IRL AR playground no longer wipes your setup. Your chosen avatar, the pinned/locked state, and every object you placed on the floor (orbs, crates, crystals, rings, pillars) are now saved to your device and restored automatically on your next visit. Opening a shared ?avatar= link still takes precedence so explicit links always win. (`/irl`) `[feature, improvement]`
- **IRL: move your phone to look around your avatar in AR** — When you pin an avatar to the real world in IRL mode, rotating your phone now physically moves the camera — the avatar stays locked to its spot while your view orbits around it, exactly like Pokémon GO. On iOS the app requests motion sensor access as required by iOS 13+. Drag still works as a fallback when orientation is unavailable. The lock icon pulses while active tracking is on. (`/irl`) `[feature, improvement]`
-- **IRL: multiplayer AR, camera-aware agents, agent switcher, and owner dashboard** — three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows live wallet balances (ETH/USDC/SOL), skill badges, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there. (`/irl`) `[feature]`
+- **IRL: multiplayer AR, camera-aware agents, agent switcher, and owner dashboard** — three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows each agent's live SOL wallet balance, reputation, the services it offers with prices, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move and re-aim your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there. (`/irl`) `[feature]`
- **IRL: pinned avatars now face the direction you were looking** — When you pin your agent to a real-world spot in IRL mode, the app records which compass direction you were facing and stores it with the pin. Nearby users now see your avatar oriented that way — north, NE, east, and so on — instead of every agent facing the same default direction. The orientation is preserved as the detailed 3D model loads in, your own avatar snaps to the stored heading the moment you lock it, and the placement status confirms it (e.g. "Pinned facing NE"). Your IRL Placements dashboard shows a facing badge on each pin card. (`/irl`) `[feature]`
- **IRL: place your agent on the map — others nearby can see it** — Pin your 3D avatar to a real GPS coordinate in IRL mode and other users who walk within 150 metres see your agent appear in their AR view. Each nearby agent shows its name and distance as a floating label; tap it for a detail sheet with the option to pay via x402. Your own pin is removed automatically when you unpin the avatar or close the page. Requires location permission. (`/irl`) `[feature]`
- **Launch detail: pump.fun comment sentiment in Community section** — The coin detail page now shows live pump.fun comment sentiment in the Community section — bullish / bearish / mixed classification with positive, negative, and neutral percentage bars, and a sample comment. Loads asynchronously after the page renders so it never delays the Oracle conviction score or smart money data. Coins with fewer than 3 comments are silently skipped. (`/launches`) `[feature]`
diff --git a/api/irl/agent-card.js b/api/irl/agent-card.js
new file mode 100644
index 000000000..2a45d5156
--- /dev/null
+++ b/api/irl/agent-card.js
@@ -0,0 +1,169 @@
+/**
+ * IRL Agent Card — the public profile shown when a viewer taps a 3D agent
+ * placed in the real world.
+ *
+ * GET /api/irl/agent-card?id=<agentId> resolve by agent identity id
+ * GET /api/irl/agent-card?pin=<pinId> resolve via the pin's agent_id
+ *
+ * Returns a compact, public-safe card the AR popup renders inline:
+ * { id, name, description, thumbnail, home_url, skills,
+ * services: [{ slug, name, description, price_usdc, network }],
+ * reputation: { chats, services, registered, onchain, score },
+ * x402_endpoint }
+ *
+ * Aggregates agent_identities + agent_paid_services into one cheap, cached
+ * payload so the camera popup stays instant. Public, IP rate-limited, Redis +
+ * CDN cached. Falls back to the pin's own avatar_name/x402_endpoint when a pin
+ * has no linked agent (anonymous placements still get a usable card).
+ */
+
+import { cors, json, error, method, wrap, rateLimited } from '../_lib/http.js';
+import { limits, clientIp } from '../_lib/rate-limit.js';
+import { sql } from '../_lib/db.js';
+import { publicUrl } from '../_lib/r2.js';
+import { getRedis } from '../_lib/redis.js';
+import { atomicsToUsdc } from '../_lib/agent-paid-services.js';
+
+const CACHE_TTL_S = 60;
+
+// A small, monotonic reputation score (0–100) from public signals so the popup
+// can show a single number without an on-chain round-trip. Chat volume is the
+// dominant signal; registration and offering paid services add trust.
+function reputationScore({ chats, services, registered }) {
+ const chatPts = Math.min(70, Math.round(Math.log10(Math.max(1, chats)) * 28));
+ const svcPts = Math.min(18, services * 6);
+ const regPts = registered ? 12 : 0;
+ return Math.min(100, chatPts + svcPts + regPts);
+}
+
+async function buildCard(agentId, fallback = {}) {
+ const [agent] = await sql`
+ SELECT i.id, i.name, i.description, i.skills, i.home_url, i.chat_count, i.meta,
+ a.thumbnail_key AS avatar_thumbnail_key,
+ a.visibility AS avatar_visibility
+ FROM agent_identities i
+ LEFT JOIN avatars a ON a.id = i.avatar_id AND a.deleted_at IS NULL
+ WHERE i.id = ${agentId} AND i.deleted_at IS NULL AND i.is_public = true
+ LIMIT 1
+ `.catch(() => []);
+
+ if (!agent) return null;
+
+ const services = await sql`
+ SELECT slug, name, description, price_atomics, network
+ FROM agent_paid_services
+ WHERE agent_id = ${agentId} AND archived_at IS NULL
+ ORDER BY created_at DESC
+ LIMIT 8
+ `.catch(() => []);
+
+ const meta = agent.meta || {};
+ const onchain = meta.onchain || null;
+ const registered = !!(onchain || meta.sol_mint_address || meta.erc8004_agent_id);
+ const thumbPub = agent.avatar_visibility === 'public' || agent.avatar_visibility === 'unlisted';
+ const chats = Number(agent.chat_count) || 0;
+
+ return {
+ id: agent.id,
+ name: agent.name || fallback.name || 'Agent',
+ description: agent.description || fallback.description || null,
+ thumbnail: agent.avatar_thumbnail_key && thumbPub ? publicUrl(agent.avatar_thumbnail_key) : null,
+ home_url: agent.home_url || `/agents/${agent.id}`,
+ skills: Array.isArray(agent.skills) ? agent.skills.slice(0, 12) : [],
+ services: services.map((s) => ({
+ slug: s.slug,
+ name: s.name,
+ description: s.description || null,
+ price_usdc: atomicsToUsdc(s.price_atomics),
+ network: s.network || 'base',
+ })),
+ reputation: {
+ chats,
+ services: services.length,
+ registered,
+ onchain: onchain ? { network: onchain.network, asset: onchain.sol_asset || null } : null,
+ score: reputationScore({ chats, services: services.length, registered }),
+ },
+ x402_endpoint: fallback.x402_endpoint || null,
+ };
+}
+
+export default wrap(async (req, res) => {
+ if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;
+ if (!method(req, res, ['GET'])) return;
+
+ const rl = await limits.publicIp(clientIp(req));
+ if (!rl.success) return rateLimited(res, rl);
+
+ const p = new URL(req.url, `http://${req.headers.host || 'x'}`).searchParams;
+ const idParam = (p.get('id') || '').trim();
+ const pinParam = (p.get('pin') || '').trim();
+
+ if (!idParam && !pinParam) {
+ return error(res, 400, 'validation_error', 'id or pin is required');
+ }
+
+ let agentId = idParam || null;
+ let fallback = {};
+
+ // Resolve the linked agent (and an anonymous-pin fallback) from a pin id.
+ if (!agentId && pinParam) {
+ const [pin] = await sql`
+ SELECT agent_id, avatar_name, caption, x402_endpoint
+ FROM irl_pins
+ WHERE id = ${pinParam} AND (expires_at IS NULL OR expires_at > NOW())
+ LIMIT 1
+ `.catch(() => []);
+ if (!pin) return error(res, 404, 'not_found', 'pin not found');
+ agentId = pin.agent_id || null;
+ fallback = {
+ name: pin.avatar_name || null,
+ description: pin.caption || null,
+ x402_endpoint: pin.x402_endpoint || null,
+ };
+ }
+
+ const cacheKey = agentId ? `irlcard:${agentId}` : null;
+ const redis = cacheKey ? await getRedis() : null;
+
+ if (redis && cacheKey) {
+ try {
+ const cached = await redis.get(cacheKey);
+ if (cached) {
+ res.setHeader('X-Cache', 'HIT');
+ // The pin-derived x402 endpoint isn't part of the cached identity card.
+ if (fallback.x402_endpoint && !cached.x402_endpoint) cached.x402_endpoint = fallback.x402_endpoint;
+ return json(res, 200, { card: cached }, { 'Cache-Control': 'public, max-age=60, stale-while-revalidate=300' });
+ }
+ } catch { /* cache miss */ }
+ }
+
+ // No linked agent — return the anonymous pin's own minimal card.
+ if (!agentId) {
+ return json(res, 200, {
+ card: {
+ id: null,
+ name: fallback.name || 'Agent',
+ description: fallback.description || null,
+ thumbnail: null,
+ home_url: null,
+ skills: [],
+ services: [],
+ reputation: { chats: 0, services: 0, registered: false, onchain: null, score: 0 },
+ x402_endpoint: fallback.x402_endpoint || null,
+ anonymous: true,
+ },
+ }, { 'Cache-Control': 'public, max-age=30' });
+ }
+
+ const card = await buildCard(agentId, fallback);
+ if (!card) return error(res, 404, 'not_found', 'agent not found');
+
+ if (redis && cacheKey) {
+ // Cache the identity portion only; the per-pin x402 endpoint is merged per request.
+ const { x402_endpoint, ...identity } = card;
+ redis.set(cacheKey, identity, { ex: CACHE_TTL_S }).catch(() => {});
+ }
+
+ return json(res, 200, { card }, { 'Cache-Control': 'public, max-age=60, stale-while-revalidate=300' });
+});
diff --git a/api/irl/pins.js b/api/irl/pins.js
index 1881fc692..9c2acbad3 100644
--- a/api/irl/pins.js
+++ b/api/irl/pins.js
@@ -192,7 +192,7 @@ export default wrap(async (req, res) => {
if ('heading' in body && isFinite(parseFloat(body.heading))) {
updates.heading = ((Math.round(parseFloat(body.heading)) % 360) + 360) % 360;
}
- // x402Endpoint: attach/clear a paid endpoint so visitors can pay the agent IRL
+ // x402Endpoint: attach or update a paid endpoint so visitors can pay the agent IRL
if ('x402Endpoint' in body) updates.x402Endpoint = body.x402Endpoint ?? null;
if (!Object.keys(updates).length) {
diff --git a/data/changelog.json b/data/changelog.json
index 14b19491b..0f3fefc95 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -4,7 +4,7 @@
{
"date": "2026-06-16",
"title": "IRL: multiplayer AR, camera-aware agents, agent switcher, and owner dashboard",
- "summary": "three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows live wallet balances (ETH/USDC/SOL), skill badges, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there.",
+ "summary": "three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows each agent's live SOL wallet balance, reputation, the services it offers with prices, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move and re-aim your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there.",
"tags": ["feature"],
"link": "/irl"
},
diff --git a/pages/irl.html b/pages/irl.html
index 61be2fff9..f1a6580c5 100644
--- a/pages/irl.html
+++ b/pages/irl.html
@@ -742,6 +742,18 @@
color: #6b7280;
margin-bottom: 10px;
}
+ /* Reputation bar */
+ .irl-sheet-rep { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
+ .irl-rep-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
+ .irl-rep-fill { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #34d399, #88bbff); transition: width 0.5s ease; }
+ .irl-rep-text { font-size: 12px; font-weight: 600; color: #34d399; white-space: nowrap; font-variant-numeric: tabular-nums; }
+ /* Services list */
+ .irl-sheet-services { margin-bottom: 14px; }
+ .irl-services-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin-bottom: 6px; }
+ .irl-services-list { display: flex; flex-direction: column; gap: 6px; }
+ .irl-service-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
+ .irl-service-name { color: #e5e7eb; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .irl-service-price { color: #34d399; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Multiplayer indicator row */
.irl-multiplayer-note {
display: flex;
@@ -1039,9 +1051,17 @@
<button class="irl-sheet-close" id="irl-sheet-close" type="button" aria-label="Close">×</button>
</div>
<p id="irl-sheet-caption" hidden></p>
- <!-- Enriched agent data (populated async from /api/agents/:id) -->
+ <!-- Enriched agent data (populated async from /api/irl/agent-card) -->
<p id="irl-sheet-description" hidden></p>
+ <div id="irl-sheet-rep" class="irl-sheet-rep" hidden>
+ <span class="irl-rep-bar" aria-hidden="true"><span id="irl-rep-fill" class="irl-rep-fill"></span></span>
+ <span id="irl-rep-text" class="irl-rep-text"></span>
+ </div>
<div id="irl-sheet-skills" class="irl-sheet-skills" hidden></div>
+ <div id="irl-sheet-services" class="irl-sheet-services" hidden>
+ <div class="irl-services-label">Services</div>
+ <div id="irl-services-list" class="irl-services-list"></div>
+ </div>
<div class="irl-multiplayer-note" id="irl-sheet-multiplayer" hidden>
<span class="irl-multiplayer-dot"></span>
<span id="irl-sheet-multiplayer-text">Visible to all users at this location</span>
diff --git a/public/changelog.json b/public/changelog.json
index a8abb56d1..6afe34201 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-17T00:02:25.909Z",
+ "generated_at": "2026-06-17T00:14:19.759Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -417,7 +417,7 @@
"date": "2026-06-16",
"type": "update",
"title": "IRL: multiplayer AR, camera-aware agents, agent switcher, and owner dashboard",
- "summary": "three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows live wallet balances (ETH/USDC/SOL), skill badges, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there.",
+ "summary": "three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows each agent's live SOL wallet balance, reputation, the services it offers with prices, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move and re-aim your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there.",
"link": "/irl",
"tags": [
"feature"
diff --git a/public/changelog.xml b/public/changelog.xml
index 66c1ff4f3..069f9cea3 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -332,7 +332,7 @@
<guid isPermaLink="false">2026-06-16:IRL: multiplayer AR, camera-aware agents, agent switcher, and owner dashboard</guid>
<pubDate>Tue, 16 Jun 2026 12:00:00 GMT</pubDate>
<category>feature</category>
- <description>three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows live wallet balances (ETH/USDC/SOL), skill badges, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there.</description>
+ <description>three.ws/irl is now a shared augmented reality space. Any 3D AI agent pinned to a GPS location is visible to every user who walks by with their camera open — no account required to see others' agents. Agents now track the camera: as you physically move or point your phone, nearby agents slowly rotate to face you (like the classic mouse-hover billboard trick, but in real life). When they're in your camera's view cone their name tag pulses green. Tap any 3D agent model directly — or its floating label — to open a rich profile card showing their description, skills, visit count, and a Pay button if they accept x402. A new My Agents panel lets you switch which of your AI agents is placed at a location. Your own pinned agent shows a gold label so it's visually distinct from others nearby. The IRL Dashboard now shows each agent's live SOL wallet balance, reputation, the services it offers with prices, recent encounter logs (who viewed, messaged, or paid your agent IRL), a remote location update tool (move and re-aim your pin without visiting the physical spot), and an outfit swap to change the 3D model shown there.</description>
</item>
<item>
<title>IRL: pinned avatars now face the direction you were looking</title>
diff --git a/public/dragon-section.js b/public/dragon-section.js
index 9a0c63ee4..fa2a78973 100644
--- a/public/dragon-section.js
+++ b/public/dragon-section.js
@@ -35,7 +35,7 @@
canvas.height = Math.round(H * dpr);
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
refreshRect();
- if (initialized) { layoutAllText(); buildTunnel(); }
+ if (initialized && !reduceMotion) { layoutAllText(); buildTunnel(); }
}
const ro = new ResizeObserver(resize);
ro.observe(container);
@@ -55,9 +55,10 @@
// Refresh the cached canvas rect so pointer handlers don't force a layout
// read (getBoundingClientRect) on every mousemove/touchmove — a classic
- // source of input-handler jank. Updated on resize and scroll only.
+ // source of input-handler jank. Refreshed on resize and once per animation
+ // frame (see frame()); pointer events only fire while the canvas is in view,
+ // which is exactly when the frame loop is running, so the cache stays fresh.
function refreshRect() { rectCache = canvas.getBoundingClientRect(); }
- window.addEventListener('scroll', refreshRect, { passive: true });
function toLocal(clientX, clientY) {
const r = rectCache;
@@ -571,6 +572,10 @@
// visible. Start out paused — the IntersectionObserver below kicks the loop
// off when the section scrolls into view, so a below-the-fold dragon never
// burns main-thread time during the initial page load.
+ //
+ // This section is a page-lifetime singleton (it lives permanently in the
+ // homepage markup and is never unmounted), so the observers and the
+ // visibilitychange listener below are intentionally not torn down.
let inView = false;
let tabVisible = !document.hidden;
@@ -593,6 +598,7 @@
function frame(now) {
if (!inView || !tabVisible) { animId = null; return; }
+ refreshRect();
const dt = Math.min((now - lastT) / 1000, 0.05);
lastT = now; time += dt; autoPilotT += dt;
@@ -620,7 +626,7 @@
}
// Draw a single settled frame so the section never shows a blank canvas
- // before the loop starts (or, under reduced-motion, ever runs).
+ // before the (in-view) loop starts.
function renderStatic() {
const em = effectiveMouse();
ctx.save();
@@ -632,15 +638,21 @@
ctx.restore();
}
- // Init
+ // Init. Under reduced-motion the canvas is display:none (see home.html), so
+ // skip the geometry build and all painting entirely — the dragon is purely
+ // decorative and never shown to those users.
resize();
- layoutAllText();
- buildTunnel();
- rebuildDragon();
- initialized = true;
- document.fonts.ready.then(() => { layoutAllText(); if (!animId) renderStatic(); });
- renderStatic();
- // maybeStart is a no-op until the section is in view (and the tab visible),
- // and under reduced-motion the static frame above is all we ever paint.
+ if (!reduceMotion) {
+ layoutAllText();
+ buildTunnel();
+ rebuildDragon();
+ initialized = true;
+ document.fonts.ready.then(() => { layoutAllText(); if (!animId) renderStatic(); });
+ renderStatic();
+ } else {
+ initialized = true;
+ }
+ // maybeStart is a no-op under reduced-motion and until the section scrolls
+ // into view with the tab visible.
maybeStart();
})();
diff --git a/public/features.json b/public/features.json
index 1e69e6131..2ee8e5ca5 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-16T23:23:21.972Z",
+ "generated_at": "2026-06-17T00:14:19.742Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/irl.js b/src/irl.js
index c94fffb90..cebd6a6de 100644
--- a/src/irl.js
+++ b/src/irl.js
@@ -1188,10 +1188,14 @@ async function openPinSheet(pin) {
const skillsEl = document.getElementById('irl-sheet-skills');
const viewsEl = document.getElementById('irl-sheet-views');
const multiEl = document.getElementById('irl-sheet-multiplayer');
+ const repEl = document.getElementById('irl-sheet-rep');
+ const servicesEl = document.getElementById('irl-sheet-services');
if (descEl) { descEl.textContent = ''; descEl.hidden = true; }
if (skillsEl) { skillsEl.innerHTML = ''; skillsEl.hidden = true; }
if (viewsEl) { viewsEl.hidden = true; }
if (multiEl) { multiEl.hidden = true; }
+ if (repEl) { repEl.hidden = true; }
+ if (servicesEl) { servicesEl.hidden = true; }
sheet.dataset.agentId = pin.agent_id ?? '';
sheet.dataset.agentName = pin.avatar_name ?? '';
@@ -1232,22 +1236,57 @@ async function openPinSheet(pin) {
pin.view_count = (pin.view_count ?? 0) + 1;
}
- // Async: enrich with full agent profile data
- if (pin.agent_id) {
+ // Async: enrich with the public agent card — description, skills, reputation,
+ // and the paid services this agent offers. One cached call resolves by pin so
+ // anonymous placements still return a usable card.
+ if (pin.id) {
try {
- const r = await fetch(`/api/agents/${encodeURIComponent(pin.agent_id)}`);
+ const r = await fetch(`/api/irl/agent-card?pin=${encodeURIComponent(pin.id)}`);
if (r.ok) {
- const data = await r.json();
- const agent = data.agent ?? data;
- if (agent.description && descEl) {
- descEl.textContent = agent.description;
- descEl.hidden = false;
- }
- if (agent.skills?.length && skillsEl) {
- skillsEl.innerHTML = agent.skills.slice(0, 6).map(s =>
- `<span class="irl-skill-badge">${_escHtml(s)}</span>`,
- ).join('');
- skillsEl.hidden = false;
+ const { card } = await r.json();
+ if (card) {
+ if (card.description && descEl) {
+ descEl.textContent = card.description;
+ descEl.hidden = false;
+ }
+ if (card.skills?.length && skillsEl) {
+ skillsEl.innerHTML = card.skills.slice(0, 6).map(s =>
+ `<span class="irl-skill-badge">${_escHtml(s)}</span>`,
+ ).join('');
+ skillsEl.hidden = false;
+ }
+ // Reputation — score is 0–100; show it as a bar + label.
+ const score = card.reputation?.score ?? 0;
+ if (score > 0 && repEl) {
+ const fill = document.getElementById('irl-rep-fill');
+ const text = document.getElementById('irl-rep-text');
+ if (fill) fill.style.width = `${Math.min(100, score)}%`;
+ if (text) {
+ const chats = card.reputation?.chats ?? 0;
+ text.textContent = chats > 0
+ ? `Reputation ${score}/100 · ${chats} chat${chats === 1 ? '' : 's'}`
+ : `Reputation ${score}/100`;
+ }
+ repEl.hidden = false;
+ }
+ // Services the agent offers, with prices.
+ if (card.services?.length && servicesEl) {
+ const listEl = document.getElementById('irl-services-list');
+ if (listEl) {
+ listEl.innerHTML = card.services.slice(0, 6).map(s => {
+ const price = s.price_usdc != null
+ ? `$${Number(s.price_usdc).toFixed(2)} ${(s.network || 'base').toUpperCase()}`
+ : 'Free';
+ return `<div class="irl-service-row"><span class="irl-service-name">${_escHtml(s.name || s.slug)}</span><span class="irl-service-price">${_escHtml(price)}</span></div>`;
+ }).join('');
+ servicesEl.hidden = false;
+ }
+ }
+ // Surface a pay button if the card resolved an x402 endpoint.
+ if (card.x402_endpoint && payBtn) {
+ payBtn.hidden = false;
+ payBtn.dataset.endpoint = card.x402_endpoint;
+ }
}
}
} catch {}
diff --git a/tests/e2e/galaxy.spec.js b/tests/e2e/galaxy.spec.js
index 66ad377c0..b8bf19d81 100644
--- a/tests/e2e/galaxy.spec.js
+++ b/tests/e2e/galaxy.spec.js
@@ -171,7 +171,15 @@ async function gotoGalaxy(page, { mode = 'success', path = '/ibm/galaxy', expect
// ── Tests ─────────────────────────────────────────────────────────────────────
-test.describe('IBM Agent Galaxy', () => {
+// reason: the IBM-branded galaxy page (pages/ibm/galaxy.html → src/ibm-galaxy.js,
+// route /ibm/galaxy, endpoint /api/ibm/galaxy, body.dataset.galaxyState markers)
+// was deleted in the concurrent site overhaul (commits 7af4f0b3 "delete IBM pages",
+// 2d34e80f "Site overhaul", 9664ef4b "Wire orphaned pages into router"). The galaxy
+// product now lives at top-level /galaxy via src/galaxy.js fetching /api/galaxy with
+// a different response shape and no galaxyState dataset — none of the locators or
+// the fixture below match it. Skipped (not deleted) until the new /galaxy page's
+// router wiring stabilizes and this spec is rewritten against src/galaxy.js.
+test.describe.skip('IBM Agent Galaxy', () => {
// Throw on any real uncaught page error. Vite's HMR websocket emits a
// "WebSocket closed without opened." error in headless Codespace environments
// (the HMR client targets the :3000 forwarded domain, not the test port) —
diff --git a/vercel.json b/vercel.json
index ef540b81e..06de5d4b6 100644
--- a/vercel.json
+++ b/vercel.json
@@ -169,6 +169,12 @@
"api/irl/pins.js": {
"maxDuration": 15
},
+ "api/irl/interactions.js": {
+ "maxDuration": 15
+ },
+ "api/irl/agent-card.js": {
+ "maxDuration": 15
+ },
"api/**/*.js": {
"includeFiles": "{examples/skills/**,data/pages.json,data/archives/**,data/rss/**,data/_generated/**,sdk/src/sas-config.json}",
"maxDuration": 30
@@ -1943,6 +1949,14 @@
"src": "/api/irl/pins",
"dest": "/api/irl/pins.js"
},
+ {
+ "src": "/api/irl/interactions",
+ "dest": "/api/irl/interactions.js"
+ },
+ {
+ "src": "/api/irl/agent-card",
+ "dest": "/api/irl/agent-card.js"
+ },
{
"src": "/api/copy/executions",
"dest": "/api/copy/executions.js"