/**
 * WP-13 — switchboard observation event catalog.
 *
 * These are Panel/SSE activity events. They are NOT delivery-queue Doorbells.
 */

export const SWITCHBOARD_OBSERVATION_EVENTS = [
  "switchboard.doorbell.created",
  "switchboard.doorbell.claimed",
  "switchboard.doorbell.settled",
  "switchboard.doorbell.failed",
  "host.session.created",
  "host.session.restored",
  "host.run.started",
  "host.run.completed",
  "host.run.failed",
  "host.session.lost",
  "worker.binding.changed",
  "worker.recovering",
] as const;

export type SwitchboardObservationEvent =
  (typeof SWITCHBOARD_OBSERVATION_EVENTS)[number];

/** Legacy events that must keep flowing so old UI does not break. */
export const LEGACY_OBSERVATION_EVENTS = [
  "wake_agent.requested",
  "wake_agent.accepted",
  "wake_agent.failed",
  "wake_agent.skipped",
  "wake_agent.delayed",
  "runtime.session_started",
  "runtime.session_ended",
  "runtime.session_completed",
  "runtime.session_cancelled",
  "sdk.tool_call",
  "sdk.thinking",
  "sdk.status",
  "sdk.result",
] as const;

export const SWITCHBOARD_OBSERVATION_EVENT_SET = new Set<string>(
  SWITCHBOARD_OBSERVATION_EVENTS,
);
