/**
 * AdaptOrch-style topology router — pure TS, no IO, no python dependency.
 *
 * Extracts 5 structural features from a DAG and selects an execution topology
 * using threshold-based rules matching the AdaptOrch TopologyRouter spec.
 */
export type DagTopology = "singleton" | "parallel" | "pipeline" | "map_reduce" | "hierarchical" | "dag" | "hybrid";
export interface TopologyFeatures {
    nodeCount: number;
    edgeCount: number;
    width: number;
    criticalDepth: number;
    couplingDensity: number;
    parallelRatio: number;
}
export interface TopologyDecision {
    topology: DagTopology;
    reason: string;
    features: TopologyFeatures;
    waves: string[][];
}
export interface TopologyThresholds {
    /** θ_ω — parallel ratio threshold (default 0.5) */
    parallelRatio: number;
    /** θ_γ — coupling density considered "high" (default 0.6) */
    highCoupling: number;
    /** θ_δ — node count threshold for hierarchical (default 5) */
    hierarchicalSubtasks: number;
}
/**
 * Returns `true` unless OMK_ADAPTORCH_ROUTING is explicitly off/0/false.
 */
export declare function isAdaptorchRoutingEnabled(env?: Record<string, string | undefined>): boolean;
/**
 * Compute structural features of a DAG via Kahn topological sort.
 * Returns layers (waves) and derived metrics.  If a cycle is detected,
 * all nodes collapse into a single wave.
 */
export declare function computeTopologyFeatures(nodes: string[], edges: Array<{
    from: string;
    to: string;
}>): TopologyFeatures & {
    layers: string[][];
};
/**
 * Select a topology and emit layered execution waves.
 *
 * Selection rules (in priority order):
 *   0 nodes       → singleton
 *   1 node        → singleton
 *   high coupling → dag (if depth==1) or hierarchical (if depth>1)
 *   parallelRatio ≥ θ_ω and nodes > 1 → parallel / map_reduce
 *   criticalDepth == nodes → pipeline
 *   otherwise     → hybrid
 */
export declare function routeTopology(nodeIds: string[], edges: Array<{
    from: string;
    to: string;
}>, thresholds?: Partial<TopologyThresholds>): TopologyDecision;
