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()
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
| Parameter | Type |
|---|---|
id | string |
delta | number |
reason? | string |
Returns
Promise<void>
get()?
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
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<Insight | null>
insert()
insert(insight): Promise<void>;Defined in: packages/memory/src/internal/storage-adapter.ts:681
Persist a synthesized insight (idempotent on id).
Parameters
| Parameter | Type |
|---|---|
insight | Insight |
Returns
Promise<void>
list()
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
| Parameter | Type |
|---|---|
scope | SessionScope |
opts? | InsightStoreListOptions |
Returns
Promise<readonly Insight[]>
prune()
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
| Parameter | Type |
|---|---|
scope | SessionScope |
Returns
Promise<number>
search()
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
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts? | InsightSearchStoreOptions |
Returns
Promise<readonly MemoryHit<Insight>[]>
setStatus()?
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
| Parameter | Type |
|---|---|
id | string |
status | MemoryStatus |
reason? | string |
scope? | SessionScope |
Returns
Promise<void>