import type { RunTokenUsage } from '../run-record';
import type { WorkflowTraceEvent } from './types';
export interface WorkflowPhaseGraphNode {
    id: string;
    title: string;
    startedAt?: number;
    endedAt?: number;
    eventCount: number;
    branchCount: number;
    failedBranchCount: number;
    agentCalls: number;
    loopCalls: number;
    verifierCalls: number;
    analystCalls: number;
    reviewerCalls: number;
    agentFailures: number;
    loopFailures: number;
    verifierFailures: number;
    analystFailures: number;
    reviewerFailures: number;
    costUsd: number;
    tokenUsage: RunTokenUsage;
}
export interface WorkflowPhaseGraphBranch {
    id: string;
    operation: string;
    branchIndex: number;
    phase: string | null;
    status: 'started' | 'ended' | 'failed';
    startedAt?: number;
    endedAt?: number;
    durationMs?: number;
    stageCount?: number;
    stageIndex?: number;
    message?: string;
    code?: string;
}
export interface WorkflowPhaseGraph {
    nodes: WorkflowPhaseGraphNode[];
    branches: WorkflowPhaseGraphBranch[];
}
export declare function workflowPhaseGraph(events: readonly WorkflowTraceEvent[]): WorkflowPhaseGraph;
//# sourceMappingURL=phase-graph.d.ts.map