Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/memory / / InsightMemoryStoreExt
Interface: InsightMemoryStoreExt
Defined in: packages/memory/src/internal/storage-adapter.ts:537
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:554
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:549
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:539
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:541
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:560
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:543
FTS keyword search over insight text.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts? | InsightSearchStoreOptions |