Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/memory / / InsightMemory
Class: InsightMemory
Defined in: packages/memory/src/tiers/insight-memory.ts:49
InsightMemory - list / search reflection insights. A no-op (returns empty) when the storage adapter does not expose the optional insights surface.
Stable
Constructors
Constructor
new InsightMemory(args): InsightMemory;Defined in: packages/memory/src/tiers/insight-memory.ts:53
Parameters
| Parameter | Type |
|---|---|
args | { store: MemoryStoreAdapter; tracer: Tracer; } |
args.store | MemoryStoreAdapter |
args.tracer | Tracer |
Returns
InsightMemory
Methods
get()
get(id): Promise<Insight | null>;Defined in: packages/memory/src/tiers/insight-memory.ts:118
Lookup a single insight by id.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<Insight | null>
list()
list(scope, opts?): Promise<readonly Insight[]>;Defined in: packages/memory/src/tiers/insight-memory.ts:99
Most-recent insights for the scope (newest first).
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
opts | InsightListOptions |
Returns
Promise<readonly Insight[]>
search()
search(
scope,
query,
opts?): Promise<readonly MemoryHit<Insight>[]>;Defined in: packages/memory/src/tiers/insight-memory.ts:59
FTS keyword search over insight text.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts | InsightSearchOptions |
Returns
Promise<readonly MemoryHit<Insight>[]>
validate()
validate(
scope,
insightId,
reason?,
options?): Promise<void>;Defined in: packages/memory/src/tiers/insight-memory.ts:130
Promote a quarantined insight out of quarantine (MCON-2). Mirrors SemanticMemory.validate: re-derives the injection verdict from the stored text and refuses promotion of an injection-flagged insight unless an operator passes { force: true } from a trusted context.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
insightId | string |
reason? | string |
options? | { force?: boolean; } |
options.force? | boolean |
Returns
Promise<void>