eser 4.1.43 → 4.1.47

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 (216) hide show
  1. package/chunks/{add-IM5JC6QA.js → add-V7YYHLFH.js} +1 -1
  2. package/chunks/ajan-JKACPKCP.js +2 -0
  3. package/chunks/{approve-4CQFJU5A.js → approve-URMQ77UE.js} +1 -1
  4. package/chunks/{ask-UTEI7KGQ.js → ask-UCPMMIAF.js} +1 -1
  5. package/chunks/{block-MQTVULY3.js → block-5NWZBEXW.js} +1 -1
  6. package/chunks/{build-IRLEBMJE.js → build-BUB6OJCI.js} +2 -2
  7. package/chunks/cancel-V6OK6U73.js +2 -0
  8. package/chunks/{changelog-gen-USXHO6PE.js → changelog-gen-TEI4IBNO.js} +1 -1
  9. package/chunks/chunk-26ZFSXSK.js +3 -0
  10. package/chunks/{chunk-IWXI3UYI.js → chunk-37GFWQQ3.js} +1 -1
  11. package/chunks/{chunk-V3NJTF2Y.js → chunk-3AA3RXKD.js} +1 -1
  12. package/chunks/{chunk-LSET5TD3.js → chunk-3IZX4OZ7.js} +1 -1
  13. package/chunks/{chunk-3U5M6YO6.js → chunk-3PCHQM4S.js} +1 -1
  14. package/chunks/{chunk-VVWAUS3D.js → chunk-3QF3I2RD.js} +1 -1
  15. package/chunks/{chunk-C7EBLUGW.js → chunk-3QH27NOC.js} +1 -1
  16. package/chunks/{chunk-4COCZPO5.js → chunk-4HXAC4WN.js} +1 -1
  17. package/chunks/{chunk-TYLYMZQC.js → chunk-4QDEJUAF.js} +1 -1
  18. package/chunks/{chunk-RIOYVPPP.js → chunk-4ZVFKZ5S.js} +1 -1
  19. package/chunks/{chunk-CXTPYPO4.js → chunk-5PH7JRXR.js} +1 -1
  20. package/chunks/{chunk-E423U2PP.js → chunk-5QRJ7OJK.js} +1 -1
  21. package/chunks/chunk-6PRIUPN4.js +5 -0
  22. package/chunks/{chunk-KZAPWWOT.js → chunk-7XVIW7H6.js} +1 -1
  23. package/chunks/{chunk-IBBGWXAI.js → chunk-A2IW6BXT.js} +1 -1
  24. package/chunks/{chunk-YJ3ICGHV.js → chunk-AP7A6Y5Z.js} +1 -1
  25. package/chunks/{chunk-YURNTYEP.js → chunk-BJLUDX4R.js} +1 -1
  26. package/chunks/chunk-BLXGL5MA.js +4 -0
  27. package/chunks/{chunk-WPOZMPUR.js → chunk-CNHUVWV5.js} +1 -1
  28. package/chunks/{chunk-LYKN5EIM.js → chunk-CXTOTN4Z.js} +1 -1
  29. package/chunks/{chunk-IQQEVKBP.js → chunk-EGEJQP7D.js} +1 -1
  30. package/chunks/{chunk-7RL5ZFGE.js → chunk-EKUJSZIR.js} +1 -1
  31. package/chunks/{chunk-2UHHAPKY.js → chunk-ENTSZDR6.js} +1 -1
  32. package/chunks/{chunk-UCLOGVMF.js → chunk-F2YHX6DL.js} +30 -30
  33. package/chunks/{chunk-BNMKKNLB.js → chunk-F35K7YVH.js} +1 -1
  34. package/chunks/{chunk-H6HLRKRK.js → chunk-F44CX3KC.js} +4 -4
  35. package/chunks/{chunk-WWI6727S.js → chunk-F4G6QSSJ.js} +1 -1
  36. package/chunks/chunk-FW3ETRQ5.js +17 -0
  37. package/chunks/{chunk-SH4H7OLV.js → chunk-G5VGZMKA.js} +1 -1
  38. package/chunks/{chunk-VE6XM5OZ.js → chunk-GWZUQPFD.js} +1 -1
  39. package/chunks/{chunk-SK6QUPJR.js → chunk-HCYIL6IJ.js} +1 -1
  40. package/chunks/{chunk-6V6C6MWY.js → chunk-HP5W5XT6.js} +1 -1
  41. package/chunks/{chunk-QMRKAC6C.js → chunk-HVTJ5LVU.js} +1 -1
  42. package/chunks/{chunk-XOSAN6PX.js → chunk-JHEL4OFF.js} +1 -1
  43. package/chunks/{chunk-UQRZJPYH.js → chunk-JLRVMMMH.js} +1 -1
  44. package/chunks/{chunk-2N62LL55.js → chunk-JUOSGSVB.js} +1 -1
  45. package/chunks/{chunk-OWQXQ33F.js → chunk-L2E2H7YT.js} +1 -1
  46. package/chunks/{chunk-L7RS6MQ5.js → chunk-LGNGLAV3.js} +1 -1
  47. package/chunks/{chunk-2OKCK56H.js → chunk-LWWZT2AB.js} +1 -1
  48. package/chunks/{chunk-EXP2TZZC.js → chunk-MBCPGD5L.js} +1 -1
  49. package/chunks/{chunk-ZRUM5PE7.js → chunk-MCWDLVWU.js} +1 -1
  50. package/chunks/{chunk-ZEFYMWGZ.js → chunk-MJ2IPSAE.js} +2 -2
  51. package/chunks/{chunk-Z2LXZLZV.js → chunk-NFZWSVJM.js} +1 -1
  52. package/chunks/chunk-NY4W44PI.js +2 -0
  53. package/chunks/{chunk-MPGRKZIA.js → chunk-OAT2D23A.js} +1 -1
  54. package/chunks/chunk-ORAOSL2W.js +2 -0
  55. package/chunks/{chunk-SF6FT44C.js → chunk-OWV223WQ.js} +1 -1
  56. package/chunks/{chunk-FODF5MI2.js → chunk-PLMZ3FYS.js} +1 -1
  57. package/chunks/chunk-R2W7BL7V.js +2 -0
  58. package/chunks/{chunk-BSV66I74.js → chunk-R7FADWXC.js} +1 -1
  59. package/chunks/chunk-RGT7SMKJ.js +4 -0
  60. package/chunks/{chunk-4EJVA4QA.js → chunk-RHEYIO4O.js} +1 -1
  61. package/chunks/{chunk-QD46ROBD.js → chunk-RVJZFWN7.js} +1 -1
  62. package/chunks/{chunk-H5GHXMIT.js → chunk-SRWZLNT6.js} +1 -1
  63. package/chunks/{chunk-GKOMIH2B.js → chunk-TEOMM3RD.js} +1 -1
  64. package/chunks/{chunk-QYMHLTVT.js → chunk-TYUSWY27.js} +1 -1
  65. package/chunks/{chunk-2BEIAJ5J.js → chunk-VSTGSR3G.js} +1 -1
  66. package/chunks/{chunk-WF6JNPZS.js → chunk-VV47GXU5.js} +1 -1
  67. package/chunks/{chunk-TELZ2ZFI.js → chunk-W724KQYO.js} +1 -1
  68. package/chunks/{chunk-3F23SLJA.js → chunk-W7OYXLGD.js} +28 -27
  69. package/chunks/{chunk-6VHZQNHX.js → chunk-WJKE6XHF.js} +1 -1
  70. package/chunks/{chunk-H7U2VQCK.js → chunk-Y3XXSUFP.js} +1 -1
  71. package/chunks/{chunk-SMKZDN2Q.js → chunk-YA4IPF62.js} +1 -1
  72. package/chunks/{chunk-IBB6UZR2.js → chunk-YBCZC5KZ.js} +1 -1
  73. package/chunks/chunk-YTF3BAQS.js +2 -0
  74. package/chunks/chunk-YW377352.js +10 -0
  75. package/chunks/{chunk-RFHWH6ZX.js → chunk-Z5P6PXQV.js} +1 -1
  76. package/chunks/{chunk-MBG7SPPO.js → chunk-ZC4F4MYU.js} +1 -1
  77. package/chunks/{chunk-3LDGQFQZ.js → chunk-ZCQ5CISX.js} +1 -1
  78. package/chunks/chunk-ZER2RYWJ.js +2 -0
  79. package/chunks/claude-code-S2SGKOBE.js +2 -0
  80. package/chunks/{clone-DSVKII72.js → clone-YEBQK7CG.js} +1 -1
  81. package/chunks/{cmd-YU4MVRRR.js → cmd-2DAVTVOF.js} +1 -1
  82. package/chunks/{commitmsg-FS52L6J5.js → commitmsg-3NLTGBA7.js} +2 -2
  83. package/chunks/{concern-4HFEHA2X.js → concern-RNNRCADI.js} +1 -1
  84. package/chunks/{deno-I5YAWOB6.js → deno-XQHOVHKR.js} +1 -1
  85. package/chunks/{dev-JQS5G6PA.js → dev-GHSKFRDU.js} +2 -2
  86. package/chunks/{done-OSUBA7YO.js → done-VSVUSYIS.js} +1 -1
  87. package/chunks/{file-tools-shared-LMF72D6S.js → file-tools-shared-BGQUI7QP.js} +1 -1
  88. package/chunks/{free-WTJTBNOK.js → free-L4KB3WSS.js} +1 -1
  89. package/chunks/{gh-PJ2JDGXG.js → gh-L3FPMN5H.js} +2 -2
  90. package/chunks/{gh-contributors-EIM2PLGS.js → gh-contributors-NT5WW72V.js} +1 -1
  91. package/chunks/{init-ZOMBOUG3.js → init-EL6YCHIE.js} +3 -3
  92. package/chunks/init-II65LYMV.js +2 -0
  93. package/chunks/{install-J4D2DGTQ.js → install-YVHT6UAG.js} +1 -1
  94. package/chunks/invoke-hook-QEE3PJBH.js +12 -0
  95. package/chunks/kiro-LNQTCWQU.js +2 -0
  96. package/chunks/{list-NS7ECFDY.js → list-AKS7CUO3.js} +1 -1
  97. package/chunks/{list-XFPTCIMR.js → list-BOLPKAEY.js} +1 -1
  98. package/chunks/{list-PSLAM3H6.js → list-VEGVTAKQ.js} +1 -1
  99. package/chunks/{load-config-OGSPRY4L.js → load-config-G4DHKB5K.js} +1 -1
  100. package/chunks/loader-command-I5DTYP25.js +2 -0
  101. package/chunks/loader-reactor-P6I3MX5L.js +2 -0
  102. package/chunks/{main-BUEG2IMJ.js → main-PTEEAWXX.js} +2 -2
  103. package/chunks/manager-ARXVYR4H.js +7 -0
  104. package/chunks/{manifest-4EA74HMS.js → manifest-3VJ4O6HR.js} +1 -1
  105. package/chunks/{mod-WOZXOD2F.js → mod-AD5UWQSM.js} +1 -1
  106. package/chunks/{mod-RO7WP3SA.js → mod-BKHQAEVL.js} +1 -1
  107. package/chunks/{mod-G7PJEGW6.js → mod-DXA25A4J.js} +1 -1
  108. package/chunks/mod-GXNNOTTG.js +2 -0
  109. package/chunks/mod-IALKEUJL.js +9 -0
  110. package/chunks/mod-ICWGLZBQ.js +2 -0
  111. package/chunks/{mod-Q6SI6S6S.js → mod-MVH3RFS3.js} +2 -2
  112. package/chunks/{mod-U2MNO6EC.js → mod-PZSJGUM7.js} +1 -1
  113. package/chunks/{mod-2PIV6QCE.js → mod-QWYXFGRG.js} +1 -1
  114. package/chunks/{mod-VRTH35WZ.js → mod-RF5F5WS2.js} +2 -2
  115. package/chunks/{mod-XEK7FROU.js → mod-RMDGRCBK.js} +1 -1
  116. package/chunks/mod-TB73AJG3.js +23 -0
  117. package/chunks/{mod-II7CSZUT.js → mod-YH5Z6G4Q.js} +1 -1
  118. package/chunks/{new-3ZN4U7FJ.js → new-VGL3IRFP.js} +3 -3
  119. package/chunks/next-RYENG2XC.js +9 -0
  120. package/chunks/{ollama-LD6OENM2.js → ollama-IRQSLTDB.js} +1 -1
  121. package/chunks/opencode-74XXXUQ2.js +2 -0
  122. package/chunks/purge-6IOKNHG6.js +5 -0
  123. package/chunks/{recipe-applier-6SGY2W3A.js → recipe-applier-TTZEZGSC.js} +1 -1
  124. package/chunks/{registry-fetcher-H63ZWZHU.js → registry-fetcher-SPENFEOH.js} +1 -1
  125. package/chunks/release-6GDD5THZ.js +9 -0
  126. package/chunks/{release-notes-FSDHH2Y2.js → release-notes-MZFILXWE.js} +1 -1
  127. package/chunks/{release-tag-IOH5HGAA.js → release-tag-LGZEFMKJ.js} +1 -1
  128. package/chunks/{reopen-7EX6OJ6E.js → reopen-XDNX2XRX.js} +1 -1
  129. package/chunks/{reset-IZ76OH4F.js → reset-TDBHFTWW.js} +1 -1
  130. package/chunks/rule-DUOZIDNM.js +7 -0
  131. package/chunks/{run-FGMEIO57.js → run-OCYNXRVD.js} +1 -1
  132. package/chunks/run-YK7DTHKW.js +4 -0
  133. package/chunks/{scripts-L2FZBUHU.js → scripts-7VDHDKFK.js} +1 -1
  134. package/chunks/{serve-VXA7O546.js → serve-5V65OPB2.js} +2 -2
  135. package/chunks/{server-KJW4HWK7.js → server-R347ON4B.js} +1 -1
  136. package/chunks/session-SOIP6NHS.js +2 -0
  137. package/chunks/spec-Y6K7CSBK.js +2 -0
  138. package/chunks/status-SXWEDQTL.js +2 -0
  139. package/chunks/{sync-M6DR7ZI4.js → sync-5XW5FTWS.js} +1 -1
  140. package/chunks/{system-DLK4HRFA.js → system-HNZLRJLH.js} +1 -1
  141. package/chunks/{system-X4X6JD4X.js → system-WX4PNZSQ.js} +1 -1
  142. package/chunks/{update-CV7JPZGM.js → update-522VXIKX.js} +1 -1
  143. package/chunks/validate-bom-XA7KZWTH.js +2 -0
  144. package/chunks/validate-case-conflict-QWOT7276.js +2 -0
  145. package/chunks/validate-circular-deps-IAC3BSYO.js +2 -0
  146. package/chunks/validate-commit-msg-M42NIQLD.js +2 -0
  147. package/chunks/validate-docs-DXY4C23P.js +2 -0
  148. package/chunks/validate-eof-M3LGJL64.js +2 -0
  149. package/chunks/validate-export-names-BQAH7J4F.js +2 -0
  150. package/chunks/validate-filenames-WYIWPR5V.js +2 -0
  151. package/chunks/validate-json-S2J5SSZS.js +2 -0
  152. package/chunks/validate-large-files-X4D3CL42.js +2 -0
  153. package/chunks/validate-licenses-6LB6MLQU.js +2 -0
  154. package/chunks/validate-line-endings-NX2XXGTH.js +2 -0
  155. package/chunks/validate-merge-conflict-3ZNS7HS2.js +2 -0
  156. package/chunks/validate-mod-exports-72EWWWMT.js +2 -0
  157. package/chunks/{validate-package-configs-ZO5YJE2D.js → validate-package-configs-55XAXICZ.js} +1 -1
  158. package/chunks/validate-secrets-5V7V65JA.js +2 -0
  159. package/chunks/validate-shebangs-XVHLZJKY.js +2 -0
  160. package/chunks/validate-submodules-Z6WRSMS5.js +2 -0
  161. package/chunks/validate-symlinks-FWV2RFCM.js +2 -0
  162. package/chunks/validate-toml-DTGDAUSH.js +2 -0
  163. package/chunks/validate-trailing-whitespace-5QSYKA6L.js +2 -0
  164. package/chunks/validate-yaml-SKE7CDCP.js +2 -0
  165. package/chunks/versions-MFY62V25.js +2 -0
  166. package/chunks/{watch-LW6FU2EL.js → watch-DBB4W5AE.js} +1 -1
  167. package/chunks/wontfix-D2ZHBGNH.js +2 -0
  168. package/eser.js +1 -1
  169. package/package.json +10 -1
  170. package/chunks/cancel-2QOM5WPD.js +0 -2
  171. package/chunks/chunk-5MVJUALI.js +0 -4
  172. package/chunks/chunk-GUPRQ2PC.js +0 -17
  173. package/chunks/chunk-JZ7DUWYC.js +0 -2
  174. package/chunks/chunk-OYNFK77H.js +0 -2
  175. package/chunks/chunk-PIV56NIC.js +0 -7
  176. package/chunks/chunk-V6YI7YJ4.js +0 -5
  177. package/chunks/chunk-VAIRJES2.js +0 -2
  178. package/chunks/chunk-VNJJQED3.js +0 -3
  179. package/chunks/chunk-ZJMX5J6E.js +0 -4
  180. package/chunks/claude-code-VX2T4YII.js +0 -2
  181. package/chunks/init-FEOHKH5H.js +0 -2
  182. package/chunks/invoke-hook-VIVTX5OJ.js +0 -11
  183. package/chunks/kiro-JGEZGFF3.js +0 -2
  184. package/chunks/mod-2J7TZ2PG.js +0 -2
  185. package/chunks/mod-KTGLCC3R.js +0 -2
  186. package/chunks/next-B7T3JEVA.js +0 -9
  187. package/chunks/opencode-ECTBCC3O.js +0 -2
  188. package/chunks/purge-GV7LXDF3.js +0 -5
  189. package/chunks/release-6I5TL34I.js +0 -9
  190. package/chunks/rule-CNBMT5LD.js +0 -3
  191. package/chunks/run-ZCVAL2V6.js +0 -4
  192. package/chunks/spec-TT5ZFPZF.js +0 -2
  193. package/chunks/status-TUG52D3I.js +0 -2
  194. package/chunks/validate-bom-MYISC3IT.js +0 -2
  195. package/chunks/validate-case-conflict-B737FXF2.js +0 -2
  196. package/chunks/validate-circular-deps-WME7VUO4.js +0 -2
  197. package/chunks/validate-commit-msg-HJ5MXYNE.js +0 -2
  198. package/chunks/validate-docs-CCYMKDXS.js +0 -2
  199. package/chunks/validate-eof-6WAM6VAY.js +0 -2
  200. package/chunks/validate-export-names-Q5FSXTV5.js +0 -2
  201. package/chunks/validate-filenames-JVBT2GXA.js +0 -2
  202. package/chunks/validate-json-UPGBABYE.js +0 -2
  203. package/chunks/validate-large-files-RJLMJSWM.js +0 -2
  204. package/chunks/validate-licenses-YW5CK3QF.js +0 -2
  205. package/chunks/validate-line-endings-3VNZ7KT6.js +0 -2
  206. package/chunks/validate-merge-conflict-SKWYYHFS.js +0 -2
  207. package/chunks/validate-mod-exports-OMUDATXK.js +0 -2
  208. package/chunks/validate-secrets-FV6672MD.js +0 -2
  209. package/chunks/validate-shebangs-N55SME72.js +0 -2
  210. package/chunks/validate-submodules-ADHLOUGA.js +0 -2
  211. package/chunks/validate-symlinks-4IIIP6AQ.js +0 -2
  212. package/chunks/validate-toml-OVIYGLPR.js +0 -2
  213. package/chunks/validate-trailing-whitespace-LWP5QEXS.js +0 -2
  214. package/chunks/validate-yaml-L7JCSGXY.js +0 -2
  215. package/chunks/versions-OKK45EDV.js +0 -2
  216. package/chunks/wontfix-JRU2EDAB.js +0 -2
@@ -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,q as o,r as p,s as q,t as r}from"./chunk-QMRKAC6C.js";import"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{j as chunkToInlineScript,l as createInlineRSCStream,k as createInlineTransformStream,q as createReactHtmlShellBuilder,o as createReactRenderer,m as generateInlineBootstrapScript,n as generateInlineCompletionScript,c as generateRSCPayloadScript,e as loadModuleMap,r as reactHtmlShellBuilder,p as reactRenderer,i as renderApp,f as renderRSC,h as renderRSCResponse,a as renderSSR,d as renderToReadableStream,b as serializeRSCPayload,g as streamToResponse};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,q as o,r as p,s as q,t as r}from"./chunk-HVTJ5LVU.js";import"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{j as chunkToInlineScript,l as createInlineRSCStream,k as createInlineTransformStream,q as createReactHtmlShellBuilder,o as createReactRenderer,m as generateInlineBootstrapScript,n as generateInlineCompletionScript,c as generateRSCPayloadScript,e as loadModuleMap,r as reactHtmlShellBuilder,p as reactRenderer,i as renderApp,f as renderRSC,h as renderRSCResponse,a as renderSSR,d as renderToReadableStream,b as serializeRSCPayload,g as streamToResponse};
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as Le}from"./chunk-4COCZPO5.js";import{a as qe}from"./chunk-KZAPWWOT.js";import{a as _e,c as Je}from"./chunk-TELZ2ZFI.js";import{a as We}from"./chunk-RFHWH6ZX.js";import{a as ze}from"./chunk-WWI6727S.js";import{a as Se,c as $e}from"./chunk-E423U2PP.js";import{a as Re,c as Te}from"./chunk-SMKZDN2Q.js";import{a as De,c as Fe}from"./chunk-BSV66I74.js";import{a as Pe,c as je}from"./chunk-SK6QUPJR.js";import{a as Ie,c as Ee}from"./chunk-2OKCK56H.js";import{a as Me,c as Ne}from"./chunk-YJ3ICGHV.js";import{a as Oe}from"./chunk-4EJVA4QA.js";import{a as Ae}from"./chunk-3U5M6YO6.js";import"./chunk-IQQEVKBP.js";import{a as de,c as ce}from"./chunk-QYMHLTVT.js";import{a as pe,c as me}from"./chunk-IWXI3UYI.js";import{a as ue,c as fe}from"./chunk-LYKN5EIM.js";import{a as ge,c as ve}from"./chunk-3LDGQFQZ.js";import{a as ye,c as he}from"./chunk-RIOYVPPP.js";import{a as ke,c as be}from"./chunk-WPOZMPUR.js";import{a as xe,c as Ve}from"./chunk-2BEIAJ5J.js";import{a as Ce,c as we}from"./chunk-Z2LXZLZV.js";import"./chunk-VNJJQED3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import{a as ne,c as le}from"./chunk-H5GHXMIT.js";import{a as re}from"./chunk-UQRZJPYH.js";import"./chunk-CXTPYPO4.js";import{b as H,c as Q}from"./chunk-OWQXQ33F.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import{a as ie}from"./chunk-L7RS6MQ5.js";import{a as q,b as Z,c as ee,e as te,g as ae,h as _,l as m,m as se,n as oe}from"./chunk-JZ7DUWYC.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import{b as X}from"./chunk-NBA6EFWU.js";import"./chunk-P2MUEKFT.js";import"./chunk-MBG7SPPO.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-5MVJUALI.js";import{a as K}from"./chunk-MG65QJY6.js";import{a as P,b as L}from"./chunk-FFWPJP7A.js";import{i as j}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var I=async a=>{let s=await H(a);return s===null?null:s},Ke=async a=>await Q(a);var J={name:"validate-circular-deps",description:"Detect circular package dependencies",requiredStacks:[],async validate(a){let s=await Le({root:a.root});return{name:"validate-circular-deps",passed:!s.hasCycles,issues:s.cycles.map(e=>({severity:"error",message:`Circular dependency: ${e.join(" \u2192 ")}`})),stats:{packagesChecked:s.packagesChecked}}}};var W={name:"validate-mod-exports",description:"Validate mod.ts exports all files",requiredStacks:["javascript"],async validate(a){let s=await We({root:a.root});return{name:"validate-mod-exports",passed:s.isComplete,issues:s.missingExports.map(e=>({severity:"error",message:`Missing export in ${e.packageName}: ${e.file}`,file:e.file})),stats:{packagesChecked:s.packagesChecked}}}};var z={name:"validate-export-names",description:"Validate export naming conventions",requiredStacks:["javascript"],async validate(a){let s=await qe({root:a.root});return{name:"validate-export-names",passed:s.isValid,issues:s.violations.map(e=>({severity:"error",message:`${e.packageName}: "${e.exportPath}" should be "${e.suggestion}"`})),stats:{packagesChecked:s.packagesChecked}}}};var Y={name:"validate-docs",description:"Validate JSDoc documentation",requiredStacks:["javascript"],async validate(a){let s=a.options?.requireExamples,e=await Ae({root:a.root,requireExamples:s});return{name:"validate-docs",passed:e.isValid,issues:e.issues.map(t=>({severity:"error",message:`${t.symbol}: ${t.issue}`,file:t.file,line:t.line})),stats:{filesChecked:e.filesChecked,symbolsChecked:e.symbolsChecked}}}};var B={name:"validate-package-configs",description:"Validate deno.json/package.json consistency",requiredStacks:["javascript"],async validate(a){let s=await ze({root:a.root}),e=[];for(let t of s.inconsistencies)e.push({severity:"error",message:`${t.packageName}: ${t.field} mismatch - deno.json: ${JSON.stringify(t.denoValue)}, package.json: ${JSON.stringify(t.packageValue)}`});for(let t of s.dependencyInconsistencies){let c=`${t.packageName}: ${t.dependencyName} - ${t.issue}`;t.expected!==void 0&&t.actual!==void 0&&(c+=` (expected: ${t.expected}, actual: ${t.actual})`),e.push({severity:"error",message:c})}return{name:"validate-package-configs",passed:s.isConsistent,issues:e,stats:{packagesChecked:s.packagesChecked}}}};var tt=[{pattern:/\bDeno\.cwd\(\)/,replacement:"runtime.process.cwd()"},{pattern:/\bDeno\.env\.get\b/,replacement:"runtime.env.get()"},{pattern:/\bDeno\.env\.set\b/,replacement:"runtime.env.set()"},{pattern:/\bDeno\.env\.delete\b/,replacement:"runtime.env.delete()"},{pattern:/\bDeno\.env\.has\b/,replacement:"runtime.env.has()"},{pattern:/\bDeno\.env\.toObject\b/,replacement:"runtime.env.toObject()"},{pattern:/\bDeno\.readTextFile\b/,replacement:"runtime.fs.readTextFile()"},{pattern:/\bDeno\.readFile\b/,replacement:"runtime.fs.readFile()"},{pattern:/\bDeno\.writeTextFile\b/,replacement:"runtime.fs.writeTextFile()"},{pattern:/\bDeno\.writeFile\b/,replacement:"runtime.fs.writeFile()"},{pattern:/\bDeno\.mkdir\b/,replacement:"runtime.fs.mkdir()"},{pattern:/\bDeno\.remove\b/,replacement:"runtime.fs.remove()"},{pattern:/\bDeno\.stat\b/,replacement:"runtime.fs.stat()"},{pattern:/\bDeno\.lstat\b/,replacement:"runtime.fs.lstat()"},{pattern:/\bDeno\.readDir\b/,replacement:"runtime.fs.readDir()"},{pattern:/\bDeno\.copyFile\b/,replacement:"runtime.fs.copyFile()"},{pattern:/\bDeno\.rename\b/,replacement:"runtime.fs.rename()"},{pattern:/\bDeno\.open\b/,replacement:"runtime.fs (or @eser/streams)"},{pattern:/\bDeno\.exit\b/,replacement:"runtime.process.exit()"},{pattern:/\bnew Deno\.Command\b/,replacement:"runtime.exec.spawn() (or @eser/shell/exec)"},{pattern:/\bDeno\.args\b/,replacement:"runtime.process.args"}],at=[],st=a=>at.some(s=>s.test(a)),ot=(a,s)=>{let e=a.slice(0,s);return e.includes("//")||e.includes("/*")&&!e.includes("*/")},it=(a,s)=>{let e=!1,t=!1,c=!1;for(let p=0;p<s;p++){let u=a[p];(p>0?a[p-1]:"")!=="\\"&&(u==="'"&&!t&&!c&&(e=!e),u==='"'&&!e&&!c&&(t=!t),u==="`"&&!e&&!t&&(c=!c))}return e||t||c},w=re({name:"validate-runtime-js-apis",description:"Detect direct usage of runtime-specific APIs (use @eser/standards/cross-runtime instead)",canFix:!1,stacks:["javascript"],defaults:{},extensions:X,checkFile(a,s){if(s===void 0)return[];if(st(a.path))return[];let e=[],t=s.split(`
3
- `);for(let c=0;c<t.length;c++){let p=t[c];for(let{pattern:u,replacement:f}of tt){let g=u.exec(p);g!==null&&(ot(p,g.index)||it(p,g.index)||e.push({path:a.path,line:c+1,message:`direct Deno API usage: ${g[0]} \u2014 use @eser/standards/cross-runtime (${f})`}))}}return e}}),St=w.run,Ye=w.validator,$t=w.main;var x={validators:new Map,initialized:!1},nt=()=>{n(J),n(W),n(z),n(Y),n(B),n(le),n(ce),n(me),n(fe),n(ve),n(he),n(be),n(Ve),n(we),n($e),n(Te),n(Fe),n(je),n(Ee),n(Ne),n(Je),n(Ye)},U=()=>{x.initialized||(x.initialized=!0,nt())},n=a=>{x.validators.set(a.name,a)},lt=a=>(U(),x.validators.get(a)??null),E=()=>(U(),[...x.validators.values()]),dt=()=>(U(),[...x.validators.keys()]),ct=a=>({name:a.config.name,description:a.config.description,run:async s=>{let e=await a.run(s);return{name:e.name,passed:e.issues.length===0,issues:e.issues.map(t=>({path:t.path,line:t.line,message:t.message,fixed:t.fixed})),mutations:e.mutations.map(t=>({path:t.path,oldContent:t.oldContent,newContent:t.newContent})),stats:{filesChecked:e.filesChecked,issuesFound:e.issues.length}}}}),pt=a=>({name:a.name,description:a.description,run:async s=>{let e=await a.validate({root:s.root??".",options:s});return{name:e.name,passed:e.passed,issues:e.issues.map(t=>({path:t.file,line:t.line,message:t.message})),mutations:[],stats:e.stats}}}),mt=()=>{let a=[],s=[ne,de,pe,ue,ge,ye,ke,xe,Ce,Se,Re,De,Pe,Ie,Me,_e,w];for(let t of s)a.push(ct(t));let e=[J,W,z,Y,B];for(let t of e)a.push(pt(t));return a.push({name:"validate-commit-msg",description:"Validate conventional commit format",run:async t=>{let c=t.commitMsgFile??t._args?.[0]??".git/COMMIT_EDITMSG",{runtime:p}=await import("./mod-G7PJEGW6.js"),u;try{u=await p.fs.readTextFile(c)}catch{return{name:"validate-commit-msg",passed:!1,issues:[{message:`cannot read commit message file: ${c}`}],mutations:[],stats:{}}}let f=Oe(u,{allowAsterisk:t.allowAsterisk,allowMultipleScopes:t.allowMultipleScopes,forceScope:t.forceScope,types:t.types});return{name:"validate-commit-msg",passed:f.valid,issues:f.issues.map(g=>({message:g})),mutations:[],stats:{}}}}),a};var ut=8,Zt=async(a={})=>{let s=a.root??j.process.cwd(),t=(await I(s))?.stack??[],c=[...a.skip??[]],p=a.only??[],u=E(),f=[],g=[],S=[];for(let i of u){if(p.length>0&&!p.includes(i.name))continue;if(c.includes(i.name)){S.push(i.name);continue}if(i.requiredStacks.length>0&&t.length>0&&!i.requiredStacks.some(G=>t.includes(G))){g.push({name:i.name,reason:`Requires '${i.requiredStacks.join("' or '")}' stack`});continue}let $={...a.fix!==void 0?{fix:a.fix}:{}},h=await i.validate({root:s,options:$});f.push(h)}return{passed:f.every(i=>i.passed),results:f,skipped:g,disabled:S}},ea=async a=>{let s=K(a??j.process.args,{string:["root","only","skip"],boolean:["fix","help","json","yes"],alias:{h:"help",y:"yes"}});if(s.help)return console.log("Usage: deno run --allow-all ./validation/mod.ts [options]"),console.log(),console.log("Options:"),console.log(" --root <dir> Root directory (default: cwd)"),console.log(" --only <validators> Run only specific validators (comma-separated)"),console.log(" --skip <validators> Skip specific validators (comma-separated)"),console.log(" --fix Auto-fix issues where supported"),console.log(" -y, --yes Auto-confirm all fix prompts (no interactive prompts)"),console.log(" --json Output results as JSON (suppresses TUI output)"),console.log(" -h, --help Show this help message"),P(void 0);let e=s.json,t=s.yes,c=s.root,p=s.fix,u=s.only,f=s.skip,g=u!==void 0?u.split(",").map(o=>o.trim()):[],S=f!==void 0?f.split(",").map(o=>o.trim()):[],{ctx:i}=e?{ctx:Z({interaction:"non-interactive"})}:ie(),$=i.interaction==="interactive",h=c??j.process.cwd();e||ae(i,"Validating codebase...");let M=e?void 0:se(i,"Loading config...");M?.start();let R=(await I(h))?.stack??[],Be=R.length>0?R.join(", "):"all (no .eser/manifest.yml)";M?.succeed("Config loaded"),e||m.info(i,`Stack: ${Be}`);let Ue=E(),k=[],T=[],D=[];for(let o of Ue)if(!(g.length>0&&!g.includes(o.name))){if(S.includes(o.name)){D.push(o.name);continue}if(o.requiredStacks.length>0&&R.length>0&&!o.requiredStacks.some(d=>R.includes(d))){T.push({name:o.name,reason:`Requires '${o.requiredStacks.join("' or '")}' stack`});continue}k.push(o)}let V=[],N=e?void 0:oe(i,{total:k.length,label:"Validating..."});N?.start();let O=o=>{if(V.push(o),!e){let l=Object.entries(o.stats).map(([r,y])=>`${y} ${r}`).join(", "),d=`${o.name.padEnd(18)} (${l})`;o.passed?m.success(i,`PASS ${d}`):m.error(i,`FAIL ${d}`)}N?.advance(1)};if(p)for(let o of k){let l=await o.validate({root:h,options:{}}),d=l;if(!l.passed){let r=!0;if($&&!t&&!e){let y=l.issues.length,v=await ee(i,{message:`Fix ${y} issue(s) found by ${o.name}?`,initialValue:!0});(q(v)||!v)&&(r=!1)}r&&(d=await o.validate({root:h,options:{fix:!0}}))}O(d)}else{let o=0,l=async()=>{for(;o<k.length;){let y=o++,v=k[y];if(v===void 0)break;try{let b=await v.validate({root:h,options:{}});O(b)}catch(b){let Ge={name:v.name,passed:!1,issues:[{severity:"error",message:String(b)}],stats:{filesChecked:0,issuesFound:1,fixedCount:0}};O(Ge)}}},d=Math.min(ut,k.length),r=Array.from({length:d},()=>l());await Promise.allSettled(r)}if(N?.stop("Validation complete"),!e&&T.length>0){m.step(i,"Skipped (stack not configured):");for(let o of T)m.step(i,` - ${o.name}: ${o.reason}`)}if(!e&&D.length>0){m.step(i,"Disabled:");for(let o of D)m.step(i,` - ${o}`)}let C=V.flatMap(o=>o.issues.map(l=>({validator:o.name,...l})));if(!e&&C.length>0){m.warn(i,`Issues (${C.length}):`);let o=new Map;for(let l of C){let d=l.file??l.validator,r=o.get(d)??[];r.push(l),o.set(d,r)}for(let[l,d]of o){m.step(i,` ${l}`);for(let r of d){let y=r.severity==="error"?"error":"warning",v=r.line!==void 0?`:${r.line}`:"";r.severity==="error"?m.error(i,` ${y}${v}: ${r.message}`):m.warn(i,` ${y}${v}: ${r.message}`)}}}let F=V.filter(o=>!o.passed);if(!e&&$&&F.length>0)for(;;){let o=[...F.map(r=>({value:r.name,label:`${r.name} (${r.issues.length} issue(s))`})),{value:"__done__",label:"Done"}],l=await te(i,{message:"View details for which validator?",options:o});if(q(l)||l==="__done__")break;let d=F.find(r=>r.name===l);if(d!==void 0){m.info(i,`Details for ${d.name} (${d.issues.length} issue(s)):`);for(let r of d.issues){let y=r.severity==="error"?"error":"warning",v=r.file??d.name,b=r.line!==void 0?`:${r.line}`:"";r.severity==="error"?m.error(i,` ${v}${b} [${y}]: ${r.message}`):m.warn(i,` ${v}${b} [${y}]: ${r.message}`)}}}if(e){let o=V.every(d=>d.passed),l=JSON.stringify({passed:o,results:V,skipped:T,disabled:D},null,2);return console.log(l),o?P(void 0):L({message:"",exitCode:1})}let A=F.length;return A>0?(_(i,`${A} check(s) failed with ${C.length} issue(s)`),L({message:`${A} check(s) failed with ${C.length} issue(s)`,exitCode:1})):(_(i,"All checks passed!"),P(void 0))};export{Ke as getProjectConfigPath,lt as getValidator,dt as getValidatorNames,E as getValidators,mt as getWorkflowTools,I as loadProjectConfig,ea as main,n as registerValidator,Zt as validate};
2
+ import{a as Le}from"./chunk-4HXAC4WN.js";import{a as qe}from"./chunk-7XVIW7H6.js";import{a as _e,c as Je}from"./chunk-W724KQYO.js";import{a as We}from"./chunk-Z5P6PXQV.js";import{a as ze}from"./chunk-F4G6QSSJ.js";import{a as Se,c as $e}from"./chunk-5QRJ7OJK.js";import{a as Re,c as Te}from"./chunk-YA4IPF62.js";import{a as De,c as Fe}from"./chunk-R7FADWXC.js";import{a as Pe,c as je}from"./chunk-HCYIL6IJ.js";import{a as Ie,c as Ee}from"./chunk-LWWZT2AB.js";import{a as Me,c as Ne}from"./chunk-AP7A6Y5Z.js";import{a as Oe}from"./chunk-RHEYIO4O.js";import{a as Ae}from"./chunk-3PCHQM4S.js";import"./chunk-EGEJQP7D.js";import{a as de,c as ce}from"./chunk-TYUSWY27.js";import{a as pe,c as me}from"./chunk-37GFWQQ3.js";import{a as ue,c as fe}from"./chunk-CXTOTN4Z.js";import{a as ge,c as ve}from"./chunk-ZCQ5CISX.js";import{a as ye,c as he}from"./chunk-4ZVFKZ5S.js";import{a as ke,c as be}from"./chunk-CNHUVWV5.js";import{a as xe,c as Ve}from"./chunk-VSTGSR3G.js";import{a as Ce,c as we}from"./chunk-NFZWSVJM.js";import"./chunk-26ZFSXSK.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import{a as ne,c as le}from"./chunk-SRWZLNT6.js";import{a as re}from"./chunk-JLRVMMMH.js";import"./chunk-5PH7JRXR.js";import{b as H,c as Q}from"./chunk-L2E2H7YT.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import{a as ie}from"./chunk-LGNGLAV3.js";import{a as q,b as Z,f as ee,h as te,j as ae,k as _,o as m,p as se,q as oe}from"./chunk-ZER2RYWJ.js";import"./chunk-VV47GXU5.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import{b as X}from"./chunk-NBA6EFWU.js";import"./chunk-P2MUEKFT.js";import"./chunk-ZC4F4MYU.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-BLXGL5MA.js";import{a as K}from"./chunk-MG65QJY6.js";import{a as P,b as L}from"./chunk-FFWPJP7A.js";import{i as j}from"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var I=async a=>{let s=await H(a);return s===null?null:s},Ke=async a=>await Q(a);var J={name:"validate-circular-deps",description:"Detect circular package dependencies",requiredStacks:[],async validate(a){let s=await Le({root:a.root});return{name:"validate-circular-deps",passed:!s.hasCycles,issues:s.cycles.map(e=>({severity:"error",message:`Circular dependency: ${e.join(" \u2192 ")}`})),stats:{packagesChecked:s.packagesChecked}}}};var W={name:"validate-mod-exports",description:"Validate mod.ts exports all files",requiredStacks:["javascript"],async validate(a){let s=await We({root:a.root});return{name:"validate-mod-exports",passed:s.isComplete,issues:s.missingExports.map(e=>({severity:"error",message:`Missing export in ${e.packageName}: ${e.file}`,file:e.file})),stats:{packagesChecked:s.packagesChecked}}}};var z={name:"validate-export-names",description:"Validate export naming conventions",requiredStacks:["javascript"],async validate(a){let s=await qe({root:a.root});return{name:"validate-export-names",passed:s.isValid,issues:s.violations.map(e=>({severity:"error",message:`${e.packageName}: "${e.exportPath}" should be "${e.suggestion}"`})),stats:{packagesChecked:s.packagesChecked}}}};var Y={name:"validate-docs",description:"Validate JSDoc documentation",requiredStacks:["javascript"],async validate(a){let s=a.options?.requireExamples,e=await Ae({root:a.root,requireExamples:s});return{name:"validate-docs",passed:e.isValid,issues:e.issues.map(t=>({severity:"error",message:`${t.symbol}: ${t.issue}`,file:t.file,line:t.line})),stats:{filesChecked:e.filesChecked,symbolsChecked:e.symbolsChecked}}}};var B={name:"validate-package-configs",description:"Validate deno.json/package.json consistency",requiredStacks:["javascript"],async validate(a){let s=await ze({root:a.root}),e=[];for(let t of s.inconsistencies)e.push({severity:"error",message:`${t.packageName}: ${t.field} mismatch - deno.json: ${JSON.stringify(t.denoValue)}, package.json: ${JSON.stringify(t.packageValue)}`});for(let t of s.dependencyInconsistencies){let c=`${t.packageName}: ${t.dependencyName} - ${t.issue}`;t.expected!==void 0&&t.actual!==void 0&&(c+=` (expected: ${t.expected}, actual: ${t.actual})`),e.push({severity:"error",message:c})}return{name:"validate-package-configs",passed:s.isConsistent,issues:e,stats:{packagesChecked:s.packagesChecked}}}};var tt=[{pattern:/\bDeno\.cwd\(\)/,replacement:"runtime.process.cwd()"},{pattern:/\bDeno\.env\.get\b/,replacement:"runtime.env.get()"},{pattern:/\bDeno\.env\.set\b/,replacement:"runtime.env.set()"},{pattern:/\bDeno\.env\.delete\b/,replacement:"runtime.env.delete()"},{pattern:/\bDeno\.env\.has\b/,replacement:"runtime.env.has()"},{pattern:/\bDeno\.env\.toObject\b/,replacement:"runtime.env.toObject()"},{pattern:/\bDeno\.readTextFile\b/,replacement:"runtime.fs.readTextFile()"},{pattern:/\bDeno\.readFile\b/,replacement:"runtime.fs.readFile()"},{pattern:/\bDeno\.writeTextFile\b/,replacement:"runtime.fs.writeTextFile()"},{pattern:/\bDeno\.writeFile\b/,replacement:"runtime.fs.writeFile()"},{pattern:/\bDeno\.mkdir\b/,replacement:"runtime.fs.mkdir()"},{pattern:/\bDeno\.remove\b/,replacement:"runtime.fs.remove()"},{pattern:/\bDeno\.stat\b/,replacement:"runtime.fs.stat()"},{pattern:/\bDeno\.lstat\b/,replacement:"runtime.fs.lstat()"},{pattern:/\bDeno\.readDir\b/,replacement:"runtime.fs.readDir()"},{pattern:/\bDeno\.copyFile\b/,replacement:"runtime.fs.copyFile()"},{pattern:/\bDeno\.rename\b/,replacement:"runtime.fs.rename()"},{pattern:/\bDeno\.open\b/,replacement:"runtime.fs (or @eser/streams)"},{pattern:/\bDeno\.exit\b/,replacement:"runtime.process.exit()"},{pattern:/\bnew Deno\.Command\b/,replacement:"runtime.exec.spawn() (or @eser/shell/exec)"},{pattern:/\bDeno\.args\b/,replacement:"runtime.process.args"}],at=[],st=a=>at.some(s=>s.test(a)),ot=(a,s)=>{let e=a.slice(0,s);return e.includes("//")||e.includes("/*")&&!e.includes("*/")},it=(a,s)=>{let e=!1,t=!1,c=!1;for(let p=0;p<s;p++){let u=a[p];(p>0?a[p-1]:"")!=="\\"&&(u==="'"&&!t&&!c&&(e=!e),u==='"'&&!e&&!c&&(t=!t),u==="`"&&!e&&!t&&(c=!c))}return e||t||c},w=re({name:"validate-runtime-js-apis",description:"Detect direct usage of runtime-specific APIs (use @eser/standards/cross-runtime instead)",canFix:!1,stacks:["javascript"],defaults:{},extensions:X,checkFile(a,s){if(s===void 0)return[];if(st(a.path))return[];let e=[],t=s.split(`
3
+ `);for(let c=0;c<t.length;c++){let p=t[c];for(let{pattern:u,replacement:f}of tt){let g=u.exec(p);g!==null&&(ot(p,g.index)||it(p,g.index)||e.push({path:a.path,line:c+1,message:`direct Deno API usage: ${g[0]} \u2014 use @eser/standards/cross-runtime (${f})`}))}}return e}}),St=w.run,Ye=w.validator,$t=w.main;var x={validators:new Map,initialized:!1},nt=()=>{n(J),n(W),n(z),n(Y),n(B),n(le),n(ce),n(me),n(fe),n(ve),n(he),n(be),n(Ve),n(we),n($e),n(Te),n(Fe),n(je),n(Ee),n(Ne),n(Je),n(Ye)},U=()=>{x.initialized||(x.initialized=!0,nt())},n=a=>{x.validators.set(a.name,a)},lt=a=>(U(),x.validators.get(a)??null),E=()=>(U(),[...x.validators.values()]),dt=()=>(U(),[...x.validators.keys()]),ct=a=>({name:a.config.name,description:a.config.description,run:async s=>{let e=await a.run(s);return{name:e.name,passed:e.issues.length===0,issues:e.issues.map(t=>({path:t.path,line:t.line,message:t.message,fixed:t.fixed})),mutations:e.mutations.map(t=>({path:t.path,oldContent:t.oldContent,newContent:t.newContent})),stats:{filesChecked:e.filesChecked,issuesFound:e.issues.length}}}}),pt=a=>({name:a.name,description:a.description,run:async s=>{let e=await a.validate({root:s.root??".",options:s});return{name:e.name,passed:e.passed,issues:e.issues.map(t=>({path:t.file,line:t.line,message:t.message})),mutations:[],stats:e.stats}}}),mt=()=>{let a=[],s=[ne,de,pe,ue,ge,ye,ke,xe,Ce,Se,Re,De,Pe,Ie,Me,_e,w];for(let t of s)a.push(ct(t));let e=[J,W,z,Y,B];for(let t of e)a.push(pt(t));return a.push({name:"validate-commit-msg",description:"Validate conventional commit format",run:async t=>{let c=t.commitMsgFile??t._args?.[0]??".git/COMMIT_EDITMSG",{runtime:p}=await import("./mod-DXA25A4J.js"),u;try{u=await p.fs.readTextFile(c)}catch{return{name:"validate-commit-msg",passed:!1,issues:[{message:`cannot read commit message file: ${c}`}],mutations:[],stats:{}}}let f=Oe(u,{allowAsterisk:t.allowAsterisk,allowMultipleScopes:t.allowMultipleScopes,forceScope:t.forceScope,types:t.types});return{name:"validate-commit-msg",passed:f.valid,issues:f.issues.map(g=>({message:g})),mutations:[],stats:{}}}}),a};var ut=8,Zt=async(a={})=>{let s=a.root??j.process.cwd(),t=(await I(s))?.stack??[],c=[...a.skip??[]],p=a.only??[],u=E(),f=[],g=[],S=[];for(let i of u){if(p.length>0&&!p.includes(i.name))continue;if(c.includes(i.name)){S.push(i.name);continue}if(i.requiredStacks.length>0&&t.length>0&&!i.requiredStacks.some(G=>t.includes(G))){g.push({name:i.name,reason:`Requires '${i.requiredStacks.join("' or '")}' stack`});continue}let $={...a.fix!==void 0?{fix:a.fix}:{}},h=await i.validate({root:s,options:$});f.push(h)}return{passed:f.every(i=>i.passed),results:f,skipped:g,disabled:S}},ea=async a=>{let s=K(a??j.process.args,{string:["root","only","skip"],boolean:["fix","help","json","yes"],alias:{h:"help",y:"yes"}});if(s.help)return console.log("Usage: deno run --allow-all ./validation/mod.ts [options]"),console.log(),console.log("Options:"),console.log(" --root <dir> Root directory (default: cwd)"),console.log(" --only <validators> Run only specific validators (comma-separated)"),console.log(" --skip <validators> Skip specific validators (comma-separated)"),console.log(" --fix Auto-fix issues where supported"),console.log(" -y, --yes Auto-confirm all fix prompts (no interactive prompts)"),console.log(" --json Output results as JSON (suppresses TUI output)"),console.log(" -h, --help Show this help message"),P(void 0);let e=s.json,t=s.yes,c=s.root,p=s.fix,u=s.only,f=s.skip,g=u!==void 0?u.split(",").map(o=>o.trim()):[],S=f!==void 0?f.split(",").map(o=>o.trim()):[],{ctx:i}=e?{ctx:Z({interaction:"non-interactive"})}:ie(),$=i.interaction==="interactive",h=c??j.process.cwd();e||ae(i,"Validating codebase...");let M=e?void 0:se(i,"Loading config...");M?.start();let R=(await I(h))?.stack??[],Be=R.length>0?R.join(", "):"all (no .eser/manifest.yml)";M?.succeed("Config loaded"),e||m.info(i,`Stack: ${Be}`);let Ue=E(),k=[],T=[],D=[];for(let o of Ue)if(!(g.length>0&&!g.includes(o.name))){if(S.includes(o.name)){D.push(o.name);continue}if(o.requiredStacks.length>0&&R.length>0&&!o.requiredStacks.some(d=>R.includes(d))){T.push({name:o.name,reason:`Requires '${o.requiredStacks.join("' or '")}' stack`});continue}k.push(o)}let V=[],N=e?void 0:oe(i,{total:k.length,label:"Validating..."});N?.start();let O=o=>{if(V.push(o),!e){let l=Object.entries(o.stats).map(([r,y])=>`${y} ${r}`).join(", "),d=`${o.name.padEnd(18)} (${l})`;o.passed?m.success(i,`PASS ${d}`):m.error(i,`FAIL ${d}`)}N?.advance(1)};if(p)for(let o of k){let l=await o.validate({root:h,options:{}}),d=l;if(!l.passed){let r=!0;if($&&!t&&!e){let y=l.issues.length,v=await ee(i,{message:`Fix ${y} issue(s) found by ${o.name}?`,initialValue:!0});(q(v)||!v)&&(r=!1)}r&&(d=await o.validate({root:h,options:{fix:!0}}))}O(d)}else{let o=0,l=async()=>{for(;o<k.length;){let y=o++,v=k[y];if(v===void 0)break;try{let b=await v.validate({root:h,options:{}});O(b)}catch(b){let Ge={name:v.name,passed:!1,issues:[{severity:"error",message:String(b)}],stats:{filesChecked:0,issuesFound:1,fixedCount:0}};O(Ge)}}},d=Math.min(ut,k.length),r=Array.from({length:d},()=>l());await Promise.allSettled(r)}if(N?.stop("Validation complete"),!e&&T.length>0){m.step(i,"Skipped (stack not configured):");for(let o of T)m.step(i,` - ${o.name}: ${o.reason}`)}if(!e&&D.length>0){m.step(i,"Disabled:");for(let o of D)m.step(i,` - ${o}`)}let C=V.flatMap(o=>o.issues.map(l=>({validator:o.name,...l})));if(!e&&C.length>0){m.warn(i,`Issues (${C.length}):`);let o=new Map;for(let l of C){let d=l.file??l.validator,r=o.get(d)??[];r.push(l),o.set(d,r)}for(let[l,d]of o){m.step(i,` ${l}`);for(let r of d){let y=r.severity==="error"?"error":"warning",v=r.line!==void 0?`:${r.line}`:"";r.severity==="error"?m.error(i,` ${y}${v}: ${r.message}`):m.warn(i,` ${y}${v}: ${r.message}`)}}}let F=V.filter(o=>!o.passed);if(!e&&$&&F.length>0)for(;;){let o=[...F.map(r=>({value:r.name,label:`${r.name} (${r.issues.length} issue(s))`})),{value:"__done__",label:"Done"}],l=await te(i,{message:"View details for which validator?",options:o});if(q(l)||l==="__done__")break;let d=F.find(r=>r.name===l);if(d!==void 0){m.info(i,`Details for ${d.name} (${d.issues.length} issue(s)):`);for(let r of d.issues){let y=r.severity==="error"?"error":"warning",v=r.file??d.name,b=r.line!==void 0?`:${r.line}`:"";r.severity==="error"?m.error(i,` ${v}${b} [${y}]: ${r.message}`):m.warn(i,` ${v}${b} [${y}]: ${r.message}`)}}}if(e){let o=V.every(d=>d.passed),l=JSON.stringify({passed:o,results:V,skipped:T,disabled:D},null,2);return console.log(l),o?P(void 0):L({message:"",exitCode:1})}let A=F.length;return A>0?(_(i,`${A} check(s) failed with ${C.length} issue(s)`),L({message:`${A} check(s) failed with ${C.length} issue(s)`,exitCode:1})):(_(i,"All checks passed!"),P(void 0))};export{Ke as getProjectConfigPath,lt as getValidator,dt as getValidatorNames,E as getValidators,mt as getWorkflowTools,I as loadProjectConfig,ea as main,n as registerValidator,Zt as validate};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{c as T,h as J}from"./chunk-V6YI7YJ4.js";import{a as S}from"./chunk-LSET5TD3.js";import{b as B,c as W}from"./chunk-NBA6EFWU.js";import{e as h}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-5MVJUALI.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{i}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var P=h.getLogger(["laroux-bundler","rsc-analyze"]);function Z(t){return{filePath:t.filePath,relativePath:t.relativePath,exportNames:[...t.exports]}}async function E(t,e,n){if(P.debug(`\u{1F50D} Analyzing client components in: ${t}`),!n){let p=(await T(t,{projectRoot:e})).map(Z);return P.debug(`\u{1F4CA} Total client components found: ${p.length}`),p}let r=[],o=0,a=0,l=await T(t,{projectRoot:e});for(let s of l){let p=0;try{p=(await i.fs.stat(s.filePath)).mtime?.getTime()??0}catch{continue}let c=n.getClientComponent(s.filePath,p);if(c){o++,c.isClient&&r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:c.exportNames});continue}a++;let x=[...s.exports];n.setClientComponent(s.filePath,!0,x,p),r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:x}),P.debug(` \u2713 Found client component: ${s.relativePath} (exports: ${x.join(", ")})`)}return(o>0||a>0)&&P.debug(`\u{1F4CA} Component analysis: ${o} cache hits, ${a} analyzed`),P.debug(`\u{1F4CA} Total client components found: ${r.length}`),r}async function _(t){let e=[],n=/(?:node_modules|\.test\.|\.spec\.)/;for await(let r of S(t,"**/*.{tsx,ts,jsx,js}",n))e.push(i.path.join(t,r));return e}var v=h.getLogger(["laroux-bundler","rsc-transform"]);async function H(t,e){let n=i.path.dirname(t.relativePath),r=i.path.join(e,n);await i.fs.ensureDir(r);let o=tt(t),a=t.relativePath.split("/").pop(),l=i.path.join(r,a);return await i.fs.writeTextFile(l,o),{originalPath:t.filePath,transformedPath:l}}function tt(t){let e=t.exportNames.map(n=>n==="default"?`export default createClientReference(
2
+ import{c as T,h as J}from"./chunk-6PRIUPN4.js";import{a as S}from"./chunk-3IZX4OZ7.js";import{b as B,c as W}from"./chunk-NBA6EFWU.js";import{e as h}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-BLXGL5MA.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{i}from"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var P=h.getLogger(["laroux-bundler","rsc-analyze"]);function Z(t){return{filePath:t.filePath,relativePath:t.relativePath,exportNames:[...t.exports]}}async function E(t,e,n){if(P.debug(`\u{1F50D} Analyzing client components in: ${t}`),!n){let p=(await T(t,{projectRoot:e})).map(Z);return P.debug(`\u{1F4CA} Total client components found: ${p.length}`),p}let r=[],o=0,a=0,l=await T(t,{projectRoot:e});for(let s of l){let p=0;try{p=(await i.fs.stat(s.filePath)).mtime?.getTime()??0}catch{continue}let c=n.getClientComponent(s.filePath,p);if(c){o++,c.isClient&&r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:c.exportNames});continue}a++;let x=[...s.exports];n.setClientComponent(s.filePath,!0,x,p),r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:x}),P.debug(` \u2713 Found client component: ${s.relativePath} (exports: ${x.join(", ")})`)}return(o>0||a>0)&&P.debug(`\u{1F4CA} Component analysis: ${o} cache hits, ${a} analyzed`),P.debug(`\u{1F4CA} Total client components found: ${r.length}`),r}async function _(t){let e=[],n=/(?:node_modules|\.test\.|\.spec\.)/;for await(let r of S(t,"**/*.{tsx,ts,jsx,js}",n))e.push(i.path.join(t,r));return e}var v=h.getLogger(["laroux-bundler","rsc-transform"]);async function H(t,e){let n=i.path.dirname(t.relativePath),r=i.path.join(e,n);await i.fs.ensureDir(r);let o=tt(t),a=t.relativePath.split("/").pop(),l=i.path.join(r,a);return await i.fs.writeTextFile(l,o),{originalPath:t.filePath,transformedPath:l}}function tt(t){let e=t.exportNames.map(n=>n==="default"?`export default createClientReference(
3
3
  "./${t.relativePath}",
4
4
  "default"
5
5
  );`:`export const ${n} = createClientReference(
@@ -0,0 +1,23 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import"./chunk-5WJ6AUNY.js";var C={EserAjanVersion:{parameters:[],result:"pointer"},EserAjanInit:{parameters:[],result:"i32"},EserAjanShutdown:{parameters:[],result:"void"},EserAjanFree:{parameters:["pointer"],result:"void"},EserAjanConfigLoad:{parameters:["pointer"],result:"pointer"},EserAjanDIResolve:{parameters:["pointer"],result:"pointer"}},S=n=>{let r=new TextEncoder().encode(n),t=new ArrayBuffer(r.length+1),o=new Uint8Array(t);return o.set(r),o},w=n=>n===null?{value:"",ptr:n}:{value:new Deno.UnsafePointerView(n).getCString(),ptr:n},V=n=>{let e=r=>{r!==null&&n.EserAjanFree(r)};return{EserAjanVersion:()=>{let{value:r,ptr:t}=w(n.EserAjanVersion());return e(t),r},EserAjanInit:()=>n.EserAjanInit(),EserAjanShutdown:()=>{n.EserAjanShutdown()},EserAjanFree:r=>{n.EserAjanFree(r)},EserAjanConfigLoad:r=>{let t=S(r),o=n.EserAjanConfigLoad(Deno.UnsafePointer.of(t)),{value:s,ptr:i}=w(o);return e(i),s},EserAjanDIResolve:r=>{let t=S(r),o=n.EserAjanDIResolve(Deno.UnsafePointer.of(t)),{value:s,ptr:i}=w(o);return e(i),s}}},_={name:"deno",available:()=>typeof Deno<"u"&&typeof Deno.dlopen=="function",open:n=>{let e=Deno.dlopen(n,C);return{symbols:V(e.symbols),close:()=>{e.close()}}}};var b=null;try{b=await import("bun:ffi")}catch{}var x={name:"bun",available:()=>b!==null,open:n=>{if(b===null)throw new Error("bun:ffi is not available \u2014 are you running under Bun?");let{dlopen:e,CString:r,ptr:t}=b,o=e(n,{EserAjanVersion:{args:[],returns:"ptr"},EserAjanInit:{args:[],returns:"i32"},EserAjanShutdown:{args:[],returns:"void"},EserAjanFree:{args:["ptr"],returns:"void"},EserAjanConfigLoad:{args:["ptr"],returns:"ptr"},EserAjanDIResolve:{args:["ptr"],returns:"ptr"}}),{symbols:s}=o,i=d=>{let g=new TextEncoder().encode(d+"\0");return t(g)},a=d=>{if(d===null||d===0)return"";let p=new r(d);return s.EserAjanFree(d),p.toString()};return{symbols:{EserAjanVersion:()=>a(s.EserAjanVersion()),EserAjanInit:()=>s.EserAjanInit(),EserAjanShutdown:()=>{s.EserAjanShutdown()},EserAjanFree:d=>{s.EserAjanFree(d)},EserAjanConfigLoad:d=>a(s.EserAjanConfigLoad(i(d))),EserAjanDIResolve:d=>a(s.EserAjanDIResolve(i(d)))},close:()=>{o.close()}}}};var u=null;try{let n=globalThis;typeof n.process<"u"&&typeof n.process.versions?.node=="string"&&typeof n.Deno>"u"&&typeof n.Bun>"u"&&(u=await import("koffi"),u.default!==void 0&&(u=u.default))}catch{}var $={name:"node",available:()=>u!==null&&typeof u.load=="function",open:n=>{if(u===null)throw new Error("koffi is not available. Install it: npm install koffi");let e=u.load(n),r=e.func("char* EserAjanVersion()"),t=e.func("int EserAjanInit()"),o=e.func("void EserAjanShutdown()"),s=e.func("char* EserAjanConfigLoad(const char* path)"),i=e.func("char* EserAjanDIResolve(const char* name)");return{symbols:{EserAjanVersion:()=>r()??"",EserAjanInit:()=>t(),EserAjanShutdown:()=>{o()},EserAjanFree:a=>{},EserAjanConfigLoad:a=>s(a)??"",EserAjanDIResolve:a=>i(a)??""},close:()=>{e.unload()}}}};var O=await import("node:fs"),j=()=>{let n=globalThis;if(typeof n.Deno<"u"){let e=n.Deno.build.os;return e==="darwin"?".dylib":e==="windows"?".dll":".so"}if(typeof n.process<"u"&&typeof n.process.platform=="string"){let e=n.process.platform;return e==="darwin"?".dylib":e==="win32"?".dll":".so"}return".so"},U=()=>{let n=globalThis,e="linux",r="x64";if(typeof n.Deno<"u"){let t=n.Deno.build.os;e=t==="windows"?"win32":t,r=n.Deno.build.arch==="aarch64"?"arm64":"x64"}else typeof n.process<"u"&&(e=n.process.platform,r=n.process.arch==="arm64"?"arm64":"x64");return`${e}-${r}`},l=n=>{try{return O.statSync(n),!0}catch{return!1}},H=n=>{if(n!==void 0)return n;let e=globalThis;return typeof e.__dirname=="string"?e.__dirname:typeof e.process<"u"&&typeof e.process.cwd=="function"?e.process.cwd():"."},I=n=>{let r=`libeser_ajan${j()}`,t=[],o=K("ESER_AJAN_LIB_PATH");if(o!==void 0){if(l(o))return o;t.push(`$ESER_AJAN_LIB_PATH = ${o}`)}let s=H(n),i=`${s}/${r}`;if(t.push(i),l(i))return i;let a=U(),d={x64:"x86_64",arm64:"aarch64"},p={win32:"windows"},g=a.split("-"),k=g[0]??"linux",D=g[1]??"x64",N=d[D]??D,P=p[k]??k,y=`${N}-${P}`,L=`${s}/..`,A=`${L}/dist/${y}/${r}`;if(t.push(A),l(A))return A;let E=`${s}/dist/${y}/${r}`;if(t.push(E),l(E))return E;let m=globalThis,h=typeof m.process<"u"&&typeof m.process.cwd=="function"?m.process.cwd():".";if(h!==s){let c=`${h}/pkg/@eser/ajan/dist/${y}/${r}`;if(t.push(c),l(c))return c}let B=[s,L,h];for(let c of B){let v=`${c}/node_modules/@eserstack/ajan-${a}/${r}`;if(t.push(v),l(v))return v}let T=[`/usr/local/lib/${r}`,`/usr/lib/${r}`];for(let c of T)if(t.push(c),l(c))return c;throw new Error(`Could not find eser-ajan shared library (${r}).
3
+ Checked the following locations:
4
+ `+t.map(c=>` - ${c}`).join(`
5
+ `)+`
6
+
7
+ To fix this:
8
+ 1. Install: npm install @eser/ajan
9
+ 2. Or set ESER_AJAN_LIB_PATH to the full path of ${r}`)},K=n=>{let e=globalThis;if(typeof e.process<"u"&&typeof e.process.env=="object")return e.process.env[n]??void 0};var q=n=>{try{let e=globalThis;if(typeof e.process<"u"&&e.process.env!=null)return e.process.env[n]}catch{}},f=n=>{let e=q(n);return e!==void 0&&e.toLowerCase()==="disabled"},F=n=>{console.debug(`[eser-ajan/ffi] ${n}`)},R=import.meta.dirname,X=j,Z=n=>I(n??R),z=[_,x,$],G=()=>{let n=globalThis;return typeof n.Deno<"u"&&typeof n.Deno.dlopen=="function"?"deno":typeof n.Bun<"u"?"bun":typeof n.process<"u"&&typeof n.process.versions?.node=="string"&&typeof n.Deno>"u"&&typeof n.Bun>"u"?"node":"unknown"},Q=()=>{for(let e of z)if(e.available())return e;let n=G();throw new Error(`No FFI backend available for runtime "${n}".
10
+ Supported runtimes:
11
+ - Deno 2.7+ (Deno.dlopen)
12
+ - Bun 1.3+ (bun:ffi)
13
+ - Node 25+ (node:ffi, experimental)
14
+
15
+ Current runtime: ${n}`)},nn=async(n,e)=>{let r=typeof n=="string"?n:void 0,t=typeof n=="object"?n:e;if(f("ESER_AJAN"))throw F("ALL disabled \u2014 ESER_AJAN=disabled"),new Error(`Ajan is disabled via ESER_AJAN=disabled environment variable.
16
+ Unset ESER_AJAN to re-enable.`);let o=!f("ESER_AJAN_NATIVE")&&t?.native!==!1,s=!f("ESER_AJAN_WASM")&&t?.wasm!==!1;if(o||F("Native FFI disabled \u2014 skipping to WASM fallback"),s||F("WASM fallback disabled"),o)try{let a=r??I(R);return Q().open(a)}catch{}if(s)try{return await(await import("./mod-IALKEUJL.js")).loadEserAjanWasm()}catch(a){throw new Error(`No native FFI backend available and WASM fallback failed.
17
+ WASM error: ${a instanceof Error?a.message:String(a)}
18
+
19
+ To fix this, install the @eser/ajan package or build the native library.
20
+ See: https://github.com/eser/stack/tree/main/pkg/@eser/ajan`)}let i=[];throw o||i.push(f("ESER_AJAN_NATIVE")?"ESER_AJAN_NATIVE=disabled":"native=false in LoadOptions"),s||i.push(f("ESER_AJAN_WASM")?"ESER_AJAN_WASM=disabled":"wasm=false in LoadOptions"),new Error(`All FFI backends are disabled.
21
+ Reasons: ${i.join(", ")}
22
+
23
+ To fix this, unset the relevant environment variables or adjust LoadOptions.`)};export{G as detectRuntime,X as getLibraryExtension,nn as loadEserAjan,Z as resolveLibraryPath,Q as selectBackend};
@@ -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 as g,g as h,h as i,i as j,j as k,k as l}from"./chunk-MBG7SPPO.js";import{q as f}from"./chunk-YVN2NZL4.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{b as PipelineError,a as StreamError,c as TimeoutError,d as createChunk,e as defineLayer,k as layers,g as output,h as pipeline,l as renderers,i as sinks,j as sources,f as span};
2
+ import{a,b,c,d,e,f as g,g as h,h as i,i as j,j as k,k as l}from"./chunk-ZC4F4MYU.js";import{q as f}from"./chunk-YVN2NZL4.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{b as PipelineError,a as StreamError,c as TimeoutError,d as createChunk,e as defineLayer,k as layers,g as output,h as pipeline,l as renderers,i as sinks,j as sources,f as span};
@@ -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-HP5W5XT6.js";import{e as C}from"./chunk-F35K7YVH.js";import{a as A,d as E}from"./chunk-P2MUEKFT.js";import{k as w}from"./chunk-TEOMM3RD.js";import{f as k,h as R,k as $}from"./chunk-ZC4F4MYU.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-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-RVJZFWN7.js";import"./chunk-MBCPGD5L.js";import{a as le,b as de,c as pe,d as G}from"./chunk-FW3ETRQ5.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-3AA3RXKD.js";import{a as z,b as K,d as Y}from"./chunk-W7OYXLGD.js";import{a as Ie}from"./chunk-RGT7SMKJ.js";import{a as q}from"./chunk-4QDEJUAF.js";import{a as xe,b as Ce,c as De,d as Re}from"./chunk-PLMZ3FYS.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-ORAOSL2W.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-YW377352.js";import{c as j}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{a as J,b as D}from"./chunk-FFWPJP7A.js";import{i as h}from"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-2DAVTVOF.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,b}from"./chunk-2N62LL55.js";import"./chunk-YURNTYEP.js";import"./chunk-J7YTWK67.js";import"./chunk-5MVJUALI.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{a as OllamaModel,b as ollamaFactory};
2
+ import{a,b}from"./chunk-JUOSGSVB.js";import"./chunk-BJLUDX4R.js";import"./chunk-J7YTWK67.js";import"./chunk-BLXGL5MA.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-EKUJSZIR.js";import"./chunk-BJLUDX4R.js";import"./chunk-J7YTWK67.js";import"./chunk-BLXGL5MA.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{a as OpenCodeModel,b as openCodeFactory};
@@ -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-RVJZFWN7.js";import"./chunk-MBCPGD5L.js";import{c as l,j as R,o as x}from"./chunk-YW377352.js";import{a as E}from"./chunk-2XNFZXHY.js";import{a as k,b as C,f as v,o}from"./chunk-ZER2RYWJ.js";import"./chunk-ZC4F4MYU.js";import"./chunk-YVN2NZL4.js";import{a as d,b as $}from"./chunk-FFWPJP7A.js";import{i as a}from"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-F35K7YVH.js";import"./chunk-TEOMM3RD.js";import"./chunk-WJKE6XHF.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};
@@ -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-TEOMM3RD.js";import"./chunk-WJKE6XHF.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};
@@ -0,0 +1,9 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as c}from"./chunk-YBCZC5KZ.js";import"./chunk-26ZFSXSK.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-LGNGLAV3.js";import{f as w,o as t}from"./chunk-ZER2RYWJ.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-ZC4F4MYU.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{d as a}from"./chunk-BLXGL5MA.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-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-MFY62V25.js")).versions(r,{dryRun:s});let u=await c()??l,d=!1;try{await(await import("./changelog-gen-TEI4IBNO.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-LGNGLAV3.js";import{o as u}from"./chunk-ZER2RYWJ.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-ZC4F4MYU.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{g as p}from"./chunk-BLXGL5MA.js";import"./chunk-PWLF3WXM.js";import"./chunk-G5VGZMKA.js";import"./chunk-MJ2IPSAE.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-WJKE6XHF.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(`
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-ENTSZDR6.js";import{a as R}from"./chunk-YBCZC5KZ.js";import"./chunk-26ZFSXSK.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-LGNGLAV3.js";import{o as n}from"./chunk-ZER2RYWJ.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-ZC4F4MYU.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-BLXGL5MA.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-WJKE6XHF.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};
@@ -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-ORAOSL2W.js";import{e as f,g as h,h as S,i as g}from"./chunk-YW377352.js";import"./chunk-2XNFZXHY.js";import{f as u,h as d,k as w}from"./chunk-ZC4F4MYU.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-WJKE6XHF.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};
@@ -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-ORAOSL2W.js";import{c as h,e as g,g as y,h as S,i as I}from"./chunk-YW377352.js";import"./chunk-2XNFZXHY.js";import{f as u,h as w,k as f}from"./chunk-ZC4F4MYU.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-WJKE6XHF.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};
@@ -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-W7OYXLGD.js";import{c as x,k as T}from"./chunk-YW377352.js";import{b as A,c as j}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{f as d,h as u,k as c}from"./chunk-ZC4F4MYU.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-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-Y3XXSUFP.js";import"./chunk-L2E2H7YT.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-ZC4F4MYU.js";import{f as x,g as C,h as F}from"./chunk-YVN2NZL4.js";import{d as H}from"./chunk-BLXGL5MA.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-WJKE6XHF.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
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-FW3ETRQ5.js";import"./chunk-NY4W44PI.js";import"./chunk-2HSGE3TL.js";import{c as W,d as X}from"./chunk-W7OYXLGD.js";import{a as _,k as j}from"./chunk-ORAOSL2W.js";import{d as g,e as N,f as U,h as $,k as G,o as L,z as M}from"./chunk-YW377352.js";import{b as E,c as V}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{a as D,b as A,g as F}from"./chunk-ZER2RYWJ.js";import{f as R,h as O,k as T}from"./chunk-ZC4F4MYU.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-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-ICWGLZBQ.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-ICWGLZBQ.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-ZC4F4MYU.js";import{b as m,d as p,f as C}from"./chunk-YVN2NZL4.js";import{b as x}from"./chunk-BLXGL5MA.js";import{a as h,b as f}from"./chunk-FFWPJP7A.js";import{i as S}from"./chunk-WJKE6XHF.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};
@@ -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-ZC4F4MYU.js";import{k as n}from"./chunk-YVN2NZL4.js";import"./chunk-PWLF3WXM.js";import{a as o}from"./chunk-MJ2IPSAE.js";import"./chunk-MG65QJY6.js";import{a as t}from"./chunk-FFWPJP7A.js";import"./chunk-WJKE6XHF.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(`
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-PTEEAWXX.js"),import("./mod-QWYXFGRG.js"),import("./mod-RMDGRCBK.js"),import("./mod-BKHQAEVL.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-HVTJ5LVU.js";import{e as F}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import{i as f}from"./chunk-WJKE6XHF.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(`
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-YW377352.js";import{b as I,c as E}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{f,h as w,k as S}from"./chunk-ZC4F4MYU.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-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-3AA3RXKD.js";import{b as A,e as M,f as N,n as F,p as L}from"./chunk-ORAOSL2W.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-YW377352.js";import{b as E,c as R}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{f as y,h as C,k as $}from"./chunk-ZC4F4MYU.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-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.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-RYENG2XC.js")],["approve",()=>import("./approve-URMQ77UE.js")],["done",()=>import("./done-VSVUSYIS.js")],["block",()=>import("./block-5NWZBEXW.js")],["reset",()=>import("./reset-TDBHFTWW.js")],["cancel",()=>import("./cancel-V6OK6U73.js")],["wontfix",()=>import("./wontfix-D2ZHBGNH.js")],["reopen",()=>import("./reopen-XDNX2XRX.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-SXWEDQTL.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};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as f,d as P}from"./chunk-FW3ETRQ5.js";import"./chunk-NY4W44PI.js";import"./chunk-2HSGE3TL.js";import{a as k,d as w}from"./chunk-3AA3RXKD.js";import{c as R,d as S}from"./chunk-W7OYXLGD.js";import{e as b,f as x,k as D,o as v,z as O}from"./chunk-YW377352.js";import{c as h}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{f as d,h as u,k as m}from"./chunk-ZC4F4MYU.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-WJKE6XHF.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};
@@ -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-W7OYXLGD.js";import{k as u}from"./chunk-YW377352.js";import{c as g}from"./chunk-OAT2D23A.js";import"./chunk-2XNFZXHY.js";import{f as p,h as d,k as f}from"./chunk-ZC4F4MYU.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-WJKE6XHF.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};
@@ -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-UCLOGVMF.js";import"./chunk-EXP2TZZC.js";import"./chunk-J2Z7NG2X.js";import"./chunk-MBG7SPPO.js";import"./chunk-YVN2NZL4.js";import"./chunk-5MVJUALI.js";import"./chunk-C7EBLUGW.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-F2YHX6DL.js";import"./chunk-MBCPGD5L.js";import"./chunk-J2Z7NG2X.js";import"./chunk-ZC4F4MYU.js";import"./chunk-YVN2NZL4.js";import"./chunk-BLXGL5MA.js";import"./chunk-3QH27NOC.js";import"./chunk-PWLF3WXM.js";import{b as n}from"./chunk-MJ2IPSAE.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-WJKE6XHF.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};
@@ -1,2 +1,2 @@
1
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-H6HLRKRK.js";import"./chunk-V6YI7YJ4.js";import"./chunk-VVWAUS3D.js";import"./chunk-LSET5TD3.js";import"./chunk-VNJJQED3.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-5MVJUALI.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{b as build,a as createBuildContext,c as ensureBuildIsReady,d as watch};
2
+ import{c as a,d as b,e as c,f as d}from"./chunk-F44CX3KC.js";import"./chunk-6PRIUPN4.js";import"./chunk-3QF3I2RD.js";import"./chunk-3IZX4OZ7.js";import"./chunk-26ZFSXSK.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-BLXGL5MA.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{b as build,a as createBuildContext,c as ensureBuildIsReady,d as watch};
@@ -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-F35K7YVH.js";import{a as R,d as w}from"./chunk-P2MUEKFT.js";import{k}from"./chunk-TEOMM3RD.js";import{f as y,h as g,k as f}from"./chunk-ZC4F4MYU.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-WJKE6XHF.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(`
3
3
  Dry run: updating ${t}
4
4
  `)):e.writeln(l(`
5
5
  Updating ${t}...