import { type Item, type ThreadEvidenceRecord, type TurnId, type WorkflowPhaseName, type WorkflowName } from "@best-agent/protocol";
export type WorkflowJoinContext = {
    phaseName: WorkflowPhaseName;
    text: string;
    type: "evidence" | "handoff" | "output";
    workflowName: WorkflowName;
};
export type WorkflowJoinedPhaseContext = {
    text: string;
    type: "evidence" | "handoff" | "output";
};
export type WorkflowPhaseResults = {
    build?: string;
    explore?: string;
    plan?: string;
    verify?: string;
};
export declare function resolveWorkflowJoinContext(record: ThreadEvidenceRecord, options?: {
    fallbackToSummary?: boolean;
}): WorkflowJoinContext | undefined;
export declare function buildWorkflowJoinedPhaseContexts(joinedEvidence: ThreadEvidenceRecord[], workflowName: WorkflowName): Map<WorkflowPhaseName, WorkflowJoinedPhaseContext>;
export declare function buildWorkflowPhaseOutputTexts(joinedContexts: Map<WorkflowPhaseName, WorkflowJoinedPhaseContext>): Map<WorkflowPhaseName, string>;
export declare function renderWorkflowJoinedPhaseMessage(phaseName: WorkflowPhaseName, joinedContext: WorkflowJoinedPhaseContext): string;
export declare function extractWorkflowPhaseResultsFromEvidence(joinedEvidence: ThreadEvidenceRecord[], options?: {
    allowedPhaseNames?: ReadonlySet<WorkflowPhaseName>;
    fallbackToSummary?: boolean;
    latestWorkflowTurnId?: TurnId;
    workflowName?: WorkflowName;
}): {
    phaseResults: WorkflowPhaseResults;
    workflowName?: WorkflowName;
};
export declare function mergeWorkflowPhaseResultsFromReasoningItems(items: Item[], phaseResults: WorkflowPhaseResults, options?: {
    latestWorkflowTurnId?: TurnId;
}): WorkflowPhaseResults;
//# sourceMappingURL=workflow-join.d.ts.map