import { l as AnyStateMachine } from "./spawn-D9jgw9pW.js"; import "./StateMachine-EDpYWy0i.js"; //#region src/internal/orchestration/types.d.ts /** Eager module: a pre-imported state machine. */ type EagerModule = AnyStateMachine; /** Lazy module: a function that dynamically imports a state machine. */ type LazyModule = () => Promise; /** A module entry in the registry — either eager (pre-loaded) or lazy (dynamically loaded). */ type ModuleEntry = EagerModule | LazyModule; /** * Registry mapping module keys to state machines. * Used by Flow (eager-only) — all entries are AnyStateMachine. */ type ModuleRegistry = { [key: string]: AnyStateMachine | undefined; }; /** * Extended registry supporting both eager and lazy module entries. * Used by Workflow — entries can be pre-loaded machines or dynamic import functions. */ type WorkflowModuleRegistry = { [key: string]: ModuleEntry | undefined; }; /** * Per-module config remapping for orchestrators. * * The backend's workflow-node `moduleConfiguration` shape doesn't always match * the shape a module's manager / state machine expects. A mapper converts the * raw node config into the module's `Config` type. Identity is the default * when no mapper is registered. * * Mapping is owned by core (not the UI layer) so that core-only consumers of * `createWorkflowManager` get correctly shaped configs without depending on * `@incodetech/web`. */ type ModuleConfigMapper = (raw: unknown) => unknown; type ModuleConfigMappers = Record; type RunChildModuleInput = { machine: AnyStateMachine | undefined; config: unknown; }; type RunChildModuleEvent = { type: 'MODULE_COMPLETE'; output?: unknown; } | { type: 'MODULE_ERROR'; error: unknown; }; //#endregion export { WorkflowModuleRegistry as a, RunChildModuleInput as i, ModuleRegistry as n, RunChildModuleEvent as r, ModuleConfigMappers as t };