vestige/README.md

439 lines
24 KiB
Markdown
Raw Normal View History

<div align="center">
# Vestige
### The cognitive engine that gives AI agents a brain.
[![GitHub stars](https://img.shields.io/github/stars/samvallad33/vestige?style=social)](https://github.com/samvallad33/vestige)
[![Release](https://img.shields.io/github/v/release/samvallad33/vestige)](https://github.com/samvallad33/vestige/releases/latest)
v2.0.9 "Autopilot" — backend event-subscriber + 3,091 LOC orphan cleanup (#46) * feat(v2.0.9): Autopilot — backend event-subscriber routes 6 live events into cognitive hooks The single architectural change that flips 14 dormant cognitive primitives into active ones. Before this commit, Vestige's 20-event WebSocket bus had zero backend subscribers — every emitted event flowed to the dashboard animation layer and terminated. Cognitive modules with fully-built trigger methods (synaptic_tagging.trigger_prp, predictive_memory.record_*, activation_network.activate, prospective_memory.check_triggers, the 6h auto-consolidation dreamer path) were never actually called from the bus. New module `crates/vestige-mcp/src/autopilot.rs` spawns two tokio tasks at startup: 1. Event subscriber — consumes the broadcast::Receiver, routes: - MemoryCreated → synaptic_tagging.trigger_prp(CrossReference) + predictive_memory.record_memory_access(id, preview, tags) - SearchPerformed → predictive_memory.record_query(q, []) + record_memory_access on top 10 result_ids - MemoryPromoted → activation_network.activate(id, 0.3) spread - MemorySuppressed → emit Rac1CascadeSwept (was declared-never-emitted) - ImportanceScored (composite > 0.85 AND memory_id present) → storage.promote_memory + re-emit MemoryPromoted - Heartbeat (memory_count > 700, 6h cooldown) → spawned find_duplicates sweep (rate-limited) The loop holds the CognitiveEngine mutex only per-handler, never across an await, so MCP tool dispatch is never starved. 2. Prospective poller — 60s tokio::interval calls prospective_memory.check_triggers(Context { timestamp: now, .. }). Matched intentions are logged at info! level today; v2.5 "Autonomic" upgrades this to MCP sampling/createMessage for agent-side notifications. ImportanceScored event gained optional `memory_id: Option<String>` field (#[serde(default)], backward-compatible) so auto-promote has the id to target. Both existing emit sites (server.rs tool dispatch, dashboard handlers::score_importance) pass None because they score arbitrary content, not stored memories — matches current semantics. docs/VESTIGE_STATE_AND_PLAN.md §15 POST-v2.0.8 ADDENDUM records the full three-agent audit that produced this architecture (2026-SOTA research, active-vs-passive module audit, competitor landscape), the v2.0.9/v2.5/v2.6 ship order, and the one-line thesis: "the bottleneck was one missing event-subscriber task; wiring it flips Vestige from memory library to cognitive agent that acts on the host LLM." Verified: - cargo check --workspace clean - cargo clippy --workspace -- -D warnings clean (let-chain on Rust 1.91+) - cargo test -p vestige-mcp --lib 356/356 passing, 0 failed * fix(autopilot): supervisor + dedup race + opt-out env var Three blockers from the 5-agent v2.0.9 audit, all in autopilot.rs. 1. Supervisor loops around both tokio tasks (event subscriber + prospective poller). Previously, if a cognitive hook panicked on a single bad memory, the spawned task died permanently and silently — every future event lost. Now the outer supervisor catches JoinError::is_panic(), logs the panic with full error detail, sleeps 5s, and respawns the inner task. Turns a permanent silent failure into a transient hiccup. 2. DedupSweepState struct replaces the bare Option<Instant> timestamp. It tracks the in-flight JoinHandle so the next Heartbeat skips spawning a second sweep while the first is still running. Previously, the cooldown timestamp was set BEFORE spawning the async sweep, which allowed two concurrent find_duplicates scans on 100k+ memory DBs where the sweep could exceed the 6h cooldown window. is_running() drops finished handles so a long-dead sweep doesn't block the next legitimate tick. 3. VESTIGE_AUTOPILOT_ENABLED=0 opt-out. v2.0.8 users updating in place can preserve the passive-library contract by setting the env var to any of {0, false, no, off}. Any other value (unset, 1, true, etc.) enables the default v2.0.9 Autopilot behavior. spawn() early-returns with an info! log before any task is spawned. Audit breakdown: - Agent 1 (internals): NO-GO → fixed (1, 2) - Agent 2 (backward compat): NO-GO → fixed (3) - Agent 3 (orphan cleanup): GO clean - Agent 4 (runtime safety): GO clean - Agent 5 (release prep): GO, procedural note logged Verification: - cargo check -p vestige-mcp: clean - cargo test -p vestige-mcp --lib: 373 passed, 0 failed - cargo clippy -p vestige-mcp --lib --bins -- -D warnings: clean * chore(release): v2.0.9 "Autopilot" Bump workspace + vestige-core + vestige-mcp + apps/dashboard to 2.0.9. CHANGELOG [2.0.9] entry + README hero banner rewrite to "Autopilot". Scope (two commits on top of v2.0.8): - 0e9b260: 3,091 LOC orphan-code cleanup - fe7a68c: Autopilot backend event-subscriber - HEAD (this branch): supervisor + dedup race + opt-out env var hardening Pure backend release — tool count unchanged (24), schema unchanged, JSON-RPC shape unchanged, CLI flags unchanged. Only visible behavior change is the Autopilot task running in the background, which is VESTIGE_AUTOPILOT_ENABLED=0-gated. Test gate: 1,223 passing / 0 failed (workspace, no-fail-fast). Clippy: clean on vestige-mcp lib + bins with -D warnings. Audit: 5 parallel agents (internals, backward compat, orphan cleanup, runtime safety, release prep) — all GO after hardening commit.
2026-04-24 02:00:00 -05:00
[![Tests](https://img.shields.io/badge/tests-1223%20passing-brightgreen)](https://github.com/samvallad33/vestige/actions)
[![License](https://img.shields.io/badge/license-AGPL--3.0-blue)](LICENSE)
[![MCP Compatible](https://img.shields.io/badge/MCP-compatible-green)](https://modelcontextprotocol.io)
**Your Agent forgets everything between sessions. Vestige fixes that.**
Built on 130 years of memory research — FSRS-6 spaced repetition, prediction error gating, synaptic tagging, spreading activation, memory dreaming — all running in a single Rust binary with a 3D neural visualization dashboard. 100% local. Zero cloud.
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
[Quick Start](#quick-start) | [Dashboard](#-3d-memory-dashboard) | [How It Works](#-the-cognitive-science-stack) | [Tools](#-24-mcp-tools) | [Docs](docs/)
</div>
---
v2.0.9 "Autopilot" — backend event-subscriber + 3,091 LOC orphan cleanup (#46) * feat(v2.0.9): Autopilot — backend event-subscriber routes 6 live events into cognitive hooks The single architectural change that flips 14 dormant cognitive primitives into active ones. Before this commit, Vestige's 20-event WebSocket bus had zero backend subscribers — every emitted event flowed to the dashboard animation layer and terminated. Cognitive modules with fully-built trigger methods (synaptic_tagging.trigger_prp, predictive_memory.record_*, activation_network.activate, prospective_memory.check_triggers, the 6h auto-consolidation dreamer path) were never actually called from the bus. New module `crates/vestige-mcp/src/autopilot.rs` spawns two tokio tasks at startup: 1. Event subscriber — consumes the broadcast::Receiver, routes: - MemoryCreated → synaptic_tagging.trigger_prp(CrossReference) + predictive_memory.record_memory_access(id, preview, tags) - SearchPerformed → predictive_memory.record_query(q, []) + record_memory_access on top 10 result_ids - MemoryPromoted → activation_network.activate(id, 0.3) spread - MemorySuppressed → emit Rac1CascadeSwept (was declared-never-emitted) - ImportanceScored (composite > 0.85 AND memory_id present) → storage.promote_memory + re-emit MemoryPromoted - Heartbeat (memory_count > 700, 6h cooldown) → spawned find_duplicates sweep (rate-limited) The loop holds the CognitiveEngine mutex only per-handler, never across an await, so MCP tool dispatch is never starved. 2. Prospective poller — 60s tokio::interval calls prospective_memory.check_triggers(Context { timestamp: now, .. }). Matched intentions are logged at info! level today; v2.5 "Autonomic" upgrades this to MCP sampling/createMessage for agent-side notifications. ImportanceScored event gained optional `memory_id: Option<String>` field (#[serde(default)], backward-compatible) so auto-promote has the id to target. Both existing emit sites (server.rs tool dispatch, dashboard handlers::score_importance) pass None because they score arbitrary content, not stored memories — matches current semantics. docs/VESTIGE_STATE_AND_PLAN.md §15 POST-v2.0.8 ADDENDUM records the full three-agent audit that produced this architecture (2026-SOTA research, active-vs-passive module audit, competitor landscape), the v2.0.9/v2.5/v2.6 ship order, and the one-line thesis: "the bottleneck was one missing event-subscriber task; wiring it flips Vestige from memory library to cognitive agent that acts on the host LLM." Verified: - cargo check --workspace clean - cargo clippy --workspace -- -D warnings clean (let-chain on Rust 1.91+) - cargo test -p vestige-mcp --lib 356/356 passing, 0 failed * fix(autopilot): supervisor + dedup race + opt-out env var Three blockers from the 5-agent v2.0.9 audit, all in autopilot.rs. 1. Supervisor loops around both tokio tasks (event subscriber + prospective poller). Previously, if a cognitive hook panicked on a single bad memory, the spawned task died permanently and silently — every future event lost. Now the outer supervisor catches JoinError::is_panic(), logs the panic with full error detail, sleeps 5s, and respawns the inner task. Turns a permanent silent failure into a transient hiccup. 2. DedupSweepState struct replaces the bare Option<Instant> timestamp. It tracks the in-flight JoinHandle so the next Heartbeat skips spawning a second sweep while the first is still running. Previously, the cooldown timestamp was set BEFORE spawning the async sweep, which allowed two concurrent find_duplicates scans on 100k+ memory DBs where the sweep could exceed the 6h cooldown window. is_running() drops finished handles so a long-dead sweep doesn't block the next legitimate tick. 3. VESTIGE_AUTOPILOT_ENABLED=0 opt-out. v2.0.8 users updating in place can preserve the passive-library contract by setting the env var to any of {0, false, no, off}. Any other value (unset, 1, true, etc.) enables the default v2.0.9 Autopilot behavior. spawn() early-returns with an info! log before any task is spawned. Audit breakdown: - Agent 1 (internals): NO-GO → fixed (1, 2) - Agent 2 (backward compat): NO-GO → fixed (3) - Agent 3 (orphan cleanup): GO clean - Agent 4 (runtime safety): GO clean - Agent 5 (release prep): GO, procedural note logged Verification: - cargo check -p vestige-mcp: clean - cargo test -p vestige-mcp --lib: 373 passed, 0 failed - cargo clippy -p vestige-mcp --lib --bins -- -D warnings: clean * chore(release): v2.0.9 "Autopilot" Bump workspace + vestige-core + vestige-mcp + apps/dashboard to 2.0.9. CHANGELOG [2.0.9] entry + README hero banner rewrite to "Autopilot". Scope (two commits on top of v2.0.8): - 0e9b260: 3,091 LOC orphan-code cleanup - fe7a68c: Autopilot backend event-subscriber - HEAD (this branch): supervisor + dedup race + opt-out env var hardening Pure backend release — tool count unchanged (24), schema unchanged, JSON-RPC shape unchanged, CLI flags unchanged. Only visible behavior change is the Autopilot task running in the background, which is VESTIGE_AUTOPILOT_ENABLED=0-gated. Test gate: 1,223 passing / 0 failed (workspace, no-fail-fast). Clippy: clean on vestige-mcp lib + bins with -D warnings. Audit: 5 parallel agents (internals, backward compat, orphan cleanup, runtime safety, release prep) — all GO after hardening commit.
2026-04-24 02:00:00 -05:00
## What's New in v2.0.9 "Autopilot"
Autopilot flips Vestige from passive memory library to **self-managing cognitive surface**. Same 24 MCP tools, zero schema changes — but the moment you upgrade, 14 previously dormant cognitive primitives start firing on live events without any tool call from your client.
- **One supervised backend task subscribes to the 20-event WebSocket bus** and routes six event classes into the cognitive engine: `MemoryCreated` triggers synaptic-tagging PRP + predictive-access records, `SearchPerformed` warms the speculative-retrieval model, `MemoryPromoted` fires activation spread, `MemorySuppressed` emits the Rac1 cascade wave, high-importance `ImportanceScored` (>0.85) auto-promotes, and `Heartbeat` rate-limit-fires `find_duplicates` on large DBs. **The engine mutex is never held across `.await`, so MCP dispatch is never starved.**
- **Panic-resilient supervisors.** Both background tasks run inside an outer supervisor loop — if one handler panics on a bad memory, the supervisor respawns it in 5 s instead of losing every future event.
- **Fully backward compatible.** No new MCP tools. No schema migration. Existing v2.0.8 databases open without a single step. Opt out with `VESTIGE_AUTOPILOT_ENABLED=0` if you want the passive-library contract back.
- **3,091 LOC of orphan v1.0 tool code removed** — nine superseded modules (`checkpoint`, `codebase`, `consolidate`, `ingest`, `intentions`, `knowledge`, `recall`, plus helpers) verified zero non-test callers before deletion. Tool surface unchanged.
## What's New in v2.0.6 "Composer"
v2.0.6 is a polish release that makes the existing cognitive stack finally *feel* alive in the dashboard and stays out of your way on the prompt side.
- **Six live graph reactions, not one** — `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`, `Connected`, `ConsolidationStarted`, and `ImportanceScored` now light the 3D graph in real time. v2.0.5 shipped `suppress` but the graph was silent when you called it; consolidation and importance scoring have been silent since v2.0.0. No longer.
- **Intentions page actually works** — fixes a long-standing bug where every intention rendered as "normal priority" (type/schema drift between backend and frontend) and context/time triggers surfaced as raw JSON.
- **Opt-in composition mandate** — the new MCP `instructions` string stays minimal by default. Opt in to the full Composing / Never-composed / Recommendation composition protocol with `VESTIGE_SYSTEM_PROMPT_MODE=full` when you want it, and nothing is imposed on your sessions when you don't.
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
## What's New in v2.0.5 "Intentional Amnesia"
**The first shipped AI memory system with top-down inhibitory control over retrieval.** Other systems implement passive decay — memories fade if you don't touch them. Vestige v2.0.5 also implements *active* suppression: the new **`suppress`** tool compounds a retrieval penalty on every call (up to 80%), a background Rac1 worker fades co-activated neighbors over 72 hours, and the whole thing is reversible within a 24-hour labile window. **Never deletes.** The memory is inhibited, not erased.
Ebbinghaus 1885 models what happens to memories you don't touch. Anderson 2025 models what happens when you actively want to stop thinking about one. Every other AI memory system implements the first. Vestige is the first to ship the second.
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
v2.0.9 "Autopilot" — backend event-subscriber + 3,091 LOC orphan cleanup (#46) * feat(v2.0.9): Autopilot — backend event-subscriber routes 6 live events into cognitive hooks The single architectural change that flips 14 dormant cognitive primitives into active ones. Before this commit, Vestige's 20-event WebSocket bus had zero backend subscribers — every emitted event flowed to the dashboard animation layer and terminated. Cognitive modules with fully-built trigger methods (synaptic_tagging.trigger_prp, predictive_memory.record_*, activation_network.activate, prospective_memory.check_triggers, the 6h auto-consolidation dreamer path) were never actually called from the bus. New module `crates/vestige-mcp/src/autopilot.rs` spawns two tokio tasks at startup: 1. Event subscriber — consumes the broadcast::Receiver, routes: - MemoryCreated → synaptic_tagging.trigger_prp(CrossReference) + predictive_memory.record_memory_access(id, preview, tags) - SearchPerformed → predictive_memory.record_query(q, []) + record_memory_access on top 10 result_ids - MemoryPromoted → activation_network.activate(id, 0.3) spread - MemorySuppressed → emit Rac1CascadeSwept (was declared-never-emitted) - ImportanceScored (composite > 0.85 AND memory_id present) → storage.promote_memory + re-emit MemoryPromoted - Heartbeat (memory_count > 700, 6h cooldown) → spawned find_duplicates sweep (rate-limited) The loop holds the CognitiveEngine mutex only per-handler, never across an await, so MCP tool dispatch is never starved. 2. Prospective poller — 60s tokio::interval calls prospective_memory.check_triggers(Context { timestamp: now, .. }). Matched intentions are logged at info! level today; v2.5 "Autonomic" upgrades this to MCP sampling/createMessage for agent-side notifications. ImportanceScored event gained optional `memory_id: Option<String>` field (#[serde(default)], backward-compatible) so auto-promote has the id to target. Both existing emit sites (server.rs tool dispatch, dashboard handlers::score_importance) pass None because they score arbitrary content, not stored memories — matches current semantics. docs/VESTIGE_STATE_AND_PLAN.md §15 POST-v2.0.8 ADDENDUM records the full three-agent audit that produced this architecture (2026-SOTA research, active-vs-passive module audit, competitor landscape), the v2.0.9/v2.5/v2.6 ship order, and the one-line thesis: "the bottleneck was one missing event-subscriber task; wiring it flips Vestige from memory library to cognitive agent that acts on the host LLM." Verified: - cargo check --workspace clean - cargo clippy --workspace -- -D warnings clean (let-chain on Rust 1.91+) - cargo test -p vestige-mcp --lib 356/356 passing, 0 failed * fix(autopilot): supervisor + dedup race + opt-out env var Three blockers from the 5-agent v2.0.9 audit, all in autopilot.rs. 1. Supervisor loops around both tokio tasks (event subscriber + prospective poller). Previously, if a cognitive hook panicked on a single bad memory, the spawned task died permanently and silently — every future event lost. Now the outer supervisor catches JoinError::is_panic(), logs the panic with full error detail, sleeps 5s, and respawns the inner task. Turns a permanent silent failure into a transient hiccup. 2. DedupSweepState struct replaces the bare Option<Instant> timestamp. It tracks the in-flight JoinHandle so the next Heartbeat skips spawning a second sweep while the first is still running. Previously, the cooldown timestamp was set BEFORE spawning the async sweep, which allowed two concurrent find_duplicates scans on 100k+ memory DBs where the sweep could exceed the 6h cooldown window. is_running() drops finished handles so a long-dead sweep doesn't block the next legitimate tick. 3. VESTIGE_AUTOPILOT_ENABLED=0 opt-out. v2.0.8 users updating in place can preserve the passive-library contract by setting the env var to any of {0, false, no, off}. Any other value (unset, 1, true, etc.) enables the default v2.0.9 Autopilot behavior. spawn() early-returns with an info! log before any task is spawned. Audit breakdown: - Agent 1 (internals): NO-GO → fixed (1, 2) - Agent 2 (backward compat): NO-GO → fixed (3) - Agent 3 (orphan cleanup): GO clean - Agent 4 (runtime safety): GO clean - Agent 5 (release prep): GO, procedural note logged Verification: - cargo check -p vestige-mcp: clean - cargo test -p vestige-mcp --lib: 373 passed, 0 failed - cargo clippy -p vestige-mcp --lib --bins -- -D warnings: clean * chore(release): v2.0.9 "Autopilot" Bump workspace + vestige-core + vestige-mcp + apps/dashboard to 2.0.9. CHANGELOG [2.0.9] entry + README hero banner rewrite to "Autopilot". Scope (two commits on top of v2.0.8): - 0e9b260: 3,091 LOC orphan-code cleanup - fe7a68c: Autopilot backend event-subscriber - HEAD (this branch): supervisor + dedup race + opt-out env var hardening Pure backend release — tool count unchanged (24), schema unchanged, JSON-RPC shape unchanged, CLI flags unchanged. Only visible behavior change is the Autopilot task running in the background, which is VESTIGE_AUTOPILOT_ENABLED=0-gated. Test gate: 1,223 passing / 0 failed (workspace, no-fail-fast). Clippy: clean on vestige-mcp lib + bins with -D warnings. Audit: 5 parallel agents (internals, backward compat, orphan cleanup, runtime safety, release prep) — all GO after hardening commit.
2026-04-24 02:00:00 -05:00
Based on [Anderson et al. 2025](https://www.nature.com/articles/s41583-025-00929-y) (Suppression-Induced Forgetting, *Nat Rev Neurosci*) and [Cervantes-Sandoval et al. 2020](https://pmc.ncbi.nlm.nih.gov/articles/PMC7477079/) (Rac1 synaptic cascade). **24 tools · 30 cognitive modules · 1,223 tests.**
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
<details>
<summary>Earlier releases (v2.0 "Cognitive Leap" → v2.0.4 "Deep Reference")</summary>
- **v2.0.4 — `deep_reference` Tool** — 8-stage cognitive reasoning pipeline with FSRS-6 trust scoring, intent classification, spreading activation, contradiction analysis, and pre-built reasoning chains. Token budgets raised 10K → 100K. CORS tightened.
- **v2.0 — 3D Memory Dashboard** — SvelteKit + Three.js neural visualization with real-time WebSocket events, bloom post-processing, force-directed graph layout.
- **v2.0 — WebSocket Event Bus** — Every cognitive operation broadcasts events: memory creation, search, dreaming, consolidation, retention decay.
- **v2.0 — HyDE Query Expansion** — Template-based Hypothetical Document Embeddings for dramatically improved search quality on conceptual queries.
- **v2.0 — Nomic v2 MoE (experimental)** — fastembed 5.11 with optional Nomic Embed Text v2 MoE (475M params, 8 experts) + Metal GPU acceleration.
- **v2.0 — Command Palette** — `Cmd+K` navigation, keyboard shortcuts, responsive mobile layout, PWA installable.
- **v2.0 — FSRS Decay Visualization** — SVG retention curves with predicted decay at 1d/7d/30d.
</details>
---
## Quick Start
```bash
# 1. Install (macOS Apple Silicon)
curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz
sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/
# 2. Connect to Claude Code
claude mcp add vestige vestige-mcp -s user
2026-04-05 18:50:57 +03:00
# Or connect to Codex
codex mcp add vestige -- /usr/local/bin/vestige-mcp
# 3. Test it
# "Remember that I prefer TypeScript over JavaScript"
# ...new session...
# "What are my coding preferences?"
# → "You prefer TypeScript over JavaScript."
```
<details>
<summary>Other platforms & install methods</summary>
**Linux (x86_64):**
```bash
curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-x86_64-unknown-linux-gnu.tar.gz | tar -xz
sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/
```
fix(#41): restore Intel Mac build via ort-dynamic + Homebrew ONNX Runtime (#43) * fix: restore Intel Mac build via ort-dynamic + system libonnxruntime Microsoft is discontinuing x86_64 macOS ONNX Runtime prebuilts after v1.23.0, so ort-sys 2.0.0-rc.11 can't ship an Intel Mac binary and never will. Previous Intel Mac attempts kept dying in the ort-sys build script with "does not provide prebuilt binaries for the target x86_64-apple-darwin with feature set (no features)." Issue #41 was the latest casualty. Fix: route Intel Mac through the ort-dynamic feature path (runtime dlopen against a system libonnxruntime installed via Homebrew). This sidesteps ort-sys prebuilts entirely and works today. Changes: - crates/vestige-core/Cargo.toml: split `embeddings` into code-only vs backend-choice. The embeddings feature now just pulls fastembed + hf-hub + image-models and activates the 27 #[cfg(feature = "embeddings")] gates throughout the crate. New `ort-download` feature carries the download-binaries-native-tls backend (the historical default). Existing `ort-dynamic` feature now transitively enables `embeddings`, so the cfg gates stay active when users swap backends. Default feature set expands `["embeddings", ...]` -> `["embeddings", "ort-download", ...]` so existing consumers see identical behavior. - crates/vestige-mcp/Cargo.toml: mirrors the split. Adds `ort-download` feature that chains to vestige-core/ort-download, keeps `ort-dynamic` that chains to vestige-core/ort-dynamic. Both transitively pull `embeddings`. Default adds `ort-download` so `cargo install vestige-mcp` still picks the prebuilt-ort backend like before. - .github/workflows/ci.yml: re-adds x86_64-apple-darwin to the release-build matrix with `--no-default-features --features ort-dynamic,vector-search`. Adds a `brew install onnxruntime` step that sets ORT_DYLIB_PATH from `brew --prefix onnxruntime`. - .github/workflows/release.yml: re-adds x86_64-apple-darwin to the release matrix with the same flags + brew install step. The Intel Mac tarball now also bundles docs/INSTALL-INTEL-MAC.md so binary consumers get the `brew install onnxruntime` + ORT_DYLIB_PATH prereq out of the box. - docs/INSTALL-INTEL-MAC.md: new install guide covering the Homebrew prereq, binary install, source build, troubleshooting, and the v2.1 ort-candle migration plan. - README.md: replaces the "Intel Mac and Windows build from source only" paragraph with the prebuilt Intel Mac install (brew + curl + env var) and a link to the full guide. Platform table updated: Intel Mac back on the "prebuilt" list. Verified locally on aarch64-apple-darwin: - `cargo check --release -p vestige-mcp` -> clean (default features) - `cargo check --release -p vestige-mcp --no-default-features --features ort-dynamic,vector-search` -> clean Runtime path on Intel Mac (verified on CI): brew install onnxruntime export ORT_DYLIB_PATH=$(brew --prefix onnxruntime)/lib/libonnxruntime.dylib vestige-mcp --version Fixes #41. Long-term plan (v2.1): migrate to ort-candle pure-Rust backend so no system ONNX Runtime dep is needed on any platform. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(ci): drop unused brew install + ORT_DYLIB_PATH from CI steps Build is a cross-compile (macos-latest runner is Apple Silicon targeting x86_64-apple-darwin) and ort-load-dynamic doesn't link libonnxruntime at build time — only at runtime via dlopen. So the brew install step and ORT_DYLIB_PATH export were ceremony without payload. Removed to cut CI time. Runtime setup remains documented in docs/INSTALL-INTEL-MAC.md for end users installing the tarball on their own Intel Mac. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: run release-build on PRs too — catch Intel Mac regressions pre-merge Previously release-build was gated behind `github.ref == 'refs/heads/main'`, so the Intel Mac, aarch64-apple-darwin, and Linux release targets were only validated AFTER merge to main. If someone broke the Intel Mac cross-compile by touching feature flags or Cargo dependencies, we'd only find out when the release tag was cut and the job exploded on main. Extending the guard to also fire on pull_request means regressions surface in the PR status check instead of on a release branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 02:03:45 -05:00
**macOS (Intel):** Microsoft is discontinuing x86_64 macOS prebuilts after ONNX Runtime v1.23.0, so Vestige's Intel Mac build links dynamically against a Homebrew-installed ONNX Runtime via the `ort-dynamic` feature. Install with:
```bash
brew install onnxruntime
curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-x86_64-apple-darwin.tar.gz | tar -xz
sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/
echo 'export ORT_DYLIB_PATH="'"$(brew --prefix onnxruntime)"'/lib/libonnxruntime.dylib"' >> ~/.zshrc
source ~/.zshrc
claude mcp add vestige vestige-mcp -s user
```
Full Intel Mac guide (build-from-source + troubleshooting): [`docs/INSTALL-INTEL-MAC.md`](docs/INSTALL-INTEL-MAC.md).
**Windows:** Prebuilt binaries ship but `usearch 2.24.0` hit an MSVC compile break ([usearch#746](https://github.com/unum-cloud/usearch/issues/746)); we've pinned `=2.23.0` until upstream fixes it. Source builds work with:
```bash
git clone https://github.com/samvallad33/vestige && cd vestige
cargo build --release -p vestige-mcp
```
**npm:**
```bash
npm install -g vestige-mcp-server
```
**Build from source (requires Rust 1.91+):**
```bash
git clone https://github.com/samvallad33/vestige && cd vestige
cargo build --release -p vestige-mcp
# Optional: enable Metal GPU acceleration on Apple Silicon
cargo build --release -p vestige-mcp --features metal
```
</details>
---
## Works Everywhere
Vestige speaks MCP — the universal protocol for AI tools. One brain, every IDE.
| IDE | Setup |
|-----|-------|
| **Claude Code** | `claude mcp add vestige vestige-mcp -s user` |
2026-04-05 18:50:57 +03:00
| **Codex** | [Integration guide](docs/integrations/codex.md) |
| **Claude Desktop** | [2-min setup](docs/CONFIGURATION.md#claude-desktop-macos) |
| **Xcode 26.3** | [Integration guide](docs/integrations/xcode.md) |
| **Cursor** | [Integration guide](docs/integrations/cursor.md) |
| **VS Code (Copilot)** | [Integration guide](docs/integrations/vscode.md) |
| **JetBrains** | [Integration guide](docs/integrations/jetbrains.md) |
| **Windsurf** | [Integration guide](docs/integrations/windsurf.md) |
---
## 🧠 3D Memory Dashboard
Vestige v2.0 ships with a real-time 3D visualization of your AI's memory. Every memory is a glowing node in 3D space. Watch connections form, memories pulse when accessed, and the entire graph come alive during dream consolidation.
**Features:**
- Force-directed 3D graph with 1000+ nodes at 60fps
- Bloom post-processing for cinematic neural network aesthetic
- Real-time WebSocket events: memories pulse on access, burst on creation, fade on decay
- Dream visualization: graph enters purple dream mode, replayed memories light up sequentially
- FSRS retention curves: see predicted memory decay at 1d, 7d, 30d
- Command palette (`Cmd+K`), keyboard shortcuts, responsive mobile layout
- Installable as PWA for quick access
**Tech:** SvelteKit 2 + Svelte 5 + Three.js + Tailwind CSS 4 + WebSocket
The dashboard runs automatically at `http://localhost:3927/dashboard` when the MCP server starts.
---
## Architecture
```
┌─────────────────────────────────────────────────────┐
│ SvelteKit Dashboard (apps/dashboard) │
│ Three.js 3D Graph · WebGL + Bloom · Real-time WS │
├─────────────────────────────────────────────────────┤
│ Axum HTTP + WebSocket Server (port 3927) │
│ 15 REST endpoints · WS event broadcast │
├─────────────────────────────────────────────────────┤
│ MCP Server (stdio JSON-RPC) │
v2.0.9 "Autopilot" — backend event-subscriber + 3,091 LOC orphan cleanup (#46) * feat(v2.0.9): Autopilot — backend event-subscriber routes 6 live events into cognitive hooks The single architectural change that flips 14 dormant cognitive primitives into active ones. Before this commit, Vestige's 20-event WebSocket bus had zero backend subscribers — every emitted event flowed to the dashboard animation layer and terminated. Cognitive modules with fully-built trigger methods (synaptic_tagging.trigger_prp, predictive_memory.record_*, activation_network.activate, prospective_memory.check_triggers, the 6h auto-consolidation dreamer path) were never actually called from the bus. New module `crates/vestige-mcp/src/autopilot.rs` spawns two tokio tasks at startup: 1. Event subscriber — consumes the broadcast::Receiver, routes: - MemoryCreated → synaptic_tagging.trigger_prp(CrossReference) + predictive_memory.record_memory_access(id, preview, tags) - SearchPerformed → predictive_memory.record_query(q, []) + record_memory_access on top 10 result_ids - MemoryPromoted → activation_network.activate(id, 0.3) spread - MemorySuppressed → emit Rac1CascadeSwept (was declared-never-emitted) - ImportanceScored (composite > 0.85 AND memory_id present) → storage.promote_memory + re-emit MemoryPromoted - Heartbeat (memory_count > 700, 6h cooldown) → spawned find_duplicates sweep (rate-limited) The loop holds the CognitiveEngine mutex only per-handler, never across an await, so MCP tool dispatch is never starved. 2. Prospective poller — 60s tokio::interval calls prospective_memory.check_triggers(Context { timestamp: now, .. }). Matched intentions are logged at info! level today; v2.5 "Autonomic" upgrades this to MCP sampling/createMessage for agent-side notifications. ImportanceScored event gained optional `memory_id: Option<String>` field (#[serde(default)], backward-compatible) so auto-promote has the id to target. Both existing emit sites (server.rs tool dispatch, dashboard handlers::score_importance) pass None because they score arbitrary content, not stored memories — matches current semantics. docs/VESTIGE_STATE_AND_PLAN.md §15 POST-v2.0.8 ADDENDUM records the full three-agent audit that produced this architecture (2026-SOTA research, active-vs-passive module audit, competitor landscape), the v2.0.9/v2.5/v2.6 ship order, and the one-line thesis: "the bottleneck was one missing event-subscriber task; wiring it flips Vestige from memory library to cognitive agent that acts on the host LLM." Verified: - cargo check --workspace clean - cargo clippy --workspace -- -D warnings clean (let-chain on Rust 1.91+) - cargo test -p vestige-mcp --lib 356/356 passing, 0 failed * fix(autopilot): supervisor + dedup race + opt-out env var Three blockers from the 5-agent v2.0.9 audit, all in autopilot.rs. 1. Supervisor loops around both tokio tasks (event subscriber + prospective poller). Previously, if a cognitive hook panicked on a single bad memory, the spawned task died permanently and silently — every future event lost. Now the outer supervisor catches JoinError::is_panic(), logs the panic with full error detail, sleeps 5s, and respawns the inner task. Turns a permanent silent failure into a transient hiccup. 2. DedupSweepState struct replaces the bare Option<Instant> timestamp. It tracks the in-flight JoinHandle so the next Heartbeat skips spawning a second sweep while the first is still running. Previously, the cooldown timestamp was set BEFORE spawning the async sweep, which allowed two concurrent find_duplicates scans on 100k+ memory DBs where the sweep could exceed the 6h cooldown window. is_running() drops finished handles so a long-dead sweep doesn't block the next legitimate tick. 3. VESTIGE_AUTOPILOT_ENABLED=0 opt-out. v2.0.8 users updating in place can preserve the passive-library contract by setting the env var to any of {0, false, no, off}. Any other value (unset, 1, true, etc.) enables the default v2.0.9 Autopilot behavior. spawn() early-returns with an info! log before any task is spawned. Audit breakdown: - Agent 1 (internals): NO-GO → fixed (1, 2) - Agent 2 (backward compat): NO-GO → fixed (3) - Agent 3 (orphan cleanup): GO clean - Agent 4 (runtime safety): GO clean - Agent 5 (release prep): GO, procedural note logged Verification: - cargo check -p vestige-mcp: clean - cargo test -p vestige-mcp --lib: 373 passed, 0 failed - cargo clippy -p vestige-mcp --lib --bins -- -D warnings: clean * chore(release): v2.0.9 "Autopilot" Bump workspace + vestige-core + vestige-mcp + apps/dashboard to 2.0.9. CHANGELOG [2.0.9] entry + README hero banner rewrite to "Autopilot". Scope (two commits on top of v2.0.8): - 0e9b260: 3,091 LOC orphan-code cleanup - fe7a68c: Autopilot backend event-subscriber - HEAD (this branch): supervisor + dedup race + opt-out env var hardening Pure backend release — tool count unchanged (24), schema unchanged, JSON-RPC shape unchanged, CLI flags unchanged. Only visible behavior change is the Autopilot task running in the background, which is VESTIGE_AUTOPILOT_ENABLED=0-gated. Test gate: 1,223 passing / 0 failed (workspace, no-fail-fast). Clippy: clean on vestige-mcp lib + bins with -D warnings. Audit: 5 parallel agents (internals, backward compat, orphan cleanup, runtime safety, release prep) — all GO after hardening commit.
2026-04-24 02:00:00 -05:00
│ 24 tools · 30 cognitive modules │
├─────────────────────────────────────────────────────┤
│ Cognitive Engine │
│ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ FSRS-6 │ │ Spreading│ │ Prediction │ │
│ │ Scheduler│ │ Activation│ │ Error Gating │ │
│ └──────────┘ └──────────┘ └───────────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ Memory │ │ Synaptic │ │ Hippocampal │ │
│ │ Dreamer │ │ Tagging │ │ Index │ │
│ └──────────┘ └──────────┘ └───────────────┘ │
├─────────────────────────────────────────────────────┤
│ Storage Layer │
│ SQLite + FTS5 · USearch HNSW · Nomic Embed v1.5 │
│ Optional: Nomic v2 MoE · Qwen3 Reranker · Metal │
└─────────────────────────────────────────────────────┘
```
---
## Why Not Just Use RAG?
RAG is a dumb bucket. Vestige is an active organ.
| | RAG / Vector Store | Vestige |
|---|---|---|
| **Storage** | Store everything | **Prediction Error Gating** — only stores what's surprising or new |
| **Retrieval** | Nearest-neighbor | **7-stage pipeline** — HyDE expansion + reranking + spreading activation |
| **Decay** | Nothing expires | **FSRS-6** — memories fade naturally, context stays lean |
| **Forgetting** *(v2.0.5)* | Delete only | **`suppress` tool** — compounding top-down inhibition, neighbor cascade, reversible 24h |
| **Duplicates** | Manual dedup | **Self-healing** — auto-merges "likes dark mode" + "prefers dark themes" |
| **Importance** | All equal | **4-channel scoring** — novelty, arousal, reward, attention |
| **Sleep** | No consolidation | **Memory dreaming** — replays, connects, synthesizes insights |
| **Health** | No visibility | **Retention dashboard** — distributions, trends, recommendations |
| **Visualization** | None | **3D neural graph** — real-time WebSocket-powered Three.js |
| **Privacy** | Usually cloud | **100% local** — your data never leaves your machine |
---
## 🔬 The Cognitive Science Stack
This isn't a key-value store with an embedding model bolted on. Vestige implements real neuroscience:
**Prediction Error Gating** — The hippocampal bouncer. When new information arrives, Vestige compares it against existing memories. Redundant? Merged. Contradictory? Superseded. Novel? Stored with high synaptic tag priority.
**FSRS-6 Spaced Repetition** — 21 parameters governing the mathematics of forgetting. Frequently-used memories stay strong. Unused memories naturally decay. Your context window stays clean.
**HyDE Query Expansion** *(v2.0)* — Template-based Hypothetical Document Embeddings. Expands queries into 3-5 semantic variants, embeds all variants, and searches with the centroid embedding for dramatically better recall on conceptual queries.
**Synaptic Tagging** — A memory that seemed trivial this morning can be retroactively tagged as critical tonight. Based on [Frey & Morris, 1997](https://doi.org/10.1038/385533a0).
**Spreading Activation** — Search for "auth bug" and find the related JWT library update from last week. Memories form a graph, not a flat list. Based on [Collins & Loftus, 1975](https://doi.org/10.1037/0033-295X.82.6.407).
**Dual-Strength Model** — Every memory has storage strength (encoding quality) and retrieval strength (accessibility). A deeply stored memory can be temporarily hard to retrieve — just like real forgetting. Based on [Bjork & Bjork, 1992](https://doi.org/10.1016/S0079-7421(08)60016-9).
**Memory Dreaming** — Like sleep consolidation. Replays recent memories to discover hidden connections, strengthen important patterns, and synthesize insights. Dream-discovered connections persist to a graph database. Based on the [Active Dreaming Memory](https://engrxiv.org/preprint/download/5919/9826/8234) framework.
**Waking SWR Tagging** — Promoted memories get sharp-wave ripple tags for preferential replay during dream consolidation. 70/30 tagged-to-random ratio. Based on [Buzsaki, 2015](https://doi.org/10.1038/nn.3963).
**Autonomic Regulation** — Self-regulating memory health. Auto-promotes frequently accessed memories. Auto-GCs low-retention memories. Consolidation triggers on 6h staleness or 2h active use.
**Active Forgetting** *(v2.0.5)* — Top-down inhibitory control via the `suppress` tool. Other memory systems implement passive decay — the Ebbinghaus 1885 "use it or lose it" curve, sometimes with trust-weighted strength factors. Vestige v2.0.5 also implements *active* top-down suppression: each `suppress` call compounds (Suppression-Induced Forgetting, Anderson 2025), a background Rac1 cascade worker fades co-activated neighbors across the connection graph (Cervantes-Sandoval & Davis 2020), and a 24-hour labile window allows reversal (Nader reconsolidation semantics on a pragmatic axis). The memory persists — it's **inhibited, not erased**. Explicitly distinct from Anderson 1994 retrieval-induced forgetting (bottom-up, passive competition during retrieval), which is a separate, older primitive that several other memory systems implement. Based on [Anderson et al., 2025](https://www.nature.com/articles/s41583-025-00929-y) and [Cervantes-Sandoval et al., 2020](https://pmc.ncbi.nlm.nih.gov/articles/PMC7477079/). First shipped AI memory system with this primitive.
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
[Full science documentation ->](docs/SCIENCE.md)
---
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
## 🛠 24 MCP Tools
### Context Packets
| Tool | What It Does |
|------|-------------|
| `session_context` | **One-call session init** — replaces 5 calls with token-budgeted context, automation triggers, expandable IDs |
### Core Memory
| Tool | What It Does |
|------|-------------|
| `search` | 7-stage cognitive search — HyDE expansion + keyword + semantic + reranking + temporal + competition + spreading activation |
| `smart_ingest` | Intelligent storage with CREATE/UPDATE/SUPERSEDE via Prediction Error Gating. Batch mode for session-end saves |
| `memory` | Get, delete, check state, promote (thumbs up), demote (thumbs down) |
| `codebase` | Remember code patterns and architectural decisions per-project |
| `intention` | Prospective memory — "remind me to X when Y happens" |
### Cognitive Engine
| Tool | What It Does |
|------|-------------|
| `dream` | Memory consolidation — replays memories, discovers connections, synthesizes insights, persists graph |
| `explore_connections` | Graph traversal — reasoning chains, associations, bridges between memories |
| `predict` | Proactive retrieval — predicts what you'll need next based on context and activity |
### Autonomic
| Tool | What It Does |
|------|-------------|
| `memory_health` | Retention dashboard — distribution, trends, recommendations |
| `memory_graph` | Knowledge graph export — force-directed layout, up to 200 nodes |
### Scoring & Dedup
| Tool | What It Does |
|------|-------------|
| `importance_score` | 4-channel neuroscience scoring (novelty, arousal, reward, attention) |
| `find_duplicates` | Detect and merge redundant memories via cosine similarity |
### Maintenance
| Tool | What It Does |
|------|-------------|
| `system_status` | Combined health + stats + cognitive state + recommendations |
| `consolidate` | Run FSRS-6 decay cycle (also auto-runs every 6 hours) |
| `memory_timeline` | Browse chronologically, grouped by day |
| `memory_changelog` | Audit trail of state transitions |
| `backup` / `export` / `gc` | Database backup, JSON export, garbage collection |
| `restore` | Restore from JSON backup |
feat: v2.0.4 "Deep Reference" — cognitive reasoning engine + 10 bug fixes New features: - deep_reference tool (#22): 8-stage cognitive reasoning pipeline with FSRS-6 trust scoring, intent classification (FactCheck/Timeline/RootCause/Comparison/ Synthesis), spreading activation expansion, temporal supersession, trust-weighted contradiction analysis, relation assessment, dream insight integration, and algorithmic reasoning chain generation — all without calling an LLM - cross_reference (#23): backward-compatible alias for deep_reference - retrieval_mode parameter on search (precise/balanced/exhaustive) - get_batch action on memory tool (up to 20 IDs per call) - Token budget raised from 10K to 100K on search + session_context - Dates (createdAt/updatedAt) on all search results and session_context lines Bug fixes (GitHub Issue #25 — all 10 resolved): - state_transitions empty: wired record_memory_access into strengthen_batch - chain/bridges no storage fallback: added with edge deduplication - knowledge_edges dead schema: documented as deprecated - insights not persisted from dream: wired save_insight after generation - find_duplicates threshold dropped: serde alias fix - search min_retention ignored: serde aliases for snake_case params - intention time triggers null: removed dead trigger_at embedding - changelog missing dreams: added get_dream_history + event integration - phantom Related IDs: clarified message text - fsrs_cards empty: documented as harmless dead schema Security hardening: - HTTP transport CORS: permissive() → localhost-only - Auth token panic guard: &token[..8] → safe min(8) slice - UTF-8 boundary fix: floor_char_boundary on content truncation - All unwrap() removed from HTTP transport (unwrap_or_else fallback) - Dream memory_count capped at 500 (prevents O(N²) hang) - Dormant state threshold aligned (0.3 → 0.4) Stats: 23 tools, 758 tests, 0 failures, 0 warnings, 0 unwraps in production Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:15:01 -05:00
### Deep Reference (v2.0.4)
| Tool | What It Does |
|------|-------------|
| `deep_reference` | **Cognitive reasoning across memories.** 8-stage pipeline: FSRS-6 trust scoring, intent classification, spreading activation, temporal supersession, contradiction analysis, relation assessment, dream insight integration, and algorithmic reasoning chain generation. Returns trust-scored evidence with a pre-built reasoning scaffold. |
| `cross_reference` | Backward-compatible alias for `deep_reference`. |
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
### Active Forgetting (v2.0.5)
| Tool | What It Does |
|------|-------------|
| `suppress` | **Top-down active forgetting** — neuroscience-grounded inhibitory control over retrieval. Distinct from `memory.delete` (destroys the row) and `memory.demote` (one-shot ranking hit). Each call **compounds** a retrieval-score penalty (Anderson 2025 SIF), and a background Rac1 cascade worker fades co-activated neighbors over 72h (Davis 2020). Reversible within a 24-hour labile window via `reverse: true`. **The memory persists** — it is inhibited, not erased. |
---
## Make Your AI Use Vestige Automatically
Add this to your `CLAUDE.md`:
```markdown
## Memory
At the start of every session:
1. Search Vestige for user preferences and project context
2. Save bug fixes, decisions, and patterns without being asked
3. Create reminders when the user mentions deadlines
```
| You Say | AI Does |
|---------|---------|
| "Remember this" | Saves immediately |
| "I prefer..." / "I always..." | Saves as preference |
| "Remind me..." | Creates a future trigger |
| "This is important" | Saves + promotes |
[Full CLAUDE.md templates ->](docs/CLAUDE-SETUP.md)
---
## Technical Details
| Metric | Value |
|--------|-------|
| **Language** | Rust 2024 edition (MSRV 1.91) |
| **Codebase** | 80,000+ lines, 1,292 tests (366 core + 425 mcp + 497 e2e + 4 doctests) |
| **Binary size** | ~20MB |
| **Embeddings** | Nomic Embed Text v1.5 (768d → 256d Matryoshka, 8192 context) |
| **Vector search** | USearch HNSW (20x faster than FAISS) |
| **Reranker** | Jina Reranker v1 Turbo (38M params, +15-20% precision) |
| **Storage** | SQLite + FTS5 (optional SQLCipher encryption) |
| **Dashboard** | SvelteKit 2 + Svelte 5 + Three.js + Tailwind CSS 4 |
| **Transport** | MCP stdio (JSON-RPC 2.0) + WebSocket |
feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
2026-04-14 17:30:30 -05:00
| **Cognitive modules** | 30 stateful (17 neuroscience, 11 advanced, 2 search) |
| **First run** | Downloads embedding model (~130MB), then fully offline |
fix(#41): restore Intel Mac build via ort-dynamic + Homebrew ONNX Runtime (#43) * fix: restore Intel Mac build via ort-dynamic + system libonnxruntime Microsoft is discontinuing x86_64 macOS ONNX Runtime prebuilts after v1.23.0, so ort-sys 2.0.0-rc.11 can't ship an Intel Mac binary and never will. Previous Intel Mac attempts kept dying in the ort-sys build script with "does not provide prebuilt binaries for the target x86_64-apple-darwin with feature set (no features)." Issue #41 was the latest casualty. Fix: route Intel Mac through the ort-dynamic feature path (runtime dlopen against a system libonnxruntime installed via Homebrew). This sidesteps ort-sys prebuilts entirely and works today. Changes: - crates/vestige-core/Cargo.toml: split `embeddings` into code-only vs backend-choice. The embeddings feature now just pulls fastembed + hf-hub + image-models and activates the 27 #[cfg(feature = "embeddings")] gates throughout the crate. New `ort-download` feature carries the download-binaries-native-tls backend (the historical default). Existing `ort-dynamic` feature now transitively enables `embeddings`, so the cfg gates stay active when users swap backends. Default feature set expands `["embeddings", ...]` -> `["embeddings", "ort-download", ...]` so existing consumers see identical behavior. - crates/vestige-mcp/Cargo.toml: mirrors the split. Adds `ort-download` feature that chains to vestige-core/ort-download, keeps `ort-dynamic` that chains to vestige-core/ort-dynamic. Both transitively pull `embeddings`. Default adds `ort-download` so `cargo install vestige-mcp` still picks the prebuilt-ort backend like before. - .github/workflows/ci.yml: re-adds x86_64-apple-darwin to the release-build matrix with `--no-default-features --features ort-dynamic,vector-search`. Adds a `brew install onnxruntime` step that sets ORT_DYLIB_PATH from `brew --prefix onnxruntime`. - .github/workflows/release.yml: re-adds x86_64-apple-darwin to the release matrix with the same flags + brew install step. The Intel Mac tarball now also bundles docs/INSTALL-INTEL-MAC.md so binary consumers get the `brew install onnxruntime` + ORT_DYLIB_PATH prereq out of the box. - docs/INSTALL-INTEL-MAC.md: new install guide covering the Homebrew prereq, binary install, source build, troubleshooting, and the v2.1 ort-candle migration plan. - README.md: replaces the "Intel Mac and Windows build from source only" paragraph with the prebuilt Intel Mac install (brew + curl + env var) and a link to the full guide. Platform table updated: Intel Mac back on the "prebuilt" list. Verified locally on aarch64-apple-darwin: - `cargo check --release -p vestige-mcp` -> clean (default features) - `cargo check --release -p vestige-mcp --no-default-features --features ort-dynamic,vector-search` -> clean Runtime path on Intel Mac (verified on CI): brew install onnxruntime export ORT_DYLIB_PATH=$(brew --prefix onnxruntime)/lib/libonnxruntime.dylib vestige-mcp --version Fixes #41. Long-term plan (v2.1): migrate to ort-candle pure-Rust backend so no system ONNX Runtime dep is needed on any platform. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(ci): drop unused brew install + ORT_DYLIB_PATH from CI steps Build is a cross-compile (macos-latest runner is Apple Silicon targeting x86_64-apple-darwin) and ort-load-dynamic doesn't link libonnxruntime at build time — only at runtime via dlopen. So the brew install step and ORT_DYLIB_PATH export were ceremony without payload. Removed to cut CI time. Runtime setup remains documented in docs/INSTALL-INTEL-MAC.md for end users installing the tarball on their own Intel Mac. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: run release-build on PRs too — catch Intel Mac regressions pre-merge Previously release-build was gated behind `github.ref == 'refs/heads/main'`, so the Intel Mac, aarch64-apple-darwin, and Linux release targets were only validated AFTER merge to main. If someone broke the Intel Mac cross-compile by touching feature flags or Cargo dependencies, we'd only find out when the release tag was cut and the job exploded on main. Extending the guard to also fire on pull_request means regressions surface in the PR status check instead of on a release branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 02:03:45 -05:00
| **Platforms** | macOS ARM + Intel + Linux x86_64 + Windows x86_64 (all prebuilt). Intel Mac needs `brew install onnxruntime` — see [install guide](docs/INSTALL-INTEL-MAC.md). |
### Optional Features
```bash
# Metal GPU acceleration (Apple Silicon — faster embedding inference)
cargo build --release -p vestige-mcp --features metal
# Nomic Embed Text v2 MoE (475M params, 305M active, 8 experts)
cargo build --release -p vestige-mcp --features nomic-v2
# Qwen3 Reranker (Candle backend, high-precision cross-encoder)
cargo build --release -p vestige-mcp --features qwen3-reranker
# SQLCipher encryption
cargo build --release -p vestige-mcp --no-default-features --features encryption,embeddings,vector-search
```
---
## CLI
```bash
vestige stats # Memory statistics
vestige stats --tagging # Retention distribution
vestige stats --states # Cognitive state breakdown
vestige health # System health check
vestige consolidate # Run memory maintenance
vestige restore <file> # Restore from backup
vestige dashboard # Open 3D dashboard in browser
```
---
## Documentation
| Document | Contents |
|----------|----------|
| [FAQ](docs/FAQ.md) | 30+ common questions answered |
| [Science](docs/SCIENCE.md) | The neuroscience behind every feature |
| [Storage Modes](docs/STORAGE.md) | Global, per-project, multi-instance |
| [CLAUDE.md Setup](docs/CLAUDE-SETUP.md) | Templates for proactive memory |
| [Configuration](docs/CONFIGURATION.md) | CLI commands, environment variables |
2026-04-05 18:50:57 +03:00
| [Integrations](docs/integrations/) | Codex, Xcode, Cursor, VS Code, JetBrains, Windsurf |
| [Changelog](CHANGELOG.md) | Version history |
---
## Troubleshooting
<details>
<summary>"Command not found" after installation</summary>
Ensure `vestige-mcp` is in your PATH:
```bash
which vestige-mcp
# Or use the full path:
claude mcp add vestige /usr/local/bin/vestige-mcp -s user
```
</details>
<details>
<summary>Embedding model download fails</summary>
First run downloads ~130MB from Hugging Face. If behind a proxy:
```bash
export HTTPS_PROXY=your-proxy:port
```
Cache: macOS `~/Library/Caches/com.vestige.core/fastembed` | Linux `~/.cache/vestige/fastembed`
</details>
<details>
<summary>Dashboard not loading</summary>
The dashboard starts automatically on port 3927 when the MCP server runs. Check:
```bash
curl http://localhost:3927/api/health
# Should return {"status":"healthy",...}
```
</details>
[More troubleshooting ->](docs/FAQ.md#troubleshooting)
---
## Contributing
Issues and PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
## License
AGPL-3.0 — free to use, modify, and self-host. If you offer Vestige as a network service, you must open-source your modifications.
---
<p align="center">
<i>Built by <a href="https://github.com/samvallad33">@samvallad33</a></i><br>
v2.0.9 "Autopilot" — backend event-subscriber + 3,091 LOC orphan cleanup (#46) * feat(v2.0.9): Autopilot — backend event-subscriber routes 6 live events into cognitive hooks The single architectural change that flips 14 dormant cognitive primitives into active ones. Before this commit, Vestige's 20-event WebSocket bus had zero backend subscribers — every emitted event flowed to the dashboard animation layer and terminated. Cognitive modules with fully-built trigger methods (synaptic_tagging.trigger_prp, predictive_memory.record_*, activation_network.activate, prospective_memory.check_triggers, the 6h auto-consolidation dreamer path) were never actually called from the bus. New module `crates/vestige-mcp/src/autopilot.rs` spawns two tokio tasks at startup: 1. Event subscriber — consumes the broadcast::Receiver, routes: - MemoryCreated → synaptic_tagging.trigger_prp(CrossReference) + predictive_memory.record_memory_access(id, preview, tags) - SearchPerformed → predictive_memory.record_query(q, []) + record_memory_access on top 10 result_ids - MemoryPromoted → activation_network.activate(id, 0.3) spread - MemorySuppressed → emit Rac1CascadeSwept (was declared-never-emitted) - ImportanceScored (composite > 0.85 AND memory_id present) → storage.promote_memory + re-emit MemoryPromoted - Heartbeat (memory_count > 700, 6h cooldown) → spawned find_duplicates sweep (rate-limited) The loop holds the CognitiveEngine mutex only per-handler, never across an await, so MCP tool dispatch is never starved. 2. Prospective poller — 60s tokio::interval calls prospective_memory.check_triggers(Context { timestamp: now, .. }). Matched intentions are logged at info! level today; v2.5 "Autonomic" upgrades this to MCP sampling/createMessage for agent-side notifications. ImportanceScored event gained optional `memory_id: Option<String>` field (#[serde(default)], backward-compatible) so auto-promote has the id to target. Both existing emit sites (server.rs tool dispatch, dashboard handlers::score_importance) pass None because they score arbitrary content, not stored memories — matches current semantics. docs/VESTIGE_STATE_AND_PLAN.md §15 POST-v2.0.8 ADDENDUM records the full three-agent audit that produced this architecture (2026-SOTA research, active-vs-passive module audit, competitor landscape), the v2.0.9/v2.5/v2.6 ship order, and the one-line thesis: "the bottleneck was one missing event-subscriber task; wiring it flips Vestige from memory library to cognitive agent that acts on the host LLM." Verified: - cargo check --workspace clean - cargo clippy --workspace -- -D warnings clean (let-chain on Rust 1.91+) - cargo test -p vestige-mcp --lib 356/356 passing, 0 failed * fix(autopilot): supervisor + dedup race + opt-out env var Three blockers from the 5-agent v2.0.9 audit, all in autopilot.rs. 1. Supervisor loops around both tokio tasks (event subscriber + prospective poller). Previously, if a cognitive hook panicked on a single bad memory, the spawned task died permanently and silently — every future event lost. Now the outer supervisor catches JoinError::is_panic(), logs the panic with full error detail, sleeps 5s, and respawns the inner task. Turns a permanent silent failure into a transient hiccup. 2. DedupSweepState struct replaces the bare Option<Instant> timestamp. It tracks the in-flight JoinHandle so the next Heartbeat skips spawning a second sweep while the first is still running. Previously, the cooldown timestamp was set BEFORE spawning the async sweep, which allowed two concurrent find_duplicates scans on 100k+ memory DBs where the sweep could exceed the 6h cooldown window. is_running() drops finished handles so a long-dead sweep doesn't block the next legitimate tick. 3. VESTIGE_AUTOPILOT_ENABLED=0 opt-out. v2.0.8 users updating in place can preserve the passive-library contract by setting the env var to any of {0, false, no, off}. Any other value (unset, 1, true, etc.) enables the default v2.0.9 Autopilot behavior. spawn() early-returns with an info! log before any task is spawned. Audit breakdown: - Agent 1 (internals): NO-GO → fixed (1, 2) - Agent 2 (backward compat): NO-GO → fixed (3) - Agent 3 (orphan cleanup): GO clean - Agent 4 (runtime safety): GO clean - Agent 5 (release prep): GO, procedural note logged Verification: - cargo check -p vestige-mcp: clean - cargo test -p vestige-mcp --lib: 373 passed, 0 failed - cargo clippy -p vestige-mcp --lib --bins -- -D warnings: clean * chore(release): v2.0.9 "Autopilot" Bump workspace + vestige-core + vestige-mcp + apps/dashboard to 2.0.9. CHANGELOG [2.0.9] entry + README hero banner rewrite to "Autopilot". Scope (two commits on top of v2.0.8): - 0e9b260: 3,091 LOC orphan-code cleanup - fe7a68c: Autopilot backend event-subscriber - HEAD (this branch): supervisor + dedup race + opt-out env var hardening Pure backend release — tool count unchanged (24), schema unchanged, JSON-RPC shape unchanged, CLI flags unchanged. Only visible behavior change is the Autopilot task running in the background, which is VESTIGE_AUTOPILOT_ENABLED=0-gated. Test gate: 1,223 passing / 0 failed (workspace, no-fail-fast). Clippy: clean on vestige-mcp lib + bins with -D warnings. Audit: 5 parallel agents (internals, backward compat, orphan cleanup, runtime safety, release prep) — all GO after hardening commit.
2026-04-24 02:00:00 -05:00
<sub>80,000+ lines of Rust · 30 cognitive modules · 130 years of memory research · one 22MB binary</sub>
</p>