/** * Registry and discovery surfaces. * * `catalog()` is the compact, token-cheap listing an agent can afford to load * up front. `describe(type)` is the full contract, paid for only for the blocks * that were actually selected. The published JSON Schema is generated from the * same definitions, so a documented prop and a validated prop cannot disagree. */ import { type ActionType } from './actions.js'; import { type BlockCategory, type BlockRegistry } from './block-module.js'; import type { BlockDefinition } from './roster.js'; export { buildRegistry } from './registry-builder.js'; /** The registry every compile uses unless a caller passes its own. */ export declare const DEFAULT_REGISTRY: BlockRegistry; /** Every block definition: core roster entries, then each group's blocks. */ export declare const BLOCK_DEFINITIONS: readonly BlockDefinition[]; /** Page Spec schema version implemented by this compiler. */ export declare const SPEC_SCHEMA_VERSION = 1; export interface CatalogEntry { type: string; kind: 'semantic' | 'primitive'; version: number; summary: string; category: BlockCategory; /** Search tags; `searchCatalog` also matches use cases, which stay out of the listing. */ tags: string[]; } export interface Catalog { schemaVersion: number; /** Number of blocks in this listing (the category's, when filtered). */ blockCount: number; /** Present only when the listing is filtered to one category. */ category?: BlockCategory; blocks: CatalogEntry[]; actions: { type: ActionType; summary: string; }[]; } export interface CatalogOptions { /** List only this category; an unknown name is an error that lists the allowed ones. */ category?: BlockCategory | (string & {}); } export declare function getBlockDefinition(type: string, registry?: BlockRegistry): BlockDefinition | undefined; export declare function blockTypes(registry?: BlockRegistry): string[]; /** * Compact discovery surface: names, kinds, categories, tags and one-line * summaries, in registry order. `category` narrows it to one group. */ export declare function catalog(options?: CatalogOptions): Catalog; /** * The catalog as JSON text, one block and one action per line. * * Indenting every entry field would cost more bytes than the entries carry, and * the catalog is the one listing an agent loads up front. The value is the * same JSON a parser reads from any other formatting. */ export declare function formatCatalogJson(listing: Catalog): string; /** * Full contract for one block type. * * Returns a deep copy so a caller cannot mutate the registry through the * contract object. */ export declare function describe(type: string): BlockDefinition; /** * The canonical Page Spec JSON Schema (JSON Schema draft 2020-12). * * Generated, never hand-maintained: `tests/unit/json-schema.test.ts` regenerates * it, compares against `schema/page-spec.v1.json`, and validates the fixture * corpus with an independent validator. */ export declare function buildPageSpecJsonSchema(): Record; //# sourceMappingURL=registry.d.ts.map