import type { Flow } from '../../types/flow.js'; import type { FlowDefinition } from './types.js'; /** Consecutive eligible nodes in one batched run. Longer chains split. */ export declare const MAX_SEGMENT_LENGTH = 8; /** Maximal chains per flow. Further eligible runs stay on the per-node path. */ export declare const MAX_SEGMENTS = 32; export type SegmentKind = 'generate-replies' | 'actions'; export interface FlowSegment { readonly nodeIds: readonly string[]; readonly kind: SegmentKind; } /** Pure graph analysis. Keys every node that starts a remaining run of length ≥ 2. */ export declare function computeFlowSegments(def: FlowDefinition): ReadonlyMap; /** * Segments for a live Flow. Rehydrated flows hash their stash; code-authored * flows cannot prove unconditional `next` without running closures, so they * get an empty map (per-node path). Computed once per Flow object. */ export declare function segmentsForLiveFlow(flow: Flow): ReadonlyMap; export declare function segmentStartingAt(flow: Flow, nodeId: string): FlowSegment | undefined;