Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/memory / / InsightMemoryStoreExt

Interface: InsightMemoryStoreExt

Defined in: packages/memory/src/internal/storage-adapter.ts:679

Optional storage extension for the reflection insights table (P1-1). The consolidator's reflection pass inserts quarantined, cited insights here; the thin InsightMemory read surface lists / searches them; the ExpeL salience loop bumps + prunes them. Search is FTS-only by design - insights are a soft, rank-capped inspector surface, not primary recall.

Adapters that opt out leave the property undefined; reflection then degrades to a no-op (it never writes) and InsightMemory search/list return empty. The default @graphorin/store-sqlite adapter implements it.

Stable

Methods

bumpSalience()

ts
bumpSalience(
   id, 
   delta, 
reason?): Promise<void>;

Defined in: packages/memory/src/internal/storage-adapter.ts:707

Adjust an insight's ExpeL salience by delta, clamped at 0. The floor is the value at which prune removes it.

Parameters

ParameterType
idstring
deltanumber
reason?string

Returns

Promise&lt;void&gt;


get()?

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

Defined in: packages/memory/src/internal/storage-adapter.ts:691

Lookup a single insight by id (null when absent / pruned).

Parameters

ParameterType
idstring

Returns

Promise&lt;Insight | null&gt;


insert()

ts
insert(insight): Promise<void>;

Defined in: packages/memory/src/internal/storage-adapter.ts:681

Persist a synthesized insight (idempotent on id).

Parameters

ParameterType
insightInsight

Returns

Promise&lt;void&gt;


list()

ts
list(scope, opts?): Promise<readonly Insight[]>;

Defined in: packages/memory/src/internal/storage-adapter.ts:683

Most-recent insights for the scope (newest first).

Parameters

ParameterType
scopeSessionScope
opts?InsightStoreListOptions

Returns

Promise&lt;readonly Insight[]&gt;


prune()

ts
prune(scope): Promise<number>;

Defined in: packages/memory/src/internal/storage-adapter.ts:713

Soft-delete every salience-0 insight for the scope (the ExpeL forgetting step). Returns the number pruned. Tombstone only - pruned insights stay auditable.

Parameters

ParameterType
scopeSessionScope

Returns

Promise&lt;number&gt;


ts
search(
   scope, 
   query, 
opts?): Promise<readonly MemoryHit<Insight>[]>;

Defined in: packages/memory/src/internal/storage-adapter.ts:685

FTS keyword search over insight text.

Parameters

ParameterType
scopeSessionScope
querystring
opts?InsightSearchStoreOptions

Returns

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


setStatus()?

ts
optional setStatus(
   id, 
   status, 
   reason?, 
scope?): Promise<void>;

Defined in: packages/memory/src/internal/storage-adapter.ts:697

Set an insight's retrieval-trust status (MCON-2) - promote a quarantined (reflection) insight or re-quarantine an active one, with a memory_history audit row. Powers InsightMemory.validate.

Parameters

ParameterType
idstring
statusMemoryStatus
reason?string
scope?SessionScope

Returns

Promise&lt;void&gt;