feat(tools): propagate timeout abort signals to tool execution

This commit is contained in:
William Valentin
2026-02-15 22:05:43 -08:00
parent 0220ec10dd
commit 2cdfb66071
10 changed files with 113 additions and 18 deletions
+6 -2
View File
@@ -57,8 +57,12 @@ export interface Tool {
/** Secret scopes required to execute this tool (optional). */
requiredSecretScopes?: string[];
/** Async function that executes the tool. */
execute: (args: unknown) => Promise<ToolResult>;
/** Optional execution context (abort signal, runtime metadata). */
execute: (args: unknown, context?: ToolExecutionContext) => Promise<ToolResult>;
}
export interface ToolExecutionContext {
signal?: AbortSignal;
}
```