/**
 * Engine barrel exports.
 *
 * Re-exports everything from the engine submodules.
 */

// Dependencies and types
export type {
  IWorkflowPlatform,
  IWorkflowStore,
  IAgentProvider,
  WorkflowDeps,
  WorkflowConfig,
  ProviderConfig,
  CommandFolderConfig,
  CreateWorkflowRunData,
  WorkflowEvent,
} from './deps.js';

// DAG executor
export {
  buildTopologicalLayers,
  checkTriggerRule,
  executeNodeInternal,
  executeScriptNode,
  handleApprovalNode,
  handleLoopNode,
  executeDagWorkflow,
} from './dag-executor.js';
export type { DagWorkflowResult } from './dag-executor.js';

// Top-level executor
export {
  executeWorkflow,
  hydrateResumableRun,
  resolveProjectPaths,
} from './executor.js';
export type {
  WorkflowExecutionOptions,
  WorkflowExecutionResult,
  HydratedResumableRun,
  ProjectPaths,
} from './executor.js';

// Utilities
export {
  substituteWorkflowVariables,
  substituteNodeOutputRefs,
  buildPromptWithContext,
  evaluateCondition,
  classifyError,
  safeSendMessage,
  formatSubprocessFailure,
  sleep,
  retryWithBackoff,
  resolveNodeOutputField,
  OutputRefError,
  DagCycleError,
  NodeTimeoutError,
  ApprovalRejectedError,
  LoopMaxIterationsError,
} from './utils.js';
export type { ErrorCategory } from './utils.js';