/**
 * Orchestration gather — collects task results by orchestrationId,
 * reads status.json and output files, supports filtering and cleanup.
 */
import type { SubagentRunRecord } from "../subagent-registry.js";
import type { OrchestrationMode, OrchestrationStatus, StatusJson, TaskStatus } from "./orchestration-types.js";
export type GatherParams = {
    orchestrationDir: string;
    orchestrationId: string;
    template?: string;
    label?: string;
    includeRunning?: boolean;
    cleanup?: boolean;
    maxInlineBytes?: number;
    runs: SubagentRunRecord[];
};
export type GatherTaskResult = {
    index: number;
    label: string;
    template?: string;
    status: TaskStatus;
    statusJson: StatusJson | null;
    files: Array<{
        name: string;
        content?: string;
        path: string;
        size: number;
    }>;
    resultText?: string;
    error?: string;
};
export type GatherResult = {
    orchestrationId: string;
    status: OrchestrationStatus;
    mode?: OrchestrationMode;
    startedAt?: number;
    completedAt?: number;
    taskCount: number;
    tasks: GatherTaskResult[];
    interrupted?: boolean;
    completedTasks?: number;
    incompleteTasks?: number;
    canResume?: boolean;
};
/**
 * Gather results for an orchestration by reading the manifest and task output
 * directories. Pure disk reads (no state mutation except cleanup).
 */
export declare function gatherOrchestrationResults(params: GatherParams): GatherResult;
