/**
 * Agent Runtime Layer — Barrel Export
 *
 * PR-35：统一导出 Runtime Layer 所有公开 API。
 *
 * @module agent-runtime
 */

// Domain Model
export {
  TASK_STATE, STEP_STATE, PIPELINE_STAGE, RISK_LEVEL, CERTIFICATION_TIER, ARTIFACT_KIND, GATE_DECISION,
  createTask, createSubTask, createExecutionPlan, createExecutionStep,
  createExecutionResult, createArtifact, createRisk,
  createGateDecision, createCertificationResult, createObservation, createMetric, createTaskResult,
} from "./domain.mjs";

// State Machine
export {
  TASK_TRANSITIONS, STEP_TRANSITIONS, TERMINAL_STATES, CANCELLABLE_STATES,
  canTransition, transition, areStepDependenciesMet, getReadySteps,
  areTaskDependenciesMet, isCancellable, computeRecoveryStrategy, retryTask,
  getStepsSummary, isAllStepsDone, hasFailedSteps, isTerminal,
} from "./state-machine.mjs";

// Pipeline
export {
  executePipeline, recoverTask,
} from "./pipeline.mjs";

// Adapters
export {
  createChecklistAdapter, builtinChecklistAdapter,
  createBaselineAdapter, builtinBaselineAdapter,
  createGateAdapter, builtinGateAdapter, autoGateAdapter,
  createCertificationAdapter, createReportingAdapter, createArtifactAdapter,
  createRuntimeContext,
} from "./adapters.mjs";

// Artifact Registry
export {
  createArtifactRegistry,
} from "./artifact-registry.mjs";

// Reporting
export {
  generateRuntimeReport, generateTaskReport, generateQualityReport,
  generateCertificationReport, generateRiskReport,
} from "./reporting.mjs";
