Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/adapter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {
Scenario,
Session,
ProbeOptions,
ProbeResult,
Expand All @@ -11,6 +12,21 @@ export interface MemoryAdapter {

init(): Promise<void>;

/**
* OPTIONAL lifecycle hook. The runner calls this once per scenario (after
* `reset()` and before any `processSession()` call) when the adapter
* implements it. It hands the adapter the full {@link Scenario}, including
* the typed `memory_events` that carry the structured truth (value, history,
* introduced/updated/retracted session indices). Adapters that prefer to
* drive their write path from `memory_events` rather than re-deriving facts
* from raw conversation text can use this.
*
* Backward-compatible: adapters that do not implement it (e.g.
* {@link BaselineAdapter}) keep working unchanged — the runner only calls it
* when present.
*/
setScenario?(scenario: Scenario): void;

/**
* Feed a conversation session into the memory system.
* The adapter should store facts, entities, and relationships
Expand Down
Loading
Loading