Skip to main content

BaseToolInvocation

@codebolt/codeboltjs


Abstract Class: BaseToolInvocation<TParams, TResult>

Defined in: packages/codeboltjs/src/tools/base-tool.ts:33

A convenience base class for ToolInvocation

Type Parameters

Type Parameter
TParams extends object
TResult extends ToolFrameworkResult

Implements

Constructors

Constructor

new BaseToolInvocation<TParams, TResult>(params: TParams): BaseToolInvocation<TParams, TResult>;

Defined in: packages/codeboltjs/src/tools/base-tool.ts:37

Parameters

ParameterType
paramsTParams

Returns

BaseToolInvocation<TParams, TResult>

Properties

PropertyModifierTypeDescriptionDefined in
paramsreadonlyTParamsThe validated parameters for this specific invocationpackages/codeboltjs/src/tools/base-tool.ts:37

Methods

execute()

abstract execute(signal: AbortSignal, updateOutput?: (output: string) => void): Promise<TResult>;

Defined in: packages/codeboltjs/src/tools/base-tool.ts:49

Executes the tool with the validated parameters

Parameters

ParameterType
signalAbortSignal
updateOutput?(output: string) => void

Returns

Promise<TResult>

Implementation of

ToolInvocation.execute


shouldConfirmExecute()

shouldConfirmExecute(_abortSignal: AbortSignal): Promise<
| false
| ToolCallConfirmationDetails>;

Defined in: packages/codeboltjs/src/tools/base-tool.ts:43

Determines if the tool should prompt for confirmation before execution

Parameters

ParameterType
_abortSignalAbortSignal

Returns

Promise< | false | ToolCallConfirmationDetails>

Implementation of

ToolInvocation.shouldConfirmExecute


toolLocations()

toolLocations(): ToolLocation[];

Defined in: packages/codeboltjs/src/tools/base-tool.ts:39

Determines what file system paths the tool will affect

Returns

ToolLocation[]

Implementation of

ToolInvocation.toolLocations