/** * Flow process runner (fork-only). * * Spawns isolated pi processes with forked session context * and streams results back via callbacks. */ import type { AgentToolResult } from "@earendil-works/pi-agent-core"; import { type FlowConfig } from "./agents.js"; import { type SingleResult, type FlowDetails } from "../types/flow.js"; import { type CompressionStats } from "../core2/snapshot.js"; import { type Complexity } from "./complexity.js"; import type { GoalContext } from "./types.js"; export { cleanupStaleDumps } from "./dump-io.js"; export { terminateAllChildGroups } from "./process-lifecycle.js"; export { buildFlowArgs, getOptimizedTools } from "./flow-args.js"; type FlowUpdateCallback = (partial: AgentToolResult) => void; export interface RunFlowOptions { cwd: string; flows: FlowConfig[]; flowName: string; intent: string; aim: string; acceptance?: string; concern?: string; taskCwd?: string; forkSessionSnapshotJsonl: string | null; parentDepth: number; parentFlowStack: string[]; maxDepth: number; preventCycles: boolean; toolOptimize?: boolean; structuredOutput?: boolean; model?: string; signal?: AbortSignal; toolCallId?: string; onUpdate?: FlowUpdateCallback; makeDetails: (results: SingleResult[]) => FlowDetails; complexity?: Complexity; goalContext?: GoalContext; maxContextTokens?: number; tools?: string[]; preDispatchResults?: string; debugMode?: boolean; compressionStats?: CompressionStats; } export declare function runFlow(opts: RunFlowOptions): Promise; export declare function mapFlowConcurrent(items: TIn[], concurrency: number, fn: (item: TIn, index: number) => Promise): Promise; //# sourceMappingURL=runner.d.ts.map