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.

fix(guards): register the home credential audit so the gate goes green again

nirholasd00748f1dc13
diff --git a/data/guards.json b/data/guards.json
index f3ba1b938..78c488dcd 100644
--- a/data/guards.json
+++ b/data/guards.json
@@ -991,6 +991,22 @@
"reason": "It reads the production wallet table and the live encryption key, then decrypts in memory to test each secret against the current key. There is no offline fixture for 'this ciphertext no longer opens' that would prove anything about the real fleet. Read-only: it never writes, signs, or broadcasts."
}
},
+ {
+ "id": "audit-home-credential-health",
+ "script": "scripts/audit-home-credential-health.mjs",
+ "npm": "audit:home-credentials",
+ "title": "No connected home is sealed behind an unreadable key",
+ "protects": "Every stored Home Assistant long-lived token still decrypts under the current WALLET_ENCRYPTION_KEY, and names the homes that would go dark if one does not.",
+ "why": "home_connections.access_token_enc is the platform second class of at-rest ciphertext under the same key as the custodial wallet secrets, and a rotation that loses the outgoing value seals both. The two failures look nothing alike, which is why one reading cannot cover both: a sealed wallet strands SOL that can never be signed for again, while a sealed home token strands nothing and costs reach. Every connected house simply stops answering at once, with no balance anywhere to notice it by and no signal that says why, until each owner pastes a fresh token. Run it beside the wallet audit on every key rotation.",
+ "stages": [
+ "manual"
+ ],
+ "needs": "credentials",
+ "proof": {
+ "kind": "live",
+ "reason": "It reads the production home_connections table and the live encryption key, then decrypts in memory to test each token against the current key. There is no offline fixture for \"this ciphertext no longer opens\" that would prove anything about the real fleet. Read-only: it never writes and never opens a socket to any house."
+ }
+ },
{
"id": "audit-play-failure-modes",
"script": "scripts/audit-play-failure-modes.mjs",
diff --git a/docs/guards.md b/docs/guards.md
index a078185d2..d6ed5d961 100644
--- a/docs/guards.md
+++ b/docs/guards.md
@@ -157,6 +157,7 @@ Run `npm run audit:guards` to print the current count and per-stage breakdown. T
| LLM spend metering | `npm run audit:llm-metering` | Every LLM lane that spends money reports a real cost, never exactly $0 and never an unknown. |
| Cron liveness | `npm run audit:cron-liveness` | Each cron in `vercel.json` resolves to a handler that exists, imports, answers a live request, and refuses an unauthenticated one. |
| Custodial key health | `npm run audit:custodial-keys` | Every stored custodial Solana secret still decrypts under the current `WALLET_ENCRYPTION_KEY`. |
+| Home credential health | `npm run audit:home-credentials` | Every stored Home Assistant token still decrypts under the current `WALLET_ENCRYPTION_KEY`, so no connected house is sealed. |
| Delegation contract addresses | `npm run check:erc7710` | Every delegation-manager address is a deployed contract. |
---
diff --git a/package.json b/package.json
index 7f3600724..d31e27066 100644
--- a/package.json
+++ b/package.json
@@ -236,6 +236,7 @@
"check:cron-drift": "node scripts/check-cron-drift.mjs",
"check:cron-syntax": "node scripts/check-cron-drift.mjs --offline",
"audit:custodial-keys": "node scripts/audit-custodial-key-health.mjs",
+ "audit:home-credentials": "node scripts/audit-home-credential-health.mjs",
"audit:cron-liveness": "node scripts/audit-cron-liveness.mjs",
"audit:cron-liveness:static": "node scripts/audit-cron-liveness.mjs --static",
"check:erc7710": "node scripts/check-erc7710-addresses.js",
diff --git a/public/guards.json b/public/guards.json
index f3ba1b938..78c488dcd 100644
--- a/public/guards.json
+++ b/public/guards.json
@@ -991,6 +991,22 @@
"reason": "It reads the production wallet table and the live encryption key, then decrypts in memory to test each secret against the current key. There is no offline fixture for 'this ciphertext no longer opens' that would prove anything about the real fleet. Read-only: it never writes, signs, or broadcasts."
}
},
+ {
+ "id": "audit-home-credential-health",
+ "script": "scripts/audit-home-credential-health.mjs",
+ "npm": "audit:home-credentials",
+ "title": "No connected home is sealed behind an unreadable key",
+ "protects": "Every stored Home Assistant long-lived token still decrypts under the current WALLET_ENCRYPTION_KEY, and names the homes that would go dark if one does not.",
+ "why": "home_connections.access_token_enc is the platform second class of at-rest ciphertext under the same key as the custodial wallet secrets, and a rotation that loses the outgoing value seals both. The two failures look nothing alike, which is why one reading cannot cover both: a sealed wallet strands SOL that can never be signed for again, while a sealed home token strands nothing and costs reach. Every connected house simply stops answering at once, with no balance anywhere to notice it by and no signal that says why, until each owner pastes a fresh token. Run it beside the wallet audit on every key rotation.",
+ "stages": [
+ "manual"
+ ],
+ "needs": "credentials",
+ "proof": {
+ "kind": "live",
+ "reason": "It reads the production home_connections table and the live encryption key, then decrypts in memory to test each token against the current key. There is no offline fixture for \"this ciphertext no longer opens\" that would prove anything about the real fleet. Read-only: it never writes and never opens a socket to any house."
+ }
+ },
{
"id": "audit-play-failure-modes",
"script": "scripts/audit-play-failure-modes.mjs",