/** * Schema Loading Utility * * Loads schema files with precedence chain support: * 1. LEX_SCHEMAS_DIR (explicit environment override) * 2. .smartergpt/schemas/ (local overlay) * 3. Package canon (resolved from package installation) */ /** * Load schema file with precedence chain * * @param schemaName - Name of the schema file (e.g., "cli-output.v1.schema.json") * @returns Parsed schema object * @throws Error if schema file cannot be found in any location * * Precedence chain: * 1. LEX_SCHEMAS_DIR (explicit environment override) * 2. .smartergpt/schemas/ (local overlay - untracked) * 3. Package canon (resolve from package installation) * * @example * ```typescript * const schema = loadSchema('cli-output.v1.schema.json'); * console.log(schema); // Parsed JSON schema object * ``` * * @example With environment variable override * ```typescript * process.env.LEX_SCHEMAS_DIR = '/custom/schemas'; * const schema = loadSchema('cli-output.v1.schema.json'); * ``` * * @example Local overlay (create .smartergpt/schemas/my-schema.json to override) * ```typescript * // If .smartergpt/schemas/my-schema.json exists, it takes precedence * const schema = loadSchema('my-schema.json'); * ``` */ export declare function loadSchema(schemaName: string): object; /** * Get the path where a schema would be loaded from (without loading it) * * @param schemaName - Name of the schema file * @returns Resolved path or null if not found * * @example * ```typescript * const path = getSchemaPath('cli-output.v1.schema.json'); * console.log(path); // '/repo/schemas/cli-output.v1.schema.json' * ``` */ export declare function getSchemaPath(schemaName: string): string | null; /** * List all available schemas across all precedence levels * * @returns Array of unique schema names (deduplicated) * * @example * ```typescript * const schemas = listSchemas(); * console.log(schemas); // ['cli-output.v1.schema.json', ...] * ``` */ export declare function listSchemas(): string[];