roles.traceLineage
Where chosen elements of a value came from, followed back through the lineage of the values a host keeps.
Usage
Roles.traceLineage(value: VerbValue, elements: number[], options?: LineageTraceOptions): Result<LineageTrace>Parameters
valueVerbValueA value a construct verb returned; it carries its lineage.
elementsnumber[]The indices traced, 1–1000. Required. In index.
options.domain'point' | 'primitive' | 'face' | 'edge'The elements’ domain. Default
'point'.options.throughRecord<string, VerbValue>Earlier values by their ref, to follow back through.
options.depthnumberHow many steps back, 1–16. Default
8. In count.
Returns
Ok with { domain, items, truncated? }: per element its sources { term, rel, ref, domain, index, sources? }, rows of one term used jointly and terms alternatives.
Errors
Guarantees
- each source names the input value by its ref, its domain and its index there
- the same values and elements give the same answer
- The same result on every machine.
Example
Roles.traceLineage(Mesh.box().value, [0]) // → CAPABILITY_UNAVAILABLE here; a scatter's VerbValue traces each sample to its face