werkmeister 0.106.1 → 0.106.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{branch_cli-EBIFI3ED.js → branch_cli-JETPEPEB.js} +2 -2
- package/dist/{budget-36FZKZ3S.js → budget-EMDJHUZW.js} +2 -2
- package/dist/{cache-HX36GYZD.js → cache-VH343SGC.js} +2 -2
- package/dist/{chunk-XZLAKVZJ.js → chunk-2BULOJVO.js} +2 -2
- package/dist/{chunk-DVEABL63.js → chunk-2DBZKGIU.js} +2 -2
- package/dist/{chunk-RUFIL26S.js → chunk-2KGWTVUF.js} +2 -2
- package/dist/{chunk-C5QNMHU5.js → chunk-2NFT42IF.js} +59 -59
- package/dist/{chunk-FMQUMUQ4.js → chunk-3VJ4C2CN.js} +2 -2
- package/dist/{chunk-EVQ57ISQ.js → chunk-5GXLVMK5.js} +2 -2
- package/dist/{chunk-CM4D7LHD.js → chunk-5OUJNWAM.js} +13 -6
- package/dist/{chunk-7WG4Y2CG.js → chunk-5PN52RW2.js} +2 -2
- package/dist/{chunk-3NKQV6C5.js → chunk-5ZJKA5OW.js} +2 -2
- package/dist/{chunk-UTXHZ5GS.js → chunk-6BHYISUC.js} +2 -2
- package/dist/{chunk-UKSXDIU6.js → chunk-6GSLBNSO.js} +2 -2
- package/dist/{chunk-5OZVS7NT.js → chunk-6WAX3TN7.js} +2 -2
- package/dist/chunk-7PMM5QF2.js +4 -0
- package/dist/{chunk-Q6H6XIV2.js → chunk-AK2RNAK4.js} +2 -2
- package/dist/{chunk-M44TJ2WK.js → chunk-AMPZ25LL.js} +2 -2
- package/dist/{chunk-TMTALVSE.js → chunk-BBFH7ZYQ.js} +2 -2
- package/dist/{chunk-4XYL2PXR.js → chunk-C4NISUCD.js} +2 -2
- package/dist/{chunk-RQ354RWJ.js → chunk-C5Y2VT7T.js} +2 -2
- package/dist/{chunk-GNFH4P64.js → chunk-CEX6NSVX.js} +2 -2
- package/dist/{chunk-YXFJHYQQ.js → chunk-CQVUACSI.js} +2 -2
- package/dist/{chunk-AZV5CPUO.js → chunk-CY52AP7T.js} +2 -2
- package/dist/{chunk-MGE6FOQK.js → chunk-EUAKA2TJ.js} +3 -3
- package/dist/{chunk-2V6OGGWX.js → chunk-EUXDTOEA.js} +2 -2
- package/dist/{chunk-JG3JU3DL.js → chunk-FOGR2ACA.js} +2 -2
- package/dist/{chunk-J3PWCV5T.js → chunk-GFFMALZM.js} +2 -2
- package/dist/{chunk-LDWY5AO7.js → chunk-HG4FHUTY.js} +2 -2
- package/dist/{chunk-5POYDWEI.js → chunk-HGLRTVMS.js} +2 -2
- package/dist/{chunk-X43YGQRM.js → chunk-IVPJOHAW.js} +2 -2
- package/dist/{chunk-QCFF6LJD.js → chunk-JKQKWHFO.js} +2 -2
- package/dist/{chunk-A5CW7S74.js → chunk-JY5RRYPX.js} +2 -2
- package/dist/{chunk-QPLOUI6B.js → chunk-KM6DK6GX.js} +2 -2
- package/dist/{chunk-AQDEK7UK.js → chunk-KS7FAQEY.js} +30 -30
- package/dist/{chunk-WEVEJVTE.js → chunk-KZNN4JQ5.js} +2 -2
- package/dist/{chunk-4UKJ6WV2.js → chunk-LAMNBHU4.js} +3 -3
- package/dist/{chunk-VM7ZXZY5.js → chunk-LGSTJB6Y.js} +2 -2
- package/dist/{chunk-DJ6UAC5F.js → chunk-MU4LB2UB.js} +2 -2
- package/dist/{chunk-ODRTIW7P.js → chunk-NBJEOAWU.js} +2 -2
- package/dist/{chunk-VJMAWBM3.js → chunk-OAOP46VL.js} +2 -2
- package/dist/{chunk-QSAP6RXW.js → chunk-OUSF3XT7.js} +2 -2
- package/dist/{chunk-WFWV6QBD.js → chunk-P2T7I5LN.js} +2 -2
- package/dist/{chunk-LXM5M6QC.js → chunk-PMFK5SOZ.js} +3 -3
- package/dist/{chunk-ZJO3MZCG.js → chunk-QBG2YX2C.js} +2 -2
- package/dist/{chunk-O3LTMVWP.js → chunk-R2WVDX2E.js} +2 -2
- package/dist/{chunk-6UILYYIR.js → chunk-RGDNNSQS.js} +2 -2
- package/dist/{chunk-LDM4DSX5.js → chunk-SXJRMLKH.js} +2 -2
- package/dist/{chunk-P7ZXMPT6.js → chunk-T6TLVQVT.js} +5 -5
- package/dist/{chunk-LEIGZNC2.js → chunk-T7OOLGVP.js} +2 -2
- package/dist/{chunk-7LZUSED6.js → chunk-TJMX66IK.js} +2 -2
- package/dist/{chunk-QACXPGFV.js → chunk-TPWXY2XF.js} +3 -3
- package/dist/{chunk-IKRJFEJY.js → chunk-UAS6B374.js} +2 -2
- package/dist/{chunk-TXQA2C3Z.js → chunk-UDZ2NQCL.js} +2 -2
- package/dist/{chunk-FUPY7GOL.js → chunk-UQFFUGJX.js} +2 -2
- package/dist/{chunk-TJRDYOS7.js → chunk-VCF5K7BA.js} +2 -2
- package/dist/{chunk-XJ7TG2CQ.js → chunk-VMCZ7W2Y.js} +2 -2
- package/dist/{chunk-35X2SXHN.js → chunk-W4TLJUUD.js} +2 -2
- package/dist/{chunk-XV5YOBQC.js → chunk-W6MSCFUD.js} +2 -2
- package/dist/{chunk-ZTYC6W2S.js → chunk-WEN33WTO.js} +2 -2
- package/dist/{chunk-XCLVBVM6.js → chunk-WJWDZ7BB.js} +2 -2
- package/dist/{chunk-U4BEJLV2.js → chunk-WJXANJ7I.js} +2 -2
- package/dist/{chunk-YQ27WSRB.js → chunk-WLY5Z5PB.js} +2 -2
- package/dist/{chunk-4PCQGGEE.js → chunk-WR4JFTO5.js} +2 -2
- package/dist/chunk-XHYKEIVE.js +86 -0
- package/dist/{chunk-HMESEZ2F.js → chunk-XM3O6XCT.js} +2 -2
- package/dist/chunk-YNO6SNTS.js +122 -0
- package/dist/{chunk-JGYCNNRB.js → chunk-YY24C4EA.js} +2 -2
- package/dist/{chunk-W3IMS7MG.js → chunk-YYRINVLL.js} +2 -2
- package/dist/{chunk-4SHYCHSD.js → chunk-ZNHJPO75.js} +2 -2
- package/dist/{chunk-ICCZDJXN.js → chunk-ZYGOEUIM.js} +2 -2
- package/dist/clean-FETGYIQX.js +8 -0
- package/dist/close_out-EWUDI5ZC.js +8 -0
- package/dist/code-BLFGL2ZT.js +4 -0
- package/dist/{config-OB73GAUN.js → config-LYBKLTDX.js} +2 -2
- package/dist/{connect-SXWSVMDX.js → connect-CTPZADK2.js} +2 -2
- package/dist/{daemon-BFLI6JN5.js → daemon-6QTUP4IK.js} +2 -2
- package/dist/dashboard.js +1 -1
- package/dist/{detect-WFOBAVCF.js → detect-M7BKBZ55.js} +2 -2
- package/dist/{down-MXQIWODX.js → down-WR5PXHM7.js} +3 -3
- package/dist/fixture-YJHIRS5U.js +135 -0
- package/dist/form-cli.js +1 -1
- package/dist/hooks-DDSK2YPP.js +4 -0
- package/dist/{hooks_gen-T4Y5PING.js → hooks_gen-HLAXK7H3.js} +2 -2
- package/dist/infra-JCXA2TLF.js +4 -0
- package/dist/init_workspace-JJHH7LBO.js +4 -0
- package/dist/{intercept-6RO6HBXA.js → intercept-AZ5LZHMI.js} +2 -2
- package/dist/{issue-S34MRPMM.js → issue-ES3LJIK2.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-W3LYGIXP.js +7 -0
- package/dist/logs-V6HV5FM2.js +6 -0
- package/dist/main.js +3 -3
- package/dist/mcp-proxy.js +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{metrics-K2G22ZIK.js → metrics-QPEYV3JH.js} +2 -2
- package/dist/migrate-GI5AIKPE.js +4 -0
- package/dist/notes-FTYYX42W.js +4 -0
- package/dist/{open-CDU2BQRP.js → open-TZ7ORMYI.js} +2 -2
- package/dist/{optimize-Z5UCLUCY.js → optimize-OQ7QLOIQ.js} +2 -2
- package/dist/pause-LN7EGVFO.js +4 -0
- package/dist/pr-66BGNRQU.js +5 -0
- package/dist/proxy_reload-RU7UCXVB.js +6 -0
- package/dist/{registry-QVBQJWCO.js → registry-HNVC7S77.js} +2 -2
- package/dist/remove-6RWE3P6C.js +7 -0
- package/dist/remove_workspace-6UUGSSDD.js +8 -0
- package/dist/restart-WGNQ2R5V.js +8 -0
- package/dist/resume-EEAK3KMA.js +8 -0
- package/dist/safari-DJWBTYRJ.js +8 -0
- package/dist/{sandbox-473HHZCF.js → sandbox-2OUJVG62.js} +2 -2
- package/dist/{services-3MEQPUKL.js → services-AHJSVFAB.js} +2 -2
- package/dist/{setup-M7A4CSB2.js → setup-TCHTCRSG.js} +2 -2
- package/dist/skills-KMZD4FSG.js +4 -0
- package/dist/{slots-66JPP6W6.js → slots-Y3RTYCNO.js} +2 -2
- package/dist/{standards-K6CSQ2C5.js → standards-SFV2VQVM.js} +2 -2
- package/dist/start_args-OQ42XPSL.js +4 -0
- package/dist/starting_prompt-UEAHLET3.js +4 -0
- package/dist/stats-RGDM7S6H.js +4 -0
- package/dist/{status-XOTUSC32.js → status-LYH3TX66.js} +2 -2
- package/dist/{stop-DUA7KCKE.js → stop-WZ7ZPN4G.js} +2 -2
- package/dist/{telepresence-XFZJNX4O.js → telepresence-KINLUYLI.js} +2 -2
- package/dist/{test-HJT7I4TP.js → test-UKCNFJQQ.js} +2 -2
- package/dist/{tokens-PGRLSPLQ.js → tokens-5XO5HYGQ.js} +2 -2
- package/dist/{up-SB3CKMMD.js → up-BLQJFV3G.js} +3 -3
- package/dist/{v4-AMXTH5LX.js → v4-WMYODVAM.js} +2 -2
- package/dist/wait_load-RSOVP2RY.js +4 -0
- package/dist/werkmeister-workspaces.vsix +0 -0
- package/dist/{workspace-U5SLAILX.js → workspace-NALMZCV3.js} +2 -2
- package/infra/skills/w9r-test/SKILL.md +2 -1
- package/infra/templates/docker-compose.feature.yml.njk +2 -1
- package/package.json +4 -4
- package/dist/chunk-NBPM5VLH.js +0 -4
- package/dist/chunk-PNIBY4A4.js +0 -120
- package/dist/chunk-ZX2EQOFT.js +0 -86
- package/dist/clean-7Y7ECFLQ.js +0 -8
- package/dist/close_out-4O3CYXQS.js +0 -8
- package/dist/code-NEVQCAVU.js +0 -4
- package/dist/fixture-QVJBAOUP.js +0 -135
- package/dist/hooks-A24D3TBH.js +0 -4
- package/dist/infra-M6TDGBGH.js +0 -4
- package/dist/init_workspace-DT7QO4IK.js +0 -4
- package/dist/list_workspaces-PLN4HXDS.js +0 -7
- package/dist/logs-AI2YSPQO.js +0 -6
- package/dist/migrate-2F63NQPO.js +0 -4
- package/dist/notes-IPWJHCKQ.js +0 -4
- package/dist/pause-GOLGD5MA.js +0 -4
- package/dist/pr-44PGLRBJ.js +0 -5
- package/dist/proxy_reload-BH4HRPZK.js +0 -6
- package/dist/remove-5KLMP2CT.js +0 -7
- package/dist/remove_workspace-PV7XLN44.js +0 -8
- package/dist/restart-44XBME57.js +0 -8
- package/dist/resume-FHXAHYAS.js +0 -8
- package/dist/safari-VVE4HJVW.js +0 -8
- package/dist/skills-G42MXET6.js +0 -4
- package/dist/start_args-6NY7FSAO.js +0 -4
- package/dist/starting_prompt-NMB5RWCC.js +0 -4
- package/dist/stats-EFD7AMJM.js +0 -4
- package/dist/wait_load-IEVOJMN2.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{f as w}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=branch_cli-
|
|
3
|
+
import{f as w}from"./chunk-HGLRTVMS.js";import"./chunk-YY24C4EA.js";import"./chunk-T7OOLGVP.js";import"./chunk-2KGWTVUF.js";import"./chunk-EUAKA2TJ.js";import"./chunk-CQVUACSI.js";import"./chunk-KS7FAQEY.js";import"./chunk-VMCZ7W2Y.js";import"./chunk-YYRINVLL.js";import"./chunk-NBJEOAWU.js";import"./chunk-R2WVDX2E.js";import"./chunk-JKQKWHFO.js";import"./chunk-ZYGOEUIM.js";import"./chunk-2NFT42IF.js";import"./chunk-GFFMALZM.js";import"./chunk-5OUJNWAM.js";import"./chunk-TJMX66IK.js";import{h as E}from"./chunk-WJWDZ7BB.js";import"./chunk-C4NISUCD.js";import"./chunk-TPWXY2XF.js";import"./chunk-XHYKEIVE.js";import"./chunk-CY52AP7T.js";import"./chunk-FOGR2ACA.js";import"./chunk-WEN33WTO.js";import"./chunk-6WAX3TN7.js";import"./chunk-XM3O6XCT.js";import"./chunk-P2T7I5LN.js";import"./chunk-OUSF3XT7.js";import"./chunk-EUXDTOEA.js";import"./chunk-CEX6NSVX.js";import{d as h}from"./chunk-JY5RRYPX.js";import"./chunk-LGSTJB6Y.js";import"./chunk-BBFH7ZYQ.js";import"./chunk-C5Y2VT7T.js";import"./chunk-KM6DK6GX.js";import{Y as d,ba as l}from"./chunk-T6TLVQVT.js";import"./chunk-WJXANJ7I.js";import{a,f as u}from"./chunk-5PN52RW2.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-JETPEPEB.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 m}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=budget-
|
|
3
|
+
import{a as m}from"./chunk-IVPJOHAW.js";import{e as d}from"./chunk-EUAKA2TJ.js";import"./chunk-CQVUACSI.js";import"./chunk-KS7FAQEY.js";import"./chunk-VMCZ7W2Y.js";import"./chunk-YYRINVLL.js";import"./chunk-R2WVDX2E.js";import"./chunk-JKQKWHFO.js";import"./chunk-ZYGOEUIM.js";import"./chunk-2NFT42IF.js";import"./chunk-GFFMALZM.js";import"./chunk-5OUJNWAM.js";import"./chunk-TJMX66IK.js";import"./chunk-WJWDZ7BB.js";import"./chunk-C4NISUCD.js";import"./chunk-TPWXY2XF.js";import"./chunk-XHYKEIVE.js";import"./chunk-CY52AP7T.js";import"./chunk-FOGR2ACA.js";import"./chunk-WEN33WTO.js";import"./chunk-6WAX3TN7.js";import"./chunk-XM3O6XCT.js";import"./chunk-P2T7I5LN.js";import"./chunk-OUSF3XT7.js";import"./chunk-EUXDTOEA.js";import"./chunk-CEX6NSVX.js";import"./chunk-JY5RRYPX.js";import"./chunk-LGSTJB6Y.js";import"./chunk-BBFH7ZYQ.js";import"./chunk-C5Y2VT7T.js";import"./chunk-KM6DK6GX.js";import"./chunk-T6TLVQVT.js";import"./chunk-WJXANJ7I.js";import{a as s,f as u}from"./chunk-5PN52RW2.js";u();var f=2**30,g=s((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"}s(w,"hostLoadText");async function x(n){let{budget:t,hostLoad:l,leases:$,running:r,order:c,json:p}=await m();if(n.json){console.log(JSON.stringify(p));return}console.log(`Budget: ${g(t.memory/f," GiB")} memory, ${g(t.cpus," CPUs")}, ${w(l)}, preemption ${t.preempt?"on":"off"}`);let a=Object.entries($).sort(([,o],[,e])=>o.slot-e.slot);console.log(a.length?"Slots:":"Slots: none held");for(let[o,e]of a)console.log(` ${e.slot} ${o}${e.workspace?` ${e.workspace}`:""}`);console.log(r?r.length?"Running:":"Running: none":"Running: docker unavailable");for(let o of[...r??[]].sort((e,i)=>i.cost.cpus-e.cost.cpus))console.log(` ${d(o)}`);console.log(c.length?"Waiting:":"Waiting: none");for(let o of c){let e=o.services?`${o.services.join(", ")}${o.gate?" for a running feature":""}`:"whole feature",i=o.cost?` (${Number(o.cost.cpus.toFixed(1))} CPUs, ${(o.cost.memory/f).toFixed(1)} GiB)`:"",h=o.waitedMs?` waited ${Math.round(o.waitedMs/6e4)} min${o.holds?", gets the next free room":""}`:"";console.log(` ${o.position}. ${o.feature} ${e}${i}${h}`)}}s(x,"run");export{w as hostLoadText,x as run};
|
|
4
|
+
//# sourceMappingURL=budget-EMDJHUZW.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-7PMM5QF2.js";import{d as s}from"./chunk-GFFMALZM.js";import"./chunk-C4NISUCD.js";import"./chunk-XM3O6XCT.js";import"./chunk-OUSF3XT7.js";import"./chunk-JY5RRYPX.js";import{h as e,l as c}from"./chunk-T6TLVQVT.js";import"./chunk-WJXANJ7I.js";import{a as r,f as i}from"./chunk-5PN52RW2.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-VH343SGC.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{c as i,d as n,g as s}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{c as i,d as n,g as s}from"./chunk-HGLRTVMS.js";import{a as o,f as t}from"./chunk-5PN52RW2.js";t();import*as c from"node:fs";function a(){if(process.stdin.isTTY)return"";try{return c.readFileSync(0,"utf8")}catch{return""}}o(a,"readStdinTask");async function d(e){try{await s(e,void 0,{readStdinTask:a,build:e.build!==!1})}catch(r){throw r instanceof n&&(console.log(r.message),process.exit(1)),r instanceof i&&process.exit(1),r}}o(d,"run");export{a,d as b};
|
|
4
|
+
//# sourceMappingURL=chunk-2BULOJVO.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,f as c}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as s,f as c}from"./chunk-5PN52RW2.js";c();function t(e=process.env){let r=e.WERKMEISTER_LAUNCHER;return r==="vscode"||r==="terminal"?r:e.CLAUDE_CODE_ENTRYPOINT==="claude-vscode"||e.TERM_PROGRAM==="vscode"?"vscode":"terminal"}s(t,"claudeLauncher");var n="vscode://jbbz.werkmeister-vscode";function i(e){let r=new URLSearchParams({workspace:e.workspace,mode:e.sessionId?"resume":"new"});return e.sessionId&&r.set("session",e.sessionId),e.prompt&&r.set("prompt",e.prompt),`${n}/claude?${r}`}s(i,"claudeLaunchUri");function a(e){return`${n}/reconcile?${new URLSearchParams({slug:e})}`}s(a,"reconcileLaunchUri");export{t as a,i as b,a as c};
|
|
4
|
+
//# sourceMappingURL=chunk-2DBZKGIU.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 R}from"./chunk-
|
|
3
|
+
import{a as R}from"./chunk-WEN33WTO.js";import{a as C,fa as j,ia as L}from"./chunk-6WAX3TN7.js";import{a as w,b as N,c as O}from"./chunk-OUSF3XT7.js";import{n as T}from"./chunk-KM6DK6GX.js";import{N as x,O as S,ea as u,j as m,l as y,t as E}from"./chunk-T6TLVQVT.js";import{a as s,f as k}from"./chunk-5PN52RW2.js";k();import*as f from"node:fs";import*as D from"node:net";import*as h from"node:path";var A=[2,30,0],J="telepresenceio/telepresence/telepresence-oss",X="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 ${J}\`, or by direct release download: ${X}`;function P(e){for(let t of(process.env.PATH??"").split(h.delimiter)){if(!t)continue;let n=h.join(t,e);try{if(f.accessSync(n,f.constants.X_OK),f.statSync(n).isFile())return n}catch{}}return null}s(P,"which");function U(e,t=120){let n;try{n=N(e,{capture:!0,timeout:t})}catch(r){if(r instanceof w&&r.code==="ENOENT")return[127,`${e[0]}: command not found`];if(r instanceof w&&r.code==="ETIMEDOUT")return[124,`${e.join(" ")}: timed out after ${t}s`];throw r}return[n.status,((n.stdout||"")+(n.stderr||"")).trim()]}s(U,"_run");async function d(e,t,n=120){let r;try{r=await O(e,{capture:!0,timeout:n,signal:t})}catch(o){if(o instanceof w&&o.code==="ENOENT")return[127,`${e[0]}: command not found`];if(o instanceof w&&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 z(e,t=1e3){return new Promise(n=>{let r=new D.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(z,"portOpen");function Q(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(Q,"parseVersion");function Y(e,t){for(let n=0;n<3;n++)if(e[n]!==t[n])return e[n]<t[n];return!1}s(Y,"versionLt");async function Z(e=t=>d(t)){if(P("telepresence")===null)return`telepresence not found on PATH. ${g}`;let[t,n]=await e(["telepresence","version"]),r=Q(n);if(t!==0||r===null)return`could not determine telepresence version (${n?n.split(`
|
|
4
4
|
`)[0]:"no output"}). ${g}`;if(Y(r,A)){let o=r.join("."),i=A.join(".");return`telepresence ${o} is too old (need >= ${i}). ${g}`}return null}s(Z,"versionError");function ee(e,t,n=!1){let r=["telepresence","connect"];return n&&r.push("--docker"),r.push("--context",e,"--namespace",t),r}s(ee,"buildConnectArgs");var te="host.docker.internal";function _(e,t){return`${e}-${t}-cn`}s(_,"dockerDaemonName");function ne(e,t,n,r,o=!1){return["telepresence","intercept",e,"--port",`${t}:${n}`,"--http-header",`x-feature=${r}`,"--mount","false",...o?["--address",te]:[]]}s(ne,"buildInterceptArgs");function I(e){return["telepresence","detach",e]}s(I,"buildLeaveArgs");function re(e){return["telepresence","uninstall",...e]}s(re,"buildUninstallArgs");function oe(){return["telepresence","quit","-s"]}s(oe,"buildQuitArgs");var M="x-feature";function H(){return["telepresence","list","-i","--format","json"]}s(H,"buildListInterceptsArgs");function se(e){if(typeof e!="object"||e===null||Array.isArray(e))return"is not defined in ~/.werkmeister/services.yaml.";let t=e,n=q(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(se,"interceptBlocker");var ie=["k8s_deployment","k8s_namespace","k8s_port"];function q(e){return ie.filter(t=>!e[t])}s(q,"missingClusterKeys");function ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&q(e).length===0}s(ve,"isRemoteService");function B(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,ce(a[0]))}return t}s(B,"parseInterceptList");function ce(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()===M&&typeof r=="string")return r;return null}s(ce,"featureOf");function b(){return T().overrides?.telepresence!==!1}s(b,"telepresenceEnabled");async function $e(e=t=>d(t)){let t=new Map;if(E()||!b())return{installed:!1,available:!1,namespace:null,intercepts:t};let[n,r]=await e(v);if(n===127)return{installed:!1,available:!1,namespace:null,intercepts:t};let o=$(n,r),i=[];for(let l of o===null?ae(r):[])if(o=$(...await e([...v,"--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([...H(),...i]);return c!==0?{installed:!0,available:!1,namespace:o,intercepts:t}:{installed:!0,available:!0,namespace:o,intercepts:B(a)}}s($e,"listIntercepts");function Se(e=U){return $(...e(v))}s(Se,"connectedNamespace");var v=["telepresence","status","--format","json"];function ae(e){let t=/please select (.+?) using the --use/.exec(e);return t?t[1].split(/, | or /):[]}s(ae,"daemonChoices");function $(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($,"parseConnectedNamespace");async function le(e,t,n=!1,r=o=>d(o)){if(E())return;let o=n?["--use",_(e,t)]:[];if($(...await r([...v,...o]))===t)return;await r(["telepresence","quit","-s"]);let[c,a]=await r(ee(e,t,n));if(c!==0)throw new Error(`telepresence connect failed: ${a||"no output"}`)}s(le,"ensureConnected");function ue(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(ue,"servicesFromEnv");function ge(e,t=U){if(!b()||P("telepresence")===null)return[];let n=C(e);if(n===null)return[];let r=ue(h.join(n,".env"));if(!r.length)return[];let o=x(),i=[];for(let c of r){let a=K(o[c]);if(!a)continue;let[l]=t(I(a));l===0&&i.push(a)}return i}s(ge,"leaveFeatureIntercepts");async function F(e,t=n=>d(n)){let n={uninstalled:[],quit:!1};if(!e.length)return n;let[r,o]=await t(H()),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=B(o),a=e.filter(l=>!c.has(l));if(a.length){let[l,p]=await t(re(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(oe());l===0?(n.quit=!0,m("Stopped telepresence daemons")):y(`Could not stop telepresence daemons: ${p||"no output"}`)}return n}s(F,"releaseIdleTelepresence");function K(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e.k8s_deployment:void 0}s(K,"deploymentOf");function V(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=se(n);if(r)throw new u(`'${e}' ${r}`,"NOT_INTERCEPTABLE");return n}s(V,"resolveServiceDef");async function Ae(e){if(E())throw new u("Intercepts are off under WERKMEISTER_FIXTURE.","FIXTURE");if(!b())throw new u("Intercepts are off: remove `telepresence: false` under `overrides:` in ~/.werkmeister/config.yaml to use them.","TELEPRESENCE_DISABLED");let t=V(e.service,e.localServices),n=s(G=>d(G,e.signal),"runner"),r=await Z(n);if(r)throw new u(r,"TELEPRESENCE_VERSION");let o=await j(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=L(o,t.port_offset??0);if(!await z(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 le(c,a,!!e.dockerDaemon,n),m(`Intercepting ${l} \u2192 localhost:${i} (x-feature=${e.feature})...`);let[p,W]=await n([...ne(l,i,t.k8s_port,e.feature,!!e.dockerDaemon),...e.dockerDaemon?["--use",_(c,a)]:[]]);if(p!==0)throw new u(`telepresence intercept failed: ${W||"no output"}`,"INTERCEPT_FAILED");return{service:e.service,context:c,namespace:a,deployment:l,localPort:i,header:M,remoteHost:R()[e.service]?.remoteHostname??null}}s(Ae,"startIntercept");async function Ie(e){let t=s(i=>c=>d(e.dockerDaemon?[...c,"--use",_(S(),i)]:c,e.signal),"runnerIn");if(e.service){let i=V(e.service,e.localServices),c=i.k8s_deployment,a=t(i.k8s_namespace),[l,p]=await a(I(c));if(l!==0)throw new u(`Could not leave intercept: ${p||"no output"}`,"INTERCEPT_FAILED");return await F([c],a),[c]}let n=x(),r=[],o=t("default");for(let i of e.localServices){let c=K(n[i]);if(!c)continue;o=t(n[i].k8s_namespace??"default");let[a]=await o(I(c));a===0&&r.push(c)}return await F(r,o),r}s(Ie,"leaveIntercept");export{A as a,J as b,X as c,g as d,U as e,d as f,z as g,Q as h,Y as i,Z as j,ee as k,te as l,_ as m,ne as n,I as o,re as p,oe as q,M as r,H as s,se as t,ve as u,B as v,$e as w,Se as x,le as y,ge as z,F as A,Ae as B,Ie as C};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-2KGWTVUF.js.map
|
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{a as ce}from"./chunk-
|
|
4
|
-
`)}c(he,"renderIssueRef");function Pe(t){try{let
|
|
3
|
+
import{a as ce}from"./chunk-GFFMALZM.js";import{a as F,b as H,f as re}from"./chunk-WJWDZ7BB.js";import{a as K,c as Y,f as Q,g as J,h as Z,j as ee,m as te}from"./chunk-C4NISUCD.js";import{J as ne,K as ae,p as oe}from"./chunk-TPWXY2XF.js";import{b as se}from"./chunk-XHYKEIVE.js";import{a as I,b as ie}from"./chunk-WEN33WTO.js";import{ia as le}from"./chunk-6WAX3TN7.js";import{r as X}from"./chunk-KM6DK6GX.js";import{D as G,T as q,V}from"./chunk-T6TLVQVT.js";import{a as c,f as A}from"./chunk-5PN52RW2.js";A();import*as de from"node:fs";import*as pe from"node:path";A();function he(t){let s=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`.",r=t.parent,o=r?[`Parent: ${r.url?`[${r.ref}](${r.url})`:r.ref}${r.title?`: ${r.title}`:""}. Its description and links: \`.werkmeister/issue.md\` \xA7 Parent.`]:[];return["## Issue","",`${s}${i}. ${a}`,...o,"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
|
+
`)}c(he,"renderIssueRef");function Pe(t){try{let s=X(),i=I(void 0,s),a=t.find(o=>i[o]?.hostname),r=a?i[a].hostname:Object.values(i).map(o=>o.hostname).filter(Boolean).sort()[0];return r?{host:r,domain:s.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 Ee(t,s,i){let a=[];for(let[r]of t){let o=!1;try{o=de.statSync(pe.join(s,r,"CLAUDE.md")).isFile()}catch{}o&&a.push(`| Working in ${r} | ${r}/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(`
|
|
7
|
-
`)}c(
|
|
8
|
-
> Module source: ${
|
|
9
|
-
${
|
|
7
|
+
`)}c(Ee,"buildRoutingTable");function je(t){return t.path==="spike"?"No implement, review, or PR phase. Deliverable: `finding` notes. Anything built is throwaway.":t.gate===null?"Gate: none \u2014 `w9r-implement` loads the standards.":t.gate.status?`Gate: no source edit until a \`${t.gate.note}\` note in \`.werkmeister/notes/\` reads \`status: ${t.gate.status}\`. Write it at the end of research, after the user approves the design; the flip *is* the approval \u2014 do not ask again.`:`Gate: no source edit until a \`${t.gate.note}\` note in \`.werkmeister/notes/\` names the root cause.`}c(je,"gateLine");function Ze(t,s,i,a=""){let r=re(s),o=[];for(let p of t){let y=s[p]??{},k;r.includes(p)?k="any code edit":k=(y.applies_to||[]).map(C=>`\`${C}\``).join(", ")||"\u2014",o.push(`| ${p} | \`w9r-${p}-standard\` | ${k} |`)}let u=i.length>0?i.join(", "):"none discovered",f=H(F(),"","tree"),m=f?`
|
|
8
|
+
> Module source: ${f}`:"",v=["`ponytail`",...r.map(p=>`\`w9r-${p}-standard\``)].join(" + "),h=ae(a),T={research:"| research / planning | `w9r-research` | nothing \u2014 spawns the read-only `w9r-researcher` agent |",implement:`| implementing (before the first code edit) | \`w9r-implement\` | universal base (${v}) + rows matching the files you edit |`,test:"| testing | `w9r-test` | nothing \u2014 spawns the matching `w9r-tester-<archetype>` agent(s) |",review:"| review (before reading any diff or PR) | `w9r-review` | the standards covering files in the diff |",pr:"| PR / finishing | `w9r-pr` | `.werkmeister/pr-rules.md` \u2014 PRs open only via `werkmeister pr open` |"},x=h===ne?"":`**Work type:** ${a.trim().toLowerCase()} (${h.path} path) \u2014 phases: ${h.phases.join(" \u2192 ")}.
|
|
9
|
+
${je(h)}
|
|
10
10
|
|
|
11
11
|
`;return`## Standards routing
|
|
12
12
|
|
|
13
|
-
> Compiled from services.yaml + .werkmeister/workspace.yml (\`standards_override\`) \u2014 regenerated by \`werkmeister workspace init\`. Do not hand-edit.${
|
|
13
|
+
> Compiled from services.yaml + .werkmeister/workspace.yml (\`standards_override\`) \u2014 regenerated by \`werkmeister workspace init\`. Do not hand-edit.${m}
|
|
14
14
|
|
|
15
|
-
**Active in this workspace** (repos: ${
|
|
15
|
+
**Active in this workspace** (repos: ${u}):
|
|
16
16
|
|
|
17
17
|
| Standard | Skill | Loads on |
|
|
18
18
|
|----------|-------|----------|
|
|
19
|
-
${
|
|
19
|
+
${o.join(`
|
|
20
20
|
`)}
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${x}**By phase** \u2014 invoke the entry skill before starting the phase:
|
|
23
23
|
|
|
24
24
|
| Phase | Invoke first | Loads |
|
|
25
25
|
|-------|--------------|-------|
|
|
26
|
-
${h.phases.map(p=>
|
|
26
|
+
${h.phases.map(p=>T[p]).join(`
|
|
27
27
|
`)}
|
|
28
28
|
|
|
29
|
-
`}c(Ze,"buildStandardsRoutingSection");function et(t,
|
|
30
|
-
`),
|
|
29
|
+
`}c(Ze,"buildStandardsRoutingSection");function et(t,s,i,a,r,o=null,u=null){let f=i.map(([g,_])=>`- ${g}/ \u2014 branch: ${_}`).join(`
|
|
30
|
+
`),m=!!(r.FEATURE??"").trim(),v=Ee(i,s,m),h=v?`
|
|
31
31
|
## Routing
|
|
32
32
|
|
|
33
|
-
${
|
|
33
|
+
${v}
|
|
34
34
|
|
|
35
35
|
## Context Budget
|
|
36
36
|
|
|
37
37
|
Load only what the routing table points to for your current task. Target: \u2264 3 context files per step unless a repo's CLAUDE.md explicitly requires more.
|
|
38
|
-
`:"",
|
|
38
|
+
`:"",T=i.length,x=T>1?"This is a multi-repo workspace. Repositories:":"This is a single-repo workspace. Repository:",y=`## Notes
|
|
39
39
|
|
|
40
40
|
Working notes live in [.werkmeister/notes/](.werkmeister/notes/) \u2014 \`NNN-<type>-<slug>.md\`. Types and rules: docs/notes-conventions.md in the werkmeister repo.
|
|
41
41
|
|
|
42
42
|
Read relevant notes first; skip \`status: superseded\`. \`decision\` notes are binding and override task-level instincts \u2014 on conflict, raise it to the user rather than picking a side.
|
|
43
|
-
${
|
|
43
|
+
${T>1?"\nRecord contract changes (API schema, shared types, event contracts) as `contract` notes **before** switching repos; read them when entering the receiving repo.\n":""}`,k=u?null:oe(r),C=k?k[1]?`${a} \u2014 [${k[0]}](${k[1]})`:`${a} \u2014 ${k[0]}`:a,b=(r.DESCRIPTION??"").trim(),R=`## Current Task
|
|
44
44
|
|
|
45
|
-
${
|
|
45
|
+
${C}
|
|
46
46
|
|
|
47
47
|
${b||"<!-- Replace this comment with 1-2 sentences describing what this feature does and the user-visible outcome. -->"}
|
|
48
|
-
${
|
|
49
|
-
${he(
|
|
48
|
+
${u?`
|
|
49
|
+
${he(u)}`:""}`,$;if(o!==null)$=o;else{let g=H(F(),"","tree");$=`## Code Standards
|
|
50
50
|
|
|
51
51
|
Follow the canonical cross-repo code standards (comment rubric, per-repo quirks)`+(g?`: ${g}`:".")+`
|
|
52
52
|
|
|
53
53
|
`}return`# Workspace: ${t}
|
|
54
54
|
|
|
55
|
-
${
|
|
55
|
+
${R}
|
|
56
56
|
## Layout
|
|
57
57
|
|
|
58
|
-
${
|
|
58
|
+
${x}
|
|
59
59
|
|
|
60
|
-
${
|
|
60
|
+
${f}
|
|
61
61
|
${h}
|
|
62
|
-
${$}${
|
|
62
|
+
${$}${y}
|
|
63
63
|
## Issues
|
|
64
64
|
|
|
65
65
|
Hit a bug, or need to log a feature or task, in the \`werkmeister\` tool or a repo's code? If this workspace's changes caused a bug, fix it here; otherwise file an issue (bug | feature | task) where it belongs (the werkmeister repo, or this machine's issue tracker) and report the URL. Rules, labels and templates: [.werkmeister/issues-report.md](.werkmeister/issues-report.md).
|
|
66
|
-
`}c(et,"buildClaudeMd");var
|
|
67
|
-
Shared caches, mounted by every workspace on this machine: never delete from them (\`werkmeister cache prune\` evicts for every workspace, so it is the person's call). ${
|
|
68
|
-
`:""}c(Be,"sharedCachesLine");function tt(t,
|
|
66
|
+
`}c(et,"buildClaudeMd");var Oe=c((t,s)=>s&&K(t)&&Y(t,s)?s:"","withTempHome");function Ae(t,s,i,a,r,o=""){let u=Q(s,i[s],a),f=J(i[s]);return f?`- \`${s}\`: no tests (registry: ${f})`:u?`- \`${s}\`: \`${Z(t,s,r?`${r} && ${u}`:u,Oe(i[s],o))}\``:`- \`${s}\`: no test command registered (add \`test:\` to its registry entry)`}c(Ae,"testCommandLine");var Ie=c(t=>`A one-off probe is a \`node --test\` file, run as \`${t} --no-wait node --test <file>\` (in the service's container, after its \`docker exec -w <dir> <container>\`, when the host has no node_modules); never host \`node <script>\`, a compound shell line or \`docker exec \u2026 node <script>\`. That form, with no \`--cwd\` (pass the file's path instead), is never pre-approved, since it runs any file (SW-510): it prompts, or in auto mode the classifier decides each run; with \`--cwd\` it matches no rule and auto mode denies it (SW-652). A probe that writes under \`~/.werkmeister\` or runs the CLI starts with a load-time guard, \`if (process.env.WERKMEISTER_TEMP_HOME !== process.env.HOME) throw new Error("run me through with-temp-home")\`, never a \`test()\` check: node:test runs the other tests after a failed one (SW-1049).`,"PROBE_FORM");function Be(t){let s=Object.entries(t);return s.length?`
|
|
67
|
+
Shared caches, mounted by every workspace on this machine: never delete from them (\`werkmeister cache prune\` evicts for every workspace, so it is the person's call). ${s.map(([a,r])=>{let o=ce(a,r),u=o.kind==="volume"?`volume \`${o.name}\``:`host dir \`${o.name}\``,f=Object.entries(r.env??{}).map(([m,v])=>`\`${m}=${v}\``);return`\`${a}\` at \`${r.path}\` (${[...f,u].join(", ")})`}).join("; ")}.
|
|
68
|
+
`:""}c(Be,"sharedCachesLine");function tt(t,s,i,a,r,o,u="",f=null,m=r,v=!1,h="",T={},x=V()){let p=[],y=new Set;try{p=ie(o);for(let e of Object.values(I(o)))e.hostname&&!e.remoteUpstream&&y.add(e.hostname)}catch{p=[]}let k="answers only while a feature runs its service",C=p.length?`These hosts are routed through Caddy:
|
|
69
69
|
|
|
70
|
-
`+p.map(e=>`- \`https://${e}\`${
|
|
71
|
-
`):"No services declare a `feature_router:` block, so Caddy terminates no public hosts for this workspace.",b=[],
|
|
70
|
+
`+p.map(e=>`- \`https://${e}\`${y.has(e)?` \u2014 ${k}`:""}`).join(`
|
|
71
|
+
`):"No services declare a `feature_router:` block, so Caddy terminates no public hosts for this workspace.",b=[],L=[],R=new Set;try{let e=I(o),n=c(d=>d.map(l=>e[l]?.hostname).filter(l=>!!l).sort(),"hostsOf");b=n(r),L=n(m),R=new Set(m.filter(d=>e[d]?.hostname))}catch{b=[]}let $=r.length>0,g=R.size>0,_=c(e=>T[e]?.lint,"lintOf"),ue=c(e=>e.test?`\`${ee(h,e.test,_(e.repo),e.repo)}\``:"\u2014","testCell"),M=c(e=>B(o[e])?o[e].repo:void 0,"repoOf"),me=new Set(m.map(M).filter(Boolean)),we=Object.keys(o).filter(e=>me.has(M(e))),P=te([...m,...we],o,f,R),fe=P.some(e=>!m.includes(e.service)),ke=[...new Set(P.map(e=>e.repo))].map(e=>{let{format:n,release_check:d,ship:l}=T[e]??{},w=[n&&`- Format: \`${n}\` \u2014 ${n.includes("{files}")?"`{files}` replaced with the files you touched":"run as written, from the repo root"}`,l==="tag"&&d&&`- Release check: \`${d}\` \u2014 the PR gate's release row; commit the release entry it looks for`].filter(Boolean);return w.length?`
|
|
72
72
|
|
|
73
73
|
Repo commands for ${e}:
|
|
74
|
-
${
|
|
75
|
-
`)}`:""}).join(""),$e=P.some(e=>e.test&&
|
|
74
|
+
${w.join(`
|
|
75
|
+
`)}`:""}).join(""),$e=P.some(e=>e.test&&_(e.repo)),ge=`| Service | Repo | Path in repo | Test command | Validation |
|
|
76
76
|
|---------|------|--------------|--------------|------------|
|
|
77
|
-
`+P.map(e=>`| \`${e.service}\` | ${e.repo} | \`${e.path}\` | ${
|
|
78
|
-
`),
|
|
77
|
+
`+P.map(e=>`| \`${e.service}\` | ${e.repo} | \`${e.path}\` | ${ue(e)} | ${e.validate} |`).join(`
|
|
78
|
+
`),ve=c(e=>{let n=o[e]??{};return B(n)&&n.k8s_forward_port!==null&&n.k8s_forward_port!==void 0?Number(n.k8s_forward_port):null},"k8sPort"),S=[],E=null;for(let e of[...r].sort()){let n=o[e]??{};if(!B(n))continue;let d=n.port_offset??0,l=le(s,d);E===null&&R.has(e)&&(E=l);let w=n.internal_port??3e3,N=`${e.toUpperCase().replace(/-/g,"_")}_URL`;S.push(`| \`${e}\` | local | \`${n.path??"."}\` | \`${t}-${e}\` | ${l} | \`${N}=http://${e}:${w}\` |`)}for(let e of Object.keys(o).sort()){if(r.includes(e)||!$&&!m.includes(e))continue;let n=o[e]??{};if(!B(n))continue;let d=`${e.toUpperCase().replace(/-/g,"_")}_URL`,l=G(e,n);if(l){S.push(`| \`${e}\` | baseline | \`${n.path??"."}\` | \u2014 | \u2014 | \`${d}=http://${l.host}:${l.port}\` |`);continue}let w=ve(e);w&&S.push(`| \`${e}\` | k8s | \`${n.path??"."}\` | \u2014 | \u2014 | \`${d}=http://k8s-forwards:${w}\` |`)}let U;S.length>0?U=`| Service | Location | Path in repo | Container | Host Port | In-cluster URL (env var) |
|
|
79
79
|
|---------|----------|--------------|-----------|-----------|--------------------------|
|
|
80
80
|
`+S.join(`
|
|
81
|
-
`):U="_No services configured._";let D;if(r.length>0){let e=[...r].sort(),n=e.map(
|
|
81
|
+
`):U="_No services configured._";let D;if(r.length>0){let e=[...r].sort(),n=e.map(w=>_(String(o[w]?.repo??""))),d=e.map(w=>`\`${t}-${w}\``).join(", "),l=e[0];D=`### Container Commands
|
|
82
82
|
|
|
83
83
|
Container naming pattern: \`${t}-<service>\` \u2014 ${d}
|
|
84
84
|
|
|
@@ -95,44 +95,44 @@ docker compose restart ${l}
|
|
|
95
95
|
|
|
96
96
|
### Test commands
|
|
97
97
|
|
|
98
|
-
The registry's \`test:\` for each service (or its archetype's), run in its container \u2014 the worktree is mounted at \`/app\` with its \`node_modules\`; the host checkout has none. The pre-PR gate runs these (\`werkmeister pr gate\`).${n.some(Boolean)?" A line starting with `<lint> &&` first runs the repo's lint, the PR gate's lint row, so a `docs:check` or format failure shows here, before the tests, and not first at the gate.":""}
|
|
98
|
+
The registry's \`test:\` for each service (or its archetype's), run in its container \u2014 the worktree is mounted at \`/app\` with its \`node_modules\`; the host checkout has none. The pre-PR gate runs these (\`werkmeister pr gate\`). Stopping a background \`docker exec\` run (TaskStop, Ctrl-C) ends only the client: the run goes on in the container, since \`docker exec\` without \`-t\` forwards no signal (SW-968). End it there before a rerun, so two runs don't race on one container: find the wrapper's pid with \`docker exec <container> ps -eo pid,etime,args\`, then \`docker exec <container> kill -TERM -- -<pid>\` (the wrapper leads its process group, so this ends everything under it). A run that ends with exit 137 and a log that stops mid-step, without the wrapper's closing \`exit <n>\` line, was killed with its container (a restart, a recreate, an out-of-memory kill), not failed: check the container's uptime in \`docker ps\`, start it again if it is down, then rerun (SW-995).${n.some(Boolean)?" A line starting with `<lint> &&` first runs the repo's lint, the PR gate's lint row, so a `docs:check` or format failure shows here, before the tests, and not first at the gate.":""}
|
|
99
99
|
|
|
100
|
-
${e.map((
|
|
100
|
+
${e.map((w,N)=>Ae(t,w,o,f??q(),n[N],h)).join(`
|
|
101
101
|
`)}
|
|
102
|
-
${Be(
|
|
103
|
-
`}else D="";let
|
|
104
|
-
`:"","noteFor");if(
|
|
105
|
-
curl -s -o /dev/null -w "HTTP %{http_code} | Size: %{size_download}\\n" "http://localhost:${
|
|
102
|
+
${Be(x)}
|
|
103
|
+
`}else D="";let j,W=c(e=>y.has(e)?`# ${e} ${k}
|
|
104
|
+
`:"","noteFor");if(E!==null){let e=`# Direct to a local service (bypass Caddy \u2014 isolates routing vs app issues):
|
|
105
|
+
curl -s -o /dev/null -w "HTTP %{http_code} | Size: %{size_download}\\n" "http://localhost:${E}/"
|
|
106
106
|
|
|
107
107
|
`,n=b.length?`# Through Caddy (verifies full proxy routing):
|
|
108
108
|
`+b.map(l=>W(l)+`curl -sk -b "X-Feature=${t}" -o /dev/null -w "HTTP %{http_code} | Size: %{size_download}\\n" "https://${l}/"
|
|
109
109
|
`).join("")+`
|
|
110
110
|
`:"",d=`# Container status:
|
|
111
|
-
docker ps --format "table {{.Names}}\\t{{.Status}}\\t{{.Ports}}" | grep ${t}`;
|
|
112
|
-
docker ps --format "table {{.Names}}\\t{{.Status}}\\t{{.Ports}}" | grep ${t}`:
|
|
113
|
-
`+
|
|
114
|
-
`).join("").trimEnd();let
|
|
115
|
-
**Feature URL:** https://${
|
|
111
|
+
docker ps --format "table {{.Names}}\\t{{.Status}}\\t{{.Ports}}" | grep ${t}`;j=n+e+d}else $?j=`# Container status:
|
|
112
|
+
docker ps --format "table {{.Names}}\\t{{.Status}}\\t{{.Ports}}" | grep ${t}`:j=`# Through Caddy (all traffic routes to k8s):
|
|
113
|
+
`+L.map(e=>W(e)+`curl -sk -o /dev/null -w "HTTP %{http_code} | Size: %{size_download}\\n" "https://${e}/"
|
|
114
|
+
`).join("").trimEnd();let O=Pe(r),ye=O?`
|
|
115
|
+
**Feature URL:** https://${O.host}/${u.replace(/^\/+/,"")}
|
|
116
116
|
|
|
117
117
|
Set the routing cookie in the browser (DevTools console):
|
|
118
118
|
|
|
119
119
|
\`\`\`js
|
|
120
|
-
document.cookie = "X-Feature=${t}; domain=.${
|
|
120
|
+
document.cookie = "X-Feature=${t}; domain=.${O.domain}; path=/; SameSite=Lax";
|
|
121
121
|
\`\`\`
|
|
122
122
|
|
|
123
|
-
or visit https://${
|
|
124
|
-
`:"",z=
|
|
123
|
+
or visit https://${O.host}/__werkmeister and select \`${t}\` \u2014 the selector is served on every routed host and the cookie applies to each host sharing the base domain.
|
|
124
|
+
`:"",z=m.filter(e=>!r.includes(e)).sort(),be=`## How to validate
|
|
125
125
|
|
|
126
|
-
How to exercise a change to each service in this workspace.${
|
|
126
|
+
How to exercise a change to each service in this workspace.${fe?" The table also lists the other services in this workspace's repos: the PR gate tests each service a change reaches, the workspace's own or not.":""}${z.length?` A plain \`werkmeister feature up\` skips the on-demand ones, ${z.map(e=>`\`${e}\``).join(", ")}: start one with \`werkmeister feature up --service <name>\`.`:""}${h?` Each test command runs through \`.werkmeister/bin/with-temp-home\`, which gives it a fresh temporary HOME and deletes it on exit: never hand-roll \`HOME=\u2026\`. Start every exercise command with the script itself, never with env assignments or a \`cd\`, so one permission rule matches it: \`${h} --cwd <worktree> <test command>\`. Its \`--cwd <worktree>\` runs the command from that service's worktree, whatever the shell's cwd, so it works from the workspace root too (SW-652). A command that needs an env var takes it after the script (\`${h} env WERKMEISTER_ROOT=\u2026 <cmd>\`); no rule pre-approves that form, so it asks. Put \`--no-wait\` first (\`${h} --no-wait <cmd>\`) to skip its host-load and free-memory wait; the allow rules below cover that form too. That wait lasts up to 90 s; if load or memory is still over its limit then, the script exits 75 without running the command (retry later). It prints only on stderr, so a foreground call shows nothing until it ends and its only child is \`werkmeister internal wait-load\`: that is the wait, not a hang. The allow rule that covers them is \`Bash(${h} --cwd <worktree> <test command>:*)\` for each test command below: run those for a test without a prompt. A test command of more than one command (an \`&&\` chain, a \`{ \u2026; }\` group, \`||\`, \`;\` or a pipe) is shown as \`${h} --cwd <worktree> sh -c '\u2026'\`, so every part runs under the temp HOME, and its rule allows that exact line: run it as shown, with no extra arguments. ${Ie(h)} The script alone is never allowed either, since it runs any command. The temp HOME only keeps a run from writing to the real one by accident; it is not an isolation boundary. A pre-approved test command or built CLI still runs whatever the worktree holds, a test written in this run included, and that code can reach absolute paths, the caller's env, the network, docker and gh (SW-522).`:""}${$e?" A test command starting with `<lint> &&` first runs the repo's lint, the same command the PR gate's lint row runs, so a format error fails here, before the tests, and not first at `werkmeister pr open`.":""} ${se}
|
|
127
127
|
|
|
128
128
|
${ge}${ke}
|
|
129
129
|
|
|
130
|
-
`,
|
|
130
|
+
`,Te=$?`## Slot & Port Range
|
|
131
131
|
|
|
132
|
-
- **Slot:** ${
|
|
132
|
+
- **Slot:** ${s}
|
|
133
133
|
- **Port range:** ${i}\u2013${a}
|
|
134
134
|
|
|
135
|
-
`:"",
|
|
135
|
+
`:"",Re=$?`## Container Lifecycle
|
|
136
136
|
|
|
137
137
|
Run from anywhere in the workspace \u2014 \`werkmeister\` reads \`FEATURE\` from \`.env\` at the workspace root.
|
|
138
138
|
|
|
@@ -143,7 +143,7 @@ werkmeister feature restart # restart all containers
|
|
|
143
143
|
werkmeister feature down # tear down + release slot
|
|
144
144
|
werkmeister feature down -v # tear down + remove volumes (node_modules, caches)
|
|
145
145
|
\`\`\`
|
|
146
|
-
${
|
|
146
|
+
${v?"\n**Auto-stop is on** (`auto_stop: true` in `.werkmeister/workspace.yml`): when a Claude session here ends and no other session is open in this workspace, a SessionEnd hook runs `werkmeister internal session-end`, which stops this feature's containers (slot and volumes kept \u2014 `werkmeister feature up` resumes). Shared infra is never stopped.\n":""}
|
|
147
147
|
> **Fallback:** If \`werkmeister\` CLI is unavailable, \`docker compose up -d --build\` / \`docker compose down\` from the workspace root works equivalently. Prefer \`werkmeister\` \u2014 it also manages slot allocation and Caddy proxy regeneration.
|
|
148
148
|
|
|
149
149
|
`:"",Se=$||S.length>0?`## Services
|
|
@@ -152,18 +152,18 @@ Every container gets each service's URL injected as an env var (the last column)
|
|
|
152
152
|
|
|
153
153
|
${U}
|
|
154
154
|
|
|
155
|
-
`:"",
|
|
155
|
+
`:"",xe=[...b,...L].some(e=>y.has(e))?"If every host resets TLS (curl exit 35) while `w9r-caddy` is healthy, check `~/.werkmeister/infra/proxy/features.json` first: `[]` means nothing is routed and it is not an outage.\n\n":"",Ce=g||$?`## Quick Health Checks
|
|
156
156
|
|
|
157
|
-
${
|
|
158
|
-
${
|
|
157
|
+
${xe}\`\`\`bash
|
|
158
|
+
${j}
|
|
159
159
|
\`\`\`
|
|
160
160
|
|
|
161
|
-
`:"",
|
|
161
|
+
`:"",_e=g?`## Proxy Routing
|
|
162
162
|
|
|
163
|
-
${
|
|
163
|
+
${C}
|
|
164
164
|
|
|
165
165
|
Set \`X-Feature=${t}\` (cookie or header) to route to this workspace's local containers; otherwise traffic falls through to the k8s port-forwards.
|
|
166
|
-
${
|
|
166
|
+
${ye}
|
|
167
167
|
`:"";return`<!--
|
|
168
168
|
AUTO-GENERATED FILE \u2014 DO NOT EDIT BY HAND.
|
|
169
169
|
Source: ~/.werkmeister/services.yaml + ports.yaml
|
|
@@ -176,7 +176,7 @@ ${ve}
|
|
|
176
176
|
|
|
177
177
|
# Werkmeister Context: ${t}
|
|
178
178
|
|
|
179
|
-
${be}${
|
|
179
|
+
${be}${Te}${Re}${Se}${D}${Ce}${_e}${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-2NFT42IF.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{k as d,l as c,m as N,n as R,q as S,t as m}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{k as d,l as c,m as N,n as R,q as S,t as m}from"./chunk-R2WVDX2E.js";import{j as x}from"./chunk-WJWDZ7BB.js";import{b as h}from"./chunk-EUXDTOEA.js";import{d as b,p as g}from"./chunk-KM6DK6GX.js";import{j as u,k,m as l}from"./chunk-T6TLVQVT.js";import{a as i,f as $}from"./chunk-5PN52RW2.js";$();import*as v from"node:fs";import*as j from"node:path";import*as D from"node:readline/promises";async function w(t){let n=D.createInterface({input:process.stdin,output:process.stdout});try{return await n.question(t)}finally{n.close()}}i(w,"input");function p(){return!!process.stdin.isTTY}i(p,"stdinIsatty");async function I(t,n,o){let e=N(n);if(o){if(!e.includes(o))throw new c(`'${o}' is not an eligible domain (eligible: ${e.join(", ")})`);return o}let a=t.frontmatter.refs??[],s=R(a,n,e);if(s.length===1)return s[0];if(!p())throw new c(`ambiguous or unmatched domain for note refs ${G(a)} \u2014 pass --domain (eligible: ${e.join(", ")})`);console.log(`Which domain? [${e.join(", ")}]`);let r=(await w("> ")).trim();if(!e.includes(r))throw new c(`'${r}' is not an eligible domain`);return r}i(I,"resolveDomain");async function K(t){if(t)return t;if(!p())throw new c(`--kind required (expected one of ${P(d)})`);let n=(await w(`Kind? [${d.join("/")}] > `)).trim();if(!d.includes(n))throw new c(`'${n}' is not a valid kind (expected one of ${P(d)})`);return n}i(K,"resolveKind");async function T(t,n,{domain:o,kind:e,slug:a}){let s=x(),r=await I(n,s,o),f=await K(e);return S(t,n,{domain:r,kind:f,slug:a,decisions:m(t).decisions})}i(T,"graduateOne");async function A(t){let n=h(process.cwd(),g());n===null&&(l("Not inside a workspace \u2014 run this from a workspace folder or below."),process.exit(1));let o=m(n).decisions.open(n);if(!o.length){u("No open decisions to graduate.");return}let e=t.note_num;if(e==null){p()||(l("Pass a note number as an argument (non-interactive mode)."),process.exit(1)),console.log("Open decision notes:");for(let y of o)console.log(` [${String(y.number).padStart(3,"0")}] ${j.basename(y.path)}`);let r=(await w("Graduate which note number? > ")).trim(),f=F(r);f===null&&(l(`'${r}' is not a note number.`),process.exit(1)),e=f}let a=o.find(r=>r.number===e)??null;a===null&&(l(`No open decision note numbered ${String(e).padStart(3,"0")}.`),process.exit(1));let s;try{s=await T(n,a,{domain:t.domain??null,kind:t.kind??null,slug:t.slug??null})}catch(r){throw r instanceof c&&(l(r.message),process.exit(1)),r}k(`Scaffolded ${s.scaffold_path}`),u(`Note marked graduating \u2192 ${s.graduated_to}`),u("Ask Claude to run the w9r-author skill to fill in the placeholder, then `werkmeister skills check`."),u(`Commit it in ${b()} \u2014 a separate repo from this workspace. The note stays an open decision until that file is tracked.`)}i(A,"runGraduate");function C(){try{if(p())return{};let t=v.readFileSync(0,"utf8"),n=t.trim()?JSON.parse(t):null;return typeof n=="object"&&n!==null&&!Array.isArray(n)?n:{}}catch{return{}}}i(C,"hookPayload");async function L(t){if(t.action==="graduate"){await A(t);return}try{let n=h(process.cwd(),g());if(n===null)return;let o=m(n).sessionContext(n,C());o&&process.stdout.write(o)}catch{return}}i(L,"run");function F(t){let n=t.trim();return/^[+-]?\d+$/.test(n)?Number.parseInt(n,10):null}i(F,"parseIntStrict");function G(t){return`[${t.map(n=>`'${n}'`).join(", ")}]`}i(G,"reprList");function P(t){return t.length===1?`('${t[0]}',)`:`(${t.map(n=>`'${n}'`).join(", ")})`}i(P,"reprTuple");export{w as a,T as b,L as c};
|
|
4
|
+
//# sourceMappingURL=chunk-3VJ4C2CN.js.map
|