/**
 * R7PROD-003 — AutopilotRun row as serialized by RecoveryRunHistoryController.
 * R8UXB-005 — Added error_message, batch_public_id, autopilot_public_id for drill-down.
 */
export interface AutopilotRunRow {
  id: number;
  status: 'pending' | 'processing' | 'completed' | 'failed';
  mode: 'draft' | 'stage' | 'publish';
  pages_targeted: number;
  pages_generated: number;
  pages_published: number;
  cost_usd: number | null;
  /** Sanitized error text for display (never raw exception messages). Null when no error. */
  error: string | null;
  /** R8UXB-005: user-visible error detail from the run's error field. */
  error_message: string | null;
  /** R8UXB-005: public_id of the AiJob batch that produced this run's drafts, if any. */
  batch_public_id: string | null;
  /** R8UXB-005: site public_id for route construction. */
  autopilot_public_id: string | null;
  started_at: string | null;
  completed_at: string | null;
  created_at: string;
}
