import type { ProfileId } from '../profiles/index.js';
import type { WorkflowGateMode, WorkflowPhase } from '../types/index.js';
import { type ParsedTokenUsage, type SubAgentResponse } from './workflow-delegation.js';
import type { SupportedRuntime } from './workflow-executor.js';
import { type ClarificationHandler } from './clarification-relay.js';
export { getSpawnPoolStatus, setMaxConcurrentSpawns } from './spawn-pool.js';
export type OrchestratorCallbacks = {
    onPhaseStart: (phase: WorkflowPhase, profile: ProfileId) => void;
    onClarification: ClarificationHandler;
    onBlocked: (phase: WorkflowPhase, reason: string) => void;
    onDeliverable: (phase: WorkflowPhase, content: string, artifacts?: string[]) => void;
    onPhaseComplete: (phase: WorkflowPhase, response: SubAgentResponse) => void;
    onGatePause: (completedPhase: WorkflowPhase, nextPhase: WorkflowPhase) => void;
    onLog: (message: string) => void;
};
export type OrchestratorOptions = {
    cwd: string;
    taskId: string;
    runId: string;
    goal: string;
    phases: WorkflowPhase[];
    runtime: SupportedRuntime;
    gates: WorkflowGateMode;
    maxRetries?: number;
    maxPhaseMinutes?: number;
    maxConcurrentSpawns?: number;
    callbacks: OrchestratorCallbacks;
};
export type PhaseResult = {
    phase: WorkflowPhase;
    response: SubAgentResponse;
    exitCode: number;
    elapsedMs: number;
    tokenUsage?: ParsedTokenUsage;
};
export declare function runDelegatedWorkflow(options: OrchestratorOptions): Promise<PhaseResult[]>;
