refactor(core): consolidate execute() arguments into ExecuteOptions (#25101)

This commit is contained in:
Michael Bleigh
2026-04-10 10:11:17 -07:00
committed by GitHub
parent 1d36309f5f
commit 3b7c17a22c
69 changed files with 849 additions and 527 deletions
@@ -11,7 +11,9 @@ import {
BaseToolInvocation,
Kind,
type ToolResult,
type ExecuteOptions,
} from './tools.js';
import { ToolErrorType } from './tool-error.js';
import type { MessageBus } from '../confirmation-bus/message-bus.js';
import type { AgentLoopContext } from '../config/agent-loop-context.js';
@@ -40,7 +42,7 @@ class ListBackgroundProcessesInvocation extends BaseToolInvocation<
return 'Lists all active and recently completed background processes for the current session.';
}
async execute(_signal: AbortSignal): Promise<ToolResult> {
async execute({ abortSignal: _signal }: ExecuteOptions): Promise<ToolResult> {
const processes = ShellExecutionService.listBackgroundProcesses(
this.context.config.getSessionId(),
);
@@ -128,7 +130,7 @@ class ReadBackgroundOutputInvocation extends BaseToolInvocation<
return `Reading output for background process ${this.params.pid}`;
}
async execute(_signal: AbortSignal): Promise<ToolResult> {
async execute({ abortSignal: _signal }: ExecuteOptions): Promise<ToolResult> {
const pid = this.params.pid;
if (this.params.delay_ms && this.params.delay_ms > 0) {