/**
 * Pure derivation functions for workflow execution overlays.
 *
 * These functions compute edge execution states and fork progress
 * from the graph topology and flat task status map — no React
 * dependency, no side effects, independently importable (DD-003).
 *
 * @since T06 (Branch and Parallel Execution Highlighting)
 */
import type { JsonObject } from "@bufbuild/protobuf";
import type { WorkflowGraphEdge, WorkflowGraphNode } from "../workflow-graph-model";
import type { DerivedTaskState } from "../../internal/store/workflow-execution-event-store";
/**
 * Execution state of a single edge in the workflow graph.
 *
 * - `taken`       — execution traversed this edge (source done, target done/failed)
 * - `not_taken`   — a sibling branch was selected instead (source is a completed
 *                    branching node, target is not_reached, but another branch target ran)
 * - `active`      — execution is flowing through this edge right now
 *                    (source done, target currently running)
 * - `not_reached` — execution hasn't reached this edge yet
 */
export type EdgeExecutionState = "taken" | "not_taken" | "active" | "not_reached";
/** Fork progress derived from branch config + flat task status map. */
export interface ForkProgress {
    readonly completed: number;
    readonly total: number;
    readonly compete: boolean;
}
/**
 * Computes execution state for every edge in the workflow graph.
 *
 * Algorithm:
 * 1. Resolve each node's execution status from the flat task state map.
 * 2. Identify branching nodes (nodes with at least one outgoing edge
 *    that carries a `sourceHandle` — switch_case, human_input).
 * 3. For branching nodes, determine whether sibling branches exist
 *    with non-`not_reached` targets to distinguish `not_taken` from
 *    mere `not_reached`.
 * 4. Assign each edge one of: taken, not_taken, active, not_reached.
 */
export declare function deriveEdgeExecutionStates(edges: readonly WorkflowGraphEdge[], nodes: readonly WorkflowGraphNode[], taskStates: ReadonlyMap<string, DerivedTaskState>): ReadonlyMap<string, EdgeExecutionState>;
/**
 * Computes fork branch completion progress from the fork node's config
 * and the flat task status map.
 *
 * Returns `null` when the config doesn't contain parseable branch data
 * (missing `branches`, empty array, or unrecognizable structure).
 */
export declare function deriveForkProgress(forkConfig: JsonObject, taskStates: ReadonlyMap<string, DerivedTaskState>): ForkProgress | null;
//# sourceMappingURL=derive-execution-overlays.d.ts.map