2026-01-25 01:31:03 -06:00
|
|
|
//! MCP Tools
|
|
|
|
|
//!
|
|
|
|
|
//! Tool implementations for the Vestige MCP server.
|
2026-01-27 01:23:27 -06:00
|
|
|
//!
|
|
|
|
|
//! The unified tools (codebase_unified, intention_unified, memory_unified, search_unified)
|
|
|
|
|
//! are the primary API. The granular tools below are kept for backwards compatibility
|
|
|
|
|
//! but are not exposed in the MCP tool list.
|
|
|
|
|
|
|
|
|
|
// Active unified tools
|
|
|
|
|
pub mod codebase_unified;
|
|
|
|
|
pub mod intention_unified;
|
|
|
|
|
pub mod memory_unified;
|
|
|
|
|
pub mod search_unified;
|
|
|
|
|
pub mod smart_ingest;
|
2026-01-25 01:31:03 -06:00
|
|
|
|
feat: Vestige v1.2.0 — dashboard, temporal tools, maintenance tools, detail levels
Add web dashboard (axum) on port 3927 with memory browser, search, and
system stats. New MCP tools: memory_timeline, memory_changelog,
health_check, consolidate, stats, backup, export, gc. Search now supports
detail_level (brief/summary/full) to control token usage. Add backup_to()
and get_recent_state_transitions() to storage layer. Bump to v1.2.0.
2026-02-12 04:33:05 -06:00
|
|
|
// v1.2: Temporal query tools
|
|
|
|
|
pub mod changelog;
|
|
|
|
|
pub mod timeline;
|
|
|
|
|
|
|
|
|
|
// v1.2: Maintenance tools
|
|
|
|
|
pub mod maintenance;
|
|
|
|
|
|
2026-02-12 05:02:09 -06:00
|
|
|
// v1.3: Auto-save and dedup tools
|
|
|
|
|
pub mod dedup;
|
|
|
|
|
pub mod importance;
|
|
|
|
|
|
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
|
|
|
// v1.5: Cognitive tools
|
|
|
|
|
pub mod dream;
|
|
|
|
|
pub mod explore;
|
|
|
|
|
pub mod predict;
|
|
|
|
|
pub mod restore;
|
|
|
|
|
|
feat: Vestige v1.9.1 AUTONOMIC — self-regulating memory with graph visualization
Retention Target System: auto-GC low-retention memories during consolidation
(VESTIGE_RETENTION_TARGET env var, default 0.8). Auto-Promote: memories
accessed 3+ times in 24h get frequency-dependent potentiation. Waking SWR
Tagging: promoted memories get preferential 70/30 dream replay. Improved
Consolidation Scheduler: triggers on 6h staleness or 2h active use.
New tools: memory_health (retention dashboard with distribution buckets,
trend tracking, recommendations) and memory_graph (subgraph export with
Fruchterman-Reingold force-directed layout, up to 200 nodes).
Dream connections now persist to database via save_connection(), enabling
memory_graph traversal. Schema Migration V8 adds waking_tag, utility_score,
times_retrieved/useful columns and retention_snapshots table. 21 MCP tools.
v1.9.1 fixes: ConnectionRecord export, UTF-8 safe truncation, link_type
normalization, utility_score clamping, only-new-connections persistence,
70/30 split capacity fill, nonexistent center_id error handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 02:02:06 -06:00
|
|
|
// v1.8: Context Packets
|
|
|
|
|
pub mod session_context;
|
|
|
|
|
|
|
|
|
|
// v1.9: Autonomic tools
|
|
|
|
|
pub mod health;
|
|
|
|
|
pub mod graph;
|
|
|
|
|
|
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
|
|
|
// v2.1: Cross-reference (connect the dots)
|
|
|
|
|
pub mod cross_reference;
|
|
|
|
|
|
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
|
|
|
// Deprecated/internal tools — not advertised in the public MCP tools/list,
|
|
|
|
|
// but some functions are actively dispatched for backwards compatibility
|
|
|
|
|
// and internal cognitive operations. #[allow(dead_code)] suppresses warnings
|
|
|
|
|
// for the unused schema/struct items within these modules.
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-02-20 21:59:52 -06:00
|
|
|
pub mod checkpoint;
|
|
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod codebase;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod consolidate;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
|
|
|
|
pub mod context;
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
|
pub mod feedback;
|
|
|
|
|
#[allow(dead_code)]
|
2026-02-20 21:59:52 -06:00
|
|
|
pub mod ingest;
|
|
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod intentions;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod knowledge;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
|
|
|
|
pub mod memory_states;
|
|
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod recall;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod review;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod search;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod stats;
|
2026-01-27 01:23:27 -06:00
|
|
|
#[allow(dead_code)]
|
2026-01-25 01:31:03 -06:00
|
|
|
pub mod tagging;
|