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
fix(docs): make four repo links resolve in a fresh clone
nirholas72dffdb96b1e
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 31f6a0056..78eb690a1 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -69,7 +69,7 @@ bottom.| Notification bell & preferences | Event vocabulary [api/_lib/feed.js](api/_lib/feed.js) (`USER_EVENT_TYPES` → `publishUserEvent()` → `user_notifications`), endpoints [api/notifications/](api/notifications), preference matrix [api/_lib/notify-prefs.js](api/_lib/notify-prefs.js), bell client [src/notifications.js](src/notifications.js), avatar announcements [src/notification-herald.js](src/notification-herald.js), settings panel [src/dashboard-next/pages/settings.js](src/dashboard-next/pages/settings.js) | Live | In-app inbox covering remixes ([api/x402/remix-asset.js](api/x402/remix-asset.js)), DMs ([api/friends/messages.js](api/friends/messages.js)), coin bonding-curve graduations (pump cron in [api/cron/[name].js](api/cron/%5Bname%5D.js)), follows, sales, purchases, IRL, market, and account events. Preferences are a category × channel matrix (`in_app` always on; push/email/telegram/avatar are per-category opt-outs) edited from `/dashboard/settings`. **The `avatar` channel delivers in person:** for a fresh, unread notification in an opted-in category the corner companion walks on screen, gestures, and says the line with a link straight to it, summoning itself for that one message and retreating if it was off ([walk-sdk](walk-sdk) `control.announce`). Rules (15-minute freshness, once per browser, two per batch, visible tab only, device-level mute) live in [src/notification-herald.js](src/notification-herald.js). Docs: [docs/notifications.md](docs/notifications.md), [docs/social-layer.md](docs/social-layer.md). Tests: [tests/notification-herald.test.js](tests/notification-herald.test.js), [tests/notify-prefs.test.js](tests/notify-prefs.test.js) || Personal companion (`/companion`) | Page [pages/companion.html](pages/companion.html) `→ /companion` + [src/companion/](src/companion) (page, source cards, voice), API [api/companion/](api/companion) (settings, sources, contacts, events, `ingest`, `stream`, `poll`), engine [api/_lib/companion/](api/_lib/companion) (store, encrypted BYOK configs, triage, lanes for Telegram / iCal / IMAP), cron [api/cron/companion-poll.js](api/cron/companion-poll.js), migration [api/_lib/migrations/20260828140000_companion_harness.sql](api/_lib/migrations/20260828140000_companion_harness.sql) | Live | Turns a person's own inbox, chats, calendar and phone into deliveries a 3D character makes **in person**. BYOK per source (a Telegram bot the user made, a private iCal URL, IMAP with an app password) plus a universal bridge token anything can POST to. Every message is scored 0-100 by the shared deterministic rules ([@three-ws/companion/triage](packages/companion-sdk/src/triage-rules.js), the same module the CLI runs locally) and optionally refined by the user's own Anthropic key; above their threshold and outside quiet hours it is delivered through `companion_delivery` notifications, so the bell, Web Push, and the avatar channel all carry it. A contact's message is spoken by **that contact's avatar and voice** (`control.announce({ avatar })` in [walk-sdk](walk-sdk)). A delivery whose lane can carry an answer (Telegram, through the user's own bot) offers a reply box in place, and the reply is stored with the message. Live SSE at `/api/companion/stream` feeds the desktop app and any third-party body. Docs: [docs/companion.md](docs/companion.md). Tests: [tests/companion-triage.test.js](tests/companion-triage.test.js), [tests/companion-calendar.test.js](tests/companion-calendar.test.js), [packages/companion-sdk/tests/](packages/companion-sdk/tests) || three.ws Drive: the agent in the car (`/drive`) | Page [pages/drive.html](pages/drive.html) `→ /drive` + [src/drive/](src/drive) (page controller, surface presets, native bridge, local commands, motion gate); native CarPlay scene [ios/native/App/App/CarPlaySceneDelegate.swift](ios/native/App/App/CarPlaySceneDelegate.swift) + [DriveLink.swift](ios/native/App/App/DriveLink.swift); Android Auto car app [solana-mobile/android-overlay/app/src/main/java/ws/three/app/drive/](solana-mobile/android-overlay/app/src/main/java/ws/three/app/drive) | Live (web) / built and compiled (Android Auto) / built, entitlement pending (CarPlay) | The existing talk loop (`/api/asr` → `/api/chat` → `/api/tts` → lipsync on a real rigged avatar) rebuilt for a car panel: one glanceable two-line reply instead of a transcript, exactly four controls, night by default, and a keyboard that hides itself while the wheels turn. Speed comes from `navigator.geolocation`'s real ground speed, so moving above walking pace locks text entry back and a sustained stop is what unlocks it. Control phrases ("repeat that", "stop talking", "louder", "night mode") are answered locally with no round trip, matched against the whole utterance so "stop at the next charger" still reaches the agent. Hands free ends a turn from the real captured mic level on the Riva lane. **The car screen is never ours to draw on, on either platform:** Apple's voice-based conversational category (iOS 26.4) grants templates and an audio session and no drawing surface, and Android grants a canvas only to navigation apps and has no conversational category at all, so both car screens render the same four rows and this page runs beside them, joined by the versioned `threeWsDrive` channel (a WebKit message handler on iOS, a JavaScript interface on Android). Android Auto declares `androidx.car.app.category.IOT` because that is accurate: the home tools in `api/chat.js` reach a real house, so "turn the porch light on" from the car is the product. Its web view has no window and therefore no animation frames, so `?surface=androidauto` runs the loop as audio with the stage off, and refuses tap-to-approve for guarded actions because a person who cannot see what they are approving must not be asked. A guarded action while moving is refused on every surface and offered for when the car stops. Docs: [docs/carplay.md](docs/carplay.md), [ios/docs/CARPLAY.md](ios/docs/CARPLAY.md), [solana-mobile/docs/ANDROID-AUTO.md](solana-mobile/docs/ANDROID-AUTO.md). Tests: [tests/drive-surface.test.js](tests/drive-surface.test.js) |-| Hands-free voice for the house (`/voice/home`) | Loop [src/voice/home-voice.js](src/voice/home-voice.js), VAD [src/voice/vad.js](src/voice/vad.js), wake word [src/voice/wake-word.js](src/voice/wake-word.js) + catalog [src/voice/wake-words.js](src/voice/wake-words.js), panel [src/voice/home-voice-ui.js](src/voice/home-voice-ui.js) + [public/home-voice.css](public/home-voice.css); page [pages/voice-home.html](pages/voice-home.html) `→ /voice/home` + [src/voice-home.js](src/voice-home.js); models committed under [public/models/voice/wake-word/](public/models/voice/wake-word) with the silero + onnxruntime runtime staged by [scripts/copy-voice-models.mjs](scripts/copy-voice-models.mjs) | Live | The browser half of three.ws Home: mic → silero VAD → openWakeWord → `/api/asr` → `/api/chat` (home tools) → `/api/tts/speak` → lipsync, with one `getUserMedia` shared by all three consumers. Wake-word matching runs entirely in the tab on committed openWakeWord v0.5.1 weights served from three.ws, so nothing is uploaded until after the wake word; nothing about detection is even downloaded until the user opts in. Barge-in cuts playback ~110 ms after the user starts talking, and a playback-aware guard means the agent saying its own wake word (score 0.99) wakes it zero times. A pause is not an ending: a closed segment stays open 450 ms so "Hey Jarvis… turn the kitchen light off" is one command. Guarded actions are spoken in full, shown on screen by name and entity id, and satisfied only by the token `confirm` redeemed at `POST /api/home/:id/confirm`; a general "yeah" is refused by name and a screenless surface is refused outright. Twelve designed states, mute that ends the track rather than hiding a dot, and every leg timed live. Docs: [docs/home-voice.md](docs/home-voice.md). Proof: [scripts/check-home-voice.mjs](scripts/check-home-voice.mjs) (36 assertions in a real Chromium, plus `--live` against a real Home Assistant that proves the spoken command really turns the light off). Tests: [tests/home-voice.test.js](tests/home-voice.test.js) |+| Hands-free voice for the house (`/voice/home`) | Loop [src/voice/home-voice.js](src/voice/home-voice.js), VAD [src/voice/vad.js](src/voice/vad.js), wake word [src/voice/wake-word.js](src/voice/wake-word.js) + catalog [src/voice/wake-words.js](src/voice/wake-words.js), panel [src/voice/home-voice-ui.js](src/voice/home-voice-ui.js) + [public/home-voice.css](public/home-voice.css); page [pages/voice-home.html](pages/voice-home.html) `→ /voice/home` + [src/voice-home.js](src/voice-home.js); models committed under [public/models/voice/wake-word/](public/models/voice/wake-word) with the silero + onnxruntime runtime staged by [scripts/copy-voice-models.mjs](scripts/copy-voice-models.mjs) | Live | The browser half of three.ws Home: mic → silero VAD → openWakeWord → `/api/asr` → `/api/chat` (home tools) → `/api/tts/speak` → lipsync, with one `getUserMedia` shared by all three consumers. Wake-word matching runs entirely in the tab on committed openWakeWord v0.5.1 weights served from three.ws, so nothing is uploaded until after the wake word; nothing about detection is even downloaded until the user opts in. Barge-in cuts playback ~110 ms after the user starts talking, and a playback-aware guard means the agent saying its own wake word (score 0.99) wakes it zero times. A pause is not an ending: a closed segment stays open 450 ms so "Hey Jarvis… turn the kitchen light off" is one command. Guarded actions are spoken in full, shown on screen by name and entity id, and satisfied only by the token `confirm` redeemed at `POST /api/home/:id/confirm`; a general "yeah" is refused by name and a screenless surface is refused outright. Twelve designed states, mute that ends the track rather than hiding a dot, and every leg timed live. Docs: [docs/home-voice.md](docs/home-voice.md). Proof: [scripts/check-home-voice.mjs](scripts/check-home-voice.mjs) (34 assertions in a real Chromium). Tests: [tests/home-voice.test.js](tests/home-voice.test.js) || Knock: a priced door to a person (`/knock`) | Hub [pages/knock.html](pages/knock.html) `→ /knock` + [src/knock/page.js](src/knock/page.js), public door [pages/knock-door.html](pages/knock-door.html) `→ /knock/<handle>` + [src/knock/door.js](src/knock/door.js), API [api/knock/](api/knock) (door, directory, send, reply, settings, inbox, escrowed, escrow-sync), paid lane [api/x402/knock.js](api/x402/knock.js), escrowed lane [api/_lib/knock/escrow.js](api/_lib/knock/escrow.js) + browser client [src/knock/escrow-program.js](src/knock/escrow-program.js) / [src/knock/escrow-checkout.js](src/knock/escrow-checkout.js), engine [api/_lib/knock/](api/_lib/knock) (pure policy, store, delivery, receipt tokens), migration [api/_lib/migrations/20260828210000_knock_doors.sql](api/_lib/migrations/20260828210000_knock_doors.sql), SDK + CLI [packages/knock-sdk/](packages/knock-sdk) (`@three-ws/knock`), MCP [packages/knock-mcp/](packages/knock-mcp) (`@three-ws/knock-mcp`) | Live | Every account can publish a door at `/knock/<username>` and set what one message from a stranger costs. Paying it buys exactly one message through, and the delivery is **in person**: the knock becomes a `companion_events` row whose importance is derived from the amount paid, so the recipient's corner avatar walks on wherever they are and says who is at the door and what they paid. **The USDC settles straight to the recipient** (`payTo` on the 402 challenge is their own address, and a priced door cannot be opened without one), so there is no platform wallet in the path and no cut. Solana leads; Base is advertised only when the owner sets an address for it. **Every refusal happens before the 402** (shut door, daily cap, block list, length limits) and again before settlement, so a knock that was never going to land is never a knock somebody paid for. Only the subject line is spoken; an untrusted body never uses the recipient's avatar as a speaker. The sender gets a derived HMAC receipt URL and reads the reply through it with no account, which is why answering someone never hands out an address. Free doors take a plain POST on a tight per-IP bucket. A door can also take **escrowed** knocks (row below), which the door page offers beside paying up front and the owner runs from their own wallet in the settings panel; nothing on this server can move an escrowed payment. Spec: [specs/KNOCK_PROTOCOL.md](specs/KNOCK_PROTOCOL.md). Docs: [docs/knock.md](docs/knock.md). Tests: [tests/knock-policy.test.js](tests/knock-policy.test.js), [packages/knock-sdk/test/](packages/knock-sdk/test), [packages/knock-mcp/test/](packages/knock-mcp/test) || Visitor feedback loop | Recorder [@three-ws/witness](packages/witness), capture + panel [src/feedback-companion.js](src/feedback-companion.js) (mounted by [src/walk-companion.js](src/walk-companion.js)), intake [api/feedback/report.js](api/feedback/report.js), queue API [api/feedback/index.js](api/feedback/index.js), scoring [api/_lib/feedback/triage.js](api/_lib/feedback/triage.js), store [api/_lib/feedback/store.js](api/_lib/feedback/store.js), cron [api/cron/feedback-triage.js](api/cron/feedback-triage.js), review page [pages/feedback.html](pages/feedback.html) `→ /feedback` + [src/feedback-page.js](src/feedback-page.js) | Live | The return channel on the corner companion: the visitor tells the avatar what broke and the report carries the route, build SHA, viewport, and the last console errors and failed requests the browser captured, so a vague sentence lands as an actionable row. The companion offers proactively at the one moment worth asking (right after the page actually threw), once per route per session, never in a background tab. **Feedback is data, never an instruction:** the model that reads untrusted visitor text writes six scalars to that report's own row and has no path to the repo, a deploy, or any other write; the admin-only `/feedback` queue groups reports into one row per problem and a person decides. **A report arrives as a runnable failing test:** the recorded session compiles into a Playwright spec asserting the failure is GONE (red until fixed, green after), reachable from the queue's Copy test button, `GET /api/feedback/repro`, `npm run feedback:repro`, and the `get_feedback_repro` MCP tool. Docs: [docs/feedback.md](docs/feedback.md), [docs/witness.md](docs/witness.md). Tests: [tests/feedback-triage.test.js](tests/feedback-triage.test.js) || Session-to-test recorder | [packages/witness/](packages/witness) `→ @three-ws/witness`: recorder [recorder.js](packages/witness/src/recorder.js), selector synthesis [selector.js](packages/witness/src/selector.js), capture-time privacy [redact.js](packages/witness/src/redact.js), spec compiler [compile.js](packages/witness/src/compile.js); compiled repros land in [tests/repros/](tests/repros) with [their own Playwright config](tests/repros/playwright.config.mjs) | Published as `@three-ws/witness` (Apache-2.0, zero deps) | Turns a real user session into a runnable failing test. Records INTENT (about 2 KB) rather than DOM mutations (megabytes), so it can be always-on, which is the point: the trace already exists when somebody decides to complain. Every element gets the strongest handle that is unique in the live document (test id > id > aria-label > role+name > text > name > placeholder > class > structural path), framework-generated ids and utility classes refused, and each trace carries a replay confidence equal to its WEAKEST link. The compiled spec asserts the failure is gone, never that it happened, so it locks in the fix rather than the bug; a session with no machine-visible failure emits `test.fail()` and says which assertion a human must add rather than faking green. Privacy is enforced at capture: typed values are never held (only a length and a shape), password/hidden/email/tel/date inputs and `data-witness="off"` subtrees record nothing, URLs lose their credentials before storage. Docs: [docs/witness.md](docs/witness.md). Tests: [packages/witness/test/](packages/witness/test) (36, `npm run test:witness`) |@@ -166,7 +166,7 @@ bottom.| Sign Mirror (camera-graded handshape practice) | [pages/sign-mirror.html](pages/sign-mirror.html) `→ /sign-mirror` + [src/sign-mirror-page.js](src/sign-mirror-page.js), grader [src/sign-grader.js](src/sign-grader.js), reference hand [src/sign-hand-model.js](src/sign-hand-model.js) | Live | The practice half of the signing loop: the avatar forms the target letter, MediaPipe's hand landmarker watches the learner's hand in-tab, and the grader scores the handshape live, finger by finger, naming the finger that is off. Avatar pose, target diagram, and grading all read the same handshape spec ([src/sign-handshapes.js](src/sign-handshapes.js)) so taught and graded can never drift. The whole practice loop is on-device: no frame, landmark, or score is ever uploaded. Course rail orders the alphabet easiest-first with localStorage progress; shared sign prefs (hand, avatar) carry over from `/sign-language` and `/asl-alphabet`. Tests: [tests/sign-grader.test.js](tests/sign-grader.test.js) || ASL recognition (webcam signing → text) | worker [workers/model-asl-recognition/](workers/model-asl-recognition), API [api/asl-recognition.js](api/asl-recognition.js) (`GCP_ASL_RECOGNITION_URL`) | Live | The reverse direction of [sign speech](docs/sign-language.md): the browser extracts MediaPipe landmarks from the webcam (video never leaves the device) and the worker transcribes continuous ASL fingerspelling to text on CPU via LiteRT, with a decode-confidence score and an LLM cleanup pass on the API. Model: Kaggle 2023 ASLFR 1st-place (Apache-2.0 code + weights, FSboard CC BY 4.0 corpus, the license-clean chain most ASL models lack). Cloud Run gen2 + `patchelf --clear-execstack` on the LiteRT .so. Next: word-level signs (PopSign retrain). Tests: [test_decode.py](workers/model-asl-recognition/test_decode.py) (schema + decode, no weights) and [test_model_smoke.py](workers/model-asl-recognition/test_model_smoke.py) (real weights end to end, run inside the built image). || Smart home: the connect flow and household management | Page [pages/smart-home.html](pages/smart-home.html) `-> /smart-home` + controller [src/home/connect.js](src/home/connect.js), manage view [src/home/manage.js](src/home/manage.js), styles [src/home/home.css](src/home/home.css). Consumes [api/home/index.js](api/home/index.js) (`GET`/`POST /api/home`), [api/home/[id].js](api/home/[id].js), `/api/home/:id/grants` and `/api/home/:id/log`. Reachability rules shared with the server through the [@three-ws/home-bridge](packages/home-bridge) `./url` subpath export | Live | The front door of the Home lane: how a stranger gets from "I have a Home Assistant somewhere" to "my agent is connected", and every way that goes wrong. Twelve designed states rather than a happy path plus an error toast: signed out, empty, inline validation, the private-host refusal, verifying, connected, a rejected token, unreachable, degraded, disconnected, many homes, and the plan ceiling. Two rules hold the surface together. **The token goes to the server once and never comes back**: the field is `type=password` with a reveal toggle, it is never written to storage, never put in a URL, never logged and never echoed by the API, and it is gone from the DOM the moment a connect succeeds. **Reachability is decided in the browser, before the network**: a `192.168.x.x` or `.local` address is refused with zero network calls using the same `normalizeBaseUrl`/`isPrivateHost` the server validates with, so the two can never disagree and nobody waits out a timeout to be told something we knew at the first keystroke. Every string that came from a house (a label, an entity id, an area name) is rendered as `textContent`, because those are attacker-influenceable and there is a physical actuator on the other end. Docs: [docs/smart-home.md](docs/smart-home.md). Tests: [tests/e2e/home-connect.spec.js](tests/e2e/home-connect.spec.js) |-| Smart home: plans, entitlements and quotas (`/smart-home/plan`) | Page [pages/smart-home-plan.html](pages/smart-home-plan.html) `-> /smart-home/plan` + controller [src/home/plan.js](src/home/plan.js), styles [src/home/plan.css](src/home/plan.css). Resolver [api/_lib/home/entitlements.js](api/_lib/home/entitlements.js), counters [api/_lib/home/usage.js](api/_lib/home/usage.js), endpoint [api/home/plan.js](api/home/plan.js). Enforced at [api/home/index.js](api/home/index.js) (acquisition), [api/home/[id]/stream.js](api/home/[id]/stream.js) (streams), [api/home/[id]/members.js](api/home/[id]/members.js) (seats), [api/home/[id]/call.js](api/home/[id]/call.js) (paused homes), [api/_lib/home/privacy.js](api/_lib/home/privacy.js) (retention ceiling), [api/_lib/home/turn-gate.js](api/_lib/home/turn-gate.js) called from [api/chat.js](api/chat.js) (agent turns). Cost measurement [scripts/measure-home-entitlement-cost.mjs](scripts/measure-home-entitlement-cost.mjs). Migration `api/_lib/migrations/20260903160000_home_plan_overrides.sql` | Live | What a plan covers for connected houses, and the two things no plan may ever refuse. **A limit never blocks a safety action:** over quota, downgraded or paused, locking a door, closing a garage or valve and arming an alarm always execute, checked before any counter is read and classified from the domain and service alone so the exemption never depends on a healthy socket. **Nothing about the gate is sold:** confirmations, the action log's integrity and every role safety property are on every tier and there is deliberately no dimension for any of them. Seven metered dimensions (homes, seats, streams, voice minutes, agent turns, log retention, relay connections), each carrying the measured cost that justifies it. **No fourth entitlement system:** limits resolve from `account-tier.js` badges merged by MAX (so holding $THREE never costs a Pro their Pro limits) and are scaled by the `three-tier.js` holder multiplier, never by thresholds of our own. **One counter:** an agent turn is the same priced `usage_events` chat row an invoice reads, tagged with `home_id`, not a second tally that could disagree. That row is also what the turn gate reads: over quota the agent refuses a home action, but read-only tools stay open (the model has to see which door is open before it can lock it) and safety actions are never reached by the gate at all. The gate **fails open**, so a billing read that hiccups serves the user rather than locking them out of their own house. **A downgrade pauses, it never disconnects:** excess homes get `deactivated_at` with a written reason, the credential and the action log survive, `revoked_at` stays null, and the user swaps which houses are live. Enterprise limits are a `home_plan_overrides` row with the reason on it, not a tier. Every number is env-overridable (`HOME_LIMIT_<TIER>_<DIMENSION>`), so applying an owner-approved price is a config change. Docs: [docs/home-plans.md](docs/home-plans.md). Tests: [tests/home-entitlements.test.js](tests/home-entitlements.test.js), [tests/home-turn-gate.test.js](tests/home-turn-gate.test.js), [tests/e2e/home-plan.spec.js](tests/e2e/home-plan.spec.js) |+| Smart home: plans, entitlements and quotas (`/smart-home/plan`) | Page [pages/smart-home-plan.html](pages/smart-home-plan.html) `-> /smart-home/plan` + controller [src/home/plan.js](src/home/plan.js), styles [src/home/plan.css](src/home/plan.css). Resolver [api/_lib/home/entitlements.js](api/_lib/home/entitlements.js), counters [api/_lib/home/usage.js](api/_lib/home/usage.js), endpoint [api/home/plan.js](api/home/plan.js). Enforced at [api/home/index.js](api/home/index.js) (acquisition), [api/home/[id]/stream.js](api/home/[id]/stream.js) (streams), [api/home/[id]/members.js](api/home/[id]/members.js) (seats), [api/home/[id]/call.js](api/home/[id]/call.js) (paused homes), [api/_lib/home/privacy.js](api/_lib/home/privacy.js) (retention ceiling). Cost measurement [scripts/measure-home-entitlement-cost.mjs](scripts/measure-home-entitlement-cost.mjs). Migration `api/_lib/migrations/20260903160000_home_plan_overrides.sql` | Live | What a plan covers for connected houses, and the two things no plan may ever refuse. **A limit never blocks a safety action:** over quota, downgraded or paused, locking a door, closing a garage or valve and arming an alarm always execute, checked before any counter is read and classified from the domain and service alone so the exemption never depends on a healthy socket. **Nothing about the gate is sold:** confirmations, the action log's integrity and every role safety property are on every tier and there is deliberately no dimension for any of them. Seven metered dimensions (homes, seats, streams, voice minutes, agent turns, log retention, relay connections), each carrying the measured cost that justifies it. **No fourth entitlement system:** limits resolve from `account-tier.js` badges merged by MAX (so holding $THREE never costs a Pro their Pro limits) and are scaled by the `three-tier.js` holder multiplier, never by thresholds of our own. **One counter:** an agent turn is the same priced `usage_events` chat row an invoice reads, tagged with `home_id`, not a second tally that could disagree. **A downgrade pauses, it never disconnects:** excess homes get `deactivated_at` with a written reason, the credential and the action log survive, `revoked_at` stays null, and the user swaps which houses are live. Enterprise limits are a `home_plan_overrides` row with the reason on it, not a tier. Every number is env-overridable (`HOME_LIMIT_<TIER>_<DIMENSION>`), so applying an owner-approved price is a config change. Docs: [docs/home-plans.md](docs/home-plans.md). Tests: [tests/home-entitlements.test.js](tests/home-entitlements.test.js) || Smart home: the live 3D home (`/smart-home/:id`) | Page [pages/home-scene.html](pages/home-scene.html) `-> /smart-home/:id` and `-> /home/:id`, styles [public/home-scene.css](public/home-scene.css). Pure layout [src/home/scene-model.js](src/home/scene-model.js), WebGL renderer [src/home/scene-render.js](src/home/scene-render.js), the 2D house [src/home/scene-fallback.js](src/home/scene-fallback.js), page controller [src/home/scene.js](src/home/scene.js), the top-down floorplan editor the scene follows [src/home/floorplan.js](src/home/floorplan.js) with its validation and storage [api/_lib/home/layout.js](api/_lib/home/layout.js) behind `GET`/`PUT`/`DELETE /api/home/:id/layout` [api/home/[id]/layout.js](api/home/%5Bid%5D/layout.js), browser half of the API contract [src/home/api.js](src/home/api.js). Consumes `GET /api/home/:id`, the SSE stream [api/home/[id]/stream.js](api/home/%5Bid%5D/stream.js), [api/home/[id]/call.js](api/home/%5Bid%5D/call.js) and `/api/home/:id/grants` | Live | A live 3D model of the user's house, driven entirely by their own Home Assistant, with the agent's body standing in it. **Home Assistant stores no geometry**, so everything spatial is derived from its four flat registries by a PURE module with no Three.js in it: floors stack by level, rooms pack per floor in name order, and a saved floorplan overrides the packing through one `layout` option. That split is why the layout of a real recorded house is asserted in a unit test without a GPU. **A room is lit the way the room is lit**: colour and intensity from the lights that are actually on, genuinely dark when they are all off, and the outline around its footprint goes amber the moment anything in it is unlocked or open. **A room with sixty entities is not sixty objects**: objects are ranked (lights, locks, covers, climate, alarms, media, fans, cameras, the rest), capped per surface, and the remainder summarized; numeric sensors become readouts, never objects. A device Home Assistant cannot reach is drawn as a ghost with a marker, never omitted. **The house never empties**: a dropped connection greys the scene, keeps every room, and says how old it is. Stale (the platform is retrying) and disconnected (nobody is) are different pills, and only the second offers a button. **The 2D view is not a consolation prize**: same model, real rows and real buttons, reads and operates the whole house, and it is where a browser with no WebGL or a device measured below 18 fps is routed automatically, with the page saying so. A guarded action answers 409 and the question is rendered on the object it would move, with an optional standing allowance for that one entity. Measured: 86 ms median from a real Home Assistant service call to the SSE frame, 10 to 23 ms from that frame to the painted one, 0.1 to 0.3 ms of per-frame work, 108 draw calls, and a flat heap across ten minutes of live updates. Docs: [docs/home-scene.md](docs/home-scene.md). Tests: [tests/home-scene-model.test.js](tests/home-scene-model.test.js), [tests/e2e/home-scene.spec.js](tests/e2e/home-scene.spec.js) || three.ws Home privacy, retention, export and deletion | Inventory + purge + export + deletion [api/_lib/home/privacy.js](api/_lib/home/privacy.js), disclosure copy [api/_lib/home/disclosure.js](api/_lib/home/disclosure.js), endpoint [api/home/privacy.js](api/home/privacy.js) `-> /api/home/privacy`, schema [api/_lib/migrations/20260903180000_home_privacy_retention.sql](api/_lib/migrations/20260903180000_home_privacy_retention.sql), purge section E of [api/cron/db-retention.js](api/cron/db-retention.js) | Live | The single place that knows everything the Home lane stores. `INVENTORY` is not documentation of the code, it IS the code: the endpoint renders it, the export walks it, and [tests/home-privacy.test.js](tests/home-privacy.test.js) re-derives the set of `home_*` tables from the migration files and fails the build if one of them has no row, which is what stops an undocumented data class from ever landing. The load-bearing promise is that entity names and states are never persisted (the room graph lives in the bridge runtime's memory and dies with the instance); a second test fails any migration that creates a table shaped like a state history. The action log's window is per home and the owner's, 90 days by default, adjustable down to a day and up to ten years with a written reason the schema also enforces, applied immediately on change and swept by the platform's existing retention cron rather than a cron of its own. Deletion goes further than the cascades: memberships and grants on other people's homes, the departed user's id inside another household's action log, invitations addressed to their email, and the lane's rows in the 365-day `audit_log`. Docs: [docs/home-privacy.md](docs/home-privacy.md). Tests: [tests/home-privacy.test.js](tests/home-privacy.test.js) || Avatar thumbnail coverage | [api/_lib/avatar-thumbs.js](api/_lib/avatar-thumbs.js) + crons [api/cron/avatar-thumbnail-backfill.js](api/cron/avatar-thumbnail-backfill.js) (absent thumbnails, `*/5`) and [api/cron/avatar-thumbnail-render.js](api/cron/avatar-thumbnail-render.js) (stale marketplace thumbnails, `*/10`) | Live | The single owner of `avatars.thumbnail_key`. Enforces the invariant that a thumbnail key is persisted **only after** its R2 object is confirmed to exist — a key pointing at a missing object makes R2 return 404 `text/plain`, which Chrome blocks as `ERR_BLOCKED_BY_ORB` inside an `<img>`. Fills coverage cheapest-first: zero-copy adoption of `forge_creations.preview_key`, then a headless-chromium GLB→PNG render to `thumb/<avatarId>.png` ([api/_lib/render-glb.js](api/_lib/render-glb.js)). Bounded retries via the `avatar_thumbnail_backfill` claim ledger ([migration](api/_lib/migrations/20260709120000_avatar_thumbnail_backfill.sql)), with `isBrowserInfrastructureError()` separating an OOM-killed browser from a genuinely broken model so a crash never retires healthy avatars. Bulk runner: [scripts/backfill-avatar-thumbnails.mjs](scripts/backfill-avatar-thumbnails.mjs) (`--status`, `--adopt-only`, `--loop`, `--reset-infra`). Docs: [docs/avatar-thumbnails.md](docs/avatar-thumbnails.md). Tests: [tests/avatar-thumbs.test.js](tests/avatar-thumbs.test.js), [tests/home-thumbnail-orb.test.js](tests/home-thumbnail-orb.test.js) |@@ -240,7 +240,6 @@ bottom.| Oracle conviction model (three heads, learned on a clock) | Fitter [api/_lib/oracle/fit.js](api/_lib/oracle/fit.js), scorer [api/_lib/oracle/conviction.js](api/_lib/oracle/conviction.js), DB-backed weights [api/_lib/oracle/model-store.js](api/_lib/oracle/model-store.js), learning loop [api/cron/oracle-refit.js](api/cron/oracle-refit.js) (every 6h), CLI [scripts/oracle-fit.mjs](scripts/oracle-fit.mjs) | Live, v3 | v2 ranked "spikes 3x or graduates", so a coin that ran 3x and went to zero counted as a hit: Prime-tier coins hit that target 58.2% of the time and rugged 53.0% of the time. v3 fits three heads over one design matrix (`win` = ran and the holder kept it, `rug` = holder down more than half, `moon` = ran at all) and anchors the public score on `win`, publishing `giveBackRisk = 1 - P(win)/P(moon)` beside it: given it runs, how often a coin like this hands the run straight back. Weights moved out of the container image into `oracle_model_versions`, so the refit cron can promote a better model between deploys; it was frozen at its 2026-08-09 fit for nineteen days because nothing but a human could refit it. Every candidate faces a promotion gate (complete fit, absolute AUC floor, every tier band still earning its claim, no feature-set collapse, a material gain over the incumbent, no regression on the other heads) and is stored either way with the reason. Thin buckets are shrunk toward zero by `n/(n+200)` so 34 samples cannot reverse a verdict. Docs: [docs/oracle-model.md](docs/oracle-model.md) || Price-independent outcome labels | [workers/agent-sniper/intel/learn.js](workers/agent-sniper/intel/learn.js) `deriveOutcome`, migrations [20260828170000](api/_lib/migrations/20260828170000_oracle_price_independent_labels.sql) + [20260828190000](api/_lib/migrations/20260828190000_oracle_recompute_rug_flag.sql) | Live | The rug flag was a readout of the SOL price. It was decided by "market cap under $3,000", and an empty pump.fun bonding curve is worth a fixed `30 * 1e9 / 1073000191 = 27.958993 SOL`, so the test amounted to asking whether SOL was above about $107.30 that day: of 206,428 coins labeled rugged, 206,419 were under $3,000; of 25,180 labeled survivors, the cheapest was exactly $3,000. Same dead curves, sorted by a price feed. Labels now use `retained = last_mc/ath_mc` and `hold_multiple = ath_multiple * retained`, both taken from the same reading so the price cancels; the real rug rate is 11.4%, not 91%, and it holds within two points from 60 minutes to three days. `label_version` marks which rule judged a row and the fitter trains on version 2 only. The training-set upsert also stopped being `do nothing`, which had made a written label permanently uncorrectable. || Coin Intelligence (the read the sniper trades on) | [pages/coin-intel.html](pages/coin-intel.html) `→ /coin-intel` (self-contained page: markup, styles and module script in one file), read API [api/pump/intel.js](api/pump/intel.js) `→ /api/pump/intel`, serverless firehose [api/cron/coin-intel-observe.js](api/cron/coin-intel-observe.js), shared finalize path [workers/agent-sniper/intel/finalize.js](workers/agent-sniper/intel/finalize.js) | Live | The public dashboard over the Coin Intelligence engine: every pump.fun launch observed for its first ~90 seconds, classified, scored 0..100, and labeled by outcome after the fact. Four views off one endpoint (`view=feed` live radar with category/verdict/quality/search filters, `view=leaderboard` best of 24h plus confirmed graduated/pumped winners, `view=traders` cross-coin wallet reputation with real win-rates, `view=learning` the per-signal weights the model learned). A coin's card opens a drawer with its launch signals, trade footprint, risk flags, a funder-cluster bubble map, the classified order book, and Oracle conviction fetched in parallel from [api/oracle/coin.js](api/oracle/coin.js). Reads `pump_coin_intel` / `pump_coin_wallets` / `pump_coin_outcomes` / `pump_intel_weights`, all written by the engine; the endpoint never writes and degrades to a designed "engine warming up" state (200 with `degraded:true`) when those tables are absent. `traders` and `learning` are whole-history aggregates and are edge-cached for minutes; the radar stays on a 5s cache and auto-refreshes every 15s. Watchlist stars share the `ld_watchlist` key with `/oracle`, `/launches` and `/watchlist`. |-| Fade Radar (the inverse of smart money) | page [pages/fade.html](pages/fade.html) `→ /fade`, client [src/fade-radar.js](src/fade-radar.js), read layer [api/_lib/fade-radar.js](api/_lib/fade-radar.js), API [api/pump/fade.js](api/pump/fade.js) `→ /api/pump/fade`, tests [tests/fade-radar.test.js](tests/fade-radar.test.js) | Live | The question the Smart Money Radar cannot ask: how much of a coin's buy side has never once been right. A reverse indicator is a wallet the graph has watched buy 5+ coins whose outcome is known with zero winners among them, read live from the same `smart_wallet_reputation` graph the firewall and the sniper scorer use, so the fade side needs no job of its own. Three boards off one endpoint (live coins ranked by fade score, the reverse-indicator wallets themselves, and the calibration), plus a per-mint read agents can gate on. The verdict bands carry a measured, out-of-sample number rather than a claim: the cohort is rebuilt from coins labelled in the earlier half of the history and graded on the later half, where `avoid` coins won 1.8% against a 22.1% baseline over 26,626 labelled coins, recomputed at most every 12 hours into `app_settings`. Never a short and never a trade: on a bonding curve the only tradeable fade is not buying. Docs: [docs/fade-radar.md](docs/fade-radar.md) || Recording Pipeline (is the data loop actually running?) | [pages/pipeline.html](pages/pipeline.html) `→ /pipeline` (self-contained page: markup, styles and module script in one file), one-call status API [api/pipeline.js](api/pipeline.js) `→ /api/pipeline`, shared derivation [api/_lib/pipeline-summary.js](api/_lib/pipeline-summary.js) | Live | One board for the whole closed loop that turns a pump.fun launch into a trade signal: the always-on recorder ([workers/agent-sniper](workers/agent-sniper)), signal intel, ground-truth outcomes, Oracle conviction, the wallet reputation graph, trained per-signal weights, and the agents trading on the result. Seven stage cards, each linking into the surface that owns it, over one endpoint that queries every stage independently so a cold worker or a table that does not exist yet reports an honest zero rather than failing the whole response. The recorder is network-scoped: `bot_heartbeat` is keyed by worker alone, so asking about devnet while the worker records mainnet answers `offline` with a reason instead of lending one network's liveness to the other. The board polls every 8s and patches its cards in place, so a card the user tabbed to keeps focus and only the one-line health summary is announced. `next_action` is the same machine-readable recommendation the page renders as its call to action, so an agent reading the JSON and a person reading the page get one answer. Docs: [docs/api-reference.md](docs/api-reference.md) (Recording Pipeline API). Tests: [tests/pipeline-summary.test.js](tests/pipeline-summary.test.js) || Agent voice cloning (your voice, on your agent) | Capture + BYOK panel [src/voice/voice-setup.js](src/voice/voice-setup.js) (`VoiceSetup`), mounted as step 5 of the create wizard ([src/create-agent.js](src/create-agent.js) `→ /create-agent`), in the agent editor, and in the talk-mode shell [src/voice/voice-clone-modal.js](src/voice/voice-clone-modal.js); server [api/agents/_id/voice.js](api/agents/_id/voice.js) `→ GET/PUT/DELETE /api/agents/:id/voice` + `POST /api/agents/:id/voice/clone`; credential resolver [api/_lib/agent-voice-key.js](api/_lib/agent-voice-key.js); playback config mapper `agentVoiceConfig` in [src/runtime/speech.js](src/runtime/speech.js), consumed by the hosted embed [pages/agent-embed.html](pages/agent-embed.html) `→ /agent/:id/embed` and the SDK runtime [src/runtime/index.js](src/runtime/index.js) | In-repo · BYOK live, platform lane awaits a key | Record or upload 30+ seconds and the agent speaks in that voice everywhere on three.ws. Three credential lanes, and they are not interchangeable: a clone only exists inside the ElevenLabs account that made it, so the winning lane is recorded on `agent_identities.voice_key_source` and replayed on every synthesis. **BYOK is the activation path today** (no platform `ELEVENLABS_API_KEY` is set on the service), and the panel renders inline key entry rather than a dead "not configured" message; setting that one variable lights up the platform lane, metered to $THREE credits. `/api/tts/eleven` only spends an owner's key when the request names the agent, which is what lets a bound voice speak to signed-out visitors inside a cross-origin embed. Docs: [docs/tutorials/voice-and-lipsync.md](docs/tutorials/voice-and-lipsync.md), [src/voice/README.md](src/voice/README.md). Tests: [tests/api/agents-voice.test.js](tests/api/agents-voice.test.js), [tests/runtime/agent-voice-config.test.js](tests/runtime/agent-voice-config.test.js) || Trading Copilot (conversational) | client [src/agent-copilot.js](src/agent-copilot.js), hub tab [src/agent-wallet-hub/tabs/copilot.js](src/agent-wallet-hub/tabs/copilot.js), server [api/agents/copilot.js](api/agents/copilot.js) `→ POST /api/agents/:id/copilot` (SSE) | In-repo | Owner-only chat over an agent's Solana wallet: text/voice in, markdown replies, live **data cards** (portfolio, firewall, quote, smart-money, intel) and **confirm-before-execute** trade/limits cards. Read-only tools run server-side; state-changing intents return as proposals the browser re-quotes and runs through the existing spend guards + firewall + custody audit. Slash commands, copy/regenerate, localStorage persistence. See [docs/trading-copilot.md](docs/trading-copilot.md) |@@ -471,7 +470,7 @@ array. Runbook: [docs/contributing.md](docs/contributing.md#publishing-packages-- **On-chain identity & contracts** — [contracts/](contracts), [packages/avatar-schema/](packages/avatar-schema)- **API endpoints** — [api/](api) (serverless-style handlers, served in production by the [server/](server) Cloud Run container), [workers/](workers) (long-running workers)- **Examples & demos** — [examples/](examples), [multiplayer/](multiplayer)-- **Announcement pipeline**: [docs/announcements/](docs/announcements/README.md) (one pack per feature: the claim and its evidence, the postable text, the media by shot id, the Telegram variant), [data/announcements.json](data/announcements.json) (the ledger: every shipped surface, whether it was ever announced, its score and its stage), [data/announce-media.json](data/announce-media.json) (media recipes captured from the live product into `public/announce/`), [docs/announce-voice.md](docs/announce-voice.md) (the voice contract, derived from the engagement archive). `npm run announce:rank` ranks the backlog, `npm run announce:media` captures the frames, `npm run check:announce` gates a pack. Nothing here posts: publishing stays owner-gated.+- **Announcement pipeline**: [docs/announcements/](docs/announcements/README.md) (one pack per feature: the claim and its evidence, the postable text, the media by shot id, the Telegram variant), `data/announcements.json` (the ledger `npm run announce:rank` writes: every shipped surface, whether it was ever announced, its score and its stage; generated, so it is gitignored rather than committed), [data/announce-media.json](data/announce-media.json) (media recipes captured from the live product into `public/announce/`), [docs/announce-voice.md](docs/announce-voice.md) (the voice contract, derived from the engagement archive). `npm run announce:rank` ranks the backlog, `npm run announce:media` captures the frames, `npm run check:announce` gates a pack. Nothing here posts: publishing stays owner-gated.- **Marketing assets**: [marketing/](marketing/README.md) (produced promo videos + re-render scripts, e.g. [marketing/imessage-video/](marketing/imessage-video); source-of-truth assets, not shipped to production). The narrated product demo lives in [marketing/product-demo/](marketing/product-demo/README.md): [scripts/make-product-demo.mjs](scripts/make-product-demo.mjs) (`npm run demo:video`) films a presenter walking every feature page on the live site, chaptered, with narration from the platform's own TTS lane. Its route is the Feature Tour curriculum, so a new page is in the next recording without editing a script. Docs: [docs/product-demo.md](docs/product-demo.md)- **Platform agents (server-side)**: [agents/](agents/README.md) (endpoint-shopper, fact-checker, tutor, unstoppable, x402-buildout: library modules imported by `api/` handlers, each with its own README)- **Site data files**: [data/](data/README.md) (pages.json, changelog.json, skills seed, RSS items: what each file drives and which script regenerates it)diff --git a/docs/announce-voice.md b/docs/announce-voice.mdindex d58c3c5f0..7126ed886 100644--- a/docs/announce-voice.md+++ b/docs/announce-voice.md@@ -142,7 +142,7 @@ pack carries:- **The Telegram variant.** The community channel takes plain text and a different register: moredetail, no character ceiling worth worrying about, no tagging.- **The changelog entry**, ready to paste into `data/changelog.json`.-- **Its state**, mirrored in [`data/announcements.json`](../data/announcements.json).+- **Its state**, mirrored in `data/announcements.json` (generated by `npm run announce:rank`, so it is gitignored; run that first if you do not have it).## What this file does not decidediff --git a/docs/announcements/README.md b/docs/announcements/README.mdindex 6d55eda4d..443f7ee76 100644--- a/docs/announcements/README.md+++ b/docs/announcements/README.md@@ -18,7 +18,8 @@ npm run check:announce # gate the pack before anyone reads it1. **Rank.** [`scripts/announce-rank.mjs`](../../scripts/announce-rank.mjs) re-derives theinventory from `data/pages.json`, `packages/`, `workers/` and `services/`, reads the announcedstatus out of the coverage audit, probes each route, scores what is left, and writes- [`data/announcements.json`](../../data/announcements.json). The score's weights come from the+ `data/announcements.json`. That ledger is generated, not committed, so this is the+ command that creates it. The score's weights come from theengagement archive, not from taste; the sources are named in[announce-voice.md](../announce-voice.md).2. **Capture.** Add a shot to [`data/announce-media.json`](../../data/announce-media.json) and rundiff --git a/tasks/home/envelope-2026-09-09.json b/tasks/home/envelope-2026-09-09.jsonnew file mode 100644index 000000000..7a8199711--- /dev/null+++ b/tasks/home/envelope-2026-09-09.json@@ -0,0 +1,474 @@+{+ "measuredAt": "2026-09-09T05:37:08.907Z",+ "machine": {+ "node": "v24.14.0",+ "platform": "linux 6.8.0-1052-azure",+ "cpus": 16,+ "cpuModel": "AMD EPYC 7763 64-Core Processor",+ "totalMemBytes": 67427401728,+ "freeMemBytes": 34041778176,+ "ulimitNofile": 524288,+ "loadAverage": [+ 55.71,+ 35.47,+ 18.79+ ]+ },+ "fleet": {+ "image": "ghcr.io/home-assistant/home-assistant:stable",+ "houses": 12,+ "small": 11,+ "large": 1,+ "entitiesPerSmallHouse": 118,+ "entitiesPerLargeHouse": 624,+ "haBootMs": {+ "n": 12,+ "min": 11077,+ "p50": 12076,+ "p95": 12127,+ "p99": 12127,+ "max": 12127,+ "mean": 11923.67+ },+ "realNote": "Every house is a real Home Assistant container with a real long-lived access token, started by scripts/home-fleet.mjs. Connections are real WebSocket sessions through home-assistant-js-websocket, the same client the product uses."+ },+ "coldStart": {+ "bootToModulesReadyMs": 305,+ "connectMs": 59.2,+ "totalToFirstConnectedHomeMs": 364.2,+ "entities": 123,+ "rooms": 7,+ "note": "Measured in a freshly spawned node process. bootToModulesReadyMs covers node start plus this harness module graph; the API container loads more than this and its own cold start is measured separately in docs/ops/home-operations.md."+ },+ "connections": [+ {+ "requested": 10,+ "connected": 10,+ "loadAverage": [+ 53.51,+ 36.21,+ 19.39+ ],+ "failures": [],+ "house": "small",+ "entitiesHeld": 1230,+ "entitiesPerConnection": 123,+ "roomsHeld": 70,+ "openMs": 503.6,+ "openMsPerConnection": 50.36,+ "heapUsedDelta": 4130968,+ "heapPerConnection": 413097,+ "rssDelta": 25903104,+ "rssPerConnection": 2590310,+ "externalDelta": 365638,+ "fdBefore": 22,+ "fdAfter": 32,+ "fdPerConnection": 1,+ "openCpuMs": 292.1,+ "idleCpuMsPer10s": 7.6,+ "idleCpuMsPerConnectionPerMinute": 4.534,+ "actionLatencyMs": {+ "n": 40,+ "min": 1.72,+ "p50": 3.91,+ "p95": 6.51,+ "p99": 10.7,+ "max": 10.7,+ "mean": 4.08+ },+ "heapAfterCloseDelta": 1640648,+ "heapRetainedPerConnection": 164065,+ "fdAfterClose": 22+ },+ {+ "requested": 50,+ "connected": 50,+ "loadAverage": [+ 54.29,+ 37.46,+ 20.16+ ],+ "failures": [],+ "house": "small",+ "entitiesHeld": 6150,+ "entitiesPerConnection": 123,+ "roomsHeld": 350,+ "openMs": 789.3,+ "openMsPerConnection": 15.79,+ "heapUsedDelta": 14271400,+ "heapPerConnection": 285428,+ "rssDelta": 56733696,+ "rssPerConnection": 1134674,+ "externalDelta": 1021318,+ "fdBefore": 22,+ "fdAfter": 72,+ "fdPerConnection": 1,+ "openCpuMs": 660.8,+ "idleCpuMsPer10s": 44.3,+ "idleCpuMsPerConnectionPerMinute": 5.311,+ "actionLatencyMs": {+ "n": 40,+ "min": 1.67,+ "p50": 4.86,+ "p95": 9.87,+ "p99": 10.62,+ "max": 10.62,+ "mean": 5.53+ },+ "heapAfterCloseDelta": 1852200,+ "heapRetainedPerConnection": 37044,+ "fdAfterClose": 22+ },+ {+ "requested": 100,+ "connected": 100,+ "loadAverage": [+ 60.53,+ 39.92,+ 21.34+ ],+ "failures": [],+ "house": "small",+ "entitiesHeld": 12300,+ "entitiesPerConnection": 123,+ "roomsHeld": 700,+ "openMs": 1122.7,+ "openMsPerConnection": 11.23,+ "heapUsedDelta": 26496312,+ "heapPerConnection": 264963,+ "rssDelta": 83968000,+ "rssPerConnection": 839680,+ "externalDelta": 1840918,+ "fdBefore": 22,+ "fdAfter": 122,+ "fdPerConnection": 1,+ "openCpuMs": 1000.4,+ "idleCpuMsPer10s": 42.6,+ "idleCpuMsPerConnectionPerMinute": 2.554,+ "actionLatencyMs": {+ "n": 40,+ "min": 2.2,+ "p50": 4.56,+ "p95": 10.42,+ "p99": 13.85,+ "max": 13.85,+ "mean": 5.16+ },+ "heapAfterCloseDelta": 1905936,+ "heapRetainedPerConnection": 19059,+ "fdAfterClose": 22+ },+ {+ "requested": 200,+ "connected": 200,+ "loadAverage": [+ 57.78,+ 40.98,+ 22.18+ ],+ "failures": [],+ "house": "small",+ "entitiesHeld": 24600,+ "entitiesPerConnection": 123,+ "roomsHeld": 1400,+ "openMs": 2458.6,+ "openMsPerConnection": 12.29,+ "heapUsedDelta": 51067736,+ "heapPerConnection": 255339,+ "rssDelta": 141262848,+ "rssPerConnection": 706314,+ "externalDelta": 3480118,+ "fdBefore": 22,+ "fdAfter": 222,+ "fdPerConnection": 1,+ "openCpuMs": 1898.3,+ "idleCpuMsPer10s": 74,+ "idleCpuMsPerConnectionPerMinute": 2.221,+ "actionLatencyMs": {+ "n": 40,+ "min": 6.84,+ "p50": 13.62,+ "p95": 30.96,+ "p99": 68.57,+ "max": 68.57,+ "mean": 16.64+ },+ "heapAfterCloseDelta": 1948248,+ "heapRetainedPerConnection": 9741,+ "fdAfterClose": 22+ },+ {+ "requested": 400,+ "connected": 400,+ "loadAverage": [+ 58.66,+ 42.53,+ 23.19+ ],+ "failures": [],+ "house": "small",+ "entitiesHeld": 49200,+ "entitiesPerConnection": 123,+ "roomsHeld": 2800,+ "openMs": 3779.7,+ "openMsPerConnection": 9.45,+ "heapUsedDelta": 100151888,+ "heapPerConnection": 250380,+ "rssDelta": 272822272,+ "rssPerConnection": 682056,+ "externalDelta": 6758518,+ "fdBefore": 22,+ "fdAfter": 422,+ "fdPerConnection": 1,+ "openCpuMs": 3206.6,+ "idleCpuMsPer10s": 149.5,+ "idleCpuMsPerConnectionPerMinute": 2.243,+ "actionLatencyMs": {+ "n": 40,+ "min": 7.47,+ "p50": 18.5,+ "p95": 58.03,+ "p99": 100.6,+ "max": 100.6,+ "mean": 27.11+ },+ "heapAfterCloseDelta": 2055040,+ "heapRetainedPerConnection": 5138,+ "fdAfterClose": 22+ }+ ],+ "ladder": {+ "rows": [+ {+ "label": "rung 1: acquire under the cap",+ "admitted": true,+ "rung": "normal",+ "connection": "pooled",+ "source": null,+ "requiresConfirmation": null,+ "retryAfterSeconds": null,+ "reason": null+ },+ {+ "label": "rung 2: acquire at the cap",+ "admitted": true,+ "rung": "unpooled",+ "connection": "unpooled",+ "source": null,+ "requiresConfirmation": null,+ "retryAfterSeconds": null,+ "reason": "This instance is at its pooled connection cap, so this home got a short-lived connection. It works the same and takes longer to open."+ },+ {+ "label": "rung 2: read is still from the database",+ "admitted": true,+ "rung": "unpooled",+ "connection": null,+ "source": "database",+ "requiresConfirmation": null,+ "retryAfterSeconds": null,+ "reason": null+ },+ {+ "label": "rung 3: read with the database down",+ "admitted": true,+ "rung": "degraded_read",+ "connection": null,+ "source": "graph",+ "requiresConfirmation": null,+ "retryAfterSeconds": null,+ "reason": "Showing live state from this instance. Saved history is briefly unavailable."+ },+ {+ "label": "rung 3: write policy with the database down",+ "attempt": true,+ "persistAudit": false+ },+ {+ "label": "rung 4: stream while 3 of 8 actions are in flight",+ "admitted": true,+ "rung": "unpooled",+ "connection": null,+ "source": null,+ "requiresConfirmation": null,+ "retryAfterSeconds": null,+ "reason": null+ },+ {+ "label": "rung 4: stream once actions pass the yield floor",+ "admitted": false,+ "rung": "shed_streams",+ "connection": null,+ "source": null,+ "requiresConfirmation": null,+ "retryAfterSeconds": 5,+ "reason": "Live updates are paused while this instance finishes the actions people asked for. The page will reconnect on its own."+ },+ {+ "label": "rung 4: an action at the same moment",+ "admitted": true,+ "rung": "shed_streams",+ "connection": null,+ "source": null,+ "requiresConfirmation": false,+ "retryAfterSeconds": null,+ "reason": null+ },+ {+ "label": "rung 5: an action with every slot taken",+ "admitted": false,+ "rung": "shed",+ "connection": null,+ "source": null,+ "requiresConfirmation": false,+ "retryAfterSeconds": 5,+ "reason": "This instance is busy. Nothing was sent to your home, so nothing is half done. Try again in a moment."+ },+ {+ "label": "rung 5: a GUARDED action with every slot taken",+ "admitted": false,+ "rung": "shed",+ "connection": null,+ "source": null,+ "requiresConfirmation": true,+ "retryAfterSeconds": 5,+ "reason": "This instance is busy. Nothing was sent to your home, so nothing is half done. Try again in a moment."+ }+ ],+ "finalSnapshot": {+ "rung": "shed",+ "databaseHealthy": true,+ "pooled": 4,+ "unpooled": 1,+ "streams": 1,+ "inflightActions": 8,+ "limits": {+ "maxPooled": 4,+ "maxUnpooled": 2,+ "maxStreams": 6,+ "maxInflightActions": 8,+ "streamYieldRatio": 0.5,+ "retryAfterSeconds": 5+ },+ "saturation": {+ "pooled": 1,+ "streams": 0.16666666666666666,+ "actions": 1+ },+ "counters": {+ "streamsShed": 1,+ "actionsShed": 8,+ "unpooledOpened": 1,+ "acquisitionsShed": 0,+ "degradedReads": 1+ }+ }+ },+ "largeHouse": {+ "requested": 10,+ "connected": 10,+ "loadAverage": [+ 66.58,+ 45.19,+ 24.47+ ],+ "failures": [],+ "house": "large",+ "entitiesHeld": 6240,+ "entitiesPerConnection": 624,+ "roomsHeld": 70,+ "openMs": 186.4,+ "openMsPerConnection": 18.64,+ "heapUsedDelta": 8672320,+ "heapPerConnection": 867232,+ "rssDelta": 43548672,+ "rssPerConnection": 4354867,+ "externalDelta": 365638,+ "fdBefore": 22,+ "fdAfter": 32,+ "fdPerConnection": 1,+ "openCpuMs": 366.2,+ "idleCpuMsPer10s": 11.3,+ "idleCpuMsPerConnectionPerMinute": 6.807,+ "actionLatencyMs": {+ "n": 40,+ "min": 2.31,+ "p50": 6.11,+ "p95": 15.66,+ "p99": 46.11,+ "max": 46.11,+ "mean": 8.54+ },+ "heapAfterCloseDelta": 1667152,+ "heapRetainedPerConnection": 166715,+ "fdAfterClose": 22+ },+ "burst": {+ "connectionsHeld": 1,+ "houseEntities": 624,+ "houseRooms": 7,+ "updates": 100,+ "dispatchMs": 93.3,+ "absorbMs": 3095.7,+ "cpuMs": 52.3,+ "cpuMsPerUpdate": 0.523,+ "graphRebuilds": 1,+ "coalescingRatio": 100,+ "heapDeltaAcrossBurst": 58704,+ "graphRebuildMs": {+ "n": 30,+ "min": 0.434,+ "p50": 0.753,+ "p95": 12.008,+ "p99": 15.386,+ "max": 15.386,+ "mean": 2.56+ },+ "note": "cpuMs covers the whole absorb window: the 100 outbound service calls, the state pushes they caused, and every graph rebuild that survived coalescing."+ },+ "sse": {+ "subscribersRequested": 200,+ "subscribersAttached": 200,+ "heapDelta": 7976088,+ "heapPerSubscriber": 39880,+ "rssDelta": 34471936,+ "rssPerSubscriber": 172360,+ "fdPerSubscriberBothEnds": 2,+ "fdPerSubscriberServerSide": 1,+ "stateChangesDriven": 20,+ "framesWritten": 4200,+ "framesPerSubscriber": 21,+ "bytesWritten": 105723400,+ "bytesPerFrame": 25172,+ "windowSeconds": 10,+ "cpuMsInWindow": 1370.5,+ "cpuMsPerSubscriberPerMinute": 41.116,+ "note": "One live house fanning its real room graph to N real HTTP subscribers over a real socket each, with the house being changed throughout so frames actually flow. Both halves of the cost, the held response and the per-frame serialization, are in these numbers. Both ends of every socket are in this process, so the descriptor and RSS figures are an upper bound on what a server pays."+ },+ "gate": {+ "steps": 400,+ "lock": "lock.front_door",+ "rungsSeen": [+ "degraded_read",+ "shed",+ "shed_streams"+ ],+ "guardedActionsSeen": 400,+ "everWavedThrough": 0,+ "violations": [],+ "refusedByGateWhileAdmitted": 174,+ "shedByLoad": 226,+ "liveCallOutcome": "needs_confirmation",+ "lockStateBefore": "locked",+ "lockStateAfter": "locked",+ "passed": true+ },+ "machineAtEnd": {+ "loadAverage": [+ 72.39,+ 48.01,+ 25.85+ ],+ "freeMemBytes": 28112199680+ }+}