/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ToolCallRequestInfo } from '../index.js'; import { type Config } from '../config/config.js'; import { type CompletedToolCall } from './coreToolScheduler.js'; /** * Configuration subset required for non-interactive tool execution. * Uses the scheduler singleton via getOrCreateScheduler/disposeScheduler. */ export type ToolExecutionConfig = Pick & Partial>; /** * Executes a single tool call non-interactively by leveraging the CoreToolScheduler singleton. * * This wrapper: * 1. Uses the scheduler singleton (via config.getOrCreateScheduler) with interactiveMode: false * 2. Schedules the tool call * 3. Returns the completed result * * Non-interactive mode means: * - The scheduler uses toolContextInteractiveMode: false so tools know they're non-interactive * - No live output updates are provided * * Benefits of using the singleton scheduler: * - Avoids MessageBus subscription spam from repeated scheduler creation * - Proper refcount-based lifecycle management * - Consistent tool governance path with interactive mode * * Note: Emoji filtering is handled by the individual tools (edit.ts, write-file.ts) * so it is not duplicated here. */ export declare function executeToolCall(config: ToolExecutionConfig, toolCallRequest: ToolCallRequestInfo, abortSignal?: AbortSignal): Promise;