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.
Files changed (223) hide show
  1. package/chunks/{add-IM5JC6QA.js → add-HBUORTI5.js} +1 -1
  2. package/chunks/ajan-CL22MZYV.js +2 -0
  3. package/chunks/{approve-4CQFJU5A.js → approve-UWBYGXCF.js} +1 -1
  4. package/chunks/{ask-UTEI7KGQ.js → ask-M3VS3GIJ.js} +1 -1
  5. package/chunks/{block-MQTVULY3.js → block-W76WKMS3.js} +1 -1
  6. package/chunks/{browser-JGBNWUEQ.js → browser-D536WJU3.js} +1 -1
  7. package/chunks/{build-IRLEBMJE.js → build-DPBRNANI.js} +2 -2
  8. package/chunks/{bun-HIMXX54I.js → bun-7XJSUU6Z.js} +1 -1
  9. package/chunks/{cancel-56EDMMFO.js → cancel-46C7E5N7.js} +1 -1
  10. package/chunks/{changelog-gen-USXHO6PE.js → changelog-gen-627BV77Z.js} +1 -1
  11. package/chunks/{chunk-3F23SLJA.js → chunk-2LF7QSIN.js} +28 -27
  12. package/chunks/{chunk-YURNTYEP.js → chunk-2TANTKYS.js} +1 -1
  13. package/chunks/{chunk-TELZ2ZFI.js → chunk-2YTW3JQ6.js} +1 -1
  14. package/chunks/{chunk-V3NJTF2Y.js → chunk-2ZYCRMUT.js} +1 -1
  15. package/chunks/chunk-3D5TBTM3.js +3 -0
  16. package/chunks/{chunk-LSET5TD3.js → chunk-3OG2MEF2.js} +1 -1
  17. package/chunks/{chunk-BSV66I74.js → chunk-4LQG2WOJ.js} +1 -1
  18. package/chunks/{chunk-OWQXQ33F.js → chunk-4X4NHXFE.js} +1 -1
  19. package/chunks/{chunk-H6HLRKRK.js → chunk-5JV6KQMP.js} +4 -4
  20. package/chunks/{chunk-ZRUM5PE7.js → chunk-6BILFSH2.js} +1 -1
  21. package/chunks/{chunk-6VHZQNHX.js → chunk-6DBKPC2O.js} +1 -1
  22. package/chunks/{chunk-BQT5RJZB.js → chunk-6G6UVWJN.js} +1 -1
  23. package/chunks/{chunk-4EJVA4QA.js → chunk-73IMECRI.js} +1 -1
  24. package/chunks/{chunk-SK6QUPJR.js → chunk-7KFSTOXR.js} +1 -1
  25. package/chunks/{chunk-FODF5MI2.js → chunk-7NKYCWAA.js} +1 -1
  26. package/chunks/{chunk-6E6JUBFH.js → chunk-ALFFE37K.js} +1 -1
  27. package/chunks/{chunk-UQRZJPYH.js → chunk-ATYDQCCJ.js} +1 -1
  28. package/chunks/{chunk-IBBGWXAI.js → chunk-C2IORZTF.js} +1 -1
  29. package/chunks/{chunk-H5GHXMIT.js → chunk-C7NZBKCW.js} +1 -1
  30. package/chunks/{chunk-IBB6UZR2.js → chunk-CVDLYIOW.js} +1 -1
  31. package/chunks/{chunk-IWXI3UYI.js → chunk-DLBRD3UT.js} +1 -1
  32. package/chunks/{chunk-QBQAOXEV.js → chunk-DM6U63HP.js} +1 -1
  33. package/chunks/chunk-DPZJWN2Y.js +2 -0
  34. package/chunks/{chunk-VE6XM5OZ.js → chunk-EQUPVWVY.js} +1 -1
  35. package/chunks/{chunk-2N62LL55.js → chunk-FNPBHLLZ.js} +1 -1
  36. package/chunks/{chunk-QMRKAC6C.js → chunk-FZ5WFU6R.js} +1 -1
  37. package/chunks/chunk-GVTM4EOU.js +4 -0
  38. package/chunks/{chunk-KZAPWWOT.js → chunk-H6P3EACV.js} +1 -1
  39. package/chunks/{chunk-IQQEVKBP.js → chunk-IIFFSCDJ.js} +1 -1
  40. package/chunks/{chunk-TYLYMZQC.js → chunk-IZUADMIU.js} +1 -1
  41. package/chunks/{chunk-2OKCK56H.js → chunk-J5HFD7AQ.js} +1 -1
  42. package/chunks/{chunk-3LDGQFQZ.js → chunk-JFKHBLJB.js} +1 -1
  43. package/chunks/{chunk-SMKZDN2Q.js → chunk-JO4JKJ7R.js} +1 -1
  44. package/chunks/{chunk-CXTPYPO4.js → chunk-KHBIOZJE.js} +1 -1
  45. package/chunks/{chunk-EXP2TZZC.js → chunk-L5OC7F24.js} +1 -1
  46. package/chunks/{chunk-7RL5ZFGE.js → chunk-LJ7A5HYR.js} +1 -1
  47. package/chunks/{chunk-SF6FT44C.js → chunk-LLA75EMV.js} +1 -1
  48. package/chunks/chunk-LWQPFCWC.js +5 -0
  49. package/chunks/{chunk-Z2LXZLZV.js → chunk-LYPDFFKK.js} +1 -1
  50. package/chunks/{chunk-2UHHAPKY.js → chunk-MTCPFQ5I.js} +1 -1
  51. package/chunks/{chunk-LYKN5EIM.js → chunk-MW3RJU6I.js} +1 -1
  52. package/chunks/{chunk-XOSAN6PX.js → chunk-N4NDBIQS.js} +1 -1
  53. package/chunks/{chunk-SH4H7OLV.js → chunk-NMEPQK3T.js} +1 -1
  54. package/chunks/{chunk-GKOMIH2B.js → chunk-NMSD4ZXJ.js} +1 -1
  55. package/chunks/{chunk-QD46ROBD.js → chunk-NTY267SI.js} +1 -1
  56. package/chunks/{chunk-VVWAUS3D.js → chunk-NVPQJFAI.js} +1 -1
  57. package/chunks/{chunk-L7RS6MQ5.js → chunk-O325ZU5M.js} +1 -1
  58. package/chunks/{chunk-3U5M6YO6.js → chunk-OLHBVIWG.js} +1 -1
  59. package/chunks/chunk-R2W7BL7V.js +2 -0
  60. package/chunks/{chunk-E423U2PP.js → chunk-R3UCRXDC.js} +1 -1
  61. package/chunks/{chunk-RIOYVPPP.js → chunk-R4GKIRAI.js} +1 -1
  62. package/chunks/{chunk-WPOZMPUR.js → chunk-RHVDIXOM.js} +1 -1
  63. package/chunks/{chunk-ZEFYMWGZ.js → chunk-RNFCAHVL.js} +2 -2
  64. package/chunks/{chunk-MBG7SPPO.js → chunk-SHN5MT56.js} +1 -1
  65. package/chunks/{chunk-RFHWH6ZX.js → chunk-TFRONHJA.js} +1 -1
  66. package/chunks/chunk-TMMAF763.js +10 -0
  67. package/chunks/{chunk-VWQLQJVX.js → chunk-TW23CULJ.js} +1 -1
  68. package/chunks/{chunk-TNWF37YQ.js → chunk-TZDEJTLC.js} +30 -30
  69. package/chunks/{chunk-MPGRKZIA.js → chunk-UEMWZOIU.js} +1 -1
  70. package/chunks/{chunk-QYMHLTVT.js → chunk-UGYRUVUH.js} +1 -1
  71. package/chunks/{chunk-YJ3ICGHV.js → chunk-ULIMXXRY.js} +1 -1
  72. package/chunks/{chunk-WF6JNPZS.js → chunk-VV47GXU5.js} +1 -1
  73. package/chunks/{chunk-4COCZPO5.js → chunk-WI2RW3YL.js} +1 -1
  74. package/chunks/{chunk-H7U2VQCK.js → chunk-WTMV5GTZ.js} +1 -1
  75. package/chunks/chunk-WZHVKEPB.js +17 -0
  76. package/chunks/{chunk-BNMKKNLB.js → chunk-X3L6GBUX.js} +1 -1
  77. package/chunks/chunk-XOMPQOI6.js +4 -0
  78. package/chunks/{chunk-2BEIAJ5J.js → chunk-XUV7CW3L.js} +1 -1
  79. package/chunks/chunk-YACXTCWF.js +2 -0
  80. package/chunks/{chunk-WWI6727S.js → chunk-YKEVDAWS.js} +1 -1
  81. package/chunks/chunk-YTF3BAQS.js +2 -0
  82. package/chunks/{chunk-6V6C6MWY.js → chunk-ZNP3NXAD.js} +1 -1
  83. package/chunks/claude-code-UJYCO6CN.js +2 -0
  84. package/chunks/{clone-DSVKII72.js → clone-455UAECS.js} +1 -1
  85. package/chunks/{cmd-YU4MVRRR.js → cmd-QE4P4DS4.js} +1 -1
  86. package/chunks/{commitmsg-FS52L6J5.js → commitmsg-57EMHAFY.js} +2 -2
  87. package/chunks/{concern-4HFEHA2X.js → concern-I6LCWEIC.js} +1 -1
  88. package/chunks/{deno-I5YAWOB6.js → deno-JAQWMICD.js} +1 -1
  89. package/chunks/{dev-JQS5G6PA.js → dev-JM7NU24M.js} +2 -2
  90. package/chunks/{done-OSUBA7YO.js → done-A5VWIFOF.js} +1 -1
  91. package/chunks/{file-tools-shared-LMF72D6S.js → file-tools-shared-YKDNDDHR.js} +1 -1
  92. package/chunks/{free-WTJTBNOK.js → free-5NMWMMYS.js} +1 -1
  93. package/chunks/{gh-PJ2JDGXG.js → gh-DJ2YTDQX.js} +2 -2
  94. package/chunks/{gh-contributors-EIM2PLGS.js → gh-contributors-SXUFX3SO.js} +1 -1
  95. package/chunks/{init-ZOMBOUG3.js → init-GBMYF3YG.js} +3 -3
  96. package/chunks/{init-2AZSHAPG.js → init-M3P2QCX2.js} +1 -1
  97. package/chunks/{install-J4D2DGTQ.js → install-USGLFPAU.js} +1 -1
  98. package/chunks/invoke-hook-6BKTP2JY.js +12 -0
  99. package/chunks/kiro-V6SMU4OL.js +2 -0
  100. package/chunks/{list-XFPTCIMR.js → list-M5DGQG46.js} +1 -1
  101. package/chunks/{list-PSLAM3H6.js → list-NX7RRO6R.js} +1 -1
  102. package/chunks/{list-NS7ECFDY.js → list-ZVCGDRUH.js} +1 -1
  103. package/chunks/{load-config-OGSPRY4L.js → load-config-JZNJVJXH.js} +1 -1
  104. package/chunks/loader-command-I5DTYP25.js +2 -0
  105. package/chunks/loader-reactor-P6I3MX5L.js +2 -0
  106. package/chunks/{main-BUEG2IMJ.js → main-JAGIKKVD.js} +2 -2
  107. package/chunks/manager-GN6J4AUV.js +7 -0
  108. package/chunks/manifest-3GT2RMQL.js +2 -0
  109. package/chunks/{mod-VRTH35WZ.js → mod-2WMXZZGJ.js} +2 -2
  110. package/chunks/{mod-G7PJEGW6.js → mod-4XKQZL6W.js} +1 -1
  111. package/chunks/{mod-Q6SI6S6S.js → mod-5NDTGNVM.js} +2 -2
  112. package/chunks/mod-7ICCX4OY.js +2 -0
  113. package/chunks/mod-IALKEUJL.js +9 -0
  114. package/chunks/{mod-WOZXOD2F.js → mod-KPIOBBDD.js} +1 -1
  115. package/chunks/{mod-XEK7FROU.js → mod-NSL6IJRQ.js} +1 -1
  116. package/chunks/{mod-2PIV6QCE.js → mod-OG7BBJP4.js} +1 -1
  117. package/chunks/mod-QCXWBSGJ.js +2 -0
  118. package/chunks/mod-TB73AJG3.js +23 -0
  119. package/chunks/{mod-II7CSZUT.js → mod-TRSW5SEU.js} +1 -1
  120. package/chunks/{mod-RO7WP3SA.js → mod-VZT7JWPZ.js} +1 -1
  121. package/chunks/{mod-U2MNO6EC.js → mod-W225AUFE.js} +1 -1
  122. package/chunks/{new-3ZN4U7FJ.js → new-SS67ZKMK.js} +3 -3
  123. package/chunks/next-TIUOHHFS.js +9 -0
  124. package/chunks/{node-ZGM6SXXI.js → node-WWA6BHRC.js} +1 -1
  125. package/chunks/ollama-DFG5G467.js +2 -0
  126. package/chunks/opencode-UA45VV3W.js +2 -0
  127. package/chunks/pack-7TGKWDRO.js +6 -0
  128. package/chunks/purge-IKPQWHBC.js +5 -0
  129. package/chunks/{recipe-applier-6SGY2W3A.js → recipe-applier-I2VBGHZU.js} +1 -1
  130. package/chunks/{registry-fetcher-H63ZWZHU.js → registry-fetcher-TGWYJ5GN.js} +1 -1
  131. package/chunks/release-SEKFNXRA.js +9 -0
  132. package/chunks/{release-notes-FSDHH2Y2.js → release-notes-UUCPVHBQ.js} +1 -1
  133. package/chunks/{release-tag-IOH5HGAA.js → release-tag-F4B6ICW4.js} +1 -1
  134. package/chunks/{reopen-7EX6OJ6E.js → reopen-G4IUIH73.js} +1 -1
  135. package/chunks/{reset-IZ76OH4F.js → reset-BJZ263XC.js} +1 -1
  136. package/chunks/rule-PQ6WRV5W.js +7 -0
  137. package/chunks/{run-FGMEIO57.js → run-DAKF5SJN.js} +1 -1
  138. package/chunks/run-Y4ESAQUK.js +4 -0
  139. package/chunks/{scripts-L2FZBUHU.js → scripts-VRQQ24O3.js} +1 -1
  140. package/chunks/{serve-VXA7O546.js → serve-OGJIE344.js} +2 -2
  141. package/chunks/{server-KJW4HWK7.js → server-VCPSLFZ2.js} +1 -1
  142. package/chunks/session-CFDY73RJ.js +2 -0
  143. package/chunks/spec-CYRR2XUA.js +2 -0
  144. package/chunks/{status-EHBO4FYW.js → status-ZE2SA6FP.js} +1 -1
  145. package/chunks/{sync-M6DR7ZI4.js → sync-N5STAT6M.js} +1 -1
  146. package/chunks/system-3236RFTI.js +2 -0
  147. package/chunks/{system-2FUKECOJ.js → system-6GEEPUXD.js} +1 -1
  148. package/chunks/{update-CV7JPZGM.js → update-VLYRDEH4.js} +1 -1
  149. package/chunks/validate-bom-ME2NQAP3.js +2 -0
  150. package/chunks/validate-case-conflict-QUNIB43P.js +2 -0
  151. package/chunks/validate-circular-deps-DLUCIW7T.js +2 -0
  152. package/chunks/validate-commit-msg-SRLJRTKU.js +2 -0
  153. package/chunks/validate-docs-43LWHLVW.js +2 -0
  154. package/chunks/validate-eof-RV3IK6ZM.js +2 -0
  155. package/chunks/validate-export-names-D5I5DZTN.js +2 -0
  156. package/chunks/validate-filenames-WNLZI2S6.js +2 -0
  157. package/chunks/validate-json-6KIMBNBJ.js +2 -0
  158. package/chunks/validate-large-files-UXP7AZCW.js +2 -0
  159. package/chunks/validate-licenses-BL6PNSBP.js +2 -0
  160. package/chunks/validate-line-endings-NYHXORRG.js +2 -0
  161. package/chunks/validate-merge-conflict-IWUP4ZMW.js +2 -0
  162. package/chunks/validate-mod-exports-VCV4VZ5F.js +2 -0
  163. package/chunks/validate-package-configs-6PGL2YGD.js +2 -0
  164. package/chunks/validate-secrets-JV4ZSOVR.js +2 -0
  165. package/chunks/validate-shebangs-YACNWUG7.js +2 -0
  166. package/chunks/validate-submodules-ZXID3VEK.js +2 -0
  167. package/chunks/validate-symlinks-QNMKPYUY.js +2 -0
  168. package/chunks/validate-toml-PV3G7EFD.js +2 -0
  169. package/chunks/validate-trailing-whitespace-5Q5SEHOD.js +2 -0
  170. package/chunks/validate-yaml-IOMFQTSQ.js +2 -0
  171. package/chunks/versions-ROLQITT5.js +2 -0
  172. package/chunks/{watch-LW6FU2EL.js → watch-4NXY7JEX.js} +1 -1
  173. package/chunks/{wontfix-YJN2MZCL.js → wontfix-YSXRDPKA.js} +1 -1
  174. package/chunks/{workerd-LOWXXQEU.js → workerd-LH2MLWIF.js} +1 -1
  175. package/eser.js +1 -1
  176. package/package.json +9 -1
  177. package/chunks/chunk-5MVJUALI.js +0 -4
  178. package/chunks/chunk-5N2QHREH.js +0 -17
  179. package/chunks/chunk-JZ7DUWYC.js +0 -2
  180. package/chunks/chunk-OYNFK77H.js +0 -2
  181. package/chunks/chunk-PIV56NIC.js +0 -7
  182. package/chunks/chunk-V6YI7YJ4.js +0 -5
  183. package/chunks/chunk-VAIRJES2.js +0 -2
  184. package/chunks/chunk-VNJJQED3.js +0 -3
  185. package/chunks/chunk-ZJMX5J6E.js +0 -4
  186. package/chunks/claude-code-VX2T4YII.js +0 -2
  187. package/chunks/invoke-hook-D5XQP7A7.js +0 -11
  188. package/chunks/kiro-JGEZGFF3.js +0 -2
  189. package/chunks/manifest-4EA74HMS.js +0 -2
  190. package/chunks/mod-KTGLCC3R.js +0 -2
  191. package/chunks/mod-LAFYLM7O.js +0 -2
  192. package/chunks/next-NBSEIKEK.js +0 -9
  193. package/chunks/ollama-LD6OENM2.js +0 -2
  194. package/chunks/opencode-ECTBCC3O.js +0 -2
  195. package/chunks/purge-GV7LXDF3.js +0 -5
  196. package/chunks/release-6I5TL34I.js +0 -9
  197. package/chunks/rule-CNBMT5LD.js +0 -3
  198. package/chunks/run-PBQGRZV3.js +0 -4
  199. package/chunks/spec-AINLSNW6.js +0 -2
  200. package/chunks/system-X4X6JD4X.js +0 -2
  201. package/chunks/validate-bom-MYISC3IT.js +0 -2
  202. package/chunks/validate-case-conflict-B737FXF2.js +0 -2
  203. package/chunks/validate-circular-deps-WME7VUO4.js +0 -2
  204. package/chunks/validate-commit-msg-HJ5MXYNE.js +0 -2
  205. package/chunks/validate-docs-CCYMKDXS.js +0 -2
  206. package/chunks/validate-eof-6WAM6VAY.js +0 -2
  207. package/chunks/validate-export-names-Q5FSXTV5.js +0 -2
  208. package/chunks/validate-filenames-JVBT2GXA.js +0 -2
  209. package/chunks/validate-json-UPGBABYE.js +0 -2
  210. package/chunks/validate-large-files-RJLMJSWM.js +0 -2
  211. package/chunks/validate-licenses-YW5CK3QF.js +0 -2
  212. package/chunks/validate-line-endings-3VNZ7KT6.js +0 -2
  213. package/chunks/validate-merge-conflict-SKWYYHFS.js +0 -2
  214. package/chunks/validate-mod-exports-OMUDATXK.js +0 -2
  215. package/chunks/validate-package-configs-ZO5YJE2D.js +0 -2
  216. package/chunks/validate-secrets-FV6672MD.js +0 -2
  217. package/chunks/validate-shebangs-N55SME72.js +0 -2
  218. package/chunks/validate-submodules-ADHLOUGA.js +0 -2
  219. package/chunks/validate-symlinks-4IIIP6AQ.js +0 -2
  220. package/chunks/validate-toml-OVIYGLPR.js +0 -2
  221. package/chunks/validate-trailing-whitespace-LWP5QEXS.js +0 -2
  222. package/chunks/validate-yaml-L7JCSGXY.js +0 -2
  223. 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
- import{d as S}from"./chunk-NBA6EFWU.js";import{e as q}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{i as n}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var h=q.getLogger(["laroux","image-optimizer"]),$=null;async function j(){return $===null&&($=await import("npm:sharp@^0.33.5")),$.default??$}var F={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:{webp:80,avif:75,jpeg:85,png:90},generateBlurPlaceholder:!0,placeholderWidth:10};async function B(i){let r=[],o=["jpg","jpeg","png","gif","webp"];async function a(t){try{for await(let e of n.fs.readDir(t)){let s=n.path.resolve(t,e.name);e.isDirectory?await a(s):e.isFile&&S(e.name.toLowerCase(),o)&&r.push(s)}}catch{}}return await a(i),r}async function E(i,r){return`data:image/webp;base64,${(await(await j())(i).resize(r,void 0,{fit:"inside"}).blur(5).webp({quality:20}).toBuffer()).toString("base64")}`}async function C(i,r,o,a={}){let t=await j(),e={...F,...a},s=t(i),l=await s.metadata();if(l.width===void 0||l.height===void 0)throw new Error(`Could not read image dimensions: ${i}`);let u=l.width,w=l.height,y=u/w,m=n.path.extname(i),p=m.slice(1).toLowerCase(),f=n.path.basename(i,m),x=`${o}/${f}`,I=[];for(let c of e.widths){if(c>u)continue;let O=Math.round(c/y);for(let b of e.formats){let z,d;b==="original"?(d=p,z=n.path.resolve(r,`${f}-${c}w.${p}`)):(d=b,z=n.path.resolve(r,`${f}-${c}w.${b}`)),await n.fs.ensureDir(n.path.dirname(z));let g=s.clone().resize(c,O,{fit:"cover"});b==="webp"?g=g.webp({quality:e.quality.webp}):b==="avif"?g=g.avif({quality:e.quality.avif}):d==="jpg"||d==="jpeg"?g=g.jpeg({quality:e.quality.jpeg}):d==="png"&&(g=g.png({quality:e.quality.png}));let P=await g.toBuffer();await n.fs.writeFile(z,P),I.push({path:z,format:d,width:c,height:O,size:P.length})}}let v;return e.generateBlurPlaceholder&&(v=await E(i,e.placeholderWidth)),{originalPath:i,publicPath:x,originalWidth:u,originalHeight:w,variants:I,blurDataUrl:v,aspectRatio:y}}async function V(i,r,o="/images",a={}){h.info(`Scanning for images in ${i}...`);let t=await B(i);if(t.length===0)return h.debug("No images found to optimize"),{timestamp:Date.now(),images:{}};h.info(`Found ${t.length} image(s) to optimize`);let e={},s=0,l=0;for(let m of t)try{let p=await n.fs.stat(m);s+=p.size;let f=await C(m,r,o,a);e[m]=f;let x=f.variants.reduce((I,v)=>I+v.size,0);l+=x,h.debug(`Optimized: ${n.path.basename(m)} \u2192 ${f.variants.length} variants`)}catch(p){h.warn(`Failed to optimize ${m}: ${p instanceof Error?p.message:String(p)}`)}let u={timestamp:Date.now(),images:e},w=n.path.resolve(r,"image-manifest.json");await n.fs.ensureDir(n.path.dirname(w)),await n.fs.writeTextFile(w,JSON.stringify(u,null,2));let y=s>0?((1-l/s)*100).toFixed(1):0;return h.info(`Image optimization complete: ${t.length} images, ${y}% size reduction`),u}function M(i,r="webp"){return i.variants.filter(a=>a.format===r).sort((a,t)=>a.width-t.width).map(a=>`${a.path} ${a.width}w`).join(", ")}function D(i,r,o="webp"){let a=i.variants.filter(t=>t.format===o).sort((t,e)=>t.width-e.width);return a.find(t=>t.width>=r)??a.at(-1)}export{M as generateSrcset,D as getBestVariant,C as optimizeImage,V as optimizeImages,B as scanImages};
2
+ import{d as S}from"./chunk-NBA6EFWU.js";import{e as q}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{i as n}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var h=q.getLogger(["laroux","image-optimizer"]),$=null;async function j(){return $===null&&($=await import("npm:sharp@^0.33.5")),$.default??$}var F={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:{webp:80,avif:75,jpeg:85,png:90},generateBlurPlaceholder:!0,placeholderWidth:10};async function B(i){let r=[],o=["jpg","jpeg","png","gif","webp"];async function a(t){try{for await(let e of n.fs.readDir(t)){let s=n.path.resolve(t,e.name);e.isDirectory?await a(s):e.isFile&&S(e.name.toLowerCase(),o)&&r.push(s)}}catch{}}return await a(i),r}async function E(i,r){return`data:image/webp;base64,${(await(await j())(i).resize(r,void 0,{fit:"inside"}).blur(5).webp({quality:20}).toBuffer()).toString("base64")}`}async function C(i,r,o,a={}){let t=await j(),e={...F,...a},s=t(i),l=await s.metadata();if(l.width===void 0||l.height===void 0)throw new Error(`Could not read image dimensions: ${i}`);let u=l.width,w=l.height,y=u/w,m=n.path.extname(i),p=m.slice(1).toLowerCase(),f=n.path.basename(i,m),x=`${o}/${f}`,I=[];for(let c of e.widths){if(c>u)continue;let O=Math.round(c/y);for(let b of e.formats){let z,d;b==="original"?(d=p,z=n.path.resolve(r,`${f}-${c}w.${p}`)):(d=b,z=n.path.resolve(r,`${f}-${c}w.${b}`)),await n.fs.ensureDir(n.path.dirname(z));let g=s.clone().resize(c,O,{fit:"cover"});b==="webp"?g=g.webp({quality:e.quality.webp}):b==="avif"?g=g.avif({quality:e.quality.avif}):d==="jpg"||d==="jpeg"?g=g.jpeg({quality:e.quality.jpeg}):d==="png"&&(g=g.png({quality:e.quality.png}));let P=await g.toBuffer();await n.fs.writeFile(z,P),I.push({path:z,format:d,width:c,height:O,size:P.length})}}let v;return e.generateBlurPlaceholder&&(v=await E(i,e.placeholderWidth)),{originalPath:i,publicPath:x,originalWidth:u,originalHeight:w,variants:I,blurDataUrl:v,aspectRatio:y}}async function V(i,r,o="/images",a={}){h.info(`Scanning for images in ${i}...`);let t=await B(i);if(t.length===0)return h.debug("No images found to optimize"),{timestamp:Date.now(),images:{}};h.info(`Found ${t.length} image(s) to optimize`);let e={},s=0,l=0;for(let m of t)try{let p=await n.fs.stat(m);s+=p.size;let f=await C(m,r,o,a);e[m]=f;let x=f.variants.reduce((I,v)=>I+v.size,0);l+=x,h.debug(`Optimized: ${n.path.basename(m)} \u2192 ${f.variants.length} variants`)}catch(p){h.warn(`Failed to optimize ${m}: ${p instanceof Error?p.message:String(p)}`)}let u={timestamp:Date.now(),images:e},w=n.path.resolve(r,"image-manifest.json");await n.fs.ensureDir(n.path.dirname(w)),await n.fs.writeTextFile(w,JSON.stringify(u,null,2));let y=s>0?((1-l/s)*100).toFixed(1):0;return h.info(`Image optimization complete: ${t.length} images, ${y}% size reduction`),u}function M(i,r="webp"){return i.variants.filter(a=>a.format===r).sort((a,t)=>a.width-t.width).map(a=>`${a.path} ${a.width}w`).join(", ")}function D(i,r,o="webp"){let a=i.variants.filter(t=>t.format===o).sort((t,e)=>t.width-e.width);return a.find(t=>t.width>=r)??a.at(-1)}export{M as generateSrcset,D as getBestVariant,C as optimizeImage,V as optimizeImages,B as scanImages};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as b,b as D}from"./chunk-6V6C6MWY.js";import{e as C}from"./chunk-BNMKKNLB.js";import{a as A,d as E}from"./chunk-P2MUEKFT.js";import{k as y}from"./chunk-GKOMIH2B.js";import{f as k,h as R,k as $}from"./chunk-MBG7SPPO.js";import{d as m,f as w,g as h,k as v}from"./chunk-YVN2NZL4.js";import{a as P}from"./chunk-MG65QJY6.js";import{a as g,b as p,c as j}from"./chunk-FFWPJP7A.js";import{i as N}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var S=r=>A(async t=>{try{let s=await y(r.registrySource,{local:r.local}),a=s.recipes.filter(n=>n.scale==="project"),o=a.find(n=>n.name===r.templateName);if(o===void 0)return p({_tag:"TemplateNotFound",message:`Template '${r.templateName}' not found. Available: ${a.map(n=>n.name).join(", ")}`});await N.fs.mkdir(r.targetDir,{recursive:!0});let f={project_name:r.projectName,...r.variables},e=await C(o,{cwd:r.targetDir,registryUrl:s.registryUrl,force:!0,variables:f}),u=await b(r.targetDir),d=D(o,u);t.out.writeln(h(`\u2713 Created ${r.projectName} with ${e.written.length} file(s)`));for(let n of e.written)t.out.writeln(` \u2192 ${n}`);if(d.instructions.length>0){t.out.writeln(m(`
3
- Next steps:`)),t.out.writeln(m(` cd ${r.projectName}`));for(let n of d.instructions)t.out.writeln(m(` ${n}`))}return g({template:o,result:e,depInfo:d})}catch(s){let a=s instanceof Error?s.message:String(s);return p({_tag:"ApplyError",message:a})}});var B=async r=>{let t=P(r??[],{string:["name","registry","var"],boolean:["local"],collect:["var"]}),s=t._[0],a=t.name??s,o=t.registry,f=t.local===!0,e=k({renderer:$.ansi(),sink:R.stdout()}),u={};for(let c of t.var){let[i,...l]=String(c).split("=");i!==void 0&&i!==""&&(u[i]=l.join("="))}if(s===void 0){try{let i=(await y(o,{local:f})).recipes.filter(l=>l.scale==="project");e.writeln("Usage: eser kit new <template> [--name <project-name>] [--var key=value]"),e.writeln(),e.writeln("Available project templates:"),e.writeln();for(let l of i)e.writeln(` ${l.name.padEnd(20)} ${l.description} `,m(`[${l.language}]`))}catch(c){let i=c instanceof Error?c.message:String(c);e.writeln(w(`Error: ${i}`))}return await e.close(),g(void 0)}if(a===void 0)return e.writeln(w("Project name is required.")),await e.close(),p({exitCode:1});e.writeln(v(`
2
+ import{a as b,b as S}from"./chunk-ZNP3NXAD.js";import{e as C}from"./chunk-X3L6GBUX.js";import{a as A,d as E}from"./chunk-P2MUEKFT.js";import{k as w}from"./chunk-NMSD4ZXJ.js";import{f as k,h as R,k as $}from"./chunk-SHN5MT56.js";import{d as m,f as j,g as h,k as v}from"./chunk-YVN2NZL4.js";import{a as P}from"./chunk-MG65QJY6.js";import{a as g,b as p,c as N}from"./chunk-FFWPJP7A.js";import{i as y}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var x=r=>A(async t=>{try{let s=await w(r.registrySource,{local:r.local}),a=s.recipes.filter(n=>n.scale==="project"),o=a.find(n=>n.name===r.templateName);if(o===void 0)return p({_tag:"TemplateNotFound",message:`Template '${r.templateName}' not found. Available: ${a.map(n=>n.name).join(", ")}`});await y.fs.mkdir(r.targetDir,{recursive:!0});let f={project_name:r.projectName,...r.variables},e=await C(o,{cwd:r.targetDir,registryUrl:s.registryUrl,force:!0,variables:f}),u=await b(r.targetDir),d=S(o,u);t.out.writeln(h(`\u2713 Created ${r.projectName} with ${e.written.length} file(s)`));for(let n of e.written)t.out.writeln(` \u2192 ${n}`);if(d.instructions.length>0){t.out.writeln(m(`
3
+ Next steps:`)),t.out.writeln(m(` cd ${r.projectName}`));for(let n of d.instructions)t.out.writeln(m(` ${n}`))}return g({template:o,result:e,depInfo:d})}catch(s){let a=s instanceof Error?s.message:String(s);return p({_tag:"ApplyError",message:a})}});var G=async r=>{let t=P(r??[],{string:["name","registry","var"],boolean:["local"],collect:["var"]}),s=t._[0],a=t.name??s,o=t.registry,f=t.local===!0,e=k({renderer:$.ansi(),sink:R.stdout()}),u={};for(let c of t.var){let[i,...l]=String(c).split("=");i!==void 0&&i!==""&&(u[i]=l.join("="))}if(s===void 0){try{let i=(await w(o,{local:f})).recipes.filter(l=>l.scale==="project");e.writeln("Usage: eser kit new <template> [--name <project-name>] [--var key=value]"),e.writeln(),e.writeln("Available project templates:"),e.writeln();for(let l of i)e.writeln(` ${l.name.padEnd(20)} ${l.description} `,m(`[${l.language}]`))}catch(c){let i=c instanceof Error?c.message:String(c);e.writeln(j(`Error: ${i}`))}return await e.close(),g(void 0)}if(a===void 0)return e.writeln(j("Project name is required.")),await e.close(),p({exitCode:1});e.writeln(v(`
4
4
  Creating ${a} from ${s}...
5
- `));let d=`${Deno.cwd()}/${a}`,n=await E(S({templateName:s,projectName:a,targetDir:d,registrySource:o,local:f,variables:u}),{out:e});return await e.close(),j(n)?g(void 0):p({exitCode:1})};export{B as main};
5
+ `));let d=`${y.process.cwd()}/${a}`,n=await E(x({templateName:s,projectName:a,targetDir:d,registrySource:o,local:f,variables:u}),{out:e});return await e.close(),N(n)?g(void 0):p({exitCode:1})};export{G as main};
@@ -0,0 +1,9 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as fe}from"./chunk-NTY267SI.js";import"./chunk-L5OC7F24.js";import{a as le,b as de,c as pe,d as G}from"./chunk-WZHVKEPB.js";import{a as Q}from"./chunk-NY4W44PI.js";import"./chunk-2HSGE3TL.js";import{a as ue,b as me,d as v}from"./chunk-2ZYCRMUT.js";import{a as z,b as K,d as Y}from"./chunk-2LF7QSIN.js";import{a as Ie}from"./chunk-XOMPQOI6.js";import{a as q}from"./chunk-IZUADMIU.js";import{a as xe,b as Ce,c as De,d as Re}from"./chunk-7NKYCWAA.js";import{a as ge,b as he,e as k,f as B,g as X,h as Se,i as we,k as ve,m as Z,n as ye}from"./chunk-DPZJWN2Y.js";import{a as te,c as F,e as se,f as ne,i as ie,j as re,k as oe,o as ae,q as U,v as H,z as ce}from"./chunk-TMMAF763.js";import{c as j}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{a as J,b as D}from"./chunk-FFWPJP7A.js";import{i as h}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var Fe=o=>o.split(`
3
+ `).map(e=>e.replace(/^[-*]\s+/,"").trim()).filter(e=>e.length>0&&!e.startsWith("#")),ke=async(o,e)=>{let r=[],i=(e.startsWith(o)?e.slice(o.length+1):e).split("/");i.pop();for(let t=i.length;t>=0;t--){let n=`${t===0?o:`${o}/${i.slice(0,t).join("/")}`}/.folder-rules.md`,a=t===0?".":i.slice(0,t).join("/");try{let l=await h.fs.readTextFile(n),u=Fe(l);for(let p of u)r.push({folder:a,rule:p})}catch{}}return r},ee=async(o,e)=>{let r=new Set,c=[];for(let i of e){let t=await ke(o,i);for(let s of t){let n=`${s.folder}::${s.rule}`;r.has(n)||(r.add(n),c.push(s))}}return c};var Ze=async o=>{let e=h.process.cwd(),r=ue(o),c=me(o);if(!await ce(e))return await v({error:`noskills not initialized. Run: ${j("init")}`},r),D({exitCode:1});let i=null;for(let m of c)m.startsWith("--answer=")&&(i=m.slice(9));let t=ne(c),s;try{s=await se(e,t)}catch(m){let d=m instanceof Error?m.message:String(m);return await v({error:d},r),D({exitCode:1})}if(t===null&&s.phase!=="IDLE"&&s.phase!=="FREE"&&s.phase!=="COMPLETED")return await v({error:"Error: --spec=<name> is required. Use `noskills spec list` to see available specs."},r),D({exitCode:1});let n=await oe(e);if(n?.command!==void 0){let{setCommandPrefix:m}=await import("./cmd-QE4P4DS4.js");m(n.command)}if(n===null)return await v({error:"No config found"},r),D({exitCode:1});if(s.spec!==null&&s.phase!=="IDLE"&&s.phase!=="COMPLETED"){let m=`${e}/${F.specDir(s.spec)}`;try{await h.fs.stat(m)}catch{return await v({error:!0,message:`Active spec '${s.spec}' directory not found. Files may have been deleted manually.`,suggestion:`Run \`${j("reset")}\` to return to IDLE, or \`${j("cancel")}\` to mark as cancelled.`},r),D({exitCode:1})}}let a=fe(c,n);s.phase==="DISCOVERY"&&s.discovery.audience!==a&&(s={...s,discovery:{...s.discovery,audience:a}});let u=(await ae(e)).filter(m=>n.concerns.includes(m.id));if(i!==null){let m=await Ae(e,s,n,u,i);await U(e,m);let d={...m,lastCalledAt:new Date().toISOString()};await U(e,d);let b=h.env.get("NOSKILLS_SESSION")??null;b!==null&&await H(e,b,d.phase);let C=await z(e),E=K(C,d.phase),_=d.spec!==null?await q(e,d.spec):null,O=await be(e,d),T=await ee(e,O),f=Y(n?.tools??[]),S=G(d,u,E,n,_,T,void 0,f);return await v(S,r),J(void 0)}let p={...s,lastCalledAt:new Date().toISOString()};await U(e,p);let x=h.env.get("NOSKILLS_SESSION")??null;x!==null&&await H(e,x,p.phase);let y=await z(e),P=K(y,p.phase),M=p.spec!==null?await q(e,p.spec):null,V=await be(e,p),A=await ee(e,V),R;p.phase==="IDLE"&&(R={existingSpecs:(await re(e)).map(d=>({name:d.name,phase:d.state.phase,iteration:d.state.execution.iteration,detail:d.state.phase==="EXECUTING"?`${d.state.execution.completedTasks.length} tasks done, iteration ${d.state.execution.iteration}`:d.state.phase==="SPEC_DRAFT"?"awaiting approval":d.state.phase==="COMPLETED"?"completed":void 0})),rulesCount:P.length});let W=Y(n?.tools??[]),$=G(p,u,P,n,M,A,R,W);return await v($,r),J(void 0)},Ae=async(o,e,r,c,i)=>{switch(e.phase){case"DISCOVERY":{let t=e.discovery.audience==="agent",s=null;try{let a=JSON.parse(i);typeof a=="object"&&a!==null&&!Array.isArray(a)&&(t?le.map(p=>p.id).every(p=>p in a)&&(s=a):s=a)}catch{}let n=e;if(s!==null)for(let[a,l]of Object.entries(s))typeof l=="string"&&l.length>0&&(n=k(n,a,l));else{let a=de(c),l=n.discovery.currentQuestion,u=a[l];if(u===void 0)return e;n=k(n,u.id,i),n=we(n)}return pe(n.discovery.answers)&&(n=B(n)),n}case"DISCOVERY_REVIEW":{let t=i.trim().toLowerCase();if(t==="approve"){let s=Q(e.discovery.answers);return s.detected&&s.proposals.length>=2?Se(e):X(e)}if(t==="split")return await $e(o,e);if(t==="keep"){let s=Z(e,{id:`decision-split-keep-${Date.now()}`,question:"Split spec into separate areas?",choice:"Chose to keep as single spec despite multiple areas detected",promoted:!1,timestamp:new Date().toISOString()});return X(s)}try{let s=JSON.parse(i);if(typeof s.revise=="object"&&s.revise!==null){let n=e;for(let[a,l]of Object.entries(s.revise))typeof l=="string"&&l.length>0&&(n=k(n,a,l));return n}}catch{}return e}case"SPEC_DRAFT":{if(e.classification===null){let t,s=i.trim().toLowerCase();if(s==="none"||s==="skip")t={involvesWebUI:!1,involvesCLI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1};else try{let a=JSON.parse(i);t={involvesWebUI:a.involvesWebUI===!0||a.involvesUI===!0,involvesCLI:a.involvesCLI===!0||a.involvesUI===!0,involvesPublicAPI:a.involvesPublicAPI===!0,involvesMigration:a.involvesMigration===!0,involvesDataHandling:a.involvesDataHandling===!0}}catch{t={involvesWebUI:!1,involvesCLI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1}}let n={...e,classification:t};try{await Ie(o,n,c)}catch{}return n}try{let t=JSON.parse(i);if(typeof t.refinement=="string"&&t.refinement.length>0){let s=t.refinement;if(e.spec!==null){let n=`${o}/${F.specFile(e.spec)}`,a=await h.fs.readTextFile(n);if(s.includes("task-")){let u=Oe(s).map(y=>`- [ ] ${y}`).join(`
4
+ `),p=/## Tasks\n\n([\s\S]*?)(?=\n## |\n*$)/,x=a.replace(p,`## Tasks
5
+
6
+ ${u}
7
+ `);await h.fs.writeTextFile(n,x)}}return e}}catch{}return e}case"SPEC_APPROVED":{let t=ve(e);return t.spec!==null&&(await xe(o,t.spec,"executing"),await Re(o,t.spec,"executing")),t}case"EXECUTING":{if(!e.execution.awaitingStatusReport){let t={...e,execution:{...e.execution,lastProgress:i}};if(r.verifyCommand!==null&&r.verifyCommand!==void 0&&r.verifyCommand.length>0){let s=await Le(o,r.verifyCommand);if(t={...t,execution:{...t.execution,lastVerification:s}},!s.passed)return t}return t={...t,execution:{...t.execution,awaitingStatusReport:!0}},t}return await Te(o,e,i,c)}case"BLOCKED":{let t=e.execution.lastProgress??"Unknown",s={id:`d${e.decisions.length+1}`,question:t.replace(/^BLOCKED:\s*/,""),choice:i,promoted:!1,timestamp:new Date().toISOString()},n=Z(e,s);return n=ge(n,"EXECUTING"),n={...n,execution:{...n.execution,lastProgress:`Resolved: ${i}`}},n}default:return e}},$e=async(o,e)=>{let r=Q(e.discovery.answers);if(!r.detected||r.proposals.length===0)return e;let c=[];for(let t of r.proposals){let s=`${o}/${F.specDir(t.name)}`;await h.fs.mkdir(s,{recursive:!0});let n=e.discovery.answers.filter(u=>t.relevantAnswers.includes(u.questionId)),l=he(te(),t.name,`spec/${t.name}`);for(let u of n)l=k(l,u.questionId,u.answer);l=B(l),await ie(o,t.name,l),c.push(t.name)}return ye(e,"cancelled",`Split into: ${c.join(", ")}`)},Oe=o=>o.split(/(?=task-\d+:)/).map(e=>e.replace(/[,;\n\s]+$/,"").trim()).filter(e=>/^task-\d+:/.test(e)),Te=async(o,e,r,c)=>{let i;try{i=JSON.parse(r)}catch{return{...e,execution:{...e.execution,lastProgress:r,awaitingStatusReport:!1}}}let t=e;if(e.execution.debt!==null&&e.execution.debt.items.length>0&&typeof e.execution.debt.items[0]=="string"){let S=e.execution.debt.items.map((w,g)=>({id:`legacy-${g+1}`,text:w,since:e.execution.debt.fromIteration}));t={...e,execution:{...e.execution,debt:{...e.execution.debt,items:S}}};let L=new TextEncoder,I=h.process.stderr.getWriter();await I.write(L.encode(`noskills: migrated legacy string[] debt to DebtItem[] format
8
+ `)),I.releaseLock()}let s=new Set(["mandatory-tests","mandatory-docs"]),a=(i.na??[]).filter(f=>s.has(f));if(a.length>0)return{...t,execution:{...t.execution,lastProgress:`REJECTED: Tests and documentation ACs require explicit justification to mark as N/A. Explain why tests or docs are not needed for this spec. Rejected IDs: ${a.join(", ")}`,awaitingStatusReport:!0}};let l=i.completed??[],u=new Set(l),p=i.na??[],x=new Set(p),y=i.newIssues??[],P=i.remaining??[],M=i.blocked??[],V=t.execution.debt?.unaddressedIterations??0,A=t.execution.debt!==null?t.execution.debt.items.filter(f=>!u.has(f.id)&&!x.has(f.id)):[],R=t.execution.debtCounter??0,W=y.map((f,S)=>({id:`debt-${R+S+1}`,text:f,since:t.execution.iteration})),$=[...A,...W],d=P.length===0&&M.length===0&&y.length===0||$.length===0?null:{items:$,fromIteration:t.execution.debt?.fromIteration??t.execution.iteration,unaddressedIterations:A.length>0?V+1:1},b=[...new Set([...t.execution.naItems??[],...p])],C=[];l.length>0&&C.push(`Completed: ${l.join(", ")}`),p.length>0&&C.push(`N/A: ${p.join(", ")}`);let E=C.length>0?C.join("; "):"Status report submitted",_=t.execution.lastVerification===null||t.execution.lastVerification.passed===!0,O=d===null&&_,T=R+y.length;if(O&&t.spec!==null){let f=await q(o,t.spec);if(f!==null){let S=t.execution.completedTasks??[],L=new Set(S),I=[];try{let g=JSON.parse(t.execution.lastProgress??"");Array.isArray(g.completed)&&(I=g.completed.filter(N=>!L.has(N)&&f.tasks.some(Ee=>Ee.id===N)))}catch{}if(I.length===0){let g=f.tasks.find(N=>!L.has(N.id));g!==void 0&&(I=[g.id])}let w=[];for(let g of I)await Ce(o,t.spec,g),await De(o,t.spec,g,"done"),w.push(g);if(w.length>0){let g=w.length===1?`Task ${w[0]} accepted`:`Tasks ${w.join(", ")} accepted`;return{...t,execution:{...t.execution,lastProgress:`${g}: ${E}`,awaitingStatusReport:!1,debt:d,completedTasks:[...S,...w],debtCounter:T,naItems:b}}}}}return{...t,execution:{...t.execution,lastProgress:O?E:`Task not accepted \u2014 remaining items must be addressed first. ${E}`,awaitingStatusReport:!1,debt:d,debtCounter:T,naItems:b}}},Le=async(o,e)=>{try{let{execSync:r}=await import("node:child_process"),c=r(e,{cwd:o,encoding:"utf-8",timeout:6e4,stdio:["pipe","pipe","pipe"]});return{passed:!0,output:String(c).slice(0,4e3),timestamp:new Date().toISOString()}}catch(r){let c=r,i=((c.stdout??"")+(c.stderr??"")).slice(0,4e3);return c.status!==void 0?{passed:!1,output:i||"Verification failed with no output",timestamp:new Date().toISOString()}:{passed:!1,output:`Verification command failed to execute: ${r instanceof Error?r.message:String(r)}`,timestamp:new Date().toISOString()}}},be=async(o,e)=>{let r=[...e.execution.modifiedFiles??[]],c=await Ne(o);return[...new Set([...r,...c])]},Ne=async o=>{let e=`${o}/${F.stateDir}/files-changed.jsonl`;try{let c=(await h.fs.readTextFile(e)).trim().split(`
9
+ `).filter(Boolean),i=[];for(let t of c)try{let s=JSON.parse(t);i.includes(s.file)||i.push(s.file)}catch{}return i}catch{return[]}};export{Ae as handleAnswer,Ze as main,Oe as parseRefinementTasks};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as h,b as S,c as P,d as w}from"./chunk-VWQLQJVX.js";import{s as c,t as f}from"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";import*as p from"node:child_process";import l from"node:process";import{Buffer as d}from"node:buffer";import{Readable as C,Writable as g}from"node:stream";var y={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!1},b=(i,u=[],s)=>new Promise((e,a)=>{let n=p.spawn(i,u,{cwd:s?.cwd,env:s?.env?{...l.env,...s.env}:void 0,stdio:c(s),signal:s?.signal}),o=[],t=[];n.stdout?.on("data",r=>o.push(r)),n.stderr?.on("data",r=>t.push(r)),n.on("error",a),n.on("close",r=>{e({success:r===0,code:r??1,stdout:new Uint8Array(d.concat(o)),stderr:new Uint8Array(d.concat(t))})})}),A=(i,u=[],s)=>{let e=p.spawn(i,u,{cwd:s?.cwd,env:s?.env?{...l.env,...s.env}:void 0,stdio:c(s),signal:s?.signal}),a=[],n=[];e.stdout?.on("data",t=>a.push(t)),e.stderr?.on("data",t=>n.push(t));let o=new Promise((t,r)=>{e.on("error",r),e.on("close",(m,v)=>{t({success:m===0,code:m??1,signal:v??void 0})})});return{pid:e.pid,stdin:e.stdin?g.toWeb(e.stdin):null,stdout:e.stdout?C.toWeb(e.stdout):null,stderr:e.stderr?C.toWeb(e.stderr):null,status:o,output:async()=>{let t=await o;return{success:t.success,code:t.code,stdout:new Uint8Array(d.concat(a)),stderr:new Uint8Array(d.concat(n))}},kill:t=>{e.kill(t)}}},U=()=>({name:"node",version:l.versions.node,capabilities:y,fs:h(),path:S(),exec:f(b,A),env:P(),process:w()});export{y as NODE_CAPABILITIES,U as createNodeRuntime};
2
+ import{a as h,b as S,c as P,d as w}from"./chunk-TW23CULJ.js";import{s as c,t as f}from"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";import*as p from"node:child_process";import l from"node:process";import{Buffer as d}from"node:buffer";import{Readable as C,Writable as g}from"node:stream";var y={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!1},b=(i,u=[],s)=>new Promise((e,a)=>{let n=p.spawn(i,u,{cwd:s?.cwd,env:s?.env?{...l.env,...s.env}:void 0,stdio:c(s),signal:s?.signal}),o=[],t=[];n.stdout?.on("data",r=>o.push(r)),n.stderr?.on("data",r=>t.push(r)),n.on("error",a),n.on("close",r=>{e({success:r===0,code:r??1,stdout:new Uint8Array(d.concat(o)),stderr:new Uint8Array(d.concat(t))})})}),A=(i,u=[],s)=>{let e=p.spawn(i,u,{cwd:s?.cwd,env:s?.env?{...l.env,...s.env}:void 0,stdio:c(s),signal:s?.signal}),a=[],n=[];e.stdout?.on("data",t=>a.push(t)),e.stderr?.on("data",t=>n.push(t));let o=new Promise((t,r)=>{e.on("error",r),e.on("close",(m,v)=>{t({success:m===0,code:m??1,signal:v??void 0})})});return{pid:e.pid,stdin:e.stdin?g.toWeb(e.stdin):null,stdout:e.stdout?C.toWeb(e.stdout):null,stderr:e.stderr?C.toWeb(e.stderr):null,status:o,output:async()=>{let t=await o;return{success:t.success,code:t.code,stdout:new Uint8Array(d.concat(a)),stderr:new Uint8Array(d.concat(n))}},kill:t=>{e.kill(t)}}},U=()=>({name:"node",version:l.versions.node,capabilities:y,fs:h(),path:S(),exec:f(b,A),env:P(),process:w()});export{y as NODE_CAPABILITIES,U as createNodeRuntime};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-FNPBHLLZ.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 OllamaModel,b as ollamaFactory};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-LJ7A5HYR.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 OpenCodeModel,b as openCodeFactory};
@@ -0,0 +1,6 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{e as T}from"./chunk-2LF7QSIN.js";import{c as y,k as F}from"./chunk-TMMAF763.js";import{b as v}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as P,h as S,k as C}from"./chunk-SHN5MT56.js";import{c as h,d as m,f as w,g as I}from"./chunk-YVN2NZL4.js";import{a as $,b as g}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 q=r=>{let e=r;if(typeof e?.name!="string"||e.name.length===0)throw new Error("Pack manifest must have a non-empty 'name' field");if(typeof e?.version!="string"||e.version.length===0)throw new Error("Pack manifest must have a non-empty 'version' field");if(typeof e?.description!="string"||e.description.length===0)throw new Error("Pack manifest must have a non-empty 'description' field");return e},U=()=>({installed:[]});var B={name:"typescript",version:"1.0.0",description:"TypeScript best practices",tags:["typescript","types"],rules:["rules/use-strict-types.md","rules/no-any.md","rules/prefer-const.md"],concerns:["concerns/ts-quality.json"]};var L={id:"ts-quality",name:"TypeScript Quality",description:"Enforces TypeScript best practices",extras:[{questionId:"verification",text:"Does the code pass strict TypeScript checks (noEmit, strict mode)?"}],specSections:[],reminders:["Run tsc --noEmit before reporting task complete"],acceptanceCriteria:["TypeScript strict mode passes with zero errors"]};var _={name:"react",version:"1.0.0",description:"React component conventions",tags:["react","frontend"],rules:["rules/component-structure.md","rules/prefer-function-components.md","rules/state-management.md"]};var J={name:"security",version:"1.0.0",description:"Security audit rules",tags:["security","audit"],rules:["rules/no-secrets-in-code.md","rules/validate-input.md","rules/no-eval.md"],concerns:["concerns/security-audit.json"]};var H={id:"security-audit",name:"Security Audit",description:"Security-focused review for every spec",extras:[{questionId:"verification",text:"Has the change been reviewed for injection, XSS, CSRF, and auth bypass?"},{questionId:"scope_boundary",text:"What security boundaries must NOT be crossed?"}],specSections:["Security Review"],reminders:["Check for hardcoded secrets, unsanitized input, and missing auth checks"],acceptanceCriteria:["No hardcoded secrets","All user input validated","Auth checks present on protected routes"]};var ee={"use-strict-types":"Prefer explicit types over inference for function params and returns","no-any":"Never use 'any'. Use 'unknown' when type is genuinely unknown.","prefer-const":"Use const by default, let only when reassignment is needed"},ne={"component-structure":"One component per file. Name file same as component.","prefer-function-components":"Use function components with hooks. No class components.","state-management":"Keep state as close to where it's used as possible."},te={"no-secrets-in-code":"Never hardcode API keys, passwords, or tokens","validate-input":"Validate and sanitize all user input at API boundaries","no-eval":"Never use eval(), new Function(), or equivalent dynamic code execution"},se={manifest:B,ruleContents:ee,concernContents:[L]},re={manifest:_,ruleContents:ne,concernContents:[]},ie={manifest:J,ruleContents:te,concernContents:[H]},x=new Map([["typescript",se],["react",re],["security",ie]]);var K=".eser/packs.json",j=3e4,Ee=async r=>{let e=r?.[0];if(e==="list")return await oe();if(e==="install")return await ce(r?.slice(1));if(e==="uninstall")return await le(r?.slice(1));if(e==="inspect")return await de(r?.slice(1));if(e==="search")return await ue(r?.slice(1));let n=v(),i=P({renderer:C.ansi(),sink:S.stdout()});return i.writeln(`Usage: ${n} pack <list | install <name> | uninstall <name> | inspect <name> | search <query>>`),await i.close(),$(void 0)},D=async r=>{let e=`${r}/${K}`;try{let n=await f.fs.readTextFile(e);return JSON.parse(n)}catch{return U()}},N=async(r,e)=>{let n=`${r}/${K}`;await f.fs.mkdir(`${r}/.eser`,{recursive:!0}),await f.fs.writeTextFile(n,JSON.stringify(e,null,2)+`
3
+ `)},R=r=>x.get(r),M=r=>{let e=r.replace(/^github:/,"").replace(/^gh:/,""),n=e.indexOf("#");if(n===-1)return null;let i=e.slice(0,n),t=e.slice(n+1),l=i.indexOf("/");if(l===-1)return null;let u=i.slice(0,l),c=i.slice(l+1);return u.length===0||c.length===0||t.length===0?null:{owner:u,repo:c,ref:"main",packPath:t}},z=async r=>{let e=M(r);if(e===null)throw new Error(`Invalid pack specifier: ${r}. Expected format: github:owner/repo#pack-name`);let n=`https://raw.githubusercontent.com/${e.owner}/${e.repo}/${e.ref}/packs/${e.packPath}/pack.json`,i=await globalThis.fetch(n,{signal:AbortSignal.timeout(j)});if(!i.ok)throw new Error(`Could not fetch pack from ${r}. HTTP ${i.status}`);let t=JSON.parse(await i.text());return q(t)},E=async(r,e)=>{let n=M(r);if(n===null)throw new Error(`Invalid pack specifier: ${r}`);let i=`https://raw.githubusercontent.com/${n.owner}/${n.repo}/${n.ref}/packs/${n.packPath}/${e}`,t=await globalThis.fetch(i,{signal:AbortSignal.timeout(j)});if(!t.ok)throw new Error(`Could not fetch ${e} from ${r}. HTTP ${t.status}`);return await t.text()},W=async r=>{let e=`${r}/${y.concernsDir}`,n=0;try{for await(let i of f.fs.readDir(e))if(i.isFile&&i.name.endsWith(".json")){let t=i.name.match(/^(\d+)-/);if(t!==null){let l=parseInt(t[1],10);l>n&&(n=l)}}}catch{}return n+1},A=async(r,e,n)=>{let i=[],t=[],l=[],u=`${r}/${y.rulesDir}`;await f.fs.mkdir(u,{recursive:!0});for(let[p,o]of Object.entries(n.ruleContents)){let a=`pack-${e}-${p}.md`;await f.fs.writeTextFile(`${u}/${a}`,o+`
4
+ `),i.push(a)}if(n.concernContents.length>0){let p=`${r}/${y.concernsDir}`;await f.fs.mkdir(p,{recursive:!0});let o=await W(r);for(let a of n.concernContents){let d=`${String(o).padStart(3,"0")}-${a.id}.json`;await f.fs.writeTextFile(`${p}/${d}`,JSON.stringify(a,null,2)+`
5
+ `),t.push(d),o++}}if(n.folderRuleContents!==void 0)for(let[p,o]of Object.entries(n.folderRuleContents)){let a=`${r}/${p}/.folder-rules.md`;await f.fs.mkdir(`${r}/${p}`,{recursive:!0}),await f.fs.writeTextFile(a,o+`
6
+ `),l.push(`${p}/.folder-rules.md`)}return{name:e,version:n.manifest.version,installedAt:new Date().toISOString(),source:"builtin",rules:i,concerns:t,folderRules:l}},ae=async(r,e,n)=>{let i=n.name,t=[],l=[],u=[],c=`${r}/${y.rulesDir}`;if(await f.fs.mkdir(c,{recursive:!0}),n.rules!==void 0)for(let o of n.rules){let a=await E(e,o),s=o.replace(/^rules\//,"").replace(/\.md$/,""),d=`pack-${i}-${s}.md`;await f.fs.writeTextFile(`${c}/${d}`,a),t.push(d)}if(n.concerns!==void 0&&n.concerns.length>0){let o=`${r}/${y.concernsDir}`;await f.fs.mkdir(o,{recursive:!0});let a=await W(r);for(let s of n.concerns){let d=await E(e,s),k=JSON.parse(d),O=`${String(a).padStart(3,"0")}-${k.id}.json`;await f.fs.writeTextFile(`${o}/${O}`,d),l.push(O),a++}}if(n.folderRules!==void 0)for(let[o,a]of Object.entries(n.folderRules)){let s=await E(e,a),d=`${r}/${o}/.folder-rules.md`;await f.fs.mkdir(`${r}/${o}`,{recursive:!0}),await f.fs.writeTextFile(d,s),u.push(`${o}/.folder-rules.md`)}return{name:i,version:n.version,installedAt:new Date().toISOString(),source:e,rules:t,concerns:l,folderRules:u}},oe=async()=>{let r=P({renderer:C.ansi(),sink:S.stdout()}),e=f.process.cwd(),n=await D(e),i=new Set(n.installed.map(t=>t.name));r.writeln(h("Built-in packs:"));for(let[t,l]of x){let u=Object.keys(l.ruleContents).length,c=l.concernContents.length,p=[];u>0&&p.push(`${u} rules`),c>0&&p.push(`${c} concern${c>1?"s":""}`),r.writeln(" ",h(t.padEnd(16)),m(l.manifest.description),m(` (${p.join(", ")})`))}if(r.writeln(""),r.writeln(h("Installed packs:")),n.installed.length===0)r.writeln(m(" No packs installed."));else for(let t of n.installed){let l=t.installedAt.slice(0,10);r.writeln(" ",i.has(t.name)?I(t.name.padEnd(16)):h(t.name.padEnd(16)),m(`v${t.version}`),m(` (installed ${l})`))}return await r.close(),$(void 0)},ce=async r=>{let e=P({renderer:C.ansi(),sink:S.stdout()}),n=f.process.cwd(),i=r?.[0];if(i===void 0||i.length===0){let a=v();return e.writeln(w("Please provide a pack name: "),h(`${a} pack install typescript`)),await e.close(),g({exitCode:1})}let t=await D(n),l=i.includes("/")||i.includes(":"),u=l?M(i)?.packPath??i:i;if(t.installed.some(a=>a.name===u))return e.writeln(w(`Pack "${u}" is already installed.`)),e.writeln(m(" Uninstall first to re-install.")),await e.close(),g({exitCode:1});let c;if(l){e.writeln(m(`Fetching pack from ${i}...`));try{let a=await z(i);if(a.requires!==void 0){for(let s of a.requires)if(!t.installed.some(d=>d.name===s)){e.writeln(m(` Installing dependency: ${s}`));let d=R(s);if(d!==void 0){let k=await A(n,s,d);t.installed.push(k)}}}c=await ae(n,i,a)}catch(a){return e.writeln(w(`Failed to install: ${a instanceof Error?a.message:String(a)}`)),await e.close(),g({exitCode:1})}}else{let a=R(i);if(a===void 0)return e.writeln(w(`Unknown pack: ${i}`)),e.writeln(m(` Available built-in packs: ${[...x.keys()].join(", ")}`)),await e.close(),g({exitCode:1});if(a.manifest.requires!==void 0){for(let s of a.manifest.requires)if(!t.installed.some(d=>d.name===s)){e.writeln(m(` Installing dependency: ${s}`));let d=R(s);if(d!==void 0){let k=await A(n,s,d),b=[...t.installed,k];await N(n,{installed:b})}}}c=await A(n,i,a)}let p={installed:[...t.installed,c]};await N(n,p);let o=await F(n);return o!==null&&o.tools.length>0&&(await T(n,o.tools,o),e.writeln(m(" Tool files synced."))),e.writeln(I("\u2714"),` Pack "${c.name}" v${c.version} installed.`),c.rules.length>0&&e.writeln(m(` Rules: ${c.rules.join(", ")}`)),c.concerns.length>0&&e.writeln(m(` Concerns: ${c.concerns.join(", ")}`)),await e.close(),$(void 0)},le=async r=>{let e=P({renderer:C.ansi(),sink:S.stdout()}),n=f.process.cwd(),i=r?.[0];if(i===void 0||i.length===0){let s=v();return e.writeln(w("Please provide a pack name: "),h(`${s} pack uninstall typescript`)),await e.close(),g({exitCode:1})}let t=await D(n),l=t.installed.find(s=>s.name===i);if(l===void 0)return e.writeln(w(`Pack "${i}" is not installed.`)),await e.close(),g({exitCode:1});let u=[];for(let s of t.installed){if(s.name===i)continue;let d=R(s.name);d?.manifest.requires!==void 0&&d.manifest.requires.includes(i)&&u.push(s.name)}u.length>0&&e.writeln(w(`Warning: pack "${i}" is required by: ${u.join(", ")}`));let c=`${n}/${y.rulesDir}`;for(let s of l.rules)try{await f.fs.remove(`${c}/${s}`)}catch{}let p=`${n}/${y.concernsDir}`;for(let s of l.concerns)try{await f.fs.remove(`${p}/${s}`)}catch{}for(let s of l.folderRules)try{await f.fs.remove(`${n}/${s}`)}catch{}let o={installed:t.installed.filter(s=>s.name!==i)};await N(n,o);let a=await F(n);return a!==null&&a.tools.length>0&&(await T(n,a.tools,a),e.writeln(m(" Tool files synced."))),e.writeln(I("\u2714"),` Pack "${i}" uninstalled.`),await e.close(),$(void 0)},de=async r=>{let e=P({renderer:C.ansi(),sink:S.stdout()}),n=r?.[0];if(n===void 0||n.length===0){let s=v();return e.writeln(w("Please provide a pack name: "),h(`${s} pack inspect typescript`)),await e.close(),g({exitCode:1})}let i=n.includes("/")||n.includes(":"),t,l=null,u=null;if(i)try{t=await z(n)}catch(s){return e.writeln(w(`Failed to fetch: ${s instanceof Error?s.message:String(s)}`)),await e.close(),g({exitCode:1})}else{let s=R(n);if(s===void 0)return e.writeln(w(`Unknown pack: ${n}`)),await e.close(),g({exitCode:1});t=s.manifest,l=s.ruleContents,u=s.concernContents}e.writeln(h(`Pack: ${t.name}`),m(` v${t.version}`)),e.writeln(`Description: ${t.description}`),t.author!==void 0&&e.writeln(`Author: ${t.author}`),t.tags!==void 0&&t.tags.length>0&&e.writeln(`Tags: ${t.tags.join(", ")}`),e.writeln("");let c=t.rules?.length??0;if(e.writeln(h(`Rules (${c}):`)),l!==null)for(let[s,d]of Object.entries(l))e.writeln(` - ${s}: `,m(`"${d}"`));else if(t.rules!==void 0)for(let s of t.rules){let d=s.replace(/^rules\//,"").replace(/\.md$/,"");e.writeln(` - ${d}`)}let p=t.concerns?.length??0;if(e.writeln(""),e.writeln(h(`Concerns (${p}):`)),u!==null&&u.length>0)for(let s of u)e.writeln(` - ${s.id}: ${s.name}`),s.acceptanceCriteria.length>0&&e.writeln(m(` ACs: "${s.acceptanceCriteria.join('", "')}"`));else p===0&&e.writeln(m(" none"));let o=t.folderRules!==void 0?Object.keys(t.folderRules).length:0;e.writeln(""),e.writeln(`Folder rules: ${o>0?o:"none"}`);let a=t.requires?.length??0;return e.writeln(`Dependencies: ${a>0?t.requires.join(", "):"none"}`),await e.close(),$(void 0)},ue=async r=>{let e=P({renderer:C.ansi(),sink:S.stdout()}),n=r?.[0]?.toLowerCase();if(n===void 0||n.length===0){let c=v();return e.writeln(w("Please provide a search query: "),h(`${c} pack search typescript`)),await e.close(),g({exitCode:1})}e.writeln(h("Matching packs:"));let i=!1;for(let[c,p]of x){let o=p.manifest.tags??[],a=c.includes(n),s=o.some(k=>k.includes(n)),d=p.manifest.description.toLowerCase().includes(n);(a||s||d)&&(e.writeln(" ",h(c.padEnd(16)),m(p.manifest.description),m(" [builtin]")),i=!0)}let t=f.process.cwd(),u=(await F(t))?.packRegistry;if(u!==void 0)try{let c=await globalThis.fetch(u,{signal:AbortSignal.timeout(j)});if(c.ok){let p=JSON.parse(await c.text());for(let o of p.packs){let a=o.tags??[],s=o.name.includes(n),d=a.some(b=>b.includes(n)),k=o.description.toLowerCase().includes(n);(s||d||k)&&(e.writeln(" ",h(o.name.padEnd(16)),m(o.description),m(` [${o.source}]`)),i=!0)}}}catch{}return i||e.writeln(m(` No packs matching "${n}" found.`)),await e.close(),$(void 0)};export{A as installBuiltinPack,ae as installRemotePack,Ee as main,D as readPacksFile,N as writePacksFile};
@@ -0,0 +1,5 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as D,b as P}from"./chunk-NTY267SI.js";import"./chunk-L5OC7F24.js";import{c as l,j as R,o as x}from"./chunk-TMMAF763.js";import{a as E}from"./chunk-2XNFZXHY.js";import{a as k,b as C,f as v,o}from"./chunk-YACXTCWF.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import{a as d,b as $}from"./chunk-FFWPJP7A.js";import{i as a}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import{e as j}from"./chunk-5WJ6AUNY.js";var S=j(E(),1);var Y=async e=>{let t=a.process.cwd(),n=D(e),s=C({target:n==="agent"?"non-interactive":"interactive"}),u=P(e).includes("--force");if(!u&&n==="agent")return o.error(s,"Purge requires `--force` flag in agent mode."),$({exitCode:1});if(u)return o.step(s,"Purging noskills content..."),await q(t,s),o.success(s,"Purge complete."),d(void 0);let g=(await N(t)).filter(i=>i.exists);if(g.length===0)return o.info(s,"Nothing to remove."),d(void 0);let p=[];for(let i of g){let y=await v(s,{message:i.message});if(k(y))return o.info(s,"Aborted."),d(void 0);p.push({id:i.id,confirmed:y===!0})}let f=p.filter(i=>i.confirmed),I=p.filter(i=>!i.confirmed);if(f.length===0)return o.info(s,"Nothing selected for removal."),d(void 0);let T=new Set(f.map(i=>i.id)),w=[];for(let i of f)await H(t,i.id)?o.step(s,` Removed ${h(i.id)}`):(w.push(i.id),o.step(s,` Failed to remove ${h(i.id)}`));for(let i of I)o.step(s,` Kept ${h(i.id)}`);T.size>0&&await b(t);let M=f.length-w.length;return o.success(s,`Purge complete (${M} of ${g.length} categories removed).`),d(void 0)},N=async e=>{let[t,n,s,r]=await Promise.all([O(e),L(e),J(e),U(e)]);return[t,n,s,r]},O=async e=>{let t=await x(e),n=t.map(s=>s.id).join(", ");return{id:"concerns",exists:t.length>0,message:`Remove concerns? (${n})`}},L=async e=>{let t=await R(e),n=0;try{for await(let c of a.fs.readDir(`${e}/${l.specsDir}`))c.isDirectory&&n++}catch{}let s=Math.max(t.length,n);if(s===0)return{id:"specs",exists:!1,message:""};let r=t.map(c=>`${c.name} ${c.state.phase}`).join(", ");return{id:"specs",exists:!0,message:t.length>0?`Remove specs? (${s} specs: ${r})`:`Remove specs? (${s} spec directories)`}},J=async e=>{let t=0;try{for await(let n of a.fs.readDir(`${e}/${l.rulesDir}`))n.isFile&&t++}catch{}return{id:"rules",exists:t>0,message:`Remove rules? (${t} active rules)`}},U=async e=>{let t=!1,n=!1,s=!1;try{let c=await a.fs.readTextFile(`${e}/.claude/settings.json`);t=JSON.parse(c).hooks!==void 0}catch{}try{n=(await a.fs.readTextFile(`${e}/CLAUDE.md`)).includes("<!-- noskills:start -->")}catch{}let r=[`${e}/.claude/agents/noskills-executor.md`,`${e}/.claude/agents/noskills-verifier.md`];for(let c of r)try{await a.fs.stat(c),s=!0;break}catch{}return{id:"agent-integration",exists:t||n||s,message:"Remove agent integration? (.claude/settings.json, CLAUDE.md, .claude/agents/noskills-*.md)"}},h=e=>({concerns:"concerns",specs:"specs",rules:"rules","agent-integration":"agent integration"})[e],H=(e,t)=>{switch(t){case"concerns":return m(`${e}/${l.concernsDir}`);case"specs":return z([`${e}/${l.specsDir}`,`${e}/${l.stateDir}`]);case"rules":return m(`${e}/${l.rulesDir}`);case"agent-integration":return A(e)}},q=async(e,t)=>{await m(`${e}/${l.concernsDir}`)&&o.step(t," Removed `.eser/concerns/`"),await m(`${e}/${l.specsDir}`)&&o.step(t," Removed `.eser/specs/`"),await m(`${e}/${l.rulesDir}`)&&o.step(t," Removed `.eser/rules/`"),await m(`${e}/${l.stateDir}`)&&o.step(t," Removed `.eser/.state/`"),await b(e)&&o.step(t," Removed noskills section from `manifest.yml`"),await A(e)&&o.step(t," Removed agent integration")},m=async e=>{try{await a.fs.stat(e);let{rmSync:t}=await import("node:fs");return t(e,{recursive:!0,force:!0}),!0}catch{return!1}},z=async e=>{let t=!1;for(let n of e)await m(n)&&(t=!0);return t},F=async e=>{try{await a.fs.stat(e);let{unlinkSync:t}=await import("node:fs");return t(e),!0}catch{return!1}},b=async e=>{let t=`${e}/${l.manifestFile}`;try{let n=await a.fs.readTextFile(t),s=S.parseDocument(n);return s.has("noskills")?(s.delete("noskills"),await a.fs.writeTextFile(t,s.toString()),!0):!1}catch{return!1}},B=async e=>{let t=`${e}/CLAUDE.md`,n="<!-- noskills:start -->",s="<!-- noskills:end -->";try{let r=await a.fs.readTextFile(t),u=r.indexOf(n),c=r.indexOf(s);return u!==-1&&c!==-1?(r=r.slice(0,u).trimEnd()+`
3
+ `+r.slice(c+s.length).trimStart(),await a.fs.writeTextFile(t,r.trimEnd()+`
4
+ `),!0):!1}catch{return!1}},K=async e=>{let t=`${e}/.claude/settings.json`;try{let n=await a.fs.readTextFile(t),s=JSON.parse(n);return s.hooks!==void 0?(delete s.hooks,await a.fs.writeTextFile(t,JSON.stringify(s,null,2)+`
5
+ `),!0):!1}catch{return!1}},A=async e=>{let t=!1;await K(e)&&(t=!0),await B(e)&&(t=!0);let n=[`${e}/.claude/agents/noskills-executor.md`,`${e}/.claude/agents/noskills-verifier.md`];for(let r of n)await F(r)&&(t=!0);let s=[`${e}/.cursorrules`,`${e}/.windsurfrules`,`${e}/.kiro/steering/conventions.md`,`${e}/.github/copilot-instructions.md`];for(let r of s)await F(r)&&(t=!0);return t};export{Y 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}from"./chunk-BNMKKNLB.js";import"./chunk-GKOMIH2B.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{e as applyRecipe,f as applyRecipeChain,b as fileExists,a as isPathSafe,c as processContent,d as runPostInstall};
2
+ import{a,b,c,d,e,f}from"./chunk-X3L6GBUX.js";import"./chunk-NMSD4ZXJ.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{e as applyRecipe,f as applyRecipeChain,b as fileExists,a as isPathSafe,c as processContent,d as runPostInstall};
@@ -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,i,j,k,l,m,n,o,p}from"./chunk-GKOMIH2B.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{b as DEFAULT_OWNER,d as DEFAULT_REF,f as DEFAULT_REGISTRY_URL,c as DEFAULT_REPO,a as FETCH_TIMEOUT_MS,g as LOCAL_REGISTRY_PATH,e as RECIPES_FILENAME,j as detectLocalRegistry,m as fetchRecipeFile,o as fetchRecipeFolder,p as fetchRecipeFromRepo,k as fetchRegistry,l as fetchRegistryFromRepo,n as parseGitHubRawUrl,i as registryFetch,h as resolveSpecifier};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-NMSD4ZXJ.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{b as DEFAULT_OWNER,d as DEFAULT_REF,f as DEFAULT_REGISTRY_URL,c as DEFAULT_REPO,a as FETCH_TIMEOUT_MS,g as LOCAL_REGISTRY_PATH,e as RECIPES_FILENAME,j as detectLocalRegistry,m as fetchRecipeFile,o as fetchRecipeFolder,p as fetchRecipeFromRepo,k as fetchRegistry,l as fetchRegistryFromRepo,n as parseGitHubRawUrl,i as registryFetch,h as resolveSpecifier};
@@ -0,0 +1,9 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as c}from"./chunk-CVDLYIOW.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import{a as g}from"./chunk-LFNUSULJ.js";import{a as R,c as f}from"./chunk-O325ZU5M.js";import{f as w,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{f as m}from"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{d as a}from"./chunk-GVTM4EOU.js";import{a as p}from"./chunk-MG65QJY6.js";import{g as i}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var{ctx:n,output:A}=R(),x=async()=>(await a`git status --porcelain`.noThrow().text()).length===0,E=async()=>{let e=await a`git log @{u}..HEAD --oneline`.noThrow().text();return e.length>0?e.split(`
3
+ `):[]},$=async(e,r)=>{for(let s of r)await a`git add ${s}`.spawn();await a`git commit -m ${e}`.spawn()},P=async()=>{await a`git push origin HEAD`.spawn()},b=async e=>{await a`git tag -d ${e}`.noThrow().spawn();let r=`:refs/tags/${e}`;await a`git push origin ${r}`.noThrow().spawn()},O=async e=>await w(n,{message:e})===!0,k=async e=>{let{type:r,dryRun:s=!1}=e;if(!await x())throw new Error("Working tree is dirty. Commit or stash changes first.");let o=await E();if(o.length>0&&e.yes!==!0)throw new Error(`You have ${o.length} unpushed commit(s):
4
+ ${o.join(`
5
+ `)}
6
+
7
+ Push first, or re-run with --yes to continue anyway.`);let l=await c()??"0.0.0";r!=="same"&&await(await import("./versions-ROLQITT5.js")).versions(r,{dryRun:s});let u=await c()??l,d=!1;try{await(await import("./changelog-gen-627BV77Z.js")).generateChangelog({dryRun:s}),d=!0}catch{d=!1}let h=!1,v=!1;if(!s){d&&await a`deno fmt CHANGELOG.md`.noThrow().spawn();let y=["VERSION","CHANGELOG.md","pkg/*/deno.json","pkg/*/package.json","package.json"],C=`chore(codebase): release v${u}`;await $(C,y),h=!0,await P(),v=!0}return{version:u,previousVersion:l,changelogGenerated:d,committed:h,pushed:v,dryRun:s}},M=async(e={})=>{let{dryRun:r=!1}=e;if(!await x())throw new Error("Working tree is dirty. Commit and push first.");let s=await E();if(s.length>0)throw new Error(`You have unpushed commits. Push first, then rerelease.
8
+ ${s.join(`
9
+ `)}`);let o=await c();if(o===void 0||!/^\d+\.\d+\.\d+$/.test(o))throw new Error(`Invalid or missing version in VERSION file: "${o}"`);let l=`v${o}`;if(!r){let u=`chore(codebase): release v${o}`;await a`git commit --allow-empty -m ${u}`.spawn(),await a`git push origin HEAD`.spawn()}return{version:o,tag:l,dryRun:r}},T=async(e={})=>{let r=await c();if(r===void 0||!/^\d+\.\d+\.\d+$/.test(r))throw new Error(`Invalid or missing version in VERSION file: "${r}"`);let s=`v${r}`;if(e.yes!==!0)throw new Error(`This will delete tag ${s} locally and remotely. Re-run with --yes to confirm.`);return await b(s),{version:r,tag:s,deleted:!0}},U=e=>m.fromPromise(()=>k(e)),H=e=>m.fromPromise(()=>M(e)),I=e=>m.fromPromise(()=>T(e)),V=e=>{let r=e.args[0];return r===void 0||!["patch","minor","major","same"].includes(r)?i.fail(g.adaptError("Usage: eser codebase release <patch|minor|major|same> [--dry-run] [--yes]")):i.ok({type:r,dryRun:e.flags["dry-run"]===!0,yes:e.flags.yes===!0})},j=e=>i.ok({dryRun:e.flags["dry-run"]===!0}),G=e=>i.ok({yes:e.flags.yes===!0}),N=e=>{if(i.isFail(e)){let s=e.error,o=s instanceof Error?s.message:s.message??String(s);return t.error(n,o),i.fail({exitCode:1})}let{value:r}=e;return r.dryRun?(t.warn(n,"[DRY RUN] Release preview:"),t.info(n,` Version: ${r.previousVersion} -> ${r.version}`),t.info(n,` Changelog: ${r.changelogGenerated?"generated":"no user-facing changes"}`),t.info(n," No changes were made.")):(t.success(n,`Released v${r.version}`),t.info(n,` Version: ${r.previousVersion} -> ${r.version}`),t.info(n,` Changelog: ${r.changelogGenerated?"updated":"no user-facing changes"}`),t.info(n,` Committed: ${r.committed}`),t.info(n,` Pushed: ${r.pushed}`),t.info(n," CI will validate, tag, and publish."),t.info(n," Watch: https://github.com/eser/stack/actions")),i.ok(void 0)},D=e=>{if(i.isFail(e)){let s=e.error,o=s instanceof Error?s.message:s.message??String(s);return t.error(n,o),i.fail({exitCode:1})}let{value:r}=e;return r.dryRun?t.warn(n,`[DRY RUN] Would delete and recreate tag ${r.tag}`):(t.success(n,`Re-tagged ${r.tag}`),t.info(n,"CI will validate and publish.")),i.ok(void 0)},S=e=>{if(i.isFail(e)){let s=e.error,o=s instanceof Error?s.message:s.message??String(s);return t.error(n,o),i.fail({exitCode:1})}let{value:r}=e;return r.deleted&&t.success(n,`Deleted tag v${r.version} (local + remote).`),i.ok(void 0)},F=g.createTrigger({handler:U,adaptInput:V,adaptOutput:N}),W=g.createTrigger({handler:H,adaptInput:j,adaptOutput:D}),Y=g.createTrigger({handler:I,adaptInput:G,adaptOutput:S}),ee=async e=>{let r=p(e??[],{boolean:["dry-run","yes"],alias:{n:"dry-run",y:"yes"}}),s=r._[0],o=r["dry-run"]===!0,l=r.yes===!0;if(s!==void 0&&!o&&!l&&["patch","minor","major","same"].includes(s)){let d=await c()??"0.0.0";if(t.info(n,`Current version: ${d}`),t.info(n,`Bump type: ${s}`),t.info(n,"This will bump version, generate changelog, commit, and push."),await A.flush(),!await O("Proceed?"))return t.warn(n,"Aborted."),i.ok(void 0);r.yes=!0}let u=f("release",r);return await F(u)},re=async e=>{let r=p(e??[],{boolean:["dry-run"],alias:{n:"dry-run"}}),s=f("rerelease",r);return await W(s)},se=async e=>{let r=p(e??[],{boolean:["yes"],alias:{y:"yes"}}),s=f("unrelease",r);return await Y(s)};export{F as handleReleaseCli,W as handleRereleaseCli,Y as handleUnreleaseCli,ee as main,k as release,U as releaseHandler,M as rerelease,H as rereleaseHandler,re as rereleaseMain,T as unrelease,I as unreleaseHandler,se as unreleaseMain};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import"./chunk-SOSF762G.js";import{a as m}from"./chunk-LFNUSULJ.js";import{a as C,c as P}from"./chunk-L7RS6MQ5.js";import{l as u}from"./chunk-JZ7DUWYC.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as w}from"./chunk-P2MUEKFT.js";import"./chunk-MBG7SPPO.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{e as p}from"./chunk-5MVJUALI.js";import"./chunk-PWLF3WXM.js";import"./chunk-SH4H7OLV.js";import"./chunk-ZEFYMWGZ.js";import{a as v}from"./chunk-MG65QJY6.js";import{g as l}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import{j as x,n as R}from"./chunk-7ATUODBM.js";import"./chunk-N7DXBY3O.js";import"./chunk-AP72BKVG.js";import{j as c}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var{ctx:h,output:Y}=C(),E=/^##\s{1,100}\[?([^\]\s]+)\]?\s{0,100}-?\s{0,100}([0-9]{4}-[0-9]{2}-[0-9]{2})?\s{0,100}$/,A=t=>{let e=t.trim().replace(/^refs\/tags\//,"");return e.startsWith("v")?e:`v${e}`},N=t=>{let e=t.split(/\r?\n/),n=[];for(let s=0;s<e.length;s+=1){let i=e[s].match(E);i!==null&&/^\d/.test(i[1])&&n.push({version:i[1],date:i[2]??"",headingLineIndex:s})}return n.length===0?[]:n.map((s,o)=>{let i=n[o+1],g=s.headingLineIndex+1,a=i!==void 0?i.headingLineIndex:e.length,r=e.slice(g,a);for(;r.length>0&&r[0].trim()==="";)r.shift();for(;r.length>0&&r[r.length-1].trim()==="";)r.pop();let d=[`## ${s.version}${s.date!==""?` - ${s.date}`:""}`];return r.length>0&&d.push("",...r),{version:s.version,date:s.date,tag:`v${s.version}`,notes:`${d.join(`
2
+ import"./chunk-SOSF762G.js";import{a as m}from"./chunk-LFNUSULJ.js";import{a as C,c as P}from"./chunk-O325ZU5M.js";import{o as u}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 w}from"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{g as p}from"./chunk-GVTM4EOU.js";import"./chunk-PWLF3WXM.js";import"./chunk-NMEPQK3T.js";import"./chunk-RNFCAHVL.js";import{a as v}from"./chunk-MG65QJY6.js";import{g as l}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import{j as x,n as R}from"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{j as c}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var{ctx:h,output:Y}=C(),E=/^##\s{1,100}\[?([^\]\s]+)\]?\s{0,100}-?\s{0,100}([0-9]{4}-[0-9]{2}-[0-9]{2})?\s{0,100}$/,A=t=>{let e=t.trim().replace(/^refs\/tags\//,"");return e.startsWith("v")?e:`v${e}`},N=t=>{let e=t.split(/\r?\n/),n=[];for(let s=0;s<e.length;s+=1){let i=e[s].match(E);i!==null&&/^\d/.test(i[1])&&n.push({version:i[1],date:i[2]??"",headingLineIndex:s})}return n.length===0?[]:n.map((s,o)=>{let i=n[o+1],g=s.headingLineIndex+1,a=i!==void 0?i.headingLineIndex:e.length,r=e.slice(g,a);for(;r.length>0&&r[0].trim()==="";)r.shift();for(;r.length>0&&r[r.length-1].trim()==="";)r.pop();let d=[`## ${s.version}${s.date!==""?` - ${s.date}`:""}`];return r.length>0&&d.push("",...r),{version:s.version,date:s.date,tag:`v${s.version}`,notes:`${d.join(`
3
3
  `).trim()}
4
4
  `}})},T=async(t={})=>{let{changelogPath:e="CHANGELOG.md",root:n="."}=t,s=R(n,e),o=await c.runtime.fs.readTextFile(s);return{entries:N(o)}},O=async(t,e)=>{try{return await p.exec`gh release view ${t} --repo ${e}`.quiet().text(),!0}catch{return!1}},k=async t=>{let{repo:e,createIfMissing:n=!1,changelogPath:s="CHANGELOG.md",root:o=".",releaseTitle:i="eserstack {tag}"}=t,{entries:g}=await T({changelogPath:s,root:o});if(g.length===0)throw new Error("No release headings found in CHANGELOG.md.");let a=t.tag!==void 0?A(t.tag):g[0].tag,r=g.find(y=>y.tag===a);if(r===void 0)throw new Error(`No matching changelog section found for ${a}.`);let d=await c.runtime.fs.makeTempDir({prefix:"eserstack-release-"}),f=x(d,`${a}-notes.md`);await c.runtime.fs.writeTextFile(f,r.notes);try{if(await O(a,e))return await p.exec`gh release edit ${a} --repo ${e} --notes-file ${f}`.spawn(),{tag:a,entry:r,action:"updated"};if(!n)return{tag:a,entry:r,action:"skipped"};let $=i.replace("{tag}",a);try{return await p.exec`gh release create ${a} --repo ${e} --title ${$} --notes-file ${f}`.spawn(),{tag:a,entry:r,action:"created"}}catch{return await p.exec`gh release edit ${a} --repo ${e} --notes-file ${f}`.spawn(),{tag:a,entry:r,action:"updated"}}}finally{await c.runtime.fs.remove(d,{recursive:!0})}},I=t=>w.fromPromise(()=>k(t)),S=t=>{let e=t.flags.repo??c.runtime.env.get("GITHUB_REPOSITORY")??"";return e===""?l.fail(m.adaptError("Missing repository. Pass --repo or set GITHUB_REPOSITORY.")):l.ok({repo:e,tag:t.flags.tag??void 0,createIfMissing:t.flags["create-if-missing"]===!0})},b=t=>{if(l.isFail(t)){let n=t.error,s=n instanceof Error?n.message:n.message??String(n);return u.error(h,s),l.fail({exitCode:1})}let{value:e}=t;switch(e.action){case"created":u.success(h,`Created release ${e.tag} with changelog notes.`);break;case"updated":u.success(h,`Updated release notes for ${e.tag}.`);break;case"skipped":u.warn(h,`Release ${e.tag} not found. Skipping (pass --create-if-missing to create).`);break}return l.ok(void 0)},G=m.createTrigger({handler:I,adaptInput:S,adaptOutput:b}),q=async t=>{let e=v(t??[],{string:["repo","tag"],boolean:["create-if-missing"],alias:{h:"help"}}),n=P("release-notes",e);return await G(n)};export{G as handleCli,O as hasGitHubRelease,q as main,A as normalizeTag,T as parseChangelog,N as parseChangelogText,k as syncReleaseNotes,I as syncReleaseNotesHandler};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{c,d as f}from"./chunk-2UHHAPKY.js";import{a as R}from"./chunk-IBB6UZR2.js";import"./chunk-VNJJQED3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import{a as m}from"./chunk-LFNUSULJ.js";import{a as d,c as p}from"./chunk-L7RS6MQ5.js";import{l as n}from"./chunk-JZ7DUWYC.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as u}from"./chunk-P2MUEKFT.js";import"./chunk-MBG7SPPO.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-5MVJUALI.js";import{a as g}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-7ATUODBM.js";import"./chunk-N7DXBY3O.js";import"./chunk-AP72BKVG.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var{ctx:i,output:N}=d(),P=async(e={})=>{let{root:r=".",remote:s="origin",tagPrefix:h="v",messageTemplate:y="Release {tag}",dryRun:l=!1}=e,t=await R({root:r});if(t===void 0||!/^\d+\.\d+\.\d+$/.test(t))throw new Error(`Invalid or missing version in VERSION file: "${t}"`);let o=`${h}${t}`,v=y.replace("{tag}",o).replace("{version}",t);return l||(await c(o,v),await f(s,o)),{version:t,tag:o,remote:s,dryRun:l}},T=e=>u.fromPromise(()=>P(e)),C=e=>a.ok({dryRun:e.flags["dry-run"]===!0}),x=e=>{if(a.isFail(e)){let s=e.error instanceof Error?e.error.message:String(e.error);return n.error(i,s),a.fail({exitCode:1})}let{value:r}=e;return r.dryRun?n.warn(i,`[DRY RUN] Would create and push tag ${r.tag}`):(n.success(i,`Created tag ${r.tag}`),n.info(i,`Pushed tag ${r.tag} to ${r.remote}`)),a.ok(void 0)},A=m.createTrigger({handler:T,adaptInput:C,adaptOutput:x}),S=async e=>{let r=g(e??[],{boolean:["dry-run"],alias:{n:"dry-run"}}),s=p("release-tag",r);return await A(s)};export{A as handleCli,S as main,P as pushReleaseTag,T as pushReleaseTagHandler};
2
+ import{c,d as f}from"./chunk-MTCPFQ5I.js";import{a as R}from"./chunk-CVDLYIOW.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import{a as m}from"./chunk-LFNUSULJ.js";import{a as d,c as p}from"./chunk-O325ZU5M.js";import{o as n}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 u}from"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import{a as g}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var{ctx:i,output:N}=d(),P=async(e={})=>{let{root:r=".",remote:s="origin",tagPrefix:h="v",messageTemplate:y="Release {tag}",dryRun:l=!1}=e,t=await R({root:r});if(t===void 0||!/^\d+\.\d+\.\d+$/.test(t))throw new Error(`Invalid or missing version in VERSION file: "${t}"`);let o=`${h}${t}`,v=y.replace("{tag}",o).replace("{version}",t);return l||(await c(o,v),await f(s,o)),{version:t,tag:o,remote:s,dryRun:l}},T=e=>u.fromPromise(()=>P(e)),C=e=>a.ok({dryRun:e.flags["dry-run"]===!0}),x=e=>{if(a.isFail(e)){let s=e.error instanceof Error?e.error.message:String(e.error);return n.error(i,s),a.fail({exitCode:1})}let{value:r}=e;return r.dryRun?n.warn(i,`[DRY RUN] Would create and push tag ${r.tag}`):(n.success(i,`Created tag ${r.tag}`),n.info(i,`Pushed tag ${r.tag} to ${r.remote}`)),a.ok(void 0)},A=m.createTrigger({handler:T,adaptInput:C,adaptOutput:x}),S=async e=>{let r=g(e??[],{boolean:["dry-run"],alias:{n:"dry-run"}}),s=p("release-tag",r);return await A(s)};export{A as handleCli,S as main,P as pushReleaseTag,T as pushReleaseTagHandler};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{n as y}from"./chunk-OYNFK77H.js";import{e as f,g as h,h as S,i as g}from"./chunk-PIV56NIC.js";import"./chunk-2XNFZXHY.js";import{f as u,h as d,k as w}from"./chunk-MBG7SPPO.js";import{d as l,f as n,g as m}from"./chunk-YVN2NZL4.js";import{a as p,b as t}from"./chunk-FFWPJP7A.js";import{i as c}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var A=async C=>{let e=u({renderer:w.ansi(),sink:d.stdout()}),a=c.process.cwd(),i=h(C);if(!i.ok)return e.writeln(n(i.error)),await e.close(),t({exitCode:1});let s;try{s=await f(a,i.spec)}catch(o){let k=o instanceof Error?o.message:String(o);return e.writeln(n(k)),await e.close(),t({exitCode:1})}if(s.phase!=="COMPLETED")return e.writeln(n(`Cannot reopen in phase: ${s.phase}`)),e.writeln(l("Only COMPLETED specs can be reopened.")),await e.close(),t({exitCode:1});let r=y(s);return await S(a,r),r.spec!==null&&await g(a,r.spec,r),e.writeln(m("\u2714")," Spec reopened. Discovery answers preserved \u2014 run `noskills next` to revise."),await e.close(),p(void 0)};export{A as main};
2
+ import{o as y}from"./chunk-DPZJWN2Y.js";import{e as f,g as h,h as S,i as g}from"./chunk-TMMAF763.js";import"./chunk-2XNFZXHY.js";import{f as u,h as d,k as w}from"./chunk-SHN5MT56.js";import{d as l,f as n,g as m}from"./chunk-YVN2NZL4.js";import{a as p,b as t}from"./chunk-FFWPJP7A.js";import{i as c}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var A=async C=>{let e=u({renderer:w.ansi(),sink:d.stdout()}),a=c.process.cwd(),i=h(C);if(!i.ok)return e.writeln(n(i.error)),await e.close(),t({exitCode:1});let s;try{s=await f(a,i.spec)}catch(o){let k=o instanceof Error?o.message:String(o);return e.writeln(n(k)),await e.close(),t({exitCode:1})}if(s.phase!=="COMPLETED")return e.writeln(n(`Cannot reopen in phase: ${s.phase}`)),e.writeln(l("Only COMPLETED specs can be reopened.")),await e.close(),t({exitCode:1});let r=y(s);return await S(a,r),r.spec!==null&&await g(a,r.spec,r),e.writeln(m("\u2714")," Spec reopened. Discovery answers preserved \u2014 run `noskills next` to revise."),await e.close(),p(void 0)};export{A as main};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{o as k}from"./chunk-OYNFK77H.js";import{c as h,e as g,g as y,h as S,i as I}from"./chunk-PIV56NIC.js";import"./chunk-2XNFZXHY.js";import{f as u,h as w,k as f}from"./chunk-MBG7SPPO.js";import{d as i,f as n,g as d}from"./chunk-YVN2NZL4.js";import{a as c,b as p}from"./chunk-FFWPJP7A.js";import{i as l}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var x=async D=>{let e=u({renderer:f.ansi(),sink:w.stdout()}),a=l.process.cwd(),o=y(D);if(!o.ok)return e.writeln(n(o.error)),await e.close(),p({exitCode:1});let s;try{s=await g(a,o.spec)}catch(r){let A=r instanceof Error?r.message:String(r);return e.writeln(n(A)),await e.close(),p({exitCode:1})}if(s.phase==="IDLE"||s.phase==="UNINITIALIZED")return e.writeln(i("Already idle. Nothing to reset.")),await e.close(),c(void 0);if(s.spec!==null){let r=`${a}/${h.specDir(s.spec)}`;try{await l.fs.stat(r)}catch{e.writeln(n(`Active spec '${s.spec}' directory not found.`)),e.writeln(i("Resetting to IDLE anyway."))}}let t=s.spec,m=k(s);return await S(a,m),t!==null&&await I(a,t,m),e.writeln(d("\u2714")," Reset to IDLE."),t!==null&&e.writeln(i(`Spec "${t}" state cleared. Files in .eser/specs/${t}/ preserved.`)),await e.close(),c(void 0)};export{x as main};
2
+ import{q as k}from"./chunk-DPZJWN2Y.js";import{c as h,e as g,g as y,h as S,i as I}from"./chunk-TMMAF763.js";import"./chunk-2XNFZXHY.js";import{f as u,h as w,k as f}from"./chunk-SHN5MT56.js";import{d as i,f as n,g as d}from"./chunk-YVN2NZL4.js";import{a as c,b as p}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 x=async D=>{let e=u({renderer:f.ansi(),sink:w.stdout()}),a=l.process.cwd(),o=y(D);if(!o.ok)return e.writeln(n(o.error)),await e.close(),p({exitCode:1});let s;try{s=await g(a,o.spec)}catch(r){let A=r instanceof Error?r.message:String(r);return e.writeln(n(A)),await e.close(),p({exitCode:1})}if(s.phase==="IDLE"||s.phase==="UNINITIALIZED")return e.writeln(i("Already idle. Nothing to reset.")),await e.close(),c(void 0);if(s.spec!==null){let r=`${a}/${h.specDir(s.spec)}`;try{await l.fs.stat(r)}catch{e.writeln(n(`Active spec '${s.spec}' directory not found.`)),e.writeln(i("Resetting to IDLE anyway."))}}let t=s.spec,m=k(s);return await S(a,m),t!==null&&await I(a,t,m),e.writeln(d("\u2714")," Reset to IDLE."),t!==null&&e.writeln(i(`Spec "${t}" state cleared. Files in .eser/specs/${t}/ preserved.`)),await e.close(),c(void 0)};export{x as main};
@@ -0,0 +1,7 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as v,e as C}from"./chunk-2LF7QSIN.js";import{c as x,k as T}from"./chunk-TMMAF763.js";import{b as A,c as j}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as d,h as u,k as c}from"./chunk-SHN5MT56.js";import{c as y,d as a,f as k,g as P}from"./chunk-YVN2NZL4.js";import{a as g,b as $}from"./chunk-FFWPJP7A.js";import{i as p}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var q=async e=>{let s=e?.[0];if(s==="add")return await R(e?.slice(1));if(s==="list")return await L();if(s==="promote")return await W(e?.slice(1));let n=A(),t=d({renderer:c.ansi(),sink:u.stdout()});return t.writeln(`Usage: ${n} rule <add "rule text" | list | promote "decision">`),await t.close(),g(void 0)},R=async e=>{let s=d({renderer:c.ansi(),sink:u.stdout()}),n=p.process.cwd(),t=[],r=[],i=[];if(e!==void 0)for(let o of e)o.startsWith("--phases=")?t=o.slice(9).split(",").map(w=>w.trim()):o.startsWith("--applies-to=")?r=o.slice(13).split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")):o.startsWith("-")||i.push(o);let m=i.join(" "),f=await T(n);if(m.length===0)return s.writeln(k("Please provide a rule: "),y(`${j('rule add "Use Deno Tests for all tests"')}`)),await s.close(),$({exitCode:1});let b=m.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,50),l="";(t.length>0||r.length>0)&&(l+=`---
3
+ `,t.length>0&&(l+=`phases: [${t.join(", ")}]
4
+ `),r.length>0&&(l+=`applies_to: [${r.map(o=>`"${o}"`).join(", ")}]
5
+ `),l+=`---
6
+ `),l+=m+`
7
+ `;let D=`${n}/${x.rulesDir}/${b}.md`;await p.fs.mkdir(`${n}/${x.rulesDir}`,{recursive:!0}),await p.fs.writeTextFile(D,l);let h=[];t.length>0&&h.push(t.join(", ")),r.length>0&&h.push(r.join(", "));let E=h.length>0?` [${h.join("; ")}]`:"";return s.writeln(P("\u2714")," Rule added: ",a(m),a(E)),f!==null&&f.tools.length>0&&(await C(n,f.tools,f),s.writeln(a(" Tool files synced."))),await s.close(),g(void 0)},L=async()=>{let e=d({renderer:c.ansi(),sink:u.stdout()}),s=p.process.cwd(),n=await v(s);if(e.writeln(y("Rules")),e.writeln(""),n.length===0)e.writeln(a(` No rules yet. Add one with: ${j('rule add "..."')}`));else for(let t=0;t<n.length;t++){let r=n[t],i=[];r.phases!==void 0&&r.phases.length>0?i.push(r.phases.join(", ")):i.push("all phases"),r.appliesTo!==void 0&&r.appliesTo.length>0?i.push(r.appliesTo.join(", ")):i.push("all files"),e.writeln(` ${t+1}. ${r.text} `,a(`[${i.join(", ")}]`))}return await e.close(),g(void 0)},W=async e=>{let s=d({renderer:c.ansi(),sink:u.stdout()}),n=e?.join(" ");return n===void 0||n.length===0?(s.writeln(k("Please provide the decision text to promote.")),await s.close(),$({exitCode:1})):(await s.close(),await R(e))};export{q as main};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as V,b as q,c as z}from"./chunk-H7U2VQCK.js";import"./chunk-OWQXQ33F.js";import"./chunk-2XNFZXHY.js";import{a as A,c as J,d as k,e as L}from"./chunk-P2MUEKFT.js";import{f as N,h as U,k as B}from"./chunk-MBG7SPPO.js";import{f as x,g as C,h as F}from"./chunk-YVN2NZL4.js";import{d as H}from"./chunk-5MVJUALI.js";import{a as I}from"./chunk-MG65QJY6.js";import{a as W,b as c,c as P,d as S}from"./chunk-FFWPJP7A.js";import{i as _}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var O=s=>({_tag:"WorkflowError",message:s}),Z=s=>{if(typeof s=="string")return{name:s,options:{},continueOnError:!1};let o=Object.entries(s);if(o.length!==1)throw new Error(`Invalid step config: expected exactly one key, got ${o.length}`);let[e,n]=o[0],r={},i=!1,l;for(let[a,t]of Object.entries(n))a==="continueOnError"?i=t===!0:a==="timeout"?l=t*1e3:r[a]=t;return{name:e,options:r,continueOnError:i,timeout:l}},ee=(s,o,e)=>L(J(s,n=>O(n instanceof Error?n.message:String(n))),o,O(`Step '${e}' timed out after ${(o/1e3).toFixed(0)}s`)),G=(s,o,e={})=>A(async()=>{let n=performance.now(),r=[],i=e.defaultTimeout??6e4;for(let a of s.steps){let t=Z(a);if(e.only!==void 0&&t.name!==e.only)continue;let T=o.get(t.name);if(T===void 0)return c(O(`Unknown tool '${t.name}' in workflow '${s.id}'. Registered tools: ${o.names().join(", ")||"(none)"}`));let v={...t.options,root:e.root??".",fix:e.fix??!1,_args:e.args??[]};e.changedFiles!==void 0&&(v._changedFiles=e.changedFiles),e.onStepStart?.(t.name);let g=performance.now(),j=t.timeout??i,h=ee(()=>T.run(v),j,t.name),p=await k(h),d;if(P(p))d=p.value;else if(t.continueOnError)d={name:t.name,passed:!1,issues:[{message:p.error.message}],mutations:[],stats:{}};else return p;let b=performance.now()-g,y={...d,durationMs:b};r.push(y),d.mutations.length>0&&e.onMutations!==void 0&&await e.onMutations(d.mutations),e.onStepEnd?.(y)}let l=performance.now()-n;return W({workflowId:s.id,passed:r.every(a=>a.passed),steps:r,totalDurationMs:l})}),D=(s,o,e=new Set)=>{if(s.includes===void 0||s.includes.length===0)return s;let n=new Set(e);n.add(s.id);let r=[];for(let i of s.includes){if(n.has(i))throw new Error(`Circular include detected: workflow '${s.id}' includes '${i}' which is already in the include chain: ${[...n].join(" \u2192 ")}`);let l=o.find(t=>t.id===i);if(l===void 0)throw new Error(`Workflow '${s.id}' includes '${i}' but no workflow with that id exists. Available: ${o.map(t=>t.id).join(", ")||"(none)"}`);let a=D(l,o,n);r.push(...a.steps)}return{...s,steps:[...r,...s.steps],includes:void 0}},K=(s,o,e,n={})=>A(async()=>{let r=o.workflows.find(l=>l.id===s);if(r===void 0)return c(O(`Workflow '${s}' not found. Available: ${o.workflows.map(l=>l.id).join(", ")||"(none)"}`));let i=D(r,o.workflows);return await k(G(i,e,n))}),Q=(s,o,e,n={})=>A(async()=>{let r=o.filter(l=>l.on.includes(s));if(r.length===0)return c(O(`No workflows found for event '${s}'. Available: ${o.map(l=>`${l.id} (${l.on.join(", ")})`).join("; ")||"(none)"}`));let i=[];for(let l of r){let a=D(l,o),t=await k(G(a,e,n));if(S(t))return t;i.push(t.value)}return W(i)});var oe=50,$=B.ansi(),se=(s,o,e)=>{let n=".".repeat(Math.max(1,oe-s.length)),r=`${(o.durationMs/1e3).toFixed(1)}s`,i;if(o.passed&&o.mutations.length>0)i=$.render([F(`Fixed (${o.mutations.length} file${o.mutations.length===1?"":"s"}, ${r})`)]);else if(o.passed)if(e&&Object.keys(o.stats).length>0){let l=Object.entries(o.stats).map(([a,t])=>`${t} ${a}`).join(", ");i=$.render([C(`Passed (${l}, ${r})`)])}else i=$.render([C(`Passed (${r})`)]);else i=$.render([x(`Failed (${r})`)]);return`${s}${n}${i}`},pe=async(s,o)=>{let e=I(s??[],{string:["event","workflow","only","config"],boolean:["fix","dry-run","help","verbose","json","changed"],alias:{e:"event",w:"workflow",h:"help",v:"verbose"}});if(e.help)return console.log(`eser workflows run \u2014 Run workflow pipelines
2
+ import{a as V,b as q,c as z}from"./chunk-WTMV5GTZ.js";import"./chunk-4X4NHXFE.js";import"./chunk-2XNFZXHY.js";import{a as A,c as J,d as k,e as L}from"./chunk-P2MUEKFT.js";import{f as N,h as U,k as B}from"./chunk-SHN5MT56.js";import{f as x,g as C,h as F}from"./chunk-YVN2NZL4.js";import{d as H}from"./chunk-GVTM4EOU.js";import{a as I}from"./chunk-MG65QJY6.js";import{a as W,b as c,c as P,d as S}from"./chunk-FFWPJP7A.js";import{i as _}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var O=s=>({_tag:"WorkflowError",message:s}),Z=s=>{if(typeof s=="string")return{name:s,options:{},continueOnError:!1};let o=Object.entries(s);if(o.length!==1)throw new Error(`Invalid step config: expected exactly one key, got ${o.length}`);let[e,n]=o[0],r={},i=!1,l;for(let[a,t]of Object.entries(n))a==="continueOnError"?i=t===!0:a==="timeout"?l=t*1e3:r[a]=t;return{name:e,options:r,continueOnError:i,timeout:l}},ee=(s,o,e)=>L(J(s,n=>O(n instanceof Error?n.message:String(n))),o,O(`Step '${e}' timed out after ${(o/1e3).toFixed(0)}s`)),G=(s,o,e={})=>A(async()=>{let n=performance.now(),r=[],i=e.defaultTimeout??6e4;for(let a of s.steps){let t=Z(a);if(e.only!==void 0&&t.name!==e.only)continue;let T=o.get(t.name);if(T===void 0)return c(O(`Unknown tool '${t.name}' in workflow '${s.id}'. Registered tools: ${o.names().join(", ")||"(none)"}`));let v={...t.options,root:e.root??".",fix:e.fix??!1,_args:e.args??[]};e.changedFiles!==void 0&&(v._changedFiles=e.changedFiles),e.onStepStart?.(t.name);let g=performance.now(),j=t.timeout??i,h=ee(()=>T.run(v),j,t.name),p=await k(h),d;if(P(p))d=p.value;else if(t.continueOnError)d={name:t.name,passed:!1,issues:[{message:p.error.message}],mutations:[],stats:{}};else return p;let b=performance.now()-g,y={...d,durationMs:b};r.push(y),d.mutations.length>0&&e.onMutations!==void 0&&await e.onMutations(d.mutations),e.onStepEnd?.(y)}let l=performance.now()-n;return W({workflowId:s.id,passed:r.every(a=>a.passed),steps:r,totalDurationMs:l})}),D=(s,o,e=new Set)=>{if(s.includes===void 0||s.includes.length===0)return s;let n=new Set(e);n.add(s.id);let r=[];for(let i of s.includes){if(n.has(i))throw new Error(`Circular include detected: workflow '${s.id}' includes '${i}' which is already in the include chain: ${[...n].join(" \u2192 ")}`);let l=o.find(t=>t.id===i);if(l===void 0)throw new Error(`Workflow '${s.id}' includes '${i}' but no workflow with that id exists. Available: ${o.map(t=>t.id).join(", ")||"(none)"}`);let a=D(l,o,n);r.push(...a.steps)}return{...s,steps:[...r,...s.steps],includes:void 0}},K=(s,o,e,n={})=>A(async()=>{let r=o.workflows.find(l=>l.id===s);if(r===void 0)return c(O(`Workflow '${s}' not found. Available: ${o.workflows.map(l=>l.id).join(", ")||"(none)"}`));let i=D(r,o.workflows);return await k(G(i,e,n))}),Q=(s,o,e,n={})=>A(async()=>{let r=o.filter(l=>l.on.includes(s));if(r.length===0)return c(O(`No workflows found for event '${s}'. Available: ${o.map(l=>`${l.id} (${l.on.join(", ")})`).join("; ")||"(none)"}`));let i=[];for(let l of r){let a=D(l,o),t=await k(G(a,e,n));if(S(t))return t;i.push(t.value)}return W(i)});var oe=50,$=B.ansi(),se=(s,o,e)=>{let n=".".repeat(Math.max(1,oe-s.length)),r=`${(o.durationMs/1e3).toFixed(1)}s`,i;if(o.passed&&o.mutations.length>0)i=$.render([F(`Fixed (${o.mutations.length} file${o.mutations.length===1?"":"s"}, ${r})`)]);else if(o.passed)if(e&&Object.keys(o.stats).length>0){let l=Object.entries(o.stats).map(([a,t])=>`${t} ${a}`).join(", ");i=$.render([C(`Passed (${l}, ${r})`)])}else i=$.render([C(`Passed (${r})`)]);else i=$.render([x(`Failed (${r})`)]);return`${s}${n}${i}`},pe=async(s,o)=>{let e=I(s??[],{string:["event","workflow","only","config"],boolean:["fix","dry-run","help","verbose","json","changed"],alias:{e:"event",w:"workflow",h:"help",v:"verbose"}});if(e.help)return console.log(`eser workflows run \u2014 Run workflow pipelines
3
3
  `),console.log("Usage:"),console.log(" eser workflows run -e <event> Run by event"),console.log(" eser workflows run -w <workflow-id> Run by workflow id"),console.log(),console.log("Options:"),console.log(" -e, --event <name> Event to trigger (precommit, commitmsg, prepush)"),console.log(" -w, --workflow <id> Workflow id to run"),console.log(" --fix Auto-fix issues where supported"),console.log(" --dry-run Preview mutations without writing"),console.log(" --only <step> Run only a specific step"),console.log(" --config <path> Config directory (default: .)"),console.log(" -v, --verbose Show stats and issues for all steps"),console.log(" --json Output results as JSON"),console.log(" --changed Only check files changed in git"),console.log(" -h, --help Show this help"),W(void 0);let n=N({renderer:$,sink:U.stdout()}),r=e.event,i=e.workflow,l=e.fix??!1,a=e["dry-run"]??!1,t=e.only,T=e._,v=e.verbose??!1,g=e.json??!1,j=e.changed??!1;if(r===void 0&&i===void 0)return console.error("Error: specify -e <event> or -w <workflow-id>. Use --help for usage."),await n.close(),c({exitCode:1});let h=V();h.register(z),o?.tools!==void 0&&h.registerAll(o.tools);let p=e.config??".",d=await q(p);if(d===null)return console.error("Error: no .eser/manifest.yml found in current directory."),await n.close(),c({exitCode:1});let b;if(j)try{b=await H`git diff --name-only HEAD`.cwd(p).noThrow().lines()}catch{n.writeln(F("Warning: could not run git, running without file filtering."))}let y=[],M={root:p,fix:l,dryRun:a,only:t,args:T,changedFiles:b,onStepStart:void 0,onStepEnd:g?void 0:f=>{if(console.log(se(f.name,f,v)),!f.passed||v)for(let u of f.issues){let R=u.path!==void 0?u.line!==void 0?`${u.path}:${u.line}`:u.path:"";console.log(` ${$.render([x("\u2717")])} ${R}${R.length>0?": ":""}${u.message}`)}},onMutations:async f=>{if(!a)for(let u of f)u.oldContent!==u.newContent&&await _.fs.writeTextFile(u.path,u.newContent)}};try{let f=!0,u=0,R=0;if(r!==void 0){let w=await k(Q(r,d.workflows,h,M));if(S(w))throw new Error(w.error.message);for(let m of w.value){y.push(m),m.passed||(f=!1);for(let E of m.steps)E.passed||(R++,u+=E.issues.length)}}else{let w=await k(K(i,d,h,M));if(S(w))throw new Error(w.error.message);let m=w.value;y.push(m),f=m.passed;for(let E of m.steps)E.passed||(R++,u+=E.issues.length)}return g&&console.log(JSON.stringify(y,null,2)),f?(g||n.writeln(C(`
4
4
  All checks passed!`)),await n.close(),W(void 0)):(g||n.writeln(x(`
5
5
  ${R} check(s) failed with ${u} issue(s)`)),await n.close(),c({exitCode:1}))}catch(f){return n.writeln(x(`Error: ${f instanceof Error?f.message:String(f)}`)),await n.close(),c({exitCode:1})}};export{pe as main};
@@ -0,0 +1,4 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{d as B}from"./chunk-WZHVKEPB.js";import"./chunk-NY4W44PI.js";import"./chunk-2HSGE3TL.js";import{c as W,d as X}from"./chunk-2LF7QSIN.js";import{a as _,k as j}from"./chunk-DPZJWN2Y.js";import{d as g,e as N,f as U,h as $,k as G,o as L,z as M}from"./chunk-TMMAF763.js";import{b as E,c as V}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{a as D,b as A,g as F}from"./chunk-YACXTCWF.js";import{f as R,h as O,k as T}from"./chunk-SHN5MT56.js";import{c as v,d as o,f as l,g as P,h,k as I}from"./chunk-YVN2NZL4.js";import{a as S,b as w}from"./chunk-FFWPJP7A.js";import{i as y}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var ue=async t=>{let e=R({renderer:T.ansi(),sink:O.stdout()}),i=y.process.cwd(),n=t?.includes("--unattended")??!1,r=z(t,"--max-turns")??10,p=z(t,"--max-iterations")??50;if(!await M(i))return e.writeln(l(`noskills not initialized. Run: ${V("init")}`)),await e.close(),w({exitCode:1});let x=U(t),c=await N(i,x);if(c.phase!=="EXECUTING"&&c.phase!=="SPEC_APPROVED")return e.writeln(l(`Cannot run from phase: ${c.phase}`)),e.writeln(o("Must be in SPEC_APPROVED or EXECUTING to start.")),await e.close(),w({exitCode:1});if(c.phase==="SPEC_APPROVED"){e.writeln(o("Starting execution from approved spec..."));let s=j(c);await $(i,s)}let u=await G(i);if(u===null)return e.writeln(l("Config not found.")),await e.close(),w({exitCode:1});e.writeln(v(`${E()} run`)),e.writeln(o(`Mode: ${n?"unattended":"interactive"}, max-turns: ${r}, max-iterations: ${p}`)),e.writeln("");let m=0,d=0;for(;m<p;){m++;let s=await g(i);if(s.phase==="COMPLETED"){e.writeln(""),e.writeln(P("\u2714")," Spec completed!"),e.writeln(` Iterations: ${s.execution.iteration}`),e.writeln(` Decisions: ${s.decisions.length}`);break}if(s.phase==="BLOCKED"){let a=s.execution.lastProgress??"Unknown";if(e.writeln(""),e.writeln(h("\u26A0")," Execution blocked: ",o(a)),n){await Z(i,a,m),e.writeln(o("Logged to .eser/.state/blocked.log. Resolve and re-run.")),d=1;break}let C=A(),f=await F(C,{message:"Enter resolution (or leave empty to stop):"});if(D(f)||f===""){e.writeln(o("Stopped by user."));break}let k=_(s,"EXECUTING");await $(i,{...k,execution:{...k.execution,lastProgress:`Resolved: ${f}`}});continue}if(s.phase!=="EXECUTING"){e.writeln(l(`Unexpected phase: ${s.phase}. Stopping.`)),d=1;break}let H=(await L(i)).filter(a=>u.concerns.includes(a.id)),q=await W(i),K=X(u.tools),J=B(s,H,q,u,void 0,void 0,void 0,K),Q=Y(J);e.writeln(I(`\u2500\u2500 Iteration ${m}`),o(` (execution: ${s.execution.iteration}, debt: ${s.execution.debt?.items.length??0})`)),s.execution.lastProgress!==null&&e.writeln(o(` Last: ${s.execution.lastProgress}`)),s.execution.lastVerification?.passed===!1&&e.writeln(l(" Verification failed \u2014 agent will fix")),s.execution.debt!==null&&e.writeln(h(` Debt: ${s.execution.debt.items.length} items`)),e.writeln(o(" Spawning agent..."));try{await(await import("./mod-7ICCX4OY.js")).exec`claude -p ${Q} --max-turns ${String(r)} --output-format json`.noThrow().text()}catch{e.writeln(l(" Failed to spawn claude CLI. Is it installed?")),d=1;break}e.writeln(o(" Agent exited. Stop hook captured state."));let b=await g(i);if(u.autoCommit===!0&&u.allowGit!==!1)try{let a=await import("./mod-7ICCX4OY.js");if((await a.exec`git diff --name-only`.noThrow().text()).trim().length>0){await a.exec`git add -A`.noThrow().text();let f=`noskills: iteration ${b.execution.iteration} \u2014 ${b.execution.lastProgress??"progress"}`;await a.exec`git commit -m ${f}`.noThrow().text(),e.writeln(o(" Auto-committed."))}}catch{e.writeln(o(" Auto-commit failed (non-fatal)."))}}return m>=p&&(e.writeln(""),e.writeln(h("\u26A0"),` Max iterations (${p}) reached. Stopping.`),d=2),await e.close(),d!==0?w({exitCode:d}):S(void 0)},Y=t=>{let e=[];if(e.push(t.meta.resumeHint),e.push(""),t.meta.spec!==null&&(e.push(`Working on spec: ${t.meta.spec}`),e.push("")),"instruction"in t&&(e.push(t.instruction),e.push("")),"previousIterationDebt"in t){let n=t.previousIterationDebt;if(n!==void 0){e.push(`DEBT from iteration ${n.fromIteration} (address first):`);for(let r of n.items)e.push(`- ${r}`);e.push("")}}if("statusReportRequired"in t){let n=t.statusReport;if(n!==void 0){e.push("Report against these acceptance criteria:");for(let r of n.criteria)e.push(`- ${r}`);e.push("")}}if("verificationFailed"in t&&t.verificationFailed===!0&&(e.push("Test output:"),e.push(("verificationOutput"in t?t.verificationOutput:"")??""),e.push("")),t.behavioral.rules.length>0){e.push("Rules:");for(let n of t.behavioral.rules)e.push(`- ${n}`);e.push("")}if("context"in t){let n=t.context;if(n.concernReminders.length>0){e.push("Reminders:");for(let r of n.concernReminders)e.push(`- ${r}`);e.push("")}}let i=E();return e.push(`When done, report progress: ${i} next --answer="your progress"`),e.push(`If blocked, run: ${i} block "reason"`),e.push(`When all tasks are complete: ${i} done`),e.join(`
3
+ `)},z=(t,e)=>{if(t===void 0)return null;let i=`${e}=`;for(let n of t)if(n.startsWith(i)){let r=parseInt(n.slice(i.length),10);if(!isNaN(r)&&r>0)return r}return null},Z=async(t,e,i)=>{let n=`${t}/.eser/.state/blocked.log`,r=`[${new Date().toISOString()}] iteration=${i} reason=${e}
4
+ `;try{let{appendFileSync:p,mkdirSync:x}=await import("node:fs"),{dirname:c}=await import("node:path");x(c(n),{recursive:!0}),p(n,r)}catch{}};export{ue as main};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{f as w,h as g,k as y}from"./chunk-MBG7SPPO.js";import{b as m,d as p,f as C}from"./chunk-YVN2NZL4.js";import{b as x}from"./chunk-5MVJUALI.js";import{a as h,b as f}from"./chunk-FFWPJP7A.js";import{i as S}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var l=(e,r)=>typeof r=="string"?{command:r,description:e,workingDirectory:void 0,depends:[]}:{command:r.command,description:r.description??e,workingDirectory:r.workingDirectory,depends:r.depends??[]},k=(e,r,t=new Set,s=new Set)=>{if(s.has(e))return[];if(t.has(e))throw new Error(`Circular dependency detected: ${e} depends on itself (cycle in dependency chain)`);let n=r[e];if(n===void 0)throw new Error(`Unknown script dependency: "${e}"`);t.add(e);let c=l(e,n),o=[];for(let a of c.depends){let i=k(a,r,t,s);for(let d of i)s.has(d)||(o.push(d),s.add(d))}return s.add(e),o},P=()=>{let e=new URL("./main.ts",import.meta.url),r=e.protocol==="file:"?e.pathname:e.href;return`${S.process.execPath()} run --allow-all ${r}`},R=e=>{if(e==="eser"||e.startsWith("eser ")){let r=e.slice(4);return`${P()}${r}`}return e},$=async(e,r,t)=>{let s=R(e),n=t!==void 0&&t.length>0?`${s} ${t.join(" ")}`:s,c=r??".";return(await new x("sh",["-c",n]).cwd(c).stdout("inherit").stderr("inherit").noThrow().spawn()).code},O=async(e,r,t,s)=>{let n=w({renderer:y.ansi(),sink:g.stdout()}),c=k(e,t);for(let i of c){let d=l(i,t[i]);n.writeln(p(`$ ${i}`));let u=await $(d.command,d.workingDirectory);if(u!==0)return n.writeln(C(`Script dependency "${i}" failed with exit code ${u}`)),await n.close(),f({exitCode:u})}let o=l(e,t[e]);n.writeln(p(`$ ${e}`));let a=await $(o.command,o.workingDirectory,s);return a!==0?(await n.close(),f({exitCode:a})):(await n.close(),h(void 0))},B=e=>{let r=w({renderer:y.ansi(),sink:g.stdout()});r.writeln(m("Scripts:"));for(let[t,s]of Object.entries(e)){let n=l(t,s);r.writeln(m(` ${t.padEnd(20)} `),p(n.description))}r.writeln()};export{$ as executeCommand,l as parseScript,k as resolveDependencies,O as runScript,B as showScripts};
2
+ import{f as w,h as g,k as y}from"./chunk-SHN5MT56.js";import{b as m,d as p,f as C}from"./chunk-YVN2NZL4.js";import{b as x}from"./chunk-GVTM4EOU.js";import{a as h,b as f}from"./chunk-FFWPJP7A.js";import{i as S}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var l=(e,r)=>typeof r=="string"?{command:r,description:e,workingDirectory:void 0,depends:[]}:{command:r.command,description:r.description??e,workingDirectory:r.workingDirectory,depends:r.depends??[]},k=(e,r,t=new Set,s=new Set)=>{if(s.has(e))return[];if(t.has(e))throw new Error(`Circular dependency detected: ${e} depends on itself (cycle in dependency chain)`);let n=r[e];if(n===void 0)throw new Error(`Unknown script dependency: "${e}"`);t.add(e);let c=l(e,n),o=[];for(let a of c.depends){let i=k(a,r,t,s);for(let d of i)s.has(d)||(o.push(d),s.add(d))}return s.add(e),o},P=()=>{let e=new URL("./main.ts",import.meta.url),r=e.protocol==="file:"?e.pathname:e.href;return`${S.process.execPath()} run --allow-all ${r}`},R=e=>{if(e==="eser"||e.startsWith("eser ")){let r=e.slice(4);return`${P()}${r}`}return e},$=async(e,r,t)=>{let s=R(e),n=t!==void 0&&t.length>0?`${s} ${t.join(" ")}`:s,c=r??".";return(await new x("sh",["-c",n]).cwd(c).stdout("inherit").stderr("inherit").noThrow().spawn()).code},O=async(e,r,t,s)=>{let n=w({renderer:y.ansi(),sink:g.stdout()}),c=k(e,t);for(let i of c){let d=l(i,t[i]);n.writeln(p(`$ ${i}`));let u=await $(d.command,d.workingDirectory);if(u!==0)return n.writeln(C(`Script dependency "${i}" failed with exit code ${u}`)),await n.close(),f({exitCode:u})}let o=l(e,t[e]);n.writeln(p(`$ ${e}`));let a=await $(o.command,o.workingDirectory,s);return a!==0?(await n.close(),f({exitCode:a})):(await n.close(),h(void 0))},B=e=>{let r=w({renderer:y.ansi(),sink:g.stdout()});r.writeln(m("Scripts:"));for(let[t,s]of Object.entries(e)){let n=l(t,s);r.writeln(m(` ${t.padEnd(20)} `),p(n.description))}r.writeln()};export{$ as executeCommand,l as parseScript,k as resolveDependencies,O as runScript,B as showScripts};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{f as l,h as a,k as i}from"./chunk-MBG7SPPO.js";import{k as n}from"./chunk-YVN2NZL4.js";import"./chunk-PWLF3WXM.js";import{a as o}from"./chunk-ZEFYMWGZ.js";import"./chunk-MG65QJY6.js";import{a as t}from"./chunk-FFWPJP7A.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var v=["trace","debug","info","warn","error","fatal"],P=async m=>{let{flags:e}=o(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),r=l({renderer:i.ansi(),sink:a.stdout()});r.writeln(n(`
2
+ import{f as l,h as a,k as i}from"./chunk-SHN5MT56.js";import{k as n}from"./chunk-YVN2NZL4.js";import"./chunk-PWLF3WXM.js";import{a as o}from"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import{a as t}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var v=["trace","debug","info","warn","error","fatal"],P=async m=>{let{flags:e}=o(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),r=l({renderer:i.ansi(),sink:a.stdout()});r.writeln(n(`
3
3
  \u{1F680} Serving production build...
4
- `));let p=e.port,s=e["log-level"]??"info",u=v.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:g},{reactRenderer:c,reactHtmlShellBuilder:d},{reactPlugin:L},{createTailwindPlugin:f}]=await Promise.all([import("./main-BUEG2IMJ.js"),import("./mod-2PIV6QCE.js"),import("./mod-XEK7FROU.js"),import("./mod-RO7WP3SA.js")]);return await r.close(),await g({mode:"serve",port:p,logLevel:u,hmr:!1,renderer:c,htmlShell:d,frameworkPlugin:L,cssPlugin:f({globalCssPath:"src/app/styles/global.css"})}),t(void 0)};export{P as main};
4
+ `));let p=e.port,s=e["log-level"]??"info",u=v.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:g},{reactRenderer:c,reactHtmlShellBuilder:d},{reactPlugin:L},{createTailwindPlugin:f}]=await Promise.all([import("./main-JAGIKKVD.js"),import("./mod-OG7BBJP4.js"),import("./mod-NSL6IJRQ.js"),import("./mod-VZT7JWPZ.js")]);return await r.close(),await g({mode:"serve",port:p,logLevel:u,hmr:!1,renderer:c,htmlShell:d,frameworkPlugin:L,cssPlugin:f({globalCssPath:"src/app/styles/global.css"})}),t(void 0)};export{P as main};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as L,b as Y,h as G,i as O,m as K,o as A,p as D}from"./chunk-QMRKAC6C.js";import{e as F}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{i as f}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import{b as I}from"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";function q(e,s){let a={...e,...s},i=[];a.description&&i.push(`<meta name="description" content="${j(a.description)}">`),a.keywords&&a.keywords.length>0&&i.push(`<meta name="keywords" content="${j(a.keywords.join(", "))}">`),a.author&&i.push(`<meta name="author" content="${j(a.author)}">`),a.themeColor&&i.push(`<meta name="theme-color" content="${a.themeColor}">`);let n=[];return a.noIndex&&n.push("noindex"),a.noFollow&&n.push("nofollow"),n.length>0&&i.push(`<meta name="robots" content="${n.join(", ")}">`),a.canonicalUrl&&i.push(`<link rel="canonical" href="${j(a.canonicalUrl)}">`),i.push(`<meta property="og:type" content="${a.ogType||"website"}">`),i.push(`<meta property="og:title" content="${j(a.title)}">`),a.description&&i.push(`<meta property="og:description" content="${j(a.description)}">`),a.siteUrl&&i.push(`<meta property="og:url" content="${j(a.siteUrl)}">`),a.siteName&&i.push(`<meta property="og:site_name" content="${j(a.siteName)}">`),a.locale&&i.push(`<meta property="og:locale" content="${a.locale}">`),a.ogImage&&(i.push(`<meta property="og:image" content="${j(a.ogImage)}">`),i.push(`<meta property="og:image:alt" content="${j(a.title)}">`)),i.push('<meta name="twitter:card" content="summary_large_image">'),i.push(`<meta name="twitter:title" content="${j(a.title)}">`),a.description&&i.push(`<meta name="twitter:description" content="${j(a.description)}">`),a.twitterHandle&&(i.push(`<meta name="twitter:site" content="${j(a.twitterHandle)}">`),i.push(`<meta name="twitter:creator" content="${j(a.twitterHandle)}">`)),a.ogImage&&i.push(`<meta name="twitter:image" content="${j(a.ogImage)}">`),a.favicon&&i.push(`<link rel="icon" href="${j(a.favicon)}">`),i.join(`
2
+ import{a as L,b as Y,h as G,i as O,m as K,o as A,p as D}from"./chunk-FZ5WFU6R.js";import{e as F}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{i as f}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import{b as I}from"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";function q(e,s){let a={...e,...s},i=[];a.description&&i.push(`<meta name="description" content="${j(a.description)}">`),a.keywords&&a.keywords.length>0&&i.push(`<meta name="keywords" content="${j(a.keywords.join(", "))}">`),a.author&&i.push(`<meta name="author" content="${j(a.author)}">`),a.themeColor&&i.push(`<meta name="theme-color" content="${a.themeColor}">`);let n=[];return a.noIndex&&n.push("noindex"),a.noFollow&&n.push("nofollow"),n.length>0&&i.push(`<meta name="robots" content="${n.join(", ")}">`),a.canonicalUrl&&i.push(`<link rel="canonical" href="${j(a.canonicalUrl)}">`),i.push(`<meta property="og:type" content="${a.ogType||"website"}">`),i.push(`<meta property="og:title" content="${j(a.title)}">`),a.description&&i.push(`<meta property="og:description" content="${j(a.description)}">`),a.siteUrl&&i.push(`<meta property="og:url" content="${j(a.siteUrl)}">`),a.siteName&&i.push(`<meta property="og:site_name" content="${j(a.siteName)}">`),a.locale&&i.push(`<meta property="og:locale" content="${a.locale}">`),a.ogImage&&(i.push(`<meta property="og:image" content="${j(a.ogImage)}">`),i.push(`<meta property="og:image:alt" content="${j(a.title)}">`)),i.push('<meta name="twitter:card" content="summary_large_image">'),i.push(`<meta name="twitter:title" content="${j(a.title)}">`),a.description&&i.push(`<meta name="twitter:description" content="${j(a.description)}">`),a.twitterHandle&&(i.push(`<meta name="twitter:site" content="${j(a.twitterHandle)}">`),i.push(`<meta name="twitter:creator" content="${j(a.twitterHandle)}">`)),a.ogImage&&i.push(`<meta name="twitter:image" content="${j(a.ogImage)}">`),a.favicon&&i.push(`<link rel="icon" href="${j(a.favicon)}">`),i.join(`
3
3
  `)}function M(e,s){let a={...e,...s},i={"@context":"https://schema.org","@type":"WebSite",name:a.siteName,url:a.siteUrl,description:a.description},n={"@context":"https://schema.org","@type":"Organization",name:a.siteName,url:a.siteUrl,logo:a.ogImage},t=[i,n];return a.jsonLd&&t.push({"@context":"https://schema.org",...a.jsonLd}),t.map(p=>`<script type="application/ld+json">${JSON.stringify(p)}</script>`).join(`
4
4
  `)}function j(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}var V={title:"laroux.js 3.0",description:"Zero-configuration React Server Components on Deno 2.x. Modern, simple, and built with cutting-edge technology.",siteName:"laroux.js",siteUrl:"https://laroux.now",locale:"en_US",themeColor:"#7c3aed",favicon:"/favicon.svg",twitterHandle:"@eser",ogImage:"https://laroux.now/og-image.png",ogType:"website",keywords:["laroux","open source","community","development","react","server components","server actions","island architecture"],author:"Eser Ozvataf"};function Q(e){let s=e.entrypoint??"/client.js",a=e.chunkManifest?.buildId?`?v=${e.chunkManifest.buildId}`:`?v=${Date.now()}`,i=e.chunkManifest?.hmrEnabled?"":a,n=e.fontPreloads?.join(`
5
5
  `)??"",t=e.fontCSS?`<style>${e.fontCSS}</style>`:"",p=e.criticalChunks?.map(v=>`<link rel="modulepreload" href="${v}${a}">`).join(`
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{e as b,j as y,r as A,t as C,u as N,w as $,x,y as O,z as R}from"./chunk-TMMAF763.js";import{b as I,c as E}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f,h as w,k as S}from"./chunk-SHN5MT56.js";import{c as l,d as n,f as c,g as v}from"./chunk-YVN2NZL4.js";import{a as u,b as h}from"./chunk-FFWPJP7A.js";import{i as m}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var F=async t=>{let s=t?.[0];if(s==="start")return await P(t?.slice(1));if(s==="end")return await D(t?.slice(1));if(s==="list")return await M();if(s==="gc")return await K();let i=I(),e=f({renderer:S.ansi(),sink:w.stdout()});return e.writeln(`Usage: ${i} session <start | end | list | gc>`),e.writeln(""),e.writeln(n(" start --spec=<name> Bind to a spec")),e.writeln(n(" start --free Free mode (no enforcement)")),e.writeln(n(" start --auto Auto-detect spec or free")),e.writeln(n(" end [--id=<id>] End current/specific session")),e.writeln(n(" list Show active sessions")),e.writeln(n(" gc Remove stale sessions")),await e.close(),u(void 0)},P=async t=>{let s=f({renderer:S.ansi(),sink:w.stdout()}),i=m.process.cwd();if(!await R(i))return s.writeln(c("noskills is not initialized.")," Run: ",l(E("init"))),await s.close(),h({exitCode:1});let e=null,o=!1,d=!1;for(let r of t??[])r.startsWith("--spec=")?e=r.slice(7):r==="--free"?o=!0:r==="--auto"&&(d=!0);if(d){let p=(await y(i)).filter(L=>L.state.phase!=="COMPLETED"&&L.state.phase!=="IDLE");p.length===1?e=p[0].name:o=!0}if(e===null&&!o)return s.writeln(c("Specify --spec=<name>, --free, or --auto.")),s.writeln(n(`Example: ${I()} session start --spec=my-feature`)),await s.close(),h({exitCode:1});let a=null;if(e!==null)try{a=(await b(i,e)).phase}catch(r){let p=r instanceof Error?r.message:String(r);return s.writeln(c(`Error: ${p}`)),await s.close(),h({exitCode:1})}let g=O(),k={id:g,spec:e,mode:o?"free":"spec",phase:o?null:a,pid:0,startedAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),tool:"claude-code"};return await A(i,k),s.writeln(v("Session started.")),s.writeln(" ID: ",l(g)),s.writeln(" Mode: ",l(o?"free":"spec")),e!==null&&(s.writeln(" Spec: ",l(e)),a!==null&&s.writeln(" Phase: ",n(a))),s.writeln(""),s.writeln("Run: ",l(`export NOSKILLS_SESSION=${g}`)),await s.close(),u(void 0)},D=async t=>{let s=f({renderer:S.ansi(),sink:w.stdout()}),i=m.process.cwd(),e=null;for(let d of t??[])d.startsWith("--id=")&&(e=d.slice(5));return e===null&&(e=m.env.get("NOSKILLS_SESSION")??null),e===null?(s.writeln(c("No session specified. Use --id=<id> or set NOSKILLS_SESSION env var.")),await s.close(),h({exitCode:1})):(await N(i,e)?s.writeln(v("Session ended: "),n(e)):s.writeln(c(`Session not found: ${e}`)),await s.close(),u(void 0))},M=async()=>{let t=f({renderer:S.ansi(),sink:w.stdout()}),s=m.process.cwd(),i=await C(s);if(t.writeln(l("Sessions")),t.writeln(""),i.length===0)t.writeln(n(` No active sessions. Start one with: ${E("session start --spec=<name>")}`));else for(let e of i){let o=x(e),d=Date.now()-new Date(e.lastActiveAt).getTime(),a=Math.floor(d/6e4),g=a<60?`${a}min ago`:`${Math.floor(a/60)}h ago`,k=e.mode==="free"?"free":`spec:${e.spec??"?"}`,r=e.phase??"\u2014",p=o?c(" (stale)"):"";t.writeln(" ",l(e.id)," ",n(k.padEnd(25))," ",n(r.padEnd(18))," ",n(g),p)}return await t.close(),u(void 0)},K=async()=>{let t=f({renderer:S.ansi(),sink:w.stdout()}),s=m.process.cwd(),i=await $(s);if(i.length===0)t.writeln(n("No stale sessions to remove."));else{t.writeln(v(`Removed ${i.length} stale session(s):`));for(let e of i)t.writeln(" ",n(e))}return await t.close(),u(void 0)};export{F as main};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as Y}from"./chunk-NY4W44PI.js";import{a as _,d as U}from"./chunk-2ZYCRMUT.js";import{b as A,e as M,f as N,n as F,p as L}from"./chunk-DPZJWN2Y.js";import{a as b,c as g,e as O,f as V,i as v,j as W,z as P}from"./chunk-TMMAF763.js";import{b as E,c as R}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as y,h as C,k as $}from"./chunk-SHN5MT56.js";import{c as u,d as a,f as c,g as D,h as z,k as q}from"./chunk-YVN2NZL4.js";import{a as S,b as d}from"./chunk-FFWPJP7A.js";import{i as h}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var j=new Set(["new","list","help","next","approve","done","block","reset","cancel","wontfix","reopen","revisit","split"]),X=new Map([["next",()=>import("./next-TIUOHHFS.js")],["approve",()=>import("./approve-UWBYGXCF.js")],["done",()=>import("./done-A5VWIFOF.js")],["block",()=>import("./block-W76WKMS3.js")],["reset",()=>import("./reset-BJZ263XC.js")],["cancel",()=>import("./cancel-46C7E5N7.js")],["wontfix",()=>import("./wontfix-YSXRDPKA.js")],["reopen",()=>import("./reopen-G4IUIH73.js")]]);var pe=async r=>{let e=r?.[0];if(e==="new")return await B(r?.slice(1));if(e==="list")return await G(r?.slice(1));if(e==="help"||e===void 0){let p=E(),l=y({renderer:$.ansi(),sink:C.stdout()});return l.writeln(`Usage: ${p} spec <new <name> "desc" | list | <name> <command>>`),l.writeln(""),l.writeln(a(" Commands for a spec:")),l.writeln(a(" next, approve, done, block, reset, cancel, wontfix, reopen, revisit, split")),l.writeln(""),l.writeln(a(" Examples:")),l.writeln(a(` ${p} spec new my-feature "Add upload support"`)),l.writeln(a(` ${p} spec my-feature next`)),l.writeln(a(` ${p} spec my-feature next --answer="approve"`)),await l.close(),S(void 0)}let n=e,s=r?.[1];if(s===void 0)return await(await import("./status-ZE2SA6FP.js")).main([`--spec=${n}`]);if(s==="split")return await H([`--spec=${n}`,...r?.slice(2)??[]]);if(s==="revisit")return await J([`--spec=${n}`,...r?.slice(2)??[]]);let i=X.get(s);if(i!==void 0)return await(await i()).main([`--spec=${n}`,...r?.slice(2)??[]]);let o=y({renderer:$.ansi(),sink:C.stdout()});return o.writeln(c(`Unknown command: spec ${n} ${s}`)),o.writeln(a(" Valid: next, approve, done, block, reset, cancel, wontfix, reopen, revisit, split")),await o.close(),d({exitCode:1})},B=async r=>{let e=y({renderer:$.ansi(),sink:C.stdout()}),n=h.process.cwd();if(!await P(n))return e.writeln(c("noskills is not initialized.")," Run: ",u(R("init"))),await e.close(),d({exitCode:1});let s=null,i=[];if(r!==void 0){let m=!1;for(let f of r)f.startsWith("--name=")?(s=f.slice(7),m=!0):f.startsWith("-")||(!m&&s===null?(s=f,m=!0):i.push(f))}let o=i.join(" ");if(s===null||s.length===0)return e.writeln(c("Error: spec name is required.")),e.writeln(a("Example: "),u(`${E()} spec new photo-upload "photo upload feature"`)),await e.close(),d({exitCode:1});if(j.has(s))return e.writeln(c(`"${s}" is a reserved name.`),a(" Choose a different spec name.")),await e.close(),d({exitCode:1});let p=/^[a-z0-9][a-z0-9-]*[a-z0-9]$/;if(s.length>50||s.length>1&&!p.test(s)||s.length===1&&!/^[a-z0-9]$/.test(s))return e.writeln(c("Invalid spec name: "),u(s)),e.writeln(a("Must be lowercase, hyphens, numbers only. Max 50 chars. Regex: /^[a-z0-9][a-z0-9-]*[a-z0-9]$/")),await e.close(),d({exitCode:1});if(o.length===0)return e.writeln(c("Please provide a description: "),u(`${E()} spec new --name=${s} "photo upload feature"`)),await e.close(),d({exitCode:1});let l=`spec/${s}`,t=`${n}/${g.specDir(s)}`;try{return await h.fs.stat(t),e.writeln(c(`Spec "${s}" already exists.`),a(` Use a different --name or run \`${E()} reset --spec=${s}\` first.`)),await e.close(),d({exitCode:1})}catch{}let w=b(),x=A(w,s,l,o);return await h.fs.mkdir(`${n}/${g.specDir(s)}`,{recursive:!0}),await v(n,s,x),e.writeln(D("\u2714")," Spec started: ",u(s)),e.writeln(" Directory: ",a(g.specDir(s))),e.writeln(" Branch: ",a(l)),e.writeln(" Phase: ",z("DISCOVERY")),e.writeln(""),e.writeln("Run ",u(R(`next --spec=${s}`))," to begin discovery questions."),await e.close(),S(void 0)},G=async r=>{let e=h.process.cwd(),n=_(r),s=await W(e),i=`${e}/${g.specsDir}`,o=new Set(s.map(t=>t.name)),p=[];for(let t of s)p.push({name:t.name,phase:t.state.phase,iteration:t.state.execution.iteration});try{for await(let t of h.fs.readDir(i))t.isDirectory&&!o.has(t.name)&&p.push({name:t.name,phase:"IDLE",iteration:0})}catch{}if(n==="json")return await U(p,"json"),S(void 0);let l=y({renderer:$.ansi(),sink:C.stdout()});if(l.writeln(u("Specs")),l.writeln(""),p.length===0)l.writeln(a(" No specs yet."));else for(let t of p){let w=t.phase==="COMPLETED"?D(t.phase):t.phase==="EXECUTING"?q(t.phase):t.phase==="BLOCKED"?c(t.phase):z(t.phase),x=t.phase==="EXECUTING"?a(` iteration ${t.iteration}`):"";l.writeln(" ",a("\u25CB")," ",t.name," ",w,x)}return await l.close(),S(void 0)},K=r=>{let e=[],n=0;for(;n<r.length;)if(r[n]==="--into"&&n+1<r.length){let s=r[n+1],i=s;n+2<r.length&&!r[n+2].startsWith("-")?(i=r[n+2],n+=3):n+=2,e.push({name:s,description:i})}else n+=1;return e},H=async r=>{let e=y({renderer:$.ansi(),sink:C.stdout()}),n=h.process.cwd();if(!await P(n))return e.writeln(c("noskills is not initialized.")," Run: ",u(R("init"))),await e.close(),d({exitCode:1});let s=V(r??[]);if(s===null)return e.writeln(c("Error: --spec=<name> is required.")),e.writeln(a("Example: "),u(`${E()} spec split --spec=parent --into name1 "desc1" --into name2 "desc2"`)),await e.close(),d({exitCode:1});let i;try{i=await O(n,s)}catch(t){let w=t instanceof Error?t.message:String(t);return e.writeln(c(`Error: ${w}`)),await e.close(),d({exitCode:1})}if(i.phase!=="DISCOVERY"&&i.phase!=="DISCOVERY_REVIEW")return e.writeln(c(`Cannot split spec in phase ${i.phase}. Must be in DISCOVERY or DISCOVERY_REVIEW.`)),await e.close(),d({exitCode:1});let o=K(r??[]);if(o.length<2){let t=Y(i.discovery.answers);if(!t.detected||t.proposals.length<2)return e.writeln(c("Error: at least 2 --into entries required, or discovery answers must contain 2+ independent areas.")),await e.close(),d({exitCode:1});let w=[];for(let m of t.proposals){let f=`${n}/${g.specDir(m.name)}`;await h.fs.mkdir(f,{recursive:!0});let T=i.discovery.answers.filter(I=>m.relevantAnswers.includes(I.questionId)),k=A(b(),m.name,`spec/${m.name}`);for(let I of T)k=M(k,I.questionId,I.answer);k=N(k),await v(n,m.name,k),w.push(m.name)}let x=F(i,"cancelled",`Split into: ${w.join(", ")}`);await v(n,s,x),e.writeln(D("Split complete."),` Created ${w.length} sub-specs:`);for(let m of w)e.writeln(" ",a("\u25CB")," ",u(m));return e.writeln("",a(`Parent spec "${s}" cancelled.`)),await e.close(),S(void 0)}let p=[];for(let t of o){let w=`${n}/${g.specDir(t.name)}`;await h.fs.mkdir(w,{recursive:!0});let m=A(b(),t.name,`spec/${t.name}`);for(let f of i.discovery.answers)m=M(m,f.questionId,f.answer);m=N(m),await v(n,t.name,m),p.push(t.name)}let l=F(i,"cancelled",`Split into: ${p.join(", ")}`);await v(n,s,l),e.writeln(D("Split complete."),` Created ${p.length} sub-specs:`);for(let t of p)e.writeln(" ",a("\u25CB")," ",u(t));return e.writeln("",a(`Parent spec "${s}" cancelled.`)),await e.close(),S(void 0)},J=async r=>{let e=y({renderer:$.ansi(),sink:C.stdout()}),n=h.process.cwd();if(!await P(n))return e.writeln(c("noskills is not initialized.")," Run: ",u(R("init"))),await e.close(),d({exitCode:1});let s=V(r??[]);if(s===null)return e.writeln(c("Error: --spec=<name> is required.")),e.writeln(a("Example: "),u(`${E()} spec revisit --spec=my-spec "reason for revisit"`)),await e.close(),d({exitCode:1});let i=(r??[]).find(t=>!t.startsWith("--")&&t!==s);if(i===void 0||i.trim().length===0)return e.writeln(c('Error: Reason is required: noskills spec revisit --spec=X "reason"')),await e.close(),d({exitCode:1});let o;try{o=await O(n,s)}catch(t){let w=t instanceof Error?t.message:String(t);return e.writeln(c(`Error: ${w}`)),await e.close(),d({exitCode:1})}if(o.phase==="DISCOVERY"||o.phase==="DISCOVERY_REVIEW"||o.phase==="SPEC_DRAFT"||o.phase==="SPEC_APPROVED")return e.writeln(c("Already in planning phase, no need to revisit.")),await e.close(),d({exitCode:1});if(o.phase==="COMPLETED")return e.writeln(c(`Spec is completed. Use \`${E()} reopen --spec=${s}\` instead.`)),await e.close(),d({exitCode:1});if(o.phase==="IDLE"||o.phase==="FREE")return e.writeln(c("No active spec to revisit.")),await e.close(),d({exitCode:1});let p=o.execution.completedTasks.length,l=L(o,i.trim());return await v(n,s,l),e.writeln(D("Revisit complete.")),e.writeln(" Phase: ",u("DISCOVERY"),a(` (revisited from ${o.phase})`)),p>0&&e.writeln(" Previous progress: ",u(`${p} tasks completed`)),e.writeln(" Reason: ",a(`"${i.trim()}"`)),e.writeln(" Discovery answers preserved \u2014 revise or re-approve."),await e.close(),S(void 0)};export{j as RESERVED_NAMES,pe as main};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as f,d as P}from"./chunk-5N2QHREH.js";import"./chunk-2HSGE3TL.js";import{a as R,b as S}from"./chunk-3F23SLJA.js";import"./chunk-NY4W44PI.js";import{a as k,d as w}from"./chunk-V3NJTF2Y.js";import{e as b,f as x,k as D,o as v,r as O}from"./chunk-PIV56NIC.js";import{c as h}from"./chunk-MPGRKZIA.js";import"./chunk-2XNFZXHY.js";import{f as d,h as u,k as m}from"./chunk-MBG7SPPO.js";import{c as i,d as r,f as c,g as y,h as p,k as I}from"./chunk-YVN2NZL4.js";import{a as l,b as E}from"./chunk-FFWPJP7A.js";import{i as C}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var W=async g=>{let t=C.process.cwd(),o=k(g);if(!await O(t)){if(o==="json")await w({error:"noskills is not initialized"},o);else{let s=d({renderer:m.ansi(),sink:u.stdout()});s.writeln(c("noskills is not initialized.")," Run: ",i(h("init"))),await s.close()}return E({exitCode:1})}let V=x(g),e=await b(t,V),n=await D(t),T={phase:e.phase,spec:e.spec,branch:e.branch,discovery:e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REVIEW"?{answered:e.discovery.answers.length,total:f.length}:void 0,execution:e.phase==="EXECUTING"||e.phase==="BLOCKED"?{iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,debt:e.execution.debt?.items.length??0,verificationPassed:e.execution.lastVerification?.passed??null}:void 0,concerns:n?.concerns??[],tools:n?.tools??[],decisions:e.decisions.length};if(o==="json"){let a=(await v(t)).filter(N=>n!==null&&n.concerns.includes(N.id)),$=await R(t),j=S(n?.tools??[]),F=P(e,a,$,n,void 0,void 0,void 0,j);return await w({...T,...F},"json"),l(void 0)}{let s=d({renderer:m.ansi(),sink:u.stdout()});s.writeln(i(`${h("status")}`)),s.writeln("");let a=e.phase==="COMPLETED"?y(e.phase):e.phase==="BLOCKED"?c(e.phase):e.phase==="EXECUTING"?I(e.phase):p(e.phase);s.writeln(" Phase: ",a),e.spec!==null&&s.writeln(" Spec: ",i(e.spec)),e.branch!==null&&s.writeln(" Branch: ",e.branch),(e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REVIEW")&&s.writeln(` Discovery: ${e.discovery.answers.length}/${f.length} questions answered`),e.phase==="EXECUTING"&&(s.writeln(` Iteration: ${e.execution.iteration}`),e.execution.lastProgress!==null&&s.writeln(" Progress: ",r(e.execution.lastProgress)),e.execution.debt!==null&&s.writeln(p(` Debt: ${e.execution.debt.items.length} items`))),n!==null&&(s.writeln(""),n.concerns.length>0&&s.writeln(" Concerns: ",r(n.concerns.join(", "))),n.tools.length>0&&s.writeln(" Tools: ",r(n.tools.join(", ")))),e.decisions.length>0&&(s.writeln(""),s.writeln(` Decisions: ${e.decisions.length}`)),await s.close()}return l(void 0)};export{W as main};
2
+ import{a as f,d as P}from"./chunk-WZHVKEPB.js";import"./chunk-NY4W44PI.js";import"./chunk-2HSGE3TL.js";import{a as k,d as w}from"./chunk-2ZYCRMUT.js";import{c as R,d as S}from"./chunk-2LF7QSIN.js";import{e as b,f as x,k as D,o as v,z as O}from"./chunk-TMMAF763.js";import{c as h}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as d,h as u,k as m}from"./chunk-SHN5MT56.js";import{c as i,d as r,f as c,g as y,h as p,k as I}from"./chunk-YVN2NZL4.js";import{a as l,b as E}from"./chunk-FFWPJP7A.js";import{i as C}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var W=async g=>{let t=C.process.cwd(),o=k(g);if(!await O(t)){if(o==="json")await w({error:"noskills is not initialized"},o);else{let s=d({renderer:m.ansi(),sink:u.stdout()});s.writeln(c("noskills is not initialized.")," Run: ",i(h("init"))),await s.close()}return E({exitCode:1})}let V=x(g),e=await b(t,V),n=await D(t),T={phase:e.phase,spec:e.spec,branch:e.branch,discovery:e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REVIEW"?{answered:e.discovery.answers.length,total:f.length}:void 0,execution:e.phase==="EXECUTING"||e.phase==="BLOCKED"?{iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,debt:e.execution.debt?.items.length??0,verificationPassed:e.execution.lastVerification?.passed??null}:void 0,concerns:n?.concerns??[],tools:n?.tools??[],decisions:e.decisions.length};if(o==="json"){let a=(await v(t)).filter(N=>n!==null&&n.concerns.includes(N.id)),$=await R(t),j=S(n?.tools??[]),F=P(e,a,$,n,void 0,void 0,void 0,j);return await w({...T,...F},"json"),l(void 0)}{let s=d({renderer:m.ansi(),sink:u.stdout()});s.writeln(i(`${h("status")}`)),s.writeln("");let a=e.phase==="COMPLETED"?y(e.phase):e.phase==="BLOCKED"?c(e.phase):e.phase==="EXECUTING"?I(e.phase):p(e.phase);s.writeln(" Phase: ",a),e.spec!==null&&s.writeln(" Spec: ",i(e.spec)),e.branch!==null&&s.writeln(" Branch: ",e.branch),(e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REVIEW")&&s.writeln(` Discovery: ${e.discovery.answers.length}/${f.length} questions answered`),e.phase==="EXECUTING"&&(s.writeln(` Iteration: ${e.execution.iteration}`),e.execution.lastProgress!==null&&s.writeln(" Progress: ",r(e.execution.lastProgress)),e.execution.debt!==null&&s.writeln(p(` Debt: ${e.execution.debt.items.length} items`))),n!==null&&(s.writeln(""),n.concerns.length>0&&s.writeln(" Concerns: ",r(n.concerns.join(", "))),n.tools.length>0&&s.writeln(" Tools: ",r(n.tools.join(", ")))),e.decisions.length>0&&(s.writeln(""),s.writeln(` Decisions: ${e.decisions.length}`)),await s.close()}return l(void 0)};export{W as main};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{c as w}from"./chunk-3F23SLJA.js";import{k as u}from"./chunk-PIV56NIC.js";import{c as g}from"./chunk-MPGRKZIA.js";import"./chunk-2XNFZXHY.js";import{f as p,h as d,k as f}from"./chunk-MBG7SPPO.js";import{c as m,d as r,f as c,g as n}from"./chunk-YVN2NZL4.js";import{a as o,b as a}from"./chunk-FFWPJP7A.js";import{i as l}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var v=async h=>{let s=p({renderer:f.ansi(),sink:d.stdout()}),t=l.process.cwd(),e=await u(t);if(e===null)return s.writeln(c("noskills is not initialized.")," Run: ",m(g("init"))),await s.close(),a({exitCode:1});s.writeln(r("Syncing tool files..."));let i=await w(t,e.tools,e);for(let y of i)s.writeln(" ",n("\u2714"),` ${y}`);return i.length===0&&s.writeln(r(" No tools configured.")),s.writeln(""),s.writeln(n("Done.")),await s.close(),o(void 0)};export{v as main};
2
+ import{e as w}from"./chunk-2LF7QSIN.js";import{k as u}from"./chunk-TMMAF763.js";import{c as g}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f as p,h as d,k as f}from"./chunk-SHN5MT56.js";import{c as m,d as r,f as c,g as n}from"./chunk-YVN2NZL4.js";import{a as o,b as a}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 v=async h=>{let s=p({renderer:f.ansi(),sink:d.stdout()}),t=l.process.cwd(),e=await u(t);if(e===null)return s.writeln(c("noskills is not initialized.")," Run: ",m(g("init"))),await s.close(),a({exitCode:1});s.writeln(r("Syncing tool files..."));let i=await w(t,e.tools,e);for(let y of i)s.writeln(" ",n("\u2714"),` ${y}`);return i.length===0&&s.writeln(r(" No tools configured.")),s.writeln(""),s.writeln(n("Done.")),await s.close(),o(void 0)};export{v as main};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{c as a,d as b,e as c,f as d}from"./chunk-5JV6KQMP.js";import"./chunk-LWQPFCWC.js";import"./chunk-NVPQJFAI.js";import"./chunk-3OG2MEF2.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import"./chunk-NBA6EFWU.js";import"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{b as build,a as createBuildContext,c as ensureBuildIsReady,d as watch};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as e,b as s,c as o,d as l,e as r,f as a,g as t}from"./chunk-TNWF37YQ.js";import"./chunk-EXP2TZZC.js";import"./chunk-J2Z7NG2X.js";import"./chunk-MBG7SPPO.js";import"./chunk-YVN2NZL4.js";import"./chunk-5MVJUALI.js";import"./chunk-QBQAOXEV.js";import"./chunk-PWLF3WXM.js";import{b as n}from"./chunk-ZEFYMWGZ.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var d=new n("system").description("Commands related with this CLI").command(new n("install").description("Install eser CLI globally").run(e)).command(new n("uninstall").description("Uninstall eser CLI globally").run(s)).command(new n("update").description("Update eser CLI to the latest version").run(o)).command(new n("completions").description("Generate shell completion scripts").flag({name:"shell",type:"string",description:"Shell type: bash, zsh, or fish"}).run(l)).command(new n("version").description("Show version and check for updates").flag({name:"bare",type:"boolean",description:"Print version number only"}).run(r)).command(new n("doctor").description("Run diagnostic checks").run(a)).command(new n("info").description("Show runtime and execution context diagnostics").run(t));export{d as systemCommand};
2
+ import{a as e,b as s,c as o,d as l,e as r,f as a,g as t}from"./chunk-TZDEJTLC.js";import"./chunk-L5OC7F24.js";import"./chunk-J2Z7NG2X.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import"./chunk-DM6U63HP.js";import"./chunk-PWLF3WXM.js";import{b as n}from"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var d=new n("system").description("Commands related with this CLI").command(new n("install").description("Install eser CLI globally").run(e)).command(new n("uninstall").description("Uninstall eser CLI globally").run(s)).command(new n("update").description("Update eser CLI to the latest version").run(o)).command(new n("completions").description("Generate shell completion scripts").flag({name:"shell",type:"string",description:"Shell type: bash, zsh, or fish"}).run(l)).command(new n("version").description("Show version and check for updates").flag({name:"bare",type:"boolean",description:"Print version number only"}).run(r)).command(new n("doctor").description("Run diagnostic checks").run(a)).command(new n("info").description("Show runtime and execution context diagnostics").run(t));export{d as systemCommand};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{e as U}from"./chunk-BNMKKNLB.js";import{a as R,d as w}from"./chunk-P2MUEKFT.js";import{k}from"./chunk-GKOMIH2B.js";import{f as y,h as g,k as f}from"./chunk-MBG7SPPO.js";import{g as m,k as l}from"./chunk-YVN2NZL4.js";import{a as u}from"./chunk-MG65QJY6.js";import{a as o,b as n,c}from"./chunk-FFWPJP7A.js";import{i as d}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var b=r=>R(async s=>{try{let t=await k(r.registrySource,{verbose:r.verbose,local:r.local}),e=t.recipes.find(p=>p.name===r.recipeName);if(e===void 0)return n({_tag:"RecipeNotFound",message:`Recipe '${r.recipeName}' not found. Run \`eser kit list\` to see available recipes.`});let a=await U(e,{cwd:r.cwd,registryUrl:t.registryUrl,force:!0,dryRun:r.dryRun,verbose:r.verbose}),i=r.dryRun?"Would update":"Updated";s.out.writeln(m(`\u2713 ${i} ${a.written.length} file(s) from ${e.name}`));for(let p of a.written)s.out.writeln(` \u2192 ${p}`);return o({recipe:e,result:a})}catch(t){let e=t instanceof Error?t.message:String(t);return n({_tag:"ApplyError",message:e})}});var S=async r=>{let s=u(r??[],{string:["registry"],boolean:["dry-run","verbose","local"]}),t=s._[0],e=y({renderer:f.ansi(),sink:g.stdout()});if(t===void 0)return e.writeln("Usage: eser kit update <recipe> [--registry <url>] [--dry-run]"),e.writeln(),e.writeln("Re-fetches and re-applies a recipe, overwriting existing files."),await e.close(),o(void 0);let a=s["dry-run"]===!0;a?e.writeln(l(`
2
+ import{e as U}from"./chunk-X3L6GBUX.js";import{a as R,d as w}from"./chunk-P2MUEKFT.js";import{k}from"./chunk-NMSD4ZXJ.js";import{f as y,h as g,k as f}from"./chunk-SHN5MT56.js";import{g as m,k as l}from"./chunk-YVN2NZL4.js";import{a as u}from"./chunk-MG65QJY6.js";import{a as o,b as n,c}from"./chunk-FFWPJP7A.js";import{i as d}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var b=r=>R(async s=>{try{let t=await k(r.registrySource,{verbose:r.verbose,local:r.local}),e=t.recipes.find(p=>p.name===r.recipeName);if(e===void 0)return n({_tag:"RecipeNotFound",message:`Recipe '${r.recipeName}' not found. Run \`eser kit list\` to see available recipes.`});let a=await U(e,{cwd:r.cwd,registryUrl:t.registryUrl,force:!0,dryRun:r.dryRun,verbose:r.verbose}),i=r.dryRun?"Would update":"Updated";s.out.writeln(m(`\u2713 ${i} ${a.written.length} file(s) from ${e.name}`));for(let p of a.written)s.out.writeln(` \u2192 ${p}`);return o({recipe:e,result:a})}catch(t){let e=t instanceof Error?t.message:String(t);return n({_tag:"ApplyError",message:e})}});var S=async r=>{let s=u(r??[],{string:["registry"],boolean:["dry-run","verbose","local"]}),t=s._[0],e=y({renderer:f.ansi(),sink:g.stdout()});if(t===void 0)return e.writeln("Usage: eser kit update <recipe> [--registry <url>] [--dry-run]"),e.writeln(),e.writeln("Re-fetches and re-applies a recipe, overwriting existing files."),await e.close(),o(void 0);let a=s["dry-run"]===!0;a?e.writeln(l(`
3
3
  Dry run: updating ${t}
4
4
  `)):e.writeln(l(`
5
5
  Updating ${t}...
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-DLBRD3UT.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-R4GKIRAI.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-WI2RW3YL.js";import"./chunk-IIFFSCDJ.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import"./chunk-O325ZU5M.js";import"./chunk-YACXTCWF.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as checkCircularDeps,b as checkCircularDepsHandler,c as handleCli,d as main};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-73IMECRI.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{b as main,a as validateCommitMsg};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-OLHBVIWG.js";import"./chunk-IIFFSCDJ.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import"./chunk-O325ZU5M.js";import"./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-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as checkDocs,b as checkDocsHandler,c as handleCli,d as main};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-C7NZBKCW.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-H6P3EACV.js";import"./chunk-IIFFSCDJ.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import"./chunk-O325ZU5M.js";import"./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-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as checkExportNames,b as checkExportNamesHandler,c as handleCli,d as main};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-J5HFD7AQ.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-XUV7CW3L.js";import"./chunk-3XJLLDR5.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-JFKHBLJB.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-2YTW3JQ6.js";import"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import"./chunk-O325ZU5M.js";import"./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"./chunk-GVTM4EOU.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as main,b as run,a as tool,c as validator};