/** * Projection registry for managing platform-specific code generators. * * Projections are registered at startup and can be retrieved by name. * The registry uses memoized initialization to prevent "silent failure theater". * * KEY: getProjection() auto-registers builtins on first call. * Consumers don't need to think about startup ordering. */ import type { ProjectionCapability, ProjectionTarget } from './interface'; import type { ProjectionDescriptor, ProjectionInvocationRequest, ProjectionInvocationValidation } from './descriptor-types.js'; /** * Register a projection target. * * @param projection - The projection to register * @throws Error if a projection with the same name is already registered */ export declare function registerProjection(projection: ProjectionTarget): void; /** * Get a registered projection by name. * * IMPORTANT: This function automatically registers builtins on first call. * Consumers don't need to call registerAllBuiltinProjections() manually. * * @param name - The unique identifier of the projection * @returns The projection if found, undefined otherwise */ export declare function getProjection(name: string): ProjectionTarget | undefined; /** * List all registered projections. * * @returns Array of all registered projections */ export declare function listProjections(): ProjectionTarget[]; /** * Check if a projection is registered. * * @param name - The unique identifier of the projection * @returns true if the projection is registered, false otherwise */ export declare function hasProjection(name: string): boolean; /** * Get a projection's declared IR-feature coverage matrix. * * @param name - The unique identifier of the projection * @returns The declared capabilities, or undefined when the projection is * unknown OR has not declared a matrix (undeclared ≠ unsupported). */ export declare function getProjectionCapabilities(name: string): readonly ProjectionCapability[] | undefined; /** * Clear all registered projections. * Useful for testing or resetting the registry state. */ export declare function clearProjections(): void; /** * Get the names of all registered projections. * * @returns Array of projection names */ export declare function getProjectionNames(): string[]; /** * Force registration of all built-in projections. * * This is called automatically by getProjection(), but can be called * explicitly if needed for startup validation or testing. */ export declare function ensureBuiltinProjections(): void; /** * Describe a registered projection. Throws UnknownProjectionError when the * name is not in the registry. */ export declare function describeProjection(name: string): ProjectionDescriptor; /** Descriptors for every registered projection, sorted by name. */ export declare function listProjectionDescriptors(): ProjectionDescriptor[]; /** * Validate a generate request against the published descriptor. * Blocks unknown surfaces, missing required entity/command/options, and * invocations when the descriptor is not safely invokable. */ export declare function validateProjectionInvocation(projectionName: string, request: ProjectionInvocationRequest): ProjectionInvocationValidation; export type { ProjectionCapabilityGroups, ProjectionDescriptor, ProjectionDescriptorMeta, ProjectionInvocationRequest, ProjectionInvocationValidation, ProjectionOptionDescriptor, ProjectionOptionValueType, ProjectionPrerequisiteDescriptor, ProjectionPrerequisiteKind, ProjectionSurfaceDescriptor, ProjectionSurfaceMeta, ProjectionInvocationScope, } from './descriptor-types.js'; export { UnknownProjectionError } from './descriptor-types.js'; //# sourceMappingURL=registry.d.ts.map