Class CognitiveMechanismsEngine

Orchestrates 8 cognitive mechanisms across the memory pipeline lifecycle.

When cognitiveMechanisms config is present on CognitiveMemoryConfig, an instance is created during initialization. Existing pipeline files call the lifecycle hooks at the appropriate points.

If HEXACO traits are provided, mechanism parameters are personality-modulated: emotionality → reconsolidation drift, conscientiousness → RIF strength, openness → involuntary recall probability + novelty boost, honesty → source skepticism, agreeableness → emotion regulation, extraversion → FOK surfacing.

Constructors

Methods

  • Called by ConsolidationLoop.run() after step 5 (compact). Runs temporal gist, source confidence decay, and emotion regulation.

    Parameters

    • traces: MemoryTrace[]
    • Optional llmFn: ((prompt) => Promise<string>)
        • (prompt): Promise<string>
        • Parameters

          • prompt: string

          Returns Promise<string>

    Returns Promise<{
        gistedCount: number;
        sourceDecayedCount: number;
        regulatedCount: number;
    }>