/**
 * relay-web — public barrel (P6). Browser bundle served from the tenant subdomain. Imports
 * relay-contracts read-only; never touches base `public/` or `src/`. See docs/PLAN_RELAY_FRONTEND.md.
 */

// Errors + runtime config (T1)
export * from './errors'
export { readConfig, type RelayWebConfig } from './config'

// Control-plane API client + schemas (T2)
export { createApiClient, type ApiClient, type ApiClientV08 } from './api-client'
export * from './api-schemas'

// v0.8 password gate (T3)
export { mountPasswordLogin, type PasswordLogin } from './login-password'

// Phase-1 STAGING operator login (mint → §4.3 token) + browser DPoP PoP (B6)
export {
  mountStagingLogin,
  type StagingLogin,
  type StagingLoginDeps,
  type StagingSession,
} from './login-staging'
export {
  createDpopKey,
  encodeDpopSubprotocol,
  extractDpopFromSubprotocols,
  htuFor,
  DPOP_HTM,
  DPOP_SUBPROTOCOL_PREFIX,
  type DpopKey,
  type DpopDeps,
} from './dpop'

// Terminal view + transport seam (T4)
export {
  createPassthroughTransport,
  type TerminalTransport,
  type PassthroughOpts,
  type WebSocketLike,
  type WebSocketCtor,
} from './ws-transport'
export { mountTerminalView, type TerminalLike, type TerminalViewDeps } from './terminal-view'
export * from './protocol'

// v0.9 dashboard + onboarding (T5/T6)
export { mountDashboard, type Dashboard } from './dashboard'
export { mountAddMachine, type AddMachine } from './add-machine'

// v0.10 passkey + step-up (T7)
export { createWebAuthnClient, type WebAuthnClient } from './webauthn'
export { mountPasskeyLogin, type PasskeyLogin } from './login-passkey'

// v0.10 browser-side E2E (T8)
export {
  createHostPinStore,
  type HostPinStore,
} from './host-pin-store'
export {
  createE2ETransport,
  type E2ETransportDeps,
  type PinMismatchSource,
} from './e2e-socket'

// v0.10 client-side preview (T9)
export { mountPreviewClient, type PreviewClient, type ReplaySource } from './preview-client'
export { mountPreviewGrid } from './preview-grid'
