Skip to Content
Anuma SDKReactInternalInterfacesDurableAutoExtractorOptions

DurableAutoExtractorOptions

Defined in: src/lib/memory/durableExtraction.ts:66 

Extends

Properties

batchTimeoutMs?

optional batchTimeoutMs: number

Defined in: src/lib/memory/durableExtraction.ts:101 

Ceiling on one batch, from the extraction call through retention. Defaults to the extraction call’s own worst case — extract.timeoutMs (60s) x extract.maxAttempts (3) plus backoff, or extract.totalTimeoutMs when that is smaller — plus a fixed retain budget, so this is a backstop against a promise that never settles rather than a second timeout competing with the call’s own. A batch past its ceiling is cancelled: its late writes are refused, so the retry cannot race it into duplicate rows. Without a ceiling, one unsettled promise latched the drain and killed the outbox for the rest of the session.


consolidate?

optional consolidate: 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?

optional baseUrl: string

Portal base URL for consolidation calls. Default: the extract options’ baseUrl.

endpointOverride?

optional endpointOverride: string

model?

optional model: string

Override the consolidation model. Default: see consolidate.ts.

onFallback()?

optional onFallback: (reason: ConsolidationFallbackReason) => void

Notified on each degraded create-fallback (LLM failure or schema-violating response). See RetainOptions.consolidateOptions.onFallback.

Parameters

ParameterType

reason

ConsolidationFallbackReason

Returns

void

Inherited from

CreateAutoExtractorOptions.consolidate


cursorStore?

optional cursorStore: 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.

Inherited from

CreateAutoExtractorOptions.cursorStore


debounceMs?

optional debounceMs: number

Defined in: src/lib/memory/durableExtraction.ts:86 

Coalesce arrivals after durably recording them. Defaults to 20 seconds.


entityCtx?

optional entityCtx: 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.

Inherited from

CreateAutoExtractorOptions.entityCtx


extract

extract: ExtractFactsOptions

Defined in: src/lib/memory/autoExtractWorker.ts:182 

Inherited from

CreateAutoExtractorOptions.extract


folderId?

optional folderId: string | null

Defined in: src/lib/memory/autoExtractWorker.ts:229 

Override folderId for all retained facts.

Inherited from

CreateAutoExtractorOptions.folderId


injectionClassifier?

optional injectionClassifier: 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?

optional baseUrl: string

Portal base URL for classifier calls. Default: the extract options’ baseUrl.

maxCandidates?

optional maxCandidates: number

model?

optional model: string

totalTimeoutMs?

optional totalTimeoutMs: number

Inherited from

CreateAutoExtractorOptions.injectionClassifier


maxTrackedConversations?

optional maxTrackedConversations: 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.

Inherited from

CreateAutoExtractorOptions.maxTrackedConversations


maxWindowSize?

optional maxWindowSize: 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.

Inherited from

CreateAutoExtractorOptions.maxWindowSize


memoryStore?

optional memoryStore: MemoryStore | null

Defined in: src/lib/memory/autoExtractWorker.ts:179 

Route retained facts and topics through this store; null disables memory writes.

Inherited from

CreateAutoExtractorOptions.memoryStore


messageSource()?

optional messageSource: (conversationId: string) => ExtractionMessageSource | undefined

Defined in: src/lib/memory/durableExtraction.ts:109 

Message source for a conversation outside local chat history, or undefined for history. Jobs still store only ids; the source resolves them at drain time and is re-checked before every write.

Parameters

ParameterType

conversationId

string

Returns

ExtractionMessageSource | undefined


minConfidence?

optional minConfidence: number

Defined in: src/lib/memory/autoExtractWorker.ts:184 

Confidence floor for retained facts. Default 0.7.

Inherited from

CreateAutoExtractorOptions.minConfidence


modelForScope()?

optional modelForScope: (scope: string) => string | undefined

Defined in: src/lib/memory/durableExtraction.ts:84 

Extraction model for a batch, chosen from the scope that batch will be retained under. A queued job keeps its scope across a privacy-mode flip but extract.model is whatever this instance was built with, so without this a turn queued in private mode is drained by a public-mode extractor on that extractor’s model. Returning undefined keeps extract.model. A resolver that throws fails the batch, which stays queued for retry: guessing a model is exactly the mistake this exists to prevent.

Parameters

ParameterType

scope

string

Returns

string | undefined


now()?

optional now: () => number

Defined in: src/lib/memory/durableExtraction.ts:103 

Clock for the failed-session spacing. Defaults to Date.now.

Returns

number


onCandidateFailed()?

optional onCandidateFailed: (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

ParameterType

event

object

event.candidate

ExtractedCandidate

event.conversationId?

string

event.error

unknown

Returns

void

Inherited from

CreateAutoExtractorOptions.onCandidateFailed


onError()?

optional onError: (error: Error, conversationId?: string) => void

Defined in: src/lib/memory/autoExtractWorker.ts:279 

Diagnostic — fires on unexpected pipeline errors.

Parameters

ParameterType

error

Error

conversationId?

string

Returns

void

Inherited from

CreateAutoExtractorOptions.onError


onMemoryExtracted()?

optional onMemoryExtracted: (event: MemoryExtractedEvent) => void

Defined in: src/lib/memory/autoExtractWorker.ts:267 

Per-fact event — fires once per memory written.

Parameters

ParameterType

event

MemoryExtractedEvent

Returns

void

Inherited from

CreateAutoExtractorOptions.onMemoryExtracted


onMemoryQuarantined()?

optional onMemoryQuarantined: (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

ParameterType

event

MemoryQuarantinedEvent

Returns

void

Inherited from

CreateAutoExtractorOptions.onMemoryQuarantined


onSkipped()?

optional onSkipped: (event: TurnSkippedEvent) => void

Defined in: src/lib/memory/autoExtractWorker.ts:277 

Diagnostic — fires when a turn is skipped.

Parameters

ParameterType

event

TurnSkippedEvent

Returns

void

Inherited from

CreateAutoExtractorOptions.onSkipped


onTurnComplete()?

optional onTurnComplete: (event: TurnCompleteEvent) => void

Defined in: src/lib/memory/autoExtractWorker.ts:275 

Per-turn event — fires once after the whole pipeline finishes.

Parameters

ParameterType

event

TurnCompleteEvent

Returns

void

Inherited from

CreateAutoExtractorOptions.onTurnComplete


retainCtx

retainCtx: RetainContext

Defined in: src/lib/memory/autoExtractWorker.ts:177 

Inherited from

CreateAutoExtractorOptions.retainCtx


retryDelayMs?

optional retryDelayMs: number

Defined in: src/lib/memory/durableExtraction.ts:89 

Retry delay for a failed batch. Defaults to 30 seconds; max three attempts per session. Unfinished jobs remain available on the next resume.


scope?

optional scope: string | () => string

Defined in: src/lib/memory/durableExtraction.ts:74 

Scope for facts retained from newly queued turns. Pass an accessor to have a privacy-mode flip observed at write time: a plain string is sampled once at construction, which makes correctness depend on the caller disposing and recreating the extractor on every flip. An accessor that throws is treated as "private" — the direction that cannot publish.


signal?

optional signal: AbortSignal

Defined in: src/lib/memory/autoExtractWorker.ts:181 

Cancel remote writes for an extraction batch.

Inherited from

CreateAutoExtractorOptions.signal


sourceTimeoutMs?

optional sourceTimeoutMs: number

Defined in: src/lib/memory/durableExtraction.ts:111 

Ceiling on one status or load call of a message source. Defaults to 30 seconds.


windowSize?

optional windowSize: 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.

Inherited from

CreateAutoExtractorOptions.windowSize

Last updated on