/**
 * SpecVerse Parser - Public API
 *
 * Unified parser architecture with backward compatibility
 * Simple, powerful YAML + conventions parser with optional imports
 */
// Export unified parser
export { UnifiedSpecVerseParser } from './unified-parser.js';
// Export all types from unified parser
export { ConventionProcessor } from './convention-processor.js';
// Namespace utilities
export { parseNamespace, parseReference, validateNamespace } from './namespace-utils.js';
// Import resolver
export { ImportResolver } from './import-resolver/resolver.js';
// Re-export for convenience
import fs from 'fs';
import { UnifiedSpecVerseParser } from './unified-parser.js';
/**
 * Parse a SpecVerse YAML file
 */
export function parseSpecVerseFile(filePath, schemaPath) {
    const yamlContent = fs.readFileSync(filePath, 'utf8');
    const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf8'));
    const parser = new UnifiedSpecVerseParser(schema);
    return parser.parse(yamlContent);
}
/**
 * Parse SpecVerse YAML content with embedded schema
 */
export function parseSpecVerse(yamlContent, schema) {
    const parser = new UnifiedSpecVerseParser(schema);
    return parser.parse(yamlContent);
}
class SpecVerseParserEngine {
    name = 'parser';
    version = '3.5.2';
    capabilities = ['parse', 'validate', 'convention-processing', 'import-resolution'];
    parser = null;
    initialized = false;
    async initialize(config) {
        this.parser = new UnifiedSpecVerseParser(config?.schema || {});
        this.initialized = true;
    }
    getInfo() {
        return { name: this.name, version: this.version, capabilities: this.capabilities };
    }
    parseContent(content, filename) {
        if (!this.parser)
            throw new Error('Parser not initialized. Call initialize() first.');
        return this.parser.parseContent(content, filename);
    }
    async parseFileWithImports(filePath, options) {
        if (!this.parser)
            throw new Error('Parser not initialized. Call initialize() first.');
        return this.parser.parseFileWithImports(filePath, options);
    }
}
/** Singleton engine instance for EngineRegistry discovery */
export const engine = new SpecVerseParserEngine();
export default engine;
//# sourceMappingURL=index.js.map