/**
 * Doorbell wake message — not an RPC payload (WP-01).
 */

export interface DoorbellDeliveryHint {
  preferSameSession?: boolean;
  allowColdInheritance?: boolean;
  /** Requested delivery mode; not derived from priority. */
  requestedMode?: "normal" | "steer" | "interrupt";
}

export interface DoorbellMessage {
  schema: "codeflowmu.doorbell/v1";

  doorbellId: string;
  recipientWorkerId: string;

  /** Open string; do not hard-code a closed future taxonomy. */
  topic: string;

  sourceFactRefs: string[];
  summary: string;

  priority: "P0" | "P1" | "P2" | "P3";
  dedupeKey: string;

  riskLevel?: "low" | "medium" | "high" | "irreversible";

  requestedBy?: string;
  createdAt: string;

  deliveryHint?: DoorbellDeliveryHint;

  extension?: Record<string, unknown>;
}
