LlmDecayClassifierOptions
Defined in: src/lib/memory/decayClassifier.ts:30
Auth + wiring for createLlmDecayClassifier. Auth is the dual pattern —
one of apiKey / getToken is required at runtime (see PortalLlmAuth).
Extends
Properties
apiKey?
optionalapiKey:string
Defined in: src/lib/memory/portalLlm.ts:72
Direct API key — sent as x-api-key (server-side / CLI usage). Wins when both are provided.
Inherited from
backoffMs()?
optionalbackoffMs: (attempt:number) =>number
Defined in: src/lib/memory/decayClassifier.ts:40
Backoff before each retry (ms). Tests pass () => 0.
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
number
baseUrl?
optionalbaseUrl:string
Defined in: src/lib/memory/decayClassifier.ts:31
fetchFn()?
optionalfetchFn: {(input:RequestInfo|URL,init?:RequestInit):Promise<Response>; (input:string|Request|URL,init?:RequestInit):Promise<Response>; }
Defined in: src/lib/memory/decayClassifier.ts:34
Override fetch (tests).
Call Signature
(
input:RequestInfo|URL,init?:RequestInit):Promise<Response>
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<Response>
Call Signature
(
input:string|Request|URL,init?:RequestInit):Promise<Response>
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<Response>
getContent()
getContent: (
id:string) =>Promise<string|null>
Defined in: src/lib/memory/decayClassifier.ts:55
Resolve a memory’s DECRYPTED content by id. The caller supplies this and
MUST gate it on wallet-key availability — return null when no key is
loaded so the classifier degrades to the rule verdict (zero-knowledge).
A throw is treated the same as null (fail to the rule verdict).
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
Promise<string | null>
getToken()?
optionalgetToken: () =>Promise<string|null>
Defined in: src/lib/memory/portalLlm.ts:74
Function to get an auth token (e.g., Privy’s getIdentityToken). Token is sent as Authorization: Bearer.
Returns
Promise<string | null>
Inherited from
maxAttempts?
optionalmaxAttempts:number
Defined in: src/lib/memory/decayClassifier.ts:36
Max portal attempts on a TRANSIENT failure. Default 2.
model?
optionalmodel:string
Defined in: src/lib/memory/decayClassifier.ts:32
piiRedaction?
optionalpiiRedaction:boolean|PiiRedactor
Defined in: src/lib/memory/decayClassifier.ts:48
PII redaction for the outbound content. OPT-OUT: defaults to ON (a fresh
per-call redactor) when omitted, so decrypted content is never egressed
raw by accident. Pass a shared PiiRedactor to keep placeholder
numbering consistent with other calls, or false to deliberately disable
redaction. The verdict returned is a bare enum — nothing to de-anonymize.
totalTimeoutMs?
optionaltotalTimeoutMs:number
Defined in: src/lib/memory/decayClassifier.ts:38
Absolute wall-clock budget across attempts. Default 12s.