/**
 * Shapes of JSON resources served from the public-info repo
 * (https://github.com/aiwatching/forge-public-info, by default).
 *
 * Each resource lives under `<repoUrl>/<resource-dir>/<file>.json` so new
 * resource types can be added without touching settings. Forge fetches
 * them via `lib/public-info/fetch.ts` (24h cache + built-in fallback).
 */

export interface ModelInfo {
  id: string;
  label: string;
  /** Rough quality/cost band — used by UI to sort/group. */
  tier?: 'premium' | 'standard' | 'fast';
  default?: boolean;
}

export interface ModelAlias {
  id: string;
  label: string;
}

export interface AgentModels {
  displayName: string;
  default: string;
  aliases: ModelAlias[];
  models: ModelInfo[];
}

export interface ModelsRegistry {
  version: number;
  updatedAt: string;
  note?: string;
  /** Keyed by CLI type (e.g. `claude-code`, `codex`, `aider`). */
  agents: Record<string, AgentModels>;
  /** Keyed by API provider id (e.g. `anthropic`, `openai`, `grok`, `google`, `deepseek`, `litellm`). */
  providers?: Record<string, AgentModels>;
}
