import type { WorkflowDefinition } from "./types"; import type { CompletionContext } from "./completion"; /** * An action the engine wants the caller to take. */ export interface EngineAction { type: "inject_prompt" | "switch_agent" | "pause" | "complete" | "none"; /** Context-threaded prompt to inject */ prompt?: string; /** Agent to switch to for the next step */ agent?: string; reason?: string; } /** * Start a new workflow instance from a definition and goal. * Creates the instance, sets it as active, and returns the first step's prompt. */ export declare function startWorkflow(input: { definition: WorkflowDefinition; definitionPath: string; goal: string; sessionId: string; directory: string; }): EngineAction; /** * Check the current step's completion and advance if complete. * This is called on session.idle events. */ export declare function checkAndAdvance(input: { directory: string; context: CompletionContext; }): EngineAction; /** * Pause the active workflow instance. */ export declare function pauseWorkflow(directory: string, reason?: string): boolean; /** * Resume a paused workflow instance. * Returns the current step's context-threaded prompt. */ export declare function resumeWorkflow(directory: string): EngineAction; /** * Skip the current step and advance to the next. */ export declare function skipStep(directory: string): EngineAction; /** * Abort the active workflow instance. */ export declare function abortWorkflow(directory: string): boolean;