import type { ChildTaskOwnershipMode, ThreadId, Turn, TurnId } from "@best-agent/protocol";
import type { AgentProfile } from "../agent/profile-registry.js";
import type { ConversationMessage } from "../provider/model-provider.js";
export type CoordinatorWorkerHandoff = {
    activePaths?: string[];
    evidence?: Array<{
        evidenceId: string;
        kind: string;
        relatedFilePaths?: string[];
        summary: string;
    }>;
    lastError?: string;
    latestToolOutcomes?: string[];
    latestVerification?: {
        status?: string;
        summary: string;
    };
};
export type CoordinatorWorkerResult = {
    childThreadId: ThreadId;
    handoff?: CoordinatorWorkerHandoff;
    message?: string;
    objective: string;
    output?: string;
    profileName: string;
    status: "completed" | "failed";
    workerId: string;
};
type CoordinatorExecutorDeps = {
    cleanupScratchRun(threadId: ThreadId, workflowRunId: string): Promise<void>;
    createScratchRun(threadId: ThreadId): {
        scratchDir: string;
        workflowRunId: string;
    };
    defaultOwnershipModeForProfile(profile: AgentProfile): ChildTaskOwnershipMode;
    emitCoordinatorComplete(input: {
        outcome: "success" | "failed" | "partial";
        threadId: ThreadId;
        totalIterations: number;
        totalWorkers: number;
        turnId: TurnId;
        workflowRunId: string;
    }): void;
    emitCoordinatorPlan(input: {
        plannedIterations: number;
        threadId: ThreadId;
        turnId: TurnId;
        workerCount: number;
        workflowRunId: string;
    }): void;
    emitCoordinatorSynthesize(input: {
        decision: "complete" | "iterate";
        iteration: number;
        threadId: ThreadId;
        totalWorkers: number;
        turnId: TurnId;
        workflowRunId: string;
    }): void;
    executeCoordinatorModelTurn(input: {
        activeSkillIds: string[];
        extraMessages: ConversationMessage[];
        hostProfile: AgentProfile;
        phaseInstruction: string;
        profile: AgentProfile;
        turn: Turn;
    }): Promise<string>;
    executeWorker(input: {
        activeSkillIds: string[];
        hostProfile: AgentProfile;
        iteration: number;
        ownedPaths?: string[];
        ownershipMode: ChildTaskOwnershipMode;
        profile: AgentProfile;
        scratchDir: string;
        turn: Turn;
        workerId: string;
        workflowRunId: string;
        workerObjective: string;
    }): Promise<CoordinatorWorkerResult>;
    resolveProfile(profileName: string): AgentProfile | undefined;
};
export declare class CoordinatorExecutor {
    #private;
    constructor(deps: CoordinatorExecutorDeps);
    execute(input: {
        activeSkillIds: string[];
        hostProfile: AgentProfile;
        prompt: string;
        turn: Turn;
    }): Promise<string>;
}
export {};
//# sourceMappingURL=coordinator-executor.d.ts.map