`require` 是一个用于加载 JavaScript 模块的函数。它接受一个模块的路径作为参数,然后将该模块的代码加载到当前脚本环境中。确认(Confirmation)

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.