// Planu — Agent Spec Generator: Catalog Loader
// SPEC-016a: Loads and caches the agent spec catalog from config JSON.
import { readFile } from 'node:fs/promises';
let catalogCache = null;
export async function loadAgentSpecCatalog() {
    if (catalogCache) {
        return catalogCache;
    }
    try {
        const catalogPath = new URL('../../config/agent-spec-catalog.json', import.meta.url);
        const content = await readFile(catalogPath, 'utf-8');
        catalogCache = JSON.parse(content);
        return catalogCache;
    }
    catch /* v8 ignore next 3 */ {
        return {
            agentSpecTemplate: { sections: [], constitutionPrinciples: [] },
            agentTypes: {},
            failureModes: [],
            evaluationDimensions: [],
            frameworks: {},
            executionPhases: {},
            interactionChannels: {},
            knowledgeBaseSchemas: {},
        };
    }
}
//# sourceMappingURL=catalog-loader.js.map