@a-company/paradigm 6.6.1 → 6.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accept-orchestration-TIXUQQGR.js → accept-orchestration-JHDCVHB2.js} +1 -1
- package/dist/{aggregate-A5S5MTCC.js → aggregate-KZICPVT3.js} +1 -1
- package/dist/arch-loader-G3AAM4E2.js +2 -0
- package/dist/{beacon-QVUD3MGP.js → beacon-52EWNZPK.js} +1 -1
- package/dist/chunk-4GC35IFF.js +2 -0
- package/dist/{chunk-MTLWAWHE.js → chunk-FI66YM6G.js} +43 -43
- package/dist/{chunk-Y4P4SGZV.js → chunk-MBSY57RN.js} +1 -1
- package/dist/{chunk-IOVHF4SR.js → chunk-MU5YWTNE.js} +1 -1
- package/dist/{chunk-5NAF6CKU.js → chunk-QALPEMCU.js} +26 -26
- package/dist/{chunk-4PSD5R7N.js → chunk-QDP4G53M.js} +1 -1
- package/dist/{chunk-ARLB6YYW.js → chunk-RGSFU2YW.js} +1 -1
- package/dist/{chunk-TOYQ2QCB.js → chunk-S3UVQ5RV.js} +1 -1
- package/dist/chunk-TMDPDIWA.js +3 -0
- package/dist/{chunk-2AU5L333.js → chunk-XKNJSPB5.js} +1 -1
- package/dist/{commands-ANRJNG2W.js → commands-4ENQMHFO.js} +1 -1
- package/dist/{constellation-NWLXYATA.js → constellation-RHZAEFV7.js} +1 -1
- package/dist/{diff-75MABOSL.js → diff-ANKTFDRA.js} +1 -1
- package/dist/dist-RXYJK7AZ.js +2 -0
- package/dist/dist-TNE4GFT7.js +2 -0
- package/dist/index.js +5 -5
- package/dist/{init-V4KSEKPK.js → init-F4MSKZIW.js} +1 -1
- package/dist/{integrity-ROO3G43N.js → integrity-7TKX3DZ4.js} +1 -1
- package/dist/mcp.js +2 -2
- package/dist/{orchestrate-K4KBTBYK.js → orchestrate-UG5QXNAU.js} +1 -1
- package/dist/{probe-5HAXULAD.js → probe-27ARJKRO.js} +1 -1
- package/dist/reindex-F7BZCG4W.js +2 -0
- package/dist/review-BRO2UP4M.js +11 -0
- package/dist/{ripple-FNZI47SH.js → ripple-KCVDS3WE.js} +1 -1
- package/dist/sentinel.js +1 -1
- package/dist/{setup-ZSEC72BS.js → setup-5V2AGLQ6.js} +1 -1
- package/dist/{shift-QY3EXVF4.js → shift-TNA2E5O7.js} +2 -2
- package/dist/{snapshot-3IYB67D4.js → snapshot-YMX5QRBM.js} +1 -1
- package/dist/{status-DB3KNLW3.js → status-3GJXI4IK.js} +1 -1
- package/dist/{summary-WLI3NF4G.js → summary-RPU2BS3Q.js} +1 -1
- package/dist/{team-2LGZQRP4.js → team-PEGP6F7S.js} +1 -1
- package/dist/{tools-XKI47YFC.js → tools-HQKF4Q3P.js} +1 -1
- package/dist/{workspace-VMSPYIBV.js → workspace-6POCBPDY.js} +1 -1
- package/package.json +1 -1
- package/dist/arch-loader-T3TARMSO.js +0 -2
- package/dist/chunk-LWAIVOSF.js +0 -2
- package/dist/chunk-SU5F5D4I.js +0 -3
- package/dist/dist-JZZJLVMR.js +0 -2
- package/dist/dist-OG6MM4VY.js +0 -2
- package/dist/reindex-2YTQP2EO.js +0 -2
- package/dist/review-VMSX2PKI.js +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {b}from'./chunk-
|
|
2
|
+
import {b}from'./chunk-MU5YWTNE.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import'./chunk-TQOT2LBO.js';import'./chunk-EKZDFEJW.js';import'./chunk-LPBCQM5Y.js';import'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';import*as g from'path';import e from'chalk';async function u(n,s,r){let a=s?g.resolve(s):process.cwd();if(!n){r.json?console.log(JSON.stringify({error:"Orchestration ID required"})):(console.log(e.red(`
|
|
3
3
|
Orchestration ID required.`)),console.log(e.gray(`Usage: paradigm team accept <orchestration-id>
|
|
4
4
|
`)));return}let l=new b(a),o=l.getOrchestration(n);if(!o){r.json?console.log(JSON.stringify({error:"Orchestration not found",id:n})):console.log(e.red(`
|
|
5
5
|
Orchestration not found: ${n}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {c,l as l$1,m,o as o$1,B}from'./chunk-
|
|
2
|
+
import {c,l as l$1,m,o as o$1,B}from'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';import*as u from'fs';import*as l from'path';import o from'chalk';import S from'ora';async function A(d){let h=process.cwd(),a=l.resolve(h,d);console.log(o.blue(`
|
|
3
3
|
\u{1F52E} Aggregating Premise...
|
|
4
4
|
`));let c$1=S("Loading sources...").start();try{let e,g=l.join(a,".premise");if(u.existsSync(g)){let{data:r,errors:s}=c(g);if(s.length>0){c$1.warn("Warnings parsing .premise file");for(let n of s)console.log(o.yellow(` \u26A0 ${n}`));console.log(o.gray(` Falling back to directory aggregation...
|
|
5
5
|
`));}if(r&&!s.some(n=>n.includes("Required")))try{e=await l$1(r,a);}catch(n){console.log(o.yellow(` \u26A0 Error using .premise file: ${n.message}`)),console.log(o.gray(` Falling back to directory aggregation...
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {m,o,C,B}from'./chunk-
|
|
2
|
+
import {m,o,C,B}from'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import {a}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as i from'fs';import*as c from'path';import n from'chalk';import O from'ora';function G(u){let o=[],g=[{pattern:"portal.yaml",desc:"Authorization topology"},{pattern:"src/lib/api.ts",desc:"API utilities"},{pattern:"src/lib/api.js",desc:"API utilities"},{pattern:"src/utils/api.ts",desc:"API utilities"},{pattern:"src/hooks/useAuth.ts",desc:"Auth hook"},{pattern:"src/hooks/useAuth.tsx",desc:"Auth hook"},{pattern:"src/context/AuthContext.tsx",desc:"Auth context"},{pattern:"src/store/index.ts",desc:"State store"},{pattern:"src/types/index.ts",desc:"Type definitions"},{pattern:"src/types.ts",desc:"Type definitions"},{pattern:".paradigm/config.yaml",desc:"Paradigm config"},{pattern:"tsconfig.json",desc:"TypeScript config"},{pattern:"package.json",desc:"Package manifest"}];for(let{pattern:r,desc:l}of g){let t=c.join(u,r);i.existsSync(t)&&o.push({path:r,description:l});}return o.slice(0,8)}function E(u){let o=c.join(u,".paradigm","prompts"),g=[];if(i.existsSync(o)){let r=i.readdirSync(o).filter(l=>l.endsWith(".md"));for(let l of r){let t=l.replace(".md","").replace(/-/g," ");g.push({name:t.charAt(0).toUpperCase()+t.slice(1),path:`.paradigm/prompts/${l}`});}}return g.slice(0,6)}function I(u,o,g,r,l){let t=[];t.push(`# Beacon - ${u}`),t.push(""),t.push("> Quick-start orientation for AI agents. Generated by Paradigm."),t.push(""),t.push("## Constellation (Symbol Map)"),t.push(""),t.push("```");let a=o.filter(e=>e.type==="component"),m=o.filter(e=>e.type==="gate");for(let e of a.slice(0,15)){let p=e.references.filter(d=>d.startsWith("^")),b=`${e.symbol.padEnd(20)} \u2192 ${c.dirname(e.filePath).padEnd(25)}`;p.length>0&&(b+=` \u2192 ${p.join(", ")}`),t.push(b);}if(a.length>15&&t.push(`... and ${a.length-15} more components`),t.push("```"),t.push(""),m.length>0){t.push("## Gates (Authorization)"),t.push("");for(let e of m.slice(0,6)){let p=e.description?` - ${e.description}`:"";t.push(`- \`${e.symbol}\`${p}`);}m.length>6&&t.push(`- ... and ${m.length-6} more gates`),t.push("");}if(g.length>0){t.push("## Landmarks (Key Files)"),t.push("");for(let e of g)t.push(`- \`${e.path}\` - ${e.description}`);t.push("");}if(r.length>0){t.push("## Pathways (Common Tasks)"),t.push("");for(let e of r)t.push(`- "${e.name}" \u2192 \`${e.path}\``);t.push("");}return t.push("## Symbol Quick Reference"),t.push(""),t.push("| Symbol | Type | Meaning |"),t.push("|--------|------|---------|"),t.push("| `#` | Component | Any documented code unit |"),t.push("| `$` | Flow | Multi-step process |"),t.push("| `^` | Gate | Authorization checkpoint |"),t.push("| `!` | Signal | Event for side effects |"),t.push("| `~` | Aspect | Rule with code anchor |"),t.push(""),t.push("## For More Context"),t.push(""),t.push("- Full symbol graph: `.paradigm/constellation.json`"),t.push("- Detailed context: `.paradigm/specs/` for detailed specifications"),t.push("- Session history: `.paradigm/thread.md` (if available)"),t.push("- Error mapping: `.paradigm/echoes.yaml` (if available)"),t.push(""),t.push("---"),t.push(`*Generated: ${new Date().toISOString().split("T")[0]}*`),t.push("*Run `paradigm beacon --refresh` to update*"),t.join(`
|
|
3
3
|
`)}async function q(u,o$1={}){let g=process.cwd(),r=u?c.resolve(g,u):g,l=c.basename(r),t=!o$1.json&&!o$1.quiet;t&&console.log(n.blue(`
|
|
4
4
|
\u{1F526} Generating Beacon...
|
|
5
5
|
`));let a$1=o$1.json?null:O("Scanning project...").start(),m$1=a.command("beacon").start("Generating beacon",{project:l});try{let e=c.join(r,".paradigm"),p=o$1.output||c.join(e,"beacon.md");if(!o$1.json&&i.existsSync(p)&&!o$1.refresh){if(a$1?.info("Beacon already exists"),t){console.log(n.gray(` Use --refresh to regenerate
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {f,g,h,i,j,k,l,m,n}from'./chunk-JIXHEBGK.js';import {a,e}from'./chunk-ZJQY5PPP.js';import*as $ from'fs';import*as A from'js-yaml';import {z}from'zod';import*as b from'path';var H={component:"#",flow:"$",gate:"^",signal:"!",aspect:"~"},ee={"#":"component",$:"flow","^":"gate","!":"signal","~":"aspect"},te=["#","$","^","!","~"];function oe(e){return te.includes(e)}var se=z.object({x:z.number(),y:z.number()}),ne=z.object({x:z.number(),y:z.number(),zoom:z.number()}),G=z.object({path:z.string(),include:z.array(z.string()).optional(),exclude:z.array(z.string()).optional()}),V=z.object({id:z.string(),symbol:z.string(),type:z.enum(["feature","component","flow","state","aspect","gate","signal","idea"]),content:z.string().optional(),position:se,tags:z.array(z.string()).optional(),created:z.string(),modified:z.string().optional()}),W=z.object({from:z.string(),to:z.string(),label:z.string().optional(),type:z.string().optional()}),re=z.object({id:z.string(),name:z.string(),nodes:z.array(z.string()),color:z.string().optional()}),Y=z.object({viewport:ne,groups:z.array(re).optional()}),ae=z.object({nodes:z.array(V),connections:z.array(W),layout:Y}),ie=z.object({id:z.string(),name:z.string(),timestamp:z.string(),description:z.string().optional(),state:ae}),ce=z.object({version:z.string(),metadata:z.object({name:z.string(),created:z.string(),modified:z.string()}),sources:z.object({purpose:z.array(G).optional(),portal:z.array(G).optional()}),nodes:z.array(V),connections:z.array(W),layout:Y,snapshots:z.array(ie).optional()});function we(e){let o=[],t;try{t=$.readFileSync(e,"utf8");}catch(s){return o.push(`Cannot read file: ${s.message}`),{data:null,errors:o,rawContent:void 0}}return pe(t)}function pe(e){let o=[],t=null;try{t=A.load(e);}catch(r){let l=r,c=l.mark?.line?l.mark.line+1:void 0;return o.push(`YAML syntax error: ${l.reason||r.message}${c?` (line ${c})`:""}`),{data:null,errors:o,rawContent:e}}if(t==null)return {data:X(),errors:[],rawContent:e};let s=ce.safeParse(t);if(!s.success){for(let r of s.error.issues){let l=r.path.join(".");o.push(`Schema error at ${l||"/"}: ${r.message}`);}return {data:t,errors:o,rawContent:e}}return {data:s.data,errors:[],rawContent:e}}function X(e="Untitled"){let o=new Date().toISOString();return {version:"1.0.0",metadata:{name:e,created:o,modified:o},sources:{purpose:[{path:"./"}],portal:[{path:"./portal.yaml"}]},nodes:[],connections:[],layout:{viewport:{x:0,y:0,zoom:1}}}}function ue(e){return e.metadata.modified=new Date().toISOString(),A.dump(e,{indent:2,lineWidth:-1,noRefs:true,sortKeys:false})}function Pe(e="My Project"){return ue(X(e))}function ve(e,o){return {...e,nodes:[...e.nodes,o],metadata:{...e.metadata,modified:new Date().toISOString()}}}function xe(e,o,t){return {...e,nodes:e.nodes.map(s=>s.id===o?{...s,position:t,modified:new Date().toISOString()}:s),metadata:{...e.metadata,modified:new Date().toISOString()}}}function Ce(e,o){return e.connections.some(s=>s.from===o.from&&s.to===o.to)?e:{...e,connections:[...e.connections,o],metadata:{...e.metadata,modified:new Date().toISOString()}}}function Te(e,o,t){let s={id:`snap-${Date.now()}`,name:o,timestamp:new Date().toISOString(),description:t,state:{nodes:[...e.nodes],connections:[...e.connections],layout:{...e.layout}}};return {...e,snapshots:[...e.snapshots||[],s],metadata:{...e.metadata,modified:new Date().toISOString()}}}async function le(e$1,o){let t=[],s=[],r=[],l$1=[];if(e$1.sources.purpose)for(let p of e$1.sources.purpose){let f$1=b.resolve(o,p.path);try{let u=await f(f$1);r.push(...u.map(a=>a.filePath));let m$1=g(u);for(let[a,{item:i,filePath:d}]of m$1){let P=["feature",...i.tags||[]];t.push(y({id:`purpose-feature-${a}`,symbol:`#${a}`,type:"component",source:"purpose",filePath:d,data:i,description:i.description,tags:P,componentType:i.type,parentSymbol:i.parent,anchors:i.anchors?.map(q=>R(q))}));}let h$1=h(u);for(let[a,{item:i,filePath:d}]of h$1)t.push(y({id:`purpose-component-${a}`,symbol:`#${a}`,type:"component",source:"purpose",filePath:d,data:i,description:i.description,tags:i.tags,componentType:i.type,parentSymbol:i.parent,anchors:i.anchors?.map(P=>R(P))}));let S=i(u);for(let[a,{item:i,filePath:d}]of S)t.push(y({id:`purpose-gate-${a}`,symbol:`^${a}`,type:"gate",source:"purpose",filePath:d,data:i,description:i.description}));let C=j(u);for(let[a,{item:i,filePath:d}]of C)t.push(y({id:`purpose-state-${a}`,symbol:`#${a}`,type:"component",source:"purpose",filePath:d,data:i,description:i.description,tags:["state"]}));let j$1=k(u);for(let[a,{item:i,filePath:d}]of j$1)t.push(y({id:`purpose-flow-${a}`,symbol:`$${a}`,type:"flow",source:"purpose",filePath:d,data:i,description:i.description}));let J=l(u);for(let[a,{item:i,filePath:d}]of J)t.push(y({id:`purpose-signal-${a}`,symbol:`!${a}`,type:"signal",source:"purpose",filePath:d,data:i,description:i.description}));let Q=m(u);for(let[a,{item:i,filePath:d}]of Q)t.push(y({id:`purpose-aspect-${a}`,symbol:`~${a}`,type:"aspect",source:"purpose",filePath:d,data:i,description:i.description,anchors:i.anchors?.map(P=>R(P)),appliesTo:i["applies-to"],tags:i.tags,enforcement:i.enforcement}));let Z=n(u),O=new Set(t.map(a=>a.symbol));for(let a of Z)O.has(a.symbol)||(O.add(a.symbol),t.push(y({id:`purpose-ref-${a.type}-${a.symbol.slice(1)}`,symbol:a.symbol,type:a.type,source:"purpose",filePath:a.filePath,data:{referencedFrom:a.sourceSymbol},description:`Referenced from ${a.sourceSymbol}`})));}catch(u){s.push({source:"purpose",filePath:f$1,message:u.message});}}if(e$1.sources.portal)for(let p of e$1.sources.portal){let f=b.resolve(o,p.path);try{let u;if(f.endsWith(".yaml")||f.endsWith(".yml"))u=await a(f),l$1.push(f);else {let m=await e(f);if(l$1.push(...m),m.length>0){u=await a(m[0]);for(let h=1;h<m.length;h++){let S=await a(m[h]);u.gates.push(...S.gates),u.flows.push(...S.flows);}}else continue}for(let m of u.gates){t.push(fe(m,f));for(let h of m.prizes)t.push(y({id:`gate-signal-${m.id}-${h.id}`,symbol:`!${h.id}`,type:"signal",source:"portal",filePath:f,data:h,description:`Signal from gate ${m.id}`}));}for(let m of u.flows)t.push(me(m,f));}catch(u){s.push({source:"portal",filePath:f,message:u.message});}}for(let p of e$1.nodes){let f=p.tags?.includes("idea");if(!p.content&&!f){let u=t.find(m=>m.symbol===p.symbol);if(u){u.position=p.position,u.tags=p.tags;continue}}t.push(y({id:p.id,symbol:p.symbol,type:p.type,source:"premise",filePath:".premise",data:p,description:p.content,position:p.position,tags:p.tags,created:p.created,modified:p.modified}));}ye(t);let c=new Map;for(let p of t){let f=c.get(p.symbol)||[];f.includes(p.filePath)||f.push(p.filePath),c.set(p.symbol,f);}let g$1=[];for(let[p,f]of c)f.length>1&&g$1.push({symbol:p,files:f});return {symbols:t,purposeFiles:r,portalFiles:l$1,errors:s,timestamp:Date.now(),...g$1.length>0?{duplicateSymbols:g$1}:{}}}function y(e){return {...e,data:e.data??null,references:e.references??[],referencedBy:e.referencedBy??[]}}function fe(e,o){let t=e.id.startsWith("^")?e.id.slice(1):e.id;return y({id:`gate-${t}`,symbol:`^${t}`,type:"gate",source:"portal",filePath:o,data:e,description:e.description,position:e.position})}function me(e,o){return y({id:`gate-flow-${e.id}`,symbol:`$${e.id}`,type:"flow",source:"portal",filePath:o,data:e,description:e.description})}function R(e){let o=e.lastIndexOf(":");if(o===-1||o===e.length-1)return {path:e,lines:0,raw:e};let t=e.slice(o+1),s=e.slice(0,o);if(!/^[\d,\- ]+$/.test(t))return {path:e,lines:0,raw:e};if(t.includes("-")){let[r,l]=t.split("-").map(Number);return {path:s,lines:[r,l],raw:e}}else if(t.includes(",")){let r=t.split(",").map(Number);return {path:s,lines:r,raw:e}}else return {path:s,lines:Number(t),raw:e}}var de=new Set(["$lib","$env","$app","$service-worker","$virtual","$schema","$ref","$id","$type"]);function ye(e){let o=new Map(e.map(t=>[t.symbol,t]));for(let t of e){let s=JSON.stringify(t.data),r=/(?:\?[@#$%~^!]|[@#$%~^!?])[a-zA-Z][\w-]*/g,l=(s.match(r)||[]).filter(c=>!de.has(c));for(let c of l)if(c!==t.symbol&&o.has(c)){t.references.includes(c)||t.references.push(c);let g=o.get(c);g&&!g.referencedBy.includes(t.symbol)&&g.referencedBy.push(t.symbol);}}}async function Re(e){let o={metadata:{name:b.basename(e),created:new Date().toISOString(),modified:new Date().toISOString()},sources:{purpose:[{path:"./"}],portal:[{path:"./"}]},nodes:[]};return le(o,e)}function he(){return {entries:new Map,byType:new Map,bySource:new Map,timestamp:0}}function je(e){let o=he();o.timestamp=e.timestamp;for(let t of e.symbols)o.entries.set(t.id,t),o.byType.has(t.type)||o.byType.set(t.type,[]),o.byType.get(t.type).push(t),o.bySource.has(t.source)||o.bySource.set(t.source,[]),o.bySource.get(t.source).push(t);return o}function I(e,o){for(let t of e.entries.values())if(t.symbol===o)return t}function Oe(e,o){return e.entries.get(o)}function x(e,o){return e.byType.get(o)||[]}function Be(e,o){return e.bySource.get(o)||[]}function ge(e,o){let t=o.toLowerCase(),s=[];for(let r of e.entries.values()){if(r.symbol.toLowerCase().includes(t)){s.push(r);continue}if(r.description?.toLowerCase().includes(t)){s.push(r);continue}if(r.tags?.some(l=>l.toLowerCase().includes(t))){s.push(r);continue}if(r.componentType?.toLowerCase().includes(t)){s.push(r);continue}}return s}function Le(e,o){return x(e,"component").filter(s=>s.componentType===o)}function Me(e){let o=new Set,t=x(e,"component");for(let s of t)s.componentType&&o.add(s.componentType);return Array.from(o).sort()}function De(e,o){return x(e,"component").filter(s=>s.parentSymbol===o)}function Ee(e,o){let t=I(e,o);return t?t.referencedBy.map(s=>I(e,s)).filter(s=>s!==void 0):[]}function _e(e,o){let t=I(e,o);return t?t.references.map(s=>I(e,s)).filter(s=>s!==void 0):[]}function ke(e,o){let t=[];for(let s of e.entries.values())s.tags?.includes(o)&&t.push(s);return t}function ze(e){let o=new Set;for(let t of e.entries.values())for(let s of t.tags||[])o.add(s);return Array.from(o).sort()}function Ne(e){let o={component:0,flow:0,gate:0,signal:0,aspect:0};for(let[t,s]of e.byType)t in o&&(o[t]=s.length);return o}function Fe(e){return Array.from(e.entries.values())}function K(e){if(e.length<2)return null;let o=e[0],t=e.slice(1);return oe(o)?{type:ee[o],name:t}:null}function Ge(e,o){return `${H[e]}${o}`}function Ue(e){return K(e)!==null}function Ve(e,o,t=10){let s=o.toLowerCase(),r=K(o);return r?x(e,r.type).filter(c=>c.symbol.toLowerCase().includes(s)).slice(0,t):ge(e,o).slice(0,t)}function be(e,o,t){if(b.isAbsolute(e))return {resolvedPath:e,baseUsed:"absolute",exists:$.existsSync(e)};let s=b.join(t,e);if($.existsSync(s))return {resolvedPath:s,baseUsed:"project-root",exists:true};let r=b.resolve(o,e);return $.existsSync(r)?{resolvedPath:r,baseUsed:"purpose-dir",exists:true}:{resolvedPath:s,baseUsed:"project-root",exists:false}}function We(e,o,t){if(b.isAbsolute(e)){let l=$.existsSync(e);return {rootResolves:l,purposeResolves:l,mismatch:false}}let s=$.existsSync(b.join(t,e)),r=$.existsSync(b.resolve(o,e));return {rootResolves:s,purposeResolves:r,mismatch:s!==r}}function Se(e,o){return e.includes("*")?new RegExp("^"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\\\*/g,".*")+"$").test(o):e===o}function Ye(e,o,t){let s=[],r=x(e,"aspect"),l=new Set;for(let c of r){let g=c.appliesTo||[];if(g.length!==0)for(let p of g)for(let f of o){if(!Se(p,f))continue;let u=c.anchors||[];if(u.length===0){let m=`${c.symbol}::__no-anchors__`;l.has(m)||(l.add(m),s.push({aspectSymbol:c.symbol,anchorRaw:null,kind:"no-anchors"}));}else {let m=c.filePath?b.isAbsolute(c.filePath)?c.filePath:b.resolve(t,c.filePath):t,h=c.filePath?b.dirname(m):t;for(let S of u){let C=`${c.symbol}::${S.raw}`;if(l.has(C))continue;be(S.path,h,t).exists||(l.add(C),s.push({aspectSymbol:c.symbol,anchorRaw:S.raw,kind:"missing-file"}));}}}}return s}export{ze as A,Ne as B,Fe as C,K as D,Ge as E,Ue as F,Ve as G,be as H,We as I,Ye as J,H as a,ee as b,we as c,pe as d,X as e,ue as f,Pe as g,ve as h,xe as i,Ce as j,Te as k,le as l,Re as m,he as n,je as o,I as p,Oe as q,x as r,Be as s,ge as t,Le as u,Me as v,De as w,Ee as x,_e as y,ke as z};
|