/**
 * Agent Delegation Tool
 *
 * Allows the LLM to delegate tasks to specialized subagents.
 * This tool is the bridge between the main conversation and subagent execution.
 * Supports parallel execution of multiple agents via unique agentId tracking.
 */
import type { SubagentExecutor } from '../subagents/subagent-executor.js';
import type { NanocoderToolExport } from '../types/index.js';
export interface AgentToolArgs {
    subagent_type: string;
    description: string;
    prompt?: string;
    context?: Record<string, unknown>;
}
/**
 * Set the subagent executor instance.
 * Called during app initialization.
 */
export declare function setAgentToolExecutor(executor: SubagentExecutor): void;
/**
 * Update the agent tool's knowledge of available subagents.
 * Call after subagent loader initializes or reloads.
 */
export declare function setAvailableAgentNames(agents: Array<{
    name: string;
    description: string;
}>): void;
/**
 * Start agent execution and return a promise with a unique agent ID.
 * Like executeBashCommand — starts immediately, doesn't block the caller.
 *
 * @param args - Agent tool arguments
 * @param signal - Optional abort signal for cancellation
 * @returns Object with unique agentId and promise that resolves with the result
 */
export declare function startAgentExecution(args: AgentToolArgs, signal?: AbortSignal): {
    agentId: string;
    promise: Promise<{
        content: string;
        success: boolean;
        error?: string;
    }>;
};
export declare const agentTool: NanocoderToolExport;
//# sourceMappingURL=agent-tool.d.ts.map