/**
 * Hard-coded mapping: tenant_id → enterprise repo URL.
 *
 * Short enterprise keys look like `<tenant_id>:<github_pat>` (e.g.
 * `fortinet:github_pat_xxx`). The tenant_id is the lowercase company
 * name itself — same string is used as the symmetric key for any
 * `ent:…` secrets the template ships (see lib/enterprise-secret.ts).
 * Keeping one name means there's nothing for users to look up.
 *
 * Long form (`<github_pat>@<repo_url>`) bypasses this table and is the
 * escape hatch for ad-hoc / unregistered tenants.
 *
 * Adding a new tenant requires bumping Forge — that is intentional: it
 * keeps the list of "blessed" enterprise repos small and reviewable.
 * A future resolver service (design §1) can replace this if needed.
 */

export interface KnownTenant {
  tenant_id: string;
  display_name: string;
  repo_url: string;
}

export const KNOWN_TENANTS: Record<string, KnownTenant> = {
  fortinet: {
    tenant_id: 'fortinet',
    display_name: 'Fortinet',
    repo_url: 'github.com/aiwatching/forge-enterprise-agent-fortinet',
  },
};

export function lookupTenant(tenant_id: string): KnownTenant | null {
  return KNOWN_TENANTS[tenant_id.toLowerCase()] || null;
}
