import type { ConnectorHandle } from "@skaile/workspaces/connectors"; import type { FlowExecution } from "@skaile/workspaces/types"; import { FlowAdapter } from "./adapter.js"; import type { FlowDefinition } from "./engine/types.js"; import type { NodeExecutor } from "./node-executor.js"; import type { TurnStimulus } from "./prompt-fragments.js"; import type { SubpromptRunner } from "./subprompt-runner.js"; import type { InlineSubFlowRequest, InlineSubFlowResult, InlineSubFlowRunner } from "./sub-flow-runner.js"; /** Maximum number of flow identities allowed in one transient inline ancestry. */ export declare const INLINE_SUB_FLOW_MAX_DEPTH = 16; /** One agent turn driven by the already-materialized parent session. */ export interface InlineSubFlowAgentTurn { /** Child adapter whose agent nodes use the parent session's connector tools. */ adapter: FlowAdapter; /** Connected child handle. */ handle: ConnectorHandle; /** Child definition with its resolved parent-bound input applied. */ flow: FlowDefinition; /** Live child snapshot used to build the normal orchestrator prompt. */ execution: FlowExecution; /** Child-local stimulus that initiated this turn. */ stimulus: TurnStimulus; } /** Host dependencies for driving an inline child through the existing FlowAdapter lifecycle. */ export interface SessionInlineSubFlowRunnerOptions { /** Resolves a flow identity through the host's normal installed/manual/asset lookup. */ resolveFlow(flowId: string): FlowDefinition | Promise; /** Runs one child agent turn with the parent session's existing driver. */ driveAgentTurn(turn: InlineSubFlowAgentTurn): Promise; /** Reuses the materialized session workspace for deterministic child nodes. */ nodeExecutor?: NodeExecutor; /** Reuses the parent's isolated-driver seam for child subprompt nodes. */ subpromptRunner?: SubpromptRunner; } /** * Drives delegated flows once, inline, through child FlowAdapters in the current session. * * Child sessions are transient and keyed by their owning parent node. A parked/no-op child stays * connected in memory for the next parent stimulus, but no child snapshot is published or stored. */ export declare class SessionInlineSubFlowRunner implements InlineSubFlowRunner { private readonly options; private readonly sessions; constructor(options: SessionInlineSubFlowRunnerOptions); private sessionKey; private dispose; private cancel; private createSession; run(request: InlineSubFlowRequest): Promise; } //# sourceMappingURL=inline-sub-flow-host.d.ts.map