Skip to content

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

ts
new SqliteInsightStore(conn): SqliteInsightStore;

Defined in: packages/store-sqlite/src/memory-store.ts:1970

Parameters

ParameterType
connSqliteConnection

Returns

SqliteInsightStore

Methods

bumpSalience()

ts
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

ParameterType
idstring
deltanumber
reason?string

Returns

Promise&lt;void&gt;


get()

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

Defined in: packages/store-sqlite/src/memory-store.ts:2054

Parameters

ParameterType
idstring

Returns

Promise&lt;Insight | null&gt;


insert()

ts
insert(insight): Promise<void>;

Defined in: packages/store-sqlite/src/memory-store.ts:1974

Parameters

ParameterType
insightInsight

Returns

Promise&lt;void&gt;


list()

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

Defined in: packages/store-sqlite/src/memory-store.ts:2015

Parameters

ParameterType
scopeSessionScope
opts{ includeQuarantined?: boolean; limit?: number; }
opts.includeQuarantined?boolean
opts.limit?number

Returns

Promise&lt;readonly Insight[]&gt;


prune()

ts
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

ParameterType
scopeSessionScope

Returns

Promise&lt;number&gt;


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

Defined in: packages/store-sqlite/src/memory-store.ts:2031

Parameters

ParameterType
scopeSessionScope
querystring
opts{ includeQuarantined?: boolean; topK?: number; }
opts.includeQuarantined?boolean
opts.topK?number

Returns

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


setStatus()

ts
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

ParameterType
idstring
statusMemoryStatus
reason?string
scope?SessionScope

Returns

Promise&lt;void&gt;