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
Add vaults page, implement performer nameplates, and enhance autopilot functionality
vwkbeb094a137275
diff --git a/api/_lib/autopilot.js b/api/_lib/autopilot.jsindex e61a7f07f..0c7ebc348 100644--- a/api/_lib/autopilot.js+++ b/api/_lib/autopilot.js@@ -813,7 +813,7 @@ export async function undoProposal({ proposal, agentId, userId }) {}/** Dismiss a pending proposal; records a light feedback signal. */-export async function dismissProposal({ proposal, agentId, userId }) {+export async function dismissProposal({ proposal, agentId }) {if (proposal.status !== 'pending') throw new AutopilotError('Only a pending proposal can be dismissed.', { code: 'not_pending', status: 409 });await sql`UPDATE agent_autopilot_proposalsdiff --git a/api/autopilot/activity.js b/api/autopilot/activity.jsindex 08ddb30a3..9f7b1161d 100644--- a/api/autopilot/activity.js+++ b/api/autopilot/activity.js@@ -108,7 +108,9 @@ export default wrap(async (req, res) => {// The receipt's "what happened" — payload minus the provenance fields the UI// renders separately (rationale + source ids + ids/ts).+const PROVENANCE_KEYS = new Set(['rationale', 'source_memory_ids', 'source_reflection_id', 'proposal_id', 'ts']);function stripProvenance(payload) {- const { rationale, source_memory_ids, source_reflection_id, proposal_id, ts, ...rest } = payload || {};- return rest;+ const out = {};+ for (const [k, v] of Object.entries(payload || {})) if (!PROVENANCE_KEYS.has(k)) out[k] = v;+ return out;}diff --git a/prompts/living-agents/06-portable-verifiable-brain.md b/prompts/living-agents/06-portable-verifiable-brain.mddeleted file mode 100644index ae7db988f..000000000--- a/prompts/living-agents/06-portable-verifiable-brain.md+++ /dev/null@@ -1,85 +0,0 @@-# Task 06 — Portable & Verifiable Brain (own your agent's mind)--> Read `prompts/living-agents/00-README.md` and `CLAUDE.md` first. Depends on Task 01;-> integrates with Task 03 (Mind Palace) if present. Builds on the REAL primitives that-> already exist: `agent_memory_pins`, IPFS pinning, ECIES encrypt-to-owner (the-> `encrypted-ipfs` memory mode), ERC-8004 on-chain identity in `contracts/`,-> `agent_actions` signed action log.--## Mission--Make the agent's mind something the user **truly owns** — verifiable, portable, and-exportable — instead of rows in our database they implicitly rent. Your agent's memories-and personality are yours: cryptographically signed, optionally encrypted to your wallet,-pinned to IPFS, anchored on-chain, and exportable/importable as a portable "brain file."--## The innovation bar--No consumer agent platform lets you _own and carry your agent's mind_. The game-changers:-- **Provable growth:** an agent's brain has a verifiable history — memories are signed- (extend the existing `agent_actions` signing) and key milestones anchored on-chain via- ERC-8004, so a buyer/forker can trust what an agent "knows" and how it evolved.-- **Encrypted personal memory:** private memories encrypted to the owner's wallet pubkey- (ECIES, already used for `encrypted-ipfs`) and pinned to IPFS — we can't read them; the- user can move them.-- **Portable brain export/import:** export a `.brain` bundle (persona + curated memories +- manifest, schema-versioned) the user can back up, move between agents, or — for public- parts — share. Import reconstitutes a mind into a new or forked agent.-- This makes the marketplace's existing fork mechanic meaningful: you fork a mind with- provenance, not just a prompt.--## What to build--1. **Signed memory + verification.** Sign memory writes (reuse the `agent_actions`- signer infrastructure: `signature`, `signer_address`) so any memory's integrity and- authorship are verifiable. Add a real verification endpoint/utility that checks a- memory or a whole brain bundle against its signatures.-2. **Encryption & pinning UX.** Expose the existing `local | ipfs | encrypted-ipfs | none`- memory storage modes as a real, understandable control on the agent (per-agent default- + per-memory override). Wire encrypted-IPFS through the real ECIES + pinning path; record- CIDs in `agent_memory_pins`. Show pin status and CIDs honestly in the UI.-3. **On-chain anchoring.** Anchor brain milestones (e.g. a content-addressed hash of the- curated memory set + persona version) to the real ERC-8004 identity in `contracts/` via- the existing on-chain path. Surface "verified on-chain" with a real explorer link — never- a fake checkmark.-4. **Export / import brain bundle.** `GET /api/agent/{id}/brain/export` produces a- schema-versioned bundle (persona + selected memories + manifest + signatures; private- memories stay encrypted). `POST …/brain/import` reconstitutes into a new/forked agent- with provenance preserved and a real ownership/permission check. Define the bundle schema- (consider `packages/avatar-schema` conventions) and validate on import.-5. **UI.** A "Brain ownership" surface (in `/agent/{id}/edit`, linked from the Mind Palace):- storage mode, pin/encryption status + CIDs, on-chain anchor status + explorer link,- export/import with clear consequences. Every action wired to a real endpoint.--## Wiring & real-API mandate--- Real IPFS pinning, real ECIES encryption, real on-chain anchoring through the existing- contracts and worker paths. Real signature verification.-- `$THREE` is the only coin; any on-chain/token references obey `CLAUDE.md`. Use only the- `$THREE` CA or synthetic placeholders in tests/fixtures — never a real foreign mint/address.-- No fake CIDs, no decorative "verified" badges, no mock signatures.--## Definition of done--- [ ] Memory writes are signed and a real verification check passes/fails correctly.-- [ ] Storage-mode control works end to end; encrypted-IPFS memories pin with real CIDs in- `agent_memory_pins` and are unreadable without the owner key.-- [ ] A real on-chain anchor is written and surfaced with a working explorer link.-- [ ] Export produces a valid signed bundle; import reconstitutes a mind into a forked- agent with provenance + permission checks; round-trip verified.-- [ ] Loading/empty/error states designed; destructive actions (export of private data,- import overwrite) clearly confirmed.-- [ ] No console errors/warnings; `npm test` passes; `git diff` reviewed.-- [ ] Changelog entry (`feature`/`security`) + `npm run build:pages`.--## Self-improvement pass--Ask: is ownership real and legible to a non-crypto user? Add the elevating layer — a-human-readable "brain passport" showing provenance and verification at a glance, a-diff/merge when importing into an agent that already has memories, or a public,-privacy-safe "proof of growth" others can verify. Build the best one, fully wired.--## When done--Delete this file. Report the bundle schema, the encryption/pinning path, and the on-chain-anchor mechanism you used.diff --git a/prompts/living-agents/08-memory-grounded-autopilot.md b/prompts/living-agents/08-memory-grounded-autopilot.mddeleted file mode 100644index 32de535bc..000000000--- a/prompts/living-agents/08-memory-grounded-autopilot.md+++ /dev/null@@ -1,78 +0,0 @@-# Task 08 — Memory-grounded Autopilot (explainable autonomy)--> Read `prompts/living-agents/00-README.md` and `CLAUDE.md` first. Depends on Task 01 and-> Task 04 (Reflection). Builds on the REAL alert & automation engine that already landed-> (git log: "real-time alert and automation engine for user-defined alerts"), the-> `agent_actions` signed log, `api/_lib/agent-wallet.js`, and the existing Autopilot tab in-> `src/agent-edit.js`.--## Mission--Let the agent **act on the user's behalf, grounded in its memory, and always explain why.**-The existing alert/automation engine fires on conditions; this task makes the agent an-autonomous-but-accountable actor: it proposes and (within user-granted limits) takes real-actions — alerts, briefings, wallet operations — and every action is traceable to the-memory or reflection that motivated it.--## The innovation bar--Autonomous agents are either toys (no real actions) or black boxes (scary, untrusted). The-game-changer is **explainable autonomy**: every action the agent takes shows its receipt —-"I set up a morning $THREE alert *because* you checked it 5 mornings in a row (memory #…,-reflection #…)." The user grants scoped permission, watches the agent earn trust through-legible decisions, and can revoke or tighten at any time. Memory + reflection make the-autonomy *justified*; the receipt makes it *trusted*.--## What to build--1. **Action proposals from the mind.** Consume `dream:created` (Task 04) and high-salience- memories to generate concrete, real action proposals (e.g. create an alert rule in the- existing engine, schedule a briefing, prepare a wallet action). Each proposal cites its- source memory/reflection ids — provenance mandatory.-2. **Permission & scope (real guardrails).** A real permission model: the user grants the- agent scoped capabilities (e.g. "can create alerts," "can spend up to X $THREE/day,"- "must ask before wallet actions"). Enforce server-side. Wallet actions use the real- `api/_lib/agent-wallet.js` custodial path. Anything irreversible (spending, publishing)- requires explicit confirmation unless the user durably pre-authorized that exact scope.- Default to ask. **$THREE only** for any token reference.-3. **Execution + signed receipts.** When an action runs, record it in the real- `agent_actions` append-only signed log with its motivating memory/reflection ids, and- emit `action:taken` on the bus. The Companion (Task 02) surfaces a receipt chip; a- dedicated "Activity" surface lists every action with its full explanation and a link to- the source memory in the Mind Palace (Task 03).-4. **Trust loop.** The user can approve/undo/adjust any action; approvals and reversals feed- back as real memories/feedback (closing the loop with Task 04/05 — the agent learns the- boundaries). Show a real "trust level" derived from action history, not a vanity number.-5. **Surfaces.** Extend the existing Autopilot tab for setup; add an Activity/receipts view;- wire proposals into the Dreams review (Task 04) so accepting a dream can create a rule.--## Wiring & real-API mandate--- Real alert/automation engine, real `agent_actions`, real wallet path. No simulated- actions, no fake "the agent did X" entries, no placeholder trust score.-- Irreversible actions are real and gated by real permission checks — never auto-execute a- spend the user didn't scope. Errors handled at the boundary with real recovery.--## Definition of done--- [ ] Agent generates real action proposals citing real source memories/reflections.-- [ ] Permission/scope model enforced server-side; wallet actions use the real custodial- path; irreversible actions gated by real confirmation/pre-authorization.-- [ ] Executed actions are written to `agent_actions` (signed) with provenance and emit- `action:taken`; Activity view shows every action + its explanation + source link.-- [ ] Approve/undo/adjust feeds real feedback memories; trust level derived from real history.-- [ ] Loading/empty/error states designed; nothing fires without permission. `$THREE` only.-- [ ] No console errors/warnings; `npm test` passes; `git diff` reviewed.-- [ ] Changelog entry (`feature`/`security`) + `npm run build:pages`.--## Self-improvement pass--Ask: would a cautious user actually trust this? Add the elevating layer — a "dry run"-preview that shows what the agent *would* do before granting permission, a daily-agent-authored briefing of what it did and why, or graduated autonomy that widens scope as-trust is earned. Build the most trust-building one, fully wired and safely gated.--## When done--Delete this file. Report the permission model, the action types you wired, and the receipt-provenance chain.diff --git a/src/theater-stage.js b/src/theater-stage.jsindex fc04fadd2..9872b15e5 100644--- a/src/theater-stage.js+++ b/src/theater-stage.js@@ -237,10 +237,36 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false }})();if (drivable && !reducedMotion) anim.play('idle');- const rec = { agent, group, model, pad, anim, drivable, slot, busy: false };+ const rec = { agent, group, model, pad, anim, drivable, slot, busy: false, plate: null };+ rec.plate = makePlate(rec, index);performers.set(agent.id, rec);}+ // A projected DOM nameplate over each performer: shows who's on stage (the+ // bodies are otherwise anonymous), and IS the primary hit target — a real+ // keyboard-focusable button, far more reliable to click than a posed skinned+ // mesh, and accessible on touch. The body raycast stays as a secondary path.+ function makePlate(rec, index) {+ const btn = document.createElement('button');+ btn.className = 'th-plate';+ btn.type = 'button';+ btn.tabIndex = 0;+ btn.setAttribute('aria-label', `${rec.agent.name || 'Agent'} — open details`);+ const name = document.createElement('span');+ name.className = 'th-plate-name';+ name.textContent = rec.agent.name || 'Agent';+ btn.appendChild(name);+ if (Number.isFinite(rec.agent.score)) {+ const pip = document.createElement('span');+ pip.className = 'th-plate-score';+ pip.textContent = String(Math.round(rec.agent.score));+ btn.appendChild(pip);+ }+ btn.addEventListener('click', (e) => { e.stopPropagation(); onSelect?.(rec.agent.id); });+ overlay.appendChild(btn);+ return btn;+ }+/*** Reconcile the staged cast with a new roster (room switch / refresh). Removes* performers no longer present and adds new ones, preserving any that stay.@@ -262,6 +288,7 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false }function removePerformer(id, rec) {performers.delete(id);try { rec.anim?.dispose?.(); } catch {}+ rec.plate?.remove();rec.group?.parent?.remove(rec.group);rec.pad?.parent?.remove(rec.pad);rec.group?.traverse?.((n) => {diff --git a/src/vaults.css b/src/vaults.cssnew file mode 100644index 000000000..998c7d85b--- /dev/null+++ b/src/vaults.css@@ -0,0 +1,220 @@+/* Back-an-Agent Vaults — finance surface. Violet wallet-accent on glass.+ Tokens only (public/tokens.css); responsive at 320 / 768 / 1440. */++.vx-shell {+ max-width: 1180px;+ margin: 0 auto;+ padding: var(--space-xl) var(--space-md) var(--space-2xl);+ color: var(--ink);+}+.vx-view { animation: vx-fade var(--duration-base) var(--ease-out); }+@keyframes vx-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }++/* ── hero ─────────────────────────────────────────────────────────────────── */+.vx-hero { max-width: 760px; margin-bottom: var(--space-xl); }+.vx-kicker {+ display: inline-flex; align-items: center; gap: var(--space-xs);+ font: var(--weight-medium) var(--text-sm) / 1 var(--font-mono);+ color: var(--wallet-accent); text-transform: uppercase; letter-spacing: 0.08em;+ margin: 0 0 var(--space-sm);+}+.vx-live-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--success); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); animation: vx-pulse 2s infinite; }+@keyframes vx-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); } 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }+.vx-title { font: var(--weight-bold) var(--text-2xl) / 1.05 var(--font-display); color: var(--ink-bright); margin: 0 0 var(--space-sm); letter-spacing: -0.02em; }+.vx-sub { font-size: var(--text-base); line-height: var(--leading-normal); color: var(--ink-dim); margin: 0 0 var(--space-lg); }+.vx-sub strong { color: var(--ink); font-weight: var(--weight-semibold); }+.vx-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }++/* ── buttons ──────────────────────────────────────────────────────────────── */+.vx-btn {+ display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);+ padding: var(--space-sm) var(--space-md);+ border: 1px solid var(--stroke-strong); border-radius: var(--radius-md);+ background: var(--surface-2); color: var(--ink); cursor: pointer;+ font: var(--weight-medium) var(--text-ui) / 1 var(--font-body);+ text-decoration: none; transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast), transform var(--duration-instant);+}+.vx-btn:hover { background: var(--surface-3); border-color: var(--wallet-accent-strong); }+.vx-btn:active { transform: translateY(1px); }+.vx-btn:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }+.vx-btn--primary { background: var(--wallet-accent-strong); border-color: var(--wallet-accent-strong); color: #15032e; font-weight: var(--weight-semibold); }+.vx-btn--primary:hover { background: var(--wallet-accent); border-color: var(--wallet-accent); }+.vx-btn--ghost { background: transparent; }+.vx-btn--block { width: 100%; }+.vx-btn:disabled { opacity: 0.5; cursor: not-allowed; }++/* ── feed ─────────────────────────────────────────────────────────────────── */+.vx-feed-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); flex-wrap: wrap; }+.vx-h2 { font: var(--weight-semibold) var(--text-lg) / 1 var(--font-display); color: var(--ink-bright); margin: 0; }+.vx-tabs { display: inline-flex; gap: var(--space-3xs); padding: var(--space-3xs); background: var(--surface-1); border: 1px solid var(--stroke); border-radius: var(--radius-pill); }+.vx-tab { border: none; background: transparent; color: var(--ink-dim); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); cursor: pointer; font: var(--weight-medium) var(--text-sm) var(--font-body); transition: background var(--duration-fast), color var(--duration-fast); }+.vx-tab.is-active { background: var(--surface-3); color: var(--ink-bright); }+.vx-tab:hover { color: var(--ink); }++.vx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-md); }++.vx-card {+ display: flex; flex-direction: column; gap: var(--space-sm);+ padding: var(--space-md); text-align: left; cursor: pointer;+ background: var(--surface-1); border: 1px solid var(--stroke); border-radius: var(--radius-lg);+ color: inherit; font: inherit;+ transition: border-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast), background var(--duration-fast);+}+.vx-card:hover { border-color: var(--wallet-accent-strong); transform: translateY(-2px); background: var(--surface-2); }+.vx-card:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }+.vx-card-head { display: flex; align-items: center; gap: var(--space-sm); }+.vx-card-av { width: 44px; height: 44px; border-radius: var(--radius-md); object-fit: cover; flex: 0 0 auto; background: var(--surface-3); }+.vx-card-av--ph { background: linear-gradient(135deg, var(--surface-3), var(--wallet-accent-soft)); }+.vx-card-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }+.vx-card-name { font: var(--weight-semibold) var(--text-md) var(--font-display); color: var(--ink-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+.vx-rep { font: var(--weight-medium) var(--text-2xs) / 1.3 var(--font-mono); padding: 2px 6px; border-radius: var(--radius-sm); align-self: flex-start; }+.vx-rep--ok { color: var(--success); background: rgba(74, 222, 128, 0.12); }+.vx-rep--warn { color: var(--warn); background: rgba(251, 191, 36, 0.12); }+.vx-rep--none, .vx-rep--muted { color: var(--ink-faint); background: var(--surface-2); }+.vx-chip { font: var(--weight-medium) var(--text-2xs) var(--font-mono); padding: 2px 7px; border-radius: var(--radius-pill); align-self: flex-start; }+.vx-chip--warn { color: var(--warn); background: rgba(251, 191, 36, 0.14); }++.vx-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); padding: var(--space-sm) 0; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }+.vx-stat { display: flex; flex-direction: column; gap: 3px; }+.vx-stat-l { font: var(--text-2xs) var(--font-body); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }+.vx-stat-v { font: var(--weight-semibold) var(--text-md) var(--font-mono); color: var(--ink-bright); }+.vx-card-foot { display: flex; justify-content: space-between; gap: var(--space-xs); font: var(--text-xs) var(--font-mono); color: var(--ink-dim); flex-wrap: wrap; }++.is-pos { color: var(--success) !important; }+.is-neg { color: var(--danger) !important; }+.is-flat { color: var(--ink-dim) !important; }++/* skeleton + empty */+.vx-card--skel { gap: var(--space-sm); pointer-events: none; }+.vx-skel-line { height: 14px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: vx-shimmer 1.4s infinite; }+.vx-skel-line.short { width: 55%; }+.vx-skel-stats { height: 52px; border-radius: var(--radius-md); background: var(--surface-2); }+@keyframes vx-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }+.vx-empty { grid-column: 1 / -1; text-align: center; padding: var(--space-2xl) var(--space-md); border: 1px dashed var(--stroke); border-radius: var(--radius-lg); background: var(--surface-1); }+.vx-empty-t { font: var(--weight-semibold) var(--text-lg) var(--font-display); color: var(--ink-bright); margin: 0 0 var(--space-xs); }+.vx-empty-d { color: var(--ink-dim); margin: 0 auto var(--space-md); max-width: 460px; line-height: var(--leading-normal); }++/* ── detail ───────────────────────────────────────────────────────────────── */+.vx-back { background: none; border: none; color: var(--wallet-accent); cursor: pointer; font: var(--weight-medium) var(--text-ui) var(--font-body); padding: var(--space-xs) 0; margin-bottom: var(--space-md); }+.vx-back:hover { color: var(--ink-bright); }+.vx-detail-skel { padding: var(--space-2xl); text-align: center; color: var(--ink-dim); }++.vx-banner { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--stroke); margin-bottom: var(--space-md); font-size: var(--text-sm); color: var(--ink); }+.vx-banner--warn { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.3); color: var(--warn); }++.vx-d-head { display: flex; align-items: flex-start; gap: var(--space-md); margin-bottom: var(--space-lg); flex-wrap: wrap; }+.vx-d-av { width: 72px; height: 72px; border-radius: var(--radius-lg); object-fit: cover; background: var(--surface-3); flex: 0 0 auto; }+.vx-d-av--ph { background: linear-gradient(135deg, var(--surface-3), var(--wallet-accent-soft)); }+.vx-d-id { flex: 1; min-width: 200px; }+.vx-d-name { font: var(--weight-bold) var(--text-xl) var(--font-display); color: var(--ink-bright); margin: 0 0 var(--space-2xs); letter-spacing: -0.01em; }+.vx-d-rep { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-xs); }+.vx-d-rep-detail { font: var(--text-xs) var(--font-mono); color: var(--ink-dim); }+.vx-d-links { display: flex; gap: var(--space-md); }+.vx-link { color: var(--wallet-accent); text-decoration: none; font: var(--weight-medium) var(--text-sm) var(--font-body); }+.vx-link:hover { color: var(--ink-bright); text-decoration: underline; }+.vx-d-cta { margin-left: auto; }++.vx-d-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-sm); margin-bottom: var(--space-lg); }+.vx-metric { background: var(--surface-1); border: 1px solid var(--stroke); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); display: flex; flex-direction: column; gap: var(--space-2xs); }+.vx-metric-l { font: var(--text-2xs) var(--font-body); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }+.vx-metric-v { font: var(--weight-semibold) var(--text-lg) var(--font-mono); color: var(--ink-bright); }++.vx-d-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--space-md); align-items: start; }+.vx-d-main, .vx-d-side { display: flex; flex-direction: column; gap: var(--space-md); }+.vx-panel { background: var(--surface-1); border: 1px solid var(--stroke); border-radius: var(--radius-lg); padding: var(--space-md); }+.vx-panel--mine { border-color: var(--wallet-accent-strong); background: var(--wallet-accent-soft); }+.vx-panel--owner { border-color: var(--stroke-strong); }+.vx-panel-h { font: var(--weight-semibold) var(--text-md) var(--font-display); color: var(--ink-bright); margin: 0 0 var(--space-sm); display: flex; align-items: baseline; gap: var(--space-xs); }+.vx-panel-sub { font: var(--text-2xs) var(--font-mono); color: var(--ink-faint); font-weight: var(--weight-regular); }++.vx-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }+.vx-kv-grid > div { display: flex; flex-direction: column; gap: 2px; }+.vx-kv-grid span { font: var(--text-2xs) var(--font-body); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }+.vx-kv-grid b { font: var(--weight-semibold) var(--text-md) var(--font-mono); color: var(--ink-bright); }+.vx-fineprint { font-size: var(--text-xs); color: var(--ink-faint); line-height: var(--leading-normal); margin: var(--space-sm) 0 0; }++.vx-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }+.vx-table th { text-align: left; font: var(--weight-medium) var(--text-2xs) var(--font-body); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 var(--space-sm) var(--space-xs); }+.vx-table td { padding: var(--space-xs) var(--space-sm); border-top: 1px solid var(--stroke); color: var(--ink); }+.vx-mono { font-family: var(--font-mono); }+.vx-muted { color: var(--ink-faint); }++.vx-terms { display: flex; flex-direction: column; gap: var(--space-xs); }+.vx-terms > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); font-size: var(--text-sm); }+.vx-terms span { color: var(--ink-dim); }+.vx-terms b { font-family: var(--font-mono); color: var(--ink-bright); }++.vx-ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }+.vx-ledger-row { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; border-top: 1px solid var(--stroke); }+.vx-ledger-row:first-child { border-top: none; }+.vx-ledger-i { width: 22px; text-align: center; color: var(--ink-dim); flex: 0 0 auto; }+.vx-ledger--drawdown_halt .vx-ledger-i { color: var(--danger); }+.vx-ledger--deposit .vx-ledger-i { color: var(--success); }+.vx-ledger-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }+.vx-ledger-b b { font: var(--weight-medium) var(--text-sm) var(--font-body); color: var(--ink); }+.vx-ledger-d { font: var(--text-xs) var(--font-mono); color: var(--ink-dim); }+.vx-ledger-t { font: var(--text-2xs) var(--font-mono); color: var(--ink-faint); white-space: nowrap; display: flex; align-items: center; gap: var(--space-xs); }+.vx-ledger-x { color: var(--wallet-accent); text-decoration: none; }++/* owner controls */+.vx-owner-row { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }+.vx-owner-fee { font-size: var(--text-sm); color: var(--ink-dim); margin-left: auto; }+.vx-owner-fee b { font-family: var(--font-mono); color: var(--ink-bright); }+.vx-trade-form { border-top: 1px solid var(--stroke); padding-top: var(--space-md); }+.vx-trade-h { font: var(--weight-semibold) var(--text-sm) var(--font-display); color: var(--ink-bright); margin: 0 0 var(--space-sm); }+.vx-trade-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr auto; gap: var(--space-sm); }++/* ── modals ───────────────────────────────────────────────────────────────── */+.vx-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: var(--space-md); }+.vx-modal[hidden] { display: none; }+.vx-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); animation: vx-fade var(--duration-fast) var(--ease-out); }+.vx-modal-card { position: relative; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; background: var(--bg-1); border: 1px solid var(--stroke-strong); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-3, 0 24px 64px rgba(0,0,0,0.5)); animation: vx-pop var(--duration-base) var(--ease-emphasized); }+@keyframes vx-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }+.vx-modal-x { position: absolute; top: var(--space-sm); right: var(--space-sm); width: 32px; height: 32px; border: none; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--ink-dim); font-size: 20px; line-height: 1; cursor: pointer; }+.vx-modal-x:hover { background: var(--surface-3); color: var(--ink-bright); }+.vx-modal-title { font: var(--weight-bold) var(--text-lg) var(--font-display); color: var(--ink-bright); margin: 0 0 var(--space-xs); padding-right: var(--space-xl); }+.vx-modal-sub { font-size: var(--text-sm); color: var(--ink-dim); line-height: var(--leading-normal); margin: 0 0 var(--space-md); }+body.vx-modal-open { overflow: hidden; }++.vx-form { display: flex; flex-direction: column; gap: var(--space-md); }+.vx-field { display: flex; flex-direction: column; gap: var(--space-2xs); }+.vx-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }+.vx-label { font: var(--weight-medium) var(--text-sm) var(--font-body); color: var(--ink); }+.vx-opt { color: var(--ink-faint); font-weight: var(--weight-regular); }+.vx-input { width: 100%; padding: var(--space-sm) var(--space-md); background: var(--surface-1); border: 1px solid var(--stroke-strong); border-radius: var(--radius-md); color: var(--ink-bright); font: var(--text-ui) var(--font-body); }+.vx-input:focus { outline: none; border-color: var(--wallet-accent-strong); }+.vx-input-suffix { display: flex; align-items: center; gap: var(--space-xs); background: var(--surface-1); border: 1px solid var(--stroke-strong); border-radius: var(--radius-md); padding: 0 var(--space-md); }+.vx-input-suffix .vx-input { border: none; padding-left: 0; padding-right: 0; background: transparent; }+.vx-input-suffix > span { color: var(--ink-dim); font-family: var(--font-mono); font-size: var(--text-sm); }+.vx-hint { font-size: var(--text-xs); color: var(--ink-faint); line-height: var(--leading-normal); }+.vx-risk { font-size: var(--text-xs); color: var(--ink-dim); line-height: var(--leading-normal); padding: var(--space-sm); background: var(--surface-1); border-left: 2px solid var(--warn); border-radius: var(--radius-sm); }+.vx-form-err { font-size: var(--text-sm); color: var(--danger); padding: var(--space-xs) var(--space-sm); background: rgba(248, 113, 113, 0.1); border-radius: var(--radius-sm); }++/* ── toasts ───────────────────────────────────────────────────────────────── */+#vx-toast { position: fixed; bottom: var(--space-lg); right: var(--space-lg); z-index: 300; display: flex; flex-direction: column; gap: var(--space-xs); max-width: 360px; }+.vx-toast-item { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: var(--bg-1); border: 1px solid var(--stroke-strong); color: var(--ink); font-size: var(--text-sm); box-shadow: var(--shadow-2, 0 8px 24px rgba(0,0,0,0.4)); opacity: 0; transform: translateX(12px); transition: opacity var(--duration-base), transform var(--duration-base); }+.vx-toast-item.is-in { opacity: 1; transform: none; }+.vx-toast--ok { border-color: rgba(74, 222, 128, 0.4); }+.vx-toast--err { border-color: rgba(248, 113, 113, 0.4); }+.vx-toast--warn { border-color: rgba(251, 191, 36, 0.4); }++/* ── responsive ───────────────────────────────────────────────────────────── */+@media (max-width: 900px) {+ .vx-d-cols { grid-template-columns: 1fr; }+ .vx-d-metrics { grid-template-columns: repeat(2, 1fr); }+ .vx-trade-grid { grid-template-columns: 1fr 1fr; }+}+@media (max-width: 560px) {+ .vx-shell { padding: var(--space-lg) var(--space-sm) var(--space-2xl); }+ .vx-title { font-size: var(--text-xl); }+ .vx-grid { grid-template-columns: 1fr; }+ .vx-field-row { grid-template-columns: 1fr; }+ .vx-d-metrics { grid-template-columns: 1fr 1fr; }+ .vx-trade-grid { grid-template-columns: 1fr; }+ .vx-d-cta { margin-left: 0; width: 100%; }+ .vx-d-cta .vx-btn { width: 100%; }+ #vx-toast { left: var(--space-sm); right: var(--space-sm); max-width: none; }+}+@media (prefers-reduced-motion: reduce) {+ .vx-view, .vx-modal-card, .vx-modal-backdrop, .vx-toast-item, .vx-live-dot, .vx-skel-line { animation: none !important; transition: none !important; }+}diff --git a/vite.config.js b/vite.config.jsindex 02ef20e57..111b00681 100644--- a/vite.config.js+++ b/vite.config.js@@ -347,6 +347,7 @@ const appConfig = {watchlist: resolve(__dirname, 'pages/watchlist.html'),leaderboard: resolve(__dirname, 'pages/leaderboard.html'),'labor-market': resolve(__dirname, 'pages/labor-market.html'),+ vaults: resolve(__dirname, 'pages/vaults.html'),'alpha-copilot': resolve(__dirname, 'pages/alpha-copilot.html'),'reasoning-ledger': resolve(__dirname, 'pages/reasoning-ledger.html'),mirror: resolve(__dirname, 'pages/mirror.html'),@@ -799,6 +800,8 @@ support: resolve(__dirname, 'pages/support.html'),'/leaderboard/': resolve(root, 'pages/leaderboard.html'),'/labor-market': resolve(root, 'pages/labor-market.html'),'/labor-market/': resolve(root, 'pages/labor-market.html'),+ '/vaults': resolve(root, 'pages/vaults.html'),+ '/vaults/': resolve(root, 'pages/vaults.html'),'/alpha-copilot': resolve(root, 'pages/alpha-copilot.html'),'/alpha-copilot/': resolve(root, 'pages/alpha-copilot.html'),'/arena': resolve(root, 'pages/arena.html'),