SynthesizeProfileOptions
Defined in: src/lib/memory/synthesizeProfile.ts:267
Options for synthesizeProfile. Auth is the dual PortalLlmAuth
pattern — one of apiKey / getToken is required at runtime.
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
baseUrl?
optionalbaseUrl:string
Defined in: src/lib/memory/synthesizeProfile.ts:275
LLM endpoint override.
facets?
optionalfacets:ProfileFacet[]
Defined in: src/lib/memory/synthesizeProfile.ts:269
Facets to synthesize. Defaults to DEFAULT_PROFILE_FACETS.
factTypeWeights?
optionalfactTypeWeights:Partial<Record<"other"|"identity"|"preference"|"relationship"|"plan"|"ongoing_context"|"constraint"|"instruction",number>>
Defined in: src/lib/memory/synthesizeProfile.ts:292
Per-FactType score multipliers for facet recall. Default:
DEFAULT_PROFILE_FACT_TYPE_WEIGHTS (durable types boosted).
Does not change global chat recall() defaults.
fetchFn()?
optionalfetchFn: {(input:RequestInfo|URL,init?:RequestInit):Promise<Response>; (input:string|Request|URL,init?:RequestInit):Promise<Response>; }
Defined in: src/lib/memory/synthesizeProfile.ts:281
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>
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
limit?
optionallimit:number
Defined in: src/lib/memory/synthesizeProfile.ts:279
Facts recalled per facet before synthesis. Default: 20.
llmModel?
optionalllmModel:string
Defined in: src/lib/memory/synthesizeProfile.ts:273
Synthesis model. Default: open-weights ling-2.6-flash.
previous?
optionalprevious:ProfileDoc
Defined in: src/lib/memory/synthesizeProfile.ts:271
Prior doc for delta refresh. Unchanged sections are reused verbatim.
proofCountAlpha?
optionalproofCountAlpha:number
Defined in: src/lib/memory/synthesizeProfile.ts:297
Proof-count α for facet recall. Default: DEFAULT_PROFILE_PROOF_ALPHA (0.2). Chat recall stays at 0.1.
redactor?
optionalredactor:PiiRedactor
Defined in: src/lib/memory/synthesizeProfile.ts:286
Pre-publish PII gate. When supplied, each section’s text is run through
PiiRedactor.redactTextAsync (regex + NER) before it’s returned.
Omit only when the caller redacts downstream — nearby also moderates
server-side, but the client should never publish un-gated text.
reviewedMemoryIds?
optionalreviewedMemoryIds: readonlystring[]
Defined in: src/lib/memory/synthesizeProfile.ts:314
Publish-review gate: when SUPPLIED, each facet’s recalled evidence is intersected with this id set before the LLM runs, so synthesis can only draw on memories the user approved for publication. Empty intersection → empty section (legitimate no-evidence), not a stale fallback.
Pass the user’s published set (e.g. getAllVaultMemoriesOp(ctx, { levels: ["matching", "profile"] })) to keep a published profile derivable only from published
memories — People Nearby’s two-tier model treats private memories as never
leaving the device, and a summary derived from them is a derivative that does.
[] means “nothing approved” and gates everything OUT (no recall, no LLM
call, empty sections). Omitting the field is the only way to run ungated
— that asymmetry is deliberate, so a caller computing a published set can
never accidentally disable the gate by finding it empty.
scopes?
optionalscopes:string[]
Defined in: src/lib/memory/synthesizeProfile.ts:277
Scopes to draw facts from. Default: [“private”].
store?
optionalstore:Pick<MemoryStore,"list"|"listProjections"|"factSource">
Defined in: src/lib/memory/synthesizeProfile.ts:320
Read facts and recall through this store instead of ctx.vaultCtx and
ctx.vaultCache, so a remote store works. Only ctx.embeddingOptions is
then read from ctx.