// src/registry.ts
var ANTHROPIC_KEY = {
  key: "ANTHROPIC_API_KEY",
  label: "Anthropic API Key",
  placeholder: "sk-ant-... or sk-ant-oat-..."
};
var OPENAI_KEY = {
  key: "OPENAI_API_KEY",
  label: "OpenAI API Key",
  placeholder: "sk-..."
};
var GEMINI_KEY = {
  key: "GEMINI_API_KEY",
  label: "Gemini API Key",
  placeholder: "AIza..."
};
var ENGINES = [
  { id: "claude", label: "Claude", defaultSecret: ANTHROPIC_KEY },
  {
    id: "opencode",
    label: "OpenCode"
    /* derived from model prefix */
  },
  { id: "codex", label: "Codex", defaultSecret: OPENAI_KEY },
  { id: "gemini", label: "Gemini", defaultSecret: GEMINI_KEY },
  { id: "factory", label: "Factory", defaultSecret: ANTHROPIC_KEY },
  {
    id: "pi",
    label: "Pi"
    /* derived from model prefix */
  }
];
var PROVIDERS = [
  { id: "anthropic", label: "Anthropic (cloud proxy)", kind: "proxy", secret: ANTHROPIC_KEY },
  { id: "sprites", label: "Sprites", kind: "cloud", secret: { key: "SPRITE_TOKEN", label: "Sprites.dev Token", placeholder: "user/org/.../token" } },
  { id: "docker", label: "Docker (local)", kind: "local" },
  { id: "podman", label: "Podman (local)", kind: "local" },
  { id: "apple-container", label: "Apple Container (local)", kind: "local" },
  { id: "apple-firecracker", label: "Apple Firecracker (local)", kind: "local" },
  { id: "e2b", label: "E2B", kind: "cloud", secret: { key: "E2B_API_KEY", label: "E2B API Key", placeholder: "e2b_..." } },
  { id: "vercel", label: "Vercel", kind: "cloud", secret: { key: "VERCEL_TOKEN", label: "Vercel Token", placeholder: "..." } },
  { id: "fly", label: "Fly.io", kind: "cloud", secret: { key: "FLY_API_TOKEN", label: "Fly.io API Token", placeholder: "fo1_..." } },
  { id: "modal", label: "Modal", kind: "cloud", secret: { key: "MODAL_TOKEN_ID", label: "Modal Token ID", placeholder: "..." } },
  { id: "daytona", label: "Daytona", kind: "cloud", secret: { key: "DAYTONA_API_KEY", label: "Daytona API Key", placeholder: "..." } },
  { id: "cloudflare", label: "Cloudflare Sandbox", kind: "cloud", secret: { key: "CLOUDFLARE_API_TOKEN", label: "Cloudflare API Token", placeholder: "..." } }
];
var ENGINE_NAMES = ENGINES.map((e) => e.id);
var PROVIDER_NAMES = PROVIDERS.map((p) => p.id);
function getEngineSecret(engineId, model) {
  if (engineId === "opencode" || engineId === "pi") {
    if (model.startsWith("openai/")) return OPENAI_KEY;
    if (model.startsWith("google/") || model.startsWith("gemini/")) return GEMINI_KEY;
    return ANTHROPIC_KEY;
  }
  return ENGINES.find((e) => e.id === engineId)?.defaultSecret;
}
function getProviderSecret(providerId) {
  return PROVIDERS.find((p) => p.id === providerId)?.secret;
}

export {
  ENGINES,
  PROVIDERS,
  ENGINE_NAMES,
  PROVIDER_NAMES,
  getEngineSecret,
  getProviderSecret
};
