/** Reading a run's node graph: what a node's runtime record is, what feeds it, * which of its edges have fired, which of its nodes can still be reached, and * which sessions upstream of it are still readable. */ import type { WorkflowNodeRunRecord, WorkflowRunDetail } from "./runtime.js"; export declare function nodeRun(run: WorkflowRunDetail, nodeId: string): WorkflowNodeRunRecord; export declare function incoming(run: WorkflowRunDetail, nodeId: string): { id: string; from: { nodeId: string; port: string; }; to: { nodeId: string; port: "input"; }; }[]; /** Every completed ancestor of `nodeId`, with the session that produced it when * there is one — the transcripts a phase is allowed to read for context. */ export declare function upstreamSessions(run: WorkflowRunDetail, nodeId: string): Array<{ nodeId: string; sessionId?: string; }>; export declare function terminalNode(node: WorkflowNodeRunRecord): boolean; /** Whether an edge has fired: its source is done, and the port it leaves by is the * one that source chose. Only a routing node chooses; everything else leaves by * `success`, and a failed employee leaves by `error` if anything is wired there. */ export declare function edgeActivated(run: WorkflowRunDetail, edge: WorkflowRunDetail["definition"]["edges"][number]): boolean; export declare function canNeverActivate(run: WorkflowRunDetail, nodeId: string): boolean; export declare function mergeReady(run: WorkflowRunDetail, nodeId: string): boolean; //# sourceMappingURL=run-graph.d.ts.map