Function: runToolGate()
ts
function runToolGate(
gate: ToolGateFn | undefined,
ctx: unknown,
tool: string,
args: unknown,
): Promise<void>;Defined in: src/batteries/tools/_shared/index.ts:288
Await a configured ToolGateFn (no-op when absent). Factory batteries call this at the top of their handlers so the gate runs before any side effect.
Parameters
| Parameter | Type | Description |
|---|---|---|
gate | ToolGateFn | undefined | The configured gate, if any. |
ctx | unknown | The dispatch context the handler received. |
tool | string | The tool name (post-override). |
args | unknown | The validated tool args. |
Returns
Promise<void>