import type { AgentConfig } from '../types/agentConfig.js'; import type { ChannelDriver } from '../types/channel.js'; import type { RunContext } from '../types/run-context.js'; import type { PersistedFlowPark, RunState } from '../runtime/durable/types.js'; import type { NormalizedTransition } from './normalizeTransition.js'; import { selectHostTarget } from '../runtime/select.js'; export declare const MAX_FLOW_PARK_DEPTH = 8; /** Runaway nested flow entry. The structural twin of `FlowOscillationError`, and degraded * the same way — a bounded limit the framework absorbs, not a crash the caller handles. */ export declare class FlowParkOverflowError extends Error { constructor(depth: number); } export type FlowPark = PersistedFlowPark; export declare function pushFlowPark(run: RunState, park: FlowPark): void; export declare function popFlowPark(run: RunState): FlowPark | undefined; export declare function getFlowPark(run: RunState): FlowPark | undefined; export declare function looksLikeOffScriptQuestion(input: string): boolean; export interface CollectDigressionOptions { agent: AgentConfig; node: { id: string; }; activeFlowName: string; run: RunState; driver: ChannelDriver; ctx: RunContext; select?: typeof selectHostTarget; } export type CollectDigressionResult = { kind: 'transition'; transition: NormalizedTransition; } | { kind: 'answeredThenResume'; } | { kind: 'none'; }; export declare function runCollectDigression(options: CollectDigressionOptions): Promise;