/** * Agent categories — utility, NOT source of truth. * * The server is the canonical list (GET /api/v1/agents/categories). * The CLI keeps this local mirror for two reasons only: * * 1. IDE autocomplete for the known names. Authors writing * `preview_agent({ category: "..." })` get the suggestions. * 2. Offline fallback when the registry is unreachable (the * preview HTML form still has options to render). * * Runtime validation is `z.string()` everywhere — the server * rejects unknown categories with 422. The Category type below * uses the `(string & {})` trick so TypeScript preserves * autocomplete on the known set without locking the union: any * string the server accepts is type-compatible. */ export declare const KNOWN_CATEGORIES: readonly ["code", "testing", "devops", "docs", "security", "mobile", "general"]; export type KnownCategory = (typeof KNOWN_CATEGORIES)[number]; /** * Open category type. The `(string & {})` keeps `KnownCategory` * suggestions visible in IDE autocomplete while still accepting * any string at the type level — required for forward-compat * with categories the server adds after this CLI was published. * * NOTE: must be `string & {}` (empty-object intersect), not * `string & object`. The latter collapses to `never` because * `string` is a primitive. `{}` means "any non-nullish value" * which TypeScript intersects with `string` to keep it `string` * while preventing the union from collapsing. */ export type Category = KnownCategory | (string & {}); /** * Helper string for MCP tool descriptions. Hint to the AI without * locking it into the local list. Server validates. */ export declare const CATEGORY_HINT_FOR_AI: string; /** * Fetch the canonical category list from a registry. Returns * `KNOWN_CATEGORIES` on any failure (network, 4xx/5xx, malformed * response). Callers that need autocomplete in the preview HTML * should call this; everything else can use the static array. * * The endpoint is unauthenticated and cheap — safe to call on * preview-server startup. */ export declare function fetchCategoriesWithFallback(registryUrl: string, fetchImpl?: typeof fetch): Promise;