DefaultToolExecutor
Default tool executor extracted from Runtime.wrapToolsWithEnforcement().
Handles:
- Enforcement checks via ToolEnforcer
- Idempotency key generation
- Context enrichment (experimental_context)
- Error propagation via HookRunner
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DefaultToolExecutor(config): DefaultToolExecutor;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”DefaultToolExecutor
Methods
Section titled “Methods”buildIdempotencyKey()
Section titled “buildIdempotencyKey()”buildIdempotencyKey(args): string;Build a deterministic idempotency key for external side-effect deduplication.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”ToolExecutor.buildIdempotencyKey
execute()
Section titled “execute()”execute(args): Promise<unknown>;Execute a single tool call with enforcement checks and context enrichment. Returns the tool’s result or throws if blocked/failed.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<unknown>