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.

docs(ops): add the leaked-wallet rescue runbook, link it from the wallets-leak-scan alarm, and log the changelog entry for the rescue dry run and live Jito tip accounts

nirholas720e40d39295
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1de110d2..fa0a63ba9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **AR Studio source now lives in the monorepo**: The 3d-ar-studio npm package and the /ar/studio page now run the same code: the package source moved into packages/ar-studio and the page imports its scene math, multi-anchor WebXR session, room client and lighting modules directly, so fixes land once instead of in two diverging copies. (`/ar/studio`) `[sdk, improvement]`
- **Chain turnover on /chains**: The chains leaderboard now has a sortable Turnover column (24h DEX volume divided by TVL) that shows which chains have capital actively trading rather than parked. Chains with no TVL or no reported volume show n/a. (`/chains`) `[feature]`
- **Copy any model as a GitHub README 3D block**: Forge results, avatar pages, the avatar dashboard and model pages now have a Copy as GitHub README 3D action. It simplifies the model to a size GitHub renders and puts a stl code fence on your clipboard that GitHub shows as an interactive 3D viewer in any README, issue or pull request. The same converter is a free API (POST /api/readme-3d) and has a live page at /readme-3d. (`/readme-3d`) `[feature]`
+- **Leaked-wallet rescue runbook with a dry run, and live Jito tip accounts**: A new rescue script moves every token and the remaining SOL out of a compromised wallet in one atomic Jito bundle, paid for by a separate safe wallet, and its default dry run simulates the whole bundle and prints the plan without sending anything. The leak alarm now links the runbook. Jito tips also read the block engine's live tip-account list with a pinned fallback, instead of three hardcoded copies. `[security, infra]`
- **llms.txt links the docs as markdown, and install.md tells an agent how to connect**: llms.txt now links each curated doc as /docs/<slug>.md, the text/markdown twin an agent can read directly. llms-full.txt carries the full text of those docs (capped at 40 KB each, with a link to the rest) after the page index. A new /install.md, generated from the MCP directory, gives one place for the setup command, per-client settings and every hosted endpoint. (`/docs/cli`) `[docs]`
- **Onchain viewer reads multi-part memo inscriptions**: Paste any transaction of a first/1, firsts/1 or SPL404 inscription into /onchain and it collects the other parts, checks each part and the whole SHA-256, names missing parts, and shows the file. Images render from verified bytes; SVG and HTML are shown as text and never executed. The Solana Memo Media MCP gains a read_inscription tool that does the same. (`/onchain`) `[feature]`
- **One catalog for all 39 HookForge hooks, and a census that recognizes them**: The Uniswap v4 hooks guide now carries the full HookForge registry (39 hooks, pinned by commit) grouped by family, with the agent-native ones linked to their Solana counterparts, plus a design note reconciling AgentTierHook with reputation-fee. The hook census now decodes each hook's 14 permission bits from its address and calls hookName() to flag HookForge hooks when they show up on chain. (`/docs/uniswap-v4-hooks`) `[docs]`
diff --git a/STRUCTURE.md b/STRUCTURE.md
index 0b24f5bfe..b9b4a6285 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -296,6 +296,7 @@ packages, a generated standalone GitHub mirror). See
| Self-hosted x402 facilitator + ring economy | [api/x402-facilitator/[action].js](api/x402-facilitator/[action].js), [api/_lib/x402/self-facilitator.js](api/_lib/x402/self-facilitator.js), [api/x402/ring-settle.js](api/x402/ring-settle.js), [api/_lib/x402/pipelines/ring-rebalance.js](api/_lib/x402/pipelines/ring-rebalance.js), [api/x402-ring.js](api/x402-ring.js), [scripts/x402-ring-setup.mjs](scripts/x402-ring-setup.mjs) | In-repo (off by default) | Closed-loop agent-to-agent x402: platform wallets pay platform endpoints, settled in-house (no external facilitator). Fee-minimized, SOL-floor guarded, internal-labeled. Env: `X402_SELF_FACILITATOR_ENABLED`, `X402_FEE_PAYER_SECRET_BASE58`, `X402_TREASURY_SECRET_BASE58`. See [docs/x402-ring-economy.md](docs/x402-ring-economy.md), [docs/x402-settlement-pending.md](docs/x402-settlement-pending.md) |
| Pending x402 settlement (`settlement_pending`) | [api/_lib/x402/pending-settlements.js](api/_lib/x402/pending-settlements.js), [api/cron/x402-settlement-reconcile.js](api/cron/x402-settlement-reconcile.js), settle path [api/_lib/x402-spec.js](api/_lib/x402-spec.js) + [api/_lib/x402/self-facilitator.js](api/_lib/x402/self-facilitator.js), migration [api/_lib/migrations/20260917200000_x402_pending_settlements.sql](api/_lib/migrations/20260917200000_x402_pending_settlements.sql) | Live | The third settle outcome: a transaction that is broadcast but not yet confirmed answers `settlement_pending` with its signature instead of a failure the buyer's own wallet contradicts. A retry reconciles against the recorded signature rather than broadcasting a second transaction (the x402 `PendingSettlementStore` contract, Postgres-backed so it survives Cloud Run replica hopping), the endpoint still delivers with `status:'pending'`, and the reconcile cron claims the settle credit and closes the books once the chain answers. Tunable: `X402_SETTLE_CONFIRM_TIMEOUT_MS` (12s default). Docs: [docs/x402-settlement-pending.md](docs/x402-settlement-pending.md). Tests: [tests/x402-settlement-pending.test.js](tests/x402-settlement-pending.test.js), [tests/x402-settlement-pending-resource.test.js](tests/x402-settlement-pending-resource.test.js), [tests/api/x402-settlement-reconcile.test.js](tests/api/x402-settlement-reconcile.test.js) |
| Fresh-wallet workers (x402 volume from never-used wallets) | [api/_lib/x402/fresh-workers/](api/_lib/x402/fresh-workers) (`plan.js` pure planning, `chain.js` fund + sweep legs, `jobs.js` job catalog + sinks, `wallets.js` lifecycle store, `run.js` the tick), cron [api/cron/x402-fresh-workers.js](api/cron/x402-fresh-workers.js) fired by [api/cron/economy-tick.js](api/cron/economy-tick.js), stats API [api/fresh-workers.js](api/fresh-workers.js) `→ /api/fresh-workers`, runner [scripts/x402-fresh-workers-run.mjs](scripts/x402-fresh-workers-run.mjs), migration [api/_lib/migrations/20260922100000_x402_fresh_workers.sql](api/_lib/migrations/20260922100000_x402_fresh_workers.sql) | Live (on by default) | Every minute mints a few brand-new Solana wallets (secret-box encrypted, never mirrored into `x402_ring_wallets`), funds each in one transaction with exactly one job's USDC plus its own fees, has each self-pay a real x402 endpoint (a standard-tier Forge generation every N ticks, otherwise the next dataset in an 18-entry market-data rotation), lands the result where the site reads it (`forge_autonomous_props` → `/forged` with a fresh-wallet badge; `x402_data_desk` → `/data-desk`), then sweeps leftover USDC to the treasury, closes the token account (rent back to the funder) and drains the wallet to exactly zero. Stateful per wallet so an interrupted tick is finished by the next tick's reclaim pass; stranded wallets alert. Fresh wallets join `ringAllowedAddresses()` for a bounded window (`X402_FRESH_WORKERS_MEMBERSHIP_HOURS`) so the leak scanner classifies the funding leg as internal. Env: `X402_FRESH_WORKERS_*` (see [.env.example](.env.example)). Docs: [docs/x402-fresh-workers.md](docs/x402-fresh-workers.md). Tests: [tests/x402-fresh-workers.test.js](tests/x402-fresh-workers.test.js) |
+| Wallet rescue (leaked-key recovery, dry run by default) and Jito tip accounts | [scripts/rescue-wallet.mjs](scripts/rescue-wallet.mjs), bundle builder [atomic-rescue.js](packages/avatar-agent-mcp/src/lib/atomic-rescue.js), tip source [jito-tip-accounts.js](packages/avatar-agent-mcp/src/lib/jito-tip-accounts.js) | In-repo CLI; `--execute` is owner-gated | One atomic Jito bundle moves every token account and the SOL out of a compromised wallet, paid by a separate safe fee payer. Live `getTipAccounts` with a pinned fallback feeds the rescue, the MCP bundle tools and `api/_lib/execution-engine.js`. Runbook: [docs/ops/wallet-rescue.md](docs/ops/wallet-rescue.md). Tests: tests/atomic-rescue.test.js, tests/jito-tip-module.test.js |
| Ring payer pool (many distinct payers) | [api/_lib/x402/pool.js](api/_lib/x402/pool.js), [api/_lib/x402/pipelines/ring-pool-fund.js](api/_lib/x402/pipelines/ring-pool-fund.js), [scripts/x402-ring-pool-setup.mjs](scripts/x402-ring-pool-setup.mjs), migration [api/_lib/migrations/2026-07-17-x402-ring-pool.sql](api/_lib/migrations/2026-07-17-x402-ring-pool.sql) | In-repo (off by default) | Reused rotating payer wallets (500–1,000) the ring tick cycles through so the closed loop shows many distinct, attributed payers at 1 tx/settle. Keys secret-box-encrypted in `x402_ring_pool`; pubkeys mirrored into `x402_ring_wallets(role='pool')` so they join the controlled set automatically; NOT in solana-signers.js so sweepback never touches them. LRU rotation (`claimNextPayer`), batched threshold funding (`ring-pool-fund`). Env: `X402_RING_POOL_ENABLED`, `X402_RING_POOL_SIZE`. See [docs/x402-ring-economy.md](docs/x402-ring-economy.md#payer-pool--many-distinct-payers-one-reused-set-of-wallets) |
| $THREE micro-buy loop (x402 buy pressure) | Endpoint [api/x402/three-buy.js](api/x402/three-buy.js) `→ /api/x402/three-buy`, driver [api/cron/three-buy-loop.js](api/cron/three-buy-loop.js), engine [api/_lib/token/microbuy.js](api/_lib/token/microbuy.js), shared Jupiter client [api/_lib/token/jupiter.js](api/_lib/token/jupiter.js), ledger [migration 20260717233000_three_microbuy.sql](api/_lib/migrations/20260717233000_three_microbuy.sql) | In-repo (off by default) | Many tiny, real USDC→$THREE market buys per minute (target ~60/min), each triggered by (and paid through) a settled x402 call: the x402 toll routes to the ring treasury like every other endpoint, and the paid good is one on-chain buy on Jupiter. BUY-ONLY, never sells; accrued $THREE swept to the treasury. High-frequency sibling of the daily buyback ([api/_lib/token/buyback.js](api/_lib/token/buyback.js)). Real spend hard-bounded by a UTC-daily USD ceiling enforced atomically (Redis reserve-before-buy). `autobuy:false` in [ring-catalog.js](api/_lib/x402/ring-catalog.js) so the generic ring never fires it. Env: `THREE_MICROBUY_ENABLED`, `THREE_MICROBUY_SECRET_KEY_B64` (or reuses the buyback wallet), `THREE_MICROBUY_PER_TICK`, `THREE_MICROBUY_DAILY_CAP_USD`. See [docs/three-microbuy.md](docs/three-microbuy.md). |
| Money flow map | [pages/flow.html](pages/flow.html) `→ /flow`, pure graph math + force layout [src/flow-map-core.js](src/flow-map-core.js), canvas/DOM layer [src/flow-map.js](src/flow-map.js), styles [src/flow-map.css](src/flow-map.css), backend view [api/pulse.js](api/pulse.js) `→ GET /api/pulse?view=graph` | Live | The TOPOLOGY of the agent economy, which every other economy surface here misses because a leaderboard cannot show shape. A force-directed canvas map of who paid whom, for which skill, and how much, built from two already-public on-chain sources: agent-to-agent x402 skill payments (`meta.to` payee wallet + `meta.service`) and tips (`meta.from` payer wallet). Every edge is a settled transfer with an explorer-verifiable signature; no inferred or estimated edges exist. Nodes are classified `source` / `hub` / `relay` / `sink` / `quiet` from flow asymmetry, which makes capital dispersion (value entering agent wallets and never circulating out) visible at a glance and puts a number on it as "stuck capital". Counterparty privacy matches the live feed: a wallet is NAMED only when it resolves to a public, non-opted-out agent, otherwise it stays an address-only dashed node. Keyboard and screen-reader parity is structural, not a bolt-on: the table below the canvas renders from the same filtered data and selecting a row selects the node. Docs: [docs/money-flow-map.md](docs/money-flow-map.md). Tests: [tests/flow-map-core.test.js](tests/flow-map-core.test.js) |
diff --git a/_context/integrate-PROGRESS.md b/_context/integrate-PROGRESS.md
new file mode 100644
index 000000000..ce634e8ec
--- /dev/null
+++ b/_context/integrate-PROGRESS.md
@@ -0,0 +1,8 @@
+# Integrate work-order progress
+
+## 2026-10-23: integrate 47, wallet rescue dry run
+
+- Tip accounts: one module (`packages/avatar-agent-mcp/src/lib/jito-tip-accounts.js`) reads the block engine's `getTipAccounts` with a pinned fallback; `jito.js` and `api/_lib/execution-engine.js` use it. Landed in 22a5a1f49 (swept into another agent's commit).
+- Rescue: `scripts/rescue-wallet.mjs` and `packages/avatar-agent-mcp/src/lib/atomic-rescue.js` (dry run default, `--execute` gated). Landed in 22a5a1f49.
+- Runbook `docs/ops/wallet-rescue.md`, alarm link in `api/cron/wallets-leak-scan.js`, docs index, STRUCTURE row, changelog entry: see the commit that deletes `prompts/finish/546-integrate-47-wallet-rescue-dry-run.md`.
+- Dry run was executed against a local solana-test-validator wallet set (devnet faucet was rate limited), not devnet.
diff --git a/api/cron/wallets-leak-scan.js b/api/cron/wallets-leak-scan.js
index 699a0c5ac..d87cd045a 100644
--- a/api/cron/wallets-leak-scan.js
+++ b/api/cron/wallets-leak-scan.js
@@ -27,6 +27,7 @@ import { runTripwire, lastActivityMs } from '../_lib/financial-tripwire.js';
import { requireCron } from '../_lib/cron-auth.js';
const SIG_LIMIT = 100;
+const RESCUE_RUNBOOK = 'https://github.com/nirholas/three.ws/blob/main/docs/ops/wallet-rescue.md';
const CANONICAL_USDC = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
// Same shape as x402-ring-leak-scan.js: a lease that doubles as the native
@@ -190,7 +191,7 @@ async function scanOne(conn, PublicKey, wallet, name, allowed, runId) {
isDelegation ? '🚨 Controlled-wallet delegation risk — SPL Approve' : '🚨 Controlled-wallet LEAK — funds left the platform set',
isDelegation
? `${name} (${wallet}) approved delegate ${ev.counterparty} to move ${amtLabel} in tx ${sig}. Revoke the approval and ROTATE ${envHint}. https://solscan.io/tx/${sig}`
- : `${amtLabel} left ${name} (${wallet}) to ${ev.counterparty ?? 'an unknown address'} (${ev.reason}) in tx ${sig}. Treat the key as COMPROMISED: rotate ${envHint}, drain remaining funds to a controlled wallet, investigate. https://solscan.io/tx/${sig}`,
+ : `${amtLabel} left ${name} (${wallet}) to ${ev.counterparty ?? 'an unknown address'} (${ev.reason}) in tx ${sig}. Treat the key as COMPROMISED: rotate ${envHint}, drain remaining funds to a controlled wallet (dry-run the atomic rescue first: ${RESCUE_RUNBOOK}), investigate. https://solscan.io/tx/${sig}`,
{ signature: `wallet-leak:${sig}:${wallet}:${ev.reason}` },
);
}
diff --git a/data/changelog.json b/data/changelog.json
index 08038319a..c4a856c7e 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -3,12 +3,12 @@
"entries": [
{
"date": "2026-10-23",
- "title": "Agents can sign up to services: inbox codes and sign-in links",
- "summary": "An agent's own address can now receive verification emails and hand back the one-time code or sign-in link. New inbox_list, inbox_read and inbox_wait_for_code tools read the code with a confidence score, only from services the owner lists under Code senders, only from authentic non-spam mail. Email bodies stay untrusted data and links are never fetched for the agent.",
+ "title": "Leaked-wallet rescue runbook with a dry run, and live Jito tip accounts",
+ "summary": "A new rescue script moves every token and the remaining SOL out of a compromised wallet in one atomic Jito bundle, paid for by a separate safe wallet, and its default dry run simulates the whole bundle and prints the plan without sending anything. The leak alarm now links the runbook. Jito tips also read the block engine's live tip-account list with a pinned fallback, instead of three hardcoded copies.",
"tags": [
- "feature"
- ],
- "link": "/agent-mail"
+ "security",
+ "infra"
+ ]
},
{
"date": "2026-10-23",
diff --git a/docs/ops/README.md b/docs/ops/README.md
index 8a3f31227..685c96074 100644
--- a/docs/ops/README.md
+++ b/docs/ops/README.md
@@ -41,6 +41,7 @@ Start with [gcp-production.md](gcp-production.md); it is the complete operationa
| [nvidia-inception-response-2026-09-14.md](nvidia-inception-response-2026-09-14.md) | Private correspondence record and owner-action runbook for NVIDIA's catalog, co-marketing, technical-resource, and invite-only GTC Pavilion reply. |
| [wallet-key-migration.md](wallet-key-migration.md) | Incident record: stranded pool-agent wallets after the WALLET_ENCRYPTION_KEY migration. Also the standing runbook for where production's credentials live in Secret Manager, how to publish a new version, and the owner-gated master-wallet rotation. |
| [stranded-wallets.md](stranded-wallets.md) | The standing owner decision on custodial wallets sealed by that rotation: measured list, why recovery is impossible, what crediting or writing off the customer balances costs, and the commands for each. |
+| [wallet-rescue.md](wallet-rescue.md) | Runbook for a leaked wallet key: dry-run and execute the atomic Jito rescue (`scripts/rescue-wallet.mjs`), plus how Jito tip accounts are sourced. Linked from the wallets-leak-scan alarm. |
| [forge-multiview-migration-handoff.md](forge-multiview-migration-handoff.md) | Historical hand-off for the forge multi-view migrations (June 2026); superseded by gcp-production.md. |
| [examples-repo-export.md](examples-repo-export.md) | How the public `three-ws/examples` satellite repo is assembled and published from this monorepo. |
diff --git a/docs/ops/wallet-rescue.md b/docs/ops/wallet-rescue.md
new file mode 100644
index 000000000..670ea6229
--- /dev/null
+++ b/docs/ops/wallet-rescue.md
@@ -0,0 +1,61 @@
+# Wallet rescue runbook
+
+When a wallet key leaks, a sweeper bot drains anything that lands in that wallet within seconds. The rescue therefore never funds the compromised wallet. A separate, safe **fee payer** wallet pays every fee, the rent for the destination token accounts and the Jito tip, and everything lands in one atomic Jito bundle: it all happens in one block or not at all, so nobody holding the leaked key can slip a transaction between the steps.
+
+The `wallets-leak-scan` cron ([api/cron/wallets-leak-scan.js](../../api/cron/wallets-leak-scan.js)) raises the alarm and links here.
+
+## What the bundle does
+
+Up to five transactions, each self-contained:
+
+1. Per token account: create the destination associated token account (idempotent, fee payer pays), `transferChecked` the full balance, close the source account. The closed account's rent goes straight to the destination.
+2. The last transaction also returns the compromised wallet's remaining SOL to the destination and pays the Jito tip, both from the right wallet: the SOL return is signed by the compromised wallet, the tip by the fee payer.
+
+Both Token and Token-2022 accounts are handled. Frozen accounts cannot be moved by their owner and are listed as skipped. A wallet with more token accounts than fit in five transactions is rescued in rounds: the plan prints how many remain, rerun it after the bundle lands.
+
+## 1. Dry run (safe, public keys only)
+
+```sh
+node scripts/rescue-wallet.mjs \
+ --compromised <leaked wallet> \
+ --destination <safe wallet> \
+ --fee-payer <safe wallet with SOL> \
+ --rpc <mainnet RPC url>
+```
+
+Nothing is signed or sent and no secret key is needed. The script reads the compromised wallet's balances, builds the bundle, simulates every transaction against the chain, and prints the plan: tip, SOL return, each token account moved, compute units, and whether the live Jito tip accounts still match the pinned list. Exit code 0 means every simulation passed, 2 means one failed.
+
+Options: `--tip-sol` (default 0.001, clamped to `MAX_JITO_TIP_SOL`), `--priority` (micro-lamports per compute unit), `--no-sol` (leave the SOL), `--json`.
+
+The fee payer needs roughly 0.002 SOL per destination token account that does not exist yet, plus fees and the tip. The simulation checks this for real; a fee payer that is too poor shows up as a failed simulation.
+
+The destination must pass `RECIPIENT_ALLOWLIST` if one is configured. The fee payer must not be the compromised wallet.
+
+## 2. Execute (owner action, moves real funds)
+
+`--execute` signs and sends. It is a stop-and-ask action: render the plan above, get an explicit yes from the owner, then:
+
+```sh
+RESCUE_COMPROMISED_SECRET=<base58> RESCUE_FEE_PAYER_SECRET=<base58> \
+ node scripts/rescue-wallet.mjs --execute <same flags as the dry run>
+```
+
+It refuses to run without an interactive terminal, without a passing simulation, or if the secrets do not match `--compromised` and `--fee-payer`. It then asks you to type the destination address back. After you confirm it rebuilds and re-simulates against the current blockhash, signs, and submits the bundle. If the result is `pending`, check the signatures on Solscan before resubmitting.
+
+After a landed rescue: rotate every credential that shared the key's custody (see [wallet-key-migration.md](wallet-key-migration.md)), and revoke any token delegations the attacker may hold.
+
+## Jito tip accounts
+
+Every tip goes to one of the block engine's tip accounts. [jito-tip-accounts.js](../../packages/avatar-agent-mcp/src/lib/jito-tip-accounts.js) is the single source for the rescue, the MCP bundle tools and `api/_lib/execution-engine.js`. It reads `getTipAccounts` from the block engine (`JITO_BLOCK_ENGINE_URL`, default mainnet), caches it for ten minutes, refreshes in the background so hot paths never wait on the network, and serves a pinned list when the engine is unreachable.
+
+The dry run prints the drift check:
+
+| Status | Meaning | Action |
+| --- | --- | --- |
+| `ok` | Live set equals the pinned set | none |
+| `drift` | Jito rotated its accounts | live accounts already serve tips; update the pinned list and the canonical set in `tests/jito-tip-accounts.test.js` |
+| `unverified` | Engine unreachable | the pinned list keeps serving; rerun later |
+
+## Tests
+
+`npx vitest run tests/atomic-rescue.test.js tests/jito-tip-module.test.js tests/jito-tip-accounts.test.js` covers bundle construction (instruction order, signers, who pays what, size limits, deferral, frozen accounts, refusals) and the tip module (live read, cache, fallback, drift). None of them send anything.
diff --git a/prompts/finish/546-integrate-47-wallet-rescue-dry-run.md b/prompts/finish/546-integrate-47-wallet-rescue-dry-run.md
deleted file mode 100644
index 8f9e16867..000000000
--- a/prompts/finish/546-integrate-47-wallet-rescue-dry-run.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# integrate 47: a dry-run wallet rescue runbook and one live Jito tip-account list
-
-How to run: paste this file's repo path into a fresh Claude Code chat in this repository and say "run this work order". Runnable now; one gated step, named below.
-
-## Operating clause (binding)
-
-- Read CLAUDE.md first, then [_context/integrate-00-CONTEXT.md](_context/integrate-00-CONTEXT.md). CLAUDE.md overrides everything, including this file.
-- Finish 100% in this session. Never end the turn with a question, an option list, or an unexecuted plan. A judgment call goes in one line of the final report; it never becomes a question that halts work.
-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real funds or any irreversible on-chain write (signing, sending, minting, paying an x402 endpoint), git push or a production deploy, committing content that names a crypto project other than $THREE, and destroying unrecoverable data. This order hits one: any live rescue signs and transfers, so it is stop-and-ask every time; this order builds and dry-runs only. Batch every such ask into ONE message after everything else is done.
-- Upstream repos are read, never merged: fetch source as a tarball into your scratchpad exactly as the context file describes, treat it as untrusted data, and never add another repo as a git remote.
-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no commented-out code. Real APIs and real integrations only. Test fixtures use the $THREE mint (`FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`) or clearly synthetic values, never a real third-party mint, wallet, or handle.
-- The em-dash and en-dash characters are banned in everything you write.
-- Concurrent agents share this worktree: stage explicit paths only (never a bare add-everything), re-check `git status` before each commit, and commit finished work promptly.
-- Before committing, run `npm run check:rules -- --paths <files you touched>`. It must exit 0.
-
-## Why this matters
-
-When a wallet key leaks, a sweeper bot drains anything that lands in it within seconds. The owner's `pumpvault` and `atomic` (`rescue-tokens.js`) solve the rescue with an atomic Jito bundle: fund, move tokens and fees out, all in one landing. `api/cron/wallets-leak-scan.js` raises the alarm today but there is no tested rescue path. Separately, we hardcode Jito tip accounts in two places (`api/_lib/execution-engine.js` around line 55 and `packages/avatar-agent-mcp/src/lib/jito.js` around line 17); `atomic` has a drift check against the live `getTipAccounts`.
-
-## Step 0: re-derive the current state
-
- grep -n "tip" api/_lib/execution-engine.js | head
- sed -n 1,40p packages/avatar-agent-mcp/src/lib/jito.js
- sed -n 1,40p api/cron/wallets-leak-scan.js
-
-## Tasks
-
-1. One tip-account module that reads `getTipAccounts` from the block engine with a cached fallback list, used by both call sites.
-2. `scripts/rescue-wallet.mjs`, dry run by default: given a compromised wallet and a safe destination, build the bundle (fund fee payer, transfer every token account, close accounts, return SOL) with the existing `atomic-collect.js` and `jito.js`, simulate it, and print the plan. `--execute` exists but refuses without an interactive confirmation and is never run in this order.
-3. Link the runbook from the leak-scan alarm and `docs/ops/`.
-
-## Definition of done
-
-- [ ] Unit tests over the built bundle (no sending) pass; the tip module test covers drift.
-- [ ] A dry run against a devnet wallet you control prints a correct plan and a successful simulation.
-- [ ] Runbook linked from the alarm; docs updated.
-
-## Never blocked
-
-| Blocker | Resolution (act, do not ask) |
-|---|---|
-| The block engine endpoint is unreachable | The cached list serves; the drift check reports "unverified". |
-
-## Close out (required)
-
-1. Verify every Definition of done line with the actual command output in front of you. Never claim a line you did not verify.
-2. Commit with explicit paths and a subject that describes the diff (house style: `type(scope): what changed and why a reader cares`). User-visible work also gets a `data/changelog.json` entry and `npm run build:pages`; a new surface gets its `STRUCTURE.md` row and its `data/pages.json` entry.
-3. If every Definition of done line passes, delete this file in that same commit (`git rm prompts/finish/546-integrate-47-wallet-rescue-dry-run.md`) and append a dated entry to [_context/integrate-PROGRESS.md](_context/integrate-PROGRESS.md) with the commit SHAs. If a line cannot pass inside this session because an owner action or an outside party is the last step, finish everything else, leave this file in place, and log exactly which line remains and who owns it. Never delete this file on a partial.
-4. Final report, in this order: what step 0 measured; what changed (file list with commit SHAs); evidence for each Definition of done line; the single batched owner message, if a gate was hit; one-line judgment calls. No trailing questions.
diff --git a/public/changelog-recent.json b/public/changelog-recent.json
index 49e675596..23701cff3 100644
--- a/public/changelog-recent.json
+++ b/public/changelog-recent.json
@@ -1,11 +1,11 @@
{
- "generated_at": "2026-10-23T21:49:46.334Z",
+ "generated_at": "2026-10-23T21:54:53.583Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
- "total": 4120,
+ "total": 4123,
"complete": false,
"full_feed": "/changelog.json",
"entries": [
@@ -49,6 +49,16 @@
"feature"
]
},
+ {
+ "date": "2026-10-23",
+ "type": "update",
+ "title": "Agents can sign up to services: inbox codes and sign-in links",
+ "summary": "An agent's own address can now receive verification emails and hand back the one-time code or sign-in link. New inbox_list, inbox_read and inbox_wait_for_code tools read the code with a confidence score, only from services the owner lists under Code senders, only from authentic non-spam mail. Email bodies stay untrusted data and links are never fetched for the agent.",
+ "link": "/agent-mail",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-10-23",
"type": "update",
@@ -60,6 +70,16 @@
"improvement"
]
},
+ {
+ "date": "2026-10-23",
+ "type": "update",
+ "title": "Chain turnover on /chains",
+ "summary": "The chains leaderboard now has a sortable Turnover column (24h DEX volume divided by TVL) that shows which chains have capital actively trading rather than parked. Chains with no TVL or no reported volume show n/a.",
+ "link": "/chains",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-10-23",
"type": "update",
@@ -70,6 +90,17 @@
"feature"
]
},
+ {
+ "date": "2026-10-23",
+ "type": "update",
+ "title": "Leaked-wallet rescue runbook with a dry run, and live Jito tip accounts",
+ "summary": "A new rescue script moves every token and the remaining SOL out of a compromised wallet in one atomic Jito bundle, paid for by a separate safe wallet, and its default dry run simulates the whole bundle and prints the plan without sending anything. The leak alarm now links the runbook. Jito tips also read the block engine's live tip-account list with a pinned fallback, instead of three hardcoded copies.",
+ "link": null,
+ "tags": [
+ "security",
+ "infra"
+ ]
+ },
{
"date": "2026-10-23",
"type": "update",
@@ -1532,36 +1563,6 @@
"tags": [
"launch"
]
- },
- {
- "date": "2026-10-10",
- "type": "launch",
- "title": "Docs · Funded launch intents",
- "summary": "Launch a coin from a priced quote paid by the agent wallet: quote, paid, submitted, confirmed, indexed. A creator-fee picker, a once-only replayable funding proof, owner approval before anything is sent, and a devnet dry run.",
- "link": "/docs/launch-intents",
- "tags": [
- "launch"
- ]
- },
- {
- "date": "2026-10-10",
- "type": "launch",
- "title": "Docs · GitHub growth kit",
- "summary": "The discovery layer every public repository carries: star and share links, AGENTS.md and llms.txt for AI agents, community health files, tuned settings, and the profile catalog that lists every repo.",
- "link": "/docs/github-growth",
- "tags": [
- "launch"
- ]
- },
- {
- "date": "2026-10-10",
- "type": "launch",
- "title": "Docs · Grok Bot recipes",
- "summary": "Six Grok Bot recipes run against production, not imagined: a daily 3D brief, a game-jam asset pack, an avatar from a photo, an X post's image turned into a 3D model, a weekly agent report over OAuth, and a Solana-first $THREE market brief. Every output in the doc came from a real run.",
- "link": "/docs/tutorials/grok-bot-recipes",
- "tags": [
- "launch"
- ]
}
]
}
diff --git a/public/changelog.json b/public/changelog.json
index 04dc015fc..822317677 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-10-23T21:53:33.319Z",
+ "generated_at": "2026-10-23T21:54:53.509Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -87,6 +87,17 @@
"feature"
]
},
+ {
+ "date": "2026-10-23",
+ "type": "update",
+ "title": "Leaked-wallet rescue runbook with a dry run, and live Jito tip accounts",
+ "summary": "A new rescue script moves every token and the remaining SOL out of a compromised wallet in one atomic Jito bundle, paid for by a separate safe wallet, and its default dry run simulates the whole bundle and prints the plan without sending anything. The leak alarm now links the runbook. Jito tips also read the block engine's live tip-account list with a pinned fallback, instead of three hardcoded copies.",
+ "link": null,
+ "tags": [
+ "security",
+ "infra"
+ ]
+ },
{
"date": "2026-10-23",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 508310763..405530eec 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -70,6 +70,14 @@
<category>feature</category>
<description>Forge results, avatar pages, the avatar dashboard and model pages now have a Copy as GitHub README 3D action. It simplifies the model to a size GitHub renders and puts a stl code fence on your clipboard that GitHub shows as an interactive 3D viewer in any README, issue or pull request. The same converter is a free API (POST /api/readme-3d) and has a live page at /readme-3d.</description>
</item>
+ <item>
+ <title>Leaked-wallet rescue runbook with a dry run, and live Jito tip accounts</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-10-23:Leaked-wallet rescue runbook with a dry run, and live Jito tip accounts</guid>
+ <pubDate>Fri, 23 Oct 2026 12:00:00 GMT</pubDate>
+ <category>security</category>
+ <description>A new rescue script moves every token and the remaining SOL out of a compromised wallet in one atomic Jito bundle, paid for by a separate safe wallet, and its default dry run simulates the whole bundle and prints the plan without sending anything. The leak alarm now links the runbook. Jito tips also read the block engine's live tip-account list with a pinned fallback, instead of three hardcoded copies.</description>
+ </item>
<item>
<title>llms.txt links the docs as markdown, and install.md tells an agent how to connect</title>
<link>https://three.ws/docs/cli</link>