import { type CommandStep, type StepResult } from './CommandStep.js'; export interface StepRunnerCallbacks { /** Called before each step runs. Use for UI (start spinner, set checklist IN_PROGRESS). */ onBeforeStep?: (step: CommandStep, context: T) => void; /** Called after each step runs. Return `true` to stop executing further steps. */ onAfterStep?: (step: CommandStep, result: StepResult, context: T) => boolean; /** Called when shouldRun() returns false. */ onSkippedStep?: (step: CommandStep, context: T) => void; } export interface StepRunnerResult { results: StepResult[]; /** True if all steps completed (none stopped early). */ completed: boolean; /** The result that triggered early stop, if any. */ stoppedAt?: { step: string; result: StepResult; }; } export declare function runSteps(steps: CommandStep[], context: T, callbacks?: StepRunnerCallbacks): Promise;