/** * Single source of truth for resolving the Skills API endpoint. * * Boundary rule (R1): an unconfigured install must never produce a URL on a * vendor-controlled host. * * - Read paths fail closed: `resolveApiUrl()` returns `undefined` and the * caller keeps working against the bundled local registry. * - Auth and write paths fail loudly: `requireApiUrl()` throws an error that * names the missing configuration. * * There is deliberately no fallback endpoint and no localhost default. An * unconfigured CLI has nothing sane to point a credential-bearing request at, * so it must say so rather than pick a host on the user's behalf. */ import { type SkillsConfig } from "./config.js"; export declare const API_URL_ENV_VAR = "SKILLS_API_URL"; export declare const API_URL_CONFIG_KEY = "apiUrl"; /** Hint shown wherever a Skills API URL is required but absent. */ export declare const MISSING_API_URL_HINT: string; export declare class MissingApiUrlError extends Error { readonly code = "MISSING_API_URL"; constructor(action?: string); } /** * Resolve the configured Skills API origin, or `undefined` when the install has * not been pointed at an instance. `SKILLS_API_URL` wins over the config file. */ export declare function resolveApiUrl(config?: SkillsConfig, env?: Record): string | undefined; /** * Resolve the configured Skills API origin, or throw naming the missing * configuration. Use this on every auth and write path. */ export declare function requireApiUrl(action?: string, config?: SkillsConfig, env?: Record): string;