Skip to Content

capHopsForDensity

capHopsForDensity(maxHops: number, vaultSize?: number): number

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

Cap the hop count on large vaults. Fan-out grows with graph density, so above VAULT_SIZE_HOP_CAP memories we force seed-only traversal (1 hop) rather than pay an unbounded expansion. A no-op when vaultSize is unknown or within the threshold.

Parameters

ParameterType

maxHops

number

vaultSize?

number

Returns

number

Last updated on