/** Provider snapshot types — single source of truth. Plain TS, no runtime. */

export interface ProviderMode {
  id: string;
  label: string;
  description?: string;
  /** Auto-approve tool permissions when this mode is selected. */
  isUnattended?: boolean;
}

export interface ThinkingOption {
  id: string;
  label: string;
  isDefault?: boolean;
}

export interface ProviderModel {
  id: string;
  label: string;
  description?: string;
  isDefault?: boolean;
  thinkingOptions?: ThinkingOption[];
  defaultThinkingOptionId?: string;
}

// v2.3 phase 2: 'loading' (cache-miss, probe in flight) + 'unavailable'
// (disabled or not installed) restored alongside the terminal 'ready' | 'error'.
export type ProviderSnapshotStatus = 'loading' | 'ready' | 'unavailable' | 'error';

export interface AgentCommand {
  name: string;
  description?: string;
  // v2.5.11: 'skill' (plugin skill) vs 'command' (native/CLI slash command).
  // Drives the icon split in the coder slash menu. Undefined → command.
  kind?: 'command' | 'skill';
}

export interface ProviderSnapshotEntry {
  name: string;
  label: string;
  description?: string;
  transport: string;
  status: ProviderSnapshotStatus;
  enabled: boolean;
  installed: boolean;
  models: ProviderModel[];
  modes: ProviderMode[];
  defaultModeId: string | null;
  commands: AgentCommand[];
  error?: string;
  fetchedAt?: string;
  supportsStreaming?: boolean;
  supportsReasoningStream?: boolean;
}
