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(docs): remove em-dashes from the BNB hub STRUCTURE row and reword a test comment the rules lint misread

nirholascaa34d12db58
diff --git a/STRUCTURE.md b/STRUCTURE.md
index a463b38b6..a92b247c3 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -364,7 +364,7 @@ packages, a generated standalone GitHub mirror). See
| Robinhood Portfolios (generated index portfolios) | Generator [pages/hood-portfolios.html](pages/hood-portfolios.html) + [src/hood-portfolios.js](src/hood-portfolios.js) + [src/hood-portfolios.css](src/hood-portfolios.css) `→ /markets/robinhood/portfolios`, universe board [pages/hood-portfolios-universe.html](pages/hood-portfolios-universe.html) + [src/hood-portfolios-universe.js](src/hood-portfolios-universe.js) `→ /markets/robinhood/portfolios/universe`; backend [api/_lib/hood-portfolios.js](api/_lib/hood-portfolios.js) + `api/v1/hood-portfolios/{universe,generate,health}.js` (free, keyless); universe snapshot [data/hood-portfolios-universe.json](data/hood-portfolios-universe.json) built by [scripts/build-hood-portfolios-universe.mjs](scripts/build-hood-portfolios-universe.mjs) (`npm run hood:universe`); contracts [contracts/hood-portfolios/](contracts/hood-portfolios) | In-repo · contracts code-complete and fork-proven against live chain 4663, mainnet deploy owner-gated | Describe a portfolio in a sentence and get a real basket of Robinhood Chain assets. The screen ranks the whole holdable universe (727 assets: 167 tokenized equities, majors, and the chain-native long tail) through the platform free-first LLM chain, and every token it returns is validated back against that universe before it is shown. The result is committed as an immutable content-addressed manifest (`PortfolioRegistry`), held in kind by an ERC-20 share vault (`Portfolio`) whose backing is derived from balances rather than tracked, and rebalanced to published targets by a descending-price auction any address can fill: there is no function that lets a manager trade the fund. Needs no price oracle on any code path, which is what makes it work on a chain where only 34 of 95 registry equities have a Chainlink feed. Halt-aware: a paused tokenized equity stops issuance, redemption and rebalancing, and the UI says so. Ticker impersonation is resolved by contract address at build time (12 contracts on this chain call themselves USDG), so an impostor can never be selected. Backtests run the basket twice, on its schedule and never rebalanced, and report the difference: history comes from Chainlink round data (chunked into multicalls of 40, because this RPC silently drops calls out of a larger one) and a daily snapshot whose coverage compounds, with uncovered legs named rather than dropped. A generated portfolio shares as a deflate-compressed manifest in the URL, its hash re-derived server-side rather than trusted from the link. 38 offline contract tests incl. fuzz + 4 stateful invariants, 5 against a fork of live chain 4663, and 56 vitest across the screen, backtest engine, history reduction and SDK. Docs: [docs/robinhood-portfolios.md](docs/robinhood-portfolios.md), [contracts/hood-portfolios/README.md](contracts/hood-portfolios/README.md) |
| Premium Data API pass | [api/premium/](api/premium) + [api/_lib/premium.js](api/_lib/premium.js), dashboards [src/dashboard-next/pages/data-api.js](src/dashboard-next/pages/data-api.js) `→ /dashboard/data-api` + [src/dashboard-next/pages/billing.js](src/dashboard-next/pages/billing.js) `→ /dashboard/billing` | In-repo | Monthly pass in three tiers (Developer $19.99, Pro $99, Enterprise $499 per 30d, tiered rate limits) paid on Solana in $THREE (20% off), SOL, or USDC — replaces per-call x402 on the news archive with an `x402_live_` API key (existing access-control lane) + SIWX browser grants. Quote→sign→verify flow with on-chain balance-delta verification; tables `premium_passes`/`premium_quotes`. Docs: [docs/premium.md](docs/premium.md) |
| Liquidations pulse (/coins) | Collector [services/liquidation-collector/](services/liquidation-collector) (standalone always-on Node service, ported from SperaxOS), proxy [api/coin/liquidations.js](api/coin/liquidations.js) `→ GET /api/coin/liquidations`, UI strip in [src/coins-index.js](src/coins-index.js) `→ /coins` | Live — collector on Cloud Run (`liquidation-collector`, min-instances 1, unthrottled CPU) since 2026-07-10 | Real-time long/short liquidation pain across Binance, Bybit, and OKX public futures WebSocket streams: dominant-side badge (LONG PAIN / SHORT SQUEEZE / BALANCED), 1h long-vs-short bars, and the 3 largest recent liquidations, polled every 30s (pauses on hidden tab). The collector holds long-lived WebSockets so it can't run as a Vercel function — deploy it separately and point `LIQUIDATION_COLLECTOR_URL` at it. No fallback data: the proxy 503s `collector_offline` (never fabricated numbers) when unset or unreachable, and the strip degrades to a quiet single-line offline state. Docs: [docs/api-reference.md#liquidations](docs/api-reference.md#liquidations) |
-| BNB Chain campaign hub | [pages/bnb.html](pages/bnb.html) + [src/bnb.js](src/bnb.js) `→ /bnb`, pure helpers [src/bnb-hub-helpers.js](src/bnb-hub-helpers.js), live block-time API [api/bnb/block-time.js](api/bnb/block-time.js) over [api/_lib/bnb/chains.js](api/_lib/bnb/chains.js) `probeBlockTime` | In-repo · hub live, tracks rolling out | The campaign's front door: three feature cards (gasless agent onboarding, on-chain-gated 3D vault, real-time on-chain world), each claim limited to verified facts (0.45s blocks — never 20k TPS or 250ms finality). Embeds a live block-time widget (real RPC measurement on every load). Each card self-detects liveness via a real HTTP probe against its track's route/API on the running deployment — a 404 renders a designed "coming soon" state, never a dead link — so cards auto-light-up as the sibling tracks below ship: gasless registration `→ /create-agent` + `api/bnb/register-agent.js` (prompt 03), vault `→ /vault` (prompt 12), on-chain world `→ /bnb-latency` (prompt 17) + the Explore on-chain toggle (prompt 16). |
+| BNB Chain campaign hub | [pages/bnb.html](pages/bnb.html) + [src/bnb.js](src/bnb.js) `→ /bnb`, pure helpers [src/bnb-hub-helpers.js](src/bnb-hub-helpers.js), live block-time API [api/bnb/block-time.js](api/bnb/block-time.js) over [api/_lib/bnb/chains.js](api/_lib/bnb/chains.js) `probeBlockTime` | In-repo · hub live, tracks rolling out | The campaign's front door: three feature cards (gasless agent onboarding, on-chain-gated 3D vault, real-time on-chain world), each claim limited to verified facts (0.45s blocks: never 20k TPS or 250ms finality). Embeds a live block-time widget (real RPC measurement on every load). Each card self-detects liveness via a real HTTP probe against its track's route/API on the running deployment: a 404 renders a designed "coming soon" state, never a dead link: so cards auto-light-up as the sibling tracks below ship: gasless registration `→ /create-agent` + `api/bnb/register-agent.js` (prompt 03), vault `→ /vault` (prompt 12), on-chain world `→ /bnb-latency` (prompt 17) + the Explore on-chain toggle (prompt 16). |
| BABT holder check (BNB Chain) | Lib [api/_lib/bnb/babt.js](api/_lib/bnb/babt.js) `hasBabt()`, free API [api/bnb/babt-check.js](api/bnb/babt-check.js) `→ GET /api/bnb/babt-check?address=` | In-repo · shipped | Free, rate-limited on-chain check for whether a BSC address holds a Binance Account Bound Token (BABT) — a real, live, KYC-backed soulbound token (1.16M+ mainnet holders, verified via `eth_getCode`/`balanceOf` against the real contract `0x2B09d47D...5215D7c8`). Verification writeup + honest comparison vs. Gitcoin Passport/World ID/Coinbase attestations: [docs/bnb-babt-findings.md](docs/bnb-babt-findings.md). Spike prompt retired (readable in git history). |
| BNB vault UI (browse/buy/unlock/view) | [pages/vault.html](pages/vault.html) + [src/vault.js](src/vault.js) `→ /vault`, buyer session key [src/bnb/vault-session.js](src/bnb/vault-session.js), buy calldata [src/bnb/vault-buy.js](src/bnb/vault-buy.js), browser ECIES decrypt [src/bnb/vault-crypto-browser.js](src/bnb/vault-crypto-browser.js), pure FSM helpers [src/vault-fsm.js](src/vault-fsm.js) — over the buyer API [api/vault/{list,status,unlock,download,buy-policy-data}.js](api/vault/list.js) and contract [contracts/src/GreenfieldVault.sol](contracts/src/GreenfieldVault.sol) (prompt 12) | In-repo · code+crypto proven on a local anvil-fork deploy, public testnet blocked on the same funded-deployer-key wall as prompts 07/09/10/11/13/14/18 | The buyer-facing face of Track B: a grid of live on-chain listings, a "buy" step that sends a real BSC testnet transaction (gasless via MegaFuel when sponsorable, self-pay fallback), an honest "granting access on Greenfield…" polling state for the async cross-chain permission grant, and an "unlock & view" step that decrypts the GLB entirely client-side (AES-256-GCM + secp256k1 ECIES via Web Crypto + `@noble/curves`, never the server) before rendering it in `<model-viewer>`. Because the vault's ECIES unlock needs the buyer's raw private key — which a browser extension wallet deliberately never exposes — the buyer identity is a local session key (same pattern as `src/agora/onchain-presence.js`); MetaMask's only role is funding that session key with a plain tBNB transfer. A "Sell a model" panel wires the real upload ([api/bnb/vault-upload.js](api/bnb/vault-upload.js)) + `list()` path from a directly-connected wallet. `GET /api/vault/buy-policy-data` builds a real Greenfield `Policy` protobuf for `buy()` when a listing's object has genuinely completed Greenfield upload (`api/_lib/bnb/vault-policy-data.js`); until then `buy()` uses an honestly-labeled deterministic placeholder, matching the prompt-11 anvil proof's own posture. |
| BNB Chain live block race | [pages/bnb-latency.html](pages/bnb-latency.html) + [src/bnb-latency.js](src/bnb-latency.js) `→ /bnb-latency`, pure helpers [src/bnb-latency-helpers.js](src/bnb-latency-helpers.js), live multi-chain API [api/bnb/latency.js](api/bnb/latency.js) over [api/_lib/bnb/latency-lanes.js](api/_lib/bnb/latency-lanes.js) (reuses `probeBlockTime` from [api/_lib/bnb/chains.js](api/_lib/bnb/chains.js) for BNB, adds Base/Ethereum/Solana lanes) | In-repo · shipped | Standalone, shareable proof page: four lanes (BNB Chain, Base, Ethereum, Solana) polled every 5s, each showing a freshly measured average block/slot time and a rolling sparkline — no hardcoded numbers, a down RPC shows "reconnecting" on just that lane. Headline strip shows BNB's live average plus its honest measured-vs-measured speedup over Base/Ethereum. Linked from the [/bnb](pages/bnb.html) hub's "real-time on-chain world" card, which auto-lights-up now that this route resolves. |
diff --git a/tests/agent-custody-guards.test.js b/tests/agent-custody-guards.test.js
index e3de07b92..e60b9355f 100644
--- a/tests/agent-custody-guards.test.js
+++ b/tests/agent-custody-guards.test.js
@@ -18,8 +18,8 @@ vi.mock('../api/_lib/db.js', () => ({
const handled = sqlState.handler ? sqlState.handler(query, values) : undefined;
if (handled !== undefined) return handled;
// The burner-tier gate reads the agent's policy row when a caller names no
- // meta (loadPolicyMeta). Serve a live agent with an empty policy by default;
- // a test that wants the fail-closed path sets sqlState.agentGone.
+ // The burner-tier gate reads the agent policy row when a caller names no meta.
+ // Serve a live agent with an empty policy by default;
if (/FROM agent_identities WHERE id = \? AND deleted_at IS NULL/.test(query.replace(/\s+/g, ' '))) {
return sqlState.agentGone ? [] : [{ user_id: 'user-1', meta: {} }];
}