Type Aliases

FlowchartResultMapper

Type Alias: FlowchartResultMapper

FlowchartResultMapper = (snapshot) => string

Defined in: src/core/flowchartAsTool.ts:129

Optional result mapper. Receives the flowchart's final snapshot (pruned to FlowchartToolSnapshot) and returns the string the LLM sees as the tool result.

If omitted, the default behavior is JSON.stringify(snapshot.values).

Errors thrown from the mapper become the tool result with a [mapper-error: ...] prefix so the LLM sees a useful diagnostic.

Parameters

snapshot

FlowchartToolSnapshot

Returns

string

On this page