#!/usr/bin/env node
import'./chunk-5TAVYPOV.js';import {z}from'zod';import*as i from'js-yaml';var p=z.enum(["web","backend","fullstack","api","cli","ml","mobile","game","embedded","devops","data","library","monorepo","custom"]),g=z.enum(["auto","claude","claude-code","cursor-cli","claude-cli","manual"]),r=z.object({name:z.string(),description:z.string(),examples:z.array(z.string()).optional()}).passthrough(),u=z.object({file:z.string().optional(),"core-tags":z.array(z.string()).optional(),"allow-suggestions":z.boolean().optional()}).passthrough(),m=z.object({overview:z.string().optional(),"how-to-use":z.array(z.string()).optional(),"update-rules":z.array(z.string()).optional()}).passthrough(),d=z.object({enforce:z.boolean().optional(),"default-level":z.enum(["debug","info","warn","error"]).optional(),"symbol-mapping":z.record(z.string(),z.string()).optional()}).passthrough(),b=z.object({pattern:z.string(),depth:z.number().optional()}),h=z.object({toolCacheTtlMs:z.number().optional()}).passthrough(),f=z.object({model:z.string().optional(),"context-window":z.number().optional()}).passthrough(),y=z.object({enabled:z.boolean().optional(),"index-file":z.string().optional(),"docs-path":z.string().optional()}).passthrough(),w=z.object({enabled:z.boolean().optional(),"auto-include":z.boolean().optional()}).passthrough(),j=z.object({version:z.string(),project:z.string(),discipline:p.optional(),"agent-provider":g.optional(),"agent-guidelines":m.optional(),"symbol-system":z.record(z.string(),r).optional(),"tag-bank":u.optional(),component_types:z.record(z.string(),z.string()).optional(),logging:d.optional(),"purpose-required":z.array(b).optional(),conventions:z.array(z.string()).optional(),workspace:z.string().optional(),limits:h.optional(),"ai-agent":f.optional(),context:y.optional(),probe:w.optional(),states:z.record(z.string(),z.unknown()).optional(),"custom-symbols":z.record(z.string(),r).optional()}).passthrough(),v=new Set(["version","project","discipline","agent-provider","agent-guidelines","symbol-system","tag-bank","component_types","logging","purpose-required","conventions","workspace","limits","ai-agent","context","probe","states","custom-symbols","docs","features","enforcement","model-resolution"]);function S(l){let s=[],e=[],t;try{t=i.load(l);}catch(n){return {valid:false,warnings:[],errors:[`YAML parse error: ${n.message}`]}}if(!t||typeof t!="object")return {valid:false,warnings:[],errors:["Config must be a YAML object"]};for(let n of Object.keys(t))v.has(n)||s.push(`Unrecognized config key: "${n}"`);let a=j.safeParse(t);if(!a.success)for(let n of a.error.issues){let c=n.path.join(".");e.push(`${c}: ${n.message}`);}return {valid:e.length===0,warnings:s,errors:e}}export{j as paradigmConfigSchema,S as validateConfig};