Skip to Content

MemoryMaintenance

Defined in: src/lib/memory/store/types.ts:200 

Background jobs that keep a LOCAL store healthy.

TRANSITIONAL local-vault plumbing. A remote store may omit these hooks, but their absence does not mean plaintext-dependent work moves to nearby. Topic extraction and other jobs that need decrypted memory content remain on the device and persist encrypted rows/metadata through the remote store. Metadata-only maintenance can run server-side. Nothing here should gain a new caller that isn’t a background worker.

Not here on purpose: the client’s quality sweep (list + delete) and folder→topic migration (list + topicsByMemories + addTopics) compose from the main interface.

Extends

Methods

backfillTopics()

backfillTopics(memoryIds: readonly string[]): Promise<string[]>

Defined in: src/lib/memory/store/types.ts:237 

Fill topics on pre-v42 rows from their existing links. Returns the ids filled.

Parameters

ParameterType

memoryIds

readonly string[]

Returns

Promise<string[]>

Inherited from

MemoryTopicMaintenance.backfillTopics


createDecaySweeper()

createDecaySweeper(options?: Omit<CreateDecaySweeperOptions, "vaultCtx">): DecaySweeper

Defined in: src/lib/memory/store/types.ts:202 

Decay sweeper bound to this store’s vault (see createDecaySweeper).

Parameters

ParameterType

options?

Omit<CreateDecaySweeperOptions, "vaultCtx">

Returns

DecaySweeper


extractTopics()

extractTopics(memoryIds: readonly string[], options: TopicExtractOptions & object): Promise<TopicExtractionRunResult>

Defined in: src/lib/memory/store/types.ts:224 

LLM topic extraction + link + stamp for these memories.

Parameters

ParameterType

memoryIds

readonly string[]

options

TopicExtractOptions & object

Returns

Promise<TopicExtractionRunResult>

Inherited from

MemoryTopicMaintenance.extractTopics


getTopicBacklog()

getTopicBacklog(options?: object): Promise<MemoriesNeedingTopicExtraction>

Defined in: src/lib/memory/store/types.ts:204 

One page of the topic-extraction backlog (see getMemoriesNeedingTopicExtractionOp).

Parameters

ParameterType

options?

object

options.limit?

number

Returns

Promise<MemoriesNeedingTopicExtraction>

Overrides

MemoryTopicMaintenance.getTopicBacklog


relinkTopics()

relinkTopics(memoryIds: readonly string[]): Promise<string[]>

Defined in: src/lib/memory/store/types.ts:235 

Rebuild the local link index from each row’s synced topics. Returns the ids relinked.

Parameters

ParameterType

memoryIds

readonly string[]

Returns

Promise<string[]>

Inherited from

MemoryTopicMaintenance.relinkTopics


stampTopicsExtracted()

stampTopicsExtracted(memoryIds: readonly string[], extractedAt: number, version?: number): Promise<string[]>

Defined in: src/lib/memory/store/types.ts:229 

Grandfather already-linked rows without an LLM call. Returns the ids stamped.

Parameters

ParameterType

memoryIds

readonly string[]

extractedAt

number

version?

number

Returns

Promise<string[]>

Inherited from

MemoryTopicMaintenance.stampTopicsExtracted

Last updated on