Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/memory / / DecayMemoryStoreExt

Interface: DecayMemoryStoreExt

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

Decay-aware extension of the typed SemanticMemoryStore. Phase 10c's light phase reads the strength + last-accessed columns and archives facts whose retention curve falls below the configured threshold. Adapters that do not maintain decay columns may omit the surface entirely — the light phase skips the archive step with an INFO log.

Stable

Methods

archiveFact()

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

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

Soft-archive a fact (sets archived = 1). The audit row in memory_history records the archive event.

Parameters

ParameterType
idstring
reason?string

Returns

Promise&lt;void&gt;


listForDecay()

ts
listForDecay(scope, limit?): Promise<readonly {
  archived: boolean;
  createdAt: number;
  id: string;
  importance: number | null;
  lastAccessedAt: number | null;
  provenance: string | null;
  status: string;
  strength: number;
  text: string;
}[]>;

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

List facts for the scope ordered by lastAccessedAt ASC so the caller can apply Ebbinghaus retention without scanning the whole table. limit defaults to 1000.

importance / status / provenance (X-1) feed the multi-signal salience score that orders capacity-bounded eviction.

Parameters

ParameterType
scopeSessionScope
limit?number

Returns

Promise<readonly { archived: boolean; createdAt: number; id: string; importance: number | null; lastAccessedAt: number | null; provenance: string | null; status: string; strength: number; text: string; }[]>