Skip to Content

GraphTraversalOptions

Defined in: src/lib/memory/graphTraversal.ts:54 

Options for traverseGraphLane. All optional; defaults are the exported constants above. Exposed for ablation / evaluation sweeps.

Properties

entityFanout?

optional entityFanout: number

Defined in: src/lib/memory/graphTraversal.ts:58 

Max neighbor entities expanded per hop. Default ENTITY_FANOUT.


filterActiveMemoryIds()?

optional filterActiveMemoryIds: (ids: string[]) => Promise<Set<string>>

Defined in: src/lib/memory/graphTraversal.ts:85 

Resolve a batch of candidate memory ids to just the ACTIVE ones (not archived, not quarantined, not soft-deleted — the same set the final recall gate admits). When provided, traversal drops “forgotten” memories from the frontier AT EACH HOP so they neither steer neighbor-entity ranking nor egress their entity names to refineNeighbors. Omit (tests / entity-only callers) to traverse over every linked memory. Wire it from a vault context with ../db/memoryVault/operations.getActiveVaultMemoryIdsOp.

Parameters

ParameterType

ids

string[]

Returns

Promise<Set<string>>


maxHops?

optional maxHops: number

Defined in: src/lib/memory/graphTraversal.ts:56 

Total hops incl. the seed lookup (hop 1). Default MAX_HOPS.


nodeBudget?

optional nodeBudget: number

Defined in: src/lib/memory/graphTraversal.ts:60 

Hard cap on accumulated memory IDs. Default NODE_BUDGET.


refineNeighbors?

optional refineNeighbors: NeighborRefiner

Defined in: src/lib/memory/graphTraversal.ts:75 

PR5 — optional LLM neighbor-selection. When provided, at each expansion hop the deterministically-ranked candidate neighbor entities are handed to this refiner, which returns the subset to expand. Falls back to the co-occurrence order on any error or empty result. Called at most ONCE per hop. Build one with createLlmNeighborRefiner, or supply your own.


rrfK?

optional rrfK: number

Defined in: src/lib/memory/graphTraversal.ts:62 

RRF smoothing constant for per-hop fusion. Default 60 (rrf.ts).


vaultSize?

optional vaultSize: number

Defined in: src/lib/memory/graphTraversal.ts:67 

Vault size hint. When provided and above VAULT_SIZE_HOP_CAP, the effective hop count is capped to 1 (see capHopsForDensity).

Last updated on