CreateAutoExtractorOptions
Defined in: src/lib/memory/autoExtractWorker.ts:176
Properties
consolidate?
optionalconsolidate:object
Defined in: src/lib/memory/autoExtractWorker.ts:238
Enable the LLM-based consolidation pass (Hindsight facet-dedup) on
every retain() write. Auth is NOT configured here — the consolidation
call reuses the extract options’ credentials (apiKey / getToken)
and defaults to its baseUrl unless overridden below. Absent →
identical behavior to today: retain() runs the strict cosine-only
auto-merge with no consolidation LLM calls.
baseUrl?
optionalbaseUrl:string
Portal base URL for consolidation calls. Default: the extract options’ baseUrl.
endpointOverride?
optionalendpointOverride:string
model?
optionalmodel:string
Override the consolidation model. Default: see consolidate.ts.
onFallback()?
optionalonFallback: (reason:ConsolidationFallbackReason) =>void
Notified on each degraded create-fallback (LLM failure or
schema-violating response). See
RetainOptions.consolidateOptions.onFallback.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
cursorStore?
optionalcursorStore:ExtractionCursorStore
Defined in: src/lib/memory/autoExtractWorker.ts:218
Durable per-conversation watermark store. When provided, the watermark is hydrated from it the first time each conversation is touched and written through on every advance, so extraction resumes exactly after the last extracted message across process restarts (and, with a process-shared store, across concurrent sessions). Build via createPlatformCursorStore. Omit for in-memory-only (legacy) behavior.
entityCtx?
optionalentityCtx:EntityOperationsContext
Defined in: src/lib/memory/autoExtractWorker.ts:225
Entity / memory_entity write context — when provided, each retained
candidate’s entities[] is persisted via linkMemoryEntitiesOp,
populating the W5 graph retrieval lane. Without this the lane stays
empty and recall’s graph fusion is a no-op.
extract
extract:
ExtractFactsOptions
Defined in: src/lib/memory/autoExtractWorker.ts:182
folderId?
optionalfolderId:string|null
Defined in: src/lib/memory/autoExtractWorker.ts:229
Override folderId for all retained facts.
injectionClassifier?
optionalinjectionClassifier:object
Defined in: src/lib/memory/autoExtractWorker.ts:259
Tier-0 security (PR5) — enable the optional SECOND-layer LLM injection
classifier over the candidates the deterministic screen passed as clean.
Presence is the switch, so injectionClassifier: {} is how a client turns
it on. Auth is NOT configured here — like consolidate, the call reuses
the extract credentials and defaults to its baseUrl. See
injectionClassifier.ts for the safety posture and the defaults.
baseUrl?
optionalbaseUrl:string
Portal base URL for classifier calls. Default: the extract options’ baseUrl.
maxCandidates?
optionalmaxCandidates:number
model?
optionalmodel:string
totalTimeoutMs?
optionaltotalTimeoutMs:number
maxTrackedConversations?
optionalmaxTrackedConversations:number
Defined in: src/lib/memory/autoExtractWorker.ts:209
Cap on the number of conversations whose extraction state (watermark + coalescing queue) is held in memory. When exceeded, the oldest entry with no queued turn is evicted — its conversation simply re-extracts from a trailing window next time (self-healing). The worker is session-scoped, so the default is generous; lower it for very long-lived, many-conversation sessions in RAM-constrained hosts. Default 200.
maxWindowSize?
optionalmaxWindowSize:number
Defined in: src/lib/memory/autoExtractWorker.ts:200
Upper bound on the widened (post-watermark) window. Under an extreme burst
— more un-extracted messages accumulate than this cap while an extraction
is stuck — the window is truncated to the most recent maxWindowSize
messages and a warning is logged. Bounds extraction LLM cost/latency.
Default 20. Coerced to be ≥ windowSize.
memoryStore?
optionalmemoryStore:MemoryStore|null
Defined in: src/lib/memory/autoExtractWorker.ts:179
Route retained facts and topics through this store; null disables memory writes.
minConfidence?
optionalminConfidence:number
Defined in: src/lib/memory/autoExtractWorker.ts:184
Confidence floor for retained facts. Default 0.7.
onCandidateFailed()?
optionalonCandidateFailed: (event:object) =>void
Defined in: src/lib/memory/autoExtractWorker.ts:286
Per-candidate retain() failure. Lets UI layers (“Anuma is saving …
— couldn’t save Lives in Portland”) surface the specific fact that
dropped instead of only seeing the aggregate failedCount. Fires
once per filtered candidate that threw during retain.
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
| |
|
|
|
|
|
|
Returns
void
onError()?
optionalonError: (error:Error,conversationId?:string) =>void
Defined in: src/lib/memory/autoExtractWorker.ts:279
Diagnostic — fires on unexpected pipeline errors.
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
void
onMemoryExtracted()?
optionalonMemoryExtracted: (event:MemoryExtractedEvent) =>void
Defined in: src/lib/memory/autoExtractWorker.ts:267
Per-fact event — fires once per memory written.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
onMemoryQuarantined()?
optionalonMemoryQuarantined: (event:MemoryQuarantinedEvent) =>void
Defined in: src/lib/memory/autoExtractWorker.ts:273
Tier-0 security (PR3) — fires once per candidate quarantined by the injection screen (and persisted as an audit row). Lets a client surface a “held for review” state instead of the fact silently disappearing.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
onSkipped()?
optionalonSkipped: (event:TurnSkippedEvent) =>void
Defined in: src/lib/memory/autoExtractWorker.ts:277
Diagnostic — fires when a turn is skipped.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
onTurnComplete()?
optionalonTurnComplete: (event:TurnCompleteEvent) =>void
Defined in: src/lib/memory/autoExtractWorker.ts:275
Per-turn event — fires once after the whole pipeline finishes.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
retainCtx
retainCtx:
RetainContext
Defined in: src/lib/memory/autoExtractWorker.ts:177
scope?
optionalscope:string
Defined in: src/lib/memory/autoExtractWorker.ts:227
Override scope for all retained facts.
signal?
optionalsignal:AbortSignal
Defined in: src/lib/memory/autoExtractWorker.ts:181
Cancel remote writes for an extraction batch.
windowSize?
optionalwindowSize:number
Defined in: src/lib/memory/autoExtractWorker.ts:192
Trailing-window size used when there is no watermark yet for a
conversation (the first extraction, or after the watermark scrolled out of
the provided history): the extractor receives the last windowSize
messages. Default 6. Once a watermark exists, the window is computed from
it (everything since the watermark) rather than this fixed slice.