Skip to content

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

ts
new InsightMemory(args): InsightMemory;

Defined in: packages/memory/src/tiers/insight-memory.ts:53

Parameters

ParameterType
args{ store: MemoryStoreAdapter; tracer: Tracer; }
args.storeMemoryStoreAdapter
args.tracerTracer

Returns

InsightMemory

Methods

get()

ts
get(id): Promise<Insight | null>;

Defined in: packages/memory/src/tiers/insight-memory.ts:118

Lookup a single insight by id.

Parameters

ParameterType
idstring

Returns

Promise&lt;Insight | null&gt;


list()

ts
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

ParameterType
scopeSessionScope
optsInsightListOptions

Returns

Promise&lt;readonly Insight[]&gt;


ts
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

ParameterType
scopeSessionScope
querystring
optsInsightSearchOptions

Returns

Promise<readonly MemoryHit&lt;Insight&gt;[]>


validate()

ts
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

ParameterType
scopeSessionScope
insightIdstring
reason?string
options?{ force?: boolean; }
options.force?boolean

Returns

Promise&lt;void&gt;