rapidkit 0.41.1 → 0.41.2
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/README.md +76 -6
- package/contracts/extension-cli-compatibility.v1.json +1 -1
- package/contracts/runtime-command-surface.v1.json +3 -1
- package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +24 -0
- package/dist/autopilot-release-YDEUKRW6.js +1 -0
- package/dist/chunk-DWXRVGOY.js +2 -0
- package/dist/{chunk-TJN7G2MA.js → chunk-HYAT2EG7.js} +1 -1
- package/dist/{chunk-UQR6G7KH.js → chunk-JNXT6KJV.js} +1 -1
- package/dist/{chunk-CDPR2YKL.js → chunk-WCICO7ZB.js} +1 -1
- package/dist/{chunk-CKXJR3YT.js → chunk-ZPXMZCYG.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/{pipeline-DH6Z47O4.js → pipeline-YD2DO7XY.js} +1 -1
- package/dist/{workspace-agent-sync-2HRPM5ZD.js → workspace-agent-sync-BHE2V4KS.js} +1 -1
- package/dist/workspace-explain-XJ22ZXJY.js +1 -0
- package/dist/{workspace-intelligence-E3KXEZCM.js → workspace-intelligence-EC63CRVF.js} +1 -1
- package/dist/{workspace-mcp-serve-RFYDCA2L.js → workspace-mcp-serve-KOM2V35Q.js} +1 -1
- package/dist/workspace-run-F5FADRY5.js +1 -0
- package/dist/{workspace-verify-NRYH7RNB.js → workspace-verify-IAUHP6Y6.js} +1 -1
- package/docs/contracts/ARTIFACT_CATALOG.md +1 -1
- package/docs/contracts/README.md +11 -0
- package/package.json +1 -1
- package/scripts/enterprise-package-smoke.mjs +15 -9
- package/dist/autopilot-release-AHMQEUFH.js +0 -1
- package/dist/chunk-LKX3L7TE.js +0 -2
- package/dist/workspace-explain-3WSJLIJ6.js +0 -1
- package/dist/workspace-run-GCIQD73R.js +0 -1
- /package/dist/{chunk-JW2FSKT3.js → chunk-VDTAPIHB.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-ELU3G6DQ.js';import {c}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-ELU3G6DQ.js';import {c}from'./chunk-ZPXMZCYG.js';import {b}from'./chunk-46AGNYI7.js';import {b as b$1}from'./chunk-BFEBZABL.js';import {a as a$2}from'./chunk-ITJ6RKUW.js';import {a}from'./chunk-KMUWWZRT.js';import {f,e}from'./chunk-PCXSTKZ5.js';import c$1 from'chalk';import D from'fs-extra';import u from'path';function C(t){return t===0?"pass":t===2?"warn":"fail"}function M(t){return t.some(s=>s.status==="fail")?"blocked":t.some(s=>s.status==="warn")?"needs-attention":"ready"}function F(t,s){if(s)return 3;let a=t.some(i=>i.status==="fail"),r=t.some(i=>i.status==="warn");return a?1:r?2:0}async function j(t){let s=await b$1(t,true),a=false;try{let{syncWorkspaceContract:r}=await import('./workspace-contract-OO4GMENV.js');await r({workspacePath:t}),a=true;}catch{a=false;}return {sync:s,contractSynced:a}}async function G(t={}){let s=u.resolve(t.workspacePath??process.cwd()),a$3=a(s);if(!a$3)throw new Error("No RapidKit workspace found in current directory or parents");let r=[],i=[],l=false,p,y,m,f$1=Date.now();try{let{sync:e,contractSynced:n}=await j(a$3),o=e.workspaceFound&&(e.added.length>0||e.skipped>=0)||e.workspaceFound?"pass":"warn";r.push({name:"sync",status:o,durationMs:Date.now()-f$1,summary:e.workspaceFound?`registry sync complete (${e.added.length} added, ${e.skipped} existing)${n?", contract synced":""}`:"workspace not registered in global registry; contract sync attempted"}),e.workspaceFound||i.push("workspace registry entry missing \u2014 run rapidkit create workspace or register manually");}catch(e){l=true,r.push({name:"sync",status:"fail",durationMs:Date.now()-f$1,summary:`sync failed: ${e instanceof Error?e.message:String(e)}`}),i.push("workspace sync stage failed");}let w=Date.now();try{let e=await b({workspace:true,json:true,quiet:true,strict:t.strict===true,ci:t.strict!==true}),n=C(e),o=u.join(a$3,".rapidkit","reports","doctor-last-run.json");r.push({name:"doctor",status:n,durationMs:Date.now()-w,summary:n==="pass"?"doctor workspace passed":n==="warn"?"doctor workspace reported warnings":"doctor workspace reported errors",exitCode:e,evidencePath:o}),n==="fail"?i.push("doctor workspace gate failed"):n==="warn"&&i.push("doctor workspace reported warnings");}catch(e){l=true,r.push({name:"doctor",status:"fail",durationMs:Date.now()-w,summary:`doctor failed: ${e instanceof Error?e.message:String(e)}`}),i.push("doctor workspace stage failed");}if(t.skipAnalyze)r.push({name:"analyze",status:"skipped",durationMs:0,summary:"analyze stage skipped"});else {let e=Date.now();try{let n=await a$1({workspacePath:a$3,json:true,strict:t.strict===true});p=u.join(a$3,".rapidkit","reports","analyze-last-run.json");let o=n.summary.verdict==="blocked"?"fail":n.summary.verdict==="needs-attention"?"warn":"pass";r.push({name:"analyze",status:o,durationMs:Date.now()-e,summary:`analyze verdict: ${n.summary.verdict} (score ${n.summary.score}/100)`,evidencePath:p}),o==="fail"?i.push("analyze reported blocked verdict"):o==="warn"&&i.push("analyze reported needs-attention verdict");}catch(n){l=true,r.push({name:"analyze",status:"fail",durationMs:Date.now()-e,summary:`analyze failed: ${n instanceof Error?n.message:String(n)}`}),i.push("analyze stage failed");}}let h=Date.now();try{let e=await a$2({startPath:a$3,writeReport:true,skipVerify:t.skipVerify===true});y=e.evidencePath;let n=e.overallStatus==="pass"?"pass":e.overallStatus==="warn"?"warn":"fail";r.push({name:"readiness",status:n,durationMs:Date.now()-h,summary:`readiness overall: ${e.overallStatus}`,evidencePath:e.evidencePath}),n==="fail"?i.push(...e.blockingReasons.map(o=>`readiness: ${o}`)):n==="warn"&&i.push(...e.gates.filter(o=>o.status==="warn").map(o=>`readiness warn: ${o.gate}: ${o.summary}`));}catch(e){l=true,r.push({name:"readiness",status:"fail",durationMs:Date.now()-h,summary:`readiness failed: ${e instanceof Error?e.message:String(e)}`}),i.push("readiness stage failed");}if(t.skipAutopilot)r.push({name:"autopilot",status:"skipped",durationMs:0,summary:"autopilot stage skipped"});else {let e=Date.now(),n=t.autopilotMode??"audit";try{let o=await c({workspacePath:a$3,mode:n,json:true,skipPipelineStages:true});m=o.artifacts.reportPath;let P=o.summary.verdict==="approved"?"pass":o.summary.verdict==="partial"?"warn":"fail";r.push({name:"autopilot",status:P,durationMs:Date.now()-e,summary:`autopilot ${n}: ${o.summary.verdict}`,exitCode:o.summary.exitCode,evidencePath:m}),P!=="pass"&&i.push(...o.blockingReasons.slice(0,5));}catch(o){l=true,r.push({name:"autopilot",status:"fail",durationMs:Date.now()-e,summary:`autopilot failed: ${o instanceof Error?o.message:String(o)}`}),i.push("autopilot release stage failed");}}let z=M(r),k=F(r,l),g=u.join(a$3,".rapidkit","reports","pipeline-last-run.json"),d={schemaVersion:"rapidkit-pipeline-v1",generatedAt:new Date().toISOString(),workspacePath:a$3,summary:{verdict:z,exitCode:k,stagesPassed:r.filter(e=>e.status==="pass").length,stagesWarn:r.filter(e=>e.status==="warn").length,stagesFailed:r.filter(e=>e.status==="fail").length},stages:r,blockingReasons:[...new Set(i)],artifacts:{reportPath:g,analyzeEvidencePath:p,readinessEvidencePath:y,autopilotEvidencePath:m}};if(t.writeReport!==false){await D.ensureDir(u.dirname(g));let e$1=f(d,{commandId:"workspacePipeline",exitCode:k,generatedAt:d.generatedAt,blockers:d.blockingReasons,runId:e()});await D.writeJSON(g,e$1,{spaces:2});}if(t.writeReport!==false&&t.noAgentSync!==true&&process.env.RAPIDKIT_NO_AGENT_SYNC!=="1"&&t.agentSync!==false)try{let{syncWorkspaceAgentGrounding:e}=await import('./workspace-agent-sync-BHE2V4KS.js'),n=await e({workspacePath:a$3,write:true,refreshContext:true,strict:false});d.agentGrounding={indexPath:n.indexPath,writtenFiles:n.writtenFiles,blockers:n.blockers};}catch{}return d}async function X(t){let s;try{s=await G(t);}catch(a){let r=a instanceof Error?a.message:String(a);t.json?console.log(JSON.stringify({schemaVersion:"rapidkit-pipeline-error-v1",ok:false,error:{message:r}},null,2)):console.log(c$1.red(`Pipeline failed: ${r}`)),process.exit(1);}if(t.json)console.log(JSON.stringify(s,null,2));else {console.log(c$1.bold.cyan(`
|
|
2
2
|
\u{1F517} RapidKit Governance Pipeline
|
|
3
3
|
`)),console.log(c$1.bold(`Workspace: ${c$1.cyan(u.basename(s.workspacePath))}`)),console.log(c$1.gray(`Path: ${s.workspacePath}`)),console.log(c$1.white(`Verdict: ${s.summary.verdict} Exit: ${s.summary.exitCode} (${s.summary.stagesPassed} pass / ${s.summary.stagesWarn} warn / ${s.summary.stagesFailed} fail)`));for(let a of s.stages){let r=a.status==="pass"?c$1.green("PASS"):a.status==="warn"?c$1.yellow("WARN"):a.status==="skipped"?c$1.gray("SKIP"):c$1.red("FAIL");console.log(` - ${a.name}: ${r} ${a.summary}`);}if(s.blockingReasons.length>0){console.log(c$1.bold(`
|
|
4
4
|
Blocking reasons:`));for(let a of s.blockingReasons.slice(0,8))console.log(c$1.gray(` \u2022 ${a}`));}console.log(c$1.gray(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as AGENT_CUSTOMIZATION_PACK_REPORT_PATH,d as AGENT_CUSTOMIZATION_PACK_SCHEMA,f as AGENT_GROUNDING_DOC_PATH,e as AGENT_REPORTS_INDEX_PATH,c as AGENT_REPORTS_INDEX_SCHEMA,h as AGENT_REPORT_CATALOG,i as buildWorkspaceAgentReportsIndex,j as parseAgentGroundingTargets,k as syncWorkspaceAgentGrounding}from'./chunk-
|
|
1
|
+
export{g as AGENT_CUSTOMIZATION_PACK_REPORT_PATH,d as AGENT_CUSTOMIZATION_PACK_SCHEMA,f as AGENT_GROUNDING_DOC_PATH,e as AGENT_REPORTS_INDEX_PATH,c as AGENT_REPORTS_INDEX_SCHEMA,h as AGENT_REPORT_CATALOG,i as buildWorkspaceAgentReportsIndex,j as parseAgentGroundingTargets,k as syncWorkspaceAgentGrounding}from'./chunk-JNXT6KJV.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as buildWorkspaceExplain,a as resolveWorkspaceExplainArtifactPath,c as writeWorkspaceExplainReport}from'./chunk-WCICO7ZB.js';export{d as WORKSPACE_MODEL_DIFF_REPORT_PATH}from'./chunk-DWXRVGOY.js';export{c as WORKSPACE_EXPLAIN_REPORT_PATH,e as WORKSPACE_TRACE_REPORT_PATH,d as WORKSPACE_WHY_REPORT_PATH}from'./chunk-GBJBQ43T.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as WORKSPACE_IMPACT_REPORT_PATH,e as WORKSPACE_IMPACT_SCHEMA_VERSION,d as WORKSPACE_MODEL_DIFF_REPORT_PATH,b as WORKSPACE_MODEL_DIFF_SCHEMA_VERSION,c as WORKSPACE_MODEL_SNAPSHOT_REPORT_PATH,a as WORKSPACE_MODEL_SNAPSHOT_SCHEMA_VERSION,n as buildWorkspaceImpact,i as buildWorkspaceModelSnapshot,k as diffWorkspaceModel,g as isGitDiffSource,h as parseGitDiffRef,m as workspaceVerificationPlan,o as writeWorkspaceImpact,l as writeWorkspaceModelDiff,j as writeWorkspaceModelSnapshot}from'./chunk-
|
|
1
|
+
export{f as WORKSPACE_IMPACT_REPORT_PATH,e as WORKSPACE_IMPACT_SCHEMA_VERSION,d as WORKSPACE_MODEL_DIFF_REPORT_PATH,b as WORKSPACE_MODEL_DIFF_SCHEMA_VERSION,c as WORKSPACE_MODEL_SNAPSHOT_REPORT_PATH,a as WORKSPACE_MODEL_SNAPSHOT_SCHEMA_VERSION,n as buildWorkspaceImpact,i as buildWorkspaceModelSnapshot,k as diffWorkspaceModel,g as isGitDiffSource,h as parseGitDiffRef,m as workspaceVerificationPlan,o as writeWorkspaceImpact,l as writeWorkspaceModelDiff,j as writeWorkspaceModelSnapshot}from'./chunk-DWXRVGOY.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-WCICO7ZB.js';import {b as b$2}from'./chunk-33LR2QEM.js';import {d}from'./chunk-HYAT2EG7.js';import {c,e}from'./chunk-AQ4XZZC6.js';import {c as c$1,b as b$3}from'./chunk-GBJBQ43T.js';import {h as h$1}from'./chunk-EN6YCX36.js';import {c as c$2}from'./chunk-3PTJID76.js';import f from'path';import T from'readline';import b$1 from'fs-extra';var P=".rapidkit/reports/INDEX.json";function h(t,e){return t.kind!==e.kind?false:t.kind==="project"&&e.kind==="project"?t.project.toLowerCase()===e.project.toLowerCase():t.kind==="blocker"&&e.kind==="blocker"?t.blockerId===e.blockerId:t.kind==="trace"&&e.kind==="trace"?t.diffRef===e.diffRef:true}var O=[{name:"getWorkspaceModel",description:"Read workspace-model.json",inputSchema:{type:"object",properties:{}}},{name:"getEvidenceIndex",description:"Read agent reports INDEX.json",inputSchema:{type:"object",properties:{}}},{name:"getBlockers",description:"Aggregate blocking reasons from verify, explain, and contract-verify reports",inputSchema:{type:"object",properties:{}}},{name:"getSafeCommands",description:"Read safe commands from workspace-context-agent.json",inputSchema:{type:"object",properties:{}}},{name:"getProjectContext",description:"Read scoped project context from workspace-context-agent.json",inputSchema:{type:"object",properties:{project:{type:"string",description:"Optional project name; defaults to active scope"}}}},{name:"getArtifact",description:"Read one workspace-relative artifact path",inputSchema:{type:"object",properties:{relativePath:{type:"string"}},required:["relativePath"]}},{name:"listOperationalSkills",description:"Read workspace-skills-index.json",inputSchema:{type:"object",properties:{}}},{name:"getWorkspaceExplain",description:"Build or read workspace explain report",inputSchema:{type:"object",properties:{target:{type:"string",description:"release-blocked | project:<name> | blocker:<id> | trace:<diffRef> | <project>"}}}}];function C(t){let e=t.trim().replace(/\\/g,"/");return e.length>0&&!f.isAbsolute(e)&&!e.split("/").includes("..")&&e.startsWith(".rapidkit/")}async function l(t,e){if(!C(e))throw new Error(`Unsafe artifact path: ${e}`);let i=f.join(t,e);return await b$1.pathExists(i)?b$1.readJson(i):null}async function _(t){let e$1=[],i=new Set,s=((await l(t,d))?.blockingReasons??[]).filter(n=>typeof n=="string"&&n.trim().length>0);if(s.length>0){e$1.push({artifact:d,reasons:s});for(let n of s)i.add(n);}let a=await l(t,c$1);if(e(a)){let n=(a.blockingReasons??[]).filter(r=>typeof r=="string"&&r.trim().length>0);if(n.length>0){e$1.push({artifact:c$1,reasons:n});for(let r of n)i.add(r);}}let c=await l(t,c$2),p=(c?.violations??[]).filter(n=>typeof n=="string"&&n.trim().length>0);if(p.length>0||String(c?.status??"").toLowerCase()==="failed"){let n=p.length>0?p:["Workspace contract verification failed"];e$1.push({artifact:c$2,reasons:n});for(let r of n)i.add(r);}return {blockingReasons:[...i],sources:e$1}}async function x(t,e$1,i){switch(e$1){case "getWorkspaceModel":return l(t,h$1);case "getEvidenceIndex":return l(t,P);case "getBlockers":return _(t);case "getSafeCommands":return {safeCommands:(await l(t,b$2))?.safeCommands??[]};case "getProjectContext":{let o=await l(t,b$2);if(!o)return null;let s=String(i.project??"").trim(),a=o.scope?.activeProject??void 0,c=s||a,p=Array.isArray(o.projects)?o.projects:[],n=c&&p.find(r=>typeof r.name=="string"&&r.name.toLowerCase()===c.toLowerCase());return {workspace:o.workspace??null,scope:o.scope??null,validation:o.validation??null,project:n??null,safeCommands:o.safeCommands??[]}}case "getArtifact":{let o=String(i.relativePath??"").trim();return l(t,o)}case "listOperationalSkills":return l(t,b$3);case "getWorkspaceExplain":{let o=String(i.target??"release-blocked").trim(),s=c(o);if(!s)throw new Error(`Invalid explain target: ${o}`);let a=await l(t,c$1);return e(a)&&h(a.target,s)?a:b({workspacePath:t,target:s})}default:throw new Error(`Unknown tool: ${e$1}`)}}function R(t,e){process.stdout.write(`${JSON.stringify({jsonrpc:"2.0",id:t??null,result:e})}
|
|
2
2
|
`);}function w(t,e){process.stdout.write(`${JSON.stringify({jsonrpc:"2.0",id:t??null,error:{code:-32e3,message:e}})}
|
|
3
3
|
`);}async function B(t){let e=f.resolve(t.workspacePath),i=T.createInterface({input:process.stdin,terminal:false});for await(let o of i){let s=o.trim();if(!s)continue;let a;try{a=JSON.parse(s);}catch{w(null,"Invalid JSON-RPC request");continue}let{id:c,method:p,params:n}=a;try{if(p==="initialize"){R(c,{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:{name:"rapidkit-workspace-mcp",version:"0.1.0"}});continue}if(p==="notifications/initialized")continue;if(p==="tools/list"){R(c,{tools:O.map(r=>({name:r.name,description:r.description,inputSchema:r.inputSchema}))});continue}if(p==="tools/call"){let r=String(n?.name??""),A=n?.arguments&&typeof n.arguments=="object"?n.arguments:{},E=await x(e,r,A);R(c,{content:[{type:"text",text:JSON.stringify(E,null,2)}],isError:E==null});continue}w(c,`Unsupported method: ${p??"unknown"}`);}catch(r){w(c,r instanceof Error?r.message:String(r));}}}async function F(t,e,i={}){return x(f.resolve(t),e,i)}export{O as WORKSPACE_MCP_READ_TOOLS,F as invokeMcpToolForTest,B as runWorkspaceMcpServe};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as runWorkspaceStage}from'./chunk-VDTAPIHB.js';export{a as WORKSPACE_RUN_LAST_REPORT_FILENAME}from'./chunk-64RTZBHU.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as WORKSPACE_VERIFY_REPORT_PATH,c as WORKSPACE_VERIFY_SCHEMA_VERSION,f as buildWorkspaceVerify,e as computeAffectedSubgraphGate,h as evaluateWorkspaceVerifyGate,i as workspaceVerifyExitCode,g as writeWorkspaceVerify}from'./chunk-
|
|
1
|
+
export{d as WORKSPACE_VERIFY_REPORT_PATH,c as WORKSPACE_VERIFY_SCHEMA_VERSION,f as buildWorkspaceVerify,e as computeAffectedSubgraphGate,h as evaluateWorkspaceVerifyGate,i as workspaceVerifyExitCode,g as writeWorkspaceVerify}from'./chunk-HYAT2EG7.js';
|
|
@@ -43,7 +43,7 @@ Side/cache (not gates): `.rapidkit/reports/doctor-workspace-cache.json` (`doctor
|
|
|
43
43
|
| `workspace impact --from <diff>` | `workspace-impact-last-run.json` | `workspace-impact.v1` | `workspace-impact.v1.json` |
|
|
44
44
|
| `workspace verify` | `workspace-verify-last-run.json` | `workspace-verify.v1` | `workspace-verify.v1.json` |
|
|
45
45
|
| `workspace context --write` | `workspace-context-agent.json` | `workspace-context.v1` | `workspace-context.v1.json` |
|
|
46
|
-
| `workspace agent-sync --write` | `reports/INDEX.json`, `reports/agent-customization-pack.json`, `reports/rapidkit-mcp-design.json`, `reports/workspace-skills-index.json`, `.rapidkit/skills/*.md`,
|
|
46
|
+
| `workspace agent-sync --write` | `reports/INDEX.json`, `reports/agent-customization-pack.json`, `reports/rapidkit-mcp-design.json`, `reports/workspace-skills-index.json`, `.rapidkit/skills/*.md`, `.rapidkit/AGENT-GROUNDING.md`, `AGENTS.md`, Copilot/Cursor/Claude/VS Code agent surfaces | `rapidkit-agent-customization-pack.v1` | `contracts/agent-customization-pack.v1.json` |
|
|
47
47
|
| `workspace explain --write` | `workspace-explain-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
|
|
48
48
|
| `workspace feedback record` | `workspace-intelligence-history.json` (`kind: agent-action`) | `workspace-intelligence-history.v1` | `contracts/workspace-intelligence/workspace-intelligence-history.v1.json` |
|
|
49
49
|
|
package/docs/contracts/README.md
CHANGED
|
@@ -23,6 +23,7 @@ Workflow: change code → `npm run generate:contracts` → `npm run sync:parity-
|
|
|
23
23
|
| -------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
24
24
|
| [ARTIFACT_CATALOG.md](./ARTIFACT_CATALOG.md) | On-disk artifact paths, schema versions, and consumer rules |
|
|
25
25
|
| [COMMAND_OWNERSHIP_MATRIX.md](./COMMAND_OWNERSHIP_MATRIX.md) | Which commands the npm wrapper owns vs Python Core |
|
|
26
|
+
| [NAMING_AND_COEXISTENCE.md](./NAMING_AND_COEXISTENCE.md) | Workspace Intelligence command naming and generated surface rules |
|
|
26
27
|
| [RUNTIME_SUPPORT_MATRIX.md](./RUNTIME_SUPPORT_MATRIX.md) | Scaffold, import, lifecycle, and module support tiers |
|
|
27
28
|
| [RUNTIME_ACCEPTANCE_MATRIX.md](./RUNTIME_ACCEPTANCE_MATRIX.md) | Runtime acceptance matrix expectations |
|
|
28
29
|
| [rapidkit-cli-contracts.json](./rapidkit-cli-contracts.json) | Core CLI JSON schema fragments |
|
|
@@ -44,10 +45,20 @@ Workspace intelligence (`../contracts/workspace-intelligence/`):
|
|
|
44
45
|
|
|
45
46
|
- `workspace-model.v1.json`
|
|
46
47
|
- `workspace-context.v1.json`
|
|
48
|
+
- `workspace-dependency-graph.v1.json`
|
|
47
49
|
- `workspace-model-snapshot.v1.json`
|
|
48
50
|
- `workspace-model-diff.v1.json`
|
|
49
51
|
- `workspace-impact.v1.json`
|
|
50
52
|
- `workspace-verify.v1.json`
|
|
53
|
+
- `workspace-explain.v1.json`
|
|
54
|
+
- `workspace-intelligence-history.v1.json`
|
|
55
|
+
- `workspace-operational-skill.v1.json`
|
|
56
|
+
- `workspace-skills-index.v1.json`
|
|
57
|
+
- `workspace-contract-verify.v1.json`
|
|
58
|
+
- `agent-action-outcome.v1.json`
|
|
59
|
+
- `blocker-resolution.v1.json`
|
|
60
|
+
- `doctor-fix-result.v1.json`
|
|
61
|
+
- `studio-blocker-handoff.v1.json`
|
|
51
62
|
|
|
52
63
|
CLI commands: see [commands-reference.md](../commands-reference.md) and [../README.md](../README.md#workspace-intelligence).
|
|
53
64
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapidkit",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Open-source workspace intelligence CLI for software systems: create, adopt, govern, verify, and align polyglot workspaces for humans, CI, IDEs, and AI agents.",
|
|
6
6
|
"keywords": [
|
|
@@ -102,13 +102,13 @@ function runToFile(command, args, options = {}) {
|
|
|
102
102
|
|
|
103
103
|
function runNpm(args) {
|
|
104
104
|
const npm = resolveNpmInvocation();
|
|
105
|
+
const isolatedCache = path.join(os.tmpdir(), `rapidkit-enterprise-npm-cache-${process.pid}`);
|
|
106
|
+
fs.mkdirSync(isolatedCache, { recursive: true });
|
|
105
107
|
return runToFile(npm.command, [...npm.prefixArgs, ...args], {
|
|
106
108
|
env: {
|
|
107
109
|
...cliEnv(),
|
|
108
110
|
npm_config_user_agent: process.env.npm_config_user_agent || 'npm/10 rapidkit-smoke',
|
|
109
|
-
npm_config_cache:
|
|
110
|
-
process.env.npm_config_cache ||
|
|
111
|
-
path.join(os.tmpdir(), `rapidkit-enterprise-npm-cache-${process.pid}`),
|
|
111
|
+
npm_config_cache: isolatedCache,
|
|
112
112
|
},
|
|
113
113
|
});
|
|
114
114
|
}
|
|
@@ -164,6 +164,17 @@ function parseTrailingJson(stdout) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
function parseTrailingJsonArray(stdout) {
|
|
168
|
+
const trimmed = stdout.trim();
|
|
169
|
+
const start = trimmed.lastIndexOf('\n[');
|
|
170
|
+
const jsonText = start >= 0 ? trimmed.slice(start + 1) : trimmed;
|
|
171
|
+
try {
|
|
172
|
+
return JSON.parse(jsonText);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
fail(`failed to parse npm JSON output: ${error instanceof Error ? error.message : error}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
167
178
|
function assertPackContents() {
|
|
168
179
|
if (process.env.RAPIDKIT_ENTERPRISE_PREPACK === '1') {
|
|
169
180
|
const packageJson = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package.json'), 'utf8'));
|
|
@@ -194,12 +205,7 @@ function assertPackContents() {
|
|
|
194
205
|
}
|
|
195
206
|
|
|
196
207
|
const output = runNpm(['pack', '--dry-run', '--json', '--ignore-scripts']);
|
|
197
|
-
|
|
198
|
-
try {
|
|
199
|
-
packuments = JSON.parse(output);
|
|
200
|
-
} catch (error) {
|
|
201
|
-
fail(`npm pack --dry-run did not return JSON: ${error instanceof Error ? error.message : error}`);
|
|
202
|
-
}
|
|
208
|
+
const packuments = parseTrailingJsonArray(output);
|
|
203
209
|
|
|
204
210
|
const files = new Set(
|
|
205
211
|
(packuments?.[0]?.files ?? [])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-CKXJR3YT.js';
|
package/dist/chunk-LKX3L7TE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {j,h as h$1,g}from'./chunk-EN6YCX36.js';import {a as a$1}from'./chunk-HTYMXMQM.js';import {c}from'./chunk-S5KTATOU.js';import {a}from'./chunk-3PTJID76.js';import pe from'crypto';import u from'path';import y from'fs-extra';import {spawnSync}from'child_process';function S(e,t){let r=spawnSync("git",t,{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]});return r.status!==0?{ok:false,stdout:""}:{ok:true,stdout:(r.stdout??"").trim()}}function ce(e){let t=[],r=[],n=[];for(let c of e.split(`
|
|
2
|
-
`)){if(!c.trim())continue;let a=c.slice(0,2),i=c.slice(3).trim();if(i){if(a==="??"){r.push(i);continue}a.includes("D")&&n.push(i),t.push(i);}}return {changedFiles:[...new Set(t)].sort(),untrackedFiles:[...new Set(r)].sort(),deletedFiles:[...new Set(n)].sort()}}function L(e,t){let r={available:false,dirty:false,changedFiles:[],untrackedFiles:[],deletedFiles:[]},n=S(e,["rev-parse","--is-inside-work-tree"]);if(!n.ok||n.stdout!=="true")return r;let c=S(e,["rev-parse","--abbrev-ref","HEAD"]),a=S(e,["rev-parse","HEAD"]),i=S(e,["status","--porcelain=v1","--untracked-files=all"]),p=ce(i.stdout),m=p.changedFiles.length>0||p.untrackedFiles.length>0||p.deletedFiles.length>0;return {available:true,branch:c.ok?c.stdout:void 0,commit:a.ok?a.stdout:void 0,ref:t?.ref,dirty:m,changedFiles:p.changedFiles,untrackedFiles:p.untrackedFiles,deletedFiles:p.deletedFiles}}var Q="workspace-model-snapshot.v1",T="workspace-model-diff.v1",$=".rapidkit/reports/workspace-model-snapshot.json",X=".rapidkit/reports/workspace-model-diff-last-run.json",de="workspace-impact.v1",le=".rapidkit/reports/workspace-impact-last-run.json";function Z(e){let t=e.trim().toLowerCase();return t==="git"||t.startsWith("git:")}function me(e){let t=e.trim();return t.toLowerCase()==="git"?"HEAD":t.toLowerCase().startsWith("git:")&&t.slice(4).trim()||"HEAD"}function _(e){if(Array.isArray(e))return e.map(t=>_(t));if(e&&typeof e=="object"){let t={};for(let r of Object.keys(e).sort())t[r]=_(e[r]);return t}return e}function k(e){return JSON.stringify(_(e))}function E(e){let{runId:t,...r}=e,n={...r,generatedAt:"<ignored>",graph:e.graph?{...e.graph,generatedAt:"<ignored>"}:void 0,validation:e.validation?{...e.validation,issues:e.validation.issues.map(c=>({...c})).sort((c,a)=>{let i=`${c.severity}:${c.code}:${c.target}:${c.message}`,p=`${a.severity}:${a.code}:${a.target}:${a.message}`;return i.localeCompare(p)})}:void 0};return pe.createHash("sha256").update(k(n)).digest("hex")}function ee(e,t){return u.isAbsolute(t)?t:u.join(e,t)}async function fe(e){let t=await y.readJson(e);if(!t||typeof t!="object"||Array.isArray(t))throw new Error(`Workspace model input is not a JSON object: ${e}`);let r=t;if(r.schemaVersion===Q){let n=r;if(!n.model||n.model.schemaVersion!==g)throw new Error(`Invalid workspace model snapshot: ${e}`);return {model:n.model,hash:n.modelHash||E(n.model)}}if(r.schemaVersion===g){let n=r;return {model:n,hash:E(n)}}throw r.schemaVersion===T?new Error(`workspace diff --from received a diff report (${u.basename(e)}). Use a workspace model snapshot or model report as baseline, e.g. ${$}. To analyze an existing diff report, run: npx rapidkit workspace impact --from ${u.basename(e)} --json`):new Error(`Unsupported workspace model input schema: ${String(r.schemaVersion)}`)}async function ue(e){let t=await y.readJson(e);if(!t||typeof t!="object"||Array.isArray(t))throw new Error(`Workspace diff input is not a JSON object: ${e}`);let r=t;if(r.schemaVersion!==T)return null;let n=r;if(!n.currentModel||n.currentModel.schemaVersion!==g||!n.summary||!Array.isArray(n.changes))throw new Error(`Invalid workspace model diff report: ${e}`);return n}async function Ve(e){let t=e.model??await j({workspacePath:e.workspacePath,includeAbsolutePaths:e.includeAbsolutePaths,includeEvidence:e.includeEvidence,observableScanDepth:e.observableScanDepth,now:e.now});return {schemaVersion:Q,generatedAt:(e.now??new Date).toISOString(),modelHash:E(t),modelRef:h$1,model:t}}async function Ge(e,t){let r=u.join(t,$);return await y.ensureDir(u.dirname(r)),await y.writeJson(r,a(e),{spaces:2}),r}function A(e){return {name:e.name,path:e.path,kind:e.kind,runtime:e.runtime,framework:e.framework,generator:e.generator,supportTier:e.supportTier,commands:e.commands,importantFiles:e.importantFiles}}function h(e,t){e.push(t);}function ge(e,t){let r=[],n=["name","profile","type"],c=["workspaceType","surfaces","runtimeFamilies","businessCapabilities"];for(let a of n){let i=e.workspace[a],p=t.workspace[a];k(i)!==k(p)&&h(r,{type:"workspace.changed",severity:"info",target:`workspace.${a}`,message:`Workspace metadata field changed: ${String(a)}`,before:i,after:p});}for(let a of c){let i=e.identity[a],p=t.identity[a];k(i)!==k(p)&&h(r,{type:"workspace.changed",severity:"info",target:`identity.${a}`,message:`Workspace identity field changed: ${String(a)}`,before:i,after:p});}return k(e.policies)!==k(t.policies)&&h(r,{type:"workspace.changed",severity:"warning",target:"policies",message:"Workspace policy summary changed.",before:e.policies,after:t.policies}),k(e.evidence)!==k(t.evidence)&&h(r,{type:"workspace.changed",severity:"info",target:"evidence",message:"Workspace evidence summary changed.",before:e.evidence,after:t.evidence}),k(e.discovery)!==k(t.discovery)&&h(r,{type:"workspace.changed",severity:"info",target:"discovery",message:"Workspace discovery settings changed.",before:e.discovery,after:t.discovery}),e.contracts.exists!==t.contracts.exists&&h(r,{type:"workspace.changed",severity:t.contracts.exists?"info":"warning",target:t.contracts.workspaceContractPath,message:"Workspace contract presence changed.",before:e.contracts.exists,after:t.contracts.exists}),r}function ke(e,t){let r=e.validation??null,n=t.validation??null;return k(r)===k(n)?[]:[{type:"validation.changed",severity:n?.status==="failed"?"critical":"warning",target:"validation",message:"Workspace model validation changed.",before:r,after:n}]}function he(e,t){let r=[],n=new Map(e.projects.map(a=>[a.path,a])),c=new Map(t.projects.map(a=>[a.path,a]));for(let[a,i]of c.entries()){let p=n.get(a);if(!p){h(r,{type:"project.added",severity:"info",target:a,message:`Project added: ${i.name}`,after:A(i)});continue}let m=A(p),l=A(i);if(k(m)!==k(l)){let f=p.runtime!==i.runtime||p.framework!==i.framework;h(r,{type:"project.changed",severity:f?"warning":"info",target:a,message:`Project changed: ${i.name}`,before:m,after:l});}}for(let[a,i]of n.entries())c.has(a)||h(r,{type:"project.removed",severity:"warning",target:a,message:`Project removed: ${i.name}`,before:A(i)});return r.sort((a,i)=>`${a.type}:${a.target}`.localeCompare(`${i.type}:${i.target}`))}async function we(e){let t=u.resolve(e.workspacePath),r=Z(e.fromPath),n=r?me(e.fromPath):void 0,c=e.fromPath;if(r){let g=u.join(t,$);if(!await y.pathExists(g))throw new Error("Git-aware workspace diff requires an existing snapshot at .rapidkit/reports/workspace-model-snapshot.json. Run: npx rapidkit workspace snapshot --json");c=$;}let a=ee(t,c),i=await fe(a),p=e.model??await j({workspacePath:t,includeAbsolutePaths:e.includeAbsolutePaths,includeEvidence:e.includeEvidence,observableScanDepth:e.observableScanDepth,now:e.now}),m=E(p),l=[...ge(i.model,p),...he(i.model,p),...ke(i.model,p)],f;e.includeGitObservation!==false&&(f=e.gitObservation??L(t,{ref:n}),f.available&&ve(l,f,p));let v=l.filter(g=>g.type.startsWith("git.")).length,I=i.hash!==m,W=r?`git:${n??"HEAD"}`:u.relative(t,a).split(u.sep).join("/");return {schemaVersion:T,generatedAt:(e.now??new Date).toISOString(),fromRef:W,toRef:h$1,fromHash:i.hash,toHash:m,summary:{changed:I||v>0,addedProjects:l.filter(g=>g.type==="project.added").length,removedProjects:l.filter(g=>g.type==="project.removed").length,changedProjects:l.filter(g=>g.type==="project.changed").length,workspaceChanges:l.filter(g=>g.type==="workspace.changed").length,validationChanges:l.filter(g=>g.type==="validation.changed").length,gitChangedFiles:v},git:f?.available?je(f,n):{available:false,dirty:false,changedFiles:0,untrackedFiles:0,deletedFiles:0},changes:l,currentModel:p}}async function Ne(e,t){let r=u.join(t,X);return await y.ensureDir(u.dirname(r)),await y.writeJson(r,a(e),{spaces:2}),r}function M(e){return {none:0,low:1,medium:2,high:3,critical:4}[e]}function z(e){return e.reduce((t,r)=>M(r)>M(t)?r:t,"none")}var H=["none","low","medium","high","critical"];function ye(e){let t=Math.max(1,M(e)-1);return H[t]}function We(e){let t=Math.min(H.length-1,M(e)+1);return H[t]}function J(e){return e.join(" ")}function w(e,t,r,n){return {id:e,label:t,scope:n.scope,project:n.project,display:J(["npx","rapidkit",...r]),execute:J(["npx","--yes","--package","rapidkit","rapidkit",...r]),required:n.required!==false}}function U(e){let t=`project:${e.name}`,r=e.commands.fleetStages;return [w(`project.${e.name}.init`,`Run init for ${e.name}`,["workspace","run","init","--scope",t,"--json"],{scope:"project",project:e.name,required:r.includes("init")}),w(`project.${e.name}.test`,`Run tests for ${e.name}`,["workspace","run","test","--scope",t,"--json"],{scope:"project",project:e.name,required:r.includes("test")}),w(`project.${e.name}.build`,`Run build for ${e.name}`,["workspace","run","build","--scope",t,"--json"],{scope:"project",project:e.name,required:r.includes("build")}),w(`project.${e.name}.start`,`Run start for ${e.name}`,["workspace","run","start","--scope",t,"--json"],{scope:"project",project:e.name,required:r.includes("start")})]}function D(){return [w("workspace.doctor","Run workspace doctor",["doctor","workspace","--json"],{scope:"workspace"}),w("workspace.contract.verify","Verify workspace contract",["workspace","contract","verify","--json"],{scope:"workspace"}),w("workspace.readiness","Run release readiness",["readiness","--json"],{scope:"workspace"}),w("workspace.analyze","Run workspace analyze",["analyze","--json"],{scope:"workspace",required:false}),w("workspace.pipeline","Run governance pipeline",["pipeline","--json"],{scope:"workspace",required:false}),w("workspace.doctor-fix","Verify doctor fix result",["doctor","workspace","--fix","--json"],{scope:"workspace",required:false})]}function be(e,t){let r=t.split(u.sep).join("/");return e.projects.filter(c=>{let a=c.path.split(u.sep).join("/");return r===a||r.startsWith(`${a}/`)}).sort((c,a)=>a.path.length-c.path.length)[0]}function ve(e,t,r){let n=new Set(e.map(a=>a.target)),c=(a,i)=>{let p=i.split(u.sep).join("/"),m=`git:${p}`;if(n.has(m))return;let l=be(r,p),f=l?`${l.name} (${l.path})`:"workspace";h(e,{type:a,severity:a==="git.deleted"?"warning":"info",target:m,message:`Git ${a==="git.untracked"?"untracked":a==="git.deleted"?"deleted":"changed"} file affects ${f}: ${p}`,after:{path:p,project:l?.name,projectPath:l?.path}}),n.add(m);};for(let a of t.changedFiles)c("git.file.changed",a);for(let a of t.untrackedFiles)c("git.untracked",a);for(let a of t.deletedFiles)c("git.deleted",a);}function je(e,t){return {available:true,ref:t??e.ref,branch:e.branch,commit:e.commit,dirty:e.dirty,changedFiles:e.changedFiles.length,untrackedFiles:e.untrackedFiles.length,deletedFiles:e.deletedFiles.length}}function Me(e){let t=new Set,r=[];for(let n of e){let c=`${n.scope}:${n.project??""}:${n.display}`;t.has(c)||(t.add(c),r.push(n));}return r}function Pe(e){return e.type==="project.removed"?"high":e.severity==="critical"?"critical":e.severity==="warning"?"high":("medium")}function Ie(e,t){return e.severity==="critical"?"critical":e.target==="policies"||e.target.includes("contract")?"high":e.type==="validation.changed"?(t?.projectCount??0)===0?"low":"high":e.target==="evidence"?"low":e.severity==="warning"?"medium":"low"}function Re(e){return e.affectedProjects>0||e.projectCount>0||!e.changes.every(r=>r.severity==="critical"?false:r.type.startsWith("git.")||r.type==="validation.changed")?e.risk:M(e.risk)>=M("high")||e.risk==="medium"?"low":e.risk}function Y(e,t){if(!e||e==="workspace")return true;let r=(e.startsWith("project:")?e.slice(8):e).trim().toLowerCase();return [t.name,t.path,u.basename(t.path),t.absolutePath].filter(n=>typeof n=="string"&&n.trim().length>0).map(n=>n.trim().toLowerCase()).includes(r)}function Ce(e){if(!e.changed)return {headline:"No workspace model impact detected.",bullets:["The current workspace model matches the provided snapshot/report."],unsafeAssumptions:["Do not claim runtime verification passed unless a report exists."]};let t=e.affectedProjects.map(r=>r.project?.name??r.target);return {headline:`Workspace impact risk: ${e.risk}.`,bullets:[`Affected projects: ${t.length?t.join(", "):"none"}.`,`Workspace-level items: ${e.workspaceImpact.length}.`,"Use the verification plan before recommending apply, rollback, or release actions."],unsafeAssumptions:["Do not infer test/build success from impact alone.","Do not apply fixes without project scope and verification evidence.","Use display commands for users and execute commands for automation."]}}async function Be(e){let t=u.resolve(e.workspacePath),r=Z(e.fromPath),n=e.diff;if(!n&&!r){let o=ee(t,e.fromPath);n=await ue(o)??void 0;}n||(n=await we({workspacePath:t,fromPath:e.fromPath,includeAbsolutePaths:e.includeAbsolutePaths,includeEvidence:e.includeEvidence,includeGitObservation:e.includeGitObservation,gitObservation:e.gitObservation,now:e.now,model:e.model}));let c$1=new Map(n.currentModel.projects.map(o=>[o.path,o])),a=new Map(n.currentModel.projects.map(o=>[o.name,o])),i=n.changes.filter(o=>o.type.startsWith("project.")),p=new Map;for(let o of i){let d=(c$1.get(o.target)??(typeof o.before?.name=="string"?a.get(o.before.name):void 0))?.path??o.target,b=p.get(d)??[];b.push(o),p.set(d,b);}let m=[];for(let[o,s]of p.entries()){let d=c$1.get(o);if(d&&!Y(e.scope,d))continue;let b=z(s.map(Pe)),R=d?.name??(typeof s[0]?.before?.name=="string"?String(s[0].before.name):o);m.push({id:`project:${R}`,scope:"project",target:o,title:`Project impact: ${R}`,summary:s.map(j=>j.message).join(" "),risk:b,reasons:s.map(j=>`${j.type}: ${j.message}`),project:d?{name:d.name,path:d.path,kind:d.kind,runtime:d.runtime,framework:d.framework,supportTier:d.supportTier,...d.generator?{generator:d.generator}:{}}:void 0,verification:d?U(d):D()});}let l=n.currentModel.graph,f=l?a$1(l):void 0,v=new Set(m.map(o=>o.project?.name).filter(o=>typeof o=="string")),I=new Map;for(let o of m)if(o.project?.name){let s=f?.byId.get(o.project.name);s&&(o.centrality={fanIn:s.fanIn,fanOut:s.fanOut,reach:s.reach,betweenness:s.betweenness,isHotspot:s.isHotspot},s.isHotspot&&(o.risk=We(o.risk),o.reasons=[...o.reasons,`graph.hotspot: critical-path project with ${s.reach} transitive dependent(s); risk escalated.`])),o.origin="direct",o.distance=0,I.set(o.project.name,o.risk);}let W=[],g=0;if(l&&v.size>0){let o=c(l,v);for(let s of o.values()){if(s.distance===0||v.has(s.id))continue;let d=a.get(s.id);if(d&&!Y(e.scope,d))continue;let b=s.path[0],R=s.path[s.path.length-2]??b,j=I.get(b)??"medium",oe=ye(j);g=Math.max(g,s.distance),W.push({id:`transitive:${s.id}`,scope:"project",target:d?.path??s.id,title:`Transitive impact: ${s.id}`,summary:`Depends on changed project ${b}${s.via?` via ${s.via}`:""} (distance ${s.distance}).`,risk:oe,reasons:[`graph.dependent: depends on ${R}${s.via?` via ${s.via}`:""} (path ${s.path.join(" -> ")})`],project:d?{name:d.name,path:d.path,kind:d.kind,runtime:d.runtime,framework:d.framework,supportTier:d.supportTier,...d.generator?{generator:d.generator}:{}}:void 0,verification:d?U(d):D(),origin:"transitive",distance:s.distance,path:s.path,via:s.via,...f?.byId.get(s.id)?{centrality:{fanIn:f.byId.get(s.id).fanIn,fanOut:f.byId.get(s.id).fanOut,reach:f.byId.get(s.id).reach,betweenness:f.byId.get(s.id).betweenness,isHotspot:f.byId.get(s.id).isHotspot}}:{}});}}W.sort((o,s)=>o.target.localeCompare(s.target));let te=f?f.hotspots.map(o=>{let s=f.byId.get(o);return {project:o,fanIn:s.fanIn,fanOut:s.fanOut,reach:s.reach,betweenness:s.betweenness}}):[],re=n.changes.filter(o=>!o.type.startsWith("project.")),V=n.currentModel.summary?.projectCount??n.currentModel.projects.length,P=re.map(o=>({id:`workspace:${o.target}`,scope:"workspace",target:o.target,title:`Workspace impact: ${o.target}`,summary:o.message,risk:Ie(o,{projectCount:V}),reasons:[`${o.type}: ${o.message}`],verification:D()})),G=Me([...m.flatMap(o=>o.verification),...W.flatMap(o=>o.verification),...P.flatMap(o=>o.verification),...n.summary.changed?D():[]]).filter(o=>o.required),ne=z([...m.map(o=>o.risk),...W.map(o=>o.risk),...P.map(o=>o.risk)]),N=Re({risk:ne,affectedProjects:m.length,projectCount:V,changes:n.changes}),B={changed:n.summary.changed,risk:N,affectedProjects:m.length,workspaceItems:P.length,recommendedCommands:G.length,blastRadius:{directlyAffected:m.length,transitivelyAffected:W.length,maxDistance:g,graphEdges:l?.edges.length??0}};return {schemaVersion:de,generatedAt:(e.now??new Date).toISOString(),fromRef:n.fromRef,diffRef:X,workspace:{name:n.currentModel.workspace.name,profile:n.currentModel.workspace.profile,type:n.currentModel.workspace.type},summary:B,affectedProjects:m.sort((o,s)=>o.target.localeCompare(s.target)),transitiveImpact:W,criticalPathHotspots:te,workspaceImpact:P.sort((o,s)=>o.target.localeCompare(s.target)),verificationPlan:G,agentBrief:Ce({changed:B.changed,risk:N,affectedProjects:m,workspaceImpact:P}),diff:n}}async function qe(e,t){let r=u.join(t,le);return await y.ensureDir(u.dirname(r)),await y.writeJson(r,a(e),{spaces:2}),r}export{Q as a,T as b,$ as c,X as d,de as e,le as f,Z as g,me as h,Ve as i,Ge as j,we as k,Ne as l,D as m,Be as n,qe as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as buildWorkspaceExplain,a as resolveWorkspaceExplainArtifactPath,c as writeWorkspaceExplainReport}from'./chunk-CDPR2YKL.js';export{d as WORKSPACE_MODEL_DIFF_REPORT_PATH}from'./chunk-LKX3L7TE.js';export{c as WORKSPACE_EXPLAIN_REPORT_PATH,e as WORKSPACE_TRACE_REPORT_PATH,d as WORKSPACE_WHY_REPORT_PATH}from'./chunk-GBJBQ43T.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as runWorkspaceStage}from'./chunk-JW2FSKT3.js';export{a as WORKSPACE_RUN_LAST_REPORT_FILENAME}from'./chunk-64RTZBHU.js';
|
|
File without changes
|