feat(tools): propagate timeout abort signals to tool execution
This commit is contained in:
+6
-2
@@ -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;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user