Graphorin API reference v0.13.8
Graphorin API reference / @graphorin/store-sqlite / / SqliteInsightStore
Class: SqliteInsightStore
Defined in: packages/store-sqlite/src/memory-store.ts:1968
Stable
SqliteInsightStore - owns the insights + insights_fts tables shipped in migration 014. Implements the structural InsightMemoryStoreExt surface defined in @graphorin/memory/internal/storage-adapter.ts.
Search is FTS5-only - insights are a soft, rank-capped inspector surface, not primary recall, so no per-embedder vec0 table is created. Pruning (the ExpeL forgetting step) is a soft-delete (deleted_at), never a hard purge, so pruned insights remain auditable.
Constructors
Constructor
new SqliteInsightStore(conn): SqliteInsightStore;Defined in: packages/store-sqlite/src/memory-store.ts:1970
Parameters
| Parameter | Type |
|---|---|
conn | SqliteConnection |
Returns
SqliteInsightStore
Methods
bumpSalience()
bumpSalience(
id,
delta,
reason?): Promise<void>;Defined in: packages/store-sqlite/src/memory-store.ts:2108
Adjust an insight's ExpeL salience by delta, clamped at 0 (the floor at which prune removes it). Never touches content / cites - salience is the only mutable field.
Parameters
| Parameter | Type |
|---|---|
id | string |
delta | number |
reason? | string |
Returns
Promise<void>
get()
get(id): Promise<Insight | null>;Defined in: packages/store-sqlite/src/memory-store.ts:2054
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<Insight | null>
insert()
insert(insight): Promise<void>;Defined in: packages/store-sqlite/src/memory-store.ts:1974
Parameters
| Parameter | Type |
|---|---|
insight | Insight |
Returns
Promise<void>
list()
list(scope, opts?): Promise<readonly Insight[]>;Defined in: packages/store-sqlite/src/memory-store.ts:2015
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
opts | { includeQuarantined?: boolean; limit?: number; } |
opts.includeQuarantined? | boolean |
opts.limit? | number |
Returns
Promise<readonly Insight[]>
prune()
prune(scope): Promise<number>;Defined in: packages/store-sqlite/src/memory-store.ts:2121
Soft-delete every salience-0 insight for the scope (the ExpeL forgetting step). Returns the number pruned. Tombstone only - the row stays for audit.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
Returns
Promise<number>
search()
search(
scope,
query,
opts?): Promise<readonly MemoryHit<Insight>[]>;Defined in: packages/store-sqlite/src/memory-store.ts:2031
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts | { includeQuarantined?: boolean; topK?: number; } |
opts.includeQuarantined? | boolean |
opts.topK? | number |
Returns
Promise<readonly MemoryHit<Insight>[]>
setStatus()
setStatus(
id,
status,
reason?,
scope?): Promise<void>;Defined in: packages/store-sqlite/src/memory-store.ts:2068
Promote / demote an insight's retrieval-trust status and write a memory_history audit row. Mirrors setStatus on facts - a retrieval gate only. Powers InsightMemory.validate so a quarantined (reflection) insight can be promoted out of quarantine.
Parameters
| Parameter | Type |
|---|---|
id | string |
status | MemoryStatus |
reason? | string |
scope? | SessionScope |
Returns
Promise<void>