mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-09 07:42:37 +02:00
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
This commit is contained in:
parent
95bde93b49
commit
8178beb961
359 changed files with 8277 additions and 3416 deletions
|
|
@ -114,20 +114,27 @@ pub mod neuroscience;
|
|||
|
||||
// Memory types
|
||||
pub use memory::{
|
||||
ConsolidationResult, EmbeddingResult, IngestInput, KnowledgeNode, MatchType, MemoryStats,
|
||||
NodeType, RecallInput, SearchMode, SearchResult, SimilarityResult, TemporalRange,
|
||||
ConsolidationResult,
|
||||
// GOD TIER 2026: New types
|
||||
EdgeType, KnowledgeEdge, MemoryScope, MemorySystem,
|
||||
EdgeType,
|
||||
EmbeddingResult,
|
||||
IngestInput,
|
||||
KnowledgeEdge,
|
||||
KnowledgeNode,
|
||||
MatchType,
|
||||
MemoryScope,
|
||||
MemoryStats,
|
||||
MemorySystem,
|
||||
NodeType,
|
||||
RecallInput,
|
||||
SearchMode,
|
||||
SearchResult,
|
||||
SimilarityResult,
|
||||
TemporalRange,
|
||||
};
|
||||
|
||||
// FSRS-6 algorithm
|
||||
pub use fsrs::{
|
||||
initial_difficulty,
|
||||
initial_stability,
|
||||
next_interval,
|
||||
// Core functions for advanced usage
|
||||
retrievability,
|
||||
retrievability_with_decay,
|
||||
FSRSParameters,
|
||||
FSRSScheduler,
|
||||
FSRSState,
|
||||
|
|
@ -135,6 +142,12 @@ pub use fsrs::{
|
|||
PreviewResults,
|
||||
Rating,
|
||||
ReviewResult,
|
||||
initial_difficulty,
|
||||
initial_stability,
|
||||
next_interval,
|
||||
// Core functions for advanced usage
|
||||
retrievability,
|
||||
retrievability_with_decay,
|
||||
};
|
||||
|
||||
// Storage layer
|
||||
|
|
@ -146,9 +159,8 @@ pub use storage::{
|
|||
// Consolidation (sleep-inspired memory processing)
|
||||
pub use consolidation::SleepConsolidation;
|
||||
pub use consolidation::{
|
||||
DreamEngine, DreamPhase, FourPhaseDreamResult, PhaseResult,
|
||||
TriagedMemory, TriageCategory, CreativeConnection, CreativeConnectionType,
|
||||
DreamInsight,
|
||||
CreativeConnection, CreativeConnectionType, DreamEngine, DreamInsight, DreamPhase,
|
||||
FourPhaseDreamResult, PhaseResult, TriageCategory, TriagedMemory,
|
||||
};
|
||||
|
||||
// Advanced features (bleeding edge 2026)
|
||||
|
|
@ -162,6 +174,8 @@ pub use advanced::{
|
|||
AdaptiveEmbedder,
|
||||
ApplicableKnowledge,
|
||||
AppliedModification,
|
||||
// Prediction Error Gating (solves bad vs good similar memory problem)
|
||||
CandidateMemory,
|
||||
ChainStep,
|
||||
ChangeSummary,
|
||||
CompressedMemory,
|
||||
|
|
@ -175,16 +189,20 @@ pub use advanced::{
|
|||
// Sleep consolidation (automatic background consolidation)
|
||||
ConsolidationScheduler,
|
||||
ContentType,
|
||||
CreateReason,
|
||||
// Cross-project learning
|
||||
CrossProjectLearner,
|
||||
DetectedIntent,
|
||||
DiscoveredConnection,
|
||||
DiscoveredConnectionType,
|
||||
DreamConfig,
|
||||
// DreamMemory - input type for dreaming
|
||||
DreamMemory,
|
||||
DiscoveredConnection,
|
||||
DiscoveredConnectionType,
|
||||
DreamResult,
|
||||
EmbeddingStrategy,
|
||||
EvaluationIntent,
|
||||
GateDecision,
|
||||
GateStats,
|
||||
ImportanceDecayConfig,
|
||||
ImportanceScore,
|
||||
// Importance tracking
|
||||
|
|
@ -204,11 +222,14 @@ pub use advanced::{
|
|||
MemoryPath,
|
||||
MemoryReplay,
|
||||
MemorySnapshot,
|
||||
MergeStrategy,
|
||||
Modification,
|
||||
Pattern,
|
||||
PatternType,
|
||||
PredictedMemory,
|
||||
PredictionContext,
|
||||
PredictionErrorConfig,
|
||||
PredictionErrorGate,
|
||||
ProjectContext,
|
||||
ReasoningChain,
|
||||
ReconsolidatedMemory,
|
||||
|
|
@ -217,25 +238,16 @@ pub use advanced::{
|
|||
ReconsolidationStats,
|
||||
RelationshipType,
|
||||
RetrievalRecord,
|
||||
SimilarityResult as PredictionSimilarityResult,
|
||||
// Speculative retrieval
|
||||
SpeculativeRetriever,
|
||||
SupersedeReason,
|
||||
SynthesizedInsight,
|
||||
UniversalPattern,
|
||||
UpdateType,
|
||||
UsageEvent,
|
||||
UsagePattern,
|
||||
UserAction,
|
||||
// Prediction Error Gating (solves bad vs good similar memory problem)
|
||||
CandidateMemory,
|
||||
CreateReason,
|
||||
EvaluationIntent,
|
||||
GateDecision,
|
||||
GateStats,
|
||||
MergeStrategy,
|
||||
PredictionErrorConfig,
|
||||
PredictionErrorGate,
|
||||
SimilarityResult as PredictionSimilarityResult,
|
||||
SupersedeReason,
|
||||
UpdateType,
|
||||
};
|
||||
|
||||
// Codebase memory (Vestige's killer differentiator)
|
||||
|
|
@ -315,14 +327,20 @@ pub use neuroscience::{
|
|||
ContextReinstatement,
|
||||
ContextWeights,
|
||||
DecayFunction,
|
||||
// Emotional Memory (Brown & Kulik 1977, Bower 1981, LaBar & Cabeza 2006)
|
||||
EmotionCategory,
|
||||
EmotionalContext,
|
||||
EmotionalEvaluation,
|
||||
EmotionalMarker,
|
||||
EmotionalMemory,
|
||||
EmotionalMemoryStats,
|
||||
EncodingContext,
|
||||
FullMemory,
|
||||
// Hippocampal Indexing (Teyler & Rudy, 2007)
|
||||
HippocampalIndex,
|
||||
HippocampalIndexConfig,
|
||||
HippocampalIndexError,
|
||||
INDEX_EMBEDDING_DIM,
|
||||
ImportanceCluster,
|
||||
ImportanceConsolidationConfig,
|
||||
ImportanceEncodingConfig,
|
||||
|
|
@ -374,40 +392,34 @@ pub use neuroscience::{
|
|||
TemporalMarker,
|
||||
TimeOfDay,
|
||||
TopicalContext,
|
||||
INDEX_EMBEDDING_DIM,
|
||||
// Emotional Memory (Brown & Kulik 1977, Bower 1981, LaBar & Cabeza 2006)
|
||||
EmotionCategory,
|
||||
EmotionalEvaluation,
|
||||
EmotionalMemory,
|
||||
EmotionalMemoryStats,
|
||||
};
|
||||
|
||||
// Embeddings (when feature enabled)
|
||||
#[cfg(feature = "embeddings")]
|
||||
pub use embeddings::{
|
||||
cosine_similarity, euclidean_distance, Embedding, EmbeddingError, EmbeddingService,
|
||||
EMBEDDING_DIMENSIONS,
|
||||
EMBEDDING_DIMENSIONS, Embedding, EmbeddingError, EmbeddingService, cosine_similarity,
|
||||
euclidean_distance,
|
||||
};
|
||||
|
||||
// Search (when feature enabled)
|
||||
#[cfg(feature = "vector-search")]
|
||||
pub use search::{
|
||||
linear_combination,
|
||||
reciprocal_rank_fusion,
|
||||
HybridSearchConfig,
|
||||
// Hybrid search
|
||||
HybridSearcher,
|
||||
// Keyword search
|
||||
KeywordSearcher,
|
||||
VectorIndex,
|
||||
VectorIndexConfig,
|
||||
VectorIndexStats,
|
||||
VectorSearchError,
|
||||
RerankedResult,
|
||||
// GOD TIER 2026: Reranking
|
||||
Reranker,
|
||||
RerankerConfig,
|
||||
RerankerError,
|
||||
RerankedResult,
|
||||
VectorIndex,
|
||||
VectorIndexConfig,
|
||||
VectorIndexStats,
|
||||
VectorSearchError,
|
||||
linear_combination,
|
||||
reciprocal_rank_fusion,
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -450,6 +462,8 @@ pub mod prelude {
|
|||
// Sleep consolidation
|
||||
ConsolidationScheduler,
|
||||
CrossProjectLearner,
|
||||
EvaluationIntent,
|
||||
GateDecision,
|
||||
ImportanceTracker,
|
||||
IntentDetector,
|
||||
LabileState,
|
||||
|
|
@ -459,14 +473,12 @@ pub mod prelude {
|
|||
MemoryReplay,
|
||||
Modification,
|
||||
PredictedMemory,
|
||||
// Prediction Error Gating
|
||||
PredictionErrorGate,
|
||||
ReconsolidatedMemory,
|
||||
// Reconsolidation
|
||||
ReconsolidationManager,
|
||||
SpeculativeRetriever,
|
||||
// Prediction Error Gating
|
||||
PredictionErrorGate,
|
||||
GateDecision,
|
||||
EvaluationIntent,
|
||||
};
|
||||
|
||||
// Codebase memory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue