requireConfirmation

fun requireConfirmation(requireConfirmation: Boolean): FunctionNode.Builder<I, O>

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 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.