Builder
Fluent builder for FunctionNode, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor. Java gets one from FunctionNodes.builder or toBuilder, which keep the port types and parallel-worker settings, because a port cannot decode without a type.
Functions
Builds the FunctionNode.
Sets the node's retry policy and execution timeout. A parallel node runs its items with the item node's config, so build rejects a non-default config for one.
Sets what the node does, for humans and for a model that may call it.
Sets an explicit schema that each input must match before the body runs.
Sets an explicit schema that each output value must match.
Sets a predicate that decides for each input whether a run asks the user to approve it, as the Boolean overload does for every input. It runs until the node has asked; from then on, the user's answer decides.
Sets whether each run first asks the user to approve it, which makes the node rerun on resume unless rerunOnResume is set; either overload replaces the other. An approved run reads the answer from Context.toolConfirmation, and a rejected one skips the body and outputs {"error": "This tool call is rejected."}, unchecked against O. A successor typed to a scalar or list then fails its input check and one typed to a record gets unset fields, so type it as Object to handle a rejection.
Sets whether a resume runs the node again rather than using the resuming answer. Unset, it is true when the node requires confirmation. A parallel node always reruns, so build rejects false for one.
Sets the state keys the node uses; keys containing a colon are not checked. Child nodes inherit it unless they declare their own.
Sets whether the node stays re-triggerable until it produces an output or a route.