werkmeister 0.100.0 → 0.101.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/dist/branch_cli-TAIES5FG.js +4 -0
- package/dist/{budget-XJAD4BYV.js → budget-EHUOV6ZQ.js} +2 -2
- package/dist/{cache-VJ2UVWYM.js → cache-7VMM4W3H.js} +2 -2
- package/dist/{chunk-PUIN6VUY.js → chunk-22R4ZVAZ.js} +2 -2
- package/dist/{chunk-R2S6RWEU.js → chunk-3AYNZOUO.js} +2 -2
- package/dist/{chunk-WX5TIS7A.js → chunk-5LJKXCER.js} +2 -2
- package/dist/{chunk-OVU6QINS.js → chunk-5NEVLQZT.js} +2 -2
- package/dist/{chunk-7H6KAXEQ.js → chunk-6GEG4M3J.js} +2 -2
- package/dist/{chunk-6LYNMOSO.js → chunk-6LRZ3IGS.js} +2 -2
- package/dist/{chunk-KW5K3OTN.js → chunk-74IUWMDS.js} +2 -2
- package/dist/{chunk-IBVLNY3K.js → chunk-75KCGBN3.js} +2 -2
- package/dist/{chunk-EKWWJPHB.js → chunk-7NLVIWLA.js} +2 -2
- package/dist/{chunk-3ZJQ647J.js → chunk-7QEWBXGU.js} +2 -2
- package/dist/{chunk-P6ESPLFL.js → chunk-A3PD2YCB.js} +2 -2
- package/dist/{chunk-QWPPWLGG.js → chunk-ADJJMQ66.js} +3 -3
- package/dist/chunk-AW4CP76H.js +146 -0
- package/dist/{chunk-H2A5ONXK.js → chunk-BCBMJ7TX.js} +2 -2
- package/dist/{chunk-X5D3TBIO.js → chunk-CA2DIRCX.js} +2 -2
- package/dist/{chunk-NKD57M2V.js → chunk-D27WWCVA.js} +2 -2
- package/dist/{chunk-R7YXYCHS.js → chunk-D62B2W3Z.js} +2 -2
- package/dist/{chunk-3D7EHUQS.js → chunk-DCVKWVVR.js} +2 -2
- package/dist/{chunk-3NXQYQIO.js → chunk-DNSSH3J3.js} +2 -2
- package/dist/{chunk-J6FYUZI4.js → chunk-EAWQ3V7P.js} +2 -2
- package/dist/{chunk-62HKEJUB.js → chunk-F4SL26GG.js} +2 -2
- package/dist/{chunk-PCZG7P7Z.js → chunk-FJP5OIT2.js} +2 -2
- package/dist/{chunk-TVUFUP65.js → chunk-FXNMISOJ.js} +2 -2
- package/dist/{chunk-5ANJBDPO.js → chunk-G6P5S372.js} +2 -2
- package/dist/{chunk-5VYGDZDI.js → chunk-GIFSCRB5.js} +3 -3
- package/dist/{chunk-GGAVYJFY.js → chunk-GWNFXG6C.js} +2 -2
- package/dist/{chunk-43CIYPCH.js → chunk-GYYFL2DJ.js} +2 -2
- package/dist/{chunk-HSLDM24V.js → chunk-HFVTPZVU.js} +2 -2
- package/dist/{chunk-FCIWBL5U.js → chunk-HJHTYBRJ.js} +2 -2
- package/dist/{chunk-4HYRELFG.js → chunk-HW57MECV.js} +2 -2
- package/dist/{chunk-BK62LD6X.js → chunk-I4EZD6Q5.js} +2 -2
- package/dist/{chunk-JQ4HSKDH.js → chunk-IECB6DWF.js} +2 -2
- package/dist/{chunk-7KTMM6XN.js → chunk-INMAE546.js} +2 -2
- package/dist/{chunk-6HKG6SKI.js → chunk-JI3CBHOZ.js} +2 -2
- package/dist/{chunk-FQRUEFEJ.js → chunk-JMH32FSM.js} +2 -2
- package/dist/{chunk-ZD56TWBG.js → chunk-JUIC6V3H.js} +2 -2
- package/dist/{chunk-UD36J34T.js → chunk-KAE3OLDZ.js} +2 -2
- package/dist/{chunk-D4IXVIYS.js → chunk-KF4SDWYK.js} +2 -2
- package/dist/{chunk-4LSXYTVZ.js → chunk-KPYL2YIL.js} +2 -2
- package/dist/{chunk-EJJX5ACC.js → chunk-LR54UYWT.js} +2 -2
- package/dist/{chunk-FKTKS5NP.js → chunk-MSVIXAAD.js} +2 -2
- package/dist/{chunk-AWUJMPL6.js → chunk-MY3BDUID.js} +2 -2
- package/dist/{chunk-D5OGIOSO.js → chunk-NGEZ4ZR7.js} +2 -2
- package/dist/{chunk-ES57REDD.js → chunk-NXE2AORJ.js} +2 -2
- package/dist/{chunk-WAMDEM5R.js → chunk-OOGEX2KF.js} +2 -2
- package/dist/{chunk-DLRYDE5L.js → chunk-Q4HX6DRM.js} +2 -2
- package/dist/{chunk-AFFNZK7O.js → chunk-RGG35HSH.js} +2 -2
- package/dist/chunk-RGIMSORZ.js +35 -0
- package/dist/{chunk-5M3K7UMR.js → chunk-RIQV4YDV.js} +32 -32
- package/dist/{chunk-EGPDGRUJ.js → chunk-RIVBP2UP.js} +2 -2
- package/dist/{chunk-X5CTCLLF.js → chunk-SIQIXLNC.js} +2 -2
- package/dist/{chunk-7F3LDUXD.js → chunk-SRT5EPZN.js} +3 -3
- package/dist/{chunk-FPXQC3BJ.js → chunk-TBPDWOCX.js} +2 -2
- package/dist/{chunk-VPNBYMOF.js → chunk-UBTPLD6M.js} +2 -2
- package/dist/{chunk-MYWJ34H7.js → chunk-USMQVQQO.js} +2 -2
- package/dist/{chunk-5TGNGJ6V.js → chunk-V2L3SDR7.js} +2 -2
- package/dist/{chunk-FR3DDLJG.js → chunk-VVXS3SXB.js} +2 -2
- package/dist/{chunk-B5QYVIMS.js → chunk-WCGY5X7K.js} +2 -2
- package/dist/{chunk-O7FC7L2R.js → chunk-WVZTYOIA.js} +3 -3
- package/dist/{chunk-CCQVJOKF.js → chunk-WZ5N3ZP5.js} +2 -2
- package/dist/chunk-XJIED5LF.js +4 -0
- package/dist/{chunk-FMMABKKZ.js → chunk-YZXQYZ4K.js} +2 -2
- package/dist/{chunk-NOLCKEFL.js → chunk-Z6MRLCMI.js} +2 -2
- package/dist/{chunk-AIOR5A5R.js → chunk-ZI7EPUD4.js} +2 -2
- package/dist/{chunk-DZIXCVKZ.js → chunk-ZUHHPL2W.js} +2 -2
- package/dist/clean-7B4U5H74.js +8 -0
- package/dist/{close_out-XZ3MPMZ4.js → close_out-UVPG4VAW.js} +2 -2
- package/dist/code-7K35FUHV.js +4 -0
- package/dist/{config-6E37YHOB.js → config-U3XDNBFP.js} +2 -2
- package/dist/{connect-BO25Z2KV.js → connect-CBHXGYP2.js} +2 -2
- package/dist/{daemon-JOI7JLNS.js → daemon-M3D532CM.js} +2 -2
- package/dist/dashboard.js +13 -13
- package/dist/{detect-ZETT4JV2.js → detect-7VXZBE4D.js} +2 -2
- package/dist/{down-CPFWZNEL.js → down-HJOMOKKN.js} +3 -3
- package/dist/{fixture-AF5O4Z72.js → fixture-BA7KUPOZ.js} +2 -2
- package/dist/form-cli.js +1 -1
- package/dist/hooks-57TCABLO.js +4 -0
- package/dist/{hooks_gen-K3KBFMM4.js → hooks_gen-YLTBFEJ6.js} +2 -2
- package/dist/infra-2CRQJYOA.js +4 -0
- package/dist/init_workspace-NIPQL22N.js +4 -0
- package/dist/{intercept-IOBOE3IK.js → intercept-R6LIHUT2.js} +2 -2
- package/dist/{issue-4ERO7FPR.js → issue-3Q23FEVX.js} +2 -2
- package/dist/lib/agent_state.js +1 -1
- package/dist/lib/gate.js +1 -1
- package/dist/lib/pr_guard.js +1 -1
- package/dist/list_workspaces-ISATCT37.js +7 -0
- package/dist/logs-NNRAZPZL.js +6 -0
- package/dist/main.js +3 -3
- package/dist/mcp-proxy.js +1 -1
- package/dist/mcp.js +9 -9
- package/dist/migrate-3FBSLKWR.js +4 -0
- package/dist/notes-MEBVRGJL.js +4 -0
- package/dist/{open-FGKM2G67.js → open-BGQKQKMB.js} +2 -2
- package/dist/{optimize-XMV5WGIW.js → optimize-WSE2I7FV.js} +2 -2
- package/dist/pause-LE2FARGY.js +4 -0
- package/dist/pr-LHAXRLBR.js +5 -0
- package/dist/proxy_reload-ICOGATYC.js +6 -0
- package/dist/{registry-44BUUL2C.js → registry-NIS53LWU.js} +2 -2
- package/dist/remove-CM34PRA5.js +7 -0
- package/dist/remove_workspace-O5OUKSTA.js +8 -0
- package/dist/restart-WIC4HP5T.js +8 -0
- package/dist/resume-UNKXBXHK.js +8 -0
- package/dist/{safari-WJSDR5UW.js → safari-HND2BZO3.js} +2 -2
- package/dist/{sandbox-LSVMMWNV.js → sandbox-YTTUD5JC.js} +2 -2
- package/dist/{services-YAW6IK7D.js → services-7QQQ5JHE.js} +2 -2
- package/dist/{setup-4YNUPWY3.js → setup-SSYF2OSH.js} +2 -2
- package/dist/skills-M2D5WTVE.js +4 -0
- package/dist/{slots-PZ3VZT77.js → slots-X4FMHDXI.js} +2 -2
- package/dist/{standards-CKGKHCQA.js → standards-DUU7MD27.js} +2 -2
- package/dist/start_args-SUXHRK2R.js +4 -0
- package/dist/starting_prompt-WFZC4UAF.js +4 -0
- package/dist/stats-2O537MXC.js +4 -0
- package/dist/{status-747JFVD4.js → status-ZIKPILX3.js} +2 -2
- package/dist/{stop-MKLGT5L2.js → stop-WEPFGJC6.js} +2 -2
- package/dist/{telepresence-QJTP5Z76.js → telepresence-N5MJRHTT.js} +2 -2
- package/dist/{test-KY7UNELT.js → test-RJXM6XMQ.js} +2 -2
- package/dist/{tokens-UWV7DBP6.js → tokens-FG2ZDAER.js} +2 -2
- package/dist/{up-VFRDNTXD.js → up-HMSPZB2B.js} +3 -3
- package/dist/{v4-5WCBTRHN.js → v4-H2F72PLE.js} +2 -2
- package/dist/wait_load-CDI7IRRC.js +4 -0
- package/dist/werkmeister-workspaces.vsix +0 -0
- package/dist/{workspace-QLSZC57S.js → workspace-DJOJ65GH.js} +2 -2
- package/infra/compose/scripts/werkmeister-install-startup.sh +8 -7
- package/package.json +3 -3
- package/dist/chunk-HAALV2T6.js +0 -4
- package/dist/chunk-PWJQ647Z.js +0 -35
- package/dist/chunk-QFSIZDHP.js +0 -146
- package/dist/clean-7YRMVQTE.js +0 -8
- package/dist/code-KPJQ6AKJ.js +0 -4
- package/dist/hooks-64BETAMR.js +0 -4
- package/dist/infra-GN7PR7RK.js +0 -4
- package/dist/init_workspace-7RC4NQUD.js +0 -4
- package/dist/list_workspaces-PUHKY7CB.js +0 -7
- package/dist/logs-PQ4L67KD.js +0 -6
- package/dist/migrate-N34DPXRP.js +0 -4
- package/dist/notes-VACNLHN7.js +0 -4
- package/dist/pause-EJZULBAM.js +0 -4
- package/dist/pr-J5HOT3M4.js +0 -5
- package/dist/proxy_reload-KGOJDIS5.js +0 -6
- package/dist/remove-6VCLG23C.js +0 -7
- package/dist/remove_workspace-LP3YJPXH.js +0 -8
- package/dist/restart-UNSKBJWK.js +0 -8
- package/dist/resume-P5A6SICC.js +0 -8
- package/dist/skills-3FHLHUTR.js +0 -4
- package/dist/start_args-SNMTSNKP.js +0 -4
- package/dist/starting_prompt-W37XN7V5.js +0 -4
- package/dist/stats-MUP27HAD.js +0 -4
- package/dist/wait_load-DM7EOTO3.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
|
+
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
+
import{f as w}from"./chunk-ADJJMQ66.js";import"./chunk-7NLVIWLA.js";import"./chunk-6GEG4M3J.js";import"./chunk-HFVTPZVU.js";import"./chunk-RIQV4YDV.js";import"./chunk-UBTPLD6M.js";import"./chunk-G6P5S372.js";import"./chunk-TBPDWOCX.js";import"./chunk-LR54UYWT.js";import"./chunk-Z6MRLCMI.js";import"./chunk-A3PD2YCB.js";import"./chunk-AW4CP76H.js";import"./chunk-MY3BDUID.js";import"./chunk-3AYNZOUO.js";import"./chunk-VVXS3SXB.js";import"./chunk-GYYFL2DJ.js";import"./chunk-OOGEX2KF.js";import{h as E}from"./chunk-WCGY5X7K.js";import"./chunk-D27WWCVA.js";import"./chunk-RGIMSORZ.js";import"./chunk-IECB6DWF.js";import"./chunk-DCVKWVVR.js";import"./chunk-Q4HX6DRM.js";import"./chunk-USMQVQQO.js";import"./chunk-HW57MECV.js";import"./chunk-RGG35HSH.js";import{d as h}from"./chunk-EAWQ3V7P.js";import"./chunk-GWNFXG6C.js";import"./chunk-5NEVLQZT.js";import"./chunk-5LJKXCER.js";import"./chunk-HJHTYBRJ.js";import"./chunk-KF4SDWYK.js";import"./chunk-ZI7EPUD4.js";import"./chunk-22R4ZVAZ.js";import{X as d,aa as l}from"./chunk-BCBMJ7TX.js";import"./chunk-75KCGBN3.js";import{a,f as u}from"./chunk-ZUHHPL2W.js";u();import{execFileSync as g,spawn as k}from"node:child_process";import*as r from"node:fs";import*as t from"node:path";var x=["pr gate","feature up","feature stop","feature status"];function p(o){console.error(`branch-cli: ${o}`),process.exitCode=2}a(p,"refuse");async function S(o){if(!x.includes(o.slice(0,2).join(" ")))return p(`runs only ${x.map(e=>`\`${e}\``).join(", ")}; got \`${o.join(" ")}\``);let s=w(),c=E(s).find(e=>r.existsSync(t.join(e,"apps","cli","werkmeister")));if(!c)return p(`no werkmeister worktree in ${s}`);let i=t.join(c,"apps","cli","dist","main.js");if(!r.existsSync(i)){let e="";try{e=r.readFileSync(t.join(s,".env"),"utf8")}catch{}let n=/^FEATURE=(.+)$/m.exec(e)?.[1]?.trim()??"<feature>";return p(`${i} is not built. Build it in the container: docker exec -w /app ${l(n,"werkmeister-core")} pnpm turbo run build --filter=werkmeister`)}let m="?";try{m=g("git",["-C",c,"rev-parse","--short","HEAD"],{encoding:"utf8",env:h(),stdio:["ignore","pipe","ignore"]}).trim()}catch{}console.error(`branch-cli: running ${i} (worktree at ${m})`);let f=d(),$=[t.join(f,"node_modules"),process.env.NODE_PATH].filter(Boolean),j={...process.env,WERKMEISTER_ROOT:f,NODE_PATH:$.join(t.delimiter),WERKMEISTER_BRANCH_CLI:"1"};process.exitCode=await new Promise(e=>{let n=k(process.execPath,[i,...o],{stdio:"inherit",env:j});n.on("error",()=>e(1)),n.on("exit",R=>e(R??1))})}a(S,"run");export{S as run};
|
|
4
|
+
//# sourceMappingURL=branch_cli-TAIES5FG.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{e as x,n as S}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=budget-
|
|
3
|
+
import{e as x,n as S}from"./chunk-RIQV4YDV.js";import"./chunk-UBTPLD6M.js";import"./chunk-G6P5S372.js";import"./chunk-TBPDWOCX.js";import"./chunk-LR54UYWT.js";import"./chunk-A3PD2YCB.js";import"./chunk-AW4CP76H.js";import"./chunk-MY3BDUID.js";import"./chunk-3AYNZOUO.js";import"./chunk-VVXS3SXB.js";import"./chunk-GYYFL2DJ.js";import"./chunk-OOGEX2KF.js";import"./chunk-WCGY5X7K.js";import"./chunk-D27WWCVA.js";import"./chunk-RGIMSORZ.js";import"./chunk-IECB6DWF.js";import"./chunk-DCVKWVVR.js";import"./chunk-Q4HX6DRM.js";import{D as b,E as y,I as v,L as k,O as L,T as M,v as $,w as h,x as w}from"./chunk-USMQVQQO.js";import"./chunk-HW57MECV.js";import"./chunk-RGG35HSH.js";import"./chunk-EAWQ3V7P.js";import"./chunk-GWNFXG6C.js";import{p as g}from"./chunk-5NEVLQZT.js";import"./chunk-5LJKXCER.js";import"./chunk-HJHTYBRJ.js";import"./chunk-KF4SDWYK.js";import"./chunk-ZI7EPUD4.js";import"./chunk-22R4ZVAZ.js";import"./chunk-BCBMJ7TX.js";import"./chunk-75KCGBN3.js";import{a as i,f}from"./chunk-ZUHHPL2W.js";f();import R from"node:os";var N=2**30,B=i((n,t)=>Number.isFinite(n)?`${Number(n.toFixed(1))}${t}`:"no limit","limit");function W(n,t=process.platform){return n?`host load limit ${n}${{darwin:" (Docker VM load on macOS)",win32:" (Docker VM load on Windows)"}[t]??""}`:"host load limit off"}i(W,"hostLoadText");async function T(n){let t=await b(),m=process.platform==="darwin"||process.platform==="win32",u=y(m&&(await v())?.cores||R.availableParallelism()),c=w(),d=await M(),r=S(),l=$(L(d,r??[])).map((e,o)=>{let s=c[e.feature]?.workspace,a=s&&g(s)?.services||null,F=s?k(s,a??void 0):null,O=o===0&&e.waitedMs>=3e5&&!e.parked&&h(t,r??[],e);return{...e,position:o+1,services:a,cost:F,holds:O}});if(n.json){let e=i(o=>Number.isFinite(o)?o:null,"n");console.log(JSON.stringify({budget:{memory:e(t.memory),cpus:e(t.cpus),preempt:t.preempt},host_load:u,leases:c,waiting:d,running:r?.map(o=>({feature:o.feature,cpus:o.cost.cpus,memory:o.cost.memory,rank:o.rank,busy:o.busy}))??null,waiters:l.map(o=>({feature:o.feature,position:o.position,services:o.services,cpus:o.cost?.cpus??null,memory:o.cost?.memory??null,waited_ms:o.waitedMs,gate:o.gate}))}));return}console.log(`Budget: ${B(t.memory/N," GiB")} memory, ${B(t.cpus," CPUs")}, ${W(u)}, preemption ${t.preempt?"on":"off"}`);let p=Object.entries(c).sort(([,e],[,o])=>e.slot-o.slot);console.log(p.length?"Slots:":"Slots: none held");for(let[e,o]of p)console.log(` ${o.slot} ${e}${o.workspace?` ${o.workspace}`:""}`);console.log(r?r.length?"Running:":"Running: none":"Running: docker unavailable");for(let e of[...r??[]].sort((o,s)=>s.cost.cpus-o.cost.cpus))console.log(` ${x(e)}`);console.log(l.length?"Waiting:":"Waiting: none");for(let e of l){let o=e.services?`${e.services.join(", ")}${e.gate?" for a running feature":""}`:"whole feature",s=e.cost?` (${Number(e.cost.cpus.toFixed(1))} CPUs, ${(e.cost.memory/N).toFixed(1)} GiB)`:"",a=e.waitedMs?` waited ${Math.round(e.waitedMs/6e4)} min${e.holds?", gets the next free room":""}`:"";console.log(` ${e.position}. ${e.feature} ${o}${s}${a}`)}}i(T,"run");export{W as hostLoadText,T as run};
|
|
4
|
+
//# sourceMappingURL=budget-EHUOV6ZQ.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-
|
|
4
|
-
//# sourceMappingURL=cache-
|
|
3
|
+
import"./chunk-XJIED5LF.js";import{d as s}from"./chunk-VVXS3SXB.js";import"./chunk-D27WWCVA.js";import"./chunk-HW57MECV.js";import"./chunk-EAWQ3V7P.js";import"./chunk-22R4ZVAZ.js";import{h as e,l as c}from"./chunk-BCBMJ7TX.js";import"./chunk-75KCGBN3.js";import{a as r,f as i}from"./chunk-ZUHHPL2W.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-7VMM4W3H.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-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as e,f as r}from"./chunk-ZUHHPL2W.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-22R4ZVAZ.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 ce}from"./chunk-
|
|
3
|
+
import{a as ce}from"./chunk-VVXS3SXB.js";import{a as F,b as H,f as re}from"./chunk-WCGY5X7K.js";import{a as Y,c as K,f as Q,g as J,h as Z,j as ee,m as te}from"./chunk-D27WWCVA.js";import{P as ne,Q as ae,v as oe}from"./chunk-RGIMSORZ.js";import{b as se}from"./chunk-IECB6DWF.js";import{a as I,b as ie}from"./chunk-Q4HX6DRM.js";import{ga as le}from"./chunk-USMQVQQO.js";import{r as X}from"./chunk-ZI7EPUD4.js";import{D as G,S as q,U as V}from"./chunk-BCBMJ7TX.js";import{a as c,f as A}from"./chunk-ZUHHPL2W.js";A();import*as de from"node:fs";import*as me from"node:path";A();function he(t){let o=t.url?`[${t.ref}](${t.url})`:t.ref,i=t.title?`: ${t.title}`:"",a=t.fetchedAt?`Copy taken ${t.fetchedAt.slice(0,10)}: \`.werkmeister/issue.md\`.`:"No stored copy; run `werkmeister workspace init --refresh-issue`.";return["## Issue","",`${o}${i}. ${a}`,"Before each stage, re-read the live issue for newer direction: `werkmeister issue view`","Its status moves by itself (In Progress \u2192 In Review \u2192 Done): `docs/workspace-lifecycle.md` \xA7 Issue status in the werkmeister repo.",""].join(`
|
|
4
4
|
`)}c(he,"renderIssueRef");function Pe(t){try{let o=X(),i=I(void 0,o),a=t.find(r=>i[r]?.hostname),s=a?i[a].hostname:Object.values(i).map(r=>r.hostname).filter(Boolean).sort()[0];return s?{host:s,domain:o.local_domain.replace(/^\.+/,"")}:null}catch{return null}}c(Pe,"resolveProxyHost");function B(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}c(B,"isDict");function je(t,o,i){let a=[];for(let[s]of t){let r=!1;try{r=de.statSync(me.join(o,s,"CLAUDE.md")).isFile()}catch{}r&&a.push(`| Working in ${s} | ${s}/CLAUDE.md |`)}return i&&a.push("| Running or validating the change \u2014 test commands, how to validate, ports, lifecycle | .werkmeister/werkmeister-context.md |"),t.length>1&&a.push("| Cross-repo contract change | .werkmeister/notes/ (`contract` notes) |"),a.push("| Open or create a PR (including `/create-pr`), merge, close out | .werkmeister/pr-rules.md |"),a.length===0?"":`| Task | Read |
|
|
5
5
|
|------|------|
|
|
6
6
|
`+a.join(`
|
|
@@ -179,4 +179,4 @@ ${ve}
|
|
|
179
179
|
${be}${Re}${Te}${Se}${D}${xe}${Le}${g||$?`## Troubleshooting
|
|
180
180
|
|
|
181
181
|
${g?"### Feature missing from `/__werkmeister` selector\n\nThe dropdown is populated from `~/.werkmeister/infra/proxy/features.json` (a static file served by Caddy), which is regenerated alongside the Caddyfile. It can drift from the live container labels (`com.werkmeister.feature` \u2014 the source of truth) if a slot is allocated without a proxy regen.\n\nDiagnose \u2014 compare what's labeled vs. what the UI shows:\n```bash\ndocker ps -a --filter label=com.werkmeister.feature --format '{{ .Label \"com.werkmeister.feature\" }}' | sort -u\njq '[.[].name]' \"$HOME/.werkmeister/infra/proxy/features.json\"\n```\n\nResync:\n```bash\nwerkmeister infra proxy-reload # regenerates Caddyfile + features.json, reloads Caddy\n```\n\n### Caddy returns `content-length: 0` but direct service hit works\n\nCaddy routing issue, not an app issue. Try `werkmeister infra proxy-reload` first; if Caddy is still misrouting, check `docker logs w9r-caddy --tail 50`.\n\n":""}${$?"### Containers expected per the table above are missing from `docker ps`\n\n`werkmeister feature up` may have partially failed. Re-run from the workspace root:\n```bash\nwerkmeister feature up # idempotent \u2014 starts missing containers\ndocker compose logs -f # watch startup if something crashes\n```\n":""}`:""}`}c(tt,"buildSandboxContextMd");export{he as a,Ze as b,et as c,tt as d};
|
|
182
|
-
//# sourceMappingURL=chunk-
|
|
182
|
+
//# sourceMappingURL=chunk-3AYNZOUO.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 p,b as a}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as p,b as a}from"./chunk-75KCGBN3.js";import{a as o,f as c}from"./chunk-ZUHHPL2W.js";c();import*as i from"node:fs";import*as s from"node:path";function u(t){let e=s.resolve(t);for(;;){if(i.existsSync(s.join(a(e),"workspace.yml")))return e;let r=s.dirname(e);if(r===e)return null;e=r}}o(u,"findRecordRoot");function d(t){try{let e=i.readdirSync(s.join(t,"stages")).filter(n=>/^\d+_/.test(n)).sort(),r=e.find(n=>/^\d+_propose$/.test(n))??e.find(n=>/^\d+_ship$/.test(n))??e.at(-1);return r?`stages/${r}/output/`:"the last stage's output/"}catch{return`${s.basename(a(t))}/notes/`}}o(d,"prFileDirName");var f=/(?<!<)<<(?!<)-?\s*(['"]?)(\w+)\1([^\n]*)(?:\n(?:[\s\S]*?\n)?\t*\2(?=\n|$)|[\s\S]*$)/g,m=/'[^']*(?:'|$)|"(?:[^"\\]|\\[\s\S])*(?:"|$)/g,h=/(?:^|[;&|({\n`])\s*(?:(?:\w+=\S*|command|exec|env|then|do|else)\s+)*gh\s+pr\s+create\b/,R=/create_pull_request$/;function y(t){return h.test(t.replace(f,"$3").replace(m,"_"))}o(y,"opensPr");function S(t){return["_shared/pr-rules.md",`${p}/pr-rules.md`].find(e=>i.existsSync(s.join(t,e)))??"docs/workspace-lifecycle.md in the werkmeister repo"}o(S,"prRulesPath");function _(t){let e=u(String(t.cwd||process.cwd()));if(!e)return null;let r=String(t.tool_name||""),n=String(t.tool_input?.command||"");if(!(r==="Bash"&&y(n)||R.test(r)))return null;let l=S(e);return`Inside workspace \`${s.basename(e)}\`, PRs open only through \`werkmeister pr open\`: it runs the pre-PR gate and records the URL. Write the PR file in \`${d(e)}\`, have the person set \`status: approved\`, then run \`werkmeister pr open\`. Rules: \`${l}\`.`}o(_,"decide");function w(){let t=null;try{let e=process.stdin.isTTY?"":i.readFileSync(0,"utf8"),r=e.trim()?JSON.parse(e):{};typeof r=="object"&&r!==null&&!Array.isArray(r)&&(t=_(r))}catch{t=null}t&&console.log(JSON.stringify({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:t}}))}o(w,"main");export{u as a,S as b,w as c};
|
|
4
|
+
//# sourceMappingURL=chunk-5LJKXCER.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 A}from"./chunk-
|
|
3
|
+
import{a as A}from"./chunk-5LJKXCER.js";import{w as j}from"./chunk-BCBMJ7TX.js";import{b as m}from"./chunk-75KCGBN3.js";import{a as o,f as S}from"./chunk-ZUHHPL2W.js";S();import*as c from"node:fs";import*as d from"node:path";S();var P="mcp__ccd_turn__wrap_up",ht="Don't turn on Auto-fix in the Claude desktop app (`ccd_pr`).";var K=new Set(["AskUserQuestion","ExitPlanMode"]),B=new Set(["permission_prompt","elicitation_dialog"]),D=30*6e4,G=24*60*6e4,_=/^[\w-]+$/,k=o(t=>d.join(m(t),"sessions"),"sessionsDir"),Y=o((t,e)=>d.join(k(t),`${e}.json`),"sessionPath");function x(t){try{let e=JSON.parse(c.readFileSync(t,"utf8"));return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}o(x,"readJson");function T(t){if(t?.status!=="busy"&&t?.status!=="idle"||typeof t.at!="string")return null;let e={status:t.status,at:t.at};return t.headless===!0&&(e.headless=!0),typeof t.last=="string"&&(e.last=t.last),typeof t.tool?.name=="string"&&typeof t.tool.at=="string"&&(e.tool=t.tool),Number.isInteger(t.subagents)&&t.subagents>0&&(e.subagents=t.subagents),typeof t.shell?.command=="string"&&typeof t.shell.at=="string"&&(e.shell={command:t.shell.command,at:t.shell.at,...typeof t.shell.id=="string"&&{id:t.shell.id}}),typeof t.ask?.what=="string"&&typeof t.ask.at=="string"&&(e.ask=t.ask),t.stopped===!0&&(e.stopped=!0),e}o(T,"sessionOf");function xt(t,e=Date.now()){let n={},r=o(a=>a.status==="idle"||a.ask!==void 0||e-w(a)<G,"fresh"),i=[];try{i=c.readdirSync(k(t))}catch{}for(let a of i){let s=a.match(/^([\w-]+)\.json$/)?.[1],l=d.join(k(t),a),f=s?T(x(l)):null;!s||!f||(r(f)?n[s]=f:H(l,r))}return n}o(xt,"readSessions");function H(t,e){try{let n=T(x(t));n&&!e(n)&&c.rmSync(t,{force:!0})}catch{}}o(H,"removeIfStale");var w=o(t=>Date.parse(t.last??t.at),"lastOf"),Q=o((t,e=Date.now())=>t.status==="busy"&&e-w(t)>=D,"sessionGone");function bt(t,e=Date.now()){let n=Object.values(t),r=n.flatMap(l=>l.ask?[l.ask]:[]).sort((l,f)=>l.at.localeCompare(f.at))[0];if(r)return{agent:"needs-you",at:r.at,question:r.what};let i=n.find(l=>l.status==="busy"&&!Q(l,e));if(i)return{agent:"working",at:i.at,question:null};let a=n.find(l=>l.shell&&e-Date.parse(l.shell.at)<D)?.shell;if(a)return{agent:"working",at:a.at,question:null};let s=n.sort((l,f)=>w(f)-w(l))[0];return s?s.stopped?{agent:"done",at:s.at,question:null}:s.status==="busy"?{agent:"idle",at:s.at,question:null}:null:null}o(bt,"agentOf");function z(t){return/\?(?=[\s*_`'")\]]|$)/.test(U(t))}o(z,"asksQuestion");function U(t){let e=t.trim().split(/\n\s*\n/);return e[e.length-1].trim().slice(0,200)}o(U,"questionOf");function q(t,e){let n=c.openSync(t,"r");try{let r=c.fstatSync(n).size,i=Math.min(r,e),a=Buffer.alloc(i);return c.readSync(n,a,0,i,r-i),a.toString("utf8")}finally{c.closeSync(n)}}o(q,"tailOf");function X(t){let e=q(t,65536).split(`
|
|
4
4
|
`);for(let n=e.length-1;n>=0;n--){let r;try{r=JSON.parse(e[n])}catch{continue}if(r.type!=="assistant")continue;let i=r.message?.content;if(typeof i=="string")return i;if(!Array.isArray(i))continue;let a=i.filter(s=>s?.type==="text"&&typeof s.text=="string");if(a.length)return a.map(s=>s.text).join(`
|
|
5
5
|
`)}return null}o(X,"lastAssistantText");var V=1<<20;function Z(t,e,n){if(!t.id)return t.at<e;if(typeof n!="string")return!1;let r=`<task-id>${t.id}</task-id>`;try{return q(n,V).split(`
|
|
6
6
|
`).some(i=>i.includes(r)&&tt(i,r))}catch{return!1}}o(Z,"shellExited");function tt(t,e){try{let n=JSON.parse(t);return n?.type==="queue-operation"?String(n.content??"").includes(e):n?.attachment?.type==="queued_command"&&String(n.attachment.prompt??"").includes(e)}catch{return!1}}o(tt,"isExitNotice");var I=o(t=>t.ask?.kind!=="permission"&&t.tool!==void 0&&K.has(t.tool.name),"askingTool");function et(t,e,n,r={}){let i=t.hook_event_name,a=n.toISOString(),s=e?{...e}:{status:"idle",at:a};r.foreign||(r.headless?s.headless=!0:delete s.headless),s.last=a;let l=o(u=>{s.status!==u&&Object.assign(s,{status:u,at:a})},"status");if(i==="SubagentStart"||i==="SubagentStop"){let u=(s.subagents??0)+(i==="SubagentStart"?1:-1);return u>0?s.subagents=u:delete s.subagents,s}if(t.agent_id)return e?s:void 0;let f=String(t.tool_name??""),g=r.foreign;switch(i){case"SessionStart":if(l("idle"),!g)for(let u of["tool","ask","stopped","subagents","shell"])delete s[u];return s;case"UserPromptSubmit":if(l("busy"),!g)for(let u of["tool","ask","stopped"])delete s[u];return s;case"PreToolUse":{if(l("busy"),g)return s;delete s.stopped;let u=t.tool_input?.command;s.tool={name:f,...typeof u=="string"&&{command:u.slice(0,200)},at:a},f==="Bash"&&t.tool_input?.run_in_background===!0&&(s.shell={command:typeof u=="string"?u.slice(0,200):"",at:a});let p=t.tool_input?.ask;if(f===P&&typeof p=="string"&&p.trim())s.ask={kind:"question",what:p.trim(),at:a,source:"session",via:"wrap_up"};else if(f==="AskUserQuestion"){let v=t.tool_input?.questions?.[0]?.question;s.ask={kind:"question",what:typeof v=="string"?v:"Answer the question",at:a,source:"session"}}else f==="ExitPlanMode"?s.ask={kind:"plan",what:"Approve the plan?",at:a,source:"session"}:delete s.ask;return s}case"PostToolUse":case"PostToolUseFailure":{if(l("busy"),g)return s;delete s.tool;let u=t.tool_response?.backgroundTaskId;s.shell&&typeof u=="string"&&t.tool_input?.run_in_background===!0&&(s.shell={...s.shell,id:u});let p=t.tool_input?.task_id??t.tool_input?.shell_id;return(f==="TaskStop"||f==="KillShell")&&s.shell?.id&&p===s.shell.id&&delete s.shell,f===P&&s.ask?.via==="wrap_up"||delete s.ask,s}case"Notification":{let u=t.notification_type,p=String(t.message??"");return!(typeof u=="string"?B.has(u):!/waiting for your input/i.test(p))||g||I(s)||s.ask?.kind==="permission"?void 0:(s.ask={kind:u==="elicitation_dialog"?"question":"permission",what:p||"Approve the tool call?",at:a,source:"session"},s)}case"PermissionRequest":{if(g||I(s)||s.ask?.kind==="permission")return;let u=t.tool_input?.description;return s.ask={kind:"permission",what:typeof u=="string"&&u.trim()?u.trim():`Approve ${f||"the tool call"}?`,at:a,source:"session"},s}case"PermissionDenied":return s.ask?.kind==="permission"&&delete s.ask,s;case"Stop":case"StopFailure":{let u=s.at;if(l("idle"),g)return s;delete s.tool,s.shell&&Z(s.shell,u,t.transcript_path)&&delete s.shell,s.stopped=!0;let p=null;return typeof t.last_assistant_message=="string"?p=t.last_assistant_message:typeof t.transcript_path=="string"&&(p=X(t.transcript_path)),p&&z(p)?s.ask={kind:"question",what:U(p),at:a,source:"text"}:s.ask?.via!=="wrap_up"&&delete s.ask,s}case"SessionEnd":return r.foreign?s:null;default:return}}o(et,"nextSession");var nt="Workspace paused by the person from its card. End your turn now; it continues when they press Resume.",Ot="Workspace resumed by the person. Continue where you left off.",b=o(t=>d.join(m(t),"paused.json"),"pausedPath"),O=o(t=>d.join(m(t),"resume-nudge.json"),"nudgePath"),y=o(t=>d.join(m(t),"waiting.json"),"waitingPath");function h(t,e){let n=`${t}.${process.pid}.tmp`;c.writeFileSync(n,`${JSON.stringify(e)}
|
|
@@ -9,4 +9,4 @@ import{a as A}from"./chunk-WX5TIS7A.js";import{w as j}from"./chunk-H2A5ONXK.js";
|
|
|
9
9
|
${n}`:n,at:r.toISOString()})}catch(l){throw s!==null&&c.renameSync(a,i),l}c.rmSync(a,{force:!0})}o(qt,"writeWakeNudge");function it(t,e){let n=t.hook_event_name;if(n!=="UserPromptSubmit"&&n!=="PostToolUse"&&n!=="Stop"||t.agent_id||!ot(e,t.session_id))return null;let r=N(e,t.session_id),i=`${r}.${process.pid}-${Date.now()}.claimed`;try{c.renameSync(r,i)}catch{return null}let a=F(i);return c.rmSync(i,{force:!0}),a===null?null:n==="Stop"?{decision:"block",reason:a}:{hookSpecificOutput:{hookEventName:n,additionalContext:a}}}o(it,"deliverWake");var at=o(()=>d.join(j(),"scheduler","queue.json"),"queuePath");function J(t){try{return/^FEATURE=(.+)$/m.exec(c.readFileSync(d.join(t,".env"),"utf8"))?.[1]?.trim()}catch{return}}o(J,"featureOf");function M(t){let e=c.statSync(y(t),{throwIfNoEntry:!1})?.mtimeMs??Date.now();if(Date.now()-e<5e3)return!1;let n=J(t);if(!n)return!1;try{let r=JSON.parse(c.readFileSync(at(),"utf8"));return!(Array.isArray(r)&&r.includes(n))}catch{return!0}}o(M,"leftOver");var ct=/(^|[\s;&|(`/'"])(docker|pnpm|npm|npx|node|turbo|vitest|with-temp-home|with-fixture-workspace)(\s|$)|\b(werkmeister|w9r)\s+(feature\s+(up|restart)|pr\s+(gate|open))\b/,ut=/^mcp__.*werkmeister.*__(up|restart|test|workspace-pr)$/;function lt(t){if(t.hook_event_name!=="PreToolUse")return!1;let e=String(t.tool_name??""),n=String(t.tool_input?.command??"").replace(/(\s(?:-m|--message)[= ]?\s*)('[^']*'|"[^"]*")/g,"$1''");return e==="Bash"&&/^\s*docker\s+ps(\s[^;&|`$()<>\n]*)?$/.test(n)?!1:e==="Bash"?ct.test(n):ut.test(e)&&t.tool_input?.action!=="status"}o(lt,"needsCapacity");function ft(t,e){let n=c.existsSync(b(e)),r=n?null:C(e);if(!n&&!r||r?.services)return null;if(r&&M(e))return R(e),null;if(r&&!lt(t))return null;let i=r?`Waiting for capacity (position ${r.position}): this workspace is queued, so containers and tests wait until it starts. Not a failure: \`docker ps --filter label=com.werkmeister.feature=${J(e)??"<feature>"}\` shows its containers; when they are not up, a grant notice tells this session to continue once room frees, and edits and git still work meanwhile. If they are up, the queue entry is stale: tell the person.`:nt;switch(t.hook_event_name){case"PreToolUse":{let a={hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:i}};return process.env.WERKMEISTER_HOOK_HARNESS==="codex"?a:{continue:!1,stopReason:i,...a}}case"UserPromptSubmit":return{decision:"block",reason:"This workspace is paused. Press \u25B6 Resume on its card first."};default:return null}}o(ft,"pauseGate");function pt(t,e){if(t.hook_event_name!=="UserPromptSubmit")return null;let n=st(e);return n?.services?n.parked&&M(e)?(R(e),null):n.parked?`This workspace's start of ${n.parked.service} is queued for capacity (position ${n.position}). Nothing polls for it: it starts by itself when room frees, and the session is told to continue. Rerunning \`werkmeister feature up --service\` keeps its place.`:`This session's own service start is waiting for capacity (position ${n.position}): ${n.services.join(", ")}. The werkmeister command that started it (pr gate, pr open or feature up --service), usually a background job in this session, polls every 15 s for up to 10 min and goes on by itself when room frees. To stop the wait, stop that job (TaskStop, or kill its pid; never pkill).`:null}o(pt,"serviceWaitContext");function dt(t,e){let n=t?.hookSpecificOutput?.additionalContext;return{hookSpecificOutput:{hookEventName:"UserPromptSubmit",additionalContext:n?`${e}
|
|
10
10
|
|
|
11
11
|
${n}`:e}}}o(dt,"withContext");function mt(t,e=new Date){let n=A(String(t.cwd||process.cwd())),r=t.session_id;if(!n||typeof r!="string"||!_.test(r))return null;let i=Y(n,r),a=T(x(i)),s=process.env.CLAUDE_CODE_ENTRYPOINT?.startsWith("sdk")??!1,l=s&&a!==null&&!a.headless,f=et(t,a,e,{headless:s,foreign:l});return f===void 0?null:f===null?a?(c.rmSync(i,{force:!0}),i):null:(c.mkdirSync(k(n),{recursive:!0}),h(i,f),i)}o(mt,"record");function Ct(){try{let t=process.stdin.isTTY?"":c.readFileSync(0,"utf8"),e=t.trim()?JSON.parse(t):{};if(typeof e!="object"||e===null||Array.isArray(e))return;let n=A(String(e.cwd||process.cwd())),r=n?ft(e,n):null;if(r){console.log(JSON.stringify(r));return}n&&e.hook_event_name==="UserPromptSubmit"&&c.rmSync(O(n),{force:!0});let i=n?it(e,n):null,a=n?pt(e,n):null;if(a?console.log(JSON.stringify(dt(i,a))):i&&console.log(JSON.stringify(i)),i&&e.hook_event_name==="Stop")return;mt(e)}catch{}}o(Ct,"main");export{ht as a,D as b,G as c,xt as d,Q as e,bt as f,z as g,U as h,Ot as i,O as j,y as k,h as l,Nt as m,vt as n,At as o,C as p,st as q,Pt as r,R as s,Et as t,Tt as u,$t as v,jt as w,W as x,It as y,Dt as z,Ut as A,qt as B,Ct as C};
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-5NEVLQZT.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{l as _,m as j}from"./chunk-
|
|
3
|
+
import{l as _,m as j}from"./chunk-D27WWCVA.js";import{a as R}from"./chunk-Q4HX6DRM.js";import{da as O}from"./chunk-USMQVQQO.js";import{n as y,o as I,p as N}from"./chunk-EAWQ3V7P.js";import{b as h}from"./chunk-22R4ZVAZ.js";import{M as x,R as A,S as F,j as g,k as v,l as d,n as p,o as T}from"./chunk-BCBMJ7TX.js";import{b as S}from"./chunk-75KCGBN3.js";import{a,f as $}from"./chunk-ZUHHPL2W.js";$();import*as n from"node:fs";import{createRequire as C}from"node:module";import*as c from"node:path";var m="1.63.0",P=600,D=["playwright.config.ts","playwright.config.js","playwright.config.mjs"];function U(t){let e=[t];try{for(let s of n.readdirSync(t,{withFileTypes:!0}))s.isDirectory()&&n.existsSync(c.join(t,s.name,".git"))&&e.push(c.join(t,s.name))}catch{}return e}a(U,"playwrightSearchDirs");function k(t){for(let e of t)if(n.existsSync(e)&&n.statSync(e).isDirectory()&&D.some(s=>n.existsSync(c.join(e,s))))return e;return null}a(k,"playwrightCwd");function M(t){let e=U(t).slice(1).map(f=>c.basename(f)),s="";try{s=/^SERVICES=(.*)$/m.exec(n.readFileSync(c.join(t,".env"),"utf8"))?.[1]??""}catch{}let l=s.split(",").map(f=>f.trim()).filter(Boolean),r=x(),i=R(r),u=j(_(e,A(),l),r,F(),new Set(Object.keys(i))).map(f=>` - ${f.service} \u2014 test: ${f.test??"\u2014"} \u2014 validate: ${f.validate}`);return"No Playwright suite found for this workspace (no playwright.config.{ts,js,mjs} in the workspace root or a repo worktree), so nothing was run."+(u.length?`
|
|
4
4
|
Validate each service as follows:
|
|
5
5
|
${u.join(`
|
|
6
6
|
`)}`:"")}a(M,"noSuiteMessage");function b(t){try{let e=C(c.join(t,"package.json")).resolve("@playwright/test/package.json");return JSON.parse(n.readFileSync(e,"utf8")).version??null}catch{return null}}a(b,"installedPlaywrightVersion");async function Q({feature:t,workspace:e,extraArgs:s=[],signal:l}){let r=await O(t),i=k(U(e));if(i===null)return{status:1,cwd:i,slot:r,message:M(e)};r===null&&(d(`Feature '${t}' does not have an allocated slot`),d("Start it first with: werkmeister feature up "+t),d("Running tests anyway with feature header routing..."));let w={...process.env,WERKMEISTER_FEATURE:t,SANDBOX_FEATURE:t};r&&(w.WERKMEISTER_SLOT=String(r)),g(`Working directory: ${i}`);let u=b(i);u!==m&&d(`@playwright/test is ${u??"not installed"} here, but \`werkmeister machine setup\` installs Chromium for ${m} -- the browser may be missing. Fix with: npm install -D @playwright/test@${m}`),g(`WERKMEISTER_FEATURE=${t}`);let f=["npx","playwright","test",...s];g(`Running: ${f.join(" ")}`),p(`
|
|
@@ -54,4 +54,4 @@ test('feature: ${t}', async ({ page, context }) => {
|
|
|
54
54
|
await page.pause();
|
|
55
55
|
});
|
|
56
56
|
`,"featureSpec");function tt(t,e,s){if(c.basename(t)!==t)throw new h(`Invalid feature name: ${t}`,"BAD_FEATURE_NAME");let l=[["playwright.config.ts",L(s.baseUrl)],[`${t}.spec.ts`,W(t,s)]],r=[];for(let[i,w]of l){let u=c.join(e,i);n.existsSync(u)||(n.writeFileSync(u,w),r.push(u))}return r}a(tt,"scaffoldFeatureTests");function et(t){let e=b(t);if(e===m){g(`@playwright/test ${e} present`);return}if(e){d(`workspace pins @playwright/test ${e}, but \`werkmeister machine setup\` installs Chromium for ${m} -- if launch fails, run: npx playwright@${e} install chromium`);return}let s=["npm","install","--save-dev",`@playwright/test@${m}`];if(!n.existsSync(S(t)))throw new h(`${t} is not a workspace (no ${c.basename(S(t))}/) -- pass --workspace, or install manually there: ${s.join(" ")}`,"NOT_A_WORKSPACE");let l=T(),r;try{r=I(s,{cwd:t,...l?{}:{capture:!0}})}catch(i){r={status:127,stderr:i instanceof Error?i.message:String(i)}}if(r.status!==0)throw!l&&r.stderr&&p(r.stderr,"stderr"),new h(`\`${s.join(" ")}\` failed in ${t}`,"PLAYWRIGHT_INSTALL");v(`installed @playwright/test ${m}`)}a(et,"ensurePlaywright");export{m as a,Q as b,Z as c,tt as d,et as e};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-6GEG4M3J.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{a as D,s as B}from"./chunk-
|
|
3
|
+
import{a as D,s as B}from"./chunk-G6P5S372.js";import{a as F,b as j,c as H,d as y,e as v,g as G,h as I,i as _,k as K,l as M,n as J,o as L}from"./chunk-LR54UYWT.js";import{l as b,m as x,n as N}from"./chunk-Z6MRLCMI.js";import{f as P,o as T}from"./chunk-USMQVQQO.js";import{d as A,l as O}from"./chunk-HW57MECV.js";import{n as p,o as w,p as C}from"./chunk-EAWQ3V7P.js";import{X as S,j as c,k as u,l as d,m,t as $,w as R}from"./chunk-BCBMJ7TX.js";import{a as i,f as g}from"./chunk-ZUHHPL2W.js";g();import*as f from"node:fs";import*as X from"node:net";import*as Z from"node:os";import*as E from"node:path";g();import*as U from"node:fs";import*as W from"node:path";var l=".githooks";function Y(e){let t=e??S();if(!U.existsSync(W.join(t,".git")))return!1;let o;try{o=w(["git","-C",t,"config","--get","core.hooksPath"],{capture:!0})}catch(r){if(r instanceof p&&r.code==="ENOENT")return d(`git was not found on PATH \u2014 could not check or configure core.hooksPath. The werkmeister secret-commit guard (${l}/pre-commit) was NOT installed.`),!1;throw r}let s=o.status===0?o.stdout.trim():"";if(s===l)return!0;if(s)return d(`core.hooksPath is already set to '${s}' \u2014 leaving it unchanged. The werkmeister secret-commit guard (${l}/pre-commit) was NOT installed. Run 'git config core.hooksPath ${l}' manually if you want to activate it.`),!1;try{w(["git","-C",t,"config","core.hooksPath",l],{capture:!0,check:!0})}catch(r){let a=r instanceof p&&r.code===void 0&&r.stderr?r.stderr.trim():String(r instanceof Error?r.message:r);return d(`Could not set core.hooksPath to ${l} (${a}). The werkmeister secret-commit guard (${l}/pre-commit) was NOT installed.`),!1}return c(`Configuring core.hooksPath -> ${l} (first-time setup)...`),u(`core.hooksPath set to ${l} (secret-commit guard active)`),!0}i(Y,"configureGitHooksPath");function Q(e){let{argv:t,env:o,cwd:s}=I(),r=[...t,...e];c(`Running: ${r.join(" ")}`);try{let a=w(r,{capture:!0,timeout:120,env:o,cwd:s});return a.status!==0?(m(`docker compose failed:
|
|
4
4
|
${a.stderr.trim()}`),!1):!0}catch(a){if(a instanceof p&&a.code==="ENOENT")return m("docker not found"),!1;if(a instanceof p&&a.code==="ETIMEDOUT")return m("docker compose timed out"),!1;throw a}}i(Q,"composeCmd");function ee(){let e=E.join(R(),"corp-ca.crt");if(f.mkdirSync(E.dirname(e),{recursive:!0}),(f.existsSync(e)?f.readFileSync(e,"utf8"):"").includes("BEGIN CERTIFICATE"))return;if(Z.platform()!=="darwin"){f.writeFileSync(e,"");return}let o=["goskope","certadmin","Zscaler","Palo Alto"],s=[];for(let a of o){let n=w(["security","find-certificate","-a","-p","-c",a,"/Library/Keychains/System.keychain"],{capture:!0,timeout:5});n.status===0&&n.stdout.includes("BEGIN CERTIFICATE")&&s.push(n.stdout)}let r=s.join("");f.writeFileSync(e,r),r.includes("BEGIN CERTIFICATE")&&c(`Corporate CA extracted to ${e} (image builds will trust it)`)}i(ee,"ensureCorpCa");async function te(){c("Generating proxy/Caddyfile..."),await B(),H(),j(),J()}i(te,"ensureProxyFiles");async function re(e){if($())return c("Shared infra (Caddy, k8s forwards) skipped (WERKMEISTER_FIXTURE)"),!0;let{argv:t,env:o,cwd:s}=I(),r=t[3];if(!f.existsSync(r))return d(`Missing ${r}`),!1;P(v,"the pre-rename shared infra");let a=["k8s-forwards","caddy",...G(),...F().map(n=>`baseline-${n.service}`)];c(`Starting shared infrastructure (${a.join(", ")})...`);try{let n=await C([...t,"up","-d","--build"],{capture:!0,signal:e,env:o,cwd:s});if(n.status!==0)return m(`docker compose failed:
|
|
5
5
|
${n.stderr.trim()}`),!1;let{recreate:k,leftover:q}=K(await _(),a);for(let h of q)d(`${h.name} was ${h.reason}, and this checkout has no such service: remove it with \`docker rm -f ${h.name}\``);if(k.length){c(`Recreating ${k.join(", ")} from this checkout...`);let h=await C([...t,"up","-d","--no-deps","--force-recreate",...k],{capture:!0,signal:e,env:o,cwd:s});if(h.status!==0)return m(`docker compose failed:
|
|
6
6
|
${h.stderr.trim()}`),!1}return u("Shared infrastructure started"),!0}catch(n){if(n instanceof p&&n.code==="ABORT_ERR")return d("Shared infrastructure start was cancelled"),!1;if(n instanceof p&&n.code==="ENOENT")return m("docker not found"),!1;throw n}}i(re,"startSharedInfra");var oe="/werkmeister/proxy/ui/index.html";function se(e,t,o){return new Promise(s=>{let r=X.createConnection({host:e,port:t}),a=!1,n=i(k=>{a||(a=!0,r.destroy(),s(k))},"finish");r.setTimeout(o*1e3),r.on("connect",()=>n(!0)),r.on("timeout",()=>n(!1)),r.on("error",()=>n(!1))})}i(se,"checkPort");async function V(){let e={};for(let t of await A(y,void 0,{all:!1})??[])e[t.service||t.name]=t.health==="healthy"||t.state==="running"&&!t.health;if(e.caddy){let t=await O(D,["test","-s",oe]).catch(()=>null);e.caddy=t?.exitCode===0}if(!Object.keys(e).length){let t=[["redis",9050],["postgres",9051],["caddy",443]];for(let[o,s]of t)e[o]=await se("127.0.0.1",s,2)}return e}i(V,"checkInfraHealth");async function xe({signal:e}={}){if(e?.aborted)return d("Infrastructure start was cancelled before it began"),!1;Y(),await te(),ee();let t=await re(e);return await b(!0),t}i(xe,"up");async function ve(e){c("Waiting for services to become healthy...");let t=Date.now()+e*1e3,o=await V();for(;Object.keys(o).length>0&&Object.values(o).some(s=>!s)&&Date.now()<t;)await new Promise(s=>setTimeout(s,3e3)),o=await V();return o}i(ve,"infraHealth");async function Ie(){if((await M())["k8s-forwards"]??!1)return u("k8s port-forwards container is already healthy"),!0;c("Attempting to start/restart k8s-forwards container...");let e=await L()!=="failed";return e&&u("k8s port-forwards started"),e}i(Ie,"connectK8s");async function $e(e=!1){await x(),P(v,"the pre-rename shared infra",{removeVolumes:e});let t=["--profile","*","down"];e&&t.push("--volumes");let o=Q(t);if(o){let s="Shared infrastructure stopped";e&&(s+=" (volumes removed)"),u(s)}return o}i($e,"down");async function Re(){await x();let e=await T("stop",y);return e?(m(e),!1):(u("Shared infrastructure stopped (containers preserved, resumable with 'werkmeister infra up')"),!0)}i(Re,"stop");async function Se(){let e=await T("restart",y);return e?m(e):u("Shared infrastructure restarted"),await N(),!e}i(Se,"restart");export{re as a,xe as b,ve as c,Ie as d,$e as e,Re as f,Se as g};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-6LRZ3IGS.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{b as f}from"./chunk-
|
|
3
|
+
import{b as f}from"./chunk-FJP5OIT2.js";import{t as c}from"./chunk-RIQV4YDV.js";import{b as u}from"./chunk-22R4ZVAZ.js";import{h as o,j as a,m as n}from"./chunk-BCBMJ7TX.js";import{a as s,f as i}from"./chunk-ZUHHPL2W.js";i();function m(r,e){let t=r.feature||f(process.cwd()).FEATURE;return t||(n("Feature name required: pass it as an argument or set FEATURE in a .env file."),process.exit(1)),t==="infra"&&(n(`${e} the infra stack is not supported: every workspace shares it.`),process.exit(1)),t}s(m,"featureArg");function p(r,e){throw r instanceof u&&e[r.code]&&(n(r.message),a(e[r.code]),process.exit(1)),r}s(p,"reportHint");async function l(r){let e=m(r,"Pausing");console.log(`
|
|
4
4
|
${o.BOLD}=== werkmeister pause: ${e} ===${o.RESET}
|
|
5
5
|
`);try{let{containers:t}=await c(e);console.log(`
|
|
6
6
|
${o.GREEN}${o.BOLD}Paused '${e}': ${t.length} container(s) frozen, its Claude session is held.${o.RESET} Resume with: werkmeister feature resume ${e}
|
|
7
7
|
`)}catch(t){p(t,{NOT_RUNNING:`Nothing to pause. Start it with: werkmeister feature up ${e}`,ALREADY_PAUSED:`Resume it with: werkmeister feature resume ${e}`,NO_WORKSPACE:"Run it from the workspace folder, or check: werkmeister workspace list",COMPOSE_PAUSE_FAILED:`Undo what did freeze with: werkmeister feature resume ${e}`})}}s(l,"run");export{m as a,p as b,l as c};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-74IUWMDS.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 t,f as r}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as t,f as r}from"./chunk-ZUHHPL2W.js";r();import*as o from"node:path";var i=".werkmeister";function p(e){return o.join(e,i)}t(p,"dotDir");export{i as a,p as b};
|
|
4
|
+
//# sourceMappingURL=chunk-75KCGBN3.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 ut}from"./chunk-
|
|
3
|
+
import{a as ut}from"./chunk-6GEG4M3J.js";import{a as ae,b as $e,c as ce,d as Ae,h as ct,i as ve}from"./chunk-HFVTPZVU.js";import{b as B,c as le,d as st,g as lt,j as at}from"./chunk-Z6MRLCMI.js";import{a as Ce,b as et,c as tt,d as nt,e as se,f as rt,q as it}from"./chunk-OOGEX2KF.js";import{a as ot}from"./chunk-DCVKWVVR.js";import{n as oe,o as we}from"./chunk-EAWQ3V7P.js";import{c as Ke}from"./chunk-HJHTYBRJ.js";import{d as ie,f as ze,n as qe,o as be,q as Qe,r as Xe,s as Ze}from"./chunk-ZI7EPUD4.js";import{A as Ge,B as Je,G as Ye,X as D,r as ke,t as Me,v as He,w as ye,z as We}from"./chunk-BCBMJ7TX.js";import{a,f as L}from"./chunk-ZUHHPL2W.js";L();import*as h from"node:fs";import*as I from"node:os";import*as w from"node:path";L();L();L();function X(e,r=!1){let n=e.length,t=0,o="",i=0,c=16,s=0,l=0,f=0,u=0,p=0;function m(g,S){let b=0,k=0;for(;b<g||!S;){let d=e.charCodeAt(t);if(d>=48&&d<=57)k=k*16+d-48;else if(d>=65&&d<=70)k=k*16+d-65+10;else if(d>=97&&d<=102)k=k*16+d-97+10;else break;t++,b++}return b<g&&(k=-1),k}a(m,"scanHexDigits");function y(g){t=g,o="",i=0,c=16,p=0}a(y,"setPosition");function A(){let g=t;if(e.charCodeAt(t)===48)t++;else for(t++;t<e.length&&W(e.charCodeAt(t));)t++;if(t<e.length&&e.charCodeAt(t)===46)if(t++,t<e.length&&W(e.charCodeAt(t)))for(t++;t<e.length&&W(e.charCodeAt(t));)t++;else return p=3,e.substring(g,t);let S=t;if(t<e.length&&(e.charCodeAt(t)===69||e.charCodeAt(t)===101))if(t++,(t<e.length&&e.charCodeAt(t)===43||e.charCodeAt(t)===45)&&t++,t<e.length&&W(e.charCodeAt(t))){for(t++;t<e.length&&W(e.charCodeAt(t));)t++;S=t}else p=3;return e.substring(g,S)}a(A,"scanNumber");function E(){let g="",S=t;for(;;){if(t>=n){g+=e.substring(S,t),p=2;break}let b=e.charCodeAt(t);if(b===34){g+=e.substring(S,t),t++;break}if(b===92){if(g+=e.substring(S,t),t++,t>=n){p=2;break}switch(e.charCodeAt(t++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
|
|
4
4
|
`;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:let d=m(4,!0);d>=0?g+=String.fromCharCode(d):p=4;break;default:p=5}S=t;continue}if(b>=0&&b<=31)if(Q(b)){g+=e.substring(S,t),p=2;break}else p=6;t++}return g}a(E,"scanString");function $(){if(o="",p=0,i=t,l=s,u=f,t>=n)return i=n,c=17;let g=e.charCodeAt(t);if(Se(g)){do t++,o+=String.fromCharCode(g),g=e.charCodeAt(t);while(Se(g));return c=15}if(Q(g))return t++,o+=String.fromCharCode(g),g===13&&e.charCodeAt(t)===10&&(t++,o+=`
|
|
5
5
|
`),s++,f=t,c=14;switch(g){case 123:return t++,c=1;case 125:return t++,c=2;case 91:return t++,c=3;case 93:return t++,c=4;case 58:return t++,c=6;case 44:return t++,c=5;case 34:return t++,o=E(),c=10;case 47:let S=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t<n&&!Q(e.charCodeAt(t));)t++;return o=e.substring(S,t),c=12}if(e.charCodeAt(t+1)===42){t+=2;let b=n-1,k=!1;for(;t<b;){let d=e.charCodeAt(t);if(d===42&&e.charCodeAt(t+1)===47){t+=2,k=!0;break}t++,Q(d)&&(d===13&&e.charCodeAt(t)===10&&t++,s++,f=t)}return k||(t++,p=1),o=e.substring(S,t),c=13}return o+=String.fromCharCode(g),t++,c=16;case 45:if(o+=String.fromCharCode(g),t++,t===n||!W(e.charCodeAt(t)))return c=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=A(),c=11;default:for(;t<n&&O(g);)t++,g=e.charCodeAt(t);if(i!==t){switch(o=e.substring(i,t),o){case"true":return c=8;case"false":return c=9;case"null":return c=7}return c=16}return o+=String.fromCharCode(g),t++,c=16}}a($,"scanNext");function O(g){if(Se(g)||Q(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}a(O,"isUnknownContentCharacter");function j(){let g;do g=$();while(g>=12&&g<=15);return g}return a(j,"scanNextNonTrivia"),{setPosition:y,getPosition:a(()=>t,"getPosition"),scan:r?j:$,getToken:a(()=>c,"getToken"),getTokenValue:a(()=>o,"getTokenValue"),getTokenOffset:a(()=>i,"getTokenOffset"),getTokenLength:a(()=>t-i,"getTokenLength"),getTokenStartLine:a(()=>l,"getTokenStartLine"),getTokenStartCharacter:a(()=>i-u,"getTokenStartCharacter"),getTokenError:a(()=>p,"getTokenError")}}a(X,"createScanner");function Se(e){return e===32||e===9}a(Se,"isWhiteSpace");function Q(e){return e===10||e===13}a(Q,"isLineBreak");function W(e){return e>=48&&e<=57}a(W,"isDigit");var ft;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(ft||(ft={}));L();var _=new Array(20).fill(0).map((e,r)=>" ".repeat(r)),G=200,Te={" ":{"\n":new Array(G).fill(0).map((e,r)=>`
|
|
6
6
|
`+" ".repeat(r)),"\r":new Array(G).fill(0).map((e,r)=>"\r"+" ".repeat(r)),"\r\n":new Array(G).fill(0).map((e,r)=>`\r
|
|
@@ -88,4 +88,4 @@ ${bn}`}]}if(r)return[{label:t,ok:!0,detail:`configured for ${e.email} (run \`wer
|
|
|
88
88
|
Telepresence stays optional \u2014 this does not block anything except \`werkmeister infra intercept\`. Install manually with: ${ce}`}];let[A,E]=i();if(A)return[A];if(E===null)return[{label:t,ok:!1,optional:!0,detail:`brew ${p} reported success but telepresence is not on PATH`}];let $=E.join(".");return ve(E,ae)?[{label:t,ok:!1,optional:!0,detail:`brew installed ${$}, still < required ${o} \u2014 ${ce}`}]:[{label:t,ok:!0,detail:`installed OSS client ${$} via brew`}]}a(Un,"syncTelepresence");function Bn(e,r,n){let t="playwright chromium (optional)",o=`playwright@${ut}`,i="",c=a(()=>{let[u,p]=e(["npx","-y",o,"install","--dry-run","chromium"]);i=p;let m=[...p.matchAll(/Install location:\s*(\S.*)$/gm)].map(y=>y[1].trim());return u!==0||m.length===0?null:m.filter(y=>!h.existsSync(w.join(y,"INSTALLATION_COMPLETE")))},"missingDirs"),s=c();if(s===null)return[{label:t,ok:!1,optional:!0,detail:`\`npx ${o} install --dry-run chromium\` failed: ${U(i)}`}];if(s.length===0)return[{label:t,ok:!0,detail:`chromium for ${o} present`}];if(r)return[{label:t,ok:!1,optional:!0,detail:`chromium for ${o} missing \u2014 re-run \`werkmeister machine setup\``}];let l=(n??Lt)(["npx","-y",o,"install","chromium"]),f=c();if(l!==0||f===null||f.length>0){let u=l!==0?`exited ${l}`:"finished, but the browser is still not reported installed";return[{label:t,ok:!1,optional:!0,detail:`\`npx ${o} install chromium\` ${u} \u2014 run it manually to see why`}]}return[{label:t,ok:!0,detail:`installed chromium for ${o}`}]}a(Bn,"syncPlaywright");var je=22,Ie=a(e=>e.split(`
|
|
89
89
|
`)[0]?.trim()??"","firstLine");function jr(e=N,r=process.versions.node){let n=["claude","opencode","codex"].filter(l=>e([l,"--version"])[0]!==127),t=n.length?{label:"harness",ok:!0,detail:n.join(", ")}:{label:"harness",ok:!1,detail:"none of claude, opencode, codex on PATH. Install Claude Code: https://docs.claude.com/en/docs/claude-code/setup (OpenCode and Codex also work: see werkmeister's Harnesses page, docs/harnesses.md)."},[o,i]=e(["git","--version"]),c=o===0?{label:"git",ok:!0,detail:Ie(i)}:{label:"git",ok:!1,detail:`${o===127?"not on PATH":`\`git --version\` failed: ${Ie(i)}`}. Install it: \`xcode-select --install\` on macOS, \`sudo apt install git\` on Debian/Ubuntu.`},s=Number.parseInt(r,10)>=je?{label:"Node.js",ok:!0,detail:`v${r}`}:{label:"Node.js",ok:!1,detail:`v${r} is too old; werkmeister needs ${je} or later: https://nodejs.org, or \`nvm install ${je}\`.`};return[t,c,s,Mn(e)]}a(jr,"checkPrerequisites");function Vn(e){let r=e.split(`
|
|
90
90
|
`).map(t=>t.trim()).filter(Boolean),n=r.indexOf("Server:");return(n>=0?r[n+1]:void 0)??r.at(-1)??""}a(Vn,"dockerInfoError");function Mn(e){let r="docker",[n,t]=e(["docker","info"]);if(n===127)return{label:r,ok:!1,detail:"not on PATH. Install a container manager with Compose v2: OrbStack or Docker Desktop on macOS; Docker Engine with the compose plugin on Linux (https://docs.docker.com/engine/install/)."};if(n!==0)return{label:r,ok:!1,detail:"`docker` is installed but `docker info` failed: the daemon isn't running, or you can't reach its socket. Start it (OrbStack, Docker Desktop, or `sudo systemctl start docker`), or on Linux add yourself to the `docker` group. "+Vn(t)};let[o,i]=e(["docker","compose","version"]);return o!==0?{label:r,ok:!1,detail:"`docker compose version` failed: Compose v2 is missing. Install the compose plugin (https://docs.docker.com/compose/install/)."}:{label:r,ok:!0,detail:Ie(i)}}a(Mn,"dockerPrerequisite");async function _r(e={}){let r=e.checkOnly??!1,n=e.reposRoot??Ye(),t=e.claudePluginsDir??w.join(I.homedir(),".claude","plugins"),o=e.repoPluginDir??w.join(D(),"plugins",x),i=e.runner??N,c=e.jira??Qe(),s=[],l=e.pathDirs??{repos_root:be().repos_root,workspaces_root:be().workspaces_root};s.push(...pn(r,l)),s.push(...mn(r,e.registry??{}));let[f]=i(["claude","--version"]);if(f===127)s.push({label:"claude CLI",ok:!1,optional:!0,detail:"not on PATH \u2014 the werkmeister plugins install into Claude Code only, so that step is skipped. Install Claude Code (https://claude.com/claude-code; the VS Code extension alone does not put `claude` on PATH) and re-run `werkmeister machine setup` to add them."});else{for(let m of en){let y=null;m.name===x&&(y=a(()=>At(o,t),"driftProbe"));let A=_t(m,t,i,r,y);s.push(...A),m.name===x&&(r||A.every(E=>E.ok))&&s.push(...tn(t,i,r))}for(let m of nn)s.push(...fn(m,t,i,r,e.optionalPlugins?.includes(m.name)??!1))}let u=e.workspaceRepo??(Ze()||sn(i));u?s.push(...vt(n,an(u),i,r,e.repointWorkspaceOrigin)):s.push({label:`repo ${Ne}`,ok:!1,optional:!0,detail:"no workspace repo configured and `gh` could not name one \u2014 set overrides.workspace_repo (or run `gh auth login`, then `werkmeister machine setup`). Workspaces will fall back to plain directories."}),(e.demo||h.existsSync(w.join(n,Ot)))&&s.push(...vt(n,cn,i,r)),s.push(...it({reposRoot:n,checkOnly:r}));let p=typeof e.hostnames=="function"?e.hostnames():e.hostnames??[];return s.push(...kn(r,{hostnames:p,ingress:e.ingress??void 0,skipSudo:e.skipSudo},e.interactiveRunner)),s.push(...await $n(c,r,e.jiraVerifier)),s.push(...Un(i,r,{install:e.installTelepresence})),s.push(...Bn(i,r,e.interactiveRunner)),s.push(...Sn(r,e.mapEditorSchemas??!1)),s.push(...En(r,e.grantStandardsDir??!1)),s.push(...On(r)),s.push(...Fn(r,e.installVscodeExtension??!1,Bt(i),i)),s.push(...In(r,e.installPrWatch??!1,{runner:i})),s.push(...await Dn(r,e.installDaemon??!1,{runner:i})),s}a(_r,"runSetup");export{At as a,nn as b,Ne as c,rn as d,Tt as e,on as f,xr as g,sn as h,It as i,vn as j,ne as k,Tn as l,jn as m,_n as n,Or as o,Dn as p,Lr as q,Bt as r,jr as s,_r as t};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
91
|
+
//# sourceMappingURL=chunk-7NLVIWLA.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 n,f as o}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as n,f as o}from"./chunk-ZUHHPL2W.js";o();function u(t){return t.listenerCount("SIGINT")>1}n(u,"claimed");var r=new AbortController;function s(){return r.signal}n(s,"interruptSignal");function d(t=process,i=()=>{},l=e=>process.exit(e)){let e=!1;r=new AbortController,t.on("SIGINT",()=>{if(r.abort(),u(t)&&!e){e=!0;return}i(),l(130)})}n(d,"installDefaultInterrupt");export{s as a,d as b};
|
|
4
|
+
//# sourceMappingURL=chunk-7QEWBXGU.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{L as re,d as q,g as se,u as Ie,w as ut,x as pt}from"./chunk-
|
|
3
|
+
import{L as re,d as q,g as se,u as Ie,w as ut,x as pt}from"./chunk-AW4CP76H.js";import{a as oe,b as gt,c as yt}from"./chunk-3AYNZOUO.js";import{c as he,d as Qe,e as Ze,g as et,h as j,i as tt,j as I,k as nt,m as V,n as me,o as ge}from"./chunk-WCGY5X7K.js";import{f as Ve,k as ze,n as Je}from"./chunk-D27WWCVA.js";import{B as dt,C as Se,I as lt,K as Y,Q as ne,T as G,o as z,u as U,z as ke}from"./chunk-RGIMSORZ.js";import{a as st,c as rt,d as ye,e as ot,f as it,g as je,h as we,i as B,j as at,k as ct}from"./chunk-IECB6DWF.js";import{a as ft}from"./chunk-Q4HX6DRM.js";import{a as ue}from"./chunk-RGG35HSH.js";import{o as te}from"./chunk-EAWQ3V7P.js";import{c as Oe,d as ht,e as mt}from"./chunk-GWNFXG6C.js";import{d as M,e as fe}from"./chunk-ZI7EPUD4.js";import{b as pe}from"./chunk-22R4ZVAZ.js";import{I as qe,S as Xe,_ as Ke,a as Ae,j as C,k as b,l as A}from"./chunk-BCBMJ7TX.js";import{a as K,b as v}from"./chunk-75KCGBN3.js";import{a,e as Re,f as g}from"./chunk-ZUHHPL2W.js";g();var Qt="This is an interactive run: check with me at each stage's human check.",wt="Run `werkmeister feature up` only when the gate, the exercise or a measurement needs the container, and `werkmeister feature stop` this workspace's containers right after `werkmeister pr open` succeeds.",Ne=["Tests never call the real Jira or GitHub APIs; the tracker is mocked. The only real issue updates are the status moves `werkmeister issue start` and `werkmeister pr open` make for this ticket and its `group:` members; run both. A follow-up the run finds is filed with `werkmeister issue create --relates <this ticket>` (SW-815); no other tracker writes.","Never read or write the real `~/.werkmeister`; tests use a temporary HOME. To see the machine config's shape run `werkmeister machine config`: it masks secrets such as `jira.api_token`.","No `npm link`, `npm`/`pnpm install -g`, `npm publish`, `werkmeister infra proxy-reload`, and no other workspaces.",'Where the ticket says "to confirm", use it as written unless the code shows a reason to change it, and record each choice in the stage output for PR review.',wt].map(e=>`- ${e}`).join(`
|
|
4
4
|
`),kt=[[/werkmeister registry sync/,"- Registry sync: the next `werkmeister registry sync` after merge picks up the change; the gate reads the branch's own `.werkmeister/services.yaml` fragment."],[/werkmeister infra proxy-reload/,"- Proxy reload: the next `werkmeister infra proxy-reload` after merge applies the change."],[/(?:npm|pnpm|yarn) link\b/,"- Linking the CLI: after merge, if at all; the run runs the built binary with `node`."],[/(?:(?:npm|pnpm|yarn) (?:install|i|add)\b[^`\n]*?(?: -g\b| --global\b)|yarn global add\b)/,"- Global installs: after merge, if at all; the run uses the workspace's own install."]],Zt=a(e=>new RegExp(`(?:^|(?<!["\u201C'])\\brun )\`?${e.source}`,"i"),"stepRe"),en=kt.map(([e])=>Zt(e)),tn=/^(\s*(?:[-*]|\d+\.) +(?:\[[ x]\] +)?)?(.*)$/;function St(e){let t=new Set,n=e.split(`
|
|
5
5
|
`).flatMap(s=>{let[,r="",o=""]=tn.exec(s)??[],i=o.split(/(?<=[.!?]) +/).filter(c=>{let d=en.flatMap((l,u)=>l.test(c)?[u]:[]);for(let l of d)t.add(l);return!d.length});return i.join(" ")===o?[s]:i.length?[r+i.join(" ")]:[]});return t.size?[n.join(`
|
|
6
6
|
`).trimEnd(),"","## After merge","","Not steps for this run: the run limits forbid writing machine state under `~/.werkmeister` and global installs. These happen after the PR merges:",...kt.filter((s,r)=>t.has(r)).map(([,s])=>s)].join(`
|
|
@@ -294,4 +294,4 @@ ${r}
|
|
|
294
294
|
`),b(`Salvaged legacy Handoff Notes \u2192 ${x.relative(e,x.join(o,i))}`)}catch(n){A(`Could not salvage legacy Handoff Notes: ${n.message}`)}}a(es,"salvageLegacyHandoffNotes");function ts(e){return e.type==="handoff"&&e.frontmatter.author==="workspace-creation"&&!e.body.includes("Seeded from `starting_prompt`")}a(ts,"isPlaceholderHandoff");function ns(e){let t=S.readFileSync(e.path,"utf8");S.writeFileSync(e.path,t.replace(/^status:.*$/m,"status: superseded"))}a(ns,"supersedeNote");function ss(e,t,n,s=null){let r=t.trim();if(!r&&!s)return;let o=n.trim().toLowerCase(),i=ne(o);try{let c=ie(e),d=ve(e,!0).filter(p=>p.type==="handoff");if(d.some(p=>!ts(p)))return;for(let p of d)ns(p);S.mkdirSync(c,{recursive:!0});let l=Le(Fe(c),"handoff","starting-prompt"),u=["---","type: handoff",`phase: ${i.phases[0]}`,"author: workspace-creation","refs: []","status: open","---","","# Handoff: workspace creation",""];s&&u.push(oe(s)),o&&u.push(`This workspace is a ${o} \u2014 ${i.hint}.`,""),r&&u.push("Seeded from `starting_prompt` in .werkmeister/workspace.yml when the","workspace was created. The task below has not begun \u2014 confirm","direction with the user before executing it.","",r),S.writeFileSync(x.join(c,l),u.join(`
|
|
295
295
|
`)+`
|
|
296
296
|
`),b(`Seeded starting handoff \u2192 ${x.relative(e,x.join(c,l))}`)}catch(c){A(`Could not seed starting handoff: ${c.message}`)}}a(ss,"seedStartingHandoff");function rs(e){let{workspaceRoot:t,workspaceName:n,repos:s,task:r,meta:o,inputs:i,configOverride:c}=e,d=q(t),l=x.join(t,d.instructionsFile),u=null,p=null,h=I(null,j(t));if(Object.keys(h).length){let[R,ee]=G();for(let H of nt(R,h))A(H);let _e=Y(t,c),de=s.map(([H])=>H),Jt=(o.SERVICES??"").split(",").map(H=>H.trim()).filter(H=>H),[le]=V(de,R,ee,_e,h,Jt);p=le,u=gt(le,h,de,i.work_type??""),C(`Standards routing: active = ${le.join(", ")}`),ge(t,me(le,h,ne(i.work_type??"").gate))}else A(fe()||`no standard modules found in ${M()} \u2014 this workspace gets no standards routing, skills, or edit-time gate`);S.mkdirSync(ie(t),{recursive:!0}),es(t,l);let $=i.starting_prompt??"";ss(t,$,i.work_type??"",e.isCreate||$.trim()?e.issue??null:null);let _=yt(n,t,s,r,o,u,e.issue??null);S.writeFileSync(l,_+d.notice()),b(`Wrote ${l}`);let X=x.join(v(t),"issues-report.md");S.mkdirSync(x.dirname(X),{recursive:!0}),S.writeFileSync(X,Ee(n,U(o),z({project:i.project,text:U(o)}),d.questionTool)),b(`Wrote ${X}`);let Z=x.join(v(t),"pr-rules.md");S.writeFileSync(Z,ye(".werkmeister/notes/")),b(`Wrote ${Z}`);for(let R of Ye(t,null,null,p))b(`Wrote ${R}`);if(d.agents&&os(e),se(t)){let R=Ie(t);re(t),b(`Wrote ${R}`)}}a(rs,"init");function os({workspaceRoot:e,repos:t,meta:n}){let[s,r]=G(),o=Xe(),i=Je(t,n,s,r,o),c={};try{c=ft(s)}catch{c={}}let d=Wt(i,s,o,(n.FEATURE??"").trim(),c,(n.TEST_PATH??"").trim());for(let l of Mt(e,d))b(`Wrote ${l}`)}a(os,"writeAgents");var Kt={id:"jit",init:rs,refresh(e){se(e)&&(Ie(e),re(e))},check(e){let t=ce(e),{authoring:n,drift:s}=Yt(e,t?.active??null),r=qt(e,t);return[...n,...s,...r===null?[]:[r]]},sync(e){let{written:t,manifestPath:n}=Xt(e);return{wrote:n===null?t:[...t,n]}},sessionContext(e,t){let n=String(t.source||"");return(n==="compact"||n==="clear")&&ht(e,String(t.session_id||"")),_t(e,n)||null},gate:mt,ownedPaths:a(()=>["CLAUDE.md","AGENTS.md",".claude/settings.json",".claude/skills/w9r-*",".agents/skills/w9r-*",".claude/agents/w9r-*",".claude/skills/sb-*",".claude/agents/sb-*",`${K}/notes`,`${K}/standards.json`,`${K}/issues-report.md`,`${K}/pr-rules.md`,`${K}/.gate`],"ownedPaths"),decisions:$e};var zt={jit:Kt,icm:Ge};function Vr(e){return zt[e]}a(Vr,"strategyById");function is(e){let t=e==null?"":String(e).trim();if(!t)return"jit";if(ke.includes(t))return t;throw new pe(`Unknown context_strategy '${t}' in workspace.yml \u2014 expected one of: ${ke.join(", ")}`,"UNKNOWN_CONTEXT_STRATEGY")}a(is,"parseStrategyId");function as(e){return is(lt(e,"context_strategy"))}a(as,"readContextStrategy");function zr(e){return zt[as(e)]}a(zr,"strategyFor");function Vt(e,t){let n=[];for(let s of t){if(!s.endsWith("*")){Q.existsSync(W.join(e,s))&&n.push(s);continue}let r=W.dirname(s),o=W.basename(s).slice(0,-1),i;try{i=Q.readdirSync(W.join(e,r)).sort()}catch{continue}for(let c of i)c.startsWith(o)&&n.push(W.join(r,c))}return n}a(Vt,"expandOwned");function cs(e,t,n){let s=new Set(Vt(e,n.ownedPaths()));return Vt(e,t.ownedPaths()).filter(r=>!s.has(r))}a(cs,"leftoverPaths");function ds(e,t){if(te(["git","-C",e,"ls-files","--error-unmatch","--",t],{capture:!0}).status!==0)return!1;let s=te(["git","-C",e,"status","--porcelain","--ignored","--untracked-files=all","--",t],{capture:!0});return s.status===0&&!s.stdout.trim()}a(ds,"restorable");function Jr(e,t,n,s){let r=cs(e,t,n);if(r.length){if(!s){A(`${t.id} layer still present: ${r.join(", ")}; remove by hand or run \`werkmeister workspace init --prune-context\``);return}for(let o of r)ds(e,o)?(Q.rmSync(W.join(e,o),{recursive:!0,force:!0}),b(`Pruned ${o}`)):A(`Kept ${o}: untracked, ignored or modified \u2014 git could not restore it`)}}a(Jr,"reportLeftovers");export{Qt as a,wt as b,Ne as c,St as d,nn as e,ls as f,ln as g,ve as h,un as i,De as j,rn as k,O as l,an as m,Ss as n,cn as o,$t as p,bs as q,Vr as r,is as s,zr as t,Jr as u};
|
|
297
|
-
//# sourceMappingURL=chunk-
|
|
297
|
+
//# sourceMappingURL=chunk-A3PD2YCB.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 tt,c as U,d as rt,f as ot,h as nt}from"./chunk-
|
|
3
|
+
import{a as tt,c as U,d as rt,f as ot,h as nt}from"./chunk-7NLVIWLA.js";import{h as et}from"./chunk-RIQV4YDV.js";import{i as Qe,t as Ze}from"./chunk-G6P5S372.js";import{b as Xe,c as ae,g as fe,h as qe,i as ue,j as pe}from"./chunk-TBPDWOCX.js";import{r as ie,s as ce,u as Ye}from"./chunk-A3PD2YCB.js";import{c as se,d as Be}from"./chunk-AW4CP76H.js";import{c as Ne,d as De}from"./chunk-GYYFL2DJ.js";import{q as We}from"./chunk-OOGEX2KF.js";import{h as Te}from"./chunk-WCGY5X7K.js";import{n as Oe}from"./chunk-D27WWCVA.js";import{A as Le,B as Me,G as re,H as Pe,J as z,L as oe,O as Ge,S as He,T as ne,i as Ie,o as j,p as Fe,x as Ue,z as te}from"./chunk-RGIMSORZ.js";import{b as Ke,e as ze,g as Je}from"./chunk-USMQVQQO.js";import{a as B}from"./chunk-RGG35HSH.js";import{o as K}from"./chunk-EAWQ3V7P.js";import{a as Ve}from"./chunk-GWNFXG6C.js";import{v as je}from"./chunk-5NEVLQZT.js";import{b as Re}from"./chunk-HJHTYBRJ.js";import{b as be,c as Ae}from"./chunk-KF4SDWYK.js";import{o as _e,p as ee,s as xe}from"./chunk-ZI7EPUD4.js";import{c as Z}from"./chunk-22R4ZVAZ.js";import{G as Q,M as $e,S as ve,T as Ce,a as Rt,h as R,j as k,k as y,l as g,m as V,n as F,o as Se,r as Ee,s as q}from"./chunk-BCBMJ7TX.js";import{b as I}from"./chunk-75KCGBN3.js";import{a as i,e as At,f as b}from"./chunk-ZUHHPL2W.js";b();import*as T from"node:fs";import*as J from"node:path";var st=i(e=>J.join(I(e),"issue.md"),"issueCopyPath"),L=class extends Error{static{i(this,"IssueFetchError")}};async function it(e,r=()=>new Date,o=j({text:e})){let t=await o.fetchIssue(e);if(!t)throw new L(`couldn't read ${e} from ${o.label}`);return{ref:t.ref,url:t.url??o.url(t.ref),tracker:o.id,title:t.title??"",status:t.status??"",body:t.description??"",comments:t.comments??[],fetchedAt:r().toISOString()}}i(it,"fetchIssueSnapshot");var le=`
|
|
4
4
|
|
|
5
5
|
## Comments
|
|
6
6
|
`;function jt(e){let r=["---",`ref: ${e.ref}`,`url: ${e.url??""}`,`tracker: ${e.tracker}`,`status: ${e.status}`,`fetched: ${e.fetchedAt}`,"---","",`# ${e.title}`,"",e.body].join(`
|
|
@@ -32,5 +32,5 @@ ${R.BOLD}Workspace initialised.${R.RESET} Open a new Claude Code session from th
|
|
|
32
32
|
`),{containers:H}):(o.quietNoSlot||g(`Workspace initialised, but the container step did not run: no slot, so ${B} was not (re)generated (see the slot warning above). \`werkmeister feature up\` fails until you free a slot and rerun \`werkmeister workspace init\`.`),{containers:H})}i(tr,"initWorkspace");var rr="`werkmeister workspace init` just regenerated this workspace's contracts (CLAUDE.md, CONTEXT.md, `_shared/`, the stage CONTEXT.md files; committed on the record branch as `chore: regenerate workspace contracts`). Re-read CLAUDE.md and the current stage's CONTEXT.md before going on: their rules now govern. An instruction the person gave you in chat still wins; if the two conflict, ask.";function or(e,r){let o=i(n=>u.existsSync(a.join(e,n))?u.readdirSync(a.join(e,n)).map(s=>a.join(n,s,"CONTEXT.md")).filter(s=>u.existsSync(a.join(e,s))):[],"stageContracts"),t=r.flatMap(n=>n==="stages"?o(n):[n]).filter(n=>!n.includes("*")&&!n.endsWith("/notes")).filter(n=>u.existsSync(a.join(e,n)));return!t.length||!pe(e,"chore: regenerate workspace contracts",t)?!1:(et(e).length&&je(e,rr),!0)}i(or,"recordRegeneratedContracts");async function nr(e,r,o,t){k(`Running: werkmeister workspace init (feature: ${r})`);try{return await tr({...o,feature:r,force:t.force},e,{...t,quietNoSlot:!0})}catch(n){return n instanceof x||V(`init-workspace failed: ${n.message}`),null}}i(nr,"runInitWorkspace");async function Kr(e,r={}){let o=(e.feature??"").trim();o||S("A feature name is required (pass it as an argument, set it in ./.werkmeister/workspace.yml, or run interactively)."),ce(e.context_strategy),se(e.harness);let t=o.toLowerCase();try{let c=Fe(e.issue_id??"",e.project);c&&(e.project=c.name)}catch(c){S(c.message)}let n=j({project:e.project,text:e.issue_id});e.issue_id&&(e.issue_id=n.parseRef(e.issue_id)??e.issue_id);let s=Ht(o,e.issue_id?n.slug(e.issue_id):null);Gt.test(s)||S(`Workspace name '${s}' is not a valid slug (expected lowercase letters, digits, and single hyphens).`);let m=Bt(W.userInfo().username,s),f=a.join(St(),s);if(u.existsSync(f))k(`Workspace already exists: ${f} \u2014 re-running init-workspace.`);else{re({...e}),Et();let c=await zt(e.repos,e.services);e.repos=c.join(","),Vt(f,m,!!r.force),e.context_strategy||=te[0],e.harness||=Ie[0],gt(f,e)}let d=await nr(f,t,e,r);if(!d){let c=`werkmeister workspace init failed. The workspace root exists at ${f}; re-run \`werkmeister workspace init\` from there once resolved.`;throw g(c),new x(c)}return Kt(f,s),d.containers?(F(`
|
|
33
33
|
${R.BOLD}Workspace ready.${R.RESET} cd ${f} and open a Claude Code session from there.
|
|
34
34
|
|
|
35
|
-
`),f):(g(`Workspace created at ${f}, but its containers are not set up: it has no slot (see the slot warning above). Free a slot with \`werkmeister feature down <feature>\`, then run \`werkmeister workspace init\` there.`),f)}i(Kr,"provisionWorkspace");export{L as a,it as b,x as c,we as d,gt as e,
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
`),f):(g(`Workspace created at ${f}, but its containers are not set up: it has no slot (see the slot warning above). Free a slot with \`werkmeister feature down <feature>\`, then run \`werkmeister workspace init\` there.`),f)}i(Kr,"provisionWorkspace");export{L as a,it as b,x as c,we as d,gt as e,Jt as f,tr as g,Kr as h};
|
|
36
|
+
//# sourceMappingURL=chunk-ADJJMQ66.js.map
|