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.

Remove features section and related code from the application

nirholas44ebf2fc00d0
diff --git a/agent-embed.html b/agent-embed.html
index 01625e6aa..5dd32abd2 100644
--- a/agent-embed.html
+++ b/agent-embed.html
@@ -362,6 +362,7 @@
viewer.renderer?.setClearAlpha(0);
if (viewer.scene) viewer.scene.background = null;
}
+ if (params.get('gaze') === 'off') viewer.state.followMode = 'off';
await viewer.load(glbUrl, '', new Map());
if (bg === 'dark') {
diff --git a/public/pumpfun.html b/public/pumpfun.html
index ea118bba8..3963b6f52 100644
--- a/public/pumpfun.html
+++ b/public/pumpfun.html
@@ -1046,6 +1046,8 @@
iframeUrl.searchParams.set('src', params.avatar);
// Pass some params to the agent iframe for its own analytics
iframeUrl.searchParams.set('page', 'pumpfun');
+ // Cursor stays a normal cursor — no avatar gaze tracking on this page
+ iframeUrl.searchParams.set('gaze', 'off');
if (params.asset) iframeUrl.searchParams.set('asset', params.asset);
if (params.mint) iframeUrl.searchParams.set('mint', params.mint);
iframe.src = iframeUrl.href;
diff --git a/src/agent-solana-wallet.js b/src/agent-solana-wallet.js
index ae7bc4003..7eb4b44cd 100644
--- a/src/agent-solana-wallet.js
+++ b/src/agent-solana-wallet.js
@@ -31,7 +31,7 @@ export async function fetchAgentSolanaWallet(agentId, network = 'mainnet') {
const resp = await fetch(ENDPOINT(agentId, `network=${encodeURIComponent(network)}`), {
credentials: 'include',
});
- if (resp.status === 403) return { status: 'forbidden' };
+ if (resp.status === 401 || resp.status === 403) return { status: 'forbidden' };
const json = await resp.json().catch(() => ({}));
if (resp.status === 404) return { status: 'none' };
if (!resp.ok) return { status: 'error', error: json?.error?.message || `HTTP ${resp.status}` };
diff --git a/tasks/pump-dashboard-real-apis/04-market-chart-token-selector.md b/tasks/pump-dashboard-real-apis/04-market-chart-token-selector.md
new file mode 100644
index 000000000..fc75fbb18
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/04-market-chart-token-selector.md
@@ -0,0 +1,33 @@
+# 04 — Market Chart token selector: real trending-token list
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) line ~519 contains a `<select>` whose only option is the literal placeholder `<option>Top Token</option>`. There is no fetch, no token mint, and the chart cannot be driven. Placeholder data shipped to production.
+
+## Outcome
+On Dashboard load, the selector is populated with **real** trending Solana tokens (symbol + short mint), and changing it dispatches a `chart:tokenChange` CustomEvent on the document carrying `{ mint, symbol }` so the chart panel (task 03) consumes it. The default selected option must be the top trending token returned by the API — **never** a hardcoded fallback like SOL or USDC.
+
+## Data source (real, no mocks)
+Add a server-side proxy `GET /api/pump/trending?limit=25` that calls Birdeye `https://public-api.birdeye.so/defi/token_trending?sort_by=rank&sort_type=asc&offset=0&limit=25&chain=solana` using `BIRDEYE_API_KEY` (the same key wired in [api/pump/dashboard.js](../../api/pump/dashboard.js)). Never expose the key to the browser.
+
+Returned shape:
+```json
+{ "data": [ { "mint": "...", "symbol": "...", "name": "...", "logo": "https://…", "price_usd": 0.0, "rank": 1 }, ... ] }
+```
+
+## Implementation
+1. Add `api/pump/trending.js` (Vercel function). Validate query params, rate-limit with `limits.publicIp` from [api/_lib/rate-limit.js](../../api/_lib/rate-limit.js), and return upstream errors verbatim (no fallback list).
+2. In [pump-dashboard.html](../../pump-dashboard.html):
+ - On `DOMContentLoaded` and on every nav into the Dashboard page, call `/api/pump/trending?limit=25` and replace the `<select>` options with the real list. Each `<option value="<mint>">` shows `#<rank> <SYMBOL> (<short mint>)`.
+ - On `change`, dispatch `document.dispatchEvent(new CustomEvent('chart:tokenChange', { detail: { mint, symbol } }))`.
+ - Auto-select the first item and dispatch the event so the chart paints immediately on load.
+3. Real states:
+ - Loading: a single disabled `<option>Loading trending tokens…</option>` while the request is in flight (replaced when it resolves — no `setTimeout` smoothing).
+ - Error / 503: a single disabled `<option>` displaying the upstream error string, plus an inline retry button next to the select. Do not silently render a hardcoded list.
+ - Empty (`data: []`): single disabled `<option>No trending tokens right now</option>`.
+
+## Definition of done
+- Network tab shows `/api/pump/trending` succeeding; no Birdeye calls from the browser.
+- The selector contains 25 real trending tokens with valid mainnet mints; clicking one dispatches the event.
+- `BIRDEYE_API_KEY` missing → endpoint returns 503 `not_configured`; the selector surfaces the error and never renders a fake list.
+- No string `"Top Token"` remains in the HTML.
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/05-vanity-generator-real-keypair.md b/tasks/pump-dashboard-real-apis/05-vanity-generator-real-keypair.md
new file mode 100644
index 000000000..59f099afa
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/05-vanity-generator-real-keypair.md
@@ -0,0 +1,33 @@
+# 05 — Vanity Address Generator: replace `Math.random()` simulation with real ed25519 keypairs
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) lines ~1849–1906 implement the Vanity Generator using `Math.random()` to pick base58 characters and produce an "address" string that is **not** a real keypair — it has no corresponding private key. The code itself even labels it a demo and tells the user to "use the Rust vanity generator for production keypairs". This is shipped to a production page and violates [CLAUDE.md](../../CLAUDE.md) rule #1 (no mocks/placeholders).
+
+## Outcome
+The Vanity Generator produces **real** Solana keypairs in a Web Worker until prefix/suffix match. On match, the panel renders the public address and offers a "Reveal Secret Key" toggle plus a "Download keypair JSON" button (Solana CLI `id.json` array format). The attempts/sec readout reflects real throughput from the worker, not a `requestAnimationFrame` smear.
+
+## Use what already exists
+- `@noble/curves` is already a project dependency (see [package.json](../../package.json)) — use `import { ed25519 } from '@noble/curves/ed25519'` for fast keypair generation in a worker.
+- `bs58` is already a dependency — use it to base58-encode the 32-byte public key.
+- `crypto.getRandomValues` for the 32-byte seed.
+
+Do NOT introduce a server-side keygen endpoint — keys must never leave the user's browser.
+
+## Implementation
+1. Create `src/pump/vanity-worker.js` as an ES module Web Worker:
+ - On `start` message → loop: generate a 32-byte seed via `crypto.getRandomValues`, derive `ed25519.getPublicKey(seed)`, base58-encode it, test prefix/suffix (case-sensitive — base58 is case-significant). Post `progress` messages with `{ attempts }` every ~250ms. On match, post `match` with `{ publicKey, secretKeyBytes: Array.from(64ByteSecretKey) }` where the 64-byte form is `[seed(32) || publicKey(32)]` (Solana CLI format). On `stop` message → break the loop.
+2. In [pump-dashboard.html](../../pump-dashboard.html):
+ - Replace the `generateBatch`/`startVanity`/`stopVanity` block with a real worker driver. Spawn the worker on Start, terminate on Stop or on match.
+ - Show real attempts/sec computed from worker `progress` deltas.
+ - On match, show the real public address and two real buttons:
+ - **Reveal secret key** toggles a base58-encoded secret display with a copy-to-clipboard button.
+ - **Download keypair JSON** triggers a download of the 64-byte secret as a JSON array (Solana `solana-keygen` import format).
+ - Validate prefix/suffix inputs against the base58 alphabet (`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`); reject invalid characters with a real toast — do not silently strip.
+3. Remove the line that says "This is a demo. Use the Rust vanity generator for production keypairs." and remove the `base58chars` lookup that sat alongside the simulation.
+
+## Definition of done
+- Open the panel, set prefix `pump` (4 chars), click Generate. After it matches, copy the address into `solana-keygen pubkey -` after pasting the downloaded JSON, and confirm the printed pubkey equals what the UI showed.
+- Worker terminates on Stop and on match — no zombie workers (verify in DevTools → Application → Workers).
+- The string `Math.random` no longer appears in the vanity code path.
+- The string `"this is a demo"` no longer appears anywhere in the file.
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/06-custom-agents-table-real.md b/tasks/pump-dashboard-real-apis/06-custom-agents-table-real.md
new file mode 100644
index 000000000..cdd076ee4
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/06-custom-agents-table-real.md
@@ -0,0 +1,45 @@
+# 06 — Custom Agents table: replace hardcoded "My Cool Agent" with real list
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) lines ~926–934 ship a hardcoded sample row into production:
+
+```html
+<tr>
+ <td>My Cool Agent</td>
+ <td>agent-xyz.vrm</td>
+ <td>2024-07-29</td>
+ <td><button class="btn btn-sm">Edit</button> <button class="btn btn-danger btn-sm">Delete</button></td>
+</tr>
+```
+
+Plus a stub second row "No custom agents yet." that's always visible regardless of state. Buttons do nothing. This violates [CLAUDE.md](../../CLAUDE.md) rule #6 (no fallback sample arrays) and rule #4 (no stubs).
+
+## Outcome
+Navigating to **Animations** loads the real list of the signed-in user's agents from `GET /api/agents` and renders one row per agent: display name, model file basename, creation date, and working **Edit** + **Delete** buttons. Empty list = a single empty-state row with the real "No custom agents yet." message.
+
+## Endpoints to use (already exist)
+- List: `GET /api/agents` — see [api/agents.js](../../api/agents.js) (returns the user's agents).
+- Delete: `DELETE /api/agents/:id` — see [api/agents/[id].js](../../api/agents/[id].js).
+- Edit page: `/agent-edit.html?id=<id>` — already exists.
+
+If `/api/agents` does not currently return a `model_url`/`model_filename` field, extend [api/agents.js](../../api/agents.js) to include it from `agent_identities.meta` — do not invent a synthetic filename in the frontend.
+
+## Implementation
+1. Delete the hardcoded `<tr>` and the duplicate empty row.
+2. On nav into the Animations page (and once on initial DOMContentLoaded if Animations is the active page), call `apiFetch('/api/agents')`. Populate `#custom-agents-table` with one row per agent:
+ - Name → `display_name`
+ - Model → basename of `meta.model_url` or the stored filename; if none, render `—`.
+ - Created → `new Date(created_at).toLocaleDateString()` — real date only.
+ - Edit → anchor to `/agent-edit.html?id=<id>`.
+ - Delete → calls `DELETE /api/agents/<id>`, on 200 re-runs the list fetch; on 4xx/5xx surfaces the upstream error string via `toast`.
+3. Real states:
+ - Loading: single row "Loading agents…" while the fetch is in flight.
+ - Empty: single row "No custom agents yet." (only when the API returns `data: []`).
+ - 401: single row with a real "Sign in to manage your agents" link to `/login.html`.
+4. The "+ Add Agent" button (`onclick="addCustomAgent()"`) currently calls a non-existent function — wire it to `window.location.href = '/agent-edit.html?new=1'` (or the real create path used elsewhere in this codebase — verify by reading [agent-edit.html](../../agent-edit.html)).
+
+## Definition of done
+- Real network call to `/api/agents` populates the table; the row count matches what `GET /api/agents` returned.
+- Deleting an agent removes its row and the next page reload still shows it gone (DB persistence verified).
+- No string "My Cool Agent" or "agent-xyz.vrm" anywhere in the HTML.
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/07-dashboard-stat-cards-real.md b/tasks/pump-dashboard-real-apis/07-dashboard-stat-cards-real.md
new file mode 100644
index 000000000..9234ef4eb
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/07-dashboard-stat-cards-real.md
@@ -0,0 +1,40 @@
+# 07 — Dashboard stat cards: add the cards that `updateDashboard()` already targets, and wire them to real data
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) `updateDashboard()` (lines ~1188–1200) writes to DOM IDs that **do not exist on the page**:
+- `stat-bot-status`
+- `stat-bot-mode`
+- `stat-claims`
+- `stat-watches`
+- `stat-uptime`
+
+`updateUptime()` (lines ~1202–1211) also writes to `stat-uptime`. The reads silently no-op every 10 seconds. The user gets zero visibility into bot state. This is dead wiring shipped to production.
+
+## Outcome
+The Dashboard page renders a stat-card row at the top with five cards — **Bot Status**, **Mode**, **Claims Detected**, **Active Watches**, **Uptime** — that update from the real `GET /api/healthz` payload every 10 seconds (the existing poll). Numbers match what `curl /api/healthz` returns.
+
+## Endpoint
+[api/healthz.js](../../api/healthz.js) is the source of truth. If it does not currently expose `monitor.running`, `monitor.mode`, `monitor.claimsDetected`, `watches.total`, and `uptime`, extend it to include them — read real values from the Postgres tables (`pump_claims`, `watches`, plus a process uptime) using the existing `sql` helper. **Do not synthesize values in the frontend** and **do not return constants** from the endpoint.
+
+## Implementation
+1. In [api/healthz.js](../../api/healthz.js), confirm/extend the response shape:
+ ```json
+ {
+ "ok": true,
+ "uptime": 12345,
+ "monitor": { "running": true, "mode": "live", "claimsDetected": 42 },
+ "watches": { "total": 3 }
+ }
+ ```
+ `claimsDetected` = `SELECT count(*) FROM pump_claims`. `watches.total` = `SELECT count(*) FROM watches WHERE deleted_at IS NULL`. `monitor.running` = whether the bot worker process has reported a heartbeat in the last 60s (table `bot_heartbeat`); if no such table exists yet, add the migration in [migrations/](../../migrations/) and write a real heartbeat from [workers/](../../workers/). No hardcoded `running: true`.
+2. In [pump-dashboard.html](../../pump-dashboard.html), insert a `.stats-grid` block at the top of `#page-dashboard` containing five `.stat-card` divs with IDs `stat-bot-status`, `stat-bot-mode`, `stat-claims`, `stat-watches`, `stat-uptime` (the same IDs the JS already targets). Reuse the existing `.stat-card` CSS already defined in this file.
+3. Real states:
+ - Before first response: each card value renders `—` (em dash), not `0` or fake numbers.
+ - On API disconnect (the existing `updateApiStatus('error')` path): cards keep their last real value, but flip to a muted color and show a small "stale" badge (real, not faked).
+
+## Definition of done
+- Cards visibly update on page load and again 10s later.
+- Numbers match `curl http://localhost:3000/api/healthz` exactly.
+- Stop the bot worker → within ~60s, `Bot Status` flips to `Stopped` based on real heartbeat absence.
+- No hardcoded `running: true` in the codebase response.
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/08-revenue-page-real.md b/tasks/pump-dashboard-real-apis/08-revenue-page-real.md
new file mode 100644
index 000000000..75de020d2
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/08-revenue-page-real.md
@@ -0,0 +1,43 @@
+# 08 — Revenue page: render real `/api/billing/revenue` data
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) lines ~545–547 contain only:
+
+```html
+<div class="content page" id="page-revenue" style="display:none">
+ <!-- Content will be rendered here by dashboard.js -->
+</div>
+```
+
+There is no `dashboard.js`. The Revenue tab is empty. This is a half-finished feature shipped to production and violates [CLAUDE.md](../../CLAUDE.md) (definition of done — feature must be reachable).
+
+## Outcome
+Selecting **Revenue** from the sidebar fetches `GET /api/billing/revenue` (already implemented in [api/billing/revenue.js](../../api/billing/revenue.js)) and renders:
+- Summary stat-card row: gross, fees, net, payment count, currency mint, chain.
+- "By skill" table sorted by net descending.
+- Time-series chart (canvas line plot, daily granularity, last 30 days by default).
+- Filter controls: agent picker (populated from `GET /api/agents`), granularity selector (day/week/month), date range pickers (`from`, `to`).
+
+## Endpoints to use (already exist)
+- `GET /api/billing/revenue?agent_id=…&granularity=day&from=…&to=…` — see [api/billing/revenue.js](../../api/billing/revenue.js). Returns `{ summary, by_skill, timeseries }`.
+- `GET /api/agents` — see [api/agents.js](../../api/agents.js).
+
+## Implementation
+1. Build the markup inside `#page-revenue` directly — keep the same `.panel` / `.stats-grid` / table styling already in this file. No external `dashboard.js` script; inline this with the rest of the dashboard JS, or extract a real ES module like `src/pump/dashboard-revenue.js` and import it.
+2. On nav into the Revenue page (and once on initial DOMContentLoaded if it's the active page), parallel-fetch:
+ - `GET /api/billing/revenue` with current filter state.
+ - `GET /api/agents` to populate the agent picker.
+3. Render numbers with the correct decimals derived from `summary.currency_mint`. For SPL token mints, look up decimals via `getAccountInfo` through `/api/wallet/balances` or a dedicated mint-info endpoint — **do not hardcode 6** for any mint other than the canonical USDC mint, and do not assume SOL.
+4. Time-series chart: vanilla canvas line (no new dependency). Re-use the canvas approach from task 03 if that task is also being done; otherwise self-contain it here. No fake animation, no `setTimeout` smoothing.
+5. Real states:
+ - Loading: skeleton stat cards + a "Loading…" line in the chart canvas.
+ - 401: render "Sign in to view revenue" + link to `/login.html`.
+ - Empty (`payment_count === 0`): render real "No revenue events in this window" — do not invent rows.
+6. Add a "Refresh" button next to the filters that re-fetches with the current filter state.
+
+## Definition of done
+- Network tab shows real `/api/billing/revenue` and `/api/agents` calls succeeding.
+- Numbers match a direct `curl /api/billing/revenue` for the same filters.
+- Changing granularity from day → month re-fetches and re-renders the chart with fewer, larger buckets.
+- The HTML comment `<!-- Content will be rendered here by dashboard.js -->` is gone.
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/09-api-keys-management-real.md b/tasks/pump-dashboard-real-apis/09-api-keys-management-real.md
new file mode 100644
index 000000000..1ecd5f273
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/09-api-keys-management-real.md
@@ -0,0 +1,33 @@
+# 09 — API Keys page: real list / create / revoke flow
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) lines ~844–877 are **static documentation only** — a hardcoded table of endpoints and a description of how to authenticate. There is no list of the user's keys, no way to create a key, and no way to revoke. The `api-endpoint-display` is the only dynamic element. This is a half-finished feature — the user cannot actually obtain or manage credentials.
+
+## Outcome
+The API Keys page, in addition to keeping the endpoint reference table, gains a real **Your Keys** section showing the signed-in user's API keys with: name, prefix, scopes, created-at, last-used-at, and a Revoke button. A **Create New Key** form (name + scope checkboxes + optional expiry) calls `POST /api/api-keys`, then opens a modal that displays the plaintext token **once** with a Copy button and a clear "you won't see this again" note.
+
+## Endpoints (already exist)
+- List: `GET /api/api-keys` — see [api/api-keys.js](../../api/api-keys.js).
+- Create: `POST /api/api-keys` with `{ name, scope, expires_at? }`. Returns `{ data: { ..., token } }` with the plaintext token (never persisted).
+- Revoke: `DELETE /api/api-keys/<id>` — see [api/api-keys/[id].js](../../api/api-keys/[id].js).
+- Allowed scopes per [api/api-keys.js](../../api/api-keys.js): `avatars:read`, `avatars:write`, `avatars:delete`, `profile`.
+
+## Implementation
+1. Add a `Your Keys` panel above the existing Available Endpoints table on `#page-api`.
+2. Render keys in a real table: Name, Prefix (masked, e.g. `sk_live_abc123…`), Scopes (comma list), Created, Last Used (relative time, "never" when null), Expires (real date or `—`), Actions (Revoke).
+3. Revoke flow:
+ - Click → `confirm(...)` → `DELETE /api/api-keys/<id>` → on 200, refresh the list. On error, surface upstream error string via `toast`.
+4. Create flow:
+ - Form with: Name (required, ≤80 chars), Scope checkboxes (all four allowed scopes from the API), Expiry (optional `<input type="datetime-local">`, converted to ISO 8601 UTC for the request).
+ - On submit → `POST /api/api-keys` → on 201, open a modal that displays the plaintext `token` returned by the server, with Copy-to-Clipboard. Closing the modal refreshes the list. On error, surface upstream error.
+5. Real states:
+ - 401: render "Sign in to manage keys" + `/login.html` link instead of the table.
+ - 429: surface "Too many requests, try again shortly" — do not retry automatically.
+ - Empty list: "You haven't created any API keys yet." — no fake row.
+6. **Never** display or log the plaintext token after the create-modal is closed. The list view must use only `prefix`.
+
+## Definition of done
+- Create a key in the UI; copy it; `curl -H "X-API-Key: <token>" http://localhost:3000/api/v1/status` succeeds and the key's `last_used_at` updates on next list refresh.
+- Revoke the key; the same `curl` returns 401.
+- Refresh the page → the plaintext token is gone (only the prefix remains).
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/10-config-validate-connection.md b/tasks/pump-dashboard-real-apis/10-config-validate-connection.md
new file mode 100644
index 000000000..57b4d6748
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/10-config-validate-connection.md
@@ -0,0 +1,31 @@
+# 10 — Configuration page: real connection validation on Save
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) `saveConfig()` (lines ~1917–1935) writes the four config fields (API URL, WS URL, API Key, RPC URL) to `localStorage` and toasts "Configuration saved & reconnecting". It then calls `connectApi()` and `connectWebSocket()`, but the user gets **no per-field validation feedback** — invalid RPC URLs, wrong API keys, etc. fail silently in the global status indicators and the user is left guessing. There is also no test of the **Solana RPC** endpoint at all.
+
+## Outcome
+Each field gains an inline status pill ("OK", "Failed: <reason>") that updates after Save runs real probes:
+- **API URL**: `GET <apiUrl>/api/healthz` → expects `{ ok: true }`.
+- **API Key**: `GET <apiUrl>/api/v1/status` with `X-API-Key` header → 200 = OK, 401/403 = Failed with status text.
+- **WS URL**: open the socket, wait up to 3s for `onopen`, then close. Anything else = Failed.
+- **RPC URL**: JSON-RPC `getHealth` (and `getVersion` for display) — `{ "jsonrpc":"2.0","id":1,"method":"getHealth" }` → result `"ok"` = OK, otherwise Failed with the RPC error.
+
+All probes run in parallel, then results render against each field. Saving still always persists to `localStorage` so the user can come back; but any failed probe must show the real failure inline, not be hidden.
+
+## Implementation
+1. Refactor `saveConfig()` to:
+ - Persist to `localStorage` immediately (existing behaviour).
+ - Update `state.*` and `api-endpoint-display` (existing behaviour).
+ - `Promise.all([probeApi(), probeApiKey(), probeWs(), probeRpc()])` — each helper returns `{ ok: boolean, detail: string }`.
+ - Write each result into a new `<div class="status-pill">` element placed adjacent to its input field. Use the existing color classes (`green`, `red`, `yellow`).
+2. Add real probe helpers above `saveConfig()`. They MUST hit the real endpoints — no canned success.
+3. The WS probe must close the socket after success/timeout to avoid leaking a connection (the page-level `connectWebSocket()` flow continues to own the long-lived socket).
+4. Also run all four probes once on `DOMContentLoaded` so the page reflects current connectivity at load.
+5. The "Save & Reconnect" button shows a real spinner while probes are in flight; re-enables on completion. No `setTimeout` fake delay.
+
+## Definition of done
+- Enter a known-bad RPC URL → save → RPC pill turns red and shows the real RPC error string.
+- Enter a known-good Helius RPC URL → pill turns green within ~1s.
+- Revoke the API key (via task 09's UI or directly in DB) → pill turns red with "401 unauthorized".
+- All four pills reflect real, live state — verifiable by toggling each endpoint independently.
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/11-tts-speech-real.md b/tasks/pump-dashboard-real-apis/11-tts-speech-real.md
new file mode 100644
index 000000000..58c0104ea
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/11-tts-speech-real.md
@@ -0,0 +1,29 @@
+# 11 — Animations page: wire Speech input to real TTS
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) `agentAction('speak')` (lines ~1086–1091) builds an `{ type: 'speak', text }` action and posts it via `iframe.contentWindow.postMessage(...)` to `/agent-embed.html?id=<agentId>`. There is no proof that the embed handles `speak` with a real TTS path — and even if it does, it isn't wired here in a verifiable way. The Speech control may silently no-op. The form is shipped to a production page so it must produce real audible output backed by a real TTS API.
+
+## Outcome
+Typing into the Speech field and clicking **Speak** plays real audio (the agent's voice) and triggers the agent's lip-sync, every time. On error (rate limit, missing API key, etc.) the user sees the real upstream error.
+
+## Endpoints (already exist)
+- ElevenLabs proxy: [api/tts/eleven.js](../../api/tts/eleven.js) (consumes `ELEVENLABS_API_KEY` server-side and streams audio).
+- The agent embed: [agent-embed.html](../../agent-embed.html) — verify it listens for `agent:action` `speak` and renders both audio + lip-sync.
+
+## Implementation
+1. Open [agent-embed.html](../../agent-embed.html) and confirm the `speak` action handler:
+ - POSTs `{ text, voice_id }` to `/api/tts/eleven` (or returns the audio URL via streaming).
+ - Plays the returned audio with `<audio>` and drives the avatar's viseme/lip-sync from it.
+ If any of that is missing or stubbed (`throw 'not implemented'`, `setTimeout` fake speech, browser `speechSynthesis` fallback, etc.), implement it for real. Use the same agent's stored `voice_id` (read from `agent_identities.meta.voice_id` via `GET /api/agents/:id`); if no voice id is set, surface the real error "agent has no voice configured" — do not fall back to a default voice silently.
+2. In [pump-dashboard.html](../../pump-dashboard.html):
+ - On Speak click: validate `text` is non-empty, then post the `agent:action` message exactly as today, **but also** set up a one-time `window.addEventListener('message', …)` listener for the iframe's reply (`agent:action:result` with `{ ok, error? }`) and toast the real error if `ok === false`. No silent failures.
+ - Add a real "Stop" button that posts `{ type: 'speak:stop' }` to the iframe; the embed must support that and stop playback.
+3. Disable the Speak button while audio is playing; re-enable on `agent:action:result` or on the audio `ended` event reported back from the iframe. No `setTimeout` re-enable.
+
+## Definition of done
+- Type "hello world" + Speak → real audio plays through speakers, sourced from `/api/tts/eleven`. Verify in DevTools network tab.
+- Lip-sync visibly moves on the avatar in the iframe.
+- With `ELEVENLABS_API_KEY` removed from `.env`, click Speak → real upstream 503/missing-config error surfaces in a toast; nothing silently succeeds.
+- The Stop button cuts audio mid-utterance.
+- No use of `window.speechSynthesis` anywhere (browser TTS is not the platform's voice).
+- `npm test` green; **completionist** subagent run on changed files.
diff --git a/tasks/pump-dashboard-real-apis/12-alerts-server-persist.md b/tasks/pump-dashboard-real-apis/12-alerts-server-persist.md
new file mode 100644
index 000000000..5d3e3da84
--- /dev/null
+++ b/tasks/pump-dashboard-real-apis/12-alerts-server-persist.md
@@ -0,0 +1,36 @@
+# 12 — Alerts page: persist alert config server-side and deliver real notifications
+
+## Problem
+[pump-dashboard.html](../../pump-dashboard.html) `saveAlertConfig()` (lines ~1455–1467) writes to `localStorage` only. Alerts therefore:
+- Don't survive a different browser / device.
+- Are evaluated only against the WebSocket events the **current tab** happens to receive — if the user closes the tab, no alert ever fires again.
+- Have no delivery channel — they show up only in the local "Alert History" feed.
+
+For a "Pump bot" dashboard, alerts that exist only while a tab is open are not real alerts.
+
+## Outcome
+Alert config is stored per-user in Postgres and edited via a real API. A backend evaluator (running in [workers/](../../workers/) — there is already a worker process here) consumes the same Pump.fun event stream the bot already monitors, matches it against each user's alert rules, and delivers via:
+- An in-app notification row in `/api/notifications` (already exists — see [api/notifications/index.js](../../api/notifications/index.js)).
+- Optionally, the user's webhook URL (per-rule), if set.
+
+The frontend now reads/writes via the new endpoints; `localStorage` is only a render cache.
+
+## Endpoints (new, real)
+- `GET /api/alerts/config` → returns the signed-in user's alert config row.
+- `PUT /api/alerts/config` body `{ graduation, whale, fees, launch, whaleThreshold, claimThreshold, cooldown, webhookUrl? }` → upserts.
+
+## Implementation
+1. Migration in [migrations/](../../migrations/): create `user_alert_configs (user_id PK, graduation bool, whale bool, fees bool, launch bool, whale_threshold numeric, claim_threshold numeric, cooldown_seconds int, webhook_url text, updated_at timestamptz)`.
+2. Add `api/alerts/config.js` (Vercel function) implementing GET/PUT with the existing `getSessionUser` auth helper from [api/_lib/auth.js](../../api/_lib/auth.js). Validate via `zod`; never trust client-supplied fields.
+3. Backend evaluator: extend the existing pump.fun event consumer in [workers/](../../workers/) (find the worker that currently subscribes to PumpPortal — look for `subscribeNewToken`/`subscribeMigration`). For each inbound event, query active `user_alert_configs` rows whose rules match the event, insert into `notifications`, and POST to `webhook_url` if set. Honor `cooldown_seconds` per (user_id, rule_type) pair using a real Postgres timestamp check or Upstash Redis (already a dependency — see [api/_lib/rate-limit.js](../../api/_lib/rate-limit.js)).
+4. In [pump-dashboard.html](../../pump-dashboard.html):
+ - On nav into `#page-alerts`, call `GET /api/alerts/config` and populate the form. While loading, disable inputs.
+ - On Save, `PUT /api/alerts/config` with the current form values. On 200, also write to `localStorage` for fast re-render. On error, surface upstream error via toast. The "Saved settings" toast must only fire after a real 2xx.
+ - Add a `Webhook URL` field next to Thresholds (optional, validate as `https://` URL on the client; the server re-validates).
+ - The "Alert History" feed continues to show the local matches (so the user gets immediate feedback when their tab is open) **and** also fetches recent server-delivered alerts via `GET /api/notifications?type=pump_alert&limit=50` so it's authoritative across sessions.
+
+## Definition of done
+- Save settings on machine A → open the dashboard on machine B with the same account → settings render as saved.
+- Close the dashboard tab; trigger a real graduation event in the upstream feed (or wait for one in production); observe a row in `notifications` for that user and (if webhook configured) a real POST to the webhook.
+- `localStorage` is only a render cache: deleting the `pumpbot-alerts` key and reloading still shows the saved settings (because they came from the API).
+- `npm test` green; **completionist** subagent run on changed files.