import { validateAndGetAgentTemplate, executeSubagent } from './spawn-agent-utils';
import type { TrackEventFn } from '@levelcode/common/types/contracts/analytics';
import type { LevelCodeToolCall, LevelCodeToolOutput } from '@levelcode/common/tools/list';
import type { AgentTemplate } from '@levelcode/common/types/agent-template';
import type { Logger } from '@levelcode/common/types/contracts/logger';
import type { ParamsExcluding } from '@levelcode/common/types/function-params';
import type { PrintModeEvent } from '@levelcode/common/types/print-mode';
import type { AgentState } from '@levelcode/common/types/session-state';
import type { ToolSet } from 'ai';
export type SendSubagentChunk = (data: {
    userInputId: string;
    agentId: string;
    agentType: string;
    chunk: string;
    prompt?: string;
    forwardToPrompt?: boolean;
}) => void;
type ToolName = 'spawn_agents';
export declare const handleSpawnAgents: (params: {
    previousToolCallFinished: Promise<void>;
    toolCall: LevelCodeToolCall<ToolName>;
    agentState: AgentState;
    agentTemplate: AgentTemplate;
    fingerprintId: string;
    localAgentTemplates: Record<string, AgentTemplate>;
    logger: Logger;
    system: string;
    tools?: ToolSet;
    trackEvent: TrackEventFn;
    userId: string | undefined;
    userInputId: string;
    sendSubagentChunk: SendSubagentChunk;
    writeToClient: (chunk: string | PrintModeEvent) => void;
} & ParamsExcluding<typeof validateAndGetAgentTemplate, "agentTypeStr" | "parentAgentTemplate"> & ParamsExcluding<typeof executeSubagent, "userInputId" | "prompt" | "spawnParams" | "agentTemplate" | "parentAgentState" | "agentState" | "fingerprintId" | "isOnlyChild" | "parentSystemPrompt" | "parentTools" | "onResponseChunk">) => Promise<{
    output: LevelCodeToolOutput<ToolName>;
}>;
export {};
