werkmeister 0.105.0 → 0.106.1
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-5N6U6W77.js → branch_cli-EBIFI3ED.js} +2 -2
- package/dist/budget-36FZKZ3S.js +4 -0
- package/dist/{cache-ME4MLP42.js → cache-HX36GYZD.js} +2 -2
- package/dist/{chunk-HI2JZYI7.js → chunk-2V6OGGWX.js} +2 -2
- package/dist/{chunk-YVBAGNPD.js → chunk-35X2SXHN.js} +2 -2
- package/dist/chunk-3NKQV6C5.js +7 -0
- package/dist/{chunk-ZMIBNFGM.js → chunk-4PCQGGEE.js} +2 -2
- package/dist/{chunk-3YFRMZEM.js → chunk-4SHYCHSD.js} +2 -2
- package/dist/{chunk-JIIADHWY.js → chunk-4UKJ6WV2.js} +3 -3
- package/dist/{chunk-BPRMSWTN.js → chunk-4XYL2PXR.js} +2 -2
- package/dist/chunk-5OZVS7NT.js +15 -0
- package/dist/{chunk-EYQSYALW.js → chunk-5POYDWEI.js} +2 -2
- package/dist/{chunk-LY42NGAO.js → chunk-6UILYYIR.js} +2 -2
- package/dist/{chunk-3HJFYJ7T.js → chunk-7LZUSED6.js} +2 -2
- package/dist/{chunk-2YZJBUI6.js → chunk-7WG4Y2CG.js} +2 -2
- package/dist/{chunk-DPDOHBU2.js → chunk-A5CW7S74.js} +2 -2
- package/dist/{chunk-DSRK7W7N.js → chunk-AQDEK7UK.js} +2 -2
- package/dist/{chunk-QZ5FBNIY.js → chunk-AZV5CPUO.js} +2 -2
- package/dist/{chunk-6IFQGJIS.js → chunk-C5QNMHU5.js} +2 -2
- package/dist/{chunk-AN5NZ4FP.js → chunk-CM4D7LHD.js} +2 -2
- package/dist/{chunk-IOQBOUWY.js → chunk-DJ6UAC5F.js} +2 -2
- package/dist/{chunk-IXWQRKL6.js → chunk-DVEABL63.js} +2 -2
- package/dist/{chunk-XKEAK44P.js → chunk-EVQ57ISQ.js} +2 -2
- package/dist/{chunk-RF23NUNB.js → chunk-FMQUMUQ4.js} +2 -2
- package/dist/{chunk-5PIONQLS.js → chunk-FUPY7GOL.js} +2 -2
- package/dist/chunk-GNFH4P64.js +15 -0
- package/dist/{chunk-DKCDKW6T.js → chunk-HMESEZ2F.js} +2 -2
- package/dist/{chunk-S4QA6GBI.js → chunk-ICCZDJXN.js} +2 -2
- package/dist/{chunk-XDJNHKWA.js → chunk-IKRJFEJY.js} +2 -2
- package/dist/{chunk-D4TS7B26.js → chunk-J3PWCV5T.js} +2 -2
- package/dist/{chunk-7O7M4ZKC.js → chunk-JG3JU3DL.js} +2 -2
- package/dist/{chunk-BC4H7FVC.js → chunk-JGYCNNRB.js} +2 -2
- package/dist/{chunk-75WAKRC5.js → chunk-LDM4DSX5.js} +2 -2
- package/dist/{chunk-ZEQPV5AZ.js → chunk-LDWY5AO7.js} +2 -2
- package/dist/{chunk-MRT3EHET.js → chunk-LEIGZNC2.js} +2 -2
- package/dist/{chunk-RV62WW6S.js → chunk-LXM5M6QC.js} +3 -3
- package/dist/chunk-M44TJ2WK.js +4 -0
- package/dist/chunk-MGE6FOQK.js +47 -0
- package/dist/chunk-NBPM5VLH.js +4 -0
- package/dist/{chunk-VH2BKOI7.js → chunk-O3LTMVWP.js} +2 -2
- package/dist/{chunk-27L4LN4W.js → chunk-ODRTIW7P.js} +2 -2
- package/dist/{chunk-R5LYMTTV.js → chunk-P7ZXMPT6.js} +2 -2
- package/dist/chunk-PNIBY4A4.js +120 -0
- package/dist/{chunk-3NTAF6FW.js → chunk-Q6H6XIV2.js} +2 -2
- package/dist/{chunk-JJ4WKBYO.js → chunk-QACXPGFV.js} +3 -3
- package/dist/{chunk-JRDXOBXR.js → chunk-QCFF6LJD.js} +2 -2
- package/dist/{chunk-XXTYU327.js → chunk-QPLOUI6B.js} +2 -2
- package/dist/{chunk-GVK4XKAN.js → chunk-QSAP6RXW.js} +2 -2
- package/dist/{chunk-NPCFPKYI.js → chunk-RQ354RWJ.js} +2 -2
- package/dist/{chunk-I6MIYUAX.js → chunk-RUFIL26S.js} +2 -2
- package/dist/{chunk-VHV43JLM.js → chunk-TJRDYOS7.js} +2 -2
- package/dist/{chunk-UUJUGQWI.js → chunk-TMTALVSE.js} +2 -2
- package/dist/{chunk-6JNF6KWD.js → chunk-TXQA2C3Z.js} +2 -2
- package/dist/{chunk-SQBDXVWV.js → chunk-U4BEJLV2.js} +2 -2
- package/dist/{chunk-WNPRGQ22.js → chunk-UKSXDIU6.js} +2 -2
- package/dist/{chunk-SF5I5TSH.js → chunk-UTXHZ5GS.js} +2 -2
- package/dist/{chunk-EVAQN4WA.js → chunk-VJMAWBM3.js} +2 -2
- package/dist/{chunk-P77AC2EH.js → chunk-VM7ZXZY5.js} +2 -2
- package/dist/{chunk-DBAOLI7M.js → chunk-W3IMS7MG.js} +2 -2
- package/dist/{chunk-TTFNWKIQ.js → chunk-WEVEJVTE.js} +2 -2
- package/dist/{chunk-T6L7VZ2R.js → chunk-WFWV6QBD.js} +2 -2
- package/dist/chunk-X43YGQRM.js +4 -0
- package/dist/{chunk-CTGTKRAZ.js → chunk-XCLVBVM6.js} +2 -2
- package/dist/{chunk-HWNT7I24.js → chunk-XJ7TG2CQ.js} +2 -2
- package/dist/{chunk-7DCMQ64U.js → chunk-XV5YOBQC.js} +2 -2
- package/dist/{chunk-FQNMW6A5.js → chunk-XZLAKVZJ.js} +2 -2
- package/dist/{chunk-3ZTBULTL.js → chunk-YQ27WSRB.js} +2 -2
- package/dist/{chunk-WCV5P2KK.js → chunk-YXFJHYQQ.js} +2 -2
- package/dist/{chunk-5QUW4UYX.js → chunk-ZJO3MZCG.js} +2 -2
- package/dist/{chunk-SQNONWYE.js → chunk-ZTYC6W2S.js} +2 -2
- package/dist/{chunk-CDFBHXAC.js → chunk-ZX2EQOFT.js} +2 -2
- package/dist/clean-7Y7ECFLQ.js +8 -0
- package/dist/close_out-4O3CYXQS.js +8 -0
- package/dist/code-NEVQCAVU.js +4 -0
- package/dist/{config-RW4YCUWK.js → config-OB73GAUN.js} +2 -2
- package/dist/{connect-JYD46R5O.js → connect-SXWSVMDX.js} +2 -2
- package/dist/{daemon-6EUEL5QO.js → daemon-BFLI6JN5.js} +2 -2
- package/dist/dashboard.js +16 -16
- package/dist/{detect-PUM67VMB.js → detect-WFOBAVCF.js} +2 -2
- package/dist/{down-WKDH2Q57.js → down-MXQIWODX.js} +3 -3
- package/dist/{fixture-M6ADCJSW.js → fixture-QVJBAOUP.js} +2 -2
- package/dist/form-cli.js +1 -1
- package/dist/hooks-A24D3TBH.js +4 -0
- package/dist/{hooks_gen-MBTKI332.js → hooks_gen-T4Y5PING.js} +2 -2
- package/dist/infra-M6TDGBGH.js +4 -0
- package/dist/init_workspace-DT7QO4IK.js +4 -0
- package/dist/{intercept-LABIHVGV.js → intercept-6RO6HBXA.js} +2 -2
- package/dist/{issue-BDWB5AMY.js → issue-S34MRPMM.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-PLN4HXDS.js +7 -0
- package/dist/logs-AI2YSPQO.js +6 -0
- package/dist/main.js +6 -6
- package/dist/mcp-proxy.js +1 -1
- package/dist/mcp.js +18 -18
- package/dist/{metrics-3RWXVEOL.js → metrics-K2G22ZIK.js} +2 -2
- package/dist/migrate-2F63NQPO.js +4 -0
- package/dist/notes-IPWJHCKQ.js +4 -0
- package/dist/{open-JBPGRGEO.js → open-CDU2BQRP.js} +2 -2
- package/dist/{optimize-PSLZ4E4H.js → optimize-Z5UCLUCY.js} +2 -2
- package/dist/pause-GOLGD5MA.js +4 -0
- package/dist/pr-44PGLRBJ.js +5 -0
- package/dist/proxy_reload-BH4HRPZK.js +6 -0
- package/dist/{registry-LKZS37CM.js → registry-QVBQJWCO.js} +2 -2
- package/dist/remove-5KLMP2CT.js +7 -0
- package/dist/remove_workspace-PV7XLN44.js +8 -0
- package/dist/restart-44XBME57.js +8 -0
- package/dist/resume-FHXAHYAS.js +8 -0
- package/dist/{safari-WEZ2L2UW.js → safari-VVE4HJVW.js} +2 -2
- package/dist/{sandbox-SYD442BF.js → sandbox-473HHZCF.js} +2 -2
- package/dist/{services-G6JQ77MT.js → services-3MEQPUKL.js} +2 -2
- package/dist/{setup-AZGY2DRX.js → setup-M7A4CSB2.js} +3 -3
- package/dist/skills-G42MXET6.js +4 -0
- package/dist/{slots-O2NNUB7M.js → slots-66JPP6W6.js} +2 -2
- package/dist/{standards-WPR3BP6G.js → standards-K6CSQ2C5.js} +2 -2
- package/dist/start_args-6NY7FSAO.js +4 -0
- package/dist/starting_prompt-NMB5RWCC.js +4 -0
- package/dist/stats-EFD7AMJM.js +4 -0
- package/dist/{status-3DSWUHUG.js → status-XOTUSC32.js} +2 -2
- package/dist/stop-DUA7KCKE.js +11 -0
- package/dist/{telepresence-WFH2QYAH.js → telepresence-XFZJNX4O.js} +2 -2
- package/dist/{test-6OAABLBN.js → test-HJT7I4TP.js} +2 -2
- package/dist/{tokens-HOUEXTAB.js → tokens-PGRLSPLQ.js} +2 -2
- package/dist/{up-TZ7M62DH.js → up-SB3CKMMD.js} +3 -3
- package/dist/{v4-L74TSJR2.js → v4-AMXTH5LX.js} +2 -2
- package/dist/wait_load-IEVOJMN2.js +4 -0
- package/dist/werkmeister-workspaces.vsix +0 -0
- package/dist/{workspace-F47G5ZLQ.js → workspace-U5SLAILX.js} +2 -2
- package/man/werkmeister-feature-down.1 +1 -1
- package/man/werkmeister-feature-stop.1 +1 -1
- package/man/werkmeister-feature-up.1 +2 -2
- package/package.json +4 -4
- package/dist/budget-3VGGDFBC.js +0 -4
- package/dist/chunk-53GMH27V.js +0 -4
- package/dist/chunk-LRN6P4FU.js +0 -4
- package/dist/chunk-NGHAWOIC.js +0 -15
- package/dist/chunk-T6I2KW2O.js +0 -119
- package/dist/chunk-UXBYBK5Y.js +0 -15
- package/dist/chunk-XXGP43GA.js +0 -47
- package/dist/clean-TPA4YXGY.js +0 -8
- package/dist/close_out-26LEV2FM.js +0 -8
- package/dist/code-TE5Z2U4Q.js +0 -4
- package/dist/hooks-RTSGMJOV.js +0 -4
- package/dist/infra-YRZSORRN.js +0 -4
- package/dist/init_workspace-IYRAIBZ3.js +0 -4
- package/dist/list_workspaces-XODG2YNM.js +0 -7
- package/dist/logs-JJMYWPLY.js +0 -6
- package/dist/migrate-G6YZCPOA.js +0 -4
- package/dist/notes-AGFIWO3Q.js +0 -4
- package/dist/pause-7GU3KWI7.js +0 -4
- package/dist/pr-BNYO2WXD.js +0 -5
- package/dist/proxy_reload-67GSBSY2.js +0 -6
- package/dist/remove-UBXQYUSU.js +0 -7
- package/dist/remove_workspace-E56PMGYG.js +0 -8
- package/dist/restart-WAXICEHE.js +0 -8
- package/dist/resume-BRXULJJB.js +0 -8
- package/dist/skills-NIBLYEJ3.js +0 -4
- package/dist/start_args-MELEQIE4.js +0 -4
- package/dist/starting_prompt-24UNZIA3.js +0 -4
- package/dist/stats-VKH7IHQL.js +0 -4
- package/dist/stop-7LWGX2EC.js +0 -9
- package/dist/wait_load-VBRGHA2T.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-5POYDWEI.js";import"./chunk-JGYCNNRB.js";import"./chunk-LEIGZNC2.js";import"./chunk-RUFIL26S.js";import"./chunk-MGE6FOQK.js";import"./chunk-YXFJHYQQ.js";import"./chunk-AQDEK7UK.js";import"./chunk-XJ7TG2CQ.js";import"./chunk-W3IMS7MG.js";import"./chunk-ODRTIW7P.js";import"./chunk-O3LTMVWP.js";import"./chunk-QCFF6LJD.js";import"./chunk-ICCZDJXN.js";import"./chunk-C5QNMHU5.js";import"./chunk-J3PWCV5T.js";import"./chunk-CM4D7LHD.js";import"./chunk-7LZUSED6.js";import{h as E}from"./chunk-XCLVBVM6.js";import"./chunk-4XYL2PXR.js";import"./chunk-QACXPGFV.js";import"./chunk-ZX2EQOFT.js";import"./chunk-AZV5CPUO.js";import"./chunk-JG3JU3DL.js";import"./chunk-ZTYC6W2S.js";import"./chunk-5OZVS7NT.js";import"./chunk-HMESEZ2F.js";import"./chunk-WFWV6QBD.js";import"./chunk-QSAP6RXW.js";import"./chunk-2V6OGGWX.js";import"./chunk-GNFH4P64.js";import{d as h}from"./chunk-A5CW7S74.js";import"./chunk-VM7ZXZY5.js";import"./chunk-TMTALVSE.js";import"./chunk-RQ354RWJ.js";import"./chunk-QPLOUI6B.js";import{X as d,aa as l}from"./chunk-P7ZXMPT6.js";import"./chunk-U4BEJLV2.js";import{a,f as u}from"./chunk-7WG4Y2CG.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-EBIFI3ED.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
|
+
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
+
import{a as m}from"./chunk-X43YGQRM.js";import{e as d}from"./chunk-MGE6FOQK.js";import"./chunk-YXFJHYQQ.js";import"./chunk-AQDEK7UK.js";import"./chunk-XJ7TG2CQ.js";import"./chunk-W3IMS7MG.js";import"./chunk-O3LTMVWP.js";import"./chunk-QCFF6LJD.js";import"./chunk-ICCZDJXN.js";import"./chunk-C5QNMHU5.js";import"./chunk-J3PWCV5T.js";import"./chunk-CM4D7LHD.js";import"./chunk-7LZUSED6.js";import"./chunk-XCLVBVM6.js";import"./chunk-4XYL2PXR.js";import"./chunk-QACXPGFV.js";import"./chunk-ZX2EQOFT.js";import"./chunk-AZV5CPUO.js";import"./chunk-JG3JU3DL.js";import"./chunk-ZTYC6W2S.js";import"./chunk-5OZVS7NT.js";import"./chunk-HMESEZ2F.js";import"./chunk-WFWV6QBD.js";import"./chunk-QSAP6RXW.js";import"./chunk-2V6OGGWX.js";import"./chunk-GNFH4P64.js";import"./chunk-A5CW7S74.js";import"./chunk-VM7ZXZY5.js";import"./chunk-TMTALVSE.js";import"./chunk-RQ354RWJ.js";import"./chunk-QPLOUI6B.js";import"./chunk-P7ZXMPT6.js";import"./chunk-U4BEJLV2.js";import{a as s,f as u}from"./chunk-7WG4Y2CG.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-36FZKZ3S.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-NBPM5VLH.js";import{d as s}from"./chunk-J3PWCV5T.js";import"./chunk-4XYL2PXR.js";import"./chunk-HMESEZ2F.js";import"./chunk-QSAP6RXW.js";import"./chunk-A5CW7S74.js";import{h as e,l as c}from"./chunk-P7ZXMPT6.js";import"./chunk-U4BEJLV2.js";import{a as r,f as i}from"./chunk-7WG4Y2CG.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-HX36GYZD.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{a as T,b as g}from"./chunk-
|
|
3
|
+
import{a as T,b as g}from"./chunk-U4BEJLV2.js";import{a as o,f as $}from"./chunk-7WG4Y2CG.js";$();import*as l from"node:fs";import*as P from"node:os";import*as a from"node:path";var j="Precedence: these standards' rules win over conflicting task framing \u2014 if a rule and the task clash, follow the rule and say so (invariant: apply it and write a `decision` note; rule: surface the conflict in one line, then apply). This gate fires once; your retry will proceed.",D="Standards gate: invoke `w9r-implement` before coding \u2014 it loads the universal base (ponytail + comments + engineering) and the workspace notes. Then retry this edit.";function F(t){let e="",n=0,r=t.length;for(;n<r;){let i=t[n];if(n+=1,i==="*")e+=".*";else if(i==="?")e+=".";else if(i==="["){let s=n;for(s<r&&t[s]==="!"&&(s+=1),s<r&&t[s]==="]"&&(s+=1);s<r&&t[s]!=="]";)s+=1;if(s>=r)e+="\\[";else{let c=t.slice(n,s).replace(/\\/g,"\\\\");n=s+1,c.startsWith("!")?c="^"+c.slice(1):c.startsWith("^")&&(c="\\"+c),e+=`[${c}]`}}else e+=i.replace(/[.+^${}()|[\]\\]/g,"\\$&")}return`^(?:${e})$`}o(F,"_translate");function O(t,e){return new RegExp(F(e),"s").test(t)}o(O,"fnmatch");function R(t,e){let n=S(t);for(let r of e){let i=S(r),s=a.relative(i,n);if(!(s===""||s===".."||s.startsWith(".."+a.sep)||a.isAbsolute(s)))return a.join(i,s.split(a.sep)[0])}return null}o(R,"workspaceUnder");function S(t){try{return l.realpathSync(t)}catch{return a.resolve(t)}}o(S,"_realpath");function W(t,e){if(e){let i=R(t,e);return i!==null&&E(g(i))?i:null}let n=a.resolve(t),r=S(P.homedir());for(;;){if(E(g(n))&&S(n)!==r)return n;let i=a.dirname(n);if(i===n)return null;n=i}}o(W,"findWorkspaceRoot");function E(t){try{return l.statSync(t).isDirectory()}catch{return!1}}o(E,"_isDir");function x(t){try{return l.statSync(t).isFile()}catch{return!1}}o(x,"_isFile");function p(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}o(p,"_isDict");function C(t){let e=a.join(g(t),"standards.json");if(!x(e))return null;let n;try{n=JSON.parse(l.readFileSync(e,"utf8"))}catch{return null}return p(n)?n:null}o(C,"loadManifest");function v(t,e){return a.join(g(t),".gate",`${e}.json`)}o(v,"_statePath");function J(t,e){let n=v(t,e);if(!x(n))return{};let r;try{r=JSON.parse(l.readFileSync(n,"utf8"))}catch{return null}return p(r)?r:null}o(J,"_loadState");function G(t,e,n){try{let r=v(t,e);return l.mkdirSync(a.dirname(r),{recursive:!0}),l.writeFileSync(r,JSON.stringify(n)),!0}catch{return!1}}o(G,"_saveState");function B(t,e){if(!(!e||e.includes("/")||e.includes("..")))try{l.unlinkSync(v(t,e))}catch{}}o(B,"resetSessionState");function N(t){return[...t].sort()}o(N,"_sorted");function H(t){let e=/^---\r?\n([\s\S]*?)\r?\n---/.exec(t);if(!e)return;let n=/^status:\s*["']?([^\s"'#]+)/m.exec(e[1]);return n?n[1].toLowerCase():null}o(H,"_noteStatus");function U(t,e){let n=String(e.note??"");if(!/^[a-z]+$/.test(n))return!0;let r=e.status?String(e.status).toLowerCase():null,i=a.join(g(t),"notes"),s;try{s=l.readdirSync(i)}catch(u){return u.code!=="ENOENT"}let c=new RegExp(`^\\d{3}-${n}-.+\\.md$`);for(let u of s){if(!c.test(u))continue;let f;try{f=l.readFileSync(a.join(i,u),"utf8")}catch{return!0}let d=H(f);if(d===void 0)return!0;if(!(d==="superseded"||d==="graduated")&&(r===null||d===r))return!0}return!1}o(U,"_phaseGateSatisfied");function L(t){let e=String(t.note);if(t.status){let n=String(t.status);return`Phase gate: no \`${e}\` note in \`.werkmeister/notes/\` has \`status: ${n}\`, so source edits wait for an approved design. Invoke \`w9r-research\`, present the design to the user, and when they approve write \`NNN-${e}-<slug>.md\` with \`status: ${n}\` recording what was approved. Then retry this edit. Edits under \`.werkmeister/\` are not gated.`}return`Phase gate: no \`${e}\` note in \`.werkmeister/notes/\` names the root cause yet. Invoke \`w9r-research\`, reproduce the problem, and write \`NNN-${e}-<slug>.md\` stating the root cause. Then retry this edit. Edits under \`.werkmeister/\` are not gated.`}o(L,"_phaseGateText");function M(t,e,n){if(!e||e.includes("/")||e.includes(".."))return null;let r=W(t);if(r===null)return null;let i=C(r);if(i===null)return null;let s=J(r,e);if(s===null)return null;let c=n?a.relative(r,n):"",u=i.phase_gate;if(p(u)&&c&&c!==".."&&!c.startsWith(".."+a.sep)&&!a.isAbsolute(c)&&!c.startsWith(T+a.sep)&&!U(r,u))return L(u);let f=new Set(Array.isArray(s.delivered)?s.delivered:[]),d=!s.phase_entry_delivered,h=null,_=p(i.domains)?i.domains:{};for(let m of N(Object.keys(_))){let y=_[m];if(f.has(m)||!p(y))continue;if((Array.isArray(y.applies_to)?y.applies_to:[]).some(A=>O(c,String(A)))){h=m;break}}if(!d&&h===null)return null;let w=[];if(d&&w.push(D),h!==null){let m=_[h],y=String(p(m)&&m.summary||"").trim(),k=`Standards gate: you are editing a path governed by the \`${h}\` standard, which has not been loaded this session. Invoke the \`w9r-${h}-standard\` skill, then retry this edit.`;y&&(k+=` Summary: ${y}.`),w.push(k)}w.push(j);let b={phase_entry_delivered:!0,delivered:N(h?new Set([...f,h]):f)};return G(r,e,b)?w.join(`
|
|
4
4
|
`):null}o(M,"decide");var X=/^\*\*\* (?:Add File|Update File|Delete File|Move to): (.+)$/gm;function Y(t){return[...new Set([...t.matchAll(X)].map(e=>e[1].trim()))]}o(Y,"patchPaths");function I(){let t;try{let f=process.stdin.isTTY?"":l.readFileSync(0,"utf8"),d=f.trim()?JSON.parse(f):{};t=p(d)?d:{}}catch{t={}}let e=String(t.session_id||""),n=t.tool_input,r=p(n)?n:{},i=String(t.cwd||process.cwd()),s=t.tool_name==="apply_patch"?r.command:void 0,c=typeof s=="string"?Y(s).map(f=>a.resolve(i,f)):[String(r.file_path||"")],u=null;try{for(let f of c)if(u=M(i,e,f),u)break}catch{u=null}u&&console.log(JSON.stringify({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:u}}))}o(I,"main");export{R as a,W as b,C as c,B as d,I as e};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-2V6OGGWX.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 M}from"./chunk-
|
|
3
|
+
import{a as M}from"./chunk-WEVEJVTE.js";import{a as $,b as v,c as y,d as u,e as S}from"./chunk-VJMAWBM3.js";import{f as x}from"./chunk-HMESEZ2F.js";import{h as e,j as E,k as R,l as C}from"./chunk-P7ZXMPT6.js";import{a as p,f as h}from"./chunk-7WG4Y2CG.js";h();function T(n,t){if(Object.keys(n).length===0)return" No container data collected.";let a=[],o=` ${e.BOLD}${"Container".padEnd(35)} ${"Avg CPU".padStart(8)} ${"Max CPU".padStart(8)} ${"Avg Mem".padStart(8)} ${"Max Mem".padStart(8)} ${"Samples".padStart(7)} ${"CPU Lim".padStart(7)}${e.RESET}`;a.push(o),a.push(` ${"\u2500".repeat(94)}`);for(let r of Object.keys(n).sort()){let s=n[r];a.push(` ${r.padEnd(35)} ${s.avgCpu.toFixed(1).padStart(7)}% ${s.maxCpu.toFixed(1).padStart(7)}% ${$(s.avgMem).padStart(8)} ${$(s.maxMem).padStart(8)} ${String(s.samples).padStart(7)} ${(S(r,t)??"n/a").padStart(7)}`)}return a.join(`
|
|
4
4
|
`)}p(T,"formatStatsTable");function O(n){if(n.length===0)return" No recommendations available (no data collected).";let t=[],a=` ${e.BOLD}${"Container".padEnd(35)} ${"Max CPU".padStart(8)} ${"Max Mem".padStart(8)} ${"Rec. CPU".padStart(9)} ${"Rec. Mem".padStart(9)} ${"Rec. Rsrv".padStart(9)}${e.RESET}`;t.push(a),t.push(` ${"\u2500".repeat(90)}`);for(let o of n)t.push(` ${o.name.padEnd(35)} ${o.max_cpu_pct.toFixed(1).padStart(7)}% ${$(o.max_mem_mib).padStart(8)} ${o.recommended_cpus.padStart(9)} ${o.recommended_memory.padStart(9)} ${o.recommended_reservation.padStart(9)}`);t.push(""),t.push(` ${e.BOLD}YAML Snippets:${e.RESET}`),t.push("");for(let o of n)t.push(` # ${o.name}`),t.push(" deploy:"),t.push(" resources:"),t.push(" limits:"),t.push(` cpus: "${o.recommended_cpus}"`),t.push(` memory: ${o.recommended_memory}`),t.push(" reservations:"),t.push(` cpus: "${v(o.recommended_cpus)}"`),t.push(` memory: ${o.recommended_reservation}`),t.push("");return t.join(`
|
|
5
5
|
`)}p(O,"formatRecommendations");async function k(n){let t=n.collect??0,a=n.interval??10,o=!!n.save;console.log(`
|
|
6
6
|
${e.BOLD}=== Docker Resource Usage ===${e.RESET}
|
|
@@ -10,4 +10,4 @@ ${e.BOLD}--- Collected Statistics ---${e.RESET}
|
|
|
10
10
|
`),console.log(T(r.stats,u())),console.log(`
|
|
11
11
|
${e.BOLD}--- Recommended Resource Limits ---${e.RESET}
|
|
12
12
|
`),console.log(O(r.recommendations)),r.reportPath?R(`Report saved to: ${r.reportPath}`):a||console.log(` ${e.DIM}Tip: Use --save to write results to stats/ directory${e.RESET}`),console.log())}p(D,"renderCollection");function f(n){return n>=1024?`${(n/1024).toFixed(1)} GiB`:n>=1?`${n.toFixed(0)} MiB`:`${(n*1024).toFixed(0)} KiB`}p(f,"fmtMem");export{k as a,f as b};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-35X2SXHN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
|
+
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
+
import{E as oe,ja as ae,k as ne,w as re}from"./chunk-PNIBY4A4.js";import{c as se}from"./chunk-JGYCNNRB.js";import{h as B,j as ee,v as te}from"./chunk-GNFH4P64.js";import{G as Z,l as G,w as X}from"./chunk-P7ZXMPT6.js";import{a as w,f as V}from"./chunk-7WG4Y2CG.js";V();import{spawnSync as ce}from"node:child_process";import*as S from"node:fs";import*as A from"node:path";var $e=["7d","30d","90d","all"],ie=864e5,$=["working","ready","pr-open","awaiting-release"],le={working:"working",ready:"ready","pr-open":"pr-open",merged:"awaiting-release"},o=w(s=>Date.parse(s),"ms"),N=w((s,n)=>Math.round((o(n)-o(s))/6e4),"minutes"),fe=w(()=>({person:0,capacity:0,pr:0,gateRetry:0,release:0}),"zeroWaits");function ue(s,n){if(!s.length)return null;let g=[...s].sort((p,f)=>p-f);return g[Math.ceil(n*g.length)-1]??null}w(ue,"percentile");var J=w(s=>({p50Minutes:ue(s,.5),p90Minutes:ue(s,.9)}),"percentiles");function z(s){let n=new Date(s);return n.setUTCHours(0,0,0,0),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+6)%7),n.toISOString().slice(0,10)}w(z,"weekOf");var H=w((s,n)=>s===void 0||o(n)<o(s)?n:s,"min"),j=w((s,n)=>s===void 0||o(n)>o(s)?n:s,"max");function he(){let s=new Set;return n=>{let g=n.pr;if(!["pr.open","pr.merged","release"].includes(String(n.event))||!g)return!0;let p=`${n.event}|${g}`;return!s.has(p)&&!!s.add(p)}}w(he,"firstPerPr");function me(s,n,g){let p=g.getTime(),f=n==="all"?null:p-Number.parseInt(n,10)*ie,u=w(e=>!!e&&o(e)<=p&&(f===null||o(e)>=f),"inRange"),r=new Map;for(let e of s.usages)e.firstTurn&&r.set(e.workspace,e.firstTurn);for(let e of s.open)e.firstTurn&&r.set(e.workspace,e.firstTurn);let d=new Map;for(let e of s.usages)e.firstTurn&&d.set(e.workspace,e.firstTurn);for(let e of s.open){let t=s.usages.filter(a=>a.workspace===e.workspace).reduce((a,l)=>j(a,l.closedAt),void 0);t?d.set(e.workspace,t):d.delete(e.workspace)}let h=new Map,m=[],y=new Map,x=new Map,M=new Map,O=new Map,ge=s.events.filter(e=>{let t=String(e.at);if(Number.isNaN(o(t)))return!1;let a=d.get(String(e.workspace));return!a||o(t)>=o(a)}).sort((e,t)=>o(String(e.at))-o(String(t.at))).filter(he());for(let e of ge){let t=String(e.at),a=String(e.workspace),l=h.get(a);l||(l={},h.set(a,l)),typeof e.ticket=="string"&&(l.ticket??=e.ticket);let c=String(e.pr??"");switch(e.event){case"answer":m.push({cause:"person",at:t,s:Number(e.waited_s)||0});break;case"queue.admit":m.push({cause:"capacity",at:t,s:Number(e.waited_s)||0});break;case"gate.start":l.firstGateStart??=t,O.set(String(e.run),t);break;case"gate.end":{let i=Number(e.exit),k=O.get(String(e.run));i===75&&k&&m.push({cause:"gateRetry",at:t,s:(o(t)-o(k))/1e3}),i!==75&&(l.firstFinished??={at:t,exit:i});break}case"pr.open":l.firstOpen=H(l.firstOpen,t),y.set(c,H(y.get(c),t));break;case"pr.merged":{l.lastMerged=j(l.lastMerged,t),x.set(c,t);let i=y.get(c);i&&m.push({cause:"pr",at:t,s:(o(t)-o(i))/1e3});break}case"release":{l.lastRelease=j(l.lastRelease,t),M.set(c,t);let i=x.get(c);i&&m.push({cause:"release",at:t,s:(o(t)-o(i))/1e3});break}}}let U=new Map;for(let e of s.events){let t=String(e.at);if(e.event!=="issue.start"||Number.isNaN(o(t)))continue;let a=String(e.workspace),l=r.get(a),c=s.open.some(i=>i.workspace===a)?d.get(a):s.usages.reduce((i,k)=>k.workspace===a&&k.closedAt&&l&&o(k.closedAt)<o(l)?j(i,k.closedAt):i,void 0);(!c||o(t)>=o(c))&&U.set(a,H(U.get(a),t))}let L=fe(),D=new Map,F=m.filter(e=>u(e.at)),q=f!==null?f:F.length?Math.min(...F.map(e=>o(e.at))):null;if(q!==null)for(let e=o(z(q));e<=p;e+=7*ie)D.set(z(e),fe());for(let e of F){let t=Math.round(e.s);L[e.cause]+=t;let a=D.get(z(o(e.at)));a&&(a[e.cause]+=t)}let de=new Map(s.open.map(e=>[e.workspace,$.indexOf(le[e.lifecycle])])),K={working:[],ready:[],"pr-open":[],"awaiting-release":[]};for(let e of new Set([...h.keys(),...r.keys()])){let t=h.get(e)??{},a=[["working",r.get(e),t.firstGateStart],["ready",t.firstGateStart,t.firstOpen],["pr-open",t.firstOpen,t.lastMerged],["awaiting-release",t.lastMerged,t.lastRelease]],l=de.get(e)??$.length;for(let[c,i,k]of a)i&&u(k)&&$.indexOf(c)<l&&K[c].push(N(i,k))}let _=g.toISOString(),we=$.map(e=>{let{p50Minutes:t,p90Minutes:a}=J(K[e]),l=s.open.filter(c=>le[c.lifecycle]===e).map(c=>{let i=h.get(c.workspace)??{},k={working:c.firstTurn,ready:i.firstGateStart??c.prFileAt,"pr-open":i.firstOpen,"awaiting-release":i.lastMerged}[e]??null,E=k?N(k,_):null,C=[["person",c.askAt],["capacity",c.waitingSince],["pr",e==="pr-open"?i.firstOpen:null],["release",e==="awaiting-release"?i.lastMerged:null]].find(([,ke])=>ke);return{workspace:c.workspace,ticket:c.ticket??i.ticket??null,stage:e==="working"?c.stage:null,enteredAt:k,ageMinutes:E,overP90:E!==null&&a!==null&&E>a,wait:C?.[1]?{cause:C[0],since:C[1],minutes:N(C[1],_)}:null}}).sort((c,i)=>(i.ageMinutes??-1)-(c.ageMinutes??-1));return{column:e,wip:l.length,p50Minutes:t,p90Minutes:a,cards:l}}),I=new Map;for(let e of s.usages)e.ticket&&I.set(e.workspace,e.ticket);for(let e of s.open)e.ticket&&I.set(e.workspace,e.ticket);let R=[];for(let[e,t]of h){let a=r.get(e);if(!a||!u(t.lastMerged))continue;let l=t.lastRelease??null,c=U.get(e)??null;R.push({ticket:t.ticket??I.get(e)??e,workspace:e,firstTurn:a,inProgressAt:c,mergedAt:t.lastMerged,releasedAt:l,cycleMinutes:N(c??a,t.lastMerged),leadMinutes:N(a,l??t.lastMerged)})}R.sort((e,t)=>o(e.mergedAt)-o(t.mergedAt));let T=s.usages.filter(e=>u(e.closedAt)),b={input:0,output:0,cacheCreation:0,cacheRead:0};for(let e of T)for(let t of Object.keys(b))b[t]+=e.totals?.[t]??0;let P=T.filter(e=>e.estUsd!=null),Y=b.input+b.cacheCreation+b.cacheRead,W=w(e=>T.reduce((t,a)=>t+(e(a)??0),0),"sum"),v=[...h.values()].flatMap(e=>e.firstFinished&&u(e.firstFinished.at)?[e.firstFinished]:[]),Q=v.filter(e=>e.exit===0).length;return{range:n,from:f===null?null:new Date(f).toISOString(),to:_,board:we,waitsByWeek:[...D].map(([e,t])=>({week:e,seconds:t})),waits:L,tickets:R,cycle:J(R.map(e=>e.cycleMinutes)),lead:J(R.map(e=>e.leadMinutes)),usage:{workspaces:T.length,estUsd:P.length?P.reduce((e,t)=>e+(t.estUsd??0),0):null,costUnknown:T.length-P.length,tokens:b,cacheReadShare:Y?b.cacheRead/Y:null,activeMinutes:W(e=>e.activeMinutes),wallClockMinutes:W(e=>e.wallClockMinutes),turns:W(e=>e.turns)},gate:{firstPassRate:v.length?Q/v.length:null,passed:Q,workspaces:v.length}}}w(me,"flowMetrics");function Me(){let s=A.join(X(),"metrics"),n=[];try{n=S.readdirSync(s).filter(p=>/^events-.*\.jsonl$/.test(p))}catch{return[]}let g=[];for(let p of n)for(let f of S.readFileSync(A.join(s,p),"utf8").split(`
|
|
4
|
+
`))try{let u=JSON.parse(f);["at","event","workspace"].every(r=>typeof u?.[r]=="string")&&g.push(u)}catch{}return g}w(Me,"readMetricsEvents");function Se(){let s=A.join(Z(),se);if(!S.existsSync(s))return[];let n=ce("git",["-C",s,"for-each-ref","refs/heads","--format=%(refname:short)"],{encoding:"utf8"});if(n.status!==0)return G(`metrics: could not list record branches in ${s}: ${n.stderr.trim()}`),[];let g=n.stdout.split(`
|
|
5
|
+
`).filter(Boolean);if(!g.length)return[];let p=ce("git",["-C",s,"cat-file","--batch"],{input:g.map(d=>`${d}:usage.json
|
|
6
|
+
`).join(""),maxBuffer:1<<28});if(p.status!==0)return G(`metrics: could not read usage.json from record branches: ${p.stderr}`),[];let f=[],u=p.stdout,r=0;for(;r<u.length;){let d=u.indexOf(10,r);if(d<0)break;let h=u.toString("utf8",r,d).split(" ");if(r=d+1,h[1]!=="blob")continue;let m=Number(h[2]),y=pe(u.toString("utf8",r,r+m));y&&f.push(y),r+=m+1}return f}w(Se,"recordBranchUsages");function ye(s,n){let g=[];try{g=S.readdirSync(B(s)).filter(f=>f.endsWith(".json"))}catch{return null}let p=[];for(let f of g)try{let u=JSON.parse(S.readFileSync(A.join(B(s),f),"utf8"));typeof u?.ask?.at=="string"&&!ee(u,n)&&p.push(u.ask.at)}catch{}return p.sort((f,u)=>o(f)-o(u))[0]??null}w(ye,"oldestAsk");function pe(s){try{let n=JSON.parse(s);return typeof n?.workspace=="string"&&typeof n?.closedAt=="string"?n:null}catch{return null}}w(pe,"usageRow");async function je(s={},n=new Date){let g=await Promise.all((await re()).workspaces.map(async r=>{let{state:d,prs:h}=ne(r.path);if(d!=="working"&&d!=="ready"&&d!=="pr-open"&&d!=="merged"){let M=A.join(r.path,"usage.json"),O=S.existsSync(M)?pe(S.readFileSync(M,"utf8")):null;return O?{usage:O}:{}}let m=d==="ready"?h.flatMap(M=>S.statSync(M.path,{throwIfNoEntry:!1})?.mtimeMs??[]):[],x=(await ae(r.name).then(M=>M.sessions).catch(()=>[])).flatMap(M=>M.firstTurn??[]).sort((M,O)=>o(M)-o(O));return{open:{workspace:r.name,ticket:r.issueId??null,lifecycle:d,stage:d==="working"?await oe(r.path):null,firstTurn:x[0]??null,prFileAt:m.length?new Date(Math.max(...m)).toISOString():null,askAt:ye(r.path,n.getTime()),waitingSince:te(r.path)?.since??null}}})),p=g.flatMap(r=>r.open??[]),f=g.flatMap(r=>r.usage??[]),u=new Set(f.map(r=>`${r.workspace}|${r.closedAt}`));for(let r of Se())u.has(`${r.workspace}|${r.closedAt}`)||(u.add(`${r.workspace}|${r.closedAt}`),f.push(r));return me({events:Me(),open:p,usages:f},s.range??"7d",n)}w(je,"metricsReport");export{$e as a,je as b};
|
|
7
|
+
//# sourceMappingURL=chunk-3NKQV6C5.js.map
|