workspai 0.67.0 → 0.69.0
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 +38 -18
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +459 -0
- package/contracts/extension-cli-compatibility.v1.json +11 -0
- package/contracts/published-contract-catalog.v1.json +55 -0
- package/contracts/runtime-command-surface.v1.json +282 -0
- package/contracts/workspace-activity-board.v1.json +6 -0
- package/contracts/workspace-activity-event.v1.json +31 -1
- package/contracts/workspace-activity-monitor-snapshot.v1.json +35 -2
- package/contracts/workspace-intelligence/architecture-change-lease.v1.json +50 -0
- package/contracts/workspace-intelligence/architecture-surprise-report.v1.json +46 -0
- package/contracts/workspace-intelligence/change-operation-result.v1.json +43 -0
- package/contracts/workspace-intelligence/decision-checkpoint.v1.json +18 -0
- package/contracts/workspace-intelligence/decision-event.v1.json +134 -0
- package/contracts/workspace-intelligence/decision-transaction.v1.json +29 -0
- package/contracts/workspace-intelligence/goal-index.v1.json +13 -0
- package/contracts/workspace-intelligence/goal-pack.v1.json +2 -1
- package/contracts/workspace-intelligence/predicted-architecture-change.v1.json +34 -0
- package/contracts/workspace-intelligence/proof-carrying-change-capsule-export.v1.json +14 -0
- package/contracts/workspace-intelligence/proof-carrying-change-capsule-validation.v1.json +16 -0
- package/contracts/workspace-intelligence/proof-carrying-change-capsule.v1.json +62 -0
- package/contracts/workspace-intelligence/proof-carrying-change-list.v1.json +80 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +9 -1
- package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +1 -0
- package/dist/analyze-GPYPXXRT.js +1 -0
- package/dist/{artifact-remediation-plan-GFFHC2ZU.js → artifact-remediation-plan-JHHZ4L24.js} +1 -1
- package/dist/autopilot-release-FL47VMF7.js +1 -0
- package/dist/capabilities-command-MYSLJIYS.js +1 -0
- package/dist/chunk-25AWHAB5.js +2 -0
- package/dist/chunk-2LZWBUJD.js +1 -0
- package/dist/{chunk-KENOAC2Q.js → chunk-37ZLNFV5.js} +2 -2
- package/dist/{chunk-CZVT7T2X.js → chunk-3G5FF2JZ.js} +1 -1
- package/dist/chunk-3HFFKW4Q.js +2 -0
- package/dist/{chunk-BHM6RHTA.js → chunk-3WHE7V4M.js} +1 -1
- package/dist/{chunk-NVND4727.js → chunk-46QH3ZVI.js} +1 -1
- package/dist/{chunk-B4IVVTMQ.js → chunk-64XWHDZ3.js} +1 -1
- package/dist/chunk-A3MYO55A.js +3 -0
- package/dist/chunk-ABMB6MJT.js +1 -0
- package/dist/chunk-AD4ZY3RF.js +12 -0
- package/dist/chunk-BM2F5C4J.js +1 -0
- package/dist/chunk-COICGD62.js +1 -0
- package/dist/{chunk-5OA33JH2.js → chunk-D5LLTUTY.js} +1 -1
- package/dist/{chunk-4WVOAX2V.js → chunk-DWL3PPLA.js} +1 -1
- package/dist/{chunk-H77ZNH5O.js → chunk-EBEAJIBI.js} +1 -1
- package/dist/chunk-EBQS5T7Q.js +7 -0
- package/dist/{chunk-VI4ZRAY6.js → chunk-EG6EZ7HW.js} +1 -1
- package/dist/chunk-ERVWW5HX.js +1 -0
- package/dist/chunk-EZPLMAW2.js +1 -0
- package/dist/chunk-FIK343LI.js +1 -0
- package/dist/chunk-GSSJJS5M.js +6 -0
- package/dist/{chunk-SRLWHOLF.js → chunk-GYN6RPNU.js} +1 -1
- package/dist/{chunk-6E2Y3XGT.js → chunk-HCFOVANQ.js} +1 -1
- package/dist/chunk-I3UCODXU.js +1 -0
- package/dist/{chunk-2RPFCBS4.js → chunk-IGJA6GBQ.js} +1 -1
- package/dist/{chunk-FX5J6JCK.js → chunk-IVYPC36J.js} +1 -1
- package/dist/chunk-K33JJVQZ.js +2 -0
- package/dist/{chunk-L5Q2S5GY.js → chunk-KFTJVVJR.js} +1 -1
- package/dist/chunk-LDBULT2T.js +4 -0
- package/dist/{chunk-THIG2YQP.js → chunk-M37ALD4V.js} +1 -1
- package/dist/{chunk-HQLBO23O.js → chunk-MAWHHHU3.js} +5 -5
- package/dist/chunk-MBICKDYP.js +1 -0
- package/dist/{chunk-QMQBX3RV.js → chunk-MGL6DBOR.js} +1 -1
- package/dist/chunk-MHQHRMKU.js +5 -0
- package/dist/{chunk-KQ2TMI26.js → chunk-N2Q4MSSP.js} +64 -64
- package/dist/chunk-N4B2M44I.js +1 -0
- package/dist/chunk-NSH7TTSV.js +1 -0
- package/dist/chunk-O5XQP5E7.js +1 -0
- package/dist/chunk-ODK4LCEL.js +1 -0
- package/dist/chunk-OU3BBWH5.js +49 -0
- package/dist/chunk-OZXCNVGW.js +2 -0
- package/dist/{chunk-TABXSDTR.js → chunk-PKKSRXUS.js} +1 -1
- package/dist/{chunk-SLFOUSRW.js → chunk-QYEQVNBF.js} +1 -1
- package/dist/chunk-RVOW3BHQ.js +2 -0
- package/dist/chunk-TKXRP2B4.js +1 -0
- package/dist/chunk-UNXG3ZFV.js +1 -0
- package/dist/chunk-UW4SESKD.js +2 -0
- package/dist/{chunk-2MTJWPQ4.js → chunk-V52R2W2Q.js} +1 -1
- package/dist/chunk-V6TIT6M3.js +157 -0
- package/dist/chunk-VNKAISFE.js +8 -0
- package/dist/chunk-W37NOQVG.js +1 -0
- package/dist/chunk-W6WRT77T.js +1 -0
- package/dist/chunk-WHR5SL33.js +4 -0
- package/dist/{chunk-HYE5UHPV.js → chunk-WZ5V5U2K.js} +1 -1
- package/dist/chunk-XPGCFVGC.js +4 -0
- package/dist/chunk-YKY4JFCF.js +1 -0
- package/dist/{chunk-VWBMDGPY.js → chunk-YWZBGSFE.js} +3 -3
- package/dist/chunk-YZL7ZY7J.js +2 -0
- package/dist/{create-72ITVZXV.js → create-GWBQ74ZI.js} +1 -1
- package/dist/{demo-kit-5UQH2OXC.js → demo-kit-RKTHTXHJ.js} +1 -1
- package/dist/doctor-OQAXSMEM.js +1 -0
- package/dist/{dotnet-webapi-clean-YEHYIGOT.js → dotnet-webapi-clean-XL4IBUQV.js} +1 -1
- package/dist/goal-lifecycle-YWBVQ2DF.js +1 -0
- package/dist/goal-pack-KUXPZVNO.js +1 -0
- package/dist/{gofiber-standard-C44IIQYH.js → gofiber-standard-OHHMCNMJ.js} +1 -1
- package/dist/{gogin-standard-X7VKACVR.js → gogin-standard-BAZXPOKL.js} +1 -1
- package/dist/index.d.ts +35 -2
- package/dist/index.js +239 -239
- package/dist/{live-command-5VXPR43F.js → live-command-GNAASZ7U.js} +1 -1
- package/dist/pipeline-PGB5TEV3.js +5 -0
- package/dist/{project-agent-entry-5IUBEREI.js → project-agent-entry-H3JAGNLS.js} +1 -1
- package/dist/{project-intelligence-lens-LQCN65P2.js → project-intelligence-lens-7NMKHV5N.js} +1 -1
- package/dist/{project-test-coverage-KD4LLFGV.js → project-test-coverage-3DKZKLWY.js} +1 -1
- package/dist/proof-carrying-change-QFH7WI2E.js +1 -0
- package/dist/{rust-axum-JKZTZDRZ.js → rust-axum-CCJ6UCBW.js} +1 -1
- package/dist/{springboot-standard-PI4FLTAN.js → springboot-standard-M5JQEJML.js} +1 -1
- package/dist/verified-goal-7XHRWYSE.js +1 -0
- package/dist/{workspace-5W7FYGDQ.js → workspace-TJHCETBV.js} +1 -1
- package/dist/{workspace-agent-sync-OZCDQORK.js → workspace-agent-sync-Z35NTXCB.js} +1 -1
- package/dist/{workspace-archive-NOSGRKRZ.js → workspace-archive-OSMU3CK6.js} +1 -1
- package/dist/{workspace-context-L65BR5L6.js → workspace-context-KNJQUJWC.js} +1 -1
- package/dist/{workspace-contract-JYHNEJPV.js → workspace-contract-VIUQT5SZ.js} +1 -1
- package/dist/workspace-explain-HM6GMK26.js +1 -0
- package/dist/workspace-explain-contract-KV7RTEJU.js +1 -0
- package/dist/{workspace-feedback-MWGCT5R2.js → workspace-feedback-YSPEGCON.js} +1 -1
- package/dist/{workspace-foundation-VIB3PXNH.js → workspace-foundation-PLXFPI3J.js} +1 -1
- package/dist/{workspace-graph-stream-45JHE4MG.js → workspace-graph-stream-FNRQ2FTB.js} +1 -1
- package/dist/workspace-graph-token-efficiency-WNAFAN2F.js +1 -0
- package/dist/{workspace-history-JKW3VJO3.js → workspace-history-HDDFG6LH.js} +1 -1
- package/dist/{workspace-intelligence-3C47PK4L.js → workspace-intelligence-QLSD5EEV.js} +1 -1
- package/dist/{workspace-intelligence-benchmark-SRDIHX3X.js → workspace-intelligence-benchmark-S5OXVNLC.js} +1 -1
- package/dist/{workspace-intelligence-evaluation-OJIQS5SN.js → workspace-intelligence-evaluation-QDSOOUHH.js} +1 -1
- package/dist/{workspace-intelligence-runner-OWN5ZI6W.js → workspace-intelligence-runner-4EW4T2OW.js} +1 -1
- package/dist/workspace-intelligence-runtime-registry-ZLPF7BAY.js +1 -0
- package/dist/{workspace-knowledge-graph-AKG5NUU6.js → workspace-knowledge-graph-EEOW5VAJ.js} +1 -1
- package/dist/workspace-knowledge-graph-change-overlay-FIIAFLO6.js +1 -0
- package/dist/{workspace-knowledge-graph-contract-X52KXBXJ.js → workspace-knowledge-graph-contract-FVX5T7SU.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-DXA4CROE.js → workspace-knowledge-graph-query-WHCGPBGS.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-X347REDB.js +1 -0
- package/dist/workspace-mcp-serve-NQ42PE2I.js +3 -0
- package/dist/{workspace-model-R4ISKDB2.js → workspace-model-NCOOY5LC.js} +1 -1
- package/dist/{workspace-onboarding-Y5RPEFUD.js → workspace-onboarding-JNC7ZFMR.js} +1 -1
- package/dist/{workspace-readme-PL5V3UDH.js → workspace-readme-OV2ADTLW.js} +2 -2
- package/dist/{workspace-registry-summary-STGUGROG.js → workspace-registry-summary-ONT4VOJX.js} +1 -1
- package/dist/{workspace-repair-engine-FNLL5ZDK.js → workspace-repair-engine-WMJCYWO4.js} +2 -2
- package/dist/workspace-run-3S35MDX6.js +1 -0
- package/dist/{workspace-verify-AXVX3PF3.js → workspace-verify-MLABQUWK.js} +1 -1
- package/dist/{workspace-watch-RLBEJKXE.js → workspace-watch-MJOG5AZ3.js} +1 -1
- package/docs/README.md +2 -0
- package/docs/ci-workflows.md +1 -1
- package/docs/commands-reference.md +26 -1
- package/docs/contracts/ARTIFACT_CATALOG.md +37 -18
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +17 -0
- package/docs/contracts/PROOF_CARRYING_CHANGE_CONTRACT_PLAN.md +65 -0
- package/docs/contracts/README.md +1 -1
- package/docs/proof-carrying-change.implementation.v1.json +118 -0
- package/docs/proof-carrying-change.md +202 -0
- package/docs/workspace-knowledge-graph.md +1 -0
- package/docs/workspace-live-activity.md +18 -4
- package/package.json +1 -1
- package/dist/analyze-IC2KRVCG.js +0 -1
- package/dist/autopilot-release-RECEZAZI.js +0 -1
- package/dist/capabilities-command-X4WZIJNR.js +0 -1
- package/dist/chunk-2M62CU3O.js +0 -2
- package/dist/chunk-2MVIRJJR.js +0 -1
- package/dist/chunk-3O7LZPKA.js +0 -4
- package/dist/chunk-3OGPTLI2.js +0 -1
- package/dist/chunk-4RV4JVGR.js +0 -6
- package/dist/chunk-5EVDW7JM.js +0 -1
- package/dist/chunk-5ME4W4LN.js +0 -1
- package/dist/chunk-5TY74LLW.js +0 -2
- package/dist/chunk-6254CWUY.js +0 -49
- package/dist/chunk-ARUFY5W3.js +0 -1
- package/dist/chunk-BHFRP7TV.js +0 -8
- package/dist/chunk-BRYJTW6S.js +0 -2
- package/dist/chunk-BUYLM6QV.js +0 -1
- package/dist/chunk-CPR2CMOY.js +0 -1
- package/dist/chunk-EHCKITR4.js +0 -2
- package/dist/chunk-ENZPM52J.js +0 -1
- package/dist/chunk-FPDH3N3A.js +0 -7
- package/dist/chunk-GIQ4SDRJ.js +0 -1
- package/dist/chunk-IKUFNK46.js +0 -2
- package/dist/chunk-IQQMFRWM.js +0 -3
- package/dist/chunk-JCGSIDMC.js +0 -2
- package/dist/chunk-LPCZHKD5.js +0 -1
- package/dist/chunk-N4QFNOAI.js +0 -1
- package/dist/chunk-OCNPOYMA.js +0 -1
- package/dist/chunk-PSYQ6IJA.js +0 -12
- package/dist/chunk-SVYY55IS.js +0 -157
- package/dist/chunk-SX6A656X.js +0 -1
- package/dist/chunk-TP7VKEUF.js +0 -1
- package/dist/chunk-UTV4DTNM.js +0 -1
- package/dist/chunk-XDPTAV2T.js +0 -2
- package/dist/chunk-Y35VLVF6.js +0 -5
- package/dist/chunk-Y4Z6CEII.js +0 -1
- package/dist/chunk-YYY2WXOH.js +0 -1
- package/dist/chunk-ZEEV5J4I.js +0 -1
- package/dist/chunk-ZGHJIQXL.js +0 -1
- package/dist/chunk-ZI2E7P6O.js +0 -4
- package/dist/doctor-CVYUESRQ.js +0 -1
- package/dist/goal-lifecycle-H55AGFCB.js +0 -1
- package/dist/goal-pack-6OBZOPCD.js +0 -1
- package/dist/pipeline-SKYOXWHW.js +0 -5
- package/dist/verified-goal-HN7G532B.js +0 -1
- package/dist/workspace-explain-SUBK6FLO.js +0 -1
- package/dist/workspace-explain-contract-WMREJWHF.js +0 -1
- package/dist/workspace-graph-token-efficiency-NPECU6Y5.js +0 -1
- package/dist/workspace-intelligence-runtime-registry-UKFB3BI7.js +0 -1
- package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +0 -1
- package/dist/workspace-knowledge-graph-snapshot-SNI5K2RL.js +0 -1
- package/dist/workspace-mcp-serve-PK226GMV.js +0 -3
- package/dist/workspace-run-GFBFGUFM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {i,g,l,e,f,c,d,j,k as k$1}from'./chunk-
|
|
1
|
+
import {i,g,l,e,f,c,d,j,k as k$1}from'./chunk-LDBULT2T.js';import lt from'path';import rt from'fs';var P={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",cyan:"\x1B[36m",brightCyan:"\x1B[96m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",magenta:"\x1B[35m"},Wt={planned:"\u25CB",running:"\u25C9",succeeded:"\u2713",warned:"!",blocked:"\u2298",failed:"\xD7",cancelled:"\xD7",skipped:"\u2013","rolled-back":"\u21B6"},Vt={planned:"o",running:"*",succeeded:"+",warned:"!",blocked:"#",failed:"x",cancelled:"x",skipped:"-","rolled-back":"~"};function ut(t){return t.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"")}function k(t){return ut(t).replace(/[\u0000-\u001f\u007f-\u009f]/g," ")}function N(t){return [...ut(t)].length}function W(t,e){let n=k(t),o=[...n];return o.length<=e?n:e<=0?"":e===1?"\u2026":`${o.slice(0,e-1).join("")}\u2026`}function x(t,e){return N(t)<=e?t:W(ut(t),e)}function Dt(t,e){return t==="running"?e%2===0?P.brightCyan:P.cyan:t==="succeeded"?P.green:t==="warned"||t==="blocked"?P.yellow:t==="failed"||t==="cancelled"?P.red:t==="rolled-back"?P.magenta:P.dim}function O(t,e,n,o){return n?`${Dt(e,o)}${t}${P.reset}`:t}function H(t,e){return e?`${P.bold}${P.brightCyan}${t}${P.reset}`:t}function U(t,e){return (e?Vt:Wt)[t]}function et(t,e){let n=t.durationMs??Math.max(0,e-Date.parse(t.startedAt));if(n<1e3)return `${n}ms`;let o=Math.floor(n/1e3);if(o<60)return `${o}s`;let r=Math.floor(o/60);return r<60?`${r}m ${o%60}s`:`${Math.floor(r/60)}h ${r%60}m`}function z(t){let e=t.progress;return e?e.percent!==void 0?`${Math.round(e.percent)}%`:e.completed!==void 0&&e.total!==void 0?`${e.completed}/${e.total}`:e.iteration!==void 0&&e.iterations!==void 0?`${e.iteration}/${e.iterations}`:"":""}function J(t,e){return t.attempt&&t.attempt>1?`${e?"R":"\u21BB"}${t.attempt}`:""}function It(t,e,n){let o=N(t),r=N(e);return o+r+1>n?x(`${t} ${e}`,n):`${t}${" ".repeat(n-o-r)}${e}`}var nt={planned:"QUEUE",running:"RUN",succeeded:"DONE",warned:"WARN",blocked:"BLOCK",failed:"FAIL",cancelled:"STOP",skipped:"SKIP","rolled-back":"ROLL"};function tt(t,e,n,o){return o?"+":n?{left:"\u252B",right:"\u2523",top:"\u253B",bottom:"\u2533"}[t]:e==="planned"||e==="skipped"?{left:"\u2524",right:"\u251C",top:"\u2534",bottom:"\u252C"}[t]:{left:"\u2525",right:"\u251D",top:"\u2537",bottom:"\u252F"}[t]}function jt(t,e,n){let o=W(e,Math.max(3,Math.floor(n*.6))),r=Math.max(0,n-N(o)-(o?1:0)),s=W(t,r);return `${s}${" ".repeat(Math.max(0,n-N(s)-N(o)))}${o}`}function Mt(t,e,n,o,r){let s=Array.from({length:Math.max(0,o-2)},()=>n);return r&&s.length>0&&(s[Math.floor(s.length/2)]=r),`${t}${s.join("")}${e}`}function Ut(t,e,n,o){let r=t.status==="running",s=n.ascii?{topLeft:"+",topRight:"+",bottomLeft:"+",bottomRight:"+",horizontal:"-",vertical:"|"}:r?{topLeft:"\u250F",topRight:"\u2513",bottomLeft:"\u2517",bottomRight:"\u251B",horizontal:"\u2501",vertical:"\u2503"}:{topLeft:"\u250C",topRight:"\u2510",bottomLeft:"\u2514",bottomRight:"\u2518",horizontal:"\u2500",vertical:"\u2502"},i=z(t),d=J(t,n.ascii),a=[nt[t.status],d,i].filter(Boolean).join(" "),c=Mt(s.topLeft,s.topRight,s.horizontal,e,o.top?tt("top",o.top,r,n.ascii):void 0),u=`${o.left?tt("left",o.left,r,n.ascii):s.vertical}${jt(k(t.label),a,e-2)}${o.right?tt("right",o.right,r,n.ascii):s.vertical}`,f=Mt(s.bottomLeft,s.bottomRight,s.horizontal,e,o.bottom?tt("bottom",o.bottom,r,n.ascii):void 0);return [c,u,f].map(l=>O(l,t.status,n.color,n.frame))}function _t(t,e,n,o,r,s){let i=Math.max(2,s),d=r?"-":"\u2501",a=r?".":"\u2504";if(t==="running"&&o){let c=r?"=":"\u254D",u=Array.from({length:i},()=>d),f=n%i;return u[e==="right"?f:i-f-1]=c,u.join("")}return t==="planned"||t==="skipped"?a.repeat(i):t==="blocked"||t==="warned"?(r?"~":"\u2505").repeat(i):t==="failed"||t==="cancelled"?(r?"=":"\u254D").repeat(i):d.repeat(i)}function Ct(t,e,n,o=7){return t?O(_t(t.status,e,n.frame,n.motion,n.ascii,o),t.status,n.color,n.frame):" ".repeat(o)}function zt(t,e,n,o){let r=t?.status??"planned",s=r==="running"&&o.motion,i=r==="planned"||r==="skipped"?o.ascii?":":"\u250A":r==="blocked"||r==="warned"?o.ascii?"~":"\u250B":o.ascii?"|":"\u2503",d=o.ascii?":":"\u254F";return [s&&o.frame%2===0?d:i,s&&o.frame%2===1?d:i].map(c=>O(`${" ".repeat(Math.max(0,e))}${c}`.padEnd(n),r,o.color,o.frame))}function Ft(t,e,n){let o=e>=132?9:7,r=t.nodes.length<=2?Math.min(32,e):e>=132?19:e>=100?17:15,s=Math.max(1,Math.floor((e+o)/(r+o))),i=[];for(let a=0;a<t.nodes.length;a+=s)i.push(t.nodes.slice(a,a+s));let d=[];return i.forEach((a,c)=>{let u=c%2===0?"right":"left",f=u==="right"?a:[...a].reverse(),l=i[c+1],h=i[c-1],g=h?j(t,h.at(-1)?.id??"",a[0]?.id??""):void 0,A=l?j(t,a.at(-1)?.id??"",l[0]?.id??""):void 0,y=(p,R)=>u==="right"?j(t,p.id,R.id):j(t,R.id,p.id),T=f.map((p,R)=>{let $=R>0?y(f[R-1],p):void 0,M=R<f.length-1?y(p,f[R+1]):void 0;return Ut(p,r,n,{...$?{left:$.status}:{},...M?{right:M.status}:{},...g&&p.id===a[0]?.id?{top:g.status}:{},...A&&p.id===a.at(-1)?.id?{bottom:A.status}:{}})});for(let p=0;p<3;p+=1){let R="";f.forEach(($,M)=>{if(R+=T[M][p],M>=f.length-1)return;if(p!==1){R+=" ".repeat(o);return}let C=f[M+1],v=u==="right"?j(t,$.id,C.id):j(t,C.id,$.id);R+=Ct(v,u,n,o);}),d.push(x(R,e));}if(!l)return;let I=A,w=f.length*r+(f.length-1)*o,L=u==="right"?Math.max(0,w-Math.ceil(r/2)):Math.floor(r/2);d.push(...zt(I,L,e,n));}),d}function Gt(t,e){let n=z(t),o=J(t,e.ascii),r=`${U(t.status,e.ascii)} ${k(t.label)}${o?` ${o}`:""}${n?` ${n}`:""}`;return O(`[${r}]`,t.status,e.color,e.frame)}function Yt(t,e,n,o){if(t.nodes.length===0)return [];let r=[],s="",i=0;for(let[d,a]of t.nodes.entries()){let c=Gt(a,o),u=t.nodes[d-1],f=u?j(t,u.id,a.id):void 0,l=u?Ct(f,"right",o,7):"",h=`${s?l:""}${c}`;if(s&&N(s)+N(h)>e){if(r.push(x(s,e)),r.length>=n)break;s=`${o.ascii?"> ":"\u21B3 "}${c}`;}else s+=h;i=d+1;}if(r.length<n&&s&&r.push(x(s,e)),i<t.nodes.length&&r.length>0){let d=` \u2026 +${t.nodes.length-i}`;r[r.length-1]=x(`${r.at(-1)}${d}`,e);}return r.slice(0,n)}function Kt(t,e,n,o){if(t.length===0)return;let r=e>=130?3:e>=92?2:1,s=t.slice(0,r),i="ALSO ACTIVE ",d=s.map(c=>{let u=W(c.commandLabel.replace(/^workspai\s+/,""),24),f=o?`${W(c.locationLabel,20)} \xB7 `:"";return O(`[${U("running",n.ascii)} ${f}${u} \xB7 ${c.run.runId.slice(0,8)}]`,"running",n.color,n.frame)}),a=t.length-s.length;return x(`${i}${d.join(" ")}${a>0?` +${a}`:""}`,e)}function qt(t){let e=t.map(n=>n.status);for(let n of ["failed","cancelled","blocked","warned","running"])if(e.includes(n))return n;return e.length>0&&e.every(n=>n==="succeeded")?"succeeded":e.some(n=>n==="succeeded")?"running":e[0]??"planned"}function Ht(t,e,n){let o=[...new Set(t.nodes.map(i=>i.group).filter(Boolean))];if(o.length<2)return;let r=n.ascii?" > ":" \u2501 ",s=o.map((i,d)=>{let a=qt(t.nodes.filter(c=>c.group===i));return O(`${String(d+1).padStart(2,"0")} ${W(i,14)}`,a,n.color,n.frame)});return x(`PHASES ${s.join(r)}`,e)}function Tt(t){return [...t.nodes].reverse().find(e=>e.status==="running")??[...t.nodes].reverse().find(e=>["failed","blocked","warned","cancelled"].includes(e.status))??[...t.nodes].sort((e,n)=>n.updatedAt.localeCompare(e.updatedAt))[0]}function Jt(t){if(t<1e3)return `${t}ms`;let e=Math.floor(t/1e3);if(e<60)return `${e}s`;let n=Math.floor(e/60);return n<60?`${n}m ${e%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function Xt(t,e,n,o){let r=Tt(t);if(!r||e<24)return [];let s=o.ascii?"-":"\u2500",i=o.ascii?"|":"\u2502",d=e-2,a=r.attempt??0,c=r.attempts.at(-1)?.startedAt??r.updatedAt,u=r.durationMs??(r.status==="running"?Math.max(0,n-Date.parse(c)):void 0),f=[H("INSPECT",o.color),k(r.label),"",`STATE ${nt[r.status]}`,`PHASE ${r.group??"GENERAL"}`,`ATTEMPT ${a>0?`${a}/${Math.max(a,r.attempts.length)}`:"\u2014"}`,`PROGRESS ${z(r)||"\u2014"}`,`ELAPSED ${u===void 0?"\u2014":Jt(u)}`,"",`TOUCHES ${t.run.touches.length}`,`ARTIFACTS ${t.run.artifacts.length}`,`WARNINGS ${t.warningCount}`],l=o.ascii?{tl:"+",tr:"+",bl:"+",br:"+"}:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518"};return [`${l.tl}${s.repeat(d)}${l.tr}`,...f.map(h=>{let g=x(h,d);return `${i}${g}${" ".repeat(Math.max(0,d-N(g)))}${i}`}),`${l.bl}${s.repeat(d)}${l.br}`]}function Qt(t,e,n,o=3){return Array.from({length:Math.max(t.length,e.length)},(r,s)=>{let i=x(t[s]??"",n);return `${i}${" ".repeat(Math.max(0,n-N(i))+o)}${e[s]??""}`})}function Zt(t,e,n,o,r){let s=[...t.runs.filter(l=>l.active),...t.runs.filter(l=>!l.active&&l.run.runId===e)].filter((l,h,g)=>g.findIndex(A=>A.run.runId===l.run.runId)===h);if(s.length===0)return [];let i=s.slice(0,n>=110?4:2),d=Math.max(12,Math.min(28,Math.floor(n*.24))),a=Math.max(14,Math.min(30,Math.floor(n*.27))),c=Math.max(10,Math.min(20,Math.floor(n*.18))),u=`FLEET ${"LOCATION".padEnd(d)} ${"COMMAND".padEnd(a)} ${"ACTIVE BLOCK".padEnd(c)} STATE`,f=[H(x(u,n),r.color)];for(let l of i){let h=Tt(l),g=l.run.runId===e?r.ascii?">":"\u25C6":" ",A=l.commandLabel.replace(/^workspai\s+/,""),y=`${g} ${W(l.locationLabel,d).padEnd(d)} ${W(A,a).padEnd(a)} ${W(h?.label??"\u2014",c).padEnd(c)} ${nt[l.run.status]} \xB7 ${et(l.run,o)}`;f.push(O(x(y,n),l.run.status,r.color,r.frame));}return s.length>i.length&&f.push(x(` +${s.length-i.length} more runs`,n)),f}function te(t,e,n,o,r,s){let i=r.ascii?">":"\u25C6",d=s?`${W(t.locationLabel,28)} `:"",a=`RUN ${t.run.runId.slice(0,8).toUpperCase()} ${d}${k(t.commandLabel)}`,c=t.warningCount>0?` \xB7 !${t.warningCount}`:"",u=`${nt[t.run.status]} \xB7 ${et(t.run,o)}${c}`,f=O(It(a,u,Math.max(0,n-2)),t.run.status,r.color,r.frame);return `${H(i,r.color)} ${f}`}function ee(t,e,n){let o=[x(`Workspai Live | ${k(t.scopeLabel)} | ${t.activeRunCount} active | ${t.failedRunCount} failed`,e)];t.runs.length===0&&o.push("WAITING");for(let r of t.runs){o.push(x(`RUN ${r.run.status.toUpperCase()} | ${k(r.commandLabel)} | ${r.run.runId.slice(0,8)} | ${et(r.run,n)}`,e));for(let s of r.nodes)o.push(x(` BLOCK ${s.status.toUpperCase()} | ${k(s.label)}${J(s,true)?` | ATTEMPT ${s.attempt}`:""}${z(s)?` | ${z(s)}`:""}`,e));}return o.join(`
|
|
2
2
|
`)}function F(t,e={}){if(e.classic)return ne(t,e);let n=Math.max(20,e.width??process.stdout.columns??100),o=Math.max(1,e.height??process.stdout.rows??28),r=e.now??Date.now(),s=e.frame??0,i$1=e.ascii??(process.env.WORKSPAI_LIVE_ASCII==="1"||process.env.TERM==="dumb"),d=e.color??(process.stdout.isTTY&&process.env.NO_COLOR===void 0&&process.env.TERM!=="dumb"),a=e.motion??(process.env.WORKSPAI_LIVE_REDUCED_MOTION!=="1"&&process.env.CI!=="true"),c=i(t,{selectedRunId:e.selectedRunId,activeOnly:e.activeOnly,maxRuns:e.maxRuns});if(e.accessible)return ee(c,n,r);let u={ascii:i$1,color:d,frame:s,motion:a},f=H("WORKSPAI LIVE",d),l=x(k(c.scopeLabel),Math.max(8,Math.floor(n/3))),g=`${c.global?`${c.scopeCount} SCOPES `:""}${U("running",i$1)} ${c.activeRunCount} ACTIVE ${U("succeeded",i$1)} ${c.healthyRunCount} ${U("warned",i$1)} ${c.warningRunCount} ${U("failed",i$1)} ${c.failedRunCount}`,A=i$1?"-".repeat(n):"\u2501".repeat(n),y=[It(`${f} ${l}`,g,n),O(A,"planned",d,s)],T=x(e.replay?`${e.replay.paused?"PAUSED":"PLAY"} ${e.replay.index}/${e.replay.total} \xB7 ${e.replay.speed}x SPACE PLAY/PAUSE ${i$1?"<>":"\u2190\u2192"} STEP Q CLOSE`:`${i$1?"^v":"\u2191\u2193"} SELECT ENTER FOCUS I INSPECT F ACTIVE Q CLOSE`,n),I=e.interactive?o>=8?[O(A,"planned",d,s),T]:o>=3?[T]:[]:[];if(c.runs.length===0)y.push("",H(`${i$1?"*":"\u25C7"} WAITING FOR WORKSPAI ACTIVITY`,d));else {let w=c.runs.find(K=>K.run.runId===c.selectedRunId)??c.runs[0],L=e.focused?[]:c.runs.filter(K=>K.run.runId!==w.run.runId&&K.active);c.global&&!e.focused&&y.push(...Zt(c,w.run.runId,n,r,u)),y.push(te(w,true,n,r,u,c.global));let p=e.inspector!==false&&n>=132,R=p?Math.min(34,Math.floor(n*.25)):0,$=p?n-R-3:n,M=Ht(w,$,u),C=[...M?[M]:[],...Ft(w,$,u)],v=p?Xt(w,R,r,u):[],Q=p?Qt(C,v,$):C,G=Kt(L,n,u,c.global),Z=G&&!c.global?1:0,Y=Math.max(0,o-I.length-y.length-Z),D=n>=72&&o>=14&&Q.length<=Y;G&&!c.global&&y.length+I.length<o&&y.push(G),y.push(...D?Q:Y>0?Yt(w,n,Math.min(3,Y),u):[]);}return c.diagnostics.length>0&&y.length+I.length<o&&y.push(O(`! ${c.diagnostics.length} DIAGNOSTIC`,"warned",d,s)),y.push(...I),y.slice(0,o).map(w=>x(w,n)).join(`
|
|
3
3
|
`)}function ne(t,e={}){let n=Math.max(20,e.width??process.stdout.columns??100),o=e.now??Date.now(),r=e.ascii??false,s=i(t,{maxRuns:e.maxRuns}),i$1=s.runs.map(c=>c.run),d=s.activeRunCount,a=[x(`Workspai Live \xB7 ${k(s.scopeLabel)} \xB7 ${d} active run${d===1?"":"s"}`,n),(r?"-":"\u2500").repeat(Math.min(n,100))];i$1.length===0&&a.push("Waiting for Workspai commands in this project or workspace\u2026");for(let[c,u]of i$1.entries()){c>0&&a.push("");let f=k(u.command.length>0?`workspai ${u.command.join(" ")}`:u.runId);a.push(x(`${U(u.status,r)} ${f} \xB7 ${u.runId.slice(0,8)} \xB7 ${et(u,o)}`,n));for(let l of u.blocks.slice(0,18))a.push(x(` ${U(l.status,r)} ${k(l.label)}${J(l,r)?` ${J(l,r)}`:""}${z(l)?` ${z(l)}`:""}`,n));}return a.join(`
|
|
4
4
|
`)}var Lt={github:{width:1280,height:720},linkedin:{width:1200,height:627},x:{width:1600,height:900},square:{width:1080,height:1080},wide:{width:1600,height:900}},re={obsidian:{background:"#070b12",surface:"#0d1420",surfaceRaised:"#121c2b",grid:"#1d2a3b",text:"#edf6ff",muted:"#8090a5",cyan:"#20d9ff",green:"#27e0a3",yellow:"#f4d35e",red:"#ff667d",violet:"#b89cff"},light:{background:"#f4f7fb",surface:"#ffffff",surfaceRaised:"#eef3f9",grid:"#d9e2ee",text:"#102033",muted:"#617187",cyan:"#007fa3",green:"#087f5b",yellow:"#a16a00",red:"#c92a42",violet:"#6741d9"},mono:{background:"#080808",surface:"#111111",surfaceRaised:"#181818",grid:"#303030",text:"#f4f4f4",muted:"#9a9a9a",cyan:"#f4f4f4",green:"#d8d8d8",yellow:"#bdbdbd",red:"#ffffff",violet:"#c9c9c9"}};function V(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/g," ")}function ot(t,e){let n=[...t];return n.length<=e?t:`${n.slice(0,e-1).join("")}\u2026`}function X(t,e){return t==="running"?e.cyan:t==="succeeded"?e.green:t==="warned"||t==="blocked"?e.yellow:t==="failed"||t==="cancelled"?e.red:t==="rolled-back"?e.violet:e.muted}function ft(t){return {planned:"QUEUE",running:"RUNNING",succeeded:"COMPLETE",warned:"WARNING",blocked:"BLOCKED",failed:"FAILED",cancelled:"CANCELLED",skipped:"SKIPPED","rolled-back":"ROLLED BACK"}[t]}function oe(t){if(t<1e3)return `${t}ms`;let e=Math.floor(t/1e3);if(e<60)return `${e}s`;let n=Math.floor(e/60);return n<60?`${n}m ${e%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function Et(t){return t.progress?.percent!==void 0?`${Math.round(t.progress.percent)}%`:t.progress?.completed!==void 0&&t.progress.total!==void 0?`${t.progress.completed}/${t.progress.total}`:""}function ie(t){return [...t].reverse().find(e=>e.status==="running")??[...t].reverse().find(e=>["failed","blocked","warned"].includes(e.status))??[...t].sort((e,n)=>n.updatedAt.localeCompare(e.updatedAt))[0]}function se(t,e){if(!e)return `workspai ${t.join(" ")}`.trim();let n=t[0]?.match(/^[a-z][a-z0-9-]*$/i)?.[0]??"command",r=new Set(["workspace","doctor","goal","graph","model","context"]).has(n)?t[1]?.match(/^[a-z][a-z0-9-]*$/i)?.[0]:void 0;return `workspai ${[n,r].filter(Boolean).join(" ")}`}function ae(t,e={}){let n=e.preset??"github",o=e.theme??"obsidian",{width:r,height:s}=Lt[n],i$1=re[o],d=i(t,{selectedRunId:e.runId,maxRuns:50}),a=d.runs.find(m=>m.run.runId===d.selectedRunId)??d.runs[0],c=e.now??Date.parse(t.generatedAt),u=Math.round(r*.045),f=28,l=Math.max(250,Math.round(r*.24)),h=r-u*2-l-f,g=u,A=g+h+f,y=184,T=s-54,I=30,w=34,L=Math.max(2,Math.min(5,Math.floor((h+I)/180))),p=Math.floor((h-I*(L-1))/L),R=Math.max(1,Math.ceil((a?.nodes.length??0)/L)),$=Math.max(48,Math.min(64,Math.floor((T-y-w*(R-1))/R))),M=[...new Set(a?.nodes.map(m=>m.group).filter(Boolean)??[])],C=new Map;a?.nodes.forEach((m,b)=>{let S=Math.floor(b/L),E=b%L,_=S%2===0?E:L-E-1;C.set(m.id,{x:g+_*(p+I),y:y+S*($+w)});});let v=a?ie(a.nodes):void 0,Q=e.redact?"workspace / project":d.scopeLabel,G=e.redact?"workspace / project":a?.locationLabel,Z=a?se(a.run.command,e.redact===true):"Waiting for activity",Y=a?a.run.durationMs??Math.max(0,c-Date.parse(a.run.startedAt)):0,D=[`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${s}" viewBox="0 0 ${r} ${s}" role="img" aria-labelledby="title description">`,'<title id="title">Workspai Live execution board</title>',`<desc id="description">${V(Z)} execution graph with ${a?.nodes.length??0} blocks.</desc>`,"<defs>",`<pattern id="grid" width="28" height="28" patternUnits="userSpaceOnUse"><path d="M 28 0 L 0 0 0 28" fill="none" stroke="${i$1.grid}" stroke-width="1" opacity="0.28"/></pattern>`,...["planned","running","succeeded","warned","blocked","failed","cancelled","skipped","rolled-back"].map(m=>`<marker id="arrow-${m}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="${X(m,i$1)}"/></marker>`),'<filter id="glow"><feGaussianBlur stdDeviation="3" result="blur"/><feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge></filter>',"</defs>",`<rect width="${r}" height="${s}" fill="${i$1.background}"/>`,`<rect width="${r}" height="${s}" fill="url(#grid)"/>`,`<text x="${u}" y="58" fill="${i$1.cyan}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="17" font-weight="700" letter-spacing="2">WORKSPAI LIVE</text>`,`<text x="${u}" y="91" fill="${i$1.text}" font-family="Inter,ui-sans-serif,system-ui,sans-serif" font-size="27" font-weight="650">${V(ot(Z,62))}</text>`,`<text x="${u}" y="118" fill="${i$1.muted}" font-family="Inter,ui-sans-serif,system-ui,sans-serif" font-size="14">${V(ot(G??Q,72))}</text>`,`<text x="${r-u}" y="61" text-anchor="end" fill="${a?X(a.run.status,i$1):i$1.muted}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="14" font-weight="700">${a?ft(a.run.status):"STANDBY"} \xB7 ${oe(Y)}</text>`,`<line x1="${u}" y1="143" x2="${r-u}" y2="143" stroke="${i$1.grid}" stroke-width="2"/>`];if(M.length>1){let m=Math.min(132,Math.floor((h-12*(M.length-1))/M.length));M.forEach((b,S)=>{let E=g+S*(m+12);D.push(`<rect x="${E}" y="156" width="${m}" height="20" rx="10" fill="${i$1.surfaceRaised}" stroke="${i$1.grid}"/>`,`<text x="${E+m/2}" y="170" text-anchor="middle" fill="${i$1.muted}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="10" font-weight="700" letter-spacing="1">${V(b)}</text>`);});}for(let m of a?.edges??[]){let b=C.get(m.fromBlockId),S=C.get(m.toBlockId);if(!b||!S)continue;let E=b.x+p/2,_=b.y+$/2,it=S.x+p/2,pt=S.y+$/2,q=Math.abs(pt-_)<2,st=q?it>E?b.x+p:b.x:E,at=q?_:b.y+$,ct=q?it>E?S.x:S.x+p:it,dt=q?pt:S.y,ht=(at+dt)/2,Bt=q?`M ${st} ${at} L ${ct} ${dt}`:`M ${st} ${at} L ${st} ${ht} L ${ct} ${ht} L ${ct} ${dt}`,Nt=X(m.status,i$1);D.push(`<path d="${Bt}" fill="none" stroke="${Nt}" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" ${m.status==="planned"?'stroke-dasharray="5 7"':""} marker-end="url(#arrow-${m.status})" opacity="${m.status==="planned"?"0.55":"0.9"}"/>`);}for(let m of a?.nodes??[]){let b=C.get(m.id);if(!b)continue;let S=X(m.status,i$1),E=m.attempt&&m.attempt>1?` \xB7 R${m.attempt}`:"",_=Et(m);D.push(`<g${m.status==="running"?' filter="url(#glow)"':""}>`,`<rect x="${b.x}" y="${b.y}" width="${p}" height="${$}" rx="8" fill="${i$1.surface}" stroke="${S}" stroke-width="${m.status==="running"?3:1.5}"/>`,`<rect x="${b.x}" y="${b.y}" width="4" height="${$}" rx="2" fill="${S}"/>`,`<text x="${b.x+15}" y="${b.y+25}" fill="${i$1.text}" font-family="Inter,ui-sans-serif,system-ui,sans-serif" font-size="13" font-weight="650">${V(ot(m.label,Math.max(10,Math.floor(p/8))))}</text>`,`<text x="${b.x+15}" y="${b.y+45}" fill="${S}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="10" font-weight="700">${ft(m.status)}${V(E)}${_?` \xB7 ${V(_)}`:""}</text>`,"</g>");}return D.push(`<rect x="${A}" y="156" width="${l}" height="${Math.max(250,s-210)}" rx="12" fill="${i$1.surface}" stroke="${i$1.grid}" stroke-width="1.5"/>`,`<text x="${A+24}" y="191" fill="${i$1.cyan}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="12" font-weight="700" letter-spacing="1.5">INSPECT</text>`,`<text x="${A+24}" y="224" fill="${i$1.text}" font-family="Inter,ui-sans-serif,system-ui,sans-serif" font-size="19" font-weight="650">${V(ot(v?.label??"No active block",24))}</text>`),[["STATE",v?ft(v.status):"STANDBY"],["PHASE",v?.group??"GENERAL"],["ATTEMPT",v?.attempt?String(v.attempt):"\u2014"],["PROGRESS",v&&Et(v)||"\u2014"],["TOUCHES",String(a?.run.touches.length??0)],["ARTIFACTS",String(a?.run.artifacts.length??0)],["WARNINGS",String(a?.warningCount??0)]].forEach(([m,b],S)=>{let E=273+S*45;D.push(`<text x="${A+24}" y="${E}" fill="${i$1.muted}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="10" font-weight="700" letter-spacing="1">${m}</text>`,`<text x="${A+l-24}" y="${E}" text-anchor="end" fill="${m==="STATE"&&v?X(v.status,i$1):i$1.text}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="12" font-weight="700">${V(b)}</text>`);}),D.push(`<text x="${u}" y="${s-24}" fill="${i$1.muted}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="10" letter-spacing="1">EVENT-DRIVEN \xB7 DETERMINISTIC \xB7 LOCAL-FIRST</text>`,`<text x="${r-u}" y="${s-24}" text-anchor="end" fill="${i$1.muted}" font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace" font-size="10">${e.redact?"PRODUCT-SAFE CAPTURE":V(a?.run.runId.slice(0,8).toUpperCase()??"NO RUN")}</text>`,"</svg>"),`${D.join(`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {c}from'./chunk-VNKAISFE.js';import {c as c$1}from'./chunk-LPCWROQ3.js';import {a as a$3}from'./chunk-XPGCFVGC.js';import {g as g$1}from'./chunk-MAWHHHU3.js';import {u}from'./chunk-N2Q4MSSP.js';import {c as c$3}from'./chunk-X7FYEKLI.js';import {a as a$2}from'./chunk-YWZBGSFE.js';import {f as f$1,e}from'./chunk-NSH7TTSV.js';import {a}from'./chunk-MGL6DBOR.js';import {f,a as a$1,g}from'./chunk-OZXCNVGW.js';import {p,t,s}from'./chunk-ODK4LCEL.js';import c$2 from'chalk';import d from'path';import G from'fs-extra';function L(s){return s===0?"pass":s===2?"warn":"fail"}async function _(s){try{let a=G.readJsonSync(s),i=a.policyProfile,t=c$3(a).filter(n=>n.status==="blocking").map(n=>`${n.projectName}: ${n.message}`);return {policyProfile:typeof i?.name=="string"?i.name:void 0,blockers:[...new Set(t)].slice(0,12)}}catch{return {blockers:[]}}}function j(s){return s.some(a=>a.status==="fail")?"blocked":s.some(a=>a.status==="warn")?"needs-attention":"ready"}function V(s,a){if(a)return 3;let i=s.some(n=>n.status==="fail"),t=s.some(n=>n.status==="warn");return i?1:t?2:0}function K(s,a){return s===2&&!a?0:s}async function J(s){let a=await g$1(s,true),i=false;try{let{syncWorkspaceContract:t}=await import('./workspace-contract-VIUQT5SZ.js');await t({workspacePath:s}),i=true;}catch{i=false;}return {sync:a,contractSynced:i}}async function U(s$1={}){let a$4=d.resolve(s$1.workspacePath??process.cwd()),i=a(a$4);if(!i)throw new Error("No Workspai workspace found in current directory or parents");let t$1=[],n=[],u$1=false,m,w,g$1,h=Date.now();try{let{sync:e,contractSynced:r}=await J(i),o=e.workspaceFound&&(e.added.length>0||e.skipped>=0)||e.workspaceFound?"pass":"warn";t$1.push({name:"sync",status:o,durationMs:Date.now()-h,summary:e.workspaceFound?`registry sync complete (${e.added.length} added, ${e.skipped} existing)${r?", contract synced":""}`:"workspace not registered in global registry; contract sync attempted"}),e.workspaceFound||n.push("workspace registry entry missing \u2014 run workspai create workspace or register manually");}catch(e){u$1=true,t$1.push({name:"sync",status:"fail",durationMs:Date.now()-h,summary:`sync failed: ${e instanceof Error?e.message:String(e)}`}),n.push("workspace sync stage failed");}let P=Date.now();try{let e=await u({workspace:true,json:true,quiet:true,strict:s$1.strict===true,ci:s$1.strict!==true}),r=L(e),o=await f(i,p.doctor)??a$1(i,p.doctor),l=await _(o);t$1.push({name:"doctor",status:r,durationMs:Date.now()-P,summary:r==="pass"?"doctor workspace passed":r==="warn"?"doctor workspace reported warnings":"doctor workspace did not pass",exitCode:e,evidencePath:o,policyProfile:l.policyProfile,blockers:l.blockers}),r==="fail"?n.push(...l.blockers.length>0?l.blockers.map(O=>`doctor: ${O}`):["doctor workspace gate failed"]):r==="warn"&&n.push("doctor workspace reported warnings");}catch(e){u$1=true,t$1.push({name:"doctor",status:"fail",durationMs:Date.now()-P,summary:`doctor failed: ${e instanceof Error?e.message:String(e)}`}),n.push("doctor workspace stage failed");}if(s$1.skipAnalyze)t$1.push({name:"analyze",status:"skipped",durationMs:0,summary:"analyze stage skipped"});else {let e=Date.now();try{let r=await a$2({workspacePath:i,json:true,strict:s$1.strict===true});m=d.isAbsolute(r.enterpriseControls.evidencePath)?r.enterpriseControls.evidencePath:d.join(i,r.enterpriseControls.evidencePath);let o=r.summary.verdict==="blocked"?"fail":r.summary.verdict==="needs-attention"?"warn":"pass";t$1.push({name:"analyze",status:o,durationMs:Date.now()-e,summary:`analyze verdict: ${r.summary.verdict} (score ${r.summary.score}/100)`,evidencePath:m}),o==="fail"?n.push("analyze reported blocked verdict"):o==="warn"&&n.push("analyze reported needs-attention verdict");}catch(r){u$1=true,t$1.push({name:"analyze",status:"fail",durationMs:Date.now()-e,summary:`analyze failed: ${r instanceof Error?r.message:String(r)}`}),n.push("analyze stage failed");}}let k=Date.now();try{let e=await a$3({startPath:i,writeReport:true,skipVerify:s$1.skipVerify===true});w=e.evidencePath;let r=e.overallStatus==="pass"?"pass":e.overallStatus==="warn"?"warn":"fail";t$1.push({name:"readiness",status:r,durationMs:Date.now()-k,summary:`readiness overall: ${e.overallStatus}`,evidencePath:e.evidencePath}),r==="fail"?n.push(...e.blockingReasons.map(o=>`readiness: ${o}`)):r==="warn"&&n.push(...e.gates.filter(o=>o.status==="warn").map(o=>`readiness warn: ${o.gate}: ${o.summary}`));}catch(e){u$1=true,t$1.push({name:"readiness",status:"fail",durationMs:Date.now()-k,summary:`readiness failed: ${e instanceof Error?e.message:String(e)}`}),n.push("readiness stage failed");}if(s$1.skipAutopilot)t$1.push({name:"autopilot",status:"skipped",durationMs:0,summary:"autopilot stage skipped"});else {let e=Date.now(),r=s$1.autopilotMode??"audit";try{let o=await c({workspacePath:i,mode:r,json:true,skipPipelineStages:true});g$1=o.artifacts.reportPath;let l=o.summary.verdict==="approved"?"pass":o.summary.verdict==="partial"?"warn":"fail";t$1.push({name:"autopilot",status:l,durationMs:Date.now()-e,summary:`autopilot ${r}: ${o.summary.verdict}`,exitCode:o.summary.exitCode,evidencePath:g$1}),l!=="pass"&&n.push(...o.blockingReasons.slice(0,5));}catch(o){u$1=true,t$1.push({name:"autopilot",status:"fail",durationMs:Date.now()-e,summary:`autopilot failed: ${o instanceof Error?o.message:String(o)}`}),n.push("autopilot release stage failed");}}let N=j(t$1),S=V(t$1,u$1),I=d.join(i,t.pipelineLastRun),p$1={schemaVersion:s.pipelineLastRun.schemaVersion,generatedAt:new Date().toISOString(),workspacePath:i,summary:{verdict:N,exitCode:S,stagesPassed:t$1.filter(e=>e.status==="pass").length,stagesWarn:t$1.filter(e=>e.status==="warn").length,stagesFailed:t$1.filter(e=>e.status==="fail").length},stages:t$1,blockingReasons:[...new Set(n)],artifacts:{reportPath:I,analyzeEvidencePath:m,readinessEvidencePath:w,autopilotEvidencePath:g$1}};if(s$1.writeReport!==false){let e$1=f$1(p$1,{commandId:"workspacePipeline",exitCode:S,generatedAt:p$1.generatedAt,blockers:p$1.blockingReasons,runId:e()});await g(i,t.pipelineLastRun,e$1);}if(s$1.writeReport!==false&&s$1.noAgentSync!==true&&process.env.RAPIDKIT_NO_AGENT_SYNC!=="1"&&s$1.agentSync!==false)try{let{syncWorkspaceAgentGrounding:e}=await import('./workspace-agent-sync-Z35NTXCB.js'),r=await e({workspacePath:i,write:true,refreshContext:true,strict:false});p$1.agentGrounding={indexPath:r.indexPath,writtenFiles:r.writtenFiles,blockers:r.blockers};}catch{}return p$1}async function ue(s){let a;try{a=await U(s);}catch(t){let n=t instanceof Error?t.message:String(t);s.json?console.log(JSON.stringify(c$1({operation:"pipeline",code:"pipeline.failed",message:n}),null,2)):console.log(c$2.red(`Pipeline failed: ${n}`)),process.exit(1);}if(s.json)console.log(JSON.stringify(a,null,2));else {console.log(c$2.bold.cyan(`
|
|
2
|
+
\u{1F517} Workspai Governance Pipeline
|
|
3
|
+
`)),console.log(c$2.bold(`Workspace: ${c$2.cyan(d.basename(a.workspacePath))}`)),console.log(c$2.gray(`Path: ${a.workspacePath}`)),console.log(c$2.white(`Verdict: ${a.summary.verdict} Exit: ${a.summary.exitCode} (${a.summary.stagesPassed} pass / ${a.summary.stagesWarn} warn / ${a.summary.stagesFailed} fail)`));for(let t of a.stages){let n=t.status==="pass"?c$2.green("PASS"):t.status==="warn"?c$2.yellow("WARN"):t.status==="skipped"?c$2.gray("SKIP"):c$2.red("FAIL");console.log(` - ${t.name}: ${n} ${t.summary}`);}if(a.blockingReasons.length>0){console.log(c$2.bold(`
|
|
4
|
+
Blocking reasons:`));for(let t of a.blockingReasons.slice(0,8))console.log(c$2.gray(` \u2022 ${t}`));}console.log(c$2.gray(`
|
|
5
|
+
Evidence: ${a.artifacts.reportPath}`)),a.agentGrounding?.writtenFiles.length&&console.log(c$2.gray(`Agent grounding: ${a.agentGrounding.writtenFiles.length} file(s) synced (INDEX + AGENTS.md + Copilot/Cursor/Claude hooks)`));}let i=K(a.summary.exitCode,s.strict===true);i!==0&&process.exit(i);}export{K as pipelineProcessExitCode,U as runPipeline,ue as runPipelineCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as AGENT_BOOTSTRAP_RECEIPT_SCHEMA_VERSION,f as AGENT_ENTRY_HOST_IDS,g as PROJECT_AGENT_ADAPTER_ENTRY_FILES,b as PROJECT_AGENT_ENTRY_RELATIVE_PATH,a as PROJECT_AGENT_ENTRY_SCHEMA_VERSION,e as WORKSPAI_AGENT_ENTRY_END,d as WORKSPAI_AGENT_ENTRY_START,j as buildAgentBootstrapReceipt,i as buildProjectAgentEntryManifest,h as normalizeAgentEntryHost}from'./chunk-
|
|
1
|
+
export{c as AGENT_BOOTSTRAP_RECEIPT_SCHEMA_VERSION,f as AGENT_ENTRY_HOST_IDS,g as PROJECT_AGENT_ADAPTER_ENTRY_FILES,b as PROJECT_AGENT_ENTRY_RELATIVE_PATH,a as PROJECT_AGENT_ENTRY_SCHEMA_VERSION,e as WORKSPAI_AGENT_ENTRY_END,d as WORKSPAI_AGENT_ENTRY_START,j as buildAgentBootstrapReceipt,i as buildProjectAgentEntryManifest,h as normalizeAgentEntryHost}from'./chunk-RVOW3BHQ.js';
|
package/dist/{project-intelligence-lens-LQCN65P2.js → project-intelligence-lens-7NMKHV5N.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as PROJECT_CONTEXT_AGENT_SCHEMA_VERSION,c as PROJECT_GROUNDING_MODE_VALUES,g as PROJECT_PORTABLE_GROUNDING_SKILL_PATH,e as WORKSPAI_PROJECT_GROUNDING_END,d as WORKSPAI_PROJECT_GROUNDING_START,f as WORKSPAI_PROJECT_SKILL_MARKER,i as buildProjectContextAgent,j as resolveProjectPortableSkillTransactionPaths,m as resolveWorkspaceProjectLensTargets,h as selectBoundedProjectLensEntities,k as syncProjectIntelligenceLens,l as syncWorkspaceProjectLenses}from'./chunk-
|
|
1
|
+
export{b as PROJECT_CONTEXT_AGENT_SCHEMA_VERSION,c as PROJECT_GROUNDING_MODE_VALUES,g as PROJECT_PORTABLE_GROUNDING_SKILL_PATH,e as WORKSPAI_PROJECT_GROUNDING_END,d as WORKSPAI_PROJECT_GROUNDING_START,f as WORKSPAI_PROJECT_SKILL_MARKER,i as buildProjectContextAgent,j as resolveProjectPortableSkillTransactionPaths,m as resolveWorkspaceProjectLensTargets,h as selectBoundedProjectLensEntities,k as syncProjectIntelligenceLens,l as syncWorkspaceProjectLenses}from'./chunk-V6TIT6M3.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as PROJECT_TEST_COVERAGE_ARTIFACT,a as PROJECT_TEST_COVERAGE_SCHEMA,d as collectProjectTestCoverage,c as inspectProjectTestCoverageCapability}from'./chunk-
|
|
1
|
+
export{b as PROJECT_TEST_COVERAGE_ARTIFACT,a as PROJECT_TEST_COVERAGE_SCHEMA,d as collectProjectTestCoverage,c as inspectProjectTestCoverageCapability}from'./chunk-EBEAJIBI.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{j as abortProofCarryingChange,q as assertSealedProofCarryingChangeCurrent,c as authorizeProofCarryingChange,a as beginProofCarryingChange,p as decisionTransactionForCapsule,l as exportProofCarryingChangeCapsule,h as inspectProofCarryingChange,i as listProofCarryingChanges,e as recordProofCarryingChangeEffect,b as recordProofCarryingChangePrediction,f as recordProofCarryingChangeVerification,d as resumeProofCarryingChange,n as validateEffectReceiptInput,m as validatePredictedArchitectureChangeInput,k as validateProofCarryingChangeCapsule,o as validateVerificationReceiptInput,g as verifyProofCarryingChange}from'./chunk-WHR5SL33.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c}from'./chunk-IBJEQHJR.js';import {h as h$1}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-IBJEQHJR.js';import {h as h$1}from'./chunk-PKKSRXUS.js';import {b as b$1,a}from'./chunk-TQEMLBAG.js';import {promises}from'fs';import t from'path';import d from'chalk';import {execa}from'execa';var f="3000";function w(e){return e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-")||"axum-api"}function k(e,i){return `[package]
|
|
2
2
|
name = "${e}"
|
|
3
3
|
version = "0.1.0"
|
|
4
4
|
edition = "2021"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b,c}from'./chunk-IBJEQHJR.js';import {h as h$1}from'./chunk-
|
|
1
|
+
import {b,c}from'./chunk-IBJEQHJR.js';import {h as h$1}from'./chunk-PKKSRXUS.js';import {b as b$1,a}from'./chunk-TQEMLBAG.js';import {promises}from'fs';import g from'path';import i from'chalk';import R from'ora';import {execa}from'execa';var x="21",j="3.5.0",M="2.8.9";function f(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,".").replace(/^\.+|\.+$/g,"").replace(/\.{2,}/g,".").split(".").map(p=>p.replace(/^[^a-z]+/,"").replace(/[^a-z0-9]/g,"")).filter(Boolean).join(".")}function h(e,t){return e.replace(/[\r\n\t]+/g," ").trim()||t}function E(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")}function T(e,t){let s=f(e)||"com.workspai.apps",p=f(t)||"service";return `${s}.${p}`}function A(e){return e.replace(/\./g,"/")}function P(){return JSON.stringify({engine:"npm",runtime:"java"},null,2)}function C(e,t){return JSON.stringify({kit_name:"springboot.standard",runtime:"java",module_support:false,project_name:e.project_name,artifact_id:e.artifact_id,group_id:e.group_id,package_name:e.package_name,app_version:e.app_version,created_by:"workspai",workspai_version:t,rapidkit_version:t,created_at:new Date().toISOString()},null,2)}function D(e){return `<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
4
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-EBEAJIBI.js';import {a as a$2}from'./chunk-MHQHRMKU.js';import {c}from'./chunk-ABMB6MJT.js';import {a as a$1}from'./chunk-XPGCFVGC.js';import {q as q$2}from'./chunk-2LZWBUJD.js';import {a as a$3}from'./chunk-GR6442P7.js';import {g,f}from'./chunk-OZXCNVGW.js';import {a}from'./chunk-AFIFZTOY.js';import {p,q as q$1}from'./chunk-ODK4LCEL.js';import {createHash}from'crypto';import u from'path';import v from'fs-extra';var W="workspai.verified-goal.v1",A=q$1.verifiedGoalStatus,V=p.verifiedGoalStatus,J="contracts/workspace-intelligence/verified-goal.v1.json",$="contracts/workspace-intelligence/verified-goal-status.v1.json";function H(e,t,a){if(t.kind==="workspace")return true;let r=u.resolve(e,a.path);return t.kind==="project"?a.name===t.projectName||r===u.resolve(t.projectPath):t.projects.some(i=>i.projectName===a.name||u.resolve(i.projectPath)===r)}function x(e){return Array.isArray(e)?`[${e.map(x).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([t],[a])=>t.localeCompare(a)).map(([t,a])=>`${JSON.stringify(t)}:${x(a)}`).join(",")}}`:JSON.stringify(e)}function K(e){return createHash("sha256").update(x(e)).digest("hex")}var ae=["package.json","package-lock.json","npm-shrinkwrap.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","pyproject.toml","requirements.txt","Pipfile","Pipfile.lock","poetry.lock","uv.lock","go.mod","go.sum","Cargo.toml","Cargo.lock","pom.xml","build.gradle","build.gradle.kts","gradle.lockfile","packages.lock.json","Directory.Packages.props","composer.json","composer.lock","Gemfile","Gemfile.lock","mix.exs","mix.lock","deps.edn","project.clj","build.sbt"],re=new Set(ae.map(e=>e.toLowerCase())),se=new Set([".git",".hg",".svn",".workspai",".venv","venv",".tox",".mypy_cache",".pytest_cache","__pycache__","node_modules","vendor","pods","dist","build","out","target","bin","obj","coverage",".coverage",".next",".nuxt",".svelte-kit"]),F=1e5;function ne(e){return re.has(e.toLowerCase())||/\.(?:csproj|fsproj|vbproj)$/i.test(e)}async function ie(e){let t=[e],a=[],r=0;for(;t.length>0;){let i=t.shift();if(i===void 0)break;let o=await v.readdir(i,{withFileTypes:true});if(o.sort((n,s)=>n.name.localeCompare(s.name)),r+=o.length,r>F)throw new Error(`Dependency safety baseline exceeded ${F} filesystem entries under ${e}. Narrow the project boundary before creating this goal.`);for(let n of o){let s=u.join(i,n.name);if(n.isDirectory()){!se.has(n.name.toLowerCase())&&!a$3(n.name)&&t.push(s);continue}n.isFile()&&ne(n.name)&&a.push(s);}}return a}function oe(e){return /^(?:package\.json|package-lock\.json|npm-shrinkwrap\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?)$/i.test(e)?"node":/^(?:pyproject\.toml|requirements\.txt|Pipfile(?:\.lock)?|poetry\.lock|uv\.lock)$/i.test(e)?"python":/^go\.(?:mod|sum)$/i.test(e)?"go":/^Cargo\.(?:toml|lock)$/i.test(e)?"rust":/^(?:pom\.xml|build\.gradle(?:\.kts)?|gradle\.lockfile)$/i.test(e)?"jvm":/^(?:Directory\.Packages\.props|packages\.lock\.json)$/i.test(e)?"dotnet":/^composer\.(?:json|lock)$/i.test(e)?"php":/^Gemfile(?:\.lock)?$/i.test(e)?"ruby":/^mix\.(?:exs|lock)$/i.test(e)?"elixir":/^(?:deps\.edn|project\.clj)$/i.test(e)?"clojure":/^build\.sbt$/i.test(e)?"scala":/\.(?:csproj|fsproj|vbproj)$/i.test(e)?"dotnet":"unknown"}function z(e){try{let t=JSON.parse(e),a={};for(let r of ["dependencies","devDependencies","peerDependencies","optionalDependencies"]){let i=t[r];if(!(!i||typeof i!="object"||Array.isArray(i)))for(let[o,n]of Object.entries(i))typeof n=="string"&&(a[`${r}:${o}`]=n);}return a}catch{return}}async function U(e,t){let r=(await q$2({workspacePath:e,includeAbsolutePaths:true})).projects.filter(o=>H(e,t,o)),i=new Map;for(let o of r){let n=u.resolve(e,o.path),s=await ie(n);for(let c of s){let g=u.basename(c),f=await v.readFile(c,"utf8"),p=u.relative(e,c).split(u.sep).join("/");i.set(p,{path:p,ecosystem:oe(g),sha256:createHash("sha256").update(f).digest("hex"),...g==="package.json"?{dependencies:z(f)??{}}:{}});}}return {manifests:[...i.values()].sort((o,n)=>o.path.localeCompare(n.path))}}function O(e){let a=e.replace(/^(?:workspace:|npm:[^@]+@)/,"").match(/(?:^|[^\d])(\d+)(?:\.\d+)?(?:\.\d+)?/);return a?Number(a[1]):null}function S(e){return /(?:^|\/)(?:package-lock\.json|npm-shrinkwrap\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?|poetry\.lock|uv\.lock|Pipfile\.lock|go\.sum|Cargo\.lock|gradle\.lockfile|packages\.lock\.json|composer\.lock|Gemfile\.lock|mix\.lock)$/i.test(e)}async function ce(e){let t=e.dependencySafetyBaseline;if(!t)return k({id:"change-policy",label:"Change safety policy",status:"missing",expected:"dependency manifest safety baseline",actual:"baseline unavailable"});let a=[],r=await U(e.workspace.path,e.scope),i=new Map(r.manifests.map(s=>[s.path,s])),o=new Map(t.manifests.map(s=>[s.path,s])),n=new Set;for(let s of t.manifests){let c=i.get(s.path);(!c||c.sha256!==s.sha256)&&n.add(s.path);}for(let s of r.manifests)o.has(s.path)||n.add(s.path);for(let s of r.manifests)!o.has(s.path)&&!S(s.path)&&a.push(`${s.path} was added after the safety baseline`);for(let s of t.manifests){let c=i.get(s.path);if(!c){a.push(`${s.path} was removed`);continue}if(c.sha256===s.sha256)continue;if(s.dependencies){let p=await v.readFile(u.join(e.workspace.path,s.path),"utf8"),m=z(p);if(!m){a.push(`${s.path} is not valid dependency JSON`);continue}for(let[d,l]of Object.entries(s.dependencies)){let h=m[d];if(!h){a.push(`${d.replace(/^[^:]+:/,"")} was removed`);continue}if(h===l)continue;let G=O(l),R=O(h);(G===null||R===null||G!==R||/(?:latest|\*)/i.test(h))&&a.push(`${d.replace(/^[^:]+:/,"")} changed outside its proven major range (${l} \u2192 ${h})`);}continue}if(S(s.path))continue;let g=u.posix.dirname(s.path);[...i.values()].some(p=>{let m=u.posix.dirname(p.path);return p.ecosystem===s.ecosystem&&(m===g||g.startsWith(`${m}/`))&&S(p.path)&&n.has(p.path)})||a.push(`${s.path} changed without a matching reconciled ${s.ecosystem} lockfile`);}return k({id:"change-policy",label:"Change safety policy",status:a.length===0?"passed":"blocked",expected:"no force, removal, unbounded, or major dependency changes",actual:a.length===0?"manifest changes are within proven bounds":a.join("; ")})}function E(e,t){if(!/^[a-z0-9][a-z0-9._-]{7,95}$/i.test(t))throw new Error(`Invalid verified goal id: ${t}`);let a=u.join(e,".workspai","goals",t);return {directory:a,goal:u.join(a,"goal.json"),status:u.join(a,"status.json"),latestReport:u.join(e,V)}}function le(e){return {workspacePath:u.resolve(e.workspace.path),kind:e.kind,scope:e.scope,target:e.criteria.kind==="test-coverage"?e.criteria.minimumPercent:null,...e.criteria.kind==="test-coverage"&&e.criteria.runtime?{runtime:e.criteria.runtime}:{},constraints:e.constraints}}async function C(e,t){await v.ensureDir(u.dirname(e));let a=`${e}.${process.pid}.${Date.now()}.tmp`;await v.writeJson(a,t,{spaces:2}),await v.rename(a,e);}async function ue(e,t){let a=t?.trim();if(!a||a==="workspace")return {scope:{kind:"workspace"}};let r=a.startsWith("projects:")?"projects:":a.startsWith("project:")&&a.slice(8).includes(",")?"project:":null,i=a.startsWith("project:")?a.slice(8).trim():r?a.slice(r.length).trim():a;if(!i)throw new Error("Project goal scope must name a project.");let o=await q$2({workspacePath:e,includeAbsolutePaths:true});if(r){let g=i.split(",").map(p=>p.trim()).filter(Boolean);if(g.length<2||new Set(g).size!==g.length)throw new Error("A project-set goal scope must name at least two unique projects.");return {scope:{kind:"project-set",projects:g.map(p=>{let m=o.projects.filter(d=>d.name===p||d.path===p);if(m.length!==1)throw new Error(m.length===0?`Project goal scope was not found: ${p}`:`Project goal scope is ambiguous: ${p}`);return m[0]}).map(p=>({projectName:p.name,projectPath:u.resolve(e,p.path)})).sort((p,m)=>p.projectName.localeCompare(m.projectName))}}}let n=o.projects.filter(g=>{let f=u.resolve(e,g.path);return g.name===i||g.path===i||f===u.resolve(i)});if(n.length!==1)throw new Error(n.length===0?`Project goal scope was not found: ${i}`:`Project goal scope is ambiguous: ${i}`);let s=n[0],c=u.resolve(e,s.path);return {project:s,scope:{kind:"project",projectName:s.name,projectPath:c}}}function Y(e,t,a){return e===null?"unavailable":a==="minimum"?e>=t?"satisfied":"unsatisfied":e<=t?"satisfied":"unsatisfied"}async function X(e){if(!e)return null;try{let t=await v.readJson(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:null}catch{return null}}function de(e){return Array.isArray(e.projects)?e.projects.filter(t=>!!t&&typeof t=="object"&&!Array.isArray(t)):e.project&&typeof e.project=="object"&&!Array.isArray(e.project)?[e.project]:[]}function pe(e){let t=e.dependencyAudit;return t&&typeof t=="object"&&!Array.isArray(t)?t:null}async function Q(e,t){let a=await f(e,p.doctor),r=await X(a);if(!r)return {measuredAt:new Date().toISOString(),value:null,target:0,unit:"blocking-vulnerabilities",status:"unavailable",evidencePaths:[],message:"Fresh Doctor dependency evidence is not available."};let i=de(r).filter(c=>{if(t.kind==="workspace")return true;let g=typeof c.name=="string"?c.name:typeof c.projectName=="string"?c.projectName:"",f=typeof c.path=="string"?u.resolve(c.path):typeof c.projectPath=="string"?u.resolve(c.projectPath):"";return t.kind==="project"?g===t.projectName||f===u.resolve(t.projectPath):t.projects.some(p=>p.projectName===g||u.resolve(p.projectPath)===f)}),o=i.map(pe).filter(c=>c!==null),n=o.map(c=>c.blockingFindingCount).filter(c=>Number.isInteger(c)&&Number(c)>=0),s=i.length>0&&n.length===i.length?n.reduce((c,g)=>c+g,0):null;return {measuredAt:(()=>{let c=o.map(g=>g.generatedAt).filter(g=>typeof g=="string").sort();return c[c.length-1]??new Date().toISOString()})(),value:s,target:0,unit:"blocking-vulnerabilities",status:Y(s,0,"maximum"),evidencePaths:a?[a]:[],message:s===null?"Doctor did not publish complete dependency audit counts for the selected scope.":`${s} blocking dependency vulnerability finding(s) remain.`}}async function Z(e){let t=await a$1({startPath:e,writeReport:false}),a=t.gates.filter(i=>i.status==="pass").length,r=t.gates.length;return {measuredAt:t.generatedAt,value:a,target:r,unit:"gates",status:t.overallStatus==="pass"?"satisfied":"unsatisfied",evidencePaths:[...new Set(t.gates.map(i=>i.evidencePath).filter(i=>typeof i=="string"))],message:t.overallStatus==="pass"?"All release readiness gates pass.":`${r-a} release readiness gate(s) still require work.`}}async function B(e){let t=await d({projectPath:e.projectPath,target:e.target,run:e.run,runtime:e.runtime}),r=t.metrics[t.target.metric]?.percent??null;return {executionStatus:t.status,measurement:{measuredAt:t.generatedAt,value:r,target:e.target,unit:"percent",status:Y(r,e.target,"minimum"),evidencePaths:[t.artifactPaths.project],message:t.status==="failed"?"The runtime-native coverage test command failed.":r===null?"Machine-readable coverage evidence is unavailable.":`${t.target.metric} coverage is ${r}% (target ${e.target}%).`}}}async function ee(e){if(e.scope.kind==="project"){if(!e.scope.projectPath)throw new Error("Coverage goal project scope does not have a project path.");return B({projectPath:e.scope.projectPath,target:e.target,run:e.run,runtime:e.runtime})}let t=await q$2({workspacePath:e.workspacePath,includeAbsolutePaths:true});if(t.projects.length===0)return {executionStatus:"unavailable",measurement:{measuredAt:new Date().toISOString(),value:null,target:e.target,unit:"percent",status:"unavailable",evidencePaths:[],message:"The workspace does not contain a registered project to measure."}};let a=t.projects.filter(l=>H(e.workspacePath,e.scope,l)),r=e.runtime,i=r?a.filter(l=>l.runtimeCandidates.includes(r)):a;if(i.length===0)return {executionStatus:"unavailable",measurement:{measuredAt:new Date().toISOString(),value:null,target:e.target,unit:"percent",status:"unavailable",evidencePaths:[],message:`The selected scope does not contain the ${e.runtime} coverage runtime.`}};let o=[];for(let l of i)o.push({projectName:l.name,result:await B({projectPath:u.resolve(e.workspacePath,l.path),target:e.target,run:e.run,runtime:e.runtime})});let n=o.filter(l=>l.result.executionStatus==="failed"),s=o.filter(l=>l.result.measurement.status==="unavailable"),c=o.filter(l=>l.result.measurement.status==="unsatisfied"),g=o.map(l=>l.result.measurement.value).filter(l=>l!==null),f=g.length===o.length&&g.length>0?Math.min(...g):null,p=n.length>0?"failed":s.length>0?"unavailable":c.length>0?"below-target":"passed",m=o.map(l=>l.result.measurement.measuredAt).sort(),d=[...n.map(l=>`${l.projectName}: coverage command failed`),...s.map(l=>`${l.projectName}: coverage unavailable`),...c.map(l=>`${l.projectName}: ${l.result.measurement.value??"unknown"}%`)];return {executionStatus:p,measurement:{measuredAt:m[m.length-1]??new Date().toISOString(),value:f,target:e.target,unit:"percent",status:p==="passed"?"satisfied":p==="below-target"?"unsatisfied":"unavailable",evidencePaths:[...new Set(o.flatMap(l=>l.result.measurement.evidencePaths))],message:p==="passed"?`Every registered project has at least ${e.target}% test coverage.`:`Workspace coverage is not verified: ${d.join("; ")}.`}}}function ge(e){let t=e.scope.kind==="project"?`project ${e.scope.projectName??"selected project"}`:e.scope.kind==="project-set"?`projects ${e.scope.projects.map(a=>a.projectName).join(", ")}`:"workspace";return e.kind==="release-readiness"?`Prepare the ${t} for release.`:e.kind==="dependency-security"?`Resolve blocking dependency vulnerabilities in the ${t} without unsafe changes.`:`Raise ${e.runtime?`${e.runtime} `:""}${t} test coverage to ${e.target??80}% without breaking its build.`}function me(e,t,a){return e==="release-readiness"?{kind:e,readiness:"pass",workspaceVerify:"ready"}:e==="dependency-security"?{kind:e,maximumBlockingVulnerabilities:0,requireFreshAudit:true}:{kind:e,metric:"auto",minimumPercent:t,...a?{runtime:a}:{}}}async function fe(e){return e.kind==="release-readiness"?Z(e.workspacePath):e.kind==="dependency-security"?Q(e.workspacePath,e.scope):(await ee({workspacePath:e.workspacePath,scope:e.scope,target:e.target,run:false,runtime:e.runtime})).measurement}async function Ee(e){let t=u.resolve(e.workspacePath),a$1=Math.max(0,Math.min(100,Math.round(e.target??80))),{scope:r}=await ue(t,e.scope),i={workspacePath:u.resolve(t),kind:e.kind,scope:r,target:e.kind==="test-coverage"?a$1:null,...e.kind==="test-coverage"&&e.runtime?{runtime:e.runtime}:{},constraints:{allowBreakingChanges:e.allowBreakingChanges===true,allowForce:e.allowForce===true,requireBuild:e.requireBuild!==false,requireTests:e.requireTests!==false}},o=K(i),n=`goal-${e.kind}-${o.slice(0,16)}`,s=E(t,n);if(await v.pathExists(s.goal)){let{goal:m,status:d}=await te(t,n);if(m.fingerprint===o)return {goal:m,status:d,resumed:d.state!=="verified"}}let c=new Date().toISOString(),g$1=await fe({workspacePath:t,kind:e.kind,scope:r,target:a$1,runtime:e.runtime}),f={schemaVersion:W,id:n,fingerprint:o,createdAt:c,updatedAt:c,workspace:{name:u.basename(t),path:t},scope:r,kind:e.kind,summary:ge({kind:e.kind,scope:r,target:a$1,runtime:e.runtime}),constraints:i.constraints,criteria:me(e.kind,a$1,e.runtime),baseline:g$1,...e.kind==="dependency-security"?{dependencySafetyBaseline:await U(t,r)}:{},artifactPaths:{goal:s.goal,status:s.status,latestReport:s.latestReport}},p={schemaVersion:A,goalId:n,goalFingerprint:o,workspacePath:t,updatedAt:c,state:"planned",attempt:0,progress:g$1,checks:[],blockingReasons:[],evidencePaths:g$1.evidencePaths,nextActions:e.kind==="test-coverage"?["Add focused tests for the lowest-coverage source paths.","Run verified goal checks."]:e.kind==="dependency-security"?["Inspect the fresh project dependency audit.","Apply only compatible non-force dependency repairs.","Reconcile the lockfile, test, build, and verify again."]:["Inspect the current remediation plan and failing release gates.","Repair the next causal blocker, then verify again."],artifactPath:s.status};return a(f,J,"Verified goal"),a(p,$,"Verified goal status"),await C(s.goal,f),await C(s.status,p),await g(t,V,p),{goal:f,status:p,resumed:false}}async function te(e,t){let a$1=E(u.resolve(e),t),r=await v.readJson(a$1.goal),i=await v.readJson(a$1.status);a(r,J,"Verified goal"),a(i,$,"Verified goal status");let o=u.resolve(e),n=u.resolve(r.artifactPaths.goal)===u.resolve(a$1.goal)&&u.resolve(r.artifactPaths.status)===u.resolve(a$1.status)&&u.resolve(r.artifactPaths.latestReport)===u.resolve(a$1.latestReport);if(r.schemaVersion!==W||i.schemaVersion!==A||r.id!==i.goalId||r.fingerprint!==i.goalFingerprint||r.fingerprint!==K(le(r))||u.resolve(r.workspace.path)!==o||u.resolve(i.workspacePath)!==o||!n)throw new Error(`Verified goal artifacts are inconsistent: ${t}`);return {goal:r,status:i}}function k(e){return {...e,message:e.message??`${e.label}: ${e.actual}; expected ${e.expected}.`}}async function q(e){let t=[],a=e.goal.scope.kind==="project"?[`project:${e.goal.scope.projectName}`]:e.goal.scope.kind==="project-set"?e.goal.scope.projects.map(r=>`project:${r.projectName}`):[void 0];for(let r of ["test","build"]){if(r==="test"&&e.includeTests===false)continue;if(!(r==="test"?e.goal.constraints.requireTests:e.goal.constraints.requireBuild)){t.push(k({id:r,label:`${r} validation`,status:"skipped",expected:"not required",actual:"skipped by goal contract"}));continue}if(!e.run){t.push(k({id:r,label:`${r} validation`,status:"missing",expected:"fresh passed evidence",actual:"execution disabled"}));continue}let o=false;for(let n of a){let s=await a$2({workspacePath:e.goal.workspace.path,stage:r,scope:n,parallel:false,continueOnError:false,strict:true,json:true,enforceGates:false}),c=n?.replace(/^project:/,"");if(t.push(k({id:c?`${r}:${c}`:r,label:c?`${r} validation \xB7 ${c}`:`${r} validation`,status:s.summary.exitCode===0?"passed":"failed",expected:"exit 0",actual:`exit ${s.summary.exitCode}`,evidencePath:u.join(e.goal.workspace.path,".workspai","reports","workspace-run-last.json")})),s.summary.exitCode!==0){o=true;break}}if(o)break}return t}async function Ge(e){let t=u.resolve(e.workspacePath),{goal:a$1,status:r}=await te(t,e.goalId),i=e.run!==false,o=[],n;if(i&&e.runIntelligence!==false){let d=await c({workspacePath:t,strict:true,agent:"generic"}),l=d.exitCode===0||d.exitCode===2,h=a$1.kind==="release-readiness";o.push(k({id:"workspace-intelligence-chain",label:"Workspace Intelligence chain",status:d.exitCode===0||d.exitCode===2&&!h?"passed":d.exitCode===2?"blocked":"failed",expected:"passed",actual:d.exitCode===2&&l&&!h?`${d.status}; canonical evidence refreshed for goal-scoped verification`:d.status,evidencePath:u.join(t,p.intelligenceRun)}));}if(a$1.kind==="release-readiness"){n=await Z(t),o.push(k({id:"release-readiness",label:"Release readiness",status:n.status==="satisfied"?"passed":"blocked",expected:"all gates pass",actual:n.message,evidencePath:u.join(t,p.readiness)}));let d=await f(t,p.verify),l=await X(d),h=l?.summary&&typeof l.summary=="object"&&!Array.isArray(l.summary)?String(l.summary.verdict??"missing"):"missing";o.push(k({id:"workspace-verify",label:"Workspace verification",status:h==="ready"?"passed":h==="missing"?"missing":"blocked",expected:"ready",actual:h,evidencePath:u.join(t,p.verify)}));}else if(a$1.kind==="dependency-security")n=await Q(t,a$1.scope),o.push(k({id:"dependency-audit",label:"Dependency security audit",status:n.status==="satisfied"?"passed":n.status==="unavailable"?"missing":"blocked",expected:"0 blocking vulnerabilities",actual:n.message,evidencePath:n.evidencePaths[0]})),o.push(a$1.constraints.allowBreakingChanges||a$1.constraints.allowForce?k({id:"change-policy",label:"Change safety policy",status:"blocked",expected:"breaking and force changes disabled",actual:`allowBreakingChanges=${a$1.constraints.allowBreakingChanges}, allowForce=${a$1.constraints.allowForce}`}):await ce(a$1)),n.status==="satisfied"&&o.push(...await q({goal:a$1,run:i}));else {let d=a$1.criteria.kind==="test-coverage"?a$1.criteria.minimumPercent:a$1.baseline.target;if(d===null)throw new Error("Coverage goal does not have a valid target.");let l=await ee({workspacePath:t,scope:a$1.scope,target:d,run:i,runtime:a$1.criteria.kind==="test-coverage"?a$1.criteria.runtime:void 0});n=l.measurement,o.push(k({id:"coverage",label:"Test coverage",status:n.status==="satisfied"?"passed":n.status==="unavailable"?"missing":"blocked",expected:`at least ${d}%`,actual:n.message,evidencePath:n.evidencePaths[0]})),o.push(k({id:"test",label:"Coverage test execution",status:l.executionStatus==="failed"?"failed":l.executionStatus==="unavailable"?"missing":"passed",expected:"runtime-native coverage test command completed",actual:l.executionStatus==="failed"?"coverage test command failed":l.executionStatus==="unavailable"?"coverage execution evidence unavailable":"coverage evidence produced by the test runner",evidencePath:n.evidencePaths[0]})),n.status==="satisfied"&&o.push(...await q({goal:a$1,run:i,includeTests:false}));}let s=o.filter(d=>d.status==="blocked"||d.status==="failed"||d.status==="missing").map(d=>d.message),c$1=[...new Set([...n.evidencePaths,...o.map(d=>d.evidencePath).filter(d=>typeof d=="string")])],g$1=n.status==="satisfied"&&o.every(d=>d.status==="passed"||d.status==="skipped"),f$1=E(t,a$1.id),p$1=g$1?[]:a$1.kind==="test-coverage"?["Inspect low-coverage files from the coverage artifact.","Add focused tests and verify again."]:a$1.kind==="dependency-security"?["Use fresh audit candidates and compatible package-manager repairs.","Reconcile lockfiles before running verified goal checks again."]:["Repair the first blocking readiness gate and verify the goal again."],m={schemaVersion:A,goalId:a$1.id,goalFingerprint:a$1.fingerprint,workspacePath:t,updatedAt:new Date().toISOString(),state:g$1?"verified":o.some(d=>d.status==="failed")?"failed":"blocked",attempt:r.attempt+1,progress:n,checks:o,blockingReasons:s,evidencePaths:c$1,nextActions:p$1,artifactPath:f$1.status};return a(m,$,"Verified goal status"),await C(f$1.status,m),await g(t,V,m),m}export{V as VERIFIED_GOAL_LAST_RUN_REPORT_PATH,W as VERIFIED_GOAL_SCHEMA_VERSION,A as VERIFIED_GOAL_STATUS_SCHEMA_VERSION,Ee as planVerifiedGoal,te as readVerifiedGoal,Ge as verifyVerifiedGoal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as captureWorkspaceRegistrationStrict,k as createProject,j as createWorkspace,m as createWorkspaceShareBundle,l as listWorkspaces,a as normalizeWorkspaceEntry,i as registerProjectInWorkspace,h as registerProjectInWorkspaceStrict,f as registerWorkspace,b as registerWorkspaceStrict,d as restoreWorkspaceRegistrationStrict,g as syncWorkspaceProjects,e as unregisterWorkspaceStrict}from'./chunk-
|
|
1
|
+
export{c as captureWorkspaceRegistrationStrict,k as createProject,j as createWorkspace,m as createWorkspaceShareBundle,l as listWorkspaces,a as normalizeWorkspaceEntry,i as registerProjectInWorkspace,h as registerProjectInWorkspaceStrict,f as registerWorkspace,b as registerWorkspaceStrict,d as restoreWorkspaceRegistrationStrict,g as syncWorkspaceProjects,e as unregisterWorkspaceStrict}from'./chunk-MAWHHHU3.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as AGENT_CUSTOMIZATION_PACK_REPORT_PATH,e as AGENT_CUSTOMIZATION_PACK_SCHEMA,f as AGENT_REPORTS_INDEX_PATH,d as AGENT_REPORTS_INDEX_SCHEMA,h as AGENT_REPORT_CATALOG,i as buildCanonicalAgentReportReadOrder,j as buildWorkspaceAgentReportsIndex,k as parseAgentGroundingTargets,l as syncWorkspaceAgentGrounding}from'./chunk-
|
|
1
|
+
export{g as AGENT_CUSTOMIZATION_PACK_REPORT_PATH,e as AGENT_CUSTOMIZATION_PACK_SCHEMA,f as AGENT_REPORTS_INDEX_PATH,d as AGENT_REPORTS_INDEX_SCHEMA,h as AGENT_REPORT_CATALOG,i as buildCanonicalAgentReportReadOrder,j as buildWorkspaceAgentReportsIndex,k as parseAgentGroundingTargets,l as syncWorkspaceAgentGrounding}from'./chunk-OU3BBWH5.js';export{f as AGENT_GROUNDING_DOC_PATH,g as LEGACY_AGENT_GROUNDING_DOC_PATH,L as LEGACY_COPILOT_GROUNDING_SKILL_PATH,x as LEGACY_COPILOT_WORKSPACE_INSTRUCTIONS_PATH,N as LEGACY_COPILOT_WORKSPACE_INTELLIGENCE_SKILL_PATH,m as LEGACY_CURSOR_GROUNDING_RULE_PATH,T as LEGACY_MCP_DESIGN_REPORT_PATH,V as LEGACY_VSCODE_AGENT_HOOKS_PATH,K as WORKSPAI_COPILOT_GROUNDING_SKILL_PATH,w as WORKSPAI_COPILOT_WORKSPACE_INSTRUCTIONS_PATH,M as WORKSPAI_COPILOT_WORKSPACE_INTELLIGENCE_SKILL_PATH,j as WORKSPAI_CURSOR_DIAGNOSE_RULE_PATH,i as WORKSPAI_CURSOR_EVIDENCE_RULE_PATH,h as WORKSPAI_CURSOR_GROUNDING_RULE_PATH,l as WORKSPAI_CURSOR_RELEASE_RULE_PATH,k as WORKSPAI_CURSOR_REPAIR_RULE_PATH,S as WORKSPAI_MCP_DESIGN_REPORT_PATH,U as WORKSPAI_VSCODE_AGENT_HOOKS_PATH,n as WORKSPAI_WINDSURF_RULES_PATH}from'./chunk-QYEQVNBF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as WORKSPACE_ARCHIVE_KIND,e as WORKSPACE_ARCHIVE_MANIFEST_PATH,h as assertSafeRemoteArchiveUrl,o as doctorWorkspaceArchive,l as exportWorkspaceArchive,p as hydrateWorkspaceArchive,m as inspectWorkspaceArchive,g as isPrivateAddress,j as isSafeArchiveEntryName,i as sanitizeWorkspaceArchiveName,k as shouldExcludeWorkspaceArchivePath,n as verifyWorkspaceArchive}from'./chunk-
|
|
1
|
+
export{f as WORKSPACE_ARCHIVE_KIND,e as WORKSPACE_ARCHIVE_MANIFEST_PATH,h as assertSafeRemoteArchiveUrl,o as doctorWorkspaceArchive,l as exportWorkspaceArchive,p as hydrateWorkspaceArchive,m as inspectWorkspaceArchive,g as isPrivateAddress,j as isSafeArchiveEntryName,i as sanitizeWorkspaceArchiveName,k as shouldExcludeWorkspaceArchivePath,n as verifyWorkspaceArchive}from'./chunk-3WHE7V4M.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as WORKSPACE_CONTEXT_AGENT_REPORT_PATH,a as WORKSPACE_CONTEXT_SCHEMA_VERSION,c as buildWorkspaceAgentContext,d as writeWorkspaceAgentContext}from'./chunk-
|
|
1
|
+
export{b as WORKSPACE_CONTEXT_AGENT_REPORT_PATH,a as WORKSPACE_CONTEXT_SCHEMA_VERSION,c as buildWorkspaceAgentContext,d as writeWorkspaceAgentContext}from'./chunk-YZL7ZY7J.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as WORKSPACE_CONTRACT_PATH,i as WORKSPACE_CONTRACT_SCHEMA_VERSION,h as WORKSPACE_CONTRACT_VERIFY_REPORT_PATH,j as WORKSPACE_CONTRACT_VERIFY_SCHEMA_VERSION,k as WorkspaceContractVerificationError,m as buildWorkspaceContract,q as buildWorkspaceContractGraph,l as discoverProjectJsonFiles,p as readWorkspaceContract,o as syncWorkspaceContract,r as verifyWorkspaceContract,n as writeWorkspaceContract,s as writeWorkspaceContractVerifyEvidence}from'./chunk-
|
|
1
|
+
export{g as WORKSPACE_CONTRACT_PATH,i as WORKSPACE_CONTRACT_SCHEMA_VERSION,h as WORKSPACE_CONTRACT_VERIFY_REPORT_PATH,j as WORKSPACE_CONTRACT_VERIFY_SCHEMA_VERSION,k as WorkspaceContractVerificationError,m as buildWorkspaceContract,q as buildWorkspaceContractGraph,l as discoverProjectJsonFiles,p as readWorkspaceContract,o as syncWorkspaceContract,r as verifyWorkspaceContract,n as writeWorkspaceContract,s as writeWorkspaceContractVerifyEvidence}from'./chunk-UW4SESKD.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as buildWorkspaceExplain,a as resolveWorkspaceExplainArtifactPath,c as writeWorkspaceExplainReport}from'./chunk-37ZLNFV5.js';export{c as WORKSPACE_EXPLAIN_REPORT_PATH,e as WORKSPACE_TRACE_REPORT_PATH,d as WORKSPACE_WHY_REPORT_PATH}from'./chunk-QYEQVNBF.js';export{e as WORKSPACE_MODEL_DIFF_REPORT_PATH}from'./chunk-3HFFKW4Q.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as WORKSPACE_EXPLAIN_SCHEMA_VERSION,b as WORKSPACE_EXPLAIN_TARGETS,e as isWorkspaceExplainReport,c as parseWorkspaceExplainTarget,d as resolveWorkspaceTraceTarget}from'./chunk-IVYPC36J.js';export{c as WORKSPACE_EXPLAIN_REPORT_PATH,e as WORKSPACE_TRACE_REPORT_PATH,d as WORKSPACE_WHY_REPORT_PATH}from'./chunk-QYEQVNBF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-ICGWHIMK.js';import {b as b$1,f,j}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-ICGWHIMK.js';import {b as b$1,f,j}from'./chunk-YKY4JFCF.js';import o from'path';async function m(r){let t=o.resolve(r.workspacePath),n=b(r.payload);if(!n)return {ok:false,error:"Invalid agent-action-outcome payload",historyPath:o.join(t,b$1)};let c=f(n),p=o.join(t,b$1);return await j(t,c,{retention:r.retention}),{ok:true,entry:c,historyPath:p}}function l(r){let t=r.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}async function h(){let r=[];for await(let t of process.stdin)r.push(typeof t=="string"?Buffer.from(t):t);return Buffer.concat(r).toString("utf8")}export{l as parseFeedbackStdinPayload,h as readStdinAll,m as recordWorkspaceFeedback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-
|
|
1
|
+
import {c as c$1}from'./chunk-M37ALD4V.js';import {a}from'./chunk-2LIVMG5C.js';import c from'path';import u from'fs-extra';async function W(t,r){let o=await a(t),d=o?.name||c.basename(t),n,i=c.join(t,".python-version");if(await u.pathExists(i)){let a=(await u.readFile(i,"utf-8")).trim();a&&(n=a);}let e=r?.profile||"polyglot",m=e==="python-only"||e==="polyglot"||e==="enterprise",f=r?.installMethod||o?.metadata?.npm?.installMethod||(m?"poetry":"venv"),s=await c$1(t,{workspaceName:d,installMethod:f,pythonVersion:n,profile:e,writeMarker:true,writeGitignore:true,onlyIfMissing:!r?.force}),{publishWorkspaceRegistrySummary:y}=await import('./workspace-registry-summary-ONT4VOJX.js');return await y(t),{workspacePath:t,created:s,status:s.length>0?"passed":"skipped"}}export{W as ensureWorkspaceFoundation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-AD4ZY3RF.js';import {a}from'./chunk-AFIFZTOY.js';import {d,c}from'./chunk-EWZZUQBR.js';import g from'crypto';import H from'path';var M="workspace-graph-stream.v1";function w(o){return c({...o,generatedAt:"<ignored>",proofs:o.proofs.map(s=>({...s,observedAt:"<ignored>"}))})}function f(o){return "observedAt"in o?{...o,observedAt:"<ignored>"}:o}function u(o,s){let e=new Map(o.map(r=>[r.id,r])),a=new Map(s.map(r=>[r.id,r])),i=s.filter(r=>!e.has(r.id)),p=s.filter(r=>{let t=e.get(r.id);return t?c(f(t))!==c(f(r)):false}),d=o.filter(r=>!a.has(r.id)).map(r=>r.id);return {added:i,updated:p,removed:d}}function E(o,s){let e=new Map(o.map(a=>[a.id,a]));return s.filter(a=>{let i=e.get(a.id);return !i||c(i)!==c(a)})}function I(o){return a(o,"contracts/workspace-intelligence/workspace-graph-stream.v1.json","Workspace graph stream event"),o}var R=class{previous=null;revision=0;generation=0;workspaceId;sessionId;now;nextCorrelationId;constructor(s){this.workspaceId=`workspace:${g.createHash("sha256").update(H.resolve(s.workspacePath)).digest("hex")}`,this.sessionId=s.sessionId??g.randomUUID(),this.now=s.now??(()=>new Date),this.nextCorrelationId=s.correlationId??(()=>g.randomUUID());}publish(s,e){b(e,s);let a=this.now().toISOString(),i=d(s),p=w(e),d$1=this.nextCorrelationId(),r={schemaVersion:M,workspaceId:this.workspaceId,sessionId:this.sessionId,generation:this.generation,modelHash:i,graphHash:p,generatedAt:a,causationId:d$1,correlationId:d$1};if(!this.previous){let S=I({...r,type:"graph.snapshot",revision:this.revision,payload:{graph:e,reason:"initial"}});return this.previous=e,S}let t=this.previous,W=this.revision,b$1=t.source.hash,y=w(t);this.revision+=1,this.generation+=1;let c$1=u(t.entities,e.entities),h=u(t.relations,e.relations),l=u(t.proofs,e.proofs),G=c(t.quality)!==c(e.quality),A=I({...r,generation:this.generation,type:"graph.delta",baseRevision:W,baseModelHash:b$1,baseGraphHash:y,revision:this.revision,payload:{entitiesAdded:c$1.added,entitiesUpdated:c$1.updated,entitiesRemoved:c$1.removed,relationsAdded:h.added,relationsUpdated:h.updated,relationsRemoved:h.removed,proofsAdded:l.added,proofsUpdated:l.updated,proofsRemoved:l.removed,providersUpdated:E(t.providers,e.providers),quality:G?e.quality:null,diagnostics:e.diagnostics}});return this.previous=e,A}};export{M as WORKSPACE_GRAPH_STREAM_SCHEMA_VERSION,R as WorkspaceGraphStreamPublisher};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as WORKSPACE_GRAPH_TOKEN_EFFICIENCY_SCHEMA_VERSION,b as buildWorkspaceGraphTokenEfficiencyReport}from'./chunk-IGJA6GBQ.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as DEFAULT_HISTORY_RETENTION,b as WORKSPACE_HISTORY_PATH,a as WORKSPACE_HISTORY_SCHEMA_VERSION,i as appendHistoryEntry,f as historyEntryFromAgentAction,g as historyEntryFromDoctorFixResult,e as historyEntryFromVerify,d as normalizeHistoryEntry,h as readWorkspaceHistory,j as recordWorkspaceHistory}from'./chunk-
|
|
1
|
+
export{c as DEFAULT_HISTORY_RETENTION,b as WORKSPACE_HISTORY_PATH,a as WORKSPACE_HISTORY_SCHEMA_VERSION,i as appendHistoryEntry,f as historyEntryFromAgentAction,g as historyEntryFromDoctorFixResult,e as historyEntryFromVerify,d as normalizeHistoryEntry,h as readWorkspaceHistory,j as recordWorkspaceHistory}from'./chunk-YKY4JFCF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as WORKSPACE_IMPACT_REPORT_PATH,f as WORKSPACE_IMPACT_SCHEMA_VERSION,e as WORKSPACE_MODEL_DIFF_REPORT_PATH,c as WORKSPACE_MODEL_DIFF_SCHEMA_VERSION,d as WORKSPACE_MODEL_SNAPSHOT_REPORT_PATH,b as WORKSPACE_MODEL_SNAPSHOT_SCHEMA_VERSION,p as buildWorkspaceImpact,k as buildWorkspaceModelSnapshot,m as diffWorkspaceModel,i as isGitDiffSource,h as migrateLegacyWorkspaceModelSnapshot,j as parseGitDiffRef,o as workspaceVerificationPlan,q as writeWorkspaceImpact,n as writeWorkspaceModelDiff,l as writeWorkspaceModelSnapshot}from'./chunk-
|
|
1
|
+
export{g as WORKSPACE_IMPACT_REPORT_PATH,f as WORKSPACE_IMPACT_SCHEMA_VERSION,e as WORKSPACE_MODEL_DIFF_REPORT_PATH,c as WORKSPACE_MODEL_DIFF_SCHEMA_VERSION,d as WORKSPACE_MODEL_SNAPSHOT_REPORT_PATH,b as WORKSPACE_MODEL_SNAPSHOT_SCHEMA_VERSION,p as buildWorkspaceImpact,k as buildWorkspaceModelSnapshot,m as diffWorkspaceModel,i as isGitDiffSource,h as migrateLegacyWorkspaceModelSnapshot,j as parseGitDiffRef,o as workspaceVerificationPlan,q as writeWorkspaceImpact,n as writeWorkspaceModelDiff,l as writeWorkspaceModelSnapshot}from'./chunk-3HFFKW4Q.js';export{d as hashWorkspaceModel}from'./chunk-EWZZUQBR.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as WORKSPACE_INTELLIGENCE_BENCHMARK_CONTRACT_PATH,b as WORKSPACE_INTELLIGENCE_BENCHMARK_REPORT_PATH,a as WORKSPACE_INTELLIGENCE_BENCHMARK_SCHEMA_VERSION,d as WORKSPACE_INTELLIGENCE_BENCHMARK_SUITES,g as buildWorkspaceIntelligenceBenchmark,e as classifyWorkspaceEvaluationProvenance,f as trustedMeasuredEvaluationReduction,h as writeWorkspaceIntelligenceBenchmark}from'./chunk-
|
|
1
|
+
export{c as WORKSPACE_INTELLIGENCE_BENCHMARK_CONTRACT_PATH,b as WORKSPACE_INTELLIGENCE_BENCHMARK_REPORT_PATH,a as WORKSPACE_INTELLIGENCE_BENCHMARK_SCHEMA_VERSION,d as WORKSPACE_INTELLIGENCE_BENCHMARK_SUITES,g as buildWorkspaceIntelligenceBenchmark,e as classifyWorkspaceEvaluationProvenance,f as trustedMeasuredEvaluationReduction,h as writeWorkspaceIntelligenceBenchmark}from'./chunk-GYN6RPNU.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as WORKSPACE_EVALUATION_LAST_RUN_PATH,d as WORKSPACE_EVALUATION_LIVE_PATH,k as appendWorkspaceEvaluationEvent,n as assertWorkspaceEvaluationSourceTaxonomy,m as compareWorkspaceEvaluations,h as createWorkspaceEvaluation,l as finalizeWorkspaceEvaluation,g as normalizeWorkspaceEvaluationEvent,j as readWorkspaceEvaluation,f as summarizeWorkspaceEvaluation,i as writeWorkspaceEvaluation}from'./chunk-
|
|
1
|
+
export{e as WORKSPACE_EVALUATION_LAST_RUN_PATH,d as WORKSPACE_EVALUATION_LIVE_PATH,k as appendWorkspaceEvaluationEvent,n as assertWorkspaceEvaluationSourceTaxonomy,m as compareWorkspaceEvaluations,h as createWorkspaceEvaluation,l as finalizeWorkspaceEvaluation,g as normalizeWorkspaceEvaluationEvent,j as readWorkspaceEvaluation,f as summarizeWorkspaceEvaluation,i as writeWorkspaceEvaluation}from'./chunk-UNXG3ZFV.js';
|
package/dist/{workspace-intelligence-runner-OWN5ZI6W.js → workspace-intelligence-runner-4EW4T2OW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WORKSPACE_INTELLIGENCE_RUN_REPORT_PATH,b as WORKSPACE_INTELLIGENCE_RUN_SCHEMA_VERSION,c as runWorkspaceIntelligenceChain}from'./chunk-
|
|
1
|
+
export{a as WORKSPACE_INTELLIGENCE_RUN_REPORT_PATH,b as WORKSPACE_INTELLIGENCE_RUN_SCHEMA_VERSION,c as runWorkspaceIntelligenceChain}from'./chunk-ABMB6MJT.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{u as WORKSPACE_INTELLIGENCE_ADDITIONAL_PRODUCERS,p as WORKSPACE_INTELLIGENCE_ARTIFACTS,q as WORKSPACE_INTELLIGENCE_ARTIFACT_SCHEMAS,r as WORKSPACE_INTELLIGENCE_ARTIFACT_SCHEMA_CONTRACTS,v as WORKSPACE_INTELLIGENCE_COMMAND_SIGNATURES,z as WORKSPACE_INTELLIGENCE_PREFLIGHT_ARTIFACTS,y as WORKSPACE_INTELLIGENCE_PREFLIGHT_IDS,w as WORKSPACE_INTELLIGENCE_ROOT_COMMANDS,A as WORKSPACE_INTELLIGENCE_RUNTIME_STEPS,x as WORKSPACE_INTELLIGENCE_STEP_IDS,t as WORKSPACE_SUPPLEMENTAL_ARTIFACTS,s as WORKSPACE_SUPPLEMENTAL_ARTIFACT_CONTRACTS,B as workspaceIntelligenceRuntimeStep}from'./chunk-ODK4LCEL.js';
|
package/dist/{workspace-knowledge-graph-AKG5NUU6.js → workspace-knowledge-graph-EEOW5VAJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WORKSPACE_KNOWLEDGE_GRAPH_REPORT_PATH,b as assertWorkspaceKnowledgeGraphSourceBinding,e as buildWorkspaceKnowledgeGraph,c as computeWorkspaceKnowledgeGraphInputFingerprint,f as knowledgeEntityId,d as workspaceKnowledgeGraphInputsMatchLiveState}from'./chunk-
|
|
1
|
+
export{a as WORKSPACE_KNOWLEDGE_GRAPH_REPORT_PATH,b as assertWorkspaceKnowledgeGraphSourceBinding,e as buildWorkspaceKnowledgeGraph,c as computeWorkspaceKnowledgeGraphInputFingerprint,f as knowledgeEntityId,d as workspaceKnowledgeGraphInputsMatchLiveState}from'./chunk-AD4ZY3RF.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as buildWorkspaceKnowledgeGraphChangeOverlay}from'./chunk-FIK343LI.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as WORKSPACE_KNOWLEDGE_CONFIDENCE_LEVELS,d as WORKSPACE_KNOWLEDGE_DERIVATIONS,b as WORKSPACE_KNOWLEDGE_ENTITY_KINDS,g as WORKSPACE_KNOWLEDGE_FRESHNESS_LEVELS,a as WORKSPACE_KNOWLEDGE_GRAPH_SCHEMA_VERSION,c as WORKSPACE_KNOWLEDGE_RELATION_KINDS,e as WORKSPACE_KNOWLEDGE_TRUST_LEVELS}from'./chunk-
|
|
1
|
+
export{f as WORKSPACE_KNOWLEDGE_CONFIDENCE_LEVELS,d as WORKSPACE_KNOWLEDGE_DERIVATIONS,b as WORKSPACE_KNOWLEDGE_ENTITY_KINDS,g as WORKSPACE_KNOWLEDGE_FRESHNESS_LEVELS,a as WORKSPACE_KNOWLEDGE_GRAPH_SCHEMA_VERSION,c as WORKSPACE_KNOWLEDGE_RELATION_KINDS,e as WORKSPACE_KNOWLEDGE_TRUST_LEVELS}from'./chunk-HCFOVANQ.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WORKSPACE_KNOWLEDGE_SEARCH_SCHEMA_VERSION,e as queryKnowledgeEntities,c as queryKnowledgeEvidence,d as queryKnowledgePath,b as resolveKnowledgeTarget,f as searchKnowledgeGraph}from'./chunk-
|
|
1
|
+
export{a as WORKSPACE_KNOWLEDGE_SEARCH_SCHEMA_VERSION,e as queryKnowledgeEntities,c as queryKnowledgeEvidence,d as queryKnowledgePath,b as resolveKnowledgeTarget,f as searchKnowledgeGraph}from'./chunk-EZPLMAW2.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as readWorkspaceKnowledgeGraphSnapshot}from'./chunk-MBICKDYP.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {k,h,i}from'./chunk-WHR5SL33.js';import {d,c as c$2,f as f$1,e as e$1}from'./chunk-EZPLMAW2.js';import {b}from'./chunk-37ZLNFV5.js';import {c as c$1,e}from'./chunk-IVYPC36J.js';import {c as c$3,b as b$3}from'./chunk-QYEQVNBF.js';import {b as b$2}from'./chunk-YZL7ZY7J.js';import {d as d$1}from'./chunk-W6WRT77T.js';import {b as b$1}from'./chunk-AD4ZY3RF.js';import {l}from'./chunk-2LZWBUJD.js';import {h as h$1}from'./chunk-UW4SESKD.js';import {f as f$2}from'./chunk-OZXCNVGW.js';import {a}from'./chunk-AFIFZTOY.js';import {p,r}from'./chunk-ODK4LCEL.js';import {w as w$1}from'./chunk-VQZ5PI5J.js';import y from'path';import z from'readline';import w from'fs-extra';var B=p.agentIndex,X=new Map(Object.keys(p).flatMap(e=>{let t=r[e];return t?[[p[e],t]]:[]}));function Y(e,t){return e.kind!==t.kind?false:e.kind==="project"&&t.kind==="project"?e.project.toLowerCase()===t.project.toLowerCase():e.kind==="blocker"&&t.kind==="blocker"?e.blockerId===t.blockerId:e.kind==="trace"&&t.kind==="trace"?e.diffRef===t.diffRef:true}var Z={type:"object",properties:{data:true,error:{type:"object",properties:{code:{type:"string"},message:{type:"string"}},required:["code","message"],additionalProperties:false}},oneOf:[{required:["data"]},{required:["error"]}],additionalProperties:false},Q={readOnlyHint:true,destructiveHint:false,idempotentHint:true,openWorldHint:false},V=[{name:"getWorkspaceModel",description:"Read workspace-model.json",inputSchema:{type:"object",properties:{}}},{name:"getWorkspaceKnowledgeGraph",description:"Read the current proof-backed workspace knowledge graph artifact",inputSchema:{type:"object",properties:{}}},{name:"getWorkspaceEvaluation",description:"Read the live or finalized provenance-aware model usage and verified-outcome report",inputSchema:{type:"object",properties:{live:{type:"boolean",description:"Read the live report instead of the finalized last-run report"}}}},{name:"queryWorkspaceEntities",description:"List workspace knowledge entities, optionally filtered by kind",inputSchema:{type:"object",properties:{kind:{type:"string",description:"Optional entity kind"}}}},{name:"searchWorkspaceGraph",description:"Return bounded, proof-carrying workspace context matching a text query",inputSchema:{type:"object",properties:{query:{type:"string",description:"Text, path, symbol, service, or concept to find"},kind:{type:"string",description:"Optional entity kind filter"},projectId:{type:"string",description:"Optional canonical project id filter"},limit:{type:"integer",minimum:1,maximum:100,default:12}},required:["query"]}},{name:"getWorkspaceGraphEvidence",description:"Resolve portable evidence for a knowledge graph entity or relation",inputSchema:{type:"object",properties:{query:{type:"string"}},required:["query"]}},{name:"findWorkspaceGraphPath",description:"Find a shortest proof-carrying path between two workspace entities",inputSchema:{type:"object",properties:{from:{type:"string"},to:{type:"string"}},required:["from","to"]}},{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>"}}}},{name:"listProofCarryingChanges",description:"List proof-carrying changes with lifecycle, assurance, blockers, and integrity state",inputSchema:{type:"object",properties:{}}},{name:"getProofCarryingChange",description:"Read the ledger-derived state and architecture-aware assurance capsule for one change",inputSchema:{type:"object",properties:{changeId:{type:"string",description:"Canonical proof-carrying change id"}},required:["changeId"]}},{name:"validateProofCarryingChange",description:"Replay and validate one proof-carrying capsule and all hash-bound evidence references",inputSchema:{type:"object",properties:{changeId:{type:"string",description:"Canonical proof-carrying change id"}},required:["changeId"]}}].map(e=>({...e,title:e.name.replace(/([a-z])([A-Z])/g,"$1 $2"),inputSchema:{...e.inputSchema,additionalProperties:false},outputSchema:Z,annotations:Q}));function ee(e){let t=e.trim().replace(/\\/g,"/");return t.length>0&&!y.isAbsolute(t)&&!t.split("/").includes("..")&&(t.startsWith(".workspai/")||t.startsWith(".rapidkit/"))}async function c(e,t){if(!ee(t))throw new Error(`Unsafe artifact path: ${t}`);let n=await f$2(e,t)??y.join(e,t);if(!await w.pathExists(n))return null;let r=await w.readJson(n),o=w$1(t),p$1=X.get(o);if(p$1&&a(r,p$1,`MCP artifact ${o}`),o===p.knowledgeGraph){let a=y.join(e,l);if(!await w.pathExists(a))throw new Error("Workspace knowledge graph cannot be consumed without its source model.");let u=await w.readJson(a);b$1(r,u);}return r}async function te(e$1){let t=[],n=new Set,o=((await c(e$1,d$1))?.blockingReasons??[]).filter(i=>typeof i=="string"&&i.trim().length>0);if(o.length>0){t.push({artifact:d$1,reasons:o});for(let i of o)n.add(i);}let p=await c(e$1,c$3);if(e(p)){let i=(p.blockingReasons??[]).filter(l=>typeof l=="string"&&l.trim().length>0);if(i.length>0){t.push({artifact:c$3,reasons:i});for(let l of i)n.add(l);}}let a=await c(e$1,h$1),u=(a?.violations??[]).filter(i=>typeof i=="string"&&i.trim().length>0);if(u.length>0||String(a?.status??"").toLowerCase()==="failed"){let i=u.length>0?u:["Workspace contract verification failed"];t.push({artifact:h$1,reasons:i});for(let l of i)n.add(l);}return {blockingReasons:[...n],sources:t}}async function D(e$2,t,n){switch(t){case "getWorkspaceModel":return c(e$2,l);case "getWorkspaceKnowledgeGraph":return c(e$2,p.knowledgeGraph);case "getWorkspaceEvaluation":return c(e$2,n.live===true?p.evaluationLive:p.evaluationLastRun);case "queryWorkspaceEntities":{let r=await c(e$2,p.knowledgeGraph);if(!r)return null;let o=String(n.kind??"").trim();return {schemaVersion:r.schemaVersion,generatedAt:r.generatedAt,entities:e$1(r,o||void 0)}}case "searchWorkspaceGraph":{let r=await c(e$2,p.knowledgeGraph);if(!r)return null;let o=typeof n.limit=="number"?n.limit:Number(n.limit??12);return f$1(r,{query:String(n.query??""),...typeof n.kind=="string"&&n.kind.trim()?{kind:n.kind.trim()}:{},...typeof n.projectId=="string"&&n.projectId.trim()?{projectId:n.projectId.trim()}:{},limit:Number.isFinite(o)?o:12,projection:"agent"})}case "getWorkspaceGraphEvidence":{let r=await c(e$2,p.knowledgeGraph);return r?c$2(r,String(n.query??"")):null}case "findWorkspaceGraphPath":{let r=await c(e$2,p.knowledgeGraph);return r?d(r,String(n.from??""),String(n.to??"")):null}case "getEvidenceIndex":return c(e$2,B);case "getBlockers":return te(e$2);case "getSafeCommands":return {safeCommands:(await c(e$2,b$2))?.safeCommands??[]};case "getProjectContext":{let r=await c(e$2,b$2);if(!r)return null;let o=String(n.project??"").trim(),p=r.scope?.activeProject??void 0,a=o||p,u=Array.isArray(r.projects)?r.projects:[],i=a&&u.find(l=>typeof l.name=="string"&&l.name.toLowerCase()===a.toLowerCase());return {workspace:r.workspace??null,scope:r.scope??null,validation:r.validation??null,project:i??null,safeCommands:r.safeCommands??[]}}case "getArtifact":{let r=String(n.relativePath??"").trim();return c(e$2,r)}case "listOperationalSkills":return c(e$2,b$3);case "getWorkspaceExplain":{let r=String(n.target??"release-blocked").trim(),o=c$1(r);if(!o)throw new Error(`Invalid explain target: ${r}`);let p=await c(e$2,c$3);return e(p)&&Y(p.target,o)?p:b({workspacePath:e$2,target:o})}case "listProofCarryingChanges":return i({workspacePath:e$2});case "getProofCarryingChange":return h({workspacePath:e$2,changeId:String(n.changeId??"").trim(),operation:"status"});case "validateProofCarryingChange":return k({workspacePath:e$2,changeId:String(n.changeId??"").trim()});default:throw new Error(`Unknown tool: ${t}`)}}var J="2026-07-28",F=["2024-11-05","2025-03-26","2025-06-18","2025-11-25"],U={name:"workspai-workspace-mcp",version:"1.0.0"};function ne(e){let t=e.params?._meta;if(!t||typeof t!="object"||Array.isArray(t))return;let n=t["io.modelcontextprotocol/protocolVersion"];return typeof n=="string"?n:void 0}function re(e,t){return !t||!e||typeof e!="object"||Array.isArray(e)?e:{...e,_meta:{...e._meta??{},"io.modelcontextprotocol/serverInfo":U}}}function g(e,t,n=false){process.stdout.write(`${JSON.stringify({jsonrpc:"2.0",id:e??null,result:re(t,n)})}
|
|
2
|
+
`);}function f(e,t,n=-32e3){process.stdout.write(`${JSON.stringify({jsonrpc:"2.0",id:e??null,error:{code:n,message:t}})}
|
|
3
|
+
`);}function oe(e){let t={data:e};return {content:[{type:"text",text:JSON.stringify(t,null,2)}],structuredContent:t,isError:false}}function A(e,t){return {content:[{type:"text",text:t}],structuredContent:{error:{code:e,message:t}},isError:true}}function ie(e,t){for(let n of e.inputSchema.required??[])if(!(n in t))return `Missing required argument: ${n}`;for(let[n,r]of Object.entries(t)){let o=e.inputSchema.properties[n];if(!o)return `Unknown argument for ${e.name}: ${n}`;if(o.type==="string"&&typeof r!="string")return `Argument ${n} must be a string`;if(o.type==="boolean"&&typeof r!="boolean")return `Argument ${n} must be a boolean`;if(o.type==="integer"&&(!Number.isInteger(r)||typeof r!="number"))return `Argument ${n} must be an integer`;if(typeof r=="number"){if(typeof o.minimum=="number"&&r<o.minimum)return `Argument ${n} must be at least ${o.minimum}`;if(typeof o.maximum=="number"&&r>o.maximum)return `Argument ${n} must be at most ${o.maximum}`}}return null}async function Ae(e){let t=y.resolve(e.workspacePath),n=z.createInterface({input:process.stdin,terminal:false});for await(let r of n){let o=r.trim();if(!o)continue;let p;try{p=JSON.parse(o);}catch{f(null,"Invalid JSON-RPC request",-32700);continue}let{id:a,method:u,params:i}=p,l=ne(p)===J;try{if(u==="server/discover"){g(a,{resultType:"complete",supportedVersions:[J],capabilities:{tools:{listChanged:false}},instructions:"Use bounded Workspai graph search before requesting complete workspace artifacts."},true);continue}if(u==="initialize"){let s=typeof i?.protocolVersion=="string"?i.protocolVersion:void 0,k=F.includes(s)?s:F.at(-1);g(a,{protocolVersion:k,capabilities:{tools:{listChanged:false}},serverInfo:U});continue}if(u==="notifications/initialized")continue;if(u==="tools/list"){g(a,{tools:V.map(s=>({name:s.name,title:s.title,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations}))},l);continue}if(u==="tools/call"){let s=String(i?.name??""),k=V.find(m=>m.name===s);if(!k){f(a,`Unknown tool: ${s}`,-32602);continue}if(i?.arguments!==void 0&&(!i.arguments||typeof i.arguments!="object"||Array.isArray(i.arguments))){f(a,"Tool arguments must be an object",-32602);continue}let j=i?.arguments&&typeof i.arguments=="object"?i.arguments:{},v=ie(k,j);if(v){g(a,A("invalid_arguments",v),l);continue}try{let m=await D(t,s,j);g(a,m==null?A("artifact_not_found",`${s} returned no current workspace data`):oe(m),l);}catch(m){g(a,A("tool_execution_failed",m instanceof Error?m.message:String(m)),l);}continue}f(a,`Unsupported method: ${u??"unknown"}`,-32601);}catch(s){f(a,s instanceof Error?s.message:String(s));}}}async function je(e,t,n={}){return D(y.resolve(e),t,n)}export{V as WORKSPACE_MCP_READ_TOOLS,je as invokeMcpToolForTest,Ae as runWorkspaceMcpServe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{l as WORKSPACE_MODEL_REPORT_PATH,k as WORKSPACE_MODEL_SCHEMA_VERSION,q as buildWorkspaceModel,r as buildWorkspaceModelCached,p as buildWorkspaceModelFacts,s as buildWorkspaceModelIncremental,n as createWorkspaceModelBuildProvenance,o as validateWorkspaceModelStrict,m as workspaceModelProjectTopology,t as writeWorkspaceModel}from'./chunk-
|
|
1
|
+
export{l as WORKSPACE_MODEL_REPORT_PATH,k as WORKSPACE_MODEL_SCHEMA_VERSION,q as buildWorkspaceModel,r as buildWorkspaceModelCached,p as buildWorkspaceModelFacts,s as buildWorkspaceModelIncremental,n as createWorkspaceModelBuildProvenance,o as validateWorkspaceModelStrict,m as workspaceModelProjectTopology,t as writeWorkspaceModel}from'./chunk-2LZWBUJD.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as finalizeWorkspaceOnboarding,a as syncWorkspaceConsumerArtifacts}from'./chunk-
|
|
1
|
+
export{b as finalizeWorkspaceOnboarding,a as syncWorkspaceConsumerArtifacts}from'./chunk-EG6EZ7HW.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-COICGD62.js';import {j as j$1}from'./chunk-OZXCNVGW.js';import g from'path';import i from'fs-extra';var l="README.md",h="<!-- workspai:workspace-intelligence:start -->",c="<!-- workspai:workspace-intelligence:end -->",m={minimal:"A lightweight workspace boundary that adds runtimes only when you need them.","node-only":"A Node.js-focused workspace with shared evidence and agent grounding.","python-only":"A Python-focused workspace with shared evidence and agent grounding.","go-only":"A Go-focused workspace with shared evidence and agent grounding.","java-only":"A Java-focused workspace with shared evidence and agent grounding.","dotnet-only":"A .NET-focused workspace with shared evidence and agent grounding.",polyglot:"A multi-runtime workspace for projects that share contracts, evidence, and agents.",enterprise:"A governed multi-runtime workspace with the complete evidence, policy, and agent surface."};function w(e){return e?.trim()||"minimal"}async function u(e){let n=g.join(e,".workspai","workspace.json");return await i.pathExists(n)?await i.readJson(n).catch(()=>({})):{}}function f(e){let n=e.engine;if(!n)return;if(n.python_core?.status==="skipped")return "Optional Python engine: not installed";if(n.python_version)return `Optional Python engine: Python ${n.python_version} via ${n.install_method||"local environment"}`}function y(e){let n=w(e.profile),r=b$1().presentations.standard.nodes.map(s=>s.label).join(" \u2192 "),a=e.projectCount===1?"project":"projects",t=m[n]??"A governed workspace with shared evidence for developers, tools, CI, IDEs, and AI agents.";return `${h}
|
|
2
2
|
# ${e.workspaceName}
|
|
3
3
|
|
|
4
4
|
This is a **Workspai Workspace Intelligence** workspace. It gives every registered project one shared, evidence-backed view for developers, CI, IDEs, and AI agents.
|
|
@@ -74,4 +74,4 @@ ${c}`}function v(e){return e.includes("# Workspai Workspace")&&e.includes("This
|
|
|
74
74
|
`:"")}`.trimEnd()}if(!e.trim()||v(e))return n;let a=n.replace(/^# .+$/m,"## Workspace Intelligence");return `${e.trimEnd()}
|
|
75
75
|
|
|
76
76
|
${a}`}async function b(e){let n=await u(e.workspacePath),o=y({workspaceName:e.workspaceName,profile:e.profile,projectCount:e.projectCount,engineSummary:f(n)}),r=g.join(e.workspacePath,l),a=await i.pathExists(r)?await i.readFile(r,"utf-8"):"",t=`${j(a,o)}
|
|
77
|
-
`;return t!==a&&await
|
|
77
|
+
`;return t!==a&&await j$1(e.workspacePath,l,t),r}export{c as WORKSPACE_README_MANAGED_END,h as WORKSPACE_README_MANAGED_START,l as WORKSPACE_README_PATH,y as renderWorkspaceReadmeManagedBlock,b as syncWorkspaceReadme};
|
package/dist/{workspace-registry-summary-STGUGROG.js → workspace-registry-summary-ONT4VOJX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,b as WORKSPACE_REGISTRY_SUMMARY_SCHEMA_VERSION,f as buildWorkspaceRegistrySummary,g as formatWorkspaceRegistrySyncSummary,e as publishWorkspaceRegistrySummary,d as readWorkspaceRegistrySummary,c as resolveWorkspaceRegisteredProjects}from'./chunk-
|
|
1
|
+
export{a as WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,b as WORKSPACE_REGISTRY_SUMMARY_SCHEMA_VERSION,f as buildWorkspaceRegistrySummary,g as formatWorkspaceRegistrySyncSummary,e as publishWorkspaceRegistrySummary,d as readWorkspaceRegistrySummary,c as resolveWorkspaceRegisteredProjects}from'./chunk-I3UCODXU.js';
|