@lssm/app.cli-contractspec 1.42.7 → 1.42.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.42.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 9281db7: fix ModelRegistry
8
+ - Updated dependencies [9281db7]
9
+ - @lssm/bundle.contractspec-workspace@1.42.9
10
+ - @lssm/module.contractspec-examples@1.42.9
11
+ - @lssm/lib.contracts-transformers@1.42.9
12
+ - @lssm/lib.ai-providers@1.42.9
13
+ - @lssm/module.ai-chat@1.42.9
14
+ - @lssm/lib.contracts@1.42.9
15
+ - @lssm/lib.testing@1.42.9
16
+ - @lssm/lib.schema@1.42.9
17
+
18
+ ## 1.42.8
19
+
20
+ ### Patch Changes
21
+
22
+ - e07b5ac: fix
23
+ - Updated dependencies [e07b5ac]
24
+ - @lssm/bundle.contractspec-workspace@1.42.8
25
+ - @lssm/module.contractspec-examples@1.42.8
26
+ - @lssm/lib.contracts-transformers@1.42.8
27
+ - @lssm/lib.ai-providers@1.42.8
28
+ - @lssm/module.ai-chat@1.42.8
29
+ - @lssm/lib.contracts@1.42.8
30
+ - @lssm/lib.testing@1.42.8
31
+ - @lssm/lib.schema@1.42.8
32
+
3
33
  ## 1.42.7
4
34
 
5
35
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lssm/app.cli-contractspec
2
2
 
3
- Website: https://contractspec.lssm.tech/
3
+ Website: https://contractspec.io/
4
4
 
5
5
 
6
6
  **Stabilize your AI-generated code** — Define contracts once, generate consistent code across API, DB, UI, and events. Safe regeneration. No lock-in.
package/dist/bun/cli.js CHANGED
@@ -2949,7 +2949,7 @@ Follow the spec exactly and handle all defined cases.`}});var KT=m0(()=>{NL0();X
2949
2949
  `)}function YbD(D,Y){let{direction:J="TB",showVersions:z=!0,maxNodes:H=50}=Y,F=[`flowchart ${J}`],K=0;for(let w of D.features){if(K>=H)break;let E=lH(`F_${w.key}`);F.push(` ${E}["${qL(w.title??w.key)}"]`),K++;for(let P of w.operations){if(K>=H)break;let S=lH(`O_${P.key}_v${P.version}`),f=z?`${P.key}.v${P.version}`:P.key;F.push(` ${S}["${qL(f)}"]`),F.push(` ${E} --> ${S}`),K++}for(let P of w.events){if(K>=H)break;let S=lH(`E_${P.key}_v${P.version}`),f=z?`${P.key}.v${P.version}`:P.key;F.push(` ${S}["${qL(f)}"]`),F.push(` ${E} -.-> ${S}`),K++}for(let P of w.presentations){if(K>=H)break;let S=lH(`P_${P.key}_v${P.version}`),f=z?`${P.key}.v${P.version}`:P.key;F.push(` ${S}["${qL(f)}"]`),F.push(` ${E} --> ${S}`),K++}for(let P of w.opToPresentationLinks){let S=lH(`O_${P.op.key}_v${P.op.version}`),f=lH(`P_${P.pres.key}_v${P.pres.version}`);F.push(` ${S} --> ${f}`)}}return F.join(`
2950
2950
  `)}function JbD(D,Y){let J=_9$(D,Y);if(D.orphanedSpecs.length===0)return J;let z=J.split(`
2951
2951
  `);z.push(" subgraph orphaned [Orphaned Specs]");for(let H of D.orphanedSpecs.slice(0,20)){let F=lH(`orphan_${H.type}_${H.key}_v${H.version}`),K=`${H.key}.v${H.version}`;z.push(` ${F}["${qL(K)}"]:::orphan`)}return z.push(" end"),z.push(" classDef orphan stroke-dasharray: 5 5"),z.join(`
2952
- `)}function b9$(D,Y,J){let z=new Set,H=[];for(let F of D)for(let K of F[Y]){let w=`${K.key}.v${K.version}`;if(!z.has(w))z.add(w),H.push(K)}return H}function S9$(D){let Y=D.match(/^(.+)\.v(\d+)$/);if(!Y)return[void 0,void 0];return[Y[1],Number(Y[2])]}function lH(D){return D.replace(/[^a-zA-Z0-9_]/g,"_")}function qL(D){return D.replace(/"/g,"'").replace(/\[/g,"(").replace(/\]/g,")").replace(/\{/g,"(").replace(/\}/g,")")}var k9$=()=>{};var pE,Nk;var C70=m0(()=>{pE=["cli-config","vscode-settings","mcp-cursor","mcp-claude","cursor-rules","agents-md"],Nk={"cli-config":"CLI Configuration (.contractsrc.json)","vscode-settings":"VS Code Settings (.vscode/settings.json)","mcp-cursor":"MCP for Cursor (.cursor/mcp.json)","mcp-claude":"MCP for Claude Desktop","cursor-rules":"Cursor AI Rules (.cursor/rules/)","agents-md":"Project AI Guide (AGENTS.md)"}});function xN(D){let Y=D.isMonorepo&&D.scope==="package";return{$schema:"https://api.contractspec.lssm.tech/schemas/contractsrc.json",aiProvider:"claude",aiModel:"claude-sonnet-4-20250514",agentMode:"claude-code",outputDir:"./src",conventions:{operations:"contracts/operations",events:"contracts/events",presentations:"contracts/presentations",forms:"contracts/forms",features:"contracts/features"},defaultOwners:D.defaultOwners??["@team"],defaultTags:[],...Y&&D.packageName?{package:D.packageName}:{}}}function Rr(){return{"contractspec.validation.enabled":!0,"contractspec.validation.validateOnSave":!0,"contractspec.validation.validateOnOpen":!0,"contractspec.codeLens.enabled":!0,"contractspec.diagnostics.showWarnings":!0,"contractspec.diagnostics.showHints":!0,"contractspec.integrity.enabled":!0,"contractspec.integrity.checkOnSave":!0}}function AT(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function Pr(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function Cr(D){let Y=D.projectName??"this project",J=D.isMonorepo&&D.scope==="package"&&D.packageRoot?`${D.packageRoot.split("/").slice(-2).join("/")}/src/contracts`:"src/contracts";return`# ContractSpec Development Rules
2952
+ `)}function b9$(D,Y,J){let z=new Set,H=[];for(let F of D)for(let K of F[Y]){let w=`${K.key}.v${K.version}`;if(!z.has(w))z.add(w),H.push(K)}return H}function S9$(D){let Y=D.match(/^(.+)\.v(\d+)$/);if(!Y)return[void 0,void 0];return[Y[1],Number(Y[2])]}function lH(D){return D.replace(/[^a-zA-Z0-9_]/g,"_")}function qL(D){return D.replace(/"/g,"'").replace(/\[/g,"(").replace(/\]/g,")").replace(/\{/g,"(").replace(/\}/g,")")}var k9$=()=>{};var pE,Nk;var C70=m0(()=>{pE=["cli-config","vscode-settings","mcp-cursor","mcp-claude","cursor-rules","agents-md"],Nk={"cli-config":"CLI Configuration (.contractsrc.json)","vscode-settings":"VS Code Settings (.vscode/settings.json)","mcp-cursor":"MCP for Cursor (.cursor/mcp.json)","mcp-claude":"MCP for Claude Desktop","cursor-rules":"Cursor AI Rules (.cursor/rules/)","agents-md":"Project AI Guide (AGENTS.md)"}});function xN(D){let Y=D.isMonorepo&&D.scope==="package";return{$schema:"https://api.contractspec.io/schemas/contractsrc.json",aiProvider:"claude",aiModel:"claude-sonnet-4-20250514",agentMode:"claude-code",outputDir:"./src",conventions:{operations:"contracts/operations",events:"contracts/events",presentations:"contracts/presentations",forms:"contracts/forms",features:"contracts/features"},defaultOwners:D.defaultOwners??["@team"],defaultTags:[],...Y&&D.packageName?{package:D.packageName}:{}}}function Rr(){return{"contractspec.validation.enabled":!0,"contractspec.validation.validateOnSave":!0,"contractspec.validation.validateOnOpen":!0,"contractspec.codeLens.enabled":!0,"contractspec.diagnostics.showWarnings":!0,"contractspec.diagnostics.showHints":!0,"contractspec.integrity.enabled":!0,"contractspec.integrity.checkOnSave":!0}}function AT(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function Pr(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function Cr(D){let Y=D.projectName??"this project",J=D.isMonorepo&&D.scope==="package"&&D.packageRoot?`${D.packageRoot.split("/").slice(-2).join("/")}/src/contracts`:"src/contracts";return`# ContractSpec Development Rules
2953
2953
 
2954
2954
  This project uses ContractSpec for spec-first development. Follow these guidelines when working with AI agents.
2955
2955
 
@@ -3191,7 +3191,7 @@ Match types:
3191
3191
  `)}configure(D){this.config={...this.config,...D}}generateSummary(D,Y){let J=[],z=D.every((E)=>E.passed),H=D.length>0?Math.round(D.reduce((E,P)=>E+P.score,0)/D.length):100;J.push(z?"\u2713 Verification passed":"\u2717 Verification failed"),J.push(`Score: ${H}/100`),J.push("");for(let E of D){let P=E.passed?"\u2713":"\u2717";J.push(`${P} ${E.tier}: ${E.score}/100`)}J.push("");let F=Y.filter((E)=>E.severity==="error"),K=Y.filter((E)=>E.severity==="warning"),w=Y.filter((E)=>E.severity==="info");if(F.length>0)J.push(`Errors: ${F.length}`);if(K.length>0)J.push(`Warnings: ${K.length}`);if(w.length>0)J.push(`Info: ${w.length}`);return J.join(`
3192
3192
  `)}formatTierName(D){switch(D){case"structure":return"Tier 1: Structure";case"behavior":return"Tier 2: Behavior";case"ai_review":return"Tier 3: AI Review";default:return D}}},dL0;var cL0=m0(()=>{u70();m70();c70();ASD={verbose:!1},OSD=["structure","behavior","ai_review"];dL0=new lr});var pr;var l70=m0(()=>{pr={maxEntries:1000,defaultTtlMs:86400000,structureTtlMs:604800000,behaviorTtlMs:86400000,aiTtlMs:86400000,transitiveInvalidation:!0}});import{createHash as wSD}from"crypto";function ir(D){return wSD("sha256").update(D).digest("hex")}function nr(D){let Y=[`spec:${D.specHash.substring(0,16)}`,`impl:${D.implHash.substring(0,16)}`,`tier:${D.tier}`];if(D.aiModelVersion)Y.push(`model:${D.aiModelVersion}`);return Y.join("|")}function p70(D){try{let Y=D.split("|"),J=new Map;for(let K of Y){let[w,E]=K.split(":");if(w&&E)J.set(w,E)}let z=J.get("spec"),H=J.get("impl"),F=J.get("tier");if(!z||!H||!F)return null;return{specHash:z,implHash:H,tier:F,aiModelVersion:J.get("model")}}catch{return null}}function LSD(D,Y){switch(D){case"structure":return Y.structureTtlMs;case"behavior":return Y.behaviorTtlMs;case"ai_review":return Y.aiTtlMs;default:return Y.defaultTtlMs}}function rr(D,Y){return new i70(D,Y)}var i70=class{storage;config;stats;constructor(D,Y={}){this.storage=D,this.config={...pr,...Y},this.stats={hits:0,misses:0}}createKey(D,Y,J,z){return{specHash:ir(D),implHash:ir(Y),tier:J,aiModelVersion:J==="ai_review"?z:void 0}}async lookup(D){let Y=nr(D),J=await this.storage.get(Y);if(!J)return this.stats.misses++,{hit:!1,reason:"not_found"};if(J.meta.expiresAt){let z=new Date(J.meta.expiresAt).getTime();if(Date.now()>z)return this.stats.misses++,await this.storage.delete(Y),{hit:!1,reason:"expired"}}if(J.key.specHash!==D.specHash)return this.stats.misses++,{hit:!1,reason:"spec_changed"};if(J.key.implHash!==D.implHash)return this.stats.misses++,{hit:!1,reason:"impl_changed"};if(D.tier==="ai_review"&&D.aiModelVersion&&J.key.aiModelVersion!==D.aiModelVersion)return this.stats.misses++,{hit:!1,reason:"model_changed"};return this.stats.hits++,{hit:!0,entry:J}}async store(D,Y,J={}){let z=nr(D),H=LSD(D.tier,this.config),F={key:D,result:Y,meta:{createdAt:new Date().toISOString(),expiresAt:new Date(Date.now()+H).toISOString(),dependencies:J.dependencies??[],specName:J.specName,implPath:J.implPath}};await this.storage.set(z,F),await this.pruneIfNeeded()}async invalidateForFile(D){if(!this.config.transitiveInvalidation)return 0;let Y=await this.storage.keys(),J=0;for(let z of Y){let H=await this.storage.get(z);if(!H)continue;if(H.meta.dependencies.includes(D))await this.storage.delete(z),J++;if(H.meta.specName===D||H.meta.implPath===D)await this.storage.delete(z),J++}return J}async invalidateForSpec(D){let Y=await this.storage.keys(),J=0;for(let z of Y){let H=p70(z);if(H&&H.specHash.startsWith(D.substring(0,16)))await this.storage.delete(z),J++}return J}async clear(){await this.storage.clear(),this.stats={hits:0,misses:0}}async getStats(){let D=await this.storage.stats?.();return{totalEntries:D?.entryCount??(await this.storage.keys()).length,hits:this.stats.hits,misses:this.stats.misses,hitRate:this.stats.hits+this.stats.misses>0?Math.round(this.stats.hits/(this.stats.hits+this.stats.misses)*100):0,memoryUsage:D?.memoryUsage}}async pruneIfNeeded(){let D=await this.storage.keys();if(D.length<=this.config.maxEntries)return;let Y=[];for(let z of D){let H=await this.storage.get(z);if(H)Y.push({key:z,createdAt:new Date(H.meta.createdAt).getTime()})}Y.sort((z,H)=>z.createdAt-H.createdAt);let J=Y.length-this.config.maxEntries;for(let z=0;z<J;z++){let H=Y[z];if(H)await this.storage.delete(H.key)}}};var lL0=m0(()=>{l70()});function n70(){return new or}var or=class{cache=new Map;async get(D){return this.cache.get(D)??null}async set(D,Y){this.cache.set(D,Y)}async delete(D){return this.cache.delete(D)}async has(D){return this.cache.has(D)}async keys(){return Array.from(this.cache.keys())}async clear(){this.cache.clear()}async stats(){let D=0;for(let[Y,J]of this.cache.entries())D+=Y.length*2,D+=JSON.stringify(J).length*2;return{entryCount:this.cache.size,memoryUsage:D}}};var r70=()=>{};import{dirname as ISD,join as ESD}from"path";import{existsSync as i9$,mkdirSync as MSD,readFileSync as jSD,renameSync as NSD,statSync as RSD,writeFileSync as PSD}from"fs";function xg(D,Y){return new sr(D,Y)}var CSD=".contractspec/verification-cache.json",i46=1,sr=class{filePath;cache;isDirty=!1;constructor(D,Y){let J=Y??process.cwd();this.filePath=D??ESD(J,CSD),this.cache=new Map,this.loadSync()}loadSync(){try{if(!i9$(this.filePath))return;let D=jSD(this.filePath,"utf-8"),Y=JSON.parse(D);if(Y.version!==i46)return;for(let[J,z]of Object.entries(Y.entries))this.cache.set(J,z)}catch{}}saveSync(){if(!this.isDirty)return;try{let D=ISD(this.filePath);if(!i9$(D))MSD(D,{recursive:!0});let Y={version:i46,entries:Object.fromEntries(this.cache.entries())},J=`${this.filePath}.tmp`;PSD(J,JSON.stringify(Y,null,2),"utf-8"),NSD(J,this.filePath),this.isDirty=!1}catch{}}async get(D){return this.cache.get(D)??null}async set(D,Y){this.cache.set(D,Y),this.isDirty=!0,this.saveSync()}async delete(D){let Y=this.cache.delete(D);if(Y)this.isDirty=!0,this.saveSync();return Y}async has(D){return this.cache.has(D)}async keys(){return Array.from(this.cache.keys())}async clear(){this.cache.clear(),this.isDirty=!0,this.saveSync()}async stats(){let D=0;try{if(i9$(this.filePath))D=RSD(this.filePath).size}catch{}return{entryCount:this.cache.size,memoryUsage:D}}flush(){this.saveSync()}reload(){this.cache.clear(),this.loadSync(),this.isDirty=!1}};var o70=()=>{};function s70(D){return new ar(D)}var ar=class{store;keyIndex;constructor(D){this.store=D,this.keyIndex=new Set(this.loadKeyIndex())}loadKeyIndex(){try{return this.store.get("contractspec.verification-cache.__index__")??[]}catch{return[]}}async saveKeyIndex(){await this.store.update("contractspec.verification-cache.__index__",Array.from(this.keyIndex))}getStorageKey(D){return`contractspec.verification-cache.${D}`}async get(D){let Y=this.getStorageKey(D);return this.store.get(Y)??null}async set(D,Y){let J=this.getStorageKey(D);if(await this.store.update(J,Y),!this.keyIndex.has(D))this.keyIndex.add(D),await this.saveKeyIndex()}async delete(D){let Y=this.getStorageKey(D),J=this.keyIndex.has(D);if(J)await this.store.update(Y,void 0),this.keyIndex.delete(D),await this.saveKeyIndex();return J}async has(D){return this.keyIndex.has(D)}async keys(){return Array.from(this.keyIndex)}async clear(){for(let D of this.keyIndex){let Y=this.getStorageKey(D);await this.store.update(Y,void 0)}this.keyIndex.clear(),await this.saveKeyIndex()}async stats(){return{entryCount:this.keyIndex.size}}};var a70=()=>{};function yg(D){return D==="minimal"?tr:t70}function fg(D){return D.filter((Y)=>!Y.dev)}function hg(D){return D.filter((Y)=>Y.dev)}var tr,t70;var e70=m0(()=>{tr=[{name:"@lssm/lib.contracts",description:"Core ContractSpec library for defining commands, queries, and events"},{name:"zod",description:"Schema validation library (peer dependency)"}],t70=[...tr,{name:"@lssm/lib.schema",description:"Extended schema utilities and common types"},{name:"@lssm/app.cli-contractspec",dev:!0,description:"ContractSpec CLI for validation, scaffolding, and code generation"},{name:"typescript",dev:!0,description:"TypeScript compiler for type checking"}]});import{exec as TSD}from"child_process";import{promisify as bSD}from"util";async function er(D,Y,J=_SD){let z=yg(Y.mode),H=fg(z),F=hg(z),K=[],w=[],E=[],P=D.join(Y.workspaceRoot,"package.json");if(!await D.exists(P))return{success:!1,installed:[],skipped:[],errors:[{name:"package.json",action:"error",message:"No package.json found. Run `npm init` first."}],summary:"No package.json found in workspace root."};let S=await D.readFile(P),f=JSON.parse(S),b=new Set([...Object.keys(f.dependencies??{}),...Object.keys(f.devDependencies??{})]),m=T_(Y.workspaceRoot),s=H.filter((M0)=>{if(b.has(M0.name)&&!Y.force)return w.push({name:M0.name,action:"skipped",message:"Already installed",dev:!1}),!1;return!0}),p=F.filter((M0)=>{if(b.has(M0.name)&&!Y.force)return w.push({name:M0.name,action:"skipped",message:"Already installed",dev:!0}),!1;return!0});if(Y.dryRun){let M0=[...s,...p];return{success:!0,installed:M0.map((v0)=>({name:v0.name,action:"installed",message:`Would install: ${v0.description}`,dev:v0.dev})),skipped:w,errors:[],summary:`Dry run: would install ${M0.length} package(s), skip ${w.length}.`}}if(!Y.skipPrompts&&(s.length>0||p.length>0)){let M0=s.length+p.length;if(!await J.confirm(`Install ${M0} package(s) using ${m}?`))return{success:!0,installed:[],skipped:[...w,...s.map((v0)=>({name:v0.name,action:"skipped",message:"User cancelled"})),...p.map((v0)=>({name:v0.name,action:"skipped",message:"User cancelled",dev:!0}))],errors:[],summary:"Installation cancelled by user."}}if(s.length>0){let M0=await n46(s,m,Y.workspaceRoot,!1);for(let v0 of M0)if(v0.action==="installed")K.push(v0);else E.push(v0)}if(p.length>0){let M0=await n46(p,m,Y.workspaceRoot,!0);for(let v0 of M0)if(v0.action==="installed")K.push(v0);else E.push(v0)}let V0=E.length===0;return{success:V0,installed:K,skipped:w,errors:E,summary:V0?`Successfully installed ${K.length} package(s), skipped ${w.length}.`:`Installed ${K.length}, skipped ${w.length}, failed ${E.length}.`}}async function n46(D,Y,J,z){let H=[],F=D.map((K)=>K.version?`${K.name}@${K.version}`:K.name);try{await SSD(`${S_(Y,z)} ${F.join(" ")}`,{cwd:J,timeout:120000});for(let K of D)H.push({name:K.name,action:"installed",message:K.description,dev:z})}catch(K){let w=K instanceof Error?K.message:String(K);for(let E of D)H.push({name:E.name,action:"error",message:`Failed to install: ${w}`,dev:z})}return H}async function $o(D,Y){let J=D.join(Y,"package.json");try{let z=await D.readFile(J),H=JSON.parse(z);return"@lssm/lib.contracts"in{...H.dependencies,...H.devDependencies}}catch{return!1}}function Do(D){let Y=yg(D),J=[];J.push(`ContractSpec ${D} installation:`),J.push("");let z=fg(Y);if(z.length>0){J.push("Dependencies:");for(let F of z)J.push(` \u2022 ${F.name} - ${F.description}`)}let H=hg(Y);if(H.length>0){J.push(""),J.push("Dev Dependencies:");for(let F of H)J.push(` \u2022 ${F.name} - ${F.description}`)}return J.join(`
3193
3193
  `)}var SSD,_SD;var pL0=m0(()=>{__();e70();SSD=bSD(TSD),_SD={confirm:async()=>!0,select:async(D,Y)=>Y[0]?.value??""}});async function r46(D,Y={}){let{fs:J,git:z,logger:H}=D,F=Y.workspaceRoot??process.cwd();H.info("Starting impact detection...",{baseline:Y.baseline});let K=(await J.glob({pattern:Y.pattern??"**/*.{operation,event}.ts",cwd:F})).filter((f)=>!f.includes(".test.")&&!f.includes(".spec.")&&!f.includes("node_modules"));H.debug(`Found ${K.length} spec files`);let w=(0,Xo.generateSnapshot)(await kSD(J,K,F)),E;if(Y.baseline)E=(0,Xo.generateSnapshot)(await vSD(J,z,K,Y.baseline,F));else E={version:1,generatedAt:"",specs:[],hash:""};let P=xSD(E.specs,w.specs),S=(0,Xo.classifyImpact)(E.specs,w.specs,P);return H.info("Impact detection complete",{status:S.status,breaking:S.summary.breaking,nonBreaking:S.summary.nonBreaking}),{...S,workspaceRoot:F,specsAnalyzed:K.length,baseRef:Y.baseline}}async function kSD(D,Y,J){let z=[];for(let H of Y){let F=await D.readFile(H);z.push({path:H,content:F})}return z}async function vSD(D,Y,J,z,H){let F=[];for(let K of J)try{let w=await Y.showFile(z,K);F.push({path:K,content:w})}catch{}return F}function xSD(D,Y){let J=[],z=new Map(D.map((F)=>[`${F.key}@${F.version}`,F])),H=new Map(Y.map((F)=>[`${F.key}@${F.version}`,F]));for(let[F,K]of H){let w=z.get(F);if(w&&K.type==="operation"&&w.type==="operation"){let E=(0,Xo.computeIoDiff)(w.io,K.io);J.push(...E)}}return J}var o46=m0(()=>{hQ()});function s46(D,Y={template:"detailed"}){let J=[];if(J.push("## \uD83D\uDCCB ContractSpec Impact Analysis"),J.push(""),D.hasBreaking)J.push("\u274C **Breaking changes detected**");else if(D.hasNonBreaking)J.push("\u26A0\uFE0F **Contract changed (non-breaking)**");else J.push("\u2705 **No contract impact**");if(J.push(""),D.summary.breaking>0||D.summary.nonBreaking>0||D.summary.info>0){if(J.push("### Summary"),J.push(""),J.push("| Type | Count |"),J.push("|------|-------|"),D.summary.breaking>0)J.push(`| \uD83D\uDD34 Breaking | ${D.summary.breaking} |`);if(D.summary.nonBreaking>0)J.push(`| \uD83D\uDFE1 Non-breaking | ${D.summary.nonBreaking} |`);if(D.summary.info>0)J.push(`| \uD83D\uDD35 Info | ${D.summary.info} |`);if(D.summary.added>0)J.push(`| \u2795 Added | ${D.summary.added} |`);if(D.summary.removed>0)J.push(`| \u2796 Removed | ${D.summary.removed} |`);J.push("")}if(Y.template==="detailed"&&D.deltas.length>0){J.push("### Changes"),J.push("");let z=D.deltas.filter((F)=>F.severity==="breaking"),H=D.deltas.filter((F)=>F.severity==="non_breaking");if(z.length>0){J.push("#### \uD83D\uDD34 Breaking Changes"),J.push("");for(let F of z)J.push(`- **${F.specKey}**: ${F.description}`);J.push("")}if(H.length>0){J.push("#### \uD83D\uDFE1 Non-breaking Changes"),J.push("");for(let F of H)J.push(`- **${F.specKey}**: ${F.description}`);J.push("")}}if(D.addedSpecs.length>0){J.push("### Added Specs"),J.push("");for(let z of D.addedSpecs)J.push(`- \`${z.key}\` v${z.version} (${z.type})`);J.push("")}if(D.removedSpecs.length>0){J.push("### Removed Specs"),J.push("");for(let z of D.removedSpecs)J.push(`- \`${z.key}\` v${z.version} (${z.type})`);J.push("")}return J.push("---"),J.push(`*Generated by ContractSpec at ${D.timestamp}*`),J.join(`
3194
- `)}function n9$(D){if(D.hasBreaking)return`\u274C **Breaking changes detected** (${D.summary.breaking} breaking, ${D.summary.nonBreaking} non-breaking)`;if(D.hasNonBreaking)return`\u26A0\uFE0F **Contract changed** (${D.summary.nonBreaking} non-breaking changes)`;return"\u2705 **No contract impact**"}function a46(D,Y,J={}){let z=J.key??"ContractSpec Impact",H=J.failOnBreaking??!0,F,K;if(D.hasBreaking)F=H?"failure":"neutral",K=`Breaking changes detected (${D.summary.breaking})`;else if(D.hasNonBreaking)F="success",K=`Non-breaking changes (${D.summary.nonBreaking})`;else F="success",K="No contract impact";let w=n9$(D);return{name:z,headSha:Y,conclusion:F,title:K,summary:w,annotations:D.deltas.filter((E)=>E.severity==="breaking").slice(0,50).map((E)=>({path:E.path,startLine:1,endLine:1,annotationLevel:"failure",message:E.description,title:`Breaking: ${E.rule}`}))}}function t46(D){return JSON.stringify(D,null,2)}var e46=()=>{};var vk;var r9$=m0(()=>{wC();o46();e46();vk=_Z({detectImpact:()=>r46,formatCheckRun:()=>a46,formatJson:()=>t46,formatMinimalComment:()=>n9$,formatPrComment:()=>s46})});var $96=m0(()=>{jV0();RV0();CV0();CL0()});var D96=m0(()=>{C70();ZL();yN();SL0()});var X96=m0(()=>{b70();S70()});var Y96=m0(()=>{yL0();hL0()});var J96=m0(()=>{y70();f70();h70();g70();uL0()});var W96=m0(()=>{u70();m70();c70();cL0()});var Q96=m0(()=>{v70();x70()});var z96=m0(()=>{r70();o70();a70()});var H96=m0(()=>{l70();lL0();r70();o70();a70();z96()});var G96=m0(()=>{e70();pL0()});var B96=m0(()=>{__();V80();KK0();Sa0();VK0();ka0();AK0();E80();jV0();RV0();CV0();CL0();$96();F9$();q9$();U9$();V9$();O9$();L9$();N9$();TL0();k9$();C70();ZL();yN();SL0();D96();b70();S70();X96();yL0();v70();x70();hL0();Y96();y70();f70();h70();g70();uL0();J96();u70();m70();c70();cL0();W96();Q96();l70();lL0();r70();o70();a70();H96();e70();pL0();G96();r9$()});function q96(D,Y={}){let{toolName:J="ContractSpec",toolVersion:z="1.0.0",toolUri:H="https://contractspec.lssm.tech",repositoryUri:F,workingDirectory:K}=Y,w=new Map,E=new Map,P=D.issues.filter((m)=>m.file);for(let m of P)if(!w.has(m.ruleId)){let s=ySD[m.ruleId]??{name:m.ruleId,description:`Rule: ${m.ruleId}`},p={id:m.ruleId,name:s.name,shortDescription:{text:s.description},defaultConfiguration:{level:F96(m.severity)}};if(s.helpUri)p.helpUri=s.helpUri;E.set(m.ruleId,w.size),w.set(m.ruleId,p)}let S=P.map((m)=>{let s={ruleId:m.ruleId,ruleIndex:E.get(m.ruleId)??0,level:F96(m.severity),message:{text:m.message}},p={physicalLocation:{artifactLocation:{uri:fSD(m.file),uriBaseId:"%SRCROOT%"}}};if(m.line!==void 0)p.physicalLocation.region={startLine:m.line,startColumn:m.column??1,endLine:m.endLine??m.line,endColumn:m.endColumn};return s.locations=[p],s.partialFingerprints={primaryLocationLineHash:hSD(m)},s}),f=[];if(F)f.push({repositoryUri:F,revisionId:D.commitSha,branch:D.branch});let b={tool:{driver:{name:J,version:z,informationUri:H,rules:Array.from(w.values())}},results:S,invocations:[{executionSuccessful:D.success,endTimeUtc:D.timestamp,...K&&{workingDirectory:{uri:K}}}]};if(f.length>0)b.versionControlProvenance=f;return{$schema:"https://json.schemastore.org/sarif-2.1.0.json",version:"2.1.0",runs:[b]}}function F96(D){switch(D){case"error":return"error";case"warning":return"warning";case"note":return"note";default:return"warning"}}function fSD(D){return D.replace(/^\.\//,"").replace(/\\/g,"/")}function hSD(D){let Y=[D.ruleId,D.file??"",D.message];return Buffer.from(Y.join("|")).toString("base64").slice(0,16)}function Z96(D){return JSON.stringify(D,null,2)}var ySD;var U96=m0(()=>{ySD={"spec-structure-error":{name:"Spec Structure Error",description:"Contract specification is missing required structure elements"},"spec-structure-warning":{name:"Spec Structure Warning",description:"Contract specification has recommended but missing elements"},"integrity-orphaned":{name:"Orphaned Spec",description:"Contract specification is not linked to any feature"},"integrity-unresolved-ref":{name:"Unresolved Reference",description:"Contract specification references a non-existent spec"},"integrity-missing-feature":{name:"Missing Feature",description:"Feature referenced by spec does not exist"},"integrity-broken-link":{name:"Broken Link",description:"Link between specs is broken"},"deps-circular":{name:"Circular Dependency",description:"Circular dependency detected between contracts"},"deps-missing":{name:"Missing Dependency",description:"Contract depends on a non-existent contract"},"handler-missing":{name:"Missing Handler",description:"Handler implementation file does not exist for this contract"},"handler-warning":{name:"Handler Warning",description:"Handler implementation has potential issues"},"test-missing":{name:"Missing Test",description:"Test file does not exist for this contract"},"test-warning":{name:"Test Warning",description:"Test implementation has potential issues"}}});function o9$(D){return{success:D.success,errors:D.totalErrors,warnings:D.totalWarnings,duration:D.durationMs,timestamp:D.timestamp,commit:D.commitSha,branch:D.branch,issues:D.issues.map((Y)=>({rule:Y.ruleId,severity:Y.severity,message:Y.message,file:Y.file,line:Y.line}))}}function s9$(D){return{success:D.success,summary:{totalErrors:D.totalErrors,totalWarnings:D.totalWarnings,totalNotes:D.totalNotes,durationMs:D.durationMs,timestamp:D.timestamp,commitSha:D.commitSha,branch:D.branch},categories:D.categories.map((Y)=>({category:Y.category,label:Y.label,passed:Y.passed,errors:Y.errors,warnings:Y.warnings,notes:Y.notes,durationMs:Y.durationMs})),issues:D.issues.map((Y)=>({ruleId:Y.ruleId,severity:Y.severity,message:Y.message,category:Y.category,file:Y.file,line:Y.line,column:Y.column,endLine:Y.endLine,endColumn:Y.endColumn,context:Y.context}))}}function K96(D,Y={}){let{pretty:J=!0,includeDetails:z=!0}=Y,H=z?s9$(D):o9$(D);return J?JSON.stringify(H,null,2):JSON.stringify(H)}var V96=()=>{};function a9$(D,Y={}){let J=[],{verbose:z=!1,showTiming:H=!0,groupByFile:F=!1}=Y;if(J.push({text:"",style:"normal"}),J.push({text:"\uD83D\uDCCB ContractSpec CI Check Results",style:"bold"}),J.push({text:"",style:"normal"}),D.commitSha||D.branch){let w=[D.branch?`branch: ${D.branch}`:null,D.commitSha?`commit: ${D.commitSha.slice(0,7)}`:null].filter(Boolean).join(", ");J.push({text:`Git: ${w}`,style:"muted"})}J.push({text:"",style:"normal"}),J.push({text:"Check Results:",style:"bold"});for(let w of D.categories){let E=w.passed?"\u2713":"\u2717",P=w.passed?"success":"error",S=gSD(w),f=H?` (${w.durationMs}ms)`:"";J.push({text:` ${E} ${w.label}: ${S}${f}`,style:P})}if(D.issues.length>0)if(J.push({text:"",style:"normal"}),J.push({text:"Issues:",style:"bold"}),F){let w=uSD(D.issues);for(let[E,P]of w){J.push({text:"",style:"normal"}),J.push({text:` ${E||"(no file)"}`,style:"bold",indent:1});for(let S of P)J.push(...iL0(S,z,2))}}else{let w=D.issues.filter((S)=>S.severity==="error"),E=D.issues.filter((S)=>S.severity==="warning"),P=D.issues.filter((S)=>S.severity==="note");if(w.length>0){J.push({text:"",style:"normal"}),J.push({text:" Errors:",style:"error",indent:1});for(let S of w)J.push(...iL0(S,z,2))}if(E.length>0){J.push({text:"",style:"normal"}),J.push({text:" Warnings:",style:"warning",indent:1});for(let S of E)J.push(...iL0(S,z,2))}if(P.length>0&&z){J.push({text:"",style:"normal"}),J.push({text:" Notes:",style:"muted",indent:1});for(let S of P)J.push(...iL0(S,z,2))}}J.push({text:"",style:"normal"}),J.push({text:"\u2500".repeat(50),style:"muted"});let K=[D.totalErrors>0?`${D.totalErrors} error(s)`:null,D.totalWarnings>0?`${D.totalWarnings} warning(s)`:null,D.totalNotes>0&&z?`${D.totalNotes} note(s)`:null].filter(Boolean);if(K.length>0)J.push({text:`Found: ${K.join(", ")}`,style:D.success?"warning":"error"});if(H)J.push({text:`Duration: ${D.durationMs}ms`,style:"muted"});if(J.push({text:"",style:"normal"}),D.success)J.push({text:"\u2705 All CI checks passed!",style:"success"});else J.push({text:"\u274C CI checks failed",style:"error"});return J.push({text:"",style:"normal"}),J}function A96(D,Y={}){return a9$(D,Y).map((J)=>" ".repeat(J.indent??0)+J.text).join(`
3194
+ `)}function n9$(D){if(D.hasBreaking)return`\u274C **Breaking changes detected** (${D.summary.breaking} breaking, ${D.summary.nonBreaking} non-breaking)`;if(D.hasNonBreaking)return`\u26A0\uFE0F **Contract changed** (${D.summary.nonBreaking} non-breaking changes)`;return"\u2705 **No contract impact**"}function a46(D,Y,J={}){let z=J.key??"ContractSpec Impact",H=J.failOnBreaking??!0,F,K;if(D.hasBreaking)F=H?"failure":"neutral",K=`Breaking changes detected (${D.summary.breaking})`;else if(D.hasNonBreaking)F="success",K=`Non-breaking changes (${D.summary.nonBreaking})`;else F="success",K="No contract impact";let w=n9$(D);return{name:z,headSha:Y,conclusion:F,title:K,summary:w,annotations:D.deltas.filter((E)=>E.severity==="breaking").slice(0,50).map((E)=>({path:E.path,startLine:1,endLine:1,annotationLevel:"failure",message:E.description,title:`Breaking: ${E.rule}`}))}}function t46(D){return JSON.stringify(D,null,2)}var e46=()=>{};var vk;var r9$=m0(()=>{wC();o46();e46();vk=_Z({detectImpact:()=>r46,formatCheckRun:()=>a46,formatJson:()=>t46,formatMinimalComment:()=>n9$,formatPrComment:()=>s46})});var $96=m0(()=>{jV0();RV0();CV0();CL0()});var D96=m0(()=>{C70();ZL();yN();SL0()});var X96=m0(()=>{b70();S70()});var Y96=m0(()=>{yL0();hL0()});var J96=m0(()=>{y70();f70();h70();g70();uL0()});var W96=m0(()=>{u70();m70();c70();cL0()});var Q96=m0(()=>{v70();x70()});var z96=m0(()=>{r70();o70();a70()});var H96=m0(()=>{l70();lL0();r70();o70();a70();z96()});var G96=m0(()=>{e70();pL0()});var B96=m0(()=>{__();V80();KK0();Sa0();VK0();ka0();AK0();E80();jV0();RV0();CV0();CL0();$96();F9$();q9$();U9$();V9$();O9$();L9$();N9$();TL0();k9$();C70();ZL();yN();SL0();D96();b70();S70();X96();yL0();v70();x70();hL0();Y96();y70();f70();h70();g70();uL0();J96();u70();m70();c70();cL0();W96();Q96();l70();lL0();r70();o70();a70();H96();e70();pL0();G96();r9$()});function q96(D,Y={}){let{toolName:J="ContractSpec",toolVersion:z="1.0.0",toolUri:H="https://contractspec.io",repositoryUri:F,workingDirectory:K}=Y,w=new Map,E=new Map,P=D.issues.filter((m)=>m.file);for(let m of P)if(!w.has(m.ruleId)){let s=ySD[m.ruleId]??{name:m.ruleId,description:`Rule: ${m.ruleId}`},p={id:m.ruleId,name:s.name,shortDescription:{text:s.description},defaultConfiguration:{level:F96(m.severity)}};if(s.helpUri)p.helpUri=s.helpUri;E.set(m.ruleId,w.size),w.set(m.ruleId,p)}let S=P.map((m)=>{let s={ruleId:m.ruleId,ruleIndex:E.get(m.ruleId)??0,level:F96(m.severity),message:{text:m.message}},p={physicalLocation:{artifactLocation:{uri:fSD(m.file),uriBaseId:"%SRCROOT%"}}};if(m.line!==void 0)p.physicalLocation.region={startLine:m.line,startColumn:m.column??1,endLine:m.endLine??m.line,endColumn:m.endColumn};return s.locations=[p],s.partialFingerprints={primaryLocationLineHash:hSD(m)},s}),f=[];if(F)f.push({repositoryUri:F,revisionId:D.commitSha,branch:D.branch});let b={tool:{driver:{name:J,version:z,informationUri:H,rules:Array.from(w.values())}},results:S,invocations:[{executionSuccessful:D.success,endTimeUtc:D.timestamp,...K&&{workingDirectory:{uri:K}}}]};if(f.length>0)b.versionControlProvenance=f;return{$schema:"https://json.schemastore.org/sarif-2.1.0.json",version:"2.1.0",runs:[b]}}function F96(D){switch(D){case"error":return"error";case"warning":return"warning";case"note":return"note";default:return"warning"}}function fSD(D){return D.replace(/^\.\//,"").replace(/\\/g,"/")}function hSD(D){let Y=[D.ruleId,D.file??"",D.message];return Buffer.from(Y.join("|")).toString("base64").slice(0,16)}function Z96(D){return JSON.stringify(D,null,2)}var ySD;var U96=m0(()=>{ySD={"spec-structure-error":{name:"Spec Structure Error",description:"Contract specification is missing required structure elements"},"spec-structure-warning":{name:"Spec Structure Warning",description:"Contract specification has recommended but missing elements"},"integrity-orphaned":{name:"Orphaned Spec",description:"Contract specification is not linked to any feature"},"integrity-unresolved-ref":{name:"Unresolved Reference",description:"Contract specification references a non-existent spec"},"integrity-missing-feature":{name:"Missing Feature",description:"Feature referenced by spec does not exist"},"integrity-broken-link":{name:"Broken Link",description:"Link between specs is broken"},"deps-circular":{name:"Circular Dependency",description:"Circular dependency detected between contracts"},"deps-missing":{name:"Missing Dependency",description:"Contract depends on a non-existent contract"},"handler-missing":{name:"Missing Handler",description:"Handler implementation file does not exist for this contract"},"handler-warning":{name:"Handler Warning",description:"Handler implementation has potential issues"},"test-missing":{name:"Missing Test",description:"Test file does not exist for this contract"},"test-warning":{name:"Test Warning",description:"Test implementation has potential issues"}}});function o9$(D){return{success:D.success,errors:D.totalErrors,warnings:D.totalWarnings,duration:D.durationMs,timestamp:D.timestamp,commit:D.commitSha,branch:D.branch,issues:D.issues.map((Y)=>({rule:Y.ruleId,severity:Y.severity,message:Y.message,file:Y.file,line:Y.line}))}}function s9$(D){return{success:D.success,summary:{totalErrors:D.totalErrors,totalWarnings:D.totalWarnings,totalNotes:D.totalNotes,durationMs:D.durationMs,timestamp:D.timestamp,commitSha:D.commitSha,branch:D.branch},categories:D.categories.map((Y)=>({category:Y.category,label:Y.label,passed:Y.passed,errors:Y.errors,warnings:Y.warnings,notes:Y.notes,durationMs:Y.durationMs})),issues:D.issues.map((Y)=>({ruleId:Y.ruleId,severity:Y.severity,message:Y.message,category:Y.category,file:Y.file,line:Y.line,column:Y.column,endLine:Y.endLine,endColumn:Y.endColumn,context:Y.context}))}}function K96(D,Y={}){let{pretty:J=!0,includeDetails:z=!0}=Y,H=z?s9$(D):o9$(D);return J?JSON.stringify(H,null,2):JSON.stringify(H)}var V96=()=>{};function a9$(D,Y={}){let J=[],{verbose:z=!1,showTiming:H=!0,groupByFile:F=!1}=Y;if(J.push({text:"",style:"normal"}),J.push({text:"\uD83D\uDCCB ContractSpec CI Check Results",style:"bold"}),J.push({text:"",style:"normal"}),D.commitSha||D.branch){let w=[D.branch?`branch: ${D.branch}`:null,D.commitSha?`commit: ${D.commitSha.slice(0,7)}`:null].filter(Boolean).join(", ");J.push({text:`Git: ${w}`,style:"muted"})}J.push({text:"",style:"normal"}),J.push({text:"Check Results:",style:"bold"});for(let w of D.categories){let E=w.passed?"\u2713":"\u2717",P=w.passed?"success":"error",S=gSD(w),f=H?` (${w.durationMs}ms)`:"";J.push({text:` ${E} ${w.label}: ${S}${f}`,style:P})}if(D.issues.length>0)if(J.push({text:"",style:"normal"}),J.push({text:"Issues:",style:"bold"}),F){let w=uSD(D.issues);for(let[E,P]of w){J.push({text:"",style:"normal"}),J.push({text:` ${E||"(no file)"}`,style:"bold",indent:1});for(let S of P)J.push(...iL0(S,z,2))}}else{let w=D.issues.filter((S)=>S.severity==="error"),E=D.issues.filter((S)=>S.severity==="warning"),P=D.issues.filter((S)=>S.severity==="note");if(w.length>0){J.push({text:"",style:"normal"}),J.push({text:" Errors:",style:"error",indent:1});for(let S of w)J.push(...iL0(S,z,2))}if(E.length>0){J.push({text:"",style:"normal"}),J.push({text:" Warnings:",style:"warning",indent:1});for(let S of E)J.push(...iL0(S,z,2))}if(P.length>0&&z){J.push({text:"",style:"normal"}),J.push({text:" Notes:",style:"muted",indent:1});for(let S of P)J.push(...iL0(S,z,2))}}J.push({text:"",style:"normal"}),J.push({text:"\u2500".repeat(50),style:"muted"});let K=[D.totalErrors>0?`${D.totalErrors} error(s)`:null,D.totalWarnings>0?`${D.totalWarnings} warning(s)`:null,D.totalNotes>0&&z?`${D.totalNotes} note(s)`:null].filter(Boolean);if(K.length>0)J.push({text:`Found: ${K.join(", ")}`,style:D.success?"warning":"error"});if(H)J.push({text:`Duration: ${D.durationMs}ms`,style:"muted"});if(J.push({text:"",style:"normal"}),D.success)J.push({text:"\u2705 All CI checks passed!",style:"success"});else J.push({text:"\u274C CI checks failed",style:"error"});return J.push({text:"",style:"normal"}),J}function A96(D,Y={}){return a9$(D,Y).map((J)=>" ".repeat(J.indent??0)+J.text).join(`
3195
3195
  `)}function gSD(D){let Y=[];if(D.errors>0)Y.push(`${D.errors} error(s)`);if(D.warnings>0)Y.push(`${D.warnings} warning(s)`);if(Y.length===0)return"passed";return Y.join(", ")}function iL0(D,Y,J){let z=[],H=D.severity==="error"?"\u2717":D.severity==="warning"?"\u26A0":"\u25CB",F=D.severity==="error"?"error":D.severity==="warning"?"warning":"muted",K=`${H} ${D.message}`;if(D.file){let w=D.line?`:${D.line}`:"";K+=` (${D.file}${w})`}if(z.push({text:K,style:F,indent:J}),Y&&D.context){let w=JSON.stringify(D.context);if(w!=="{}")z.push({text:`Context: ${w}`,style:"muted",indent:J+1})}return z}function uSD(D){let Y=new Map;for(let J of D){let z=J.file??"";if(!Y.has(z))Y.set(z,[]);let H=Y.get(z);if(H)H.push(J)}return new Map([...Y.entries()].sort(([J],[z])=>J.localeCompare(z)))}var O96=()=>{};var hN;var w96=m0(()=>{wC();U96();V96();O96();hN=_Z({formatAsJson:()=>K96,formatAsJsonCompact:()=>o9$,formatAsJsonFull:()=>s9$,formatAsSarif:()=>q96,formatAsText:()=>A96,formatAsTextLines:()=>a9$,sarifToJson:()=>Z96})});function L96(D){let{name:Y,version:J,kind:z,description:H,goal:F,context:K,stability:w,owners:E,tags:P,auth:S,flags:f}=D,b=mSD(Y.split(".").pop()||"Unknown")+"Spec",m=b.replace("Spec","Input"),s=b.replace("Spec","Output");return`import { define${t9$(z)} } from '@lssm/lib.contracts';
3196
3196
  import { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';
3197
3197
 
@@ -6316,7 +6316,7 @@ Error:`),H instanceof Error?H.message:String(H))}}async function fuD(){let D=tL0
6316
6316
  working-directory: ${D.workingDirectory}
6317
6317
  github-token: \${{ secrets.GITHUB_TOKEN }}`}function a36(D={}){let Y={...uuD,...D},J="";if(Y.mode==="validate"||Y.mode==="both")J+=muD(Y);if(Y.mode==="impact"||Y.mode==="both")J+=duD(Y);return`# ContractSpec CI Workflow
6318
6318
  # Generated by: contractspec cicd install
6319
- # Docs: https://contractspec.lssm.tech/docs/cicd
6319
+ # Docs: https://contractspec.io/docs/cicd
6320
6320
 
6321
6321
  name: ${Y.name}
6322
6322
 
@@ -6348,5 +6348,5 @@ jobs:${J}
6348
6348
  \u274C Error:`),Y instanceof Error?Y.message:String(Y)),process.exit(1)}});LQ.command("regenerator").description("Operate the Regenerator daemon").argument("<blueprint-file>","Path to AppBlueprintSpec file").argument("<tenant-file>","Path to TenantAppConfig file").argument("<rules-file>","Path to module exporting regenerator rules").argument("<sink-file>",'Path to module exporting a proposal sink (use "auto" with --executor)').option("-p, --poll-interval <ms>","Polling interval in ms (default 60000)",(D)=>Number.parseInt(D,10)).option("-b, --batch-duration <ms>","Lookback duration in ms (default 300000)",(D)=>Number.parseInt(D,10)).option("--once","Run a single evaluation cycle then exit").option("--contexts <path>","Optional file exporting an array of RegenerationContext overrides").option("--executor <path>",'Module exporting a ProposalExecutor instance, factory, or deps (required when sink is "auto")').option("--dry-run","Execute proposals in dry-run mode when using executor sink").action(async(D,Y,J,z,H)=>{try{let F=await Kz(),K=nE(F,H);await zJ6(D,Y,J,z,H,K)}catch(F){console.error(b0.red(`
6349
6349
  \u274C Error:`),F instanceof Error?F.message:String(F)),process.exit(1)}});function YW6(){LQ.parse()}YW6();
6350
6350
 
6351
- //# debugId=9E11F1ED0294EB4E64756E2164756E21
6351
+ //# debugId=6271A35372B6DFE464756E2164756E21
6352
6352
  //# sourceMappingURL=cli.js.map
package/dist/node/cli.js CHANGED
@@ -3102,7 +3102,7 @@ Follow the spec exactly and handle all defined cases.`}});var dT=c$(()=>{tP$();m
3102
3102
  `)}function O2D($,X){let{direction:J="TB",showVersions:Q=!0,maxNodes:W=50}=X,U=[`flowchart ${J}`],Z=0;for(let V of $.features){if(Z>=W)break;let j=hU(`F_${V.key}`);U.push(` ${j}["${gj(V.title??V.key)}"]`),Z++;for(let L of V.operations){if(Z>=W)break;let S=hU(`O_${L.key}_v${L.version}`),v=Q?`${L.key}.v${L.version}`:L.key;U.push(` ${S}["${gj(v)}"]`),U.push(` ${j} --> ${S}`),Z++}for(let L of V.events){if(Z>=W)break;let S=hU(`E_${L.key}_v${L.version}`),v=Q?`${L.key}.v${L.version}`:L.key;U.push(` ${S}["${gj(v)}"]`),U.push(` ${j} -.-> ${S}`),Z++}for(let L of V.presentations){if(Z>=W)break;let S=hU(`P_${L.key}_v${L.version}`),v=Q?`${L.key}.v${L.version}`:L.key;U.push(` ${S}["${gj(v)}"]`),U.push(` ${j} --> ${S}`),Z++}for(let L of V.opToPresentationLinks){let S=hU(`O_${L.op.key}_v${L.op.version}`),v=hU(`P_${L.pres.key}_v${L.pres.version}`);U.push(` ${S} --> ${v}`)}}return U.join(`
3103
3103
  `)}function Z2D($,X){let J=VH0($,X);if($.orphanedSpecs.length===0)return J;let Q=J.split(`
3104
3104
  `);Q.push(" subgraph orphaned [Orphaned Specs]");for(let W of $.orphanedSpecs.slice(0,20)){let U=hU(`orphan_${W.type}_${W.key}_v${W.version}`),Z=`${W.key}.v${W.version}`;Q.push(` ${U}["${gj(Z)}"]:::orphan`)}return Q.push(" end"),Q.push(" classDef orphan stroke-dasharray: 5 5"),Q.join(`
3105
- `)}function FH0($,X,J){let Q=new Set,W=[];for(let U of $)for(let Z of U[X]){let V=`${Z.key}.v${Z.version}`;if(!Q.has(V))Q.add(V),W.push(Z)}return W}function KH0($){let X=$.match(/^(.+)\.v(\d+)$/);if(!X)return[void 0,void 0];return[X[1],Number(X[2])]}function hU($){return $.replace(/[^a-zA-Z0-9_]/g,"_")}function gj($){return $.replace(/"/g,"'").replace(/\[/g,"(").replace(/\]/g,")").replace(/\{/g,"(").replace(/\}/g,")")}var AH0=()=>{};var LE,Zf;var x5$=c$(()=>{LE=["cli-config","vscode-settings","mcp-cursor","mcp-claude","cursor-rules","agents-md"],Zf={"cli-config":"CLI Configuration (.contractsrc.json)","vscode-settings":"VS Code Settings (.vscode/settings.json)","mcp-cursor":"MCP for Cursor (.cursor/mcp.json)","mcp-claude":"MCP for Claude Desktop","cursor-rules":"Cursor AI Rules (.cursor/rules/)","agents-md":"Project AI Guide (AGENTS.md)"}});function YR($){let X=$.isMonorepo&&$.scope==="package";return{$schema:"https://api.contractspec.lssm.tech/schemas/contractsrc.json",aiProvider:"claude",aiModel:"claude-sonnet-4-20250514",agentMode:"claude-code",outputDir:"./src",conventions:{operations:"contracts/operations",events:"contracts/events",presentations:"contracts/presentations",forms:"contracts/forms",features:"contracts/features"},defaultOwners:$.defaultOwners??["@team"],defaultTags:[],...X&&$.packageName?{package:$.packageName}:{}}}function la(){return{"contractspec.validation.enabled":!0,"contractspec.validation.validateOnSave":!0,"contractspec.validation.validateOnOpen":!0,"contractspec.codeLens.enabled":!0,"contractspec.diagnostics.showWarnings":!0,"contractspec.diagnostics.showHints":!0,"contractspec.integrity.enabled":!0,"contractspec.integrity.checkOnSave":!0}}function iT(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function ca(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function da($){let X=$.projectName??"this project",J=$.isMonorepo&&$.scope==="package"&&$.packageRoot?`${$.packageRoot.split("/").slice(-2).join("/")}/src/contracts`:"src/contracts";return`# ContractSpec Development Rules
3105
+ `)}function FH0($,X,J){let Q=new Set,W=[];for(let U of $)for(let Z of U[X]){let V=`${Z.key}.v${Z.version}`;if(!Q.has(V))Q.add(V),W.push(Z)}return W}function KH0($){let X=$.match(/^(.+)\.v(\d+)$/);if(!X)return[void 0,void 0];return[X[1],Number(X[2])]}function hU($){return $.replace(/[^a-zA-Z0-9_]/g,"_")}function gj($){return $.replace(/"/g,"'").replace(/\[/g,"(").replace(/\]/g,")").replace(/\{/g,"(").replace(/\}/g,")")}var AH0=()=>{};var LE,Zf;var x5$=c$(()=>{LE=["cli-config","vscode-settings","mcp-cursor","mcp-claude","cursor-rules","agents-md"],Zf={"cli-config":"CLI Configuration (.contractsrc.json)","vscode-settings":"VS Code Settings (.vscode/settings.json)","mcp-cursor":"MCP for Cursor (.cursor/mcp.json)","mcp-claude":"MCP for Claude Desktop","cursor-rules":"Cursor AI Rules (.cursor/rules/)","agents-md":"Project AI Guide (AGENTS.md)"}});function YR($){let X=$.isMonorepo&&$.scope==="package";return{$schema:"https://api.contractspec.io/schemas/contractsrc.json",aiProvider:"claude",aiModel:"claude-sonnet-4-20250514",agentMode:"claude-code",outputDir:"./src",conventions:{operations:"contracts/operations",events:"contracts/events",presentations:"contracts/presentations",forms:"contracts/forms",features:"contracts/features"},defaultOwners:$.defaultOwners??["@team"],defaultTags:[],...X&&$.packageName?{package:$.packageName}:{}}}function la(){return{"contractspec.validation.enabled":!0,"contractspec.validation.validateOnSave":!0,"contractspec.validation.validateOnOpen":!0,"contractspec.codeLens.enabled":!0,"contractspec.diagnostics.showWarnings":!0,"contractspec.diagnostics.showHints":!0,"contractspec.integrity.enabled":!0,"contractspec.integrity.checkOnSave":!0}}function iT(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function ca(){return{mcpServers:{"contractspec-local":{command:"bunx",args:["contractspec-mcp"]}}}}function da($){let X=$.projectName??"this project",J=$.isMonorepo&&$.scope==="package"&&$.packageRoot?`${$.packageRoot.split("/").slice(-2).join("/")}/src/contracts`:"src/contracts";return`# ContractSpec Development Rules
3106
3106
 
3107
3107
  This project uses ContractSpec for spec-first development. Follow these guidelines when working with AI agents.
3108
3108
 
@@ -3344,7 +3344,7 @@ Match types:
3344
3344
  `)}configure($){this.config={...this.config,...$}}generateSummary($,X){let J=[],Q=$.every((j)=>j.passed),W=$.length>0?Math.round($.reduce((j,L)=>j+L.score,0)/$.length):100;J.push(Q?"✓ Verification passed":"✗ Verification failed"),J.push(`Score: ${W}/100`),J.push("");for(let j of $){let L=j.passed?"✓":"✗";J.push(`${L} ${j.tier}: ${j.score}/100`)}J.push("");let U=X.filter((j)=>j.severity==="error"),Z=X.filter((j)=>j.severity==="warning"),V=X.filter((j)=>j.severity==="info");if(U.length>0)J.push(`Errors: ${U.length}`);if(Z.length>0)J.push(`Warnings: ${Z.length}`);if(V.length>0)J.push(`Info: ${V.length}`);return J.join(`
3345
3345
  `)}formatTierName($){switch($){case"structure":return"Tier 1: Structure";case"behavior":return"Tier 2: Behavior";case"ai_review":return"Tier 3: AI Review";default:return $}}},Ob$;var Zb$=c$(()=>{o5$();t5$();s5$();NFD={verbose:!1},RFD=["structure","behavior","ai_review"];Ob$=new Qs});var zs;var e5$=c$(()=>{zs={maxEntries:1000,defaultTtlMs:86400000,structureTtlMs:604800000,behaviorTtlMs:86400000,aiTtlMs:86400000,transitiveInvalidation:!0}});import{createHash as CFD}from"crypto";function Hs($){return CFD("sha256").update($).digest("hex")}function Gs($){let X=[`spec:${$.specHash.substring(0,16)}`,`impl:${$.implHash.substring(0,16)}`,`tier:${$.tier}`];if($.aiModelVersion)X.push(`model:${$.aiModelVersion}`);return X.join("|")}function $W$($){try{let X=$.split("|"),J=new Map;for(let Z of X){let[V,j]=Z.split(":");if(V&&j)J.set(V,j)}let Q=J.get("spec"),W=J.get("impl"),U=J.get("tier");if(!Q||!W||!U)return null;return{specHash:Q,implHash:W,tier:U,aiModelVersion:J.get("model")}}catch{return null}}function SFD($,X){switch($){case"structure":return X.structureTtlMs;case"behavior":return X.behaviorTtlMs;case"ai_review":return X.aiTtlMs;default:return X.defaultTtlMs}}function Us($,X){return new DW$($,X)}var DW$=class{storage;config;stats;constructor($,X={}){this.storage=$,this.config={...zs,...X},this.stats={hits:0,misses:0}}createKey($,X,J,Q){return{specHash:Hs($),implHash:Hs(X),tier:J,aiModelVersion:J==="ai_review"?Q:void 0}}async lookup($){let X=Gs($),J=await this.storage.get(X);if(!J)return this.stats.misses++,{hit:!1,reason:"not_found"};if(J.meta.expiresAt){let Q=new Date(J.meta.expiresAt).getTime();if(Date.now()>Q)return this.stats.misses++,await this.storage.delete(X),{hit:!1,reason:"expired"}}if(J.key.specHash!==$.specHash)return this.stats.misses++,{hit:!1,reason:"spec_changed"};if(J.key.implHash!==$.implHash)return this.stats.misses++,{hit:!1,reason:"impl_changed"};if($.tier==="ai_review"&&$.aiModelVersion&&J.key.aiModelVersion!==$.aiModelVersion)return this.stats.misses++,{hit:!1,reason:"model_changed"};return this.stats.hits++,{hit:!0,entry:J}}async store($,X,J={}){let Q=Gs($),W=SFD($.tier,this.config),U={key:$,result:X,meta:{createdAt:new Date().toISOString(),expiresAt:new Date(Date.now()+W).toISOString(),dependencies:J.dependencies??[],specName:J.specName,implPath:J.implPath}};await this.storage.set(Q,U),await this.pruneIfNeeded()}async invalidateForFile($){if(!this.config.transitiveInvalidation)return 0;let X=await this.storage.keys(),J=0;for(let Q of X){let W=await this.storage.get(Q);if(!W)continue;if(W.meta.dependencies.includes($))await this.storage.delete(Q),J++;if(W.meta.specName===$||W.meta.implPath===$)await this.storage.delete(Q),J++}return J}async invalidateForSpec($){let X=await this.storage.keys(),J=0;for(let Q of X){let W=$W$(Q);if(W&&W.specHash.startsWith($.substring(0,16)))await this.storage.delete(Q),J++}return J}async clear(){await this.storage.clear(),this.stats={hits:0,misses:0}}async getStats(){let $=await this.storage.stats?.();return{totalEntries:$?.entryCount??(await this.storage.keys()).length,hits:this.stats.hits,misses:this.stats.misses,hitRate:this.stats.hits+this.stats.misses>0?Math.round(this.stats.hits/(this.stats.hits+this.stats.misses)*100):0,memoryUsage:$?.memoryUsage}}async pruneIfNeeded(){let $=await this.storage.keys();if($.length<=this.config.maxEntries)return;let X=[];for(let Q of $){let W=await this.storage.get(Q);if(W)X.push({key:Q,createdAt:new Date(W.meta.createdAt).getTime()})}X.sort((Q,W)=>Q.createdAt-W.createdAt);let J=X.length-this.config.maxEntries;for(let Q=0;Q<J;Q++){let W=X[Q];if(W)await this.storage.delete(W.key)}}};var Fb$=c$(()=>{e5$()});function XW$(){return new Bs}var Bs=class{cache=new Map;async get($){return this.cache.get($)??null}async set($,X){this.cache.set($,X)}async delete($){return this.cache.delete($)}async has($){return this.cache.has($)}async keys(){return Array.from(this.cache.keys())}async clear(){this.cache.clear()}async stats(){let $=0;for(let[X,J]of this.cache.entries())$+=X.length*2,$+=JSON.stringify(J).length*2;return{entryCount:this.cache.size,memoryUsage:$}}};var YW$=()=>{};import{dirname as TFD,join as _FD}from"path";import{existsSync as TH0,mkdirSync as vFD,readFileSync as kFD,renameSync as yFD,statSync as fFD,writeFileSync as xFD}from"fs";function yl($,X){return new qs($,X)}var uFD=".contractspec/verification-cache.json",OK6=1,qs=class{filePath;cache;isDirty=!1;constructor($,X){let J=X??process.cwd();this.filePath=$??_FD(J,uFD),this.cache=new Map,this.loadSync()}loadSync(){try{if(!TH0(this.filePath))return;let $=kFD(this.filePath,"utf-8"),X=JSON.parse($);if(X.version!==OK6)return;for(let[J,Q]of Object.entries(X.entries))this.cache.set(J,Q)}catch{}}saveSync(){if(!this.isDirty)return;try{let $=TFD(this.filePath);if(!TH0($))vFD($,{recursive:!0});let X={version:OK6,entries:Object.fromEntries(this.cache.entries())},J=`${this.filePath}.tmp`;xFD(J,JSON.stringify(X,null,2),"utf-8"),yFD(J,this.filePath),this.isDirty=!1}catch{}}async get($){return this.cache.get($)??null}async set($,X){this.cache.set($,X),this.isDirty=!0,this.saveSync()}async delete($){let X=this.cache.delete($);if(X)this.isDirty=!0,this.saveSync();return X}async has($){return this.cache.has($)}async keys(){return Array.from(this.cache.keys())}async clear(){this.cache.clear(),this.isDirty=!0,this.saveSync()}async stats(){let $=0;try{if(TH0(this.filePath))$=fFD(this.filePath).size}catch{}return{entryCount:this.cache.size,memoryUsage:$}}flush(){this.saveSync()}reload(){this.cache.clear(),this.loadSync(),this.isDirty=!1}};var JW$=()=>{};function WW$($){return new Os($)}var Os=class{store;keyIndex;constructor($){this.store=$,this.keyIndex=new Set(this.loadKeyIndex())}loadKeyIndex(){try{return this.store.get("contractspec.verification-cache.__index__")??[]}catch{return[]}}async saveKeyIndex(){await this.store.update("contractspec.verification-cache.__index__",Array.from(this.keyIndex))}getStorageKey($){return`contractspec.verification-cache.${$}`}async get($){let X=this.getStorageKey($);return this.store.get(X)??null}async set($,X){let J=this.getStorageKey($);if(await this.store.update(J,X),!this.keyIndex.has($))this.keyIndex.add($),await this.saveKeyIndex()}async delete($){let X=this.getStorageKey($),J=this.keyIndex.has($);if(J)await this.store.update(X,void 0),this.keyIndex.delete($),await this.saveKeyIndex();return J}async has($){return this.keyIndex.has($)}async keys(){return Array.from(this.keyIndex)}async clear(){for(let $ of this.keyIndex){let X=this.getStorageKey($);await this.store.update(X,void 0)}this.keyIndex.clear(),await this.saveKeyIndex()}async stats(){return{entryCount:this.keyIndex.size}}};var QW$=()=>{};function fl($){return $==="minimal"?Zs:zW$}function xl($){return $.filter((X)=>!X.dev)}function ul($){return $.filter((X)=>X.dev)}var Zs,zW$;var HW$=c$(()=>{Zs=[{name:"@lssm/lib.contracts",description:"Core ContractSpec library for defining commands, queries, and events"},{name:"zod",description:"Schema validation library (peer dependency)"}],zW$=[...Zs,{name:"@lssm/lib.schema",description:"Extended schema utilities and common types"},{name:"@lssm/app.cli-contractspec",dev:!0,description:"ContractSpec CLI for validation, scaffolding, and code generation"},{name:"typescript",dev:!0,description:"TypeScript compiler for type checking"}]});import{exec as gFD}from"node:child_process";import{promisify as hFD}from"node:util";async function Fs($,X,J=lFD){let Q=fl(X.mode),W=xl(Q),U=ul(Q),Z=[],V=[],j=[],L=$.join(X.workspaceRoot,"package.json");if(!await $.exists(L))return{success:!1,installed:[],skipped:[],errors:[{name:"package.json",action:"error",message:"No package.json found. Run `npm init` first."}],summary:"No package.json found in workspace root."};let S=await $.readFile(L),v=JSON.parse(S),T=new Set([...Object.keys(v.dependencies??{}),...Object.keys(v.devDependencies??{})]),u=zy(X.workspaceRoot),r=W.filter((j$)=>{if(T.has(j$.name)&&!X.force)return V.push({name:j$.name,action:"skipped",message:"Already installed",dev:!1}),!1;return!0}),c=U.filter((j$)=>{if(T.has(j$.name)&&!X.force)return V.push({name:j$.name,action:"skipped",message:"Already installed",dev:!0}),!1;return!0});if(X.dryRun){let j$=[...r,...c];return{success:!0,installed:j$.map((k$)=>({name:k$.name,action:"installed",message:`Would install: ${k$.description}`,dev:k$.dev})),skipped:V,errors:[],summary:`Dry run: would install ${j$.length} package(s), skip ${V.length}.`}}if(!X.skipPrompts&&(r.length>0||c.length>0)){let j$=r.length+c.length;if(!await J.confirm(`Install ${j$} package(s) using ${u}?`))return{success:!0,installed:[],skipped:[...V,...r.map((k$)=>({name:k$.name,action:"skipped",message:"User cancelled"})),...c.map((k$)=>({name:k$.name,action:"skipped",message:"User cancelled",dev:!0}))],errors:[],summary:"Installation cancelled by user."}}if(r.length>0){let j$=await ZK6(r,u,X.workspaceRoot,!1);for(let k$ of j$)if(k$.action==="installed")Z.push(k$);else j.push(k$)}if(c.length>0){let j$=await ZK6(c,u,X.workspaceRoot,!0);for(let k$ of j$)if(k$.action==="installed")Z.push(k$);else j.push(k$)}let Z$=j.length===0;return{success:Z$,installed:Z,skipped:V,errors:j,summary:Z$?`Successfully installed ${Z.length} package(s), skipped ${V.length}.`:`Installed ${Z.length}, skipped ${V.length}, failed ${j.length}.`}}async function ZK6($,X,J,Q){let W=[],U=$.map((Z)=>Z.version?`${Z.name}@${Z.version}`:Z.name);try{await mFD(`${Gy(X,Q)} ${U.join(" ")}`,{cwd:J,timeout:120000});for(let Z of $)W.push({name:Z.name,action:"installed",message:Z.description,dev:Q})}catch(Z){let V=Z instanceof Error?Z.message:String(Z);for(let j of $)W.push({name:j.name,action:"error",message:`Failed to install: ${V}`,dev:Q})}return W}async function Ks($,X){let J=$.join(X,"package.json");try{let Q=await $.readFile(J),W=JSON.parse(Q);return"@lssm/lib.contracts"in{...W.dependencies,...W.devDependencies}}catch{return!1}}function Vs($){let X=fl($),J=[];J.push(`ContractSpec ${$} installation:`),J.push("");let Q=xl(X);if(Q.length>0){J.push("Dependencies:");for(let U of Q)J.push(` • ${U.name} - ${U.description}`)}let W=ul(X);if(W.length>0){J.push(""),J.push("Dev Dependencies:");for(let U of W)J.push(` • ${U.name} - ${U.description}`)}return J.join(`
3346
3346
  `)}var mFD,lFD;var Kb$=c$(()=>{Uy();HW$();mFD=hFD(gFD),lFD={confirm:async()=>!0,select:async($,X)=>X[0]?.value??""}});async function FK6($,X={}){let{fs:J,git:Q,logger:W}=$,U=X.workspaceRoot??process.cwd();W.info("Starting impact detection...",{baseline:X.baseline});let Z=(await J.glob({pattern:X.pattern??"**/*.{operation,event}.ts",cwd:U})).filter((v)=>!v.includes(".test.")&&!v.includes(".spec.")&&!v.includes("node_modules"));W.debug(`Found ${Z.length} spec files`);let V=(0,As.generateSnapshot)(await cFD(J,Z,U)),j;if(X.baseline)j=(0,As.generateSnapshot)(await dFD(J,Q,Z,X.baseline,U));else j={version:1,generatedAt:"",specs:[],hash:""};let L=nFD(j.specs,V.specs),S=(0,As.classifyImpact)(j.specs,V.specs,L);return W.info("Impact detection complete",{status:S.status,breaking:S.summary.breaking,nonBreaking:S.summary.nonBreaking}),{...S,workspaceRoot:U,specsAnalyzed:Z.length,baseRef:X.baseline}}async function cFD($,X,J){let Q=[];for(let W of X){let U=await $.readFile(W);Q.push({path:W,content:U})}return Q}async function dFD($,X,J,Q,W){let U=[];for(let Z of J)try{let V=await X.showFile(Q,Z);U.push({path:Z,content:V})}catch{}return U}function nFD($,X){let J=[],Q=new Map($.map((U)=>[`${U.key}@${U.version}`,U])),W=new Map(X.map((U)=>[`${U.key}@${U.version}`,U]));for(let[U,Z]of W){let V=Q.get(U);if(V&&Z.type==="operation"&&V.type==="operation"){let j=(0,As.computeIoDiff)(V.io,Z.io);J.push(...j)}}return J}var KK6=c$(()=>{PH()});function VK6($,X={template:"detailed"}){let J=[];if(J.push("## \uD83D\uDCCB ContractSpec Impact Analysis"),J.push(""),$.hasBreaking)J.push("❌ **Breaking changes detected**");else if($.hasNonBreaking)J.push("⚠️ **Contract changed (non-breaking)**");else J.push("✅ **No contract impact**");if(J.push(""),$.summary.breaking>0||$.summary.nonBreaking>0||$.summary.info>0){if(J.push("### Summary"),J.push(""),J.push("| Type | Count |"),J.push("|------|-------|"),$.summary.breaking>0)J.push(`| \uD83D\uDD34 Breaking | ${$.summary.breaking} |`);if($.summary.nonBreaking>0)J.push(`| \uD83D\uDFE1 Non-breaking | ${$.summary.nonBreaking} |`);if($.summary.info>0)J.push(`| \uD83D\uDD35 Info | ${$.summary.info} |`);if($.summary.added>0)J.push(`| ➕ Added | ${$.summary.added} |`);if($.summary.removed>0)J.push(`| ➖ Removed | ${$.summary.removed} |`);J.push("")}if(X.template==="detailed"&&$.deltas.length>0){J.push("### Changes"),J.push("");let Q=$.deltas.filter((U)=>U.severity==="breaking"),W=$.deltas.filter((U)=>U.severity==="non_breaking");if(Q.length>0){J.push("#### \uD83D\uDD34 Breaking Changes"),J.push("");for(let U of Q)J.push(`- **${U.specKey}**: ${U.description}`);J.push("")}if(W.length>0){J.push("#### \uD83D\uDFE1 Non-breaking Changes"),J.push("");for(let U of W)J.push(`- **${U.specKey}**: ${U.description}`);J.push("")}}if($.addedSpecs.length>0){J.push("### Added Specs"),J.push("");for(let Q of $.addedSpecs)J.push(`- \`${Q.key}\` v${Q.version} (${Q.type})`);J.push("")}if($.removedSpecs.length>0){J.push("### Removed Specs"),J.push("");for(let Q of $.removedSpecs)J.push(`- \`${Q.key}\` v${Q.version} (${Q.type})`);J.push("")}return J.push("---"),J.push(`*Generated by ContractSpec at ${$.timestamp}*`),J.join(`
3347
- `)}function _H0($){if($.hasBreaking)return`❌ **Breaking changes detected** (${$.summary.breaking} breaking, ${$.summary.nonBreaking} non-breaking)`;if($.hasNonBreaking)return`⚠️ **Contract changed** (${$.summary.nonBreaking} non-breaking changes)`;return"✅ **No contract impact**"}function AK6($,X,J={}){let Q=J.key??"ContractSpec Impact",W=J.failOnBreaking??!0,U,Z;if($.hasBreaking)U=W?"failure":"neutral",Z=`Breaking changes detected (${$.summary.breaking})`;else if($.hasNonBreaking)U="success",Z=`Non-breaking changes (${$.summary.nonBreaking})`;else U="success",Z="No contract impact";let V=_H0($);return{name:Q,headSha:X,conclusion:U,title:Z,summary:V,annotations:$.deltas.filter((j)=>j.severity==="breaking").slice(0,50).map((j)=>({path:j.path,startLine:1,endLine:1,annotationLevel:"failure",message:j.description,title:`Breaking: ${j.rule}`}))}}function wK6($){return JSON.stringify($,null,2)}var IK6=()=>{};var Mf;var vH0=c$(()=>{mS();KK6();IK6();Mf=_2({detectImpact:()=>FK6,formatCheckRun:()=>AK6,formatJson:()=>wK6,formatMinimalComment:()=>_H0,formatPrComment:()=>VK6})});var jK6=c$(()=>{Zj$();Kj$();Aj$();eP$()});var LK6=c$(()=>{x5$();hj();JR();Xb$()});var MK6=c$(()=>{g5$();h5$()});var EK6=c$(()=>{zb$();Gb$()});var PK6=c$(()=>{n5$();i5$();p5$();r5$();Bb$()});var bK6=c$(()=>{o5$();t5$();s5$();Zb$()});var NK6=c$(()=>{c5$();d5$()});var RK6=c$(()=>{YW$();JW$();QW$()});var CK6=c$(()=>{e5$();Fb$();YW$();JW$();QW$();RK6()});var SK6=c$(()=>{HW$();Kb$()});var TK6=c$(()=>{Uy();rX$();WI$();ED0();QI$();bD0();zI$();$7$();Zj$();Kj$();Aj$();eP$();jK6();tz0();az0();ez0();DH0();YH0();WH0();UH0();$b$();AH0();x5$();hj();JR();Xb$();LK6();g5$();h5$();MK6();zb$();c5$();d5$();Gb$();EK6();n5$();i5$();p5$();r5$();Bb$();PK6();o5$();t5$();s5$();Zb$();bK6();NK6();e5$();Fb$();YW$();JW$();QW$();CK6();HW$();Kb$();SK6();vH0()});function vK6($,X={}){let{toolName:J="ContractSpec",toolVersion:Q="1.0.0",toolUri:W="https://contractspec.lssm.tech",repositoryUri:U,workingDirectory:Z}=X,V=new Map,j=new Map,L=$.issues.filter((u)=>u.file);for(let u of L)if(!V.has(u.ruleId)){let r=iFD[u.ruleId]??{name:u.ruleId,description:`Rule: ${u.ruleId}`},c={id:u.ruleId,name:r.name,shortDescription:{text:r.description},defaultConfiguration:{level:_K6(u.severity)}};if(r.helpUri)c.helpUri=r.helpUri;j.set(u.ruleId,V.size),V.set(u.ruleId,c)}let S=L.map((u)=>{let r={ruleId:u.ruleId,ruleIndex:j.get(u.ruleId)??0,level:_K6(u.severity),message:{text:u.message}},c={physicalLocation:{artifactLocation:{uri:pFD(u.file),uriBaseId:"%SRCROOT%"}}};if(u.line!==void 0)c.physicalLocation.region={startLine:u.line,startColumn:u.column??1,endLine:u.endLine??u.line,endColumn:u.endColumn};return r.locations=[c],r.partialFingerprints={primaryLocationLineHash:rFD(u)},r}),v=[];if(U)v.push({repositoryUri:U,revisionId:$.commitSha,branch:$.branch});let T={tool:{driver:{name:J,version:Q,informationUri:W,rules:Array.from(V.values())}},results:S,invocations:[{executionSuccessful:$.success,endTimeUtc:$.timestamp,...Z&&{workingDirectory:{uri:Z}}}]};if(v.length>0)T.versionControlProvenance=v;return{$schema:"https://json.schemastore.org/sarif-2.1.0.json",version:"2.1.0",runs:[T]}}function _K6($){switch($){case"error":return"error";case"warning":return"warning";case"note":return"note";default:return"warning"}}function pFD($){return $.replace(/^\.\//,"").replace(/\\/g,"/")}function rFD($){let X=[$.ruleId,$.file??"",$.message];return Buffer.from(X.join("|")).toString("base64").slice(0,16)}function kK6($){return JSON.stringify($,null,2)}var iFD;var yK6=c$(()=>{iFD={"spec-structure-error":{name:"Spec Structure Error",description:"Contract specification is missing required structure elements"},"spec-structure-warning":{name:"Spec Structure Warning",description:"Contract specification has recommended but missing elements"},"integrity-orphaned":{name:"Orphaned Spec",description:"Contract specification is not linked to any feature"},"integrity-unresolved-ref":{name:"Unresolved Reference",description:"Contract specification references a non-existent spec"},"integrity-missing-feature":{name:"Missing Feature",description:"Feature referenced by spec does not exist"},"integrity-broken-link":{name:"Broken Link",description:"Link between specs is broken"},"deps-circular":{name:"Circular Dependency",description:"Circular dependency detected between contracts"},"deps-missing":{name:"Missing Dependency",description:"Contract depends on a non-existent contract"},"handler-missing":{name:"Missing Handler",description:"Handler implementation file does not exist for this contract"},"handler-warning":{name:"Handler Warning",description:"Handler implementation has potential issues"},"test-missing":{name:"Missing Test",description:"Test file does not exist for this contract"},"test-warning":{name:"Test Warning",description:"Test implementation has potential issues"}}});function kH0($){return{success:$.success,errors:$.totalErrors,warnings:$.totalWarnings,duration:$.durationMs,timestamp:$.timestamp,commit:$.commitSha,branch:$.branch,issues:$.issues.map((X)=>({rule:X.ruleId,severity:X.severity,message:X.message,file:X.file,line:X.line}))}}function yH0($){return{success:$.success,summary:{totalErrors:$.totalErrors,totalWarnings:$.totalWarnings,totalNotes:$.totalNotes,durationMs:$.durationMs,timestamp:$.timestamp,commitSha:$.commitSha,branch:$.branch},categories:$.categories.map((X)=>({category:X.category,label:X.label,passed:X.passed,errors:X.errors,warnings:X.warnings,notes:X.notes,durationMs:X.durationMs})),issues:$.issues.map((X)=>({ruleId:X.ruleId,severity:X.severity,message:X.message,category:X.category,file:X.file,line:X.line,column:X.column,endLine:X.endLine,endColumn:X.endColumn,context:X.context}))}}function fK6($,X={}){let{pretty:J=!0,includeDetails:Q=!0}=X,W=Q?yH0($):kH0($);return J?JSON.stringify(W,null,2):JSON.stringify(W)}var xK6=()=>{};function fH0($,X={}){let J=[],{verbose:Q=!1,showTiming:W=!0,groupByFile:U=!1}=X;if(J.push({text:"",style:"normal"}),J.push({text:"\uD83D\uDCCB ContractSpec CI Check Results",style:"bold"}),J.push({text:"",style:"normal"}),$.commitSha||$.branch){let V=[$.branch?`branch: ${$.branch}`:null,$.commitSha?`commit: ${$.commitSha.slice(0,7)}`:null].filter(Boolean).join(", ");J.push({text:`Git: ${V}`,style:"muted"})}J.push({text:"",style:"normal"}),J.push({text:"Check Results:",style:"bold"});for(let V of $.categories){let j=V.passed?"✓":"✗",L=V.passed?"success":"error",S=oFD(V),v=W?` (${V.durationMs}ms)`:"";J.push({text:` ${j} ${V.label}: ${S}${v}`,style:L})}if($.issues.length>0)if(J.push({text:"",style:"normal"}),J.push({text:"Issues:",style:"bold"}),U){let V=tFD($.issues);for(let[j,L]of V){J.push({text:"",style:"normal"}),J.push({text:` ${j||"(no file)"}`,style:"bold",indent:1});for(let S of L)J.push(...Vb$(S,Q,2))}}else{let V=$.issues.filter((S)=>S.severity==="error"),j=$.issues.filter((S)=>S.severity==="warning"),L=$.issues.filter((S)=>S.severity==="note");if(V.length>0){J.push({text:"",style:"normal"}),J.push({text:" Errors:",style:"error",indent:1});for(let S of V)J.push(...Vb$(S,Q,2))}if(j.length>0){J.push({text:"",style:"normal"}),J.push({text:" Warnings:",style:"warning",indent:1});for(let S of j)J.push(...Vb$(S,Q,2))}if(L.length>0&&Q){J.push({text:"",style:"normal"}),J.push({text:" Notes:",style:"muted",indent:1});for(let S of L)J.push(...Vb$(S,Q,2))}}J.push({text:"",style:"normal"}),J.push({text:"─".repeat(50),style:"muted"});let Z=[$.totalErrors>0?`${$.totalErrors} error(s)`:null,$.totalWarnings>0?`${$.totalWarnings} warning(s)`:null,$.totalNotes>0&&Q?`${$.totalNotes} note(s)`:null].filter(Boolean);if(Z.length>0)J.push({text:`Found: ${Z.join(", ")}`,style:$.success?"warning":"error"});if(W)J.push({text:`Duration: ${$.durationMs}ms`,style:"muted"});if(J.push({text:"",style:"normal"}),$.success)J.push({text:"✅ All CI checks passed!",style:"success"});else J.push({text:"❌ CI checks failed",style:"error"});return J.push({text:"",style:"normal"}),J}function uK6($,X={}){return fH0($,X).map((J)=>" ".repeat(J.indent??0)+J.text).join(`
3347
+ `)}function _H0($){if($.hasBreaking)return`❌ **Breaking changes detected** (${$.summary.breaking} breaking, ${$.summary.nonBreaking} non-breaking)`;if($.hasNonBreaking)return`⚠️ **Contract changed** (${$.summary.nonBreaking} non-breaking changes)`;return"✅ **No contract impact**"}function AK6($,X,J={}){let Q=J.key??"ContractSpec Impact",W=J.failOnBreaking??!0,U,Z;if($.hasBreaking)U=W?"failure":"neutral",Z=`Breaking changes detected (${$.summary.breaking})`;else if($.hasNonBreaking)U="success",Z=`Non-breaking changes (${$.summary.nonBreaking})`;else U="success",Z="No contract impact";let V=_H0($);return{name:Q,headSha:X,conclusion:U,title:Z,summary:V,annotations:$.deltas.filter((j)=>j.severity==="breaking").slice(0,50).map((j)=>({path:j.path,startLine:1,endLine:1,annotationLevel:"failure",message:j.description,title:`Breaking: ${j.rule}`}))}}function wK6($){return JSON.stringify($,null,2)}var IK6=()=>{};var Mf;var vH0=c$(()=>{mS();KK6();IK6();Mf=_2({detectImpact:()=>FK6,formatCheckRun:()=>AK6,formatJson:()=>wK6,formatMinimalComment:()=>_H0,formatPrComment:()=>VK6})});var jK6=c$(()=>{Zj$();Kj$();Aj$();eP$()});var LK6=c$(()=>{x5$();hj();JR();Xb$()});var MK6=c$(()=>{g5$();h5$()});var EK6=c$(()=>{zb$();Gb$()});var PK6=c$(()=>{n5$();i5$();p5$();r5$();Bb$()});var bK6=c$(()=>{o5$();t5$();s5$();Zb$()});var NK6=c$(()=>{c5$();d5$()});var RK6=c$(()=>{YW$();JW$();QW$()});var CK6=c$(()=>{e5$();Fb$();YW$();JW$();QW$();RK6()});var SK6=c$(()=>{HW$();Kb$()});var TK6=c$(()=>{Uy();rX$();WI$();ED0();QI$();bD0();zI$();$7$();Zj$();Kj$();Aj$();eP$();jK6();tz0();az0();ez0();DH0();YH0();WH0();UH0();$b$();AH0();x5$();hj();JR();Xb$();LK6();g5$();h5$();MK6();zb$();c5$();d5$();Gb$();EK6();n5$();i5$();p5$();r5$();Bb$();PK6();o5$();t5$();s5$();Zb$();bK6();NK6();e5$();Fb$();YW$();JW$();QW$();CK6();HW$();Kb$();SK6();vH0()});function vK6($,X={}){let{toolName:J="ContractSpec",toolVersion:Q="1.0.0",toolUri:W="https://contractspec.io",repositoryUri:U,workingDirectory:Z}=X,V=new Map,j=new Map,L=$.issues.filter((u)=>u.file);for(let u of L)if(!V.has(u.ruleId)){let r=iFD[u.ruleId]??{name:u.ruleId,description:`Rule: ${u.ruleId}`},c={id:u.ruleId,name:r.name,shortDescription:{text:r.description},defaultConfiguration:{level:_K6(u.severity)}};if(r.helpUri)c.helpUri=r.helpUri;j.set(u.ruleId,V.size),V.set(u.ruleId,c)}let S=L.map((u)=>{let r={ruleId:u.ruleId,ruleIndex:j.get(u.ruleId)??0,level:_K6(u.severity),message:{text:u.message}},c={physicalLocation:{artifactLocation:{uri:pFD(u.file),uriBaseId:"%SRCROOT%"}}};if(u.line!==void 0)c.physicalLocation.region={startLine:u.line,startColumn:u.column??1,endLine:u.endLine??u.line,endColumn:u.endColumn};return r.locations=[c],r.partialFingerprints={primaryLocationLineHash:rFD(u)},r}),v=[];if(U)v.push({repositoryUri:U,revisionId:$.commitSha,branch:$.branch});let T={tool:{driver:{name:J,version:Q,informationUri:W,rules:Array.from(V.values())}},results:S,invocations:[{executionSuccessful:$.success,endTimeUtc:$.timestamp,...Z&&{workingDirectory:{uri:Z}}}]};if(v.length>0)T.versionControlProvenance=v;return{$schema:"https://json.schemastore.org/sarif-2.1.0.json",version:"2.1.0",runs:[T]}}function _K6($){switch($){case"error":return"error";case"warning":return"warning";case"note":return"note";default:return"warning"}}function pFD($){return $.replace(/^\.\//,"").replace(/\\/g,"/")}function rFD($){let X=[$.ruleId,$.file??"",$.message];return Buffer.from(X.join("|")).toString("base64").slice(0,16)}function kK6($){return JSON.stringify($,null,2)}var iFD;var yK6=c$(()=>{iFD={"spec-structure-error":{name:"Spec Structure Error",description:"Contract specification is missing required structure elements"},"spec-structure-warning":{name:"Spec Structure Warning",description:"Contract specification has recommended but missing elements"},"integrity-orphaned":{name:"Orphaned Spec",description:"Contract specification is not linked to any feature"},"integrity-unresolved-ref":{name:"Unresolved Reference",description:"Contract specification references a non-existent spec"},"integrity-missing-feature":{name:"Missing Feature",description:"Feature referenced by spec does not exist"},"integrity-broken-link":{name:"Broken Link",description:"Link between specs is broken"},"deps-circular":{name:"Circular Dependency",description:"Circular dependency detected between contracts"},"deps-missing":{name:"Missing Dependency",description:"Contract depends on a non-existent contract"},"handler-missing":{name:"Missing Handler",description:"Handler implementation file does not exist for this contract"},"handler-warning":{name:"Handler Warning",description:"Handler implementation has potential issues"},"test-missing":{name:"Missing Test",description:"Test file does not exist for this contract"},"test-warning":{name:"Test Warning",description:"Test implementation has potential issues"}}});function kH0($){return{success:$.success,errors:$.totalErrors,warnings:$.totalWarnings,duration:$.durationMs,timestamp:$.timestamp,commit:$.commitSha,branch:$.branch,issues:$.issues.map((X)=>({rule:X.ruleId,severity:X.severity,message:X.message,file:X.file,line:X.line}))}}function yH0($){return{success:$.success,summary:{totalErrors:$.totalErrors,totalWarnings:$.totalWarnings,totalNotes:$.totalNotes,durationMs:$.durationMs,timestamp:$.timestamp,commitSha:$.commitSha,branch:$.branch},categories:$.categories.map((X)=>({category:X.category,label:X.label,passed:X.passed,errors:X.errors,warnings:X.warnings,notes:X.notes,durationMs:X.durationMs})),issues:$.issues.map((X)=>({ruleId:X.ruleId,severity:X.severity,message:X.message,category:X.category,file:X.file,line:X.line,column:X.column,endLine:X.endLine,endColumn:X.endColumn,context:X.context}))}}function fK6($,X={}){let{pretty:J=!0,includeDetails:Q=!0}=X,W=Q?yH0($):kH0($);return J?JSON.stringify(W,null,2):JSON.stringify(W)}var xK6=()=>{};function fH0($,X={}){let J=[],{verbose:Q=!1,showTiming:W=!0,groupByFile:U=!1}=X;if(J.push({text:"",style:"normal"}),J.push({text:"\uD83D\uDCCB ContractSpec CI Check Results",style:"bold"}),J.push({text:"",style:"normal"}),$.commitSha||$.branch){let V=[$.branch?`branch: ${$.branch}`:null,$.commitSha?`commit: ${$.commitSha.slice(0,7)}`:null].filter(Boolean).join(", ");J.push({text:`Git: ${V}`,style:"muted"})}J.push({text:"",style:"normal"}),J.push({text:"Check Results:",style:"bold"});for(let V of $.categories){let j=V.passed?"✓":"✗",L=V.passed?"success":"error",S=oFD(V),v=W?` (${V.durationMs}ms)`:"";J.push({text:` ${j} ${V.label}: ${S}${v}`,style:L})}if($.issues.length>0)if(J.push({text:"",style:"normal"}),J.push({text:"Issues:",style:"bold"}),U){let V=tFD($.issues);for(let[j,L]of V){J.push({text:"",style:"normal"}),J.push({text:` ${j||"(no file)"}`,style:"bold",indent:1});for(let S of L)J.push(...Vb$(S,Q,2))}}else{let V=$.issues.filter((S)=>S.severity==="error"),j=$.issues.filter((S)=>S.severity==="warning"),L=$.issues.filter((S)=>S.severity==="note");if(V.length>0){J.push({text:"",style:"normal"}),J.push({text:" Errors:",style:"error",indent:1});for(let S of V)J.push(...Vb$(S,Q,2))}if(j.length>0){J.push({text:"",style:"normal"}),J.push({text:" Warnings:",style:"warning",indent:1});for(let S of j)J.push(...Vb$(S,Q,2))}if(L.length>0&&Q){J.push({text:"",style:"normal"}),J.push({text:" Notes:",style:"muted",indent:1});for(let S of L)J.push(...Vb$(S,Q,2))}}J.push({text:"",style:"normal"}),J.push({text:"─".repeat(50),style:"muted"});let Z=[$.totalErrors>0?`${$.totalErrors} error(s)`:null,$.totalWarnings>0?`${$.totalWarnings} warning(s)`:null,$.totalNotes>0&&Q?`${$.totalNotes} note(s)`:null].filter(Boolean);if(Z.length>0)J.push({text:`Found: ${Z.join(", ")}`,style:$.success?"warning":"error"});if(W)J.push({text:`Duration: ${$.durationMs}ms`,style:"muted"});if(J.push({text:"",style:"normal"}),$.success)J.push({text:"✅ All CI checks passed!",style:"success"});else J.push({text:"❌ CI checks failed",style:"error"});return J.push({text:"",style:"normal"}),J}function uK6($,X={}){return fH0($,X).map((J)=>" ".repeat(J.indent??0)+J.text).join(`
3348
3348
  `)}function oFD($){let X=[];if($.errors>0)X.push(`${$.errors} error(s)`);if($.warnings>0)X.push(`${$.warnings} warning(s)`);if(X.length===0)return"passed";return X.join(", ")}function Vb$($,X,J){let Q=[],W=$.severity==="error"?"✗":$.severity==="warning"?"⚠":"○",U=$.severity==="error"?"error":$.severity==="warning"?"warning":"muted",Z=`${W} ${$.message}`;if($.file){let V=$.line?`:${$.line}`:"";Z+=` (${$.file}${V})`}if(Q.push({text:Z,style:U,indent:J}),X&&$.context){let V=JSON.stringify($.context);if(V!=="{}")Q.push({text:`Context: ${V}`,style:"muted",indent:J+1})}return Q}function tFD($){let X=new Map;for(let J of $){let Q=J.file??"";if(!X.has(Q))X.set(Q,[]);let W=X.get(Q);if(W)W.push(J)}return new Map([...X.entries()].sort(([J],[Q])=>J.localeCompare(Q)))}var gK6=()=>{};var QR;var hK6=c$(()=>{mS();yK6();xK6();gK6();QR=_2({formatAsJson:()=>fK6,formatAsJsonCompact:()=>kH0,formatAsJsonFull:()=>yH0,formatAsSarif:()=>vK6,formatAsText:()=>uK6,formatAsTextLines:()=>fH0,sarifToJson:()=>kK6})});function mK6($){let{name:X,version:J,kind:Q,description:W,goal:U,context:Z,stability:V,owners:j,tags:L,auth:S,flags:v}=$,T=aFD(X.split(".").pop()||"Unknown")+"Spec",u=T.replace("Spec","Input"),r=T.replace("Spec","Output");return`import { define${xH0(Q)} } from '@lssm/lib.contracts';
3349
3349
  import { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';
3350
3350
 
@@ -6469,7 +6469,7 @@ Error:`),W instanceof Error?W.message:String(W))}}async function pMD(){let $=Mb$
6469
6469
  working-directory: ${$.workingDirectory}
6470
6470
  github-token: \${{ secrets.GITHUB_TOKEN }}`}function LM6($={}){let X={...tMD,...$},J="";if(X.mode==="validate"||X.mode==="both")J+=aMD(X);if(X.mode==="impact"||X.mode==="both")J+=sMD(X);return`# ContractSpec CI Workflow
6471
6471
  # Generated by: contractspec cicd install
6472
- # Docs: https://contractspec.lssm.tech/docs/cicd
6472
+ # Docs: https://contractspec.io/docs/cicd
6473
6473
 
6474
6474
  name: ${X.name}
6475
6475
 
@@ -6501,5 +6501,5 @@ jobs:${J}
6501
6501
  ❌ Error:`),X instanceof Error?X.message:String(X)),process.exit(1)}});GH.command("regenerator").description("Operate the Regenerator daemon").argument("<blueprint-file>","Path to AppBlueprintSpec file").argument("<tenant-file>","Path to TenantAppConfig file").argument("<rules-file>","Path to module exporting regenerator rules").argument("<sink-file>",'Path to module exporting a proposal sink (use "auto" with --executor)').option("-p, --poll-interval <ms>","Polling interval in ms (default 60000)",($)=>Number.parseInt($,10)).option("-b, --batch-duration <ms>","Lookback duration in ms (default 300000)",($)=>Number.parseInt($,10)).option("--once","Run a single evaluation cycle then exit").option("--contexts <path>","Optional file exporting an array of RegenerationContext overrides").option("--executor <path>",'Module exporting a ProposalExecutor instance, factory, or deps (required when sink is "auto")').option("--dry-run","Execute proposals in dry-run mode when using executor sink").action(async($,X,J,Q,W)=>{try{let U=await YG(),Z=EE(U,W);await _j6($,X,J,Q,W,Z)}catch(U){console.error(S$.red(`
6502
6502
  ❌ Error:`),U instanceof Error?U.message:String(U)),process.exit(1)}});function RM6(){GH.parse()}RM6();
6503
6503
 
6504
- //# debugId=48ACC720935D9CAF64756E2164756E21
6504
+ //# debugId=668F935D3A30376264756E2164756E21
6505
6505
  //# sourceMappingURL=cli.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/app.cli-contractspec",
3
- "version": "1.42.7",
3
+ "version": "1.42.9",
4
4
  "description": "CLI tool for creating, building, and validating contract specifications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,14 +34,14 @@
34
34
  "@ai-sdk/mistral": "3.0.1",
35
35
  "@ai-sdk/openai": "3.0.1",
36
36
  "ollama-ai-provider": "^1.2.0",
37
- "@lssm/bundle.contractspec-workspace": "1.42.7",
38
- "@lssm/lib.ai-providers": "1.42.7",
39
- "@lssm/lib.contracts": "1.42.7",
40
- "@lssm/lib.contracts-transformers": "1.42.7",
41
- "@lssm/lib.testing": "1.42.7",
42
- "@lssm/lib.schema": "1.42.7",
43
- "@lssm/module.ai-chat": "1.42.7",
44
- "@lssm/module.contractspec-examples": "1.42.7",
37
+ "@lssm/bundle.contractspec-workspace": "1.42.9",
38
+ "@lssm/lib.ai-providers": "1.42.9",
39
+ "@lssm/lib.contracts": "1.42.9",
40
+ "@lssm/lib.contracts-transformers": "1.42.9",
41
+ "@lssm/lib.testing": "1.42.9",
42
+ "@lssm/lib.schema": "1.42.9",
43
+ "@lssm/module.ai-chat": "1.42.9",
44
+ "@lssm/module.contractspec-examples": "1.42.9",
45
45
  "glob": "^13.0.0",
46
46
  "commander": "^14.0.2",
47
47
  "@inquirer/prompts": "^8.1.0",
@@ -51,8 +51,8 @@
51
51
  "zod": "^4.1.13"
52
52
  },
53
53
  "devDependencies": {
54
- "@lssm/tool.tsdown": "1.42.7",
55
- "@lssm/tool.typescript": "1.42.7",
54
+ "@lssm/tool.tsdown": "1.42.9",
55
+ "@lssm/tool.typescript": "1.42.9",
56
56
  "@types/node": "^22.10.2",
57
57
  "rimraf": "^6.1.2",
58
58
  "eslint": "^9.39.2"