Commit graph

14 commits

Author SHA1 Message Date
Sam Valladares
8178beb961 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
Sam Valladares
c6090dc2ba fix: v2.0.1 release — fix broken installs, CI, security, and docs
Critical fixes:
- npm postinstall.js: BINARY_VERSION '1.1.3' → '2.0.1' (every install was 404ing)
- npm package name: corrected error messages to 'vestige-mcp-server'
- README: npm install command pointed to wrong package
- MSRV: bumped from 1.85 to 1.91 (uses floor_char_boundary from 1.91)
- CI: removed stale 'develop' branch from test.yml triggers

Security hardening:
- CSP: restricted connect-src from wildcard 'ws: wss:' to localhost-only
- Added X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy headers
- Added frame-ancestors 'none', base-uri 'self', form-action 'self' to CSP
- Capped retention_distribution endpoint from 10k to 1k nodes
- Added debug logging for WebSocket connections without Origin header

Maintenance:
- All clippy warnings fixed (58 total: redundant closures, collapsible ifs, no-op casts)
- All versions harmonized to 2.0.1 across Cargo.toml and package.json
- CLAUDE.md updated to match v2.0.1 (21 tools, 29 modules, 1238 tests)
- docs/CLAUDE-SETUP.md updated deprecated function names
- License corrected to AGPL-3.0-only in root package.json

1,238 tests passing, 0 clippy warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 20:20:14 -06:00
Sam Valladares
31bbee0c7f chore: bump npm packages to v2.0.0, add dashboard mention to init
- vestige-mcp-server: 1.6.0 → 2.0.0, updated description and keywords
- @vestige/init: 1.6.0 → 2.0.0, updated banner with v2.0 and dashboard URL

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 03:11:37 -06:00
Sam Valladares
ce520bb246 chore: license AGPL-3.0, zero clippy warnings, CHANGELOG through v1.6.0
License:
- Replace MIT/Apache-2.0 with AGPL-3.0-only across all crates and npm packages
- Replace LICENSE file with official GNU AGPL-3.0 text
- Remove LICENSE-MIT and LICENSE-APACHE

Code quality:
- Fix all 44 clippy warnings (zero remaining)
- Collapsible if statements, redundant closures, manual Option::map
- Remove duplicate #[allow(dead_code)] attributes in deprecated tool modules
- Add Default impl for CognitiveEngine
- Replace manual sort_by with sort_by_key

Documentation:
- Update CHANGELOG with v1.2.0, v1.3.0, v1.5.0, v1.6.0 entries
- Update README with v1.6.0 highlights and accurate stats (52K lines, 1100+ tests)
- Add fastembed-rs/ to .gitignore
- Add fastembed-rs to workspace exclude

1115 tests passing, zero warnings, RUSTFLAGS="-Dwarnings" clean.
2026-02-19 03:00:39 -06:00
Sam Valladares
495a88331f feat: Vestige v1.6.0 — 6x storage reduction, neural reranking, instant startup
Four internal optimizations for dramatically better performance:

1. F16 vector quantization (ScalarKind::F16 in USearch) — 2x storage savings
2. Matryoshka 256-dim truncation (768→256) — 3x embedding storage savings
3. Convex Combination fusion (0.3 keyword / 0.7 semantic) replacing RRF
4. Cross-encoder reranker (Jina Reranker v1 Turbo via fastembed TextRerank)

Combined: 6x vector storage reduction, ~20% better retrieval quality.
Cross-encoder loads in background — server starts instantly.
Old 768-dim embeddings auto-migrated on load.

614 tests pass, zero warnings.
2026-02-19 01:09:39 -06:00
Sam Valladares
927f41c3e4 feat: Vestige v1.5.0 — Cognitive Engine, memory dreaming, graph exploration, predictive retrieval
28-module CognitiveEngine with full neuroscience pipeline on every tool call.
FSRS-6 now fully automatic: periodic consolidation (6h timer + inline every
100 tool calls), real retrievability formula, episodic-to-semantic auto-merge,
cross-memory reinforcement, Park et al. triple retrieval scoring, ACT-R
base-level activation, personalized w20 optimization.

New tools (19 → 23):
- dream: memory consolidation via replay, discovers hidden connections
- explore_connections: graph traversal (chain, associations, bridges)
- predict: proactive retrieval based on context and activity patterns
- restore: memory restore from JSON backups

All existing tools upgraded with cognitive pre/post processing pipelines.
33 files changed, ~4,100 lines added.
2026-02-18 23:34:15 -06:00
Sam Valladares
3fce1f0b70 feat: v2.0 distribution — IDE integrations, zero-config installer, README overhaul
- Add integration guides for Xcode 26.3, Cursor, VS Code, JetBrains, Windsurf
- First cognitive memory server with documented Xcode 26.3 MCP support
- Add npx @vestige/init — zero-config CLI that auto-detects IDEs and injects config
- Overhaul README: "The open-source cognitive engine for AI"
- Add "Why Not Just Use RAG?" comparison and cognitive science stack docs
- Update license badge to AGPL-3.0
2026-02-12 17:18:15 -06:00
Sam Valladares
a92fb2b6ed release: v1.1.3 — security hardening, edition 2024, dependency updates
Security:
- Fix RUSTSEC-2026-0007 (bytes integer overflow)
- Restrict SQLite database file permissions to 0600 on Unix
- Add 100KB size limit to intention descriptions (DoS prevention)
- Redact JSON-RPC payloads from debug logs (data leakage prevention)
- Update SECURITY.md with encryption docs and supported versions

Modernization:
- Upgrade Rust edition 2021 → 2024, MSRV 1.75 → 1.85
- Upgrade actions/checkout@v4 → v5, codecov/codecov-action@v3 → v5
- Update all dependencies to latest compatible versions
- Fix edition 2024 match ergonomics in compression.rs

Clippy fixes:
- Rename from_str → parse_name to avoid shadowing FromStr trait
- Replace .max().min() with .clamp()
- Replace sort_by with sort_by_key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 03:19:07 -06:00
Sam Valladares
a680fa7d2f fix: dedup on ingest, Intel Mac CI, npm versions, remove dead TS package
- Route ingest tool through smart_ingest (Prediction Error Gating) to
  prevent duplicate memories when content is similar to existing entries
- Fix Intel Mac release build: use macos-13 runner for x86_64-apple-darwin
  (macos-latest is now ARM64, causing silent cross-compile failures)
- Sync npm package version to 1.1.2 (was 1.0.0 in package.json, 1.1.0
  in postinstall.js BINARY_VERSION)
- Add vestige-restore to npm makeExecutable list
- Remove abandoned packages/core/ TypeScript package (pre-Rust implementation
  referencing FSRS-5, chromadb, ollama — 32K lines of dead code)
- Sync workspace Cargo.toml version to 1.1.2

Closes #5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 02:57:03 -06:00
Sam Valladares
ed6aeadb70 feat: add MCPB bundle and fix npm package distribution
Two distribution methods now available:

1. npm (for Claude Code / developers):
   npm install -g vestige-mcp-server
   claude mcp add vestige vestige-mcp -s user

2. MCPB (for Claude Desktop / one-click install):
   Download vestige-1.1.0.mcpb from releases, double-click

Changes:
- Renamed npm package to vestige-mcp-server (vestige-mcp was taken)
- Fixed postinstall to download binaries from GitHub releases
- Added vestige-mcpb package with manifest and build script
- Uploaded .mcpb bundle to v1.1.0 release

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 00:15:17 -06:00
Sam Valladares
a104219db2 fix(npm): add .npmignore to exclude cache and binaries
Prevents accidentally publishing the 547MB embedding model cache
or downloaded binaries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 23:50:40 -06:00
Sam Valladares
1e06344319 fix(npm): download binaries during postinstall
The npm package was missing the actual binary download step - users got
wrapper scripts pointing to non-existent binaries.

Changes:
- postinstall.js now downloads correct binary from GitHub releases
- Added vestige.js wrapper for CLI binary
- Exposed both vestige-mcp and vestige commands in package.json
- Updated README with troubleshooting, storage info, CLI docs
- Added .gitignore for downloaded binaries

Fixes fresh install issues where Claude Desktop couldn't attach and
vestige CLI wasn't found.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 23:48:23 -06:00
Sam Valladares
449d60754a Replace all engram references with vestige
Updated TypeScript packages, npm package, and config files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 01:44:11 -06:00
Sam Valladares
f9c60eb5a7 Initial commit: Vestige v1.0.0 - Cognitive memory MCP server
FSRS-6 spaced repetition, spreading activation, synaptic tagging,
hippocampal indexing, and 130 years of memory research.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 01:31:03 -06:00