Skip to content

Interface: ToolDriver<TNode, THandle> ​

Defined in: ports/tool-driver.ts:17

Runtime port for executing a ToolASTNode and optionally predicting its pre-flight ToolEffect list.

Tools with effectTracking === 'declared' implement describeEffects for pre-flight policy guard evaluation, whereas tools with effectTracking === 'subprocess-post-flight' omit describeEffects so the runtime enforces CheckpointableScope.diffEffects() post-flight verification.

Type Parameters ​

Type ParameterDefault typeDescription
TNode extends ToolASTNode<THandle>ToolASTNode<unknown>Concrete ToolASTNode subtype handled by this driver.
THandleunknownRuntime handle type of the active isolation scope.

Methods ​

describeEffects()? ​

ts
describeEffects?(
   node, 
   args, 
   scopeHandle
): 
  | readonly ToolEffect[]
| Promise<readonly ToolEffect[]>;

Defined in: ports/tool-driver.ts:32

Predicts the domain-agnostic ToolEffect descriptors that executing node with args will produce.

Invoked prior to tool execution so policy guards and scope lock managers can evaluate proposed effects pre-flight.

Parameters ​

ParameterTypeDescription
nodeTNodePassive tool AST node being invoked.
argsunknownValidated tool call arguments from the model.
scopeHandleTHandleActive isolation scope handle.

Returns ​

| readonly ToolEffect[] | Promise<readonly ToolEffect[]>

Predicted pre-flight tool effects.

Properties ​

PropertyModifierTypeDescriptionDefined in
executereadonlyNodeExecutor<TNode, unknown, ToolExecutionResult, StepExecutionContext<THandle>>Stateless executor that runs the tool against the active StepExecutionContext.ports/tool-driver.ts:39

Released under the MIT License.