/**
 * Switchboard public surface:
 * - WP-01: contracts + path helpers
 * - WP-02: AtomicFile + file-native stores / mailbox
 * - WP-03: Host Registry + InMemory / Legacy SDK adapters (off by default)
 * - WP-04: CursorHostAdapter + event/failure mappers (off by default)
 * - WP-05: Shadow WorkerIdentity / WorkerBinding services (off|shadow; no Active)
 * - WP-06: Shadow Doorbell/Run/Event recorder (off|shadow; no Active / no second send)
 * - WP-07: WorkAdmissionPolicy + LegacyOpenDevTeamAdmissionPolicy (no Active wiring)
 * - WP-08: HostSwitchboard + FactToDoorbellBridge (default off; Active needs Gate B)
 * - WP-09: RunCoordinator + RunCompatibilityFacade (Host Session ≠ Run)
 * - WP-10: Worker registerIdentity → ensureBinding; platform id ≠ worker id
 * - production TaskDispatcher path unchanged until Gate B approve_active
 */

export * from "./contracts/index.ts";
export {
  SwitchboardPaths,
  SwitchboardPathError,
  sanitizePathSegment,
  type MailboxBucket,
  type RunBucket,
  type SwitchboardPathsOptions,
} from "./paths/SwitchboardPaths.ts";
export {
  AtomicFile,
  AtomicFileError,
  SwitchboardVersionStore,
  SWITCHBOARD_LAYOUT_VERSION,
  WorkerBindingStore,
  DoorbellMailbox,
  RunStore,
  HostClaimStore,
  type SwitchboardVersionRecord,
  type EnqueueResult,
  type HostClaimRecord,
} from "./store/index.ts";
export {
  AgentHostRegistry,
  AgentHostRegistryError,
  InMemoryHostAdapter,
  LegacySdkHostAdapter,
  CursorHostAdapter,
  DoubaoHostAdapter,
  CodexCliHostAdapter,
  CURSOR_HOST_CAPABILITIES,
  DOUBAO_HOST_CAPABILITIES,
  CODEX_CLI_HOST_CAPABILITIES,
  IN_MEMORY_HOST_CAPABILITIES,
  LEGACY_SDK_HOST_CAPABILITIES,
  capabilityLevelMeets,
  mapCursorSdkMessageType,
  mapCursorRuntimeEventTypeToHostType,
  mapCursorRuntimeEventToHostEnvelope,
  classifyCursorHostFailure,
  mapCursorFailureCategoryToHostKind,
  isCursorHostFailureRetryable,
  type AgentHostRegistryOptions,
  type InMemoryHostAdapterOptions,
  type LegacySdkHostAdapterOptions,
  type CursorHostAdapterOptions,
  type DoubaoHostAdapterOptions,
  type CodexCliHostAdapterOptions,
  type CursorHostEventMapInput,
} from "./hosts/index.ts";
export {
  WorkerIdentityService,
  mapAgentToWorker,
  WORKER_IDENTITY_SCHEMA,
  WorkerBindingService,
  SHADOW_EXTERNAL_SESSION_PREFIX,
  isShadowExternalSessionId,
  makeShadowExternalSessionId,
  WorkerRegistrationCompat,
  type WorkerIdentityRecord,
  type WorkerIdentityServiceOptions,
  type AgentLike,
  type WorkerBindingServiceOptions,
  type ShadowSwitchboardMode,
  type ShadowBindInput,
  type ShadowBindResult,
  type EnsureBindingResult,
  type CompatibleRegisterResult,
  type WorkerRegistrationCompatOptions,
} from "./binding/index.ts";
export {
  ShadowDispatchRecorder,
  writeShadowAlignmentReport,
  SHADOW_EVIDENCE_SCHEMA,
  SHADOW_ALIGNMENT_SCHEMA,
  type LegacyDispatchFact,
  type ShadowEvidenceRecord,
  type AlignmentRow,
  type AlignmentLedger,
  type ShadowRecordResult,
  type ShadowDispatchRecorderOptions,
} from "./shadow/index.ts";
export {
  LegacyOpenDevTeamAdmissionPolicy,
  evaluateLegacyOpenDevTeamGates,
  evaluateLegacyDispatcherSlice,
  mapLegacyGateVerdictToAdmission,
  type WorkAdmissionDecision,
  type WorkAdmissionDecisionKind,
  type WorkAdmissionInput,
  type WorkAdmissionPolicy,
  type LegacyOpenDevTeamAdmissionInput,
  type LegacyOpenDevTeamGateVerdict,
  type LegacyGateStage,
  type LegacyProductGateSnapshot,
  type LegacyDependencyGateSnapshot,
} from "./policy/index.ts";
export {
  assertActiveAuthorized,
  isHostSendAllowed,
  SwitchboardModeError,
  type SwitchboardDispatchMode,
  type ActiveAuthorization,
} from "./SwitchboardDispatchMode.ts";
export {
  DualDeliveryGuard,
  type DualDeliveryGuardOptions,
  type DeliveryPath,
} from "./DualDeliveryGuard.ts";
export {
  FactToDoorbellBridge,
  type AdmissibleWorkFact,
  type FactToDoorbellBridgeOptions,
  type BridgeEnqueueResult,
} from "./FactToDoorbellBridge.ts";
export {
  HostSwitchboard,
  type HostSwitchboardOptions,
  type WakeWorkerInput,
  type WakeWorkerResult,
} from "./HostSwitchboard.ts";
export {
  RunCoordinator,
  hostSessionKey,
  RunCompatibilityFacade,
  SESSION_PROJECTION_SCHEMA,
  type BeginRunInput,
  type BeginRunResult,
  type RunEvidenceEvent,
  type HostSessionRunIndexEntry,
  type RunCoordinatorOptions,
  type LegacySessionProjection,
  type RunCompatibilityFacadeOptions,
} from "./runs/index.ts";
