/** * Payload format version this CLI understands. The registry stamps every * response with its own version; a mismatch means the user's CLI predates a * breaking change and should be upgraded rather than fed data it will * misinterpret. Needed because the CLI and the registry now ship independently. */ export declare const SUPPORTED_SCHEMA_VERSION = 1; export interface RegistryFile { type: string; path: string; target: string; content: string; } export interface RegistryPayload { $schemaVersion: number; name: string; type: string; description: string; dependencies: string[]; registryDependencies: string[]; files: RegistryFile[]; } export interface RegistryIndexItem { name: string; description: string; type: string; category?: string; dependencies?: string[]; registryDependencies?: string[]; files: { type: string; path: string; target: string; }[]; } export interface RegistryIndex { $schemaVersion: number; generatedAt: string; items: RegistryIndexItem[]; } /** * Resolution order: explicit `--registry` flag, then the project's * `components.json`, then `BNA_UI_REGISTRY`, then the public registry. * * The flag exists so an unreleased component can be tested against a local docs * server (`--registry http://localhost:3000/r`); the config entry exists so a * project pinned to a private registry does not have to repeat it. */ export declare function resolveRegistryUrl(override?: string, fromConfig?: string): string; /** The searchable index: every entry's metadata, no source text. */ export declare function fetchRegistryIndex(registryUrl: string): Promise; /** * One entry with its full transitive closure already flattened by the registry * build, so adding a component is a single request regardless of depth. */ export declare function fetchRegistryItem(registryUrl: string, name: string): Promise; /** * Everything about one component, for an agent rather than for `add`. * * Same fetch path, cache and schema gate as the install payload — this is a * different view of the same registry, not a second client. */ export declare function fetchAiBundle(registryUrl: string, name: string): Promise; export interface AiBundle { $schemaVersion: number; name: string; type: string; description: string; docs?: string; markdown?: string; registry: string; install: { cli: string; npm: string[]; }; framework: Record; dependencies: string[]; registryDependencies: string[]; meta?: Record; files: RegistryFile[]; examples: Array<{ name: string; description: string; files: RegistryFile[]; }>; } export declare function clearRegistryCache(registryUrl: string): Promise;