Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
chore(prompts): leave order 522 open on the pending outbound-receipts migration
nirholasa6dfb8b21e17
diff --git a/prompts/finish/522-integrate-23-outbound-receipts.md b/prompts/finish/522-integrate-23-outbound-receipts.mdindex 8d1c950cb..bdde79e7e 100644--- a/prompts/finish/522-integrate-23-outbound-receipts.md+++ b/prompts/finish/522-integrate-23-outbound-receipts.md@@ -1,5 +1,7 @@# integrate 23: enriched receipts and CSV export for what agents spend elsewhere+**Evolve status (2026-10-15):** everything in this order is built, tested and browser-verified except the schema it depends on. The resolver (`api/_lib/x402/solana-settlement.js`), the lazy-resolve-and-cache library (`api/_lib/x402/outbound-receipts.js`), the endpoint (`api/x402/outbound-receipts.js`), and the Outbound tab on `/receipts` (`pages/receipts.html`, `src/receipts-outbound.js`) are all committed. The resolver's 16 unit tests pass against synthetic fixtures and were separately proven against a real mainnet USDC settlement signature read live from Solana RPC (uncommitted, per the no-real-third-party-address rule). The tab's signed-out, empty and populated states are Playwright-verified with real network mocks, CSV export included. What remains is an owner action, not engineering: the migration `api/_lib/migrations/20261015110000_x402_outbound_resolved.sql` is written and still pending (`npm run db:status`), and applying it to production is hard-denied for this evolve session. See row 66 in `prompts/finish/_context/production-100-OWNER-ACTIONS.md` for the exact apply command. Zero outbound-spend rows exist today, so this is not an active bug, but the resolve-and-cache UPDATE will fail with `42703 undefined_column` the first time a real row needs resolving post-deploy, until the migration lands.+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, no gate.## Operating clause (binding)diff --git a/prompts/finish/_context/production-100-OWNER-ACTIONS.md b/prompts/finish/_context/production-100-OWNER-ACTIONS.mdindex 633f964e2..66c082162 100644--- a/prompts/finish/_context/production-100-OWNER-ACTIONS.md+++ b/prompts/finish/_context/production-100-OWNER-ACTIONS.md@@ -9,7 +9,7 @@ it and, if that unblocks a work order, say which one in the owning pack's `produRows carry the date they were added so staleness is visible. Re-verify a row before actingon it; some resolve themselves as other work lands.-## Open rows (2026-10-15 (triage-lane deep sweep): row 65 added for the payment-session policy-upgrades migration (`20261015100000_payment_session_policy_upgrades.sql`), needed before the `655b5a491` code deploy to avoid a `42703 undefined_column` 500 on every payment-session create/execute call; row 1 re-measured, deploy gap still 2 commits against `threews/main`, unchanged from 2026-10-14; 2026-10-15 (order 518-integrate-19 close-out): row 63 added for setting a dedicated `PAY_VERDICT_HMAC_KEY` on the production Cloud Run service; not an active bug, the signed-verdict feature it covers already works today on a fallback secret, this just gives it its own rotatable key; 2026-10-14 (order 506-integrate-07 close-out): row 62 added for deploying the new `services/pump-claims` Cloud Run service and applying its `pump_fee_claims` migration to production; 2026-10-14 (order 503-integrate-04 close-out): row 61 added for pushing and archiving 7 retired repos (`three-ui`, `crypto-market-data`, `crypto-market-data-ts`, `crypto-data-aggregator`, `memescope-monday-directory`, `robinhood-chain-alert-bot`, `robinhood-chain-trading-bot`); 2026-10-14 (order 501-integrate-02 close-out): row 60 added for approving the `@nirholas/pump-sdk` bump to `^1.36.0` in `packages/avatar-agent-mcp/package.json`; 2026-10-14 (order 500-integrate-01 close-out): row 59 added for pushing every staged standalone mirror now that sync-standalone-repos.mjs stages instead of force-pushing; 2026-10-14 (order 404 second pass): correcting the 2026-10-11 entry below, the `x-mention-reply.js` `chainFor()` fix was not actually carried by merge commit `d77b89178`; checking out that commit's own `evolve` parent showed `chainFor()` still importing `resolveAgentBrain`/`modelChain` (the tool-calling chain shape, no `buildBody`), the exact bug row 34 flagged, still live. The real fix is this session's `evolve` commit `7ba9f9749` ("fix(x-mentions): give public replies a buildBody-shaped provider chain"), switching `chainFor()` to `llm.js`'s own `providerChain()` plus `loadOwnerGrokKey`/`agentDefaultModel`/`MODEL_CATALOG`; re-verified now genuinely passing with the same command the earlier entry cited (`RUN_LLM_TESTS=1 npx vitest run tests/x-mention-reply.llm.test.js`, 16/16 `source: 'model'`, no `buildBody` TypeError). Row 34's premise (the `evolve`/`main` divergence) is still correctly closed, just not for the reason originally stated; no row reopened. Order 060's matching status paragraph corrected the same way. 2026-10-13 (order 095 close-out): row 58 added for the Home Assistant integration's standalone repository, release, and the hacs/default and home-assistant/brands pull requests; 2026-10-13 (order 094 close-out): row 57 added for the WordPress.org/Framer/Webflow account signups and submissions for the three <agent-3d> site-builder embeds; 2026-10-13 (order 092 close-out): row 55 added for the VRoid Hub avatar-import OAuth app registration and migration; 2026-10-13 (triage-lane sweep, fifth pass): row 53 added for the Birdeye compute-units cap behind `pump-price-history-upstreams-502` (confirmed live, a billing/plan decision only); row 1 re-measured, deploy gap still 0 against the pushed `threews/main` ref and the 8 page-404/wrong-canonical findings this pass confirmed as deploy lag; row 47 re-measured, still a no-op (`COINGECKO_API_KEY` still absent); the previously-unclassified `/dist-lib/agent-3d.js` and `/agent-3d/latest/agent-3d.js` 500s ("Response size was too large") are the same bug row 48 already tracks, fixed on `evolve` in `f939d5ef1`, confirmed still green (`npx vitest run tests/lib-bundle-size.test.js tests/whisper-stt.test.js`, 16/16) and awaiting the pending deploy, no new row; 2026-10-13 (triage-lane sweep, fourth pass): row 1 re-measured, deploy gap still 0 against the pushed `threews/main` ref; the `ccv-ai-providers-unavailable-503` finding's Groq/OpenRouter/Vertex angles confirmed already covered by rows 6 and 20, no new row added; 2026-10-13 (order 087 close-out): row 51 added for the LiveKit and Pipecat avatar integrations, both built and verified end to end this session, with the PyPI publishes and the two upstream pull requests left as owner actions; 2026-10-13 (order 085 close-out): row 50 added for publishing the CC0 bulk animation library to production, and the Adobe Mixamo permission letter draft is ready to send as owner order 938; 2026-10-12 (order 084 close-out): row 49 added for the Tripo signed webhook's three linked steps (apply the `forge_webhook_deliveries` migration, set `TRIPO_WEBHOOK_SECRET`, register the dashboard webhook), not an active bug since the secret is unset and polling answers every Tripo job today; 2026-10-12 18:10 UTC (triage-lane sweep, third pass): row 48 added for the dist-lib CDN embed size fix (previously-unclassified `/dist-lib/agent-3d.js` 500s, root-caused and fixed on `evolve`, pure code change awaiting the next deploy); 2026-10-12 17:54 UTC (triage-lane sweep, second pass): row 1's same-day "11 behind" figure corrected to the real deploy gap of 0 (querying `/api/version` live, not `/api/healthz`, which has no commit field), row 47 added for CoinGecko's keyless tier being rate-limited (`COINGECKO_API_KEY` already absent from the service, so the finding's own pre-approved env fix is a no-op); 2026-10-12 (triage-lane sweep): row 1 re-measured against the canonical `threews` remote, 11 commits behind `main` (down from 28, local stale ref corrected), row 45 added for the HF image-provider (fal-ai/nscale) credit exhaustion, a separate pool from row 6; 2026-10-11 (best3d order 070 close-out): rows 43 and 44 added for the `model-partcrafter` and `model-holopart` first deploys; 2026-10-11 (triage-lane sweep): row 42 added for the MCP client-sessions nullable-column migration, an active production bug; row 1 re-measured, 28 commits behind `main` (up from 5); 2026-10-11 (best3d order 069 close-out): rows 40 and 41 added for the `model-rig-nonhuman` and `model-anigen` first deploys; 2026-10-11 (best3d order 068 close-out): row 39 added for the `model-pixal3d` first deploy; 2026-10-11 (best3d order 067 retry): row 38 added for the `model-trellis2` first deploy; 2026-10-11 (order 404 close-out): row 34 deleted, its premise cleared by merge commit `d77b89178` (the `evolve`/`main` reconciliation) which also carried the `x-mention-reply.js` `chainFor()` fix row 34 called out, verified live with `RUN_LLM_TESTS=1 npx vitest run tests/x-mention-reply.llm.test.js` (16/16 `source: 'model'`, no `buildBody` TypeError); 2026-10-11 (scout lane): row 36 added for the Cloudflare R2 flapping degraded/down pattern; 2026-10-11 (even later): row 24 re-measured again after order 400's ring-leak-scan tiering/lock fix shipped on `evolve`; 2026-10-11 (later): row 35 added for the agent mention-policy migration; 2026-10-11 04:16 UTC: rows 1 and 24 re-measured by the deep triage sweep; row 34 added for the evolve/main branch divergence; 2026-10-10: row 33 added for the xAI MCP e2e key; rows 1, 19 and 24 re-measured by the triage sweep; 2026-10-09: rows 1, 2 and 24 re-measured by the triage sweep, row 31 added for the GPU worker redeploy and row 32 for database table retention; row 30 added for the Grok Bot CLI setup rerun; 2026-10-08: row 26 added for the coin-gated MCP catalog regeneration; rows 1 and 2 re-measured by the triage sweep, row 24 added for the paid Solana RPC credits, row 25 added for the MCP connector OAuth deploy; 2026-09-30: row 23 added for the $THREE receiver wallets; 2026-09-29: row 19 re-measured after the agent-sniper deploy; 2026-09-09: row 19 added, and row 1 corrected because its outage premise no longer holds; rows 1, 2, 3, 9, 13, 15 and 16 re-measured 2026-09-04; the former row 18 was cleared that day and its number is not reused; the 2026-09-02 and 2026-08-09 passes are folded in below)+## Open rows (2026-10-15 (order 522-integrate-23 close-out): row 66 added for the x402 outbound-receipts resolved-columns migration (`20261015110000_x402_outbound_resolved.sql`), not yet an active bug since zero outbound-spend rows exist today; 2026-10-15 (triage-lane deep sweep): row 65 added for the payment-session policy-upgrades migration (`20261015100000_payment_session_policy_upgrades.sql`), needed before the `655b5a491` code deploy to avoid a `42703 undefined_column` 500 on every payment-session create/execute call; row 1 re-measured, deploy gap still 2 commits against `threews/main`, unchanged from 2026-10-14; 2026-10-15 (order 518-integrate-19 close-out): row 63 added for setting a dedicated `PAY_VERDICT_HMAC_KEY` on the production Cloud Run service; not an active bug, the signed-verdict feature it covers already works today on a fallback secret, this just gives it its own rotatable key; 2026-10-14 (order 506-integrate-07 close-out): row 62 added for deploying the new `services/pump-claims` Cloud Run service and applying its `pump_fee_claims` migration to production; 2026-10-14 (order 503-integrate-04 close-out): row 61 added for pushing and archiving 7 retired repos (`three-ui`, `crypto-market-data`, `crypto-market-data-ts`, `crypto-data-aggregator`, `memescope-monday-directory`, `robinhood-chain-alert-bot`, `robinhood-chain-trading-bot`); 2026-10-14 (order 501-integrate-02 close-out): row 60 added for approving the `@nirholas/pump-sdk` bump to `^1.36.0` in `packages/avatar-agent-mcp/package.json`; 2026-10-14 (order 500-integrate-01 close-out): row 59 added for pushing every staged standalone mirror now that sync-standalone-repos.mjs stages instead of force-pushing; 2026-10-14 (order 404 second pass): correcting the 2026-10-11 entry below, the `x-mention-reply.js` `chainFor()` fix was not actually carried by merge commit `d77b89178`; checking out that commit's own `evolve` parent showed `chainFor()` still importing `resolveAgentBrain`/`modelChain` (the tool-calling chain shape, no `buildBody`), the exact bug row 34 flagged, still live. The real fix is this session's `evolve` commit `7ba9f9749` ("fix(x-mentions): give public replies a buildBody-shaped provider chain"), switching `chainFor()` to `llm.js`'s own `providerChain()` plus `loadOwnerGrokKey`/`agentDefaultModel`/`MODEL_CATALOG`; re-verified now genuinely passing with the same command the earlier entry cited (`RUN_LLM_TESTS=1 npx vitest run tests/x-mention-reply.llm.test.js`, 16/16 `source: 'model'`, no `buildBody` TypeError). Row 34's premise (the `evolve`/`main` divergence) is still correctly closed, just not for the reason originally stated; no row reopened. Order 060's matching status paragraph corrected the same way. 2026-10-13 (order 095 close-out): row 58 added for the Home Assistant integration's standalone repository, release, and the hacs/default and home-assistant/brands pull requests; 2026-10-13 (order 094 close-out): row 57 added for the WordPress.org/Framer/Webflow account signups and submissions for the three <agent-3d> site-builder embeds; 2026-10-13 (order 092 close-out): row 55 added for the VRoid Hub avatar-import OAuth app registration and migration; 2026-10-13 (triage-lane sweep, fifth pass): row 53 added for the Birdeye compute-units cap behind `pump-price-history-upstreams-502` (confirmed live, a billing/plan decision only); row 1 re-measured, deploy gap still 0 against the pushed `threews/main` ref and the 8 page-404/wrong-canonical findings this pass confirmed as deploy lag; row 47 re-measured, still a no-op (`COINGECKO_API_KEY` still absent); the previously-unclassified `/dist-lib/agent-3d.js` and `/agent-3d/latest/agent-3d.js` 500s ("Response size was too large") are the same bug row 48 already tracks, fixed on `evolve` in `f939d5ef1`, confirmed still green (`npx vitest run tests/lib-bundle-size.test.js tests/whisper-stt.test.js`, 16/16) and awaiting the pending deploy, no new row; 2026-10-13 (triage-lane sweep, fourth pass): row 1 re-measured, deploy gap still 0 against the pushed `threews/main` ref; the `ccv-ai-providers-unavailable-503` finding's Groq/OpenRouter/Vertex angles confirmed already covered by rows 6 and 20, no new row added; 2026-10-13 (order 087 close-out): row 51 added for the LiveKit and Pipecat avatar integrations, both built and verified end to end this session, with the PyPI publishes and the two upstream pull requests left as owner actions; 2026-10-13 (order 085 close-out): row 50 added for publishing the CC0 bulk animation library to production, and the Adobe Mixamo permission letter draft is ready to send as owner order 938; 2026-10-12 (order 084 close-out): row 49 added for the Tripo signed webhook's three linked steps (apply the `forge_webhook_deliveries` migration, set `TRIPO_WEBHOOK_SECRET`, register the dashboard webhook), not an active bug since the secret is unset and polling answers every Tripo job today; 2026-10-12 18:10 UTC (triage-lane sweep, third pass): row 48 added for the dist-lib CDN embed size fix (previously-unclassified `/dist-lib/agent-3d.js` 500s, root-caused and fixed on `evolve`, pure code change awaiting the next deploy); 2026-10-12 17:54 UTC (triage-lane sweep, second pass): row 1's same-day "11 behind" figure corrected to the real deploy gap of 0 (querying `/api/version` live, not `/api/healthz`, which has no commit field), row 47 added for CoinGecko's keyless tier being rate-limited (`COINGECKO_API_KEY` already absent from the service, so the finding's own pre-approved env fix is a no-op); 2026-10-12 (triage-lane sweep): row 1 re-measured against the canonical `threews` remote, 11 commits behind `main` (down from 28, local stale ref corrected), row 45 added for the HF image-provider (fal-ai/nscale) credit exhaustion, a separate pool from row 6; 2026-10-11 (best3d order 070 close-out): rows 43 and 44 added for the `model-partcrafter` and `model-holopart` first deploys; 2026-10-11 (triage-lane sweep): row 42 added for the MCP client-sessions nullable-column migration, an active production bug; row 1 re-measured, 28 commits behind `main` (up from 5); 2026-10-11 (best3d order 069 close-out): rows 40 and 41 added for the `model-rig-nonhuman` and `model-anigen` first deploys; 2026-10-11 (best3d order 068 close-out): row 39 added for the `model-pixal3d` first deploy; 2026-10-11 (best3d order 067 retry): row 38 added for the `model-trellis2` first deploy; 2026-10-11 (order 404 close-out): row 34 deleted, its premise cleared by merge commit `d77b89178` (the `evolve`/`main` reconciliation) which also carried the `x-mention-reply.js` `chainFor()` fix row 34 called out, verified live with `RUN_LLM_TESTS=1 npx vitest run tests/x-mention-reply.llm.test.js` (16/16 `source: 'model'`, no `buildBody` TypeError); 2026-10-11 (scout lane): row 36 added for the Cloudflare R2 flapping degraded/down pattern; 2026-10-11 (even later): row 24 re-measured again after order 400's ring-leak-scan tiering/lock fix shipped on `evolve`; 2026-10-11 (later): row 35 added for the agent mention-policy migration; 2026-10-11 04:16 UTC: rows 1 and 24 re-measured by the deep triage sweep; row 34 added for the evolve/main branch divergence; 2026-10-10: row 33 added for the xAI MCP e2e key; rows 1, 19 and 24 re-measured by the triage sweep; 2026-10-09: rows 1, 2 and 24 re-measured by the triage sweep, row 31 added for the GPU worker redeploy and row 32 for database table retention; row 30 added for the Grok Bot CLI setup rerun; 2026-10-08: row 26 added for the coin-gated MCP catalog regeneration; rows 1 and 2 re-measured by the triage sweep, row 24 added for the paid Solana RPC credits, row 25 added for the MCP connector OAuth deploy; 2026-09-30: row 23 added for the $THREE receiver wallets; 2026-09-29: row 19 re-measured after the agent-sniper deploy; 2026-09-09: row 19 added, and row 1 corrected because its outage premise no longer holds; rows 1, 2, 3, 9, 13, 15 and 16 re-measured 2026-09-04; the former row 18 was cleared that day and its number is not reused; the 2026-09-02 and 2026-08-09 passes are folded in below)| # | Action | Size | Unblocks | Detail lives in ||---|---|---|---|---|@@ -82,6 +82,7 @@ on it; some resolve themselves as other work lands.| 64 | **Create the mainnet native-launchpad curve config and pin it, activating the lane** (added 2026-10-14 by the evolve loop closing out order 512-integrate-13). `api/_lib/native-launch/config.js`'s curve now opens every pool at a 50% anti-snipe trading fee that decays exponentially to the steady-state 1% over the first 100 slots (Meteora DBC's own fee scheduler, verified by `tests/native-launch-curve.test.js`, a devnet e2e run against a local validator cloning the real DBC/Token-2022/ATA/Metaplex programs, and a zero-cost `--simulate` run against the live mainnet DBC program). Production currently has zero `NATIVE_LAUNCH_*` env vars set (`gcloud run services describe three-ws-api --region us-central1` env list checked), so this is first-time lane activation, not a change to a live config; no existing launch is affected. Exact command: `node scripts/native-launchpad-create-config.mjs --network mainnet`, needing `NATIVE_LAUNCH_PARTNER_SECRET_BASE58` (or `X402_TREASURY_SECRET_BASE58` as a fallback signer) funded with at least 0.05 SOL in that wallet (the script's own balance floor for rent + fees headroom); the on-chain spend itself is about 0.006 SOL (this order's own estimate for the `createConfig` transaction's rent and fee). Optionally set `NATIVE_LAUNCH_FEE_WALLET` first if the platform's fee claimer should be a wallet other than the signer. The script prints the created config pubkey and the exact env line to pin; run `gcloud run services update three-ws-api --region us-central1 --update-env-vars NATIVE_LAUNCH_CONFIG_KEY=<printed pubkey>` (config-only, pre-approved) to put the lane live. | one `node scripts/native-launchpad-create-config.mjs --network mainnet` run (~0.006 SOL) + one `gcloud run services update --update-env-vars` pin | Activates the native $THREE launchpad lane on mainnet with the decaying anti-snipe fee baked into the curve from the very first launch | [512-integrate-13-anti-snipe-native-lane.md](../512-integrate-13-anti-snipe-native-lane.md) || 65 | **Apply the payment-session policy-upgrades migration, then ship it with the next deploy** (added 2026-10-15 by the triage-lane deep sweep, order 518-integrate-19 close-out). `api/_lib/migrations/20261015100000_payment_session_policy_upgrades.sql` adds `approval_threshold_usdc`, `blocked_hosts` and `per_rail_daily_usdc` to `payment_sessions`, the signed-verdict columns (`policy_digest`, `verdict_code`, `verdict_signature`, `verdict_signed_at`) to `payment_session_executions`, and the new `payment_session_rail_reservations` table backing the rolling-window per-rail cap. `npm run db:status` lists it as one of the pending migrations today. Not yet an active production bug (the code half, `api/_lib/pay/spend-governor.js` and `api/pay/simulate.js`'s shared `policy.js`, is still only on `evolve`/this worktree, not deployed), but it must be applied in the same window as that code deploys: the governor's atomic enforcement and the simulator's parity check both read and write these columns unconditionally, so deploying the code first against the unmigrated table would 500 every payment-session create/execute call with Postgres `42703 undefined_column`. Apply with `node scripts/apply-migrations.mjs --apply --file 20261015100000_payment_session_policy_upgrades.sql` (or `npm run db:migrate`, which applies every pending migration immediately with no dry run) before or together with the deploy that ships `655b5a491`. Row 63 (above) covers the separate `PAY_VERDICT_HMAC_KEY` env var this same feature uses for signing; that row is independent of this migration and already works on a fallback secret. | one migration apply, timed with the deploy | Lets the new payment-session governance knobs (blocked hosts, approval threshold, per-rail daily caps) and tamper-evident signed verdicts go live without a schema mismatch | [docs/payment-sessions.md](../../docs/payment-sessions.md) |+| 66 | **Apply the x402 outbound-receipts resolved-columns migration** (added 2026-10-15, order 522-integrate-23 close-out). `api/_lib/migrations/20261015110000_x402_outbound_resolved.sql` adds `resolved_payer`, `resolved_payee`, `resolved_mint`, `resolved_amount_atomics`, `resolved_decimals`, `resolved_fee_lamports`, `resolved_slot`, `resolved_block_time`, `resolved_at` and `resolve_error` to `payment_session_executions`, plus a partial index (`pse_user_settled_resolved`) for the settled-and-unresolved lookup. `npm run db:status` lists it as pending today. Not an active production bug yet: zero outbound-spend rows exist in `payment_session_executions` right now, so nothing has tried to resolve one. It becomes load-bearing the moment the new `GET /api/x402/outbound-receipts` endpoint (`api/x402/outbound-receipts.js`, `api/_lib/x402/outbound-receipts.js`) is deployed and a real agent spend lands: `resolveAndCacheRow()`'s UPDATE would fail with Postgres `42703 undefined_column` the first time anyone views that row. Apply with `node scripts/apply-migrations.mjs --apply --file 20261015110000_x402_outbound_resolved.sql` (or `npm run db:migrate`) before or together with the deploy that ships this feature. Independent of row 65's migration; both are currently pending in the same `npm run db:status` list and can be applied in the same pass. | one migration apply, timed with the deploy | Lets the Receipt Vault's new Outbound tab cache chain-verified settlement data instead of erroring the first time it resolves a real row | [docs/payment-sessions.md](../../docs/payment-sessions.md) |Deleted 2026-09-01: the former row 5 (`WALLET_ENCRYPTION_KEY_PREVIOUS` policy), whichdeclared itself "delete on reading" and had outlived that by three weeks.