/** * Runner for the generate state machine * * Creates and runs the generate machine with proper setup. */ import { createActor } from 'xstate'; import type { StorageMode } from '../../constants.js'; import type { CliContext } from '../../context/types.js'; import type { MachineExecutionResult } from '../types.js'; import { generateMachine } from './machine.js'; import type { GenerateMachineContext } from './types.js'; /** * Cancel signal handler for graceful shutdown * * @param actor - The running actor to cancel */ export declare const setupCancelHandler: (actor: ReturnType>) => void; /** * Options for running the generate machine */ export interface RunGenerateOptions { /** CLI context */ context: CliContext; /** Mode passed as CLI argument */ modeArg?: StorageMode; /** Whether to resume from persisted state */ resume?: boolean; /** Enable debug logging */ debug?: boolean; /** Enable state persistence */ persist?: boolean; } /** * Run the generate state machine * * @param options - Options for running the machine * @returns Promise that resolves when the machine completes */ export declare const runGenerateMachine: (options: RunGenerateOptions) => Promise>;