eser 4.1.44 → 4.1.48
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/chunks/{add-IM5JC6QA.js → add-HBUORTI5.js} +1 -1
- package/chunks/ajan-CL22MZYV.js +2 -0
- package/chunks/{approve-4CQFJU5A.js → approve-UWBYGXCF.js} +1 -1
- package/chunks/{ask-UTEI7KGQ.js → ask-M3VS3GIJ.js} +1 -1
- package/chunks/{block-MQTVULY3.js → block-W76WKMS3.js} +1 -1
- package/chunks/{browser-JGBNWUEQ.js → browser-D536WJU3.js} +1 -1
- package/chunks/{build-IRLEBMJE.js → build-DPBRNANI.js} +2 -2
- package/chunks/{bun-HIMXX54I.js → bun-7XJSUU6Z.js} +1 -1
- package/chunks/{cancel-56EDMMFO.js → cancel-46C7E5N7.js} +1 -1
- package/chunks/{changelog-gen-USXHO6PE.js → changelog-gen-627BV77Z.js} +1 -1
- package/chunks/{chunk-3F23SLJA.js → chunk-2LF7QSIN.js} +28 -27
- package/chunks/{chunk-YURNTYEP.js → chunk-2TANTKYS.js} +1 -1
- package/chunks/{chunk-TELZ2ZFI.js → chunk-2YTW3JQ6.js} +1 -1
- package/chunks/{chunk-V3NJTF2Y.js → chunk-2ZYCRMUT.js} +1 -1
- package/chunks/chunk-3D5TBTM3.js +3 -0
- package/chunks/{chunk-LSET5TD3.js → chunk-3OG2MEF2.js} +1 -1
- package/chunks/{chunk-BSV66I74.js → chunk-4LQG2WOJ.js} +1 -1
- package/chunks/{chunk-OWQXQ33F.js → chunk-4X4NHXFE.js} +1 -1
- package/chunks/{chunk-H6HLRKRK.js → chunk-5JV6KQMP.js} +4 -4
- package/chunks/{chunk-ZRUM5PE7.js → chunk-6BILFSH2.js} +1 -1
- package/chunks/{chunk-6VHZQNHX.js → chunk-6DBKPC2O.js} +1 -1
- package/chunks/{chunk-BQT5RJZB.js → chunk-6G6UVWJN.js} +1 -1
- package/chunks/{chunk-4EJVA4QA.js → chunk-73IMECRI.js} +1 -1
- package/chunks/{chunk-SK6QUPJR.js → chunk-7KFSTOXR.js} +1 -1
- package/chunks/{chunk-FODF5MI2.js → chunk-7NKYCWAA.js} +1 -1
- package/chunks/{chunk-6E6JUBFH.js → chunk-ALFFE37K.js} +1 -1
- package/chunks/{chunk-UQRZJPYH.js → chunk-ATYDQCCJ.js} +1 -1
- package/chunks/{chunk-IBBGWXAI.js → chunk-C2IORZTF.js} +1 -1
- package/chunks/{chunk-H5GHXMIT.js → chunk-C7NZBKCW.js} +1 -1
- package/chunks/{chunk-IBB6UZR2.js → chunk-CVDLYIOW.js} +1 -1
- package/chunks/{chunk-IWXI3UYI.js → chunk-DLBRD3UT.js} +1 -1
- package/chunks/{chunk-QBQAOXEV.js → chunk-DM6U63HP.js} +1 -1
- package/chunks/chunk-DPZJWN2Y.js +2 -0
- package/chunks/{chunk-VE6XM5OZ.js → chunk-EQUPVWVY.js} +1 -1
- package/chunks/{chunk-2N62LL55.js → chunk-FNPBHLLZ.js} +1 -1
- package/chunks/{chunk-QMRKAC6C.js → chunk-FZ5WFU6R.js} +1 -1
- package/chunks/chunk-GVTM4EOU.js +4 -0
- package/chunks/{chunk-KZAPWWOT.js → chunk-H6P3EACV.js} +1 -1
- package/chunks/{chunk-IQQEVKBP.js → chunk-IIFFSCDJ.js} +1 -1
- package/chunks/{chunk-TYLYMZQC.js → chunk-IZUADMIU.js} +1 -1
- package/chunks/{chunk-2OKCK56H.js → chunk-J5HFD7AQ.js} +1 -1
- package/chunks/{chunk-3LDGQFQZ.js → chunk-JFKHBLJB.js} +1 -1
- package/chunks/{chunk-SMKZDN2Q.js → chunk-JO4JKJ7R.js} +1 -1
- package/chunks/{chunk-CXTPYPO4.js → chunk-KHBIOZJE.js} +1 -1
- package/chunks/{chunk-EXP2TZZC.js → chunk-L5OC7F24.js} +1 -1
- package/chunks/{chunk-7RL5ZFGE.js → chunk-LJ7A5HYR.js} +1 -1
- package/chunks/{chunk-SF6FT44C.js → chunk-LLA75EMV.js} +1 -1
- package/chunks/chunk-LWQPFCWC.js +5 -0
- package/chunks/{chunk-Z2LXZLZV.js → chunk-LYPDFFKK.js} +1 -1
- package/chunks/{chunk-2UHHAPKY.js → chunk-MTCPFQ5I.js} +1 -1
- package/chunks/{chunk-LYKN5EIM.js → chunk-MW3RJU6I.js} +1 -1
- package/chunks/{chunk-XOSAN6PX.js → chunk-N4NDBIQS.js} +1 -1
- package/chunks/{chunk-SH4H7OLV.js → chunk-NMEPQK3T.js} +1 -1
- package/chunks/{chunk-GKOMIH2B.js → chunk-NMSD4ZXJ.js} +1 -1
- package/chunks/{chunk-QD46ROBD.js → chunk-NTY267SI.js} +1 -1
- package/chunks/{chunk-VVWAUS3D.js → chunk-NVPQJFAI.js} +1 -1
- package/chunks/{chunk-L7RS6MQ5.js → chunk-O325ZU5M.js} +1 -1
- package/chunks/{chunk-3U5M6YO6.js → chunk-OLHBVIWG.js} +1 -1
- package/chunks/chunk-R2W7BL7V.js +2 -0
- package/chunks/{chunk-E423U2PP.js → chunk-R3UCRXDC.js} +1 -1
- package/chunks/{chunk-RIOYVPPP.js → chunk-R4GKIRAI.js} +1 -1
- package/chunks/{chunk-WPOZMPUR.js → chunk-RHVDIXOM.js} +1 -1
- package/chunks/{chunk-ZEFYMWGZ.js → chunk-RNFCAHVL.js} +2 -2
- package/chunks/{chunk-MBG7SPPO.js → chunk-SHN5MT56.js} +1 -1
- package/chunks/{chunk-RFHWH6ZX.js → chunk-TFRONHJA.js} +1 -1
- package/chunks/chunk-TMMAF763.js +10 -0
- package/chunks/{chunk-VWQLQJVX.js → chunk-TW23CULJ.js} +1 -1
- package/chunks/{chunk-TNWF37YQ.js → chunk-TZDEJTLC.js} +30 -30
- package/chunks/{chunk-MPGRKZIA.js → chunk-UEMWZOIU.js} +1 -1
- package/chunks/{chunk-QYMHLTVT.js → chunk-UGYRUVUH.js} +1 -1
- package/chunks/{chunk-YJ3ICGHV.js → chunk-ULIMXXRY.js} +1 -1
- package/chunks/{chunk-WF6JNPZS.js → chunk-VV47GXU5.js} +1 -1
- package/chunks/{chunk-4COCZPO5.js → chunk-WI2RW3YL.js} +1 -1
- package/chunks/{chunk-H7U2VQCK.js → chunk-WTMV5GTZ.js} +1 -1
- package/chunks/chunk-WZHVKEPB.js +17 -0
- package/chunks/{chunk-BNMKKNLB.js → chunk-X3L6GBUX.js} +1 -1
- package/chunks/chunk-XOMPQOI6.js +4 -0
- package/chunks/{chunk-2BEIAJ5J.js → chunk-XUV7CW3L.js} +1 -1
- package/chunks/chunk-YACXTCWF.js +2 -0
- package/chunks/{chunk-WWI6727S.js → chunk-YKEVDAWS.js} +1 -1
- package/chunks/chunk-YTF3BAQS.js +2 -0
- package/chunks/{chunk-6V6C6MWY.js → chunk-ZNP3NXAD.js} +1 -1
- package/chunks/claude-code-UJYCO6CN.js +2 -0
- package/chunks/{clone-DSVKII72.js → clone-455UAECS.js} +1 -1
- package/chunks/{cmd-YU4MVRRR.js → cmd-QE4P4DS4.js} +1 -1
- package/chunks/{commitmsg-FS52L6J5.js → commitmsg-57EMHAFY.js} +2 -2
- package/chunks/{concern-4HFEHA2X.js → concern-I6LCWEIC.js} +1 -1
- package/chunks/{deno-I5YAWOB6.js → deno-JAQWMICD.js} +1 -1
- package/chunks/{dev-JQS5G6PA.js → dev-JM7NU24M.js} +2 -2
- package/chunks/{done-OSUBA7YO.js → done-A5VWIFOF.js} +1 -1
- package/chunks/{file-tools-shared-LMF72D6S.js → file-tools-shared-YKDNDDHR.js} +1 -1
- package/chunks/{free-WTJTBNOK.js → free-5NMWMMYS.js} +1 -1
- package/chunks/{gh-PJ2JDGXG.js → gh-DJ2YTDQX.js} +2 -2
- package/chunks/{gh-contributors-EIM2PLGS.js → gh-contributors-SXUFX3SO.js} +1 -1
- package/chunks/{init-ZOMBOUG3.js → init-GBMYF3YG.js} +3 -3
- package/chunks/{init-2AZSHAPG.js → init-M3P2QCX2.js} +1 -1
- package/chunks/{install-J4D2DGTQ.js → install-USGLFPAU.js} +1 -1
- package/chunks/invoke-hook-6BKTP2JY.js +12 -0
- package/chunks/kiro-V6SMU4OL.js +2 -0
- package/chunks/{list-XFPTCIMR.js → list-M5DGQG46.js} +1 -1
- package/chunks/{list-PSLAM3H6.js → list-NX7RRO6R.js} +1 -1
- package/chunks/{list-NS7ECFDY.js → list-ZVCGDRUH.js} +1 -1
- package/chunks/{load-config-OGSPRY4L.js → load-config-JZNJVJXH.js} +1 -1
- package/chunks/loader-command-I5DTYP25.js +2 -0
- package/chunks/loader-reactor-P6I3MX5L.js +2 -0
- package/chunks/{main-BUEG2IMJ.js → main-JAGIKKVD.js} +2 -2
- package/chunks/manager-GN6J4AUV.js +7 -0
- package/chunks/manifest-3GT2RMQL.js +2 -0
- package/chunks/{mod-VRTH35WZ.js → mod-2WMXZZGJ.js} +2 -2
- package/chunks/{mod-G7PJEGW6.js → mod-4XKQZL6W.js} +1 -1
- package/chunks/{mod-Q6SI6S6S.js → mod-5NDTGNVM.js} +2 -2
- package/chunks/mod-7ICCX4OY.js +2 -0
- package/chunks/mod-IALKEUJL.js +9 -0
- package/chunks/{mod-WOZXOD2F.js → mod-KPIOBBDD.js} +1 -1
- package/chunks/{mod-XEK7FROU.js → mod-NSL6IJRQ.js} +1 -1
- package/chunks/{mod-2PIV6QCE.js → mod-OG7BBJP4.js} +1 -1
- package/chunks/mod-QCXWBSGJ.js +2 -0
- package/chunks/mod-TB73AJG3.js +23 -0
- package/chunks/{mod-II7CSZUT.js → mod-TRSW5SEU.js} +1 -1
- package/chunks/{mod-RO7WP3SA.js → mod-VZT7JWPZ.js} +1 -1
- package/chunks/{mod-U2MNO6EC.js → mod-W225AUFE.js} +1 -1
- package/chunks/{new-3ZN4U7FJ.js → new-SS67ZKMK.js} +3 -3
- package/chunks/next-TIUOHHFS.js +9 -0
- package/chunks/{node-ZGM6SXXI.js → node-WWA6BHRC.js} +1 -1
- package/chunks/ollama-DFG5G467.js +2 -0
- package/chunks/opencode-UA45VV3W.js +2 -0
- package/chunks/pack-7TGKWDRO.js +6 -0
- package/chunks/purge-IKPQWHBC.js +5 -0
- package/chunks/{recipe-applier-6SGY2W3A.js → recipe-applier-I2VBGHZU.js} +1 -1
- package/chunks/{registry-fetcher-H63ZWZHU.js → registry-fetcher-TGWYJ5GN.js} +1 -1
- package/chunks/release-SEKFNXRA.js +9 -0
- package/chunks/{release-notes-FSDHH2Y2.js → release-notes-UUCPVHBQ.js} +1 -1
- package/chunks/{release-tag-IOH5HGAA.js → release-tag-F4B6ICW4.js} +1 -1
- package/chunks/{reopen-7EX6OJ6E.js → reopen-G4IUIH73.js} +1 -1
- package/chunks/{reset-IZ76OH4F.js → reset-BJZ263XC.js} +1 -1
- package/chunks/rule-PQ6WRV5W.js +7 -0
- package/chunks/{run-FGMEIO57.js → run-DAKF5SJN.js} +1 -1
- package/chunks/run-Y4ESAQUK.js +4 -0
- package/chunks/{scripts-L2FZBUHU.js → scripts-VRQQ24O3.js} +1 -1
- package/chunks/{serve-VXA7O546.js → serve-OGJIE344.js} +2 -2
- package/chunks/{server-KJW4HWK7.js → server-VCPSLFZ2.js} +1 -1
- package/chunks/session-CFDY73RJ.js +2 -0
- package/chunks/spec-CYRR2XUA.js +2 -0
- package/chunks/{status-EHBO4FYW.js → status-ZE2SA6FP.js} +1 -1
- package/chunks/{sync-M6DR7ZI4.js → sync-N5STAT6M.js} +1 -1
- package/chunks/system-3236RFTI.js +2 -0
- package/chunks/{system-2FUKECOJ.js → system-6GEEPUXD.js} +1 -1
- package/chunks/{update-CV7JPZGM.js → update-VLYRDEH4.js} +1 -1
- package/chunks/validate-bom-ME2NQAP3.js +2 -0
- package/chunks/validate-case-conflict-QUNIB43P.js +2 -0
- package/chunks/validate-circular-deps-DLUCIW7T.js +2 -0
- package/chunks/validate-commit-msg-SRLJRTKU.js +2 -0
- package/chunks/validate-docs-43LWHLVW.js +2 -0
- package/chunks/validate-eof-RV3IK6ZM.js +2 -0
- package/chunks/validate-export-names-D5I5DZTN.js +2 -0
- package/chunks/validate-filenames-WNLZI2S6.js +2 -0
- package/chunks/validate-json-6KIMBNBJ.js +2 -0
- package/chunks/validate-large-files-UXP7AZCW.js +2 -0
- package/chunks/validate-licenses-BL6PNSBP.js +2 -0
- package/chunks/validate-line-endings-NYHXORRG.js +2 -0
- package/chunks/validate-merge-conflict-IWUP4ZMW.js +2 -0
- package/chunks/validate-mod-exports-VCV4VZ5F.js +2 -0
- package/chunks/validate-package-configs-6PGL2YGD.js +2 -0
- package/chunks/validate-secrets-JV4ZSOVR.js +2 -0
- package/chunks/validate-shebangs-YACNWUG7.js +2 -0
- package/chunks/validate-submodules-ZXID3VEK.js +2 -0
- package/chunks/validate-symlinks-QNMKPYUY.js +2 -0
- package/chunks/validate-toml-PV3G7EFD.js +2 -0
- package/chunks/validate-trailing-whitespace-5Q5SEHOD.js +2 -0
- package/chunks/validate-yaml-IOMFQTSQ.js +2 -0
- package/chunks/versions-ROLQITT5.js +2 -0
- package/chunks/{watch-LW6FU2EL.js → watch-4NXY7JEX.js} +1 -1
- package/chunks/{wontfix-YJN2MZCL.js → wontfix-YSXRDPKA.js} +1 -1
- package/chunks/{workerd-LOWXXQEU.js → workerd-LH2MLWIF.js} +1 -1
- package/eser.js +1 -1
- package/package.json +9 -1
- package/chunks/chunk-5MVJUALI.js +0 -4
- package/chunks/chunk-5N2QHREH.js +0 -17
- package/chunks/chunk-JZ7DUWYC.js +0 -2
- package/chunks/chunk-OYNFK77H.js +0 -2
- package/chunks/chunk-PIV56NIC.js +0 -7
- package/chunks/chunk-V6YI7YJ4.js +0 -5
- package/chunks/chunk-VAIRJES2.js +0 -2
- package/chunks/chunk-VNJJQED3.js +0 -3
- package/chunks/chunk-ZJMX5J6E.js +0 -4
- package/chunks/claude-code-VX2T4YII.js +0 -2
- package/chunks/invoke-hook-D5XQP7A7.js +0 -11
- package/chunks/kiro-JGEZGFF3.js +0 -2
- package/chunks/manifest-4EA74HMS.js +0 -2
- package/chunks/mod-KTGLCC3R.js +0 -2
- package/chunks/mod-LAFYLM7O.js +0 -2
- package/chunks/next-NBSEIKEK.js +0 -9
- package/chunks/ollama-LD6OENM2.js +0 -2
- package/chunks/opencode-ECTBCC3O.js +0 -2
- package/chunks/purge-GV7LXDF3.js +0 -5
- package/chunks/release-6I5TL34I.js +0 -9
- package/chunks/rule-CNBMT5LD.js +0 -3
- package/chunks/run-PBQGRZV3.js +0 -4
- package/chunks/spec-AINLSNW6.js +0 -2
- package/chunks/system-X4X6JD4X.js +0 -2
- package/chunks/validate-bom-MYISC3IT.js +0 -2
- package/chunks/validate-case-conflict-B737FXF2.js +0 -2
- package/chunks/validate-circular-deps-WME7VUO4.js +0 -2
- package/chunks/validate-commit-msg-HJ5MXYNE.js +0 -2
- package/chunks/validate-docs-CCYMKDXS.js +0 -2
- package/chunks/validate-eof-6WAM6VAY.js +0 -2
- package/chunks/validate-export-names-Q5FSXTV5.js +0 -2
- package/chunks/validate-filenames-JVBT2GXA.js +0 -2
- package/chunks/validate-json-UPGBABYE.js +0 -2
- package/chunks/validate-large-files-RJLMJSWM.js +0 -2
- package/chunks/validate-licenses-YW5CK3QF.js +0 -2
- package/chunks/validate-line-endings-3VNZ7KT6.js +0 -2
- package/chunks/validate-merge-conflict-SKWYYHFS.js +0 -2
- package/chunks/validate-mod-exports-OMUDATXK.js +0 -2
- package/chunks/validate-package-configs-ZO5YJE2D.js +0 -2
- package/chunks/validate-secrets-FV6672MD.js +0 -2
- package/chunks/validate-shebangs-N55SME72.js +0 -2
- package/chunks/validate-submodules-ADHLOUGA.js +0 -2
- package/chunks/validate-symlinks-4IIIP6AQ.js +0 -2
- package/chunks/validate-toml-OVIYGLPR.js +0 -2
- package/chunks/validate-trailing-whitespace-LWP5QEXS.js +0 -2
- package/chunks/validate-yaml-L7JCSGXY.js +0 -2
- package/chunks/versions-OKK45EDV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
var b={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",413:"Payload Too Large",415:"Unsupported Media Type",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},p=class extends Error{status;constructor(e,r){super(r??b[e]??"Unknown Error"),this.name="HttpError",this.status=e}};var u=n=>e=>new p(n,e),W=u(400),q=u(401),X=u(403),J=u(404),Q=u(409),Z=u(422),ee=u(429),te=u(500),re=u(503);var d=()=>{let n=new Map,e=!1,r=()=>{if(e)throw new Error("ImmutableMapBuilder has been sealed. Use map.toBuilder() to create a new builder.")},a={set:(o,t)=>(r(),n.set(o,t),a),delete:o=>(r(),n.delete(o),a),has:o=>n.has(o),get size(){return n.size},build:()=>(r(),e=!0,f(n))};return a},m=n=>{let e=new Map;if(n)for(let[r,a]of n)e.set(r,a);return f(e)},f=n=>{let e={get:r=>n.get(r),has:r=>n.has(r),get size(){return n.size},get isEmpty(){return n.size===0},keys:function*(){yield*n.keys()},values:function*(){yield*n.values()},entries:function*(){for(let r of n.entries())yield r},forEach:r=>{for(let[a,o]of n)r(o,a,e)},[Symbol.iterator]:function*(){for(let r of n.entries())yield r},map:r=>{let a=d();for(let[o,t]of n)a.set(o,r(t,o));return a.build()},filter:r=>{let a=d();for(let[o,t]of n)r(t,o)&&a.set(o,t);return a.build()},reduce:(r,a)=>{let o=a;for(let[t,s]of n)o=r(o,s,t);return o},toBuilder:()=>{let r=d();for(let[a,o]of n)r.set(a,o);return r},merge:(...r)=>{let a=d();for(let[o,t]of n)a.set(o,t);for(let o of r)for(let[t,s]of o)a.set(t,s);return a.build()}};return Object.freeze(e)},M=m();var E=n=>{let e=new Map(n),r=!1,a=()=>{if(r)throw new Error("RegistryBuilder has been sealed. Use registry.toBuilder() to create a new builder.")},o={set:(t,s)=>(a(),e.set(t,["value",s]),o),setLazy:(t,s)=>(a(),e.set(t,["lazy",s]),o),remove:t=>(a(),e.delete(t),o),has:t=>e.has(t),get size(){return e.size},build:()=>(a(),r=!0,y(e))};return o},y=n=>{let e={entries:n,keysCache:null,valuesCache:null,entriesCache:null,lazyCache:new Map},r=(t,s)=>{let[l,i]=s;if(l==="value")return i;if(e.lazyCache.has(t))return e.lazyCache.get(t);let c=i();if(!(c instanceof Promise))return e.lazyCache.set(t,c),c},a=async(t,s)=>{let[l,i]=s;if(l==="value")return i;if(e.lazyCache.has(t))return e.lazyCache.get(t);let c=await i();return e.lazyCache.set(t,c),c};return Object.freeze({get:t=>{let s=e.entries.get(t);if(s!==void 0)return r(t,s)},getAsync:async t=>{let s=e.entries.get(t);if(s!==void 0)return await a(t,s)},has:t=>e.entries.has(t),isLazy:t=>{let s=e.entries.get(t);return s===void 0?!1:s[0]==="lazy"},keys:()=>(e.keysCache===null&&(e.keysCache=Object.freeze([...e.entries.keys()])),e.keysCache),values:()=>{if(e.valuesCache===null){let t=[];for(let[s,l]of e.entries){let[i]=l;i==="value"?t.push(l[1]):i==="lazy"&&e.lazyCache.has(s)&&t.push(e.lazyCache.get(s))}e.valuesCache=Object.freeze(t)}return e.valuesCache},entries:()=>{if(e.entriesCache===null){let t=[];for(let[s,l]of e.entries){let[i]=l;i==="value"?t.push([s,l[1]]):i==="lazy"&&e.lazyCache.has(s)&&t.push([s,e.lazyCache.get(s)])}e.entriesCache=Object.freeze(t)}return e.entriesCache},get size(){return e.entries.size},toBuilder:()=>E(e.entries)})},
|
|
2
|
+
var b={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",413:"Payload Too Large",415:"Unsupported Media Type",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},p=class extends Error{status;constructor(e,r){super(r??b[e]??"Unknown Error"),this.name="HttpError",this.status=e}};var u=n=>e=>new p(n,e),W=u(400),q=u(401),X=u(403),J=u(404),Q=u(409),Z=u(422),ee=u(429),te=u(500),re=u(503);var d=()=>{let n=new Map,e=!1,r=()=>{if(e)throw new Error("ImmutableMapBuilder has been sealed. Use map.toBuilder() to create a new builder.")},a={set:(o,t)=>(r(),n.set(o,t),a),delete:o=>(r(),n.delete(o),a),has:o=>n.has(o),get size(){return n.size},build:()=>(r(),e=!0,f(n))};return a},m=n=>{let e=new Map;if(n)for(let[r,a]of n)e.set(r,a);return f(e)},f=n=>{let e={get:r=>n.get(r),has:r=>n.has(r),get size(){return n.size},get isEmpty(){return n.size===0},keys:function*(){yield*n.keys()},values:function*(){yield*n.values()},entries:function*(){for(let r of n.entries())yield r},forEach:r=>{for(let[a,o]of n)r(o,a,e)},[Symbol.iterator]:function*(){for(let r of n.entries())yield r},map:r=>{let a=d();for(let[o,t]of n)a.set(o,r(t,o));return a.build()},filter:r=>{let a=d();for(let[o,t]of n)r(t,o)&&a.set(o,t);return a.build()},reduce:(r,a)=>{let o=a;for(let[t,s]of n)o=r(o,s,t);return o},toBuilder:()=>{let r=d();for(let[a,o]of n)r.set(a,o);return r},merge:(...r)=>{let a=d();for(let[o,t]of n)a.set(o,t);for(let o of r)for(let[t,s]of o)a.set(t,s);return a.build()}};return Object.freeze(e)},M=m();var E=n=>{let e=new Map(n),r=!1,a=()=>{if(r)throw new Error("RegistryBuilder has been sealed. Use registry.toBuilder() to create a new builder.")},o={set:(t,s)=>(a(),e.set(t,["value",s]),o),setLazy:(t,s)=>(a(),e.set(t,["lazy",s]),o),remove:t=>(a(),e.delete(t),o),has:t=>e.has(t),get size(){return e.size},build:()=>(a(),r=!0,y(e))};return o},y=n=>{let e={entries:n,keysCache:null,valuesCache:null,entriesCache:null,lazyCache:new Map},r=(t,s)=>{let[l,i]=s;if(l==="value")return i;if(e.lazyCache.has(t))return e.lazyCache.get(t);let c=i();if(!(c instanceof Promise))return e.lazyCache.set(t,c),c},a=async(t,s)=>{let[l,i]=s;if(l==="value")return i;if(e.lazyCache.has(t))return e.lazyCache.get(t);let c=await i();return e.lazyCache.set(t,c),c};return Object.freeze({get:t=>{let s=e.entries.get(t);if(s!==void 0)return r(t,s)},getAsync:async t=>{let s=e.entries.get(t);if(s!==void 0)return await a(t,s)},has:t=>e.entries.has(t),isLazy:t=>{let s=e.entries.get(t);return s===void 0?!1:s[0]==="lazy"},keys:()=>(e.keysCache===null&&(e.keysCache=Object.freeze([...e.entries.keys()])),e.keysCache),values:()=>{if(e.valuesCache===null){let t=[];for(let[s,l]of e.entries){let[i]=l;i==="value"?t.push(l[1]):i==="lazy"&&e.lazyCache.has(s)&&t.push(e.lazyCache.get(s))}e.valuesCache=Object.freeze(t)}return e.valuesCache},entries:()=>{if(e.entriesCache===null){let t=[];for(let[s,l]of e.entries){let[i]=l;i==="value"?t.push([s,l[1]]):i==="lazy"&&e.lazyCache.has(s)&&t.push([s,e.lazyCache.get(s)])}e.entriesCache=Object.freeze(t)}return e.entriesCache},get size(){return e.entries.size},toBuilder:()=>E(e.entries)})},I=y(new Map);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as w}from"./chunk-
|
|
2
|
+
import{a as w}from"./chunk-IIFFSCDJ.js";import{a as v}from"./chunk-LFNUSULJ.js";import{b as y}from"./chunk-O325ZU5M.js";import{f as k}from"./chunk-P2MUEKFT.js";import{b as l,f,g as h,h as C,i as m}from"./chunk-YVN2NZL4.js";import{g as a}from"./chunk-FFWPJP7A.js";var p=y(),D=e=>{let s=new Map,r=new Set(e.map(i=>i.name));for(let i of e){let n=[];for(let d of i.config._loadedFiles){let t=d.content,u=t.dependencies;if(u!==void 0)for(let c of Object.keys(u))r.has(c)&&n.push(c);let o=t.imports;if(o!==void 0)for(let c of Object.values(o))r.has(c)&&n.push(c)}s.set(i.name,[...new Set(n)])}return s},x=e=>{let s=[],r=new Set,i=new Set,n=[],d=t=>{r.add(t),i.add(t),n.push(t);let u=e.get(t)??[];for(let o of u)if(!r.has(o))d(o);else if(i.has(o)){let c=n.indexOf(o),g=n.slice(c);g.push(o),s.push(g)}n.pop(),i.delete(t)};for(let t of e.keys())r.has(t)||d(t);return s},R=async(e={})=>{let{root:s="."}=e,r=await w(s),i=D(r),n=x(i);return{hasCycles:n.length>0,cycles:n,packagesChecked:r.length}},O=e=>k.fromPromise(()=>R(e)),b=e=>a.ok({root:"."}),A=e=>{if(a.isFail(e))return p.writeln(f("\u2717"),l(" "+(e.error instanceof Error?e.error.message:String(e.error)))),a.fail({exitCode:1});let{value:s}=e;if(p.writeln(m("\u2139"),l(` Checked ${s.packagesChecked} packages.`)),s.hasCycles){p.writeln(f("\u2717"),l(` Found ${s.cycles.length} circular dependencies:`));for(let r of s.cycles)p.writeln(C("\u26A0"),l(` ${r.join(" \u2192 ")}`));return a.fail({exitCode:1})}return p.writeln(h("\u2713"),l(" No circular dependencies found.")),a.ok(void 0)},M=v.createTrigger({handler:O,adaptInput:b,adaptOutput:A}),_=async e=>await M({command:"validate-circular-deps",args:[],flags:{}});export{R as a,O as b,M as c,_ as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as w}from"./chunk-
|
|
2
|
+
import{b as w}from"./chunk-4X4NHXFE.js";import{a as p}from"./chunk-2XNFZXHY.js";import{b as c}from"./chunk-GVTM4EOU.js";import{e as y}from"./chunk-5WJ6AUNY.js";var C=()=>{let e=new Map;return{register:o=>{e.set(o.name,o)},registerAll:o=>{for(let r of o)e.set(r.name,r)},get:o=>e.get(o),getAll:()=>[...e.values()],has:o=>e.has(o),names:()=>[...e.keys()]}};var k=y(p(),1);var h=e=>{let o=e.workflows;if(!Array.isArray(o))throw new Error("Invalid config: 'workflows' must be an array");for(let r=0;r<o.length;r++){let n=o[r],t=n?.id!==void 0&&n.id!==""?`workflow '${n.id}'`:`workflow at index ${r}`;if(typeof n?.id!="string"||n.id==="")throw new Error(`Invalid config: ${t} must have a non-empty 'id' string`);if(!Array.isArray(n.on)||n.on.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'on' array`);if(!Array.isArray(n.steps)||n.steps.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'steps' array`);for(let s=0;s<n.steps.length;s++){let i=n.steps[s];if(typeof i=="string")continue;if(typeof i!="object"||i===null||Array.isArray(i))throw new Error(`Invalid config: ${t}, step ${s} must be a string or an object with exactly one key`);let l=Object.keys(i);if(l.length!==1)throw new Error(`Invalid config: ${t}, step ${s} must be an object with exactly one key (got ${l.length})`)}}};var b=async e=>{let o=await w(e);if(o===null)return null;let r={stack:o.stack,workflows:o.workflows??[],scripts:o.scripts};return h(r),r};var I={name:"shell",description:"Execute shell commands",run:async e=>{let o=e.command,r=e.fixCommand,n=e.name??o??"shell",t=e.fix??!1,s=e.root??".",i=e.workingDirectory??s;if(o===void 0||o.length===0)throw new Error(`Shell tool requires a 'command' option. Usage: { shell: { command: "deno fmt --check" } }`);let l=t&&r!==void 0?r:o,a=await new c("sh",["-c",l]).cwd(i).noThrow().spawn(),f=a.code;if(f===0)return{name:n,passed:!0,issues:[],mutations:[],stats:{exitCode:0}};let d=new TextDecoder,g=d.decode(a.stderr).trim(),m=[d.decode(a.stdout).trim(),g].filter(u=>u.length>0).join(`
|
|
3
3
|
`);return{name:n,passed:!1,issues:[{message:m||`Command exited with code ${f}`}],mutations:[],stats:{exitCode:f}}}};export{C as a,b,I as c};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as q}from"./chunk-NY4W44PI.js";import{a as S,c as N,d as T,e as L}from"./chunk-2HSGE3TL.js";import{c as U}from"./chunk-UEMWZOIU.js";var _=[{id:"status_quo",text:"What does the user do today without this feature?",concerns:["product:status_quo","eng:replace_scope","qa:regression_risk"]},{id:"ambition",text:"Describe the 1-star and 10-star versions.",concerns:["product:scope_direction","eng:complexity_tier","qa:test_depth"]},{id:"reversibility",text:"Does this change involve an irreversible decision?",concerns:["product:one_way_door","eng:migration_strategy","qa:verification_stringency"]},{id:"user_impact",text:"Does this change affect existing users' behavior?",concerns:["product:breaking_change","eng:backward_compat","qa:regression_tests"]},{id:"verification",text:"How do you verify this works correctly?",concerns:["product:success_metric","eng:test_strategy","qa:acceptance_criteria"]},{id:"scope_boundary",text:"What should this feature NOT do?",concerns:["product:focus","eng:out_of_scope","qa:negative_tests"]}],B=[{questionId:"verification",text:"What tests should be written? (unit, integration, e2e \u2014 be specific about what behavior to test)"},{questionId:"verification",text:"What documentation needs updating? (README, API docs, CHANGELOG, inline comments)"}],C=e=>_.map(t=>{let s=B.filter(r=>r.questionId===t.id),n=N(e,t.id);return{...t,extras:[...s,...n]}});var F=e=>{let t=new Set(e.map(s=>s.questionId));return _.every(s=>t.has(s.id))};var x=e=>U(e),o=(e,t)=>x(t===null?e:`spec ${t} ${e}`),j="NEVER run git write commands (commit, add, push, checkout, stash, reset, merge, rebase, cherry-pick). Git is read-only for agents. The user controls git. You may read: git log, git diff, git status, git show, git blame.",Y={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},G=(e,t,s,n,r=Y)=>{let m=e.execution.iteration>=t,l="You are a senior engineer and a scrum master who takes pride in honest reporting. Your reputation depends on accuracy, not speed. You are responsible for others' toil, and you are a perfect example of a servant leader. When reporting progress: if something is NOT implemented, say so \u2014 don't hide it. If partially done, say 'partially done: [what works] / [what doesn't]'. If untested, say 'implemented but untested'. NEVER say 'done' for something you haven't verified yourself. Underpromise \u2014 4 of 6 done means '4 of 6 done, 2 remaining', not 'almost done'.",u="Never skip steps or make decisions without asking the user. If you think something can be skipped or inferred, ask first. Explicit > Clever.",y=r.hasAskUserTool?"At every decision point (discovery questions, classification, spec approval, expansion proposals, architectural decisions, rule promotion), you MUST use AskUserQuestion to get the user's input. You MUST NOT make decisions, infer preferences, or assume the user's intent. If you're unsure whether something is a decision point, it is \u2014 ask.":"At every decision point (discovery questions, classification, spec approval, expansion proposals, architectural decisions, rule promotion), you MUST ask the user. Present options as a numbered list and ask the user to pick a number. You MUST NOT make decisions, infer preferences, or assume the user's intent. If you're unsure whether something is a decision point, it is \u2014 ask.",g="At every decision point where you present options to the user, share your recommendation BEFORE asking. Say what you think and why, then ask if the user agrees. Format: 'I'd recommend X because [reason]. Agree, or would you prefer Y?' The user always has the final word, but you save them cognitive load by proposing first.",w="noskills is a live state machine the user watches in real-time. Call noskills ONCE per interaction. Ask ONE question, wait for the user's answer, submit it. Never batch-submit, never backfill, never answer questions yourself.",c=s?[l,u,y,g,w]:[j,l,u,y,g,w];c.push("When noskills output contains a `roadmap` field, display it to the user BEFORE any other content. When output contains a `gate` field, display the gate message prominently \u2014 do NOT bury it in prose.");let v=n?.outOfScope??[],a=e.spec;switch(e.phase){case"FREE":return{rules:[],tone:"Quiet. No enforcement."};case"IDLE":{let i=r.optionPresentation==="tool"?["When interactiveOptions are present, pass them DIRECTLY as the `options` array in AskUserQuestion \u2014 they are already in the correct {label, description} format. You MUST also provide a `header` field (max 12 chars, e.g. 'Action') and a `question` field. When the user picks an option, look up its label in the `commandMap` object to find the command to execute.","For availableConcerns: use AskUserQuestion with multiSelect:true. AskUserQuestion supports max 4 options per question and max 4 questions per call. If there are more than 4 concerns, split them across two questions within the same AskUserQuestion call (e.g., first 3 in question 1, remaining in question 2). NEVER silently drop concerns \u2014 present ALL available concerns to the user, even if it requires multiple questions."]:[`When interactiveOptions are present, present them as a numbered list. For each option show the number, label, and description. Ask the user to pick a number. When the user picks an option, look up its label in the \`commandMap\` object to find the command to execute. Example format:
|
|
3
|
+
|
|
4
|
+
1. Start a new spec \u2014 Begin discovery questions for a new feature
|
|
5
|
+
2. Add concerns \u2014 Shape how discovery and specs work
|
|
6
|
+
|
|
7
|
+
Pick a number:`,"For availableConcerns: present ALL available concerns as a numbered list. NEVER silently drop concerns \u2014 present ALL available concerns to the user. Ask the user to enter the numbers of the concerns they want to activate (comma-separated)."],d=r.hasAskUserTool?"For availableConcerns: use AskUserQuestion with multiSelect:true. AskUserQuestion supports max 4 options per question and max 4 questions per call. If there are more than 4 concerns, split them across two questions within the same AskUserQuestion call (e.g., first 3 in question 1, remaining in question 2). NEVER silently drop concerns \u2014 present ALL available concerns to the user, even if it requires multiple questions.":void 0,h=d!==void 0?[i[0],d]:i;return{rules:["You MUST NOT create, edit, or delete any project file until you have either entered free mode or created and approved a spec. No exceptions. No 'quick fixes'. Choose: `noskills free` for unstructured work, or `noskills spec new` for structured work.",...c,...h,"Do not take action without the user choosing an option first.","When the user wants to create a new spec, they can provide anything: a one-line description, a full task list, meeting notes, a kanban card, a customer email, or a detailed requirements document. Accept whatever format they provide. If it's long, summarize it into a spec title for the slug but preserve the full text as context for discovery.","After running spec new, ask the user if they want full discovery, quick discovery, or skip to spec draft. Full discovery: pre-scan, premise challenge, 6 questions, expansions, architecture, error map, synthesis. Quick discovery: only questions relevant to active concerns, skip expansions and error map. Skip to spec draft: classification \u2192 approve \u2192 execute. Never skip discovery without asking."],tone:"Welcoming. Present choices, then wait."}}case"DISCOVERY":{let i=r.hasAskUserTool?"You MUST ask each discovery question using AskUserQuestion tool. You MUST NOT answer questions yourself or infer answers from the spec description. You MUST NOT submit discovery answers without the user explicitly providing each answer through AskUserQuestion. Each question \u2192 one AskUserQuestion call \u2192 user answers \u2192 next question. If the user already gave a detailed description in spec new, you may PRE-FILL suggested answers as option descriptions in AskUserQuestion \u2014 but the user must still confirm or override each one. If the user provided a fully formed plan, you may skip Phase 2 (questions) but you MUST still run premise challenge and alternatives. Never skip premise challenge.":"You MUST ask each discovery question by presenting it to the user as text. You MUST NOT answer questions yourself or infer answers from the spec description. You MUST NOT submit discovery answers without the user explicitly providing each answer. Each question \u2192 present it \u2192 user answers \u2192 next question. If the user already gave a detailed description in spec new, you may PRE-FILL suggested answers \u2014 but the user must still confirm or override each one. If the user provided a fully formed plan, you may skip Phase 2 (questions) but you MUST still run premise challenge and alternatives. Never skip premise challenge.";return{modeOverride:"You are in plan mode. Do not attempt to create, edit, or write any files. Do not run any shell commands that modify state. You can read files and run read-only commands to understand the codebase. Your ONLY job right now is to think and talk. Read code to understand. Ask questions to discover. Challenge assumptions. Propose ideas. Debate tradeoffs. But NEVER create, edit, or delete project files. Discovery exists to catch what you don't yet know you don't know.",rules:[...c,i,"DO NOT create, edit, or write any files.","DO NOT run shell commands that modify state.","You MAY read files and run read-only commands (cat, ls, grep, git log, git diff).","BEFORE asking any discovery questions, conduct a pre-discovery codebase scan: read the project README, CLAUDE.md, and any design docs; check the last 20 git commits (git log --oneline -20); look for TODO files, open issue references, and existing specs; scan the directory structure to understand the project shape. Then present a brief 'Pre-discovery audit' summary: stack detected, recent work themes, open TODOs, existing specs. This gives you CONTEXT to ask INFORMED questions, not blind ones.","If the noskills output contains `preDiscoveryResearch` with `required: true`, you MUST research every term in `extractedTerms` using web search before asking the first question. Present findings as a brief: current stable versions, API changes, deprecations, and anything that might affect the spec's assumptions.","After the pre-discovery codebase scan and BEFORE starting questions, ask the user: 'What kind of discovery do you need? A) Explore scope \u2014 I'll help expand, find opportunities, think bigger. B) Technical depth \u2014 I'll focus on architecture, error handling, implementation strategy. C) Validate my plan \u2014 I already know what I want, challenge my assumptions. D) Ship fast \u2014 minimal scope, cut the fat, get to tasks quickly.' Adapt your discovery emphasis accordingly: Explore \u2192 heavy on expansion proposals and dream state; Technical \u2192 heavy on architectural decisions and error/rescue map; Validate \u2192 heavy on premise challenge and pushback; Ship fast \u2192 minimal questions, skip expansions, go direct to classification and tasks.","Before starting discovery questions, challenge the user's initial spec description against what you learned from the codebase scan. Look for: hidden complexity they haven't mentioned, conflicts with existing code, scope that's bigger or smaller than they think, existing modules that overlap with what they're asking for. Share your observations and ask clarifying follow-ups, then proceed to questions.","When asking discovery questions, use your codebase knowledge to offer concrete options alongside the open-ended question. For example, instead of just 'What does the user do today?' present: 'Based on the codebase, I see three likely scenarios: A) ... B) ... C) ... D) Something else \u2014 describe it. Which is closest?' The user can always pick 'something else' but concrete options speed up the conversation and force specificity.",r.hasAskUserTool?"Ask one question at a time using AskUserQuestion tool.":"Ask one question at a time. Present it as text and wait for the user's response.","Push back on vague answers \u2014 you will be the one executing this spec, vague answers make your job harder.","When the user gives a short answer, follow up: 'Can you be more specific?'","After collecting discovery answers, synthesize a CURRENT STATE \u2192 THIS SPEC \u2192 6-MONTH IDEAL vision before generating the spec. Show three columns: where the project is now, what this spec achieves, and where it could go in 6 months. Note: 'This spec moves you from column 1 to column 2. Column 3 is out of scope but worth knowing \u2014 every decision in this spec should keep column 3 possible.' This helps the user see if the scope is right.","When you spot expansion opportunities during discovery (from codebase scan, TODOs, concern requirements, synergies with the current plan), present each as a numbered proposal (1/N, 2/N...). Every proposal MUST include: clear description of WHAT and WHY (how it connects to the current plan); effort estimate as S/M/L/XL with human time and CC time estimates (e.g., 'S (human: ~1 day / CC: ~15 min)' \u2014 not just 'small'); risk assessment as Low/Low-Med/Med/Med-High/High naming the specific risk factor; completeness delta showing X/10 without this and Y/10 with this. Every proposal gets three options: A) Add to scope B) Defer to future spec C) Skip \u2014 not interested, plus 'Chat about this' and 'Skip remaining proposals' escape hatches.","After discovery questions and expansion proposals, identify architectural decisions that must be resolved before implementation. These are decisions where choosing A vs B changes the shape of multiple tasks, the data model, the API surface, or system boundaries. Present each as a concrete technical question with options, a RECOMMENDATION with reasoning, and completeness scores. Show how each option affects downstream work (e.g., 'If you choose B, tasks 3 and 4 need a job queue setup step added'). Only surface decisions that BLOCK implementation \u2014 not preferences or nice-to-haves. If the user says 'I don't know yet', mark it as a risk: 'UNRESOLVED: [decision] TBD. Tasks X-Y may change.' Never allow implementation to start with unresolved architectural decisions \u2014 flag them prominently in the spec.","Before finalizing, map error and rescue paths for every significant codepath in the planned work. Create a table: codepath | what can go wrong | how it's handled. Identify CRITICAL GAPS \u2014 failure modes that the plan doesn't address. Present each critical gap as a decision with options, a recommendation, and completeness scores, just like architectural decisions. Resolved gaps become tasks or acceptance criteria. Unresolved gaps become risk flags. Think like an SRE reviewing a design doc \u2014 what fails at 3am?","After all discovery questions, expansion proposals, architectural decisions, and error mapping are complete, present a DISCOVERY SUMMARY for the user to review: intent, ambition, reversibility, impact, verification, out of scope, the dream state table (current \u2192 this spec \u2192 future), accepted/deferred/skipped expansions, resolved architectural decisions, and the error/rescue map. Ask for confirmation before generating the spec. This is the last chance to catch misunderstandings.","Once you have a substantive answer for each question, collect all answers and submit them together in a single `noskills next --answer` call as a JSON object."],tone:"Curious interviewer who has a stake in the answers and comes PREPARED. You've read the codebase before asking. Challenge assumptions, offer concrete options, think about architecture and failure modes. Think deeply before asking each question."}}case"DISCOVERY_REVIEW":return{modeOverride:"You are in plan mode. Do not create, edit, or write any files. Present the discovery answers to the user for review and confirmation.",rules:[...c,"DO NOT create, edit, or write any files.","Present ALL discovery answers to the user clearly, one by one.",r.hasAskUserTool?"Use AskUserQuestion to ask: 'Are these answers correct, or would you like to revise any?'":"Ask the user: 'Are these answers correct, or would you like to revise any?' Present approval and revision as numbered options.","If the user approves, run the approve command.","If the user wants to revise, collect their corrections and submit them.","You MUST NOT approve on behalf of the user. The user must explicitly confirm.","If noskills output contains a splitProposal, present it to the user with the exact options shown. Do NOT split or merge specs on your own. Do NOT recommend one option over the other unless the user asks for your opinion. The user decides."],tone:"Careful reviewer. The user must confirm every answer."};case"SPEC_DRAFT":return{modeOverride:"You are in plan mode. Do not attempt to create, edit, or write any files. Do not run any shell commands that modify state. You can read files and run read-only commands to understand the codebase. Your ONLY job right now is to think and talk. Read code to understand. Ask questions to discover. Challenge assumptions. Propose ideas. Debate tradeoffs. But NEVER create, edit, or delete project files. Discovery exists to catch what you don't yet know you don't know.",rules:[...c,"DO NOT create, edit, or write any files.","Read the spec and present a summary to the user.","Flag any tasks that are too vague to execute.","Flag any missing acceptance criteria.","Ask the user if they want to refine before approving.",r.hasAskUserTool?"When presenting classification options, use AskUserQuestion with multiSelect:true. Do NOT infer classification yourself.":"When presenting classification options, present them as a numbered list with multiselect (user picks multiple numbers). Do NOT infer classification yourself.","If you identify issues in the spec (vague tasks, irrelevant sections, missing acceptance criteria), submit a refinement via: `"+o(`next --answer='{"refinement":"task-1: Add upload endpoint, task-2: Add validation middleware, task-3: Write integration tests"}'`,a)+"`. The spec will be updated and you can review again."],tone:"Thoughtful reviewer preparing to hand off to an implementer."};case"SPEC_APPROVED":return{rules:[...c,"The spec is approved but execution has not started.","Do not start coding until the user triggers execution.","If the user wants changes, they must reset and re-spec.",r.hasAskUserTool?"Before starting execution, show the spec summary to the user and ask for final confirmation via AskUserQuestion.":"Before starting execution, show the spec summary to the user and ask for final confirmation. Present 'Start execution' and 'Not yet' as numbered options."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let i=[];r.subAgentMethod==="task"?i.push(`When you receive a task from noskills next, do NOT execute it yourself. Spawn the noskills-executor sub-agent using the Agent tool. Pass it: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. When the sub-agent completes, review its results briefly, then report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,a)}\`. You are the orchestrator \u2014 the sub-agent is the implementer.`,"If the sub-agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the sub-agent failure in your next status report so it can be investigated.","After the noskills-executor sub-agent completes a task, spawn a noskills-verifier sub-agent to independently verify the work. Pass it: the list of changed files, the acceptance criteria, and the test commands. The verifier reports PASS/FAIL per criterion with evidence. Use the verifier's report as your status report to noskills. Do NOT submit status reports based solely on the executor's self-report.",`After spawning sub-agents, ALWAYS present a dispatch table showing the FULL pipeline \u2014 not just executors, but also verification and test steps:
|
|
8
|
+
|
|
9
|
+
| Step | Agent | Files | Tasks | Est. Time |
|
|
10
|
+
|------|-------|-------|-------|-----------|
|
|
11
|
+
| 1. Implement | noskills-executor | purge.ts | Tasks 1-6 | ~3 min |
|
|
12
|
+
| 2. Verify | noskills-verifier | purge.ts (read-only) | Validate ACs | ~1 min |
|
|
13
|
+
| 3. Write tests | noskills-executor | purge.test.ts | Task 7 | ~2 min |
|
|
14
|
+
|
|
15
|
+
When agents complete, update with actual time and status (Done / Failed / Found N issues). The user should see the complete plan upfront.
|
|
16
|
+
|
|
17
|
+
Estimate: S ~1min, M ~2min, L ~5min, XL ~10min.`,"The agent that writes implementation code must NOT write tests for that code. Spawn a SEPARATE sub-agent for test writing. This prevents the implementer from writing tests that only confirm what it already knows. The test writer reads the code fresh and tests what it actually does, not what the implementer intended.","When deciding how to split work across sub-agents: if all tasks touch the same file or tightly coupled files, batch them into one executor. If tasks touch independent files or modules, spawn parallel executors. Always err toward smaller, focused sub-agents over large batched ones \u2014 fresh context per task is better than accumulated context across tasks."):r.subAgentMethod==="spawn"?i.push(`When you receive a task from noskills next, use spawn_agent to delegate to the noskills-executor agent. Pass it: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. Use wait_agent to collect results. Then report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,a)}\`. You are the orchestrator \u2014 the spawned agent is the implementer.`,"If the spawned agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the agent failure in your next status report so it can be investigated.","After the noskills-executor agent completes a task, spawn a noskills-verifier agent to independently verify the work. Pass it: the list of changed files, the acceptance criteria, and the test commands. The verifier reports PASS/FAIL per criterion with evidence. Use the verifier's report as your status report to noskills. Do NOT submit status reports based solely on the executor's self-report.","When deciding how to split work across spawned agents: if all tasks touch the same file or tightly coupled files, batch them into one executor. If tasks touch independent files or modules, spawn parallel executors. Always err toward smaller, focused agents over large batched ones \u2014 fresh context per task is better than accumulated context across tasks."):r.subAgentMethod==="fleet"?i.push(`When you receive a task from noskills next, use /fleet to run parallel sub-agents for implementation tasks. Pass each agent: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. Collect results and report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,a)}\`. You are the orchestrator \u2014 the fleet agents are the implementers.`,"If a fleet agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the agent failure in your next status report so it can be investigated.","After the fleet agents complete, run a verification pass to independently check the work. Verify: changed files, acceptance criteria, test commands. Report PASS/FAIL per criterion with evidence.","When deciding how to split work across fleet agents: if all tasks touch the same file or tightly coupled files, batch them into one agent. If tasks touch independent files or modules, run parallel agents. Always err toward smaller, focused agents over large batched ones."):r.subAgentMethod==="delegation"?i.push(`When you receive a task from noskills next, use Kiro's agent delegation to spawn the noskills-executor agent. Pass it: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. When the agent completes, review its results briefly, then report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,a)}\`. You are the orchestrator \u2014 the delegated agent is the implementer.`,"If the delegated agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the agent failure in your next status report so it can be investigated.","After the noskills-executor agent completes a task, delegate to the noskills-verifier agent to independently verify the work. Pass it: the list of changed files, the acceptance criteria, and the test commands. The verifier reports PASS/FAIL per criterion with evidence. Use the verifier's report as your status report to noskills. Do NOT submit status reports based solely on the executor's self-report.","When deciding how to split work across delegated agents: if all tasks touch the same file or tightly coupled files, batch them into one executor. If tasks touch independent files or modules, spawn parallel executors. Always err toward smaller, focused agents over large batched ones \u2014 fresh context per task is better than accumulated context across tasks."):i.push("Execute tasks sequentially in this context. Do not attempt to spawn sub-agents \u2014 this tool does not support agent delegation. Complete each task yourself, verify your work (run type checks and tests), then report progress.",`After completing a task, report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,a)}\`.`);let d=[...c,"You are the orchestrator, not the implementer. NEVER create, edit, or delete project files directly. ALWAYS delegate to noskills-executor sub-agent, even for single-line changes. There is no 'minor change' \u2014 every edit goes through the executor\u2192verifier pipeline. Your job: read noskills output, spawn sub-agents, report status.","Do not explore the codebase beyond what the current task requires.","Do not refactor, improve, or modify code outside this task's scope.","Do not add features, tests, or documentation not specified in the spec.","If you need to read files to understand context, timebox it \u2014 then write code.","The deliverable is working code, not a plan or analysis.","Complete the task, then report progress. The user handles git.",...i,`When you discover a pattern, receive a correction, or identify a recurring preference from the user, ask: 'Should this be a permanent rule for this project, or just for this task?' If permanent, run: \`${x('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`,"FORCED VERIFICATION: After every file edit, run the project's type-check command (e.g., `tsc --noEmit`, `deno check`, `go build`) and lint command. Report results in AC status. Do NOT mark any AC as passed if type-check fails. If no type-checker is configured, state that explicitly.","FILE READ BUDGET: Files over 500 lines must be read in chunks using offset and limit. Never assume a single read captured the full file. When you read a partial file, state which lines you read.","TOOL RESULT AWARENESS: If any search or command returns suspiciously few results, re-run with narrower scope (single directory, stricter pattern). State when you suspect results were truncated.","PRE-EDIT RE-READ: Before EVERY file edit, re-read the target file to get current content. After editing, read the file again to confirm the change applied correctly. Never edit against stale context.","DEAD CODE FIRST: Before structural refactors on files over 300 LOC, first remove dead imports, unused exports, and orphaned props. Commit cleanup separately before starting the real work.","Do NOT suggest pausing, checkpointing, committing mid-spec, or stopping execution. The spec was scoped during discovery as a meaningful deliverable \u2014 execute it to completion. A half-delivered increment has no value. If scope feels too large, finish this spec and note the concern for future specs. The user decides when to stop, not you."];e.execution.lastVerification?.passed===!1&&d.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let h={rules:d,tone:"Direct. Orchestrate immediately \u2014 spawn sub-agents.",outOfScope:v.length>0?v:void 0};return m?{...h,urgency:`You have been in this session for ${e.execution.iteration}+ iterations. Your context is degrading. Finish the current task and recommend the user start a fresh session. Do not start new tasks.`}:h}case"BLOCKED":return{rules:[...c,"Present the decision to the user exactly as described.","Do not suggest a preferred option unless the user asks for your opinion.","After the user decides, relay the answer immediately. Do not elaborate."],tone:"Brief. The user is making a decision, not having a discussion."};case"COMPLETED":return{rules:[...c,"Report the completion summary. Do not start new work.","If the user wants to continue, they start a new spec."],tone:"Concise. Celebrate briefly, then stop."};default:return{rules:[...c,`Run \`${o("next",a)}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},H=5*60*1e3,X=(e,t)=>{let s=e.spec,n;switch(e.phase){case"IDLE":n=`No active spec. Start one with: \`${x('spec new --name=<slug> "description"')}\``;break;case"DISCOVERY":n=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"DISCOVERY_REVIEW":n=`Discovery answers ready for review. ${e.discovery.answers.length} answers collected. Waiting for user confirmation.`;break;case"SPEC_DRAFT":n=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":n=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":n=e.execution.lastProgress!==null?`Executing "${e.spec}", iteration ${e.execution.iteration}. Last progress: ${e.execution.lastProgress}. Continue with the current task.`:`Executing "${e.spec}", iteration ${e.execution.iteration}. Start the first task.`;break;case"BLOCKED":n=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"COMPLETED":n=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:n=`Run \`${o("next",s)}\` to get started.`}return{protocol:`Run \`${o('next --answer="..."',s)}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:t.map(r=>r.id),resumeHint:n}},K=e=>{let t=e.spec;if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 COMPLETED",how:`Run \`${o("next",t)}\` for instructions. Submit results with \`${o('next --answer="..."',t)}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let s=new Date(e.lastCalledAt).getTime();if(Date.now()-s>H)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 COMPLETED",how:`Run \`${o("next",t)}\` for instructions. Submit results with \`${o('next --answer="..."',t)}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},V=[{key:"IDLE",label:"IDLE"},{key:"DISCOVERY",label:"DISCOVERY"},{key:"DISCOVERY_REVIEW",label:"REVIEW"},{key:"SPEC_DRAFT",label:"DRAFT"},{key:"SPEC_APPROVED",label:"APPROVED"},{key:"EXECUTING",label:"EXECUTING"},{key:"COMPLETED",label:"DONE"}],z=e=>e==="FREE"?"\u2726 FREE \u2726 (no enforcement)":e==="BLOCKED"?V.map(t=>t.key==="EXECUTING"?"\u2726 EXECUTING (BLOCKED) \u2726":t.label).join(" \u2192 "):V.map(t=>t.key===e?`\u2726 ${t.label} \u2726`:t.label).join(" \u2192 "),J=(e,t)=>{switch(e.phase){case"DISCOVERY_REVIEW":return{message:`${e.discovery.answers.length}/6 answers collected.`,action:"Type APPROVE to generate spec, or REVISE to correct answers.",phase:"DISCOVERY_REVIEW"};case"SPEC_APPROVED":return{message:`Spec approved. ${t?.tasks?.length??0} tasks ready.`,action:"Type START to begin execution.",phase:"SPEC_APPROVED"};default:return}},fe=(e,t,s,n,r,m,l,u)=>{let y=X(e,t),g=n?.maxIterationsBeforeRestart??15,w=n?.allowGit??!1,c=u??Y,p=G(e,g,w,r,c),v=K(e),a;switch(e.phase){case"IDLE":a=W(t,S,s.length,l);break;case"DISCOVERY":a=ne(e,t,s);break;case"DISCOVERY_REVIEW":a=oe(e,t);break;case"SPEC_DRAFT":a=re(e);break;case"SPEC_APPROVED":a=ie(e);break;case"EXECUTING":a=le(e,t,s,g,r,m);break;case"BLOCKED":a=de(e);break;case"COMPLETED":a=ue(e);break;case"FREE":a={phase:"FREE",instruction:"Free mode \u2014 no enforcement active. Work as you wish."};break;default:a=W(t,S,s.length,l)}let i=z(e.phase),d=J(e,r),h={...a,meta:y,behavioral:p,roadmap:i};d!==void 0&&(h={...h,gate:d}),v!==void 0&&(h={...h,protocolGuide:v});let b=Z(e,t,l);if(b.length>0){let I=b.map(({label:f,description:E})=>({label:f,description:E})),A={};for(let f of b)A[f.label]=f.command;let k=c.optionPresentation==="tool"?"AskUserQuestion":"prose-numbered-list",R=c.optionPresentation==="tool"?"Use AskUserQuestion tool to present these options. Do NOT use prose.":"Present options as a numbered list. Ask user to pick a number.";h={...h,interactiveOptions:I,commandMap:A,toolHint:k,toolHintInstruction:R}}return h},Z=(e,t,s)=>{let n=e.spec;switch(e.phase){case"IDLE":{let r=[],l=(s?.existingSpecs??[]).filter(u=>u.phase!=="COMPLETED");t.length===0&&r.push({label:"Add concerns (Recommended)",description:"Shape how discovery and specs work by adding project concerns",command:x("concern add <id> [<id2> ...]")}),r.push({label:"Start a new spec",description:"Begin discovery questions for a new feature",command:x('spec new --name=<slug> "description"')}),r.push({label:"Free mode",description:"No enforcement \u2014 work freely until you want structure",command:x("free")});for(let u of l.slice(0,2))r.push({label:`Continue: ${u.name} (${u.phase})`,description:u.detail??`Iteration ${u.iteration}`,command:o("next",u.name)});return t.length>0&&r.push({label:"Edit concerns",description:`Currently: ${t.map(u=>u.id).join(", ")}`,command:x("concern list")}),r.slice(0,4)}case"DISCOVERY_REVIEW":return e.discovery.approved?[{label:"Keep as one spec",description:"All work in a single spec",command:o('next --answer="keep"',n)},{label:"Split into separate specs",description:"Create one spec per independent area",command:o('next --answer="split"',n)}]:[{label:"Approve all answers",description:"Answers look correct \u2014 generate the spec",command:o('next --answer="approve"',n)},{label:"Revise answers",description:"Correct one or more discovery answers",command:o(`next --answer='{"revise":{...}}'`,n)}];case"SPEC_DRAFT":return[{label:"Approve spec",description:"Review looks good \u2014 approve and move to execution",command:o("approve",n)},{label:"Refine spec",description:"Submit refinements to improve tasks or sections",command:o(`next --answer='{"refinement":"..."}'`,n)},{label:"Start over",description:"Reset the spec and start fresh",command:o("reset",n)}];case"SPEC_APPROVED":return[{label:"Start execution",description:"Begin implementing the tasks",command:o('next --answer="start"',n)},{label:"Not yet",description:'Save for later \u2014 resume with noskills next --answer="start"',command:""}];case"EXECUTING":return[];case"BLOCKED":return[{label:"Resolve block",description:"Provide a resolution to unblock execution",command:o('next --answer="resolution"',n)},{label:"Reset spec",description:"Abandon this spec and start over",command:o("reset",n)}];case"COMPLETED":return[{label:"New spec",description:"Start a new feature spec",command:x('spec new --name=<slug> "description"')},{label:"Reopen spec",description:"Reopen this spec for revision",command:o("reopen",n)},{label:"Check status",description:"Review completed spec summary",command:x("status")}];default:return[]}},ee="noskills is a state-machine orchestrator that acts as a scrum master for both you and your agent \u2014 keeping work focused, decisions in your hands, and tokens efficient.",W=(e,t,s,n)=>({phase:"IDLE",instruction:"Present the welcome dashboard and interactive options to the user. Show existing specs if any, then present choices. IMPORTANT: Present ALL available concerns to the user \u2014 never truncate the list. Split across multiple AskUserQuestion calls if needed.",welcome:ee,existingSpecs:n?.existingSpecs??[],availableConcerns:t.map(r=>({id:r.id,description:r.description})),activeConcerns:e.map(r=>r.id),activeRulesCount:n?.rulesCount??s,hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),te=/\b(Node\.?js|Deno|Bun|Go|Rust|Python|Ruby|Java|Kotlin|Swift|PHP|React|Vue|Angular|Svelte|Next\.?js|Nuxt|Remix|Astro|SolidJS|Qwik|TypeScript|Webpack|Vite|esbuild|Rollup|Terraform|Docker|Kubernetes|PostgreSQL|MySQL|Redis|MongoDB|SQLite|Prisma|Drizzle|gRPC|GraphQL|tRPC)\s+v?(\d+(?:\.\d+)?(?:\.\d+)?\+?)\b/gi,se=e=>{if(e===null||e.length===0)return[];let t=[],s,n=new RegExp(te.source,"gi");for(;(s=n.exec(e))!==null;)t.push(`${s[1]} ${s[2]}`);return t},M=e=>{let t=se(e);if(t.length!==0)return{required:!0,instruction:"Before asking discovery questions, research the current state of all platforms, runtimes, libraries, and APIs mentioned in the spec description. Use web search and Context7 MCP if available. Report findings as a pre-discovery brief to the user. Do NOT assume your training data is current \u2014 versions change, APIs get added, features get deprecated.",extractedTerms:t}},ne=(e,t,s)=>{let n=e.spec,r=C(t),m=e.discovery.answers.length,l=F(e.discovery.answers),u=e.discovery.audience==="agent";if(l){let i=e.revisitHistory??[],d=i.length>0?i[i.length-1]:null,h={phase:"DISCOVERY",instruction:d!==null?"This spec was revisited from EXECUTING. All previous answers are preserved. Review and approve, or revise answers before regenerating the spec.":`All discovery questions answered. Run: \`${o("approve",n)}\``,questions:[],answeredCount:m,context:{rules:s,concernReminders:[]},transition:{onComplete:o("approve",n)}};if(d!=null){let b=d;return{...h,revisited:!0,revisitReason:b.reason,previousProgress:{completedTasks:[...b.completedTasks],totalTasks:b.completedTasks.length}}}return h}if(u){let i=e.discovery.currentQuestion,d=r[i];if(d===void 0)return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${o("approve",n)}\``,questions:[],answeredCount:m,context:{rules:s,concernReminders:[]},transition:{onComplete:o("approve",n)}};let h={id:d.id,text:d.text,concerns:[...d.concerns],extras:d.extras.map(I=>I.text)},b={phase:"DISCOVERY",instruction:`Ask this question to the user using AskUserQuestion. Submit the answer with: \`${o('next --agent --answer="<answer>"',n)}\``,questions:[h],answeredCount:m,currentQuestion:i,totalQuestions:r.length,context:{rules:s,concernReminders:T(t)},transition:{onComplete:`${o('next --agent --answer="<answer>"',n)}`}};if(i===0){let I=M(e.specDescription??null);if(I!==void 0)return{...b,preDiscoveryResearch:I}}return b}let y=new Set(e.discovery.answers.map(i=>i.questionId)),g=r.filter(i=>!y.has(i.id)).map(i=>({id:i.id,text:i.text,concerns:[...i.concerns],extras:i.extras.map(d=>d.text)})),w=e.revisitHistory??[],c=w.length>0?w[w.length-1]:null,p=c!==null,a={phase:"DISCOVERY",instruction:p?"This spec was revisited from EXECUTING. Previous discovery answers are preserved \u2014 review and revise as needed, or approve to regenerate tasks.":"Conduct a thorough discovery conversation. FIRST: perform a pre-discovery codebase scan (README, CLAUDE.md, recent git log, TODOs, directory structure) and present a brief audit summary. THEN: challenge the user's spec description against your findings. THEN: ask the discovery questions one at a time, offering concrete options based on codebase knowledge. AFTER questions: present a dream state table (current \u2192 this spec \u2192 future), scored expansion proposals, architectural decisions, and an error/rescue map. FINALLY: present a complete discovery synthesis for user confirmation before submitting answers as a JSON object.",questions:g,answeredCount:m,context:{rules:s,concernReminders:T(t)},transition:{onComplete:`${o(`next --answer='{"status_quo":"...","ambition":"...",...}'`,n)}`}};if(p&&c!==void 0)return{...a,revisited:!0,revisitReason:c.reason,previousProgress:{completedTasks:[...c.completedTasks],totalTasks:c.completedTasks.length}};if(m===0){let i=M(e.specDescription??null);if(i!==void 0)return{...a,preDiscoveryResearch:i}}return a},oe=(e,t)=>{let s=e.spec,n=C(t),r=e.discovery.answers.map(l=>{let u=n.find(y=>y.id===l.questionId);return{questionId:l.questionId,question:u?.text??l.questionId,answer:l.answer}}),m=q(e.discovery.answers);return e.discovery.approved&&m.detected?{phase:"DISCOVERY_REVIEW",instruction:"Discovery answers are approved. noskills detected multiple independent work areas in this spec. Present the split proposal to the user and let them decide whether to keep as one spec or split into separate specs.",answers:r,transition:{onApprove:o('next --answer="keep"',s),onRevise:o(`next --answer='{"revise":{"status_quo":"corrected answer"}}'`,s)},splitProposal:m}:{phase:"DISCOVERY_REVIEW",instruction:m.detected?"Present ALL discovery answers to the user for review. ALSO present the split proposal \u2014 noskills detected multiple independent areas.":"Present ALL discovery answers to the user for review. The user must confirm or correct each answer before the spec can be generated. Use AskUserQuestion to ask for confirmation.",answers:r,transition:{onApprove:o('next --answer="approve"',s),onRevise:o(`next --answer='{"revise":{"status_quo":"corrected answer"}}'`,s)},splitProposal:m.detected?m:void 0}},re=e=>{let t=e.spec;return e.classification===null?{phase:"SPEC_DRAFT",instruction:"Before generating the spec, classify what this spec involves. Ask the user to select all that apply.",specPath:e.specState.path??"",transition:{onApprove:`${o(`next --answer='{"involvesWebUI":false,"involvesCLI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`,t)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesWebUI",label:"Web/Mobile UI \u2014 layouts, responsive design, visual components"},{id:"involvesCLI",label:"CLI/Terminal UI \u2014 spinners, progress bars, interactive prompts"},{id:"involvesPublicAPI",label:"Public API changes"},{id:"involvesMigration",label:"Data migration or schema changes"},{id:"involvesDataHandling",label:"Data handling or privacy"}],instruction:"Select all that apply. Submit as JSON: `"+o(`next --answer='{"involvesWebUI":true,"involvesCLI":false,"involvesPublicAPI":false,...}'`,t)+"`. If none apply, answer with: `"+o('next --answer="none"',t)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:o("approve",t)}}},ie=e=>{let t=e.spec;return{phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${o('next --answer="start"',t)}`}}},ae=(e,t)=>{if(t===null)return!1;let s=e.toLowerCase();return s.includes("mobile")||s.includes("layout")||s.includes("interaction design")?t.involvesWebUI:s.includes("ui state")||s.includes("skeleton ui")?t.involvesWebUI||t.involvesCLI:s.includes("readme")||s.includes("documentation updated")||s.includes("reflected in")&&s.includes("docs")?!0:s.includes("api doc")||s.includes("public api")?t.involvesPublicAPI:s.includes("migration")||s.includes("backward compat")||s.includes("deprecat")?t.involvesMigration:s.includes("audit trail")||s.includes("access control")||s.includes("data handling")||s.includes("data retention")?t.involvesDataHandling:!0},ce=(e,t,s,n,r,m,l,u)=>{let y=[],g=new Set(u??[]),w=0,c=()=>`ac-${++w}`;if(n!==null)for(let p of n.items)g.has(p.id)||y.push({id:p.id,text:`[DEBT from iteration ${p.since}] ${p.text}`});if(t&&y.push({id:c(),text:`[FAILED] Tests \u2014 fix this first: ${s.slice(0,200)}`}),m!=null)for(let p of m.verification){let v=c();g.has(v)||y.push({id:v,text:p})}for(let p of e)if(p.acceptanceCriteria!==void 0&&p.acceptanceCriteria.length>0)for(let v of p.acceptanceCriteria){if(!ae(v,r))continue;let a=c();g.has(a)||y.push({id:a,text:`(${p.id}) ${v}`})}if(l!==void 0)for(let p of l){let v=c();g.has(v)||y.push({id:v,text:`(folder: ${p.folder}) ${p.rule}`})}return y.push({id:"mandatory-tests",text:"Tests written and passing for all new and changed behavior"}),y.push({id:"mandatory-docs",text:"Documentation updated for all public-facing changes"}),y},le=(e,t,s,n,r,m)=>{let l=e.spec,u=L(t),y=e.execution.iteration>=n,g=e.execution.lastVerification?.passed===!1,w=e.execution.lastVerification?.output??"",c=r?.tasks??[],p=e.execution.completedTasks??[],v=new Set(p),a=c.find(f=>!v.has(f.id))??null,i=a!==null?{id:a.id,title:a.title,totalTasks:c.length,completedTasks:p.length}:void 0;if(e.execution.awaitingStatusReport){let f=ce(t,g,w,e.execution.debt,e.classification,r,m,e.execution.naItems),E=[];try{let O=JSON.parse(e.execution.lastProgress??"");Array.isArray(O.completed)&&(E=O.completed.filter(P=>typeof P=="string"&&P.startsWith("task-")))}catch{}let D={phase:"EXECUTING",instruction:E.length>=2?`${E.length} tasks reported complete. Report status against ALL relevant acceptance criteria.`:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:s,concernReminders:T(t)},transition:{onComplete:`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,l)}`,onBlocked:`${o('block "reason"',l)}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:f,reportFormat:{completed:"list item IDs you finished (e.g., ['debt-1', 'ac-3']) with evidence",remaining:"list item IDs not yet done",blocked:"list item IDs that need a decision from the user",na:"(optional) list item IDs that are not applicable to this task \u2014 they will be removed from future criteria",newIssues:"(optional) list NEW issues discovered during implementation \u2014 free text, will be assigned debt IDs automatically"}}};return E.length>=2&&(D={...D,batchTasks:E}),g&&(D={...D,verificationFailed:!0,verificationOutput:w.slice(0,2e3)}),D}let d=(e.execution.lastProgress??"").includes("Task not accepted"),h=e.execution.debt?.items??[],b=e.execution.debt?.unaddressedIterations??0,I=i!==void 0?`Execute task ${i.id}: ${i.title} (${i.completedTasks}/${i.totalTasks} completed)`:"All tasks completed. Run `"+o("done",l)+"` to finish.",A;if(g)A="Verification FAILED. Fix the failing tests before continuing.";else if(d&&h.length>0){let f=b>=3?` These items have been outstanding for ${b} iterations.`:"";A=`Task not accepted \u2014 ${h.length} remaining item(s) must be addressed before this task can be completed.${f} Address them, then submit a new status report.`}else A=I;let k={phase:"EXECUTING",instruction:A,task:i,context:{rules:s,concernReminders:T(t)},transition:{onComplete:`${o('next --answer="..."',l)}`,onBlocked:`${o('block "reason"',l)}`,iteration:e.execution.iteration}};if(d&&h.length>0&&(k={...k,taskRejected:!0,rejectionReason:`${h.length} remaining item(s) must be addressed.`,rejectionRemaining:h.map(f=>f.text)}),e.execution.debt!==null&&e.execution.debt.items.length>0){let f=e.execution.debt.unaddressedIterations??0,E=f>=3?`URGENT: These items have been unaddressed for ${f} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";k={...k,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:E}}}if(g){let f=w.slice(0,2e3);k={...k,verificationFailed:!0,verificationOutput:f}}u.length>0&&(k={...k,concernTensions:u}),y&&(k={...k,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${o("next",l)}\` to resume - your progress is saved.`});let R=[...e.decisions].reverse().find(f=>!f.promoted);return R!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(k={...k,promotePrompt:{decisionId:R.id,question:R.question,choice:R.choice,prompt:`You just resolved a decision: "${R.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${x(`rule add "${R.choice}"`)}\``}}),k},de=e=>{let t=e.spec;return{phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${o('next --answer="..."',t)}`}}},ue=e=>({phase:"COMPLETED",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length,completionReason:e.completionReason,completionNote:e.completionNote}});export{_ as a,C as b,F as c,fe as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{m as w,o as R}from"./chunk-
|
|
2
|
+
import{m as w,o as R}from"./chunk-NMSD4ZXJ.js";import{i as g}from"./chunk-6DBKPC2O.js";var p=class extends Error{constructor(r){super(`Required variable '${r}' has no value and no default`),this.name="MissingVariableError"}},m=(e,r)=>{let t={};for(let n of e){let a=r[n.name];if(a!==void 0)t[n.name]=a;else if(n.default!==void 0)t[n.name]=n.default;else throw new p(n.name)}return t},v=(e,r)=>e.replace(/\{\{\s*\.(\w+)\s*\}\}/g,(t,n)=>n in r?r[n]:t);var y=class extends Error{constructor(r){super(`Circular dependency detected: ${r.join(" \u2192 ")}`),this.name="CyclicDependencyError"}},f=class extends Error{constructor(r,t){super(`Recipe '${r}' requires '${t}', which is not in the registry`),this.name="MissingDependencyError"}},b=(e,r)=>{let t=new Map;for(let s of r)t.set(s.name,s);if(t.get(e)===void 0)throw new f("<root>",e);let a=[],i=new Set,o=new Set,l=(s,d)=>{if(i.has(s))return;if(o.has(s))throw new y([...d,s]);let c=t.get(s);if(c===void 0)throw new f(d[d.length-1]??"<root>",s);if(o.add(s),c.requires!==void 0)for(let u of c.requires)l(u,[...d,s]);o.delete(s),i.add(s),a.push(c)};return l(e,[]),a};var $=(e,r)=>{let t=e.endsWith("/")?e:`${e}/`,n=new URL(r,`file://${t}`).pathname;return n.startsWith(t)||n===e},x=async e=>{let r=e.split("/");r.pop();let t=r.join("/");t!==""&&t!=="."&&await g.fs.mkdir(t,{recursive:!0})},h=async e=>{try{return await g.fs.stat(e),!0}catch{return!1}},k=(e,r)=>r===void 0||Object.keys(r).length===0?e:v(e,r),F=async(e,r,t,n)=>{let a=`${r.cwd}/${e.target}`;if(n.includes(e.target))return;if(r.skipExisting===!0&&await h(a)){r.verbose===!0&&console.log(` [skip] ${e.target} (already exists)`),n.push(e.target);return}if(r.dryRun===!0){console.log(` [dry-run] would write ${e.target}`),t.push(e.target);return}r.verbose===!0&&console.log(` [write] ${e.target}`);let i=await w(r.registryUrl,e.source),o=k(i,r.variables);await x(a),await g.fs.writeTextFile(a,o),t.push(e.target)},E=async(e,r,t,n)=>{let a=await R(r.registryUrl,e.source);for(let i of a){let o=`${e.target}/${i.path}`;if(!$(r.cwd,o))throw new Error(`Folder recipe contains path traversal in '${o}'. Aborting.`)}for(let i of a){let o=`${e.target}/${i.path}`,l=`${r.cwd}/${o}`;if(r.skipExisting===!0&&await h(l)){n.push(o);continue}if(r.dryRun===!0){console.log(` [dry-run] would write ${o}`),t.push(o);continue}r.verbose===!0&&console.log(` [write] ${o}`);let s=k(i.content,r.variables);await x(l),await g.fs.writeTextFile(l,s),t.push(o)}},S=async(e,r,t,n)=>{let a=[];for(let i of e){if(t===!0){console.log(` [dry-run] would run: ${i}`),a.push(i);continue}n===!0&&console.log(` [post-install] ${i}`);let o=i.split(/\s+/),l=await g.exec.spawn(o[0],o.slice(1),{cwd:r,stdout:"inherit",stderr:"inherit"});if(!l.success)throw new Error(`Post-install command failed: '${i}' (exit code ${l.code})`);a.push(i)}return a},q=async(e,r)=>{let t=[],n=[],a=e.files.length,i=r.variables;e.variables!==void 0&&e.variables.length>0&&(i=m(e.variables,r.variables??{}));let o={...r,variables:i};for(let s of e.files)if((s.kind??"file")==="file"&&!$(r.cwd,s.target))throw new Error(`Recipe '${e.name}' contains path traversal in target '${s.target}'. Aborting.`);if(r.force!==!0&&r.skipExisting!==!0)for(let s of e.files){if((s.kind??"file")!=="file")continue;let c=`${r.cwd}/${s.target}`;await h(c)&&(r.dryRun===!0?console.log(` [conflict] ${s.target} (already exists)`):(console.warn(` Warning: ${s.target} already exists. Use --force to overwrite or --skip-existing to skip.`),n.push(s.target)))}for(let s of e.files){let d=s.kind??"file";try{d==="folder"?await E(s,o,t,n):await F(s,o,t,n)}catch(c){let u=c instanceof Error?c.message:String(c);throw new Error(`Failed applying '${s.target}'. ${t.length} files written so far. Retry with \`eser kit add ${e.name} --force\`. Cause: ${u}`)}}let l=[];return e.postInstall!==void 0&&e.postInstall.length>0&&(l=await S(e.postInstall,r.cwd,r.dryRun,r.verbose)),{written:t,skipped:n,total:a,postInstallRan:l}},V=async(e,r,t)=>{let n=b(e,r),a=[];for(let i of n){t.verbose===!0&&console.log(`
|
|
3
3
|
Applying recipe: ${i.name}`);let o=await q(i,t);a.push({name:i.name,result:o})}return{recipes:a}};export{$ as a,h as b,k as c,S as d,q as e,V as f};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as f}from"./chunk-IZUADMIU.js";import{c as d}from"./chunk-TMMAF763.js";import{i as u}from"./chunk-6DBKPC2O.js";var m=r=>{let n=r.split(/\n/).flatMap(t=>t.trim().length>0?[t.trim()]:[]);return n.length>1?n:r.split(/\.(?=\s+[A-Z])|;\s+/).map(t=>t.trim()).filter(t=>t.length>5)},v=(r,n=[])=>{let t=[],o=r.find(e=>e.questionId==="ambition");if(o!==void 0){let e=o.answer,c=e.match(/10[- ]?star[:\s]+(.+?)(?:\n|$)/is),a=e.match(/5[- ]?star[:\s]+(.+?)(?:\n|$)/is),s=(c!==null?c[1].trim():a!==null?a[1].trim():e.replace(/1[- ]?star[:\s]+[^.]*\.\s*/i,"").trim()).replace(/^(the|a|an|with|plus|also)\s+/i,"").replace(/^(the\s+)?(target|goal|objective)[:\s]+/i,"").trim();s.length>0&&(s=s.charAt(0).toUpperCase()+s.slice(1)),s=s.replace(/[.\u2026]+$/,"").trim(),s.length>140&&(s=s.slice(0,137)+"..."),s.length>3&&t.push(s)}let i=r.find(e=>e.questionId==="verification");if(i!==void 0){let e=i.answer.split(/\n/).map(c=>c.replace(/^\s*[-\u2022*]\s*/,"").trim()).filter(c=>c.length>0);for(let c of e)t.push(c)}for(let e of n){let c=e.choice.toLowerCase();if(c.includes("accepted")||c.includes("add to scope")){let a=e.question.replace(/^should\s+(we|i)\s+/i,"").replace(/\?+$/,"").trim(),l=a.charAt(0).toUpperCase()+a.slice(1);t.push(l)}}return t.length===0&&t.push("_Tasks need to be defined before execution. Add tasks manually or run discovery with more detail._"),t.push("Write or update tests for all new and changed behavior"),t.push("Update documentation for all public-facing changes (README, API docs, CHANGELOG)"),t},w=(r,n)=>{let t={};if(n===null){for(let o of r.specSections)t[o]=!1;return t}for(let o of r.specSections){let i=o.toLowerCase();i.includes("design")||i.includes("mobile")||i.includes("layout")||i.includes("interaction")?t[o]=n.involvesWebUI:i.includes("contributor")||i.includes("public api")||i.includes("api surface")?t[o]=n.involvesPublicAPI:i.includes("migration")||i.includes("deprecation")||i.includes("backward")||i.includes("compatibility")?t[o]=n.involvesMigration:i.includes("audit")||i.includes("access control")||i.includes("data handling")?t[o]=n.involvesDataHandling:t[o]=!0}return t},g=(r,n,t,o,i)=>{let e=[];e.push(`# Spec: ${r}`),e.push(""),e.push("## Status: draft"),e.push(""),t.length>0&&(e.push(`## Concerns: ${t.map(s=>s.id).join(", ")}`),e.push("")),e.push("## Discovery Answers"),e.push("");for(let s of n)e.push(`### ${s.questionId}`),e.push(""),e.push(s.answer),e.push("");for(let s of t)if(s.specSections.length>0){let p=w(s,i??null);for(let h of s.specSections)p[h]!==!1&&(e.push(`## ${h} (${s.id})`),e.push(""),e.push("_To be addressed during execution._"),e.push(""))}if(o.length>0){e.push("## Decisions"),e.push(""),e.push("| # | Decision | Choice | Promoted |"),e.push("|---|----------|--------|----------|");for(let s=0;s<o.length;s++){let p=o[s];e.push(`| ${s+1} | ${p.question} | ${p.choice} | ${p.promoted?"yes":"no"} |`)}e.push("")}let c=n.find(s=>s.questionId==="scope_boundary");if(c!==void 0){e.push("## Out of Scope"),e.push("");let s=m(c.answer);for(let p of s)e.push(`- ${p}`);e.push("")}let a=v(n,o);e.push("## Tasks"),e.push("");for(let s=0;s<a.length;s++)e.push(`- [ ] task-${s+1}: ${a[s]}`);e.push("");let l=n.find(s=>s.questionId==="verification");if(e.push("## Verification"),e.push(""),l!==void 0){let s=m(l.answer);for(let p of s)e.push(`- ${p}`)}else e.push("_To be defined._");return e.push(""),e.join(`
|
|
3
|
+
`)};var D=async(r,n,t)=>{if(n.spec===null)throw new Error("No active spec");let o=`${r}/${d.specDir(n.spec)}`,i=`${r}/${d.specFile(n.spec)}`;await u.fs.mkdir(o,{recursive:!0});let e=g(n.spec,n.discovery.answers,t,n.decisions,n.classification);await u.fs.writeTextFile(i,e);let c=f(n.spec,e),a=`${o}/progress.json`,l={spec:n.spec,status:"draft",tasks:c.tasks.map(s=>({id:s.id,title:s.title,status:"pending"})),decisions:n.decisions.map(s=>({question:s.question,choice:s.choice,promoted:s.promoted})),debt:[],updatedAt:new Date().toISOString()};return await u.fs.writeTextFile(a,JSON.stringify(l,null,2)+`
|
|
4
|
+
`),i};export{D as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as n}from"./chunk-3XJLLDR5.js";import{a as r}from"./chunk-
|
|
2
|
+
import{a as n}from"./chunk-3XJLLDR5.js";import{a as r}from"./chunk-ATYDQCCJ.js";var o=r({name:"validate-json",description:"Validate JSON syntax",canFix:!1,stacks:[],defaults:{},extensions:["json","jsonc"],checkFile(e,a,t){if(a===void 0)return[];if((t.exclude??[]).some(s=>e.path.includes(s)))return[];try{return e.name.endsWith(".jsonc")?n(a):JSON.parse(a),[]}catch(s){let i=s instanceof SyntaxError?s.message:"invalid JSON";return[{path:e.path,message:i}]}}}),p=o.run,f=o.validator,x=o.main;export{o as a,p as b,f as c,x as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{f as ge,h as re,k as se}from"./chunk-SHN5MT56.js";import{b as u,c as Le,d as p,e as $,f as S,g,h as L,i as Be,k as R,l as _,n as ye,o as U}from"./chunk-YVN2NZL4.js";import{i as x}from"./chunk-6DBKPC2O.js";import{d as N}from"./chunk-5WJ6AUNY.js";var m=Symbol("tui.cancel"),We=e=>e===m,Me={ctrlC:"exit",escape:"cancel"},je=()=>{try{return x.process.stdin}catch{return new ReadableStream}},ze=e=>{let t=e?.interaction??(e?.target==="non-interactive"?"non-interactive":"interactive"),r=e?.audience??"human",s=t==="non-interactive"?"non-interactive":"interactive",i=t==="interactive";return{output:e?.output??ge({renderer:i?se.ansi():se.plain(),sink:i?re.stdout():re.stderr()}),input:e?.input??je(),target:s,interaction:t,audience:r,signals:{...Me,...e?.signals},stderr:e?.stderr??ge({renderer:se.plain(),sink:re.stderr()})}};var Ie={};N(Ie,{disableMouse:()=>Ye,enableMouse:()=>Xe,isSGRMouseSequence:()=>xe,parseMouseEvent:()=>be});var Xe=()=>"\x1B[?1000h\x1B[?1002h\x1B[?1006h",Ye=()=>"\x1B[?1006l\x1B[?1002l\x1B[?1000l",Je=/^\x1b\[<(\d+);(\d+);(\d+)([Mm])$/,be=e=>{let t=e.match(Je);if(t===null)return null;let r=parseInt(t[1],10),s=parseInt(t[2],10)-1,i=parseInt(t[3],10)-1,n=t[4]==="m",o=r&3,a=(r&4)!==0,c=(r&16)!==0,d=(r&32)!==0;return(r&64)!==0?{type:"wheel",button:0,x:s,y:i,shift:a,ctrl:c,direction:r&1?"down":"up"}:d?{type:"mousemove",button:o,x:s,y:i,shift:a,ctrl:c}:{type:n?"mouseup":"mousedown",button:o,x:s,y:i,shift:a,ctrl:c}},xe=e=>e.length>=4&&e[0]===27&&e[1]===91&&e[2]===60;var O=async e=>{let t=!1;if(x.capabilities.stdin&&x.process.isTerminal("stdin"))try{x.process.setStdinRaw(!0),t=!0}catch{}try{return await e()}finally{if(t)try{x.process.setStdinRaw(!1)}catch{}}},E=e=>{e.write(u("\x1B[?25l"))},k=e=>{e.write(u("\x1B[?25h"))},h=(e,t)=>{t>0&&e.write(u(`\x1B[${t}A\x1B[J`))},ne=e=>{e.write(u("\r\x1B[2K"))},Ne=e=>{let t=new Uint8Array(e);if(e.length===1&&e[0]===3)return{name:"c",ctrl:!0,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===27)return{name:"escape",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&(e[0]===13||e[0]===10))return{name:"return",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===9)return{name:"tab",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===127)return{name:"backspace",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length>=3&&e[0]===27&&e[1]===91)switch(e[2]){case 65:return{name:"up",ctrl:!1,meta:!1,shift:!1,raw:t};case 66:return{name:"down",ctrl:!1,meta:!1,shift:!1,raw:t};case 67:return{name:"right",ctrl:!1,meta:!1,shift:!1,raw:t};case 68:return{name:"left",ctrl:!1,meta:!1,shift:!1,raw:t};case 72:return{name:"home",ctrl:!1,meta:!1,shift:!1,raw:t};case 70:return{name:"end",ctrl:!1,meta:!1,shift:!1,raw:t}}if(e.length===1&&e[0]>=1&&e[0]<=26)return{name:String.fromCharCode(e[0]+96),ctrl:!0,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===32)return{name:"space",char:" ",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]>=33&&e[0]<=126){let r=String.fromCharCode(e[0]);return{name:r,char:r,ctrl:!1,meta:!1,shift:!1,raw:t}}if(e.length>0&&e[0]>=192){let r=new TextDecoder().decode(e);return{name:r,char:r,ctrl:!1,meta:!1,shift:!1,raw:t}}return{name:"unknown",ctrl:!1,meta:!1,shift:!1,raw:t}};async function*P(e,t){let r=e.getReader();try{for(;!t?.aborted;){let{done:s,value:i}=await r.read();if(s||i===void 0)break;yield Ne(i)}}finally{r.releaseLock()}}async function*Ze(e,t){let r=e.getReader(),s=new TextDecoder;try{for(;!t?.aborted;){let{done:i,value:n}=await r.read();if(i||n===void 0)break;if(xe(n)){let o=s.decode(n),a=be(o);if(a!==null){yield{kind:"mouse",event:a};continue}}yield{kind:"key",event:Ne(n)}}}finally{r.releaseLock()}}var w=(e,t)=>{if(e==="exit"){k(t.output);try{x.process.setStdinRaw(!1)}catch{}x.process.exit(130)}return e==="cancel"?"cancel":"continue"};var y="\u2502",_e="\u250C",C="\u2514";var F="\u25CF",H="\u25CB",De="\u25FC",Ge="\u25FB",B="\u25C6",v="\u25C7",A="\u25A0",$e="\u25CF";var D="\u25B2";var Ue="\u25C7";var ie=(e,t,r,s)=>{if(s==="done"){let o=r?"Yes":"No";return e.output.writeln(g(v),u(` ${t}`),p(` \xB7 ${o}`)),1}if(s==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;let i=r?$(g(F),u(" Yes")):$(p(H),p(" Yes")),n=r?$(p(H),p(" No")):$(g(F),u(" No"));return e.output.writeln(R(B),u(` ${t}`)),e.output.writeln(p(y),u(" "),i,p(" / "),n),e.output.writeln(p(C)),3},Qe=async(e,t)=>{let r=t.initialValue??!0,s=0;E(e.output);try{return await O(async()=>{s=ie(e,t.message,r,"active"),await e.output.flush();let i=()=>{h(e.output,s),ie(e,t.message,r,"cancel")};for await(let n of P(e.input)){if(n.name==="c"&&n.ctrl){if(w(e.signals.ctrlC,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="escape"){if(w(e.signals.escape,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="return")return h(e.output,s),ie(e,t.message,r,"done"),await e.output.flush(),r;let o=!1;(n.name==="left"||n.name==="right")&&(r=!r,o=!0),(n.name==="y"||n.name==="Y")&&(r=!0,o=!0),(n.name==="n"||n.name==="N")&&(r=!1,o=!0),o&&(h(e.output,s),s=ie(e,t.message,r,"active"),await e.output.flush())}return m})}finally{k(e.output),await e.output.flush()}};var q=(e,t,r,s,i,n)=>{if(n==="done")return e.output.writeln(g(v),u(` ${t}`),p(` \xB7 ${r}`)),1;if(n==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;let o=r.length>0?u(r):s!==void 0?p(s):u(""),a=i!==void 0?L(D):R(B);e.output.writeln(a,u(` ${t}`)),e.output.writeln(p(y),u(" "),o);let c=2;return i!==void 0?(e.output.writeln(p(C),u(" "),L(i)),c=3):(e.output.writeln(p(C)),c=3),c},et=async(e,t)=>{let r=t.initialValue??"",s=r.length,i,n=0;E(e.output);try{return await O(async()=>{n=q(e,t.message,r,t.placeholder,i,"active"),await e.output.flush();let o=()=>{h(e.output,n),q(e,t.message,r,t.placeholder,void 0,"cancel")};for await(let a of P(e.input)){if(a.name==="c"&&a.ctrl){if(w(e.signals.ctrlC,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="escape"){if(w(e.signals.escape,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="return"){if(t.validate!==void 0){let c=t.validate(r);if(c!==void 0){i=c,h(e.output,n),n=q(e,t.message,r,t.placeholder,i,"active"),await e.output.flush();continue}}return h(e.output,n),q(e,t.message,r,t.placeholder,void 0,"done"),await e.output.flush(),r}if(i=void 0,a.name==="backspace")s>0&&(r=r.slice(0,s-1)+r.slice(s),s--);else if(a.name==="left")s>0&&s--;else if(a.name==="right")s<r.length&&s++;else if(a.name==="home")s=0;else if(a.name==="end")s=r.length;else if(a.char!==void 0)r=r.slice(0,s)+a.char+r.slice(s),s++;else continue;h(e.output,n),n=q(e,t.message,r,t.placeholder,i,"active"),await e.output.flush()}return m})}finally{k(e.output),await e.output.flush()}};var oe=(e,t,r,s,i)=>{if(i==="done"){let n=r[s];return e.output.writeln(g(v),u(` ${t}`),p(` \xB7 ${n?.label??""}`)),1}if(i==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;e.output.writeln(R(B),u(` ${t}`));for(let n=0;n<r.length;n++){let o=r[n],a=n===s,c=o.disabled===!0,d=a?g(F):p(H),l=c?p(` ${o.label}`):a?u(` ${o.label}`):p(` ${o.label}`),f=o.hint!==void 0?p(` (${o.hint})`):u("");e.output.writeln(p(y),u(" "),d,l,f)}return e.output.writeln(p(C)),r.length+2},we=(e,t,r)=>{let s=e.length,i=t;for(let n=0;n<s;n++)if(i=(i+r+s)%s,e[i]?.disabled!==!0)return i;return t},tt=async(e,t)=>{let r=0;if(t.initialValue!==void 0){let i=t.options.findIndex(n=>n.value===t.initialValue);i>=0&&(r=i)}t.options[r]?.disabled===!0&&(r=we(t.options,r,1));let s=0;E(e.output);try{return await O(async()=>{s=oe(e,t.message,t.options,r,"active"),await e.output.flush();let i=()=>{h(e.output,s),oe(e,t.message,t.options,r,"cancel")};for await(let n of P(e.input)){if(n.name==="c"&&n.ctrl){if(w(e.signals.ctrlC,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="escape"){if(w(e.signals.escape,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="return")return h(e.output,s),oe(e,t.message,t.options,r,"done"),await e.output.flush(),t.options[r].value;let o=!1;(n.name==="up"||n.name==="k")&&(r=we(t.options,r,-1),o=!0),(n.name==="down"||n.name==="j")&&(r=we(t.options,r,1),o=!0),o&&(h(e.output,s),s=oe(e,t.message,t.options,r,"active"),await e.output.flush())}return m})}finally{k(e.output),await e.output.flush()}};var W=(e,t,r,s,i,n,o)=>{if(o==="done"){let d=[...i].sort((l,f)=>l-f).map(l=>r[l]?.label??"").join(", ");return e.output.writeln(g(v),u(` ${t}`),p(` \xB7 ${d}`)),1}if(o==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;let a=n!==void 0?L(D):R(B);e.output.writeln(a,u(` ${t}`));for(let d=0;d<r.length;d++){let l=r[d],f=d===s,b=i.has(d),G=l.disabled===!0,de=b?g(De):p(Ge),me=G?p(` ${l.label}`):f?u(` ${l.label}`):p(` ${l.label}`),he=l.hint!==void 0?p(` (${l.hint})`):u("");e.output.writeln(p(y),u(" "),de,me,he)}let c=r.length+2;return n!==void 0?e.output.writeln(p(C),u(" "),L(n)):e.output.writeln(p(C)),c},Ce=(e,t,r)=>{let s=e.length,i=t;for(let n=0;n<s;n++)if(i=(i+r+s)%s,e[i]?.disabled!==!0)return i;return t},rt=async(e,t)=>{let r=0,s=new Set;if(t.initialValues!==void 0)for(let o of t.initialValues){let a=t.options.findIndex(c=>c.value===o);a>=0&&s.add(a)}t.options[r]?.disabled===!0&&(r=Ce(t.options,r,1));let i=0,n;E(e.output);try{return await O(async()=>{i=W(e,t.message,t.options,r,s,n,"active"),await e.output.flush();let o=()=>{h(e.output,i),W(e,t.message,t.options,r,s,void 0,"cancel")};for await(let a of P(e.input)){if(a.name==="c"&&a.ctrl){if(w(e.signals.ctrlC,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="escape"){if(w(e.signals.escape,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="return"){if(t.required!==!1&&s.size===0){n="Please select at least one option.",h(e.output,i),i=W(e,t.message,t.options,r,s,n,"active"),await e.output.flush();continue}return h(e.output,i),W(e,t.message,t.options,r,s,void 0,"done"),await e.output.flush(),[...s].sort((d,l)=>d-l).map(d=>t.options[d].value)}n=void 0;let c=!1;if((a.name==="up"||a.name==="k")&&(r=Ce(t.options,r,-1),c=!0),(a.name==="down"||a.name==="j")&&(r=Ce(t.options,r,1),c=!0),a.name==="space"&&t.options[r]?.disabled!==!0&&(s.has(r)?s.delete(r):s.add(r),c=!0),a.name==="a"){let d=t.options.every((l,f)=>l.disabled===!0||s.has(f));for(let l=0;l<t.options.length;l++)t.options[l]?.disabled!==!0&&(d?s.delete(l):s.add(l));c=!0}c&&(h(e.output,i),i=W(e,t.message,t.options,r,s,n,"active"),await e.output.flush())}return m})}finally{k(e.output),await e.output.flush()}};var st=(e,t)=>{e.output.writeln(_(_e),u(" "),Le(t)),e.output.writeln(_(y))},nt=(e,t)=>{e.output.writeln(_(y)),e.output.writeln(_(C),u(" "),u(t))},it=e=>{e.output.writeln(u(""))},ot=(e,t)=>{e.output.writeln(u(" "),p(t))},at=e=>{e.output.writeln(_(y))},lt={info:(e,t)=>{e.output.writeln(U("info",t))},success:(e,t)=>{e.output.writeln(U("success",t))},warn:(e,t)=>{e.output.writeln(U("warning",t))},error:(e,t)=>{e.output.writeln(U("error",t))},step:(e,t)=>{e.output.writeln(p(Ue),u(" "),p(t))},message:(e,t,r)=>{e.output.writeln(p(r??y),u(" "),u(t))}};var ut=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],ct=80,pt=(e,t,r)=>{let s=r?.frames??ut,i=r?.interval??ct,n=t,o=0,a,c=()=>{e.output.write(u(`\r${" ".repeat(n.length+4)}\r`))},d=()=>{a!==void 0&&(clearInterval(a),a=void 0,c())};return{start:l=>{l!==void 0&&(n=l),a=setInterval(()=>{let f=s[o%s.length];e.output.write(u("\r"),R(f??""),u(` ${n}`)),o++},i)},stop:l=>{d(),l!==void 0&&(n=l)},update:l=>{n=l},succeed:l=>{d(),e.output.writeln(g(v),u(` ${l??n}`))},fail:l=>{d(),e.output.writeln(S(A),u(` ${l??n}`))},warn:l=>{d(),e.output.writeln(L(D),u(` ${l??n}`))},info:l=>{d(),e.output.writeln(Be($e),u(` ${l??n}`))}}};var dt=(e,t)=>{let r=0,s=t.label??"",i=!1,n=()=>{let o=t.total>0?Math.round(r/t.total*100):0;ne(e.output),e.output.write(p(y),u(" "),ye(o,{width:t.width??20,label:s}))};return{start:o=>{o!==void 0&&(s=o),i=!0,e.output.writeln(p(v),u(` ${s}`)),n()},advance:(o,a)=>{i&&(r=Math.min(r+o,t.total),a!==void 0&&(s=a),n())},stop:o=>{i&&(i=!1,r=t.total,o!==void 0&&(s=o),ne(e.output),e.output.writeln(p(y),u(" "),ye(100,{width:t.width??20,label:s})))}}};var Ve={};N(Ve,{clearScreenSeq:()=>gt,enterAlternateScreen:()=>mt,exitAlternateScreen:()=>ht,getTerminalSize:()=>bt,hideCursorSeq:()=>ft,showCursorSeq:()=>yt});var mt=()=>"\x1B[?1049h",ht=()=>"\x1B[?1049l",ft=()=>"\x1B[?25l",yt=()=>"\x1B[?25h",gt=()=>"\x1B[2J\x1B[H",bt=()=>{try{let{columns:e,rows:t}=x.process.consoleSize();return{cols:e,rows:t}}catch{return{cols:80,rows:24}}};var ce={};N(ce,{bgBlue:()=>vt,bgGreen:()=>Ct,bold:()=>xt,cyan:()=>Se,dim:()=>ae,green:()=>le,inverse:()=>Re,moveTo:()=>T,red:()=>Te,reset:()=>ue,stripAnsi:()=>ke,truncate:()=>z,visibleLength:()=>j,white:()=>wt,yellow:()=>ve});var T=(e,t)=>`\x1B[${e};${t}H`,xt=e=>`\x1B[1m${e}\x1B[22m`,ae=e=>`\x1B[2m${e}\x1B[22m`,le=e=>`\x1B[32m${e}\x1B[39m`,ve=e=>`\x1B[33m${e}\x1B[39m`,Te=e=>`\x1B[31m${e}\x1B[39m`,Se=e=>`\x1B[36m${e}\x1B[39m`,wt=e=>`\x1B[37m${e}\x1B[39m`,Ct=e=>`\x1B[42m${e}\x1B[49m`,vt=e=>`\x1B[44m${e}\x1B[49m`,Re=e=>`\x1B[7m${e}\x1B[27m`,ue=()=>"\x1B[0m",Tt=/\x1b\[[0-9;]*[a-zA-Z]/g,ke=e=>e.replace(Tt,""),j=e=>ke(e).length,z=(e,t)=>{if(ke(e).length<=t)return e;let s=0,i=0,n=e;for(;i<n.length&&s<t-1;){if(n[i]==="\x1B"){let o=n.indexOf("m",i);if(o!==-1){i=o+1;continue}}s++,i++}return n.slice(0,i)+"\u2026"+ue()};var Ke={};N(Ke,{calculateLayout:()=>St});var St=(e,t,r)=>{let s=r.leftWidth<=1?Math.floor(e*r.leftWidth):Math.min(Math.floor(r.leftWidth),e),i=e-s,n=t-1,o=r.rightTopHeight<=1?Math.floor(n*r.rightTopHeight):Math.min(Math.floor(r.rightTopHeight),n),a=n-o;return{left:{id:"left",x:1,y:1,width:s,height:n},rightTop:{id:"rightTop",x:s+1,y:1,width:i,height:o},rightBottom:{id:"rightBottom",x:s+1,y:o+1,width:i,height:a},statusBar:{id:"statusBar",x:1,y:t,width:e,height:1}}};var Fe={};N(Fe,{nextSelectableIndex:()=>kt,renderList:()=>At});var Rt=(e,t)=>{switch(t){case"green":return le(e);case"yellow":return ve(e);case"red":return Te(e);case"cyan":return Se(e);case"dim":return ae(e);default:return e}},kt=(e,t,r)=>{let s=r==="up"?-1:1,i=t+s;for(;i>=0&&i<e.length;){if(e[i].selectable!==!1)return i;i+=s}return t},At=(e,t,r)=>{let s=[],i=r.width-2,n=r.height-2,o=0;t>=n&&(o=t-n+1);for(let a=0;a<n;a++){let c=o+a,d=r.y+1+a;if(c>=e.length){s.push(T(d,r.x+1)+" ".repeat(i));continue}let l=e[c],f=l.selectable!==!1,b=c===t&&f,G=l.active?le("\u25CF"):b?"\u25B8":" ",de=l.badge!==void 0?" "+Rt(`[${l.badge}]`,l.badgeColor??"dim"):"",me=l.dimmed?ae(l.label):l.label,he=` ${G} ${me}${de}`,fe=z(he,i),Pe=Math.max(0,i-j(fe));b?s.push(T(d,r.x+1)+Re(fe+" ".repeat(Pe))):s.push(T(d,r.x+1)+fe+" ".repeat(Pe))}return s.join("")};var Y=()=>({char:" ",fg:-1,bg:-1,fgRGB:null,bgRGB:null,bold:!1,dim:!1,italic:!1,underline:!1,inverse:!1}),pe=(e,t)=>{let r=[];for(let s=0;s<e;s++){let i=[];for(let n=0;n<t;n++)i.push(Y());r.push(i)}return r},X=e=>{let t=[];for(let r=0;r<e;r++)t.push(Y());return t},J=class{#e;#t;#r;#i=null;#o=0;#n;#s=new Set;constructor(t,r){this.#e=t,this.#t=r,this.#r=pe(t,r),this.#n=t-1}get rows(){return this.#e}get cols(){return this.#t}getCell(t,r){return t<0||t>=this.#e||r<0||r>=this.#t?Y():this.#r[t][r]}setCell(t,r,s,i){t<0||t>=this.#e||r<0||r>=this.#t||(this.#r[t][r]={char:i,fg:s.fg,bg:s.bg,fgRGB:s.fgRGB,bgRGB:s.bgRGB,bold:s.bold,dim:s.dim,italic:s.italic,underline:s.underline,inverse:s.inverse},this.#s.add(t))}scrollUp(t=1){for(let r=0;r<t;r++)this.#r.splice(this.#o,1),this.#r.splice(this.#n,0,X(this.#t));for(let r=this.#o;r<=this.#n;r++)this.#s.add(r)}scrollDown(t=1){for(let r=0;r<t;r++)this.#r.splice(this.#n,1),this.#r.splice(this.#o,0,X(this.#t));for(let r=this.#o;r<=this.#n;r++)this.#s.add(r)}setScrollRegion(t,r){this.#o=Math.max(0,t),this.#n=Math.min(this.#e-1,r)}insertLines(t,r){for(let s=0;s<t;s++)this.#r.splice(this.#n,1),this.#r.splice(r,0,X(this.#t));for(let s=r;s<=this.#n;s++)this.#s.add(s)}deleteLines(t,r){for(let s=0;s<t;s++)this.#r.splice(r,1),this.#r.splice(this.#n,0,X(this.#t));for(let s=r;s<=this.#n;s++)this.#s.add(s)}clearLine(t,r){if(t<0||t>=this.#e)return;let s=this.#r[t];if(r===2)for(let i=0;i<this.#t;i++)s[i]=Y();this.#s.add(t)}clearLineRange(t,r,s){if(t<0||t>=this.#e)return;let i=this.#r[t];for(let n=r;n<=Math.min(s,this.#t-1);n++)i[n]=Y();this.#s.add(t)}clearDisplay(t,r,s){if(t===0){this.clearLineRange(r,s,this.#t-1);for(let i=r+1;i<this.#e;i++)this.clearLine(i,2)}else if(t===1){for(let i=0;i<r;i++)this.clearLine(i,2);this.clearLineRange(r,0,s)}else{this.#r=pe(this.#e,this.#t);for(let i=0;i<this.#e;i++)this.#s.add(i)}}enterAlternateScreen(){this.#i=this.#r,this.#r=pe(this.#e,this.#t);for(let t=0;t<this.#e;t++)this.#s.add(t)}exitAlternateScreen(){if(this.#i!==null){this.#r=this.#i,this.#i=null;for(let t=0;t<this.#e;t++)this.#s.add(t)}}resize(t,r){let s=pe(t,r),i=Math.min(t,this.#e),n=Math.min(r,this.#t);for(let o=0;o<i;o++)for(let a=0;a<n;a++)s[o][a]=this.#r[o][a];this.#e=t,this.#t=r,this.#r=s,this.#n=t-1;for(let o=0;o<t;o++)this.#s.add(o)}getLine(t){return t<0||t>=this.#e?X(this.#t):this.#r[t]}getGrid(){return this.#r}getDirtyLines(){return this.#s}clearDirty(){this.#s.clear()}markAllDirty(){for(let t=0;t<this.#e;t++)this.#s.add(t)}};var Z=class{row=0;col=0;visible=!0;#e=0;#t=0;moveTo(t,r){this.row=t,this.col=r}moveUp(t=1){this.row=Math.max(0,this.row-t)}moveDown(t=1){this.row+=t}moveForward(t=1){this.col+=t}moveBack(t=1){this.col=Math.max(0,this.col-t)}moveToColumn(t){this.col=t}save(){this.#e=this.row,this.#t=this.col}restore(){this.row=this.#e,this.col=this.#t}clamp(t,r){this.row=Math.max(0,Math.min(this.row,t-1)),this.col=Math.max(0,Math.min(this.col,r-1))}};var Q=()=>({fg:-1,bg:-1,fgRGB:null,bgRGB:null,bold:!1,dim:!1,italic:!1,underline:!1,inverse:!1}),Ae=(e,t)=>{let r={...t},s=0;for(;s<e.length;){let i=e[s];switch(i){case 0:Object.assign(r,Q());break;case 1:r.bold=!0;break;case 2:r.dim=!0;break;case 3:r.italic=!0;break;case 4:r.underline=!0;break;case 7:r.inverse=!0;break;case 22:r.bold=!1,r.dim=!1;break;case 23:r.italic=!1;break;case 24:r.underline=!1;break;case 27:r.inverse=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:r.fg=i-30;break;case 39:r.fg=-1;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:r.bg=i-40;break;case 49:r.bg=-1;break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:r.fg=i-90+8;break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:r.bg=i-100+8;break;case 38:s+1<e.length&&e[s+1]===5&&s+2<e.length?(r.fg=e[s+2],r.fgRGB=null,s+=2):s+1<e.length&&e[s+1]===2&&s+4<e.length&&(r.fgRGB={r:e[s+2],g:e[s+3],b:e[s+4]},r.fg=-1,s+=4);break;case 48:s+1<e.length&&e[s+1]===5&&s+2<e.length?(r.bg=e[s+2],r.bgRGB=null,s+=2):s+1<e.length&&e[s+1]===2&&s+4<e.length&&(r.bgRGB={r:e[s+2],g:e[s+3],b:e[s+4]},r.bg=-1,s+=4);break}s++}return r};var ee=class{#e="GROUND";#t="";#r="";#i="";feed(t){let r=[],s=()=>{this.#i.length>0&&(r.push({type:"text",text:this.#i}),this.#i="")};for(let i=0;i<t.length;i++){let n=t[i],o=n.charCodeAt(0);switch(this.#e){case"GROUND":n==="\x1B"?(s(),this.#e="ESC"):o<32&&o!==27?(s(),r.push({type:"control",code:o})):this.#i+=n;break;case"ESC":n==="["?(this.#e="CSI_PARAM",this.#t=""):n==="]"?(this.#e="OSC",this.#r=""):(r.push({type:"esc",command:n}),this.#e="GROUND");break;case"CSI_PARAM":if(o>=48&&o<=63||n===";"||n==="?")this.#t+=n;else if(o>=64&&o<=126){let a=this.#t.replace(/^\?/,""),c=this.#t.startsWith("?"),d=a.length>0?a.split(";").map(f=>{let b=parseInt(f,10);return isNaN(b)?0:b}):[],l=(c?"?":"")+n;r.push({type:"csi",command:l,params:d}),this.#e="GROUND"}else this.#t+=n;break;case"OSC":if(n==="\x07"||n==="\\"&&this.#r.endsWith("\x1B")){let a=n==="\\"?this.#r.slice(0,-1):this.#r,c=a.indexOf(";"),d=c>=0?parseInt(a.slice(0,c),10):0,l=c>=0?a.slice(c+1):a;r.push({type:"osc",command:isNaN(d)?0:d,data:l}),this.#e="GROUND"}else this.#r+=n;break}}return s(),r}};var te=class{screen;cursor;#e;#t;constructor(t,r){this.screen=new J(t,r),this.cursor=new Z,this.#e=new ee,this.#t=Q()}write(t){let r=this.#e.feed(t);for(let s of r)switch(s.type){case"text":this.#r(s.text);break;case"csi":this.#o(s.command,s.params);break;case"esc":this.#n(s.command);break;case"control":this.#i(s.code);break;case"osc":break}}resize(t,r){this.screen.resize(t,r),this.cursor.clamp(t,r)}getScreen(){return this.screen}getCursor(){return this.cursor}#r(t){for(let r of t)this.cursor.col>=this.screen.cols&&(this.cursor.col=0,this.cursor.row++,this.cursor.row>=this.screen.rows&&(this.screen.scrollUp(),this.cursor.row=this.screen.rows-1)),this.screen.setCell(this.cursor.row,this.cursor.col,this.#t,r),this.cursor.col++}#i(t){switch(t){case 13:this.cursor.col=0;break;case 10:this.cursor.row++,this.cursor.row>=this.screen.rows&&(this.screen.scrollUp(),this.cursor.row=this.screen.rows-1);break;case 9:this.cursor.col=Math.min(this.screen.cols-1,(Math.floor(this.cursor.col/8)+1)*8);break;case 8:this.cursor.moveBack();break;case 7:break}}#o(t,r){let s=r[0]??0,i=r[1]??0,n=s||1;switch(t){case"A":this.cursor.moveUp(n);break;case"B":this.cursor.moveDown(n);break;case"C":this.cursor.moveForward(n);break;case"D":this.cursor.moveBack(n);break;case"H":case"f":this.cursor.moveTo((s||1)-1,(i||1)-1);break;case"G":this.cursor.moveToColumn((s||1)-1);break;case"d":this.cursor.moveTo((s||1)-1,this.cursor.col);break;case"J":this.screen.clearDisplay(s,this.cursor.row,this.cursor.col);break;case"K":s===0?this.screen.clearLineRange(this.cursor.row,this.cursor.col,this.screen.cols-1):s===1?this.screen.clearLineRange(this.cursor.row,0,this.cursor.col):this.screen.clearLine(this.cursor.row,2);break;case"m":this.#t=Ae(r.length>0?r:[0],this.#t);break;case"S":this.screen.scrollUp(n);break;case"T":this.screen.scrollDown(n);break;case"L":this.screen.insertLines(n,this.cursor.row);break;case"M":this.screen.deleteLines(n,this.cursor.row);break;case"s":this.cursor.save();break;case"u":this.cursor.restore();break;case"r":this.screen.setScrollRegion((s||1)-1,(i||this.screen.rows)-1);break;case"?h":s===25&&(this.cursor.visible=!0),s===1049&&this.screen.enterAlternateScreen();break;case"?l":s===25&&(this.cursor.visible=!1),s===1049&&this.screen.exitAlternateScreen();break}this.cursor.clamp(this.screen.rows,this.screen.cols)}#n(t){switch(t){case"7":this.cursor.save();break;case"8":this.cursor.restore();break;case"M":this.cursor.row===0?this.screen.scrollDown():this.cursor.moveUp();break;case"c":this.screen.clearDisplay(2,0,0),this.cursor.moveTo(0,0),this.#t=Q();break}}};var Bt=e=>{let t=[];return e.bold&&t.push(1),e.dim&&t.push(2),e.italic&&t.push(3),e.underline&&t.push(4),e.fgRGB!==null?t.push(38,2,e.fgRGB.r,e.fgRGB.g,e.fgRGB.b):e.fg>=0&&e.fg<8?t.push(30+e.fg):e.fg>=8&&e.fg<16?t.push(90+(e.fg-8)):e.fg>=16&&t.push(38,5,e.fg),t.length===0?"":`\x1B[${t.join(";")}m`},Mt=e=>e.fg===-1&&e.fgRGB===null&&!e.bold&&!e.dim&&!e.italic&&!e.underline,Oe=(e,t,r)=>{let s=[],i=e.getDirtyLines(),n=r.fullRedraw===!0||i.size>=r.height,o=Math.min(r.height,e.rows),a=Math.min(r.width,e.cols);for(let c=0;c<o;c++){if(!n&&!i.has(c))continue;s.push(`\x1B[${r.offsetRow+c};${r.offsetCol}H`);let d=e.getLine(c),l=!1,f=0;for(;f<a;f++){let b=f<d.length?d[f]:void 0;if(b===void 0||Mt(b))l&&(s.push("\x1B[0m"),l=!1),s.push(b?.char??" ");else{let G=Bt(b);s.push(G),l=!0,s.push(b.char)}}l&&s.push("\x1B[0m")}return e.clearDirty(),s.join("")};var Ee=class{#e;#t=!1;constructor(t,r){this.#e=new te(t,r)}write(t){this.#e.write(t),this.#t=!0}render(t,r=!1){let s={offsetRow:t.y+1,offsetCol:t.x+1,width:t.width-2,height:t.height-2,fullRedraw:r};return this.#t=!1,Oe(this.#e.getScreen(),this.#e.getCursor(),s)}resize(t,r){this.#e.resize(t,r),this.#t=!0}get dirty(){return this.#t}clearDirty(){this.#t=!1}get terminal(){return this.#e}};var qe={};N(qe,{drawBox:()=>He,fillBox:()=>Nt});var It={single:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},He=e=>{let t=e.borderStyle??"single",r=It[t],s=e.width-2,i=[],n=r.tl;if(e.title!==void 0){let o=` ${e.title} `;n+=o+r.h.repeat(Math.max(0,s-o.length))}else n+=r.h.repeat(s);if(n+=r.tr,i.push(T(e.y,e.x)+n),e.skipInterior===!0)for(let o=1;o<e.height-1;o++)i.push(T(e.y+o,e.x)+r.v+T(e.y+o,e.x+e.width-1)+r.v);else for(let o=1;o<e.height-1;o++)i.push(T(e.y+o,e.x)+r.v+ue()+" ".repeat(s)+r.v);return i.push(T(e.y+e.height-1,e.x)+r.bl+r.h.repeat(s)+r.br),i.join("")},Nt=(e,t)=>{let r=He(e),s=e.width-2,i=e.height-2,n=[];for(let o=0;o<i;o++){let a=o<t.length?t[o]:"",c=z(a??"",s),d=Math.max(0,s-j(c));n.push(T(e.y+1+o,e.x+1)+c+" ".repeat(d))}return r+n.join("")};export{We as a,ze as b,Ie as c,O as d,Ze as e,Qe as f,et as g,tt as h,rt as i,st as j,nt as k,it as l,ot as m,at as n,lt as o,pt as p,dt as q,Ve as r,ce as s,qe as t,Ke as u,Fe as v,Ee as w};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as b,b as w,d as F,f as D}from"./chunk-
|
|
2
|
+
import{a as b,b as w,d as F,f as D}from"./chunk-3D5TBTM3.js";import{a as C}from"./chunk-LFNUSULJ.js";import{b as h}from"./chunk-O325ZU5M.js";import{f as R}from"./chunk-P2MUEKFT.js";import{b as l,f as m,g as k,h as A,i as g}from"./chunk-YVN2NZL4.js";import{g as d}from"./chunk-FFWPJP7A.js";var x=(e,r)=>{let o={},t=e.length;for(let s=0;s<t;s++){let n=e[s],a=r(n);o[a]===void 0?o[a]=[n]:o[a].push(n)}return o};var u=h(),P=(e,r)=>e===r?!0:typeof e!=typeof r||typeof e!="object"||e===null||r===null?!1:JSON.stringify(e)===JSON.stringify(r),O=(e,r)=>e[r],j=e=>e.startsWith("npm:@jsr/"),B=e=>{let r=e.slice(9),o=r.indexOf("__");if(o===-1)throw new Error(`Invalid npm JSR format: ${e}`);let t=r.slice(0,o),s=r.slice(o+2),n=s.indexOf("@"),a,p;return n===-1?(a=s,p=""):(a=s.slice(0,n),p=s.slice(n)),`jsr:@${t}/${a}${p}`},_=(e,r)=>j(r)?B(r):r.startsWith("npm:")?r:`npm:${e}@${r}`,S=e=>e==="workspace:*"||e.startsWith("workspace:"),M=(e,r,o)=>{let t=[],s=r.dependencies??{},n=r.devDependencies??{},a={...s,...n},p=o.imports??{};for(let[y,c]of Object.entries(a)){if(S(c))continue;let f=_(y,c),i=p[y];i===void 0?t.push({packageName:e,dependencyName:y,issue:"missing_in_deno",expected:f}):i!==f&&t.push({packageName:e,dependencyName:y,issue:"version_mismatch",expected:f,actual:i})}for(let[y,c]of Object.entries(p))a[y]===void 0&&t.push({packageName:e,dependencyName:y,issue:"missing_in_package",actual:p[y]});return t},G=async(e,r)=>{let o=[],t=[],s=await w({baseDir:e,includeFiles:[b.DenoJson,b.PackageJson]}),n=s._loadedFiles.find(c=>c.fileType===b.DenoJson),a=s._loadedFiles.find(c=>c.fileType===b.PackageJson);if(n===void 0||a===void 0)return{inconsistencies:[],dependencyInconsistencies:[]};let p=["name","version","exports"];for(let c of p){let f=O(n.content,c),i=O(a.content,c);f===void 0||i===void 0||P(f,i)||o.push({packageName:r,field:c,denoValue:f,packageValue:i})}let y=M(r,a.content,n.content);return t.push(...y),{inconsistencies:o,dependencyInconsistencies:t}},K=async(e={})=>{let{root:r=".",failFast:o=!1}=e,[t,s]=await D(r),n=[],a=[],p=0;for(let c of s){let f=F(c.config);try{let i=await G(f,c.name);if(p++,i.inconsistencies.length>0&&n.push(...i.inconsistencies),i.dependencyInconsistencies.length>0&&a.push(...i.dependencyInconsistencies),o&&(i.inconsistencies.length>0||i.dependencyInconsistencies.length>0))return{isConsistent:!1,inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}}catch{continue}}return{isConsistent:!(n.length>0||a.length>0),inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}},v=e=>typeof e=="string"?`"${e}"`:JSON.stringify(e,null,2),H=e=>{switch(e.issue){case"missing_in_deno":return`Missing in deno.json imports. Expected: ${e.expected}`;case"missing_in_package":return`Extra in deno.json imports (not in package.json): ${e.actual}`;case"version_mismatch":return`Version mismatch. Expected: ${e.expected}, Actual: ${e.actual}`}},L=e=>R.fromPromise(()=>K(e)),$=e=>d.ok({root:"."}),N=e=>{if(d.isFail(e))return u.writeln(m("\u2717"),l(" "+String(e.error))),d.fail({exitCode:1});let{value:r}=e;if(u.writeln(g("\u2139"),l(` Checked ${r.packagesChecked} packages.`)),!r.isConsistent){if(r.inconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.inconsistencies.length} field inconsistencies:`));let o=x(r.inconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.field} mismatch:`)),u.writeln(g("\u2139"),l(` deno.json: ${v(n.denoValue)}`)),u.writeln(g("\u2139"),l(` package.json: ${v(n.packageValue)}`))}}if(r.dependencyInconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.dependencyInconsistencies.length} dependency inconsistencies:`));let o=x(r.dependencyInconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.dependencyName}:`)),u.writeln(g("\u2139"),l(` ${H(n)}`))}}return d.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All package configs are consistent.")),d.ok(void 0)},J=C.createTrigger({handler:L,adaptInput:$,adaptOutput:N}),qn=async e=>await J({command:"validate-package-configs",args:[],flags:{}});export{K as a,L as b,J as c,qn as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
var l=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=a=>{let n=[],i=new Set,r="",e=a,o=/\[(\.\.\.)?(\w+)\]/;for(;e.length>0;){let t=o.exec(e);if(t===null){r+=l(e);break}t.index>0&&(r+=l(e.slice(0,t.index)));let m=t[1]==="...",s=t[2];s!==void 0&&(n.push(s),m?(i.add(s),r+="(.*)"):r+="([^/]+)"),e=e.slice(t.index+t[0].length)}return{regex:new RegExp(`^${r}$`),paramNames:n,catchAllParams:i}},u=(a,n)=>{let i=a.match(n.regex);if(i===null)return null;let r={};for(let e=0;e<n.paramNames.length;e++){let o=n.paramNames[e],t=i[e+1];o!==void 0&&(n.catchAllParams.has(o)?r[o]=t!==void 0&&t!==""?t.split("/").filter(Boolean):[]:r[o]=t??"")}return r},g=(a,n)=>{let i=c(n);return u(a,i)};export{g as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as d}from"./chunk-
|
|
2
|
+
import{i as d}from"./chunk-6DBKPC2O.js";var l=[["go.mod","go"],["deno.json","deno"],["deno.jsonc","deno"],["package.json","node"]],g=async r=>{for(let[c,n]of l)try{return await d.fs.stat(`${r}/${c}`),{type:n,configFile:c}}catch{}return{type:"unknown",configFile:void 0}},f=(r,c)=>{let n=[],t=[],e=r.dependencies;if(e===void 0)return{instructions:n,warnings:t};let i=r.language,o=c.type;if(o!=="unknown"&&(i==="go"&&o==="go"||i==="typescript"&&(o==="deno"||o==="node")||i==="javascript"&&(o==="deno"||o==="node")||t.push(`Recipe '${r.name}' is for ${i}, but detected ${o} project (${c.configFile}).`)),e.go!==void 0&&e.go.length>0)for(let s of e.go)n.push(`go get ${s}`);if(e.jsr!==void 0&&e.jsr.length>0)for(let s of e.jsr)n.push(`deno add ${s}`);if(e.npm!==void 0&&e.npm.length>0)for(let s of e.npm)n.push(`npm install ${s}`);return{instructions:n,warnings:t}},y=async(r,c,n)=>{let t=[];for(let e of r){if(n?.dryRun===!0){t.push({command:e,success:!0});continue}n?.verbose===!0&&console.log(` [install] ${e}`);let i=e.split(/\s+/),o=i[0],s=i.slice(1);try{let a=await d.exec.spawn(o,s,{cwd:c,stdout:"inherit",stderr:"inherit"});if(!a.success){t.push({command:e,success:!1,error:`Exit code ${a.code}`});break}t.push({command:e,success:!0})}catch(a){let u=a instanceof Error?a.message:String(a);t.push({command:e,success:!1,error:u});break}}return t};export{g as a,f as b,y as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b}from"./chunk-EQUPVWVY.js";import"./chunk-2TANTKYS.js";import"./chunk-J7YTWK67.js";import"./chunk-GVTM4EOU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as ClaudeCodeModel,b as claudeCodeFactory};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as E,b as A}from"./chunk-
|
|
2
|
+
import{a as E,b as A}from"./chunk-ZNP3NXAD.js";import{e as x}from"./chunk-X3L6GBUX.js";import{a as P,d as $}from"./chunk-P2MUEKFT.js";import{h as j,p as S}from"./chunk-NMSD4ZXJ.js";import{f as k,h as b,k as C}from"./chunk-SHN5MT56.js";import{d,f as R,g as v,k as h}from"./chunk-YVN2NZL4.js";import{a as w}from"./chunk-MG65QJY6.js";import{a as c,b as l,c as y}from"./chunk-FFWPJP7A.js";import{i as f}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var I=r=>{let t=j(r);if(t.kind==="repo")return t},H=r=>P(async t=>{try{let{specifier:n}=r,e=r.recipePath??"recipe.json",s=await S(n.owner,n.repo,n.ref,e),o=r.cwd;r.projectName!==void 0&&(o=`${r.cwd}/${r.projectName}`,await f.fs.mkdir(o,{recursive:!0}));let a={...r.variables};r.projectName!==void 0&&a.project_name===void 0&&(a.project_name=r.projectName);let m=`https://raw.githubusercontent.com/${n.owner}/${n.repo}/${n.ref}`,i=await x(s,{cwd:o,registryUrl:m,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:a}),u=await E(o),g=A(s,u),O=r.dryRun?"Would write":"Cloned";t.out.writeln(v(`\u2713 ${O} ${i.written.length} file(s) from ${s.name}`));for(let p of i.written)t.out.writeln(` \u2192 ${p}`);if(i.postInstallRan.length>0){t.out.writeln(d(`
|
|
3
3
|
Post-install:`));for(let p of i.postInstallRan)t.out.writeln(d(` \u2713 ${p}`))}if(g.instructions.length>0){t.out.writeln(d(`
|
|
4
4
|
Dependencies:`));for(let p of g.instructions)t.out.writeln(d(` Run: ${p}`))}return c({recipe:s,result:i,depInfo:g,targetDir:o})}catch(n){let e=n instanceof Error?n.message:String(n);return l({_tag:"ApplyError",message:e})}});var J=async r=>{let t=w(r??[],{string:["recipe","name","var"],boolean:["force","dry-run","skip-existing","verbose"],collect:["var"],alias:{p:"name"}}),n=t._[0],e=k({renderer:C.ansi(),sink:b.stdout()});if(n===void 0)return e.writeln("Usage: eser kit clone <specifier> [options]"),e.writeln(),e.writeln("Specifier formats:"),e.writeln(" owner/repo GitHub repo (default branch)"),e.writeln(" owner/repo#ref GitHub repo at specific tag/branch"),e.writeln(),e.writeln("Options:"),e.writeln(" --recipe <path> Path to recipe.json (default: recipe.json)"),e.writeln(" --name, -p <dir> Target directory"),e.writeln(" --var key=value Template variable (repeatable)"),e.writeln(" --force Overwrite existing files"),e.writeln(" --dry-run Preview without writing"),await e.close(),c(void 0);let s=I(n);if(s===void 0)return e.writeln(R(`Invalid specifier: '${n}'. Use format: owner/repo or gh:owner/repo#ref`)),await e.close(),l({exitCode:1});let o={};for(let m of t.var){let[i,...u]=String(m).split("=");i!==void 0&&i!==""&&(o[i]=u.join("="))}e.writeln(h(`
|
|
5
5
|
Cloning from ${s.owner}/${s.repo}@${s.ref}...
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
+
import{a,b,c,d}from"./chunk-UEMWZOIU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{c as cmd,b as cmdPrefix,d as extractPrefix,a as setCommandPrefix};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-7ZYDAZBD.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import"./chunk-
|
|
2
|
+
import"./chunk-7ZYDAZBD.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import"./chunk-N4NDBIQS.js";import{a as h}from"./chunk-BNQAZLIQ.js";import{f,h as g,k as p}from"./chunk-SHN5MT56.js";import{c as n,d,f as u}from"./chunk-YVN2NZL4.js";import"./chunk-J7YTWK67.js";import{d as o}from"./chunk-GVTM4EOU.js";import"./chunk-6BILFSH2.js";import"./chunk-NMEPQK3T.js";import"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import{a as l,b as m}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
|
|
3
3
|
|
|
4
4
|
Format: type(scope): description
|
|
5
5
|
Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build
|
|
6
6
|
Max 72 characters. One line only. No body. No quotes. No backticks.
|
|
7
7
|
|
|
8
8
|
Example output:
|
|
9
|
-
feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-
|
|
9
|
+
feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-KPIOBBDD.js")).defaultFactories(),r=new w({factories:s}),a=e;if(a===void 0)try{await o`which claude`.noThrow().code()===0&&(a="claude-code")}catch{}a===void 0&&(a="anthropic"),await r.addModel("default",{provider:a,model:"default"});let c=r.getDefault();if(c===null)throw new Error("No AI model available for commit message generation");let k=await c.generateText({system:b,messages:[h("user",`Generate a commit message for this diff:
|
|
10
10
|
|
|
11
11
|
${i}`)],maxTokens:256});return await r.close(),x(k).trim()},O={name:"ai-commitmsg",description:"Generate commit message from git diff using AI",run:async i=>{try{let e=i.provider,t=await o`git diff --cached`.noThrow().text();return t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0?{name:"ai-commitmsg",passed:!0,issues:[],mutations:[],stats:{skipped:1}}:{name:"ai-commitmsg",passed:!0,issues:[{message:`Suggested: ${await y(t,e)}`}],mutations:[],stats:{generated:1}}}catch(e){return{name:"ai-commitmsg",passed:!1,issues:[{message:e instanceof Error?e.message:String(e)}],mutations:[],stats:{errors:1}}}}};export{y as generateCommitMessage,v as main,O as workflowTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as A}from"./chunk-2HSGE3TL.js";import{k,l as y,m as x,n as P}from"./chunk-
|
|
2
|
+
import{b as A}from"./chunk-2HSGE3TL.js";import{k,l as y,m as x,n as P}from"./chunk-TMMAF763.js";import{b as $,c as b}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as m,h as w,k as g}from"./chunk-SHN5MT56.js";import{c as d,d as c,f as u,g as C}from"./chunk-YVN2NZL4.js";import{a as l,b as p}from"./chunk-FFWPJP7A.js";import{i as v}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var q=async s=>{let e=s?.[0];if(e==="add")return await I(s?.slice(1));if(e==="remove")return await M(s?.slice(1));if(e==="list")return await R();let r=$(),n=m({renderer:g.ansi(),sink:w.stdout()});return n.writeln(`Usage: ${r} concern <add <id> | remove <id> | list>`),await n.close(),l(void 0)},I=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),r=v.process.cwd(),n=(s??[]).filter(i=>!i.startsWith("-")),t=await k(r);if(n.length===0)return e.writeln(u("Please provide concern ID(s): "),d(b("concern add open-source beautiful-product"))),await e.close(),p({exitCode:1});if(t===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});let a=await A(),o=[];for(let i of n){let f=await x(r,i);if(f===null&&(f=a.find(h=>h.id===i)??null,f!==null&&await P(r,f)),f===null){e.writeln(u(`Unknown concern: ${i}`)),e.writeln(c(` Available: ${a.map(h=>h.id).join(", ")}`));continue}if(t.concerns.includes(i)||o.includes(i)){e.writeln(c(`Concern "${i}" is already active.`));continue}o.push(i)}if(o.length>0){let i={...t,concerns:[...t.concerns,...o]};await y(r,i),e.writeln(C("\u2714"),` Activated concerns: ${o.join(", ")}`)}return await e.close(),l(void 0)},M=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),r=v.process.cwd(),n=s?.[0],t=await k(r);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),d(b("concern remove move-fast"))),await e.close(),p({exitCode:1});if(t===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});if(!t.concerns.includes(n))return e.writeln(c(`Concern "${n}" is not active.`)),await e.close(),l(void 0);let a={...t,concerns:t.concerns.filter(o=>o!==n)};return await y(r,a),e.writeln(C("\u2714")," Deactivated concern: ",d(n)),await e.close(),l(void 0)},R=async()=>{let s=m({renderer:g.ansi(),sink:w.stdout()}),e=v.process.cwd(),r=await k(e),n=await A(),t=r?.concerns??[];if(s.writeln(d("Concerns")),s.writeln(""),n.length===0)s.writeln(c(" No concerns defined."));else for(let a of n){let o=t.includes(a.id);s.writeln(" ",o?C("\u25CF"):c("\u25CB")," ",o?d(a.id):c(a.id),c(` ${a.description.slice(0,60)}...`))}return await s.close(),l(void 0)};export{q as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P,b as v,c as
|
|
2
|
+
import{a as P,b as v,c as S,d as b}from"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import{d as h,e as p,f as g,g as f,i as F,j as y,k,n as x}from"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{b as d,d as D,r as w}from"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";import O from"node:process";var R={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!0},E=()=>{let n=t=>({isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime,atime:t.atime,birthtime:t.birthtime});return{async readFile(t,e){try{return await Deno.readFile(t,{signal:e?.signal})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async readTextFile(t,e){try{return await Deno.readTextFile(t,{signal:e?.signal})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async writeFile(t,e,r){await Deno.writeFile(t,e,{signal:r?.signal,mode:r?.mode,create:r?.create??!0,append:r?.append??!1})},async writeTextFile(t,e,r){await Deno.writeTextFile(t,e,{signal:r?.signal,mode:r?.mode,create:r?.create??!0,append:r?.append??!1})},async exists(t){try{return await Deno.stat(t),!0}catch(e){if(e instanceof Deno.errors.NotFound)return!1;throw e}},async stat(t){try{let e=await Deno.stat(t);return n(e)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async lstat(t){try{let e=await Deno.lstat(t);return n(e)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async mkdir(t,e){await Deno.mkdir(t,{recursive:e?.recursive??!1,mode:e?.mode})},async ensureDir(t){try{await Deno.mkdir(t,{recursive:!0})}catch(e){if(!(e instanceof Deno.errors.AlreadyExists))throw e}},async remove(t,e){try{await Deno.remove(t,{recursive:e?.recursive??!1})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async*readDir(t){try{for await(let e of Deno.readDir(t))yield{name:e.name,isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink}}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async copyFile(t,e){await Deno.copyFile(t,e)},async rename(t,e){await Deno.rename(t,e)},async makeTempDir(t){return await Deno.makeTempDir({dir:t?.dir,prefix:t?.prefix,suffix:t?.suffix})},async realPath(t){try{return await Deno.realPath(t)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},watch(t,e){let r=e?.recursive??!0,a=Deno.watchFs(t,{recursive:r}),s=c=>({kind:c.kind,paths:c.paths,flag:c.flag});return{close:()=>a.close(),[Symbol.asyncIterator]:async function*(){for await(let c of a)yield s(c)}}},async*walk(t,e){let r=e?.includeDirs??!0,a=e?.includeFiles??!0,s=e?.exts,c=e?.skip,o=async function*(l){for await(let i of Deno.readDir(l)){let m=y(l,i.name);if(!c?.some(u=>u.test(m))){if(i.isDirectory)r&&(yield{path:m,name:i.name,isFile:!1,isDirectory:!0,isSymlink:i.isSymlink}),yield*o(m);else if(i.isFile||i.isSymlink){if(!a||s&&!s.some(u=>i.name.endsWith(u.startsWith(".")?u:`.${u}`)))continue;yield{path:m,name:i.name,isFile:i.isFile,isDirectory:!1,isSymlink:i.isSymlink}}}}};yield*o(t)},async chmod(t,e){let{chmod:r}=await import("./unstable_chmod-2W47KJY3.js");await r(t,e)}}},T=()=>({join:y,resolve:x,dirname:f,basename:h,extname:P,normalize:k,isAbsolute:F,relative:b,parse:S,format:v,sep:g,delimiter:p}),A=()=>({async spawn(n,t=[],e){let r=w(e),s=await new Deno.Command(n,{args:t,cwd:e?.cwd,env:e?.env,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,signal:e?.signal}).output();return{success:s.success,code:s.code,stdout:r.stdout==="piped"?s.stdout:new Uint8Array,stderr:r.stderr==="piped"?s.stderr:new Uint8Array}},async exec(n,t=[],e){let r=await this.spawn(n,t,e);if(!r.success){let a=new TextDecoder().decode(r.stderr);throw new D(n,r.code,a)}return new TextDecoder().decode(r.stdout).trim()},async execJson(n,t=[],e){let r=await this.exec(n,t,e);return JSON.parse(r)},spawnChild(n,t=[],e){let r=w(e),s=new Deno.Command(n,{args:t,cwd:e?.cwd,env:e?.env,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,signal:e?.signal}).spawn(),c=(o,l)=>l!=="piped"||!o?Promise.resolve(new Uint8Array):new Response(o).arrayBuffer().then(i=>new Uint8Array(i));return{pid:s.pid,stdin:r.stdin==="piped"?s.stdin:null,stdout:r.stdout==="piped"?s.stdout:null,stderr:r.stderr==="piped"?s.stderr:null,status:s.status.then(o=>({success:o.success,code:o.code,signal:o.signal??void 0})),output:async()=>{let o=r.stdout==="piped"?s.stdout:null,l=r.stderr==="piped"?s.stderr:null,[i,m,u]=await Promise.all([s.status,c(o,r.stdout),c(l,r.stderr)]);return{success:i.success,code:i.code,stdout:m,stderr:u}},kill:o=>{s.kill(o)}}}}),I=()=>({get(n){return Deno.env.get(n)},set(n,t){Deno.env.set(n,t)},delete(n){Deno.env.delete(n)},has(n){return Deno.env.get(n)!==void 0},toObject(){return Deno.env.toObject()}}),W=()=>({exit(n){Deno.exit(n)},setExitCode(n){Deno.exitCode=n},cwd(){return Deno.cwd()},chdir(n){Deno.chdir(n)},hostname(){return Deno.hostname()},execPath(){return Deno.execPath()},argv:O.argv,argv0:O.argv0,args:Deno.args,pid:Deno.pid,stdin:Deno.stdin.readable,stdout:Deno.stdout.writable,stderr:Deno.stderr.writable,isTerminal(n){try{switch(n){case"stdin":return Deno.stdin.isTerminal();case"stdout":return Deno.stdout.isTerminal();case"stderr":return Deno.stderr.isTerminal()}}catch{return!1}},setStdinRaw(n){Deno.stdin.setRaw(n)},writeToStdout(n){Deno.stdout.writeSync(n)},consoleSize(){try{return Deno.consoleSize()}catch{return{columns:80,rows:24}}}}),z=()=>{let n=E(),t=T(),e=A(),r=I(),a=W();return{name:"deno",version:Deno.version.deno,capabilities:R,fs:n,path:t,exec:e,env:r,process:a}};export{R as DENO_CAPABILITIES,z as createDenoRuntime};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as a,h as l,k as i}from"./chunk-
|
|
2
|
+
import{f as a,h as l,k as i}from"./chunk-SHN5MT56.js";import{k as n}from"./chunk-YVN2NZL4.js";import"./chunk-PWLF3WXM.js";import{a as t}from"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import{a as o}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var h=["trace","debug","info","warn","error","fatal"],k=async m=>{let{flags:e}=t(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"no-hmr",type:"boolean",description:"Disable HMR"},{name:"log-level",type:"string",default:"info",description:"Log level"},{name:"open",short:"o",type:"boolean",description:"Open browser"}]),r=a({renderer:i.ansi(),sink:l.stdout()});r.writeln(n(`
|
|
3
3
|
\u26A1 Starting development server...
|
|
4
|
-
`));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-
|
|
4
|
+
`));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-JAGIKKVD.js"),import("./mod-OG7BBJP4.js"),import("./mod-NSL6IJRQ.js"),import("./mod-VZT7JWPZ.js")]);return await r.close(),await u({mode:"dev",port:p,logLevel:d,hmr:c,open:g,renderer:L,htmlShell:f,frameworkPlugin:v,cssPlugin:b({globalCssPath:"src/app/styles/global.css"})}),o(void 0)};export{k as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as x,d as D}from"./chunk-
|
|
2
|
+
import{a as x,d as D}from"./chunk-7NKYCWAA.js";import{n as k}from"./chunk-DPZJWN2Y.js";import{c as S,e as g,g as C,h as y,i as E}from"./chunk-TMMAF763.js";import{c as $}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as w,h as f,k as h}from"./chunk-SHN5MT56.js";import{c as m,d as o,f as a,g as u}from"./chunk-YVN2NZL4.js";import{a as d,b as n}from"./chunk-FFWPJP7A.js";import{i as l}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var G=async U=>{let e=w({renderer:h.ansi(),sink:f.stdout()}),i=l.process.cwd(),p=C(U);if(!p.ok)return e.writeln(a(p.error)),await e.close(),n({exitCode:1});let t;try{t=await g(i,p.spec)}catch(s){let c=s instanceof Error?s.message:String(s);return e.writeln(a(c)),await e.close(),n({exitCode:1})}if(t.phase!=="EXECUTING")return e.writeln(a(`Cannot complete in phase: ${t.phase}`)),e.writeln(o("Only EXECUTING phase can transition to COMPLETED.")),await e.close(),n({exitCode:1});if(t.spec!==null){let s=`${i}/${S.specDir(t.spec)}`;try{await l.fs.stat(s)}catch{return e.writeln(a(`Active spec '${t.spec}' directory not found.`)),e.writeln(o("Run `noskills reset` to return to IDLE.")),await e.close(),n({exitCode:1})}}let r=k(t,"done");if(await y(i,r),r.spec!==null&&await E(i,r.spec,r),r.spec!==null&&(await x(i,r.spec,"completed"),await D(i,r.spec,"completed")),e.writeln(u("\u2714")," Spec completed!"),e.writeln(""),e.writeln(" Spec: ",m(t.spec??"unknown")),e.writeln(` Iterations: ${t.execution.iteration}`),e.writeln(` Decisions: ${t.decisions.length}`),t.decisions.length>0){let s=t.decisions.filter(c=>c.promoted);s.length>0&&e.writeln(o(` Promoted to rules: ${s.length}`))}return e.writeln(""),e.writeln("Start a new spec with: ",m(`${$('spec new "..."')}`)),await e.close(),d(void 0)};export{G as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-KHBIOZJE.js";import"./chunk-NBA6EFWU.js";import"./chunk-GVTM4EOU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as DEFAULT_EXCLUDES,g as applyMutations,e as isBinaryBytes,d as loadBytes,c as loadContent,f as matchesAnyPattern,b as walkSourceFiles,h as writeMutations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as x,d as g}from"./chunk-
|
|
2
|
+
import{c as x,d as g}from"./chunk-DPZJWN2Y.js";import{d as E,h as p}from"./chunk-TMMAF763.js";import{c}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f,h as u,k as h}from"./chunk-SHN5MT56.js";import{c as o,d as m,f as n,g as l}from"./chunk-YVN2NZL4.js";import{a as i,b as r}from"./chunk-FFWPJP7A.js";import{i as w}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var b=async d=>{let e=f({renderer:h.ansi(),sink:u.stdout()}),a=w.process.cwd(),S=d!==void 0&&d.some(s=>s==="--exit"),t;try{t=await E(a)}catch(s){let y=s instanceof Error?s.message:String(s);return e.writeln(n(y)),await e.close(),r({exitCode:1})}if(S){if(t.phase!=="FREE")return e.writeln(n(`Cannot exit free mode in phase: ${t.phase}`)),e.writeln(m("Only FREE phase can transition back to IDLE.")),await e.close(),r({exitCode:1});let s=g(t);return await p(a,s),e.writeln(l("\u2714")," Exited free mode. Back to IDLE."),e.writeln(""),e.writeln("Start a spec with: ",o(`${c('spec new "..."')}`)),await e.close(),i(void 0)}if(t.phase!=="IDLE")return e.writeln(n(`Cannot enter free mode in phase: ${t.phase}`)),e.writeln(m("Only IDLE phase can transition to FREE.")),await e.close(),r({exitCode:1});let k=x(t);return await p(a,k),e.writeln(l("\u2714")," Free mode active \u2014 no enforcement."),e.writeln(""),e.writeln("Exit free mode with: ",o(`${c("free --exit")}`)),await e.close(),i(void 0)};export{b as main};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-O325ZU5M.js";import{o as t}from"./chunk-YACXTCWF.js";import"./chunk-VV47GXU5.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{g as o}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var{ctx:l,output:h}=a(),n=()=>{t.info(l,`eser codebase gh \u2014 GitHub operations
|
|
3
3
|
`),console.log("Subcommands:"),console.log(" contributors Update contributor list in README.md"),console.log(" release-notes Sync CHANGELOG to GitHub Releases"),console.log(" release-tag Create and push release git tags"),console.log(`
|
|
4
|
-
Run 'eser codebase gh <subcommand> --help' for details.`)},b=async m=>{let r=m??[],e=r[0],s=r.slice(1);if(e===void 0||e==="--help"||e==="-h")return n(),o.ok(void 0);switch(e){case"contributors":return await(await import("./gh-contributors-
|
|
4
|
+
Run 'eser codebase gh <subcommand> --help' for details.`)},b=async m=>{let r=m??[],e=r[0],s=r.slice(1);if(e===void 0||e==="--help"||e==="-h")return n(),o.ok(void 0);switch(e){case"contributors":return await(await import("./gh-contributors-SXUFX3SO.js")).main(s);case"release-notes":return await(await import("./release-notes-UUCPVHBQ.js")).main(s);case"release-tag":return await(await import("./release-tag-F4B6ICW4.js")).main(s);default:return t.error(l,`Unknown gh subcommand: ${e}`),n(),o.fail({exitCode:1})}};export{b as main};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-SOSF762G.js";import{a as R}from"./chunk-LFNUSULJ.js";import{a as w,c as x}from"./chunk-
|
|
2
|
+
import"./chunk-SOSF762G.js";import{a as R}from"./chunk-LFNUSULJ.js";import{a as w,c as x}from"./chunk-O325ZU5M.js";import{o as c}from"./chunk-YACXTCWF.js";import"./chunk-VV47GXU5.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as C}from"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{g as l}from"./chunk-GVTM4EOU.js";import"./chunk-PWLF3WXM.js";import"./chunk-NMEPQK3T.js";import"./chunk-RNFCAHVL.js";import{a as b}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import{n as f}from"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{j as p}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var{ctx:d,output:K}=w(),m="<!-- CONTRIBUTORS:START -->",u="<!-- CONTRIBUTORS:END -->",E=async()=>{let t=await l.exec`gh repo view --json owner,name`.text(),e=JSON.parse(t);return{owner:e.owner.login,name:e.name}},P=async(t,e)=>{let o=await l.exec`gh api repos/${t}/${e}/contributors --paginate`.text();return JSON.parse(o).filter(n=>!n.login.includes("[bot]"))},v=(t,e=8)=>{if(t.length===0)return`${m}
|
|
3
3
|
${u}`;let o=[];for(let r=0;r<t.length;r+=e){let i=t.slice(r,r+e).map(s=>` <td align="center"><a href="${s.html_url}"><img src="${s.avatar_url}?s=80" width="80" /><br /><sub>${s.login}</sub></a></td>`);o.push(` <tr>
|
|
4
4
|
${i.join(`
|
|
5
5
|
`)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as P,h as R,k as F}from"./chunk-
|
|
2
|
+
import{f as P,h as R,k as F}from"./chunk-SHN5MT56.js";import{b as t,c as E,d as s,f as o,g as x,k as v}from"./chunk-YVN2NZL4.js";import"./chunk-PWLF3WXM.js";import{a as T}from"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import{a as A,b as i,f as $}from"./chunk-FFWPJP7A.js";import{i as b}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var S=["minimal","blog","dashboard","docs"],V=async O=>{let{positional:N,flags:m}=T(O??[],[{name:"template",short:"t",type:"string",default:"minimal",description:"Project template"},{name:"force",short:"f",type:"boolean",description:"Overwrite"},{name:"no-git",type:"boolean",description:"Skip git"},{name:"no-install",type:"boolean",description:"Skip install"}]),r=N[0]??"my-laroux-app",l=m.template,j=m.force,L=m["no-git"],n=F.ansi(),e=P({renderer:n,sink:R.stdout()});if(!S.includes(l))return await e.close(),i({message:`${n.render([o(`
|
|
3
3
|
Error: Invalid template "${l}"`)])}
|
|
4
4
|
Available templates: ${S.join(", ")}`,exitCode:1});e.writeln(v(`
|
|
5
5
|
\u2728 Creating new laroux.js project in ./${r}
|
|
6
6
|
`)),e.writeln(s(` Template: ${l}`));let c="eser",p=`laroux-template-${l}`,k="main",d=`${b.process.cwd()}/${r}`;try{await b.fs.mkdir(d,{recursive:!0})}catch{return await e.close(),i({message:n.render([o(`
|
|
7
7
|
Could not create directory: ${d}`)]),exitCode:1})}e.writeln(s(` Fetching from gh:${c}/${p}...
|
|
8
|
-
`));try{let a=await import("./registry-fetcher-
|
|
9
|
-
\u{1F389} Project created successfully!`)),e.writeln(s(` ${w.written.length} files written`))}else{let g=await import("./mod-
|
|
8
|
+
`));try{let a=await import("./registry-fetcher-TGWYJ5GN.js"),u=await import("./recipe-applier-I2VBGHZU.js"),f=await $(()=>a.fetchRecipeFromRepo(c,p,k,"recipe.json"),()=>{});if(f._tag==="Ok"&&f.value!==void 0){let g=`https://raw.githubusercontent.com/${c}/${p}/${k}`,w=await u.applyRecipe(f.value,{cwd:d,registryUrl:g,force:j,variables:{project_name:r}});e.writeln(x(`
|
|
9
|
+
\u{1F389} Project created successfully!`)),e.writeln(s(` ${w.written.length} files written`))}else{let g=await import("./mod-5NDTGNVM.js"),w=`gh:${c}/${p}`,y=await $(()=>g.scaffold({specifier:w,targetDir:r,force:j,skipPostInstall:L,interactive:!0}),h=>({message:h.message}));if(y._tag==="Fail")return await e.close(),i({message:n.render([o(`
|
|
10
10
|
Scaffolding failed: ${y.error.message}`)]),exitCode:1});let C=y.value;if(e.writeln(x(`
|
|
11
11
|
\u{1F389} Project created successfully!`)),Object.keys(C.variables).length>0){e.writeln(t(`
|
|
12
12
|
Variables applied:`));for(let[h,_]of Object.entries(C.variables))e.writeln(t(" "),s(h),t(`: ${_}`))}}}catch(a){let u=a instanceof Error?a.message:String(a);return await e.close(),i({message:n.render([o(`
|