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.

chore(prompts,docs): refresh the finish-track progress logs and the okx-chat-bot README

nirholas10f73b24fa70
diff --git a/prompts/finish/backlog-00-INDEX.md b/prompts/finish/backlog-00-INDEX.md
index 4ff737395..f24b0b259 100644
--- a/prompts/finish/backlog-00-INDEX.md
+++ b/prompts/finish/backlog-00-INDEX.md
@@ -43,7 +43,7 @@ observable health, so 01 to 03 come first.
| 01 | [x402 settle: clear `fee_runway_exhausted`](backlog-01-x402-settle-runway.md) | capital and the deploy (three more code defects found and fixed 2026-09-04, incl. a thin top-up that funded the wrong wallet) | SOL to the economy master, and the deploy that carries the ordering fix; the config levers are already applied |
| 05 | [R2 bucket CORS: verify, then fix at the origin](backlog-05-r2-bucket-cors.md) | one credential | mint an R2 admin token |
| 07 | [BNB testnet: deploy the two finished contracts](backlog-07-bnb-testnet-deploys.md) | one funded EOA | send tBNB to `0x1C4918894dfA5eE11cfF9629B458b5169Cfa3871` (faucet is reCAPTCHA-gated) |
-| 08 | [OKX chat bot: move off the codespace](backlog-08-okx-chat-bot-always-on.md) | the deploy (everything it depended on now exists) | approve the deploy; clear the GCP billing hold so replies can be authored |
+| 08 | [OKX chat bot: move off the codespace](backlog-08-okx-chat-bot-always-on.md) | **deployed 2026-09-04**; only the reply lane is blocked | clear the GCP billing hold so the bot can author replies |
| 09 | [Telegram bots: durable hosting for both feeds](backlog-09-telegram-bots-durability.md) | **done**, verified live 2026-09-02 | clear the commit gate on its file update |
| 10 | [x402scan listing: finish the last three steps](backlog-10-x402scan-listing.md) | the deploy (the facilitator listing itself is live) | approve the deploy, then one wallet signature to re-register the origin |
@@ -77,7 +77,9 @@ stopgap it is (`hostDurable=false`). On 2026-09-04 the deploy stopped waiting on
nobody had: it now authenticates the AI subsession through Vertex with the runtime service
account, so `--set-secrets` carries only the heartbeat database URL, and the session snapshot
is seeded and verified so the first boot comes up authenticated rather than paging for an OTP.
-The Cloud Run host is still undeployed, and that is now the only agent-doable step left.
+The Cloud Run host went live the same day (revision `okx-chat-bot-00001-926`): it restored the
+seeded session with no OTP, reports `durable: true`, and serves one XMTP client for agent 2632,
+so the codespace era is over and that stopgap must stay stopped (one writer per state object).
Read the same day: both AI credentials this project holds are present and refused (Vertex
`Lightning dunning decision is deny`, a billing hold; the `openai-api-key` account
`billing_not_active`, which kills the platform's OpenAI lane everywhere, not just here), so a
diff --git a/prompts/finish/backlog-PROGRESS.md b/prompts/finish/backlog-PROGRESS.md
index e3d93d989..09371638c 100644
--- a/prompts/finish/backlog-PROGRESS.md
+++ b/prompts/finish/backlog-PROGRESS.md
@@ -1606,8 +1606,17 @@ first Cloud Run boot comes up authenticated. Workspace context verified by askin
subsession a platform question: it answered with the real catalog, `$THREE`, Solana and
agent 2632.
-Left: the deploy itself (owner-gated, one command in `workers/okx-chat-bot/README.md` under
-"Ship it"; re-seed and stop the codespace stopgap first, the GCS object has exactly one
-writer), and the GCP billing hold (owner). Until the hold clears a deployed host reports
-`ai_provider_unauthorized`: chat is received and durable, replies are not authored. That is
-loud rather than silent, and clearing the hold needs no redeploy.
+Then deployed it, once the owner approved: build `8f27bf79-ba3b-4e2c-9adc-37b0266ad566`
+SUCCESS, service `okx-chat-bot` revision `okx-chat-bot-00001-926` `Ready=True` at
+`https://okx-chat-bot-lp642k3kpa-uc.a.run.app`. The stopgap was stopped and the snapshot
+re-seeded (442,593 bytes) first, so the GCS object kept one writer. The revision restored that
+snapshot byte for byte, came up `loggedIn: true` with **no OTP**, and serves 1 XMTP client for
+agent 2632 from a host with `durable: true`. It booted without the false `daemon_down` page.
+`/readyz` answers 503 `ai_provider_unauthorized` quoting the dunning 403 and carrying the
+three-step remedy, `ops_alerts` holds the matching `warn` row, and the Cloud Run heartbeat is
+what `/api/healthz` now renders.
+
+Left: **the GCP billing hold, owner only.** Vertex denies every call, so chat is received
+durably and no reply is authored. Nothing needs redeploying when it clears: the credential
+probe re-runs every 15 minutes and flips readiness on its own. Do NOT restart the codespace
+stopgap; Cloud Run owns the single-writer state object now.
diff --git a/prompts/finish/okx-ai-PROGRESS.md b/prompts/finish/okx-ai-PROGRESS.md
index d62e5d000..dfb61598d 100644
--- a/prompts/finish/okx-ai-PROGRESS.md
+++ b/prompts/finish/okx-ai-PROGRESS.md
@@ -72,15 +72,61 @@ and now runs at worker boot.
workspace. It answered with the real catalog (draft/standard/HD at $0.01/$0.05/$0.25, image
to 3D at $0.25), named `$THREE` and Solana, and identified agent 2632 correctly.
+### DEPLOYED, 2026-09-04 08:18 UTC
+
+Owner approved the deploy. Build `8f27bf79-ba3b-4e2c-9adc-37b0266ad566` SUCCESS (16m40s,
+1.5 GiB context), service `okx-chat-bot`, revision `okx-chat-bot-00001-926`, `Ready=True`,
+url `https://okx-chat-bot-lp642k3kpa-uc.a.run.app` (authenticated invocations only). The
+codespace stopgap was stopped and the snapshot re-seeded (442,593 bytes, generation
+1788508593396745) before the submit, so the object kept exactly one writer.
+
+Its boot chain, read off Cloud Logging, is the whole design working:
+
+```
+boot host=cloudrun:okx-chat-bot (okx-chat-bot-00001-926)
+state restored bytes=442593 <- the seeded snapshot, byte for byte
+workspace built
+daemon spawned
+health server listening
+provider credential unauthorized <- 403 Lightning dunning decision is deny
+health changed ai_provider_unauthorized
+```
+
+No `daemon_down` page on the way up: the grace window did its job on the first real boot.
+
+Read off the service itself:
+
+| Field | Value |
+|---|---|
+| `host.durable` | **true** (the codespace era is over) |
+| `session` | `loggedIn: true`, `[email protected]` (restored, **no OTP was needed**) |
+| `agents` | 1 XMTP client serving 1 agent identity: buyer chat is delivered, durably |
+| `provider.transport` | `vertex` |
+| `provider.verdict` | `unauthorized`, quoting the dunning 403 verbatim |
+| `/readyz` | **503**, `ai_provider_unauthorized`, with the three-step `remedy` attached |
+| `ops_alerts` | `warn | OKX chat bot degraded: ai_provider_unauthorized | count 1` |
+| `bot_heartbeat` | beating from Cloud Run; `/api/healthz` renders it degraded with the remedy hint |
+
+That is the intended state, not a failure: the listing now receives chat on a host that
+survives, and the one thing it cannot do says so on the wire instead of going quiet.
+
### What is left, and who owns it
-1. **The deploy itself (owner).** Prerequisites are complete; it is one command, in
- `workers/okx-chat-bot/README.md` under "Ship it". Re-seed and stop the codespace stopgap
- first: the GCS object has exactly one writer.
-2. **The GCP billing hold (owner).** Until it clears, a deployed host will report
- `ai_provider_unauthorized`: chat is received and durable, replies are not authored. That
- is strictly better than today (no durable host at all) and it is loud rather than silent.
- Clearing the hold needs no redeploy; the next probe flips it to ok on its own.
+**One line, and it is the owner's: clear the GCP billing hold.** Vertex answers
+`403 PERMISSION_DENIED: Lightning dunning decision is deny for project: projects/93741856042`
+to every call, so the subsession cannot author a reply. Nothing needs redeploying when it
+clears: the credential probe runs every 15 minutes and flips `/readyz` to 200 on its own, and
+an info alert fires on recovery. The alternatives, if billing cannot be cleared, are in the
+service's own `remedy` (an `anthropic-api-key` secret, or reactivating the OpenAI account
+behind `openai-api-key` and pinning `OKX_BOT_AI_PROVIDER=codex`).
+
+**One thing to watch on that first working reply.** The billing hold meant the subsession's
+own Vertex round trip could never be exercised, only the credential probe against the same
+endpoint. If the CLI reports an unknown model, pin one with `ANTHROPIC_MODEL` on the service
+(config-only `gcloud run services update --update-env-vars`, pre-approved).
+
+**Do not restart the codespace stopgap.** The GCS state object has exactly one writer and
+Cloud Run now owns it. `npm run okx:bot` on this machine would interleave snapshots.
---
diff --git a/scripts/avatar-likeness-audit.mjs b/scripts/avatar-likeness-audit.mjs
index ac4364da4..3e0d1ec7b 100644
--- a/scripts/avatar-likeness-audit.mjs
+++ b/scripts/avatar-likeness-audit.mjs
@@ -19,7 +19,8 @@
//
// Usage:
// node scripts/avatar-likeness-audit.mjs [--cases=a,b] [--concurrency=2]
-// [--base-url=https://three.ws] [--skip-generate] [--skip-render] [--skip-judge]
+// [--base-url=https://three.ws] [--out-dir=<dir>]
+// [--skip-generate] [--skip-render] [--skip-judge]
//
// Credentials (never committed): CRON_SECRET for the internal seed header and
// GCP_SERVICE_ACCOUNT_JSON for the Vertex judge. Both are read from the process
@@ -36,8 +37,15 @@ import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const ROOT = path.resolve(__dirname, '..');
-const OUT_DIR = path.join(ROOT, 'prompts', 'quality-bar', '_generated', '10');
-const DATA_FILE = path.join(OUT_DIR, 'audit-data.json');
+const DEFAULT_OUT_DIR = path.join(ROOT, 'prompts', 'quality-bar', '_generated', '10');
+// Set by main() from --out-dir so one run's evidence never overwrites another's.
+let OUT_DIR = DEFAULT_OUT_DIR;
+let DATA_FILE = path.join(OUT_DIR, 'audit-data.json');
+
+function setOutDir(dir) {
+ OUT_DIR = path.isAbsolute(dir) ? dir : path.join(ROOT, dir);
+ DATA_FILE = path.join(OUT_DIR, 'audit-data.json');
+}
// ---------------------------------------------------------------------------
// Env: .env for local credentials, plus an optional SA key file for Vertex.
@@ -170,6 +178,7 @@ function parseArgs(argv) {
cases: 'all',
baseUrl: 'https://three.ws',
concurrency: 2,
+ outDir: DEFAULT_OUT_DIR,
skipGenerate: false,
skipRender: false,
skipJudge: false,
@@ -180,6 +189,7 @@ function parseArgs(argv) {
if (k === 'cases') args.cases = v;
else if (k === 'base-url') args.baseUrl = v;
else if (k === 'concurrency') args.concurrency = Math.max(1, Number(v) || 2);
+ else if (k === 'out-dir') args.outDir = v;
else if (k === 'skip-generate') args.skipGenerate = true;
else if (k === 'skip-render') args.skipRender = true;
else if (k === 'skip-judge') args.skipJudge = true;
@@ -594,6 +604,7 @@ async function main() {
process.env.GCP_SERVICE_ACCOUNT_JSON = await readFile(process.env.AVATAR_AUDIT_SA_FILE, 'utf8');
}
const args = parseArgs(process.argv.slice(2));
+ setOutDir(args.outDir);
const selected = args.cases === 'all' ? CASES : CASES.filter((c) => args.cases.split(',').includes(c.id));
if (!selected.length) throw new Error(`no cases matched --cases=${args.cases}`);
diff --git a/workers/okx-chat-bot/README.md b/workers/okx-chat-bot/README.md
index d5ed19776..34e767787 100644
--- a/workers/okx-chat-bot/README.md
+++ b/workers/okx-chat-bot/README.md
@@ -211,16 +211,28 @@ someone has to go find.
## Deploying
-**Status: built, prerequisites complete, deploy owner-gated.** There is still no
-`okx-chat-bot` Cloud Run service in `aerial-vehicle-466722-p5`; a codespace runs
-the stopgap. Everything the deploy depends on now exists:
+**Status: deployed 2026-09-04.** Service `okx-chat-bot` in
+`aerial-vehicle-466722-p5`, revision `okx-chat-bot-00001-926`, `Ready=True` at
+`https://okx-chat-bot-lp642k3kpa-uc.a.run.app` (authenticated invocations only).
+The first boot restored the seeded snapshot byte for byte, came up
+`loggedIn: true` with no OTP, and serves one XMTP client for agent 2632. The
+codespace stopgap is stopped and **must stay stopped**: the GCS state object has
+exactly one writer and Cloud Run owns it now.
+
+It reports `ai_provider_unauthorized` and answers `/readyz` 503, which is the
+design working rather than a fault: chat is delivered durably, the GCP billing
+hold denies Vertex, and the bot says so with the fix attached instead of going
+quiet. Clearing the hold needs no redeploy; the credential probe flips readiness
+on its own within 15 minutes.
+
+Everything the deploy depends on:
| Prerequisite | State |
|---|---|
| `gs://three-ws-okx-bot-state` | created 2026-09-02, versioned, `three-ws@` holds `objectAdmin` |
| `okx-chat-bot-database-url` secret | created 2026-09-02 from the project's own `DATABASE_URL`, `three-ws@` holds `secretAccessor` |
| AI credential | **no secret needed.** `three-ws@` already holds `roles/aiplatform.user`, so `CLAUDE_CODE_USE_VERTEX=1` in the deploy authenticates through ADC |
-| Seeded session | seeded 2026-09-04, so the first boot restores an authenticated wallet instead of paging for an OTP |
+| Seeded session | seeded 2026-09-04 and proven: the first revision restored it and needed no OTP |
The AI-provider secret used to be the one blocker, and the deploy was written to
fail loudly without it on the reasoning that a bot receiving chat it can never
@@ -239,7 +251,7 @@ cannot survive on its own reads as **degraded**, never `ok`, with the deploy
command as its hint. Calling a codespace green would rebuild, one level up, the
false-green this worker exists to kill.
-### Ship it (one command, after the two steps below)
+### Re-shipping it (one command, after the two steps below)
```bash
# 1. Refresh the seeded session from the host that holds it, daemon stopped: