/** * Runtime Cycles * * Enumerates ALL cycles in the runtime service graph using Tarjan's * strongly-connected-components algorithm. Runtime validation needs every cycle so each can be * checked against the per-cycle allowlist independently. * * This is the ONE SCC implementation in the package: `ProjectCycleDetector` (lib/graph-cycles.ts) * calls it for the COMPILE-TIME project graph, where it likewise enumerates every cycle rather than * stopping at the first. * * A cycle is any SCC with more than one node, or a single node with a self-edge. * Each cycle is keyed by its sorted, comma-joined node names so it can be * matched against an `allowedCycles` entry regardless of traversal order. */ export interface RuntimeCycle { /** Sorted service names participating in the cycle. */ services: string[]; /** Canonical key: services sorted then joined with ",". */ key: string; } /** Canonical key for a set of service names (order-independent). */ export declare function cycleKey(services: string[]): string; /** * Find every cycle in a directed graph via Tarjan's SCC algorithm. * `graph[node]` lists the nodes `node` points to. */ export declare function findRuntimeCycles(graph: Record): RuntimeCycle[];