toolOutcomes
Unpublished development API. This package is under development and is not available as a published release.
Builds a toolOutcome callback from one decoder per tool name.
A decoder runs only for a complete call of its own tool that has a result, so
running, stopped and failed calls and every undeclared tool stay literal.
Parsing is done once here; values such as false, 0, "", [] and null
reach the decoder unchanged and mean nothing until it says so.
import { toolOutcomes } from '@threadplane/react/chat';Declaration · overload 1
export declare function toolOutcomes(decoders: Readonly<Record<string, ToolOutcomeDecoder>>): (activity: ToolActivityInfo) => ToolActivityOutcome | undefined;Parameters
decoders· requiredReadonly<Record<string, ToolOutcomeDecoder>>
Returns
(activity: ToolActivityInfo) => ToolActivityOutcome | undefined