import { Container } from "../utils/container.js"; import type { WorkflowRun } from "../workflow/types.js"; export declare class WorkflowManager { private runs; private abortControllers; private agentControllers; private container; private runStateStore; constructor(container: Container); private get stateStore(); private get backgroundTaskManager(); private get messageQueue(); private get subagentManager(); private get workdir(); private get sessionDir(); /** * Create a new workflow run from a script string or file path. * Persists the script to the session directory. */ createRun(script: string, args?: unknown, opts?: { budget?: number | null; resumeFromRunId?: string; }): Promise; /** * Start executing a workflow run in the background. * Returns immediately; the workflow runs asynchronously. */ startRun(runId: string, opts?: { retryAgentIndex?: number; }): Promise; /** * Resume a workflow run from its journal. */ resumeRun(runId: string): Promise; /** * Stop a running workflow. */ stopRun(runId: string): void; /** * Skip a specific agent in a running workflow. * Aborts the agent's controller and lets the workflow continue. */ skipAgent(runId: string, agentIndex: number): void; /** * Retry a specific agent by removing its journal entry and resuming. */ retryAgent(runId: string, agentIndex: number): Promise; /** * Kill a running workflow — aborts all agent controllers plus the run controller. */ killRun(runId: string): void; /** * List all workflow runs (includes in-memory and persisted). */ listRuns(): Promise; /** * Get a specific workflow run. */ getRun(runId: string): WorkflowRun | undefined; /** * Clean up all running workflows. */ cleanup(): void; }