import React from 'react';
import type { ConversationStateManager } from '../../../app/utils/conversation-state.js';
import type { ToolManager } from '../../../tools/tool-manager.js';
import type { ToolCall, ToolResult } from '../../../types/core.js';
import { type StreamingBashRun } from '../../../utils/streaming-bash-tool.js';
/** Display + conversation-state options shared by every executed tool. */
export interface ToolDisplayOptions {
    compactDisplay?: boolean;
    onCompactToolCount?: (toolName: string) => void;
    onLiveTaskUpdate?: () => void;
    nonInteractiveMode?: boolean;
}
/**
 * Execute a single already-approved tool call. execute_bash streams through the
 * live BashProgress when a live area is available; everything else runs through
 * the validated registry handler. The single per-tool execution primitive
 * shared by the auto-execute batch and the (post-approval) confirmation path.
 */
export declare const executeApprovedTool: (toolCall: ToolCall, toolManager: ToolManager | null, processToolUse: (toolCall: ToolCall) => Promise<ToolResult>, setLiveComponent?: (component: React.ReactNode) => void, signal?: AbortSignal) => Promise<StreamingBashRun>;
/**
 * Render one executed tool's result and fold it into conversation state. The
 * single display primitive shared by both execution paths, so compact-tally,
 * expanded-bash, live-task, and non-interactive rendering behave identically
 * regardless of whether the tool was auto-executed or user-approved.
 */
export declare const displayExecutedTool: (execution: StreamingBashRun, toolManager: ToolManager | null, addToChatQueue: (component: React.ReactNode) => void, conversationStateManager: React.MutableRefObject<ConversationStateManager>, options?: ToolDisplayOptions) => Promise<void>;
/**
 * Executes tools directly without confirmation.
 * Read-only tools and agent tools in consecutive groups are executed in parallel.
 * Other tools are executed sequentially to preserve ordering.
 * Results are displayed in the original input order.
 *
 * @returns Array of tool results from executed tools
 */
export declare const executeToolsDirectly: (toolsToExecuteDirectly: ToolCall[], toolManager: ToolManager | null, conversationStateManager: React.MutableRefObject<ConversationStateManager>, addToChatQueue: (component: React.ReactNode) => void, options?: {
    compactDisplay?: boolean;
    onCompactToolCount?: (toolName: string) => void;
    onLiveTaskUpdate?: () => void;
    setLiveComponent?: (component: React.ReactNode) => void;
    /**
     * When true, compact tool results push a one-liner directly to the
     * static chat queue instead of into the live-tally accumulator
     * (which nothing renders in run mode). Keeps tool activity in
     * chronological order for stdout.
     */
    nonInteractiveMode?: boolean;
    /**
     * Parent turn's abort signal. Threaded into agent batches so a user
     * cancel (escape) propagates into running subagents.
     */
    signal?: AbortSignal;
}) => Promise<ToolResult[]>;
//# sourceMappingURL=tool-executor.d.ts.map