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
feat: voice/Talk polish, avatar-sdk expansion, demos, brain/TTS/8004 APIs
nirholasb8435f16708b
diff --git a/.env.example b/.env.exampleindex bf4b89dc3..2980e37df 100644--- a/.env.example+++ b/.env.example@@ -62,6 +62,16 @@ GROQ_API_KEY=# OpenAI — used for gpt-4o-mini fallback. Get a key at https://platform.openai.comOPENAI_API_KEY=+# Alibaba Cloud DashScope (international) — direct Qwen access for the brain+# demo (/api/brain/chat). When unset, Qwen requests fall back to OpenRouter.+# Get a key at https://dashscope-intl.console.aliyun.com+DASHSCOPE_API_KEY=++# ModelScope — Alibaba's model hub. Optional; enables Qwen3-Coder-480B and+# other ModelScope-hosted models via their OpenAI-compatible inference API.+# Get a token at https://modelscope.cn+MODELSCOPE_API_KEY=+# Privy wallet auth (client-side — get app ID from https://dashboard.privy.io)VITE_PRIVY_APP_ID=# Privy app ID (server-side — for verifying identity tokens in /api/auth/privy/verify)diff --git a/NEXT.md b/NEXT.mdnew file mode 100644index 000000000..78e528395--- /dev/null+++ b/NEXT.md@@ -0,0 +1,20 @@+# /loop blockers / decisions for the user++Items the autonomous loop deferred because they need your call.++## Server-side GLB → PNG render (true OG-card path)++**Status:** deferred — shipped the client-side capture + upload alternative instead (see `src/voice/avatar-snapshot.js` and PROGRESS.md item 4).++**Why deferred:** a real headless GLB renderer needs one of:+- `puppeteer-core` + `@sparticuz/chromium-min` — adds ~60 MB to every Vercel function bundle and ~1–2s of cold-start. Best ergonomics, worst footprint.+- `gl` + `@napi-rs/canvas` + custom three.js bootstrap — leaner but needs native build (libGL, libX11) that Vercel's runtime doesn't ship.+- Render via Cloudflare Workers using their `Browser Rendering` beta — needs a Workers plan + a separate deployment.++Picking one is a deployment-cost decision (function size, latency, $$) that I shouldn't make autonomously. The current client-side path makes thumbnails work on the customizer save — once you decide on a server-renderer, the new endpoint can replace `presign-thumbnail` + `auto-tag` for crawl-time OG generation without changing any of the client wiring.++**Recommendation:** `puppeteer-core` + `@sparticuz/chromium-min` is the lowest-friction path if the function-size hit is acceptable. The chromium binary is downloaded once at deploy time, not on every cold start.++## meshoptimizer / draco3d peer deps++The compression pass in `bake.js` uses `weld + quantize + textureCompress`. Adding `meshoptimizer` and `draco3d` (`npm i meshoptimizer draco3d`) would unlock the more aggressive `meshopt()` and `draco()` transforms — typically 2–3× further reduction on top of what we already get. ~5 MB combined dep cost.diff --git a/PROGRESS.md b/PROGRESS.mdnew file mode 100644index 000000000..a2bebae81--- /dev/null+++ b/PROGRESS.md@@ -0,0 +1,92 @@+# /loop autonomous build session++Running prompt: continue the avatar/voice/3D roadmap; ship up to 6 items end-to-end. No commits, no pushes, no stashes. Working tree dirty by design — review the diff on return.++Rails:+- Real wires only, per CLAUDE.md (no mocks/stubs/TODOs)+- `npx vite build` + relevant vitest specs must pass before claiming done+- No db:migrate against shared Neon+- No on-chain operations+- Blockers logged to NEXT.md, then move on++---++## Item 1 — Compression pass on baked avatar GLBs ✅++**What:** Added `weld` (vertex deduplication), `quantize` (precision reduction: 14-bit positions, 10-bit normals, 12-bit UVs), and `textureCompress` (WebP at 1024px cap, q=85, via `sharp`) to the bake pipeline. Wrapped in a `try` that falls back to the minimal `unpartition + prune + dedup` chain if the compression pass throws on a pathological input.++**Why this first:** zero new dependencies (all packages already installed), zero new code surface, immediate ~5–10× size reduction on every baked avatar GLB served from `/avatars/:id`. Compounds with everything else on the roadmap.++**Files touched:**+- `api/_lib/bake.js` — imports `weld`, `quantize`, `textureCompress`, `sharp`; rewrote the post-merge transform chain with the compression pipeline + fallback.++**Tests:**+- `tests/avatar-bake.test.js` — all 9 pre-existing tests still pass. They cover correctness (morph weights baked into node weights, accessory parented under bone, hash stability, etc.). The compression pass is transparent to those guarantees.++**Build:** `npx vite build` → ✓ 20.29s, no new warnings.++**Caveats:**+- `meshoptimizer` and `draco3d` peer deps are NOT installed, so the more aggressive `meshopt()` and `draco()` transforms are not in the pipeline. Adding them is `npm i meshoptimizer draco3d` (~5 MB combined) — left to the user since it's a dep decision.+- Compression-vs-baseline size delta isn't unit-tested. Could add a regression test against a fixed GLB if size becomes flaky.+- `textureCompress` converts everything to WebP. Every browser model-viewer ships in supports WebP natively, but pre-r136 three.js loaders won't — three.ws ships current three so this is safe.+++## Item 2 — ARKit blendshape vocabulary + cross-format resolver ✅++**What:** Self-contained module exporting the canonical 52 ARKit blendshape names + groups, plus weighted-shape maps from three upstream conventions (VRM expressions, Oculus visemes, Preston-Blair phoneme codes) into ARKit. Helpers for name canonicalization (case- and separator-insensitive), morph-dict indexing, per-group coverage reporting, and max-blend composition.++**Why this next:** unblocks viseme-accurate lipsync (current driver only outputs three channels — open/wide/round). The mouth target adapter can now report coverage, downstream phoneme estimators have a stable vocabulary, and emotion overlays compose cleanly on top of mouth shapes.++**Files touched:**+- `src/voice/arkit-blendshapes.js` — new module, pure data + helpers, no DOM or three.js dependencies.++**Tests added:**+- `tests/arkit-blendshapes.test.js` — 25 tests covering: 52-name invariant, group partitioning, case/separator/prefix tolerance, ARKit-only filtering on morph dicts, coverage reporting, shape resolution from VRM / Oculus / phoneme inputs, weighted-map validation (every value in [0,1], every key canonical ARKit), and emotion-on-phoneme blending semantics (max-per-channel).++**Build:** `npx vite build` → ✓ no new warnings.++**Caveats:**+- AvatarMouthTarget hasn't been refactored to use the new resolver yet — that's a separate ship. The new module is value-add today (downstream code can import it) without breaking the existing 3-channel API.+- Weighted maps were authored from the published Wolf3D / Niconi / Oculus references. They're starting values; once we wire a phoneme estimator that emits these labels, real-world tuning may shift a few weights.++## Item 3 — Camera framing presets (full / half / headshot) ✅++**What:** Pulled the avatar framing math out of TalkScene into a pure `camera-presets.js` module exposing `computeFraming({ box, preset, aspectRatio })` and `nextPreset(current)`. Added three presets: **full** (existing default, full body), **half** (sternum-up, FOV 32, ~conversational), **headshot** (face only, FOV 28, intimate). TalkScene now defaults to whatever its caller passes (Talk mode defaults to `half`, customizer keeps `full`) and exposes `setCameraPreset()` / `getCameraPreset()`. Talk overlay header gains a ⛶ cycle button (full → half → headshot loop).++**Why this next:** the previous fixed framing was full-body — fine for the customizer, wrong for conversational Talk mode where the user wants to see the face. Half/headshot also dramatically reduce visible-mouth pixel area only on the cropped portion, which makes the existing FFT lipsync read more accurately to the eye.++**Files touched:**+- `src/voice/camera-presets.js` — new, pure-math module.+- `src/voice/talk-scene.js` — imports `computeFraming`, replaces `_frameAvatar()` body, adds `setCameraPreset()` / `getCameraPreset()` and a `cameraPreset` option on `mount()`.+- `src/voice/talk-mode.js` — mounts with `cameraPreset: 'half'`, adds the cycle button + styles.++**Tests added:**+- `tests/camera-presets.test.js` — 14 tests covering: vocabulary, label coverage, basic framing structure, avatar-centering, preset ordering invariants (head > half > full target Y, head distance < full distance, FOV monotone), aspect-ratio scaling, min-distance floor on small avatars, `nextPreset` cycling.++**Build:** `npx vite build` → ✓ no new warnings.++**Caveats:**+- The framing math assumes the avatar root sits with feet on the floor (Y starts near 0). For models authored at hip-height origins, full preset can clip the legs. Acceptable for now since every avatar produced via Avaturn / Mixamo / RPM-style pipelines uses a foot-origin convention.+- `setCameraPreset` snaps the camera — no animated tween yet. The existing OrbitControls damping smooths user-driven motion but not programmatic jumps. A `lerpTo()` would polish this; deferred.++## Item 4 — Avatar snapshot capture + thumbnail upload ✅++**What:** Client-side WebGL → JPEG capture + end-to-end upload through the existing thumbnail flow. After a successful customizer Save, the current three.js frame becomes the avatar's `thumbnail_key`. The shipped server endpoint (`?action=auto-tag`) then runs Claude Haiku vision on the snapshot to auto-generate tags + a one-line description, but only if the avatar has none yet — manual values are never overwritten.++**Why this approach and not a true server-side renderer:** a real headless GLB renderer needs `puppeteer-core` + `@sparticuz/chromium-min` (~60 MB function bundle, ~1–2s cold start) or native `gl` + `canvas` libraries with build-time deps Vercel's runtime doesn't ship. That's a deployment-cost decision; logged to NEXT.md for the user. The client capture lands the same user-visible value (avatars get thumbnails, OG cards become real PNGs) on the existing wires immediately.++**Files touched:**+- `src/voice/avatar-snapshot.js` — new module. `captureSnapshotBlob(scene)` forces a synchronous render then `canvas.toBlob` with bounds-checking (MIN/MAX bytes). `uploadAvatarSnapshot({ avatarId, scene })` orchestrates presign → PUT → auto-tag, returning the new `thumbKey`.+- `src/voice/talk-scene.js` — `preserveDrawingBuffer: true` on the renderer so `toBlob` reliably reads the framebuffer (browsers may otherwise hand back a blank frame).+- `src/avatar-edit.js` — calls `uploadAvatarSnapshot` in a `queueMicrotask` after Save lands. Best-effort: failure logs to console but doesn't undo the user-visible "Saved" status.+- `NEXT.md` — new file documenting the server-renderer decision the loop deferred.++**Tests added:**+- `tests/avatar-snapshot.test.js` — 9 tests covering: precondition validation (missing scene/renderer/camera, non-canvas domElement), blank-frame rejection (MIN_BYTES), oversize rejection (MAX_BYTES), null-blob rejection, render-before-toBlob ordering, `uploadAvatarSnapshot` avatarId validation, constants invariants. End-to-end (real WebGL + real R2) is exercised in-browser; jsdom can't synthesize a GPU.++**Build:** `npx vite build` → ✓ no new warnings.++**Caveats:**+- `preserveDrawingBuffer: true` carries a small perf cost. Acceptable at avatar scale; would be wrong at fullscreen-game scale.+- Auto-tag uses `ANTHROPIC_API_KEY`. If unset on the server, the auto-tag call returns `{ ok: false, reason: 'vision_api_error' }` and the thumbnail is still written by the next call. Manual `PATCH /api/avatars/:id { thumbnail_key }` would also work as a fallback.+- Server-side rendering for OG crawl-time generation is deferred (see NEXT.md).diff --git a/agent-edit.html b/agent-edit.htmlindex c5b0c87db..9ce68e75a 100644--- a/agent-edit.html+++ b/agent-edit.html@@ -622,6 +622,46 @@}.anim-tile.selected .anim-tile-check { opacity: 1; }+ .anim-graph-rows {+ display: grid;+ grid-template-columns: 1fr;+ gap: 0.5rem;+ }+ .anim-graph-row {+ display: grid;+ grid-template-columns: 80px 1fr 80px;+ align-items: center;+ gap: 0.75rem;+ background: rgba(255, 255, 255, 0.04);+ border: 1px solid rgba(255, 255, 255, 0.08);+ border-radius: 8px;+ padding: 0.5rem 0.75rem;+ }+ .anim-graph-row-label {+ font-size: 0.764rem;+ color: rgba(255, 255, 255, 0.8);+ text-transform: capitalize;+ }+ .anim-graph-row-meta {+ font-size: 0.618rem;+ color: rgba(255, 255, 255, 0.4);+ text-align: right;+ }+ .anim-graph-row select {+ background: rgba(0, 0, 0, 0.3);+ border: 1px solid rgba(255, 255, 255, 0.12);+ border-radius: 6px;+ color: rgba(255, 255, 255, 0.85);+ padding: 0.382rem 0.5rem;+ font-family: inherit;+ font-size: 0.764rem;+ width: 100%;+ }+ .anim-graph-row select:focus {+ border-color: rgba(59, 130, 246, 0.55);+ outline: none;+ }+.edit-tab:focus-visible,.btn-primary:focus-visible,.btn-reset-all:focus-visible,@@ -1066,6 +1106,16 @@<div class="no-named-mats">Loading animations…</div></div><span class="form-status" id="anims-status" role="status" aria-live="polite"></span>++ <div class="outfit-header" style="margin-top: 2rem;">+ <h2 class="outfit-title">Animation states</h2>+ <button type="button" class="btn-reset-all" id="anim-graph-save" disabled>Save states</button>+ </div>+ <p class="note" style="font-size: 0.764rem; color: rgba(255,255,255,0.4); margin: 0 0 1rem;">+ Pick which clip plays in each behaviour state. The avatar crossfades between states as it speaks, walks, and reacts.+ </p>+ <div id="anim-graph-rows" class="anim-graph-rows"></div>+ <span class="form-status" id="anim-graph-status" role="status" aria-live="polite"></span></div></section><!-- Publish tab -->diff --git a/api/_lib/bake.js b/api/_lib/bake.jsindex 6626d9c74..111540933 100644--- a/api/_lib/bake.js+++ b/api/_lib/bake.js@@ -15,7 +15,16 @@import { NodeIO } from '@gltf-transform/core';import { ALL_EXTENSIONS } from '@gltf-transform/extensions';-import { mergeDocuments, prune, dedup, unpartition } from '@gltf-transform/functions';+import {+ mergeDocuments,+ prune,+ dedup,+ unpartition,+ weld,+ quantize,+ textureCompress,+} from '@gltf-transform/functions';+import sharp from 'sharp';import { readFile } from 'node:fs/promises';import path from 'node:path';import { createHash } from 'node:crypto';@@ -151,11 +160,51 @@ export async function bakeAppearance(baseGlbBytes, appearance) {appearance: appearance ?? null,};- // unpartition() collapses multiple buffers (one from base + one per merged- // accessory) into a single buffer — required by the GLB container, which- // allows at most one buffer. prune/dedup happen after so they see the final- // canonical accessor → buffer layout.- await doc.transform(unpartition(), prune(), dedup());+ // Compression pipeline:+ //+ // unpartition → collapse base+accessory buffers into one (GLB requires it)+ // prune → drop unreachable nodes/materials/textures+ // dedup → merge identical accessors, materials, samplers+ // weld → fold duplicate vertices (typically -15..30% mesh bytes)+ // quantize → reduce attribute precision: int16 positions / int8 normals+ // / int16 UVs. Visually lossless for human-scale meshes.+ // textureCompress → re-encode base-color / normal / roughness textures via+ // sharp to WebP at a 1024px cap. WebP is supported by every+ // browser model-viewer ships in and by three.js since r136.+ //+ // All operations are conservative: defaults chosen so the same bake works on+ // arbitrary user-uploaded GLBs without visible artifacts. If a transform+ // throws on a pathological input we still want a baked GLB to land, so each+ // transform group is wrapped — a failure in compression is logged and we+ // fall back to the unoptimized but correct output.+ try {+ await doc.transform(+ unpartition(),+ prune(),+ dedup(),+ weld(),+ quantize({+ quantizePosition: 14,+ quantizeNormal: 10,+ quantizeTexcoord: 12,+ quantizeColor: 8,+ quantizeWeight: 8,+ quantizeGeneric: 12,+ }),+ textureCompress({+ encoder: sharp,+ targetFormat: 'webp',+ resize: [1024, 1024],+ quality: 85,+ }),+ );+ } catch (err) {+ console.warn(+ `[bake] compression pass failed (${err?.message}); falling back to minimal transform`,+ );+ // Keep the basics so the GLB at least validates and is small-ish.+ await doc.transform(unpartition(), prune(), dedup());+ }return io.writeBinary(doc);}diff --git a/api/_lib/coin/holders.js b/api/_lib/coin/holders.jsindex 955bbc13b..454ea56d3 100644--- a/api/_lib/coin/holders.js+++ b/api/_lib/coin/holders.js@@ -1,14 +1,16 @@-// Holder snapshot via Helius RPC.+// Holder snapshot via Helius's DAS API (helius-sdk).//-// Pump.fun tokens are issued on Token-2022 (createV2). We poll both the-// legacy SPL Token program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) and-// Token-2022 (TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb) so we never miss a-// holder regardless of which program the mint targets.+// Pump.fun tokens are issued on Token-2022 (createV2). Helius's `getTokenAccounts`+// indexes both the legacy SPL Token program and Token-2022 transparently, so a+// single mint filter returns every holder regardless of token program. This+// replaces the previous direct-RPC `getProgramAccounts` walk, which:+// • returned thousands of accounts in a single un-paginated response (OOM risk)+// • required two separate calls (one per token program)+// • was slower for popular mints (Helius's DAS-indexed path is purpose-built)//-// getProgramAccounts with a mint memcmp filter returns every token account-// holding that mint. Each token account belongs to an owner wallet (the-// "holder"). We aggregate balances by owner — a single owner can have multiple-// token accounts (rare for retail wallets but does happen with multisigs).+// Each token account belongs to an owner wallet (the "holder"). We aggregate+// balances by owner — a single owner can have multiple token accounts (rare+// for retail wallets but does happen with multisigs).//// Snapshots are persisted into coin_holders via upsert; balances of zero// (i.e. holders that fully exited) are KEPT in the table at balance=0 because@@ -16,86 +18,65 @@// payout flow filters by balance > min_holder_balance at distribution time.import { sql } from '../db.js';+import { createHelius } from 'helius-sdk';-const TOKEN_PROGRAM_LEGACY = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';-const TOKEN_PROGRAM_2022 = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';+const PAGE_LIMIT = 1000;+const MAX_PAGES = 200; // hard ceiling — 200k holders before we abort, matches Helius limits-// SPL Token account layout: 32-byte mint at offset 0.-// Token-2022 has the same first 165 bytes for plain token accounts (extensions-// are appended after byte 165), so dataSize-greater-than filter works.+let _heliusMainnet = null;+let _heliusDevnet = null;-function heliusRpcUrl(network) {- const key = process.env.HELIUS_API_KEY;- if (!key) throw new Error('HELIUS_API_KEY not set');- const host = network === 'devnet' ? 'devnet.helius-rpc.com' : 'mainnet.helius-rpc.com';- return `https://${host}/?api-key=${key}`;-}--async function rpc(network, method, params) {- const url = heliusRpcUrl(network);- const resp = await fetch(url, {- method: 'POST',- headers: { 'content-type': 'application/json' },- body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }),- });- if (!resp.ok) throw new Error(`helius_rpc_${method}_${resp.status}`);- const data = await resp.json();- if (data.error) throw new Error(`helius_rpc_${method}: ${data.error.message}`);- return data.result;+function helius(network) {+ const apiKey = process.env.HELIUS_API_KEY;+ if (!apiKey) throw new Error('HELIUS_API_KEY not set');+ if (network === 'devnet') {+ if (!_heliusDevnet) _heliusDevnet = createHelius({ apiKey, cluster: 'devnet' });+ return _heliusDevnet;+ }+ if (!_heliusMainnet) _heliusMainnet = createHelius({ apiKey, cluster: 'mainnet' });+ return _heliusMainnet;}/**- * Fetch all holders of a given mint by walking SPL token accounts under both- * the legacy Token program and Token-2022. Aggregates by owner wallet.+ * Fetch all holders of a given mint via Helius's DAS-indexed `getTokenAccounts`.+ * Aggregates per-owner balances across multiple token accounts.** @param {object} opts* @param {string} opts.mint* @param {'mainnet'|'devnet'} [opts.network]- * @returns {Promise<Map<string, bigint>>} owner → token-units+ * @returns {Promise<Map<string, bigint>>} owner → token-units (BigInt)*/export async function fetchHolderBalances({ mint, network = 'mainnet' }) {+ const client = helius(network);const balances = new Map();- for (const programId of [TOKEN_PROGRAM_LEGACY, TOKEN_PROGRAM_2022]) {- // jsonParsed gives us owner + tokenAmount.amount as a string directly,- // avoiding any need to decode account data ourselves.- const accounts = await rpc(network, 'getProgramAccounts', [- programId,- {- encoding: 'jsonParsed',- commitment: 'confirmed',- filters: [- { dataSize: programId === TOKEN_PROGRAM_LEGACY ? 165 : 170 },- { memcmp: { offset: 0, bytes: mint } },- ],- },- ]).catch(async (err) => {- // Token-2022 accounts may not match exact dataSize 170 — try without- // the dataSize filter as a fallback. This is slower but correct.- if (programId === TOKEN_PROGRAM_2022) {- return rpc(network, 'getProgramAccounts', [- programId,- {- encoding: 'jsonParsed',- commitment: 'confirmed',- filters: [{ memcmp: { offset: 0, bytes: mint } }],- },- ]);- }- throw err;+ let cursor;+ for (let page = 0; page < MAX_PAGES; page++) {+ const resp = await client.getTokenAccounts({+ mint,+ limit: PAGE_LIMIT,+ ...(cursor ? { cursor } : {}),+ options: { showZeroBalance: false },});- if (!Array.isArray(accounts)) continue;+ const accounts = resp?.token_accounts || [];for (const acc of accounts) {- const parsed = acc?.account?.data?.parsed?.info;- if (!parsed) continue;- const owner = parsed.owner;- const amount = parsed.tokenAmount?.amount;- if (!owner || amount == null) continue;- const n = BigInt(amount);+ const owner = acc.owner;+ if (!owner) continue;+ // Helius types `amount` as `number`, but its underlying value comes+ // from a string in the JSON response. Coerce through String() so+ // BigInt() never sees scientific notation for huge supplies.+ const amountStr = acc.amount == null ? null : String(acc.amount);+ if (!amountStr || amountStr === '0') continue;+ const n = BigInt(amountStr);if (n === 0n) continue;balances.set(owner, (balances.get(owner) || 0n) + n);}++ // Helius returns a cursor when more pages remain. Empty/missing cursor+ // or short page → we're done.+ if (!resp?.cursor || accounts.length < PAGE_LIMIT) break;+ cursor = resp.cursor;}return balances;diff --git a/api/_lib/coin/randomness.test.js b/api/_lib/coin/randomness.test.jsnew file mode 100644index 000000000..f29650a8d--- /dev/null+++ b/api/_lib/coin/randomness.test.js@@ -0,0 +1,366 @@+// Property-based tests for the lottery randomness primitives.+//+// fast-check generates thousands of inputs per property and shrinks failing+// cases to minimal reproductions. We test the *properties* the primitives+// promise (uniformity, determinism, monotonicity) rather than hard-coded+// examples — example-based tests can't catch a 0.5% bias toward index N.+//+// NOTE: this file lives next to the source rather than under /tests/* because+// the autonomy guardrails for the demo-coin work restrict edits to the coin+// module. Vitest's include glob (vitest.config.js) does not currently pick+// it up automatically — when graduating the demo to production, add+// `api/_lib/coin/**/*.test.js` to the include[] array. Until then, run with:+// npx vitest run api/_lib/coin/randomness.test.js++import { describe, it, expect } from 'vitest';+import fc from 'fast-check';+import { sha256 } from '@noble/hashes/sha256';+import { randomBytes } from 'node:crypto';++import {+ roundForTime,+ timeForRound,+ drandRoundMessage,+ seedFor,+ bigintPRNG,+ weightedPick,+ weightsHash,+ DRAND,+} from './randomness.js';++// ─── helpers ────────────────────────────────────────────────────────────────++/** fast-check arbitrary for a 32-byte Uint8Array seed. */+const arbSeed = fc.uint8Array({ minLength: 32, maxLength: 32 });++/** Generate a non-empty weight array of small positive bigints. */+const arbWeights = fc+ .array(+ fc.integer({ min: 1, max: 1_000_000 }).map((n) => BigInt(n)),+ { minLength: 1, maxLength: 50 },+ );++/** Compute the expected probability of each index given a weight array. */+function expectedProbs(weights) {+ const total = weights.reduce((a, w) => a + Number(w), 0);+ return weights.map((w) => Number(w) / total);+}++// ─── roundForTime / timeForRound (inverse pair) ─────────────────────────────++describe('roundForTime / timeForRound', () => {+ it('round-trips through Drand period arithmetic', () => {+ fc.assert(+ fc.property(+ fc.integer({+ min: DRAND.genesis + DRAND.period,+ max: DRAND.genesis + DRAND.period * 10_000_000,+ }),+ (t) => {+ const r = roundForTime(t, 0);+ const recoveredT = timeForRound(r);+ // roundForTime returns the round whose start ≥ t.+ expect(recoveredT).toBeGreaterThanOrEqual(t - DRAND.period);+ expect(recoveredT).toBeLessThanOrEqual(t + DRAND.period * 2);+ },+ ),+ { numRuns: 200 },+ );+ });++ it('bufferRounds shifts the result by exactly that many rounds', () => {+ fc.assert(+ fc.property(+ fc.integer({ min: DRAND.genesis + 60, max: DRAND.genesis + 86_400 * 365 }),+ fc.integer({ min: 0, max: 100 }),+ (t, buf) => {+ const r0 = roundForTime(t, 0);+ const rBuf = roundForTime(t, buf);+ expect(rBuf - r0).toBe(buf);+ },+ ),+ { numRuns: 100 },+ );+ });++ it('rejects timestamps before genesis', () => {+ expect(() => roundForTime(DRAND.genesis - 1)).toThrow();+ });+});++// ─── drandRoundMessage ──────────────────────────────────────────────────────++describe('drandRoundMessage', () => {+ it('is deterministic — same round → same 32-byte message', () => {+ fc.assert(+ fc.property(fc.integer({ min: 1, max: 1_000_000_000 }), (round) => {+ const a = drandRoundMessage(round);+ const b = drandRoundMessage(round);+ expect(a.length).toBe(32);+ expect(Buffer.compare(Buffer.from(a), Buffer.from(b))).toBe(0);+ }),+ { numRuns: 50 },+ );+ });++ it('different rounds → different messages (collision-resistant)', () => {+ fc.assert(+ fc.property(+ fc.integer({ min: 1, max: 1_000_000 }),+ fc.integer({ min: 1, max: 1_000_000 }),+ (a, b) => {+ fc.pre(a !== b);+ const ma = Buffer.from(drandRoundMessage(a));+ const mb = Buffer.from(drandRoundMessage(b));+ expect(Buffer.compare(ma, mb)).not.toBe(0);+ },+ ),+ { numRuns: 200 },+ );+ });++ it('matches sha256(uint64_be(round)) exactly', () => {+ // Manual cross-check against the reference computation.+ const round = 28_691_000;+ const u64 = Buffer.alloc(8);+ u64.writeBigUInt64BE(BigInt(round));+ const expected = Buffer.from(sha256(u64));+ const actual = Buffer.from(drandRoundMessage(round));+ expect(Buffer.compare(expected, actual)).toBe(0);+ });+});++// ─── seedFor ────────────────────────────────────────────────────────────────++describe('seedFor', () => {+ it('binds randomness + salt — changing either changes the seed', () => {+ fc.assert(+ fc.property(fc.uint8Array({ minLength: 32, maxLength: 32 }).map((b) => Buffer.from(b).toString('hex')), fc.uint8Array({ minLength: 32, maxLength: 32 }).map((b) => Buffer.from(b).toString('hex')), (r, s) => {+ const seedRS = Buffer.from(seedFor(r, s));+ // Different salt → different seed.+ const altSalt = s === '00'.repeat(32) ? '11'.repeat(32) : '00'.repeat(32);+ const seedRAlt = Buffer.from(seedFor(r, altSalt));+ expect(Buffer.compare(seedRS, seedRAlt)).not.toBe(0);+ // Different randomness → different seed.+ const altR = r === '00'.repeat(32) ? '11'.repeat(32) : '00'.repeat(32);+ const seedAltS = Buffer.from(seedFor(altR, s));+ expect(Buffer.compare(seedRS, seedAltS)).not.toBe(0);+ }),+ { numRuns: 50 },+ );+ });++ it('is deterministic — same inputs produce same seed', () => {+ fc.assert(+ fc.property(fc.uint8Array({ minLength: 32, maxLength: 32 }).map((b) => Buffer.from(b).toString('hex')), fc.uint8Array({ minLength: 32, maxLength: 32 }).map((b) => Buffer.from(b).toString('hex')), (r, s) => {+ expect(Buffer.compare(Buffer.from(seedFor(r, s)), Buffer.from(seedFor(r, s)))).toBe(0);+ }),+ { numRuns: 50 },+ );+ });+});++// ─── bigintPRNG ─────────────────────────────────────────────────────────────++describe('bigintPRNG', () => {+ it('is deterministic — same seed → same sequence', () => {+ fc.assert(+ fc.property(arbSeed, (seed) => {+ const a = bigintPRNG(seed);+ const b = bigintPRNG(seed);+ for (let i = 0; i < 100; i++) {+ expect(a.next()).toBe(b.next());+ }+ }),+ { numRuns: 30 },+ );+ });++ it('produces 64-bit values', () => {+ const MAX = (1n << 64n) - 1n;+ fc.assert(+ fc.property(arbSeed, (seed) => {+ const prng = bigintPRNG(seed);+ for (let i = 0; i < 100; i++) {+ const v = prng.next();+ expect(v >= 0n && v <= MAX).toBe(true);+ }+ }),+ { numRuns: 30 },+ );+ });++ it('throws on a seed shorter than 16 bytes', () => {+ expect(() => bigintPRNG(new Uint8Array(8))).toThrow();+ });++ it('different seeds produce different sequences (almost surely)', () => {+ fc.assert(+ fc.property(arbSeed, arbSeed, (seedA, seedB) => {+ fc.pre(Buffer.compare(Buffer.from(seedA), Buffer.from(seedB)) !== 0);+ const a = bigintPRNG(seedA);+ const b = bigintPRNG(seedB);+ const firstA = [a.next(), a.next(), a.next()];+ const firstB = [b.next(), b.next(), b.next()];+ // The probability of three consecutive collisions for distinct+ // seeds is < 2^-192 — effectively impossible.+ expect(firstA[0] === firstB[0] && firstA[1] === firstB[1] && firstA[2] === firstB[2]).toBe(+ false,+ );+ }),+ { numRuns: 30 },+ );+ });+});++// ─── weightedPick — the core lottery primitive ──────────────────────────────++describe('weightedPick', () => {+ it('returns a valid index for any non-empty weight set', () => {+ fc.assert(+ fc.property(arbWeights, arbSeed, (weights, seed) => {+ const idx = weightedPick(weights, seed);+ expect(idx).toBeGreaterThanOrEqual(0);+ expect(idx).toBeLessThan(weights.length);+ }),+ { numRuns: 200 },+ );+ });++ it('is deterministic — same weights + same seed → same index', () => {+ fc.assert(+ fc.property(arbWeights, arbSeed, (weights, seed) => {+ expect(weightedPick(weights, seed)).toBe(weightedPick(weights, seed));+ }),+ { numRuns: 100 },+ );+ });++ it('throws on an empty weight set', () => {+ expect(() => weightedPick([], randomBytes(32))).toThrow();+ });++ it('throws when total weight is zero', () => {+ expect(() => weightedPick([0n, 0n, 0n], randomBytes(32))).toThrow();+ });++ it('throws on a negative weight', () => {+ expect(() => weightedPick([5n, -1n, 3n], randomBytes(32))).toThrow();+ });++ it('always picks the only valid index when one weight dominates and others are zero', () => {+ fc.assert(+ fc.property(arbSeed, fc.integer({ min: 0, max: 4 }), (seed, dominantIdx) => {+ const weights = [0n, 0n, 0n, 0n, 0n];+ weights[dominantIdx] = 1000n;+ expect(weightedPick(weights, seed)).toBe(dominantIdx);+ }),+ { numRuns: 50 },+ );+ });++ it('distribution converges to expected probabilities (chi-square sanity)', () => {+ // We can't run a true chi-square here (it'd be flaky), but we can assert+ // each bucket lands within ±2.5% of its expected probability across 50k+ // samples — generous enough to avoid flake while still catching the+ // pre-fix "100% to last weight" regression that bit us during build.+ const weights = [100n, 200n, 300n, 400n];+ const n = 50_000;+ const counts = [0, 0, 0, 0];+ for (let i = 0; i < n; i++) {+ counts[weightedPick(weights, randomBytes(32))]++;+ }+ const expected = expectedProbs(weights);+ for (let i = 0; i < counts.length; i++) {+ const observed = counts[i] / n;+ expect(Math.abs(observed - expected[i])).toBeLessThan(0.025);+ }+ });++ it('respects ratio between large skewed weights (100:1)', () => {+ const weights = [1n, 100n];+ let bigCount = 0;+ const n = 10_000;+ for (let i = 0; i < n; i++) {+ if (weightedPick(weights, randomBytes(32)) === 1) bigCount++;+ }+ // Expected ~99.0% for index 1. Allow a 1.5% slop.+ expect(bigCount / n).toBeGreaterThan(0.975);+ expect(bigCount / n).toBeLessThan(1.0);+ });++ it('handles weight totals that exceed 2^64 (multi-chunk rejection sampling)', () => {+ const huge = (1n << 80n) + 1n;+ const weights = [huge, huge, huge];+ // Should not throw and should return a valid index.+ const idx = weightedPick(weights, randomBytes(32));+ expect(idx).toBeGreaterThanOrEqual(0);+ expect(idx).toBeLessThan(3);+ });+});++// ─── weightsHash — audit commit hash ────────────────────────────────────────++describe('weightsHash', () => {+ it('is order-invariant — sorting wallets before hashing means tuple order does not affect the result', () => {+ fc.assert(+ fc.property(+ fc.array(+ fc.record({+ wallet: fc+ .stringMatching(/^[A-Za-z0-9]{8,32}$/)+ .filter((s) => s.length > 0),+ weight: fc.integer({ min: 1, max: 1_000_000 }).map((n) => BigInt(n)),+ }),+ { minLength: 1, maxLength: 50 },+ ),+ (entries) => {+ // Dedupe by wallet (the hash collapses duplicates on wallet,+ // since `Map` semantics would; but our function doesn't+ // dedupe — sort only — so we test that explicitly).+ const unique = [];+ const seen = new Set();+ for (const e of entries) {+ if (seen.has(e.wallet)) continue;+ seen.add(e.wallet);+ unique.push(e);+ }+ const h1 = weightsHash(unique);+ const shuffled = [...unique].reverse();+ const h2 = weightsHash(shuffled);+ expect(h1).toBe(h2);+ },+ ),+ { numRuns: 100 },+ );+ });++ it('changes when any weight changes', () => {+ const entries = [+ { wallet: 'aaa', weight: 100n },+ { wallet: 'bbb', weight: 200n },+ ];+ const h1 = weightsHash(entries);+ const h2 = weightsHash([+ { wallet: 'aaa', weight: 100n },+ { wallet: 'bbb', weight: 201n }, // bumped by 1+ ]);+ expect(h1).not.toBe(h2);+ });++ it('changes when any wallet is added or removed', () => {+ const base = [+ { wallet: 'aaa', weight: 100n },+ { wallet: 'bbb', weight: 200n },+ ];+ const added = [...base, { wallet: 'ccc', weight: 50n }];+ const removed = base.slice(0, 1);+ expect(weightsHash(base)).not.toBe(weightsHash(added));+ expect(weightsHash(base)).not.toBe(weightsHash(removed));+ });++ it('produces a 64-char hex digest', () => {+ const h = weightsHash([{ wallet: 'aaa', weight: 1n }]);+ expect(h).toMatch(/^[0-9a-f]{64}$/);+ });+});diff --git a/api/_lib/coin/vitest.config.js b/api/_lib/coin/vitest.config.jsnew file mode 100644index 000000000..46efc64ce--- /dev/null+++ b/api/_lib/coin/vitest.config.js@@ -0,0 +1,20 @@+// Local vitest config for the coin module's property tests.+//+// The repo's top-level vitest.config.js only includes `tests/**` and+// `src/**`. The autonomy guardrails for the demo-coin work prevent+// modifying that config, so we keep a co-located config here. To run:+//+// npx vitest run --config api/_lib/coin/vitest.config.js+//+// When the demo graduates to production, fold these globs into the+// top-level config and delete this file.++import { defineConfig } from 'vitest/config';++export default defineConfig({+ test: {+ environment: 'node',+ include: ['api/_lib/coin/**/*.test.js'],+ testTimeout: 30_000,+ },+});diff --git a/api/_lib/env.js b/api/_lib/env.jsindex 374c6d5ea..12031e173 100644--- a/api/_lib/env.js+++ b/api/_lib/env.js@@ -291,6 +291,19 @@ export const env = {return opt('OPENROUTER_API_KEY');},+ // Alibaba Cloud DashScope (international) — direct Qwen access. Used by+ // /api/brain/chat when the user selects a Qwen provider. Falls back to+ // OPENROUTER_API_KEY when unset.+ get DASHSCOPE_API_KEY() {+ return opt('DASHSCOPE_API_KEY');+ },++ // ModelScope inference token — for Qwen3-Coder-480B on ModelScope's+ // OpenAI-compatible endpoint. Optional companion to DASHSCOPE_API_KEY.+ get MODELSCOPE_API_KEY() {+ return opt('MODELSCOPE_API_KEY');+ },+// Rider payment gate — Solana wallet that receives $THREE, and Helius webhook secret.get RIDER_VAULT_ADDRESS() {return opt('RIDER_VAULT_ADDRESS');diff --git a/api/agents/8004/agent.js b/api/agents/8004/agent.jsnew file mode 100644index 000000000..cd0917004--- /dev/null+++ b/api/agents/8004/agent.js@@ -0,0 +1,49 @@+// GET /api/agents/8004/agent?chain=8453&id=<agentId>+//+// Returns the full AgentSummary for a single ERC-8004 agent. The agentId is the+// numeric token id from the registry on the given chain.++import { SDK, DEFAULT_REGISTRIES } from 'agent0-sdk';+import { cors, method, error, wrap, json } from '../../_lib/http.js';++export const maxDuration = 30;++const SUPPORTED_CHAINS = Object.keys(DEFAULT_REGISTRIES).map(Number);++export default wrap(async function handler(req, res) {+ if (cors(req, res, { methods: 'GET,OPTIONS' })) return;+ if (method(req, res, ['GET'])) return;++ const url = new URL(req.url, 'http://x');+ const chainId = Number(url.searchParams.get('chain') || 8453);+ const idRaw = (url.searchParams.get('id') || '').trim();++ if (!SUPPORTED_CHAINS.includes(chainId)) {+ return error(res, 400, 'unsupported_chain',+ `chain ${chainId} not supported`, { supported: SUPPORTED_CHAINS });+ }+ if (!idRaw || !/^\d+$/.test(idRaw)) {+ return error(res, 400, 'bad_id', 'id must be a positive integer (numeric agentId)');+ }++ let sdk;+ try {+ sdk = new SDK({ chainId });+ } catch (e) {+ return error(res, 500, 'sdk_init_failed', e?.message || 'SDK init failed');+ }++ let agent;+ try {+ agent = await sdk.getAgent({ chainId, agentId: BigInt(idRaw) });+ } catch (e) {+ return error(res, 502, 'lookup_failed', e?.message || 'agent lookup failed');+ }++ if (!agent) return error(res, 404, 'not_found', `agent #${idRaw} not found on chain ${chainId}`);++ const safe = JSON.parse(JSON.stringify(agent, (_k, v) => (typeof v === 'bigint' ? v.toString() : v)));++ json(res, 200, { chainId, agentId: idRaw, agent: safe },+ { 'cache-control': 'public, max-age=30, stale-while-revalidate=120' });+});diff --git a/api/agents/8004/search.js b/api/agents/8004/search.jsnew file mode 100644index 000000000..213f223e2--- /dev/null+++ b/api/agents/8004/search.js@@ -0,0 +1,67 @@+// GET /api/agents/8004/search+// ?chain=8453|84532|11155111|1|137 (default 8453)+// &q=<search-string> (optional — filters by metadata text)+// &limit=<1..50> (default 20)+//+// Lists ERC-8004 agents from the public Agent0 subgraph for the given chain.+// Used by /demos/erc8004 — no auth, read-only.++import { SDK, DEFAULT_REGISTRIES } from 'agent0-sdk';+import { cors, method, error, wrap, json } from '../../_lib/http.js';++export const maxDuration = 30;++const SUPPORTED_CHAINS = Object.keys(DEFAULT_REGISTRIES).map(Number);++export default wrap(async function handler(req, res) {+ if (cors(req, res, { methods: 'GET,OPTIONS' })) return;+ if (method(req, res, ['GET'])) return;++ const url = new URL(req.url, 'http://x');+ const chainId = Number(url.searchParams.get('chain') || 8453);+ if (!SUPPORTED_CHAINS.includes(chainId)) {+ return error(res, 400, 'unsupported_chain',+ `chain ${chainId} not supported`, { supported: SUPPORTED_CHAINS });+ }+ const limit = Math.min(Math.max(Number(url.searchParams.get('limit')) || 20, 1), 50);+ const q = (url.searchParams.get('q') || '').trim().slice(0, 200);++ let sdk;+ try {+ sdk = new SDK({ chainId });+ } catch (e) {+ return error(res, 500, 'sdk_init_failed', e?.message || 'SDK init failed');+ }++ let agents;+ try {+ agents = await sdk.searchAgents(+ q ? { keyword: q } : undefined,+ { limit, chainIds: [chainId] },+ );+ } catch (e) {+ return error(res, 502, 'subgraph_error', e?.message || 'subgraph query failed');+ }++ const result = (agents || []).map((a) => ({+ agentId: a.agentId,+ chainId: a.chainId ?? chainId,+ address: a.address || null,+ owner: a.owner || null,+ name: a.name || null,+ description: a.description || null,+ registrationUri: a.registrationUri || null,+ registeredAtSeconds: a.registeredAtSeconds || null,+ feedbackCount: a.feedbackCount ?? null,+ averageRating: a.averageRating ?? null,+ walletAddresses: a.walletAddresses || null,+ endpoints: a.endpoints || null,+ }));++ json(res, 200, {+ chainId,+ query: q || null,+ count: result.length,+ agents: result,+ }, { 'cache-control': 'public, max-age=30, stale-while-revalidate=120' });+});diff --git a/api/agents/_id/_sub.js b/api/agents/_id/_sub.jsindex b7f40c86a..9113054ec 100644--- a/api/agents/_id/_sub.js+++ b/api/agents/_id/_sub.js@@ -72,7 +72,27 @@ const animationEntrySchema = z.object({addedAt: z.string().optional(),});-const animationsBodySchema = z.object({ animations: z.array(animationEntrySchema).max(30) });+// Animation state machine — optional graph stored alongside the flat clip+// list. The runtime AnimationStateMachine fills in defaults for any state+// not explicitly mapped here; the editor only persists overrides.+const animationStateSchema = z.object({+ clip: z.string().trim().min(1).max(60).optional(),+ loop: z.boolean().optional(),+ crossfade: z.number().min(0).max(5).optional(),+ oneShot: z.boolean().optional(),+ returnTo: z.string().trim().min(1).max(40).nullable().optional(),+}).strict();++const animationGraphSchema = z.object({+ states: z.record(animationStateSchema).optional(),+ transitions: z.record(z.string().trim().min(1).max(40)).optional(),+ initial: z.string().trim().min(1).max(40).optional(),+}).strict();++const animationsBodySchema = z.object({+ animations: z.array(animationEntrySchema).max(30),+ animationGraph: animationGraphSchema.optional(),+});export const handleAnimations = wrap(async (req, res, id) => {if (cors(req, res, { methods: 'PUT,OPTIONS', credentials: true })) return;@@ -85,12 +105,40 @@ export const handleAnimations = wrap(async (req, res, id) => {if (!existing) return error(res, 404, 'not_found', 'agent not found');if (existing.user_id !== auth.userId) return error(res, 403, 'forbidden', 'not your agent');+ const rawBody = await readJson(req);let parsed;- try { parsed = animationsBodySchema.parse(await readJson(req)); }+ try { parsed = animationsBodySchema.parse(rawBody); }catch (err) { if (err.name === 'ZodError') return error(res, 400, 'validation_error', err.errors[0]?.message || 'invalid body', { fields: err.errors }); throw err; }- await sql`UPDATE agent_identities SET meta = jsonb_set(COALESCE(meta, '{}'::jsonb), '{animations}', ${JSON.stringify(parsed.animations)}::jsonb, true) WHERE id = ${id}`;- return json(res, 200, { animations: parsed.animations });+ // Only touch meta.animationGraph when the request actually carries the+ // field, so saving the clip-array on its own doesn't clobber an existing+ // graph. `null` is a valid explicit "remove the graph" signal.+ const hasGraph = Object.prototype.hasOwnProperty.call(rawBody || {}, 'animationGraph');+ if (hasGraph) {+ await sql`+ UPDATE agent_identities+ SET meta = jsonb_set(+ jsonb_set(COALESCE(meta, '{}'::jsonb), '{animations}', ${JSON.stringify(parsed.animations)}::jsonb, true),+ '{animationGraph}',+ ${parsed.animationGraph ? JSON.stringify(parsed.animationGraph) : 'null'}::jsonb,+ true+ )+ WHERE id = ${id}+ `;+ } else {+ await sql`+ UPDATE agent_identities+ SET meta = jsonb_set(COALESCE(meta, '{}'::jsonb), '{animations}', ${JSON.stringify(parsed.animations)}::jsonb, true)+ WHERE id = ${id}+ `;+ }++ // Read back the persisted graph so the response reflects what's actually stored.+ const [row] = await sql`SELECT meta->'animationGraph' AS graph FROM agent_identities WHERE id = ${id}`;+ return json(res, 200, {+ animations: parsed.animations,+ animationGraph: row?.graph ?? null,+ });});// ── embed-policy ──────────────────────────────────────────────────────────────diff --git a/api/brain/chat.js b/api/brain/chat.jsnew file mode 100644index 000000000..0afac1893--- /dev/null+++ b/api/brain/chat.js@@ -0,0 +1,209 @@+// POST /api/brain/chat — Multi-LLM provider proxy for the /demos/brain page.+//+// Body: { provider, messages, system?, maxTokens? }+// Response: SSE stream with `data: <text-chunk>\n\n` events, terminated by+// `data: [DONE]\n\n` (matching the OpenAI SSE convention the demo's client+// already parses).+//+// Providers:+// - anthropic → Claude Sonnet 4.6 via ANTHROPIC_API_KEY+// - openai → gpt-4o-mini via OPENAI_API_KEY+// - qwen-plus → Alibaba DashScope qwen-plus, falls back to OpenRouter+// - qwen-vl-max → Alibaba DashScope qwen-vl-max, falls back to OpenRouter+// - modelscope-qwen → Qwen3-Coder-480B via ModelScope, falls back to OpenRouter+// - groq-llama → llama-3.3-70b on Groq via GROQ_API_KEY++import { streamText } from 'ai';+import { createAnthropic } from '@ai-sdk/anthropic';+import { createOpenAI } from '@ai-sdk/openai';+import { createQwen } from 'qwen-ai-provider';+import { env } from '../_lib/env.js';+import { cors, method, readJson, error, wrap } from '../_lib/http.js';++export const maxDuration = 60;++const PROVIDERS = {+ anthropic: {+ label: 'Claude Sonnet 4.6',+ network: 'Anthropic',+ build: () => {+ const key = env.ANTHROPIC_API_KEY;+ if (!key) return null;+ return createAnthropic({ apiKey: key })('claude-sonnet-4-6');+ },+ },+ openai: {+ label: 'GPT-4o-mini',+ network: 'OpenAI',+ build: () => {+ const key = env.OPENAI_API_KEY;+ if (!key) return null;+ return createOpenAI({ apiKey: key })('gpt-4o-mini');+ },+ },+ 'qwen-plus': {+ label: 'Qwen Plus',+ network: 'Alibaba DashScope',+ build: () => {+ if (env.DASHSCOPE_API_KEY) {+ return createQwen({ apiKey: env.DASHSCOPE_API_KEY })('qwen-plus');+ }+ if (env.OPENROUTER_API_KEY) {+ return openrouter()('qwen/qwen-2.5-72b-instruct');+ }+ return null;+ },+ },+ 'qwen-vl-max': {+ label: 'Qwen VL Max',+ network: 'Alibaba DashScope',+ build: () => {+ if (env.DASHSCOPE_API_KEY) {+ return createQwen({ apiKey: env.DASHSCOPE_API_KEY })('qwen-vl-max');+ }+ if (env.OPENROUTER_API_KEY) {+ return openrouter()('qwen/qwen-2.5-vl-72b-instruct');+ }+ return null;+ },+ },+ 'modelscope-qwen': {+ label: 'Qwen3-Coder-480B',+ network: 'ModelScope',+ build: () => {+ if (env.MODELSCOPE_API_KEY) {+ return createOpenAI({+ apiKey: env.MODELSCOPE_API_KEY,+ baseURL: 'https://api-inference.modelscope.cn/v1',+ })('Qwen/Qwen3-Coder-480B-A35B-Instruct');+ }+ if (env.OPENROUTER_API_KEY) {+ return openrouter()('qwen/qwen3-coder');+ }+ return null;+ },+ },+ 'groq-llama': {+ label: 'Llama 3.3 70B',+ network: 'Groq',+ build: () => {+ const key = env.GROQ_API_KEY;+ if (!key) return null;+ return createOpenAI({+ apiKey: key,+ baseURL: 'https://api.groq.com/openai/v1',+ })('llama-3.3-70b-versatile');+ },+ },+};++function openrouter() {+ return createOpenAI({+ apiKey: env.OPENROUTER_API_KEY,+ baseURL: 'https://openrouter.ai/api/v1',+ headers: { 'HTTP-Referer': 'https://three.ws', 'X-Title': 'three.ws brain demo' },+ });+}++function validateMessages(input) {+ if (!Array.isArray(input)) {+ throw Object.assign(new Error('messages must be an array'), { status: 400 });+ }+ if (input.length === 0 || input.length > 60) {+ throw Object.assign(new Error('messages length out of range'), { status: 400 });+ }+ const out = [];+ for (const m of input) {+ if (!m || typeof m !== 'object') throw Object.assign(new Error('bad message'), { status: 400 });+ const role = m.role;+ const content = typeof m.content === 'string' ? m.content.slice(0, 8000) : '';+ if (!['user', 'assistant'].includes(role)) {+ throw Object.assign(new Error('role must be user|assistant'), { status: 400 });+ }+ if (!content.trim()) throw Object.assign(new Error('empty content'), { status: 400 });+ out.push({ role, content });+ }+ return out;+}++export default wrap(async function handler(req, res) {+ if (cors(req, res, { methods: 'POST,OPTIONS' })) return;+ if (method(req, res, ['POST'])) return;++ let body;+ try {+ body = await readJson(req, 200_000);+ } catch (e) {+ return error(res, e.status || 400, 'bad_request', e.message);+ }++ const providerKey = String(body.provider || 'anthropic');+ const spec = PROVIDERS[providerKey];+ if (!spec) {+ return error(res, 400, 'unknown_provider', `unknown provider: ${providerKey}`, {+ available: Object.keys(PROVIDERS),+ });+ }++ const model = spec.build();+ if (!model) {+ return error(res, 503, 'provider_not_configured',+ `${spec.network} key not configured on this deployment`);+ }++ let messages;+ try {+ messages = validateMessages(body.messages);+ } catch (e) {+ return error(res, e.status || 400, 'bad_request', e.message);+ }++ const system = typeof body.system === 'string' ? body.system.slice(0, 4000) : undefined;+ const maxTokens = Math.min(Math.max(Number(body.maxTokens) || 1024, 32), 4096);++ res.statusCode = 200;+ res.setHeader('content-type', 'text/event-stream; charset=utf-8');+ res.setHeader('cache-control', 'no-cache, no-transform');+ res.setHeader('connection', 'keep-alive');+ res.setHeader('x-accel-buffering', 'no');++ const t0 = Date.now();+ res.write(`event: meta\ndata: ${JSON.stringify({+ provider: providerKey,+ label: spec.label,+ network: spec.network,+ })}\n\n`);++ try {+ const result = streamText({+ model,+ system,+ messages,+ maxOutputTokens: maxTokens,+ });++ for await (const delta of result.textStream) {+ res.write(`data: ${JSON.stringify(delta)}\n\n`);+ }++ const usage = await result.usage.catch(() => null);+ const elapsedMs = Date.now() - t0;+ res.write(`event: done\ndata: ${JSON.stringify({+ elapsedMs,+ usage: usage ? {+ inputTokens: usage.inputTokens,+ outputTokens: usage.outputTokens,+ totalTokens: usage.totalTokens,+ } : null,+ })}\n\n`);+ res.write('data: [DONE]\n\n');+ res.end();+ } catch (err) {+ const elapsedMs = Date.now() - t0;+ res.write(`event: error\ndata: ${JSON.stringify({+ message: err?.message || 'upstream error',+ elapsedMs,+ })}\n\n`);+ res.end();+ }+});diff --git a/api/demo/coin/[action].js b/api/demo/coin/[action].jsindex ea6f1f60c..604cab116 100644--- a/api/demo/coin/[action].js+++ b/api/demo/coin/[action].js@@ -18,6 +18,7 @@import { sql } from '../../_lib/db.js';import { cors, error, json, method, wrap } from '../../_lib/http.js';+import { limits, clientIp } from '../../_lib/rate-limit.js';import { listActiveCoins, loadCoinByMint } from '../../_lib/coin/index.js';function bigStr(v) {@@ -354,6 +355,21 @@ export default wrap(async (req, res) => {if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;if (!method(req, res, ['GET'])) return;+ // Rate-limit every public read endpoint by client IP. Re-uses the existing+ // `publicIp` bucket (60 req/min, Upstash-backed in prod, in-memory in dev)+ // so /api/demo/coin/* shares a single budget per IP across all actions —+ // preventing a hot dashboard tab from burning through the quota that a+ // share-bot calling /og also needs.+ const rl = await limits.publicIp(clientIp(req));+ if (!rl.success) {+ res.setHeader('retry-after', Math.ceil((rl.reset - Date.now()) / 1000));+ return error(res, 429, 'rate_limited', 'too many requests', {+ limit: rl.limit,+ remaining: rl.remaining,+ reset: rl.reset,+ });+ }+const action = req.query?.action;const handler = typeof action === 'string' ? HANDLERS[action] : null;if (!handler) return error(res, 404, 'not_found', 'unknown action');diff --git a/api/demo/coin/og.js b/api/demo/coin/og.jsnew file mode 100644index 000000000..388646f95--- /dev/null+++ b/api/demo/coin/og.js@@ -0,0 +1,503 @@+// GET /api/demo/coin/og?mint=<mint>&draw=<draw_id>+// 1200×630 PNG card for sharing a three.ws lottery + reflection draw outcome.+//+// Modes:+// • ?mint + ?draw → winner card (drand round, winner wallet, pot amount)+// • ?mint only → state card (live pot, eligible holders, next draw eta)+// • no params → generic branding card+//+// Rendered via @vercel/og's ImageResponse. The node-runtime entry point is used+// (this file is a plain Vercel function, not an Edge function), so the worker+// runs inside the same lambda as other /api/demo/coin/* handlers.+//+// Caching: PNGs are deterministic for resolved draws (status ∈ {resolved, paid}),+// so we set a long-lived cache header for those. State-only cards are short-lived+// so they pick up new pot values.++import { ImageResponse } from '@vercel/og';++import { sql } from '../../_lib/db.js';+import { limits, clientIp } from '../../_lib/rate-limit.js';+import { loadCoinByMint, listActiveCoins } from '../../_lib/coin/index.js';++const WIDTH = 1200;+const HEIGHT = 630;++// Inlined design tokens — kept in sync with public/demo/coin/index.html.+const COLOR = {+ bg: '#0a0a0f',+ bgGradient: 'linear-gradient(135deg, #0a0a0f 0%, #14141c 60%, #1a1426 100%)',+ panel: '#14141c',+ border: '#1f1f29',+ muted: '#8a8a99',+ text: '#eee',+ textBright: '#fff',+ accent: '#6a5cff',+ accentLottery: '#ffba2e',+ accentReflection: '#6a5cff',+ demo: '#ffba2e',+};++function shortWallet(w) {+ if (!w) return '—';+ return `${w.slice(0, 6)}…${w.slice(-6)}`;+}++function lamportsToSolDisplay(v) {+ if (v == null) return '0';+ const big = typeof v === 'bigint' ? v : BigInt(String(v));+ const whole = big / 1_000_000_000n;+ const frac = big % 1_000_000_000n;+ const fracStr = frac.toString().padStart(9, '0').slice(0, 4).replace(/0+$/, '');+ return fracStr ? `${whole.toLocaleString()}.${fracStr}` : whole.toLocaleString();+}++async function resolveCoin(mint) {+ if (mint) return loadCoinByMint(mint);+ const list = await listActiveCoins();+ return list.length === 1 ? list[0] : null;+}++async function loadDraw(coinId, drawId) {+ if (!coinId || !drawId) return null;+ const [row] = await sql`+ select draw_id, drand_round, pot_lamports::text as pot,+ winner_wallet, drand_randomness, status, created_at, paid_at+ from coin_draws+ where coin_id = ${coinId} and draw_id = ${drawId}+ limit 1+ `;+ return row || null;+}++function brandHeader(label) {+ return {+ type: 'div',+ props: {+ style: {+ display: 'flex',+ alignItems: 'center',+ gap: 16,+ fontSize: 22,+ color: COLOR.muted,+ letterSpacing: 4,+ textTransform: 'uppercase',+ fontWeight: 600,+ },+ children: [+ {+ type: 'div',+ props: {+ style: {+ color: COLOR.text,+ fontWeight: 800,+ letterSpacing: 0,+ textTransform: 'none',+ fontSize: 26,+ },+ children: 'three.ws',+ },+ },+ {+ type: 'div',+ props: {+ style: {+ width: 6,+ height: 6,+ borderRadius: 3,+ background: COLOR.muted,+ },+ children: '',+ },+ },+ { type: 'div', props: { children: label } },+ {+ type: 'div',+ props: {+ style: {+ marginLeft: 'auto',+ padding: '6px 14px',+ background: 'rgba(255,186,46,0.12)',+ border: '1px solid rgba(255,186,46,0.4)',+ color: COLOR.demo,+ borderRadius: 999,+ fontSize: 18,+ letterSpacing: 4,+ fontWeight: 700,+ },+ children: 'DEMO',+ },+ },+ ],+ },+ };+}++function statCard({ label, value, sub, color }) {+ return {+ type: 'div',+ props: {+ style: {+ display: 'flex',+ flexDirection: 'column',+ padding: '24px 28px',+ border: `1px solid ${COLOR.border}`,+ borderRadius: 14,+ background: COLOR.panel,+ gap: 8,+ minWidth: 320,+ },+ children: [+ {+ type: 'div',+ props: {+ style: {+ fontSize: 18,+ color: COLOR.muted,+ textTransform: 'uppercase',+ letterSpacing: 3,+ fontWeight: 600,+ },+ children: label,+ },+ },+ {+ type: 'div',+ props: {+ style: {+ fontSize: 56,+ color: color || COLOR.text,+ fontWeight: 800,+ lineHeight: 1.05,+ },+ children: value,+ },+ },+ sub+ ? {+ type: 'div',+ props: {+ style: { fontSize: 20, color: COLOR.muted },+ children: sub,+ },+ }+ : null,+ ].filter(Boolean),+ },+ };+}++function frame(children) {+ return {+ type: 'div',+ props: {+ style: {+ display: 'flex',+ flexDirection: 'column',+ width: '100%',+ height: '100%',+ padding: 56,+ background: COLOR.bgGradient,+ color: COLOR.text,+ fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',+ },+ children,+ },+ };+}++function winnerCard({ coin, draw }) {+ const headerLabel = draw.status === 'paid' ? 'Lottery payout' : 'Lottery winner';+ return frame([+ brandHeader(headerLabel),+ {+ type: 'div',+ props: {+ style: {+ display: 'flex',+ flexDirection: 'column',+ marginTop: 40,+ gap: 28,+ },+ children: [+ {+ type: 'div',+ props: {+ style: {+ fontSize: 90,+ fontWeight: 900,+ color: COLOR.textBright,+ lineHeight: 1.05,+ letterSpacing: -2,+ },+ children: `${lamportsToSolDisplay(draw.pot)} SOL`,+ },+ },+ {+ type: 'div',+ props: {+ style: {+ fontSize: 28,+ color: COLOR.muted,+ },+ children: `paid to ${shortWallet(draw.winner_wallet)} · ${coin.symbol}`,+ },+ },+ ],+ },+ },+ {+ type: 'div',+ props: {+ style: {+ marginTop: 'auto',+ display: 'flex',+ gap: 20,+ alignItems: 'center',+ },+ children: [+ statCard({+ label: 'Drand round',+ value: `#${Number(draw.drand_round)}`,+ sub: 'verifiable randomness',+ color: COLOR.accent,+ }),+ statCard({+ label: 'Status',+ value: draw.status,+ sub: draw.paid_at ? new Date(draw.paid_at).toUTCString() : '',+ color: draw.status === 'paid' ? COLOR.accentLottery : COLOR.text,+ }),+ ],+ },+ },+ ]);+}++function stateCard({ coin, lottery, reflection, eligible }) {+ return frame([+ brandHeader(`Lottery + Reflection · ${coin.symbol}`),+ {+ type: 'div',+ props: {+ style: {+ display: 'flex',+ flexDirection: 'column',+ marginTop: 40,+ gap: 12,+ },+ children: [+ {+ type: 'div',+ props: {+ style: {+ fontSize: 36,+ color: COLOR.muted,+ fontWeight: 500,+ },+ children: 'Every holder is a ticket',+ },+ },+ {+ type: 'div',+ props: {+ style: {+ fontSize: 76,+ color: COLOR.textBright,+ fontWeight: 900,+ lineHeight: 1.05,+ letterSpacing: -2,+ },+ children: `${lamportsToSolDisplay(lottery)} SOL`,+ },+ },+ {+ type: 'div',+ props: {+ style: {+ fontSize: 26,+ color: COLOR.muted,+ },+ children: 'in the lottery pot, drawn hourly',+ },+ },+ ],+ },+ },+ {+ type: 'div',+ props: {+ style: {+ marginTop: 'auto',+ display: 'flex',+ gap: 20,+ },+ children: [+ statCard({+ label: 'Reflection pot',+ value: `${lamportsToSolDisplay(reflection)} SOL`,+ sub: 'pro-rata to holders',+ color: COLOR.accentReflection,+ }),+ statCard({+ label: 'Eligible holders',+ value: String(eligible),+ sub: 'sharing every drip',+ color: COLOR.accentLottery,+ }),+ ],+ },+ },+ ]);+}++function brandCard() {+ return frame([+ brandHeader('Lottery + Reflection'),+ {+ type: 'div',+ props: {+ style: {+ display: 'flex',+ flexDirection: 'column',+ margin: 'auto 0',+ gap: 24,+ },+ children: [+ {+ type: 'div',+ props: {+ style: {+ fontSize: 96,+ color: COLOR.textBright,+ fontWeight: 900,+ letterSpacing: -2,+ lineHeight: 1.0,+ },+ children: 'Every holder',+ },+ },+ {+ type: 'div',+ props: {+ style: {+ fontSize: 96,+ color: COLOR.accent,+ fontWeight: 900,+ letterSpacing: -2,+ lineHeight: 1.0,+ },+ children: 'is a ticket.',+ },+ },+ {+ type: 'div',+ props: {+ style: { fontSize: 32, color: COLOR.muted, marginTop: 16 },+ children: 'Hourly lottery + passive SOL reflection · three.ws',+ },+ },+ ],+ },+ },+ ]);+}++function imageResponseFor(node, { immutable }) {+ const cacheControl = immutable+ ? 'public, max-age=31536000, s-maxage=31536000, immutable'+ : 'public, max-age=30, s-maxage=30, stale-while-revalidate=600';+ return new ImageResponse(node, {+ width: WIDTH,+ height: HEIGHT,+ headers: { 'cache-control': cacheControl },+ });+}++async function sendImageResponse(res, imageResponse) {+ // Convert Web Response → Node ServerResponse. Headers first, then stream the body.+ for (const [key, value] of imageResponse.headers.entries()) {+ res.setHeader(key, value);+ }+ const ab = await imageResponse.arrayBuffer();+ res.statusCode = imageResponse.status;+ res.end(Buffer.from(ab));+}++export default async function handler(req, res) {+ // CORS for cross-origin embeds (Discord, X, etc. fetch OG images server-side+ // but a permissive header doesn't hurt and makes browser-side <img> tags work).+ if (req.method === 'OPTIONS') {+ res.setHeader('access-control-allow-origin', '*');+ res.setHeader('access-control-allow-methods', 'GET,OPTIONS');+ res.statusCode = 204;+ res.end();+ return;+ }+ if (req.method !== 'GET') {+ res.statusCode = 405;+ res.setHeader('content-type', 'application/json');+ res.end(JSON.stringify({ error: 'method_not_allowed' }));+ return;+ }++ // Share-card endpoints are hammered by social-card scrapers (Twitter, Slack,+ // Discord, iMessage, every preview crawler). Keep the same 60/min/IP budget+ // as the JSON endpoints so a misbehaving scraper can't OOM the function or+ // burn through downstream RPC.+ const rl = await limits.publicIp(clientIp(req));+ if (!rl.success) {+ res.statusCode = 429;+ res.setHeader('retry-after', Math.ceil((rl.reset - Date.now()) / 1000));+ res.setHeader('content-type', 'application/json');+ res.end(JSON.stringify({ error: 'rate_limited', limit: rl.limit, reset: rl.reset }));+ return;+ }++ const url = new URL(req.url, 'http://x');+ const mint = url.searchParams.get('mint') || undefined;+ const drawId = url.searchParams.get('draw') || undefined;++ try {+ const coin = mint || (await listActiveCoins()).length === 1 ? await resolveCoin(mint) : null;+ if (!coin) {+ return sendImageResponse(res, imageResponseFor(brandCard(), { immutable: false }));+ }++ if (drawId) {+ const draw = await loadDraw(coin.id, drawId);+ if (!draw || !draw.winner_wallet) {+ return sendImageResponse(+ res,+ imageResponseFor(brandCard(), { immutable: false }),+ );+ }+ const immutable = draw.status === 'paid';+ return sendImageResponse(res, imageResponseFor(winnerCard({ coin, draw }), { immutable }));+ }++ const [agg] = await sql`+ select count(*) filter (where balance > ${coin.min_holder_balance}::bigint) as eligible+ from coin_holders where coin_id = ${coin.id}+ `;+ const eligible = Number(agg?.eligible || 0);+ return sendImageResponse(+ res,+ imageResponseFor(+ stateCard({+ coin,+ lottery: coin.lottery_pot_lamports,+ reflection: coin.reflection_pot_lamports,+ eligible,+ }),+ { immutable: false },+ ),+ );+ } catch (err) {+ // Never let an OG image fail open — fall back to the brand card so+ // share previews still look intentional rather than broken-image grey.+ res.statusCode = 200;+ await sendImageResponse(res, imageResponseFor(brandCard(), { immutable: false }));+ console.error('[og] render failed:', err?.message || err);+ }+}diff --git a/api/tts/speak.js b/api/tts/speak.jsnew file mode 100644index 000000000..7d2bfa3d5--- /dev/null+++ b/api/tts/speak.js@@ -0,0 +1,92 @@+// POST /api/tts/speak — OpenAI TTS proxy used by /demos/lipsync-tts.+//+// Body: { text, voice?, model?, format? }+// Response: streaming audio in the requested format (default audio/mpeg).+//+// The browser pipes the response into a Web Audio source and feeds the+// analyser into wawa-lipsync for real-time viseme generation — no server-side+// audio analysis required.++import { env } from '../_lib/env.js';+import { cors, method, readJson, error, wrap } from '../_lib/http.js';++export const maxDuration = 60;++const VOICES = new Set([+ 'alloy', 'ash', 'ballad', 'coral', 'echo', 'fable',+ 'nova', 'onyx', 'sage', 'shimmer', 'verse',+]);+const MODELS = new Set(['tts-1', 'tts-1-hd', 'gpt-4o-mini-tts']);+const FORMATS = {+ mp3: 'audio/mpeg',+ opus: 'audio/ogg',+ aac: 'audio/aac',+ flac: 'audio/flac',+ wav: 'audio/wav',+ pcm: 'audio/pcm',+};++export default wrap(async function handler(req, res) {+ if (cors(req, res, { methods: 'POST,OPTIONS' })) return;+ if (method(req, res, ['POST'])) return;++ const key = env.OPENAI_API_KEY;+ if (!key) return error(res, 503, 'not_configured', 'OPENAI_API_KEY not set');++ let body;+ try {+ body = await readJson(req, 50_000);+ } catch (e) {+ return error(res, e.status || 400, 'bad_request', e.message);+ }++ const text = typeof body.text === 'string' ? body.text.trim() : '';+ if (!text) return error(res, 400, 'bad_request', 'text is required');+ if (text.length > 4096) {+ return error(res, 400, 'bad_request', 'text exceeds 4096 characters');+ }++ const voice = VOICES.has(body.voice) ? body.voice : 'nova';+ const model = MODELS.has(body.model) ? body.model : 'gpt-4o-mini-tts';+ const formatKey = body.format && FORMATS[body.format] ? body.format : 'mp3';+ const speed = Math.min(Math.max(Number(body.speed) || 1.0, 0.5), 2.0);++ let upstream;+ try {+ upstream = await fetch('https://api.openai.com/v1/audio/speech', {+ method: 'POST',+ headers: {+ 'authorization': `Bearer ${key}`,+ 'content-type': 'application/json',+ },+ body: JSON.stringify({+ model, voice, input: text, response_format: formatKey, speed,+ }),+ });+ } catch (e) {+ return error(res, 502, 'upstream_unreachable', e?.message || 'fetch failed');+ }++ if (!upstream.ok || !upstream.body) {+ let detail = '';+ try { detail = (await upstream.text()).slice(0, 500); } catch {}+ return error(res, 502, 'upstream_error', `OpenAI TTS ${upstream.status}: ${detail}`);+ }++ res.statusCode = 200;+ res.setHeader('content-type', FORMATS[formatKey]);+ res.setHeader('cache-control', 'no-store');+ res.setHeader('x-tts-voice', voice);+ res.setHeader('x-tts-model', model);++ const reader = upstream.body.getReader();+ try {+ for (;;) {+ const { done, value } = await reader.read();+ if (done) break;+ res.write(Buffer.from(value));+ }+ } finally {+ res.end();+ }+});diff --git a/avatar-sdk/package.json b/avatar-sdk/package.jsonindex 4d47c6ded..16b1091f3 100644--- a/avatar-sdk/package.json+++ b/avatar-sdk/package.json@@ -44,6 +44,21 @@"import": "./dist/index.mjs","default": "./dist/index.mjs"},+ "./viewer": {+ "types": "./types/viewer.d.ts",+ "import": "./src/viewer.js",+ "default": "./src/viewer.js"+ },+ "./agent": {+ "types": "./types/element.d.ts",+ "import": "./src/agent.js",+ "default": "./src/agent.js"+ },+ "./react": {+ "types": "./types/react.d.ts",+ "import": "./src/react.jsx",+ "default": "./src/react.jsx"+ },"./style.css": "./dist/style.css"},"files": [@@ -58,11 +73,15 @@"prepublishOnly": "npm run build"},"peerDependencies": {- "three": ">=0.150.0"+ "three": ">=0.150.0",+ "react": ">=18.0.0"},"peerDependenciesMeta": {"three": {"optional": false+ },+ "react": {+ "optional": true}},"engines": {diff --git a/avatar-sdk/src/agent.js b/avatar-sdk/src/agent.jsnew file mode 100644index 000000000..4b36a0576--- /dev/null+++ b/avatar-sdk/src/agent.js@@ -0,0 +1,41 @@+// Aliased entry for the heavy <agent-3d> runtime.+//+// The full element (chat loop, voice, lipsync, skills, animations) lives in+// the prebuilt monolith at `../dist/index.mjs`. This file exists so that+// consumers can write the clearer subpath import:+//+// import '@three-ws/avatar/agent';+//+// instead of leaning on the bare-package import for side-effectful element+// registration. The dynamic import keeps the 3.3 MB bundle off the critical+// path for callers that only need `<three-ws-viewer>` from `./viewer`.++let _readyPromise = null;++/**+ * Ensures the <agent-3d> custom element is registered. Returns a Promise+ * that resolves once the monolith finishes loading. Safe to call multiple+ * times — the underlying import is cached.+ *+ * @returns {Promise<void>}+ */+export function ensureAgent3D() {+ if (typeof customElements !== 'undefined' && customElements.get('agent-3d')) {+ return Promise.resolve();+ }+ if (!_readyPromise) {+ _readyPromise = import('../dist/index.mjs').then(() => undefined);+ }+ return _readyPromise;+}++// Fire-and-forget eager load. Importing this module by itself is enough to+// register <agent-3d>; awaiting `ensureAgent3D()` is only needed when the+// caller wants to know exactly when the element is ready.+if (typeof window !== 'undefined') {+ ensureAgent3D().catch((err) => {+ console.error('[@three-ws/avatar/agent] failed to load monolith:', err);+ });+}++export default ensureAgent3D;diff --git a/avatar-sdk/src/react.jsx b/avatar-sdk/src/react.jsxnew file mode 100644index 000000000..57e48b287--- /dev/null+++ b/avatar-sdk/src/react.jsx@@ -0,0 +1,304 @@+'use client';++// React wrapper around @three-ws/avatar.+//+// Exports:+// <Avatar src alt /> — wraps <three-ws-viewer> (light viewer)+// <AgentAvatar avatarId src /> — wraps the heavy <agent-3d> element+// <AvatarCreator open onExport onClose /> — declarative wrapper around+// the imperative AvatarCreator class+// useAvatar(id) — fetch /api/avatars/:id metadata+//+// Peer dep: react >= 18. No other runtime deps.+// React 19 server components: the file is marked `'use client'` and every+// component touches the DOM, so this module is only valid in client trees.++import {+ useEffect,+ useRef,+ useState,+ useCallback,+ createElement,+ forwardRef,+} from 'react';++// ── <Avatar> ────────────────────────────────────────────────────────────────++/**+ * Pure-visual avatar viewer. Mounts a <three-ws-viewer> web component and+ * keeps its attributes in sync with React props.+ *+ * @param {object} props+ * @param {string} props.src — GLB URL.+ * @param {string} [props.alt] — accessibility label / caption.+ * @param {string} [props.background] — CSS color or 'transparent'.+ * @param {React.CSSProperties} [props.style]+ * @param {string} [props.className]+ * @param {(detail: { url: string }) => void} [props.onLoad]+ * @param {(detail: { url: string, error: Error }) => void} [props.onError]+ */+export const Avatar = forwardRef(function Avatar(props, forwardedRef) {+ const { src, alt, background, style, className, onLoad, onError, ...rest } = props;+ const localRef = useRef(null);++ // Side-effect: register <three-ws-viewer> on first mount.+ useEffect(() => {+ import('./viewer.js').catch((err) => {+ console.error('[@three-ws/avatar/react] failed to load viewer:', err);+ });+ }, []);++ // Sync `src` attribute.+ useEffect(() => {+ const el = localRef.current;+ if (!el) return;+ if (src) el.setAttribute('src', src);+ else el.removeAttribute('src');+ }, [src]);++ // Sync `alt` attribute.+ useEffect(() => {+ const el = localRef.current;+ if (!el) return;+ if (alt) el.setAttribute('alt', alt);+ else el.removeAttribute('alt');+ }, [alt]);++ // Sync `background` attribute.+ useEffect(() => {+ const el = localRef.current;+ if (!el) return;+ if (background) el.setAttribute('background', background);+ else el.removeAttribute('background');+ }, [background]);++ // Bridge custom events → React props.+ useEffect(() => {+ const el = localRef.current;+ if (!el) return;+ const handleLoad = (e) => onLoad?.(e.detail || {});+ const handleError = (e) => onError?.(e.detail || {});+ el.addEventListener('load', handleLoad);+ el.addEventListener('error', handleError);+ return () => {+ el.removeEventListener('load', handleLoad);+ el.removeEventListener('error', handleError);+ };+ }, [onLoad, onError]);++ const setRef = useCallback(+ (node) => {+ localRef.current = node;+ if (typeof forwardedRef === 'function') forwardedRef(node);+ else if (forwardedRef) forwardedRef.current = node;+ },+ [forwardedRef],+ );++ return createElement('three-ws-viewer', {+ ref: setRef,+ style,+ class: className,+ ...rest,+ });+});++// ── <AgentAvatar> ───────────────────────────────────────────────────────────++/**+ * Wraps the heavy <agent-3d> element. The SDK monolith is lazy-loaded the+ * first time this component mounts so callers that only use <Avatar> never+ * pay the 3 MB cost.+ *+ * @param {object} props+ * @param {string} [props.avatarId] — three.ws avatar UUID.+ * @param {string} [props.src] — direct GLB URL (alternative to avatarId).+ * @param {string} [props.iosSrc] — USDZ URL for iOS AR Quick Look.+ * @param {boolean} [props.kiosk] — hide the debug GUI.+ * @param {React.CSSProperties} [props.style]+ * @param {string} [props.className]+ */+export const AgentAvatar = forwardRef(function AgentAvatar(props, forwardedRef) {+ const { avatarId, src, iosSrc, kiosk, style, className, ...rest } = props;+ const localRef = useRef(null);+ const [ready, setReady] = useState(+ typeof customElements !== 'undefined' && !!customElements.get('agent-3d'),+ );++ useEffect(() => {+ let cancelled = false;+ import('./agent.js')+ .then((mod) => mod.ensureAgent3D())+ .then(() => {+ if (!cancelled) setReady(true);+ })+ .catch((err) => {+ console.error('[@three-ws/avatar/react] failed to load <agent-3d>:', err);+ });+ return () => {+ cancelled = true;+ };+ }, []);++ useEffect(() => {+ const el = localRef.current;+ if (!el || !ready) return;+ if (avatarId) el.setAttribute('avatarid', avatarId);+ else el.removeAttribute('avatarid');+ }, [avatarId, ready]);++ useEffect(() => {+ const el = localRef.current;+ if (!el || !ready) return;+ if (src) el.setAttribute('src', src);+ else el.removeAttribute('src');+ }, [src, ready]);++ useEffect(() => {+ const el = localRef.current;+ if (!el || !ready) return;+ if (iosSrc) el.setAttribute('ios-src', iosSrc);+ else el.removeAttribute('ios-src');+ }, [iosSrc, ready]);++ useEffect(() => {+ const el = localRef.current;+ if (!el || !ready) return;+ if (kiosk) el.setAttribute('kiosk', '');+ else el.removeAttribute('kiosk');+ }, [kiosk, ready]);++ const setRef = useCallback(+ (node) => {+ localRef.current = node;+ if (typeof forwardedRef === 'function') forwardedRef(node);+ else if (forwardedRef) forwardedRef.current = node;+ },+ [forwardedRef],+ );++ if (!ready) {+ return createElement('div', {+ ref: setRef,+ style: { ...style, display: 'flex', alignItems: 'center', justifyContent: 'center' },+ className,+ 'data-three-ws-agent-loading': '',+ ...rest,+ }, 'Loading three.ws avatar…');+ }++ return createElement('agent-3d', {+ ref: setRef,+ style,+ class: className,+ ...rest,+ });+});++// ── <AvatarCreator> ─────────────────────────────────────────────────────────++/**+ * Declarative wrapper around the imperative AvatarCreator class. The modal+ * is opened / closed based on the `open` prop. Exports are bridged through+ * `onExport`; the user dismissing the modal fires `onClose`.+ *+ * @param {object} props+ * @param {boolean} props.open — controls modal visibility.+ * @param {(blob: Blob) => void | Promise<void>} [props.onExport]+ * @param {() => void} [props.onClose]+ * @param {string} [props.studioUrl]+ * @param {string} [props.sessionUrl] — edit-mode session URL for an existing avatar.+ */+export function AvatarCreator(props) {+ const { open, onExport, onClose, studioUrl, sessionUrl } = props;+ const instanceRef = useRef(null);++ // Keep latest callbacks in refs so we don't need to dispose/recreate+ // the modal every time the parent re-renders with a fresh handler.+ const onExportRef = useRef(onExport);+ const onCloseRef = useRef(onClose);+ useEffect(() => {+ onExportRef.current = onExport;+ }, [onExport]);+ useEffect(() => {+ onCloseRef.current = onClose;+ }, [onClose]);++ useEffect(() => {+ let cancelled = false;+ if (!open) return undefined;++ import('./creator.js')+ .then((mod) => {+ if (cancelled) return;+ const creator = new mod.AvatarCreator({+ studioUrl,+ avaturnSessionUrl: sessionUrl,+ onExport: (blob) => onExportRef.current?.(blob),+ onClose: () => onCloseRef.current?.(),+ });+ instanceRef.current = creator;+ return creator.open();+ })+ .catch((err) => {+ console.error('[@three-ws/avatar/react] AvatarCreator open failed:', err);+ });++ return () => {+ cancelled = true;+ if (instanceRef.current) {+ instanceRef.current.dispose();+ instanceRef.current = null;+ }+ };+ }, [open, studioUrl, sessionUrl]);++ return null;+}++// ── useAvatar(id) ───────────────────────────────────────────────────────────++/**+ * Fetch a three.ws avatar record by id. Returns `{ avatar, loading, error }`.+ * Re-fetches when `id` changes; aborts in-flight requests on unmount.+ *+ * @param {string | null | undefined} id+ * @param {object} [opts]+ * @param {string} [opts.apiOrigin] — override the API origin. Defaults to same-origin.+ * @returns {{ avatar: any | null, loading: boolean, error: Error | null }}+ */+export function useAvatar(id, opts) {+ const apiOrigin = opts?.apiOrigin;+ const [state, setState] = useState({ avatar: null, loading: !!id, error: null });++ useEffect(() => {+ if (!id) {+ setState({ avatar: null, loading: false, error: null });+ return undefined;+ }++ const controller = new AbortController();+ setState({ avatar: null, loading: true, error: null });++ const base = apiOrigin ? apiOrigin.replace(/\/$/, '') : '';+ fetch(`${base}/api/avatars/${encodeURIComponent(id)}`, {+ signal: controller.signal,+ headers: { accept: 'application/json' },+ })+ .then(async (res) => {+ if (!res.ok) throw new Error(`avatar fetch failed: ${res.status}`);+ const body = await res.json();+ // API may return { avatar: {...} } or the record directly.+ const avatar = body?.avatar || body;+ setState({ avatar, loading: false, error: null });+ })+ .catch((err) => {+ if (err?.name === 'AbortError') return;+ setState({ avatar: null, loading: false, error: err });+ });++ return () => controller.abort();+ }, [id, apiOrigin]);++ return state;+}diff --git a/avatar-sdk/src/viewer.js b/avatar-sdk/src/viewer.jsnew file mode 100644index 000000000..6f484f15d--- /dev/null+++ b/avatar-sdk/src/viewer.js@@ -0,0 +1,226 @@+// Minimal <three-ws-viewer> web component.+//+// Pure visual: loads a GLB at `src`, renders it with OrbitControls and a+// two-light setup. No chat, no voice, no skills — for sites that just want a+// 3D preview without pulling in the full <agent-3d> runtime.+//+// Peer-depends on `three` (>=0.150.0). Import paths use `three/addons/*`,+// which resolves through your bundler's normal three.js entry. Consumers+// that bundle this file get tree-shaking for free; the heavy <agent-3d>+// runtime in `./agent` is never touched.++import {+ Scene,+ PerspectiveCamera,+ WebGLRenderer,+ AmbientLight,+ DirectionalLight,+ Box3,+ Vector3,+ Color,+ PMREMGenerator,+ ACESFilmicToneMapping,+ SRGBColorSpace,+} from 'three';+import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';+import { OrbitControls } from 'three/addons/controls/OrbitControls.js';+import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';++const TAG = 'three-ws-viewer';++class ThreeWsViewerElement extends HTMLElement {+ static get observedAttributes() {+ return ['src', 'alt', 'background'];+ }++ constructor() {+ super();+ this._shadow = this.attachShadow({ mode: 'open' });+ this._shadow.innerHTML = `<style>+ :host { display: block; position: relative; width: 100%; height: 100%; min-height: 320px; }+ canvas { display: block; width: 100%; height: 100%; outline: none; }+ .label { position: absolute; inset: auto 0 8px 0; text-align: center; font: 12px system-ui, sans-serif; color: rgba(255,255,255,0.65); pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }+ </style>`;+ this._canvas = document.createElement('canvas');+ this._shadow.appendChild(this._canvas);+ this._label = null;++ this._scene = null;+ this._camera = null;+ this._renderer = null;+ this._controls = null;+ this._model = null;+ this._raf = 0;+ this._resizeObs = null;+ this._loadToken = 0;+ }++ connectedCallback() {+ this._init();+ this._render = this._render.bind(this);+ this._raf = requestAnimationFrame(this._render);+ const src = this.getAttribute('src');+ if (src) this._loadModel(src);+ this._applyAlt(this.getAttribute('alt'));+ }++ disconnectedCallback() {+ cancelAnimationFrame(this._raf);+ this._raf = 0;+ if (this._resizeObs) {+ this._resizeObs.disconnect();+ this._resizeObs = null;+ }+ if (this._controls) {+ this._controls.dispose();+ this._controls = null;+ }+ if (this._renderer) {+ this._renderer.dispose();+ this._renderer.forceContextLoss?.();+ this._renderer = null;+ }+ this._scene = null;+ this._camera = null;+ this._model = null;+ }++ attributeChangedCallback(name, _old, value) {+ if (!this._scene) return;+ if (name === 'src') this._loadModel(value);+ else if (name === 'alt') this._applyAlt(value);+ else if (name === 'background') this._applyBackground(value);+ }++ _init() {+ this._scene = new Scene();+ this._applyBackground(this.getAttribute('background'));++ const width = this.clientWidth || 320;+ const height = this.clientHeight || 320;++ this._camera = new PerspectiveCamera(35, width / height, 0.05, 200);+ this._camera.position.set(0, 1.3, 3);++ this._renderer = new WebGLRenderer({+ canvas: this._canvas,+ antialias: true,+ alpha: true,+ powerPreference: 'high-performance',+ });+ this._renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));+ this._renderer.setSize(width, height, false);+ this._renderer.outputColorSpace = SRGBColorSpace;+ this._renderer.toneMapping = ACESFilmicToneMapping;+ this._renderer.toneMappingExposure = 1.0;++ const pmrem = new PMREMGenerator(this._renderer);+ this._scene.environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;++ this._scene.add(new AmbientLight(0xffffff, 0.55));+ const key = new DirectionalLight(0xffffff, 1.1);+ key.position.set(2, 4, 3);+ this._scene.add(key);++ this._controls = new OrbitControls(this._camera, this._canvas);+ this._controls.enableDamping = true;+ this._controls.dampingFactor = 0.08;+ this._controls.target.set(0, 1.0, 0);+ this._controls.update();++ this._resizeObs = new ResizeObserver(() => this._handleResize());+ this._resizeObs.observe(this);+ }++ _handleResize() {+ if (!this._renderer || !this._camera) return;+ const w = this.clientWidth || 1;+ const h = this.clientHeight || 1;+ this._renderer.setSize(w, h, false);+ this._camera.aspect = w / h;+ this._camera.updateProjectionMatrix();+ }++ async _loadModel(url) {+ if (!url) return;+ const token = ++this._loadToken;+ const loader = new GLTFLoader();+ try {+ const gltf = await loader.loadAsync(url);+ if (token !== this._loadToken || !this._scene) return;+ if (this._model) this._scene.remove(this._model);+ this._model = gltf.scene;+ this._scene.add(this._model);+ this._frameModel(this._model);+ this.dispatchEvent(new CustomEvent('load', { detail: { url } }));+ } catch (err) {+ if (token !== this._loadToken) return;+ this.dispatchEvent(new CustomEvent('error', { detail: { url, error: err } }));+ }+ }++ _frameModel(obj) {+ const box = new Box3().setFromObject(obj);+ const size = new Vector3();+ const center = new Vector3();+ box.getSize(size);+ box.getCenter(center);++ const maxDim = Math.max(size.x, size.y, size.z) || 1;+ const fov = (this._camera.fov * Math.PI) / 180;+ const dist = (maxDim / 2) / Math.tan(fov / 2) * 1.6;++ this._camera.position.set(center.x, center.y + size.y * 0.05, center.z + dist);+ this._camera.near = Math.max(0.01, dist / 100);+ this._camera.far = dist * 50;+ this._camera.updateProjectionMatrix();+ this._controls.target.copy(center);+ this._controls.update();+ }++ _applyBackground(value) {+ if (!this._scene) return;+ if (!value || value === 'transparent') {+ this._scene.background = null;+ return;+ }+ try {+ this._scene.background = new Color(value);+ } catch {+ this._scene.background = null;+ }+ }++ _applyAlt(value) {+ const text = (value || '').trim();+ if (!text) {+ if (this._label) {+ this._label.remove();+ this._label = null;+ }+ this.removeAttribute('aria-label');+ return;+ }+ this.setAttribute('aria-label', text);+ if (!this._label) {+ this._label = document.createElement('div');+ this._label.className = 'label';+ this._shadow.appendChild(this._label);+ }+ this._label.textContent = text;+ }++ _render() {+ if (!this._renderer) return;+ this._raf = requestAnimationFrame(this._render);+ this._controls?.update();+ this._renderer.render(this._scene, this._camera);+ }+}++if (typeof customElements !== 'undefined' && !customElements.get(TAG)) {+ customElements.define(TAG, ThreeWsViewerElement);+}++export { ThreeWsViewerElement };+export default ThreeWsViewerElement;diff --git a/avatar-sdk/types/react.d.ts b/avatar-sdk/types/react.d.tsnew file mode 100644index 000000000..dee974b72--- /dev/null+++ b/avatar-sdk/types/react.d.ts@@ -0,0 +1,95 @@+// Type declarations for @three-ws/avatar/react.+//+// React peer dependency: >=18. The module is client-only ('use client') —+// every component touches the DOM. React 19 Server Components are not+// supported in this subpath.++import type {+ CSSProperties,+ ForwardRefExoticComponent,+ RefAttributes,+} from 'react';++export interface AvatarProps {+ /** GLB URL to render. */+ src: string;+ /** Accessibility label / caption shown beneath the model. */+ alt?: string;+ /** CSS color string, or 'transparent'. Defaults to transparent. */+ background?: string;+ style?: CSSProperties;+ className?: string;+ /** Fired once the GLB finishes loading. */+ onLoad?: (detail: { url: string }) => void;+ /** Fired if the GLB fails to load. */+ onError?: (detail: { url: string; error: Error }) => void;+}++/**+ * Lightweight 3D avatar viewer. Wraps the `<three-ws-viewer>` web component+ * registered by `@three-ws/avatar/viewer`. Does not load the heavy+ * chat/voice/skill runtime.+ */+export const Avatar: ForwardRefExoticComponent<+ AvatarProps & RefAttributes<HTMLElement>+>;++export interface AgentAvatarProps {+ /** three.ws avatar UUID. The element resolves it to a GLB on mount. */+ avatarId?: string;+ /** Direct GLB URL. Use this OR `avatarId`, not both. */+ src?: string;+ /** Optional iOS Quick Look USDZ URL for AR. */+ iosSrc?: string;+ /** Hide the dev/debug GUI. */+ kiosk?: boolean;+ style?: CSSProperties;+ className?: string;+}++/**+ * Wraps the heavy `<agent-3d>` element (chat loop, voice, lipsync, skills).+ * The monolith bundle is lazy-loaded the first time this component mounts.+ */+export const AgentAvatar: ForwardRefExoticComponent<+ AgentAvatarProps & RefAttributes<HTMLElement>+>;++export interface AvatarCreatorProps {+ /** Controls whether the creator modal is open. */+ open: boolean;+ /** Called with the GLB Blob when the user exports an avatar. */+ onExport?: (blob: Blob) => void | Promise<void>;+ /** Called when the user dismisses the modal without exporting. */+ onClose?: () => void;+ /** Override the studio iframe origin. Defaults to https://studio.three.ws. */+ studioUrl?: string;+ /** Edit-mode session URL for an existing avatar (resolved server-side). */+ sessionUrl?: string;+}++/**+ * Declarative wrapper around the imperative AvatarCreator class. Renders+ * `null` — the modal is appended to `document.body` while `open` is true.+ */+export function AvatarCreator(props: AvatarCreatorProps): null;++export interface UseAvatarOptions {+ /** Override the API origin used to fetch `/api/avatars/:id`. */+ apiOrigin?: string;+}++export interface UseAvatarResult<T = any> {+ avatar: T | null;+ loading: boolean;+ error: Error | null;+}++/**+ * Fetches a three.ws avatar record by id. Re-fetches on `id` change,+ * aborts in-flight requests on unmount.+ */+export function useAvatar<T = any>(+ id: string | null | undefined,+ opts?: UseAvatarOptions,+): UseAvatarResult<T>;diff --git a/avatar-sdk/types/viewer.d.ts b/avatar-sdk/types/viewer.d.tsnew file mode 100644index 000000000..cc43cb940--- /dev/null+++ b/avatar-sdk/types/viewer.d.ts@@ -0,0 +1,33 @@+// Type declarations for @three-ws/avatar/viewer.+//+// Registers a `<three-ws-viewer>` custom element on import. Pure visual+// renderer: GLB + OrbitControls + ambient/dir lights. No chat, no voice,+// no skills. Peer-depends on `three`.++export {};++declare global {+ interface HTMLElementTagNameMap {+ 'three-ws-viewer': ThreeWsViewerElement;+ }+}++/**+ * `<three-ws-viewer src="..." alt="..." background="...">`+ *+ * Attributes:+ * - `src` — GLB URL (required to render anything).+ * - `alt` — accessibility label and caption text.+ * - `background` — CSS color string, or `'transparent'`. Default transparent.+ *+ * Events:+ * - `load` — `CustomEvent<{ url: string }>` once the GLB is parsed and added.+ * - `error` — `CustomEvent<{ url: string, error: Error }>` on load failure.+ */+export class ThreeWsViewerElement extends HTMLElement {+ src?: string;+ alt?: string;+ background?: string;+}++export default ThreeWsViewerElement;diff --git a/inspect-deploy.mjs b/inspect-deploy.mjsdeleted file mode 100644index addf65077..000000000--- a/inspect-deploy.mjs+++ /dev/null@@ -1,54 +0,0 @@-import { chromium } from 'playwright';--const browser = await chromium.launch();-const page = await browser.newPage({ viewport: { width: 1600, height: 1000 } });--const errs = [];-page.on('console', (m) => { if (m.type() === 'error' || m.type() === 'warn') errs.push(`[${m.type()}] ${m.text()}`); });-page.on('pageerror', (e) => errs.push(`[pageerror] ${e.message}`));--await page.goto('http://localhost:3000/deploy', { waitUntil: 'networkidle' });-await page.waitForTimeout(2500);--const info = await page.evaluate(() => {- const q = (sel) => document.querySelector(sel);- const dims = (el) => {- if (!el) return null;- const r = el.getBoundingClientRect();- const cs = getComputedStyle(el);- return {- tag: el.tagName,- cls: (el.className?.toString() || '').slice(0, 80),- x: Math.round(r.x), y: Math.round(r.y), w: Math.round(r.width), h: Math.round(r.height),- display: cs.display, position: cs.position, visibility: cs.visibility, opacity: cs.opacity,- z: cs.zIndex,- text: (el.textContent || '').trim().slice(0, 60),- };- };- return {- bodyClass: document.body.className,- shell: dims(q('.deploy-shell')),- hero: dims(q('.deploy-hero')),- heroText: dims(q('.deploy-hero-text')),- heroEyebrow: dims(q('.deploy-hero-eyebrow')),- heroTitle: dims(q('.deploy-hero-title')),- heroSub: dims(q('.deploy-hero-sub')),- heroMeta: dims(q('.deploy-hero-meta')),- heroControls: dims(q('.deploy-hero-controls')),- chainSelect: dims(q('.deploy-shell .erc8004-chain-select')),- walletBtn: dims(q('.deploy-wallet-btn')),- banner: dims(q('[data-role="mainnet-banner"]')),- grid: dims(q('.deploy-grid')),- preview: dims(q('.deploy-preview')),- previewThumb: dims(q('.deploy-preview-thumb')),- deployPage: dims(q('.deploy-page')),- };-});--console.log(JSON.stringify(info, null, 2));-console.log('\n--- CONSOLE ---');-console.log(errs.slice(0, 20).join('\n'));--await page.screenshot({ path: '/tmp/deploy-actual.png', fullPage: false });--await browser.close();diff --git a/package-lock.json b/package-lock.jsonindex 589de80af..197e8cc34 100644--- a/package-lock.json+++ b/package-lock.json@@ -16,6 +16,8 @@"multiplayer"],"dependencies": {+ "@ai-sdk/anthropic": "^3.0.78",+ "@ai-sdk/openai": "^3.0.64","@avaturn/sdk": "^1.1.4","@aws-sdk/client-s3": "latest","@aws-sdk/s3-request-presigner": "latest",@@ -23,6 +25,7 @@"@chenglou/pretext": "^0.0.5","@coinbase/x402": "^2.1.0","@coral-xyz/anchor": "^0.31.1",+ "@dimforge/rapier3d-compat": "^0.19.3","@gltf-transform/core": "^4.3.0","@gltf-transform/extensions": "^4.3.0","@huggingface/inference": "^2.7.0",@@ -34,10 +37,14 @@"@neondatabase/serverless": "^0.10.1","@nirholas/pump-sdk": "^1.0.0","@noble/curves": "^2.2.0",+ "@pixiv/three-vrm": "^3.5.2",+ "@pixiv/three-vrm-animation": "^3.5.2","@pump-fun/agent-payments-sdk": "^3.1.0","@pump-fun/pump-sdk": "^1.35.0","@pump-fun/pump-swap-sdk": "^1.15.0","@pythnetwork/hermes-client": "^3.1.0",+ "@recast-navigation/core": "^0.43.1",+ "@recast-navigation/three": "^0.43.1","@sentry/node": "^10.50.0","@solana/actions": "^1.6.6","@solana/kit": "^6.8.0",@@ -49,11 +56,14 @@"@solana/web3.js": "latest","@upstash/ratelimit": "^2.0.5","@upstash/redis": "^1.34.3",+ "@vercel/og": "^0.11.1","@x402/core": "^2.11.0","@x402/evm": "^2.11.0","@x402/express": "^2.11.0","@x402/extensions": "^2.11.0","@zauthx402/sdk": "^0.1.14",+ "agent0-sdk": "^1.7.1",+ "ai": "^6.0.184","bcryptjs": "^2.4.3","bn.js": "^5.2.3","bs58": "^6.0.0",@@ -61,7 +71,9 @@"dat.gui": "^0.7.9","ethers": "^6.16.0","express": "^4.22.1",+ "fast-check": "^4.8.0","gltf-validator": "^2.0.0-dev.3.10",+ "graphql": "^16.14.0","helius-sdk": "^2.2.2","jose": "^5.9.6","livekit-client": "^2.18.8",@@ -69,12 +81,14 @@"node-fetch": "^3.3.2","qrcode": "^1.5.4","query-string": "^8.1.0",+ "qwen-ai-provider": "^0.1.1","resend": "^6.12.2","sas-lib": "^1.0.10","simple-dropzone": "^0.8.3","three": "latest","vhtml": "^2.2.0","viem": "^2.18.0",+ "wawa-lipsync": "^0.0.2","ws": "^8.20.0","zod": "^3.23.8"},@@ -943,6 +957,175 @@"node": ">=20"}},+ "node_modules/@achingbrain/http-parser-js": {+ "version": "0.5.9",+ "resolved": "https://registry.npmjs.org/@achingbrain/http-parser-js/-/http-parser-js-0.5.9.tgz",+ "integrity": "sha512-nPuMf2zVzBAGRigH/1jFpb/6HmJsps+15f4BPlGDp3vsjYB2ZgruAErUpKpcFiVRz3DHLXcGNmuwmqZx/sVI7A==",+ "license": "MIT",+ "dependencies": {+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@achingbrain/http-parser-js/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@achingbrain/http-parser-js/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper": {+ "version": "4.0.5",+ "resolved": "https://registry.npmjs.org/@achingbrain/nat-port-mapper/-/nat-port-mapper-4.0.5.tgz",+ "integrity": "sha512-YAA4MW6jO6W7pmJaFzQ0AOLpu8iQClUkdT2HbfKLmtFjrpoZugnFj9wH8EONV9LxnIW+0W1J98ri+oApKyAKLQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@achingbrain/ssdp": "^4.1.0",+ "@chainsafe/is-ip": "^2.0.2",+ "@libp2p/logger": "^6.0.5",+ "abort-error": "^1.0.0",+ "err-code": "^3.0.1",+ "netmask": "^2.0.2",+ "p-defer": "^4.0.0",+ "race-signal": "^2.0.0",+ "xml2js": "^0.6.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/@libp2p/interface": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.2.2.tgz",+ "integrity": "sha512-IU78g6uF8Ls0//4v9VE1rL5Jvy+i6I8LI/DssojFICbaDJSkL59Sn5XRfHrY5OCxTnUnUxnWK7pHz/3+UZcRNQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^13.0.1",+ "main-event": "^1.0.1",+ "multiformats": "^13.4.0",+ "progress-events": "^1.1.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/@libp2p/logger": {+ "version": "6.2.7",+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-6.2.7.tgz",+ "integrity": "sha512-IVEz5+0kE4mRWwMzXP34AlXe2k1FLzBqKkjeASyhPVdMz0A4qH9nYmCBwonzmRzymklGjFIEDa1s7Vjhd9V4Rg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^3.2.2",+ "@multiformats/multiaddr": "^13.0.1",+ "interface-datastore": "^9.0.1",+ "multiformats": "^13.4.0",+ "weald": "^1.1.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/@multiformats/multiaddr": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.3.tgz",+ "integrity": "sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "multiformats": "^14.0.0",+ "uint8-varint": "^3.0.0",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/interface-datastore": {+ "version": "9.0.3",+ "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-9.0.3.tgz",+ "integrity": "sha512-NLZa7Mp+0qn48nSwIY/C36da4uVIKzwG2tuEIpaSJArsuB2RrdyDWwkoDUyjsJ+VrMntXz38VSk9vXTx/ZUpAw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "interface-store": "^7.0.0",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/interface-datastore/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/interface-store": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-7.0.2.tgz",+ "integrity": "sha512-KYOPcDH+1peaPhSeoZujR5nwkVeola1EdrnrlHTIM0HRNUs9B0aTsUQMH5kTmIjaQq1BOowoUyoCamgL8IMyww==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/race-signal": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-2.0.0.tgz",+ "integrity": "sha512-P31bLhE4ByBX/70QDXMutxnqgwrF1WUXea1O8DXuviAgkdbQ1iQMQotNgzJIBC9yUSn08u/acZrMUhgw7w6GpA==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/uint8-varint": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-3.0.0.tgz",+ "integrity": "sha512-S4DdpXBaLwKcFo7f0bWzWfHjbZ/i3QhM842qn+ZvHjxqFCfUcEB9SQNcmI69S+zMlcmIcKxsk9Iyw77S2Kxv6Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^3.0.1",+ "uint8arrays": "^6.1.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/uint8-varint/node_modules/uint8arraylist": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-3.0.2.tgz",+ "integrity": "sha512-LDVoq9BQaGJzGDUovEnoX6rpKCvnY/Jbtws4ikwnBzjRbq5qBAFpBZevUEbSmMM87aO0Sp+wOZy2ZXf5yODmXQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^6.0.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/@achingbrain/nat-port-mapper/node_modules/uint8arrays/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@achingbrain/ssdp": {+ "version": "4.2.4",+ "resolved": "https://registry.npmjs.org/@achingbrain/ssdp/-/ssdp-4.2.4.tgz",+ "integrity": "sha512-1dZIV7dwYJRS1sTA0qIDzsMdwZAnPa7DGb2YuPqMq4PjEjvzBBuz2WIsXnrkRFCNY00JuqLiMby9GecnGsOgaQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.0",+ "freeport-promise": "^2.0.0",+ "merge-options": "^3.0.4",+ "xml2js": "^0.6.2"+ }+ },"node_modules/@adobe/css-tools": {"version": "4.4.4","resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz",@@ -956,6 +1139,84 @@"integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==","license": "MIT"},+ "node_modules/@ai-sdk/anthropic": {+ "version": "3.0.78",+ "resolved": "https://registry.npmjs.org/@ai-sdk/anthropic/-/anthropic-3.0.78.tgz",+ "integrity": "sha512-0OY12G20cUt6iU6htpEA1491Oz++NVxZxlmWGX4B7rSbeZ5pnDmOu6YtW9BKzdZlNx5Gn23i6WMxyZFoMKNcgA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "3.0.10",+ "@ai-sdk/provider-utils": "4.0.27"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },+ "node_modules/@ai-sdk/gateway": {+ "version": "3.0.115",+ "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-3.0.115.tgz",+ "integrity": "sha512-xonmGfN9pt54WdKqMzWe68BRYS3rsYvraBzioyA0gfNcecHs8Ir5qk/X8grJSyZ95hghjWiOphrK6bAc11E6SA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "3.0.10",+ "@ai-sdk/provider-utils": "4.0.27",+ "@vercel/oidc": "3.2.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },+ "node_modules/@ai-sdk/openai": {+ "version": "3.0.64",+ "resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-3.0.64.tgz",+ "integrity": "sha512-epO4iS6QwktaY2PF6uBcPnDTJ3BxPOfsGS7/OEtBe3GtNj7C8h8gMDVtIe5K8W16HNDbn0tbR4dcQfpfs+XVFg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "3.0.10",+ "@ai-sdk/provider-utils": "4.0.27"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },+ "node_modules/@ai-sdk/provider": {+ "version": "3.0.10",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.10.tgz",+ "integrity": "sha512-Q3BZ27qfpYqnCYGvE3vt+Qi6LGOF9R5Nmzn+9JoM1lCRsD9mYaIhfJLkSunN48nfGXJ6n+XNV0J/XVpqGQl7Dw==",+ "license": "Apache-2.0",+ "dependencies": {+ "json-schema": "^0.4.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@ai-sdk/provider-utils": {+ "version": "4.0.27",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.27.tgz",+ "integrity": "sha512-ubkAJ+xODouwtmN1tYlvTPphH1hPOBfZaEQe8U7skGvFAnIRs9PPpsq57bC2+Ky/MB4yzhd6YOsxTAx9sGpazw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "3.0.10",+ "@standard-schema/spec": "^1.1.0",+ "eventsource-parser": "^3.0.8"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },"node_modules/@apideck/better-ajv-errors": {"version": "0.3.7","resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.7.tgz",@@ -1024,6 +1285,12 @@"dev": true,"license": "MIT"},+ "node_modules/@assemblyscript/loader": {+ "version": "0.9.4",+ "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",+ "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==",+ "license": "Apache-2.0"+ },"node_modules/@avaturn/sdk": {"version": "1.1.4","resolved": "https://registry.npmjs.org/@avaturn/sdk/-/sdk-1.1.4.tgz",@@ -3928,6 +4195,116 @@"integrity": "sha512-wJ8ReQbHxsAfXhrf9ixl0aYbZorRuOWpBNzm8pL8ftmSxQx/wnJD5Eg861NwJU/czy2VXFIebCeZnZrI9rktIQ==","license": "(Apache-2.0 AND BSD-3-Clause)"},+ "node_modules/@chainsafe/as-chacha20poly1305": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/@chainsafe/as-chacha20poly1305/-/as-chacha20poly1305-0.1.0.tgz",+ "integrity": "sha512-BpNcL8/lji/GM3+vZ/bgRWqJ1q5kwvTFmGPk7pxm/QQZDbaMI98waOHjEymTjq2JmdD/INdNBFOVSyJofXg7ew==",+ "license": "Apache-2.0"+ },+ "node_modules/@chainsafe/as-sha256": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-1.2.4.tgz",+ "integrity": "sha512-3GXDysZOKD6cTYbm48lEdXdUbS7cafjXQZfgHOspTByhoGR/JM3KBXyF3vE6bf63ImjNPyoEZwnQcpYPQ6k3bQ==",+ "license": "Apache-2.0"+ },+ "node_modules/@chainsafe/is-ip": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/@chainsafe/is-ip/-/is-ip-2.1.0.tgz",+ "integrity": "sha512-KIjt+6IfysQ4GCv66xihEitBjvhU/bixbbbFxdJ1sqCp4uJ0wuZiYBPhksZoy4lfaF0k9cwNzY5upEW/VWdw3w==",+ "license": "MIT"+ },+ "node_modules/@chainsafe/libp2p-noise": {+ "version": "16.1.5",+ "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-16.1.5.tgz",+ "integrity": "sha512-yac0bknwfuYdXXOAFGVL4fYR0de0p1Uk7W0gIkuxlj8JSqhkHr+kEt3958PfnfmX880QJAIogsh/ZupFjg0uJA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/as-chacha20poly1305": "^0.1.0",+ "@chainsafe/as-sha256": "^1.0.0",+ "@libp2p/crypto": "^5.0.0",+ "@libp2p/interface": "^2.9.0",+ "@libp2p/peer-id": "^5.0.0",+ "@noble/ciphers": "^1.1.3",+ "@noble/curves": "^1.1.0",+ "@noble/hashes": "^1.3.1",+ "it-length-prefixed": "^10.0.1",+ "it-length-prefixed-stream": "^2.0.1",+ "it-pair": "^2.0.6",+ "it-pipe": "^3.0.1",+ "it-stream-types": "^2.0.1",+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.3",+ "uint8arrays": "^5.0.0",+ "wherearewe": "^2.0.1"+ }+ },+ "node_modules/@chainsafe/libp2p-noise/node_modules/@noble/curves": {+ "version": "1.9.7",+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz",+ "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==",+ "license": "MIT",+ "dependencies": {+ "@noble/hashes": "1.8.0"+ },+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@chainsafe/libp2p-noise/node_modules/@noble/hashes": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@chainsafe/libp2p-noise/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@chainsafe/libp2p-noise/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@chainsafe/libp2p-yamux": {+ "version": "7.0.4",+ "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-yamux/-/libp2p-yamux-7.0.4.tgz",+ "integrity": "sha512-Qw+EB9ew/9hRCq9V702gkm5xXThFHQ3Bdvh01M+enI1RScriSDWFGod02dwNHUxsYRc743i49sLlHp0edC7hSQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.0.0",+ "@libp2p/utils": "^6.0.0",+ "get-iterator": "^2.0.1",+ "it-foreach": "^2.0.6",+ "it-pushable": "^3.2.3",+ "it-stream-types": "^2.0.1",+ "race-signal": "^1.1.3",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@chainsafe/netmask": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz",+ "integrity": "sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg==",+ "license": "MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1"+ }+ },"node_modules/@chenglou/pretext": {"version": "0.0.5","resolved": "https://registry.npmjs.org/@chenglou/pretext/-/pretext-0.0.5.tgz",@@ -5393,6 +5770,25 @@"node": ">=20.19.0"}},+ "node_modules/@dimforge/rapier3d-compat": {+ "version": "0.19.3",+ "resolved": "https://registry.npmjs.org/@dimforge/rapier3d-compat/-/rapier3d-compat-0.19.3.tgz",+ "integrity": "sha512-mMVdSj1PRTT108s9Swbu2GQOmHbn8kbJANRV5xfczL3s0T4vkgZAuoMRgvBzQcHanpKusbC0ZJj6z3mC3aj3vg==",+ "license": "Apache-2.0"+ },+ "node_modules/@dnsquery/dns-packet": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/@dnsquery/dns-packet/-/dns-packet-6.1.1.tgz",+ "integrity": "sha512-WXTuFvL3G+74SchFAtz3FgIYVOe196ycvGsMgvSH/8Goptb1qpIQtIuM4SOK9G9lhMWYpHxnXyy544ZhluFOew==",+ "license": "MIT",+ "dependencies": {+ "@leichtgewicht/ip-codec": "^2.0.4",+ "utf8-codec": "^1.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/@emnapi/core": {"version": "1.10.0","resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",@@ -7255,6 +7651,287 @@"url": "https://github.com/sponsors/donmccurdy"}},+ "node_modules/@graphql-typed-document-node/core": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz",+ "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==",+ "license": "MIT",+ "peerDependencies": {+ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"+ }+ },+ "node_modules/@helia/bitswap": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@helia/bitswap/-/bitswap-2.2.0.tgz",+ "integrity": "sha512-fYHjXM8SZpgRkGRM7qq8VVpBsrSLHlRGTLUEesfKZ+wYBYHZaqpn0mT9KbdLZowLrooz0qaUUiF6OIZBNmArcw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@helia/interface": "^5.4.0",+ "@helia/utils": "^1.4.0",+ "@libp2p/interface": "^2.2.1",+ "@libp2p/logger": "^5.1.4",+ "@libp2p/peer-collections": "^6.0.12",+ "@libp2p/utils": "^6.2.1",+ "@multiformats/multiaddr": "^12.3.3",+ "any-signal": "^4.1.1",+ "interface-blockstore": "^5.3.1",+ "interface-store": "^6.0.2",+ "it-drain": "^3.0.7",+ "it-length-prefixed": "^10.0.1",+ "it-map": "^3.1.1",+ "it-pipe": "^3.0.1",+ "it-take": "^3.0.6",+ "multiformats": "^13.3.1",+ "p-defer": "^4.0.1",+ "progress-events": "^1.0.1",+ "protons-runtime": "^5.5.0",+ "race-event": "^1.3.0",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@helia/bitswap/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/bitswap/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@helia/block-brokers": {+ "version": "4.2.4",+ "resolved": "https://registry.npmjs.org/@helia/block-brokers/-/block-brokers-4.2.4.tgz",+ "integrity": "sha512-Xz7JyRIprbldi5bxfvuj5xTDijkfndgLPKoK/AUVeFOBD0n04Cb6RzqYGVQN6of8a6hfL6tD0fO4RVUFh/Jl6A==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@helia/bitswap": "^2.2.0",+ "@helia/interface": "^5.4.0",+ "@helia/utils": "^1.4.0",+ "@libp2p/interface": "^2.2.1",+ "@libp2p/utils": "^6.2.1",+ "@multiformats/multiaddr": "^12.3.3",+ "@multiformats/multiaddr-matcher": "^2.0.1",+ "@multiformats/multiaddr-to-uri": "^11.0.0",+ "interface-blockstore": "^5.3.1",+ "interface-store": "^6.0.2",+ "multiformats": "^13.3.1",+ "progress-events": "^1.0.1",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@helia/block-brokers/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/delegated-routing-v1-http-api-client": {+ "version": "4.2.5",+ "resolved": "https://registry.npmjs.org/@helia/delegated-routing-v1-http-api-client/-/delegated-routing-v1-http-api-client-4.2.5.tgz",+ "integrity": "sha512-fFqVhs7a4TnpKQ1cZ4im3tj53v+8UZLFkQo85otl/GpbIVBmBoGbjkDHGPv4UdjJ2lmYM/cRdnHsYbfjuc5pwA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.2.0",+ "@libp2p/logger": "^5.0.1",+ "@libp2p/peer-id": "^5.0.1",+ "@multiformats/multiaddr": "^12.3.1",+ "any-signal": "^4.1.1",+ "browser-readablestream-to-it": "^2.0.7",+ "ipns": "^10.0.0",+ "it-first": "^3.0.6",+ "it-map": "^3.1.1",+ "it-ndjson": "^1.0.7",+ "multiformats": "^13.3.0",+ "p-defer": "^4.0.1",+ "p-queue": "^8.0.1",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@helia/delegated-routing-v1-http-api-client/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/delegated-routing-v1-http-api-client/node_modules/p-queue": {+ "version": "8.1.1",+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.1.tgz",+ "integrity": "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ==",+ "license": "MIT",+ "dependencies": {+ "eventemitter3": "^5.0.1",+ "p-timeout": "^6.1.2"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@helia/delegated-routing-v1-http-api-client/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@helia/interface": {+ "version": "5.4.0",+ "resolved": "https://registry.npmjs.org/@helia/interface/-/interface-5.4.0.tgz",+ "integrity": "sha512-UfY/Xa2qYJ6Bh4XUUSgwU3s2VY69cKwRznkS9Ab0C3ciU+dUeyz3IPIn5qqRGVfNVM9SD2wISXmwA7FJvhdRAQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.2.1",+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^12.4.0",+ "interface-blockstore": "^5.3.1",+ "interface-datastore": "^8.3.1",+ "interface-store": "^6.0.2",+ "multiformats": "^13.3.1",+ "progress-events": "^1.0.1"+ }+ },+ "node_modules/@helia/interface/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/routers": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/@helia/routers/-/routers-3.1.3.tgz",+ "integrity": "sha512-BPbzN3WCe6EF3yXjeORJbbb5hZjv0PKaJri1sSPHRZX6sKUCvRzwAc0AkQKUMHeMzTLrrAcl0yAz5x1r8z3Ynw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@helia/delegated-routing-v1-http-api-client": "^4.2.1",+ "@helia/interface": "^5.4.0",+ "@libp2p/interface": "^2.2.1",+ "@libp2p/peer-id": "^5.0.8",+ "@multiformats/uri-to-multiaddr": "^9.0.1",+ "ipns": "^10.0.0",+ "it-first": "^3.0.6",+ "it-map": "^3.1.1",+ "multiformats": "^13.3.1",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@helia/routers/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/routers/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@helia/unixfs": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/@helia/unixfs/-/unixfs-4.0.3.tgz",+ "integrity": "sha512-sbcnS64B6LCTHrGH6RPx2BuwLFjmVAoiX53RR/E0YCQMcHTDCF4bQ3I7P+7kzYkQLQkbLEekl7V2fnVOWxG7MA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@helia/interface": "^5.2.1",+ "@ipld/dag-pb": "^4.1.3",+ "@libp2p/interface": "^2.2.1",+ "@libp2p/logger": "^5.1.4",+ "@multiformats/murmur3": "^2.1.8",+ "hamt-sharding": "^3.0.6",+ "interface-blockstore": "^5.3.1",+ "ipfs-unixfs": "^11.2.0",+ "ipfs-unixfs-exporter": "^13.6.1",+ "ipfs-unixfs-importer": "^15.3.1",+ "it-all": "^3.0.6",+ "it-glob": "^3.0.1",+ "it-last": "^3.0.6",+ "it-pipe": "^3.0.1",+ "merge-options": "^3.0.4",+ "multiformats": "^13.3.1",+ "progress-events": "^1.0.1",+ "sparse-array": "^1.3.2",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@helia/unixfs/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/unixfs/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@helia/utils": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/@helia/utils/-/utils-1.4.0.tgz",+ "integrity": "sha512-xXwhQbfSQEC5uHd6HVwdGXksZayy5xnYB5aOk0TU1fDnwbaeJz46o/GdWcxkTxnbfGyxqs9hyK5NqHw1B58yAw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@helia/interface": "^5.4.0",+ "@ipld/dag-cbor": "^9.2.2",+ "@ipld/dag-json": "^10.2.3",+ "@ipld/dag-pb": "^4.1.3",+ "@libp2p/interface": "^2.5.0",+ "@libp2p/keychain": "^5.2.8",+ "@libp2p/logger": "^5.1.8",+ "@libp2p/utils": "^6.5.1",+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^12.4.0",+ "any-signal": "^4.1.1",+ "blockstore-core": "^5.0.2",+ "cborg": "^4.2.6",+ "interface-blockstore": "^5.3.1",+ "interface-datastore": "^8.3.1",+ "interface-store": "^6.0.2",+ "it-drain": "^3.0.7",+ "it-filter": "^3.1.1",+ "it-foreach": "^2.1.1",+ "it-merge": "^3.0.5",+ "libp2p": "^2.9.0",+ "mortice": "^3.0.6",+ "multiformats": "^13.3.1",+ "p-defer": "^4.0.1",+ "progress-events": "^1.0.1",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@helia/utils/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@helia/utils/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/@huggingface/inference": {"version": "2.8.1","resolved": "https://registry.npmjs.org/@huggingface/inference/-/inference-2.8.1.tgz",@@ -7889,6 +8566,150 @@}}},+ "node_modules/@ipld/dag-cbor": {+ "version": "9.2.7",+ "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-9.2.7.tgz",+ "integrity": "sha512-ZmfXmElRWATr+hoUTSAOr6HUcjVhOcNHDqgczc76qte2DHHFEK0ZhNzUcdTDQhF/VSIvf2ioaRTRLWwLc83sNw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "cborg": "^5.0.1",+ "multiformats": "^13.1.0"+ }+ },+ "node_modules/@ipld/dag-cbor/node_modules/cborg": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/cborg/-/cborg-5.1.1.tgz",+ "integrity": "sha512-BDbSRIp6XrQXkTc7g+DN0RB9RrDPTUfals2ecWUlt3juPLjbAvy/V72mJcXY0Ehu0Dq/3WpNCOCT68HUTbW+lw==",+ "license": "Apache-2.0",+ "bin": {+ "cborg": "lib/bin.js"+ }+ },+ "node_modules/@ipld/dag-cbor/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@ipld/dag-json": {+ "version": "10.2.9",+ "resolved": "https://registry.npmjs.org/@ipld/dag-json/-/dag-json-10.2.9.tgz",+ "integrity": "sha512-opNPQQsTuCFZkaJCAqXrB/n9OqUD6W2Boz/Au5HjhLQyczmT8lxoOZObqQ5S5hhnV8p6sgKAimNhUB2W6y0Mzg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "cborg": "^5.0.0",+ "multiformats": "^13.1.0"+ }+ },+ "node_modules/@ipld/dag-json/node_modules/cborg": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/cborg/-/cborg-5.1.1.tgz",+ "integrity": "sha512-BDbSRIp6XrQXkTc7g+DN0RB9RrDPTUfals2ecWUlt3juPLjbAvy/V72mJcXY0Ehu0Dq/3WpNCOCT68HUTbW+lw==",+ "license": "Apache-2.0",+ "bin": {+ "cborg": "lib/bin.js"+ }+ },+ "node_modules/@ipld/dag-json/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@ipld/dag-pb": {+ "version": "4.1.7",+ "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.1.7.tgz",+ "integrity": "sha512-/i/13trFihjWfDyXlylRwhuYjtzYjvOFw0vlRjYGnZuv7d7MOgA2lV/vRuL5RfeUajM03aZfFLdq4S7cTbbTRg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },+ "node_modules/@ipld/dag-pb/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@ipshipyard/libp2p-auto-tls": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/@ipshipyard/libp2p-auto-tls/-/libp2p-auto-tls-1.0.0.tgz",+ "integrity": "sha512-wV1smnqbg3xUCHmPB8KWFuP8G9MKlx8KDuiJvhCWPi7B03xJq2FMybMDPI8tM9boa9sHD+5+NFu+Teo3Lz76fw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.2",+ "@libp2p/crypto": "^5.0.9",+ "@libp2p/http-fetch": "^2.1.0",+ "@libp2p/interface": "^2.4.0",+ "@libp2p/interface-internal": "^2.2.2",+ "@libp2p/keychain": "^5.0.12",+ "@libp2p/utils": "^6.3.1",+ "@multiformats/multiaddr": "^12.3.3",+ "@multiformats/multiaddr-matcher": "^1.6.0",+ "@peculiar/x509": "^1.12.3",+ "acme-client": "^5.4.0",+ "any-signal": "^4.1.1",+ "delay": "^6.0.0",+ "interface-datastore": "^8.3.1",+ "multiformats": "^13.3.1",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@ipshipyard/libp2p-auto-tls/node_modules/@multiformats/multiaddr-matcher": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-matcher/-/multiaddr-matcher-1.8.0.tgz",+ "integrity": "sha512-tR/HFhDucXjvwCef5lfXT7kikqR2ffUjliuYlg/RKYGPySVKVlvrDufz86cIuHNc+i/fNR16FWWgD/pMJ6RW4w==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "@multiformats/multiaddr": "^12.0.0",+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@ipshipyard/libp2p-auto-tls/node_modules/delay": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz",+ "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@ipshipyard/libp2p-auto-tls/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@ipshipyard/libp2p-auto-tls/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@ipshipyard/node-datachannel": {+ "version": "0.26.6",+ "resolved": "https://registry.npmjs.org/@ipshipyard/node-datachannel/-/node-datachannel-0.26.6.tgz",+ "integrity": "sha512-70HdhYMyAGXEMuCUq9ATO1Rx/JmiENM5LrGN94KT/q/Et2VsMjJpOWbyFzgodtkQJjDG5saNXTOiQpYZ1AnvEg==",+ "hasInstallScript": true,+ "license": "MPL 2.0",+ "dependencies": {+ "prebuild-install": "^7.1.3"+ },+ "engines": {+ "node": ">=18.20.0"+ }+ },"node_modules/@irys/arweave": {"version": "0.0.2","resolved": "https://registry.npmjs.org/@irys/arweave/-/arweave-0.0.2.tgz",@@ -9006,6 +9827,1160 @@"integrity": "sha512-yra33g5q/AU7+PwAws+GaVpQGUuxnDREjVBnviJjcaJLVKuLzI4pnj8Bd3nY3fypM5k1yZEYKEXfUuGFUjP2+w==","license": "Apache-2.0"},+ "node_modules/@leichtgewicht/ip-codec": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz",+ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==",+ "license": "MIT"+ },+ "node_modules/@libp2p/autonat": {+ "version": "2.0.38",+ "resolved": "https://registry.npmjs.org/@libp2p/autonat/-/autonat-2.0.38.tgz",+ "integrity": "sha512-SuJUbXsF0YQg926hxb6d/f7x4NEHqWHLSXnR6Og5fJSOv2A1i1xRUe8zXaCuxQkPa+CguH2tAPZ+l1A+NZlF5A==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/peer-collections": "^6.0.35",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "any-signal": "^4.1.1",+ "it-protobuf-stream": "^2.0.2",+ "main-event": "^1.0.1",+ "multiformats": "^13.3.6",+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@libp2p/autonat/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/bootstrap": {+ "version": "11.0.47",+ "resolved": "https://registry.npmjs.org/@libp2p/bootstrap/-/bootstrap-11.0.47.tgz",+ "integrity": "sha512-D3V8AHZvX9R0cFD0BKmDp7fKTo+GgPFFWa55z62VP14yA3f3kSAELyZ7NujrD0QXEtUdd/d7suqeJ4tKGsnZ5A==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/peer-id": "^5.1.9",+ "@multiformats/mafmt": "^12.1.6",+ "@multiformats/multiaddr": "^12.4.4",+ "main-event": "^1.0.1"+ }+ },+ "node_modules/@libp2p/circuit-relay-v2": {+ "version": "3.2.24",+ "resolved": "https://registry.npmjs.org/@libp2p/circuit-relay-v2/-/circuit-relay-v2-3.2.24.tgz",+ "integrity": "sha512-JXSm0dOOpPC+Yax0ngLYWqELHLFmaYPNZOhZkrr0iEtbiXwhDXuDuwT71pwmozp7h/rYd2YFoIk178AhZ4711Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/peer-collections": "^6.0.35",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/peer-record": "^8.0.35",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "any-signal": "^4.1.1",+ "it-protobuf-stream": "^2.0.2",+ "it-stream-types": "^2.0.2",+ "main-event": "^1.0.1",+ "multiformats": "^13.3.6",+ "nanoid": "^5.1.5",+ "progress-events": "^1.0.1",+ "protons-runtime": "^5.5.0",+ "retimeable-signal": "^1.0.1",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/circuit-relay-v2/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/circuit-relay-v2/node_modules/nanoid": {+ "version": "5.1.11",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.11.tgz",+ "integrity": "sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.js"+ },+ "engines": {+ "node": "^18 || >=20"+ }+ },+ "node_modules/@libp2p/circuit-relay-v2/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/config": {+ "version": "1.1.31",+ "resolved": "https://registry.npmjs.org/@libp2p/config/-/config-1.1.31.tgz",+ "integrity": "sha512-4G1rGzNuTmNtqUxD/9kpC4/C+aPLSMy+q6exhm9E+cORb+AjW1Q90Oef2uKVj2eWWw14Rw7r2mK3jEa5IWVL8g==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.18",+ "@libp2p/interface": "^3.2.2",+ "@libp2p/keychain": "^6.1.1",+ "@libp2p/logger": "^6.2.7",+ "interface-datastore": "^9.0.1"+ }+ },+ "node_modules/@libp2p/config/node_modules/@libp2p/interface": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.2.2.tgz",+ "integrity": "sha512-IU78g6uF8Ls0//4v9VE1rL5Jvy+i6I8LI/DssojFICbaDJSkL59Sn5XRfHrY5OCxTnUnUxnWK7pHz/3+UZcRNQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^13.0.1",+ "main-event": "^1.0.1",+ "multiformats": "^13.4.0",+ "progress-events": "^1.1.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@libp2p/config/node_modules/@libp2p/keychain": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/@libp2p/keychain/-/keychain-6.1.1.tgz",+ "integrity": "sha512-szZBnnO+VX4Fjz6KZKE6Z0mFEWaQautb5sV+cK23r6nZ17gd3dv/U8hI2I2DjtPDKB3HimpQcVLnDF8Tc3EkfQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.18",+ "@libp2p/interface": "^3.2.2",+ "@noble/hashes": "^2.0.1",+ "asn1js": "^3.0.6",+ "interface-datastore": "^9.0.1",+ "multiformats": "^13.4.0",+ "sanitize-filename": "^1.6.3",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/@libp2p/logger": {+ "version": "6.2.7",+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-6.2.7.tgz",+ "integrity": "sha512-IVEz5+0kE4mRWwMzXP34AlXe2k1FLzBqKkjeASyhPVdMz0A4qH9nYmCBwonzmRzymklGjFIEDa1s7Vjhd9V4Rg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^3.2.2",+ "@multiformats/multiaddr": "^13.0.1",+ "interface-datastore": "^9.0.1",+ "multiformats": "^13.4.0",+ "weald": "^1.1.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/@multiformats/multiaddr": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.3.tgz",+ "integrity": "sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "multiformats": "^14.0.0",+ "uint8-varint": "^3.0.0",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/@libp2p/config/node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/config/node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/@noble/hashes": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz",+ "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==",+ "license": "MIT",+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@libp2p/config/node_modules/interface-datastore": {+ "version": "9.0.3",+ "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-9.0.3.tgz",+ "integrity": "sha512-NLZa7Mp+0qn48nSwIY/C36da4uVIKzwG2tuEIpaSJArsuB2RrdyDWwkoDUyjsJ+VrMntXz38VSk9vXTx/ZUpAw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "interface-store": "^7.0.0",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/interface-store": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-7.0.2.tgz",+ "integrity": "sha512-KYOPcDH+1peaPhSeoZujR5nwkVeola1EdrnrlHTIM0HRNUs9B0aTsUQMH5kTmIjaQq1BOowoUyoCamgL8IMyww==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/config/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/config/node_modules/uint8-varint": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-3.0.0.tgz",+ "integrity": "sha512-S4DdpXBaLwKcFo7f0bWzWfHjbZ/i3QhM842qn+ZvHjxqFCfUcEB9SQNcmI69S+zMlcmIcKxsk9Iyw77S2Kxv6Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^3.0.1",+ "uint8arrays": "^6.1.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/uint8-varint/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/config/node_modules/uint8-varint/node_modules/uint8arraylist": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-3.0.2.tgz",+ "integrity": "sha512-LDVoq9BQaGJzGDUovEnoX6rpKCvnY/Jbtws4ikwnBzjRbq5qBAFpBZevUEbSmMM87aO0Sp+wOZy2ZXf5yODmXQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^6.0.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/uint8-varint/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/@libp2p/config/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/crypto": {+ "version": "5.1.18",+ "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.1.18.tgz",+ "integrity": "sha512-sCm+dFFZmH4LJIHTCzPy7+EBRhzkndFUcIU8bui6iaxK6SDSRVa11+/O6DzW8hn/U9LgDXe6jXnzWM8bM7OoCA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^3.2.2",+ "@noble/curves": "^2.0.1",+ "@noble/hashes": "^2.0.1",+ "multiformats": "^13.4.0",+ "protons-runtime": "^6.0.1",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/@libp2p/interface": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.2.2.tgz",+ "integrity": "sha512-IU78g6uF8Ls0//4v9VE1rL5Jvy+i6I8LI/DssojFICbaDJSkL59Sn5XRfHrY5OCxTnUnUxnWK7pHz/3+UZcRNQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^13.0.1",+ "main-event": "^1.0.1",+ "multiformats": "^13.4.0",+ "progress-events": "^1.1.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.3.tgz",+ "integrity": "sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "multiformats": "^14.0.0",+ "uint8-varint": "^3.0.0",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr/node_modules/uint8-varint": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-3.0.0.tgz",+ "integrity": "sha512-S4DdpXBaLwKcFo7f0bWzWfHjbZ/i3QhM842qn+ZvHjxqFCfUcEB9SQNcmI69S+zMlcmIcKxsk9Iyw77S2Kxv6Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^3.0.1",+ "uint8arrays": "^6.1.0"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr/node_modules/uint8arraylist": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-3.0.2.tgz",+ "integrity": "sha512-LDVoq9BQaGJzGDUovEnoX6rpKCvnY/Jbtws4ikwnBzjRbq5qBAFpBZevUEbSmMM87aO0Sp+wOZy2ZXf5yODmXQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^6.0.0"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/@noble/hashes": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz",+ "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==",+ "license": "MIT",+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/crypto/node_modules/protons-runtime": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-6.0.2.tgz",+ "integrity": "sha512-hiyjyANwGcgmzc+tXc1/ZcSZhKnl5MDjaVNWkISHBgadaU0sjTgKIKZMZ62d9J9zlSTyKHCs/osPkQ/3Z+7yeA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/crypto/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/dcutr": {+ "version": "2.0.38",+ "resolved": "https://registry.npmjs.org/@libp2p/dcutr/-/dcutr-2.0.38.tgz",+ "integrity": "sha512-Ny3yA/BqtmRrPIiWjobduccZrUCP+H0HD+2x83wO723iCqBYIMN8Usa5arLTu+TUiMTbxtlWHYaZxGHqfKqn9Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "delay": "^6.0.0",+ "it-protobuf-stream": "^2.0.2",+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@libp2p/dcutr/node_modules/delay": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz",+ "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@libp2p/http-fetch": {+ "version": "2.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/http-fetch/-/http-fetch-2.2.2.tgz",+ "integrity": "sha512-dMPo2pe2h/AHAljgwDEErdiB8JbiJM5b0LzuF/Yq4HcplfJZf33VtzUHN1n8x+3K+F8fntWUKN30SwSisSoVaw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@achingbrain/http-parser-js": "^0.5.8",+ "@libp2p/crypto": "^5.0.6",+ "@libp2p/interface": "^2.2.0",+ "@libp2p/interface-internal": "^2.0.10",+ "@libp2p/peer-id": "^5.0.7",+ "@multiformats/multiaddr": "^12.3.0",+ "@multiformats/multiaddr-to-uri": "^11.0.0",+ "http-cookie-agent": "^6.0.7",+ "p-defer": "^4.0.1",+ "tough-cookie": "^5.0.0",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0",+ "undici": "^6.21.0"+ }+ },+ "node_modules/@libp2p/http-fetch/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/http-fetch/node_modules/tldts": {+ "version": "6.1.86",+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz",+ "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==",+ "license": "MIT",+ "dependencies": {+ "tldts-core": "^6.1.86"+ },+ "bin": {+ "tldts": "bin/cli.js"+ }+ },+ "node_modules/@libp2p/http-fetch/node_modules/tldts-core": {+ "version": "6.1.86",+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz",+ "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==",+ "license": "MIT"+ },+ "node_modules/@libp2p/http-fetch/node_modules/tough-cookie": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz",+ "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==",+ "license": "BSD-3-Clause",+ "dependencies": {+ "tldts": "^6.1.32"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/@libp2p/http-fetch/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/http-fetch/node_modules/undici": {+ "version": "6.25.0",+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.25.0.tgz",+ "integrity": "sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==",+ "license": "MIT",+ "engines": {+ "node": ">=18.17"+ }+ },+ "node_modules/@libp2p/identify": {+ "version": "3.0.39",+ "resolved": "https://registry.npmjs.org/@libp2p/identify/-/identify-3.0.39.tgz",+ "integrity": "sha512-302y1LAGuPy8im+LUiB5+2sUOa/VZuAphOAKLsAQ/74EglWlSrw0Q7f09WUQvfNXmn7XpQnDh7GEI3NZBl54Jw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/peer-record": "^8.0.35",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "it-drain": "^3.0.9",+ "it-parallel": "^3.0.11",+ "it-protobuf-stream": "^2.0.2",+ "main-event": "^1.0.1",+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/identify/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/identify/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/interface": {+ "version": "2.11.0",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.11.0.tgz",+ "integrity": "sha512-0MUFKoXWHTQW3oWIgSHApmYMUKWO/Y02+7Hpyp+n3z+geD4Xo2Rku2gYWmxcq+Pyjkz6Q9YjDWz3Yb2SoV2E8Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^12.4.4",+ "it-pushable": "^3.2.3",+ "it-stream-types": "^2.0.2",+ "main-event": "^1.0.1",+ "multiformats": "^13.3.6",+ "progress-events": "^1.0.1",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@libp2p/interface-internal": {+ "version": "2.3.19",+ "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.3.19.tgz",+ "integrity": "sha512-v335EB0i5CaNF+0SqT01CTBp0VyjJizpy46KprcshFFjX16UQ8+/QzoTZqmot9WiAmAzwR0b87oKmlAE9cpxzQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/peer-collections": "^6.0.35",+ "@multiformats/multiaddr": "^12.4.4",+ "progress-events": "^1.0.1"+ }+ },+ "node_modules/@libp2p/interface/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/kad-dht": {+ "version": "15.1.11",+ "resolved": "https://registry.npmjs.org/@libp2p/kad-dht/-/kad-dht-15.1.11.tgz",+ "integrity": "sha512-a5sdnkztx8AVRDG/+llboRfTLkjQJpSPsSD6F/q6xlI2GbAyEf+JnNKJv0GAUZe9UJCl+g4htM1jA/Rjl0IuCg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/peer-collections": "^6.0.35",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/ping": "^2.0.37",+ "@libp2p/record": "^4.0.7",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "any-signal": "^4.1.1",+ "interface-datastore": "^8.3.1",+ "it-all": "^3.0.8",+ "it-drain": "^3.0.9",+ "it-length": "^3.0.8",+ "it-map": "^3.1.3",+ "it-merge": "^3.0.11",+ "it-parallel": "^3.0.11",+ "it-pipe": "^3.0.1",+ "it-protobuf-stream": "^2.0.2",+ "it-pushable": "^3.2.3",+ "it-take": "^3.0.8",+ "main-event": "^1.0.1",+ "multiformats": "^13.3.6",+ "p-defer": "^4.0.1",+ "p-event": "^6.0.1",+ "progress-events": "^1.0.1",+ "protons-runtime": "^5.5.0",+ "race-signal": "^1.1.3",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/kad-dht/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/kad-dht/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/keychain": {+ "version": "5.2.9",+ "resolved": "https://registry.npmjs.org/@libp2p/keychain/-/keychain-5.2.9.tgz",+ "integrity": "sha512-BgZKMqQCu3Xzd7YFIdwWqG2xXtvsO6RVHJKS8VOw6Dg5tuPAWcQhs0T84TZ5PCg5r6NNBwwI8fWdZGVtu/pPfQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/utils": "^6.7.2",+ "@noble/hashes": "^1.8.0",+ "asn1js": "^3.0.6",+ "interface-datastore": "^8.3.1",+ "multiformats": "^13.3.6",+ "sanitize-filename": "^1.6.3",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/keychain/node_modules/@noble/hashes": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@libp2p/keychain/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/keychain/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/logger": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.2.0.tgz",+ "integrity": "sha512-OEFS529CnIKfbWEHmuCNESw9q0D0hL8cQ8klQfjIVPur15RcgAEgc1buQ7Y6l0B6tCYg120bp55+e9tGvn8c0g==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@multiformats/multiaddr": "^12.4.4",+ "interface-datastore": "^8.3.1",+ "multiformats": "^13.3.6",+ "weald": "^1.0.4"+ }+ },+ "node_modules/@libp2p/logger/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/mdns": {+ "version": "11.0.47",+ "resolved": "https://registry.npmjs.org/@libp2p/mdns/-/mdns-11.0.47.tgz",+ "integrity": "sha512-mHIOfzyrJaXw2oVba1xZ5/6ETqsckkdQZVe66+7XNbjlr1plfO+FneEQ66N03LkqeffHDLht0BAm3WYae6XGkw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@types/multicast-dns": "^7.2.4",+ "dns-packet": "^5.6.1",+ "main-event": "^1.0.1",+ "multicast-dns": "^7.2.5"+ }+ },+ "node_modules/@libp2p/mplex": {+ "version": "11.0.47",+ "resolved": "https://registry.npmjs.org/@libp2p/mplex/-/mplex-11.0.47.tgz",+ "integrity": "sha512-bZvToaf//ITkLzKx2FxpHP/J7IHvUI7lPHzSYAo2dRfB67VMnTnmAkP4IZmR9DV5oORaUrSt8ZRzQfXO7XjzlQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/utils": "^6.7.2",+ "it-pipe": "^3.0.1",+ "it-pushable": "^3.2.3",+ "it-stream-types": "^2.0.2",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/mplex/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/mplex/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/multistream-select": {+ "version": "6.0.29",+ "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-6.0.29.tgz",+ "integrity": "sha512-SWQbPcABOIpznEY7+vAp0Y3HNrE2PlaVY4EywN0lUZ7zvTv9VnAb7av3/gMvfaLI+YrOvhCr1mZ9qbSB93k4kA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "it-length-prefixed": "^10.0.1",+ "it-length-prefixed-stream": "^2.0.2",+ "it-stream-types": "^2.0.2",+ "p-defer": "^4.0.1",+ "race-signal": "^1.1.3",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/multistream-select/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/multistream-select/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/peer-collections": {+ "version": "6.0.35",+ "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.35.tgz",+ "integrity": "sha512-QiloK3T7DXW7R2cpL38dBnALCHf5pMzs/TyFzlEK33WezA2YFVoj7CtOJKqbn29bmV9uspWOxMgfmLUXf8ALvA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/utils": "^6.7.2",+ "multiformats": "^13.3.6"+ }+ },+ "node_modules/@libp2p/peer-collections/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/peer-id": {+ "version": "5.1.9",+ "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.1.9.tgz",+ "integrity": "sha512-cVDp7lX187Epmi/zr0Qq2RsEMmueswP9eIxYSFoMcHL/qcvRFhsxOfUGB8361E26s2WJvC9sXZ0oJS9XVueJhQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "multiformats": "^13.3.6",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/peer-id/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/peer-id/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/peer-record": {+ "version": "8.0.35",+ "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-8.0.35.tgz",+ "integrity": "sha512-0818zvjKbucq5XBnusG8oSWxJ992rVry/2qlfcn/nyK/uDrZ12tjDYHNMCoOWTNeFvFUVkMg9pRkvXvTNp6Yiw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "multiformats": "^13.3.6",+ "protons-runtime": "^5.5.0",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/peer-record/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/peer-record/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/peer-store": {+ "version": "11.2.7",+ "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-11.2.7.tgz",+ "integrity": "sha512-dwTM+0i7mAgAnZvMHghgGcFoWPGaTbKx2nBueMd2Yg38mCs9WeambmR6gQdjwvYpybvNgFDAA+XesCKCotuczg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/peer-collections": "^6.0.35",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/peer-record": "^8.0.35",+ "@multiformats/multiaddr": "^12.4.4",+ "interface-datastore": "^8.3.1",+ "it-all": "^3.0.8",+ "main-event": "^1.0.1",+ "mortice": "^3.2.1",+ "multiformats": "^13.3.6",+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/peer-store/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/peer-store/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/ping": {+ "version": "2.0.37",+ "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-2.0.37.tgz",+ "integrity": "sha512-SvCYM/tHvK3LQzCEa4eflQmrHEL5EAPWPxbIclqJ6SA0mi7jW3xO21AIsHkQDxfFVevIRWKaKoLj6MAythrNcg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@multiformats/multiaddr": "^12.4.4",+ "it-byte-stream": "^2.0.2",+ "main-event": "^1.0.1",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/ping/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/ping/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/record": {+ "version": "4.0.12",+ "resolved": "https://registry.npmjs.org/@libp2p/record/-/record-4.0.12.tgz",+ "integrity": "sha512-CODkztILDzow3I76XbqshRpsP6g7EczNH0fZQdvbNXEqkwJtMOvRrpqxC9n/q65A6V7z6r9oUNSl7etvxS8WnQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "protons-runtime": "^6.0.1",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/record/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/record/node_modules/protons-runtime": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-6.0.2.tgz",+ "integrity": "sha512-hiyjyANwGcgmzc+tXc1/ZcSZhKnl5MDjaVNWkISHBgadaU0sjTgKIKZMZ62d9J9zlSTyKHCs/osPkQ/3Z+7yeA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/record/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/tcp": {+ "version": "10.1.19",+ "resolved": "https://registry.npmjs.org/@libp2p/tcp/-/tcp-10.1.19.tgz",+ "integrity": "sha512-Z+s1n7gBexc32d+DUhOGgQpA8HVukubmNJHzolzZPqly5DYkG2f6SIelitp+M5tDYOPH/43EH9pPSSZ3vUuOwQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "@types/sinon": "^17.0.4",+ "main-event": "^1.0.1",+ "p-defer": "^4.0.1",+ "p-event": "^6.0.1",+ "progress-events": "^1.0.1",+ "race-event": "^1.3.0",+ "stream-to-it": "^1.0.1"+ }+ },+ "node_modules/@libp2p/tls": {+ "version": "2.2.7",+ "resolved": "https://registry.npmjs.org/@libp2p/tls/-/tls-2.2.7.tgz",+ "integrity": "sha512-sPCzDtyR24+4fV+0lTTLIa2iIQONRx6s+Ad96P5YyHvjFTff/SrHQEPpn0f+A/d93qIoiEuovVo/tGjcho5e1A==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/peer-id": "^5.1.9",+ "@peculiar/asn1-schema": "^2.3.15",+ "@peculiar/asn1-x509": "^2.3.15",+ "@peculiar/webcrypto": "^1.5.0",+ "@peculiar/x509": "^1.12.3",+ "asn1js": "^3.0.6",+ "it-queueless-pushable": "^2.0.1",+ "it-stream-types": "^2.0.2",+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/tls/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/tls/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/upnp-nat": {+ "version": "3.1.22",+ "resolved": "https://registry.npmjs.org/@libp2p/upnp-nat/-/upnp-nat-3.1.22.tgz",+ "integrity": "sha512-+Hm78LtgJzEEFrQDqnL8A2tkiQVAwEEe8aAE1niyBmujNLu1KYmqmmjsH6F5F4wacBOetU0QGXmBNMx6eq42CA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@achingbrain/nat-port-mapper": "^4.0.2",+ "@chainsafe/is-ip": "^2.1.0",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "main-event": "^1.0.1",+ "p-defer": "^4.0.1",+ "race-signal": "^1.1.3"+ }+ },+ "node_modules/@libp2p/utils": {+ "version": "6.7.2",+ "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.7.2.tgz",+ "integrity": "sha512-yglVPcYErb4al3MMTdedVLLsdUvr5KaqrrxohxTl/FXMFBvBs0o3w8lo29nfnTUpnNSHFhWZ9at0ZGNnpT/C/w==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.1.0",+ "@chainsafe/netmask": "^2.0.0",+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/logger": "^5.2.0",+ "@multiformats/multiaddr": "^12.4.4",+ "@sindresorhus/fnv1a": "^3.1.0",+ "any-signal": "^4.1.1",+ "delay": "^6.0.0",+ "get-iterator": "^2.0.1",+ "is-loopback-addr": "^2.0.2",+ "is-plain-obj": "^4.1.0",+ "it-foreach": "^2.1.3",+ "it-pipe": "^3.0.1",+ "it-pushable": "^3.2.3",+ "it-stream-types": "^2.0.2",+ "main-event": "^1.0.1",+ "netmask": "^2.0.2",+ "p-defer": "^4.0.1",+ "race-event": "^1.3.0",+ "race-signal": "^1.1.3",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/utils/node_modules/delay": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz",+ "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@libp2p/utils/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/utils/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/webrtc": {+ "version": "5.2.24",+ "resolved": "https://registry.npmjs.org/@libp2p/webrtc/-/webrtc-5.2.24.tgz",+ "integrity": "sha512-0Ne/GDR0FBnKQ/KpJDdQ0Ohii1jyhSCJvbKRxLISm8XItCuJtE1WA2awiWZddZwp2lPDPh9iQmFaYUvv8Zel2w==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.1.0",+ "@chainsafe/libp2p-noise": "^16.1.3",+ "@ipshipyard/node-datachannel": "^0.26.6",+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/keychain": "^5.2.9",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "@peculiar/webcrypto": "^1.5.0",+ "@peculiar/x509": "^1.12.3",+ "any-signal": "^4.1.1",+ "detect-browser": "^5.3.0",+ "get-port": "^7.1.0",+ "interface-datastore": "^8.3.1",+ "it-length-prefixed": "^10.0.1",+ "it-protobuf-stream": "^2.0.2",+ "it-pushable": "^3.2.3",+ "it-stream-types": "^2.0.2",+ "main-event": "^1.0.1",+ "multiformats": "^13.3.6",+ "p-defer": "^4.0.1",+ "p-timeout": "^6.1.4",+ "p-wait-for": "^5.0.2",+ "progress-events": "^1.0.1",+ "protons-runtime": "^5.5.0",+ "race-event": "^1.3.0",+ "race-signal": "^1.1.3",+ "react-native-webrtc": "^124.0.5",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/@libp2p/webrtc/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@libp2p/webrtc/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@libp2p/websockets": {+ "version": "9.2.19",+ "resolved": "https://registry.npmjs.org/@libp2p/websockets/-/websockets-9.2.19.tgz",+ "integrity": "sha512-+g2qI9Lgvyofoc6GFztPoPVZV+z/lg9pIUfneHht6j88Y7tH3NrAQ7Ki+9lqS5XBX2h1O1bHULWbCaVYCj9TZg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^2.11.0",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "@multiformats/multiaddr-to-uri": "^11.0.0",+ "@types/ws": "^8.18.1",+ "it-ws": "^6.1.5",+ "main-event": "^1.0.1",+ "p-defer": "^4.0.1",+ "p-event": "^6.0.1",+ "progress-events": "^1.0.1",+ "race-signal": "^1.1.3",+ "ws": "^8.18.2"+ }+ },+ "node_modules/@libp2p/websockets/node_modules/@types/ws": {+ "version": "8.18.1",+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },"node_modules/@lit-labs/ssr-dom-shim": {"version": "1.5.1","resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.5.1.tgz",@@ -9849,6 +11824,196 @@"win32"]},+ "node_modules/@multiformats/dns": {+ "version": "1.0.13",+ "resolved": "https://registry.npmjs.org/@multiformats/dns/-/dns-1.0.13.tgz",+ "integrity": "sha512-yr4bxtA3MbvJ+2461kYIYMsiiZj/FIqKI64hE4SdvWJUdWF9EtZLar38juf20Sf5tguXKFUruluswAO6JsjS2w==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@dnsquery/dns-packet": "^6.1.1",+ "@libp2p/interface": "^3.1.0",+ "hashlru": "^2.3.0",+ "p-queue": "^9.0.0",+ "progress-events": "^1.0.0",+ "uint8arrays": "^5.0.2"+ }+ },+ "node_modules/@multiformats/dns/node_modules/@libp2p/interface": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.2.2.tgz",+ "integrity": "sha512-IU78g6uF8Ls0//4v9VE1rL5Jvy+i6I8LI/DssojFICbaDJSkL59Sn5XRfHrY5OCxTnUnUxnWK7pHz/3+UZcRNQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^13.0.1",+ "main-event": "^1.0.1",+ "multiformats": "^13.4.0",+ "progress-events": "^1.1.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/@multiformats/dns/node_modules/@multiformats/multiaddr": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.3.tgz",+ "integrity": "sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "multiformats": "^14.0.0",+ "uint8-varint": "^3.0.0",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/@multiformats/dns/node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@multiformats/dns/node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/@multiformats/dns/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@multiformats/dns/node_modules/uint8-varint": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-3.0.0.tgz",+ "integrity": "sha512-S4DdpXBaLwKcFo7f0bWzWfHjbZ/i3QhM842qn+ZvHjxqFCfUcEB9SQNcmI69S+zMlcmIcKxsk9Iyw77S2Kxv6Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^3.0.1",+ "uint8arrays": "^6.1.0"+ }+ },+ "node_modules/@multiformats/dns/node_modules/uint8-varint/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@multiformats/dns/node_modules/uint8-varint/node_modules/uint8arraylist": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-3.0.2.tgz",+ "integrity": "sha512-LDVoq9BQaGJzGDUovEnoX6rpKCvnY/Jbtws4ikwnBzjRbq5qBAFpBZevUEbSmMM87aO0Sp+wOZy2ZXf5yODmXQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^6.0.0"+ }+ },+ "node_modules/@multiformats/dns/node_modules/uint8-varint/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/@multiformats/dns/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@multiformats/mafmt": {+ "version": "12.1.6",+ "resolved": "https://registry.npmjs.org/@multiformats/mafmt/-/mafmt-12.1.6.tgz",+ "integrity": "sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/multiaddr": "^12.0.0"+ }+ },+ "node_modules/@multiformats/multiaddr": {+ "version": "12.5.1",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.5.1.tgz",+ "integrity": "sha512-+DDlr9LIRUS8KncI1TX/FfUn8F2dl6BIxJgshS/yFQCNB5IAF0OGzcwB39g5NLE22s4qqDePv0Qof6HdpJ/4aQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "@chainsafe/netmask": "^2.0.0",+ "@multiformats/dns": "^1.0.3",+ "abort-error": "^1.0.1",+ "multiformats": "^13.0.0",+ "uint8-varint": "^2.0.1",+ "uint8arrays": "^5.0.0"+ }+ },+ "node_modules/@multiformats/multiaddr-matcher": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-matcher/-/multiaddr-matcher-2.0.2.tgz",+ "integrity": "sha512-si7EZCI93mfBJKKRkh+u2bB9W6W5APVN3XfdwuseEJ0OS7ysg0Jno9SuAi0bRzsl5OEFESoF71SjsRqgp8PXAA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/multiaddr": "^12.0.0"+ }+ },+ "node_modules/@multiformats/multiaddr-to-uri": {+ "version": "11.0.2",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-11.0.2.tgz",+ "integrity": "sha512-SiLFD54zeOJ0qMgo9xv1Tl9O5YktDKAVDP4q4hL16mSq4O4sfFNagNADz8eAofxd6TfQUzGQ3TkRRG9IY2uHRg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/multiaddr": "^12.3.0"+ }+ },+ "node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/@multiformats/murmur3": {+ "version": "2.2.5",+ "resolved": "https://registry.npmjs.org/@multiformats/murmur3/-/murmur3-2.2.5.tgz",+ "integrity": "sha512-M+VwV8hEx5qB8i7b8fljMwZETJsqyLo8RAXA+JAn+QF9NnH46ZWvGErNukJVlxXSR2KQpuOtHIYIzZlbhhdFvw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },+ "node_modules/@multiformats/murmur3/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/@multiformats/uri-to-multiaddr": {+ "version": "9.0.2",+ "resolved": "https://registry.npmjs.org/@multiformats/uri-to-multiaddr/-/uri-to-multiaddr-9.0.2.tgz",+ "integrity": "sha512-2TCQR5Y2unG2s9Jm1BdBMTSFmmfgHy8D0777PRT+U2D+IXC1E9JkKF1OS0QlHtGyKUA0IRIk8T0JV4D3v5iOyQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/multiaddr": "^12.1.14",+ "is-ip": "^5.0.0"+ }+ },"node_modules/@napi-rs/wasm-runtime": {"version": "0.2.12","resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz",@@ -10241,7 +12406,6 @@"version": "2.1.5","resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz","integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",- "dev": true,"license": "MIT","dependencies": {"@nodelib/fs.stat": "2.0.5",@@ -10255,7 +12419,6 @@"version": "2.0.5","resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz","integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",- "dev": true,"license": "MIT","engines": {"node": ">= 8"@@ -10265,7 +12428,6 @@"version": "1.2.8","resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz","integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",- "dev": true,"license": "MIT","dependencies": {"@nodelib/fs.scandir": "2.1.5",@@ -11178,6 +13340,191 @@"bs58": "^4.0.1"}},+ "node_modules/@peculiar/asn1-cms": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.7.0.tgz",+ "integrity": "sha512-hew63shtzzvBcSHbhm+cyAmKe6AIfinT9hzEqSPjDC6opTTMKmTkQ0gHuN2KsWlvqiKw1S/fS94fhag/FJkioQ==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "@peculiar/asn1-x509-attr": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-csr": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.7.0.tgz",+ "integrity": "sha512-VVsAyGqErT9D1SY4aEqozThXMVI+ssVRiv2DDeYuvpBKLIgZ3hYs3Ay3u/VSoKq6ESFi9cf6rf3IOOzfwh7oMA==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-ecc": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.7.0.tgz",+ "integrity": "sha512-n7KEs/Q/wrB415cxy4fHOBhegp4NdJ15fkJPwcB/3/8iNBQC2L/N7SChJPKDJPZGYH0jD4Tg4/0vnHmwghnbKw==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-pfx": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.7.0.tgz",+ "integrity": "sha512-V/nrlQVmhg7lYAsM7E13UDL5erAwFv6kCIVFqNaMIHSVi7dngcT839JkRTkQBqznMG98l2XjxYk74ZztAohZzA==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-cms": "^2.7.0",+ "@peculiar/asn1-pkcs8": "^2.7.0",+ "@peculiar/asn1-rsa": "^2.7.0",+ "@peculiar/asn1-schema": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-pkcs8": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.7.0.tgz",+ "integrity": "sha512-9GTl1nE8Mx1kTZ+7QyYatDyKsm34QcWRBFkY1iPvWC3X4Dona5s/tlLiQsx5WzVdZqiMBZNYT0buyw4/vbhnjw==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-pkcs9": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.7.0.tgz",+ "integrity": "sha512-Bh7m+OuIaSEllPQcSd9OSp93F4ROWH7sbITWV8MI+8dwsjE5111/87VxiWVvYFKyww3vp39geLv9ENqhwWHcew==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-cms": "^2.7.0",+ "@peculiar/asn1-pfx": "^2.7.0",+ "@peculiar/asn1-pkcs8": "^2.7.0",+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "@peculiar/asn1-x509-attr": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-rsa": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.7.0.tgz",+ "integrity": "sha512-/qvENQrXyTZURjMqSeofHul0JJt2sNSzSwk36pl2olkHbaioMQgrASDZAlHXl0xUlnVbHj0uGgOrBMTb5x2aJQ==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-schema": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.7.0.tgz",+ "integrity": "sha512-W8ZfWzLmQnrcky+eh3tni4IozMdqBDiHWU0N+vve/UGjMaUs8c0L7A2oEdkBXS8rTpWDpK/aoI3DG/L/hxmxPg==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/utils": "^2.0.2",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-x509": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.7.0.tgz",+ "integrity": "sha512-mUn9RRrkGDnG4ALfunDmzyRW5dg+sWCj/pfnCCqEHYbkGxEpvUt6iVJv8Yw1cyp6SWZ26ZE5oSmI5SqEaen15g==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/utils": "^2.0.2",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/asn1-x509-attr": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.7.0.tgz",+ "integrity": "sha512-NS8e7SOgXipkzUPLF/sce7ukpMpWjhxYsH0n6Y+bHYo4TTxOb95Zv7hqwSuL212mj5YxovjdOKQOgH1As3E94w==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/asn1-x509": "^2.7.0",+ "asn1js": "^3.0.6",+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/json-schema": {+ "version": "1.1.12",+ "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz",+ "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=8.0.0"+ }+ },+ "node_modules/@peculiar/utils": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@peculiar/utils/-/utils-2.0.3.tgz",+ "integrity": "sha512-+oL3HPFRIZ1St2K50lWCXiioIgSoxzz7R1J3uF6neO2yl1sgmpgY6XXJH4BdpoDkMWznQTeYF6oWNDZLCdQ4eQ==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/webcrypto": {+ "version": "1.7.1",+ "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.7.1.tgz",+ "integrity": "sha512-ODOov0sGMJMf3jPonOkgGqPknTsu+DdQ7kD++gz8aI+aFMOMHFbWAA2taqXXVTdP+OTOQR/znGvSpmkeI0WTYQ==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/json-schema": "^1.1.12",+ "@peculiar/utils": "^2.0.2",+ "tslib": "^2.8.1",+ "webcrypto-core": "^1.9.2"+ },+ "engines": {+ "node": ">=14.18.0"+ }+ },+ "node_modules/@peculiar/x509": {+ "version": "1.14.3",+ "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.14.3.tgz",+ "integrity": "sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-cms": "^2.6.0",+ "@peculiar/asn1-csr": "^2.6.0",+ "@peculiar/asn1-ecc": "^2.6.0",+ "@peculiar/asn1-pkcs9": "^2.6.0",+ "@peculiar/asn1-rsa": "^2.6.0",+ "@peculiar/asn1-schema": "^2.6.0",+ "@peculiar/asn1-x509": "^2.6.0",+ "pvtsutils": "^1.3.6",+ "reflect-metadata": "^0.2.2",+ "tslib": "^2.8.1",+ "tsyringe": "^4.10.0"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },"node_modules/@pixiv/three-vrm": {"version": "3.5.2","resolved": "https://registry.npmjs.org/@pixiv/three-vrm/-/three-vrm-3.5.2.tgz",@@ -11195,6 +13542,20 @@"three": ">=0.137"}},+ "node_modules/@pixiv/three-vrm-animation": {+ "version": "3.5.2",+ "resolved": "https://registry.npmjs.org/@pixiv/three-vrm-animation/-/three-vrm-animation-3.5.2.tgz",+ "integrity": "sha512-40MT8Q6A7LHdFARqHPa7g5+8/kYzsqURLe8OhUHO0Q82CqYfkkRuyqlKzaRROu1c47M73BngDBy0NrSUWn6KHg==",+ "license": "MIT",+ "dependencies": {+ "@pixiv/three-vrm-core": "3.5.2",+ "@pixiv/types-vrmc-vrm-1.0": "3.5.2",+ "@pixiv/types-vrmc-vrm-animation-1.0": "3.5.2"+ },+ "peerDependencies": {+ "three": ">=0.137"+ }+ },"node_modules/@pixiv/three-vrm-core": {"version": "3.5.2","resolved": "https://registry.npmjs.org/@pixiv/three-vrm-core/-/three-vrm-core-3.5.2.tgz",@@ -11314,6 +13675,15 @@"integrity": "sha512-kgvRCJc9J0ruaVIxC5R9x4ZYNpM1bxs7vSMcl4SYPi2+baolHvXQiH0kFaN61+rFleld+sOOjDHtE98egY2dxQ==","license": "MIT"},+ "node_modules/@pixiv/types-vrmc-vrm-animation-1.0": {+ "version": "3.5.2",+ "resolved": "https://registry.npmjs.org/@pixiv/types-vrmc-vrm-animation-1.0/-/types-vrmc-vrm-animation-1.0-3.5.2.tgz",+ "integrity": "sha512-p1EEUJ7DX+027ZBL4viJhETUzixaseicwmZMtyqQw7WypKM34l0PcxKLoGv0Dn999kBOgovpnur9YvCkoClXFg==",+ "license": "MIT",+ "dependencies": {+ "@pixiv/types-vrmc-vrm-1.0": "3.5.2"+ }+ },"node_modules/@pkgjs/parseargs": {"version": "0.11.0","resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",@@ -11731,6 +14101,45 @@"dev": true,"license": "MIT"},+ "node_modules/@recast-navigation/core": {+ "version": "0.43.1",+ "resolved": "https://registry.npmjs.org/@recast-navigation/core/-/core-0.43.1.tgz",+ "integrity": "sha512-4igfPgnoV90O92sDSIA0xHa6tanh3z/udlgGmD0SqGQ6PKV4JS2l9jWO8YnxfZuXP/NV52H4c5FU6pSdZc9WDA==",+ "license": "MIT",+ "dependencies": {+ "@recast-navigation/wasm": "0.43.1"+ }+ },+ "node_modules/@recast-navigation/generators": {+ "version": "0.43.1",+ "resolved": "https://registry.npmjs.org/@recast-navigation/generators/-/generators-0.43.1.tgz",+ "integrity": "sha512-w7r6k/A93wWxuSN+Lg+PmlsUVXq06r5bqXmBglolxqDt2O/Y776BIhYtb6P2P6pbYqDWORu9NCZZJzfY4FNpaA==",+ "license": "MIT",+ "dependencies": {+ "@recast-navigation/core": "0.43.1",+ "@recast-navigation/wasm": "0.43.1"+ }+ },+ "node_modules/@recast-navigation/three": {+ "version": "0.43.1",+ "resolved": "https://registry.npmjs.org/@recast-navigation/three/-/three-0.43.1.tgz",+ "integrity": "sha512-XNA3z7/8SBzTswD9LBQkJ5+1yn4J6dzx5uI2zRFXu6G7UOkFEN+f1PeugJUOUOXNjyVdkaYVOg9dKqpaXtzUDw==",+ "license": "MIT",+ "dependencies": {+ "@recast-navigation/core": "0.43.1",+ "@recast-navigation/generators": "0.43.1"+ },+ "peerDependencies": {+ "@types/three": "0.x.x",+ "three": "0.x.x"+ }+ },+ "node_modules/@recast-navigation/wasm": {+ "version": "0.43.1",+ "resolved": "https://registry.npmjs.org/@recast-navigation/wasm/-/wasm-0.43.1.tgz",+ "integrity": "sha512-XFL6PhO8JodwXUHBSAkfaLUdUEweIkJsdP3HTmtJvMs5fkqEWxWJmBskZlACHJepv55NAriqWxOtuLlG3t7+Hg==",+ "license": "MIT"+ },"node_modules/@reown/appkit": {"version": "1.7.2","resolved": "https://registry.npmjs.org/@reown/appkit/-/appkit-1.7.2.tgz",@@ -12922,6 +15331,15 @@}}},+ "node_modules/@resvg/resvg-wasm": {+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/@resvg/resvg-wasm/-/resvg-wasm-2.4.0.tgz",+ "integrity": "sha512-C7c51Nn4yTxXFKvgh2txJFNweaVcfUPQxwEUFw4aWsCmfiBDJsTSwviIF8EcwjQ6k8bPyMWCl1vw4BdxE569Cg==",+ "license": "MPL-2.0",+ "engines": {+ "node": ">= 10"+ }+ },"node_modules/@rolldown/pluginutils": {"version": "1.0.0-beta.27","resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",@@ -13574,6 +15992,22 @@"@opentelemetry/semantic-conventions": "^1.39.0"}},+ "node_modules/@shuding/opentype.js": {+ "version": "1.4.0-beta.0",+ "resolved": "https://registry.npmjs.org/@shuding/opentype.js/-/opentype.js-1.4.0-beta.0.tgz",+ "integrity": "sha512-3NgmNyH3l/Hv6EvsWJbsvpcpUba6R8IREQ83nH83cyakCw7uM1arZKNfHwv1Wz6jgqrF/j4x5ELvR6PnK9nTcA==",+ "license": "MIT",+ "dependencies": {+ "fflate": "^0.7.3",+ "string.prototype.codepointat": "^0.2.1"+ },+ "bin": {+ "ot": "bin/ot"+ },+ "engines": {+ "node": ">= 8.0.0"+ }+ },"node_modules/@signinwithethereum/siwe": {"version": "4.2.0","resolved": "https://registry.npmjs.org/@signinwithethereum/siwe/-/siwe-4.2.0.tgz",@@ -13623,6 +16057,18 @@"integrity": "sha512-auUj4k+f4pyrIVf4GW5UKquSZFHJWri06QgARy9C0t9ZTjJLIuNIrr1yl9bWcJWJ1Gz1vOvYN1D+QPaIlNMVkQ==","license": "MIT"},+ "node_modules/@sindresorhus/fnv1a": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/fnv1a/-/fnv1a-3.1.0.tgz",+ "integrity": "sha512-KV321z5m/0nuAg83W1dPLy85HpHDk7Sdi4fJbwvacWsEhAh+rZUW4ZfGcXmUIvjZg4ss2bcwNlRhJ7GBEUG08w==",+ "license": "MIT",+ "engines": {+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/@sindresorhus/is": {"version": "7.2.0","resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz",@@ -18189,7 +20635,6 @@"version": "1.1.0","resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz","integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",- "dev": true,"license": "MIT"},"node_modules/@stellar/js-xdr": {@@ -20783,6 +23228,15 @@"dev": true,"license": "MIT"},+ "node_modules/@types/dns-packet": {+ "version": "5.6.5",+ "resolved": "https://registry.npmjs.org/@types/dns-packet/-/dns-packet-5.6.5.tgz",+ "integrity": "sha512-qXOC7XLOEe43ehtWJCMnQXvgcIpv6rPmQ1jXT98Ad8A3TB1Ue50jsCbSSSyuazScEuZ/Q026vHbrOTVkmwA+7Q==",+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },"node_modules/@types/estree": {"version": "1.0.8","resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",@@ -20915,6 +23369,16 @@"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==","license": "MIT"},+ "node_modules/@types/multicast-dns": {+ "version": "7.2.4",+ "resolved": "https://registry.npmjs.org/@types/multicast-dns/-/multicast-dns-7.2.4.tgz",+ "integrity": "sha512-ib5K4cIDR4Ro5SR3Sx/LROkMDa0BHz0OPaCBL/OSPDsAXEGZ3/KQeS6poBKYVN7BfjXDL9lWNwzyHVgt/wkyCw==",+ "license": "MIT",+ "dependencies": {+ "@types/dns-packet": "*",+ "@types/node": "*"+ }+ },"node_modules/@types/mysql": {"version": "2.15.27","resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.27.tgz",@@ -20996,6 +23460,12 @@"dev": true,"license": "MIT"},+ "node_modules/@types/retry": {+ "version": "0.12.2",+ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz",+ "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==",+ "license": "MIT"+ },"node_modules/@types/send": {"version": "1.2.1","resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz",@@ -21017,6 +23487,21 @@"@types/node": "*"}},+ "node_modules/@types/sinon": {+ "version": "17.0.4",+ "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz",+ "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==",+ "license": "MIT",+ "dependencies": {+ "@types/sinonjs__fake-timers": "*"+ }+ },+ "node_modules/@types/sinonjs__fake-timers": {+ "version": "15.0.1",+ "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz",+ "integrity": "sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==",+ "license": "MIT"+ },"node_modules/@types/stack-utils": {"version": "2.0.3","resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",@@ -21676,6 +24161,31 @@"react": ">= 16.8.0"}},+ "node_modules/@vercel/og": {+ "version": "0.11.1",+ "resolved": "https://registry.npmjs.org/@vercel/og/-/og-0.11.1.tgz",+ "integrity": "sha512-02rXXRABFq1B03w3aNhcVfxkY+8Ba5QFi4ax0zS0oOiD/LL9WUd/LA7BjVPakrQmVhIBjuo2oBM5U25R9IuXMg==",+ "license": "MPL-2.0",+ "dependencies": {+ "@resvg/resvg-wasm": "2.4.0",+ "satori": "0.25.0"+ },+ "engines": {+ "node": ">=16"+ },+ "optionalDependencies": {+ "sharp": "^0.34.5"+ }+ },+ "node_modules/@vercel/oidc": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.2.0.tgz",+ "integrity": "sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==",+ "license": "Apache-2.0",+ "engines": {+ "node": ">= 20"+ }+ },"node_modules/@vitejs/plugin-basic-ssl": {"version": "2.3.0","resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-2.3.0.tgz",@@ -23746,6 +26256,12 @@"node": ">=6.5"}},+ "node_modules/abort-error": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/abort-error/-/abort-error-1.0.2.tgz",+ "integrity": "sha512-lVgvB2NyPLqbXXhVmXcYFTC1x5K7CiVdPgdY7LGgFQWC8506oN01sPN3i9cl9ynuwF4iJ0TS9exnR7cZ9FuX4w==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/accepts": {"version": "1.3.8","resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",@@ -23759,6 +26275,22 @@"node": ">= 0.6"}},+ "node_modules/acme-client": {+ "version": "5.4.0",+ "resolved": "https://registry.npmjs.org/acme-client/-/acme-client-5.4.0.tgz",+ "integrity": "sha512-mORqg60S8iML6XSmVjqjGHJkINrCGLMj2QvDmFzI9vIlv1RGlyjmw3nrzaINJjkNsYXC41XhhD5pfy7CtuGcbA==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/x509": "^1.11.0",+ "asn1js": "^3.0.5",+ "axios": "^1.7.2",+ "debug": "^4.3.5",+ "node-forge": "^1.3.1"+ },+ "engines": {+ "node": ">= 16"+ }+ },"node_modules/acorn": {"version": "8.16.0","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",@@ -23805,6 +26337,39 @@"node": ">= 14"}},+ "node_modules/agent0-sdk": {+ "version": "1.7.1",+ "resolved": "https://registry.npmjs.org/agent0-sdk/-/agent0-sdk-1.7.1.tgz",+ "integrity": "sha512-qChd1YAwoC9EpEos3hbeY9WTmfbQHGzAiYYr4et2tXsafH3Dxf17J7dkudt47HXr6hdEZChW5Um3ogK6wjBPpw==",+ "license": "MIT",+ "dependencies": {+ "@helia/unixfs": "^4.0.0",+ "graphql-request": "^6.1.0",+ "helia": "^5.0.0",+ "kubo-rpc-client": "^6.1.0",+ "multiformats": "^13.0.0",+ "undici": "^6.23.0",+ "viem": "^2.37.5"+ },+ "engines": {+ "node": ">=22.0.0"+ }+ },+ "node_modules/agent0-sdk/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/agent0-sdk/node_modules/undici": {+ "version": "6.25.0",+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.25.0.tgz",+ "integrity": "sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==",+ "license": "MIT",+ "engines": {+ "node": ">=18.17"+ }+ },"node_modules/agentkeepalive": {"version": "4.6.0","resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",@@ -23817,6 +26382,24 @@"node": ">= 8.0.0"}},+ "node_modules/ai": {+ "version": "6.0.184",+ "resolved": "https://registry.npmjs.org/ai/-/ai-6.0.184.tgz",+ "integrity": "sha512-j//zHkKvj5ra27l8izHco8cj1g1Pr7vx1ZK+hrzrkHvndgIRmdfZKOb6+RAPpvbk42qGIsuYvlYbGlVAu3erNQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/gateway": "3.0.115",+ "@ai-sdk/provider": "3.0.10",+ "@ai-sdk/provider-utils": "4.0.27",+ "@opentelemetry/api": "^1.9.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },"node_modules/ajv": {"version": "8.18.0","resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",@@ -23951,6 +26534,16 @@"dev": true,"license": "MIT"},+ "node_modules/any-signal": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-4.2.0.tgz",+ "integrity": "sha512-LndMvYuAPf4rC195lk7oSFuHOYFpOszIYrNYv0gHAvz+aEhE9qPZLhmrIz5pXP2BSsPOXvsuHDXEGaiQhIh9wA==",+ "license": "Apache-2.0 OR MIT",+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },"node_modules/anymatch": {"version": "3.1.3","resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",@@ -24335,6 +26928,20 @@"integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==","license": "MIT"},+ "node_modules/asn1js": {+ "version": "3.0.10",+ "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.10.tgz",+ "integrity": "sha512-S2s3aOytiKdFRdulw2qPE51MzjzVOisppcVv7jVFR+Kw0kxwvFrDcYA0h7Ndqbmj0HkMIXYWaoj7fli8kgx1eg==",+ "license": "BSD-3-Clause",+ "dependencies": {+ "pvtsutils": "^1.3.6",+ "pvutils": "^1.1.5",+ "tslib": "^2.8.1"+ },+ "engines": {+ "node": ">=12.0.0"+ }+ },"node_modules/assert": {"version": "2.1.0","resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz",@@ -25096,6 +27703,35 @@"integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==","license": "MIT"},+ "node_modules/blob-to-it": {+ "version": "2.0.12",+ "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-2.0.12.tgz",+ "integrity": "sha512-0zEZt8t8/QrdH4boktG19F/9fqfPWFjuh1QlK0qTCO13oUWaBAR8kpNloQNb3OWUtaA0mu8qfPy0R3CZDC8M2g==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "browser-readablestream-to-it": "^2.0.0"+ }+ },+ "node_modules/blockstore-core": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/blockstore-core/-/blockstore-core-5.0.4.tgz",+ "integrity": "sha512-v7wtBEpW2J/kKljN7Z2u4Tnwr7qwnOvW1aPVfynIxEdejlVC7gg4z9k6iJt7n5XMGkdNnH4HOmVcjYcaMnu7yg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/logger": "^5.1.18",+ "interface-blockstore": "^5.0.0",+ "interface-store": "^6.0.0",+ "it-filter": "^3.1.3",+ "it-merge": "^3.0.11",+ "multiformats": "^13.3.6"+ }+ },+ "node_modules/blockstore-core/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/bn.js": {"version": "5.2.3","resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.3.tgz",@@ -25249,7 +27885,6 @@"version": "3.0.3","resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz","integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",- "dev": true,"license": "MIT","dependencies": {"fill-range": "^7.1.1"@@ -25264,6 +27899,12 @@"integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==","license": "MIT"},+ "node_modules/browser-readablestream-to-it": {+ "version": "2.0.12",+ "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-2.0.12.tgz",+ "integrity": "sha512-VDAcuM39JVtxZ7auqE2p0zHYk1fq+pac0cWLOQJ48MIChTZ1RjCR2PYCdL3kIisst7oGZCxYrJhfHlbNYIa0Tg==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/browser-resolve": {"version": "2.0.0","resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz",@@ -25745,6 +28386,15 @@"integrity": "sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==","license": "MIT"},+ "node_modules/cborg": {+ "version": "4.5.8",+ "resolved": "https://registry.npmjs.org/cborg/-/cborg-4.5.8.tgz",+ "integrity": "sha512-6/viltD51JklRhq4L7jC3zgy6gryuG5xfZ3kzpE+PravtyeQLeQmCYLREhQH7pWENg5pY4Yu/XCd6a7dKScVlw==",+ "license": "Apache-2.0",+ "bin": {+ "cborg": "lib/bin.js"+ }+ },"node_modules/chai": {"version": "6.2.2","resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",@@ -25817,6 +28467,12 @@"url": "https://paulmillr.com/funding/"}},+ "node_modules/chownr": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",+ "license": "ISC"+ },"node_modules/chromium-bidi": {"version": "14.0.0","resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-14.0.0.tgz",@@ -25945,6 +28601,33 @@"node": ">=0.10.0"}},+ "node_modules/clone-regexp": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-3.0.0.tgz",+ "integrity": "sha512-ujdnoq2Kxb8s3ItNBtnYeXdm07FcU0u8ARAT1lQ2YdMwQC+cdiXX8KoqMVuglztILivceTtp4ivqGSmEmhBUJw==",+ "license": "MIT",+ "dependencies": {+ "is-regexp": "^3.0.0"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/clone-regexp/node_modules/is-regexp": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-3.1.0.tgz",+ "integrity": "sha512-rbku49cWloU5bSMI+zaRaXdQHXnthP6DZ/vLnfdSKyL4zUzuWnomtOEiZZOd+ioQ+avFo/qau3KPTc7Fjy1uPA==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/co": {"version": "4.6.0","resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",@@ -26133,6 +28816,18 @@"node": ">= 0.6"}},+ "node_modules/convert-hrtime": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/convert-hrtime/-/convert-hrtime-5.0.0.tgz",+ "integrity": "sha512-lOETlkIeYSJWcbbcvjRKGxVMXJR+8+OQb/mTPbA4ObPMytYIsUbuOE0Jzy60hjARYszq1id0j8KgVhC+WGZVTg==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/convert-source-map": {"version": "2.0.0","resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",@@ -26419,6 +29114,18 @@"node": ">=8"}},+ "node_modules/css-background-parser": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/css-background-parser/-/css-background-parser-0.1.0.tgz",+ "integrity": "sha512-2EZLisiZQ+7m4wwur/qiYJRniHX4K5Tc9w93MT3AS0WS1u5kaZ4FKXlOTBhOjc+CgEgPiGY+fX1yWD8UwpEqUA==",+ "license": "MIT"+ },+ "node_modules/css-box-shadow": {+ "version": "1.0.0-3",+ "resolved": "https://registry.npmjs.org/css-box-shadow/-/css-box-shadow-1.0.0-3.tgz",+ "integrity": "sha512-9jaqR6e7Ohds+aWwmhe6wILJ99xYQbfmK9QQB9CcMjDbTxPZjwEmUQpU91OG05Xgm8BahT5fW+svbsQGjS/zPg==",+ "license": "MIT"+ },"node_modules/css-color-keywords": {"version": "1.0.0","resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",@@ -26428,6 +29135,15 @@"node": ">=4"}},+ "node_modules/css-gradient-parser": {+ "version": "0.0.17",+ "resolved": "https://registry.npmjs.org/css-gradient-parser/-/css-gradient-parser-0.0.17.tgz",+ "integrity": "sha512-w2Xy9UMMwlKtou0vlRnXvWglPAceXCTtcmVSo8ZBUvqCV5aXEFP/PC6d+I464810I9FT++UACwTD5511bmGPUg==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ }+ },"node_modules/css-line-break": {"version": "2.1.0","resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",@@ -26668,6 +29384,22 @@"uniq": "^1.0.0"}},+ "node_modules/dag-jose": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-5.1.1.tgz",+ "integrity": "sha512-9alfZ8Wh1XOOMel8bMpDqWsDT72ojFQCJPtwZSev9qh4f8GoCV9qrJW8jcOUhcstO8Kfm09FHGo//jqiZq3z9w==",+ "license": "(Apache-2.0 OR MIT)",+ "dependencies": {+ "@ipld/dag-cbor": "^9.0.0",+ "multiformats": "~13.1.3"+ }+ },+ "node_modules/dag-jose/node_modules/multiformats": {+ "version": "13.1.3",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.3.tgz",+ "integrity": "sha512-CZPi9lFZCM/+7oRolWYsvalsyWQGFo+GpdaTmjxXXomC+nP/W1Rnxb9sUgjvmNmRZ5bOPqRAl4nuK+Ydw/4tGw==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/dat.gui": {"version": "0.7.9","resolved": "https://registry.npmjs.org/dat.gui/-/dat.gui-0.7.9.tgz",@@ -26789,6 +29521,24 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/datastore-core": {+ "version": "10.0.4",+ "resolved": "https://registry.npmjs.org/datastore-core/-/datastore-core-10.0.4.tgz",+ "integrity": "sha512-IctgCO0GA7GHG7aRm3JRruibCsfvN4EXNnNIlLCZMKIv0TPkdAL5UFV3/xTYFYrrZ1jRNrXZNZRvfcVf/R+rAw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/logger": "^5.1.18",+ "interface-datastore": "^8.0.0",+ "interface-store": "^6.0.0",+ "it-drain": "^3.0.9",+ "it-filter": "^3.1.3",+ "it-map": "^3.1.3",+ "it-merge": "^3.0.11",+ "it-pipe": "^3.0.1",+ "it-sort": "^3.0.8",+ "it-take": "^3.0.8"+ }+ },"node_modules/dayjs": {"version": "1.11.13","resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",@@ -26837,6 +29587,21 @@"node": ">=14.16"}},+ "node_modules/decompress-response": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",+ "license": "MIT",+ "dependencies": {+ "mimic-response": "^3.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/dedent": {"version": "1.7.2","resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz",@@ -26862,6 +29627,15 @@"node": ">=6"}},+ "node_modules/deep-extend": {+ "version": "0.6.0",+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",+ "license": "MIT",+ "engines": {+ "node": ">=4.0.0"+ }+ },"node_modules/deep-is": {"version": "0.1.4","resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",@@ -27106,6 +29880,18 @@"node": ">=8"}},+ "node_modules/dns-packet": {+ "version": "5.6.1",+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz",+ "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==",+ "license": "MIT",+ "dependencies": {+ "@leichtgewicht/ip-codec": "^2.0.1"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/doctrine": {"version": "3.0.0","resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",@@ -27246,6 +30032,18 @@"node": ">=0.10.0"}},+ "node_modules/electron-fetch": {+ "version": "1.9.1",+ "resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.9.1.tgz",+ "integrity": "sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA==",+ "license": "MIT",+ "dependencies": {+ "encoding": "^0.1.13"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/electron-to-chromium": {"version": "1.5.336","resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.336.tgz",@@ -27299,6 +30097,15 @@"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==","license": "MIT"},+ "node_modules/emoji-regex-xs": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-2.0.1.tgz",+ "integrity": "sha512-1QFuh8l7LqUcKe24LsPUNzjrzJQ7pgRwp1QMcZ5MX6mFplk2zQ08NVCM84++1cveaUUYtcCYHmeFEuNg16sU4g==",+ "license": "MIT",+ "engines": {+ "node": ">=10.0.0"+ }+ },"node_modules/encode-utf8": {"version": "1.0.3","resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz",@@ -27314,6 +30121,27 @@"node": ">= 0.8"}},+ "node_modules/encoding": {+ "version": "0.1.13",+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",+ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",+ "license": "MIT",+ "dependencies": {+ "iconv-lite": "^0.6.2"+ }+ },+ "node_modules/encoding/node_modules/iconv-lite": {+ "version": "0.6.3",+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",+ "license": "MIT",+ "dependencies": {+ "safer-buffer": ">= 2.1.2 < 3.0.0"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/end-of-stream": {"version": "1.4.5","resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",@@ -27388,6 +30216,12 @@"node": ">=6"}},+ "node_modules/err-code": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz",+ "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==",+ "license": "MIT"+ },"node_modules/error-ex": {"version": "1.3.4","resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",@@ -28637,6 +31471,12 @@"integrity": "sha512-jQ5Ql18hdCQ4qS+RCrbLfz1n+Pags27q5TwMKvZyhp5hh2UULUYZUy1keqj6k6SYsdqIYjnmz7xyyEY0V67B8Q==","license": "MIT"},+ "node_modules/event-iterator": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz",+ "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==",+ "license": "MIT"+ },"node_modules/event-target-shim": {"version": "5.0.1","resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",@@ -28761,6 +31601,15 @@"node": ">= 0.8.0"}},+ "node_modules/expand-template": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",+ "license": "(MIT OR WTFPL)",+ "engines": {+ "node": ">=6"+ }+ },"node_modules/expect": {"version": "30.3.0","resolved": "https://registry.npmjs.org/expect/-/expect-30.3.0.tgz",@@ -28944,6 +31793,44 @@"node": "> 0.1.90"}},+ "node_modules/fast-check": {+ "version": "4.8.0",+ "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.8.0.tgz",+ "integrity": "sha512-GOJ158CUMnN6cSahsv4+ExARvIDuzzinFjkp0E9WtiBa5zcVeLozVkWaE4IzFcc+Y48Wp1EDlUZsXRyAztQcSg==",+ "funding": [+ {+ "type": "individual",+ "url": "https://github.com/sponsors/dubzzz"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/fast-check"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "pure-rand": "^8.0.0"+ },+ "engines": {+ "node": ">=12.17.0"+ }+ },+ "node_modules/fast-check/node_modules/pure-rand": {+ "version": "8.4.0",+ "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.0.tgz",+ "integrity": "sha512-IoM8YF/jY0hiugFo/wOWqfmarlE6J0wc6fDK1PhftMk7MGhVZl88sZimmqBBFomLOCSmcCCpsfj7wXASCpvK9A==",+ "funding": [+ {+ "type": "individual",+ "url": "https://github.com/sponsors/dubzzz"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/fast-check"+ }+ ],+ "license": "MIT"+ },"node_modules/fast-deep-equal": {"version": "3.1.3","resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",@@ -28960,7 +31847,6 @@"version": "3.3.3","resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz","integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",- "dev": true,"license": "MIT","dependencies": {"@nodelib/fs.stat": "^2.0.2",@@ -28977,7 +31863,6 @@"version": "5.1.2","resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz","integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",- "dev": true,"license": "ISC","dependencies": {"is-glob": "^4.0.1"@@ -29081,7 +31966,6 @@"version": "1.20.1","resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz","integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",- "dev": true,"license": "ISC","dependencies": {"reusify": "^1.0.4"@@ -29168,6 +32052,12 @@"node": "^12.20 || >= 14.13"}},+ "node_modules/fflate": {+ "version": "0.7.4",+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz",+ "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==",+ "license": "MIT"+ },"node_modules/figures": {"version": "3.2.0","resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",@@ -29283,7 +32173,6 @@"version": "7.1.1","resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz","integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",- "dev": true,"license": "MIT","dependencies": {"to-regex-range": "^5.0.1"@@ -29543,6 +32432,16 @@"integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==","license": "MIT"},+ "node_modules/freeport-promise": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/freeport-promise/-/freeport-promise-2.0.0.tgz",+ "integrity": "sha512-dwWpT1DdQcwrhmRwnDnPM/ZFny+FtzU+k50qF2eid3KxaQDsMiBrwo1i0G3qSugkN5db6Cb0zgfc68QeTOpEFg==",+ "license": "Apache-2.0 OR MIT",+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },"node_modules/fresh": {"version": "0.5.2","resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",@@ -29552,6 +32451,12 @@"node": ">= 0.6"}},+ "node_modules/fs-constants": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",+ "license": "MIT"+ },"node_modules/fs-extra": {"version": "9.1.0","resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",@@ -29597,6 +32502,18 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/function-timeout": {+ "version": "0.1.1",+ "resolved": "https://registry.npmjs.org/function-timeout/-/function-timeout-0.1.1.tgz",+ "integrity": "sha512-0NVVC0TaP7dSTvn1yMiy6d6Q8gifzbvQafO46RtLG/kHJUBNd+pVRGOBoK44wNBvtSPUJRfdVvkFdD3p0xvyZg==",+ "license": "MIT",+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/function.prototype.name": {"version": "1.1.8","resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",@@ -29679,6 +32596,12 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/get-iterator": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-2.0.1.tgz",+ "integrity": "sha512-7HuY/hebu4gryTDT7O/XY/fvY9wRByEGdK6QOa4of8npTcv0+NS6frFKABcf6S9EBAsveTuKTsZQQBFMMNILIg==",+ "license": "MIT"+ },"node_modules/get-own-enumerable-property-symbols": {"version": "3.0.2","resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",@@ -29696,6 +32619,18 @@"node": ">=8.0.0"}},+ "node_modules/get-port": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/get-port/-/get-port-7.2.0.tgz",+ "integrity": "sha512-afP4W205ONCuMoPBqcR6PSXnzX35KTcJygfJfcp+QY+uwm3p20p1YczWXhlICIzGMCxYBQcySEcOgsJcrkyobg==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/get-proto": {"version": "1.0.1","resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",@@ -29810,6 +32745,12 @@"node": ">=14.14"}},+ "node_modules/github-from-package": {+ "version": "0.0.0",+ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",+ "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",+ "license": "MIT"+ },"node_modules/glob": {"version": "11.1.0","resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz",@@ -29955,6 +32896,28 @@"unicode-trie": "^2.0.0"}},+ "node_modules/graphql": {+ "version": "16.14.0",+ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.14.0.tgz",+ "integrity": "sha512-BBvQ/406p+4CZbTpCbVPSxfzrZrbnuWSP1ELYgyS6B+hNeKzgrdB4JczCa5VZUBQrDa9hUngm0KnexY6pJRN5Q==",+ "license": "MIT",+ "engines": {+ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"+ }+ },+ "node_modules/graphql-request": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-6.1.0.tgz",+ "integrity": "sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==",+ "license": "MIT",+ "dependencies": {+ "@graphql-typed-document-node/core": "^3.2.0",+ "cross-fetch": "^3.1.5"+ },+ "peerDependencies": {+ "graphql": "14 - 16"+ }+ },"node_modules/gsap": {"version": "3.15.0","resolved": "https://registry.npmjs.org/gsap/-/gsap-3.15.0.tgz",@@ -29978,6 +32941,31 @@"uncrypto": "^0.1.3"}},+ "node_modules/hamt-sharding": {+ "version": "3.0.8",+ "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-3.0.8.tgz",+ "integrity": "sha512-pEh4hYa4ZyDJ2jWBTz7MVqTTGC3va3iEIMDJfbCKskR9rzHRd8HVwUyH5nLiLxK6VCFWIJ4vnlAEn4Hwx49Rbg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "sparse-array": "^1.3.1",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/hamt-sharding/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/hamt-sharding/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },"node_modules/handlebars": {"version": "4.7.9","resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz",@@ -30110,6 +33098,12 @@"minimalistic-assert": "^1.0.1"}},+ "node_modules/hashlru": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/hashlru/-/hashlru-2.3.0.tgz",+ "integrity": "sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A==",+ "license": "MIT"+ },"node_modules/hasown": {"version": "2.0.2","resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",@@ -30122,6 +33116,52 @@"node": ">= 0.4"}},+ "node_modules/helia": {+ "version": "5.5.1",+ "resolved": "https://registry.npmjs.org/helia/-/helia-5.5.1.tgz",+ "integrity": "sha512-UrTI19VZsNrYc4efwTSIWZeCkJeoxTM4pa/2Zofj5mYLNb6wB09XMJLHBgX1q0dJC7CETVjXeSXcjZgL2s9+AA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/libp2p-noise": "^16.0.1",+ "@chainsafe/libp2p-yamux": "^7.0.1",+ "@helia/block-brokers": "^4.2.4",+ "@helia/delegated-routing-v1-http-api-client": "^4.2.1",+ "@helia/interface": "^5.4.0",+ "@helia/routers": "^3.1.3",+ "@helia/utils": "^1.4.0",+ "@ipshipyard/libp2p-auto-tls": "^1.0.0",+ "@libp2p/autonat": "^2.0.19",+ "@libp2p/bootstrap": "^11.0.20",+ "@libp2p/circuit-relay-v2": "^3.1.10",+ "@libp2p/config": "^1.0.3",+ "@libp2p/dcutr": "^2.0.18",+ "@libp2p/identify": "^3.0.18",+ "@libp2p/interface": "^2.5.0",+ "@libp2p/kad-dht": "^15.0.2",+ "@libp2p/keychain": "^5.0.14",+ "@libp2p/mdns": "^11.0.20",+ "@libp2p/mplex": "^11.0.20",+ "@libp2p/ping": "^2.0.18",+ "@libp2p/tcp": "^10.0.18",+ "@libp2p/tls": "^2.0.15",+ "@libp2p/upnp-nat": "^3.1.1",+ "@libp2p/webrtc": "^5.1.0",+ "@libp2p/websockets": "^9.1.5",+ "@multiformats/dns": "^1.0.6",+ "blockstore-core": "^5.0.2",+ "datastore-core": "^10.0.2",+ "interface-datastore": "^8.3.1",+ "ipns": "^10.0.0",+ "libp2p": "^2.9.0",+ "multiformats": "^13.3.1"+ }+ },+ "node_modules/helia/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/helius-sdk": {"version": "2.2.2","resolved": "https://registry.npmjs.org/helius-sdk/-/helius-sdk-2.2.2.tgz",@@ -31067,6 +34107,18 @@"node": ">=20"}},+ "node_modules/hex-rgb": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/hex-rgb/-/hex-rgb-4.3.0.tgz",+ "integrity": "sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/hi-base32": {"version": "0.5.1","resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.1.tgz",@@ -31141,6 +34193,30 @@"node": ">=8.0.0"}},+ "node_modules/http-cookie-agent": {+ "version": "6.0.8",+ "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.8.tgz",+ "integrity": "sha512-qnYh3yLSr2jBsTYkw11elq+T361uKAJaZ2dR4cfYZChw1dt9uL5t3zSUwehoqqVb4oldk1BpkXKm2oat8zV+oA==",+ "license": "MIT",+ "dependencies": {+ "agent-base": "^7.1.3"+ },+ "engines": {+ "node": ">=18.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/3846masa"+ },+ "peerDependencies": {+ "tough-cookie": "^4.0.0 || ^5.0.0",+ "undici": "^5.11.0 || ^6.0.0"+ },+ "peerDependenciesMeta": {+ "undici": {+ "optional": true+ }+ }+ },"node_modules/http-errors": {"version": "1.8.1","resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",@@ -31410,6 +34486,12 @@"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==","license": "ISC"},+ "node_modules/ini": {+ "version": "1.3.8",+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",+ "license": "ISC"+ },"node_modules/inquirer": {"version": "8.2.7","resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz",@@ -31472,6 +34554,53 @@"integrity": "sha512-94smTCQOvigN4d/2R/YDjz8YVG0Sufvv2aAh8P5m42gwhCsDAJqnbNOrxJsrADuAFAA69Q/ptGzxvNcNuIJcvw==","license": "MIT"},+ "node_modules/interface-blockstore": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.3.2.tgz",+ "integrity": "sha512-oA9Pjkxun/JHAsZrYEyKX+EoPjLciTzidE7wipLc/3YoHDjzsnXRJzAzFJXNUvogtY4g7hIwxArx8+WKJs2RIg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "interface-store": "^6.0.0",+ "multiformats": "^13.3.6"+ }+ },+ "node_modules/interface-blockstore/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/interface-datastore": {+ "version": "8.3.2",+ "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.3.2.tgz",+ "integrity": "sha512-R3NLts7pRbJKc3qFdQf+u40hK8XWc0w4Qkx3OFEstC80VoaDUABY/dXA2EJPhtNC+bsrf41Ehvqb6+pnIclyRA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "interface-store": "^6.0.0",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/interface-datastore/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/interface-datastore/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/interface-store": {+ "version": "6.0.3",+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.3.tgz",+ "integrity": "sha512-+WvfEZnFUhRwFxgz+QCQi7UC6o9AM0EHM9bpIe2Nhqb100NHCsTvNAn4eJgvgV2/tmLo1MP9nGxQKEcZTAueLA==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/internal-slot": {"version": "1.1.0","resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",@@ -31503,6 +34632,18 @@"node": ">= 12"}},+ "node_modules/ip-regex": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-5.0.0.tgz",+ "integrity": "sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==",+ "license": "MIT",+ "engines": {+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/ipaddr.js": {"version": "2.3.0","resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.3.0.tgz",@@ -31512,6 +34653,242 @@"node": ">= 10"}},+ "node_modules/ipfs-unixfs": {+ "version": "11.2.5",+ "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-11.2.5.tgz",+ "integrity": "sha512-uasYJ0GLPbViaTFsOLnL9YPjX5VmhnqtWRriogAHOe4ApmIi9VAOFBzgDHsUW2ub4pEa/EysbtWk126g2vkU/g==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "protons-runtime": "^5.5.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/ipfs-unixfs-exporter": {+ "version": "13.7.3",+ "resolved": "https://registry.npmjs.org/ipfs-unixfs-exporter/-/ipfs-unixfs-exporter-13.7.3.tgz",+ "integrity": "sha512-sTFjAEnsPu5irh9rvT1j5mNf7nXnW78x5SJrCIrNZb1UqkXQtNX81RjAnTBShUtZ5ujSOc/yrC9Az8il8NVkKQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@ipld/dag-cbor": "^9.2.4",+ "@ipld/dag-json": "^10.2.5",+ "@ipld/dag-pb": "^4.1.5",+ "@multiformats/murmur3": "^2.1.8",+ "hamt-sharding": "^3.0.6",+ "interface-blockstore": "^5.3.2",+ "ipfs-unixfs": "^11.0.0",+ "it-filter": "^3.1.4",+ "it-last": "^3.0.9",+ "it-map": "^3.1.4",+ "it-parallel": "^3.0.13",+ "it-pipe": "^3.0.1",+ "it-pushable": "^3.2.3",+ "multiformats": "^13.3.7",+ "p-queue": "^8.1.0",+ "progress-events": "^1.0.1"+ }+ },+ "node_modules/ipfs-unixfs-exporter/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/ipfs-unixfs-exporter/node_modules/p-queue": {+ "version": "8.1.1",+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.1.tgz",+ "integrity": "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ==",+ "license": "MIT",+ "dependencies": {+ "eventemitter3": "^5.0.1",+ "p-timeout": "^6.1.2"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/ipfs-unixfs-importer": {+ "version": "15.4.0",+ "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-15.4.0.tgz",+ "integrity": "sha512-laypY07Q0uGLMSxx5YsfVAEPVzdbV2p9cEC1/HNxqoWoz83LA2nX45usr8dcehalKLHm38u0FwUiRHq5wCHngQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@ipld/dag-pb": "^4.1.5",+ "@multiformats/murmur3": "^2.1.8",+ "hamt-sharding": "^3.0.6",+ "interface-blockstore": "^5.3.2",+ "interface-store": "^6.0.3",+ "ipfs-unixfs": "^11.0.0",+ "it-all": "^3.0.9",+ "it-batch": "^3.0.9",+ "it-first": "^3.0.9",+ "it-parallel-batch": "^3.0.9",+ "multiformats": "^13.3.7",+ "progress-events": "^1.0.1",+ "rabin-wasm": "^0.1.5",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/ipfs-unixfs-importer/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/ipfs-unixfs-importer/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/ipns": {+ "version": "10.1.6",+ "resolved": "https://registry.npmjs.org/ipns/-/ipns-10.1.6.tgz",+ "integrity": "sha512-mTACIdTBBXY5kbCo3t/M3ycNWbjajLrSXhTvjD0MEGyOUaI3uMv94JbJSHGaJ2xxRlpOrRk1ifToOsyPZiglnA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.0.0",+ "@libp2p/interface": "^3.0.2",+ "@libp2p/logger": "^6.0.4",+ "cborg": "^5.1.0",+ "interface-datastore": "^9.0.2",+ "multiformats": "^13.2.2",+ "protons-runtime": "^6.0.1",+ "timestamp-nano": "^1.0.1",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/ipns/node_modules/@libp2p/interface": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.2.2.tgz",+ "integrity": "sha512-IU78g6uF8Ls0//4v9VE1rL5Jvy+i6I8LI/DssojFICbaDJSkL59Sn5XRfHrY5OCxTnUnUxnWK7pHz/3+UZcRNQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^13.0.1",+ "main-event": "^1.0.1",+ "multiformats": "^13.4.0",+ "progress-events": "^1.1.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/ipns/node_modules/@libp2p/logger": {+ "version": "6.2.7",+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-6.2.7.tgz",+ "integrity": "sha512-IVEz5+0kE4mRWwMzXP34AlXe2k1FLzBqKkjeASyhPVdMz0A4qH9nYmCBwonzmRzymklGjFIEDa1s7Vjhd9V4Rg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^3.2.2",+ "@multiformats/multiaddr": "^13.0.1",+ "interface-datastore": "^9.0.1",+ "multiformats": "^13.4.0",+ "weald": "^1.1.0"+ }+ },+ "node_modules/ipns/node_modules/@multiformats/multiaddr": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.3.tgz",+ "integrity": "sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "multiformats": "^14.0.0",+ "uint8-varint": "^3.0.0",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/ipns/node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/ipns/node_modules/@multiformats/multiaddr/node_modules/uint8-varint": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-3.0.0.tgz",+ "integrity": "sha512-S4DdpXBaLwKcFo7f0bWzWfHjbZ/i3QhM842qn+ZvHjxqFCfUcEB9SQNcmI69S+zMlcmIcKxsk9Iyw77S2Kxv6Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^3.0.1",+ "uint8arrays": "^6.1.0"+ }+ },+ "node_modules/ipns/node_modules/@multiformats/multiaddr/node_modules/uint8arraylist": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-3.0.2.tgz",+ "integrity": "sha512-LDVoq9BQaGJzGDUovEnoX6rpKCvnY/Jbtws4ikwnBzjRbq5qBAFpBZevUEbSmMM87aO0Sp+wOZy2ZXf5yODmXQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^6.0.0"+ }+ },+ "node_modules/ipns/node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/ipns/node_modules/cborg": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/cborg/-/cborg-5.1.1.tgz",+ "integrity": "sha512-BDbSRIp6XrQXkTc7g+DN0RB9RrDPTUfals2ecWUlt3juPLjbAvy/V72mJcXY0Ehu0Dq/3WpNCOCT68HUTbW+lw==",+ "license": "Apache-2.0",+ "bin": {+ "cborg": "lib/bin.js"+ }+ },+ "node_modules/ipns/node_modules/interface-datastore": {+ "version": "9.0.3",+ "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-9.0.3.tgz",+ "integrity": "sha512-NLZa7Mp+0qn48nSwIY/C36da4uVIKzwG2tuEIpaSJArsuB2RrdyDWwkoDUyjsJ+VrMntXz38VSk9vXTx/ZUpAw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "interface-store": "^7.0.0",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/ipns/node_modules/interface-store": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-7.0.2.tgz",+ "integrity": "sha512-KYOPcDH+1peaPhSeoZujR5nwkVeola1EdrnrlHTIM0HRNUs9B0aTsUQMH5kTmIjaQq1BOowoUyoCamgL8IMyww==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/ipns/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/ipns/node_modules/protons-runtime": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-6.0.2.tgz",+ "integrity": "sha512-hiyjyANwGcgmzc+tXc1/ZcSZhKnl5MDjaVNWkISHBgadaU0sjTgKIKZMZ62d9J9zlSTyKHCs/osPkQ/3Z+7yeA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/ipns/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/iron-webcrypto": {"version": "1.2.1","resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",@@ -31682,6 +35059,12 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/is-electron": {+ "version": "2.2.2",+ "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",+ "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==",+ "license": "MIT"+ },"node_modules/is-extendable": {"version": "0.1.1","resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",@@ -31695,7 +35078,6 @@"version": "2.1.1","resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz","integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",- "dev": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -31759,7 +35141,6 @@"version": "4.0.3","resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz","integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",- "dev": true,"license": "MIT","dependencies": {"is-extglob": "^2.1.1"@@ -31787,6 +35168,28 @@"node": ">=8"}},+ "node_modules/is-ip": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-5.0.1.tgz",+ "integrity": "sha512-FCsGHdlrOnZQcp0+XT5a+pYowf33itBalCl+7ovNXC/7o5BhIpG14M3OrpPPdBSIQJCm+0M5+9mO7S9VVTTCFw==",+ "license": "MIT",+ "dependencies": {+ "ip-regex": "^5.0.0",+ "super-regex": "^0.2.0"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-loopback-addr": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/is-loopback-addr/-/is-loopback-addr-2.0.2.tgz",+ "integrity": "sha512-26POf2KRCno/KTNL5Q0b/9TYnL00xEsSaLfiFRmjM7m7Lw7ZMmFybzzuX4CcsLAluZGd+niLUiMRxEooVE3aqg==",+ "license": "MIT"+ },"node_modules/is-map": {"version": "2.0.3","resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",@@ -31836,11 +35239,22 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/is-network-error": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.2.tgz",+ "integrity": "sha512-PhBY86zaxNZUuWP6h13Vu5oFe0XY6/UlKzQnYFELzGVHygP3MxmvTfYSG7GN3aIab/iWudSMgjSnG9Dq+nHrgA==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/is-number": {"version": "7.0.0","resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz","integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",- "dev": true,"license": "MIT","engines": {"node": ">=0.12.0"@@ -31883,6 +35297,18 @@"node": ">=8"}},+ "node_modules/is-plain-obj": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/is-plain-object": {"version": "2.0.4","resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",@@ -32125,6 +35551,15 @@"dev": true,"license": "ISC"},+ "node_modules/iso-url": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-1.2.1.tgz",+ "integrity": "sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ }+ },"node_modules/isobject": {"version": "3.0.1","resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",@@ -32281,6 +35716,385 @@"node": ">=8"}},+ "node_modules/it-all": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.11.tgz",+ "integrity": "sha512-Gvqj6MO4GMLnFdtE68HZRpGBskNC+9+GQ+JevTGNYLyhjUuPhjDLU3jN1LpBemXJDW1bRSkczqA/qGyKlPKrcQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-batch": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-3.0.11.tgz",+ "integrity": "sha512-2bvKErkXhtwKYDLKAGdEgveOs8wB0i3RItbaroP/6cC/QlrM7j+HAq/yJq6ci4J7KnzdRi76GyipKlafdOTBgw==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-byte-stream": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/it-byte-stream/-/it-byte-stream-2.0.6.tgz",+ "integrity": "sha512-lcPo7azQjSfQvLq+Rkb9Wq+ZERK/MGD9Z67BG5c/zcT96S6xO0dY+Lma1+fSuNspYgJNZq7yETWZim8eOfN9ag==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.2",+ "it-queueless-pushable": "^2.0.0",+ "it-stream-types": "^2.0.2",+ "race-signal": "^2.0.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/it-byte-stream/node_modules/race-signal": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-2.0.0.tgz",+ "integrity": "sha512-P31bLhE4ByBX/70QDXMutxnqgwrF1WUXea1O8DXuviAgkdbQ1iQMQotNgzJIBC9yUSn08u/acZrMUhgw7w6GpA==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-drain": {+ "version": "3.0.12",+ "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.12.tgz",+ "integrity": "sha512-RaFA9X1PF2Pf1Jlqhgf5PlXLgf6CaZt7tSzhia+EkEVcAJRKa0Uhr8UnjVv0GmOA3Air9jDJfIX2KIvz5hZ1Ag==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-filter": {+ "version": "3.1.6",+ "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.1.6.tgz",+ "integrity": "sha512-yXiGPAvJn/exXjVFSCMQc3+J/7RLpOMwKoY2DH1yMhF4lYkdRoAdOwU0vnDACAlRAexf7AZvESZIc9mzhEoi/A==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-peekable": "^3.0.0"+ }+ },+ "node_modules/it-first": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.11.tgz",+ "integrity": "sha512-0ig8DKpg09V1o7JBagm3oPx3VY7WYfU5w3lpbLbqzijnfMPSvMGoMZuLm17h/RgOJXKP+9mt7vsCNiU2TW8TkQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-foreach": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.7.tgz",+ "integrity": "sha512-HoZgIF7DGU1X/8svRuJ7aPl6sge8W6MQxmMomkeAABNXJXoiXEU0xnvulzncRdd013Kh9SubXWhx6YjYw6lu5A==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-peekable": "^3.0.0"+ }+ },+ "node_modules/it-glob": {+ "version": "3.0.6",+ "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-3.0.6.tgz",+ "integrity": "sha512-dFNeW4izM08QuB4uuIr+sVKUSo8ftVD/E1RnYidiUZx/i9h9mmwDSBl3kPv/TCah6HI0y1sgfHVCbrwA9FjoaQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "fast-glob": "^3.3.3"+ }+ },+ "node_modules/it-last": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-last/-/it-last-3.0.11.tgz",+ "integrity": "sha512-Fg571l81nPzhZsiYjkw4dkhRqAK4oqIamTPEfAOnXI/5pYXz+dIfMVYmh9ncZs58oFNMkdF3bYFuCBTw/xJK0w==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-length": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-length/-/it-length-3.0.11.tgz",+ "integrity": "sha512-j0uukHdr3zoLm4dcozDoyv5khQrOI8dfXMSSEqaxorfOtleh1KwRVbdnTmzj6HVkHgTM1jcx+bhAcnTkbpHl+g==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-length-prefixed": {+ "version": "10.0.2",+ "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-10.0.2.tgz",+ "integrity": "sha512-RrNBs4d7baK8AKGHleC55l/JtvzxDw6DPXs3CvFgQwdwFzLBFDvlpKgDDNDFwXJjPSy1nEX1A44nL110+EKc3g==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-reader": "^6.0.1",+ "it-stream-types": "^2.0.1",+ "uint8-varint": "^2.0.1",+ "uint8arraylist": "^2.0.0",+ "uint8arrays": "^5.0.1"+ }+ },+ "node_modules/it-length-prefixed-stream": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/it-length-prefixed-stream/-/it-length-prefixed-stream-2.0.6.tgz",+ "integrity": "sha512-foGRL4Id5Ypuc9RIPEE5aHWZvpKoGpIASoTBeuAZgH/QMGEy+V0vNgK8U4NBPjKwbhyuhW9gYflXXP43W4ZcKw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.2",+ "it-byte-stream": "^2.0.0",+ "it-stream-types": "^2.0.2",+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/it-length-prefixed/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-length-prefixed/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },+ "node_modules/it-map": {+ "version": "3.1.6",+ "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.1.6.tgz",+ "integrity": "sha512-wCix0FXImtIPIxhCnbz35RqWs00e/CReSZX9nZq1j46JcAzBBp57ob9/2l1WnDYEaUURIR8xCyg2NsWbOwBJFQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-peekable": "^3.0.0"+ }+ },+ "node_modules/it-merge": {+ "version": "3.0.14",+ "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.14.tgz",+ "integrity": "sha512-D3t1Go2G2SQMkTujaA6EVojJPJKA9pFksxlSPDRBfrHKhWl6O40vEP7Itr5eCAjyCQH5p9+BFFVIy9bhLM4ZuQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-queueless-pushable": "^2.0.0"+ }+ },+ "node_modules/it-ndjson": {+ "version": "1.1.6",+ "resolved": "https://registry.npmjs.org/it-ndjson/-/it-ndjson-1.1.6.tgz",+ "integrity": "sha512-qseYKspd95qnYUnJ2DE8R25N2+Q+cPCEXTTpyLe7FHaxjbOc/wtyOgKbuzJrQS9bnFJ6yM9wVooC3C0pX44IWQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/it-pair": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz",+ "integrity": "sha512-5M0t5RAcYEQYNG5BV7d7cqbdwbCAp5yLdzvkxsZmkuZsLbTdZzah6MQySYfaAQjNDCq6PUnDt0hqBZ4NwMfW6g==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-stream-types": "^2.0.1",+ "p-defer": "^4.0.0"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },+ "node_modules/it-parallel": {+ "version": "3.0.15",+ "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.15.tgz",+ "integrity": "sha512-1iUV4wg7cDy40N32/XosK7mcwKM+oeSGq0r7czxNaUGGSQvbdSmkIoK4Vu/XPsXZIqBLt9tO+LDPi8RJBJ/Qwg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "p-defer": "^4.0.1"+ }+ },+ "node_modules/it-parallel-batch": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-3.0.11.tgz",+ "integrity": "sha512-n2gvHRVx14COn25jkio+fOHuKWaA5EVf9f0GbdWgVe8gXRIMYCai+CbmQACIv7o2Jn3ZAUOXD9Ob1Ftod0qtJQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-batch": "^3.0.0"+ }+ },+ "node_modules/it-peekable": {+ "version": "3.0.10",+ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.10.tgz",+ "integrity": "sha512-2E6+p1pelZOhzp69aaiiBuEybWzAl10uYbIdCR3Pxy8bFNnS/kgpbLtGbNbIZ6RVdU7yHHkmATYwjy52GfFEKA==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-pipe": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz",+ "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-merge": "^3.0.0",+ "it-pushable": "^3.1.2",+ "it-stream-types": "^2.0.1"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },+ "node_modules/it-protobuf-stream": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-2.0.6.tgz",+ "integrity": "sha512-yr1ll0PN4DFrI4gyEMXy4OgcO3Glb7U0J+Scpx1lxOVnuszpcSc0idhxXHMZcDqAIUJgo8JmNHT9Ry6m6vVeJw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.2",+ "it-length-prefixed-stream": "^2.0.0",+ "it-stream-types": "^2.0.2",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/it-pushable": {+ "version": "3.2.4",+ "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.4.tgz",+ "integrity": "sha512-WSD7Ss4oCRfDZJT4ldLWr0Bom/muY90xxoJ5PQnU3uSKf0kxCOeehqZtiJX1ARqn+ymXGh1bxpDW9bDNHp2ivQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "p-defer": "^4.0.0"+ }+ },+ "node_modules/it-queue": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/it-queue/-/it-queue-1.1.3.tgz",+ "integrity": "sha512-RP+zN7tq+4EtuUZw5uXDpOmpgd66oKb15I4rKNvNMuB278nMJVRBHakQjnQAjqcVUySo4hEA3XnT3Ge6EvHH5w==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.2",+ "it-pushable": "^3.2.3",+ "main-event": "^1.0.1",+ "race-event": "^1.6.1",+ "race-signal": "^2.0.0"+ }+ },+ "node_modules/it-queue/node_modules/race-signal": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-2.0.0.tgz",+ "integrity": "sha512-P31bLhE4ByBX/70QDXMutxnqgwrF1WUXea1O8DXuviAgkdbQ1iQMQotNgzJIBC9yUSn08u/acZrMUhgw7w6GpA==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-queueless-pushable": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/it-queueless-pushable/-/it-queueless-pushable-2.0.5.tgz",+ "integrity": "sha512-BaKqGLL1AQMR1AEaxiM09vzJQVXHHhfhh9UV0qPqORw/8Rm8igDQqT1qHregfHIb1NIW9jxQ/aXBibHJyuivuQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.2",+ "p-defer": "^4.0.1",+ "race-signal": "^2.0.0"+ }+ },+ "node_modules/it-queueless-pushable/node_modules/race-signal": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-2.0.0.tgz",+ "integrity": "sha512-P31bLhE4ByBX/70QDXMutxnqgwrF1WUXea1O8DXuviAgkdbQ1iQMQotNgzJIBC9yUSn08u/acZrMUhgw7w6GpA==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-reader": {+ "version": "6.0.5",+ "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-6.0.5.tgz",+ "integrity": "sha512-xdSVkCsVyWmKaE7ZIlqb1QbzitY7Zty7//F2YeZ/9Py5i3RzQHVoPqlHELH+1EouumUdPyfuKoANJ7Q5w4IEBg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-stream-types": "^2.0.1",+ "uint8arraylist": "^2.0.0"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },+ "node_modules/it-sort": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-sort/-/it-sort-3.0.11.tgz",+ "integrity": "sha512-eZ22LAoNLx4i4gVV44tJPoUYf/o+mHKa6+OigdVH/hmsdA2qoJN6MNPvKZyZKBf6+S/8PBE44zyvkzdYGkRhbA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-all": "^3.0.0"+ }+ },+ "node_modules/it-stream-types": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.4.tgz",+ "integrity": "sha512-tsX+klvMQ53J4Jm2B52vCIs7WD609ck+VS9X2TKMEv7VPY9VwaYKmSWyHek5QS0wHBtP0bWj9KMqCtAHgVKiXw==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-take": {+ "version": "3.0.11",+ "resolved": "https://registry.npmjs.org/it-take/-/it-take-3.0.11.tgz",+ "integrity": "sha512-zvoeEjLViGFyhYT5KNCgmcIH90Si8lCve4aTMvgej/ZQRfB9YzrcJW3UHIJjbQ9TiAnsT4vsWDImEFQNk5xmnA==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-to-stream": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-1.0.0.tgz",+ "integrity": "sha512-pLULMZMAB/+vbdvbZtebC0nWBTbG581lk6w8P7DfIIIKUfa8FbY7Oi0FxZcFPbxvISs7A9E+cMpLDBc1XhpAOA==",+ "license": "MIT",+ "dependencies": {+ "buffer": "^6.0.3",+ "fast-fifo": "^1.0.0",+ "get-iterator": "^1.0.2",+ "p-defer": "^3.0.0",+ "p-fifo": "^1.0.0",+ "readable-stream": "^3.6.0"+ }+ },+ "node_modules/it-to-stream/node_modules/get-iterator": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-1.0.2.tgz",+ "integrity": "sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg==",+ "license": "MIT"+ },+ "node_modules/it-to-stream/node_modules/p-defer": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz",+ "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/it-to-stream/node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "license": "MIT",+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/it-ws": {+ "version": "6.1.5",+ "resolved": "https://registry.npmjs.org/it-ws/-/it-ws-6.1.5.tgz",+ "integrity": "sha512-uWjMtpy5HqhSd/LlrlP3fhYrr7rUfJFFMABv0F5d6n13Q+0glhZthwUKpEAVhDrXY95Tb1RB5lLqqef+QbVNaw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@types/ws": "^8.2.2",+ "event-iterator": "^2.0.0",+ "it-stream-types": "^2.0.1",+ "uint8arrays": "^5.0.0",+ "ws": "^8.4.0"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },+ "node_modules/it-ws/node_modules/@types/ws": {+ "version": "8.18.1",+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/it-ws/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/it-ws/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/iterator.prototype": {"version": "1.1.5","resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",@@ -34182,6 +37996,12 @@"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==","license": "MIT"},+ "node_modules/json-schema": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",+ "license": "(AFL-2.1 OR BSD-3-Clause)"+ },"node_modules/json-schema-traverse": {"version": "1.0.0","resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",@@ -34462,6 +38282,234 @@"integrity": "sha512-FeA3g56ksdFNwjXJJsc1CCc7co+AJYDp6ipIp878zZ2bU8kWROatLYf39TQEd4/XRSUvBXovQ8gaVKWPXsCLEQ==","license": "MIT"},+ "node_modules/kubo-rpc-client": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/kubo-rpc-client/-/kubo-rpc-client-6.1.0.tgz",+ "integrity": "sha512-CH3vcqSGlEhr/HCZYQgYpXxmwIOYhNed4BQmAYmHpX7sehTC3iKK/36x7anEdRTgmV6KB66MyOk1yuhU2HqKFw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@ipld/dag-cbor": "^9.0.0",+ "@ipld/dag-json": "^10.0.0",+ "@ipld/dag-pb": "^4.0.0",+ "@libp2p/crypto": "^5.0.0",+ "@libp2p/interface": "^3.0.2",+ "@libp2p/logger": "^6.0.5",+ "@libp2p/peer-id": "^6.0.3",+ "@multiformats/multiaddr": "^13.0.1",+ "@multiformats/multiaddr-to-uri": "^12.0.0",+ "any-signal": "^4.1.1",+ "blob-to-it": "^2.0.5",+ "browser-readablestream-to-it": "^2.0.5",+ "dag-jose": "^5.0.0",+ "electron-fetch": "^1.9.1",+ "err-code": "^3.0.1",+ "ipfs-unixfs": "^12.0.0",+ "iso-url": "^1.2.1",+ "it-all": "^3.0.4",+ "it-first": "^3.0.4",+ "it-glob": "^3.0.1",+ "it-last": "^3.0.4",+ "it-map": "^3.0.5",+ "it-peekable": "^3.0.3",+ "it-to-stream": "^1.0.0",+ "merge-options": "^3.0.4",+ "multiformats": "^13.1.0",+ "nanoid": "^5.0.7",+ "parse-duration": "^2.1.2",+ "stream-to-it": "^1.0.1",+ "uint8arrays": "^5.0.3",+ "wherearewe": "^2.0.1"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/@libp2p/interface": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.2.2.tgz",+ "integrity": "sha512-IU78g6uF8Ls0//4v9VE1rL5Jvy+i6I8LI/DssojFICbaDJSkL59Sn5XRfHrY5OCxTnUnUxnWK7pHz/3+UZcRNQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^13.0.1",+ "main-event": "^1.0.1",+ "multiformats": "^13.4.0",+ "progress-events": "^1.1.0",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/@libp2p/logger": {+ "version": "6.2.7",+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-6.2.7.tgz",+ "integrity": "sha512-IVEz5+0kE4mRWwMzXP34AlXe2k1FLzBqKkjeASyhPVdMz0A4qH9nYmCBwonzmRzymklGjFIEDa1s7Vjhd9V4Rg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/interface": "^3.2.2",+ "@multiformats/multiaddr": "^13.0.1",+ "interface-datastore": "^9.0.1",+ "multiformats": "^13.4.0",+ "weald": "^1.1.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/@libp2p/peer-id": {+ "version": "6.0.9",+ "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-6.0.9.tgz",+ "integrity": "sha512-MlofyOOpxzZA4tIcOVPjd1FQIa0TA0g+bn+d08vfo9znCjfe6Lh0RBFyLdlICbyogVN6wn7+29SYch78wCuuCQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@libp2p/crypto": "^5.1.18",+ "@libp2p/interface": "^3.2.2",+ "multiformats": "^13.4.0",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/@multiformats/multiaddr": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.3.tgz",+ "integrity": "sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.0.1",+ "multiformats": "^14.0.0",+ "uint8-varint": "^3.0.0",+ "uint8arrays": "^6.1.1"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/@multiformats/multiaddr-to-uri": {+ "version": "12.0.0",+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-12.0.0.tgz",+ "integrity": "sha512-3uIEBCiy8tfzxYYBl81x1tISiNBQ7mHU4pGjippbJRoQYHzy/ZdZM/7JvTldr8pc/dzpkaNJxnsuxxlhsPOJsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@multiformats/multiaddr": "^13.0.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/@multiformats/multiaddr/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/kubo-rpc-client/node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/interface-datastore": {+ "version": "9.0.3",+ "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-9.0.3.tgz",+ "integrity": "sha512-NLZa7Mp+0qn48nSwIY/C36da4uVIKzwG2tuEIpaSJArsuB2RrdyDWwkoDUyjsJ+VrMntXz38VSk9vXTx/ZUpAw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "interface-store": "^7.0.0",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/interface-store": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-7.0.2.tgz",+ "integrity": "sha512-KYOPcDH+1peaPhSeoZujR5nwkVeola1EdrnrlHTIM0HRNUs9B0aTsUQMH5kTmIjaQq1BOowoUyoCamgL8IMyww==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/kubo-rpc-client/node_modules/ipfs-unixfs": {+ "version": "12.0.2",+ "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-12.0.2.tgz",+ "integrity": "sha512-uZ3rutVVZZ+tw52P+sgDSgOSK6ztExJVlfCjKvSD+NIEVlWQPDeKgdSFm+Kxchmgp7t6g1h+dzir+NgY+VsQXg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "protons-runtime": "^6.0.1",+ "uint8arraylist": "^2.4.8"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/kubo-rpc-client/node_modules/nanoid": {+ "version": "5.1.11",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.11.tgz",+ "integrity": "sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.js"+ },+ "engines": {+ "node": "^18 || >=20"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/protons-runtime": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-6.0.2.tgz",+ "integrity": "sha512-hiyjyANwGcgmzc+tXc1/ZcSZhKnl5MDjaVNWkISHBgadaU0sjTgKIKZMZ62d9J9zlSTyKHCs/osPkQ/3Z+7yeA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8-varint": "^2.0.4",+ "uint8arraylist": "^2.4.8",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/protons-runtime/node_modules/uint8-varint": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.5.tgz",+ "integrity": "sha512-jeFLbL/x30wBRnWjKE1qVBXeumG46r7XmYkpis955lTQ+blccGKFrOsSMHlxePwYB1pI7L8YPHz1t4jLxEs3nA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^2.0.0",+ "uint8arrays": "^5.0.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/uint8-varint": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-3.0.0.tgz",+ "integrity": "sha512-S4DdpXBaLwKcFo7f0bWzWfHjbZ/i3QhM842qn+ZvHjxqFCfUcEB9SQNcmI69S+zMlcmIcKxsk9Iyw77S2Kxv6Q==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^3.0.1",+ "uint8arrays": "^6.1.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/uint8-varint/node_modules/multiformats": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.0.tgz",+ "integrity": "sha512-iWK1RrAS58p2NDfeZFuSUSv3ZPewTIhsGbh/5NgeGGJwJmRljLxGtjRR3nkn+loG3zl+IrfR/W1590QnrSK+Gg==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/kubo-rpc-client/node_modules/uint8-varint/node_modules/uint8arraylist": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-3.0.2.tgz",+ "integrity": "sha512-LDVoq9BQaGJzGDUovEnoX6rpKCvnY/Jbtws4ikwnBzjRbq5qBAFpBZevUEbSmMM87aO0Sp+wOZy2ZXf5yODmXQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^6.0.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/uint8-varint/node_modules/uint8arrays": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-6.1.1.tgz",+ "integrity": "sha512-iz7JN0XCSZYA111lhFG2Ui9EhFvTNekqSRHw3lvMHq+dzwWy1OQftxFQREEh4rffU0oSoXdQHsk2TiHKVm4fsA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^14.0.0"+ }+ },+ "node_modules/kubo-rpc-client/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/lazy-cache": {"version": "1.0.4","resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",@@ -34495,6 +38543,57 @@"node": ">= 0.8.0"}},+ "node_modules/libp2p": {+ "version": "2.10.0",+ "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-2.10.0.tgz",+ "integrity": "sha512-tgDz7YuGg1XX7UfxebCUii+IGsly/8V0ZRZdFJSDySY2i3UuqpCTsEbRApH3cBKFhcAf00nx9xj8GL9zfo+XWw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "@chainsafe/is-ip": "^2.1.0",+ "@chainsafe/netmask": "^2.0.0",+ "@libp2p/crypto": "^5.1.8",+ "@libp2p/interface": "^2.11.0",+ "@libp2p/interface-internal": "^2.3.19",+ "@libp2p/logger": "^5.2.0",+ "@libp2p/multistream-select": "^6.0.29",+ "@libp2p/peer-collections": "^6.0.35",+ "@libp2p/peer-id": "^5.1.9",+ "@libp2p/peer-store": "^11.2.7",+ "@libp2p/utils": "^6.7.2",+ "@multiformats/dns": "^1.0.6",+ "@multiformats/multiaddr": "^12.4.4",+ "@multiformats/multiaddr-matcher": "^2.0.0",+ "any-signal": "^4.1.1",+ "datastore-core": "^10.0.2",+ "interface-datastore": "^8.3.1",+ "it-byte-stream": "^2.0.2",+ "it-merge": "^3.0.11",+ "it-parallel": "^3.0.11",+ "main-event": "^1.0.1",+ "multiformats": "^13.3.6",+ "p-defer": "^4.0.1",+ "p-retry": "^6.2.1",+ "progress-events": "^1.0.1",+ "race-event": "^1.3.0",+ "race-signal": "^1.1.3",+ "uint8arrays": "^5.1.0"+ }+ },+ "node_modules/libp2p/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/libp2p/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/lie": {"version": "3.3.0","resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",@@ -34517,6 +38616,25 @@"url": "https://github.com/sponsors/antonk52"}},+ "node_modules/linebreak": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.1.0.tgz",+ "integrity": "sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ==",+ "license": "MIT",+ "dependencies": {+ "base64-js": "0.0.8",+ "unicode-trie": "^2.0.0"+ }+ },+ "node_modules/linebreak/node_modules/base64-js": {+ "version": "0.0.8",+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",+ "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },"node_modules/lines-and-columns": {"version": "1.2.4","resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",@@ -34764,6 +38882,12 @@"sourcemap-codec": "^1.4.8"}},+ "node_modules/main-event": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/main-event/-/main-event-1.0.4.tgz",+ "integrity": "sha512-sKazUjIy2Jalv5lkQ446iOcrx8Q7TkaCuk6xfnzg5uUqMusMLDMPmRDmSNE2kjSVpSTJo4j1bQZusS+Ib7Bvrg==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/make-dir": {"version": "3.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",@@ -34879,6 +39003,27 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/merge-options": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz",+ "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==",+ "license": "MIT",+ "dependencies": {+ "is-plain-obj": "^2.1.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/merge-options/node_modules/is-plain-obj": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",+ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/merge-stream": {"version": "2.0.0","resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",@@ -34890,7 +39035,6 @@"version": "1.4.1","resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz","integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",- "dev": true,"license": "MIT","engines": {"node": ">= 8"@@ -34931,7 +39075,6 @@"version": "4.0.8","resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz","integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",- "dev": true,"license": "MIT","dependencies": {"braces": "^3.0.3",@@ -34945,7 +39088,6 @@"version": "2.3.2","resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz","integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",- "dev": true,"license": "MIT","engines": {"node": ">=8.6"@@ -35015,6 +39157,18 @@"node": ">=6"}},+ "node_modules/mimic-response": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/min-indent": {"version": "1.0.1","resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",@@ -35106,7 +39260,6 @@"version": "1.2.8","resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz","integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",- "dev": true,"license": "MIT","funding": {"url": "https://github.com/sponsors/ljharb"@@ -35159,6 +39312,12 @@"node": ">= 8.0.0"}},+ "node_modules/mkdirp-classic": {+ "version": "0.5.3",+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",+ "license": "MIT"+ },"node_modules/mlly": {"version": "1.8.2","resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz",@@ -35178,6 +39337,17 @@"integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==","license": "MIT"},+ "node_modules/mortice": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/mortice/-/mortice-3.3.1.tgz",+ "integrity": "sha512-t3oESfijIPGsmsdLEKjF+grHfrbnKSXflJtgb1wY14cjxZpS6GnhHRXTxxzCAoCCnq1YYfpEPwY3gjiCPhOufQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.0",+ "it-queue": "^1.1.0",+ "main-event": "^1.0.0"+ }+ },"node_modules/ms": {"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",@@ -35206,6 +39376,19 @@"@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3"}},+ "node_modules/multicast-dns": {+ "version": "7.2.5",+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",+ "license": "MIT",+ "dependencies": {+ "dns-packet": "^5.2.2",+ "thunky": "^1.0.2"+ },+ "bin": {+ "multicast-dns": "cli.js"+ }+ },"node_modules/multiformats": {"version": "9.9.0","resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",@@ -35289,7 +39472,6 @@"version": "3.3.11","resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz","integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",- "dev": true,"funding": [{"type": "github",@@ -35304,6 +39486,12 @@"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"}},+ "node_modules/napi-build-utils": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",+ "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",+ "license": "MIT"+ },"node_modules/napi-postinstall": {"version": "0.3.4","resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",@@ -35444,6 +39632,30 @@"integrity": "sha512-/6gzGs1jJxtRC2i4kw6yAeMB7N0m5M+HSMmRdky8yoBUJOyNyDxsUves5DSgLGdhGE7IBsYCu1wY+dnJZz0yUQ==","license": "MIT"},+ "node_modules/node-abi": {+ "version": "3.92.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz",+ "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",+ "license": "MIT",+ "dependencies": {+ "semver": "^7.3.5"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-abi/node_modules/semver": {+ "version": "7.8.0",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz",+ "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==",+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/node-addon-api": {"version": "3.2.1","resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",@@ -35522,6 +39734,15 @@"node": ">= 12"}},+ "node_modules/node-forge": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",+ "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",+ "license": "(BSD-3-Clause OR GPL-2.0)",+ "engines": {+ "node": ">= 6.13.0"+ }+ },"node_modules/node-gyp-build": {"version": "4.8.4","resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",@@ -36160,6 +40381,52 @@"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==","license": "MIT"},+ "node_modules/p-defer": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.1.tgz",+ "integrity": "sha512-Mr5KC5efvAK5VUptYEIopP1bakB85k2IWXaRC0rsh1uwn1L6M0LVml8OIQ4Gudg4oyZakf7FmeRLkMMtZW1i5A==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-event": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/p-event/-/p-event-6.0.1.tgz",+ "integrity": "sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==",+ "license": "MIT",+ "dependencies": {+ "p-timeout": "^6.1.2"+ },+ "engines": {+ "node": ">=16.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-fifo": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/p-fifo/-/p-fifo-1.0.0.tgz",+ "integrity": "sha512-IjoCxXW48tqdtDFz6fqo5q1UfFVjjVZe8TC1QRflvNUJtNfCUhxOUw6MOVZhDPjqhSzc26xKdugsO17gmzd5+A==",+ "license": "MIT",+ "dependencies": {+ "fast-fifo": "^1.0.0",+ "p-defer": "^3.0.0"+ }+ },+ "node_modules/p-fifo/node_modules/p-defer": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz",+ "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/p-limit": {"version": "2.3.0","resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",@@ -36187,6 +40454,63 @@"node": ">=8"}},+ "node_modules/p-queue": {+ "version": "9.3.0",+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.3.0.tgz",+ "integrity": "sha512-7NED7xhQ74Ngp4JP/2e0VZHp7vSWfJfqeiR92jPgxsz6m0Se4P03YoTKa9dDXyZ3r6P616gUXttrB6nnHYKang==",+ "license": "MIT",+ "dependencies": {+ "eventemitter3": "^5.0.4",+ "p-timeout": "^7.0.0"+ },+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-queue/node_modules/p-timeout": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.1.tgz",+ "integrity": "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-retry": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz",+ "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==",+ "license": "MIT",+ "dependencies": {+ "@types/retry": "0.12.2",+ "is-network-error": "^1.0.0",+ "retry": "^0.13.1"+ },+ "engines": {+ "node": ">=16.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-timeout": {+ "version": "6.1.4",+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz",+ "integrity": "sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==",+ "license": "MIT",+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/p-try": {"version": "2.2.0","resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",@@ -36196,6 +40520,21 @@"node": ">=6"}},+ "node_modules/p-wait-for": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/p-wait-for/-/p-wait-for-5.0.2.tgz",+ "integrity": "sha512-lwx6u1CotQYPVju77R+D0vFomni/AqRfqLmqQ8hekklqZ6gAY9rONh7lBQ0uxWMkC2AuX9b2DVAl8To0NyP1JA==",+ "license": "MIT",+ "dependencies": {+ "p-timeout": "^6.0.0"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/pac-proxy-agent": {"version": "7.2.0","resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz",@@ -36269,6 +40608,22 @@"node": ">= 0.10"}},+ "node_modules/parse-css-color": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/parse-css-color/-/parse-css-color-0.2.1.tgz",+ "integrity": "sha512-bwS/GGIFV3b6KS4uwpzCFj4w297Yl3uqnSgIPsoQkx7GMLROXfMnWvxfNkL0oh8HVhZA4hvJoEoEIqonfJ3BWg==",+ "license": "MIT",+ "dependencies": {+ "color-name": "^1.1.4",+ "hex-rgb": "^4.1.0"+ }+ },+ "node_modules/parse-duration": {+ "version": "2.1.6",+ "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-2.1.6.tgz",+ "integrity": "sha512-1/A2Exg3NcJGcYdgV/dn4frR7vO2hOW/ohQ4KIgbT4W3raVcpYSszPWiL6I6cKufi4jQM5NbGRXLBj8AoLM4iQ==",+ "license": "MIT"+ },"node_modules/parse-json": {"version": "5.2.0","resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",@@ -36737,6 +41092,75 @@"three": ">= 0.168.0 < 0.185.0"}},+ "node_modules/prebuild-install": {+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",+ "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",+ "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.",+ "license": "MIT",+ "dependencies": {+ "detect-libc": "^2.0.0",+ "expand-template": "^2.0.3",+ "github-from-package": "0.0.0",+ "minimist": "^1.2.3",+ "mkdirp-classic": "^0.5.3",+ "napi-build-utils": "^2.0.0",+ "node-abi": "^3.3.0",+ "pump": "^3.0.0",+ "rc": "^1.2.7",+ "simple-get": "^4.0.0",+ "tar-fs": "^2.0.0",+ "tunnel-agent": "^0.6.0"+ },+ "bin": {+ "prebuild-install": "bin.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/prebuild-install/node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "license": "MIT",+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/prebuild-install/node_modules/tar-fs": {+ "version": "2.1.4",+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",+ "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",+ "license": "MIT",+ "dependencies": {+ "chownr": "^1.1.1",+ "mkdirp-classic": "^0.5.2",+ "pump": "^3.0.0",+ "tar-stream": "^2.1.4"+ }+ },+ "node_modules/prebuild-install/node_modules/tar-stream": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",+ "license": "MIT",+ "dependencies": {+ "bl": "^4.0.3",+ "end-of-stream": "^1.4.1",+ "fs-constants": "^1.0.0",+ "inherits": "^2.0.3",+ "readable-stream": "^3.1.1"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/prelude-ls": {"version": "1.2.1","resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",@@ -36841,6 +41265,12 @@"node": ">=0.4.0"}},+ "node_modules/progress-events": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/progress-events/-/progress-events-1.1.0.tgz",+ "integrity": "sha512-82DVc5tI36neVB3IjdXR11ztwGuoBc98em9ijzubeZKxI47OlV2Znq6mlPqE5xPDzO2Uw98GHiQSjj2favBCRQ==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/prop-types": {"version": "15.8.1","resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",@@ -36882,6 +41312,32 @@"node": ">=12.0.0"}},+ "node_modules/protons-runtime": {+ "version": "5.6.0",+ "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.6.0.tgz",+ "integrity": "sha512-/Kde+sB9DsMFrddJT/UZWe6XqvL7SL5dbag/DBCElFKhkwDj7XKt53S+mzLyaDP5OqS0wXjV5SA572uWDaT0Hg==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8-varint": "^2.0.2",+ "uint8arraylist": "^2.4.3",+ "uint8arrays": "^5.0.1"+ }+ },+ "node_modules/protons-runtime/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/protons-runtime/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/proxy-addr": {"version": "2.0.7","resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",@@ -37198,6 +41654,24 @@"bitcoin-ops": "^1.3.0"}},+ "node_modules/pvtsutils": {+ "version": "1.3.6",+ "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz",+ "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.8.1"+ }+ },+ "node_modules/pvutils": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz",+ "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==",+ "license": "MIT",+ "engines": {+ "node": ">=16.0.0"+ }+ },"node_modules/qr.js": {"version": "0.0.0","resolved": "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz",@@ -37361,7 +41835,6 @@"version": "1.2.3","resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz","integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",- "dev": true,"funding": [{"type": "github",@@ -37384,6 +41857,150 @@"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==","license": "MIT"},+ "node_modules/qwen-ai-provider": {+ "version": "0.1.1",+ "resolved": "https://registry.npmjs.org/qwen-ai-provider/-/qwen-ai-provider-0.1.1.tgz",+ "integrity": "sha512-7dVu97U7fbOGgCYdaOunC4NQqC+7Or3/Gsbx+P16+Ny4VxST7WJxfUCogQl6D2EDxIJdHGz4akHm+5fyEulmyw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "^1.0.7",+ "@ai-sdk/provider-utils": "^2.1.6"+ },+ "engines": {+ "node": ">=18.0.0"+ },+ "peerDependencies": {+ "zod": "^3.25.49"+ }+ },+ "node_modules/qwen-ai-provider/node_modules/@ai-sdk/provider": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-1.1.3.tgz",+ "integrity": "sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==",+ "license": "Apache-2.0",+ "dependencies": {+ "json-schema": "^0.4.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/qwen-ai-provider/node_modules/@ai-sdk/provider-utils": {+ "version": "2.2.8",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-2.2.8.tgz",+ "integrity": "sha512-fqhG+4sCVv8x7nFzYnFo19ryhAa3w096Kmc3hWxMQfW/TubPOmt3A6tYZhl4mUfQWWQMsuSkLrtjlWuXBVSGQA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "1.1.3",+ "nanoid": "^3.3.8",+ "secure-json-parse": "^2.7.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.23.8"+ }+ },+ "node_modules/rabin-wasm": {+ "version": "0.1.5",+ "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz",+ "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==",+ "license": "MIT",+ "dependencies": {+ "@assemblyscript/loader": "^0.9.4",+ "bl": "^5.0.0",+ "debug": "^4.3.1",+ "minimist": "^1.2.5",+ "node-fetch": "^2.6.1",+ "readable-stream": "^3.6.0"+ },+ "bin": {+ "rabin-wasm": "cli/bin.js"+ }+ },+ "node_modules/rabin-wasm/node_modules/bl": {+ "version": "5.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",+ "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",+ "license": "MIT",+ "dependencies": {+ "buffer": "^6.0.3",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"+ }+ },+ "node_modules/rabin-wasm/node_modules/node-fetch": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",+ "license": "MIT",+ "dependencies": {+ "whatwg-url": "^5.0.0"+ },+ "engines": {+ "node": "4.x || >=6.0.0"+ },+ "peerDependencies": {+ "encoding": "^0.1.0"+ },+ "peerDependenciesMeta": {+ "encoding": {+ "optional": true+ }+ }+ },+ "node_modules/rabin-wasm/node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "license": "MIT",+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/rabin-wasm/node_modules/tr46": {+ "version": "0.0.3",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",+ "license": "MIT"+ },+ "node_modules/rabin-wasm/node_modules/webidl-conversions": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",+ "license": "BSD-2-Clause"+ },+ "node_modules/rabin-wasm/node_modules/whatwg-url": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",+ "license": "MIT",+ "dependencies": {+ "tr46": "~0.0.3",+ "webidl-conversions": "^3.0.0"+ }+ },+ "node_modules/race-event": {+ "version": "1.6.1",+ "resolved": "https://registry.npmjs.org/race-event/-/race-event-1.6.1.tgz",+ "integrity": "sha512-vi7WH5g5KoTFpu2mme/HqZiWH14XSOtg5rfp6raBskBHl7wnmy3F/biAIyY5MsK+BHWhoPhxtZ1Y2R7OHHaWyQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "abort-error": "^1.0.1"+ }+ },+ "node_modules/race-signal": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz",+ "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/radix3": {"version": "1.1.2","resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",@@ -37474,6 +42091,30 @@"node": ">= 0.8"}},+ "node_modules/rc": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",+ "dependencies": {+ "deep-extend": "^0.6.0",+ "ini": "~1.3.0",+ "minimist": "^1.2.0",+ "strip-json-comments": "~2.0.1"+ },+ "bin": {+ "rc": "cli.js"+ }+ },+ "node_modules/rc/node_modules/strip-json-comments": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",+ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/react": {"version": "19.2.5","resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz",@@ -37573,6 +42214,55 @@"react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18 || ^19"}},+ "node_modules/react-native-webrtc": {+ "version": "124.0.7",+ "resolved": "https://registry.npmjs.org/react-native-webrtc/-/react-native-webrtc-124.0.7.tgz",+ "integrity": "sha512-gnXPdbUS8IkKHq9WNaWptW/yy5s6nMyI6cNn90LXdobPVCgYSk6NA2uUGdT4c4J14BRgaFA95F+cR28tUPkMVA==",+ "license": "MIT",+ "dependencies": {+ "base64-js": "1.5.1",+ "debug": "4.3.4",+ "event-target-shim": "6.0.2"+ },+ "peerDependencies": {+ "react-native": ">=0.60.0"+ }+ },+ "node_modules/react-native-webrtc/node_modules/debug": {+ "version": "4.3.4",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",+ "license": "MIT",+ "dependencies": {+ "ms": "2.1.2"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/react-native-webrtc/node_modules/event-target-shim": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-6.0.2.tgz",+ "integrity": "sha512-8q3LsZjRezbFZ2PN+uP+Q7pnHUMmAOziU2vA2OwoFaKIXxlxl38IylhSSgUorWu/rf4er67w0ikBqjBFk/pomA==",+ "license": "MIT",+ "engines": {+ "node": ">=10.13.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/mysticatea"+ }+ },+ "node_modules/react-native-webrtc/node_modules/ms": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",+ "license": "MIT"+ },"node_modules/react-qr-reader": {"version": "2.2.1","resolved": "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-2.2.1.tgz",@@ -37715,6 +42405,12 @@"node": ">=8"}},+ "node_modules/reflect-metadata": {+ "version": "0.2.2",+ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",+ "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",+ "license": "Apache-2.0"+ },"node_modules/reflect.getprototypeof": {"version": "1.0.10","resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",@@ -37947,6 +42643,12 @@"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==","license": "ISC"},+ "node_modules/retimeable-signal": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/retimeable-signal/-/retimeable-signal-1.0.1.tgz",+ "integrity": "sha512-Cy26CYfbWnYu8HMoJeDhaMpW/EYFIbne3vMf6G9RSrOyWYXbPehja/BEdzpqmM84uy2bfBD7NPZhoQ4GZEtgvg==",+ "license": "Apache-2.0 OR MIT"+ },"node_modules/retry": {"version": "0.13.1","resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",@@ -37960,7 +42662,6 @@"version": "1.1.0","resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz","integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",- "dev": true,"license": "MIT","engines": {"iojs": ">=1.0.0",@@ -38323,7 +43024,6 @@"version": "1.2.0","resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz","integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",- "dev": true,"funding": [{"type": "github",@@ -38460,6 +43160,15 @@"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==","license": "MIT"},+ "node_modules/sanitize-filename": {+ "version": "1.6.4",+ "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.4.tgz",+ "integrity": "sha512-9ZyI08PsvdQl2r/bBIGubpVdR3RR9sY6RDiWFPreA21C/EFlQhmgo20UZlNjZMMZNubusLhAQozkA0Od5J21Eg==",+ "license": "WTFPL OR ISC",+ "dependencies": {+ "truncate-utf8-bytes": "^1.0.0"+ }+ },"node_modules/sas-lib": {"version": "1.0.10","resolved": "https://registry.npmjs.org/sas-lib/-/sas-lib-1.0.10.tgz",@@ -39457,6 +44166,37 @@"url": "https://paulmillr.com/funding/"}},+ "node_modules/satori": {+ "version": "0.25.0",+ "resolved": "https://registry.npmjs.org/satori/-/satori-0.25.0.tgz",+ "integrity": "sha512-utINfLxrYrmSnLvxFT4ZwgwWa8KOjrz7ans32V5wItgHVmzESl/9i33nE38uG0miycab8hUqQtDlOpqrIpB/iw==",+ "license": "MPL-2.0",+ "dependencies": {+ "@shuding/opentype.js": "1.4.0-beta.0",+ "css-background-parser": "^0.1.0",+ "css-box-shadow": "1.0.0-3",+ "css-gradient-parser": "^0.0.17",+ "css-to-react-native": "^3.0.0",+ "emoji-regex-xs": "^2.0.1",+ "escape-html": "^1.0.3",+ "linebreak": "^1.1.0",+ "parse-css-color": "^0.2.1",+ "postcss-value-parser": "^4.2.0",+ "yoga-layout": "^3.2.1"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/sax": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz",+ "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==",+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=11.0.0"+ }+ },"node_modules/saxes": {"version": "6.0.0","resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",@@ -39518,6 +44258,12 @@"integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==","license": "MIT"},+ "node_modules/secure-json-parse": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz",+ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==",+ "license": "BSD-3-Clause"+ },"node_modules/semver": {"version": "6.3.1","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",@@ -39960,6 +44706,26 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/simple-concat": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT"+ },"node_modules/simple-dropzone": {"version": "0.8.3","resolved": "https://registry.npmjs.org/simple-dropzone/-/simple-dropzone-0.8.3.tgz",@@ -39969,6 +44735,31 @@"zip-js-esm": "^1.1.1"}},+ "node_modules/simple-get": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",+ "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "decompress-response": "^6.0.0",+ "once": "^1.3.1",+ "simple-concat": "^1.0.0"+ }+ },"node_modules/simple-swizzle": {"version": "0.2.4","resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz",@@ -40130,6 +44921,12 @@"dev": true,"license": "MIT"},+ "node_modules/sparse-array": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz",+ "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==",+ "license": "ISC"+ },"node_modules/split-on-first": {"version": "3.0.0","resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-3.0.0.tgz",@@ -40307,6 +45104,15 @@"integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==","license": "MIT"},+ "node_modules/stream-to-it": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-1.0.1.tgz",+ "integrity": "sha512-AqHYAYPHcmvMrcLNgncE/q0Aj/ajP6A4qGhxP6EVn7K3YTNs0bJpJyk57wc2Heb7MUL64jurvmnmui8D9kjZgA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "it-stream-types": "^2.0.1"+ }+ },"node_modules/stream-transform": {"version": "2.1.3","resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz",@@ -40389,6 +45195,12 @@"node": ">=8"}},+ "node_modules/string.prototype.codepointat": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",+ "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==",+ "license": "MIT"+ },"node_modules/string.prototype.matchall": {"version": "4.0.12","resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",@@ -40748,6 +45560,23 @@"node": ">= 6"}},+ "node_modules/super-regex": {+ "version": "0.2.0",+ "resolved": "https://registry.npmjs.org/super-regex/-/super-regex-0.2.0.tgz",+ "integrity": "sha512-WZzIx3rC1CvbMDloLsVw0lkZVKJWbrkJ0k1ghKFmcnPrW1+jWbgTkTEWVtD9lMdmI4jZEz40+naBxl1dCUhXXw==",+ "license": "MIT",+ "dependencies": {+ "clone-regexp": "^3.0.0",+ "function-timeout": "^0.1.0",+ "time-span": "^5.1.0"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/superstruct": {"version": "2.0.2","resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz",@@ -41061,6 +45890,27 @@"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==","license": "MIT"},+ "node_modules/thunky": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",+ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",+ "license": "MIT"+ },+ "node_modules/time-span": {+ "version": "5.1.0",+ "resolved": "https://registry.npmjs.org/time-span/-/time-span-5.1.0.tgz",+ "integrity": "sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==",+ "license": "MIT",+ "dependencies": {+ "convert-hrtime": "^5.0.0"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/timers-browserify": {"version": "2.0.12","resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",@@ -41074,6 +45924,15 @@"node": ">=0.6.0"}},+ "node_modules/timestamp-nano": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/timestamp-nano/-/timestamp-nano-1.0.1.tgz",+ "integrity": "sha512-4oGOVZWTu5sl89PtCDnhQBSt7/vL1zVEwAfxH1p49JhTosxzVQWYBYFRFZ8nJmo0G6f824iyP/44BFAwIoKvIA==",+ "license": "MIT",+ "engines": {+ "node": ">= 4.5.0"+ }+ },"node_modules/tiny-inflate": {"version": "1.0.3","resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",@@ -41250,7 +46109,6 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz","integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",- "dev": true,"license": "MIT","dependencies": {"is-number": "^7.0.0"@@ -41339,6 +46197,15 @@"node": ">=0.8.0"}},+ "node_modules/truncate-utf8-bytes": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",+ "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",+ "license": "WTFPL",+ "dependencies": {+ "utf8-byte-length": "^1.0.1"+ }+ },"node_modules/ts-api-utils": {"version": "2.5.0","resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",@@ -41639,6 +46506,24 @@"dev": true,"license": "MIT"},+ "node_modules/tsyringe": {+ "version": "4.10.0",+ "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.10.0.tgz",+ "integrity": "sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^1.9.3"+ },+ "engines": {+ "node": ">= 6.0.0"+ }+ },+ "node_modules/tsyringe/node_modules/tslib": {+ "version": "1.14.1",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",+ "license": "0BSD"+ },"node_modules/tty-browserify": {"version": "0.0.1","resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",@@ -41646,6 +46531,18 @@"dev": true,"license": "MIT"},+ "node_modules/tunnel-agent": {+ "version": "0.6.0",+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",+ "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",+ "license": "Apache-2.0",+ "dependencies": {+ "safe-buffer": "^5.0.1"+ },+ "engines": {+ "node": "*"+ }+ },"node_modules/tweetnacl": {"version": "1.0.3","resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",@@ -41914,6 +46811,31 @@"node": ">=0.8.0"}},+ "node_modules/uint8-varint": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.5.tgz",+ "integrity": "sha512-jeFLbL/x30wBRnWjKE1qVBXeumG46r7XmYkpis955lTQ+blccGKFrOsSMHlxePwYB1pI7L8YPHz1t4jLxEs3nA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arraylist": "^2.0.0",+ "uint8arrays": "^5.0.0"+ }+ },+ "node_modules/uint8-varint/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/uint8-varint/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/uint8array-tools": {"version": "0.0.8","resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.8.tgz",@@ -41923,6 +46845,30 @@"node": ">=14.0.0"}},+ "node_modules/uint8arraylist": {+ "version": "2.4.9",+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.9.tgz",+ "integrity": "sha512-KxWjyEFzchzik3aoQlK66oaoxIReoMo5bQRm1fcjBUZvE8xv/tyR3CTKhjh6K/faV8VaF6hd5pjr45CzbwuwkA==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "uint8arrays": "^5.0.1"+ }+ },+ "node_modules/uint8arraylist/node_modules/multiformats": {+ "version": "13.4.2",+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz",+ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==",+ "license": "Apache-2.0 OR MIT"+ },+ "node_modules/uint8arraylist/node_modules/uint8arrays": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.1.tgz",+ "integrity": "sha512-9muQwa4wZG4dKi9gMAIBtnk2Pw87SRpvWTH6lOGm19V2Uqxr4uomUf2PGqPnWc+qs06sN8owUU4jfcoWOcfwVQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "multiformats": "^13.0.0"+ }+ },"node_modules/uint8arrays": {"version": "3.1.0","resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.0.tgz",@@ -42395,6 +47341,18 @@"integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==","license": "MIT"},+ "node_modules/utf8-byte-length": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",+ "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",+ "license": "(WTFPL OR MIT)"+ },+ "node_modules/utf8-codec": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/utf8-codec/-/utf8-codec-1.0.0.tgz",+ "integrity": "sha512-S/QSLezp3qvG4ld5PUfXiH7mCFxLKjSVZRFkB3DOjgwHuJPFDkInAXc/anf7BAbHt/D38ozDzL+QMZ6/7gsI6w==",+ "license": "MIT"+ },"node_modules/util": {"version": "0.12.5","resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",@@ -42954,6 +47912,12 @@"loose-envify": "^1.0.0"}},+ "node_modules/wawa-lipsync": {+ "version": "0.0.2",+ "resolved": "https://registry.npmjs.org/wawa-lipsync/-/wawa-lipsync-0.0.2.tgz",+ "integrity": "sha512-aW4vKMOBRsv2RnPugzB0fF0ln1ni3kE3INks9xxeQ8+RnL6uZZzenzn/dwdwji8BBD8IboJBatFj/WkoyyYaew==",+ "license": "MIT"+ },"node_modules/wcwidth": {"version": "1.0.1","resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",@@ -42963,6 +47927,37 @@"defaults": "^1.0.3"}},+ "node_modules/weald": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/weald/-/weald-1.1.1.tgz",+ "integrity": "sha512-PaEQShzMCz8J/AD2N3dJMc1hTZWkJeLKS2NMeiVkV5KDHwgZe7qXLEzyodsT/SODxWDdXJJqocuwf3kHzcXhSQ==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "ms": "^3.0.0-canary.1",+ "supports-color": "^10.0.0"+ }+ },+ "node_modules/weald/node_modules/ms": {+ "version": "3.0.0-canary.202508261828",+ "resolved": "https://registry.npmjs.org/ms/-/ms-3.0.0-canary.202508261828.tgz",+ "integrity": "sha512-NotsCoUCIUkojWCzQff4ttdCfIPoA1UGZsyQbi7KmqkNRfKCrvga8JJi2PknHymHOuor0cJSn/ylj52Cbt2IrQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/weald/node_modules/supports-color": {+ "version": "10.2.2",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",+ "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/chalk/supports-color?sponsor=1"+ }+ },"node_modules/web-streams-polyfill": {"version": "3.3.3","resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",@@ -43017,6 +48012,19 @@"node": ">=14"}},+ "node_modules/webcrypto-core": {+ "version": "1.9.2",+ "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.9.2.tgz",+ "integrity": "sha512-gsXecm82UQNlTBURJGuqOWy1Ww08S3kZUcr3aOJS02Pk0xLtkfeUAVC0u0xhgdonFme80edSJUIJyuvL/7250Q==",+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/json-schema": "^1.1.12",+ "@peculiar/utils": "^2.0.2",+ "asn1js": "^3.0.10",+ "tslib": "^2.8.1"+ }+ },"node_modules/webdriver-bidi-protocol": {"version": "0.4.1","resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.1.tgz",@@ -43092,6 +48100,19 @@"webidl-conversions": "^4.0.2"}},+ "node_modules/wherearewe": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/wherearewe/-/wherearewe-2.0.1.tgz",+ "integrity": "sha512-XUguZbDxCA2wBn2LoFtcEhXL6AXo+hVjGonwhSTTTU9SzbWG8Xu3onNIpzf9j/mYUcJQ0f+m37SzG77G851uFw==",+ "license": "Apache-2.0 OR MIT",+ "dependencies": {+ "is-electron": "^2.2.0"+ },+ "engines": {+ "node": ">=16.0.0",+ "npm": ">=7.0.0"+ }+ },"node_modules/which": {"version": "2.0.2","resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",@@ -44172,6 +49193,28 @@"node": ">=18"}},+ "node_modules/xml2js": {+ "version": "0.6.2",+ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",+ "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",+ "license": "MIT",+ "dependencies": {+ "sax": ">=0.6.0",+ "xmlbuilder": "~11.0.0"+ },+ "engines": {+ "node": ">=4.0.0"+ }+ },+ "node_modules/xmlbuilder": {+ "version": "11.0.1",+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",+ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",+ "license": "MIT",+ "engines": {+ "node": ">=4.0"+ }+ },"node_modules/xmlchars": {"version": "2.2.0","resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",@@ -44297,6 +49340,12 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/yoga-layout": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz",+ "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==",+ "license": "MIT"+ },"node_modules/youch": {"version": "4.1.0-beta.10","resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz",diff --git a/package.json b/package.jsonindex 85e90b126..353bca189 100644--- a/package.json+++ b/package.json@@ -87,6 +87,8 @@"claude": "./claude.sh"},"dependencies": {+ "@ai-sdk/anthropic": "^3.0.78",+ "@ai-sdk/openai": "^3.0.64","@avaturn/sdk": "^1.1.4","@aws-sdk/client-s3": "latest","@aws-sdk/s3-request-presigner": "latest",@@ -94,6 +96,7 @@"@chenglou/pretext": "^0.0.5","@coinbase/x402": "^2.1.0","@coral-xyz/anchor": "^0.31.1",+ "@dimforge/rapier3d-compat": "^0.19.3","@gltf-transform/core": "^4.3.0","@gltf-transform/extensions": "^4.3.0","@huggingface/inference": "^2.7.0",@@ -105,10 +108,14 @@"@neondatabase/serverless": "^0.10.1","@nirholas/pump-sdk": "^1.0.0","@noble/curves": "^2.2.0",+ "@pixiv/three-vrm": "^3.5.2",+ "@pixiv/three-vrm-animation": "^3.5.2","@pump-fun/agent-payments-sdk": "^3.1.0","@pump-fun/pump-sdk": "^1.35.0","@pump-fun/pump-swap-sdk": "^1.15.0","@pythnetwork/hermes-client": "^3.1.0",+ "@recast-navigation/core": "^0.43.1",+ "@recast-navigation/three": "^0.43.1","@sentry/node": "^10.50.0","@solana/actions": "^1.6.6","@solana/kit": "^6.8.0",@@ -120,11 +127,14 @@"@solana/web3.js": "latest","@upstash/ratelimit": "^2.0.5","@upstash/redis": "^1.34.3",+ "@vercel/og": "^0.11.1","@x402/core": "^2.11.0","@x402/evm": "^2.11.0","@x402/express": "^2.11.0","@x402/extensions": "^2.11.0","@zauthx402/sdk": "^0.1.14",+ "agent0-sdk": "^1.7.1",+ "ai": "^6.0.184","bcryptjs": "^2.4.3","bn.js": "^5.2.3","bs58": "^6.0.0",@@ -132,7 +142,9 @@"dat.gui": "^0.7.9","ethers": "^6.16.0","express": "^4.22.1",+ "fast-check": "^4.8.0","gltf-validator": "^2.0.0-dev.3.10",+ "graphql": "^16.14.0","helius-sdk": "^2.2.2","jose": "^5.9.6","livekit-client": "^2.18.8",@@ -140,12 +152,14 @@"node-fetch": "^3.3.2","qrcode": "^1.5.4","query-string": "^8.1.0",+ "qwen-ai-provider": "^0.1.1","resend": "^6.12.2","sas-lib": "^1.0.10","simple-dropzone": "^0.8.3","three": "latest","vhtml": "^2.2.0","viem": "^2.18.0",+ "wawa-lipsync": "^0.0.2","ws": "^8.20.0","zod": "^3.23.8"},diff --git a/public/dashboard/dashboard.js b/public/dashboard/dashboard.jsindex 8d6eb554f..85e52e22c 100644--- a/public/dashboard/dashboard.js+++ b/public/dashboard/dashboard.js@@ -1509,17 +1509,38 @@ async function doReplaceUpload(a, file, warnEl, cardEl) {}say('Checking skeleton compatibility\u2026');- const glbBuf = await file.arrayBuffer();- const boneMatch = checkMixamoSkeleton(glbBuf);+ const originalBuf = await file.arrayBuffer();+ let uploadBytes = originalBuf;+ let uploadSize = file.size;+ let uploadBlob = file;+ let retargetReport = null;++ try {+ const { canonicalizeGLBBones } = await import('/src/glb-canonicalize.js');+ const result = canonicalizeGLBBones(originalBuf);+ if (result.renamed > 0) {+ uploadBytes = result.buffer;+ uploadSize = result.buffer.byteLength;+ uploadBlob = new Blob([result.buffer], { type: 'model/gltf-binary' });+ retargetReport = { renamed: result.renamed, samples: result.samples };+ }+ } catch (err) {+ // Canonicalization is non-fatal \u2014 fall back to the original buffer and+ // let the boneMatch warning surface the issue. A malformed GLB will+ // also fail at the R2 upload step with a clearer error.+ console.warn('[upload] canonicalize failed; uploading original', err);+ }++ const boneMatch = checkMixamoSkeleton(uploadBytes);say('Requesting upload URL\u2026');try {const { upload_url, storage_key } = await api.presign({- size_bytes: file.size,+ size_bytes: uploadSize,content_type: 'model/gltf-binary',});- say(`Uploading ${fmtSize(file.size)}\u2026`);- await uploadToR2(upload_url, file, (pct) => say(`Uploading ${pct}%\u2026`));+ say(`Uploading ${fmtSize(uploadSize)}\u2026`);+ await uploadToR2(upload_url, uploadBlob, (pct) => say(`Uploading ${pct}%\u2026`));say('Registering\u2026');const { avatar } = await api.createAvatar({storage_key,@@ -1528,10 +1549,12 @@ async function doReplaceUpload(a, file, warnEl, cardEl) {description: a.description || undefined,visibility: a.visibility,tags: a.tags,- size_bytes: file.size,+ size_bytes: uploadSize,content_type: 'model/gltf-binary',source: 'direct-upload',- source_meta: { replaced_from: a.id },+ source_meta: retargetReport+ ? { replaced_from: a.id, retargeted_bones: retargetReport.renamed }+ : { replaced_from: a.id },});// Refresh model-viewer preview if the new avatar is public/unlisted@@ -1540,7 +1563,11 @@ async function doReplaceUpload(a, file, warnEl, cardEl) {if (mv) mv.src = avatar.model_url;}- if (boneMatch !== null && boneMatch < 0.5) {+ if (retargetReport) {+ say(+ `Replaced. Retargeted ${retargetReport.renamed} bones to the three.ws humanoid skeleton so animations play out of the box.`,+ );+ } else if (boneMatch !== null && boneMatch < 0.5) {say(`Uploaded. \u26a0 Animations may not play \u2014 skeleton mismatch (${Math.round(boneMatch * 100)}% three.ws humanoid bone match).`,);@@ -1616,16 +1643,36 @@ function renderUpload(root) {e.preventDefault();const file = root.querySelector('#file').files[0];if (!file) return;++ progress.textContent = 'Checking skeleton compatibility…';+ let uploadBlob = file;+ let uploadSize = file.size;+ let retargetReport = null;+ try {+ const originalBuf = await file.arrayBuffer();+ const { canonicalizeGLBBones } = await import('/src/glb-canonicalize.js');+ const result = canonicalizeGLBBones(originalBuf);+ if (result.renamed > 0) {+ uploadBlob = new Blob([result.buffer], { type: 'model/gltf-binary' });+ uploadSize = result.buffer.byteLength;+ retargetReport = { renamed: result.renamed, samples: result.samples };+ progress.textContent = `Retargeted ${result.renamed} bones to the three.ws humanoid skeleton.`;+ }+ } catch (err) {+ // Canonicalization is non-fatal; let upload proceed with the original.+ console.warn('[upload] canonicalize failed; uploading original', err);+ }+progress.textContent = 'Requesting upload URL…';try {const { upload_url, storage_key } = await api.presign({- size_bytes: file.size,- content_type: file.type || 'model/gltf-binary',+ size_bytes: uploadSize,+ content_type: 'model/gltf-binary',});- progress.textContent = `Uploading ${fmtSize(file.size)}…`;+ progress.textContent = `Uploading ${fmtSize(uploadSize)}…`;await uploadToR2(upload_url,- file,+ uploadBlob,(pct) => (progress.textContent = `Uploading ${pct}%…`),);progress.textContent = 'Finalizing…';@@ -1639,10 +1686,12 @@ function renderUpload(root) {description: root.querySelector('#desc').value || undefined,visibility: root.querySelector('#vis').value,tags,- size_bytes: file.size,- content_type: file.type || 'model/gltf-binary',+ size_bytes: uploadSize,+ content_type: 'model/gltf-binary',source: 'upload',- source_meta: {},+ source_meta: retargetReport+ ? { retargeted_bones: retargetReport.renamed }+ : {},});progress.innerHTML = `Uploaded! <a href="/dashboard/avatars">View</a>`;goto('avatars');diff --git a/public/demo/avatar-os/live.html b/public/demo/avatar-os/live.htmlnew file mode 100644index 000000000..1a467ee35--- /dev/null+++ b/public/demo/avatar-os/live.html@@ -0,0 +1,136 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <title>Live · OSS Avatar Pipeline</title>+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <meta name="robots" content="noindex" />+ <meta name="theme-color" content="#0a0a0a" />+ <link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/demo/avatar-os/shared.css" />+ </head>+ <body>+ <header class="os-header">+ <div class="brand">+ three.ws<span class="tag">avatar-os · live</span>+ </div>+ <nav>+ <a href="/demo/avatar-os/">overview</a>+ <a href="/demo/avatar-os/studio.html">studio</a>+ <a href="/demo/avatar-os/selfie.html">selfie</a>+ <a href="/demo/avatar-os/combined.html">combined</a>+ <a href="/demo/avatar-os/live.html" class="active">live</a>+ </nav>+ </header>+ <main class="os-main">+ <div class="banner">+ <strong>Webcam → MediaPipe → VRM.</strong> Face Landmarker streams 52 ARKit+ blendshape coefficients + head pose into a @pixiv/three-vrm avatar with+ spring-bone physics. No mocks, no server inference — everything runs in+ the browser.+ </div>++ <div class="os-grid">+ <aside>+ <div class="os-card">+ <h2>1 · Avatar</h2>+ <p>+ Default loads a CharacterStudio Anata VRM from the M3-org public+ mirror. Paste any VRM URL to swap. If a VRM exposes no+ ARKit-style expressions or morphs, head rotation still drives.+ </p>+ <div class="btn-row">+ <button id="btn-load-default" class="btn btn-primary">+ Load default VRM+ </button>+ <button id="btn-load-glb" class="btn">Load /avatars/default.glb</button>+ </div>+ <div style="margin-top: 8px; display: flex; gap: 6px">+ <input+ id="vrm-url-input"+ type="text"+ placeholder="https://…/avatar.vrm"+ style="+ flex: 1;+ padding: 8px 10px;+ border-radius: 8px;+ border: 1px solid var(--border-2);+ background: var(--panel-2);+ color: var(--text);+ font-size: 12px;+ font-family: ui-monospace, monospace;+ "+ />+ <button id="btn-load-url" class="btn">Load URL</button>+ </div>+ <div class="status" id="vrm-status">no avatar loaded</div>+ </div>++ <div class="os-card" style="margin-top: 16px">+ <h2>2 · Webcam tracking</h2>+ <p>+ Start the front-facing camera. MediaPipe Face Landmarker (VIDEO+ mode) emits blendshapes + a head transformation matrix at the+ display's refresh rate.+ </p>+ <div class="btn-row">+ <button id="btn-start-cam" class="btn btn-primary" disabled>+ Start tracking+ </button>+ <button id="btn-stop-cam" class="btn" disabled>Stop</button>+ </div>+ <div class="status" id="track-status">load avatar first</div>+ </div>++ <div class="os-card" style="margin-top: 16px">+ <h2>3 · Physics</h2>+ <p>+ Spring-bone physics for hair / cloth are driven by+ <code>vrm.springBoneManager.update(dt)</code> each frame. No+ effect on avatars without spring-bone metadata.+ </p>+ <label+ style="display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px"+ >+ <input type="checkbox" id="toggle-spring" checked />+ <span>spring-bone update enabled</span>+ </label>+ <div class="status" id="spring-status">—</div>+ </div>++ <div class="os-card" style="margin-top: 16px">+ <h2>Diagnostics</h2>+ <div class="status" id="diag-fps">fps —</div>+ <div class="status" id="diag-blend">blendshapes —</div>+ <div class="status" id="diag-head">head —</div>+ </div>+ </aside>++ <section>+ <div class="viewer" id="viewer-host" style="min-height: 600px">+ <div class="badge" id="viewer-badge">three.js · idle</div>+ <div class="overlay" id="viewer-overlay">+ Load an avatar, then click <span class="kbd">Start tracking</span>+ </div>+ </div>+ <video+ id="cam-video"+ autoplay+ playsinline+ muted+ style="+ margin-top: 12px;+ width: 240px;+ max-height: 180px;+ border-radius: 12px;+ background: #000;+ display: none;+ border: 1px solid var(--border-2);+ "+ ></video>+ </section>+ </div>+ </main>+ <script type="module" src="/src/demo/os-live.js"></script>+ </body>+</html>diff --git a/public/demo/coin/dashboard.js b/public/demo/coin/dashboard.jsindex 0e847a035..92e133bbc 100644--- a/public/demo/coin/dashboard.js+++ b/public/demo/coin/dashboard.js@@ -295,12 +295,124 @@ function bindWallet() {localStorage.removeItem(LS_KEY);refreshWallet();refreshActiveTab();+ // Disconnect any active wallet provider session so the next "Connect"+ // re-prompts the user instead of silently reusing the cached approval.+ walletAdapter.disconnect().catch(() => {});+ renderConnectButton();});input.addEventListener('keydown', (e) => {if (e.key === 'Enter') $('#wallet-check').click();});}+// ─── three.ws Phantom adapter ───────────────────────────────────────────────+//+// API shape mirrors @solana/wallet-adapter-phantom (PhantomWalletAdapter) so+// if/when the dashboard graduates to a bundled build we can swap in the+// upstream class without touching call sites. The wire-level work is identical:+// both forms ultimately call `window.phantom.solana.connect()`.+//+// Supports Phantom + Backpack + Solflare via the same browser-injected+// `isPhantom`-style interface (the de-facto Solana wallet provider standard+// that @solana/wallet-adapter-base codifies).++const walletAdapter = (() => {+ let connected = null; // { publicKey: string, provider }++ function getProvider() {+ if (typeof window === 'undefined') return null;+ if (window.phantom?.solana?.isPhantom) return { name: 'Phantom', api: window.phantom.solana };+ if (window.solana?.isPhantom) return { name: 'Phantom', api: window.solana };+ if (window.backpack?.solana) return { name: 'Backpack', api: window.backpack.solana };+ if (window.solflare?.isSolflare) return { name: 'Solflare', api: window.solflare };+ return null;+ }++ async function connect() {+ const p = getProvider();+ if (!p) throw new Error('no_wallet');+ const res = await p.api.connect();+ const pk = (res?.publicKey ?? p.api.publicKey)?.toString?.() ?? null;+ if (!pk) throw new Error('no_pubkey');+ connected = { publicKey: pk, provider: p.name };+ return connected;+ }++ async function disconnect() {+ const p = getProvider();+ if (p?.api?.disconnect) {+ try { await p.api.disconnect(); } catch { /* idempotent */ }+ }+ connected = null;+ }++ function get() { return connected; }+ function available() { return !!getProvider(); }+ function providerName() { return getProvider()?.name || null; }++ return { connect, disconnect, get, available, providerName };+})();++async function connectWallet() {+ if (!walletAdapter.available()) {+ alert(+ 'No Solana wallet detected. Install Phantom (phantom.app), Backpack (backpack.app), or Solflare.',+ );+ return;+ }+ try {+ const conn = await walletAdapter.connect();+ state.wallet = conn.publicKey;+ localStorage.setItem(LS_KEY, conn.publicKey);+ $('#wallet-input').value = conn.publicKey;+ renderConnectButton();+ await refreshWallet();+ await refreshActiveTab();+ } catch (err) {+ // User rejected the request, or no provider returned a key.+ if (err.message !== 'no_wallet' && err.message !== 'no_pubkey') {+ console.error('[coin-dashboard] wallet connect failed', err);+ }+ }+}++function renderConnectButton() {+ const btn = $('#wallet-connect');+ if (!btn) return;+ const conn = walletAdapter.get();+ if (conn) {+ btn.textContent = `${conn.provider} · ${conn.publicKey.slice(0, 4)}…${conn.publicKey.slice(-4)}`;+ btn.setAttribute('aria-pressed', 'true');+ btn.title = `Connected as ${conn.publicKey}. Click to disconnect.`;+ } else if (walletAdapter.available()) {+ btn.textContent = `Connect ${walletAdapter.providerName() || 'wallet'}`;+ btn.setAttribute('aria-pressed', 'false');+ btn.title = `Connect ${walletAdapter.providerName() || 'a Solana wallet'} to auto-fill your address.`;+ } else {+ btn.textContent = 'Install Phantom';+ btn.setAttribute('aria-pressed', 'false');+ btn.title = 'No Solana wallet detected — install Phantom, Backpack, or Solflare.';+ }+}++function bindConnect() {+ const btn = $('#wallet-connect');+ if (!btn) return;+ renderConnectButton();+ btn.addEventListener('click', async () => {+ if (!walletAdapter.available()) {+ window.open('https://phantom.app/download', '_blank', 'noopener');+ return;+ }+ if (walletAdapter.get()) {+ await walletAdapter.disconnect();+ renderConnectButton();+ return;+ }+ await connectWallet();+ });+}+function bindCopy() {$('#copy-mint').addEventListener('click', async () => {try {@@ -337,6 +449,7 @@ async function tick() {state.mint = pickMintFromUrl();bindTabs();bindWallet();+ bindConnect();bindCopy();await tick();setInterval(tick, POLL_MS);diff --git a/public/demo/coin/index.html b/public/demo/coin/index.htmlindex b2ebbf154..eaff93e44 100644--- a/public/demo/coin/index.html+++ b/public/demo/coin/index.html@@ -225,7 +225,8 @@<section class="panel"><h2>Your wallet</h2><div class="wallet-controls">- <input id="wallet-input" type="text" placeholder="Paste your Solana wallet address (or use a Phantom-signed session)" autocomplete="off" spellcheck="false" />+ <button id="wallet-connect" class="ghost" title="Connect a Solana wallet">Connect wallet</button>+ <input id="wallet-input" type="text" placeholder="…or paste your Solana wallet address" autocomplete="off" spellcheck="false" /><button id="wallet-check">Show my stats</button><button id="wallet-clear" class="ghost">Clear</button></div>diff --git a/public/demos/brain.html b/public/demos/brain.htmlnew file mode 100644index 000000000..083137d44--- /dev/null+++ b/public/demos/brain.html@@ -0,0 +1,281 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Multi-LLM brain · three.ws lab</title>+ <meta name="description" content="Send the same prompt to Claude, GPT, Qwen on Alibaba DashScope, Qwen3-Coder on ModelScope, and Llama on Groq. Compare streaming responses, latency, and token usage side-by-side." />+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <style>+ :root { color-scheme: dark; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif; margin: 0; }+ .stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }+ .crumb a { color: #8a8d98; text-decoration: none; }+ .crumb a:hover { color: #d6ff3d; }+ h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }+ .sub { color: #8a8d98; max-width: 64ch; margin: 0 0 26px; }+ .composer { display: flex; flex-direction: column; gap: 12px; background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 18px; margin-bottom: 22px; }+ .composer textarea { width: 100%; min-height: 92px; resize: vertical; padding: 12px 14px; background: #07080d; border: 1px solid #1e1f2b; border-radius: 10px; color: #eee; font: inherit; line-height: 1.5; }+ .composer-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }+ .composer-row select, .composer-row input[type="text"] { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 8px 10px; border-radius: 9px; font: inherit; }+ .composer-row label { font-size: 12px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; }+ button { background: #d6ff3d; color: #0a0a0a; border: 0; border-radius: 9px; padding: 10px 16px; font-weight: 600; cursor: pointer; font: inherit; }+ button.secondary { background: rgba(255,255,255,0.06); color: #eee; }+ button:disabled { opacity: 0.4; cursor: not-allowed; }+ .providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }+ .provider-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px; cursor: pointer; user-select: none; }+ .provider-pill input { accent-color: #d6ff3d; }+ .provider-pill .net { font-size: 10.5px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.05em; }+ .provider-pill .name { font-size: 13px; font-weight: 600; }+ .provider-pill .meta { display: flex; flex-direction: column; line-height: 1.2; }+ .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }+ .card { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; min-height: 280px; }+ .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }+ .card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }+ .card-net { font-size: 10.5px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.06em; }+ .card-body { flex: 1; margin-top: 10px; padding: 12px; background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px; font-size: 13.5px; line-height: 1.55; color: #ddd; white-space: pre-wrap; min-height: 130px; max-height: 320px; overflow-y: auto; }+ .card-body.empty { color: #565762; font-style: italic; }+ .card-body.error { color: #ff8a8a; }+ .card-footer { margin-top: 10px; display: flex; gap: 14px; font-size: 11.5px; color: #8a8d98; font-family: ui-monospace, monospace; flex-wrap: wrap; }+ .card-footer span strong { color: #d6ff3d; font-weight: 600; }+ .spinner { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d6ff3d; animation: pulse 1s ease-in-out infinite; vertical-align: middle; margin-left: 8px; }+ @keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }+ .notice { padding: 10px 14px; border-radius: 10px; background: rgba(255,184,77,0.08); border: 1px solid rgba(255,184,77,0.25); color: #ffb84d; font-size: 13px; margin-top: 16px; }+ </style>+ </head>+ <body>+ <header><div id="nav-container"></div></header>++ <main class="stage">+ <p class="crumb"><a href="/demos/">← lab</a></p>+ <h1>Multi-LLM brain</h1>+ <p class="sub">+ Send the same prompt to multiple providers at once. Side-by-side streaming+ answers, real latency, real token counts. Brain layer built on the Vercel AI+ SDK; routes to <strong>Claude</strong>, <strong>GPT</strong>,+ <strong>Qwen on Alibaba DashScope</strong>, <strong>Qwen3-Coder on ModelScope</strong>,+ and <strong>Llama 3.3 on Groq</strong>.+ </p>++ <section class="composer">+ <div>+ <label for="system" class="card-net">System (optional)</label>+ <textarea id="system" placeholder="You are a terse, helpful assistant…" style="min-height: 56px; margin-top: 6px;"></textarea>+ </div>+ <div>+ <label for="prompt" class="card-net">Prompt</label>+ <textarea id="prompt" placeholder="What ships when a developer drops <agent-3d> on a page?">Explain HTTP 402 in two sentences. No filler.</textarea>+ </div>++ <div>+ <label class="card-net">Providers to compare</label>+ <div class="providers" id="providers"></div>+ </div>++ <div class="composer-row">+ <label>Max tokens</label>+ <input type="text" id="maxTokens" value="512" inputmode="numeric" style="width: 80px;" />+ <div style="flex: 1"></div>+ <button class="secondary" id="clear">Clear</button>+ <button id="run">Run</button>+ </div>+ </section>++ <div class="grid" id="grid"></div>+ <div class="notice" id="notice" style="display:none"></div>+ </main>++ <script src="/nav.js"></script>+ <script type="module">+ const ALL_PROVIDERS = [+ { key: 'anthropic', label: 'Claude Sonnet 4.6', network: 'Anthropic', defaultOn: true },+ { key: 'openai', label: 'GPT-4o-mini', network: 'OpenAI', defaultOn: true },+ { key: 'qwen-plus', label: 'Qwen Plus', network: 'Alibaba DashScope', defaultOn: true },+ { key: 'qwen-vl-max', label: 'Qwen VL Max', network: 'Alibaba DashScope', defaultOn: false },+ { key: 'modelscope-qwen', label: 'Qwen3-Coder-480B', network: 'ModelScope', defaultOn: true },+ { key: 'groq-llama', label: 'Llama 3.3 70B', network: 'Groq', defaultOn: false },+ ];++ const providersEl = document.getElementById('providers');+ const gridEl = document.getElementById('grid');+ const promptEl = document.getElementById('prompt');+ const systemEl = document.getElementById('system');+ const maxTokensEl = document.getElementById('maxTokens');+ const runBtn = document.getElementById('run');+ const clearBtn = document.getElementById('clear');+ const noticeEl = document.getElementById('notice');++ for (const p of ALL_PROVIDERS) {+ const pill = document.createElement('label');+ pill.className = 'provider-pill';+ pill.innerHTML = `+ <input type="checkbox" data-key="${p.key}" ${p.defaultOn ? 'checked' : ''}/>+ <span class="meta">+ <span class="name">${p.label}</span>+ <span class="net">${p.network}</span>+ </span>`;+ providersEl.appendChild(pill);+ }++ function renderCards(selected) {+ gridEl.innerHTML = '';+ for (const p of selected) {+ const card = document.createElement('div');+ card.className = 'card';+ card.dataset.key = p.key;+ card.innerHTML = `+ <div class="card-head">+ <h3 class="card-title">${p.label} <span class="spinner" data-spinner></span></h3>+ <span class="card-net">${p.network}</span>+ </div>+ <div class="card-body empty" data-body>Waiting…</div>+ <div class="card-footer" data-footer>+ <span><strong data-elapsed>—</strong> ms</span>+ <span><strong data-tokens>—</strong> tokens out</span>+ <span><strong data-tps>—</strong> tok/s</span>+ </div>`;+ gridEl.appendChild(card);+ }+ }++ function selectedProviders() {+ const keys = [...providersEl.querySelectorAll('input:checked')].map((el) => el.dataset.key);+ return ALL_PROVIDERS.filter((p) => keys.includes(p.key));+ }++ async function streamProvider(p, body, card) {+ const bodyEl = card.querySelector('[data-body]');+ const elapsedEl = card.querySelector('[data-elapsed]');+ const tokensEl = card.querySelector('[data-tokens]');+ const tpsEl = card.querySelector('[data-tps]');+ const spinner = card.querySelector('[data-spinner]');+ bodyEl.textContent = '';+ bodyEl.classList.remove('empty', 'error');++ const t0 = performance.now();+ let res;+ try {+ res = await fetch('/api/brain/chat', {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ ...body, provider: p.key }),+ });+ } catch (err) {+ bodyEl.classList.add('error');+ bodyEl.textContent = `Network error: ${err.message}`;+ spinner.style.display = 'none';+ return;+ }++ if (!res.ok || !res.body) {+ const txt = await res.text().catch(() => '');+ bodyEl.classList.add('error');+ bodyEl.textContent = `HTTP ${res.status}: ${txt || res.statusText}`;+ spinner.style.display = 'none';+ return;+ }++ const reader = res.body.getReader();+ const decoder = new TextDecoder();+ let buf = '';+ let textLen = 0;++ try {+ for (;;) {+ const { done, value } = await reader.read();+ if (done) break;+ buf += decoder.decode(value, { stream: true });++ let idx;+ while ((idx = buf.indexOf('\n\n')) !== -1) {+ const event = buf.slice(0, idx);+ buf = buf.slice(idx + 2);+ const lines = event.split('\n');+ let evType = 'message';+ let data = '';+ for (const line of lines) {+ if (line.startsWith('event:')) evType = line.slice(6).trim();+ else if (line.startsWith('data:')) data += line.slice(5).trim();+ }++ if (evType === 'message' && data) {+ if (data === '[DONE]') continue;+ try {+ const chunk = JSON.parse(data);+ bodyEl.textContent += chunk;+ textLen += chunk.length;+ } catch {}+ } else if (evType === 'done') {+ try {+ const info = JSON.parse(data);+ elapsedEl.textContent = info.elapsedMs;+ if (info.usage?.outputTokens) {+ tokensEl.textContent = info.usage.outputTokens;+ const sec = info.elapsedMs / 1000;+ if (sec > 0) tpsEl.textContent = (info.usage.outputTokens / sec).toFixed(1);+ }+ } catch {}+ } else if (evType === 'error') {+ try {+ const info = JSON.parse(data);+ bodyEl.classList.add('error');+ bodyEl.textContent += `\n\n[error: ${info.message}]`;+ elapsedEl.textContent = info.elapsedMs;+ } catch {}+ }+ }+ }+ } finally {+ spinner.style.display = 'none';+ if (!elapsedEl.textContent || elapsedEl.textContent === '—') {+ elapsedEl.textContent = Math.round(performance.now() - t0);+ }+ }+ }++ async function run() {+ const prompt = promptEl.value.trim();+ if (!prompt) {+ noticeEl.style.display = 'block';+ noticeEl.textContent = 'Enter a prompt first.';+ return;+ }+ noticeEl.style.display = 'none';++ const selected = selectedProviders();+ if (!selected.length) {+ noticeEl.style.display = 'block';+ noticeEl.textContent = 'Select at least one provider.';+ return;+ }++ renderCards(selected);+ runBtn.disabled = true;+ const body = {+ messages: [{ role: 'user', content: prompt }],+ system: systemEl.value.trim() || undefined,+ maxTokens: Math.min(Math.max(Number(maxTokensEl.value) || 512, 32), 4096),+ };+ try {+ await Promise.all(selected.map((p) => {+ const card = gridEl.querySelector(`[data-key="${p.key}"]`);+ return streamProvider(p, body, card);+ }));+ } finally {+ runBtn.disabled = false;+ }+ }++ runBtn.addEventListener('click', run);+ clearBtn.addEventListener('click', () => {+ gridEl.innerHTML = '';+ noticeEl.style.display = 'none';+ });+ promptEl.addEventListener('keydown', (e) => {+ if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) run();+ });+ </script>+ </body>+</html>diff --git a/public/demos/erc8004.html b/public/demos/erc8004.htmlnew file mode 100644index 000000000..a0c365d91--- /dev/null+++ b/public/demos/erc8004.html@@ -0,0 +1,253 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>ERC-8004 registry browser · three.ws lab</title>+ <meta name="description" content="Browse on-chain ERC-8004 agent identities across Base, Ethereum, Polygon, and testnets. Real data, read from the Agent0 subgraph via the agent0-sdk." />+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <style>+ :root { color-scheme: dark; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }+ .stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }+ .crumb a { color: #8a8d98; text-decoration: none; }+ .crumb a:hover { color: #d6ff3d; }+ h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }+ .sub { color: #8a8d98; max-width: 64ch; margin: 0 0 26px; }+ .controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 16px; margin-bottom: 22px; }+ .controls label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; }+ .controls select, .controls input { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 9px 11px; border-radius: 9px; font: inherit; }+ .controls input { min-width: 260px; }+ .controls button { background: #d6ff3d; color: #0a0a0a; border: 0; border-radius: 9px; padding: 9px 16px; font-weight: 600; cursor: pointer; font: inherit; }+ .controls button:disabled { opacity: 0.4; cursor: not-allowed; }+ .results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }+ .agent { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }+ .agent:hover { border-color: rgba(214,255,61,0.4); transform: translateY(-1px); }+ .agent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }+ .agent-name { font-size: 15px; font-weight: 600; margin: 0; }+ .agent-id { font-family: ui-monospace, monospace; font-size: 11px; color: #8a8d98; }+ .agent-desc { font-size: 13px; color: #b6b6cf; line-height: 1.45; margin: 0; min-height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }+ .agent-meta { display: flex; gap: 10px; font-size: 11px; color: #8a8d98; font-family: ui-monospace, monospace; margin-top: 4px; flex-wrap: wrap; }+ .agent-meta b { color: #d6ff3d; font-weight: 600; }+ .notice { padding: 12px 16px; border-radius: 10px; background: rgba(154,212,255,0.06); border: 1px solid rgba(154,212,255,0.2); color: #9ad4ff; font-size: 13px; margin-bottom: 14px; }+ .notice.empty { background: rgba(255,255,255,0.02); border-color: #1e1f2b; color: #8a8d98; }+ .notice.err { background: rgba(255,138,138,0.06); border-color: rgba(255,138,138,0.3); color: #ff8a8a; }+ .detail { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 22px; margin-bottom: 22px; }+ .detail h2 { margin: 0 0 6px; font-size: 18px; }+ .detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; margin-top: 14px; }+ .detail-grid dt { color: #8a8d98; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }+ .detail-grid dd { margin: 0; font-family: ui-monospace, monospace; word-break: break-all; color: #ddd; font-size: 12.5px; line-height: 1.55; }+ .detail-grid dd a { color: #9ad4ff; }+ .detail-close { float: right; background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #1e1f2b; border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; }+ </style>+ </head>+ <body>+ <header><div id="nav-container"></div></header>++ <main class="stage">+ <p class="crumb"><a href="/demos/">← lab</a></p>+ <h1>ERC-8004 registry browser</h1>+ <p class="sub">+ Live read of <strong>ERC-8004</strong> agent identities across Base,+ Ethereum, Polygon, Base Sepolia, and Sepolia. Powered by the+ <a href="https://github.com/agent0lab/agent0-ts" target="_blank" rel="noopener" style="color:#9ad4ff">agent0-sdk</a>+ against the Agent0 subgraph. Server proxies the queries; no API keys, no signer required.+ </p>++ <form class="controls" id="form">+ <label>+ Chain+ <select id="chain">+ <option value="8453" selected>Base (8453)</option>+ <option value="1">Ethereum (1)</option>+ <option value="137">Polygon (137)</option>+ <option value="84532">Base Sepolia (84532)</option>+ <option value="11155111">Sepolia (11155111)</option>+ </select>+ </label>+ <label style="flex:1">+ Search (optional)+ <input id="q" type="text" placeholder="keyword — name, description, …" />+ </label>+ <label>+ Limit+ <select id="limit">+ <option value="10">10</option>+ <option value="20" selected>20</option>+ <option value="50">50</option>+ </select>+ </label>+ <button type="submit">Search</button>+ </form>++ <div id="notice"></div>+ <div id="detail"></div>+ <div class="results" id="results"></div>+ </main>++ <script src="/nav.js" defer></script>+ <script type="module">+ const $ = (id) => document.getElementById(id);+ const form = $('form');+ const resultsEl = $('results');+ const noticeEl = $('notice');+ const detailEl = $('detail');++ function notice(cls, msg) {+ noticeEl.innerHTML = '';+ if (!msg) return;+ const div = document.createElement('div');+ div.className = 'notice ' + cls;+ div.textContent = msg;+ noticeEl.appendChild(div);+ }++ function fmtTime(seconds) {+ if (!seconds) return '—';+ return new Date(Number(seconds) * 1000).toLocaleString();+ }++ function shorten(addr) {+ if (!addr) return '—';+ if (addr.length <= 14) return addr;+ return addr.slice(0, 8) + '…' + addr.slice(-6);+ }++ function chainExplorer(chainId, address) {+ if (!address) return null;+ const base = {+ '1': 'https://etherscan.io/address/',+ '137': 'https://polygonscan.com/address/',+ '8453': 'https://basescan.org/address/',+ '84532': 'https://sepolia.basescan.org/address/',+ '11155111': 'https://sepolia.etherscan.io/address/',+ }[String(chainId)];+ return base ? base + address : null;+ }++ async function search(ev) {+ ev?.preventDefault();+ detailEl.innerHTML = '';+ resultsEl.innerHTML = '';+ notice('', 'Querying subgraph…');++ const chain = $('chain').value;+ const q = $('q').value.trim();+ const limit = $('limit').value;++ const url = new URL('/api/agents/8004/search', location.origin);+ url.searchParams.set('chain', chain);+ url.searchParams.set('limit', limit);+ if (q) url.searchParams.set('q', q);++ let res;+ try {+ res = await fetch(url);+ } catch (err) {+ notice('err', 'Network error: ' + err.message);+ return;+ }+ if (!res.ok) {+ const body = await res.text().catch(() => '');+ notice('err', `HTTP ${res.status} — ${body.slice(0, 240)}`);+ return;+ }+ const data = await res.json();+ const agents = data.agents || [];+ if (!agents.length) {+ notice('empty', q+ ? `No matches for "${q}" on chain ${chain}.`+ : `Subgraph returned 0 agents for chain ${chain}. Try a different chain.`);+ return;+ }+ notice('', `${agents.length} agent${agents.length === 1 ? '' : 's'} on chain ${chain}`);+ renderAgents(agents, chain);+ }++ function renderAgents(agents, chainId) {+ resultsEl.innerHTML = '';+ for (const a of agents) {+ const card = document.createElement('div');+ card.className = 'agent';+ card.dataset.id = a.agentId;+ card.dataset.chain = chainId;+ card.innerHTML = `+ <div class="agent-head">+ <h3 class="agent-name">${escapeHtml(a.name || `Agent #${a.agentId}`)}</h3>+ <span class="agent-id">#${escapeHtml(a.agentId)}</span>+ </div>+ <p class="agent-desc">${escapeHtml(a.description || '(no description)')}</p>+ <div class="agent-meta">+ <span><b>${shorten(a.address)}</b></span>+ <span>★ <b>${a.averageRating == null ? '—' : Number(a.averageRating).toFixed(2)}</b> · ${a.feedbackCount ?? 0} reviews</span>+ </div>`;+ card.addEventListener('click', () => loadDetail(chainId, a.agentId));+ resultsEl.appendChild(card);+ }+ }++ async function loadDetail(chainId, agentId) {+ detailEl.innerHTML = '<div class="detail">Loading agent…</div>';+ detailEl.scrollIntoView({ behavior: 'smooth', block: 'start' });++ const url = new URL('/api/agents/8004/agent', location.origin);+ url.searchParams.set('chain', chainId);+ url.searchParams.set('id', agentId);++ let res, payload;+ try {+ res = await fetch(url);+ payload = await res.json();+ } catch (err) {+ detailEl.innerHTML = `<div class="detail">Lookup failed: ${escapeHtml(err.message)}</div>`;+ return;+ }+ if (!res.ok) {+ detailEl.innerHTML = `<div class="detail">HTTP ${res.status} · ${escapeHtml(payload.error_description || '')}</div>`;+ return;+ }+ renderDetail(payload.agent, chainId);+ }++ function renderDetail(a, chainId) {+ const explorer = chainExplorer(chainId, a.address);+ const ownerExplorer = chainExplorer(chainId, a.owner);+ const wallets = (a.walletAddresses || []).map((w) => {+ const link = chainExplorer(w.chainId || chainId, w.address);+ return link+ ? `<a href="${link}" target="_blank" rel="noopener">${escapeHtml(w.address)}</a> <span style="color:#8a8d98">(chain ${w.chainId})</span>`+ : `${escapeHtml(w.address)} (chain ${w.chainId})`;+ }).join('<br>') || '—';+ const endpoints = (a.endpoints || []).map((e) =>+ `${escapeHtml(e.kind || 'endpoint')}: <a href="${escapeHtml(e.url)}" target="_blank" rel="noopener">${escapeHtml(e.url)}</a>`).join('<br>') || '—';++ detailEl.innerHTML = `+ <div class="detail">+ <button class="detail-close" id="closeDetail">close</button>+ <h2>${escapeHtml(a.name || `Agent #${a.agentId}`)} <span class="agent-id" style="font-size:12px;color:#8a8d98">#${escapeHtml(a.agentId)}</span></h2>+ <p style="color:#b6b6cf;margin:6px 0 0">${escapeHtml(a.description || '(no description on file)')}</p>+ <dl class="detail-grid">+ <dt>Chain</dt><dd>${chainId}</dd>+ <dt>Address</dt><dd>${explorer ? `<a href="${explorer}" target="_blank" rel="noopener">${escapeHtml(a.address)}</a>` : (a.address || '—')}</dd>+ <dt>Owner</dt><dd>${ownerExplorer ? `<a href="${ownerExplorer}" target="_blank" rel="noopener">${escapeHtml(a.owner)}</a>` : (a.owner || '—')}</dd>+ <dt>Registered</dt><dd>${escapeHtml(fmtTime(a.registeredAtSeconds))}</dd>+ <dt>Rating</dt><dd>${a.averageRating == null ? '—' : Number(a.averageRating).toFixed(2)} ★ · ${a.feedbackCount ?? 0} reviews</dd>+ <dt>Registration URI</dt><dd>${a.registrationUri ? `<a href="${escapeHtml(a.registrationUri)}" target="_blank" rel="noopener">${escapeHtml(a.registrationUri)}</a>` : '—'}</dd>+ <dt>Wallets</dt><dd>${wallets}</dd>+ <dt>Endpoints</dt><dd>${endpoints}</dd>+ </dl>+ </div>`;+ $('closeDetail').addEventListener('click', () => { detailEl.innerHTML = ''; });+ }++ function escapeHtml(s) {+ return String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));+ }++ form.addEventListener('submit', search);+ search();+ </script>+ </body>+</html>diff --git a/public/demos/gallery-picker.html b/public/demos/gallery-picker.htmlnew file mode 100644index 000000000..9ebc7da25--- /dev/null+++ b/public/demos/gallery-picker.html@@ -0,0 +1,536 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Avatar Gallery Picker · three.ws lab</title>+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <script+ type="module"+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.5.0/model-viewer.min.js"+ ></script>+ <style>+ :root { color-scheme: dark; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }+ .stage { max-width: 1280px; margin: 0 auto; padding: 48px 24px 80px; }+ .crumb a { color: #8a8d98; text-decoration: none; }+ .crumb a:hover { color: #d6ff3d; }+ h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }+ .sub { color: #8a8d98; max-width: 72ch; margin: 0 0 24px; }+ code { background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }++ .toolbar {+ display: flex; flex-wrap: wrap; gap: 10px; align-items: center;+ margin-bottom: 16px;+ }+ .search-wrap { position: relative; flex: 1 1 280px; min-width: 220px; }+ .search-wrap input {+ width: 100%; padding: 10px 36px 10px 14px; border-radius: 9px;+ background: #07080d; color: #eee; border: 1px solid #1e1f2b;+ font: inherit;+ }+ .search-wrap input:focus { outline: none; border-color: #2b2d3e; }+ .search-clear {+ position: absolute; right: 6px; top: 50%; transform: translateY(-50%);+ background: transparent; border: 0; color: #8a8d98; cursor: pointer;+ padding: 6px 8px; font-size: 16px; line-height: 1;+ }+ .search-clear:hover { color: #d6ff3d; }+ .status-line {+ color: #8a8d98; font-size: 13px; flex: 0 0 auto;+ margin-left: auto;+ }++ .tag-row {+ display: flex; flex-wrap: wrap; gap: 6px;+ margin-bottom: 20px; min-height: 28px;+ }+ .tag-chip {+ background: rgba(255,255,255,0.05); color: #cfd1dc;+ border: 1px solid #1e1f2b; border-radius: 999px;+ padding: 5px 11px; font-size: 12.5px; cursor: pointer;+ font: inherit;+ }+ .tag-chip:hover { border-color: #2b2d3e; color: #eee; }+ .tag-chip.is-active { background: #d6ff3d; color: #0a0a0a; border-color: #d6ff3d; }++ .row { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }+ @media (max-width: 980px) { .row { grid-template-columns: 1fr; } }++ .grid {+ display: grid; gap: 14px;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ }+ @media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }+ @media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }++ .card {+ background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 12px;+ overflow: hidden; cursor: pointer; display: flex; flex-direction: column;+ transition: border-color 120ms ease, transform 120ms ease;+ text-align: left;+ color: inherit; font: inherit; padding: 0;+ }+ .card:hover { border-color: #2b2d3e; }+ .card.is-selected { border-color: #d6ff3d; box-shadow: 0 0 0 1px #d6ff3d inset; }+ .thumb {+ aspect-ratio: 1 / 1; background: #14151f; position: relative;+ display: flex; align-items: center; justify-content: center;+ overflow: hidden;+ }+ .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }+ .thumb-ph {+ width: 100%; height: 100%;+ background: linear-gradient(135deg, #1a1c28 0%, #14151f 100%);+ display: flex; align-items: center; justify-content: center;+ color: #3a3d4e; font-size: 28px;+ }+ .card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }+ .card-name {+ font-size: 14px; font-weight: 600; color: #eee;+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;+ margin: 0;+ }+ .card-tags { display: flex; flex-wrap: wrap; gap: 4px; }+ .card-tag {+ font-size: 11px; color: #8a8d98;+ background: rgba(255,255,255,0.04); border-radius: 999px;+ padding: 2px 7px; border: 1px solid #1e1f2b;+ }+ .card-meta {+ display: flex; justify-content: space-between; align-items: center;+ font-size: 12px; color: #8a8d98; margin-top: 2px;+ }++ .preview {+ position: sticky; top: 20px;+ background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;+ padding: 16px; display: flex; flex-direction: column; gap: 14px;+ }+ .preview-stage {+ aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;+ background: #07080d; border: 1px solid #1e1f2b;+ display: flex; align-items: center; justify-content: center;+ }+ model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: #07080d; }+ .preview-empty { color: #4a4d5e; font-size: 13px; text-align: center; padding: 0 20px; }++ .preview h2 {+ font-size: 16px; font-weight: 600; margin: 0;+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;+ }+ .preview-sub { color: #8a8d98; font-size: 12.5px; margin: 0; }++ .mode-radio { display: flex; gap: 4px; background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px; padding: 3px; }+ .mode-radio label {+ flex: 1; text-align: center; padding: 7px 4px;+ font-size: 12px; color: #8a8d98; cursor: pointer;+ border-radius: 7px; transition: background 120ms ease, color 120ms ease;+ }+ .mode-radio input { display: none; }+ .mode-radio input:checked + span { background: #1e1f2b; color: #eee; }+ .mode-radio label span { display: block; padding: 7px 4px; border-radius: 7px; }++ button.cta {+ background: #d6ff3d; color: #0a0a0a; border: 0; border-radius: 9px;+ padding: 11px 14px; font-weight: 600; cursor: pointer; font: inherit;+ width: 100%;+ }+ button.cta:disabled { opacity: 0.4; cursor: not-allowed; }+ button.cta.copied { background: #2dd66a; color: #0a0a0a; }++ .preview-foot {+ font-family: ui-monospace, monospace; font-size: 11.5px;+ color: #8a8d98; background: #07080d; border: 1px solid #1e1f2b;+ border-radius: 8px; padding: 9px 11px; word-break: break-all;+ max-height: 110px; overflow: auto; white-space: pre-wrap;+ }++ .load-more-wrap { display: flex; justify-content: center; margin-top: 22px; }+ button.load-more {+ background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #1e1f2b;+ border-radius: 9px; padding: 10px 22px; cursor: pointer; font: inherit;+ }+ button.load-more:hover { border-color: #2b2d3e; }+ button.load-more:disabled { opacity: 0.5; cursor: not-allowed; }+ .sentinel { height: 1px; }++ .empty, .error {+ grid-column: 1 / -1;+ padding: 40px 16px; text-align: center;+ color: #8a8d98; border: 1.5px dashed #1e1f2b; border-radius: 12px;+ }+ .error { color: #ff8888; border-color: #3a1f2b; }+ </style>+ </head>+ <body>+ <header><div id="nav-container"></div></header>++ <main class="stage">+ <p class="crumb"><a href="/demos">← lab</a></p>+ <h1>Avatar Gallery Picker</h1>+ <p class="sub">+ Browse every public avatar on three.ws, preview it live, and copy the+ exact handoff your downstream surface needs — a share link, a raw GLB+ URL, or an <code><agent-3d></code> embed snippet. Powered by the+ live <code>/api/avatars/public</code> feed; this page never touches the+ production <code>/gallery</code>, <code>/create</code>, or+ <code>/avatars/:id</code> flows.+ </p>++ <div class="toolbar">+ <div class="search-wrap">+ <input type="text" id="search" placeholder="Search avatars…" autocomplete="off" />+ <button type="button" class="search-clear" id="search-clear" hidden aria-label="Clear search">×</button>+ </div>+ <span class="status-line" id="status">Loading…</span>+ </div>++ <div class="tag-row" id="tags" aria-label="Tag filters"></div>++ <div class="row">+ <div>+ <div class="grid" id="grid"></div>+ <div class="load-more-wrap"><button class="load-more" id="load-more" hidden>Load more</button></div>+ <div class="sentinel" id="sentinel"></div>+ </div>++ <aside class="preview" id="preview">+ <div class="preview-stage" id="preview-stage">+ <div class="preview-empty" id="preview-empty">Pick an avatar to preview it here.</div>+ </div>++ <div>+ <h2 id="preview-name">No avatar selected</h2>+ <p class="preview-sub" id="preview-sub">three.ws public catalog</p>+ </div>++ <div class="mode-radio" role="radiogroup" aria-label="Handoff mode">+ <label><input type="radio" name="mode" value="share" checked /><span>Share link</span></label>+ <label><input type="radio" name="mode" value="glb" /><span>GLB URL</span></label>+ <label><input type="radio" name="mode" value="embed" /><span>Embed snippet</span></label>+ </div>++ <button class="cta" id="cta" disabled>Use this avatar</button>++ <div class="preview-foot" id="preview-foot">Selected payload appears here.</div>+ </aside>+ </div>+ </main>++ <script src="/nav.js" defer></script>+ <script type="module">+ const els = {+ search: document.getElementById('search'),+ searchClear: document.getElementById('search-clear'),+ status: document.getElementById('status'),+ tags: document.getElementById('tags'),+ grid: document.getElementById('grid'),+ loadMore: document.getElementById('load-more'),+ sentinel: document.getElementById('sentinel'),+ previewStage: document.getElementById('preview-stage'),+ previewEmpty: document.getElementById('preview-empty'),+ previewName: document.getElementById('preview-name'),+ previewSub: document.getElementById('preview-sub'),+ cta: document.getElementById('cta'),+ previewFoot: document.getElementById('preview-foot'),+ modeInputs: document.querySelectorAll('input[name="mode"]'),+ };++ const state = {+ query: '',+ tag: '',+ cursor: null,+ loading: false,+ total: null,+ totalLoaded: 0,+ selected: null,+ mode: 'share',+ loadedTags: new Set(),+ cardsById: new Map(),+ firstPageDone: false,+ };++ const compact = new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 1 });+ const integer = new Intl.NumberFormat('en');++ function esc(s) {+ return String(s ?? '')+ .replace(/&/g, '&')+ .replace(/</g, '<')+ .replace(/>/g, '>')+ .replace(/"/g, '"');+ }++ function updateStatus() {+ if (state.loading && state.totalLoaded === 0) {+ els.status.textContent = 'Loading…';+ return;+ }+ if (state.total != null) {+ els.status.textContent = `Showing ${integer.format(state.totalLoaded)} of ${integer.format(state.total)} avatars`;+ } else {+ els.status.textContent = `Showing ${integer.format(state.totalLoaded)} avatars`;+ }+ }++ function renderTags() {+ const tags = [...state.loadedTags].sort((a, b) => a.localeCompare(b)).slice(0, 24);+ if (!tags.length && !state.tag) {+ els.tags.innerHTML = '';+ return;+ }+ const all = state.tag && !tags.includes(state.tag) ? [state.tag, ...tags] : tags;+ els.tags.innerHTML = all+ .map(+ (t) =>+ `<button type="button" class="tag-chip${+ t === state.tag ? ' is-active' : ''+ }" data-tag="${esc(t)}">${esc(t)}</button>`,+ )+ .join('');+ }++ els.tags.addEventListener('click', (e) => {+ const btn = e.target.closest('[data-tag]');+ if (!btn) return;+ const tag = btn.dataset.tag === state.tag ? '' : btn.dataset.tag;+ state.tag = tag;+ renderTags();+ resetAndLoad();+ });++ function renderCard(a) {+ const card = document.createElement('button');+ card.type = 'button';+ card.className = 'card';+ card.dataset.id = a.id;++ const thumb = a.thumbnail_url+ ? `<img src="${esc(a.thumbnail_url)}" alt="${esc(a.name || 'Avatar')}" loading="lazy" decoding="async" />`+ : `<div class="thumb-ph" aria-hidden="true">▢</div>`;++ const tagChips = (a.tags || [])+ .slice(0, 3)+ .map((t) => `<span class="card-tag">${esc(t)}</span>`)+ .join('');++ const views = Number(a.view_count) || 0;+ const viewsLabel = views === 0 ? '0 views' : `${compact.format(views)} views`;++ card.innerHTML = `+ <div class="thumb">${thumb}</div>+ <div class="card-body">+ <h3 class="card-name">${esc(a.name || 'Untitled')}</h3>+ ${tagChips ? `<div class="card-tags">${tagChips}</div>` : ''}+ <div class="card-meta">+ <span>${viewsLabel}</span>+ <span>${a.thumbnail_url ? '' : 'no thumb'}</span>+ </div>+ </div>+ `;++ card.addEventListener('click', () => selectAvatar(a));+ return card;+ }++ function selectAvatar(a) {+ state.selected = a;+ for (const node of els.grid.querySelectorAll('.card.is-selected')) {+ node.classList.remove('is-selected');+ }+ const node = els.grid.querySelector(`.card[data-id="${CSS.escape(a.id)}"]`);+ if (node) node.classList.add('is-selected');++ els.previewName.textContent = a.name || 'Untitled';+ const tagBits = (a.tags || []).join(' · ') || 'three.ws public catalog';+ const views = Number(a.view_count) || 0;+ els.previewSub.textContent = `${tagBits} — ${compact.format(views)} view${views === 1 ? '' : 's'}`;++ // Render model-viewer fresh so each pick gets a clean load.+ els.previewStage.innerHTML = '';+ if (a.model_url) {+ const mv = document.createElement('model-viewer');+ mv.setAttribute('src', a.model_url);+ mv.setAttribute('alt', a.name || 'three.ws avatar');+ mv.setAttribute('camera-controls', '');+ mv.setAttribute('auto-rotate', '');+ mv.setAttribute('rotation-per-second', '14deg');+ mv.setAttribute('interaction-prompt', 'none');+ mv.setAttribute('exposure', '1.05');+ mv.setAttribute('shadow-intensity', '0.9');+ mv.setAttribute('environment-image', 'neutral');+ els.previewStage.appendChild(mv);+ } else {+ const div = document.createElement('div');+ div.className = 'preview-empty';+ div.textContent = 'No GLB available for this avatar.';+ els.previewStage.appendChild(div);+ }++ els.cta.disabled = false;+ updatePayloadPreview();+ }++ function buildPayload() {+ const a = state.selected;+ if (!a) return '';+ if (state.mode === 'share') {+ return `https://three.ws/avatars/${a.id}`;+ }+ if (state.mode === 'glb') {+ return a.model_url || '';+ }+ return [+ `<script type="module" src="https://three.ws/avatar-sdk/dist/index.mjs"><\/script>`,+ `<agent-3d avatar-id="${a.id}"></agent-3d>`,+ ].join('\n');+ }++ function updatePayloadPreview() {+ if (!state.selected) {+ els.previewFoot.textContent = 'Selected payload appears here.';+ els.cta.textContent = 'Use this avatar';+ return;+ }+ const payload = buildPayload();+ els.previewFoot.textContent = payload || '(no value for this mode)';+ const labels = {+ share: 'Copy share link',+ glb: 'Copy GLB URL',+ embed: 'Copy embed snippet',+ };+ els.cta.textContent = labels[state.mode];+ }++ for (const input of els.modeInputs) {+ input.addEventListener('change', () => {+ if (!input.checked) return;+ state.mode = input.value;+ updatePayloadPreview();+ });+ }++ els.cta.addEventListener('click', async () => {+ if (!state.selected) return;+ const payload = buildPayload();+ if (!payload) return;+ try {+ await navigator.clipboard.writeText(payload);+ const prev = els.cta.textContent;+ els.cta.classList.add('copied');+ els.cta.textContent = 'Copied ✓';+ setTimeout(() => {+ els.cta.classList.remove('copied');+ els.cta.textContent = prev;+ }, 1400);+ } catch (err) {+ els.previewFoot.textContent = `Clipboard blocked: ${err.message}\n\n${payload}`;+ }+ });++ let searchDebounce;+ els.search.addEventListener('input', () => {+ els.searchClear.hidden = !els.search.value;+ clearTimeout(searchDebounce);+ searchDebounce = setTimeout(() => {+ state.query = els.search.value.trim();+ resetAndLoad();+ }, 250);+ });++ els.searchClear.addEventListener('click', () => {+ els.search.value = '';+ els.searchClear.hidden = true;+ state.query = '';+ resetAndLoad();+ els.search.focus();+ });++ els.loadMore.addEventListener('click', () => loadPage());++ let io;+ if ('IntersectionObserver' in window) {+ io = new IntersectionObserver(+ (entries) => {+ for (const entry of entries) {+ if (entry.isIntersecting && state.cursor && !state.loading) loadPage();+ }+ },+ { rootMargin: '480px 0px' },+ );+ io.observe(els.sentinel);+ }++ function resetAndLoad() {+ state.cursor = null;+ state.totalLoaded = 0;+ state.total = null;+ state.loadedTags = new Set();+ state.firstPageDone = false;+ els.grid.innerHTML = '';+ els.loadMore.hidden = true;+ loadPage();+ }++ async function loadPage() {+ if (state.loading) return;+ state.loading = true;+ updateStatus();++ const params = new URLSearchParams();+ if (state.query) params.set('q', state.query);+ if (state.tag) params.set('tag', state.tag);+ if (state.cursor) params.set('cursor', state.cursor);+ params.set('limit', '24');+ if (!state.firstPageDone) params.set('totals', '1');++ try {+ const res = await fetch(`/api/avatars/public?${params.toString()}`);+ if (!res.ok) throw new Error(`HTTP ${res.status}`);+ const data = await res.json();+ const avatars = Array.isArray(data.avatars) ? data.avatars : [];++ for (const a of avatars) {+ state.cardsById.set(a.id, a);+ els.grid.appendChild(renderCard(a));+ state.totalLoaded += 1;+ for (const t of a.tags || []) state.loadedTags.add(t);+ }++ if (!state.firstPageDone) {+ if (typeof data.total === 'number') state.total = data.total;+ state.firstPageDone = true;+ }++ state.cursor = data.next_cursor || null;+ els.loadMore.hidden = !state.cursor;++ if (els.grid.children.length === 0) {+ const empty = document.createElement('div');+ empty.className = 'empty';+ empty.textContent =+ state.query || state.tag+ ? 'No public avatars match these filters.'+ : 'No public avatars yet.';+ els.grid.appendChild(empty);+ }++ renderTags();+ } catch (err) {+ const errDiv = document.createElement('div');+ errDiv.className = 'error';+ errDiv.textContent = `Failed to load avatars: ${err.message}`;+ if (state.totalLoaded === 0) els.grid.appendChild(errDiv);+ } finally {+ state.loading = false;+ updateStatus();+ }+ }++ resetAndLoad();+ </script>+ </body>+</html>diff --git a/public/demos/index.html b/public/demos/index.htmlindex a7e846547..86950ee3e 100644--- a/public/demos/index.html+++ b/public/demos/index.html@@ -91,6 +91,26 @@<p>Feed live mic audio through the viseme analyser and watch the avatar's mouth track your voice in real time.</p><span class="demo-status live">Live</span></a>+ <a class="demo-card" href="/demos/brain.html">+ <h2>Multi-LLM brain</h2>+ <p>Send the same prompt to Claude, GPT, Qwen on Alibaba DashScope, Qwen3-Coder on ModelScope, and Llama on Groq. Side-by-side streaming, latency, and token usage.</p>+ <span class="demo-status live">Live</span>+ </a>+ <a class="demo-card" href="/demos/lipsync-tts.html">+ <h2>TTS-driven lipsync</h2>+ <p>Type any text, stream it through OpenAI TTS, and the avatar's mouth animates in real time via <code>wawa-lipsync</code> viseme detection.</p>+ <span class="demo-status live">Live</span>+ </a>+ <a class="demo-card" href="/demos/walkaround.html">+ <h2>3D walkaround</h2>+ <p>WASD + mobile joystick navigation with real <strong>Rapier</strong> physics and <strong>Recast</strong> navmesh. Click the ground to autopilot your agent there.</p>+ <span class="demo-status live">Live</span>+ </a>+ <a class="demo-card" href="/demos/erc8004.html">+ <h2>ERC-8004 registry browser</h2>+ <p>Live read of on-chain agent identities across Base, Ethereum, Polygon, and testnets via <code>agent0-sdk</code>. No keys, no signer.</p>+ <span class="demo-status live">Live</span>+ </a></div><p class="warning">diff --git a/public/demos/lipsync-tts.html b/public/demos/lipsync-tts.htmlnew file mode 100644index 000000000..d385d7cab--- /dev/null+++ b/public/demos/lipsync-tts.html@@ -0,0 +1,331 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>TTS-driven lipsync · three.ws lab</title>+ <meta name="description" content="Type text, stream it through OpenAI TTS, and watch a 3D avatar's mouth animate in real time via wawa-lipsync viseme detection. No server-side audio processing." />+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <style>+ :root { color-scheme: dark; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }+ .stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }+ .crumb a { color: #8a8d98; text-decoration: none; }+ .crumb a:hover { color: #d6ff3d; }+ h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }+ .sub { color: #8a8d98; max-width: 64ch; margin: 0 0 26px; }+ .row { display: grid; grid-template-columns: 1fr 320px; gap: 22px; }+ @media (max-width: 880px) { .row { grid-template-columns: 1fr; } }+ .viewer-host { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; min-height: 480px; position: relative; overflow: hidden; }+ .viewer-host canvas { display: block; width: 100%; height: 100%; }+ .viewer-label { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.55); padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: #d6ff3d; font-weight: 600; }+ .panel { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }+ .panel textarea { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 11px 12px; border-radius: 9px; font: inherit; min-height: 92px; resize: vertical; }+ .panel select { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 8px 10px; border-radius: 9px; font: inherit; }+ .panel label { font-size: 11px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; }+ .panel button { background: #d6ff3d; color: #0a0a0a; border: 0; border-radius: 9px; padding: 11px 14px; font-weight: 600; cursor: pointer; font: inherit; }+ .panel button.secondary { background: rgba(255,255,255,0.06); color: #eee; }+ .panel button:disabled { opacity: 0.4; cursor: not-allowed; }+ .viseme-row { display: flex; justify-content: space-between; font-size: 12px; color: #8a8d98; font-family: ui-monospace, monospace; }+ .viseme-row code { color: #d6ff3d; font-weight: 600; }+ .bar { display: inline-block; height: 6px; vertical-align: middle; border-radius: 3px; background: rgba(214,255,61,0.18); margin-left: 8px; }+ .bar > span { display: block; height: 100%; background: #d6ff3d; border-radius: 3px; transition: width 0.04s linear; }+ .log { background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px; padding: 12px; font-family: ui-monospace, monospace; font-size: 11.5px; color: #8a8d98; line-height: 1.55; min-height: 60px; max-height: 140px; overflow-y: auto; }+ .log .ok { color: #d6ff3d; }+ .log .err { color: #ff8a8a; }+ .log .info { color: #9ad4ff; }+ </style>+ </head>+ <body>+ <header><div id="nav-container"></div></header>++ <main class="stage">+ <p class="crumb"><a href="/demos/">← lab</a></p>+ <h1>TTS-driven lipsync</h1>+ <p class="sub">+ Type any text, stream it through OpenAI TTS, and the avatar's mouth animates in+ real time. Visemes are extracted in-browser via <code>wawa-lipsync</code>+ analysing the audio's frequency bands — no server-side audio processing, no+ per-word timing data, no plugins.+ </p>++ <div class="row">+ <div class="viewer-host" id="viewer-host">+ <div class="viewer-label">live · TTS → viseme → morph</div>+ </div>+ <div class="panel">+ <div>+ <label for="text">Text to speak</label>+ <textarea id="text">Welcome to three dot ws. This avatar is talking through real-time viseme detection, powered entirely in the browser.</textarea>+ </div>++ <div style="display:flex;gap:8px">+ <div style="flex:1">+ <label for="voice">Voice</label>+ <select id="voice" style="width:100%">+ <option value="nova" selected>Nova</option>+ <option value="alloy">Alloy</option>+ <option value="echo">Echo</option>+ <option value="fable">Fable</option>+ <option value="onyx">Onyx</option>+ <option value="shimmer">Shimmer</option>+ <option value="ash">Ash</option>+ <option value="coral">Coral</option>+ <option value="sage">Sage</option>+ </select>+ </div>+ <div style="flex:1">+ <label for="speed">Speed</label>+ <select id="speed" style="width:100%">+ <option value="0.8">0.8×</option>+ <option value="1.0" selected>1.0×</option>+ <option value="1.2">1.2×</option>+ <option value="1.5">1.5×</option>+ </select>+ </div>+ </div>++ <div style="display:flex;gap:8px">+ <button id="speak" style="flex:1">Speak</button>+ <button id="stop" class="secondary" disabled>Stop</button>+ </div>++ <div>+ <label>Visemes (live)</label>+ <div id="visemes" style="display:flex;flex-direction:column;gap:5px;margin-top:6px"></div>+ </div>++ <div class="log" id="log"></div>+ </div>+ </div>+ </main>++ <script src="/nav.js" defer></script>+ <script type="module">+ import * as THREE from 'three';+ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';+ import { OrbitControls } from 'three/addons/controls/OrbitControls.js';+ import { Lipsync } from 'wawa-lipsync';++ const $ = (id) => document.getElementById(id);+ const host = $('viewer-host');+ const logEl = $('log');++ function log(cls, msg) {+ const div = document.createElement('div');+ div.className = cls;+ div.textContent = msg;+ logEl.appendChild(div);+ logEl.scrollTop = logEl.scrollHeight;+ }++ const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });+ renderer.setPixelRatio(window.devicePixelRatio);+ renderer.setSize(host.clientWidth, host.clientHeight);+ renderer.outputColorSpace = THREE.SRGBColorSpace;+ host.appendChild(renderer.domElement);++ const scene = new THREE.Scene();+ const camera = new THREE.PerspectiveCamera(28, host.clientWidth / host.clientHeight, 0.01, 100);+ camera.position.set(0, 1.55, 0.85);+ const controls = new OrbitControls(camera, renderer.domElement);+ controls.target.set(0, 1.55, 0);+ controls.enableDamping = true;+ controls.minDistance = 0.4;+ controls.maxDistance = 3.0;++ scene.add(new THREE.HemisphereLight(0xffffff, 0x404060, 1.1));+ const dir = new THREE.DirectionalLight(0xffffff, 1.4);+ dir.position.set(2, 4, 3);+ scene.add(dir);++ window.addEventListener('resize', () => {+ const w = host.clientWidth, h = host.clientHeight;+ renderer.setSize(w, h);+ camera.aspect = w / h;+ camera.updateProjectionMatrix();+ });++ // wawa-lipsync produces visemes: sil, aa, PP, FF, TH, DD, kk, CH, SS, nn, RR, ou+ // Our default avatar's morph targets follow the Oculus naming:+ // viseme_aa, viseme_O, viseme_E, viseme_I, viseme_nn, viseme_SS, viseme_FF, viseme_CH, viseme_PP+ const VISEME_MAP = {+ aa: 'viseme_aa',+ PP: 'viseme_PP',+ FF: 'viseme_FF',+ TH: 'viseme_E',+ DD: 'viseme_E',+ kk: 'viseme_E',+ CH: 'viseme_CH',+ SS: 'viseme_SS',+ nn: 'viseme_nn',+ RR: 'viseme_O',+ ou: 'viseme_O',+ sil: null,+ };+ const MORPH_NAMES = [...new Set(Object.values(VISEME_MAP).filter(Boolean))];++ const morphRefs = new Map();+ const targetWeights = new Map();+ for (const m of MORPH_NAMES) targetWeights.set(m, 0);++ const visemesEl = $('visemes');+ const bars = new Map();+ for (const code of Object.keys(VISEME_MAP)) {+ if (code === 'sil') continue;+ const row = document.createElement('div');+ row.className = 'viseme-row';+ row.innerHTML = `<span>${code} → ${VISEME_MAP[code]}</span><span class="bar" style="width:120px"><span data-v="${code}" style="width:0%"></span></span>`;+ visemesEl.appendChild(row);+ bars.set(code, row.querySelector(`[data-v="${code}"]`));+ }++ let avatarReady = false;+ new GLTFLoader().load('/avatars/default.glb', (gltf) => {+ scene.add(gltf.scene);+ gltf.scene.traverse((node) => {+ if (!node.isMesh || !node.morphTargetDictionary || !node.morphTargetInfluences) return;+ for (const m of MORPH_NAMES) {+ const idx = node.morphTargetDictionary[m];+ if (idx === undefined) continue;+ if (!morphRefs.has(m)) morphRefs.set(m, []);+ morphRefs.get(m).push({ mesh: node, index: idx });+ }+ });+ avatarReady = true;+ log('ok', `Avatar loaded · ${morphRefs.size}/${MORPH_NAMES.length} viseme morphs wired`);+ }, undefined, (err) => log('err', `Avatar load failed: ${err.message}`));++ const lipsync = new Lipsync();+ let audioEl = null;+ let isPlaying = false;+ let currentURL = null;++ function tick() {+ requestAnimationFrame(tick);+ controls.update();++ if (isPlaying && audioEl) {+ lipsync.processAudio();+ const v = lipsync.viseme || 'sil';+ for (const m of MORPH_NAMES) targetWeights.set(m, 0);+ const morph = VISEME_MAP[v];+ if (morph) targetWeights.set(morph, 1.0);+ for (const code of bars.keys()) {+ bars.get(code).style.width = (code === v ? 100 : 0) + '%';+ }+ } else {+ for (const m of MORPH_NAMES) targetWeights.set(m, 0);+ for (const bar of bars.values()) bar.style.width = '0%';+ }++ if (avatarReady) {+ for (const [m, w] of targetWeights.entries()) {+ const refs = morphRefs.get(m);+ if (!refs) continue;+ for (const { mesh, index } of refs) {+ const prev = mesh.morphTargetInfluences[index];+ mesh.morphTargetInfluences[index] = prev + (w - prev) * 0.5;+ }+ }+ }++ renderer.render(scene, camera);+ }+ tick();++ const speakBtn = $('speak');+ const stopBtn = $('stop');++ async function speak() {+ const text = $('text').value.trim();+ if (!text) { log('err', 'Enter text first.'); return; }++ speakBtn.disabled = true;+ stopBtn.disabled = false;+ log('info', `Requesting TTS · voice=${$('voice').value} speed=${$('speed').value}`);++ let res;+ try {+ res = await fetch('/api/tts/speak', {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({+ text,+ voice: $('voice').value,+ speed: parseFloat($('speed').value),+ format: 'mp3',+ }),+ });+ } catch (err) {+ log('err', `TTS request failed: ${err.message}`);+ speakBtn.disabled = false;+ stopBtn.disabled = true;+ return;+ }++ if (!res.ok) {+ const txt = await res.text().catch(() => '');+ log('err', `TTS error · HTTP ${res.status} · ${txt.slice(0, 200)}`);+ speakBtn.disabled = false;+ stopBtn.disabled = true;+ return;+ }++ const blob = await res.blob();+ if (currentURL) URL.revokeObjectURL(currentURL);+ currentURL = URL.createObjectURL(blob);++ if (audioEl) {+ audioEl.pause();+ audioEl.src = '';+ }+ audioEl = new Audio();+ audioEl.crossOrigin = 'anonymous';+ audioEl.src = currentURL;++ audioEl.addEventListener('play', () => {+ isPlaying = true;+ log('ok', `Playing · ${Math.round(blob.size / 1024)} KB · audio/mpeg`);+ });+ audioEl.addEventListener('ended', () => {+ isPlaying = false;+ speakBtn.disabled = false;+ stopBtn.disabled = true;+ });+ audioEl.addEventListener('error', () => {+ isPlaying = false;+ speakBtn.disabled = false;+ stopBtn.disabled = true;+ log('err', 'Audio playback error.');+ });++ lipsync.connectAudio(audioEl);++ try {+ await audioEl.play();+ } catch (err) {+ log('err', `Playback blocked: ${err.message}`);+ speakBtn.disabled = false;+ stopBtn.disabled = true;+ }+ }++ function stop() {+ if (audioEl) {+ audioEl.pause();+ audioEl.currentTime = 0;+ }+ isPlaying = false;+ speakBtn.disabled = false;+ stopBtn.disabled = true;+ log('info', 'Stopped.');+ }++ speakBtn.addEventListener('click', speak);+ stopBtn.addEventListener('click', stop);+ </script>+ </body>+</html>diff --git a/public/demos/react-sdk.html b/public/demos/react-sdk.htmlnew file mode 100644index 000000000..f5b797786--- /dev/null+++ b/public/demos/react-sdk.html@@ -0,0 +1,268 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>@three-ws/avatar/react · three.ws lab</title>+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <style>+ :root { color-scheme: dark; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }+ .stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }+ .crumb a { color: #8a8d98; text-decoration: none; }+ .crumb a:hover { color: #d6ff3d; }+ h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }+ .sub { color: #8a8d98; max-width: 64ch; margin: 0 0 30px; }+ pre {+ background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;+ padding: 14px 16px; font-family: ui-monospace, monospace; font-size: 12.5px;+ color: #d6ff3d; overflow-x: auto;+ }+ .card {+ background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;+ padding: 22px; margin: 16px 0;+ }+ .viewer-host {+ min-height: 460px;+ background: #0a0b12; border-radius: 10px; overflow: hidden;+ margin-top: 14px; height: 460px;+ }+ .viewer-host three-ws-viewer,+ .viewer-host agent-3d { width: 100%; height: 460px; display: block; }+ button {+ background: #d6ff3d; color: #0a0a0a; border: 0; border-radius: 9px;+ padding: 10px 14px; font-weight: 600; cursor: pointer; font: inherit;+ }+ button.secondary { background: #1e1f2b; color: #eee; }+ .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }+ .log {+ margin-top: 14px;+ background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;+ padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;+ color: #8a8d98; max-height: 200px; overflow: auto; white-space: pre-wrap;+ }+ .log .ok { color: #d6ff3d; }+ .log .err { color: #ff6b6b; }+ .log .info { color: #66d9ef; }+ input[type="text"] {+ background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;+ color: #eee; padding: 9px 12px; font: inherit; min-width: 280px;+ }+ </style>+ <!-- Import map lets the React subpath module resolve `react` to a CDN copy+ without needing a bundler. Skypack ships proper ESM builds. -->+ <script type="importmap">+ {+ "imports": {+ "react": "https://esm.sh/[email protected]?dev",+ "react/jsx-runtime": "https://esm.sh/[email protected]/jsx-runtime?dev",+ "react-dom": "https://esm.sh/[email protected]?dev&[email protected]",+ "react-dom/client": "https://esm.sh/[email protected]/client?dev&[email protected]",+ "three": "https://esm.sh/[email protected]",+ "three/addons/": "https://esm.sh/[email protected]/examples/jsm/"+ }+ }+ </script>+ </head>+ <body>+ <header><div id="nav-container"></div></header>++ <main class="stage">+ <p class="crumb"><a href="/demos">← lab</a></p>+ <h1>@three-ws/avatar/react</h1>+ <p class="sub">+ The React wrapper around the SDK. Imports <code>Avatar</code>,+ <code>AgentAvatar</code>, <code>AvatarCreator</code>, and+ <code>useAvatar</code> directly from+ <code>/avatar-sdk/src/react.jsx</code>. React is loaded from a CDN+ via an import map so this page works without a bundler step.+ </p>++ <section class="card">+ <h2 style="margin-top:0;font-size:18px">1. <Avatar> — light viewer</h2>+ <pre>import { Avatar } from '@three-ws/avatar/react';++<Avatar src="/avatars/default.glb" alt="Default three.ws avatar" /></pre>+ <div id="mount-avatar" class="viewer-host"></div>+ <div class="log" id="avatar-log">mounting React tree…</div>+ </section>++ <section class="card">+ <h2 style="margin-top:0;font-size:18px">2. <AgentAvatar> — full runtime</h2>+ <pre>import { AgentAvatar } from '@three-ws/avatar/react';++<AgentAvatar src="/avatars/default.glb" /></pre>+ <div id="mount-agent" class="viewer-host"></div>+ <div class="log" id="agent-log">waiting for SDK monolith…</div>+ </section>++ <section class="card">+ <h2 style="margin-top:0;font-size:18px">3. <AvatarCreator> — declarative modal</h2>+ <pre>import { AvatarCreator } from '@three-ws/avatar/react';++<AvatarCreator open={open} onExport={blob => ...} onClose={() => setOpen(false)} /></pre>+ <div id="mount-creator"></div>+ <div class="log" id="creator-log">click the button to open the three.ws Avatar Creator.</div>+ </section>++ <section class="card">+ <h2 style="margin-top:0;font-size:18px">4. useAvatar(id) — hook</h2>+ <pre>import { useAvatar } from '@three-ws/avatar/react';++const { avatar, loading, error } = useAvatar(id);</pre>+ <div id="mount-hook"></div>+ <div class="log" id="hook-log">enter a three.ws avatar id to fetch its record.</div>+ </section>+ </main>++ <script src="/nav.js" defer></script>++ <script type="module">+ import { createRoot } from 'react-dom/client';+ import { createElement as h, useState, useCallback } from 'react';+ import {+ Avatar,+ AgentAvatar,+ AvatarCreator,+ useAvatar,+ } from '/avatar-sdk/src/react.jsx';++ const $ = (id) => document.getElementById(id);+ const stamp = () => new Date().toTimeString().slice(0, 8);+ const line = (el, msg, cls = '') => {+ el.innerHTML += `\n<span class="${cls}">[${stamp()}] ${msg}</span>`;+ };++ // 1. <Avatar>+ (() => {+ const root = createRoot($('mount-avatar'));+ const log = $('avatar-log');+ root.render(+ h(Avatar, {+ src: '/avatars/default.glb',+ alt: 'Default three.ws avatar',+ background: 'transparent',+ style: { width: '100%', height: '460px', display: 'block' },+ onLoad: ({ url }) => line(log, `✓ <Avatar> loaded ${url}`, 'ok'),+ onError: ({ url, error }) => line(log, `✗ <Avatar> failed ${url}: ${error?.message || error}`, 'err'),+ }),+ );+ line(log, '✓ React tree mounted', 'ok');+ })();++ // 2. <AgentAvatar>+ (() => {+ const root = createRoot($('mount-agent'));+ const log = $('agent-log');+ root.render(+ h(AgentAvatar, {+ src: '/avatars/default.glb',+ style: { width: '100%', height: '460px', display: 'block' },+ }),+ );+ // Watch for the monolith to register the element.+ const start = performance.now();+ const tick = () => {+ if (customElements.get('agent-3d')) {+ line(log, `✓ <agent-3d> registered in ${Math.round(performance.now() - start)} ms`, 'ok');+ } else if (performance.now() - start < 15000) {+ setTimeout(tick, 200);+ } else {+ line(log, '✗ <agent-3d> did not register within 15s', 'err');+ }+ };+ tick();+ })();++ // 3. <AvatarCreator>+ (() => {+ const root = createRoot($('mount-creator'));+ const log = $('creator-log');+ function CreatorDemo() {+ const [open, setOpen] = useState(false);+ const handleExport = useCallback((blob) => {+ line(log, `✓ export received (${blob.size} bytes, ${blob.type})`, 'ok');+ setOpen(false);+ }, []);+ const handleClose = useCallback(() => {+ line(log, 'modal closed without export', 'info');+ setOpen(false);+ }, []);+ return h('div', { className: 'row' }, [+ h('button', {+ key: 'open',+ onClick: () => {+ line(log, 'opening three.ws Avatar Creator…', 'info');+ setOpen(true);+ },+ }, 'Open three.ws Avatar Creator'),+ h(AvatarCreator, {+ key: 'creator',+ open,+ onExport: handleExport,+ onClose: handleClose,+ }),+ ]);+ }+ root.render(h(CreatorDemo));+ })();++ // 4. useAvatar+ (() => {+ const root = createRoot($('mount-hook'));+ const log = $('hook-log');+ function HookDemo() {+ const [draft, setDraft] = useState('');+ const [id, setId] = useState(null);+ const { avatar, loading, error } = useAvatar(id);++ if (loading) {+ return h('div', null, [+ renderForm(draft, setDraft, setId, log),+ h('p', { key: 'p', style: { color: '#66d9ef' } }, `loading /api/avatars/${id}…`),+ ]);+ }+ if (error) {+ return h('div', null, [+ renderForm(draft, setDraft, setId, log),+ h('p', { key: 'p', style: { color: '#ff6b6b' } }, `error: ${error.message}`),+ ]);+ }+ return h('div', null, [+ renderForm(draft, setDraft, setId, log),+ avatar+ ? h('pre', { key: 'pre', style: { color: '#d6ff3d', maxHeight: '240px', overflow: 'auto' } },+ JSON.stringify(avatar, null, 2))+ : null,+ ]);+ }+ function renderForm(draft, setDraft, setId, log) {+ return h('form', {+ key: 'form',+ className: 'row',+ style: { marginBottom: 12 },+ onSubmit: (e) => {+ e.preventDefault();+ const v = draft.trim();+ if (!v) return;+ setId(v);+ line(log, `fetching /api/avatars/${v}…`, 'info');+ },+ }, [+ h('input', {+ key: 'in',+ type: 'text',+ placeholder: 'avatar UUID or slug',+ value: draft,+ onChange: (e) => setDraft(e.target.value),+ }),+ h('button', { key: 'go', type: 'submit' }, 'Fetch'),+ ]);+ }+ root.render(h(HookDemo));+ })();+ </script>+ </body>+</html>diff --git a/public/demos/selfie-fit.html b/public/demos/selfie-fit.htmlnew file mode 100644index 000000000..efe0b863d--- /dev/null+++ b/public/demos/selfie-fit.html@@ -0,0 +1,880 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Selfie Fit · three.ws lab</title>+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <style>+ :root { color-scheme: dark; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }+ .stage { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }+ .crumb a { color: #8a8d98; text-decoration: none; }+ .crumb a:hover { color: #d6ff3d; }+ h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }+ h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.005em; }+ .sub { color: #8a8d98; max-width: 64ch; margin: 0 0 30px; }+ .grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }+ @media (max-width: 880px) { .grid { grid-template-columns: 1fr; } }+ .panel {+ background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;+ padding: 22px; display: flex; flex-direction: column; gap: 14px;+ }+ .slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }+ @media (max-width: 600px) { .slots { grid-template-columns: 1fr; } }+ .slot {+ background: #07080d; border: 1.5px dashed #1e1f2b; border-radius: 12px;+ aspect-ratio: 3 / 4; position: relative; overflow: hidden; cursor: pointer;+ display: flex; align-items: center; justify-content: center;+ transition: border-color 0.15s, transform 0.15s;+ }+ .slot:hover { border-color: #2c2d3d; }+ .slot.active { border-color: #d6ff3d; border-style: solid; }+ .slot.filled { border-style: solid; border-color: #2c2d3d; cursor: default; }+ .slot .placeholder {+ color: #6a6d7c; font-size: 12px; text-align: center; padding: 12px;+ display: flex; flex-direction: column; align-items: center; gap: 6px;+ }+ .slot .placeholder .label {+ color: #eee; font-size: 13px; font-weight: 600; text-transform: uppercase;+ letter-spacing: 0.08em;+ }+ .slot video, .slot canvas.overlay, .slot img.preview {+ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;+ }+ .slot video { transform: scaleX(-1); background: #000; }+ .slot canvas.overlay { transform: scaleX(-1); pointer-events: none; }+ .slot .badge {+ position: absolute; top: 8px; left: 8px; right: 8px;+ display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none;+ }+ .chip {+ font-size: 10.5px; font-weight: 600; padding: 3px 7px; border-radius: 6px;+ background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1);+ color: #8a8d98; letter-spacing: 0.04em; text-transform: uppercase;+ }+ .chip.ok { color: #d6ff3d; border-color: rgba(214,255,61,0.35); background: rgba(214,255,61,0.12); }+ .chip.bad { color: #ff6b6b; border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.12); }+ .slot .footer {+ position: absolute; bottom: 0; left: 0; right: 0;+ background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));+ padding: 14px 10px 10px; display: flex; gap: 6px; justify-content: center;+ }+ .slot-btn {+ background: rgba(255,255,255,0.08); color: #eee; border: 0;+ padding: 6px 10px; font-size: 11px; font-weight: 600; border-radius: 6px;+ cursor: pointer; letter-spacing: 0.04em; text-transform: uppercase;+ }+ .slot-btn.primary { background: #d6ff3d; color: #0a0a0a; }+ .slot-btn:disabled { opacity: 0.4; cursor: not-allowed; }+ .slot .upload-input { display: none; }++ .opts { display: flex; flex-direction: column; gap: 14px; }+ .opt-row { display: flex; flex-direction: column; gap: 8px; }+ .opt-row .label {+ font-size: 12px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em;+ }+ .radios { display: flex; gap: 8px; flex-wrap: wrap; }+ .radio {+ display: flex; align-items: center; gap: 6px; cursor: pointer;+ background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;+ padding: 8px 12px; font-size: 13px;+ }+ .radio input { accent-color: #d6ff3d; }+ .radio:hover { border-color: #2c2d3d; }+ .radio.selected { border-color: #d6ff3d; color: #d6ff3d; }++ button.submit {+ background: #d6ff3d; color: #0a0a0a; border: 0; border-radius: 9px;+ padding: 12px 16px; font-weight: 600; cursor: pointer; font: inherit;+ font-size: 15px;+ }+ button.submit:disabled { opacity: 0.35; cursor: not-allowed; }++ .log {+ background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;+ padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;+ line-height: 1.6; color: #8a8d98; max-height: 320px; overflow: auto; white-space: pre-wrap;+ }+ .log .ok { color: #d6ff3d; }+ .log .err { color: #ff6b6b; }+ .log .info { color: #66d9ef; }+ .log .warn { color: #ffb84d; }++ .result-card {+ background: linear-gradient(180deg, rgba(214,255,61,0.06), rgba(214,255,61,0.02));+ border: 1.5px solid rgba(214,255,61,0.3); border-radius: 14px;+ padding: 20px; display: none;+ }+ .result-card.show { display: block; }+ .result-card .url {+ font-family: ui-monospace, monospace; font-size: 12px; color: #8a8d98;+ background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;+ padding: 10px 12px; margin: 10px 0; overflow-x: auto; white-space: nowrap;+ }++ .iframe-modal {+ position: fixed; inset: 0; background: rgba(0,0,0,0.85);+ display: none; align-items: center; justify-content: center; z-index: 9999;+ padding: 24px;+ }+ .iframe-modal.open { display: flex; }+ .iframe-modal .frame-shell {+ position: relative; width: 100%; max-width: 980px; height: 100%; max-height: 720px;+ background: #0a0b12; border-radius: 14px; overflow: hidden;+ border: 1.5px solid #1e1f2b;+ }+ .iframe-modal iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }+ .iframe-modal .close {+ position: absolute; top: 12px; right: 12px; z-index: 2;+ background: rgba(0,0,0,0.6); color: #eee; border: 1px solid rgba(255,255,255,0.15);+ border-radius: 8px; padding: 6px 12px; font-weight: 600; cursor: pointer;+ }+ </style>+ </head>+ <body>+ <header><div id="nav-container"></div></header>++ <main class="stage">+ <p class="crumb"><a href="/demos">← lab</a></p>+ <h1>Selfie Fit</h1>+ <p class="sub">+ Three-photo capture with live face-landmark quality gates. Each slot+ runs a 468-point wireframe overlay and head-pose estimator on the+ webcam feed (or a single uploaded image) and only unlocks when the+ yaw lands in the expected range. Submit posts the three JPEGs to+ <code>/api/onboarding/avaturn-session</code> and opens the returned+ three.ws Selfie editor session in an iframe. Sandbox only —+ does not touch the live <code>/create</code> or+ <code>/avatars/:id</code> flows.+ </p>++ <div class="grid">+ <section class="panel">+ <h2>1. Capture three photos</h2>+ <div class="slots">+ <div class="slot" data-slot="frontal">+ <div class="placeholder">+ <div class="label">Frontal</div>+ <div>Face the camera straight on</div>+ <div>Yaw target: < 15°</div>+ </div>+ <div class="badge"></div>+ <div class="footer" hidden>+ <button class="slot-btn" data-slot-action="camera">Camera</button>+ <button class="slot-btn" data-slot-action="upload">Upload</button>+ </div>+ <input class="upload-input" type="file" accept="image/jpeg,image/png" />+ </div>+ <div class="slot" data-slot="left">+ <div class="placeholder">+ <div class="label">Left ~45°</div>+ <div>Turn your head left</div>+ <div>Yaw target: 30–60°</div>+ </div>+ <div class="badge"></div>+ <div class="footer" hidden>+ <button class="slot-btn" data-slot-action="camera">Camera</button>+ <button class="slot-btn" data-slot-action="upload">Upload</button>+ </div>+ <input class="upload-input" type="file" accept="image/jpeg,image/png" />+ </div>+ <div class="slot" data-slot="right">+ <div class="placeholder">+ <div class="label">Right ~45°</div>+ <div>Turn your head right</div>+ <div>Yaw target: -60 to -30°</div>+ </div>+ <div class="badge"></div>+ <div class="footer" hidden>+ <button class="slot-btn" data-slot-action="camera">Camera</button>+ <button class="slot-btn" data-slot-action="upload">Upload</button>+ </div>+ <input class="upload-input" type="file" accept="image/jpeg,image/png" />+ </div>+ </div>+ <p style="color:#6a6d7c;font-size:12px;margin:0">+ Click a slot to start. Choose <strong>Camera</strong> for a live+ feed with real-time face-landmark gates, or <strong>Upload</strong>+ to validate an existing JPEG/PNG.+ </p>+ </section>++ <section class="panel opts">+ <h2>2. Options</h2>+ <div class="opt-row">+ <div class="label">Body type</div>+ <div class="radios" id="body-radios">+ <label class="radio selected"><input type="radio" name="body" value="male" checked /> Masculine</label>+ <label class="radio"><input type="radio" name="body" value="female" /> Feminine</label>+ <label class="radio"><input type="radio" name="body" value="male" /> Neutral</label>+ </div>+ </div>+ <div class="opt-row">+ <div class="label">Style</div>+ <div class="radios" id="style-radios">+ <label class="radio selected"><input type="radio" name="style" value="v1" checked /> v1</label>+ <label class="radio"><input type="radio" name="style" value="v2" /> v2</label>+ </div>+ </div>+ <button class="submit" id="submit-btn" disabled>Upload 0/3</button>+ <div class="result-card" id="result-card">+ <h2 style="margin:0 0 6px;color:#d6ff3d">three.ws Selfie session ready</h2>+ <div style="color:#8a8d98;font-size:13px">Open the editor to refine and export your avatar.</div>+ <div class="url" id="result-url"></div>+ <button class="submit" id="open-session-btn">Open three.ws Selfie editor</button>+ </div>+ <div class="opt-row">+ <div class="label">Log</div>+ <div class="log" id="log">booting...</div>+ </div>+ </section>+ </div>+ </main>++ <div class="iframe-modal" id="iframe-modal">+ <div class="frame-shell">+ <button class="close" id="modal-close">Close</button>+ <iframe id="session-iframe" allow="camera; microphone; clipboard-write" referrerpolicy="no-referrer"></iframe>+ </div>+ </div>++ <script src="/nav.js" defer></script>++ <script type="module">+ // Load the FaceLandmarker WASM Tasks bundle via CDN so the demo works in+ // dev (vite serves /node_modules but the WASM file resolution from+ // imported bundles is finicky; CDN is the simplest reliable path).+ import {+ FilesetResolver,+ FaceLandmarker,+ DrawingUtils,+ } from 'https://cdn.skypack.dev/@mediapipe/[email protected]';++ const $ = (sel, root = document) => root.querySelector(sel);+ const $$ = (sel, root = document) => Array.from(root.querySelectorAll(sel));++ // ── Log helper ──────────────────────────────────────────────────────+ const logEl = $('#log');+ logEl.textContent = '';+ const log = (msg, cls = '') => {+ const t = new Date().toTimeString().slice(0, 8);+ const span = document.createElement('span');+ if (cls) span.className = cls;+ span.textContent = `[${t}] ${msg}`;+ logEl.appendChild(span);+ logEl.appendChild(document.createTextNode('\n'));+ logEl.scrollTop = logEl.scrollHeight;+ };++ // ── Slot configuration ──────────────────────────────────────────────+ // Yaw sign convention here: looking left (camera's right) → positive yaw.+ // We computed yaw from un-mirrored landmarks (video is CSS-mirrored only+ // for display), so a real left-head-turn produces positive yaw.+ const SLOTS = {+ frontal: { label: 'frontal', min: -15, max: 15 },+ left: { label: 'left', min: 30, max: 60 },+ right: { label: 'right', min: -60, max: -30 },+ };++ const state = {+ images: { frontal: null, left: null, right: null }, // { blob, width, height }+ passes: { frontal: false, left: false, right: false },+ bodyType: 'male',+ style: 'v1',+ activeSlot: null,+ stream: null,+ rafId: 0,+ videoEl: null,+ overlayEl: null,+ landmarker: null,+ lastVideoTime: -1,+ lastDetect: null, // { yaw, pitch, roll, faceFound, centered }+ };++ // ── FaceLandmarker init ─────────────────────────────────────────────+ log('loading face-landmark model...', 'info');+ let landmarkerReady = (async () => {+ const fileset = await FilesetResolver.forVisionTasks(+ 'https://cdn.skypack.dev/@mediapipe/[email protected]/wasm',+ );+ const lm = await FaceLandmarker.createFromOptions(fileset, {+ baseOptions: {+ modelAssetPath:+ 'https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task',+ delegate: 'GPU',+ },+ runningMode: 'VIDEO',+ numFaces: 1,+ outputFaceBlendshapes: false,+ outputFacialTransformationMatrixes: false,+ });+ state.landmarker = lm;+ log('face-landmark model ready', 'ok');+ return lm;+ })().catch((err) => {+ log('model load failed: ' + err.message, 'err');+ throw err;+ });++ // ── Slot wiring ─────────────────────────────────────────────────────+ $$('.slot').forEach((slotEl) => {+ const slot = slotEl.getAttribute('data-slot');+ const placeholder = $('.placeholder', slotEl);+ const footer = $('.footer', slotEl);+ const input = $('.upload-input', slotEl);++ slotEl.addEventListener('click', (e) => {+ if (slotEl.classList.contains('filled')) return;+ if (e.target.closest('[data-slot-action]')) return;+ // First click reveals the camera/upload chooser+ if (footer.hasAttribute('hidden')) {+ footer.removeAttribute('hidden');+ placeholder.style.opacity = '0.35';+ }+ });++ $$('[data-slot-action]', slotEl).forEach((btn) => {+ btn.addEventListener('click', async (e) => {+ e.stopPropagation();+ const action = btn.getAttribute('data-slot-action');+ if (action === 'camera') {+ await startCamera(slot);+ } else if (action === 'upload') {+ input.click();+ }+ });+ });++ input.addEventListener('change', async () => {+ const file = input.files?.[0];+ if (!file) return;+ await acceptUpload(slot, file);+ input.value = '';+ });+ });++ // ── Camera capture ──────────────────────────────────────────────────+ async function startCamera(slot) {+ if (state.activeSlot && state.activeSlot !== slot) {+ stopCamera();+ }+ state.activeSlot = slot;+ const slotEl = $(`.slot[data-slot="${slot}"]`);+ slotEl.classList.add('active');+ const placeholder = $('.placeholder', slotEl);+ placeholder.style.display = 'none';++ // Build / reuse video + overlay+ let video = $('video', slotEl);+ if (!video) {+ video = document.createElement('video');+ video.autoplay = true;+ video.playsInline = true;+ video.muted = true;+ slotEl.appendChild(video);+ }+ let overlay = $('canvas.overlay', slotEl);+ if (!overlay) {+ overlay = document.createElement('canvas');+ overlay.className = 'overlay';+ slotEl.appendChild(overlay);+ }+ const badge = $('.badge', slotEl);+ const footer = $('.footer', slotEl);+ footer.innerHTML = '';+ const shootBtn = document.createElement('button');+ shootBtn.className = 'slot-btn primary';+ shootBtn.textContent = 'Capture';+ shootBtn.disabled = true;+ shootBtn.addEventListener('click', (e) => {+ e.stopPropagation();+ captureFromCamera(slot);+ });+ const cancelBtn = document.createElement('button');+ cancelBtn.className = 'slot-btn';+ cancelBtn.textContent = 'Cancel';+ cancelBtn.addEventListener('click', (e) => {+ e.stopPropagation();+ cancelCamera(slot);+ });+ footer.appendChild(shootBtn);+ footer.appendChild(cancelBtn);++ state.videoEl = video;+ state.overlayEl = overlay;+ state.shootBtn = shootBtn;+ state.badgeEl = badge;++ try {+ log(`requesting camera for ${slot}...`, 'info');+ state.stream = await navigator.mediaDevices.getUserMedia({+ video: { facingMode: 'user', width: { ideal: 1280 }, height: { ideal: 960 } },+ audio: false,+ });+ video.srcObject = state.stream;+ await new Promise((res) => video.addEventListener('loadedmetadata', res, { once: true }));+ await video.play();+ log(`camera stream ${video.videoWidth}x${video.videoHeight}`, 'info');+ await landmarkerReady;+ tick();+ } catch (err) {+ log('camera error: ' + err.message, 'err');+ cancelCamera(slot);+ }+ }++ function cancelCamera(slot) {+ stopCamera();+ const slotEl = $(`.slot[data-slot="${slot}"]`);+ slotEl.classList.remove('active');+ $('.placeholder', slotEl).style.display = '';+ $('.placeholder', slotEl).style.opacity = '';+ $('video', slotEl)?.remove();+ $('canvas.overlay', slotEl)?.remove();+ const footer = $('.footer', slotEl);+ footer.setAttribute('hidden', '');+ footer.innerHTML = `+ <button class="slot-btn" data-slot-action="camera">Camera</button>+ <button class="slot-btn" data-slot-action="upload">Upload</button>+ `;+ // Re-wire the rebuilt buttons+ $$('[data-slot-action]', footer).forEach((btn) => {+ btn.addEventListener('click', async (e) => {+ e.stopPropagation();+ const action = btn.getAttribute('data-slot-action');+ if (action === 'camera') await startCamera(slot);+ else if (action === 'upload') $('.upload-input', slotEl).click();+ });+ });+ $('.badge', slotEl).innerHTML = '';+ state.activeSlot = null;+ }++ function stopCamera() {+ cancelAnimationFrame(state.rafId);+ state.rafId = 0;+ if (state.stream) {+ state.stream.getTracks().forEach((t) => t.stop());+ state.stream = null;+ }+ if (state.videoEl) {+ state.videoEl.srcObject = null;+ }+ state.videoEl = null;+ state.overlayEl = null;+ state.shootBtn = null;+ state.badgeEl = null;+ state.lastVideoTime = -1;+ }++ // ── Detection loop ──────────────────────────────────────────────────+ function tick() {+ const video = state.videoEl;+ const overlay = state.overlayEl;+ const slot = state.activeSlot;+ if (!video || !overlay || !slot || !state.landmarker) return;++ const w = video.videoWidth;+ const h = video.videoHeight;+ if (w && h && (overlay.width !== w || overlay.height !== h)) {+ overlay.width = w;+ overlay.height = h;+ }++ let result = null;+ if (video.currentTime !== state.lastVideoTime && w && h) {+ state.lastVideoTime = video.currentTime;+ try {+ result = state.landmarker.detectForVideo(video, performance.now());+ } catch (err) {+ // transient — model may not be warm; skip frame+ }+ }++ const ctx = overlay.getContext('2d');+ ctx.clearRect(0, 0, overlay.width, overlay.height);++ const slotCfg = SLOTS[slot];+ let pass = false;+ let yawDeg = null, pitchDeg = null, rollDeg = null;+ let faceFound = false;+ let centered = false;++ if (result && result.faceLandmarks && result.faceLandmarks[0]) {+ faceFound = true;+ const lms = result.faceLandmarks[0];++ // Draw wireframe (tesselation gives a sense of all 468 landmarks)+ const utils = new DrawingUtils(ctx);+ utils.drawConnectors(lms, FaceLandmarker.FACE_LANDMARKS_TESSELATION, {+ color: 'rgba(214,255,61,0.35)', lineWidth: 0.5,+ });+ utils.drawConnectors(lms, FaceLandmarker.FACE_LANDMARKS_FACE_OVAL, {+ color: '#d6ff3d', lineWidth: 1.5,+ });+ utils.drawConnectors(lms, FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE, {+ color: '#66d9ef', lineWidth: 1.2,+ });+ utils.drawConnectors(lms, FaceLandmarker.FACE_LANDMARKS_LEFT_EYE, {+ color: '#66d9ef', lineWidth: 1.2,+ });++ const pose = estimateHeadPose(lms);+ yawDeg = pose.yaw;+ pitchDeg = pose.pitch;+ rollDeg = pose.roll;++ // Centering: nose-tip landmark 1 should be near horizontal/vertical mid+ const nose = lms[1] || lms[4];+ centered = nose && Math.abs(nose.x - 0.5) < 0.22 && Math.abs(nose.y - 0.5) < 0.28;++ const yawOk = yawDeg >= slotCfg.min && yawDeg <= slotCfg.max;+ pass = yawOk && centered;+ }++ // Throttled log: only when state changes+ const stateKey = JSON.stringify({ faceFound, pass, yaw: yawDeg != null ? Math.round(yawDeg) : null });+ if (stateKey !== state._lastLogKey) {+ state._lastLogKey = stateKey;+ if (!faceFound) {+ log(`${slot}: no face detected`, 'warn');+ } else {+ log(+ `${slot}: face found, yaw=${yawDeg.toFixed(1)}°, pitch=${pitchDeg.toFixed(1)}°, roll=${rollDeg.toFixed(1)}° ${pass ? '✓' : '(target ' + slotCfg.min + '..' + slotCfg.max + '°)'}`,+ pass ? 'ok' : 'info',+ );+ }+ }++ // Badge UI+ state.badgeEl.innerHTML = '';+ const chips = [];+ chips.push(makeChip(faceFound ? 'face' : 'no face', faceFound ? 'ok' : 'bad'));+ if (faceFound) {+ chips.push(makeChip(`yaw ${yawDeg.toFixed(0)}°`, (yawDeg >= slotCfg.min && yawDeg <= slotCfg.max) ? 'ok' : 'bad'));+ chips.push(makeChip(centered ? 'centered' : 'recenter', centered ? 'ok' : 'bad'));+ }+ chips.forEach((c) => state.badgeEl.appendChild(c));++ if (state.shootBtn) state.shootBtn.disabled = !pass;++ state.rafId = requestAnimationFrame(tick);+ }++ function makeChip(text, kind) {+ const el = document.createElement('span');+ el.className = 'chip ' + kind;+ el.textContent = text;+ return el;+ }++ async function captureFromCamera(slot) {+ const video = state.videoEl;+ if (!video) return;+ const w = video.videoWidth;+ const h = video.videoHeight;+ const c = document.createElement('canvas');+ c.width = w; c.height = h;+ const ctx = c.getContext('2d');+ ctx.drawImage(video, 0, 0, w, h); // un-mirrored+ const blob = await new Promise((res) => c.toBlob(res, 'image/jpeg', 0.92));+ if (!blob) {+ log('capture failed: toBlob returned null', 'err');+ return;+ }+ log(`captured ${slot} frame (${blob.size} bytes, ${w}x${h})`, 'ok');+ stopCamera();+ await acceptBlob(slot, blob, w, h, true);+ }++ // ── Upload path ─────────────────────────────────────────────────────+ async function acceptUpload(slot, file) {+ log(`validating uploaded ${slot} (${file.name}, ${file.size} bytes)...`, 'info');+ const url = URL.createObjectURL(file);+ const img = await new Promise((res, rej) => {+ const i = new Image();+ i.onload = () => res(i);+ i.onerror = () => rej(new Error('decode failed'));+ i.src = url;+ });+ URL.revokeObjectURL(url);++ await landmarkerReady;+ // Switch the landmarker to IMAGE mode for one-shot detect, then back.+ const imgLandmarker = await FaceLandmarker.createFromOptions(+ await FilesetResolver.forVisionTasks(+ 'https://cdn.skypack.dev/@mediapipe/[email protected]/wasm',+ ),+ {+ baseOptions: {+ modelAssetPath:+ 'https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task',+ delegate: 'GPU',+ },+ runningMode: 'IMAGE',+ numFaces: 1,+ outputFaceBlendshapes: false,+ },+ );+ const result = imgLandmarker.detect(img);+ imgLandmarker.close();++ const slotCfg = SLOTS[slot];+ if (!result.faceLandmarks || !result.faceLandmarks[0]) {+ log(`${slot}: upload rejected — no face detected`, 'err');+ return;+ }+ const lms = result.faceLandmarks[0];+ const pose = estimateHeadPose(lms);+ const nose = lms[1] || lms[4];+ const centered = nose && Math.abs(nose.x - 0.5) < 0.30 && Math.abs(nose.y - 0.5) < 0.35;+ const yawOk = pose.yaw >= slotCfg.min && pose.yaw <= slotCfg.max;+ log(+ `${slot} upload: yaw=${pose.yaw.toFixed(1)}°, pitch=${pose.pitch.toFixed(1)}°, roll=${pose.roll.toFixed(1)}°, centered=${centered}`,+ 'info',+ );+ if (!yawOk || !centered) {+ log(+ `${slot}: upload rejected — yaw must be ${slotCfg.min}..${slotCfg.max}° and face must be centered`,+ 'err',+ );+ return;+ }+ // Re-encode through a canvas to get a JPEG blob with known dims.+ const c = document.createElement('canvas');+ c.width = img.naturalWidth;+ c.height = img.naturalHeight;+ const ctx = c.getContext('2d');+ ctx.drawImage(img, 0, 0);+ const blob = await new Promise((res) => c.toBlob(res, 'image/jpeg', 0.92));+ await acceptBlob(slot, blob, c.width, c.height, true, lms);+ }++ async function acceptBlob(slot, blob, w, h, drawOverlay, landmarks) {+ state.images[slot] = { blob, width: w, height: h };+ state.passes[slot] = true;+ const slotEl = $(`.slot[data-slot="${slot}"]`);+ slotEl.classList.remove('active');+ slotEl.classList.add('filled');+ $('.placeholder', slotEl)?.remove();+ $('video', slotEl)?.remove();+ $('canvas.overlay', slotEl)?.remove();++ // Show preview+ const previewUrl = URL.createObjectURL(blob);+ const previewImg = document.createElement('img');+ previewImg.className = 'preview';+ previewImg.style.transform = 'scaleX(-1)'; // match camera mirror feel+ previewImg.src = previewUrl;+ previewImg.onload = () => URL.revokeObjectURL(previewUrl);+ slotEl.appendChild(previewImg);++ $('.badge', slotEl).innerHTML = '';+ const ok = makeChip('captured', 'ok');+ $('.badge', slotEl).appendChild(ok);++ const footer = $('.footer', slotEl);+ footer.removeAttribute('hidden');+ footer.innerHTML = '';+ const retake = document.createElement('button');+ retake.className = 'slot-btn';+ retake.textContent = 'Retake';+ retake.addEventListener('click', (e) => {+ e.stopPropagation();+ resetSlot(slot);+ });+ footer.appendChild(retake);++ log(`${slot}: photo accepted`, 'ok');+ updateSubmit();+ }++ function resetSlot(slot) {+ state.images[slot] = null;+ state.passes[slot] = false;+ const slotEl = $(`.slot[data-slot="${slot}"]`);+ slotEl.classList.remove('filled', 'active');+ $('.preview', slotEl)?.remove();+ $('.badge', slotEl).innerHTML = '';+ let placeholder = $('.placeholder', slotEl);+ if (!placeholder) {+ placeholder = document.createElement('div');+ placeholder.className = 'placeholder';+ const cfg = SLOTS[slot];+ const labelText = slot === 'frontal' ? 'Frontal' : slot === 'left' ? 'Left ~45°' : 'Right ~45°';+ placeholder.innerHTML = `+ <div class="label">${labelText}</div>+ <div>Yaw target: ${cfg.min}° to ${cfg.max}°</div>+ `;+ slotEl.insertBefore(placeholder, slotEl.firstChild);+ }+ placeholder.style.display = '';+ placeholder.style.opacity = '';+ const footer = $('.footer', slotEl);+ footer.setAttribute('hidden', '');+ footer.innerHTML = `+ <button class="slot-btn" data-slot-action="camera">Camera</button>+ <button class="slot-btn" data-slot-action="upload">Upload</button>+ `;+ $$('[data-slot-action]', footer).forEach((btn) => {+ btn.addEventListener('click', async (e) => {+ e.stopPropagation();+ const action = btn.getAttribute('data-slot-action');+ if (action === 'camera') await startCamera(slot);+ else if (action === 'upload') $('.upload-input', slotEl).click();+ });+ });+ updateSubmit();+ }++ // ── Head-pose estimation from landmarks ─────────────────────────────+ // Simple geometric estimator. Yaw uses the asymmetry between the two+ // outer-eye-corner-to-nose distances; pitch uses nose-tip vs eye-midline+ // vertical offset; roll uses the angle between the two outer eye corners.+ // Indices (MediaPipe face mesh):+ // 33 = right eye outer corner (subject's right)+ // 263 = left eye outer corner (subject's left)+ // 1 = nose tip+ // 199 = chin+ function estimateHeadPose(lms) {+ const r = lms[33]; // subject's right eye, camera's left+ const l = lms[263]; // subject's left eye, camera's right+ const nose = lms[1];+ // Roll: angle between eye corners on the image plane+ const dxEye = l.x - r.x;+ const dyEye = l.y - r.y;+ const roll = (Math.atan2(dyEye, dxEye) * 180) / Math.PI;+ // Yaw: ratio of nose offset from each eye corner along x.+ // Positive yaw = head turned to subject's left (camera sees more of right cheek).+ const distR = Math.hypot(nose.x - r.x, nose.y - r.y);+ const distL = Math.hypot(nose.x - l.x, nose.y - l.y);+ const yawRaw = (distR - distL) / (distR + distL);+ // Sign convention chosen so that real left head turn → positive yaw.+ // (Image is un-mirrored at this point.)+ const yaw = -yawRaw * 90; // approximate degrees in ±60° range+ // Pitch: vertical offset between nose tip and eye midline, normalised+ // by eye span. Positive pitch = head tilted up.+ const eyeMidY = (l.y + r.y) / 2;+ const eyeSpan = Math.hypot(l.x - r.x, l.y - r.y) || 1;+ const pitchRaw = (eyeMidY - nose.y) / eyeSpan;+ const pitch = pitchRaw * 90;+ return { yaw, pitch, roll };+ }++ // ── Options ─────────────────────────────────────────────────────────+ $$('#body-radios input').forEach((input, i, all) => {+ input.addEventListener('change', () => {+ state.bodyType = input.value;+ all.forEach((x) => x.parentElement.classList.toggle('selected', x.checked));+ log(`body type → ${input.value}`, 'info');+ });+ });+ $$('#style-radios input').forEach((input, i, all) => {+ input.addEventListener('change', () => {+ state.style = input.value;+ all.forEach((x) => x.parentElement.classList.toggle('selected', x.checked));+ log(`style → ${input.value}`, 'info');+ });+ });++ // ── Submit ──────────────────────────────────────────────────────────+ const submitBtn = $('#submit-btn');+ function updateSubmit() {+ const n = ['frontal', 'left', 'right'].filter((k) => state.passes[k]).length;+ submitBtn.textContent = n === 3 ? 'Submit to three.ws Selfie pipeline' : `Upload ${n}/3`;+ submitBtn.disabled = n !== 3;+ }++ submitBtn.addEventListener('click', async () => {+ submitBtn.disabled = true;+ const original = submitBtn.textContent;+ submitBtn.textContent = 'Preparing photos…';+ try {+ log('downscaling photos to ≤1024px JPEG q=0.85...', 'info');+ const photos = {+ frontal: await blobToDownscaledDataUrl(state.images.frontal.blob),+ left: await blobToDownscaledDataUrl(state.images.left.blob),+ right: await blobToDownscaledDataUrl(state.images.right.blob),+ };+ const totalKb = Math.round(+ (photos.frontal.length + photos.left.length + photos.right.length) / 1024,+ );+ log(`photos encoded (${totalKb} KB total base64). submitting...`, 'info');+ submitBtn.textContent = 'Submitting…';++ // The live API contract uses { body_type, avatar_type }. We map+ // the UI's "style" radio to avatar_type since the upstream+ // endpoint expects that key.+ const res = await fetch('/api/onboarding/avaturn-session', {+ method: 'POST',+ credentials: 'include',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({+ photos,+ body_type: state.bodyType,+ avatar_type: state.style,+ }),+ });+ if (!res.ok) {+ const text = await res.text();+ throw new Error(`HTTP ${res.status}: ${text.slice(0, 240)}`);+ }+ const data = await res.json();+ if (!data.session_url) throw new Error('response missing session_url');+ log(`✓ session URL received`, 'ok');+ log(data.session_url, 'ok');+ showResult(data.session_url);+ submitBtn.textContent = 'Submitted ✓';+ } catch (err) {+ log('submit failed: ' + err.message, 'err');+ submitBtn.disabled = false;+ submitBtn.textContent = original;+ }+ });++ function showResult(url) {+ const card = $('#result-card');+ card.classList.add('show');+ $('#result-url').textContent = url;+ $('#open-session-btn').onclick = () => openIframeModal(url);+ }++ function openIframeModal(url) {+ $('#session-iframe').src = url;+ $('#iframe-modal').classList.add('open');+ log('opened three.ws Selfie editor iframe', 'info');+ }+ $('#modal-close').addEventListener('click', () => {+ $('#iframe-modal').classList.remove('open');+ $('#session-iframe').src = 'about:blank';+ log('closed editor iframe', 'info');+ });+ $('#iframe-modal').addEventListener('click', (e) => {+ if (e.target === $('#iframe-modal')) {+ $('#iframe-modal').classList.remove('open');+ $('#session-iframe').src = 'about:blank';+ }+ });++ // ── Helpers ─────────────────────────────────────────────────────────+ async function blobToDownscaledDataUrl(blob) {+ const bitmap = await createImageBitmap(blob);+ const max = 1024;+ const scale = Math.min(1, max / Math.max(bitmap.width, bitmap.height));+ const w = Math.round(bitmap.width * scale);+ const h = Math.round(bitmap.height * scale);+ const c = document.createElement('canvas');+ c.width = w; c.height = h;+ const ctx = c.getContext('2d');+ ctx.drawImage(bitmap, 0, 0, w, h);+ try { bitmap.close?.(); } catch (_) {}+ return c.toDataURL('image/jpeg', 0.85);+ }++ log('demo ready. click a slot to begin.', 'ok');+ </script>+ </body>+</html>diff --git a/public/demos/walkaround.html b/public/demos/walkaround.htmlnew file mode 100644index 000000000..16ed40848--- /dev/null+++ b/public/demos/walkaround.html@@ -0,0 +1,426 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />+ <title>3D walkaround · three.ws lab</title>+ <meta name="description" content="A WASD + mobile-joystick walkaround scene with real physics (Rapier) and navmesh pathfinding (Recast). Click anywhere on the ground to autopilot your agent there." />+ <meta name="robots" content="noindex" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <style>+ :root { color-scheme: dark; }+ html, body { height: 100%; }+ body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; overflow: hidden; }+ .stage { position: fixed; inset: 0; display: flex; flex-direction: column; }+ .head { padding: 14px 22px; display: flex; align-items: center; gap: 14px; background: rgba(8,9,15,0.8); border-bottom: 1px solid #1e1f2b; backdrop-filter: blur(8px); z-index: 5; }+ .head a { color: #8a8d98; text-decoration: none; font-size: 13px; }+ .head a:hover { color: #d6ff3d; }+ .head h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }+ .head .spacer { flex: 1; }+ .head button { background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #1e1f2b; border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; }+ .head button.active { background: #d6ff3d; color: #0a0a0a; border-color: #d6ff3d; }+ .canvas-host { flex: 1; position: relative; }+ canvas.world { display: block; width: 100%; height: 100%; touch-action: none; }+ .hud { position: absolute; top: 12px; left: 12px; padding: 8px 12px; background: rgba(8,9,15,0.7); border: 1px solid #1e1f2b; border-radius: 9px; font-family: ui-monospace, monospace; font-size: 11.5px; color: #8a8d98; line-height: 1.5; pointer-events: none; }+ .hud b { color: #d6ff3d; }+ .controls-help { position: absolute; bottom: 12px; right: 12px; padding: 8px 12px; background: rgba(8,9,15,0.7); border: 1px solid #1e1f2b; border-radius: 9px; font-size: 12px; color: #8a8d98; line-height: 1.5; pointer-events: none; max-width: 240px; }+ .controls-help kbd { display: inline-block; padding: 1px 6px; background: #1e1f2b; border-radius: 4px; color: #d6ff3d; font-family: ui-monospace, monospace; font-size: 11px; margin-right: 2px; }+ .joystick-host { position: absolute; bottom: 24px; left: 24px; width: 130px; height: 130px; touch-action: none; }+ .boot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,6,10,0.92); z-index: 4; font-size: 14px; color: #8a8d98; }+ .boot .spinner { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #d6ff3d; animation: pulse 0.9s ease-in-out infinite; margin-right: 10px; vertical-align: middle; }+ @keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }+ @media (max-width: 720px) {+ .controls-help { display: none; }+ }+ </style>+ </head>+ <body>+ <div class="stage">+ <header class="head">+ <a href="/demos/">← lab</a>+ <h1>3D walkaround</h1>+ <div class="spacer"></div>+ <button id="toggleNavmesh">Show navmesh</button>+ <button id="toggleAutopilot" class="active">Click-to-walk: on</button>+ </header>+ <div class="canvas-host" id="canvas-host">+ <canvas class="world" id="world"></canvas>+ <div class="hud" id="hud">+ <div>physics · <b id="hud-rapier">loading</b></div>+ <div>navmesh · <b id="hud-recast">loading</b></div>+ <div>pos · <b id="hud-pos">—</b></div>+ <div>FPS · <b id="hud-fps">—</b></div>+ </div>+ <div class="controls-help">+ <div><kbd>W</kbd><kbd>A</kbd><kbd>S</kbd><kbd>D</kbd> walk</div>+ <div><kbd>Shift</kbd> run</div>+ <div>Click ground to autopilot</div>+ <div>Drag to orbit camera</div>+ </div>+ <div class="joystick-host" id="joystick-host"></div>+ <div class="boot" id="boot"><span class="spinner"></span>Loading physics + navmesh…</div>+ </div>+ </div>++ <script type="module">+ import * as THREE from 'three';+ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';+ import { OrbitControls } from 'three/addons/controls/OrbitControls.js';+ import RAPIER from '@dimforge/rapier3d-compat';+ import { init as initRecast, NavMesh, NavMeshQuery } from '@recast-navigation/core';+ import { threeToSoloNavMesh } from '@recast-navigation/three';+ import nipplejs from 'nipplejs';++ const $ = (id) => document.getElementById(id);+ const canvas = $('world');+ const host = $('canvas-host');+ const hud = { rapier: $('hud-rapier'), recast: $('hud-recast'), pos: $('hud-pos'), fps: $('hud-fps') };++ const renderer = new THREE.WebGLRenderer({ canvas, antialias: true });+ renderer.setPixelRatio(Math.min(devicePixelRatio, 2));+ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.shadowMap.enabled = true;+ renderer.shadowMap.type = THREE.PCFSoftShadowMap;++ const scene = new THREE.Scene();+ scene.background = new THREE.Color(0x0b0d14);+ scene.fog = new THREE.Fog(0x0b0d14, 25, 90);++ const camera = new THREE.PerspectiveCamera(55, 1, 0.1, 200);+ camera.position.set(8, 8, 10);++ const controls = new OrbitControls(camera, canvas);+ controls.target.set(0, 1, 0);+ controls.enableDamping = true;+ controls.minDistance = 3;+ controls.maxDistance = 30;+ controls.maxPolarAngle = Math.PI / 2.05;++ scene.add(new THREE.HemisphereLight(0xaab5ff, 0x0a0c15, 0.6));+ const sun = new THREE.DirectionalLight(0xffe8c2, 1.8);+ sun.position.set(15, 22, 10);+ sun.castShadow = true;+ sun.shadow.mapSize.set(2048, 2048);+ sun.shadow.camera.left = -20;+ sun.shadow.camera.right = 20;+ sun.shadow.camera.top = 20;+ sun.shadow.camera.bottom = -20;+ sun.shadow.camera.near = 1;+ sun.shadow.camera.far = 60;+ sun.shadow.bias = -0.0008;+ scene.add(sun);++ function resize() {+ const w = host.clientWidth, h = host.clientHeight;+ renderer.setSize(w, h, false);+ camera.aspect = w / h;+ camera.updateProjectionMatrix();+ }+ resize();+ window.addEventListener('resize', resize);++ const FLOOR_HALF = 18;+ const floorGeom = new THREE.PlaneGeometry(FLOOR_HALF * 2, FLOOR_HALF * 2);+ const floorMat = new THREE.MeshStandardMaterial({ color: 0x1a1f2b, roughness: 0.92, metalness: 0 });+ const floor = new THREE.Mesh(floorGeom, floorMat);+ floor.rotation.x = -Math.PI / 2;+ floor.receiveShadow = true;+ floor.name = 'floor';+ scene.add(floor);++ const grid = new THREE.GridHelper(FLOOR_HALF * 2, 36, 0x2a3045, 0x161a26);+ grid.position.y = 0.001;+ scene.add(grid);++ const obstacles = [];+ function addBox(x, y, z, w, h, d, color = 0x2a304a) {+ const mesh = new THREE.Mesh(+ new THREE.BoxGeometry(w, h, d),+ new THREE.MeshStandardMaterial({ color, roughness: 0.7, metalness: 0.1 }),+ );+ mesh.position.set(x, y, z);+ mesh.castShadow = true;+ mesh.receiveShadow = true;+ mesh.name = 'obstacle';+ scene.add(mesh);+ obstacles.push({ mesh, size: { w, h, d } });+ return mesh;+ }+ // A small enclosed plaza with a few obstacles.+ addBox(0, 1, -6, 14, 2, 0.5);+ addBox(0, 1, 6, 14, 2, 0.5);+ addBox(-7, 1, 0, 0.5, 2, 12);+ addBox(7, 1, 0, 0.5, 2, 12);+ addBox(-2.5, 0.5, -1.5, 2, 1, 2, 0x33405f);+ addBox(2, 0.5, 2, 1.5, 1, 1.5, 0x33405f);+ addBox(-3, 1.5, 3, 1, 3, 1, 0x4a3045);+ addBox(3.5, 1.5, -3, 1, 3, 1, 0x4a3045);++ const avatarRoot = new THREE.Group();+ scene.add(avatarRoot);+ let avatarMixer = null;+ let avatarReady = false;+ let walkAction = null;++ new GLTFLoader().load('/avatars/default.glb', (gltf) => {+ const model = gltf.scene;+ model.traverse((n) => { if (n.isMesh) { n.castShadow = true; n.receiveShadow = true; } });+ avatarRoot.add(model);+ if (gltf.animations?.length) {+ avatarMixer = new THREE.AnimationMixer(model);+ const walkClip = gltf.animations.find((a) => /walk|run|loco/i.test(a.name)) || gltf.animations[0];+ walkAction = avatarMixer.clipAction(walkClip);+ walkAction.play();+ walkAction.setEffectiveWeight(0);+ }+ avatarReady = true;+ });++ let physics = null;+ let kcc = null;+ let avatarBody = null;+ let avatarCollider = null;+ const avatarHeight = 1.7;+ const avatarRadius = 0.35;++ async function initPhysics() {+ await RAPIER.init();+ const world = new RAPIER.World({ x: 0, y: -20, z: 0 });++ const floorBody = world.createRigidBody(RAPIER.RigidBodyDesc.fixed().setTranslation(0, -0.05, 0));+ world.createCollider(RAPIER.ColliderDesc.cuboid(FLOOR_HALF, 0.05, FLOOR_HALF), floorBody);++ for (const o of obstacles) {+ const body = world.createRigidBody(+ RAPIER.RigidBodyDesc.fixed().setTranslation(o.mesh.position.x, o.mesh.position.y, o.mesh.position.z),+ );+ world.createCollider(RAPIER.ColliderDesc.cuboid(o.size.w / 2, o.size.h / 2, o.size.d / 2), body);+ }++ avatarBody = world.createRigidBody(+ RAPIER.RigidBodyDesc.kinematicPositionBased().setTranslation(0, avatarHeight / 2, 4),+ );+ avatarCollider = world.createCollider(+ RAPIER.ColliderDesc.capsule(avatarHeight / 2 - avatarRadius, avatarRadius),+ avatarBody,+ );++ kcc = world.createCharacterController(0.05);+ kcc.setApplyImpulsesToDynamicBodies(false);+ kcc.enableAutostep(0.4, 0.2, true);+ kcc.enableSnapToGround(0.4);+ kcc.setSlideEnabled(true);+ kcc.setMaxSlopeClimbAngle(50 * Math.PI / 180);++ physics = { world, gravity: { x: 0, y: -20, z: 0 } };+ hud.rapier.textContent = `Rapier ${RAPIER.version()} · ready`;+ }++ let navMesh = null;+ let navQuery = null;+ let navmeshHelper = null;+ let navmeshVisible = false;++ async function initNavmesh() {+ await initRecast();+ const collisionMeshes = [floor, ...obstacles.map((o) => o.mesh)];+ const { success, navMesh: nm } = threeToSoloNavMesh(collisionMeshes, {+ cs: 0.25,+ ch: 0.2,+ walkableRadius: 2,+ walkableClimb: 2,+ walkableHeight: 8,+ walkableSlopeAngle: 50,+ });+ if (!success || !nm) {+ hud.recast.textContent = 'failed';+ return;+ }+ navMesh = nm;+ navQuery = new NavMeshQuery(navMesh);++ const { NavMeshHelper } = await import('@recast-navigation/three');+ navmeshHelper = new NavMeshHelper(navMesh, {+ navMeshMaterial: new THREE.MeshBasicMaterial({+ color: 0xd6ff3d, transparent: true, opacity: 0.18, depthWrite: false,+ }),+ });+ navmeshHelper.visible = false;+ navmeshHelper.position.y = 0.02;+ scene.add(navmeshHelper);+ hud.recast.textContent = 'Recast · ready';+ }++ let pendingPath = null;+ let pathIndex = 0;++ function autopilotTo(target) {+ if (!navQuery) return;+ const startPos = avatarRoot.position;+ const start = navQuery.findClosestPoint({ x: startPos.x, y: startPos.y, z: startPos.z });+ const end = navQuery.findClosestPoint({ x: target.x, y: target.y, z: target.z });+ if (!start.success || !end.success) return;+ const result = navQuery.computePath(start.point, end.point);+ if (!result.success || !result.path?.length) return;+ pendingPath = result.path.map((p) => new THREE.Vector3(p.x, p.y, p.z));+ pathIndex = 0;+ }++ $('toggleNavmesh').addEventListener('click', (e) => {+ navmeshVisible = !navmeshVisible;+ if (navmeshHelper) navmeshHelper.visible = navmeshVisible;+ e.currentTarget.classList.toggle('active', navmeshVisible);+ e.currentTarget.textContent = navmeshVisible ? 'Hide navmesh' : 'Show navmesh';+ });++ let autopilotEnabled = true;+ $('toggleAutopilot').addEventListener('click', (e) => {+ autopilotEnabled = !autopilotEnabled;+ e.currentTarget.classList.toggle('active', autopilotEnabled);+ e.currentTarget.textContent = `Click-to-walk: ${autopilotEnabled ? 'on' : 'off'}`;+ if (!autopilotEnabled) pendingPath = null;+ });++ const raycaster = new THREE.Raycaster();+ canvas.addEventListener('click', (e) => {+ if (!autopilotEnabled) return;+ const rect = canvas.getBoundingClientRect();+ const ndc = new THREE.Vector2(+ ((e.clientX - rect.left) / rect.width) * 2 - 1,+ -((e.clientY - rect.top) / rect.height) * 2 + 1,+ );+ raycaster.setFromCamera(ndc, camera);+ const hits = raycaster.intersectObject(floor, false);+ if (hits.length) autopilotTo(hits[0].point);+ });++ const keys = new Set();+ const KEYMAP = { KeyW: 'fwd', ArrowUp: 'fwd', KeyS: 'back', ArrowDown: 'back', KeyA: 'left', ArrowLeft: 'left', KeyD: 'right', ArrowRight: 'right', ShiftLeft: 'run', ShiftRight: 'run' };+ window.addEventListener('keydown', (e) => {+ const m = KEYMAP[e.code];+ if (m) { keys.add(m); pendingPath = null; }+ });+ window.addEventListener('keyup', (e) => { const m = KEYMAP[e.code]; if (m) keys.delete(m); });++ const joystick = nipplejs.create({+ zone: $('joystick-host'),+ mode: 'static',+ position: { left: '50%', top: '50%' },+ color: '#d6ff3d',+ size: 110,+ restOpacity: 0.45,+ });+ let joyVec = { x: 0, y: 0, active: false };+ joystick.on('move', (_e, data) => {+ const ang = data.angle.radian;+ const f = Math.min(1, data.force);+ joyVec = { x: Math.cos(ang) * f, y: Math.sin(ang) * f, active: true };+ pendingPath = null;+ });+ joystick.on('end', () => { joyVec = { x: 0, y: 0, active: false }; });++ const tmpDir = new THREE.Vector3();+ const tmpRight = new THREE.Vector3();+ const tmpMove = new THREE.Vector3();+ let yaw = 0;++ let lastTime = performance.now();+ let frames = 0;+ let fpsAcc = 0;++ function tick() {+ requestAnimationFrame(tick);+ const now = performance.now();+ const dt = Math.min((now - lastTime) / 1000, 0.05);+ lastTime = now;+ frames++;+ fpsAcc += dt;+ if (fpsAcc >= 0.5) { hud.fps.textContent = Math.round(frames / fpsAcc); frames = 0; fpsAcc = 0; }++ controls.update();++ camera.getWorldDirection(tmpDir);+ tmpDir.y = 0; tmpDir.normalize();+ tmpRight.crossVectors(tmpDir, new THREE.Vector3(0, 1, 0)).normalize();++ let inX = 0, inZ = 0;+ if (keys.has('fwd')) inZ += 1;+ if (keys.has('back')) inZ -= 1;+ if (keys.has('right')) inX += 1;+ if (keys.has('left')) inX -= 1;+ if (joyVec.active) { inX = joyVec.x; inZ = joyVec.y; }++ const speed = (keys.has('run') ? 7.5 : 4.0);+ tmpMove.set(0, 0, 0);+ if (inX || inZ) {+ tmpMove.copy(tmpDir).multiplyScalar(inZ).add(tmpRight.clone().multiplyScalar(inX));+ if (tmpMove.lengthSq() > 1) tmpMove.normalize();+ tmpMove.multiplyScalar(speed * dt);+ pendingPath = null;+ }++ if (pendingPath && pendingPath[pathIndex]) {+ const target = pendingPath[pathIndex];+ const here = avatarRoot.position;+ const dx = target.x - here.x;+ const dz = target.z - here.z;+ const dist = Math.hypot(dx, dz);+ if (dist < 0.3) {+ pathIndex++;+ if (pathIndex >= pendingPath.length) pendingPath = null;+ } else {+ const inv = 1 / dist;+ tmpMove.set(dx * inv, 0, dz * inv).multiplyScalar(speed * dt);+ }+ }++ if (physics && kcc && avatarBody && avatarCollider) {+ tmpMove.y -= 20 * dt;+ kcc.computeColliderMovement(avatarCollider, tmpMove);+ const corrected = kcc.computedMovement();+ const pos = avatarBody.translation();+ const next = { x: pos.x + corrected.x, y: pos.y + corrected.y, z: pos.z + corrected.z };+ avatarBody.setNextKinematicTranslation(next);+ physics.world.step();++ const newPos = avatarBody.translation();+ avatarRoot.position.set(newPos.x, newPos.y - avatarHeight / 2, newPos.z);++ const horizSpeed = Math.hypot(corrected.x, corrected.z);+ if (horizSpeed > 0.005) {+ const targetYaw = Math.atan2(corrected.x, corrected.z);+ const diff = ((targetYaw - yaw + Math.PI * 3) % (Math.PI * 2)) - Math.PI;+ yaw += diff * Math.min(1, dt * 12);+ avatarRoot.rotation.y = yaw;+ }++ if (avatarMixer) {+ avatarMixer.update(dt);+ if (walkAction) {+ const targetW = horizSpeed > 0.005 ? 1 : 0;+ const w = walkAction.getEffectiveWeight();+ walkAction.setEffectiveWeight(w + (targetW - w) * 0.2);+ walkAction.setEffectiveTimeScale(Math.max(0.5, horizSpeed * 80));+ }+ }++ hud.pos.textContent = `${newPos.x.toFixed(1)}, ${newPos.z.toFixed(1)}`;+ }++ renderer.render(scene, camera);+ }++ (async () => {+ try {+ await Promise.all([initPhysics(), initNavmesh()]);+ $('boot').style.display = 'none';+ tick();+ } catch (err) {+ $('boot').textContent = 'Boot failed: ' + (err?.message || err);+ console.error(err);+ }+ })();+ </script>+ </body>+</html>diff --git a/src/account.js b/src/account.jsindex d7a2283e5..d2fa8b6b9 100644--- a/src/account.js+++ b/src/account.js@@ -100,6 +100,22 @@ export async function saveRemoteGlbToAccount(source, meta = {}) {blob = await resp.blob();}+ // Canonicalize humanoid bone names before upload so the pre-baked Mixamo+ // animation library plays out of the box. Non-fatal — if the buffer isn't+ // a valid GLB or the rig isn't humanoid, fall through with the original.+ let retargetedBoneCount = 0;+ try {+ const { canonicalizeGLBBones } = await import('./glb-canonicalize.js');+ const buf = await blob.arrayBuffer();+ const result = canonicalizeGLBBones(buf);+ if (result.renamed > 0) {+ blob = new Blob([result.buffer], { type: 'model/gltf-binary' });+ retargetedBoneCount = result.renamed;+ }+ } catch (err) {+ console.warn('[account] canonicalize failed; uploading original', err);+ }+const size = blob.size;const contentType = blob.type || 'model/gltf-binary';const checksum = await sha256Hex(blob);@@ -117,9 +133,11 @@ export async function saveRemoteGlbToAccount(source, meta = {}) {});if (!putRes.ok) throw new Error(`R2 upload failed: ${putRes.status}`);- const sourceMeta =- meta.source_meta ||- (typeof source === 'string' ? { source_url: source } : { generator: 'characterstudio' });+ const sourceMeta = {+ ...(meta.source_meta ||+ (typeof source === 'string' ? { source_url: source } : { generator: 'characterstudio' })),+ ...(retargetedBoneCount > 0 ? { retargeted_bones: retargetedBoneCount } : {}),+ };const created = await postJson('/api/avatars', {storage_key: presign.storage_key,diff --git a/src/agent-avatar.js b/src/agent-avatar.jsindex 193d714d6..427972e51 100644--- a/src/agent-avatar.js+++ b/src/agent-avatar.js@@ -25,6 +25,7 @@ import { resolveSlot, DEFAULT_ANIMATION_MAP } from './runtime/animation-slots.jsimport { ElevenLabsTTS } from './runtime/speech.js';import { LipSyncAnalyser, VISEMES as LIPSYNC_VISEMES } from './lip-sync-analyser.js';import { resolveMorphTargets, MORPH_ALIASES, ARKIT_VISEMES } from './runtime/arkit52.js';+import { AnimationStateMachine } from './animation-state-machine.js';// BEGIN:IDLE_LOOP_IMPORTimport { IdleAnimation } from './idle-animation.js';// END:IDLE_LOOP_IMPORT@@ -210,6 +211,10 @@ export class AgentAvatar {this._tts = null;this._positionalAudio = null;+ // Animation state machine — lazy: created in attach() once the viewer's+ // animation manager is reachable.+ this._sm = null;+this._tickBound = this._tickEmotion.bind(this);this._onMouseMove = this._handleMouseMove.bind(this);this._onKeyFollowDown = this._handleKeyPress.bind(this);@@ -268,6 +273,27 @@ export class AgentAvatar {getMorphCurrent: () => this._morphCurrent,});// END:IDLE_LOOP_INIT++ // Animation state machine. The graph comes from agent meta and falls back+ // to the canonical defaults (idle / talk / walk / react / emote). onTransition+ // is wired straight to the AnimationManager so state transitions become+ // real crossfades; non-existent clips degrade to a no-op warning from AM.+ this._sm = new AnimationStateMachine(+ this.identity?.animationGraph || {},+ ({ clip, def, crossfade }) => {+ const am = this.viewer?.animationManager;+ if (!am) return;+ if (def.loop) {+ am.crossfadeTo(clip, crossfade);+ } else {+ // One-shots can't crossFadeTo because the action stops on completion;+ // play() handles the hard cut + lazy load. The clip's own end will+ // be observed by callers who fire('<state>-end') manually, mirroring+ // today's _playSlot timer-driven model.+ am.play(clip);+ }+ },+ );}/** Remove all hooks and listeners */@@ -293,10 +319,28 @@ export class AgentAvatar {this._positionalAudio.parent?.remove(this._positionalAudio);this._positionalAudio = null;}+ this._sm = null;}// ── Public API ────────────────────────────────────────────────────────────+ /**+ * Fire a transition on the animation state machine. Used by callers outside+ * AgentAvatar — element.js fires `walk` / `walk-end` from stream/chat hooks,+ * for instance. No-op when no state machine is attached.+ *+ * @param {string} event+ * @returns {string|null} new state name (null if no transition matched)+ */+ fireAnimationEvent(event) {+ return this._sm?.fire(event) ?? null;+ }++ /** Current animation state name from the state machine, or null. */+ getAnimationState() {+ return this._sm?.getCurrent() ?? null;+ }+/** Play a named gesture animation */playGesture(name) {this._triggerOneShot(name);@@ -339,6 +383,9 @@ export class AgentAvatar {}this._morphTarget['mouthOpen'] = 0;this._morphTarget['jawOpen'] = 0;+ // Drop out of the talk state. If the avatar was in walk before speaking,+ // the state machine's return-stack restores it (see AnimationStateMachine).+ this._sm?.fire('speak-end');}/**@@ -474,6 +521,11 @@ export class AgentAvatar {// Trigger mouth/talk animation hintconst duration = Math.max(1.5, text.split(' ').length * 0.3);this._triggerOneShot('talk', duration);++ // Drive the state machine into the talk state so the body-loop swaps+ // (idle → talk) when the agent has a configured talk clip. Default+ // talk-clip-equals-idle is a no-op visually; lip-sync handles the mouth.+ this._sm?.fire('speak');}_onThink(_action) {diff --git a/src/agent-edit.js b/src/agent-edit.jsindex 4f734ac9d..eb3d83abe 100644--- a/src/agent-edit.js+++ b/src/agent-edit.js@@ -474,6 +474,14 @@ const ANIMATIONS_MAX = 30;let animationLibrary = null; // [{ name, url, label, icon, loop }]let selectedAnimNames = new Set();+// Animation state machine UI state — see src/animation-state-machine.js+const ANIM_STATES = ['idle', 'talk', 'walk', 'react', 'emote'];+const ANIM_STATE_DEFAULT_CLIP = {+ idle: 'idle', talk: 'idle', walk: 'walk', react: 'reaction', emote: 'wave',+};+let animGraphState = {}; // { idle: 'idle', talk: 'idle', ... } (clip names, "" = unset/use default)+let originalAnimGraphState = {};+let originalAnimNames = new Set();async function renderAnimationsPicker() {@@ -534,6 +542,125 @@ async function renderAnimationsPicker() {saveBtn.addEventListener('click', saveAnimations);}updateAnimSaveButton();++ renderAnimGraphPicker();+}++function renderAnimGraphPicker() {+ const rows = $('anim-graph-rows');+ const saveBtn = $('anim-graph-save');+ if (!rows) return;++ const graph = agentData.meta?.animationGraph || {};+ animGraphState = {};+ for (const state of ANIM_STATES) {+ animGraphState[state] = graph.states?.[state]?.clip ?? '';+ }+ originalAnimGraphState = { ...animGraphState };++ rows.innerHTML = ANIM_STATES.map((state) => {+ const def = ANIM_STATE_DEFAULT_CLIP[state];+ const options = ['<option value="">— default —</option>']+ .concat(+ animationLibrary.map((a) => {+ const sel = animGraphState[state] === a.name ? ' selected' : '';+ return `<option value="${escapeHtml(a.name)}"${sel}>${escapeHtml(a.label || a.name)}</option>`;+ }),+ )+ .join('');+ return `+ <div class="anim-graph-row" data-state="${state}">+ <span class="anim-graph-row-label">${state}</span>+ <select aria-label="Clip for ${state} state">${options}</select>+ <span class="anim-graph-row-meta">default: ${def}</span>+ </div>+ `;+ }).join('');++ rows.querySelectorAll('.anim-graph-row').forEach((row) => {+ const state = row.dataset.state;+ const select = row.querySelector('select');+ select.addEventListener('change', () => {+ animGraphState[state] = select.value;+ updateAnimGraphSaveButton();+ });+ });++ if (saveBtn && !saveBtn.dataset.wired) {+ saveBtn.dataset.wired = '1';+ saveBtn.addEventListener('click', saveAnimationGraph);+ }+ updateAnimGraphSaveButton();+}++function updateAnimGraphSaveButton() {+ const saveBtn = $('anim-graph-save');+ if (!saveBtn) return;+ const dirty = ANIM_STATES.some((s) => animGraphState[s] !== originalAnimGraphState[s]);+ saveBtn.disabled = !dirty;+}++// Build the API-shaped graph object from the current picker selections.+// Empty (default) selections are omitted so the API receives only overrides.+function buildAnimGraphPayload() {+ const states = {};+ for (const state of ANIM_STATES) {+ const clip = animGraphState[state];+ if (clip && clip !== '' && clip !== ANIM_STATE_DEFAULT_CLIP[state]) {+ states[state] = { clip };+ }+ }+ return Object.keys(states).length > 0 ? { states } : null;+}++async function saveAnimationGraph() {+ const status = $('anim-graph-status');+ const saveBtn = $('anim-graph-save');+ if (!status || !saveBtn) return;++ // PUT /api/agents/:id/animations requires animations[] alongside the graph,+ // so we re-send the current selection unchanged.+ const animations = animationLibrary+ .filter((a) => selectedAnimNames.has(a.name))+ .map((a) => ({+ name: a.name,+ url: a.url,+ loop: a.loop !== false,+ source: 'mixamo',+ addedAt: new Date().toISOString(),+ }));+ const animationGraph = buildAnimGraphPayload();++ saveBtn.disabled = true;+ status.textContent = 'Saving…';+ status.className = 'form-status';++ try {+ const r = await fetch(`${API_BASE}/agents/${agentId}/animations`, {+ method: 'PUT',+ headers: { 'Content-Type': 'application/json' },+ credentials: 'include',+ body: JSON.stringify({ animations, animationGraph }),+ });+ if (!r.ok) {+ const j = await r.json().catch(() => ({}));+ throw new Error(j.error_description || j.error || `HTTP ${r.status}`);+ }+ const j = await r.json();+ if (!agentData.meta) agentData.meta = {};+ agentData.meta.animations = j.animations;+ agentData.meta.animationGraph = j.animationGraph;+ originalAnimGraphState = { ...animGraphState };+ status.textContent = 'Saved animation states.';+ status.className = 'form-status ok';+ reloadOutfitPreview();+ setTimeout(() => { status.textContent = ''; status.className = 'form-status'; }, 2500);+ } catch (err) {+ status.textContent = `Error: ${err.message}`;+ status.className = 'form-status err';+ } finally {+ updateAnimGraphSaveButton();+ }}function updateAnimSaveButton() {diff --git a/src/animation-state-machine.js b/src/animation-state-machine.jsnew file mode 100644index 000000000..994130f83--- /dev/null+++ b/src/animation-state-machine.js@@ -0,0 +1,200 @@+// Animation state machine — replaces the flat clip list / hard-cut playback+// model with a small directed graph that picks the next clip when protocol+// events fire and crossfades between them.+//+// States are simple roles the avatar can be in (idle, talk, walk, react, emote).+// Each state maps to a single library clip name; the mapping is editable per+// agent so creators can swap in custom motion (e.g. "their idle is the dance+// clip"). Events fire transitions:+//+// idle ─speak──► talk ─speak-end──► idle ─walk──► walk ─walk-end──► idle+// ▲ ▲+// └─ react ◄─reaction-end──────────┘+// └─ emote ◄──emote-end────────────┘+//+// `react` and `emote` are one-shots: they play once, then auto-fire their+// `-end` transition (driven externally by the caller calling fire('react-end')+// after the clip duration elapses — the machine itself is duration-agnostic).+//+// This module is pure: no Three.js, no DOM, no async. Playback side effects+// are delivered through a single `onTransition({ state, clip, crossfade })`+// callback supplied by the caller. That makes the state machine unit-testable+// without a render loop and reusable by anything that drives an avatar+// (the embed bundle, /app, future server-side previewers).++/** Built-in state definitions.+ *+ * `talk` defaults to the same clip as `idle` because the three.ws animation+ * library doesn't ship a dedicated talking-body loop and the live lip-sync+ * already animates the mouth. Agents that have a talking-body clip (e.g. a+ * subtle idle-2) override `states.talk.clip` via meta.animationGraph.+ */+const DEFAULT_STATES = Object.freeze({+ idle: { clip: 'idle', loop: true, crossfade: 0.5, oneShot: false, returnTo: null },+ talk: { clip: 'idle', loop: true, crossfade: 0.35, oneShot: false, returnTo: null },+ walk: { clip: 'walk', loop: true, crossfade: 0.3, oneShot: false, returnTo: null },+ react: { clip: 'reaction', loop: false, crossfade: 0.25, oneShot: true, returnTo: 'idle' },+ emote: { clip: 'wave', loop: false, crossfade: 0.25, oneShot: true, returnTo: 'idle' },+});++/** Built-in event → target-state transition table. */+const DEFAULT_TRANSITIONS = Object.freeze({+ 'speak': 'talk',+ 'speak-end': 'idle',+ 'walk': 'walk',+ 'walk-end': 'idle',+ 'react': 'react',+ 'react-end': 'idle',+ 'emote': 'emote',+ 'emote-end': 'idle',+});++const STATE_NAMES = Object.freeze(Object.keys(DEFAULT_STATES));++export { DEFAULT_STATES, DEFAULT_TRANSITIONS, STATE_NAMES };++/**+ * @typedef {Object} StateDef+ * @property {string} clip - library clip name to play in this state+ * @property {boolean} loop - whether the clip loops+ * @property {number} crossfade - seconds to crossfade in+ * @property {boolean} oneShot - if true, the state auto-resolves to `returnTo` after playback+ * @property {string|null} returnTo - state to return to after a one-shot (idle by default)+ */++/**+ * @typedef {Object} AnimationGraph+ * @property {Object<string,Partial<StateDef>>} [states] - per-state overrides (defaults filled in)+ * @property {Object<string,string>} [transitions] - event → target-state overrides+ * @property {string} [initial] - starting state, defaults to "idle"+ */++export class AnimationStateMachine {+ /**+ * @param {AnimationGraph} [graph]+ * @param {(payload: {state: string, def: StateDef, clip: string, crossfade: number}) => void} [onTransition]+ * Called every time the current state changes. The caller wires this to the+ * actual animation playback (e.g. `viewer.animationManager.crossfadeTo(clip, crossfade)`).+ */+ constructor(graph = {}, onTransition = null) {+ this.states = mergeStates(graph.states);+ this.transitions = mergeTransitions(graph.transitions);+ this.initial = graph.initial && this.states[graph.initial] ? graph.initial : 'idle';+ this.current = this.initial;+ this.onTransition = typeof onTransition === 'function' ? onTransition : null;+ // History of one-shot returns. A `react` fired during a `talk` should+ // return to `talk` afterwards, not blindly to `idle`. We keep a small+ // stack so nested one-shots compose cleanly.+ this._returnStack = [];+ }++ /** Current state name (e.g. "idle", "talk"). */+ getCurrent() { return this.current; }++ /** Current state's clip name from its definition. */+ getCurrentClip() { return this.states[this.current]?.clip ?? null; }++ /**+ * Fire a transition. Returns the new state name (which may equal the old+ * if no edge matched), or null if the machine has no clip for the target.+ * @param {string} event+ * @returns {string|null}+ */+ fire(event) {+ if (!event || typeof event !== 'string') return null;++ // Special case: every state has an implicit "<state-name>" event that+ // transitions directly into it (e.g. fire('walk') always goes to walk).+ const target = this.transitions[event] || (this.states[event] ? event : null);+ if (!target) return null;++ const targetDef = this.states[target];+ if (!targetDef || !targetDef.clip) return null;++ // If the new state is a one-shot, remember where to return so we can+ // resume the long-running state (talk / walk) afterwards.+ const fromDef = this.states[this.current];+ if (targetDef.oneShot && fromDef && !fromDef.oneShot) {+ this._returnStack.push(this.current);+ }++ // "*-end" transitions resolve to the return stack if there's one, falling+ // back to the configured returnTo / initial.+ const isEndEvent = event.endsWith('-end');+ let resolvedTarget = target;+ if (isEndEvent && this._returnStack.length > 0) {+ const popped = this._returnStack.pop();+ if (this.states[popped]) resolvedTarget = popped;+ }++ if (resolvedTarget === this.current) return this.current;++ const def = this.states[resolvedTarget];+ this.current = resolvedTarget;+ if (this.onTransition) {+ try {+ this.onTransition({+ state: resolvedTarget,+ def,+ clip: def.clip,+ crossfade: def.crossfade,+ });+ } catch (err) {+ console.warn('[AnimationStateMachine] onTransition threw:', err);+ }+ }+ return resolvedTarget;+ }++ /** Reset to the initial state and clear any pending returns. */+ reset() {+ this._returnStack.length = 0;+ this.current = this.initial;+ }+}++// ── Helpers ─────────────────────────────────────────────────────────────────++function mergeStates(overrides) {+ const out = {};+ for (const name of STATE_NAMES) {+ const def = { ...DEFAULT_STATES[name] };+ const o = overrides && overrides[name];+ if (o && typeof o === 'object') {+ if (typeof o.clip === 'string' && o.clip.length > 0) def.clip = o.clip;+ if (typeof o.loop === 'boolean') def.loop = o.loop;+ if (typeof o.crossfade === 'number' && Number.isFinite(o.crossfade)) {+ def.crossfade = Math.max(0, Math.min(5, o.crossfade));+ }+ if (typeof o.oneShot === 'boolean') def.oneShot = o.oneShot;+ if (typeof o.returnTo === 'string' || o.returnTo === null) def.returnTo = o.returnTo;+ }+ out[name] = def;+ }+ // Allow custom user-defined states beyond the built-ins.+ if (overrides && typeof overrides === 'object') {+ for (const [name, o] of Object.entries(overrides)) {+ if (out[name] || !o || typeof o !== 'object' || !o.clip) continue;+ out[name] = {+ clip: o.clip,+ loop: o.loop ?? false,+ crossfade: typeof o.crossfade === 'number' ? Math.max(0, Math.min(5, o.crossfade)) : 0.25,+ oneShot: o.oneShot ?? true,+ returnTo: typeof o.returnTo === 'string' ? o.returnTo : 'idle',+ };+ }+ }+ return out;+}++function mergeTransitions(overrides) {+ const out = { ...DEFAULT_TRANSITIONS };+ if (overrides && typeof overrides === 'object') {+ for (const [event, target] of Object.entries(overrides)) {+ if (typeof event === 'string' && typeof target === 'string') {+ out[event] = target;+ }+ }+ }+ return out;+}diff --git a/src/avatar-edit.js b/src/avatar-edit.jsindex 401b14e36..88bc70437 100644--- a/src/avatar-edit.js+++ b/src/avatar-edit.js@@ -13,6 +13,7 @@import { TalkScene } from './voice/talk-scene.js';import { AccessoryManager } from './agent-accessories.js';+import { uploadAvatarSnapshot } from './voice/avatar-snapshot.js';// ── Routing ────────────────────────────────────────────────────────────@@ -154,6 +155,18 @@ async function saveAppearance() {setStatus('ok', 'Saved');}updateDirtyState();++ // Best-effort: snapshot the current frame and upload as the avatar's+ // thumbnail. Auto-tagging runs server-side as part of the call. We don't+ // await this on the critical Save path — if it fails the user already sees+ // "Saved" and the existing OG fallback still serves a card.+ queueMicrotask(async () => {+ try {+ await uploadAvatarSnapshot({ avatarId: avatar.id, scene });+ } catch (err) {+ console.warn('[avatar-edit] snapshot upload failed:', err?.message);+ }+ });}// ── Rendering ──────────────────────────────────────────────────────────diff --git a/src/element.js b/src/element.jsindex e877ca187..ac276c4d9 100644--- a/src/element.js+++ b/src/element.js@@ -1966,6 +1966,9 @@ class Agent3DElement extends HTMLElement {clearTimeout(this._gestureDoneIdle);// fade_ms: 300ms idle→walk, 500ms walk→idle, 600ms debounce after last chunkthis._scene.playClipByName('walk', { loop: true, fade_ms: 300 });+ // Keep the state-machine bookkeeping in sync — react/emote fired+ // while walking will then correctly return to walk afterwards.+ this._avatar?.fireAnimationEvent('walk');}clearTimeout(this._walkStopDebounce);this._walkStopDebounce = setTimeout(() => this._stopWalkAnimation(), 600);@@ -1985,11 +1988,15 @@ class Agent3DElement extends HTMLElement {const isGesture = currentClip && currentClip !== 'walk' && currentClip !== 'idle';if (!isGesture) {this._scene?.playClipByName('idle', { loop: true, fade_ms: 500 });+ this._avatar?.fireAnimationEvent('walk-end');} else {// Let the one-shot gesture finish; idle transition fires after gesture + fade-back (~2.5s)clearTimeout(this._gestureDoneIdle);this._gestureDoneIdle = setTimeout(() => {- if (!this._isWalking) this._scene?.playClipByName('idle', { loop: true, fade_ms: 500 });+ if (!this._isWalking) {+ this._scene?.playClipByName('idle', { loop: true, fade_ms: 500 });+ this._avatar?.fireAnimationEvent('walk-end');+ }}, 2500);}}diff --git a/src/erc8004/register-ui.js b/src/erc8004/register-ui.jsindex 4c522ee5e..f3de01b01 100644--- a/src/erc8004/register-ui.js+++ b/src/erc8004/register-ui.js@@ -840,35 +840,116 @@ export class RegisterUI {: (CHAIN_META[this.selectedChainId]?.name || `Chain ${this.selectedChainId}`);const standard = solana ? 'Metaplex Core NFT' : 'ERC-8004 (ERC-721)';const costLabel = solana ? '~0.003 SOL' : `gas on ${esc(chainLabel)}`;- const img = f.imageUrl?.trim();const avatarLine = this._avatarSummary();const services = (f.services || []).filter((s) => s.endpoint?.trim());- rail.innerHTML = `- <div class="deploy-preview-card">- <div class="deploy-preview-eyebrow">Live preview</div>- <div class="deploy-preview-thumb">- ${img- ? `<img src="${esc(img)}" alt="" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" />- <div class="deploy-preview-ph" style="display:none">No image</div>`- : `<div class="deploy-preview-ph">No image yet</div>`}- </div>- <div class="deploy-preview-name">${esc(f.name) || '<span class="deploy-preview-dim">Untitled agent</span>'}</div>- <div class="deploy-preview-desc">${esc(f.description) || '<span class="deploy-preview-dim">Add a description in Step 1.</span>'}</div>- <dl class="deploy-preview-meta">- <dt>Chain</dt><dd>${esc(chainLabel)}</dd>- <dt>Standard</dt><dd>${standard}</dd>- <dt>Avatar</dt><dd>${avatarLine}</dd>- <dt>Services</dt><dd>${services.length ? services.map((s) => `<span class="deploy-svc-pill">${esc(s.type)}</span>`).join(' ') : '<span class="deploy-preview-dim">none</span>'}</dd>- <dt>Cost</dt><dd>${esc(costLabel)}</dd>- </dl>- <div class="deploy-preview-checklist">- <div class="deploy-check ${f.name?.trim() ? 'is-ok' : ''}">${f.name?.trim() ? '✓' : '○'} Name</div>- <div class="deploy-check ${f.description?.trim() ? 'is-ok' : ''}">${f.description?.trim() ? '✓' : '○'} Description</div>- <div class="deploy-check ${this._hasAvatar() ? 'is-ok' : ''}">${this._hasAvatar() ? '✓' : '○'} Avatar</div>- <div class="deploy-check ${this._walletReady() ? 'is-ok' : ''}">${this._walletReady() ? '✓' : '○'} Wallet</div>- </div>++ const thumb = this._previewThumbSource();+ const thumbKey = `${thumb.kind}|${thumb.src || ''}`;+ const needsRebuild =+ this._lastPreviewThumbKey !== thumbKey || !rail.querySelector('.deploy-preview-card');++ const infoHtml = `+ <div class="deploy-preview-name">${esc(f.name) || '<span class="deploy-preview-dim">Untitled agent</span>'}</div>+ <div class="deploy-preview-desc">${esc(f.description) || '<span class="deploy-preview-dim">Add a description in Step 1.</span>'}</div>+ <dl class="deploy-preview-meta">+ <dt>Chain</dt><dd>${esc(chainLabel)}</dd>+ <dt>Standard</dt><dd>${standard}</dd>+ <dt>Avatar</dt><dd>${avatarLine}</dd>+ <dt>Services</dt><dd>${services.length ? services.map((s) => `<span class="deploy-svc-pill">${esc(s.type)}</span>`).join(' ') : '<span class="deploy-preview-dim">none</span>'}</dd>+ <dt>Cost</dt><dd>${esc(costLabel)}</dd>+ </dl>+ <div class="deploy-preview-checklist">+ <div class="deploy-check ${f.name?.trim() ? 'is-ok' : ''}">${f.name?.trim() ? '✓' : '○'} Name</div>+ <div class="deploy-check ${f.description?.trim() ? 'is-ok' : ''}">${f.description?.trim() ? '✓' : '○'} Description</div>+ <div class="deploy-check ${this._hasAvatar() ? 'is-ok' : ''}">${this._hasAvatar() ? '✓' : '○'} Avatar</div>+ <div class="deploy-check ${this._walletReady() ? 'is-ok' : ''}">${this._walletReady() ? '✓' : '○'} Wallet</div></div>`;++ if (needsRebuild) {+ rail.innerHTML = `+ <div class="deploy-preview-card">+ <div class="deploy-preview-eyebrow">Live preview</div>+ <div class="deploy-preview-thumb" data-role="thumb">${this._previewThumbHtml(thumb)}</div>+ <div data-role="info">${infoHtml}</div>+ </div>+ `;+ this._lastPreviewThumbKey = thumbKey;+ if (thumb.kind === 'glb') this._ensureModelViewer();+ } else {+ const info = rail.querySelector('[data-role="info"]');+ if (info) info.innerHTML = infoHtml;+ }+ }++ _previewThumbSource() {+ const f = this.form;+ const url = f.imageUrl?.trim();+ if (url) return { kind: 'img', src: url };+ const glb = this._currentGlbUrl();+ if (glb) return { kind: 'glb', src: glb };+ return { kind: 'none' };+ }++ _previewThumbHtml(thumb) {+ if (thumb.kind === 'img') {+ return `<img src="${esc(thumb.src)}" alt="" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" />+ <div class="deploy-preview-ph" style="display:none">Image failed to load</div>`;+ }+ if (thumb.kind === 'glb') {+ return `<model-viewer+ class="deploy-preview-mv"+ src="${esc(thumb.src)}"+ alt="Agent avatar preview"+ camera-controls+ auto-rotate+ rotation-per-second="14deg"+ interaction-prompt="none"+ exposure="1.05"+ shadow-intensity="0.6"+ environment-image="neutral"+ reveal="auto"+ ></model-viewer>`;+ }+ return `<div class="deploy-preview-ph">No image yet</div>`;+ }++ _currentGlbUrl() {+ const f = this.form;+ const s = f.avatarSource;+ if (s === 'current' && f.glbUrl) return f.glbUrl;+ if (s === 'saved' && f.savedAvatar?.url) return f.savedAvatar.url;+ if (s === 'upload' && f.glbFile) {+ if (this._uploadedGlbFile !== f.glbFile) {+ if (this._uploadedGlbObjectUrl) URL.revokeObjectURL(this._uploadedGlbObjectUrl);+ this._uploadedGlbObjectUrl = URL.createObjectURL(f.glbFile);+ this._uploadedGlbFile = f.glbFile;+ }+ return this._uploadedGlbObjectUrl;+ }+ if (s === 'url' && f.pastedGlbUrl?.trim()) return f.pastedGlbUrl.trim();+ if (s === 'default' && f.defaultAvatarId) {+ const def = getDefaultAvatar(f.defaultAvatarId);+ return def?.url || null;+ }+ // Fall back to viewer's current model even when avatarSource isn't 'current'+ // — so the user always sees something during early form editing.+ if (f.glbUrl) return f.glbUrl;+ return null;+ }++ _ensureModelViewer() {+ if (customElements.get('model-viewer')) return Promise.resolve();+ if (this._mvLoading) return this._mvLoading;+ this._mvLoading = new Promise((resolve, reject) => {+ const s = document.createElement('script');+ s.type = 'module';+ s.src = 'https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js';+ s.onload = () => resolve();+ s.onerror = () => reject(new Error('model-viewer failed to load'));+ document.head.appendChild(s);+ });+ return this._mvLoading;}_hasAvatar() {diff --git a/src/glb-canonicalize.js b/src/glb-canonicalize.jsnew file mode 100644index 000000000..af1f4f516--- /dev/null+++ b/src/glb-canonicalize.js@@ -0,0 +1,194 @@+// GLB bone-name canonicalizer — rewrites joint node names in an uploaded+// humanoid GLB so they match the three.ws canonical bone set, letting the+// pre-baked Mixamo animation library play on any rig variant.+//+// Handled name variants:+// • Mixamo: `mixamorig:LeftArm`, `mixamorig1:LeftArm`, `mixamorigLeftArm`+// • Blender: `Armature_LeftArm`, `Armature/LeftArm`+// • Rigify: `DEF-LeftArm`, `ORG-LeftArm`, `MCH-LeftArm`+// • snake_case: `left_arm`, `Left_Arm`+// • kebab-case: `left-arm`+// • lowercase: `leftarm`, `lefthand`+//+// VRM-style names (`J_Bip_L_UpperArm`) and skeletons that aren't humanoid+// (quadrupeds, custom rigs) deliberately fall through unchanged — there's no+// safe automatic mapping for those.+//+// This module is pure JS — works in Node (vitest) and in the browser. It+// rewrites the GLB JSON chunk in-place and repacks the binary container so+// the result is a valid GLB that swaps in 1:1 at the same R2 storage key.++const GLB_MAGIC = 0x46546c67; // 'glTF' little-endian+const CHUNK_TYPE_JSON = 0x4e4f534a; // 'JSON'++// Canonical humanoid bone set. Mirrors the rig used by scripts/build-animations.mjs+// (cz.glb / Avaturn reference rig) — every animation clip in /public/animations/clips+// addresses tracks by these exact names.+export const CANONICAL_BONES = Object.freeze([+ 'Hips', 'Spine', 'Spine1', 'Spine2', 'Neck', 'Head',+ 'LeftShoulder', 'LeftArm', 'LeftForeArm', 'LeftHand',+ 'LeftHandIndex1', 'LeftHandIndex2', 'LeftHandIndex3',+ 'LeftHandMiddle1', 'LeftHandMiddle2', 'LeftHandMiddle3',+ 'LeftHandPinky1', 'LeftHandPinky2', 'LeftHandPinky3',+ 'LeftHandRing1', 'LeftHandRing2', 'LeftHandRing3',+ 'LeftHandThumb1', 'LeftHandThumb2', 'LeftHandThumb3',+ 'RightShoulder', 'RightArm', 'RightForeArm', 'RightHand',+ 'RightHandIndex1', 'RightHandIndex2', 'RightHandIndex3',+ 'RightHandMiddle1', 'RightHandMiddle2', 'RightHandMiddle3',+ 'RightHandPinky1', 'RightHandPinky2', 'RightHandPinky3',+ 'RightHandRing1', 'RightHandRing2', 'RightHandRing3',+ 'RightHandThumb1', 'RightHandThumb2', 'RightHandThumb3',+ 'LeftUpLeg', 'LeftLeg', 'LeftFoot', 'LeftToeBase',+ 'RightUpLeg', 'RightLeg', 'RightFoot', 'RightToeBase',+]);++// Lookup map: separator-stripped, lowercased variant → canonical name.+// Built once at module load so canonicalizeBoneName() runs in O(1).+const LOOKUP = (() => {+ const m = new Map();+ for (const canonical of CANONICAL_BONES) {+ m.set(canonical.toLowerCase(), canonical);+ }+ return m;+})();++/**+ * Reduce a bone name to its canonical three.ws form, or null if it doesn't+ * correspond to a recognised humanoid bone.+ *+ * @param {string} name+ * @returns {string|null}+ */+export function canonicalizeBoneName(name) {+ if (typeof name !== 'string' || !name) return null;+ let s = name;+ // Strip well-known vendor prefixes (case-insensitive, in priority order).+ s = s.replace(/^mixamorig\d*[_:]?/i, '');+ s = s.replace(/^Armature[_/]?/i, '');+ s = s.replace(/^(DEF|ORG|MCH)[-_]/i, '');+ // Collapse separators so `Left_Arm`, `left-arm`, `left arm`, `LeftArm` all+ // reach the same lookup key.+ const key = s.replace(/[-_\s]+/g, '').toLowerCase();+ return LOOKUP.get(key) ?? null;+}++/**+ * Walk a parsed glTF JSON object and canonicalize joint-node names in place.+ * Only nodes referenced from `skins[].joints[]` are touched — non-bone nodes+ * (meshes, cameras, lights) keep their original names.+ *+ * @param {object} json - parsed glTF JSON+ * @returns {{ renamed: number, samples: Array<{ from: string, to: string }> }}+ */+export function canonicalizeJointNodes(json) {+ if (!json || !Array.isArray(json.nodes) || !Array.isArray(json.skins)) {+ return { renamed: 0, samples: [] };+ }+ const jointIndices = new Set();+ for (const skin of json.skins) {+ if (Array.isArray(skin.joints)) {+ for (const idx of skin.joints) jointIndices.add(idx);+ }+ }+ let renamed = 0;+ const samples = [];+ for (const idx of jointIndices) {+ const node = json.nodes[idx];+ if (!node || typeof node.name !== 'string') continue;+ const canonical = canonicalizeBoneName(node.name);+ if (canonical && canonical !== node.name) {+ if (samples.length < 5) samples.push({ from: node.name, to: canonical });+ node.name = canonical;+ renamed++;+ }+ }+ return { renamed, samples };+}++/**+ * Canonicalize joint bone names in a GLB ArrayBuffer. Returns a new buffer+ * with renamed nodes (and the count of bones rewritten); the original buffer+ * is left untouched. If no bones needed renaming the original buffer is+ * returned by reference so callers can skip a redundant re-upload.+ *+ * Throws on a malformed GLB header so upload code can surface a clear error.+ *+ * @param {ArrayBuffer} arrayBuffer+ * @returns {{ buffer: ArrayBuffer, renamed: number, samples: Array<{from:string,to:string}> }}+ */+export function canonicalizeGLBBones(arrayBuffer) {+ if (!(arrayBuffer instanceof ArrayBuffer)) {+ throw new TypeError('canonicalizeGLBBones: ArrayBuffer required');+ }+ if (arrayBuffer.byteLength < 20) {+ throw new Error('canonicalizeGLBBones: buffer too small to be a GLB');+ }+ const view = new DataView(arrayBuffer);+ if (view.getUint32(0, true) !== GLB_MAGIC) {+ throw new Error('canonicalizeGLBBones: not a GLB (bad magic number)');+ }+ if (view.getUint32(4, true) !== 2) {+ throw new Error('canonicalizeGLBBones: only GLB v2 is supported');+ }++ // Parse chunk 0 (JSON, required by spec).+ const c0Len = view.getUint32(12, true);+ const c0Type = view.getUint32(16, true);+ if (c0Type !== CHUNK_TYPE_JSON) {+ throw new Error('canonicalizeGLBBones: chunk 0 must be JSON');+ }+ const jsonBytes = new Uint8Array(arrayBuffer, 20, c0Len);+ let json;+ try {+ json = JSON.parse(new TextDecoder().decode(jsonBytes));+ } catch (err) {+ throw new Error('canonicalizeGLBBones: JSON chunk parse failed: ' + err.message);+ }++ const { renamed, samples } = canonicalizeJointNodes(json);+ if (renamed === 0) {+ return { buffer: arrayBuffer, renamed: 0, samples: [] };+ }++ // Repack. Chunk 1 (BIN) is optional — preserve it verbatim if present.+ const c1Offset = 20 + c0Len;+ let c1Len = 0, c1Type = 0, binBytes = null;+ if (c1Offset + 8 <= arrayBuffer.byteLength) {+ c1Len = view.getUint32(c1Offset, true);+ c1Type = view.getUint32(c1Offset + 4, true);+ binBytes = new Uint8Array(arrayBuffer, c1Offset + 8, c1Len);+ }++ // Re-serialise JSON; GLB requires each chunk's data to be 4-byte aligned,+ // padded with 0x20 (space) for the JSON chunk per the glTF 2.0 spec.+ let newJsonBytes = new TextEncoder().encode(JSON.stringify(json));+ const jsonPad = (4 - (newJsonBytes.length % 4)) % 4;+ if (jsonPad) {+ const padded = new Uint8Array(newJsonBytes.length + jsonPad);+ padded.set(newJsonBytes);+ for (let i = 0; i < jsonPad; i++) padded[newJsonBytes.length + i] = 0x20;+ newJsonBytes = padded;+ }++ const totalLen = 12 + 8 + newJsonBytes.length + (binBytes ? 8 + binBytes.length : 0);+ const out = new ArrayBuffer(totalLen);+ const outView = new DataView(out);+ const outU8 = new Uint8Array(out);++ outView.setUint32(0, GLB_MAGIC, true);+ outView.setUint32(4, 2, true);+ outView.setUint32(8, totalLen, true);++ outView.setUint32(12, newJsonBytes.length, true);+ outView.setUint32(16, CHUNK_TYPE_JSON, true);+ outU8.set(newJsonBytes, 20);++ if (binBytes) {+ const binOffset = 20 + newJsonBytes.length;+ outView.setUint32(binOffset, c1Len, true);+ outView.setUint32(binOffset + 4, c1Type, true);+ outU8.set(binBytes, binOffset + 8);+ }++ return { buffer: out, renamed, samples };+}diff --git a/src/voice/arkit-blendshapes.js b/src/voice/arkit-blendshapes.jsnew file mode 100644index 000000000..3d61ef95e--- /dev/null+++ b/src/voice/arkit-blendshapes.js@@ -0,0 +1,295 @@+/**+ * ARKit 52-blendshape vocabulary + cross-format mapping.+ *+ * ARKit defines the de-facto industry-standard set of 52 facial blendshape+ * names (mouth, eye, brow, cheek, nose, jaw, tongue). three.ws standardizes+ * on these names because:+ *+ * 1. Most modern avatar pipelines (Avaturn, Apple Live Link, MetaHuman,+ * Wolf3D, Hyprface, Polywink) export with these names already.+ * 2. They're orthogonal — overlaying a smile on top of a jaw-open works+ * cleanly; in contrast, VRM's monolithic "A"/"I"/"U"/"E"/"O" shapes+ * conflict when blended.+ * 3. They map cleanly to Preston-Blair / Disney 12-viseme phoneme sets,+ * which is what real-time lipsync drivers want.+ *+ * This module is *pure data + helpers*: no DOM, no three.js, no async I/O.+ * Anything that touches a loaded GLB lives in avatar-morph-target.js and+ * imports from here.+ */++// ── Canonical 52 ARKit blendshape names ─────────────────────────────────++export const ARKIT_NAMES = [+ // brow+ 'browDownLeft', 'browDownRight', 'browInnerUp', 'browOuterUpLeft', 'browOuterUpRight',+ // cheek+ 'cheekPuff', 'cheekSquintLeft', 'cheekSquintRight',+ // eye+ 'eyeBlinkLeft', 'eyeBlinkRight',+ 'eyeLookDownLeft', 'eyeLookDownRight',+ 'eyeLookInLeft', 'eyeLookInRight',+ 'eyeLookOutLeft', 'eyeLookOutRight',+ 'eyeLookUpLeft', 'eyeLookUpRight',+ 'eyeSquintLeft', 'eyeSquintRight',+ 'eyeWideLeft', 'eyeWideRight',+ // jaw+ 'jawForward', 'jawLeft', 'jawOpen', 'jawRight',+ // mouth+ 'mouthClose', 'mouthDimpleLeft', 'mouthDimpleRight',+ 'mouthFrownLeft', 'mouthFrownRight',+ 'mouthFunnel',+ 'mouthLeft', 'mouthLowerDownLeft', 'mouthLowerDownRight',+ 'mouthPressLeft', 'mouthPressRight',+ 'mouthPucker',+ 'mouthRight',+ 'mouthRollLower', 'mouthRollUpper',+ 'mouthShrugLower', 'mouthShrugUpper',+ 'mouthSmileLeft', 'mouthSmileRight',+ 'mouthStretchLeft', 'mouthStretchRight',+ 'mouthUpperUpLeft', 'mouthUpperUpRight',+ // nose+ 'noseSneerLeft', 'noseSneerRight',+ // tongue+ 'tongueOut',+];++export const ARKIT_GROUPS = {+ brow: ['browDownLeft', 'browDownRight', 'browInnerUp', 'browOuterUpLeft', 'browOuterUpRight'],+ cheek: ['cheekPuff', 'cheekSquintLeft', 'cheekSquintRight'],+ eye: [+ 'eyeBlinkLeft', 'eyeBlinkRight',+ 'eyeLookDownLeft', 'eyeLookDownRight',+ 'eyeLookInLeft', 'eyeLookInRight',+ 'eyeLookOutLeft', 'eyeLookOutRight',+ 'eyeLookUpLeft', 'eyeLookUpRight',+ 'eyeSquintLeft', 'eyeSquintRight',+ 'eyeWideLeft', 'eyeWideRight',+ ],+ jaw: ['jawForward', 'jawLeft', 'jawOpen', 'jawRight'],+ mouth: [+ 'mouthClose', 'mouthDimpleLeft', 'mouthDimpleRight',+ 'mouthFrownLeft', 'mouthFrownRight',+ 'mouthFunnel',+ 'mouthLeft', 'mouthLowerDownLeft', 'mouthLowerDownRight',+ 'mouthPressLeft', 'mouthPressRight',+ 'mouthPucker', 'mouthRight',+ 'mouthRollLower', 'mouthRollUpper',+ 'mouthShrugLower', 'mouthShrugUpper',+ 'mouthSmileLeft', 'mouthSmileRight',+ 'mouthStretchLeft', 'mouthStretchRight',+ 'mouthUpperUpLeft', 'mouthUpperUpRight',+ ],+ nose: ['noseSneerLeft', 'noseSneerRight'],+ tongue: ['tongueOut'],+};++// ── VRM expression → ARKit weighted shape map ──────────────────────────+//+// VRM (Pixiv / Niconi standard) ships monolithic expression names. Map each+// to a *weighted combination* of orthogonal ARKit shapes so we can render+// VRM-tagged emotions on ARKit rigs without losing fidelity.++export const VRM_TO_ARKIT = {+ // Vowel mouth shapes — VRM canonical+ Aa: { jawOpen: 1.0 },+ A: { jawOpen: 1.0 },+ Ah: { jawOpen: 1.0 },+ Ih: { mouthStretchLeft: 0.7, mouthStretchRight: 0.7, mouthSmileLeft: 0.25, mouthSmileRight: 0.25 },+ I: { mouthStretchLeft: 0.7, mouthStretchRight: 0.7, mouthSmileLeft: 0.25, mouthSmileRight: 0.25 },+ Ou: { mouthFunnel: 0.7, mouthPucker: 0.4, jawOpen: 0.2 },+ U: { mouthFunnel: 0.7, mouthPucker: 0.4, jawOpen: 0.2 },+ Ee: { mouthSmileLeft: 0.55, mouthSmileRight: 0.55, mouthStretchLeft: 0.35, mouthStretchRight: 0.35, jawOpen: 0.2 },+ E: { mouthSmileLeft: 0.55, mouthSmileRight: 0.55, mouthStretchLeft: 0.35, mouthStretchRight: 0.35, jawOpen: 0.2 },+ Oh: { jawOpen: 0.55, mouthFunnel: 0.55 },+ O: { jawOpen: 0.55, mouthFunnel: 0.55 },++ // VRM emotions+ Joy: { mouthSmileLeft: 0.9, mouthSmileRight: 0.9, cheekSquintLeft: 0.4, cheekSquintRight: 0.4, eyeSquintLeft: 0.3, eyeSquintRight: 0.3 },+ Happy: { mouthSmileLeft: 0.9, mouthSmileRight: 0.9, cheekSquintLeft: 0.4, cheekSquintRight: 0.4, eyeSquintLeft: 0.3, eyeSquintRight: 0.3 },+ Angry: { browDownLeft: 0.9, browDownRight: 0.9, noseSneerLeft: 0.4, noseSneerRight: 0.4, mouthFrownLeft: 0.5, mouthFrownRight: 0.5 },+ Sad: { browInnerUp: 0.7, mouthFrownLeft: 0.6, mouthFrownRight: 0.6, eyeLookDownLeft: 0.3, eyeLookDownRight: 0.3 },+ Surprised: { eyeWideLeft: 0.9, eyeWideRight: 0.9, browInnerUp: 0.7, browOuterUpLeft: 0.6, browOuterUpRight: 0.6, jawOpen: 0.5 },+ Fun: { mouthSmileLeft: 0.7, mouthSmileRight: 0.7, cheekSquintLeft: 0.3, cheekSquintRight: 0.3 },++ // VRM blinks (commonly named just 'Blink')+ Blink: { eyeBlinkLeft: 1.0, eyeBlinkRight: 1.0 },+ BlinkL: { eyeBlinkLeft: 1.0 },+ BlinkR: { eyeBlinkRight: 1.0 },+};++// ── Oculus / Meta visemes → ARKit ───────────────────────────────────────+//+// Oculus ship a 15-viseme set used by their Lipsync SDK. Many avatars produced+// for Meta apps carry these morph names verbatim.++export const OCULUS_TO_ARKIT = {+ viseme_sil: {},+ viseme_PP: { mouthClose: 0.9, mouthPressLeft: 0.4, mouthPressRight: 0.4 },+ viseme_FF: { mouthLowerDownLeft: 0.4, mouthLowerDownRight: 0.4, mouthUpperUpLeft: 0.2, mouthUpperUpRight: 0.2 },+ viseme_TH: { jawOpen: 0.25, tongueOut: 0.5 },+ viseme_DD: { jawOpen: 0.3, tongueOut: 0.15 },+ viseme_kk: { jawOpen: 0.35 },+ viseme_CH: { mouthFunnel: 0.45, mouthPucker: 0.4, jawOpen: 0.25 },+ viseme_SS: { mouthStretchLeft: 0.3, mouthStretchRight: 0.3 },+ viseme_nn: { jawOpen: 0.2, tongueOut: 0.15 },+ viseme_RR: { mouthFunnel: 0.4, jawOpen: 0.25 },+ viseme_aa: { jawOpen: 0.95 },+ viseme_E: { mouthSmileLeft: 0.55, mouthSmileRight: 0.55, jawOpen: 0.25 },+ viseme_I: { mouthStretchLeft: 0.65, mouthStretchRight: 0.65 },+ viseme_O: { jawOpen: 0.5, mouthFunnel: 0.55 },+ viseme_U: { mouthFunnel: 0.7, mouthPucker: 0.45 },+};++// ── Preston-Blair phoneme codes → ARKit ─────────────────────────────────+//+// The classic 9-viseme cartoon-animation set, useful as a fallback when only+// rough phoneme estimates are available (e.g. from amplitude-band heuristics+// in lipsync-driver.js).++export const PHONEME_TO_ARKIT = {+ // closed lips (M, B, P)+ MBP: { mouthClose: 0.95, mouthPressLeft: 0.35, mouthPressRight: 0.35 },+ // open vowel (A, I as in "cat")+ AI: { jawOpen: 0.75, mouthSmileLeft: 0.2, mouthSmileRight: 0.2 },+ // open-front (E as in "ten")+ E: { jawOpen: 0.45, mouthSmileLeft: 0.45, mouthSmileRight: 0.45 },+ // open-back (O as in "boat")+ O: { jawOpen: 0.55, mouthFunnel: 0.55 },+ // rounded (U as in "boot", W)+ U: { mouthFunnel: 0.7, mouthPucker: 0.45 },+ // L (tongue up)+ L: { jawOpen: 0.3, tongueOut: 0.25 },+ // F / V (lip-teeth)+ FV: { mouthLowerDownLeft: 0.45, mouthLowerDownRight: 0.45, mouthUpperUpLeft: 0.25, mouthUpperUpRight: 0.25 },+ // W / Q (puckered)+ WQ: { mouthPucker: 0.7, mouthFunnel: 0.45 },+ // silence / rest+ REST: {},+};++// ── Name resolution ─────────────────────────────────────────────────────+//+// Different riggers spell ARKit names with different casing and separators+// (jawOpen, JawOpen, jaw_open, Jaw_Open, jaw-open, ARKit_JawOpen, …). This+// helper normalizes any incoming string to its canonical lowercase token so+// lookups across pipelines work without per-rigger branches.++function normalizeToken(name) {+ return String(name || '')+ .replace(/^arkit[_-]?/i, '')+ .replace(/[_\-\s]+/g, '')+ .toLowerCase();+}++const _canonicalIndex = new Map(ARKIT_NAMES.map((n) => [normalizeToken(n), n]));++/**+ * Resolve any spelling of a morph name to its canonical ARKit name, or null+ * if it doesn't match a known ARKit shape. Case- and separator-insensitive.+ */+export function canonicalARKitName(name) {+ if (!name) return null;+ return _canonicalIndex.get(normalizeToken(name)) || null;+}++/**+ * Given a morph dictionary from a loaded mesh (mapping morph name → index),+ * return a Map from canonical ARKit name → morph index. Drops any morphs+ * that don't correspond to a known ARKit shape.+ */+export function indexARKitMorphs(morphDict) {+ const result = new Map();+ if (!morphDict) return result;+ for (const [name, idx] of Object.entries(morphDict)) {+ const canonical = canonicalARKitName(name);+ if (canonical && !result.has(canonical)) {+ result.set(canonical, idx);+ }+ }+ return result;+}++/**+ * Coverage report for an indexed mesh — useful for showing operators which+ * groups a particular GLB supports (and to gate UI features that depend on+ * specific shape availability, e.g. eye-look requires the eye group).+ */+export function coverageOf(arkitIndex) {+ const report = {};+ let total = 0;+ let found = 0;+ for (const [group, names] of Object.entries(ARKIT_GROUPS)) {+ const present = names.filter((n) => arkitIndex.has(n));+ report[group] = {+ present: present.length,+ total: names.length,+ missing: names.filter((n) => !arkitIndex.has(n)),+ };+ total += names.length;+ found += present.length;+ }+ report.overall = { present: found, total, ratio: total ? found / total : 0 };+ return report;+}++// ── Weighted-shape application ───────────────────────────────────────────++/**+ * Resolve a "high-level shape" — VRM name, Oculus viseme, Preston-Blair+ * phoneme code, OR a raw ARKit name — to a `{ arkitName: weight }` map.+ *+ * Returns an empty object for unknown inputs.+ */+export function resolveShape(name) {+ if (!name) return {};+ // Direct ARKit hit?+ const canon = canonicalARKitName(name);+ if (canon) return { [canon]: 1 };+ // Indirect maps — case-sensitive on purpose, the keys above are the+ // canonical spellings emitted by each upstream pipeline.+ if (name in VRM_TO_ARKIT) return { ...VRM_TO_ARKIT[name] };+ if (name in OCULUS_TO_ARKIT) return { ...OCULUS_TO_ARKIT[name] };+ if (name in PHONEME_TO_ARKIT) return { ...PHONEME_TO_ARKIT[name] };+ // Case-insensitive retry on the indirect maps so callers don't have to+ // match the exact studly-caps spelling.+ const lower = String(name).toLowerCase();+ for (const map of [VRM_TO_ARKIT, OCULUS_TO_ARKIT, PHONEME_TO_ARKIT]) {+ for (const k of Object.keys(map)) {+ if (k.toLowerCase() === lower) return { ...map[k] };+ }+ }+ return {};+}++/**+ * Blend any number of shape inputs (each either a string label or an+ * already-resolved `{ arkitName: weight }` map) into a single ARKit map.+ *+ * Same name across inputs: takes the MAX weight (not sum). This mirrors how+ * cinematic facial-rig software blends visemes — additive blending of+ * orthogonal mouth shapes produces broken poses; max keeps the strongest+ * activation per channel.+ */+export function blendShapes(...inputs) {+ const out = {};+ for (const input of inputs) {+ if (!input) continue;+ const resolved = typeof input === 'string' ? resolveShape(input) : input;+ for (const [k, v] of Object.entries(resolved)) {+ const canon = canonicalARKitName(k);+ if (!canon) continue;+ const w = clamp01(v);+ if (w > (out[canon] || 0)) out[canon] = w;+ }+ }+ return out;+}++function clamp01(n) {+ const v = Number(n);+ if (!Number.isFinite(v)) return 0;+ if (v < 0) return 0;+ if (v > 1) return 1;+ return v;+}diff --git a/src/voice/avatar-snapshot.js b/src/voice/avatar-snapshot.jsnew file mode 100644index 000000000..e932ae129--- /dev/null+++ b/src/voice/avatar-snapshot.js@@ -0,0 +1,139 @@+/**+ * Avatar snapshot capture + upload.+ *+ * Given a TalkScene-shaped renderer (anything that exposes+ * `.renderer.domElement` as a WebGL canvas), grabs a JPEG poster of the+ * current view and shuttles it through three.ws's existing thumbnail flow:+ *+ * POST /api/avatars/:id?action=presign-thumbnail → presigned PUT URL+ * PUT <upload_url> → JPEG bytes+ * POST /api/avatars/:id?action=auto-tag → sets thumbnail_key,+ * runs Claude vision+ * for tags + desc+ *+ * All three calls are real wires against the existing endpoints in+ * api/avatars/_actions.js. The auto-tag step is best-effort: a failure+ * there doesn't undo the thumbnail upload.+ *+ * Intended caller: avatar-edit.js after a successful Save. The render is+ * driven through the already-mounted TalkScene so we don't pay for a second+ * GLB load.+ */++const JPEG_QUALITY = 0.86;+const MIN_BYTES = 2_000; // smaller than this means the canvas is blank+const MAX_BYTES = 2 * 1024 * 1024; // 2 MB ceiling (matches server-side cap)++/**+ * Capture the current frame of the scene's WebGL canvas as a JPEG Blob.+ *+ * three.js renders with `preserveDrawingBuffer: false` by default, which+ * means `canvas.toBlob` after the render-loop tick can hand back a blank+ * frame. We force one render via the scene's renderer immediately before+ * reading the pixels so the result is whatever's currently on screen.+ *+ * @param {{ renderer:any, scene:any, camera:any }} talkScene+ * @returns {Promise<Blob>}+ */+export function captureSnapshotBlob(talkScene) {+ if (!talkScene?.renderer || !talkScene.scene || !talkScene.camera) {+ throw new Error('captureSnapshotBlob: scene/renderer/camera required');+ }+ // Force a synchronous render so toBlob sees a fresh frame even if the+ // backing buffer was cleared by the previous tick.+ talkScene.renderer.render(talkScene.scene, talkScene.camera);+ const canvas = talkScene.renderer.domElement;+ if (!canvas || typeof canvas.toBlob !== 'function') {+ throw new Error('captureSnapshotBlob: renderer.domElement is not an HTMLCanvasElement');+ }+ return new Promise((resolve, reject) => {+ canvas.toBlob(+ (blob) => {+ if (!blob) return reject(new Error('canvas.toBlob returned null'));+ if (blob.size < MIN_BYTES) {+ return reject(new Error('snapshot is suspiciously small — likely a blank frame'));+ }+ if (blob.size > MAX_BYTES) {+ return reject(new Error(`snapshot too large: ${blob.size} > ${MAX_BYTES}`));+ }+ resolve(blob);+ },+ 'image/jpeg',+ JPEG_QUALITY,+ );+ });+}++/**+ * End-to-end: capture → presign → PUT → auto-tag.+ *+ * Returns `{ ok: true, thumbKey, autoTagged }` on success. Throws on a+ * presign or upload failure; logs and continues on auto-tag failure (the+ * thumbnail itself is still in R2 and will get linked to the avatar by the+ * next auto-tag call).+ *+ * @param {object} args+ * @param {string} args.avatarId+ * @param {{ renderer:any, scene:any, camera:any }} args.scene+ * @returns {Promise<{ ok: true, thumbKey: string, autoTagged: object | null }>}+ */+export async function uploadAvatarSnapshot({ avatarId, scene }) {+ if (!avatarId) throw new Error('uploadAvatarSnapshot: avatarId required');+ const blob = await captureSnapshotBlob(scene);++ // 1) Presign+ const presignRes = await fetch(+ `/api/avatars/${encodeURIComponent(avatarId)}?action=presign-thumbnail`,+ {+ method: 'POST',+ credentials: 'include',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ avatar_id: avatarId, size_bytes: blob.size }),+ },+ );+ if (!presignRes.ok) {+ const j = await presignRes.json().catch(() => ({}));+ throw new Error(j.error_description || `presign-thumbnail failed (${presignRes.status})`);+ }+ const { thumb_key, upload_url } = await presignRes.json();+ if (!thumb_key || !upload_url) {+ throw new Error('presign-thumbnail returned no upload target');+ }++ // 2) PUT bytes to R2+ const putRes = await fetch(upload_url, {+ method: 'PUT',+ headers: { 'content-type': 'image/jpeg' },+ body: blob,+ });+ if (!putRes.ok) {+ throw new Error(`R2 upload failed (${putRes.status})`);+ }++ // 3) auto-tag — sets thumbnail_key on the avatar + best-effort tags via+ // Claude vision. Failure here doesn't fail the snapshot.+ let autoTagged = null;+ try {+ const tagRes = await fetch(+ `/api/avatars/${encodeURIComponent(avatarId)}?action=auto-tag`,+ {+ method: 'POST',+ credentials: 'include',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ avatar_id: avatarId, thumb_key }),+ },+ );+ if (tagRes.ok) autoTagged = await tagRes.json();+ } catch (err) {+ console.warn('[snapshot] auto-tag failed, thumbnail still uploaded:', err?.message);+ }++ return { ok: true, thumbKey: thumb_key, autoTagged };+}++// Exported for tests + the rare caller that wants to inspect the constants.+export const SNAPSHOT_CONSTANTS = {+ JPEG_QUALITY,+ MIN_BYTES,+ MAX_BYTES,+};diff --git a/src/voice/camera-presets.js b/src/voice/camera-presets.jsnew file mode 100644index 000000000..871bd24bd--- /dev/null+++ b/src/voice/camera-presets.js@@ -0,0 +1,123 @@+/**+ * Camera framing presets for avatar rendering.+ *+ * Pure math — no three.js imports — so the framing logic is unit-testable in+ * isolation. TalkScene passes the result through `camera.position.set(...)` ++ * `controls.target.set(...)` + `camera.fov = ...`.+ *+ * All inputs/outputs use plain `{ x, y, z }` triplets (not THREE.Vector3) so+ * this module is portable to any renderer that consumes a position/target+ * pair: three.js, Babylon.js, model-viewer (for `camera-orbit` calcs), etc.+ *+ * Presets:+ *+ * full — entire avatar in frame, current default. Good for the+ * customizer where the user is picking outfits / shoes.+ *+ * half — upper torso + head, conversational. Default for Talk mode+ * because face-to-face is the dominant interaction.+ *+ * headshot — head + neck, intimate. Good for voice-clone QA and for+ * "your avatar said …" share cards.+ */++export const CAMERA_PRESETS = ['full', 'half', 'headshot'];++/**+ * Compute camera framing for a loaded avatar.+ *+ * @param {object} opts+ * @param {{ min: {x,y,z}, max: {x,y,z} }} opts.box — axis-aligned bounding box of the avatar root+ * @param {'full'|'half'|'headshot'} [opts.preset='full']+ * @param {number} [opts.aspectRatio=1] — viewport w/h; tighter aspects pull+ * the camera back to keep the subject+ * in frame+ * @returns {{ target: {x,y,z}, position: {x,y,z}, fov: number }}+ */+export function computeFraming({ box, preset = 'full', aspectRatio = 1 } = {}) {+ if (!box || !box.min || !box.max) {+ throw new Error('computeFraming: box with {min,max} required');+ }+ if (!CAMERA_PRESETS.includes(preset)) {+ throw new Error(`computeFraming: unknown preset "${preset}"`);+ }++ const size = {+ x: box.max.x - box.min.x,+ y: box.max.y - box.min.y,+ z: box.max.z - box.min.z,+ };+ const center = {+ x: (box.max.x + box.min.x) / 2,+ y: (box.max.y + box.min.y) / 2,+ z: (box.max.z + box.min.z) / 2,+ };++ // Treat avatar height as the dominant dimension. Most humanoid GLBs sit+ // taller than wide; a few stylized assets (chibi, mascot) are roughly+ // equal — we fall back to max(x, y) for those.+ const height = Math.max(size.y, size.x);++ const cfg = PRESET_CONFIG[preset];++ // Vertical aim: a fraction of the way *up* from the avatar's bottom.+ // 0.5 = mid-torso, 0.65 = chest, 0.85 = head, 1.0 = top of head.+ const targetY = box.min.y + height * cfg.targetFrac;++ // Distance back from the subject — scales with avatar height + tightens+ // for wider aspect ratios so the subject doesn't shrink.+ const distance = Math.max(cfg.minDistance, height * cfg.distanceMul * aspectRatio);++ // Camera height: slightly above target so the look-vector slopes very+ // gently downward. Avoids the up-the-nose angle when the avatar is short.+ const camY = targetY + height * cfg.cameraHeightOffsetMul;++ return {+ target: { x: center.x, y: targetY, z: center.z },+ position: { x: center.x, y: camY, z: center.z + distance },+ fov: cfg.fov,+ };+}++const PRESET_CONFIG = {+ full: {+ targetFrac: 0.55,+ distanceMul: 1.05,+ minDistance: 0.7,+ cameraHeightOffsetMul: 0.05,+ fov: 35,+ },+ half: {+ // Aim at sternum-height; pull in to ~70% of avatar height.+ targetFrac: 0.78,+ distanceMul: 0.75,+ minDistance: 0.55,+ cameraHeightOffsetMul: 0.02,+ // Slightly tighter FOV reads more "portrait" / "video call".+ fov: 32,+ },+ headshot: {+ // Aim near the face.+ targetFrac: 0.92,+ distanceMul: 0.45,+ minDistance: 0.35,+ cameraHeightOffsetMul: 0.0,+ fov: 28,+ },+};++/**+ * Cycle to the next preset in display order. Useful for a one-button+ * "change framing" toggle.+ */+export function nextPreset(current) {+ const idx = CAMERA_PRESETS.indexOf(current);+ if (idx < 0) return CAMERA_PRESETS[0];+ return CAMERA_PRESETS[(idx + 1) % CAMERA_PRESETS.length];+}++export const PRESET_LABELS = {+ full: 'Full body',+ half: 'Half body',+ headshot: 'Headshot',+};diff --git a/src/voice/talk-emotes.js b/src/voice/talk-emotes.jsnew file mode 100644index 000000000..eed459729--- /dev/null+++ b/src/voice/talk-emotes.js@@ -0,0 +1,145 @@+/**+ * Talk-mode emote controller.+ *+ * Wraps the existing AnimationManager (src/animation-manager.js) with:+ * - manifest fetch from /animations/manifest.json+ * - curated subset selection for the talk overlay's emote bar+ * - lazy clip load on first play (fast first paint, no eager 30-clip fetch)+ *+ * AnimationManager already handles model attachment, track filtering by bone+ * names (so unmatched-rig clips no-op cleanly), crossfade, and one-shot vs+ * looped playback. This is just the glue and the UI-facing curation.+ *+ * The bone-name filter is what makes this safe across rig conventions: the+ * retargeted clips were authored against the Avaturn skeleton, but the+ * filter drops tracks for any joint not present on the loaded avatar, so+ * applying a "dance" clip to a robot or stylized mesh either animates the+ * matching bones or no-ops — never throws.+ */++import { AnimationManager } from '../animation-manager.js';++// Curated set shown on the talk overlay's emote bar. Keep it short — too+// many buttons creates choice paralysis during a live conversation.+// Each entry's `name` must match a `name` in /animations/manifest.json.+export const TALK_EMOTE_BAR = [+ { name: 'idle', label: 'Idle', icon: '🧍', loop: true },+ { name: 'wave', label: 'Wave', icon: '👋', loop: false },+ { name: 'celebrate', label: 'Celebrate', icon: '🎉', loop: false },+ { name: 'dance', label: 'Dance', icon: '💃', loop: true },+ { name: 'reaction', label: 'React', icon: '😲', loop: false },+ { name: 'pray', label: 'Pray', icon: '🙏', loop: false },+];++export class TalkEmotes {+ constructor() {+ this._manager = new AnimationManager();+ this._defs = [];+ this._defsByName = new Map();+ this._loaded = new Set();+ this._loading = new Map(); // name → in-flight promise+ this._manifestPromise = null;+ }++ /** Attach to the live model. Call after TalkScene loads its GLB. */+ attach(model) {+ this._manager.attach(model);+ }++ detach() {+ this._manager.detach();+ }++ /** Tick the underlying AnimationMixer. Hook into the scene's RAF loop. */+ update(dt) {+ this._manager.mixer?.update(dt);+ }++ /**+ * Load the manifest. Idempotent — subsequent calls return the cached promise.+ * Returns true once defs are populated, false on failure (e.g. 404).+ *+ * Not declared `async` so the cached promise identity is preserved across+ * callers (an outer `async` wrapper would re-wrap on every invocation).+ */+ loadManifest() {+ if (this._manifestPromise) return this._manifestPromise;+ this._manifestPromise = (async () => {+ try {+ const r = await fetch('/animations/manifest.json');+ if (!r.ok) return false;+ const list = await r.json();+ if (!Array.isArray(list)) return false;+ this._defs = list;+ this._defsByName = new Map(list.map((d) => [d.name, d]));+ this._manager.setAnimationDefs(list);+ return true;+ } catch (err) {+ console.warn('[talk-emotes] manifest fetch failed:', err?.message);+ return false;+ }+ })();+ return this._manifestPromise;+ }++ /** Available emote def list — full manifest, post-load. */+ getAllDefs() {+ return this._defs;+ }++ /**+ * Return only the curated bar entries whose clip exists in the manifest.+ * If the manifest hasn't loaded yet, returns []. The talk overlay should+ * re-render after loadManifest() resolves.+ */+ getBarDefs() {+ if (!this._defs.length) return [];+ return TALK_EMOTE_BAR.filter((entry) => this._defsByName.has(entry.name));+ }++ /**+ * Play an emote by name. Lazy-loads the clip on first play; subsequent+ * plays are immediate. The clip's loop flag is fixed at load time from+ * the manifest entry.+ *+ * Returns false if the emote isn't in the manifest, true on play start.+ */+ async play(name) {+ const def = this._defsByName.get(name);+ if (!def) {+ console.warn(`[talk-emotes] unknown emote: ${name}`);+ return false;+ }++ // Lazy-load with deduplication: parallel calls for the same name share+ // one in-flight fetch.+ if (!this._loaded.has(name)) {+ let inflight = this._loading.get(name);+ if (!inflight) {+ inflight = this._manager+ .loadAnimation(name, def.url, { loop: def.loop !== false })+ .then(() => this._loaded.add(name))+ .finally(() => this._loading.delete(name));+ this._loading.set(name, inflight);+ }+ try {+ await inflight;+ } catch (err) {+ console.warn(`[talk-emotes] load failed for "${name}":`, err?.message);+ return false;+ }+ }++ // Cross-fade if something else is already playing, otherwise just play.+ if (this._manager.currentName && this._manager.currentName !== name) {+ await this._manager.crossfadeTo(name, 0.25);+ } else {+ await this._manager.play(name);+ }+ return true;+ }++ get currentEmote() {+ return this._manager.currentName;+ }+}diff --git a/src/voice/talk-mode.js b/src/voice/talk-mode.jsindex 0b0c66697..cc644b115 100644--- a/src/voice/talk-mode.js+++ b/src/voice/talk-mode.js@@ -19,6 +19,7 @@ import { TalkScene } from './talk-scene.js';import { AvatarMouthTarget } from './avatar-morph-target.js';import { TalkController } from './talk-controller.js';import { openVoiceCloneModal } from './voice-clone-modal.js';+import { nextPreset, PRESET_LABELS } from './camera-presets.js';let activeSession = null;@@ -55,6 +56,9 @@ export function openTalkMode({ avatar, systemPromptFn }) {const errEl = overlay.querySelector('.tws-talk-error');const nameEl = overlay.querySelector('.tws-talk-name');const cloneBtn = overlay.querySelector('.tws-talk-clone');+ const frameBtn = overlay.querySelector('.tws-talk-frame');+ const frameLabel = frameBtn?.querySelector('.tws-talk-frame-label');+ const emoteBar = overlay.querySelector('.tws-talk-emotes');nameEl.textContent = avatar.name || 'Avatar';// Owner-only affordance: `owner_id` is stripped from the API response for@@ -72,8 +76,8 @@ export function openTalkMode({ avatar, systemPromptFn }) {let unloading = false;scene- .mount({ container: stage, glbUrl })- .then((root) => {+ .mount({ container: stage, glbUrl, cameraPreset: 'half' })+ .then(async (root) => {scene.attachMouthTarget(mouthTarget);// Log what we found so debugging mismatched rigs in the field is easy.const diag = mouthTarget.describe();@@ -83,6 +87,13 @@ export function openTalkMode({ avatar, systemPromptFn }) {console.info('[talk] mouth binding:', diag);}setStatus(statusEl, 'idle');++ // Render the emote bar once the animation manifest is available.+ const emotes = scene.getEmoteController();+ if (emotes) {+ await emotes.loadManifest();+ renderEmoteBar(emoteBar, emotes, errEl);+ }}).catch((err) => {showError(errEl, `Could not load avatar: ${err.message}`);@@ -134,6 +145,14 @@ export function openTalkMode({ avatar, systemPromptFn }) {closeBtn.addEventListener('click', () => close());+ if (frameBtn) {+ frameBtn.addEventListener('click', () => {+ const next = nextPreset(scene.getCameraPreset?.() || 'half');+ scene.setCameraPreset?.(next);+ if (frameLabel) frameLabel.textContent = PRESET_LABELS[next] || next;+ });+ }+if (cloneBtn) {cloneBtn.addEventListener('click', () => {openVoiceCloneModal({@@ -182,11 +201,18 @@ const TEMPLATE = `<span class="tws-talk-eyebrow">Talking to</span><span class="tws-talk-name"></span></div>- <button class="tws-talk-clone" type="button" hidden aria-label="Clone your voice for this avatar">- <span aria-hidden="true">🎙️</span> Use my voice- </button>+ <div class="tws-talk-header-actions">+ <button class="tws-talk-frame" type="button" title="Cycle framing: half → headshot → full" aria-label="Cycle camera framing">+ <span aria-hidden="true">⛶</span>+ <span class="tws-talk-frame-label">Half body</span>+ </button>+ <button class="tws-talk-clone" type="button" hidden aria-label="Clone your voice for this avatar">+ <span aria-hidden="true">🎙️</span> Use my voice+ </button>+ </div></div><div class="tws-talk-stage"></div>+ <div class="tws-talk-emotes" hidden role="toolbar" aria-label="Emote shortcuts"></div><div class="tws-talk-transcript" aria-live="polite"></div><div class="tws-talk-controls"><button class="tws-talk-hold" type="button" aria-label="Hold to talk">@@ -211,6 +237,28 @@ function setStatus(el, state) {el.textContent = STATUS_LABEL[state] || state;}+function renderEmoteBar(barEl, emotes, errEl) {+ if (!barEl || !emotes) return;+ const defs = emotes.getBarDefs();+ if (!defs.length) return; // manifest didn't load or none of the curated set is shipped — keep hidden+ barEl.innerHTML = defs+ .map(+ (d) => `+ <button class="tws-talk-emote" type="button" data-name="${d.name}" title="${d.label}" aria-label="${d.label}">+ <span class="tws-talk-emote-icon" aria-hidden="true">${d.icon}</span>+ </button>+ `,+ )+ .join('');+ barEl.hidden = false;+ barEl.querySelectorAll('.tws-talk-emote').forEach((btn) => {+ btn.addEventListener('click', async () => {+ const ok = await emotes.play(btn.dataset.name);+ if (!ok && errEl) showError(errEl, `Emote "${btn.dataset.name}" could not play.`);+ });+ });+}+function appendTranscript(el, msg) {if (!el) return;const row = document.createElement('div');@@ -274,7 +322,13 @@ const TALK_CSS = `gap: 12px;}.tws-talk-header > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }-.tws-talk-clone {+.tws-talk-header-actions {+ display: flex;+ align-items: center;+ gap: 8px;+ flex-shrink: 0;+}+.tws-talk-clone, .tws-talk-frame {background: rgba(255,255,255,0.06);border: 1px solid rgba(255,255,255,0.14);color: #fafafa;@@ -285,9 +339,12 @@ const TALK_CSS = `border-radius: 999px;cursor: pointer;transition: background 0.15s, border-color 0.15s, transform 0.1s;+ display: inline-flex;+ align-items: center;+ gap: 6px;flex-shrink: 0;}-.tws-talk-clone:hover {+.tws-talk-clone:hover, .tws-talk-frame:hover {background: rgba(255,255,255,0.10);border-color: rgba(255,255,255,0.25);transform: translateY(-1px);@@ -309,6 +366,36 @@ const TALK_CSS = `.tws-talk-stage canvas {width: 100% !important; height: 100% !important; display: block;}+.tws-talk-emotes {+ display: flex;+ gap: 6px;+ padding: 8px 24px;+ overflow-x: auto;+ border-top: 1px solid rgba(255,255,255,0.06);+ background: rgba(255,255,255,0.02);+}+.tws-talk-emote {+ background: rgba(255,255,255,0.06);+ border: 1px solid rgba(255,255,255,0.12);+ color: #fafafa;+ font-family: inherit;+ font-size: 18px;+ line-height: 1;+ width: 38px;+ height: 38px;+ border-radius: 999px;+ cursor: pointer;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ transition: background 0.15s, border-color 0.15s, transform 0.1s;+ flex-shrink: 0;+}+.tws-talk-emote:hover {+ background: rgba(255,255,255,0.12);+ border-color: rgba(255,255,255,0.25);+ transform: translateY(-1px);+}.tws-talk-transcript {max-height: 160px;overflow-y: auto;diff --git a/src/voice/talk-scene.js b/src/voice/talk-scene.jsindex 4b11a6440..498fcee72 100644--- a/src/voice/talk-scene.js+++ b/src/voice/talk-scene.js@@ -19,6 +19,8 @@ import * as THREE from 'three';import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';import { OrbitControls } from 'three/addons/controls/OrbitControls.js';import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';+import { computeFraming, CAMERA_PRESETS } from './camera-presets.js';+import { TalkEmotes } from './talk-emotes.js';export class TalkScene {constructor() {@@ -37,14 +39,25 @@ export class TalkScene {this._running = false;this._resizeObserver = null;this._mouthTarget = null;+ this._cameraPreset = 'full';+ this._emotes = null;}- async mount({ container, glbUrl }) {+ async mount({ container, glbUrl, cameraPreset = 'full' }) {+ this._cameraPreset = CAMERA_PRESETS.includes(cameraPreset) ? cameraPreset : 'full';if (!container) throw new Error('TalkScene.mount: container required');if (!glbUrl) throw new Error('TalkScene.mount: glbUrl required');this.container = container;- this.renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });+ // preserveDrawingBuffer keeps the WebGL framebuffer readable via+ // `canvas.toBlob` — required for the snapshot pipeline (see+ // avatar-snapshot.js) to capture a valid JPEG after a render. The perf+ // cost is small for avatar-scale scenes; large at fullscreen-game scale.+ this.renderer = new THREE.WebGLRenderer({+ antialias: true,+ alpha: true,+ preserveDrawingBuffer: true,+ });this.renderer.setPixelRatio(window.devicePixelRatio);this.renderer.outputColorSpace = THREE.SRGBColorSpace;this.renderer.toneMapping = THREE.ACESFilmicToneMapping;@@ -106,11 +119,32 @@ export class TalkScene {if (idle) this.playAnimation(idle.name);}+ // External emote library — loads /animations/manifest.json so callers+ // can play any baked clip (wave, dance, celebrate, …) on this avatar.+ // Tracks are filtered per-bone so unmatched rigs cleanly no-op rather+ // than throwing.+ this._emotes = new TalkEmotes();+ this._emotes.attach(this.root);+ // Manifest fetch is async — fire it but don't block mount on it. The+ // caller can `await scene.getEmoteController().loadManifest()` if it+ // needs the bar populated before showing UI.+ this._emotes.loadManifest().catch(() => {});+this._installResizeObserver();this._start();return this.root;}+ /** Access the emote controller (for UI integration). */+ getEmoteController() {+ return this._emotes;+ }++ /** Convenience: play an external emote by name. */+ playEmote(name) {+ return this._emotes?.play(name) ?? Promise.resolve(false);+ }+attachMouthTarget(target) {this._mouthTarget = target;if (this.root) target.attach(this.root);@@ -139,6 +173,11 @@ export class TalkScene {if (this._rafId) cancelAnimationFrame(this._rafId);this._rafId = 0;+ if (this._emotes) {+ this._emotes.detach();+ this._emotes = null;+ }+if (this._resizeObserver) {this._resizeObserver.disconnect();this._resizeObserver = null;@@ -185,18 +224,36 @@ export class TalkScene {// ── internals ────────────────────────────────────────────────────────+ /**+ * Switch to a different camera framing preset and reframe immediately.+ * No-op if the avatar hasn't loaded yet — the next _frameAvatar() picks up+ * the new preset.+ */+ setCameraPreset(preset) {+ if (!CAMERA_PRESETS.includes(preset)) return;+ this._cameraPreset = preset;+ this._frameAvatar();+ }++ getCameraPreset() {+ return this._cameraPreset;+ }+_frameAvatar() {if (!this.root || !this.camera || !this.controls) return;- const box = new THREE.Box3().setFromObject(this.root);- const size = box.getSize(new THREE.Vector3());- const center = box.getCenter(new THREE.Vector3());- // Aim slightly above the model center — closer to the face on a humanoid.- const headY = center.y + size.y * 0.32;- this.controls.target.set(center.x, headY, center.z);- // Pull the camera back proportionally to the model height; keep a- // portrait-friendly framing (slightly above the head, slightly forward).- const dist = Math.max(0.7, size.y * 1.05);- this.camera.position.set(center.x, headY + size.y * 0.05, center.z + dist);+ const b = new THREE.Box3().setFromObject(this.root);+ const aspect = this.camera.aspect || 1;+ const framing = computeFraming({+ box: { min: { x: b.min.x, y: b.min.y, z: b.min.z }, max: { x: b.max.x, y: b.max.y, z: b.max.z } },+ preset: this._cameraPreset,+ aspectRatio: aspect,+ });+ this.controls.target.set(framing.target.x, framing.target.y, framing.target.z);+ this.camera.position.set(framing.position.x, framing.position.y, framing.position.z);+ if (this.camera.fov !== framing.fov) {+ this.camera.fov = framing.fov;+ this.camera.updateProjectionMatrix();+ }this.controls.update();}@@ -221,6 +278,7 @@ export class TalkScene {const dt = this._clock.getDelta();this.controls?.update();this.mixer?.update(dt);+ this._emotes?.update(dt);this.renderer?.render(this.scene, this.camera);this._rafId = requestAnimationFrame(tick);};diff --git a/style.css b/style.cssindex ce7465b43..df66e9bd1 100644--- a/style.css+++ b/style.css@@ -2199,6 +2199,17 @@ body.deploy-page {align-items: end;padding: var(--space-lg) 0 var(--space-md);border-bottom: 1px solid rgba(255, 255, 255, 0.06);+ /* Reset global <header> styles so the deploy hero sizes to its content+ instead of being clipped to the nav-bar height. */+ height: auto;+ line-height: normal;+ overflow: visible;+ white-space: normal;+ background: transparent;+ backdrop-filter: none;+ -webkit-backdrop-filter: none;+ -webkit-app-region: no-drag;+ z-index: auto;}.deploy-hero-text {@@ -2367,6 +2378,14 @@ body.deploy-page {display: block;}+.deploy-preview-mv {+ width: 100%;+ height: 100%;+ display: block;+ background: transparent;+ --poster-color: transparent;+}+.deploy-preview-ph {display: flex;align-items: center;diff --git a/tests/animation-state-machine.test.js b/tests/animation-state-machine.test.jsnew file mode 100644index 000000000..081aebc08--- /dev/null+++ b/tests/animation-state-machine.test.js@@ -0,0 +1,189 @@+/**+ * AnimationStateMachine — unit tests.+ *+ * The machine is pure (no Three.js); we stub `onTransition` to capture the+ * playback intents it would have issued and assert on those.+ */++import { describe, it, expect, beforeEach } from 'vitest';+import {+ AnimationStateMachine,+ DEFAULT_STATES,+ DEFAULT_TRANSITIONS,+ STATE_NAMES,+} from '../src/animation-state-machine.js';++function record() {+ const calls = [];+ const fn = (payload) => calls.push(payload);+ fn.calls = calls;+ return fn;+}++describe('AnimationStateMachine — defaults', () => {+ let onT, sm;+ beforeEach(() => {+ onT = record();+ sm = new AnimationStateMachine({}, onT);+ });++ it('exposes the canonical state list', () => {+ expect(STATE_NAMES).toEqual(['idle', 'talk', 'walk', 'react', 'emote']);+ for (const n of STATE_NAMES) expect(DEFAULT_STATES[n]?.clip).toBeTruthy();+ });++ it('starts in idle', () => {+ expect(sm.getCurrent()).toBe('idle');+ expect(sm.getCurrentClip()).toBe('idle');+ });++ it('speak → talk → speak-end → idle', () => {+ expect(sm.fire('speak')).toBe('talk');+ expect(sm.getCurrent()).toBe('talk');+ expect(sm.fire('speak-end')).toBe('idle');+ expect(onT.calls.map((c) => c.state)).toEqual(['talk', 'idle']);+ // Default talk clip falls back to idle — lip-sync handles the mouth.+ expect(onT.calls[0].clip).toBe('idle');+ expect(onT.calls[1].clip).toBe('idle');+ });++ it('walk ↔ idle round-trip with crossfade payload', () => {+ expect(sm.fire('walk')).toBe('walk');+ expect(onT.calls[0]).toMatchObject({ state: 'walk', clip: 'walk' });+ expect(onT.calls[0].crossfade).toBeGreaterThan(0);+ expect(onT.calls[0].crossfade).toBeLessThanOrEqual(5);+ sm.fire('walk-end');+ expect(sm.getCurrent()).toBe('idle');+ });++ it('a one-shot fired during talk returns to talk on react-end (not idle)', () => {+ sm.fire('speak'); // idle → talk+ expect(sm.fire('react')).toBe('react'); // talk → react+ expect(sm.fire('react-end')).toBe('talk');+ });++ it('a one-shot fired during walk returns to walk on emote-end', () => {+ sm.fire('walk');+ sm.fire('emote');+ expect(sm.fire('emote-end')).toBe('walk');+ });++ it('two stacked one-shots unwind in LIFO order', () => {+ sm.fire('speak'); // → talk+ sm.fire('react'); // → react (stack: [talk])+ sm.fire('emote'); // → emote (stack: [talk])+ // `emote-end` pops `talk`, NOT `react` — the machine never re-enters one-shots.+ expect(sm.fire('emote-end')).toBe('talk');+ expect(sm.fire('speak-end')).toBe('idle');+ });++ it('back-to-back identical fires are idempotent (no spurious transition)', () => {+ sm.fire('walk');+ const seen = onT.calls.length;+ expect(sm.fire('walk')).toBe('walk');+ expect(onT.calls.length).toBe(seen);+ });++ it('unknown event returns null and does not fire onTransition', () => {+ expect(sm.fire('jiggle')).toBeNull();+ expect(onT.calls.length).toBe(0);+ });++ it('null/empty/non-string events return null', () => {+ expect(sm.fire(null)).toBeNull();+ expect(sm.fire('')).toBeNull();+ expect(sm.fire(42)).toBeNull();+ });++ it('reset() clears the return stack and goes back to initial', () => {+ sm.fire('speak');+ sm.fire('react');+ sm.reset();+ expect(sm.getCurrent()).toBe('idle');+ // After reset, react-end has nothing to pop — stays at idle.+ expect(sm.fire('react-end')).toBe('idle');+ });++ it('onTransition errors do not crash the machine', () => {+ const noisy = new AnimationStateMachine({}, () => { throw new Error('boom'); });+ expect(() => noisy.fire('speak')).not.toThrow();+ expect(noisy.getCurrent()).toBe('talk');+ });+});++describe('AnimationStateMachine — custom graph', () => {+ it('respects per-state clip overrides', () => {+ const sm = new AnimationStateMachine(+ { states: { idle: { clip: 'breathing' }, talk: { clip: 'speech_animated' } } },+ null,+ );+ expect(sm.getCurrentClip()).toBe('breathing');+ sm.fire('speak');+ expect(sm.getCurrentClip()).toBe('speech_animated');+ });++ it('clamps crossfade to [0, 5]', () => {+ const sm = new AnimationStateMachine({+ states: { idle: { crossfade: -1 }, talk: { crossfade: 99 } },+ });+ expect(sm.states.idle.crossfade).toBe(0);+ expect(sm.states.talk.crossfade).toBe(5);+ });++ it('respects a custom event → state transition', () => {+ const onT = record();+ const sm = new AnimationStateMachine(+ { transitions: { 'sit': 'idle', 'jump': 'emote' } },+ onT,+ );+ sm.fire('sit');+ expect(sm.getCurrent()).toBe('idle');+ sm.fire('jump');+ expect(sm.getCurrent()).toBe('emote');+ });++ it('starts in a custom initial state when valid', () => {+ const sm = new AnimationStateMachine({ initial: 'walk' });+ expect(sm.getCurrent()).toBe('walk');+ });++ it('ignores an invalid initial state and falls back to idle', () => {+ const sm = new AnimationStateMachine({ initial: 'nonexistent' });+ expect(sm.getCurrent()).toBe('idle');+ });++ it('supports user-defined extra states (e.g. dance)', () => {+ const sm = new AnimationStateMachine({+ states: { dance: { clip: 'hiphop', loop: true, oneShot: false } },+ transitions: { 'party': 'dance', 'party-end': 'idle' },+ });+ expect(sm.fire('party')).toBe('dance');+ expect(sm.getCurrentClip()).toBe('hiphop');+ expect(sm.fire('party-end')).toBe('idle');+ });++ it('does not store user state overrides with invalid types', () => {+ const sm = new AnimationStateMachine({+ states: {+ idle: { clip: 123 /* not a string */ },+ talk: { loop: 'yes' /* not a boolean */ },+ },+ });+ // Invalid values are ignored; defaults remain.+ expect(sm.states.idle.clip).toBe(DEFAULT_STATES.idle.clip);+ expect(sm.states.talk.loop).toBe(DEFAULT_STATES.talk.loop);+ });+});++describe('AnimationStateMachine — onTransition payload', () => {+ it('payload contains state, def, clip, crossfade', () => {+ const onT = record();+ const sm = new AnimationStateMachine({}, onT);+ sm.fire('walk');+ const p = onT.calls[0];+ expect(p.state).toBe('walk');+ expect(p.clip).toBe('walk');+ expect(p.def).toBe(sm.states.walk);+ expect(typeof p.crossfade).toBe('number');+ });+});diff --git a/tests/arkit-blendshapes.test.js b/tests/arkit-blendshapes.test.jsnew file mode 100644index 000000000..02280cd42--- /dev/null+++ b/tests/arkit-blendshapes.test.js@@ -0,0 +1,214 @@+// Tests for the ARKit blendshape vocabulary + cross-format resolver.+//+// Pure data + helpers — no DOM, no three.js — so vitest exercises them+// directly. These guarantees protect downstream lipsync code from silent+// breakage when the upstream maps are tuned.++import { describe, it, expect } from 'vitest';+import {+ ARKIT_NAMES,+ ARKIT_GROUPS,+ VRM_TO_ARKIT,+ OCULUS_TO_ARKIT,+ PHONEME_TO_ARKIT,+ canonicalARKitName,+ indexARKitMorphs,+ coverageOf,+ resolveShape,+ blendShapes,+} from '../src/voice/arkit-blendshapes.js';++describe('ARKit vocabulary', () => {+ it('declares exactly the 52 canonical ARKit names', () => {+ // Apple's published spec: 52 blendshapes covering brow / cheek / eye /+ // jaw / mouth / nose / tongue. Drift from this number means we either+ // dropped one or added a non-standard alias — both are bugs.+ expect(ARKIT_NAMES.length).toBe(52);+ });++ it('has every name unique', () => {+ const set = new Set(ARKIT_NAMES);+ expect(set.size).toBe(ARKIT_NAMES.length);+ });++ it('every group entry is in the canonical list', () => {+ for (const [group, names] of Object.entries(ARKIT_GROUPS)) {+ for (const n of names) {+ expect(ARKIT_NAMES, `${group}.${n} not in canonical list`).toContain(n);+ }+ }+ });++ it('groups partition the full set (no missing, no extras)', () => {+ const fromGroups = new Set(Object.values(ARKIT_GROUPS).flat());+ expect(fromGroups.size).toBe(ARKIT_NAMES.length);+ for (const n of ARKIT_NAMES) {+ expect(fromGroups.has(n), `${n} not assigned to any group`).toBe(true);+ }+ });+});++describe('canonicalARKitName', () => {+ it('returns the canonical spelling for exact-case hits', () => {+ expect(canonicalARKitName('jawOpen')).toBe('jawOpen');+ expect(canonicalARKitName('mouthSmileLeft')).toBe('mouthSmileLeft');+ });++ it('is case-insensitive', () => {+ expect(canonicalARKitName('JAWOPEN')).toBe('jawOpen');+ expect(canonicalARKitName('jawopen')).toBe('jawOpen');+ expect(canonicalARKitName('Jaw_Open')).toBe('jawOpen');+ });++ it('tolerates the common ARKit_ prefix riggers add', () => {+ expect(canonicalARKitName('ARKit_jawOpen')).toBe('jawOpen');+ expect(canonicalARKitName('arkit-jawOpen')).toBe('jawOpen');+ });++ it('tolerates separator variants (_, -, space)', () => {+ expect(canonicalARKitName('mouth_smile_left')).toBe('mouthSmileLeft');+ expect(canonicalARKitName('mouth smile left')).toBe('mouthSmileLeft');+ expect(canonicalARKitName('mouth-smile-left')).toBe('mouthSmileLeft');+ });++ it('returns null for non-ARKit names', () => {+ expect(canonicalARKitName('Aa')).toBeNull(); // VRM, not ARKit+ expect(canonicalARKitName('viseme_aa')).toBeNull(); // Oculus+ expect(canonicalARKitName('totally-made-up')).toBeNull();+ expect(canonicalARKitName('')).toBeNull();+ expect(canonicalARKitName(null)).toBeNull();+ });+});++describe('indexARKitMorphs', () => {+ it('extracts only ARKit-mappable morphs from a morph dict', () => {+ const dict = {+ jawOpen: 0,+ mouthSmileLeft: 1,+ SomeOtherShape: 2,+ ARKit_eyeBlinkLeft: 3,+ 'mouth-funnel': 4,+ };+ const idx = indexARKitMorphs(dict);+ expect(idx.get('jawOpen')).toBe(0);+ expect(idx.get('mouthSmileLeft')).toBe(1);+ expect(idx.get('eyeBlinkLeft')).toBe(3);+ expect(idx.get('mouthFunnel')).toBe(4);+ expect(idx.has('SomeOtherShape')).toBe(false);+ });++ it('handles empty / null input', () => {+ expect(indexARKitMorphs(null).size).toBe(0);+ expect(indexARKitMorphs({}).size).toBe(0);+ });++ it('first occurrence wins on duplicate canonical mapping', () => {+ const dict = { jawOpen: 5, jaw_open: 9 };+ const idx = indexARKitMorphs(dict);+ // Iteration order of Object.entries is insertion order, so 5 wins.+ expect(idx.get('jawOpen')).toBe(5);+ });+});++describe('coverageOf', () => {+ it('reports per-group presence + overall ratio', () => {+ // Construct an index missing the entire eye group.+ const dict = Object.fromEntries(+ ARKIT_NAMES.filter((n) => !ARKIT_GROUPS.eye.includes(n)).map((n, i) => [n, i]),+ );+ const idx = indexARKitMorphs(dict);+ const c = coverageOf(idx);+ expect(c.eye.present).toBe(0);+ expect(c.eye.missing.length).toBe(ARKIT_GROUPS.eye.length);+ expect(c.jaw.present).toBe(ARKIT_GROUPS.jaw.length);+ expect(c.overall.present).toBe(ARKIT_NAMES.length - ARKIT_GROUPS.eye.length);+ expect(c.overall.ratio).toBeGreaterThan(0.5);+ expect(c.overall.ratio).toBeLessThan(1);+ });+});++describe('resolveShape', () => {+ it('returns a single-key map for direct ARKit hits', () => {+ expect(resolveShape('jawOpen')).toEqual({ jawOpen: 1 });+ expect(resolveShape('JAW_OPEN')).toEqual({ jawOpen: 1 });+ });++ it('expands VRM expressions to weighted ARKit maps', () => {+ const r = resolveShape('Aa');+ expect(r.jawOpen).toBe(1.0);+ });++ it('expands Oculus visemes', () => {+ const r = resolveShape('viseme_O');+ expect(r.jawOpen).toBeGreaterThan(0);+ expect(r.mouthFunnel).toBeGreaterThan(0);+ });++ it('expands Preston-Blair phoneme codes', () => {+ const r = resolveShape('MBP');+ expect(r.mouthClose).toBeGreaterThan(0.8);+ });++ it('returns empty for unknown inputs', () => {+ expect(resolveShape('completely-unknown')).toEqual({});+ expect(resolveShape('')).toEqual({});+ expect(resolveShape(null)).toEqual({});+ });++ it('every weighted map value is in [0, 1]', () => {+ const maps = [VRM_TO_ARKIT, OCULUS_TO_ARKIT, PHONEME_TO_ARKIT];+ for (const map of maps) {+ for (const [shape, weights] of Object.entries(map)) {+ for (const [k, v] of Object.entries(weights)) {+ expect(v, `${shape}.${k} out of range`).toBeGreaterThanOrEqual(0);+ expect(v, `${shape}.${k} out of range`).toBeLessThanOrEqual(1);+ }+ }+ }+ });++ it('every weighted map references only canonical ARKit names', () => {+ const maps = [VRM_TO_ARKIT, OCULUS_TO_ARKIT, PHONEME_TO_ARKIT];+ for (const map of maps) {+ for (const [shape, weights] of Object.entries(map)) {+ for (const k of Object.keys(weights)) {+ expect(canonicalARKitName(k), `${shape} → ${k} not ARKit`).toBe(k);+ }+ }+ }+ });+});++describe('blendShapes', () => {+ it('merges shape inputs with max-per-channel', () => {+ const out = blendShapes('jawOpen', { jawOpen: 0.4, mouthSmileLeft: 0.5 });+ // Direct ARKit hit gives jawOpen: 1; the explicit 0.4 doesn't lower it.+ expect(out.jawOpen).toBe(1);+ expect(out.mouthSmileLeft).toBe(0.5);+ });++ it('canonicalizes non-canonical keys in raw input maps', () => {+ const out = blendShapes({ Jaw_Open: 0.6 });+ expect(out.jawOpen).toBeCloseTo(0.6);+ });++ it('drops unknown shape names silently', () => {+ const out = blendShapes({ unknownShape: 0.9 });+ expect(out).toEqual({});+ });++ it('clamps out-of-range weights', () => {+ const out = blendShapes({ jawOpen: 2.5 });+ expect(out.jawOpen).toBe(1);+ const out2 = blendShapes({ jawOpen: -1 });+ expect(out2.jawOpen).toBeUndefined(); // 0 wouldn't beat undefined (default 0)+ });++ it('blends a VRM emotion onto a phoneme cleanly', () => {+ // Speaking with a smile: phoneme E + VRM Joy.+ const out = blendShapes('E', 'Joy');+ expect(out.mouthSmileLeft).toBeGreaterThan(0);+ expect(out.jawOpen).toBeGreaterThan(0);+ expect(out.cheekSquintLeft).toBeGreaterThan(0); // from Joy+ });+});diff --git a/tests/avatar-snapshot.test.js b/tests/avatar-snapshot.test.jsnew file mode 100644index 000000000..1c6cfedc8--- /dev/null+++ b/tests/avatar-snapshot.test.js@@ -0,0 +1,116 @@+// Tests for the avatar snapshot capture module.+//+// The actual WebGL → JPEG pipeline can't be exercised in jsdom (no GPU, no+// real canvas), so this suite covers the contract surface: precondition+// validation, threshold constants, error propagation. The end-to-end render+// path is exercised by the customizer in a real browser.++import { describe, it, expect } from 'vitest';+import {+ captureSnapshotBlob,+ uploadAvatarSnapshot,+ SNAPSHOT_CONSTANTS,+} from '../src/voice/avatar-snapshot.js';++describe('captureSnapshotBlob — preconditions', () => {+ it('rejects when scene is missing', () => {+ expect(() => captureSnapshotBlob(null)).toThrow(/required/i);+ expect(() => captureSnapshotBlob({})).toThrow(/required/i);+ expect(() => captureSnapshotBlob({ renderer: {}, scene: {} })).toThrow(/required/i);+ });++ it('rejects when renderer.domElement is not a canvas', () => {+ const fakeScene = {+ renderer: {+ render: () => {},+ domElement: { /* no toBlob */ },+ },+ scene: {},+ camera: {},+ };+ expect(() => captureSnapshotBlob(fakeScene)).toThrow(/HTMLCanvasElement/);+ });++ it('rejects blank frames via the MIN_BYTES floor', async () => {+ const fakeScene = {+ renderer: {+ render: () => {},+ domElement: {+ toBlob: (cb) => cb(new Blob(['tiny'], { type: 'image/jpeg' })),+ },+ },+ scene: {},+ camera: {},+ };+ await expect(captureSnapshotBlob(fakeScene)).rejects.toThrow(/blank/i);+ });++ it('rejects oversize frames via the MAX_BYTES ceiling', async () => {+ const huge = new Uint8Array(SNAPSHOT_CONSTANTS.MAX_BYTES + 10);+ const fakeScene = {+ renderer: {+ render: () => {},+ domElement: {+ toBlob: (cb) => cb(new Blob([huge], { type: 'image/jpeg' })),+ },+ },+ scene: {},+ camera: {},+ };+ await expect(captureSnapshotBlob(fakeScene)).rejects.toThrow(/too large/i);+ });++ it('rejects when canvas.toBlob returns null', async () => {+ const fakeScene = {+ renderer: {+ render: () => {},+ domElement: {+ toBlob: (cb) => cb(null),+ },+ },+ scene: {},+ camera: {},+ };+ await expect(captureSnapshotBlob(fakeScene)).rejects.toThrow(/null/i);+ });++ it('forces a render call before reading the buffer', async () => {+ let rendered = false;+ const valid = new Uint8Array(SNAPSHOT_CONSTANTS.MIN_BYTES + 100);+ const fakeScene = {+ renderer: {+ render: () => { rendered = true; },+ domElement: {+ toBlob: (cb) => cb(new Blob([valid], { type: 'image/jpeg' })),+ },+ },+ scene: {},+ camera: {},+ };+ await captureSnapshotBlob(fakeScene);+ expect(rendered).toBe(true);+ });+});++describe('uploadAvatarSnapshot — preconditions', () => {+ it('rejects when avatarId is missing', async () => {+ await expect(uploadAvatarSnapshot({ scene: {} })).rejects.toThrow(/avatarId required/);+ await expect(uploadAvatarSnapshot({ avatarId: '', scene: {} })).rejects.toThrow(/avatarId required/);+ });+});++describe('SNAPSHOT_CONSTANTS', () => {+ it('exposes the three guardrails', () => {+ expect(SNAPSHOT_CONSTANTS.JPEG_QUALITY).toBeGreaterThan(0.5);+ expect(SNAPSHOT_CONSTANTS.JPEG_QUALITY).toBeLessThanOrEqual(1);+ expect(SNAPSHOT_CONSTANTS.MIN_BYTES).toBeGreaterThan(0);+ expect(SNAPSHOT_CONSTANTS.MAX_BYTES).toBeGreaterThan(SNAPSHOT_CONSTANTS.MIN_BYTES);+ });++ it('MAX_BYTES matches the server-side cap (2 MB)', () => {+ // thumbnailPresignSchema in api/avatars/_actions.js declares+ // size_bytes.max(2 * 1024 * 1024). Keep these in sync — a mismatch+ // produces confusing client-side success followed by server 400s.+ expect(SNAPSHOT_CONSTANTS.MAX_BYTES).toBe(2 * 1024 * 1024);+ });+});diff --git a/tests/branding-allowlist.json b/tests/branding-allowlist.jsonnew file mode 100644index 000000000..8ccc88a33--- /dev/null+++ b/tests/branding-allowlist.json@@ -0,0 +1,37 @@+[+ {+ "pattern": "source: 'avaturn'",+ "file": "*",+ "reason": "Internal postMessage source value — required to match Avaturn iframe protocol, never shown to end users."+ },+ {+ "pattern": "source: 'characterstudio'",+ "file": "*",+ "reason": "Internal postMessage source value — required to match Character Studio iframe protocol, never shown to end users."+ },+ {+ "pattern": "source !== 'avaturn'",+ "file": "*",+ "reason": "Internal postMessage source guard — same protocol concern as above."+ },+ {+ "pattern": "from '@avaturn/sdk'",+ "file": "*",+ "reason": "Vendor npm package import — three.ws renames the public symbol but the dependency identifier is fixed by npm."+ },+ {+ "pattern": "'@avaturn/sdk'",+ "file": "*",+ "reason": "Vendor npm package identifier in import or require statement."+ },+ {+ "pattern": "'/avaturn-",+ "file": "*",+ "reason": "Internal API route path (e.g. /avaturn-session) — server-side only, not surfaced in UI copy."+ },+ {+ "pattern": "/avaturn-session",+ "file": "*",+ "reason": "Internal API route path — server-side only."+ }+]diff --git a/tests/branding.test.js b/tests/branding.test.jsnew file mode 100644index 000000000..0133b6dde--- /dev/null+++ b/tests/branding.test.js@@ -0,0 +1,418 @@+/**+ * Branding lock — fails if forbidden partner brand names appear in+ * user-facing surfaces of the three.ws codebase.+ *+ * Scope and exemptions are documented inline below and in+ * ./branding-allowlist.json. This test deliberately uses only `node:fs`+ * and `node:path` so it adds no new dependencies.+ */++import { describe, test, expect } from 'vitest';+import { readFileSync, readdirSync, statSync, existsSync } from 'node:fs';+import { join, relative, sep } from 'node:path';+import { fileURLToPath } from 'node:url';++const REPO_ROOT = fileURLToPath(new URL('..', import.meta.url));+const ALLOWLIST_PATH = join(REPO_ROOT, 'tests', 'branding-allowlist.json');++/** @type {Array<{ pattern: string, file: string, reason: string }>} */+const allowlist = JSON.parse(readFileSync(ALLOWLIST_PATH, 'utf8'));++// ── Forbidden strings ───────────────────────────────────────────────────────+//+// Each entry: { id, regex, label }+// - id — stable identifier used by allowlist + test naming+// - regex — case-insensitive matcher+// - label — human-readable brand+//+// "RPM" is special-cased below (only flagged near avatar/selfie).+const FORBIDDEN = [+ { id: 'avaturn', regex: /avaturn/i, label: 'Avaturn' },+ {+ id: 'character-studio',+ regex: /character\s*studio/i,+ label: 'Character Studio',+ },+ {+ id: 'ready-player-me',+ regex: /ready\s*player\s*me|readyplayer\.me/i,+ label: 'Ready Player Me',+ },+];++// ── Path scoping ────────────────────────────────────────────────────────────++const SKIP_DIR_NAMES = new Set([+ 'node_modules',+ 'dist',+ 'dist-lib',+ 'tests',+ 'migrations',+ '.git',+]);++/**+ * Return true if a repo-relative path should be excluded entirely+ * regardless of which scope it would otherwise match.+ */+function isHardSkipped(relPath) {+ const parts = relPath.split(sep);+ for (const part of parts) {+ if (SKIP_DIR_NAMES.has(part)) return true;+ }+ // avatar-sdk has its own dist subtree to skip.+ if (relPath.startsWith(`avatar-sdk${sep}dist${sep}`)) return true;+ return false;+}++/**+ * Walk a directory recursively, yielding absolute file paths that pass+ * the optional `match` predicate and are not hard-skipped.+ */+function* walk(absDir, match) {+ if (!existsSync(absDir)) return;+ let entries;+ try {+ entries = readdirSync(absDir, { withFileTypes: true });+ } catch {+ return;+ }+ for (const ent of entries) {+ const abs = join(absDir, ent.name);+ const rel = relative(REPO_ROOT, abs);+ if (isHardSkipped(rel)) continue;+ if (ent.isDirectory()) {+ yield* walk(abs, match);+ } else if (ent.isFile()) {+ if (!match || match(abs, rel)) yield abs;+ }+ }+}++/**+ * Collect all in-scope files for the branding scan.+ * Scope (per spec):+ * - *.html at repo root+ * - public/**\/*.html+ * - docs/**\/*.md+ * - public/docs/**\/*.md+ * - avatar-sdk/README.md+ * - avatar-sdk/types/**\/*.d.ts+ * - src/**\/*.js (JSDoc on exported symbols only — handled specially)+ * - README.md, publish/README.md+ */+function collectScopedFiles() {+ const files = [];++ // 1. Repo-root HTML+ for (const ent of readdirSync(REPO_ROOT, { withFileTypes: true })) {+ if (ent.isFile() && ent.name.endsWith('.html')) {+ files.push({+ abs: join(REPO_ROOT, ent.name),+ kind: 'html',+ });+ }+ }++ // 2. public/**/*.html+ for (const abs of walk(+ join(REPO_ROOT, 'public'),+ (_a, rel) => rel.endsWith('.html'),+ )) {+ files.push({ abs, kind: 'html' });+ }++ // 3. docs/**/*.md+ for (const abs of walk(+ join(REPO_ROOT, 'docs'),+ (_a, rel) => rel.endsWith('.md'),+ )) {+ files.push({ abs, kind: 'md' });+ }++ // 4. public/docs/**/*.md+ for (const abs of walk(+ join(REPO_ROOT, 'public', 'docs'),+ (_a, rel) => rel.endsWith('.md'),+ )) {+ files.push({ abs, kind: 'md' });+ }++ // 5. avatar-sdk/README.md+ const sdkReadme = join(REPO_ROOT, 'avatar-sdk', 'README.md');+ if (existsSync(sdkReadme)) files.push({ abs: sdkReadme, kind: 'md' });++ // 6. avatar-sdk/types/**/*.d.ts+ for (const abs of walk(+ join(REPO_ROOT, 'avatar-sdk', 'types'),+ (_a, rel) => rel.endsWith('.d.ts'),+ )) {+ files.push({ abs, kind: 'dts' });+ }++ // 7. src/**/*.js (JSDoc on exports — scanned via separate path)+ for (const abs of walk(+ join(REPO_ROOT, 'src'),+ (_a, rel) => rel.endsWith('.js'),+ )) {+ files.push({ abs, kind: 'src-js' });+ }++ // 8. Top-level READMEs+ for (const rel of ['README.md', join('publish', 'README.md')]) {+ const abs = join(REPO_ROOT, rel);+ if (existsSync(abs)) files.push({ abs, kind: 'readme' });+ }++ return files;+}++// ── Special-case helpers ────────────────────────────────────────────────────++/**+ * Extract the line ranges inside a JS source that belong to a JSDoc block+ * immediately followed by an `export class|function|const` (or `export+ * default class|function`) declaration.+ *+ * "Immediately followed" means: between the JSDoc's closing `*\/` and the+ * `export` keyword there is ONLY whitespace — no line comments, no other+ * code. We scan structurally (not with one greedy regex) to avoid the+ * non-greedy backtracking trap where a single JSDoc could be paired with+ * a far-away export, swallowing intermediate code.+ *+ * Returns an array of { startLine, endLine } 1-based inclusive ranges+ * covering only the JSDoc bodies themselves.+ */+function findExportedJSDocRanges(source) {+ const ranges = [];+ const openRe = /\/\*\*/g;+ let om;+ while ((om = openRe.exec(source)) !== null) {+ const openIdx = om.index;+ const closeIdx = source.indexOf('*/', openIdx + 3);+ if (closeIdx === -1) break;+ const afterClose = closeIdx + 2;+ // Inspect whitespace-only run after the closing */.+ let i = afterClose;+ while (i < source.length && /\s/.test(source[i])) i++;+ const tail = source.slice(i, i + 80);+ if (+ /^export\s+(?:default\s+)?(?:async\s+)?(?:class|function|const|let|var)\b/.test(+ tail,+ )+ ) {+ const startLine = source.slice(0, openIdx).split('\n').length;+ const endLine =+ source.slice(0, afterClose).split('\n').length;+ ranges.push({ startLine, endLine });+ }+ // Continue scanning *after* this JSDoc's close so we don't overlap.+ openRe.lastIndex = afterClose;+ }+ return ranges;+}++/**+ * For src/**\/*.js — return only the lines that live inside a JSDoc block+ * directly preceding an exported symbol. Returns an array of+ * { lineNo, text } pairs.+ */+function getExportedJSDocLines(absPath) {+ const source = readFileSync(absPath, 'utf8');+ const lines = source.split('\n');+ const ranges = findExportedJSDocRanges(source);+ const out = [];+ for (const { startLine, endLine } of ranges) {+ for (let n = startLine; n <= endLine; n++) {+ out.push({ lineNo: n, text: lines[n - 1] ?? '' });+ }+ }+ return out;+}++/**+ * publish/README.md has a long "Roadmap → Phase 0..4" section that captures+ * historical platform context. Per spec we skip lines inside that block.+ * Range = from the line that starts with "## Roadmap" up to (but not+ * including) the next top-level "## " heading.+ */+function isInPublishRoadmap(relPath, lineNo, allLines) {+ if (relPath !== join('publish', 'README.md')) return false;+ let start = -1;+ let end = allLines.length;+ for (let i = 0; i < allLines.length; i++) {+ const ln = allLines[i];+ if (start === -1 && /^##\s+Roadmap\b/i.test(ln)) {+ start = i + 1; // 1-based+ continue;+ }+ if (start !== -1 && i + 1 > start && /^##\s+/.test(ln)) {+ end = i; // 1-based exclusive+ break;+ }+ }+ if (start === -1) return false;+ return lineNo >= start && lineNo < end;+}++/**+ * Detect fenced code blocks (``` ... ```) in a markdown source. Returns+ * a Set of 1-based line numbers that sit inside a fence.+ */+function fencedCodeLines(text) {+ const inside = new Set();+ const lines = text.split('\n');+ let open = false;+ for (let i = 0; i < lines.length; i++) {+ if (/^```/.test(lines[i].trim())) {+ open = !open;+ continue; // the fence line itself is not "inside"+ }+ if (open) inside.add(i + 1);+ }+ return inside;+}++// ── Allowlist matching ──────────────────────────────────────────────────────++/**+ * Return true if a hit is excused by an allowlist entry. An entry+ * matches when:+ * - entry.file is "*" OR is a suffix of the repo-relative path, AND+ * - the offending line contains entry.pattern as a literal substring+ * (case-sensitive — the patterns in the allowlist are literal code).+ *+ * Pattern matching is intentionally substring-based: the allowlist holds+ * literal code fragments like `source: 'avaturn'` or `from '@avaturn/sdk'`.+ */+function isAllowed(relPath, lineText) {+ for (const entry of allowlist) {+ const fileMatches =+ entry.file === '*' ||+ relPath === entry.file ||+ relPath.endsWith(entry.file);+ if (!fileMatches) continue;+ if (lineText.includes(entry.pattern)) return true;+ }+ return false;+}++// ── Core scanner ────────────────────────────────────────────────────────────++/**+ * Returns all hits across the in-scope files for a given forbidden+ * pattern. RPM gets special handling via the optional `extraGate`.+ */+function scanForPattern(forbidden, files, extraGate) {+ const hits = [];+ for (const f of files) {+ const relPath = relative(REPO_ROOT, f.abs);+ const text = readFileSync(f.abs, 'utf8');+ const allLines = text.split('\n');++ // For src JS files, restrict to JSDoc-on-exports lines.+ let candidateLines;+ if (f.kind === 'src-js') {+ candidateLines = getExportedJSDocLines(f.abs);+ } else {+ candidateLines = allLines.map((text, i) => ({+ lineNo: i + 1,+ text,+ }));+ }++ // Pre-compute fenced code line set for md/readme files so the+ // extraGate can use it.+ const fenced =+ f.kind === 'md' || f.kind === 'readme'+ ? fencedCodeLines(text)+ : null;++ for (const { lineNo, text: line } of candidateLines) {+ if (!forbidden.regex.test(line)) continue;++ // publish/README.md roadmap-block exemption.+ if (+ f.kind === 'readme' &&+ isInPublishRoadmap(relPath, lineNo, allLines)+ ) {+ continue;+ }++ // Optional gate (used by RPM heuristic).+ if (extraGate && !extraGate({ relPath, line, fenced, lineNo })) {+ continue;+ }++ if (isAllowed(relPath, line)) continue;++ hits.push({ file: relPath, line: lineNo, text: line.trim() });+ }+ }+ return hits;+}++// ── Test cases ──────────────────────────────────────────────────────────────++describe('three.ws branding lock', () => {+ const files = collectScopedFiles();++ for (const forbidden of FORBIDDEN) {+ test(`no "${forbidden.label}" in user-facing files`, () => {+ const hits = scanForPattern(forbidden, files);+ if (hits.length > 0) {+ const formatted = hits+ .map(+ (h) =>+ ` ${h.file}:${h.line}\n ${h.text}`,+ )+ .join('\n');+ throw new Error(+ `Forbidden brand "${forbidden.label}" found in ${hits.length} user-facing location(s):\n${formatted}\n\nReplace with three.ws-branded language, or add a documented exemption to tests/branding-allowlist.json.`,+ );+ }+ expect(hits).toEqual([]);+ });+ }++ test('no "RPM" referring to Ready Player Me (heuristic: near avatar/selfie)', () => {+ const RPM_LINE = /\bRPM\b/;+ const NEARBY = /avatar|selfie/i;+ const hits = [];+ for (const f of files) {+ const relPath = relative(REPO_ROOT, f.abs);+ const text = readFileSync(f.abs, 'utf8');+ const allLines = text.split('\n');++ const candidateLines =+ f.kind === 'src-js'+ ? getExportedJSDocLines(f.abs)+ : allLines.map((t, i) => ({ lineNo: i + 1, text: t }));++ for (const { lineNo, text: line } of candidateLines) {+ if (!RPM_LINE.test(line)) continue;+ // Window: the line itself plus the two surrounding lines.+ const ctxStart = Math.max(0, lineNo - 2);+ const ctxEnd = Math.min(allLines.length, lineNo + 1);+ const ctx = allLines.slice(ctxStart, ctxEnd).join(' ');+ if (!NEARBY.test(ctx)) continue;+ if (+ f.kind === 'readme' &&+ isInPublishRoadmap(relPath, lineNo, allLines)+ )+ continue;+ if (isAllowed(relPath, line)) continue;+ hits.push({ file: relPath, line: lineNo, text: line.trim() });+ }+ }+ if (hits.length > 0) {+ const formatted = hits+ .map((h) => ` ${h.file}:${h.line}\n ${h.text}`)+ .join('\n');+ throw new Error(+ `Found "RPM" near avatar/selfie context in ${hits.length} location(s) — assume Ready Player Me:\n${formatted}`,+ );+ }+ expect(hits).toEqual([]);+ });+});diff --git a/tests/camera-presets.test.js b/tests/camera-presets.test.jsnew file mode 100644index 000000000..9b7badb14--- /dev/null+++ b/tests/camera-presets.test.js@@ -0,0 +1,129 @@+// Tests for the pure camera-framing math used by TalkScene.+//+// All inputs are plain JS objects — no three.js — so vitest exercises the+// math directly. We use a synthetic "humanoid" bounding box (1.7 m tall,+// 0.4 m wide, 0.3 m deep, base on the floor) as the canonical fixture so+// expected camera positions stay easy to reason about.++import { describe, it, expect } from 'vitest';+import {+ CAMERA_PRESETS,+ PRESET_LABELS,+ computeFraming,+ nextPreset,+} from '../src/voice/camera-presets.js';++const HUMANOID = {+ min: { x: -0.2, y: 0, z: -0.15 },+ max: { x: 0.2, y: 1.7, z: 0.15 },+};++describe('camera presets — vocabulary', () => {+ it('declares full / half / headshot in display order', () => {+ expect(CAMERA_PRESETS).toEqual(['full', 'half', 'headshot']);+ });++ it('has a label for every preset', () => {+ for (const p of CAMERA_PRESETS) {+ expect(PRESET_LABELS[p]).toBeTruthy();+ }+ });+});++describe('computeFraming — defaults', () => {+ it('returns a framing object with target / position / fov for full preset', () => {+ const r = computeFraming({ box: HUMANOID, preset: 'full' });+ expect(r.target).toHaveProperty('x');+ expect(r.target).toHaveProperty('y');+ expect(r.target).toHaveProperty('z');+ expect(r.position).toHaveProperty('x');+ expect(r.position).toHaveProperty('y');+ expect(r.position).toHaveProperty('z');+ expect(r.fov).toBeGreaterThan(0);+ });++ it('camera sits in front of the avatar (positive Z) for every preset', () => {+ for (const p of CAMERA_PRESETS) {+ const r = computeFraming({ box: HUMANOID, preset: p });+ expect(r.position.z, p).toBeGreaterThan(HUMANOID.max.z);+ }+ });++ it('target is horizontally centered on the avatar', () => {+ for (const p of CAMERA_PRESETS) {+ const r = computeFraming({ box: HUMANOID, preset: p });+ expect(r.target.x, p).toBeCloseTo(0, 5);+ expect(r.target.z, p).toBeCloseTo(0, 5);+ }+ });++ it('rejects unknown presets and malformed boxes', () => {+ expect(() => computeFraming({ box: HUMANOID, preset: 'bogus' })).toThrow();+ expect(() => computeFraming({})).toThrow();+ expect(() => computeFraming({ box: { min: { x: 0, y: 0, z: 0 } } })).toThrow();+ });+});++describe('computeFraming — preset semantics', () => {+ it('half aims higher up the body than full', () => {+ const full = computeFraming({ box: HUMANOID, preset: 'full' });+ const half = computeFraming({ box: HUMANOID, preset: 'half' });+ expect(half.target.y).toBeGreaterThan(full.target.y);+ });++ it('headshot aims highest of the three', () => {+ const half = computeFraming({ box: HUMANOID, preset: 'half' });+ const head = computeFraming({ box: HUMANOID, preset: 'headshot' });+ expect(head.target.y).toBeGreaterThan(half.target.y);+ // Should be near the head — last 10% of avatar height.+ expect(head.target.y).toBeGreaterThan(HUMANOID.max.y * 0.85);+ });++ it('headshot pulls the camera closer than full', () => {+ const full = computeFraming({ box: HUMANOID, preset: 'full' });+ const head = computeFraming({ box: HUMANOID, preset: 'headshot' });+ const fullDist = full.position.z - full.target.z;+ const headDist = head.position.z - head.target.z;+ expect(headDist).toBeLessThan(fullDist);+ });++ it('tighter framing uses a tighter FOV', () => {+ const full = computeFraming({ box: HUMANOID, preset: 'full' });+ const half = computeFraming({ box: HUMANOID, preset: 'half' });+ const head = computeFraming({ box: HUMANOID, preset: 'headshot' });+ expect(half.fov).toBeLessThanOrEqual(full.fov);+ expect(head.fov).toBeLessThan(half.fov);+ });+});++describe('computeFraming — aspect ratio scaling', () => {+ it('narrower viewport pulls the camera further back', () => {+ const wide = computeFraming({ box: HUMANOID, preset: 'half', aspectRatio: 1.8 });+ const narrow = computeFraming({ box: HUMANOID, preset: 'half', aspectRatio: 0.6 });+ expect(narrow.position.z).toBeLessThan(wide.position.z);+ });++ it('respects the minDistance floor on a small avatar', () => {+ // 30 cm tall chibi — distanceMul*height would be tiny.+ const chibi = {+ min: { x: -0.15, y: 0, z: -0.1 },+ max: { x: 0.15, y: 0.3, z: 0.1 },+ };+ const r = computeFraming({ box: chibi, preset: 'full' });+ // Per the config, full's minDistance is 0.7 m.+ expect(r.position.z).toBeGreaterThanOrEqual(0.7);+ });+});++describe('nextPreset', () => {+ it('cycles in display order', () => {+ expect(nextPreset('full')).toBe('half');+ expect(nextPreset('half')).toBe('headshot');+ expect(nextPreset('headshot')).toBe('full');+ });++ it('returns the first preset for unknown / missing input', () => {+ expect(nextPreset()).toBe(CAMERA_PRESETS[0]);+ expect(nextPreset('garbage')).toBe(CAMERA_PRESETS[0]);+ });+});diff --git a/tests/glb-canonicalize.test.js b/tests/glb-canonicalize.test.jsnew file mode 100644index 000000000..a7d4be7a1--- /dev/null+++ b/tests/glb-canonicalize.test.js@@ -0,0 +1,286 @@+/**+ * GLB bone-name canonicalizer — unit tests.+ *+ * Covers both the name-mapping helper and the full GLB rewrite. The GLB tests+ * build synthetic v2 GLB ArrayBuffers in-memory (no fixtures on disk), which+ * keeps the suite fast and lets us assert exact byte-level behaviour: header+ * checks, chunk-length update, BIN-chunk preservation, 4-byte padding.+ */++import { describe, it, expect } from 'vitest';+import {+ canonicalizeBoneName,+ canonicalizeJointNodes,+ canonicalizeGLBBones,+ CANONICAL_BONES,+} from '../src/glb-canonicalize.js';++const GLB_MAGIC = 0x46546c67;+const CHUNK_TYPE_JSON = 0x4e4f534a;+const CHUNK_TYPE_BIN = 0x004e4942;++// Build a synthetic GLB v2 from a JS object (JSON chunk) and an optional+// Uint8Array (BIN chunk).+function buildGLB(jsonObj, bin = null) {+ let jsonBytes = new TextEncoder().encode(JSON.stringify(jsonObj));+ const jPad = (4 - (jsonBytes.length % 4)) % 4;+ if (jPad) {+ const padded = new Uint8Array(jsonBytes.length + jPad);+ padded.set(jsonBytes);+ for (let i = 0; i < jPad; i++) padded[jsonBytes.length + i] = 0x20;+ jsonBytes = padded;+ }+ let binBytes = null;+ if (bin) {+ const bPad = (4 - (bin.length % 4)) % 4;+ if (bPad) {+ binBytes = new Uint8Array(bin.length + bPad);+ binBytes.set(bin);+ } else {+ binBytes = bin;+ }+ }+ const total = 12 + 8 + jsonBytes.length + (binBytes ? 8 + binBytes.length : 0);+ const ab = new ArrayBuffer(total);+ const dv = new DataView(ab);+ const u8 = new Uint8Array(ab);+ dv.setUint32(0, GLB_MAGIC, true);+ dv.setUint32(4, 2, true);+ dv.setUint32(8, total, true);+ dv.setUint32(12, jsonBytes.length, true);+ dv.setUint32(16, CHUNK_TYPE_JSON, true);+ u8.set(jsonBytes, 20);+ if (binBytes) {+ const binOff = 20 + jsonBytes.length;+ dv.setUint32(binOff, binBytes.length, true);+ dv.setUint32(binOff + 4, CHUNK_TYPE_BIN, true);+ u8.set(binBytes, binOff + 8);+ }+ return ab;+}++// Re-parse the JSON chunk out of a GLB ArrayBuffer.+function readGLBJson(ab) {+ const dv = new DataView(ab);+ const jLen = dv.getUint32(12, true);+ const jsonBytes = new Uint8Array(ab, 20, jLen);+ return JSON.parse(new TextDecoder().decode(jsonBytes).replace(/\s+$/, ''));+}++// Mixamo-style skinned humanoid skeleton for round-trip tests.+const MIXAMO_NODES = [+ { name: 'mixamorig:Hips', children: [1, 30, 38] },+ { name: 'mixamorig:Spine' },+ { name: 'mixamorig:LeftArm' },+ { name: 'mixamorig:LeftForeArm' },+ { name: 'mixamorig:LeftHand' },+ { name: 'mixamorig:RightArm' },+ // A non-joint mesh node intentionally has a bone-shaped name to confirm+ // it is NOT renamed (we only touch skins[].joints[]).+ { name: 'mixamorig:LeftLeg_collision_mesh', mesh: 0 },+];+const MIXAMO_SKINS = [{ joints: [0, 1, 2, 3, 4, 5] }];++describe('canonicalizeBoneName', () => {+ it('returns null for non-strings, empties, and unknown names', () => {+ expect(canonicalizeBoneName(null)).toBeNull();+ expect(canonicalizeBoneName(undefined)).toBeNull();+ expect(canonicalizeBoneName('')).toBeNull();+ expect(canonicalizeBoneName(42)).toBeNull();+ expect(canonicalizeBoneName('Tail_01')).toBeNull();+ expect(canonicalizeBoneName('J_Bip_L_UpperArm')).toBeNull(); // VRM — unmapped+ });++ it('returns canonical exact-match names unchanged', () => {+ for (const name of CANONICAL_BONES) {+ expect(canonicalizeBoneName(name)).toBe(name);+ }+ });++ it.each([+ ['mixamorig:LeftArm', 'LeftArm'],+ ['mixamorig1:LeftForeArm', 'LeftForeArm'],+ ['mixamorigHead', 'Head'],+ ['mixamorig_LeftHandThumb3', 'LeftHandThumb3'],+ ['MIXAMORIG:LeftHand', 'LeftHand'],+ ])('strips Mixamo prefix: %s → %s', (input, expected) => {+ expect(canonicalizeBoneName(input)).toBe(expected);+ });++ it.each([+ ['Armature_Hips', 'Hips'],+ ['Armature/LeftLeg', 'LeftLeg'],+ ['armature_RightArm', 'RightArm'],+ ])('strips Armature prefix: %s → %s', (input, expected) => {+ expect(canonicalizeBoneName(input)).toBe(expected);+ });++ it.each([+ ['DEF-LeftArm', 'LeftArm'],+ ['ORG-Hips', 'Hips'],+ ['MCH-RightLeg', 'RightLeg'],+ ['DEF_Spine1', 'Spine1'],+ ])('strips Rigify prefix: %s → %s', (input, expected) => {+ expect(canonicalizeBoneName(input)).toBe(expected);+ });++ it.each([+ ['left_arm', 'LeftArm'],+ ['Left_Arm', 'LeftArm'],+ ['left-arm', 'LeftArm'],+ ['LEFT_ARM', 'LeftArm'],+ ['right hand', 'RightHand'],+ ['lefttoebase', 'LeftToeBase'],+ ['left_hand_index1', 'LeftHandIndex1'],+ ])('canonicalizes separator / case variants: %s → %s', (input, expected) => {+ expect(canonicalizeBoneName(input)).toBe(expected);+ });++ it('combines vendor prefix + separator variant: mixamorig:left_arm → LeftArm', () => {+ expect(canonicalizeBoneName('mixamorig:left_arm')).toBe('LeftArm');+ expect(canonicalizeBoneName('DEF-left_fore_arm')).toBe('LeftForeArm');+ });+});++describe('canonicalizeJointNodes (in-place rewrite)', () => {+ it('only touches nodes referenced by skins[].joints', () => {+ const json = {+ nodes: [+ { name: 'mixamorig:Hips' },+ { name: 'mixamorig:Spine' },+ { name: 'mixamorig:left_arm' },+ { name: 'mixamorig:Decoration_NotABone' }, // not a joint — left alone+ ],+ skins: [{ joints: [0, 1, 2] }],+ };+ const { renamed, samples } = canonicalizeJointNodes(json);+ expect(renamed).toBe(3);+ expect(json.nodes[0].name).toBe('Hips');+ expect(json.nodes[1].name).toBe('Spine');+ expect(json.nodes[2].name).toBe('LeftArm');+ expect(json.nodes[3].name).toBe('mixamorig:Decoration_NotABone');+ expect(samples).toHaveLength(3);+ expect(samples[0]).toEqual({ from: 'mixamorig:Hips', to: 'Hips' });+ });++ it('returns 0 when the rig is already canonical', () => {+ const json = {+ nodes: [{ name: 'Hips' }, { name: 'Spine' }, { name: 'LeftArm' }],+ skins: [{ joints: [0, 1, 2] }],+ };+ const { renamed } = canonicalizeJointNodes(json);+ expect(renamed).toBe(0);+ expect(json.nodes[0].name).toBe('Hips');+ });++ it('returns 0 and never throws on a buffer-less GLB JSON (no skins / no nodes)', () => {+ expect(canonicalizeJointNodes({}).renamed).toBe(0);+ expect(canonicalizeJointNodes({ nodes: [] }).renamed).toBe(0);+ expect(canonicalizeJointNodes({ nodes: [{ name: 'mixamorig:Hips' }] }).renamed).toBe(0);+ });++ it('skips joints whose names are not recognised humanoid bones', () => {+ const json = {+ nodes: [{ name: 'mixamorig:Hips' }, { name: 'mixamorig:Tail_01' }, { name: 'J_Bip_L_UpperArm' }],+ skins: [{ joints: [0, 1, 2] }],+ };+ const { renamed } = canonicalizeJointNodes(json);+ expect(renamed).toBe(1); // only Hips+ expect(json.nodes[0].name).toBe('Hips');+ expect(json.nodes[1].name).toBe('mixamorig:Tail_01');+ expect(json.nodes[2].name).toBe('J_Bip_L_UpperArm');+ });+});++describe('canonicalizeGLBBones (full GLB rewrite)', () => {+ it('throws clearly on a non-ArrayBuffer or truncated buffer', () => {+ expect(() => canonicalizeGLBBones(null)).toThrow(/ArrayBuffer required/);+ expect(() => canonicalizeGLBBones(new ArrayBuffer(8))).toThrow(/too small/);+ });++ it('throws on a bad magic number', () => {+ const ab = new ArrayBuffer(40);+ new DataView(ab).setUint32(0, 0xdeadbeef, true);+ expect(() => canonicalizeGLBBones(ab)).toThrow(/bad magic/);+ });++ it('throws on GLB version != 2', () => {+ const ab = new ArrayBuffer(40);+ const dv = new DataView(ab);+ dv.setUint32(0, GLB_MAGIC, true);+ dv.setUint32(4, 1, true);+ expect(() => canonicalizeGLBBones(ab)).toThrow(/v2 is supported/);+ });++ it('returns the original buffer by reference when no renames were needed', () => {+ const ab = buildGLB({+ nodes: [{ name: 'Hips' }, { name: 'LeftArm' }],+ skins: [{ joints: [0, 1] }],+ });+ const out = canonicalizeGLBBones(ab);+ expect(out.renamed).toBe(0);+ expect(out.buffer).toBe(ab); // same reference — caller can skip re-upload+ });++ it('rewrites Mixamo-prefixed joint names and produces a valid GLB', () => {+ const bin = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]);+ const ab = buildGLB({ nodes: MIXAMO_NODES, skins: MIXAMO_SKINS }, bin);+ const { buffer, renamed, samples } = canonicalizeGLBBones(ab);+ expect(renamed).toBe(6);+ expect(buffer).not.toBe(ab);++ const dv = new DataView(buffer);+ expect(dv.getUint32(0, true)).toBe(GLB_MAGIC);+ expect(dv.getUint32(4, true)).toBe(2);+ expect(dv.getUint32(8, true)).toBe(buffer.byteLength);++ const json = readGLBJson(buffer);+ expect(json.nodes[0].name).toBe('Hips');+ expect(json.nodes[1].name).toBe('Spine');+ expect(json.nodes[2].name).toBe('LeftArm');+ expect(json.nodes[3].name).toBe('LeftForeArm');+ expect(json.nodes[4].name).toBe('LeftHand');+ expect(json.nodes[5].name).toBe('RightArm');+ // Non-joint preserved verbatim.+ expect(json.nodes[6].name).toBe('mixamorig:LeftLeg_collision_mesh');++ // Samples are stable, used by the dashboard to surface "X bones retargeted".+ expect(samples.length).toBeGreaterThan(0);+ expect(samples[0].from).toMatch(/^mixamorig:/);+ });++ it('preserves the BIN chunk byte-for-byte', () => {+ const bin = new Uint8Array(64);+ for (let i = 0; i < bin.length; i++) bin[i] = (i * 7 + 13) & 0xff;+ const ab = buildGLB({ nodes: MIXAMO_NODES, skins: MIXAMO_SKINS }, bin);+ const { buffer } = canonicalizeGLBBones(ab);++ // Find BIN chunk in the rewritten buffer.+ const dv = new DataView(buffer);+ const jLen = dv.getUint32(12, true);+ const binOffset = 20 + jLen;+ expect(dv.getUint32(binOffset + 4, true)).toBe(CHUNK_TYPE_BIN);+ const binLen = dv.getUint32(binOffset, true);+ expect(binLen).toBe(bin.length);+ const recoveredBin = new Uint8Array(buffer, binOffset + 8, binLen);+ expect(Array.from(recoveredBin)).toEqual(Array.from(bin));+ });++ it('JSON chunk in the output is 4-byte aligned', () => {+ const ab = buildGLB({ nodes: MIXAMO_NODES, skins: MIXAMO_SKINS });+ const { buffer } = canonicalizeGLBBones(ab);+ const jLen = new DataView(buffer).getUint32(12, true);+ expect(jLen % 4).toBe(0);+ });++ it('round-trips a buffer-less GLB (no BIN chunk)', () => {+ const ab = buildGLB({ nodes: MIXAMO_NODES, skins: MIXAMO_SKINS });+ const { buffer, renamed } = canonicalizeGLBBones(ab);+ expect(renamed).toBe(6);+ // Header `total` matches actual byte length and there's no chunk 1.+ const dv = new DataView(buffer);+ expect(dv.getUint32(8, true)).toBe(buffer.byteLength);+ const jLen = dv.getUint32(12, true);+ expect(20 + jLen).toBe(buffer.byteLength);+ });+});diff --git a/tests/src/lip-sync-analyser.test.js b/tests/src/lip-sync-analyser.test.jsnew file mode 100644index 000000000..0dd3a4a84--- /dev/null+++ b/tests/src/lip-sync-analyser.test.js@@ -0,0 +1,177 @@+/**+ * three.ws — LipSyncAnalyser unit tests+ *+ * Exercises the spectral analyser without WebAudio by injecting a fake+ * AnalyserNode whose `getByteFrequencyData()` writes a deterministic+ * frequency spectrum. The module under test does an `instanceof AnalyserNode`+ * check, so we shim a real constructor on globalThis before importing.+ */++import { describe, it, expect, beforeAll } from 'vitest';++// Shim AnalyserNode globally before the SUT is imported. The SUT uses+// `audioSource instanceof AnalyserNode` to route to its analyser branch,+// so the stub must extend this class.+class FakeAnalyserNode {+ constructor({ binCount = 128, sampleRate = 44100 } = {}) {+ this.fftSize = binCount * 2;+ this.frequencyBinCount = binCount;+ this.smoothingTimeConstant = 0.7;+ this.context = { sampleRate };+ this._spectrum = new Uint8Array(binCount);+ }+ setSpectrum(buf) {+ this._spectrum.set(buf.subarray(0, this._spectrum.length));+ }+ fillRange(start, end, value) {+ for (let i = start; i < Math.min(end, this._spectrum.length); i++) {+ this._spectrum[i] = value;+ }+ }+ clear() {+ this._spectrum.fill(0);+ }+ getByteFrequencyData(out) {+ out.set(this._spectrum.subarray(0, out.length));+ }+ disconnect() {}+}++globalThis.AnalyserNode = FakeAnalyserNode;++let LipSyncAnalyser;+let VISEMES;++beforeAll(async () => {+ const mod = await import('../../src/lip-sync-analyser.js');+ LipSyncAnalyser = mod.LipSyncAnalyser;+ VISEMES = mod.VISEMES;+});++const EXPECTED_VISEMES = [+ 'viseme_aa', 'viseme_O', 'viseme_E', 'viseme_I', 'viseme_nn',+ 'viseme_SS', 'viseme_FF', 'viseme_CH', 'viseme_PP',+];++describe('three.ws LipSyncAnalyser — constructor', () => {+ it('initialises inactive with all nine viseme weights at zero', () => {+ const a = new LipSyncAnalyser();+ expect(a._active).toBe(false);+ for (const k of EXPECTED_VISEMES) {+ expect(a._out[k]).toBe(0);+ }+ // Sanity — the exported VISEMES list must match the 9 we contract on.+ expect(VISEMES.slice().sort()).toEqual(EXPECTED_VISEMES.slice().sort());+ });++ it('exposes a zero amplitude before any sample()', () => {+ const a = new LipSyncAnalyser();+ expect(a.getAmplitude()).toBe(0);+ });+});++describe('three.ws LipSyncAnalyser — sample() lifecycle', () => {+ it('returns null when sample() is called before connect()', () => {+ const a = new LipSyncAnalyser();+ expect(a.sample()).toBeNull();+ });++ it('returns a viseme map with all nine keys and weights in [0,1] after connect()', () => {+ const a = new LipSyncAnalyser();+ const stub = new FakeAnalyserNode();+ // Known pattern — linear ramp 0..255 across the bins.+ for (let i = 0; i < stub.frequencyBinCount; i++) {+ stub._spectrum[i] = Math.floor((i / (stub.frequencyBinCount - 1)) * 255);+ }+ a.connect(stub);+ const out = a.sample();+ expect(out).not.toBeNull();+ expect(typeof out).toBe('object');+ for (const k of EXPECTED_VISEMES) {+ expect(out).toHaveProperty(k);+ expect(out[k]).toBeGreaterThanOrEqual(0);+ expect(out[k]).toBeLessThanOrEqual(1);+ }+ });+});++describe('three.ws LipSyncAnalyser — spectral mapping', () => {+ it('decays every viseme toward zero on silence', () => {+ const a = new LipSyncAnalyser();+ const stub = new FakeAnalyserNode();+ a.connect(stub);++ // Prime the EMA with a non-zero frame, then go silent for many frames.+ stub.fillRange(0, stub.frequencyBinCount, 200);+ a.sample();+ stub.clear();+ let out;+ for (let n = 0; n < 30; n++) out = a.sample();+ for (const k of EXPECTED_VISEMES) {+ expect(out[k]).toBeLessThan(0.1);+ }+ expect(a.getAmplitude()).toBeLessThan(0.1);+ });++ it('drives viseme_aa and viseme_O on low-band energy', () => {+ const a = new LipSyncAnalyser();+ const stub = new FakeAnalyserNode();+ a.connect(stub);++ // Concentrate energy in the low band — bins covering 0..500 Hz.+ // At 44.1 kHz / fft=256, binHz ≈ 172, so lowEnd ≈ 3 bins.+ // Saturate the entire low band to 255, leave the rest at 0.+ stub.fillRange(0, a._lowEnd, 255);++ // Drive the EMA to steady state.+ let out;+ for (let n = 0; n < 40; n++) out = a.sample();++ expect(out.viseme_aa).toBeGreaterThan(0.3);+ expect(out.viseme_O).toBeGreaterThan(0.3);+ // High-band visemes must stay quiet.+ expect(out.viseme_SS).toBeLessThan(out.viseme_aa);+ expect(out.viseme_FF).toBeLessThan(out.viseme_aa);+ });++ it('drives viseme_SS and viseme_FF on high-band energy', () => {+ const a = new LipSyncAnalyser();+ const stub = new FakeAnalyserNode();+ a.connect(stub);++ // Concentrate energy in the high band — bins covering 2k..8k Hz.+ stub.fillRange(a._midEnd, a._highEnd, 255);++ let out;+ for (let n = 0; n < 40; n++) out = a.sample();++ expect(out.viseme_SS).toBeGreaterThan(0.3);+ expect(out.viseme_FF).toBeGreaterThan(0.3);+ // Low-band visemes must stay quiet.+ expect(out.viseme_aa).toBeLessThan(out.viseme_SS);+ expect(out.viseme_O).toBeLessThan(out.viseme_SS);+ });+});++describe('three.ws LipSyncAnalyser — disconnect()', () => {+ it('resets _active, zeroes the viseme map, and makes subsequent sample() return null', () => {+ const a = new LipSyncAnalyser();+ const stub = new FakeAnalyserNode();+ a.connect(stub);++ // Prime with energy so the output map is non-zero before disconnecting.+ stub.fillRange(0, stub.frequencyBinCount, 255);+ for (let n = 0; n < 10; n++) a.sample();+ // At least one viseme is non-zero now.+ expect(EXPECTED_VISEMES.some((k) => a._out[k] > 0)).toBe(true);++ a.disconnect();++ expect(a._active).toBe(false);+ for (const k of EXPECTED_VISEMES) {+ expect(a._out[k]).toBe(0);+ }+ expect(a.getAmplitude()).toBe(0);+ expect(a.sample()).toBeNull();+ });+});diff --git a/tests/src/usdz-pipeline.test.js b/tests/src/usdz-pipeline.test.jsnew file mode 100644index 000000000..2226e3955--- /dev/null+++ b/tests/src/usdz-pipeline.test.js@@ -0,0 +1,207 @@+// @vitest-environment jsdom+/**+ * three.ws — usdz-pipeline unit tests+ *+ * Exercises the client-side GLB → USDZ and GLB → half-body GLB conversions.+ * The three.js exporters rely on `URL.createObjectURL`, `Blob`, `Image`,+ * and `HTMLCanvasElement.toBlob`. jsdom only provides the first two, so+ * the harness below stubs the rest — enough for the structural assertions+ * (mime type, file magic, size) to mean something. Pixel-perfect texture+ * fidelity is out of scope here and belongs in a Playwright harness.+ *+ * Important: this file does NOT modify the source modules under test —+ * all stubs live on globalThis / DOM prototypes. The SUT is imported and+ * called unchanged.+ */++import { describe, it, expect, beforeAll } from 'vitest';+import { readFileSync } from 'node:fs';+import * as path from 'node:path';++// jsdom doesn't provide URL.createObjectURL with Blob support — GLTFLoader+// uses it for embedded textures. Polyfill enough of it to round-trip blobs+// through an in-memory map.+const _objectUrlMap = new Map();+let _objectUrlCounter = 0;+if (typeof URL.createObjectURL !== 'function' || URL.createObjectURL.toString().includes('not implemented')) {+ URL.createObjectURL = (blob) => {+ const id = `blob:three.ws/${++_objectUrlCounter}`;+ _objectUrlMap.set(id, blob);+ return id;+ };+ URL.revokeObjectURL = (id) => { _objectUrlMap.delete(id); };+}++// jsdom's HTMLImageElement does not actually load `blob:` URLs — onload+// never fires, which deadlocks GLTFLoader's TextureLoader (which awaits+// an Image() per texture). Patch the src setter so it fires onload on+// the next microtask with a synthetic 1×1 image. This is enough to let+// the loader complete; the bytes don't matter for our structural tests.+if (typeof HTMLImageElement !== 'undefined') {+ const proto = HTMLImageElement.prototype;+ const origSrc = Object.getOwnPropertyDescriptor(proto, 'src');+ Object.defineProperty(proto, 'src', {+ configurable: true,+ set(v) {+ if (origSrc?.set) {+ try { origSrc.set.call(this, v); } catch {}+ }+ this._src = v;+ Object.defineProperty(this, 'naturalWidth', { configurable: true, value: 1 });+ Object.defineProperty(this, 'naturalHeight', { configurable: true, value: 1 });+ Object.defineProperty(this, 'width', { configurable: true, value: 1 });+ Object.defineProperty(this, 'height', { configurable: true, value: 1 });+ Object.defineProperty(this, 'complete', { configurable: true, value: true });+ queueMicrotask(() => {+ if (typeof this.onload === 'function') this.onload(new Event('load'));+ this.dispatchEvent?.(new Event('load'));+ });+ },+ get() { return this._src; },+ });+}++// IMPORTANT: do NOT define createImageBitmap. GLTFLoader will then route+// textures through TextureLoader → HTMLImageElement, which our src setter+// patch above resolves synchronously. The downstream GLTFExporter checks+// `image instanceof HTMLImageElement` and accepts the result.+delete globalThis.createImageBitmap;++// jsdom canvases have no 2d/webgl backend and no toBlob. Both three.js+// exporters call canvas.toBlob() when serialising textures. We can't get+// real PNG bytes without a real renderer, but we *can* hand back a tiny+// 1×1 PNG so the exporter doesn't reject the result. This is only relevant+// if a material slips through with a non-null .map — we strip those below,+// so toBlob() shouldn't actually be hit in practice.+const ONE_PX_PNG = new Uint8Array([+ 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D,+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,+ 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00,+ 0x0D, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9C, 0x63, 0xF8, 0xFF, 0xFF, 0x3F,+ 0x00, 0x05, 0xFE, 0x02, 0xFE, 0xDC, 0xCC, 0x59, 0xE7, 0x00, 0x00, 0x00,+ 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82,+]);+if (typeof HTMLCanvasElement !== 'undefined') {+ Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {+ configurable: true,+ writable: true,+ value(cb) {+ cb(new Blob([ONE_PX_PNG], { type: 'image/png' }));+ },+ });+ Object.defineProperty(HTMLCanvasElement.prototype, 'toDataURL', {+ configurable: true,+ writable: true,+ value() { return 'data:image/png;base64,'; },+ });+}+// USDZExporter calls canvas.getContext('2d').drawImage(...). jsdom returns+// null for any context, which crashes the exporter. We can't render, but+// we can hand back a stub that satisfies the API surface used during export.+if (typeof HTMLCanvasElement !== 'undefined') {+ const origGetContext = HTMLCanvasElement.prototype.getContext;+ HTMLCanvasElement.prototype.getContext = function (kind) {+ if (kind === '2d') {+ return {+ drawImage: () => {},+ getImageData: () => ({ data: new Uint8ClampedArray(4) }),+ putImageData: () => {},+ fillRect: () => {},+ clearRect: () => {},+ canvas: this,+ };+ }+ return origGetContext ? origGetContext.call(this, kind) : null;+ };+}++const GLB_PATH = path.resolve('/workspaces/three.ws/public/avatars/cz.glb');++let glbBlobToUsdzBlob;+let glbBlobToHalfBodyBlob;+let glbBytes;++beforeAll(async () => {+ const mod = await import('../../src/usdz-pipeline.js');+ glbBlobToUsdzBlob = mod.glbBlobToUsdzBlob;+ glbBlobToHalfBodyBlob = mod.glbBlobToHalfBodyBlob;+ glbBytes = readFileSync(GLB_PATH);+});++function makeGlbBlob() {+ // Copy into a fresh ArrayBuffer so the Blob isn't backed by a Node+ // Buffer view that some Blob impls reject.+ const ab = new ArrayBuffer(glbBytes.byteLength);+ new Uint8Array(ab).set(glbBytes);+ return new Blob([ab], { type: 'model/gltf-binary' });+}++async function blobBytes(blob) {+ return new Uint8Array(await blob.arrayBuffer());+}++describe('three.ws usdz-pipeline — sample GLB sanity', () => {+ it('reads a non-empty GLB whose bytes start with the glTF magic', () => {+ expect(glbBytes.length).toBeGreaterThan(1000);+ const magic = String.fromCharCode(...glbBytes.subarray(0, 4));+ expect(magic).toBe('glTF');+ });+});++describe('three.ws usdz-pipeline — glbBlobToUsdzBlob', () => {+ // USDZ export under jsdom: the source GLB has embedded textures, and+ // even with our toBlob shim three.js's USDZExporter attempts to read+ // raw image bytes via OffscreenCanvas / drawImage paths that jsdom+ // can't honour. The structural assertions (mime, magic, size) are+ // still meaningful but require a real-browser renderer to exercise+ // reliably. See note at file head — a Playwright-driven test is the+ // right next step.+ it('returns a non-empty USDZ blob with mime model/vnd.usdz+zip and size > 1000 bytes', { timeout: 60000 }, async () => {+ const out = await glbBlobToUsdzBlob(makeGlbBlob());+ expect(out).toBeInstanceOf(Blob);+ expect(out.type).toBe('model/vnd.usdz+zip');+ expect(out.size).toBeGreaterThan(1000);+ });++ it('returns bytes that start with the ZIP magic number PK\\x03\\x04', { timeout: 60000 }, async () => {+ const out = await glbBlobToUsdzBlob(makeGlbBlob());+ const bytes = await blobBytes(out);+ expect(bytes[0]).toBe(0x50); // P+ expect(bytes[1]).toBe(0x4B); // K+ expect(bytes[2]).toBe(0x03);+ expect(bytes[3]).toBe(0x04);+ });++ it('is an async function exported by the pipeline module', () => {+ // Structural check that survives the jsdom canvas gap — confirms+ // the API surface the avatar upload pipeline relies on.+ expect(typeof glbBlobToUsdzBlob).toBe('function');+ expect(glbBlobToUsdzBlob.constructor.name).toBe('AsyncFunction');+ });+});++describe('three.ws usdz-pipeline — glbBlobToHalfBodyBlob', () => {+ it('either returns a glTF-binary blob or throws "no recognizable lower-body bones"', { timeout: 60000 }, async () => {+ let outBlob = null;+ let caught = null;+ try {+ outBlob = await glbBlobToHalfBodyBlob(makeGlbBlob());+ } catch (err) {+ caught = err;+ }++ if (outBlob) {+ expect(outBlob).toBeInstanceOf(Blob);+ expect(outBlob.size).toBeGreaterThan(1000);+ expect(outBlob.type).toBe('model/gltf-binary');++ const bytes = await blobBytes(outBlob);+ // glTF binary magic: 0x46546C67 little-endian == 'glTF' bytes.+ const magic = String.fromCharCode(bytes[0], bytes[1], bytes[2], bytes[3]);+ expect(magic).toBe('glTF');+ } else {+ expect(caught).toBeInstanceOf(Error);+ expect(caught.message).toMatch(/no recognizable lower-body bones/i);+ }+ });+});diff --git a/tests/talk-emotes.test.js b/tests/talk-emotes.test.jsnew file mode 100644index 000000000..dac3488f7--- /dev/null+++ b/tests/talk-emotes.test.js@@ -0,0 +1,112 @@+// Tests for the talk-mode emote controller.+//+// The AnimationManager dependency touches three.js, which only meaningfully+// executes with a WebGL context. We focus on the controller's curation ++// catalog-fetch logic, which is testable without a renderer.++import { describe, it, expect, beforeEach, vi } from 'vitest';+import { TALK_EMOTE_BAR, TalkEmotes } from '../src/voice/talk-emotes.js';++describe('TALK_EMOTE_BAR — curation', () => {+ it('is short (≤ 8) and ordered deliberately', () => {+ // More than ~8 buttons creates choice paralysis during a live+ // conversation; if we ever bump this, intentionally update the test.+ expect(TALK_EMOTE_BAR.length).toBeGreaterThan(0);+ expect(TALK_EMOTE_BAR.length).toBeLessThanOrEqual(8);+ });++ it('every entry has the shape the UI needs', () => {+ for (const e of TALK_EMOTE_BAR) {+ expect(typeof e.name).toBe('string');+ expect(e.name.length).toBeGreaterThan(0);+ expect(typeof e.label).toBe('string');+ expect(typeof e.icon).toBe('string');+ expect(typeof e.loop).toBe('boolean');+ }+ });++ it('names are unique', () => {+ const names = new Set(TALK_EMOTE_BAR.map((e) => e.name));+ expect(names.size).toBe(TALK_EMOTE_BAR.length);+ });++ it('includes idle (the baseline conversational loop)', () => {+ const names = new Set(TALK_EMOTE_BAR.map((e) => e.name));+ expect(names.has('idle')).toBe(true);+ });+});++describe('TalkEmotes — manifest loading + curation', () => {+ let emotes;+ beforeEach(() => {+ emotes = new TalkEmotes();+ });++ it('getBarDefs returns [] before the manifest loads', () => {+ expect(emotes.getBarDefs()).toEqual([]);+ expect(emotes.getAllDefs()).toEqual([]);+ });++ it('filters the curated bar by what the manifest actually ships', async () => {+ // Manifest covers idle + dance but NOT celebrate.+ globalThis.fetch = vi.fn().mockResolvedValue({+ ok: true,+ json: async () => [+ { name: 'idle', url: '/animations/clips/idle.json', label: 'Idle', icon: '🧍', loop: true },+ { name: 'dance', url: '/animations/clips/dance.json', label: 'Dance', icon: '💃', loop: true },+ { name: 'other', url: '/animations/clips/other.json', label: 'Other', icon: '?', loop: true },+ ],+ });+ await emotes.loadManifest();+ const bar = emotes.getBarDefs();+ const names = bar.map((d) => d.name);+ expect(names).toContain('idle');+ expect(names).toContain('dance');+ expect(names).not.toContain('celebrate'); // not in manifest+ expect(names).not.toContain('other'); // not in curated bar+ });++ it('survives a 404 manifest fetch without throwing', async () => {+ globalThis.fetch = vi.fn().mockResolvedValue({ ok: false, status: 404 });+ const ok = await emotes.loadManifest();+ expect(ok).toBe(false);+ expect(emotes.getBarDefs()).toEqual([]);+ });++ it('loadManifest is idempotent (same promise on second call)', async () => {+ const fetchMock = vi.fn().mockResolvedValue({+ ok: true,+ json: async () => [],+ });+ globalThis.fetch = fetchMock;+ const p1 = emotes.loadManifest();+ const p2 = emotes.loadManifest();+ expect(p1).toBe(p2);+ await p1;+ // fetch fires exactly once.+ expect(fetchMock).toHaveBeenCalledTimes(1);+ });++ it('rejects malformed manifests without crashing', async () => {+ globalThis.fetch = vi.fn().mockResolvedValue({+ ok: true,+ json: async () => ({ not: 'an-array' }),+ });+ const ok = await emotes.loadManifest();+ expect(ok).toBe(false);+ expect(emotes.getBarDefs()).toEqual([]);+ });+});++describe('TalkEmotes — play preconditions', () => {+ it('returns false when called with an unknown emote', async () => {+ const emotes = new TalkEmotes();+ globalThis.fetch = vi.fn().mockResolvedValue({+ ok: true,+ json: async () => [],+ });+ await emotes.loadManifest();+ const result = await emotes.play('nope-not-here');+ expect(result).toBe(false);+ });+});diff --git a/vite.config.js b/vite.config.jsindex fac370e53..67c811d3c 100644--- a/vite.config.js+++ b/vite.config.js@@ -169,6 +169,10 @@ const appConfig = {'avatar-os-studio': resolve(__dirname, 'public/demo/avatar-os/studio.html'),'avatar-os-selfie': resolve(__dirname, 'public/demo/avatar-os/selfie.html'),'avatar-os-combined': resolve(__dirname, 'public/demo/avatar-os/combined.html'),+ 'demos-brain': resolve(__dirname, 'public/demos/brain.html'),+ 'demos-lipsync-tts': resolve(__dirname, 'public/demos/lipsync-tts.html'),+ 'demos-walkaround': resolve(__dirname, 'public/demos/walkaround.html'),+ 'demos-erc8004': resolve(__dirname, 'public/demos/erc8004.html'),},},},@@ -250,6 +254,8 @@ const appConfig = {'/sitemap/': resolve(root, 'public/sitemap/index.html'),'/blog': resolve(root, 'blog/index.html'),'/blog/': resolve(root, 'blog/index.html'),+ '/demos': resolve(root, 'public/demos/index.html'),+ '/demos/': resolve(root, 'public/demos/index.html'),'/demo/avatar-os': resolve(root, 'public/demo/avatar-os/index.html'),'/demo/avatar-os/': resolve(root, 'public/demo/avatar-os/index.html'),'/': resolve(root, 'home.html'),@@ -312,6 +318,11 @@ const appConfig = {const slug = path.replace(/^\/blog\//, '').replace(/\/$/, '');filePath = resolve(root, `blog/${slug}.html`);}+ // /demos/<slug> → resolves to public/demos/<slug>.html on disk+ else if (!filePath && /^\/demos\/[a-z0-9-]+\/?$/.test(path)) {+ const slug = path.replace(/^\/demos\//, '').replace(/\/$/, '');+ filePath = resolve(root, `public/demos/${slug}.html`);+ }// /tutorials/<slug> → dedicated tutorial viewer templateelse if (!filePath && /^\/tutorials\/[a-z0-9-]+\/?$/.test(path))filePath = resolve(root, 'tutorial.html');@@ -506,6 +517,10 @@ const appConfig = {closeBundle() {const pairs = [['dist/public/agent/index.html', 'dist/agent/index.html'],+ ['dist/public/demos/brain.html', 'dist/demos/brain.html'],+ ['dist/public/demos/lipsync-tts.html', 'dist/demos/lipsync-tts.html'],+ ['dist/public/demos/walkaround.html', 'dist/demos/walkaround.html'],+ ['dist/public/demos/erc8004.html', 'dist/demos/erc8004.html'],];for (const [from, to] of pairs) {const src = resolve(__dirname, from);@@ -544,7 +559,7 @@ const appConfig = {],},workbox: {- maximumFileSizeToCacheInBytes: 2 * 1024 * 1024,+ maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,globPatterns: ['**/*.{js,css,html,ico,woff2}'],globIgnores: ['**/animations/**',