werkmeister 0.93.8 → 0.93.11

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.
Files changed (153) hide show
  1. package/dist/{budget-25FAUSGU.js → budget-ANASDXXG.js} +2 -2
  2. package/dist/{cache-IGMYSSBW.js → cache-752EC73V.js} +2 -2
  3. package/dist/{chunk-M6MBSXNM.js → chunk-2TR76OHW.js} +2 -2
  4. package/dist/{chunk-EKQOI5MT.js → chunk-2XHHM4OO.js} +2 -2
  5. package/dist/{chunk-2GTJQHCP.js → chunk-34OZHSVY.js} +2 -2
  6. package/dist/{chunk-MM6QPCKB.js → chunk-3G6CJ6NJ.js} +2 -2
  7. package/dist/{chunk-N7VAKCJU.js → chunk-3GEEXKS7.js} +2 -2
  8. package/dist/{chunk-HSU2IK2O.js → chunk-3YGMS4W5.js} +2 -2
  9. package/dist/{chunk-KJ7NGCEB.js → chunk-43NB32CW.js} +2 -2
  10. package/dist/{chunk-HXXC7TNS.js → chunk-4DZVCIUQ.js} +2 -2
  11. package/dist/{chunk-GY37I33L.js → chunk-4IPPPESG.js} +47 -45
  12. package/dist/{chunk-WNQPLDEI.js → chunk-4Q7PYITS.js} +2 -2
  13. package/dist/{chunk-7YB3EVDN.js → chunk-6AGDGUPH.js} +2 -2
  14. package/dist/{chunk-5B5S623P.js → chunk-6XUCZ2AV.js} +2 -2
  15. package/dist/{chunk-RPXPE5UJ.js → chunk-7KJMBC35.js} +2 -2
  16. package/dist/{chunk-KQCDLBKE.js → chunk-AELODFCX.js} +2 -2
  17. package/dist/chunk-AYLBYRLF.js +4 -0
  18. package/dist/chunk-BDXOVG2P.js +146 -0
  19. package/dist/{chunk-5RABOZIE.js → chunk-BE6K7UTS.js} +2 -2
  20. package/dist/{chunk-Q6J4AWTS.js → chunk-BONAXMSQ.js} +2 -2
  21. package/dist/{chunk-JVKKF2TJ.js → chunk-BT4IHMWY.js} +2 -2
  22. package/dist/{chunk-GCWDSCKO.js → chunk-BTLZ42CA.js} +2 -2
  23. package/dist/{chunk-H7CFYXHA.js → chunk-BXX5LVDU.js} +2 -2
  24. package/dist/{chunk-3EUOTP7I.js → chunk-D7VAZYKM.js} +2 -2
  25. package/dist/{chunk-URJIJBKQ.js → chunk-DQ2RA2WZ.js} +2 -2
  26. package/dist/{chunk-4AQPQQMU.js → chunk-E742ED2J.js} +3 -3
  27. package/dist/{chunk-A7XCFYRC.js → chunk-EGIETPC6.js} +2 -2
  28. package/dist/{chunk-36MMYWCU.js → chunk-EUUPK5SM.js} +2 -2
  29. package/dist/{chunk-G6EOM6QS.js → chunk-F5WZCIQW.js} +2 -2
  30. package/dist/{chunk-FHKQSAOE.js → chunk-FOPKAREC.js} +2 -2
  31. package/dist/{chunk-3JY3LPRL.js → chunk-FRDFLKK7.js} +3 -3
  32. package/dist/{chunk-ZCXV2LTD.js → chunk-HJZXTRUO.js} +2 -2
  33. package/dist/{chunk-FS6BSTZL.js → chunk-HLH4XPY5.js} +2 -2
  34. package/dist/{chunk-N2FE3I4W.js → chunk-HMHASLXQ.js} +2 -2
  35. package/dist/{chunk-CCDWJV2H.js → chunk-HS26D54N.js} +19 -19
  36. package/dist/{chunk-YVEZLQTI.js → chunk-HYVTGG46.js} +2 -2
  37. package/dist/{chunk-PQZGPPAV.js → chunk-JFOI5VA4.js} +2 -2
  38. package/dist/{chunk-Y57X2CE4.js → chunk-JK2TNRWL.js} +2 -2
  39. package/dist/{chunk-W75MXGXH.js → chunk-JVFUXQRW.js} +2 -2
  40. package/dist/{chunk-HBY47W2F.js → chunk-KI3N5JLR.js} +7 -7
  41. package/dist/{chunk-FH5PO2PR.js → chunk-KQ6IKWET.js} +2 -2
  42. package/dist/{chunk-RAPROCIP.js → chunk-KQ7VB7P4.js} +2 -2
  43. package/dist/{chunk-NN6Y3JUA.js → chunk-LFG2YEGB.js} +2 -2
  44. package/dist/{chunk-FAGGMKLP.js → chunk-LKR2G7YE.js} +2 -2
  45. package/dist/chunk-MHTQP2PL.js +84 -0
  46. package/dist/{chunk-7A5VOHL6.js → chunk-NKPR6YJH.js} +2 -2
  47. package/dist/{chunk-OXF7YCZ4.js → chunk-NOIN4X75.js} +2 -2
  48. package/dist/{chunk-NI7UBGII.js → chunk-NWOMXDR5.js} +2 -2
  49. package/dist/{chunk-CAROO44F.js → chunk-O4SM3OFJ.js} +2 -2
  50. package/dist/{chunk-YDGBYPGW.js → chunk-PMZIEF7U.js} +2 -2
  51. package/dist/{chunk-5BENDK5Z.js → chunk-PN7WJMOU.js} +2 -2
  52. package/dist/{chunk-TB4F2GWS.js → chunk-Q3J4Y4L3.js} +8 -8
  53. package/dist/{chunk-GX24OKSW.js → chunk-QAUMDGFV.js} +15 -14
  54. package/dist/{chunk-I623AHJB.js → chunk-QDBTTMAK.js} +3 -3
  55. package/dist/{chunk-UB3UXHVI.js → chunk-QY5EG47E.js} +2 -2
  56. package/dist/{chunk-PJT7WAVM.js → chunk-RGBIEGRI.js} +2 -2
  57. package/dist/{chunk-SWMXTQML.js → chunk-SGBX6DMH.js} +2 -2
  58. package/dist/{chunk-YV3ALAIY.js → chunk-SLVXV7DP.js} +5 -5
  59. package/dist/{chunk-QNSISZPI.js → chunk-TJZUWQAA.js} +3 -3
  60. package/dist/{chunk-BQTCRMG7.js → chunk-UCDUOBQN.js} +2 -2
  61. package/dist/{chunk-PGGYNB7O.js → chunk-V7XLEEQR.js} +2 -2
  62. package/dist/{chunk-4DE4JJVU.js → chunk-VWXUBTVG.js} +2 -2
  63. package/dist/{chunk-DRLTATGP.js → chunk-W72XTTP5.js} +2 -2
  64. package/dist/{chunk-LXAHT3FP.js → chunk-WF2CAJW7.js} +2 -2
  65. package/dist/{chunk-LPLBVPO5.js → chunk-XE7DL77M.js} +2 -2
  66. package/dist/{chunk-M2BGN6KP.js → chunk-ZCCOMXDB.js} +2 -2
  67. package/dist/{chunk-4ETPZVPP.js → chunk-ZPJYGVUB.js} +2 -2
  68. package/dist/clean-SR5HFBNR.js +8 -0
  69. package/dist/close_out-NYZITLCR.js +8 -0
  70. package/dist/code-2WBVR2DD.js +4 -0
  71. package/dist/config-PIICZE5C.js +4 -0
  72. package/dist/{connect-UGLXRZ4M.js → connect-CAVOGWRW.js} +2 -2
  73. package/dist/{daemon-BWDNB46L.js → daemon-7CEPM7NK.js} +2 -2
  74. package/dist/dashboard.js +4 -4
  75. package/dist/{detect-6ZHLAVSB.js → detect-KJJ5XTBF.js} +2 -2
  76. package/dist/{down-ANORSCYD.js → down-ZJ2HKDCC.js} +3 -3
  77. package/dist/{fixture-EOKTZR7O.js → fixture-S3MJH4WT.js} +2 -2
  78. package/dist/form-cli.js +1 -1
  79. package/dist/hooks-B27QA4VC.js +4 -0
  80. package/dist/hooks_gen-MGBZFZGN.js +4 -0
  81. package/dist/infra-W3REEMMF.js +4 -0
  82. package/dist/init_workspace-RA7QRQ67.js +4 -0
  83. package/dist/{intercept-C4P6X44J.js → intercept-YRTPAIRV.js} +2 -2
  84. package/dist/{issue-CB4N5QDT.js → issue-IMP7ZTVL.js} +2 -2
  85. package/dist/lib/agent_state.js +1 -1
  86. package/dist/lib/gate.js +1 -1
  87. package/dist/lib/pr_guard.js +1 -1
  88. package/dist/list_workspaces-BBOZPSTT.js +7 -0
  89. package/dist/logs-TQ2WEMYY.js +6 -0
  90. package/dist/main.js +3 -3
  91. package/dist/mcp-proxy.js +1 -1
  92. package/dist/mcp.js +6 -6
  93. package/dist/migrate-C755KW3Y.js +8 -0
  94. package/dist/notes-3GN4CXES.js +4 -0
  95. package/dist/{open-HVLO434G.js → open-3VDKY44X.js} +2 -2
  96. package/dist/{optimize-MAHLCKNY.js → optimize-F3PSRZTY.js} +2 -2
  97. package/dist/pause-ZPR3FX7L.js +4 -0
  98. package/dist/pr-MD7FWDZF.js +5 -0
  99. package/dist/proxy_reload-HVANKIZY.js +6 -0
  100. package/dist/{registry-RDDPX7FK.js → registry-35YZW3RI.js} +2 -2
  101. package/dist/remove-3Q6FLYVJ.js +7 -0
  102. package/dist/remove_workspace-ZMG4DCIT.js +8 -0
  103. package/dist/restart-OV7M7YKM.js +8 -0
  104. package/dist/resume-BJG5D2CX.js +8 -0
  105. package/dist/{safari-U2FZOZ5B.js → safari-RQ3AFNGW.js} +2 -2
  106. package/dist/{sandbox-2RGQHQ4C.js → sandbox-6OJNZEXM.js} +2 -2
  107. package/dist/{services-HY3ZKF3R.js → services-M5Q2KSM6.js} +2 -2
  108. package/dist/setup-JFEW4UT3.js +5 -0
  109. package/dist/skills-OM4QLIBW.js +4 -0
  110. package/dist/{slots-3JS6JWLN.js → slots-HPOSA7XP.js} +2 -2
  111. package/dist/{standards-GA3XZTXU.js → standards-2MTH7LOU.js} +2 -2
  112. package/dist/start_args-BZJHWVQI.js +4 -0
  113. package/dist/starting_prompt-HGA4RY2H.js +4 -0
  114. package/dist/stats-GSFVPJVU.js +4 -0
  115. package/dist/{status-57ZQFVUK.js → status-OAQBV6GA.js} +2 -2
  116. package/dist/{stop-TPBIZG35.js → stop-WOUPGE7G.js} +2 -2
  117. package/dist/{telepresence-XWBRQS4V.js → telepresence-JTFAO4M5.js} +2 -2
  118. package/dist/{test-RIOAWNUY.js → test-6QP3U7PB.js} +2 -2
  119. package/dist/{tokens-X5AUHCF6.js → tokens-F2LDDDCG.js} +2 -2
  120. package/dist/{up-NKWW4PUN.js → up-ULCFLJPH.js} +3 -3
  121. package/dist/{v4-72JPNI6O.js → v4-SC4UUBNX.js} +2 -2
  122. package/dist/wait_load-HKJV3YYV.js +4 -0
  123. package/dist/werkmeister-workspaces.vsix +0 -0
  124. package/dist/{workspace-ITP6TW2T.js → workspace-IZRFGXXA.js} +2 -2
  125. package/package.json +4 -4
  126. package/dist/chunk-H5BN6X2C.js +0 -4
  127. package/dist/chunk-ONCXGEPI.js +0 -84
  128. package/dist/chunk-PFN33PWX.js +0 -146
  129. package/dist/clean-YDHC674C.js +0 -8
  130. package/dist/close_out-MZOTFVBO.js +0 -8
  131. package/dist/code-SKAKZHS4.js +0 -4
  132. package/dist/config-GNQ3YYF4.js +0 -4
  133. package/dist/hooks-ERENZPT4.js +0 -4
  134. package/dist/hooks_gen-JZ34HP32.js +0 -4
  135. package/dist/infra-PKXRBXU3.js +0 -4
  136. package/dist/init_workspace-OIB57G26.js +0 -4
  137. package/dist/list_workspaces-J7PDPCAS.js +0 -7
  138. package/dist/logs-C5XMF5XB.js +0 -6
  139. package/dist/migrate-SJXCOEVJ.js +0 -8
  140. package/dist/notes-SQIYBTZ5.js +0 -4
  141. package/dist/pause-BYT3XABX.js +0 -4
  142. package/dist/pr-KALXAXRM.js +0 -5
  143. package/dist/proxy_reload-EM4K7A7W.js +0 -6
  144. package/dist/remove-GKQ5MK4J.js +0 -7
  145. package/dist/remove_workspace-B7HWRS75.js +0 -8
  146. package/dist/restart-WBULTJY5.js +0 -8
  147. package/dist/resume-3K3GDEBJ.js +0 -8
  148. package/dist/setup-LFJD4NJE.js +0 -5
  149. package/dist/skills-SYDK662Y.js +0 -4
  150. package/dist/start_args-I2LZACEJ.js +0 -4
  151. package/dist/starting_prompt-MNS7GWS2.js +0 -4
  152. package/dist/stats-GITE6A3I.js +0 -4
  153. package/dist/wait_load-IWWC5UFD.js +0 -4
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{d as v,m as L}from"./chunk-GX24OKSW.js";import"./chunk-YVEZLQTI.js";import"./chunk-TB4F2GWS.js";import"./chunk-PGGYNB7O.js";import"./chunk-JVKKF2TJ.js";import"./chunk-FHKQSAOE.js";import"./chunk-GY37I33L.js";import"./chunk-PFN33PWX.js";import"./chunk-KJ7NGCEB.js";import"./chunk-BQTCRMG7.js";import"./chunk-3EUOTP7I.js";import"./chunk-Q6J4AWTS.js";import"./chunk-GCWDSCKO.js";import"./chunk-N2FE3I4W.js";import"./chunk-3JY3LPRL.js";import"./chunk-ONCXGEPI.js";import"./chunk-NN6Y3JUA.js";import"./chunk-Y57X2CE4.js";import{B as h,C as w,I as b,L as y,Q as k,v as f,w as $}from"./chunk-EKQOI5MT.js";import"./chunk-4DE4JJVU.js";import"./chunk-FAGGMKLP.js";import"./chunk-RPXPE5UJ.js";import"./chunk-4ETPZVPP.js";import{p as d}from"./chunk-FS6BSTZL.js";import"./chunk-PQZGPPAV.js";import"./chunk-A7XCFYRC.js";import"./chunk-SWMXTQML.js";import"./chunk-LPLBVPO5.js";import"./chunk-N7VAKCJU.js";import"./chunk-5RABOZIE.js";import"./chunk-RAPROCIP.js";import{a as c,f as g}from"./chunk-7YB3EVDN.js";g();import N from"node:os";var M=2**30,x=c((r,t)=>Number.isFinite(r)?`${Number(r.toFixed(1))}${t}`:"no limit","limit");async function P(r){let t=await h(),m=w(N.cpus().length),u=$(),l=await k(),n=L(),a=f(y(l,n??[])).map((o,e)=>{let s=u[o.feature]?.workspace,i=s&&d(s)?.services||null,B=s?b(s,i??void 0):null;return{...o,position:e+1,services:i,cost:B}});if(r.json){let o=c(e=>Number.isFinite(e)?e:null,"n");console.log(JSON.stringify({budget:{memory:o(t.memory),cpus:o(t.cpus),preempt:t.preempt},host_load:m,leases:u,waiting:l,running:n?.map(e=>({feature:e.feature,cpus:e.cost.cpus,memory:e.cost.memory,rank:e.rank,busy:e.busy}))??null,waiters:a.map(e=>({feature:e.feature,position:e.position,services:e.services,cpus:e.cost?.cpus??null,memory:e.cost?.memory??null,waited_ms:e.waitedMs,gate:e.gate}))}));return}console.log(`Budget: ${x(t.memory/M," GiB")} memory, ${x(t.cpus," CPUs")}, host load ${m||"unchecked"}, preemption ${t.preempt?"on":"off"}`);let p=Object.entries(u).sort(([,o],[,e])=>o.slot-e.slot);console.log(p.length?"Slots:":"Slots: none held");for(let[o,e]of p)console.log(` ${e.slot} ${o}${e.workspace?` ${e.workspace}`:""}`);console.log(n?n.length?"Running:":"Running: none":"Running: docker unavailable");for(let o of[...n??[]].sort((e,s)=>s.cost.cpus-e.cost.cpus))console.log(` ${v(o)}`);console.log(a.length?"Waiting:":"Waiting: none");for(let o of a){let e=o.services?`${o.services.join(", ")}${o.gate?" for a running feature":""}`:"whole feature",s=o.cost?` (${Number(o.cost.cpus.toFixed(1))} CPUs, ${(o.cost.memory/M).toFixed(1)} GiB)`:"",i=o.waitedMs?` waited ${Math.round(o.waitedMs/6e4)} min${o.position===1&&o.waitedMs>=3e5?", gets the next free room":""}`:"";console.log(` ${o.position}. ${o.feature} ${e}${s}${i}`)}}c(P,"run");export{P as run};
4
- //# sourceMappingURL=budget-25FAUSGU.js.map
3
+ import{d as v,m as L}from"./chunk-QAUMDGFV.js";import"./chunk-HYVTGG46.js";import"./chunk-Q3J4Y4L3.js";import"./chunk-V7XLEEQR.js";import"./chunk-BT4IHMWY.js";import"./chunk-4IPPPESG.js";import"./chunk-BDXOVG2P.js";import"./chunk-43NB32CW.js";import"./chunk-UCDUOBQN.js";import"./chunk-D7VAZYKM.js";import"./chunk-BONAXMSQ.js";import"./chunk-FOPKAREC.js";import"./chunk-BTLZ42CA.js";import"./chunk-HMHASLXQ.js";import"./chunk-FRDFLKK7.js";import"./chunk-MHTQP2PL.js";import"./chunk-LFG2YEGB.js";import"./chunk-JK2TNRWL.js";import{B as h,C as w,I as b,L as y,Q as k,v as f,w as $}from"./chunk-2XHHM4OO.js";import"./chunk-VWXUBTVG.js";import"./chunk-LKR2G7YE.js";import"./chunk-7KJMBC35.js";import"./chunk-ZPJYGVUB.js";import{p as d}from"./chunk-HLH4XPY5.js";import"./chunk-JFOI5VA4.js";import"./chunk-EGIETPC6.js";import"./chunk-SGBX6DMH.js";import"./chunk-XE7DL77M.js";import"./chunk-3GEEXKS7.js";import"./chunk-BE6K7UTS.js";import"./chunk-KQ7VB7P4.js";import{a as c,f as g}from"./chunk-6AGDGUPH.js";g();import N from"node:os";var M=2**30,x=c((r,t)=>Number.isFinite(r)?`${Number(r.toFixed(1))}${t}`:"no limit","limit");async function P(r){let t=await h(),m=w(N.cpus().length),u=$(),l=await k(),n=L(),a=f(y(l,n??[])).map((o,e)=>{let s=u[o.feature]?.workspace,i=s&&d(s)?.services||null,B=s?b(s,i??void 0):null;return{...o,position:e+1,services:i,cost:B}});if(r.json){let o=c(e=>Number.isFinite(e)?e:null,"n");console.log(JSON.stringify({budget:{memory:o(t.memory),cpus:o(t.cpus),preempt:t.preempt},host_load:m,leases:u,waiting:l,running:n?.map(e=>({feature:e.feature,cpus:e.cost.cpus,memory:e.cost.memory,rank:e.rank,busy:e.busy}))??null,waiters:a.map(e=>({feature:e.feature,position:e.position,services:e.services,cpus:e.cost?.cpus??null,memory:e.cost?.memory??null,waited_ms:e.waitedMs,gate:e.gate}))}));return}console.log(`Budget: ${x(t.memory/M," GiB")} memory, ${x(t.cpus," CPUs")}, host load ${m||"unchecked"}, preemption ${t.preempt?"on":"off"}`);let p=Object.entries(u).sort(([,o],[,e])=>o.slot-e.slot);console.log(p.length?"Slots:":"Slots: none held");for(let[o,e]of p)console.log(` ${e.slot} ${o}${e.workspace?` ${e.workspace}`:""}`);console.log(n?n.length?"Running:":"Running: none":"Running: docker unavailable");for(let o of[...n??[]].sort((e,s)=>s.cost.cpus-e.cost.cpus))console.log(` ${v(o)}`);console.log(a.length?"Waiting:":"Waiting: none");for(let o of a){let e=o.services?`${o.services.join(", ")}${o.gate?" for a running feature":""}`:"whole feature",s=o.cost?` (${Number(o.cost.cpus.toFixed(1))} CPUs, ${(o.cost.memory/M).toFixed(1)} GiB)`:"",i=o.waitedMs?` waited ${Math.round(o.waitedMs/6e4)} min${o.position===1&&o.waitedMs>=3e5?", gets the next free room":""}`:"";console.log(` ${o.position}. ${o.feature} ${e}${s}${i}`)}}c(P,"run");export{P as run};
4
+ //# sourceMappingURL=budget-ANASDXXG.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import"./chunk-H5BN6X2C.js";import{d as s}from"./chunk-3EUOTP7I.js";import"./chunk-N2FE3I4W.js";import"./chunk-4DE4JJVU.js";import"./chunk-RPXPE5UJ.js";import"./chunk-N7VAKCJU.js";import{h as e,l as c}from"./chunk-5RABOZIE.js";import"./chunk-RAPROCIP.js";import{a as r,f as i}from"./chunk-7YB3EVDN.js";i();async function u(o){o.action!=="prune"&&(c(`Unknown action \`${String(o.action)}\` \u2014 the only action is \`prune\`.`),process.exit(2));let t=await s({name:typeof o.name=="string"?o.name:void 0,reset:!!o.reset,force:!!o.force,dryRun:!!o.dry_run});t.length||console.log("No caches in the registry.");for(let n of t){let a=n.ok?`${e.GREEN}\u2713${e.RESET}`:`${e.RED}\u2717${e.RESET}`;console.log(`${a} ${n.name} (${n.action}): ${n.detail}`)}t.some(n=>!n.ok)&&process.exit(1)}r(u,"run");export{u as run};
4
- //# sourceMappingURL=cache-IGMYSSBW.js.map
3
+ import"./chunk-AYLBYRLF.js";import{d as s}from"./chunk-D7VAZYKM.js";import"./chunk-HMHASLXQ.js";import"./chunk-VWXUBTVG.js";import"./chunk-7KJMBC35.js";import"./chunk-3GEEXKS7.js";import{h as e,l as c}from"./chunk-BE6K7UTS.js";import"./chunk-KQ7VB7P4.js";import{a as r,f as i}from"./chunk-6AGDGUPH.js";i();async function u(o){o.action!=="prune"&&(c(`Unknown action \`${String(o.action)}\` \u2014 the only action is \`prune\`.`),process.exit(2));let t=await s({name:typeof o.name=="string"?o.name:void 0,reset:!!o.reset,force:!!o.force,dryRun:!!o.dry_run});t.length||console.log("No caches in the registry.");for(let n of t){let a=n.ok?`${e.GREEN}\u2713${e.RESET}`:`${e.RED}\u2717${e.RESET}`;console.log(`${a} ${n.name} (${n.action}): ${n.detail}`)}t.some(n=>!n.ok)&&process.exit(1)}r(u,"run");export{u as run};
4
+ //# sourceMappingURL=cache-752EC73V.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{j as a}from"./chunk-I623AHJB.js";import{m as n}from"./chunk-5RABOZIE.js";import{b as m}from"./chunk-RAPROCIP.js";import{a as s,f as p}from"./chunk-7YB3EVDN.js";p();import*as f from"node:fs";import*as o from"node:path";function c(i){let t=o.resolve(i??"."),r=t;for(;!f.existsSync(o.join(m(r),"workspace.yml"));){let e=o.dirname(r);e===r&&(n(`No .werkmeister/workspace.yml found from ${t}`),process.exit(1)),r=e}return r}s(c,"findWorkspaceDir");function h(i){let t=c(i.start),r=a(t).starting_prompt;(typeof r!="string"||!r.trim())&&(n(`${t} has no starting_prompt`),process.exit(2)),console.log(r.trim())}s(h,"run");export{c as a,h as b};
4
- //# sourceMappingURL=chunk-M6MBSXNM.js.map
3
+ import{j as a}from"./chunk-QDBTTMAK.js";import{m as n}from"./chunk-BE6K7UTS.js";import{b as m}from"./chunk-KQ7VB7P4.js";import{a as s,f as p}from"./chunk-6AGDGUPH.js";p();import*as f from"node:fs";import*as o from"node:path";function c(i){let t=o.resolve(i??"."),r=t;for(;!f.existsSync(o.join(m(r),"workspace.yml"));){let e=o.dirname(r);e===r&&(n(`No .werkmeister/workspace.yml found from ${t}`),process.exit(1)),r=e}return r}s(c,"findWorkspaceDir");function h(i){let t=c(i.start),r=a(t).starting_prompt;(typeof r!="string"||!r.trim())&&(n(`${t} has no starting_prompt`),process.exit(2)),console.log(r.trim())}s(h,"run");export{c as a,h as b};
4
+ //# sourceMappingURL=chunk-2TR76OHW.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{c as v,d as q,i as ut}from"./chunk-4DE4JJVU.js";import{a as T,c as Q}from"./chunk-FAGGMKLP.js";import{l as j,m as _,n as It}from"./chunk-RPXPE5UJ.js";import{k as Ft,l as Rt,p as X,r as Z,s as ct}from"./chunk-FS6BSTZL.js";import{d as Ct,e as jt,m as Mt}from"./chunk-A7XCFYRC.js";import{n as z}from"./chunk-LPLBVPO5.js";import{b as C}from"./chunk-N7VAKCJU.js";import{D as At,F as Nt,H as Tt,M as it,Q as at,a as Et,h as B,j as y,k as h,l as m,m as b,n as k,o as Ot,s as _t,w as Lt}from"./chunk-5RABOZIE.js";import{b as V}from"./chunk-RAPROCIP.js";import{a as i,e as vt,f as w}from"./chunk-7YB3EVDN.js";w();import*as A from"node:fs";import*as we from"node:os";import*as ye from"node:path";w();var tt=vt(Et(),1);import*as L from"node:fs";import*as Pt from"node:os";import*as Dt from"node:path";function lt(t){let e=et(t);return e===null?null:Q(e)}i(lt,"composeFile");function et(t){let e=Ee(t);if(e!==null&&Q(e)!==null)return e;let o;try{o=Tt(t)}catch{return e}return Q(o)!==null&&ve(o,t)?o:e}i(et,"workspaceForFeature");function ve(t,e){let o;try{o=L.readFileSync(Dt.join(t,".env"),"utf8")}catch{return!1}return o.split(`
3
+ import{c as v,d as q,i as ut}from"./chunk-VWXUBTVG.js";import{a as T,c as Q}from"./chunk-LKR2G7YE.js";import{l as j,m as _,n as It}from"./chunk-7KJMBC35.js";import{k as Ft,l as Rt,p as X,r as Z,s as ct}from"./chunk-HLH4XPY5.js";import{d as Ct,e as jt,m as Mt}from"./chunk-EGIETPC6.js";import{n as z}from"./chunk-XE7DL77M.js";import{b as C}from"./chunk-3GEEXKS7.js";import{D as At,F as Nt,H as Tt,M as it,Q as at,a as Et,h as B,j as y,k as h,l as m,m as b,n as k,o as Ot,s as _t,w as Lt}from"./chunk-BE6K7UTS.js";import{b as V}from"./chunk-KQ7VB7P4.js";import{a as i,e as vt,f as w}from"./chunk-6AGDGUPH.js";w();import*as A from"node:fs";import*as we from"node:os";import*as ye from"node:path";w();var tt=vt(Et(),1);import*as L from"node:fs";import*as Pt from"node:os";import*as Dt from"node:path";function lt(t){let e=et(t);return e===null?null:Q(e)}i(lt,"composeFile");function et(t){let e=Ee(t);if(e!==null&&Q(e)!==null)return e;let o;try{o=Tt(t)}catch{return e}return Q(o)!==null&&ve(o,t)?o:e}i(et,"workspaceForFeature");function ve(t,e){let o;try{o=L.readFileSync(Dt.join(t,".env"),"utf8")}catch{return!1}return o.split(`
4
4
  `).some(r=>{let n=/^\s*(?:WERKMEISTER_)?FEATURE=(.*)$/.exec(r);return n!==null&&n[1].trim()===e})}i(ve,"envNamesFeature");function ft(t){try{return L.statSync(t).isFile()}catch{return!1}}i(ft,"isFile");function Ee(t){for(let e of[pt,dt]){let o;try{o=_(["docker","ps","-a","--filter",`label=${e}=${t}`,"--format",'{{.Label "com.docker.compose.project.working_dir"}}'],{capture:!0,timeout:M})}catch(n){if(n instanceof j)return null;throw n}if(o.status!==0)return null;let r=o.stdout.split(`
5
5
  `).map(n=>n.trim()).find(Boolean);if(r)return r}return null}i(Ee,"workspaceFromContainerLabel");function Oe(t,e,o){return["docker","compose",...o?["-f",o]:[],"-p",Bt(t,o),...e]}i(Oe,"workspaceComposeArgv");function Ut(t){return`werkmeister-${t}`}i(Ut,"projectName");function Wt(t){return`sandbox-${t}`}i(Wt,"legacyProjectName");async function Y(t){let e=Wt(t);return(await q(e))?.length?e:Ut(t)}i(Y,"liveProject");function Bt(t,e){try{let o=e&&(0,tt.parse)(L.readFileSync(e,"utf8"));if(o&&typeof o.name=="string")return o.name}catch{}return Ut(t)}i(Bt,"fileProject");function _e(t,e,{removeVolumes:o=!1}={}){let r=Wt(t);Bt(t,e)!==r&&Le(r,`'${t}''s pre-rename project`,{removeVolumes:o})}i(_e,"retireLegacyProject");function Le(t,e,{removeVolumes:o=!1}={}){let r=`label=com.docker.compose.project=${t}`;try{let n=[["docker","ps","-aq","--filter",r]];if(o&&n.push(["docker","volume","ls","-q","--filter",r]),!n.some(c=>_(c,{capture:!0,timeout:M}).stdout.trim()))return;y(`Taking down ${e} ${t}`);let s=["down","--remove-orphans",...o?["--volumes"]:[]],a=_(["docker","compose","-p",t,...s],{capture:!0,cwd:Pt.tmpdir(),timeout:M});a.status!==0&&m(`Could not take down ${t}: ${a.stderr.trim()}`)}catch(n){m(`Could not take down ${t}: ${n instanceof Error?n.message:String(n)}`)}}i(Le,"takeDownProject");var M=300,Ht=Number(process.env.WERKMEISTER_UP_TIMEOUT_S||20*60);function Yt(t,e,{capture:o=!1,stream:r=!1,composePath:n=null}={}){let s=Gt(t,e,n);if(s===null)return null;try{return r?(_(s,{stdio:"inherit"}),null):Kt(_(s,{capture:o,timeout:M}),o)}catch(a){return Jt(a,M)}}i(Yt,"runCompose");async function mt(t,e,{capture:o=!1,composePath:r=null,signal:n,timeout:s=M}={}){let a=Gt(t,e,r);if(a===null)return null;try{return Kt(await It(a,{capture:o,timeout:s,signal:n}),o)}catch(c){return Jt(c,s)}}i(mt,"runComposeAsync");function Gt(t,e,o){if(o??=lt(t),o===null||!ft(o))return b(`No ${T} found for feature '${t}'.
6
6
  Run 'werkmeister workspace init' (and 'werkmeister feature up') from the feature's workspace first.`),null;e.includes("up")&&Ae(o),(e.includes("up")||e.includes("down"))&&_e(t,o,{removeVolumes:e.includes("--volumes")});let r=Oe(t,e,o);return y(`Running: ${r.join(" ")}`),r}i(Gt,"composeCommand");function Ae(t){try{let e=(0,tt.parse)(L.readFileSync(t,"utf8")),o=Object.entries(e?.volumes??{}).filter(([,r])=>r?.external===!0).map(([r,n])=>n?.name??r);for(let r of o){let n=_(["docker","volume","create",r],{capture:!0});n.status!==0&&m(`Could not create shared volume '${r}': ${n.stderr.trim()}`)}}catch(e){m(`Could not create shared volumes: ${e instanceof Error?e.message:String(e)}`)}}i(Ae,"ensureSharedVolumes");function Kt(t,e){if(t.status!==0){let o=e?t.stderr:"";b(`docker compose failed (exit ${t.status})`),o&&k(`${B.DIM}${o.trim()}${B.RESET}
@@ -10,4 +10,4 @@ import{c as v,d as q,i as ut}from"./chunk-4DE4JJVU.js";import{a as T,c as Q}from
10
10
  `)));return{stop:i(()=>r.abort(),"stop"),done:n}}i(_o,"composeLogsStream");async function Lo(t){return(await q(await Y(t))??[]).map(o=>({name:o.name,status:o.state,health:o.health,ports:o.ports,service:o.service,role:F(o.labels,"role"),exitCode:o.exitCode}))}i(Lo,"getContainerStatus");function Ce(t,e){return e==="setup"||t.endsWith("-setup")}i(Ce,"isOneShotService");w();import*as p from"node:fs";import*as zt from"node:os";import*as yt from"node:path";import{setTimeout as je}from"node:timers/promises";var Me=i(()=>yt.join(V(zt.homedir()),"locks"),"lockDir"),Fe=.1;function Re(t){let e;try{e=Number.parseInt(p.readFileSync(t,"utf8").trim(),10)}catch{return!1}if(!Number.isInteger(e)||e<=0)return!0;try{return process.kill(e,0),!1}catch(o){return o.code==="ESRCH"}}i(Re,"holderIsDead");function Ie(t){try{let e=p.openSync(t,"wx");return p.writeSync(e,String(process.pid)),p.closeSync(e),!0}catch(e){if(e.code==="EEXIST"){if(Re(t))try{p.unlinkSync(t)}catch{}return!1}throw e}}i(Ie,"tryAcquire");async function g(t,e,{timeout:o}={}){let r=Me();p.mkdirSync(r,{recursive:!0});let n=yt.join(r,`${t}.lock`),s=o!==void 0?performance.now()+o*1e3:null;for(;!Ie(n);){if(s!==null&&performance.now()>=s)throw new Error(`Timed out after ${o}s waiting for lock '${t}' (${n}). The previous holder may have crashed without releasing it; if no werkmeister process is running, it is safe to delete this file and retry.`);await je(Fe*1e3)}try{return await e()}finally{try{p.unlinkSync(n)}catch{}}}i(g,"sandboxLock");w();var Pe={"":1,b:1,k:1024,m:1048576,g:1073741824,t:1099511627776};function ht(t){if(typeof t=="number")return t;let e=/^\s*(\d+(?:\.\d+)?)\s*([bkmgt]?)b?\s*$/i.exec(t);if(!e)throw new Error(`Not a size: '${t}'`);return Math.round(Number(e[1])*(Pe[e[2].toLowerCase()]??1))}i(ht,"parseSize");var Xt=["idle","human-check","working"];function De(t){return[...t.filter(e=>e.gate),...t.filter(e=>!e.gate)]}i(De,"queueOrder");function Zt(t,e,o,r){if(!r.services&&e.some(f=>f.feature===r.feature))return{kind:"admit"};if(r.cost.memory>t.memory||r.cost.cpus>t.cpus)return{kind:"never-fits",cost:r.cost};let n=e.reduce((f,J)=>({memory:f.memory+J.cost.memory,cpus:f.cpus+J.cost.cpus}),{memory:0,cpus:0}),s=i(f=>n.memory-f.memory+r.cost.memory<=t.memory&&n.cpus-f.cpus+r.cost.cpus<=t.cpus,"fits"),a=!!r.gate||!!r.services&&e.some(f=>f.feature===r.feature),c=o.find(f=>f.feature===r.feature),u={feature:r.feature,waitedMs:c?.waitedMs??0,gate:a},l=De(c?o.map(f=>f===c?u:f):[...o,u]),d=l.indexOf(u)+1,N=d===1,O=!!r.services&&e.some(f=>f.feature===r.feature&&f.busy),D=l[0].cost,$e=!!D&&n.memory+D.memory<=t.memory&&n.cpus+D.cpus<=t.cpus,xe=!N&&!O&&!$e&&!l[0].parked&&(l[0].gate||l[0].waitedMs>=3e5);if(s({memory:0,cpus:0})&&(r.byPerson||!xe))return{kind:"admit"};let ke=N&&(!!r.services||u.waitedMs>=3e5);if(t.preempt&&(r.byPerson||ke)){let J=(r.byPerson?Xt:Xt.slice(0,2)).flatMap(U=>e.filter(W=>W.rank===U&&!W.busy&&W.feature!==r.feature&&(W.cost.memory||W.cost.cpus))),kt=[],st={memory:0,cpus:0};for(let U of J)if(kt.push(U.feature),st.memory+=U.cost.memory,st.cpus+=U.cost.cpus,s(st))return{kind:"preempt",victims:kt}}return{kind:"wait",position:d}}i(Zt,"admit");function qt(t,e,o,r){for(let[n,s]of e)if(s===t)return n;if(r!==null&&r>=1&&r<=o&&!e.has(r))return r;for(let n=1;n<=o;n++)if(!e.has(n))return n;return null}i(qt,"pickSlot");w();w();var ee=vt(Et(),1);import{execFileSync as Ue}from"node:child_process";import{createHash as We}from"node:crypto";import*as $ from"node:fs";import*as te from"node:net";import*as E from"node:os";import*as S from"node:path";import{setTimeout as Be}from"node:timers/promises";var rt=30,oe=i(()=>S.join(Lt(),"scheduler"),"stateDir"),re=i(()=>S.join(oe(),"leases.json"),"leasesPath"),ne=i(()=>S.join(oe(),"queue.json"),"queuePath");function se(t,e,o){try{let r=JSON.parse($.readFileSync(t,"utf8"));return e(r)?r:o}catch{return o}}i(se,"readJson");function ie(t,e){$.mkdirSync(S.dirname(t),{recursive:!0}),Rt(t,e)}i(ie,"writeJson");var x=i(t=>typeof t=="object"&&t!==null&&!Array.isArray(t),"isDict");function I(){let t=se(re(),x,{}),e={};for(let[o,r]of Object.entries(t))x(r)&&Number.isInteger(r.slot)&&(e[o]={slot:r.slot,workspace:String(r.workspace??"")});return e}i(I,"readLeases");function gt(t){ie(re(),t)}i(gt,"writeLeases");function P(){return se(ne(),t=>Array.isArray(t),[]).map(String)}i(P,"readQueue");function nt(t){ie(ne(),t)}i(nt,"writeQueue");function ae(t){return g("scheduler",async()=>nt(P().filter(e=>e!==t)),{timeout:rt})}i(ae,"dequeue");function Zo(t,e){return g("scheduler",async()=>{let o=P().filter(r=>r!==t);Z(e,{position:o.length+1,reason:"preempted",since:new Date().toISOString()}),nt([...o,t])},{timeout:rt})}i(Zo,"enqueue");function qo(t,e,o){return g("scheduler",async()=>(Z(e,{position:1,reason:"waiting for capacity",...o,since:new Date().toISOString()}),nt([t,...P().filter(r=>r!==t)]),1),{timeout:rt})}i(qo,"requeueFirst");async function tr(t=()=>v().info()){let e=z().budget,o=x(e)?e:{},r={};if(o.memory===void 0||o.cpus===void 0)try{r=await t()}catch{}let n=o.memory!==void 0?ht(o.memory):r.MemTotal?r.MemTotal-2**30:1/0,s=o.cpus!==void 0?Number(o.cpus):r.NCPU??1/0;return{memory:n,cpus:s,preempt:o.preempt!==!1}}i(tr,"loadBudget");function ce(t){let e=z().budget,o=x(e)?Number(e.host_load??Number.NaN):Number.NaN;return Number.isFinite(o)&&o>=0?o:2*t}i(ce,"hostLoadLimit");function He(){let t=z().budget,e=x(t)?Number(t.free_memory??Number.NaN):Number.NaN;return Number.isFinite(e)&&e>=0?e:15}i(He,"freeMemoryLimit");function ue(t=process.platform){let e=E.totalmem();if(t!=="darwin")return{free:E.freemem(),total:e};let o=Number(Ue("sysctl",["-n","kern.memorystatus_level"],{encoding:"utf8"}));return{free:e*o/100,total:e}}i(ue,"readHostMemory");function le(t=ue){let e=He();if(e===0)return"";let o;try{let{free:r,total:n}=t();o=100*r/n}catch{return""}return Number.isFinite(o)&&o<e?`${o.toFixed(0)}% free, under budget.free_memory ${e}%`:""}i(le,"lowMemory");var St=15e3,R=9e4,Ye=6e4,Ge=i(()=>({load:E.loadavg(),cores:E.availableParallelism()}),"readHostLoad"),fe={hostLoad:Ge,hostMemory:ue,sleep:i(t=>Be(t),"sleep")},ot=i(t=>Number((t/6e4).toFixed(1)),"minutes");async function Ke(t=fe,e=process.platform,o="with-temp-home; --no-wait skips"){if(_t("NO_WAIT"))return"";let r=i(()=>{let{load:c,cores:u}=t.hostLoad(),l=e==="darwin"?0:ce(u);return{load:c[0],limit:l,loadOver:l!==0&&c[0]>l,memory:le(t.hostMemory)}},"read"),n=r();if(!n.loadOver&&!n.memory)return"";let s=[n.loadOver&&"host load",n.memory&&"free memory"].filter(Boolean).join(" and ");y(`waiting up to ${ot(R)} min for ${[n.loadOver&&`host load ${n.load.toFixed(1)} to fall to ${n.limit} (budget.host_load)`,n.memory&&`free memory to rise (${n.memory})`].filter(Boolean).join(" and ")} before ${o}`);let a=i(()=>[n.loadOver&&`host load ${n.load.toFixed(1)} over ${n.limit}`,n.memory&&`low memory (${n.memory})`].filter(Boolean).join(", "),"state");for(let c=St;c<=R;c+=St){if(await t.sleep(St),n=r(),!n.loadOver&&!n.memory)return`waited ${c/1e3} s for ${s}`;c%Ye===0&&c<R&&y(`still waiting: ${a()}, ${c/1e3} s so far, up to ${ot(R-c)} min left`)}return`ran with ${a()}; the ${ot(R)} min host-load wait is spent`}i(Ke,"waitForHostLoadNow");async function er(t,e,o=fe,r=process.platform){let n=Object.entries(G(t)).filter(([O,D])=>e?e.includes(O):!D?.profiles).filter(([,O])=>O?.labels?.["com.werkmeister.role"]==="setup").map(([O])=>O);if(!n.length)return;let s=n.join(", "),a=await Ke(o,r,`starting ${s}; WERKMEISTER_NO_WAIT=1 skips`);if(!a.startsWith("ran with"))return;let{load:c,cores:u}=o.hostLoad(),l=ce(u),d=le(o.hostMemory),N=[r!=="darwin"&&l!==0&&c[0]>l&&`host load ${c[0].toFixed(1)} is over ${l} (budget.host_load)`,d&&`memory is low (${d})`].filter(Boolean).join(" and ");throw new C(`${N||a} after the ${ot(R)} min wait; ${s} not started. Retry when load falls or memory frees, or set WERKMEISTER_NO_WAIT=1 to start anyway.`,"HOST_LOAD")}i(er,"waitForSetupLoad");function G(t,e=S.join(t,T)){try{let o=ee.parse($.readFileSync(e,"utf8"));return x(o?.services)?o.services:{}}catch{return{}}}i(G,"composeServices");function bt(t,e){let o={memory:0,cpus:0};for(let[r,n]of Object.entries(G(t))){if(!x(n)||(e?!e.includes(r):n.profiles))continue;let s=n.deploy?.resources,a=s?.reservations?.memory;a!==void 0&&(o.memory+=ht(a)),o.cpus+=Number(s?.limits?.cpus??0)||0}return o}i(bt,"featureCost");var me=i(t=>{let e=t?.depends_on;return Array.isArray(e)?e.map(String):x(e)?Object.keys(e):[]},"dependsOn");function or(t,e){return[e,...me(G(t)[e])]}i(or,"serviceStarts");async function rr(t,e){let o=G(S.dirname(t),t),r=me(o[e]);if(!r.length||!r.every(n=>Je(o[n])))return!1;for(let n of r){let s=o[n]?.container_name,a=s?await v().getContainer(String(s)).inspect().then(c=>c.State,()=>null):null;if(a?.Status!=="exited"||a.ExitCode!==0)return!1}return!0}i(rr,"setupsCurrent");function Je(t){if(t?.labels?.["com.werkmeister.role"]!=="setup")return!1;let e=/^node:(\d+)/.exec(String(t.image??""))?.[1],o=(t.volumes??[]).map(String).find(a=>a.endsWith(":/app"));if(!e||!o)return!1;let r=o.slice(0,-5),n=Buffer.concat(["package-lock.json","pnpm-lock.yaml"].flatMap(a=>{try{return[$.readFileSync(S.join(r,a))]}catch{return[]}})),s=`${We("sha256").update(n).digest("hex")} v${e}`;try{return $.readFileSync(S.join(r,".turbo/.werkmeister-install-hash"),"utf8").trim()===s}catch{return!1}}i(Je,"installStamped");var Qe=6e4;function Ve(t){let e=I();return t.filter(o=>{let r=e[o]?.workspace,n=r?X(r):null;if(!r||!n?.services||n.parked)return!0;let s=$.statSync(Ft(r),{throwIfNoEntry:!1})?.mtimeMs??0;return Date.now()-s<Qe?!0:(ct(r),!1)})}i(Ve,"withoutDeadWaiters");function ze(t,e,o=Date.now()){let r=I();return t.map(n=>{let s=r[n]?.workspace,a=s?X(s):null,c=a?.since?Date.parse(a.since):Number.NaN;return s&&a?.parked?{feature:n,waitedMs:Number.isFinite(c)?Math.max(0,o-c):0,gate:!1,parked:!0,cost:bt(s,a.services)}:{feature:n,waitedMs:Number.isFinite(c)?Math.max(0,o-c):0,gate:!!a?.gate||!!a?.services&&e.some(u=>u.feature===n),...s&&!a?.services&&{cost:bt(s)}}})}i(ze,"waiters");function nr(t,e,o,r,n,s){let a=bt(e,s?.services);return!a.memory&&!a.cpus?Promise.resolve({kind:"admit"}):g("scheduler",async()=>{let c=P(),u=Ve(c),l=Zt(n,r,ze(u,r),{feature:t,cost:a,byPerson:o,services:s?.services,...s?.gate&&{gate:!0}}),d=u;return l.kind==="wait"?(Z(e,{position:l.position,reason:"waiting for capacity",...s,since:X(e)?.since??new Date().toISOString()}),u.includes(t)||(d=[...u,t])):(d=u.filter(N=>N!==t),ct(e)),d.join(`
11
11
  `)!==c.join(`
12
12
  `)&&nt(d),l},{timeout:rt})}i(nr,"requestAdmission");function Xe(t,e){let o=[];for(let[r,n]of Object.entries(G(t)))if(!(!x(n)||(e?!e.includes(r):n.profiles)))for(let s of n.ports??[]){let a=Number.parseInt(String(s).split(":").slice(-2)[0]??"",10);Number.isInteger(a)&&o.push(a)}return o}i(Xe,"publishedPorts");function Ze(t){return new Promise(e=>{let o=te.createServer();o.once("error",r=>e(r.code==="EADDRINUSE")),o.listen(t,"0.0.0.0",()=>o.close(()=>e(!1)))})}i(Ze,"bound");async function sr(t,e,o){let r=new Map;try{for(let s of await v().listContainers()){let a=(s.Names[0]??"").replace(/^\//,""),c=s.Labels?.["com.werkmeister.feature"]??"";for(let u of s.Ports??[])u.PublicPort&&r.set(u.PublicPort,{name:a,feature:c})}}catch{}let n=[];for(let s of Xe(e,o)){let a=r.get(s);a?.feature!==t&&(a||await Ze(s))&&n.push({port:s,holder:a?.name??"a host process"})}return n}i(sr,"portHolders");var de=!1,pe=!1;function mr(){de=!0}i(mr,"ownScheduler");async function K(t,e,o,r){if(de||!Ct())return o();try{let{data:n,text:s}=await Mt("scheduler",{op:t,...e},{timeoutMs:r});return s&&k(s),n.value}catch(n){if(!(n instanceof jt))throw n;return pe||m(`${n.message} Scheduling in this process instead.`),pe=!0,o()}}i(K,"schedulerOp");function pr(){return K("queue",{},async()=>P())}i(pr,"waitingQueue");var he="com.werkmeister",pt=`${he}.feature`,Se="com.sandbox.local",dt=`${Se}.feature`;function F(t,e){return t?.[`${he}.${e}`]??t?.[`${Se}.${e}`]??""}i(F,"labelOf");var $t=30,qe=1e4;async function to(){let t;try{let e=await Promise.all([pt,dt].map(r=>v().listContainers({all:!0,filters:{label:[r]},abortSignal:AbortSignal.timeout(qe)}))),o=new Set;t=e.flat().filter(r=>!o.has(r.Names[0])&&o.add(r.Names[0]))}catch{return null}return t.map(e=>({name:(e.Names[0]??"").replace(/^\//,""),feature:F(e.Labels,"feature"),slot:F(e.Labels,"slot"),service:F(e.Labels,"service")}))}i(to,"queryLabeledContainers");function eo(){let t=at().feature_slots;return(typeof t=="object"&&t!==null&&!Array.isArray(t)?t.count:void 0)??12}i(eo,"slotCount");function oo(){let t=it();if(typeof t!="object"||t===null)return new Set;let e=new Set;for(let[o,r]of Object.entries(t))typeof r=="object"&&r!==null&&!Array.isArray(r)&&r.port_offset!==null&&r.port_offset!==void 0&&e.add(o);return e}i(oo,"routableServiceNames");async function xt(){let t=await to();if(t===null)return null;let e=oo(),o={};for(let r of t){let n=r.feature,s=Number.parseInt(r.slot,10);if(Number.isNaN(s)){m(`Container '${r.name}' has unparseable slot label: '${r.slot}'`);continue}let a=r.service,c=o[n];c||(c={slot:s,services:[]},o[n]=c),c.slot!==s&&(m(`Feature '${n}' has inconsistent slot labels across containers (saw ${c.slot} and ${s}) -- using ${s}`),c.slot=s),a&&e.has(a)&&!c.services.includes(a)&&c.services.push(a)}return o}i(xt,"getAllSlotsFromDocker");var be={labels:xt};function ro(t){let e=I();for(let[r,n]of Object.entries(e))n.workspace&&!A.existsSync(n.workspace)&&delete e[r];for(let[r,n]of Object.entries(t??{}))e[r]??={slot:n.slot,workspace:et(r)??""};let o=new Map;for(let[r,n]of Object.entries(e))o.set(n.slot,r);for(let[r,n]of Object.entries(t??{})){let s=o.get(n.slot);s&&s!==r&&m(`Slot ${n.slot} is leased to '${s}' but '${r}' has containers on it`),o.set(n.slot,r)}return{leases:e,held:o}}i(ro,"heldSlots");function no(t,e,o,r=be){return K("allocate",{feature:t,preferredSlot:e??null,workspace:o??null},()=>so(t,e,o,r))}i(no,"allocateSlot");function so(t,e,o,r){let n=eo();return g("allocate",async()=>{let{leases:s,held:a}=ro(await r.labels()),c=qt(t,a,n,e??null);if(c===null)throw b(`All ${n} feature slots are occupied!`),new Error("No available slots. Stop an existing feature with 'werkmeister feature down <feature>' first.");return s[t]?.slot!==c&&h(`Allocated slot ${c} for '${t}'`),s[t]={slot:c,workspace:o??s[t]?.workspace??et(t)??""},gt(s),c},{timeout:$t})}i(so,"allocateSlotHere");async function Or(t,e,o,r=be){let n=await r.labels(),s=await io(t);if(!s)try{return await no(t,o,e,r)}catch(c){throw new C(c instanceof Error?c.message:String(c),"SLOT_ALLOC")}let a=Object.entries(n??{}).find(([c,u])=>c!==t&&u.slot===s.slot);if(a){let[c]=a;throw new C(`Slot ${s.slot} is leased to '${t}' but '${c}' has containers on it \u2014 stop it or run 'werkmeister feature down ${c}'`,"SLOT_ALLOC")}return s.slot}i(Or,"requireLeasedSlot");function io(t){return K("lease",{feature:t},()=>g("allocate",()=>I()[t]??null,{timeout:$t}))}i(io,"slotLease");function _r(t){return K("release",{feature:t},()=>ao(t))}i(_r,"releaseSlot");async function ao(t){await g("allocate",()=>{let e=I();t in e&&(delete e[t],gt(e))},{timeout:$t}),await ae(t)}i(ao,"releaseSlotHere");async function wt(t){let e=(await ge())[t];return e?e.slot:null}i(wt,"getSlot");async function ge(){let t=await xt();return t===null?{}:t}i(ge,"getAllSlots");function co(t){return Nt(t,at())}i(co,"getPortRange");function uo(t,e){let[o]=co(t);return o+e}i(uo,"getServicePort");function lo(t,e,o,r){let n=e.type??"unknown";if(o.includes(t)){let c=e.port_offset??0;return{service:t,source:"local",endpoint:`localhost:${uo(r,c)}`,type:n}}let s=At(t,e);if(s)return{service:t,source:"baseline",endpoint:`${s.host}:${s.port}`,type:n};let a=e.k8s_forward_port;return a?{service:t,source:"k8s",endpoint:`localhost:${a}`,type:n}:{service:t,source:"none",endpoint:null,type:n}}i(lo,"classifyEndpoint");async function Lr(t){let e=await wt(t);if(e===null)throw new C(`Feature '${t}' is not running (no slot allocated)`,"NOT_RUNNING");let o=(await ge())[t]?.services??[],r=it(),n=[];for(let s of Object.keys(r).sort()){let a=r[s]??{};typeof a!="object"||a===null||Array.isArray(a)||n.push(lo(s,a,o,e))}return{feature:t,slot:e,endpoints:n}}i(Lr,"featureServices");async function Ar(){let t=ye.join(V(we.homedir()),"slots.json");if(!A.existsSync(t))return;let e;try{let n=JSON.parse(A.readFileSync(t,"utf8"));e=typeof n=="object"&&n!==null?n:{}}catch{e={}}let o=await xt()??{},r=Object.keys(e).filter(n=>typeof e[n]=="object"&&e[n]!==null&&!Array.isArray(e[n])&&!(n in o));r.length>0&&(m(`~/.werkmeister/slots.json had features with no labeled containers: ${r.join(", ")}`),m("These are now forgotten \u2014 restart them with 'werkmeister feature up' to re-register.")),y("Migrating: removing legacy ~/.werkmeister/slots.json (labels are now authoritative)");try{A.unlinkSync(t)}catch(n){m(`Could not remove ${t}: ${n}`)}}i(Ar,"migrateSlotsJson");export{et as a,Oe as b,Ut as c,Y as d,_e as e,Le as f,Ae as g,bo as h,go as i,$o as j,xo as k,ko as l,vo as m,Eo as n,Vt as o,Te as p,Oo as q,_o as r,Lo as s,Ce as t,g as u,De as v,I as w,P as x,ae as y,Zo as z,qo as A,tr as B,ce as C,ue as D,le as E,Ge as F,Ke as G,er as H,bt as I,or as J,rr as K,ze as L,nr as M,sr as N,mr as O,K as P,pr as Q,he as R,pt as S,Se as T,dt as U,F as V,eo as W,xt as X,no as Y,Or as Z,io as _,_r as $,wt as aa,ge as ba,co as ca,uo as da,lo as ea,Lr as fa,Ar as ga};
13
- //# sourceMappingURL=chunk-EKQOI5MT.js.map
13
+ //# sourceMappingURL=chunk-2XHHM4OO.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as s}from"./chunk-M2BGN6KP.js";import{a as e,e as o,f as i}from"./chunk-7YB3EVDN.js";i();var r=o(s(),1);function p(n){if(n)try{return r.default.parse(n).type}catch{let t=(n.split(";",1)[0]??"").trim().toLowerCase();return t===""||n.slice(t.length).includes(",")?void 0:t}}e(p,"mediaTypeEssence");function u(n){return n==="application/json"?!0:p(n)==="application/json"}e(u,"isJsonContentType");export{p as a,u as b};
4
- //# sourceMappingURL=chunk-2GTJQHCP.js.map
3
+ import{a as s}from"./chunk-ZCCOMXDB.js";import{a as e,e as o,f as i}from"./chunk-6AGDGUPH.js";i();var r=o(s(),1);function p(n){if(n)try{return r.default.parse(n).type}catch{let t=(n.split(";",1)[0]??"").trim().toLowerCase();return t===""||n.slice(t.length).includes(",")?void 0:t}}e(p,"mediaTypeEssence");function u(n){return n==="application/json"?!0:p(n)==="application/json"}e(u,"isJsonContentType");export{p as a,u as b};
4
+ //# sourceMappingURL=chunk-34OZHSVY.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as N}from"./chunk-Y57X2CE4.js";import{a as O,aa as R,da as C}from"./chunk-EKQOI5MT.js";import{l as h,m as b,n as T}from"./chunk-RPXPE5UJ.js";import{b as u}from"./chunk-N7VAKCJU.js";import{M as x,N as S,j as m,l as y,t as E}from"./chunk-5RABOZIE.js";import{a as s,f as k}from"./chunk-7YB3EVDN.js";k();import*as f from"node:fs";import*as L from"node:net";import*as w from"node:path";var A=[2,30,0],W="telepresenceio/telepresence/telepresence-oss",J="curl -fL https://github.com/telepresenceio/telepresence/releases/latest/download/telepresence-darwin-arm64 -o /opt/homebrew/bin/telepresence && chmod +x /opt/homebrew/bin/telepresence",g=`Install Telepresence OSS >= ${A.join(".")} with \`brew install ${W}\`, or by direct release download: ${J}`;function F(e){for(let t of(process.env.PATH??"").split(w.delimiter)){if(!t)continue;let n=w.join(t,e);try{if(f.accessSync(n,f.constants.X_OK),f.statSync(n).isFile())return n}catch{}}return null}s(F,"which");function D(e,t=120){let n;try{n=b(e,{capture:!0,timeout:t})}catch(r){if(r instanceof h&&r.code==="ENOENT")return[127,`${e[0]}: command not found`];if(r instanceof h&&r.code==="ETIMEDOUT")return[124,`${e.join(" ")}: timed out after ${t}s`];throw r}return[n.status,((n.stdout||"")+(n.stderr||"")).trim()]}s(D,"_run");async function d(e,t,n=120){let r;try{r=await T(e,{capture:!0,timeout:n,signal:t})}catch(o){if(o instanceof h&&o.code==="ENOENT")return[127,`${e[0]}: command not found`];if(o instanceof h&&o.code==="ETIMEDOUT")return[124,`${e.join(" ")}: timed out after ${n}s`];throw o}return[r.status,((r.stdout||"")+(r.stderr||"")).trim()]}s(d,"runAsyncRunner");function X(e,t=1e3){return new Promise(n=>{let r=new L.Socket,o=!1,i=s(c=>{o||(o=!0,r.destroy(),n(c))},"finish");r.setTimeout(t),r.once("connect",()=>i(!0)),r.once("timeout",()=>i(!1)),r.once("error",()=>i(!1)),r.connect(e,"localhost")})}s(X,"portOpen");function G(e){let t=/v(\d+)\.(\d+)\.(\d+)/.exec(e);return t?[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10)]:null}s(G,"parseVersion");function z(e,t){for(let n=0;n<3;n++)if(e[n]!==t[n])return e[n]<t[n];return!1}s(z,"versionLt");async function Q(e=t=>d(t)){if(F("telepresence")===null)return`telepresence not found on PATH. ${g}`;let[t,n]=await e(["telepresence","version"]),r=G(n);if(t!==0||r===null)return`could not determine telepresence version (${n?n.split(`
3
+ import{a as N}from"./chunk-JK2TNRWL.js";import{a as O,aa as R,da as C}from"./chunk-2XHHM4OO.js";import{l as h,m as b,n as T}from"./chunk-7KJMBC35.js";import{b as u}from"./chunk-3GEEXKS7.js";import{M as x,N as S,j as m,l as y,t as E}from"./chunk-BE6K7UTS.js";import{a as s,f as k}from"./chunk-6AGDGUPH.js";k();import*as f from"node:fs";import*as L from"node:net";import*as w from"node:path";var A=[2,30,0],W="telepresenceio/telepresence/telepresence-oss",J="curl -fL https://github.com/telepresenceio/telepresence/releases/latest/download/telepresence-darwin-arm64 -o /opt/homebrew/bin/telepresence && chmod +x /opt/homebrew/bin/telepresence",g=`Install Telepresence OSS >= ${A.join(".")} with \`brew install ${W}\`, or by direct release download: ${J}`;function F(e){for(let t of(process.env.PATH??"").split(w.delimiter)){if(!t)continue;let n=w.join(t,e);try{if(f.accessSync(n,f.constants.X_OK),f.statSync(n).isFile())return n}catch{}}return null}s(F,"which");function D(e,t=120){let n;try{n=b(e,{capture:!0,timeout:t})}catch(r){if(r instanceof h&&r.code==="ENOENT")return[127,`${e[0]}: command not found`];if(r instanceof h&&r.code==="ETIMEDOUT")return[124,`${e.join(" ")}: timed out after ${t}s`];throw r}return[n.status,((n.stdout||"")+(n.stderr||"")).trim()]}s(D,"_run");async function d(e,t,n=120){let r;try{r=await T(e,{capture:!0,timeout:n,signal:t})}catch(o){if(o instanceof h&&o.code==="ENOENT")return[127,`${e[0]}: command not found`];if(o instanceof h&&o.code==="ETIMEDOUT")return[124,`${e.join(" ")}: timed out after ${n}s`];throw o}return[r.status,((r.stdout||"")+(r.stderr||"")).trim()]}s(d,"runAsyncRunner");function X(e,t=1e3){return new Promise(n=>{let r=new L.Socket,o=!1,i=s(c=>{o||(o=!0,r.destroy(),n(c))},"finish");r.setTimeout(t),r.once("connect",()=>i(!0)),r.once("timeout",()=>i(!1)),r.once("error",()=>i(!1)),r.connect(e,"localhost")})}s(X,"portOpen");function G(e){let t=/v(\d+)\.(\d+)\.(\d+)/.exec(e);return t?[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10)]:null}s(G,"parseVersion");function z(e,t){for(let n=0;n<3;n++)if(e[n]!==t[n])return e[n]<t[n];return!1}s(z,"versionLt");async function Q(e=t=>d(t)){if(F("telepresence")===null)return`telepresence not found on PATH. ${g}`;let[t,n]=await e(["telepresence","version"]),r=G(n);if(t!==0||r===null)return`could not determine telepresence version (${n?n.split(`
4
4
  `)[0]:"no output"}). ${g}`;if(z(r,A)){let o=r.join("."),i=A.join(".");return`telepresence ${o} is too old (need >= ${i}). ${g}`}return null}s(Q,"versionError");function Y(e,t,n=!1){let r=["telepresence","connect"];return n&&r.push("--docker"),r.push("--context",e,"--namespace",t),r}s(Y,"buildConnectArgs");var Z="host.docker.internal";function I(e,t){return`${e}-${t}-cn`}s(I,"dockerDaemonName");function ee(e,t,n,r,o=!1){return["telepresence","intercept",e,"--port",`${t}:${n}`,"--http-header",`x-feature=${r}`,"--mount","false",...o?["--address",Z]:[]]}s(ee,"buildInterceptArgs");function _(e){return["telepresence","detach",e]}s(_,"buildLeaveArgs");function te(e){return["telepresence","uninstall",...e]}s(te,"buildUninstallArgs");function ne(){return["telepresence","quit","-s"]}s(ne,"buildQuitArgs");var P="x-feature";function U(){return["telepresence","list","-i","--format","json"]}s(U,"buildListInterceptsArgs");function re(e){if(typeof e!="object"||e===null||Array.isArray(e))return"is not defined in ~/.werkmeister/services.yaml.";let t=e,n=M(t);return n.length?`has no ${n.join("/")} in services.yaml \u2014 not interceptable.`:t.k8s_port_name?null:"has no k8s_port_name in services.yaml. Interception under Istio ambient requires a NAMED Service targetPort; add the port name there once the service's manifests are fixed."}s(re,"interceptBlocker");var oe=["k8s_deployment","k8s_namespace","k8s_port"];function M(e){return oe.filter(t=>!e[t])}s(M,"missingClusterKeys");function ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&M(e).length===0}s(ye,"isRemoteService");function H(e){let t=new Map,n=String(e||"").trim();if(!n)return t;let r;try{r=JSON.parse(n)}catch{return t}if(!Array.isArray(r))return t;for(let o of r){if(typeof o!="object"||o===null)continue;let i=o,c=i.name,a=i.intercept_info;typeof c!="string"||!c||!Array.isArray(a)||!a.length||t.set(c,se(a[0]))}return t}s(H,"parseInterceptList");function se(e){if(typeof e!="object"||e===null)return null;let t=e.spec?.header_filters;if(typeof t!="object"||t===null)return null;for(let[n,r]of Object.entries(t))if(n.toLowerCase()===P&&typeof r=="string")return r;return null}s(se,"featureOf");async function Ee(e=t=>d(t)){let t=new Map;if(E())return{installed:!1,available:!1,namespace:null,intercepts:t};let[n,r]=await e($);if(n===127)return{installed:!1,available:!1,namespace:null,intercepts:t};let o=v(n,r),i=[];for(let l of o===null?ie(r):[])if(o=v(...await e([...$,"--use",l])),o!==null){i=["--use",l];break}if(o===null)return{installed:!0,available:!1,namespace:o,intercepts:t};let[c,a]=await e([...U(),...i]);return c!==0?{installed:!0,available:!1,namespace:o,intercepts:t}:{installed:!0,available:!0,namespace:o,intercepts:H(a)}}s(Ee,"listIntercepts");function xe(e=D){return v(...e($))}s(xe,"connectedNamespace");var $=["telepresence","status","--format","json"];function ie(e){let t=/please select (.+?) using the --use/.exec(e);return t?t[1].split(/, | or /):[]}s(ie,"daemonChoices");function v(e,t){if(e!==0)return null;let n;try{n=JSON.parse(t)}catch{return null}let r=n.daemon||n.user_daemon||{};return(r.status==="Connected"||r.running)&&r.namespace||null}s(v,"parseConnectedNamespace");async function ce(e,t,n=!1,r=o=>d(o)){if(E())return;let o=n?["--use",I(e,t)]:[];if(v(...await r([...$,...o]))===t)return;await r(["telepresence","quit","-s"]);let[c,a]=await r(Y(e,t,n));if(c!==0)throw new Error(`telepresence connect failed: ${a||"no output"}`)}s(ce,"ensureConnected");function ae(e){let t;try{if(!f.statSync(e).isFile())return[];t=f.readFileSync(e,"utf8")}catch{return[]}for(let n of t.split(`
5
5
  `))if(n=n.trim(),n.startsWith("SERVICES="))return n.slice(n.indexOf("=")+1).split(",").map(o=>o.trim()).filter(Boolean);return[]}s(ae,"servicesFromEnv");function $e(e,t=D){if(F("telepresence")===null)return[];let n=O(e);if(n===null)return[];let r=ae(w.join(n,".env"));if(!r.length)return[];let o=x(),i=[];for(let c of r){let a=q(o[c]);if(!a)continue;let[l]=t(_(a));l===0&&i.push(a)}return i}s($e,"leaveFeatureIntercepts");async function j(e,t=n=>d(n)){let n={uninstalled:[],quit:!1};if(!e.length)return n;let[r,o]=await t(U()),i=[];try{i=o.trim()?JSON.parse(o):[]}catch{i=null}if(r!==0||!Array.isArray(i))return y("Could not read telepresence intercepts -- leaving traffic agents and daemons in place"),n;let c=H(o),a=e.filter(l=>!c.has(l));if(a.length){let[l,p]=await t(te(a));l===0?(n.uninstalled=a,m(`Uninstalled traffic agent(s): ${a.join(", ")}`)):y(`Could not uninstall traffic agent(s) ${a.join(", ")}: ${p||"no output"}`)}if(c.size===0){let[l,p]=await t(ne());l===0?(n.quit=!0,m("Stopped telepresence daemons")):y(`Could not stop telepresence daemons: ${p||"no output"}`)}return n}s(j,"releaseIdleTelepresence");function q(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e.k8s_deployment:void 0}s(q,"deploymentOf");function B(e,t){if(!t.includes(e))throw new u(`'${e}' is not a local service of this workspace (SERVICES=${t.join(",")||"(none)"}). Add it to workspace.yml services and rerun \`werkmeister workspace init\`.`,"NOT_LOCAL");let n=x()[e],r=re(n);if(r)throw new u(`'${e}' ${r}`,"NOT_INTERCEPTABLE");return n}s(B,"resolveServiceDef");async function ve(e){if(E())throw new u("Intercepts are off under WERKMEISTER_FIXTURE.","FIXTURE");let t=B(e.service,e.localServices),n=s(V=>d(V,e.signal),"runner"),r=await Q(n);if(r)throw new u(r,"TELEPRESENCE_VERSION");let o=await R(e.feature);if(o===null)throw new u(`Feature '${e.feature}' has no allocated slot \u2014 run \`werkmeister feature up ${e.feature}\` first.`,"NOT_RUNNING");let i=C(o,t.port_offset??0);if(!await X(i))throw new u(`${e.service} is not listening on localhost:${i} \u2014 run \`werkmeister feature up ${e.feature}\` first (the local container is the intercept target).`,"PORT_CLOSED");let c=S(),a=t.k8s_namespace,l=t.k8s_deployment;m(`Connecting to ${a} on ${c}...`),await ce(c,a,!!e.dockerDaemon,n),m(`Intercepting ${l} \u2192 localhost:${i} (x-feature=${e.feature})...`);let[p,K]=await n([...ee(l,i,t.k8s_port,e.feature,!!e.dockerDaemon),...e.dockerDaemon?["--use",I(c,a)]:[]]);if(p!==0)throw new u(`telepresence intercept failed: ${K||"no output"}`,"INTERCEPT_FAILED");return{service:e.service,context:c,namespace:a,deployment:l,localPort:i,header:P,remoteHost:N()[e.service]?.remoteHostname??null}}s(ve,"startIntercept");async function Se(e){let t=s(i=>c=>d(e.dockerDaemon?[...c,"--use",I(S(),i)]:c,e.signal),"runnerIn");if(e.service){let i=B(e.service,e.localServices),c=i.k8s_deployment,a=t(i.k8s_namespace),[l,p]=await a(_(c));if(l!==0)throw new u(`Could not leave intercept: ${p||"no output"}`,"INTERCEPT_FAILED");return await j([c],a),[c]}let n=x(),r=[],o=t("default");for(let i of e.localServices){let c=q(n[i]);if(!c)continue;o=t(n[i].k8s_namespace??"default");let[a]=await o(_(c));a===0&&r.push(c)}return await j(r,o),r}s(Se,"leaveIntercept");export{A as a,W as b,J as c,g as d,D as e,d as f,X as g,G as h,z as i,Q as j,Y as k,Z as l,I as m,ee as n,_ as o,te as p,ne as q,P as r,U as s,re as t,ye as u,H as v,Ee as w,xe as x,ce as y,$e as z,j as A,ve as B,Se as C};
6
- //# sourceMappingURL=chunk-MM6QPCKB.js.map
6
+ //# sourceMappingURL=chunk-3G6CJ6NJ.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as e,f as r}from"./chunk-7YB3EVDN.js";r();var p="WORKSPACE",t=class extends Error{static{e(this,"SandboxError")}code;constructor(s,n){super(s),this.code=n,this.name="SandboxError"}},o=class extends t{static{e(this,"WorkspaceError")}constructor(s){super(s,p),this.name="WorkspaceError"}};export{p as a,t as b,o as c};
4
- //# sourceMappingURL=chunk-N7VAKCJU.js.map
3
+ import{a as e,f as r}from"./chunk-6AGDGUPH.js";r();var p="WORKSPACE",t=class extends Error{static{e(this,"SandboxError")}code;constructor(s,n){super(s),this.code=n,this.name="SandboxError"}},o=class extends t{static{e(this,"WorkspaceError")}constructor(s){super(s,p),this.name="WorkspaceError"}};export{p as a,t as b,o as c};
4
+ //# sourceMappingURL=chunk-3GEEXKS7.js.map