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,11 +1,11 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{c as f}from"./chunk-PIV56NIC.js";import{a as b}from"./chunk-MPGRKZIA.js";import{i as n}from"./chunk-6VHZQNHX.js";var S="<!-- noskills:start -->",y="<!-- noskills:end -->",Y=(e,t,s="npx eser noskills")=>{let o=[S,"## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","### Protocol","",` ${s} next --spec=<name> # get current instruction`,` ${s} next --spec=<name> --answer="your response" # submit result and advance`,"","Every noskills command that operates on a spec MUST include `--spec=<name>`.","Never omit it. Use `"+s+" spec list` to see available specs.","","### Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","### When to call noskills next","",`You MUST call \`${s} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];if((t?.allowGit??!1)||o.push("","### Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),o.push("","### Interactive choices","","When noskills output contains `interactiveOptions`, you MUST present them","using the AskUserQuestion tool. NEVER present options in prose.","","This is not optional. If you ask a question without AskUserQuestion when","interactiveOptions are present, you are violating protocol.","","Pass interactiveOptions as the `options` array in AskUserQuestion.","Use the `commandMap` to resolve the user's selection to a CLI command.","","### Convention discovery","","When you discover a pattern, receive a correction, or identify a recurring",'preference from the user, ask: "Should this be a permanent rule for this',`project, or just for this task?" If permanent, run: \`${s} rule add`,'"<description>"`. If just this task, note it and move on.',"Never write to `.eser/rules/` directly.","","### Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","### Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","### JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state."),e.length>0){o.push("","### Active Rules","");for(let i of e)o.push(`- ${i}`)}return o.push(y),o.join(`
3
- `)},x=async(e,t,s,o="npx eser noskills")=>{let i=`${e}/CLAUDE.md`,r=Y(t,s,o),a;try{a=await n.fs.readTextFile(i);let l=a.indexOf(S),c=a.indexOf(y);l!==-1&&c!==-1?a=a.slice(0,l)+r+a.slice(c+y.length):a=a.trimEnd()+`
2
+ import{c as y}from"./chunk-YW377352.js";import{a as b}from"./chunk-OAT2D23A.js";import{i as n}from"./chunk-WJKE6XHF.js";var S="<!-- noskills:start -->",g="<!-- noskills:end -->",Y=(e,t,s="npx eser noskills")=>{let o=[S,"## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","### Protocol","",` ${s} spec <name> next # get current instruction`,` ${s} spec <name> next --answer="your response" # submit result and advance`,"","Every noskills command that operates on a spec MUST include `spec <name>`.","Never omit it. Use `"+s+" spec list` to see available specs.","","### Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" spec <name> next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","### When to call noskills next","",`You MUST call \`${s} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];if((t?.allowGit??!1)||o.push("","### Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),o.push("","### Interactive choices","","When noskills output contains `interactiveOptions`, you MUST present them","using the AskUserQuestion tool. NEVER present options in prose.","","This is not optional. If you ask a question without AskUserQuestion when","interactiveOptions are present, you are violating protocol.","","Pass interactiveOptions as the `options` array in AskUserQuestion.","Use the `commandMap` to resolve the user's selection to a CLI command.","","### Convention discovery","","When you discover a pattern, receive a correction, or identify a recurring",'preference from the user, ask: "Should this be a permanent rule for this',`project, or just for this task?" If permanent, run: \`${s} rule add`,'"<description>"`. If just this task, note it and move on.',"Never write to `.eser/rules/` directly.","","### Pre-discovery research","","When starting a new spec, noskills may flag technologies that need","research. Before asking discovery questions, search for current versions","and API status of flagged technologies. Report findings to the user.","Your training data may be outdated \u2014 always verify.","","### Spec splitting","","When noskills suggests splitting a spec, present the options and wait for the","user's decision. Never split a spec without explicit user approval.","","### Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","### Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","### JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state.","","### Phase progress","","Every noskills output includes a roadmap showing the current phase.","Display it to the user. At critical transitions (approve, start execution),","noskills shows a gate with an explicit action. Present these prominently.","","### Code quality rules","","These rules apply during spec execution:","- After every file edit, run type-check and lint before reporting success","- Files over 500 LOC: read in chunks, never assume single read = full file","- If search returns few results, re-run narrower \u2014 assume truncation","- Re-read every file before and after editing","- Before refactoring large files, clean dead code first (separate commit)","","### Execution commitment","","Once a spec enters EXECUTING, complete it. Do not suggest mid-execution",'checkpoints, pauses, or "should we stop here?" questions.',"","noskills encourages small, meaningful specs defined during discovery.","If a spec is well-scoped, there is no reason to stop halfway \u2014 half-done","delivers nothing. If it feels too large mid-execution, that means","discovery should have split it. Finish this one, improve the next."),e.length>0){o.push("","### Active Rules","");for(let i of e)o.push(`- ${i}`)}return o.push(g),o.join(`
3
+ `)},x=async(e,t,s,o="npx eser noskills")=>{let i=`${e}/CLAUDE.md`,r=Y(t,s,o),a;try{a=await n.fs.readTextFile(i);let c=a.indexOf(S),l=a.indexOf(g);c!==-1&&l!==-1?a=a.slice(0,c)+r+a.slice(l+g.length):a=a.trimEnd()+`
4
4
 
5
5
  `+r+`
6
6
  `}catch{a=r+`
7
7
  `}await n.fs.writeTextFile(i,a)};var J=e=>({hooks:{PreToolUse:[{matcher:"Write|Edit|MultiEdit|Bash",hooks:[{type:"command",command:`${e} invoke-hook pre-tool-use`,timeout:5}]}],PostToolUse:[{matcher:"Write|Edit|MultiEdit",hooks:[{type:"command",command:`${e} invoke-hook post-file-write`,timeout:3}]},{matcher:"Bash",hooks:[{type:"command",command:`${e} invoke-hook post-bash`,timeout:3}]}],Stop:[{hooks:[{type:"command",command:`${e} invoke-hook stop`,timeout:10}]}],SessionStart:[{hooks:[{type:"command",command:`${e} invoke-hook session-start`,timeout:5}]}]}}),R=async(e,t="npx eser@latest noskills")=>{let s=`${e}/.claude/settings.json`,o={};try{let a=await n.fs.readTextFile(s);o=JSON.parse(a)}catch{}let i=J(t),r={...o,...i};await n.fs.mkdir(`${e}/.claude`,{recursive:!0}),await n.fs.writeTextFile(s,JSON.stringify(r,null,2)+`
8
- `)};var K=async(e,t)=>{let s=`${e}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0});let o=`---
8
+ `)};var q=async(e,t)=>{let s=`${e}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0});let o=`---
9
9
  name: noskills-executor
10
10
  description: "Executes a single noskills task."
11
11
  tools: Read, Edit, MultiEdit, Write, Bash, Grep, Glob, LS
@@ -31,7 +31,7 @@ When finished, provide a structured JSON summary:
31
31
 
32
32
  Do NOT return raw test output \u2014 summarize it in the verification field.
33
33
  The orchestrator will submit this to \`${t} next --answer\` on your behalf.
34
- `;await n.fs.writeTextFile(`${s}/noskills-executor.md`,o)},q=async(e,t)=>{let s=`${e}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-verifier.md`,`---
34
+ `;await n.fs.writeTextFile(`${s}/noskills-executor.md`,o)},K=async(e,t)=>{let s=`${e}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-verifier.md`,`---
35
35
  name: noskills-verifier
36
36
  description: "Independently verifies completed task work. Read-only. Never sees the executor's context."
37
37
  tools: Read, Bash, Grep, Glob, LS
@@ -60,51 +60,52 @@ When finished, provide a structured JSON summary:
60
60
  \\\`\\\`\\\`
61
61
 
62
62
  The orchestrator will use this report for the noskills status report.
63
- `)},A={id:"claude-code",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!1,mcp:!1,interaction:{hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"}},async syncRules(e,t){await x(e.root,e.rules,t,e.commandPrefix)},async syncHooks(e,t){await R(e.root,e.commandPrefix)},async syncAgents(e,t){await K(e.root,e.commandPrefix),await q(e.root,e.commandPrefix)}};var T=async(e,t,s="npx eser noskills")=>{let o=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.","","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","","## Execution model","","Execute tasks sequentially in this context. Do not attempt to spawn sub-agents.",""];if(t.length>0){o.push("## Rules","");for(let i of t)o.push(`- ${i}`);o.push("")}await n.fs.writeTextFile(`${e}/.cursorrules`,o.join(`
64
- `))};var C={id:"cursor",capabilities:{rules:!0,hooks:!1,agents:!1,specs:!1,mcp:!1,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!1,subAgentMethod:"none"}},async syncRules(e){await T(e.root,e.rules,e.commandPrefix)}};var X=".kiro/steering",O=".kiro/settings",Z=".kiro/agents",ee=".kiro/specs",te="hooks.json",se="mcp.json",oe="noskills-protocol.md",ne="noskills-coaching.md",k="noskills-rules.md",N="conventions.md",ie="noskills-executor.json",re="noskills-verifier.json",ae=(e,t)=>{let s=["---","inclusion: always","---","","# noskills Protocol","","# Generated by noskills \u2014 do not edit manually","","## What is noskills","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","## Protocol","",` ${e} next --spec=<name> # get current instruction`,` ${e} next --spec=<name> --answer="your response" # submit result and advance`,"","Every noskills command that operates on a spec MUST include `--spec=<name>`.",`Never omit it. Use \`${e} spec list\` to see available specs.`,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+e+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","",`You MUST call \`${e} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];return(t?.allowGit??!1)||s.push("","## Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),s.push("","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","Use the `commandMap` to resolve the user's selection to a CLI command.","","## Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","## Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","## JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state.",""),s.join(`
63
+ `)},A={id:"claude-code",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!1,mcp:!1,interaction:{hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"}},async syncRules(e,t){await x(e.root,e.rules,t,e.commandPrefix)},async syncHooks(e,t){await R(e.root,e.commandPrefix)},async syncAgents(e,t){await q(e.root,e.commandPrefix),await K(e.root,e.commandPrefix)}};var T=async(e,t,s="npx eser noskills")=>{let o=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.","","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","","## Execution model","","Execute tasks sequentially in this context. Do not attempt to spawn sub-agents.",""];if(t.length>0){o.push("## Rules","");for(let i of t)o.push(`- ${i}`);o.push("")}await n.fs.writeTextFile(`${e}/.cursorrules`,o.join(`
64
+ `))};var C={id:"cursor",capabilities:{rules:!0,hooks:!1,agents:!1,specs:!1,mcp:!1,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!1,subAgentMethod:"none"}},async syncRules(e){await T(e.root,e.rules,e.commandPrefix)}};var X=".kiro/steering",O=".kiro/settings",Z=".kiro/agents",ee=".kiro/specs",te="hooks.json",se="mcp.json",oe="noskills-protocol.md",ne="noskills-coaching.md",k="noskills-rules.md",N="conventions.md",ie="noskills-executor.json",re="noskills-verifier.json",ae=(e,t)=>{let s=["---","inclusion: always","---","","# noskills Protocol","","# Generated by noskills \u2014 do not edit manually","","## What is noskills","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","## Protocol","",` ${e} spec <name> next # get current instruction`,` ${e} spec <name> next --answer="your response" # submit result and advance`,"","Every noskills command that operates on a spec MUST include `spec <name>`.",`Never omit it. Use \`${e} spec list\` to see available specs.`,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+e+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","",`You MUST call \`${e} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];return(t?.allowGit??!1)||s.push("","## Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),s.push("","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","Use the `commandMap` to resolve the user's selection to a CLI command.","","## Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","## Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","## JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state.",""),s.join(`
65
65
  `)},ce=e=>["---","inclusion: auto","name: noskills-coaching",'description: "Guidance for noskills spec-driven development workflow, including convention discovery and rule promotion"',"---","","# noskills Coaching","","# Generated by noskills \u2014 do not edit manually","","## Convention discovery","","When you discover a pattern, receive a correction, or identify a recurring",'preference from the user, ask: "Should this be a permanent rule for this',`project, or just for this task?" If permanent, run: \`${e} rule add`,'"<description>"`. If just this task, note it and move on.',"Never write to `.eser/rules/` directly.","","## How to promote rules","","When a convention should be permanent, use the noskills CLI to register it:","",` ${e} rule add "<description of the rule>"`,"","This stores the rule in `.eser/rules/` and ensures it is synced to all","coding tools on the next `noskills sync`. Never edit `.eser/rules/` directly.",""].join(`
66
66
  `),le=e=>{let t=["---","inclusion: always","---","","# noskills Rules","","# Generated by noskills \u2014 do not edit manually","","## Active Rules",""];for(let s of e)t.push(`- ${s}`);return t.push(""),t.join(`
67
67
  `)},ue=e=>({hooks:[{_noskills:!0,trigger:"Prompt Submit",action:{type:"Run Command",command:`${e} invoke-hook session-start`},timeout:5e3},{_noskills:!0,trigger:"Pre Tool Use",condition:{toolNames:["write","shell"]},action:{type:"Run Command",command:`${e} invoke-hook pre-tool-use`},timeout:5e3},{_noskills:!0,trigger:"Post Tool Use",condition:{toolNames:["write"]},action:{type:"Run Command",command:`${e} invoke-hook post-file-write`},timeout:3e3},{_noskills:!0,trigger:"Post Tool Use",condition:{toolNames:["shell"]},action:{type:"Run Command",command:`${e} invoke-hook post-bash`},timeout:3e3},{_noskills:!0,trigger:"Agent Stop",action:{type:"Run Command",command:`${e} invoke-hook stop`},timeout:1e4}]}),de=e=>{let t=e.split(/\s+/),s=t[0]??"npx",o=[...t.slice(1),"mcp-serve"];return{mcpServers:{noskills:{command:s,args:o,env:{},autoApprove:["noskills_next","noskills_status"],disabled:!1}}}},pe=e=>({name:"noskills-executor",description:"Executes a single noskills task. Follows spec behavioral rules and reports structured results.",tools:["read","write","glob","grep","shell","delegate"],allowedTools:["read","write","glob","grep","shell","delegate"],resources:["file://.kiro/steering/noskills-protocol.md"],prompt:["You are executing a single task from a noskills spec.","Your ONLY job is to complete the task described in the prompt.","Follow all behavioral rules provided in the prompt.","Do NOT start new tasks, explore unrelated code, or make architectural decisions.","If the task is too vague to execute, say so immediately.","","## Self-Verification","After completing the task, you MUST verify your own work before reporting:","1. Run type check: `deno check` on all modified files","2. Run test suite: `deno test` on the relevant test files","3. If type check or tests fail, fix the issues before reporting","","## Reporting","When finished, provide a structured JSON summary:","```json",'{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"], "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"], "verification": {"typeCheck": "pass|fail", "tests": "pass|fail (N passed, M failed)"}}',"```","","Do NOT return raw test output \u2014 summarize it in the verification field.",`The orchestrator will submit this to \`${e} next --answer\` on your behalf.`].join(`
68
68
  `)}),he=()=>({name:"noskills-verifier",description:"Independently verifies completed task work. Read-only. Never sees the executor's context.",tools:["read","glob","grep","shell","use_subagent"],allowedTools:["read","glob","grep","shell"],resources:["file://.kiro/steering/noskills-protocol.md"],prompt:["You are verifying another agent's work. You have NO context about how it was done.","Read the changed files. Run the test suite. Check each acceptance criterion independently.","","For each acceptance criterion:","- PASS: with evidence \u2014 show the grep result, the test output, or the file content that proves it","- FAIL: with specific reason \u2014 what's missing, what's wrong, what doesn't match","","Be skeptical. Don't assume anything works \u2014 verify it yourself.","You CANNOT edit files. Read-only access only.","","## Verification Steps","1. Read each modified file and verify the changes are correct","2. Run type check: `deno check` on modified files","3. Run tests: `deno test` on relevant test files","4. Check each acceptance criterion against actual file contents","","## Report Format","When finished, provide a structured JSON summary:","```json",'{"results": [{"id": "ac-1", "status": "PASS", "evidence": "..."}, {"id": "ac-2", "status": "FAIL", "reason": "..."}]}',"```","","The orchestrator will use this report for the noskills status report."].join(`
69
- `)}),E=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},me=e=>{let s=e.match(/^# Spec:\s*(.+)$/m)?.[1]?.trim()??"Untitled",o=new Map,i=e.split(/^## /m);for(let a of i){let l=a.indexOf(`
70
- `);if(l===-1)continue;let c=a.slice(0,l).trim().toLowerCase(),u=a.slice(l+1).trim();o.set(c,u)}let r=a=>{for(let[l,c]of o)if(l.startsWith(a.toLowerCase()))return c;return""};return{title:s,concerns:r("concerns"),discoveryAnswers:r("discovery answers"),contributorGuide:r("contributor guide"),publicApi:r("public api"),outOfScope:r("out of scope"),tasks:r("tasks"),verification:r("verification")}},fe=e=>{let t=[`# Feature: ${e.title}`,"","## Overview","",e.discoveryAnswers||"(no discovery answers yet)","","## Requirements",""],s=e.discoveryAnswers.split(`
69
+ `)}),E=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},me=e=>{let s=e.match(/^# Spec:\s*(.+)$/m)?.[1]?.trim()??"Untitled",o=new Map,i=e.split(/^## /m);for(let a of i){let c=a.indexOf(`
70
+ `);if(c===-1)continue;let l=a.slice(0,c).trim().toLowerCase(),u=a.slice(c+1).trim();o.set(l,u)}let r=a=>{for(let[c,l]of o)if(c.startsWith(a.toLowerCase()))return l;return""};return{title:s,concerns:r("concerns"),discoveryAnswers:r("discovery answers"),contributorGuide:r("contributor guide"),publicApi:r("public api"),outOfScope:r("out of scope"),tasks:r("tasks"),verification:r("verification")}},fe=e=>{let t=[`# Feature: ${e.title}`,"","## Overview","",e.discoveryAnswers||"(no discovery answers yet)","","## Requirements",""],s=e.discoveryAnswers.split(`
71
71
  `).filter(o=>o.startsWith("### "));if(s.length>0)for(let o of s)t.push(`- ${o.replace(/^###\s*/,"")}`);else e.discoveryAnswers?t.push("- See overview for details"):t.push("- (none yet)");if(t.push("","## Acceptance Criteria",""),e.verification){let o=e.verification.split(`
72
72
  `).filter(i=>i.trim());for(let i of o){let r=i.replace(/^[-*]\s*/,"").trim();r&&t.push(`- [ ] ${r}`)}}else t.push("- [ ] (none yet)");return t.push("","## Out of Scope",""),t.push(e.outOfScope||"(nothing listed)"),t.push(""),t.join(`
73
73
  `)},ye=e=>{let t=[`# Design: ${e.title}`,"","## Architecture",""];return e.discoveryAnswers?t.push(e.discoveryAnswers):t.push("(no architecture decisions yet)"),t.push("","## Concerns",""),e.concerns?t.push(e.concerns):t.push("(no active concerns)"),t.push("","## Decisions",""),e.contributorGuide||e.publicApi?(e.contributorGuide&&t.push("### Contributor Guide","",e.contributorGuide,""),e.publicApi&&t.push("### Public API Surface","",e.publicApi,"")):t.push("(no decisions yet)"),t.push(""),t.join(`
74
- `)},ke=e=>{let t=[`# Tasks: ${e.title}`,""];return e.tasks?t.push(e.tasks):t.push("(no tasks yet)"),t.push(""),t.join(`
75
- `)},$={id:"kiro",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!0,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"delegation"}},async syncRules(e,t){let s=`${e.root}/${X}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/${oe}`,ae(e.commandPrefix,t)),await n.fs.writeTextFile(`${s}/${ne}`,ce(e.commandPrefix)),e.rules.length>0?await n.fs.writeTextFile(`${s}/${k}`,le(e.rules)):await E(`${s}/${k}`)&&await n.fs.remove(`${s}/${k}`),await E(`${s}/${N}`)&&await n.fs.remove(`${s}/${N}`)},async syncHooks(e,t){let s=`${e.root}/${O}`,o=`${s}/${te}`;await n.fs.mkdir(s,{recursive:!0});let i=[];try{let c=await n.fs.readTextFile(o),u=JSON.parse(c);Array.isArray(u.hooks)&&(i=u.hooks)}catch{}let r=i.filter(c=>!c._noskills),a=ue(e.commandPrefix),l={hooks:[...r,...a.hooks]};await n.fs.writeTextFile(o,JSON.stringify(l,null,2)+`
74
+ `)},ge=e=>{let t=[`# Tasks: ${e.title}`,""];return e.tasks?t.push(e.tasks):t.push("(no tasks yet)"),t.push(""),t.join(`
75
+ `)},$={id:"kiro",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!0,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"delegation"}},async syncRules(e,t){let s=`${e.root}/${X}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/${oe}`,ae(e.commandPrefix,t)),await n.fs.writeTextFile(`${s}/${ne}`,ce(e.commandPrefix)),e.rules.length>0?await n.fs.writeTextFile(`${s}/${k}`,le(e.rules)):await E(`${s}/${k}`)&&await n.fs.remove(`${s}/${k}`),await E(`${s}/${N}`)&&await n.fs.remove(`${s}/${N}`)},async syncHooks(e,t){let s=`${e.root}/${O}`,o=`${s}/${te}`;await n.fs.mkdir(s,{recursive:!0});let i=[];try{let l=await n.fs.readTextFile(o),u=JSON.parse(l);Array.isArray(u.hooks)&&(i=u.hooks)}catch{}let r=i.filter(l=>!l._noskills),a=ue(e.commandPrefix),c={hooks:[...r,...a.hooks]};await n.fs.writeTextFile(o,JSON.stringify(c,null,2)+`
76
76
  `)},async syncAgents(e,t){let s=`${e.root}/${Z}`;await n.fs.mkdir(s,{recursive:!0});let o=pe(e.commandPrefix);await n.fs.writeTextFile(`${s}/${ie}`,JSON.stringify(o,null,2)+`
77
77
  `);let i=he();await n.fs.writeTextFile(`${s}/${re}`,JSON.stringify(i,null,2)+`
78
- `)},async syncSpecs(e,t){let s;try{s=await n.fs.readTextFile(t)}catch{return}if(s.trim()==="")return;let o=t.split("/"),i=o[o.length-2]??"unknown",r=me(s),a=`${e.root}/${ee}/${i}`;await n.fs.mkdir(a,{recursive:!0}),await n.fs.writeTextFile(`${a}/requirements.md`,fe(r)),await n.fs.writeTextFile(`${a}/design.md`,ye(r)),await n.fs.writeTextFile(`${a}/tasks.md`,ke(r))},async syncMcp(e){let t=`${e.root}/${O}`,s=`${t}/${se}`;await n.fs.mkdir(t,{recursive:!0});let o={mcpServers:{}};try{let a=await n.fs.readTextFile(s),l=JSON.parse(a);l.mcpServers!==void 0&&l.mcpServers!==null&&(o=l)}catch{}let i=de(e.commandPrefix),r={...o,mcpServers:{...o.mcpServers,...i.mcpServers}};await n.fs.writeTextFile(s,JSON.stringify(r,null,2)+`
79
- `)}};var m=async(e,t,s="npx eser noskills")=>{let o=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.","","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","","## Execution model","","Execute tasks sequentially in this context. Do not attempt to spawn sub-agents.",""];if(t.length>0){o.push("## Rules","");for(let i of t)o.push(`- ${i}`);o.push("")}await n.fs.mkdir(`${e}/.github`,{recursive:!0}),await n.fs.writeTextFile(`${e}/.github/copilot-instructions.md`,o.join(`
80
- `))};var D={id:"copilot",capabilities:{rules:!0,hooks:!1,agents:!1,specs:!1,mcp:!1,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!1,subAgentMethod:"none"}},async syncRules(e){await m(e.root,e.rules,e.commandPrefix)}};var M=async(e,t,s="npx eser noskills")=>{let o=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.","","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","","## Execution model","","Execute tasks sequentially in this context. Do not attempt to spawn sub-agents.",""];if(t.length>0){o.push("## Rules","");for(let i of t)o.push(`- ${i}`);o.push("")}await n.fs.writeTextFile(`${e}/.windsurfrules`,o.join(`
81
- `))};var F={id:"windsurf",capabilities:{rules:!0,hooks:!1,agents:!1,specs:!1,mcp:!1,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!1,subAgentMethod:"none"}},async syncRules(e){await M(e.root,e.rules,e.commandPrefix)}};var Se="AGENTS.md",P="<!-- noskills:start -->",g="<!-- noskills:end -->",xe=(e,t)=>{let s=["## noskills Protocol","","# Generated by noskills \u2014 do not edit manually","","### What is noskills","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","### Protocol","",` ${e} next --spec=<name> # get current instruction`,` ${e} next --spec=<name> --answer="your response" # submit result and advance`,"","Every noskills command that operates on a spec MUST include `--spec=<name>`.",`Never omit it. Use \`${e} spec list\` to see available specs.`,"","### Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+e+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","### When to call noskills next","",`You MUST call \`${e} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];return(t?.allowGit??!1)||s.push("","### Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),s.push("","### Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","Use the `commandMap` to resolve the user's selection to a CLI command.","","### Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","### Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","### JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state.",""),s.join(`
78
+ `)},async syncSpecs(e,t){let s;try{s=await n.fs.readTextFile(t)}catch{return}if(s.trim()==="")return;let o=t.split("/"),i=o[o.length-2]??"unknown",r=me(s),a=`${e.root}/${ee}/${i}`;await n.fs.mkdir(a,{recursive:!0}),await n.fs.writeTextFile(`${a}/requirements.md`,fe(r)),await n.fs.writeTextFile(`${a}/design.md`,ye(r)),await n.fs.writeTextFile(`${a}/tasks.md`,ge(r))},async syncMcp(e){let t=`${e.root}/${O}`,s=`${t}/${se}`;await n.fs.mkdir(t,{recursive:!0});let o={mcpServers:{}};try{let a=await n.fs.readTextFile(s),c=JSON.parse(a);c.mcpServers!==void 0&&c.mcpServers!==null&&(o=c)}catch{}let i=de(e.commandPrefix),r={...o,mcpServers:{...o.mcpServers,...i.mcpServers}};await n.fs.writeTextFile(s,JSON.stringify(r,null,2)+`
79
+ `)}};var f=async(e,t,s="npx eser noskills")=>{let o=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.","","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","","## Execution model","","Execute tasks sequentially in this context. Do not attempt to spawn sub-agents.",""];if(t.length>0){o.push("## Rules","");for(let i of t)o.push(`- ${i}`);o.push("")}await n.fs.mkdir(`${e}/.github`,{recursive:!0}),await n.fs.writeTextFile(`${e}/.github/copilot-instructions.md`,o.join(`
80
+ `))};var D={id:"copilot",capabilities:{rules:!0,hooks:!1,agents:!1,specs:!1,mcp:!1,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!1,subAgentMethod:"none"}},async syncRules(e){await f(e.root,e.rules,e.commandPrefix)}};var M=async(e,t,s="npx eser noskills")=>{let o=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+s+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.","","## Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","","## Execution model","","Execute tasks sequentially in this context. Do not attempt to spawn sub-agents.",""];if(t.length>0){o.push("## Rules","");for(let i of t)o.push(`- ${i}`);o.push("")}await n.fs.writeTextFile(`${e}/.windsurfrules`,o.join(`
81
+ `))};var F={id:"windsurf",capabilities:{rules:!0,hooks:!1,agents:!1,specs:!1,mcp:!1,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!1,subAgentMethod:"none"}},async syncRules(e){await M(e.root,e.rules,e.commandPrefix)}};var Se="AGENTS.md",P="<!-- noskills:start -->",w="<!-- noskills:end -->",xe=(e,t)=>{let s=["## noskills Protocol","","# Generated by noskills \u2014 do not edit manually","","### What is noskills","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","### Protocol","",` ${e} spec <name> next # get current instruction`,` ${e} spec <name> next --answer="your response" # submit result and advance`,"","Every noskills command that operates on a spec MUST include `spec <name>`.",`Never omit it. Use \`${e} spec list\` to see available specs.`,"","### Why noskills calls matter","","noskills is not a form to fill out. It is a live state machine that the user","watches in real-time. Every `"+e+" next --answer` call:","","- Updates the spec file on disk (the user sees it change)","- Updates the terminal dashboard if `noskills watch` is running","- Advances the state machine to the next phase","- Records the decision permanently in the project history","","When you batch-submit answers or backfill discovery responses yourself,","the user sees nothing happening \u2014 then suddenly everything jumps forward.","This defeats the purpose.","","Call noskills ONCE per interaction. Ask the user ONE question. Wait for","their answer. Submit it. Ask the next. The user is watching every step.","Do NOT pre-fill answers. Do NOT batch multiple answers. Do NOT answer","discovery questions yourself \u2014 the user's input is the data.","","### When to call noskills next","",`You MUST call \`${e} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];return(t?.allowGit??!1)||s.push("","### Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),s.push("","### Interactive choices","","Present choices as numbered lists. Users select by number.","When interactiveOptions are present in noskills output, present each as a","numbered item with its label and description. Ask the user to pick a number.","Use the `commandMap` to resolve the user's selection to a CLI command.","","### Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","### Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","### JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state.",""),s.join(`
82
82
  `)},Re=e=>["### Convention discovery","","When you discover a pattern, receive a correction, or identify a recurring",'preference from the user, ask: "Should this be a permanent rule for this',`project, or just for this task?" If permanent, run: \`${e} rule add`,'"<description>"`. If just this task, note it and move on.',"Never write to `.eser/rules/` directly.","","### How to promote rules","","When a convention should be permanent, use the noskills CLI to register it:","",` ${e} rule add "<description of the rule>"`,"","This stores the rule in `.eser/rules/` and ensures it is synced to all","coding tools on the next `noskills sync`. Never edit `.eser/rules/` directly.",""].join(`
83
83
  `),Ae=e=>{let t=["### Active Rules",""];for(let s of e)t.push(`- ${s}`);return t.push(""),t.join(`
84
- `)},Te=(e,t,s)=>{let o=[P,xe(t,s),Re(t)];return e.length>0&&o.push(Ae(e)),o.push(g),o.join(`
85
- `)},p=async(e,t)=>{let s=`${e.root}/${Se}`,o=Te(e.rules,e.commandPrefix,t),i;try{i=await n.fs.readTextFile(s);let r=i.indexOf(P),a=i.indexOf(g);r!==-1&&a!==-1?i=i.slice(0,r)+o+i.slice(a+g.length):i=i.trimEnd()+`
84
+ `)},Te=(e,t,s)=>{let o=[P,xe(t,s),Re(t)];return e.length>0&&o.push(Ae(e)),o.push(w),o.join(`
85
+ `)},m=async(e,t)=>{let s=`${e.root}/${Se}`,o=Te(e.rules,e.commandPrefix,t),i;try{i=await n.fs.readTextFile(s);let r=i.indexOf(P),a=i.indexOf(w);r!==-1&&a!==-1?i=i.slice(0,r)+o+i.slice(a+w.length):i=i.trimEnd()+`
86
86
 
87
87
  `+o+`
88
88
  `}catch{i=o+`
89
89
  `}await n.fs.writeTextFile(s,i)};var Ce=".opencode/plugins",Oe=".opencode/agents",Ne=".opencode/skills",Ee="opencode.json",$e=e=>["// Generated by noskills \u2014 do not edit manually",'import { execSync } from "node:child_process";',"","const run = (event: string): void => {"," try {",` execSync(\`${e} invoke-hook \${event}\`, {`,' stdio: "inherit",'," timeout: 10000,"," });"," } catch {"," // Hook failure should not block the session"," }","};","","export default async () => ({",' "session.created": async () => {',' run("session-start");'," },",' "tool.execute.before": async (params: { toolName: string }) => {',' if (["write", "shell"].includes(params.toolName)) {',' run("pre-tool-use");'," }"," },",' "tool.execute.after": async (params: { toolName: string }) => {',' if (params.toolName === "write") {',' run("post-file-write");',' } else if (params.toolName === "shell") {',' run("post-bash");'," }"," },",' "session.deleted": async () => {',' run("stop");'," },","});",""].join(`
90
90
  `),Ie=e=>["---","name: noskills-executor",'description: "Executes a single noskills task. Follows spec behavioral rules and reports structured results."',"tools: read, write, glob, grep, shell, delegate","---","","You are executing a single task from a noskills spec.","Your ONLY job is to complete the task described in the prompt.","Follow all behavioral rules provided in the prompt.","Do NOT start new tasks, explore unrelated code, or make architectural decisions.","If the task is too vague to execute, say so immediately.","","## Self-Verification","After completing the task, you MUST verify your own work before reporting:","1. Run type check: `deno check` on all modified files","2. Run test suite: `deno test` on the relevant test files","3. If type check or tests fail, fix the issues before reporting","","## Reporting","When finished, provide a structured JSON summary:","```json",'{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"], "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"], "verification": {"typeCheck": "pass|fail", "tests": "pass|fail (N passed, M failed)"}}',"```","","Do NOT return raw test output \u2014 summarize it in the verification field.",`The orchestrator will submit this to \`${e} next --answer\` on your behalf.`,""].join(`
91
91
  `),De=()=>["---","name: noskills-verifier",`description: "Independently verifies completed task work. Read-only. Never sees the executor's context."`,"tools: read, glob, grep, shell","---","","You are verifying another agent's work. You have NO context about how it was done.","Read the changed files. Run the test suite. Check each acceptance criterion independently.","","For each acceptance criterion:","- PASS: with evidence \u2014 show the grep result, the test output, or the file content that proves it","- FAIL: with specific reason \u2014 what's missing, what's wrong, what doesn't match","","Be skeptical. Don't assume anything works \u2014 verify it yourself.","You CANNOT edit files. Read-only access only.","","## Verification Steps","1. Read each modified file and verify the changes are correct","2. Run type check: `deno check` on modified files","3. Run tests: `deno test` on relevant test files","4. Check each acceptance criterion against actual file contents","","## Report Format","When finished, provide a structured JSON summary:","```json",'{"results": [{"id": "ac-1", "status": "PASS", "evidence": "..."}, {"id": "ac-2", "status": "FAIL", "reason": "..."}]}',"```","","The orchestrator will use this report for the noskills status report.",""].join(`
92
- `),Me=e=>{let s=e.match(/^# Spec:\s*(.+)$/m)?.[1]?.trim()??"Untitled",o=new Map,i=e.split(/^## /m);for(let a of i){let l=a.indexOf(`
93
- `);if(l===-1)continue;let c=a.slice(0,l).trim().toLowerCase(),u=a.slice(l+1).trim();o.set(c,u)}let r=a=>{for(let[l,c]of o)if(l.startsWith(a.toLowerCase()))return c;return""};return{title:s,concerns:r("concerns"),discoveryAnswers:r("discovery answers"),contributorGuide:r("contributor guide"),publicApi:r("public api"),outOfScope:r("out of scope"),tasks:r("tasks"),verification:r("verification")}},Fe=e=>{let t=["---",`name: ${e.title}`,`description: "noskills spec: ${e.title}"`,"---","",`# ${e.title}`,""];return e.discoveryAnswers&&t.push("## Overview","",e.discoveryAnswers,""),e.concerns&&t.push("## Concerns","",e.concerns,""),e.contributorGuide&&t.push("## Contributor Guide","",e.contributorGuide,""),e.publicApi&&t.push("## Public API","",e.publicApi,""),e.outOfScope&&t.push("## Out of Scope","",e.outOfScope,""),e.tasks&&t.push("## Tasks","",e.tasks,""),e.verification&&t.push("## Verification","",e.verification,""),t.join(`
94
- `)},Pe=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},U={id:"opencode",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!0,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"delegation"}},async syncRules(e,t){await p(e,t)},async syncHooks(e,t){let s=`${e.root}/${Ce}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills.ts`,$e(e.commandPrefix))},async syncAgents(e,t){let s=`${e.root}/${Oe}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-executor.md`,Ie(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.md`,De())},async syncSpecs(e,t){let s;try{s=await n.fs.readTextFile(t)}catch{return}if(s.trim()==="")return;let o=t.split("/"),i=o[o.length-2]??"unknown",r=Me(s),a=`${e.root}/${Ne}`;await n.fs.mkdir(a,{recursive:!0}),await n.fs.writeTextFile(`${a}/${i}.md`,Fe(r))},async syncMcp(e){let t=`${e.root}/${Ee}`,s={};if(await Pe(t))try{let l=await n.fs.readTextFile(t);s=JSON.parse(l)}catch{}let o=e.commandPrefix.split(/\s+/),i=o[0]??"npx",r=[...o.slice(1),"mcp-serve"],a={...s,mcp:{...s.mcp,noskills:{type:"local",command:i,args:r}}};await n.fs.writeTextFile(t,JSON.stringify(a,null,2)+`
95
- `)}};var je=".codex",_e="hooks.json",We=".codex/agents",He=".codex/config.toml",Le=e=>({hooks:[{_noskills:!0,event:"SessionStart",command:`${e} invoke-hook session-start`,timeout:5e3},{_noskills:!0,event:"PreToolUse",command:`${e} invoke-hook pre-tool-use`,timeout:5e3},{_noskills:!0,event:"PostToolUse",command:`${e} invoke-hook post-file-write`,timeout:3e3},{_noskills:!0,event:"Stop",command:`${e} invoke-hook stop`,timeout:1e4}]}),Ye=e=>['name = "noskills-executor"','description = "Executes a single noskills task. Follows spec behavioral rules and reports structured results."','developer_instructions = """',["You are executing a single task from a noskills spec.","Your ONLY job is to complete the task described in the prompt.","Follow all behavioral rules provided in the prompt.","Do NOT start new tasks, explore unrelated code, or make architectural decisions.","If the task is too vague to execute, say so immediately.","","## Self-Verification","After completing the task, you MUST verify your own work before reporting:","1. Run type check: `deno check` on all modified files","2. Run test suite: `deno test` on the relevant test files","3. If type check or tests fail, fix the issues before reporting","","## Reporting","When finished, provide a structured JSON summary:",'{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"],',' "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"],',' "verification": {"typeCheck": "pass|fail", "tests": "pass|fail"}}',"","Do NOT return raw test output \u2014 summarize it in the verification field.",`The orchestrator will submit this to \`${e} next --answer\` on your behalf.`].join(`
92
+ `),Me=e=>{let s=e.match(/^# Spec:\s*(.+)$/m)?.[1]?.trim()??"Untitled",o=new Map,i=e.split(/^## /m);for(let a of i){let c=a.indexOf(`
93
+ `);if(c===-1)continue;let l=a.slice(0,c).trim().toLowerCase(),u=a.slice(c+1).trim();o.set(l,u)}let r=a=>{for(let[c,l]of o)if(c.startsWith(a.toLowerCase()))return l;return""};return{title:s,concerns:r("concerns"),discoveryAnswers:r("discovery answers"),contributorGuide:r("contributor guide"),publicApi:r("public api"),outOfScope:r("out of scope"),tasks:r("tasks"),verification:r("verification")}},Fe=e=>{let t=["---",`name: ${e.title}`,`description: "noskills spec: ${e.title}"`,"---","",`# ${e.title}`,""];return e.discoveryAnswers&&t.push("## Overview","",e.discoveryAnswers,""),e.concerns&&t.push("## Concerns","",e.concerns,""),e.contributorGuide&&t.push("## Contributor Guide","",e.contributorGuide,""),e.publicApi&&t.push("## Public API","",e.publicApi,""),e.outOfScope&&t.push("## Out of Scope","",e.outOfScope,""),e.tasks&&t.push("## Tasks","",e.tasks,""),e.verification&&t.push("## Verification","",e.verification,""),t.join(`
94
+ `)},Pe=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},U={id:"opencode",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!0,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"delegation"}},async syncRules(e,t){await m(e,t)},async syncHooks(e,t){let s=`${e.root}/${Ce}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills.ts`,$e(e.commandPrefix))},async syncAgents(e,t){let s=`${e.root}/${Oe}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-executor.md`,Ie(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.md`,De())},async syncSpecs(e,t){let s;try{s=await n.fs.readTextFile(t)}catch{return}if(s.trim()==="")return;let o=t.split("/"),i=o[o.length-2]??"unknown",r=Me(s),a=`${e.root}/${Ne}`;await n.fs.mkdir(a,{recursive:!0}),await n.fs.writeTextFile(`${a}/${i}.md`,Fe(r))},async syncMcp(e){let t=`${e.root}/${Ee}`,s={};if(await Pe(t))try{let c=await n.fs.readTextFile(t);s=JSON.parse(c)}catch{}let o=e.commandPrefix.split(/\s+/),i=o[0]??"npx",r=[...o.slice(1),"mcp-serve"],a={...s,mcp:{...s.mcp,noskills:{type:"local",command:i,args:r}}};await n.fs.writeTextFile(t,JSON.stringify(a,null,2)+`
95
+ `)}};var je=".codex",We="hooks.json",_e=".codex/agents",He=".codex/config.toml",Le=e=>({hooks:[{_noskills:!0,event:"SessionStart",command:`${e} invoke-hook session-start`,timeout:5e3},{_noskills:!0,event:"PreToolUse",command:`${e} invoke-hook pre-tool-use`,timeout:5e3},{_noskills:!0,event:"PostToolUse",command:`${e} invoke-hook post-file-write`,timeout:3e3},{_noskills:!0,event:"Stop",command:`${e} invoke-hook stop`,timeout:1e4}]}),Ye=e=>['name = "noskills-executor"','description = "Executes a single noskills task. Follows spec behavioral rules and reports structured results."','developer_instructions = """',["You are executing a single task from a noskills spec.","Your ONLY job is to complete the task described in the prompt.","Follow all behavioral rules provided in the prompt.","Do NOT start new tasks, explore unrelated code, or make architectural decisions.","If the task is too vague to execute, say so immediately.","","## Self-Verification","After completing the task, you MUST verify your own work before reporting:","1. Run type check: `deno check` on all modified files","2. Run test suite: `deno test` on the relevant test files","3. If type check or tests fail, fix the issues before reporting","","## Reporting","When finished, provide a structured JSON summary:",'{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"],',' "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"],',' "verification": {"typeCheck": "pass|fail", "tests": "pass|fail"}}',"","Do NOT return raw test output \u2014 summarize it in the verification field.",`The orchestrator will submit this to \`${e} next --answer\` on your behalf.`].join(`
96
96
  `),'"""',""].join(`
97
97
  `),Ge=()=>['name = "noskills-verifier"',`description = "Independently verifies completed task work. Read-only. Never sees the executor's context."`,'developer_instructions = """',["You are verifying another agent's work. You have NO context about how it was done.","Read the changed files. Run the test suite. Check each acceptance criterion independently.","","For each acceptance criterion:","- PASS: with evidence \u2014 show the grep result, the test output, or the file content that proves it","- FAIL: with specific reason \u2014 what's missing, what's wrong, what doesn't match","","Be skeptical. Don't assume anything works \u2014 verify it yourself.","You CANNOT edit files. Read-only access only.","","## Verification Steps","1. Read each modified file and verify the changes are correct","2. Run type check: `deno check` on modified files","3. Run tests: `deno test` on relevant test files","4. Check each acceptance criterion against actual file contents","","## Report Format","When finished, provide a structured JSON summary:",'{"results": [{"id": "ac-1", "status": "PASS", "evidence": "..."},',' {"id": "ac-2", "status": "FAIL", "reason": "..."}]}',"","The orchestrator will use this report for the noskills status report."].join(`
98
98
  `),'"""',""].join(`
99
99
  `),Je=e=>{let t=e.split(/\s+/),s=t[0]??"npx",o=[...t.slice(1),"mcp-serve"].map(i=>`"${i}"`).join(", ");return`[mcp_servers.noskills]
100
100
  command = "${s}"
101
101
  args = [${o}]
102
- `},Ve=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},j={id:"codex",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!1,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"delegation"}},async syncRules(e,t){await p(e,t)},async syncHooks(e,t){let s=`${e.root}/${je}`,o=`${s}/${_e}`;await n.fs.mkdir(s,{recursive:!0});let i=[];try{let c=await n.fs.readTextFile(o),u=JSON.parse(c);Array.isArray(u.hooks)&&(i=u.hooks)}catch{}let r=i.filter(c=>!c._noskills),a=Le(e.commandPrefix),l={hooks:[...r,...a.hooks]};await n.fs.writeTextFile(o,JSON.stringify(l,null,2)+`
103
- `)},async syncAgents(e,t){let s=`${e.root}/${We}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-executor.toml`,Ye(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.toml`,Ge())},async syncMcp(e){let t=`${e.root}/${He}`;await n.fs.mkdir(`${e.root}/.codex`,{recursive:!0});let s="";if(await Ve(t))try{s=await n.fs.readTextFile(t)}catch{}let o=s.replace(/\[mcp_servers\.noskills\][\s\S]*?(?=\[|$)/,"").trimEnd(),i=Je(e.commandPrefix),r=o+(o.length>0?`
102
+ `},Ve=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},j={id:"codex",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!1,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"spawn"}},async syncRules(e,t){await m(e,t)},async syncHooks(e,t){let s=`${e.root}/${je}`,o=`${s}/${We}`;await n.fs.mkdir(s,{recursive:!0});let i=[];try{let l=await n.fs.readTextFile(o),u=JSON.parse(l);Array.isArray(u.hooks)&&(i=u.hooks)}catch{}let r=i.filter(l=>!l._noskills),a=Le(e.commandPrefix),c={hooks:[...r,...a.hooks]};await n.fs.writeTextFile(o,JSON.stringify(c,null,2)+`
103
+ `)},async syncAgents(e,t){let s=`${e.root}/${_e}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-executor.toml`,Ye(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.toml`,Ge())},async syncMcp(e){let t=`${e.root}/${He}`;await n.fs.mkdir(`${e.root}/.codex`,{recursive:!0});let s="";if(await Ve(t))try{s=await n.fs.readTextFile(t)}catch{}let o=s.replace(/\[mcp_servers\.noskills\][\s\S]*?(?=\[|$)/,"").trimEnd(),i=Je(e.commandPrefix),r=o+(o.length>0?`
104
104
 
105
- `:"")+i;await n.fs.writeTextFile(t,r)}};var qe=".github/hooks",Be="noskills.json",ze=".github/agents",Qe=".copilot",Xe="mcp.json",Ze=e=>({version:1,hooks:{"noskills:sessionStart":{_noskills:!0,command:["bash","-c",`${e} invoke-hook session-start`],timeoutSec:5},"noskills:preToolUse":{_noskills:!0,command:["bash","-c",`${e} invoke-hook pre-tool-use`],timeoutSec:5},"noskills:postToolUse":{_noskills:!0,command:["bash","-c",`${e} invoke-hook post-file-write`],timeoutSec:3},"noskills:agentStop":{_noskills:!0,command:["bash","-c",`${e} invoke-hook stop`],timeoutSec:10}}}),et=e=>["---","name: noskills-executor",'description: "Executes a single noskills task. Follows spec behavioral rules and reports structured results."',"tools:"," - read"," - write"," - glob"," - grep"," - shell","---","","You are executing a single task from a noskills spec.","Your ONLY job is to complete the task described in the prompt.","Follow all behavioral rules provided in the prompt.","Do NOT start new tasks, explore unrelated code, or make architectural decisions.","If the task is too vague to execute, say so immediately.","","## Self-Verification","After completing the task, you MUST verify your own work before reporting:","1. Run type check: `deno check` on all modified files","2. Run test suite: `deno test` on the relevant test files","3. If type check or tests fail, fix the issues before reporting","","## Reporting","When finished, provide a structured JSON summary:","```json",'{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"], "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"], "verification": {"typeCheck": "pass|fail", "tests": "pass|fail (N passed, M failed)"}}',"```","","Do NOT return raw test output \u2014 summarize it in the verification field.",`The orchestrator will submit this to \`${e} next --answer\` on your behalf.`,""].join(`
105
+ `:"")+i;await n.fs.writeTextFile(t,r)}};var Ke=".github/hooks",Be="noskills.json",ze=".github/agents",Qe=".copilot",Xe="mcp.json",Ze=e=>({version:1,hooks:{"noskills:sessionStart":{_noskills:!0,command:["bash","-c",`${e} invoke-hook session-start`],timeoutSec:5},"noskills:preToolUse":{_noskills:!0,command:["bash","-c",`${e} invoke-hook pre-tool-use`],timeoutSec:5},"noskills:postToolUse":{_noskills:!0,command:["bash","-c",`${e} invoke-hook post-file-write`],timeoutSec:3},"noskills:agentStop":{_noskills:!0,command:["bash","-c",`${e} invoke-hook stop`],timeoutSec:10}}}),et=e=>["---","name: noskills-executor",'description: "Executes a single noskills task. Follows spec behavioral rules and reports structured results."',"tools:"," - read"," - write"," - glob"," - grep"," - shell","---","","You are executing a single task from a noskills spec.","Your ONLY job is to complete the task described in the prompt.","Follow all behavioral rules provided in the prompt.","Do NOT start new tasks, explore unrelated code, or make architectural decisions.","If the task is too vague to execute, say so immediately.","","## Self-Verification","After completing the task, you MUST verify your own work before reporting:","1. Run type check: `deno check` on all modified files","2. Run test suite: `deno test` on the relevant test files","3. If type check or tests fail, fix the issues before reporting","","## Reporting","When finished, provide a structured JSON summary:","```json",'{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"], "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"], "verification": {"typeCheck": "pass|fail", "tests": "pass|fail (N passed, M failed)"}}',"```","","Do NOT return raw test output \u2014 summarize it in the verification field.",`The orchestrator will submit this to \`${e} next --answer\` on your behalf.`,""].join(`
106
106
  `),tt=()=>["---","name: noskills-verifier",`description: "Independently verifies completed task work. Read-only. Never sees the executor's context."`,"tools:"," - read"," - glob"," - grep"," - shell","---","","You are verifying another agent's work. You have NO context about how it was done.","Read the changed files. Run the test suite. Check each acceptance criterion independently.","","For each acceptance criterion:","- PASS: with evidence \u2014 show the grep result, the test output, or the file content that proves it","- FAIL: with specific reason \u2014 what's missing, what's wrong, what doesn't match","","Be skeptical. Don't assume anything works \u2014 verify it yourself.","You CANNOT edit files. Read-only access only.","","## Verification Steps","1. Read each modified file and verify the changes are correct","2. Run type check: `deno check` on modified files","3. Run tests: `deno test` on relevant test files","4. Check each acceptance criterion against actual file contents","","## Report Format","When finished, provide a structured JSON summary:","```json",'{"results": [{"id": "ac-1", "status": "PASS", "evidence": "..."}, {"id": "ac-2", "status": "FAIL", "reason": "..."}]}',"```","","The orchestrator will use this report for the noskills status report.",""].join(`
107
- `),st=e=>{let t=e.split(/\s+/),s=t[0]??"npx",o=[...t.slice(1),"mcp-serve"];return{mcpServers:{noskills:{type:"local",command:s,args:o,tools:["*"]}}}},ot=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},_={id:"copilot-cli",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!1,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"delegation"}},async syncRules(e,t){await p(e,t),await m(e.root,e.rules,e.commandPrefix)},async syncHooks(e,t){let s=`${e.root}/${qe}`,o=`${s}/${Be}`;await n.fs.mkdir(s,{recursive:!0});let i={};try{let c=await n.fs.readTextFile(o),u=JSON.parse(c);u.hooks!==void 0&&u.hooks!==null&&(i=u.hooks)}catch{}let r={};for(let[c,u]of Object.entries(i))u._noskills||(r[c]=u);let a=Ze(e.commandPrefix),l={version:1,hooks:{...r,...a.hooks}};await n.fs.writeTextFile(o,JSON.stringify(l,null,2)+`
108
- `)},async syncAgents(e,t){let s=`${e.root}/${ze}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-executor.agent.md`,et(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.agent.md`,tt())},async syncMcp(e){let t=`${e.root}/${Qe}`,s=`${t}/${Xe}`;await n.fs.mkdir(t,{recursive:!0});let o={mcpServers:{}};if(await ot(s))try{let a=await n.fs.readTextFile(s),l=JSON.parse(a);l.mcpServers!==void 0&&l.mcpServers!==null&&(o=l)}catch{}let i=st(e.commandPrefix),r={...o,mcpServers:{...o.mcpServers,...i.mcpServers}};await n.fs.writeTextFile(s,JSON.stringify(r,null,2)+`
109
- `)}};var it=async e=>{let t=`${e}/${f.rulesDir}`,s=[];try{for await(let o of n.fs.readDir(t))if(o.isFile&&(o.name.endsWith(".md")||o.name.endsWith(".txt"))){let i=await n.fs.readTextFile(`${t}/${o.name}`),r=i.trim().split(`
110
- `)[0]??i.trim();s.push(r)}}catch{}return s},H=[A,C,$,D,F,U,j,_],W={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},ht=e=>{let t=e[0];return t===void 0?W:H.find(o=>o.id===t)?.capabilities.interaction??W},mt=async(e,t,s)=>{let o=await it(e),i=[],r={allowGit:s?.allowGit??!1},a=s?.command??"npx eser@latest noskills";b(a);for(let l of t){let c=H.find(h=>h.id===l);if(c===void 0)continue;let u={root:e,rules:o,commandPrefix:a};if(await c.syncRules(u,r),c.capabilities.hooks&&c.syncHooks!==void 0&&await c.syncHooks(u,r),c.capabilities.agents&&c.syncAgents!==void 0&&await c.syncAgents(u,r),c.capabilities.specs&&c.syncSpecs!==void 0){let h=`${e}/${f.specsDir}`;try{for await(let v of n.fs.readDir(h))if(v.isDirectory){let L=`${h}/${v.name}/spec.md`;await c.syncSpecs(u,L)}}catch{}}c.capabilities.mcp&&c.syncMcp!==void 0&&await c.syncMcp(u),i.push(l)}return t.includes("claude-code")&&i.push("hooks"),i};export{it as a,ht as b,mt as c};
107
+ `),st=e=>{let t=e.split(/\s+/),s=t[0]??"npx",o=[...t.slice(1),"mcp-serve"];return{mcpServers:{noskills:{type:"local",command:s,args:o,tools:["*"]}}}},ot=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},W={id:"copilot-cli",capabilities:{rules:!0,hooks:!0,agents:!0,specs:!1,mcp:!0,interaction:{hasAskUserTool:!1,optionPresentation:"prose",hasSubAgentDelegation:!0,subAgentMethod:"fleet"}},async syncRules(e,t){await m(e,t),await f(e.root,e.rules,e.commandPrefix)},async syncHooks(e,t){let s=`${e.root}/${Ke}`,o=`${s}/${Be}`;await n.fs.mkdir(s,{recursive:!0});let i={};try{let l=await n.fs.readTextFile(o),u=JSON.parse(l);u.hooks!==void 0&&u.hooks!==null&&(i=u.hooks)}catch{}let r={};for(let[l,u]of Object.entries(i))u._noskills||(r[l]=u);let a=Ze(e.commandPrefix),c={version:1,hooks:{...r,...a.hooks}};await n.fs.writeTextFile(o,JSON.stringify(c,null,2)+`
108
+ `)},async syncAgents(e,t){let s=`${e.root}/${ze}`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-executor.agent.md`,et(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.agent.md`,tt())},async syncMcp(e){let t=`${e.root}/${Qe}`,s=`${t}/${Xe}`;await n.fs.mkdir(t,{recursive:!0});let o={mcpServers:{}};if(await ot(s))try{let a=await n.fs.readTextFile(s),c=JSON.parse(a);c.mcpServers!==void 0&&c.mcpServers!==null&&(o=c)}catch{}let i=st(e.commandPrefix),r={...o,mcpServers:{...o.mcpServers,...i.mcpServers}};await n.fs.writeTextFile(s,JSON.stringify(r,null,2)+`
109
+ `)}};var it=e=>{let t=e.trim();if(!t.startsWith("---"))return{meta:{},body:t};let s=t.indexOf("---",3);if(s===-1)return{meta:{},body:t};let o=t.slice(3,s).trim(),i=t.slice(s+3).trim(),r={};for(let a of o.split(`
110
+ `)){let c=a.indexOf(":");if(c===-1)continue;let l=a.slice(0,c).trim(),u=a.slice(c+1).trim();if(u.startsWith("[")&&u.endsWith("]")){let d=u.slice(1,-1).split(",").map(p=>p.trim().replace(/^["']|["']$/g,"")).filter(p=>p.length>0);r[l]=d}else r[l]=u.replace(/^["']|["']$/g,"")}return{meta:r,body:i}},rt=async e=>{let t=`${e}/${y.rulesDir}`,s=[];try{for await(let o of n.fs.readDir(t))if(o.isFile&&(o.name.endsWith(".md")||o.name.endsWith(".txt"))){let i=await n.fs.readTextFile(`${t}/${o.name}`),{meta:r,body:a}=it(i),c=a.split(`
111
+ `)[0]??a;s.push({text:c,phases:Array.isArray(r.phases)?r.phases:void 0,appliesTo:Array.isArray(r.applies_to)?r.applies_to:void 0})}}catch{}return s},ft=(e,t,s)=>e.filter(o=>!(o.phases!==void 0&&o.phases.length>0&&!o.phases.includes(t)||o.appliesTo!==void 0&&o.appliesTo.length>0&&s!==void 0&&s.length>0&&!o.appliesTo.some(r=>{let a=r.startsWith("*.")?r.slice(1):null;return a!==null?s.some(c=>c.endsWith(a)):s.some(c=>c.includes(r.replace(/\*/g,"")))}))).map(o=>o.text),at=async e=>(await rt(e)).map(s=>s.text),H=[A,C,$,D,F,U,j,W],_={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},yt=e=>{let t=e[0];return t===void 0?_:H.find(o=>o.id===t)?.capabilities.interaction??_},gt=async(e,t,s)=>{let o=await at(e),i=[],r={allowGit:s?.allowGit??!1},a=s?.command??"npx eser@latest noskills";b(a);for(let c of t){let l=H.find(d=>d.id===c);if(l===void 0)continue;let u={root:e,rules:o,commandPrefix:a};if(await l.syncRules(u,r),l.capabilities.hooks&&l.syncHooks!==void 0&&await l.syncHooks(u,r),l.capabilities.agents&&l.syncAgents!==void 0&&await l.syncAgents(u,r),l.capabilities.specs&&l.syncSpecs!==void 0){let d=`${e}/${y.specsDir}`;try{for await(let p of n.fs.readDir(d))if(p.isDirectory){let L=`${d}/${p.name}/spec.md`;await l.syncSpecs(u,L)}}catch{}}l.capabilities.mcp&&l.syncMcp!==void 0&&await l.syncMcp(u),i.push(c)}return t.includes("claude-code")&&i.push("hooks"),i};export{rt as a,ft as b,at as c,yt as d,gt as e};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{b as B,c as L}from"./chunk-6E6JUBFH.js";import{a as P,b,c as w,d as O,e as E,f as I,g as a,h as N,i as _,j as W,k as $,l as F,m as p,n as j,o as S,p as A,q as T,y as M}from"./chunk-BQT5RJZB.js";import{d as Q}from"./chunk-5WJ6AUNY.js";var U={};Q(U,{AlreadyExistsError:()=>w,NotFoundError:()=>b,ProcessError:()=>O,RuntimeCapabilityError:()=>P,buildCommand:()=>R,clearWorkerdEnv:()=>L,createRuntime:()=>H,detectExecutionContext:()=>y,detectInvoker:()=>h,detectRuntime:()=>a,getArch:()=>j,getCliPrefix:()=>J,getHomedir:()=>S,getPlatform:()=>p,getPlatformInfo:()=>T,getRuntimeVersion:()=>N,getTmpdir:()=>A,isBrowser:()=>W,isCommandInPath:()=>v,isEdge:()=>F,isRuntime:()=>_,isServer:()=>$,matchCliPrefix:()=>D,populateEnvFromContext:()=>B,posixPath:()=>I,resolvePathDirs:()=>g,runtime:()=>i,toPosix:()=>E});var g=(e,n)=>{let t=n==="windows"?";":":";return e.split(t).filter(r=>r.length>0)},l=new Set(["deno","node","bun"]),h=(e,n,t,r,o,s)=>{let d=l.has(e)?e:n;if(!l.has(d))return{invoker:"binary",mode:"installed"};if(d==="bun")return r.BUN_INSTALL!==void 0?{invoker:"bun",mode:"installed"}:{invoker:"bunx",mode:"on-demand"};if(d==="node"){let m=t[1]??"";if(m.includes("_npx")||m.includes("/npx"))return{invoker:"npx",mode:"on-demand"};if(m.includes("pnpm")||m.includes("pnpx"))return{invoker:"pnpx",mode:"on-demand"};let c=r.npm_execpath??"";return c.includes("npx")?{invoker:"npx",mode:"on-demand"}:c.includes("pnpm")?{invoker:"pnpx",mode:"on-demand"}:(r.npm_config_user_agent??"").includes("pnpm")?{invoker:"pnpm",mode:"installed"}:{invoker:"npm",mode:"installed"}}return d==="deno"?o!==void 0&&(o.startsWith("jsr:")||o.startsWith("https:"))?{invoker:"deno",mode:"on-demand"}:s===!0?{invoker:"dev",mode:"dev"}:{invoker:"deno",mode:"installed"}:{invoker:"unknown",mode:"installed"}},R=(e,n,t)=>e==="npx"?`npx ${t.npmPackage}`:e==="pnpx"?`pnpx ${t.npmPackage}`:e==="bunx"?`bunx ${t.npmPackage}`:e==="deno"&&n==="on-demand"?`deno run --allow-all jsr:${t.jsrPackage}`:e==="dev"?t.devCommand:t.command,v=async e=>{let n=p(),t=n==="windows"?`${e}.exe`:e,r=i.env.get("PATH")??"",o=g(r,n);for(let s of o)try{return await i.fs.stat(i.path.join(s,t)),!0}catch{continue}return!1},D=(e,n)=>{for(let t of e){let r=n.indexOf(t);if(r>=0)return n.slice(0,r+1).join(" ");let o=n.findIndex(s=>s.endsWith(`/${t}`)||s.endsWith(`\\${t}`)||s.includes(`:${t}`));if(o>=0)return n.slice(0,o+1).join(" ")}},J=async(e,n)=>{let t=await y(e),r=i.process.argv;for(let o of n){if(r.includes(o))return`${t.command} ${o}`;if(r.some(d=>d.endsWith(`/${o}`)||d.endsWith(`\\${o}`)||d.includes(`:${o}`)))return t.command}},y=async e=>{let n=i.path.basename(i.process.execPath()),t=a(),r=i.process.argv,o=import.meta.url,s=l.has(n)?n:t,d={BUN_INSTALL:i.env.get("BUN_INSTALL"),npm_execpath:i.env.get("npm_execpath"),npm_config_user_agent:i.env.get("npm_config_user_agent")},m=!1;if(s==="deno"&&o.startsWith("file://")){let k=i.process.cwd();try{let x=i.path.join(k,"deno.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).tasks;u!==void 0&&"cli"in u&&(m=!0)}catch{}if(!m)try{let x=i.path.join(k,"package.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).scripts;u!==void 0&&"cli"in u&&(m=!0)}catch{}}let{invoker:c,mode:f}=h(n,t,r,d,o,m),K=l.has(s)?s:"compiled",q=R(c,f,e),z=await v(e.command);return{runtime:K,mode:f,invoker:c,command:q,isInPath:z}};var V={deno:async()=>(await import("./deno-I5YAWOB6.js")).createDenoRuntime(),node:async()=>(await import("./node-ZGM6SXXI.js")).createNodeRuntime(),bun:async()=>(await import("./bun-HIMXX54I.js")).createBunRuntime(),workerd:async()=>(await import("./workerd-LOWXXQEU.js")).createWorkerdRuntime(),browser:async()=>(await import("./browser-JGBNWUEQ.js")).createBrowserRuntime()},X=["fs","exec","env","path","process"],Y=e=>e!==void 0&&X.some(n=>e[n]!==void 0),Z=(e,n,t)=>({name:e.name,version:e.version,capabilities:t,fs:n.fs??e.fs,path:n.path??e.path,exec:n.exec??e.exec,env:n.env??e.env,process:n.process??e.process}),H=async e=>{let n=a(),t=V[n],r=t!==void 0?await t():M(n),o=e?.capabilities?{...r.capabilities,...e.capabilities}:r.capabilities;return e!==void 0&&Y(e)?Z(r,e,o):e?.capabilities?{...r,capabilities:o}:r},i=await H();export{g as a,h as b,R as c,v as d,D as e,J as f,y as g,H as h,i,U as j};
2
+ import{b as B,c as L}from"./chunk-6E6JUBFH.js";import{a as P,b,c as w,d as O,e as E,f as I,g as a,h as N,i as _,j as W,k as $,l as F,m as p,n as j,o as S,p as A,q as T,y as M}from"./chunk-BQT5RJZB.js";import{d as Q}from"./chunk-5WJ6AUNY.js";var U={};Q(U,{AlreadyExistsError:()=>w,NotFoundError:()=>b,ProcessError:()=>O,RuntimeCapabilityError:()=>P,buildCommand:()=>R,clearWorkerdEnv:()=>L,createRuntime:()=>H,detectExecutionContext:()=>y,detectInvoker:()=>h,detectRuntime:()=>a,getArch:()=>j,getCliPrefix:()=>J,getHomedir:()=>S,getPlatform:()=>p,getPlatformInfo:()=>T,getRuntimeVersion:()=>N,getTmpdir:()=>A,isBrowser:()=>W,isCommandInPath:()=>v,isEdge:()=>F,isRuntime:()=>_,isServer:()=>$,matchCliPrefix:()=>D,populateEnvFromContext:()=>B,posixPath:()=>I,resolvePathDirs:()=>g,runtime:()=>i,toPosix:()=>E});var g=(e,n)=>{let t=n==="windows"?";":":";return e.split(t).filter(r=>r.length>0)},l=new Set(["deno","node","bun"]),h=(e,n,t,r,o,s)=>{let d=l.has(e)?e:n;if(!l.has(d))return{invoker:"binary",mode:"installed"};if(d==="bun")return r.BUN_INSTALL!==void 0?{invoker:"bun",mode:"installed"}:{invoker:"bunx",mode:"on-demand"};if(d==="node"){let m=t[1]??"";if(m.includes("_npx")||m.includes("/npx"))return{invoker:"npx",mode:"on-demand"};if(m.includes("pnpm")||m.includes("pnpx"))return{invoker:"pnpx",mode:"on-demand"};let c=r.npm_execpath??"";return c.includes("npx")?{invoker:"npx",mode:"on-demand"}:c.includes("pnpm")?{invoker:"pnpx",mode:"on-demand"}:(r.npm_config_user_agent??"").includes("pnpm")?{invoker:"pnpm",mode:"installed"}:{invoker:"npm",mode:"installed"}}return d==="deno"?o!==void 0&&(o.startsWith("jsr:")||o.startsWith("https:"))?{invoker:"deno",mode:"on-demand"}:s===!0?{invoker:"dev",mode:"dev"}:{invoker:"deno",mode:"installed"}:{invoker:"unknown",mode:"installed"}},R=(e,n,t)=>e==="npx"?`npx ${t.npmPackage}`:e==="pnpx"?`pnpx ${t.npmPackage}`:e==="bunx"?`bunx ${t.npmPackage}`:e==="deno"&&n==="on-demand"?`deno run --allow-all jsr:${t.jsrPackage}`:e==="dev"?t.devCommand:t.command,v=async e=>{let n=p(),t=n==="windows"?`${e}.exe`:e,r=i.env.get("PATH")??"",o=g(r,n);for(let s of o)try{return await i.fs.stat(i.path.join(s,t)),!0}catch{continue}return!1},D=(e,n)=>{for(let t of e){let r=n.indexOf(t);if(r>=0)return n.slice(0,r+1).join(" ");let o=n.findIndex(s=>s.endsWith(`/${t}`)||s.endsWith(`\\${t}`)||s.includes(`:${t}`));if(o>=0)return n.slice(0,o+1).join(" ")}},J=async(e,n)=>{let t=await y(e),r=i.process.argv;for(let o of n){if(r.includes(o))return`${t.command} ${o}`;if(r.some(d=>d.endsWith(`/${o}`)||d.endsWith(`\\${o}`)||d.includes(`:${o}`)))return t.command}},y=async e=>{let n=i.path.basename(i.process.execPath()),t=a(),r=i.process.argv,o=import.meta.url,s=l.has(n)?n:t,d={BUN_INSTALL:i.env.get("BUN_INSTALL"),npm_execpath:i.env.get("npm_execpath"),npm_config_user_agent:i.env.get("npm_config_user_agent")},m=!1;if(s==="deno"&&o.startsWith("file://")){let k=i.process.cwd();try{let x=i.path.join(k,"deno.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).tasks;u!==void 0&&"cli"in u&&(m=!0)}catch{}if(!m)try{let x=i.path.join(k,"package.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).scripts;u!==void 0&&"cli"in u&&(m=!0)}catch{}}let{invoker:c,mode:f}=h(n,t,r,d,o,m),K=l.has(s)?s:"compiled",q=R(c,f,e),z=await v(e.command);return{runtime:K,mode:f,invoker:c,command:q,isInPath:z}};var V={deno:async()=>(await import("./deno-XQHOVHKR.js")).createDenoRuntime(),node:async()=>(await import("./node-ZGM6SXXI.js")).createNodeRuntime(),bun:async()=>(await import("./bun-HIMXX54I.js")).createBunRuntime(),workerd:async()=>(await import("./workerd-LOWXXQEU.js")).createWorkerdRuntime(),browser:async()=>(await import("./browser-JGBNWUEQ.js")).createBrowserRuntime()},X=["fs","exec","env","path","process"],Y=e=>e!==void 0&&X.some(n=>e[n]!==void 0),Z=(e,n,t)=>({name:e.name,version:e.version,capabilities:t,fs:n.fs??e.fs,path:n.path??e.path,exec:n.exec??e.exec,env:n.env??e.env,process:n.process??e.process}),H=async e=>{let n=a(),t=V[n],r=t!==void 0?await t():M(n),o=e?.capabilities?{...r.capabilities,...e.capabilities}:r.capabilities;return e!==void 0&&Y(e)?Z(r,e,o):e?.capabilities?{...r,capabilities:o}:r},i=await H();export{g as a,h as b,R as c,v as d,D as e,J as f,y as g,H as h,i,U as j};
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{b as w}from"./chunk-OWQXQ33F.js";import{a as p}from"./chunk-2XNFZXHY.js";import{b as c}from"./chunk-5MVJUALI.js";import{e as y}from"./chunk-5WJ6AUNY.js";var C=()=>{let e=new Map;return{register:o=>{e.set(o.name,o)},registerAll:o=>{for(let r of o)e.set(r.name,r)},get:o=>e.get(o),getAll:()=>[...e.values()],has:o=>e.has(o),names:()=>[...e.keys()]}};var k=y(p(),1);var h=e=>{let o=e.workflows;if(!Array.isArray(o))throw new Error("Invalid config: 'workflows' must be an array");for(let r=0;r<o.length;r++){let n=o[r],t=n?.id!==void 0&&n.id!==""?`workflow '${n.id}'`:`workflow at index ${r}`;if(typeof n?.id!="string"||n.id==="")throw new Error(`Invalid config: ${t} must have a non-empty 'id' string`);if(!Array.isArray(n.on)||n.on.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'on' array`);if(!Array.isArray(n.steps)||n.steps.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'steps' array`);for(let s=0;s<n.steps.length;s++){let i=n.steps[s];if(typeof i=="string")continue;if(typeof i!="object"||i===null||Array.isArray(i))throw new Error(`Invalid config: ${t}, step ${s} must be a string or an object with exactly one key`);let l=Object.keys(i);if(l.length!==1)throw new Error(`Invalid config: ${t}, step ${s} must be an object with exactly one key (got ${l.length})`)}}};var b=async e=>{let o=await w(e);if(o===null)return null;let r={stack:o.stack,workflows:o.workflows??[],scripts:o.scripts};return h(r),r};var I={name:"shell",description:"Execute shell commands",run:async e=>{let o=e.command,r=e.fixCommand,n=e.name??o??"shell",t=e.fix??!1,s=e.root??".",i=e.workingDirectory??s;if(o===void 0||o.length===0)throw new Error(`Shell tool requires a 'command' option. Usage: { shell: { command: "deno fmt --check" } }`);let l=t&&r!==void 0?r:o,a=await new c("sh",["-c",l]).cwd(i).noThrow().spawn(),f=a.code;if(f===0)return{name:n,passed:!0,issues:[],mutations:[],stats:{exitCode:0}};let d=new TextDecoder,g=d.decode(a.stderr).trim(),m=[d.decode(a.stdout).trim(),g].filter(u=>u.length>0).join(`
2
+ import{b as w}from"./chunk-L2E2H7YT.js";import{a as p}from"./chunk-2XNFZXHY.js";import{b as c}from"./chunk-BLXGL5MA.js";import{e as y}from"./chunk-5WJ6AUNY.js";var C=()=>{let e=new Map;return{register:o=>{e.set(o.name,o)},registerAll:o=>{for(let r of o)e.set(r.name,r)},get:o=>e.get(o),getAll:()=>[...e.values()],has:o=>e.has(o),names:()=>[...e.keys()]}};var k=y(p(),1);var h=e=>{let o=e.workflows;if(!Array.isArray(o))throw new Error("Invalid config: 'workflows' must be an array");for(let r=0;r<o.length;r++){let n=o[r],t=n?.id!==void 0&&n.id!==""?`workflow '${n.id}'`:`workflow at index ${r}`;if(typeof n?.id!="string"||n.id==="")throw new Error(`Invalid config: ${t} must have a non-empty 'id' string`);if(!Array.isArray(n.on)||n.on.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'on' array`);if(!Array.isArray(n.steps)||n.steps.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'steps' array`);for(let s=0;s<n.steps.length;s++){let i=n.steps[s];if(typeof i=="string")continue;if(typeof i!="object"||i===null||Array.isArray(i))throw new Error(`Invalid config: ${t}, step ${s} must be a string or an object with exactly one key`);let l=Object.keys(i);if(l.length!==1)throw new Error(`Invalid config: ${t}, step ${s} must be an object with exactly one key (got ${l.length})`)}}};var b=async e=>{let o=await w(e);if(o===null)return null;let r={stack:o.stack,workflows:o.workflows??[],scripts:o.scripts};return h(r),r};var I={name:"shell",description:"Execute shell commands",run:async e=>{let o=e.command,r=e.fixCommand,n=e.name??o??"shell",t=e.fix??!1,s=e.root??".",i=e.workingDirectory??s;if(o===void 0||o.length===0)throw new Error(`Shell tool requires a 'command' option. Usage: { shell: { command: "deno fmt --check" } }`);let l=t&&r!==void 0?r:o,a=await new c("sh",["-c",l]).cwd(i).noThrow().spawn(),f=a.code;if(f===0)return{name:n,passed:!0,issues:[],mutations:[],stats:{exitCode:0}};let d=new TextDecoder,g=d.decode(a.stderr).trim(),m=[d.decode(a.stdout).trim(),g].filter(u=>u.length>0).join(`
3
3
  `);return{name:n,passed:!1,issues:[{message:m||`Command exited with code ${f}`}],mutations:[],stats:{exitCode:f}}}};export{C as a,b,I as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as i}from"./chunk-UQRZJPYH.js";import{j as a}from"./chunk-6VHZQNHX.js";var s=i({name:"validate-symlinks",description:"Detect broken symlinks",canFix:!1,stacks:[],defaults:{},async checkAll(n){let o=[];for(let t of n)if(t.isSymlink)try{await a.runtime.fs.stat(t.path)}catch{o.push({path:t.path,message:"broken symlink \u2014 target not found"})}return o}}),l=s.run,c=s.validator,m=s.main;export{s as a,l as b,c,m as d};
2
+ import{a as i}from"./chunk-JLRVMMMH.js";import{j as a}from"./chunk-WJKE6XHF.js";var s=i({name:"validate-symlinks",description:"Detect broken symlinks",canFix:!1,stacks:[],defaults:{},async checkAll(n){let o=[];for(let t of n)if(t.isSymlink)try{await a.runtime.fs.stat(t.path)}catch{o.push({path:t.path,message:"broken symlink \u2014 target not found"})}return o}}),l=s.run,c=s.validator,m=s.main;export{s as a,l as b,c,m as d};
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{e as x,f as w}from"./chunk-VNJJQED3.js";import{a as O}from"./chunk-LFNUSULJ.js";import{a as F,c as U}from"./chunk-L7RS6MQ5.js";import{l as i}from"./chunk-JZ7DUWYC.js";import{a as S,b as v,c as P,d as u}from"./chunk-J2Z7NG2X.js";import{f as V}from"./chunk-P2MUEKFT.js";import{a as k}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-FFWPJP7A.js";import{j as y}from"./chunk-7ATUODBM.js";import{j as h}from"./chunk-6VHZQNHX.js";var{ctx:d,output:_}=F(),I=async(s={})=>{let{root:e="."}=s,o=y(e,"VERSION");try{return(await h.runtime.fs.readTextFile(o)).trim()}catch{return}},N=async(s,e)=>{let o=y(s,"VERSION");await h.runtime.fs.writeTextFile(o,e+`
2
+ import{e as x,f as w}from"./chunk-26ZFSXSK.js";import{a as O}from"./chunk-LFNUSULJ.js";import{a as F,c as U}from"./chunk-LGNGLAV3.js";import{o as i}from"./chunk-ZER2RYWJ.js";import{a as S,b as v,c as P,d as u}from"./chunk-J2Z7NG2X.js";import{f as V}from"./chunk-P2MUEKFT.js";import{a as k}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-FFWPJP7A.js";import{j as y}from"./chunk-7ATUODBM.js";import{j as h}from"./chunk-WJKE6XHF.js";var{ctx:d,output:_}=F(),I=async(s={})=>{let{root:e="."}=s,o=y(e,"VERSION");try{return(await h.runtime.fs.readTextFile(o)).trim()}catch{return}},N=async(s,e)=>{let o=y(s,"VERSION");await h.runtime.fs.writeTextFile(o,e+`
3
3
  `)},M=s=>{let e=u("0.0.0");for(let o of s){let n=u(o);S(n,e)>0&&(e=n)}return v(e)},T=async(s={})=>{let{root:e="."}=s,[o,n]=await w(e),l=o.version?.value??"0.0.0";return{packages:[{name:o.name?.value??"(root)",version:l},...n.map(p=>({name:p.name,version:p.version}))]}},j=async(s,e={})=>{let{root:o=".",dryRun:n=!1,updateVersionFile:l=!0}=e,[c,f]=await w(o),p=c.version?.value??"0.0.0",b=c.name?.value??"(root)",A=[p,...f.map(t=>t.version)],C=M(A),r;if(s==="explicit"){if(e.explicitVersion===void 0)throw new Error('explicitVersion is required when command is "explicit".');u(e.explicitVersion),r=e.explicitVersion}else s==="sync"?r=C:r=v(P(u(C),s));let m=[],E=p!==r;n||await x(c,r),m.push({name:b,from:p,to:r,changed:E});for(let t of f){let g=t.version!==r;n||await x(t.config,r),m.push({name:t.name,from:t.version,to:r,changed:g})}let R=[];if(l){let t=await I({root:o}),g=t!==r;!n&&g&&await N(o,r),R.push({path:"VERSION",from:t??"",to:r,changed:g})}let $=m.filter(t=>t.changed).length;return{command:s,targetVersion:r,updates:m,fileUpdates:R,changedCount:$,dryRun:n}},H=s=>s.mode==="show"?V.fromPromise(async()=>({mode:"show",result:await T()})):V.fromPromise(async()=>({mode:"update",result:await j(s.command,s.options)})),D=s=>{let e=s.args[0];if(e===void 0)return a.ok({mode:"show"});let o=["sync","patch","minor","major"],n,l;o.includes(e)?n=e:(n="explicit",l=e);let c=s.flags["dry-run"]===!0;return a.ok({mode:"update",command:n,options:{dryRun:c,explicitVersion:l}})},W=s=>{if(a.isFail(s))return a.fail({exitCode:1,message:String(s.error)});let e=s.value;if(e.mode==="show")return console.table(e.result.packages),a.ok(void 0);let{result:o}=e;o.command==="sync"?i.info(d,"Syncing all versions..."):o.command==="explicit"?i.info(d,`Setting all versions to ${o.targetVersion}...`):i.info(d,`Bumping all versions (${o.command})...`),i.info(d,`Target version: ${o.targetVersion}`),console.table(o.updates);for(let n of o.fileUpdates)n.changed&&i.info(d,`${n.path} (${n.from} \u2192 ${n.to})`);return o.dryRun?i.info(d,`Dry run - ${o.changedCount} packages would be modified.`):i.success(d,`Done. Updated ${o.changedCount} packages.`),a.ok(void 0)},q=O.createTrigger({handler:H,adaptInput:D,adaptOutput:W}),ee=async s=>{let e=k(s??[],{boolean:["dry-run"]}),o=U("versions",e);return await q(o)};export{I as a,T as b,j as c,H as d,q as e,ee as f};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ var l=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=a=>{let n=[],i=new Set,r="",e=a,o=/\[(\.\.\.)?(\w+)\]/;for(;e.length>0;){let t=o.exec(e);if(t===null){r+=l(e);break}t.index>0&&(r+=l(e.slice(0,t.index)));let m=t[1]==="...",s=t[2];s!==void 0&&(n.push(s),m?(i.add(s),r+="(.*)"):r+="([^/]+)"),e=e.slice(t.index+t[0].length)}return{regex:new RegExp(`^${r}$`),paramNames:n,catchAllParams:i}},u=(a,n)=>{let i=a.match(n.regex);if(i===null)return null;let r={};for(let e=0;e<n.paramNames.length;e++){let o=n.paramNames[e],t=i[e+1];o!==void 0&&(n.catchAllParams.has(o)?r[o]=t!==void 0&&t!==""?t.split("/").filter(Boolean):[]:r[o]=t??"")}return r},g=(a,n)=>{let i=c(n);return u(a,i)};export{g as a};
@@ -0,0 +1,10 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as F}from"./chunk-2XNFZXHY.js";import{i as s}from"./chunk-WJKE6XHF.js";import{e as D}from"./chunk-5WJ6AUNY.js";var f=()=>({version:"0.1.0",phase:"IDLE",spec:null,specDescription:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human",approved:!1},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],lastCalledAt:null,classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null,revisitHistory:[]}),k=(e,t,r,n)=>({concerns:e,tools:t,providers:r,project:n,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser@latest noskills"});var l=D(F(),1);var i=".eser",c=`${i}/.state`,S=`${c}/state.json`,m=`${i}/manifest.yml`,y=`${i}/concerns`,h=`${i}/rules`,u=`${i}/specs`,w=`${i}/workflows`,p=`${c}/specs`,P=`${c}/active.json`,a=`${i}/.sessions`,d={eserDir:i,stateDir:c,stateFile:S,manifestFile:m,concernsDir:y,rulesDir:h,specsDir:u,workflowsDir:w,specStatesDir:p,activeFile:P,specDir:e=>`${u}/${e}`,specFile:e=>`${u}/${e}/spec.md`,specStateFile:e=>`${p}/${e}.json`,concernFile:e=>`${y}/${e}.json`,sessionsDir:a,sessionFile:e=>`${a}/${e}.json`,eserGitignore:`${i}/.gitignore`},x=async e=>{let t=`${e}/${S}`;try{let r=await s.fs.readTextFile(t);return JSON.parse(r)}catch{return f()}},O=async(e,t)=>{if(t==null)return x(e);let r=`${e}/${d.specDir(t)}`;try{await s.fs.stat(r)}catch{throw new Error(`Spec '${t}' not found. Run \`noskills spec list\` to see available specs.`)}let n=await E(e,t);if(n.spec===t)return n;let o=await x(e);return o.spec===t?o:{...n,spec:t}};var I=e=>{if(e===void 0)return null;for(let t of e)if(t.startsWith("--spec="))return t.slice(7);return null},_=e=>{let t=I(e);return t===null||t.length===0?{ok:!1,error:"Error: spec name is required. Use `noskills spec <name> <command>` format."}:{ok:!0,spec:t}},T=async(e,t)=>{let r=`${e}/${c}`,n=`${e}/${S}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
3
+ `)};var E=async(e,t)=>{let r=`${e}/${d.specStateFile(t)}`;try{let n=await s.fs.readTextFile(r);return JSON.parse(n)}catch{return f()}},b=async(e,t,r)=>{let n=`${e}/${p}`,o=`${e}/${d.specStateFile(t)}`;await s.fs.mkdir(n,{recursive:!0}),await s.fs.writeTextFile(o,JSON.stringify(r,null,2)+`
4
+ `)},j=async e=>{let t=`${e}/${p}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json")){let o=n.name.replace(/\.json$/,""),g=await s.fs.readTextFile(`${t}/${n.name}`);r.push({name:o,state:JSON.parse(g)})}}catch{}return r},L=async e=>{let t=`${e}/${m}`;try{let r=await s.fs.readTextFile(t),n=l.parse(r);return n?.noskills===void 0?null:n.noskills}catch{return null}},J=async(e,t)=>{let r=`${e}/${m}`,n;try{let g=await s.fs.readTextFile(r);n=l.parseDocument(g)}catch{n=new l.Document({})}let o=n.createNode(t);o.commentBefore=" noskills orchestrator \u2014 inline comments in this section won't be preserved on next write",n.set("noskills",o),await s.fs.writeTextFile(r,n.toString())},M=async(e,t)=>{let r=`${e}/${d.concernFile(t)}`;try{let n=await s.fs.readTextFile(r);return JSON.parse(n)}catch{return null}},V=async(e,t)=>{let r=`${e}/${y}`,n=`${e}/${d.concernFile(t.id)}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
5
+ `)},W=async e=>{let t=`${e}/${y}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json")){let o=await s.fs.readTextFile(`${t}/${n.name}`);r.push(JSON.parse(o))}}catch{}return r},G=async e=>{let t=[i,c,p,y,h,u,w];for(let n of t)await s.fs.mkdir(`${e}/${n}`,{recursive:!0});let r=`${e}/${d.eserGitignore}`;try{await s.fs.stat(r)}catch{await s.fs.writeTextFile(r,`# eser toolchain runtime state \u2014 not tracked by git
6
+ .state/
7
+ .sessions/
8
+ `)}},U=async(e,t)=>{await T(e,t),t.spec!==null&&await b(e,t.spec,t)},$=2*60*60*1e3,q=async(e,t)=>{let r=`${e}/${a}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(`${r}/${t.id}.json`,JSON.stringify(t,null,2)+`
9
+ `)},C=async(e,t)=>{try{let r=await s.fs.readTextFile(`${e}/${a}/${t}.json`);return JSON.parse(r)}catch{return null}},R=async e=>{let t=`${e}/${a}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json"))try{let o=await s.fs.readTextFile(`${t}/${n.name}`);r.push(JSON.parse(o))}catch{}}catch{}return r},A=async(e,t)=>{try{return await s.fs.remove(`${e}/${a}/${t}.json`),!0}catch{return!1}},H=async(e,t,r)=>{let n=await C(e,t);if(n===null)return;let o={...n,phase:r,lastActiveAt:new Date().toISOString()};await s.fs.writeTextFile(`${e}/${a}/${t}.json`,JSON.stringify(o,null,2)+`
10
+ `)},B=async e=>{let t=await R(e),r=Date.now(),n=[];for(let o of t)r-new Date(o.lastActiveAt).getTime()>$&&(await A(e,o.id),n.push(o.id));return n},K=e=>Date.now()-new Date(e.lastActiveAt).getTime()>$,Q=()=>{let e=new Uint8Array(4);return crypto.getRandomValues(e),Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},Y=async e=>{try{let t=await s.fs.readTextFile(`${e}/${m}`);return l.parse(t)?.noskills!==void 0}catch{return!1}};export{f as a,k as b,d as c,x as d,O as e,I as f,_ as g,T as h,b as i,j,L as k,J as l,M as m,V as n,W as o,G as p,U as q,q as r,C as s,R as t,A as u,H as v,B as w,K as x,Q as y,Y as z};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as C,c as E}from"./chunk-IQQEVKBP.js";import{a as k}from"./chunk-LFNUSULJ.js";import{b as x}from"./chunk-L7RS6MQ5.js";import{f as h}from"./chunk-P2MUEKFT.js";import{b as i,f as d,g as f,h as u,i as g}from"./chunk-YVN2NZL4.js";import{g as n}from"./chunk-FFWPJP7A.js";import{j as c}from"./chunk-6VHZQNHX.js";var l=x(),b=t=>{let e=new Set,r=/export\s+\*\s+from\s+["']([^"']+)["']/g,a=/export\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g,o=/export\s+type\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g;for(let s of t.matchAll(r))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(a))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(o))s[1]!==void 0&&e.add(s[1]);return e},y=t=>{let e=t.startsWith("./")?t.slice(2):t;return e.endsWith(".ts")&&(e=e.slice(0,-3)),e},O=t=>!(t==="mod.ts"||t.endsWith("_test.ts")||t.endsWith("_bench.ts")||t.startsWith("_")||t.includes("/")),P=async(t={})=>{let{root:e=".",failFast:r=!1}=t,a=await C(e),o=[];for(let s of a){let v=c.runtime.path.join(s.path,"mod.ts"),m;try{m=await c.runtime.fs.readTextFile(v)}catch{continue}let M=b(m),w=new Set([...M].map(p=>y(p))),A=await E(s.path);for(let p of A){let R=c.runtime.path.basename(p);if(!O(R))continue;let F=y(p);if(!w.has(F)&&(o.push({packageName:s.name,file:p}),r))return{isComplete:!1,missingExports:o,packagesChecked:a.length}}}return{isComplete:o.length===0,missingExports:o,packagesChecked:a.length}},W=t=>h.fromPromise(()=>P(t)),_=t=>n.ok({root:"."}),z=t=>{if(n.isFail(t))return l.writeln(d("\u2717"),i(" "+String(t.error))),n.fail({exitCode:1});let{value:e}=t;if(l.writeln(g("\u2139"),i(` Checked ${e.packagesChecked} packages.`)),!e.isComplete){l.writeln(d("\u2717"),i(` Found ${e.missingExports.length} missing exports:`));for(let r of e.missingExports)l.writeln(u("\u26A0"),i(` ${r.packageName}: ${r.file}`));return n.fail({exitCode:1})}return l.writeln(f("\u2713"),i(" All mod.ts exports are complete.")),n.ok(void 0)},S=k.createTrigger({handler:W,adaptInput:_,adaptOutput:z}),N=async t=>await S({command:"validate-mod-exports",args:[],flags:{}});export{P as a,W as b,S as c,N as d};
2
+ import{a as C,c as E}from"./chunk-EGEJQP7D.js";import{a as k}from"./chunk-LFNUSULJ.js";import{b as x}from"./chunk-LGNGLAV3.js";import{f as h}from"./chunk-P2MUEKFT.js";import{b as i,f as d,g as f,h as u,i as g}from"./chunk-YVN2NZL4.js";import{g as n}from"./chunk-FFWPJP7A.js";import{j as c}from"./chunk-WJKE6XHF.js";var l=x(),b=t=>{let e=new Set,r=/export\s+\*\s+from\s+["']([^"']+)["']/g,a=/export\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g,o=/export\s+type\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g;for(let s of t.matchAll(r))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(a))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(o))s[1]!==void 0&&e.add(s[1]);return e},y=t=>{let e=t.startsWith("./")?t.slice(2):t;return e.endsWith(".ts")&&(e=e.slice(0,-3)),e},O=t=>!(t==="mod.ts"||t.endsWith("_test.ts")||t.endsWith("_bench.ts")||t.startsWith("_")||t.includes("/")),P=async(t={})=>{let{root:e=".",failFast:r=!1}=t,a=await C(e),o=[];for(let s of a){let v=c.runtime.path.join(s.path,"mod.ts"),m;try{m=await c.runtime.fs.readTextFile(v)}catch{continue}let M=b(m),w=new Set([...M].map(p=>y(p))),A=await E(s.path);for(let p of A){let R=c.runtime.path.basename(p);if(!O(R))continue;let F=y(p);if(!w.has(F)&&(o.push({packageName:s.name,file:p}),r))return{isComplete:!1,missingExports:o,packagesChecked:a.length}}}return{isComplete:o.length===0,missingExports:o,packagesChecked:a.length}},W=t=>h.fromPromise(()=>P(t)),_=t=>n.ok({root:"."}),z=t=>{if(n.isFail(t))return l.writeln(d("\u2717"),i(" "+String(t.error))),n.fail({exitCode:1});let{value:e}=t;if(l.writeln(g("\u2139"),i(` Checked ${e.packagesChecked} packages.`)),!e.isComplete){l.writeln(d("\u2717"),i(` Found ${e.missingExports.length} missing exports:`));for(let r of e.missingExports)l.writeln(u("\u26A0"),i(` ${r.packageName}: ${r.file}`));return n.fail({exitCode:1})}return l.writeln(f("\u2713"),i(" All mod.ts exports are complete.")),n.ok(void 0)},S=k.createTrigger({handler:W,adaptInput:_,adaptOutput:z}),N=async t=>await S({command:"validate-mod-exports",args:[],flags:{}});export{P as a,W as b,S as c,N as d};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as D,p as w}from"./chunk-YVN2NZL4.js";import{i as g}from"./chunk-6VHZQNHX.js";import{d as j}from"./chunk-5WJ6AUNY.js";var v=class extends Error{constructor(r){super(r),this.name="StreamError"}},b=class extends v{cause;constructor(r,n){super(r),this.name="PipelineError",this.cause=n}},x=class extends v{constructor(r){super(`Pipeline timed out after ${r}ms`),this.name="TimeoutError"}};var f=(e,r)=>{let n=typeof e=="string"?"text":e instanceof Uint8Array?"bytes":"structured";return{data:e,meta:{timestamp:Date.now(),kind:n,channel:"stdout",...r}}};var T=e=>({name:e.name,transform:()=>{let r=e.create();return new TransformStream({start:r.start?n=>r.start(n):void 0,transform:(n,t)=>r.transform(n,t),flush:r.flush?n=>r.flush(n):void 0})}});var L=e=>{switch(e.kind){case"text":return e.value;case"newline":return`
2
+ import{a as D,p as w}from"./chunk-YVN2NZL4.js";import{i as g}from"./chunk-WJKE6XHF.js";import{d as j}from"./chunk-5WJ6AUNY.js";var v=class extends Error{constructor(r){super(r),this.name="StreamError"}},b=class extends v{cause;constructor(r,n){super(r),this.name="PipelineError",this.cause=n}},x=class extends v{constructor(r){super(`Pipeline timed out after ${r}ms`),this.name="TimeoutError"}};var f=(e,r)=>{let n=typeof e=="string"?"text":e instanceof Uint8Array?"bytes":"structured";return{data:e,meta:{timestamp:Date.now(),kind:n,channel:"stdout",...r}}};var T=e=>({name:e.name,transform:()=>{let r=e.create();return new TransformStream({start:r.start?n=>r.start(n):void 0,transform:(n,t)=>r.transform(n,t),flush:r.flush?n=>r.flush(n):void 0})}});var L=e=>{switch(e.kind){case"text":return e.value;case"newline":return`
3
3
  `;case"bold":case"dim":case"italic":case"underline":case"strikethrough":case"color":case"group":return e.children.map(L).join("");case"code-block":return e.value.split(`
4
4
  `).map(r=>` ${r}`).join(`
5
5
  `)+`
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as o}from"./chunk-UQRZJPYH.js";var a=1024,s=o({name:"validate-large-files",description:"Detect files exceeding size limit",canFix:!1,stacks:[],defaults:{maxKb:a},checkAll(n,r){let e=r.maxKb??a,l=e*1024,t=[];for(let i of n)if(i.size>l){let c=Math.round(i.size/1024);t.push({path:i.path,message:`file is ${c}KB (max: ${e}KB)`})}return t}}),d=s.run,f=s.validator,x=s.main;export{s as a,d as b,f as c,x as d};
2
+ import{a as o}from"./chunk-JLRVMMMH.js";var a=1024,s=o({name:"validate-large-files",description:"Detect files exceeding size limit",canFix:!1,stacks:[],defaults:{maxKb:a},checkAll(n,r){let e=r.maxKb??a,l=e*1024,t=[];for(let i of n)if(i.size>l){let c=Math.round(i.size/1024);t.push({path:i.path,message:`file is ${c}KB (max: ${e}KB)`})}return t}}),d=s.run,f=s.validator,x=s.main;export{s as a,d as b,f as c,x as d};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{f as ge,h as re,k as se}from"./chunk-ZC4F4MYU.js";import{b as u,c as Le,d as p,e as $,f as S,g,h as L,i as Be,k as R,l as _,n as ye,o as U}from"./chunk-YVN2NZL4.js";import{i as T}from"./chunk-WJKE6XHF.js";import{d as N}from"./chunk-5WJ6AUNY.js";var m=Symbol("tui.cancel"),We=e=>e===m,Me={ctrlC:"exit",escape:"cancel"},je=()=>{try{return T.process.stdin}catch{return new ReadableStream}},ze=e=>{let t=e?.interaction??(e?.target==="non-interactive"?"non-interactive":"interactive"),r=e?.audience??"human",s=t==="non-interactive"?"non-interactive":"interactive",i=t==="interactive";return{output:e?.output??ge({renderer:i?se.ansi():se.plain(),sink:i?re.stdout():re.stderr()}),input:e?.input??je(),target:s,interaction:t,audience:r,signals:{...Me,...e?.signals},stderr:e?.stderr??ge({renderer:se.plain(),sink:re.stderr()})}};var Ie={};N(Ie,{disableMouse:()=>Ye,enableMouse:()=>Xe,isSGRMouseSequence:()=>xe,parseMouseEvent:()=>be});var Xe=()=>"\x1B[?1000h\x1B[?1002h\x1B[?1006h",Ye=()=>"\x1B[?1006l\x1B[?1002l\x1B[?1000l",Je=/^\x1b\[<(\d+);(\d+);(\d+)([Mm])$/,be=e=>{let t=e.match(Je);if(t===null)return null;let r=parseInt(t[1],10),s=parseInt(t[2],10)-1,i=parseInt(t[3],10)-1,n=t[4]==="m",o=r&3,a=(r&4)!==0,c=(r&16)!==0,d=(r&32)!==0;return(r&64)!==0?{type:"wheel",button:0,x:s,y:i,shift:a,ctrl:c,direction:r&1?"down":"up"}:d?{type:"mousemove",button:o,x:s,y:i,shift:a,ctrl:c}:{type:n?"mouseup":"mousedown",button:o,x:s,y:i,shift:a,ctrl:c}},xe=e=>e.length>=4&&e[0]===27&&e[1]===91&&e[2]===60;var O=async e=>{let t=!1;if(T.capabilities.stdin&&T.process.isTerminal("stdin"))try{T.process.setStdinRaw(!0),t=!0}catch{}try{return await e()}finally{if(t)try{T.process.setStdinRaw(!1)}catch{}}},E=e=>{e.write(u("\x1B[?25l"))},k=e=>{e.write(u("\x1B[?25h"))},h=(e,t)=>{t>0&&e.write(u(`\x1B[${t}A\x1B[J`))},ne=e=>{e.write(u("\r\x1B[2K"))},Ne=e=>{let t=new Uint8Array(e);if(e.length===1&&e[0]===3)return{name:"c",ctrl:!0,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===27)return{name:"escape",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&(e[0]===13||e[0]===10))return{name:"return",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===9)return{name:"tab",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===127)return{name:"backspace",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length>=3&&e[0]===27&&e[1]===91)switch(e[2]){case 65:return{name:"up",ctrl:!1,meta:!1,shift:!1,raw:t};case 66:return{name:"down",ctrl:!1,meta:!1,shift:!1,raw:t};case 67:return{name:"right",ctrl:!1,meta:!1,shift:!1,raw:t};case 68:return{name:"left",ctrl:!1,meta:!1,shift:!1,raw:t};case 72:return{name:"home",ctrl:!1,meta:!1,shift:!1,raw:t};case 70:return{name:"end",ctrl:!1,meta:!1,shift:!1,raw:t}}if(e.length===1&&e[0]>=1&&e[0]<=26)return{name:String.fromCharCode(e[0]+96),ctrl:!0,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]===32)return{name:"space",char:" ",ctrl:!1,meta:!1,shift:!1,raw:t};if(e.length===1&&e[0]>=33&&e[0]<=126){let r=String.fromCharCode(e[0]);return{name:r,char:r,ctrl:!1,meta:!1,shift:!1,raw:t}}if(e.length>0&&e[0]>=192){let r=new TextDecoder().decode(e);return{name:r,char:r,ctrl:!1,meta:!1,shift:!1,raw:t}}return{name:"unknown",ctrl:!1,meta:!1,shift:!1,raw:t}};async function*P(e,t){let r=e.getReader();try{for(;!t?.aborted;){let{done:s,value:i}=await r.read();if(s||i===void 0)break;yield Ne(i)}}finally{r.releaseLock()}}async function*Ze(e,t){let r=e.getReader(),s=new TextDecoder;try{for(;!t?.aborted;){let{done:i,value:n}=await r.read();if(i||n===void 0)break;if(xe(n)){let o=s.decode(n),a=be(o);if(a!==null){yield{kind:"mouse",event:a};continue}}yield{kind:"key",event:Ne(n)}}}finally{r.releaseLock()}}var x=(e,t)=>{if(e==="exit"){k(t.output);try{T.process.setStdinRaw(!1)}catch{}T.process.exit(130)}return e==="cancel"?"cancel":"continue"};var y="\u2502",_e="\u250C",w="\u2514";var F="\u25CF",H="\u25CB",De="\u25FC",Ge="\u25FB",B="\u25C6",C="\u25C7",A="\u25A0",$e="\u25CF";var D="\u25B2";var Ue="\u25C7";var ie=(e,t,r,s)=>{if(s==="done"){let o=r?"Yes":"No";return e.output.writeln(g(C),u(` ${t}`),p(` \xB7 ${o}`)),1}if(s==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;let i=r?$(g(F),u(" Yes")):$(p(H),p(" Yes")),n=r?$(p(H),p(" No")):$(g(F),u(" No"));return e.output.writeln(R(B),u(` ${t}`)),e.output.writeln(p(y),u(" "),i,p(" / "),n),e.output.writeln(p(w)),3},Qe=async(e,t)=>{let r=t.initialValue??!0,s=0;E(e.output);try{return await O(async()=>{s=ie(e,t.message,r,"active"),await e.output.flush();let i=()=>{h(e.output,s),ie(e,t.message,r,"cancel")};for await(let n of P(e.input)){if(n.name==="c"&&n.ctrl){if(x(e.signals.ctrlC,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="escape"){if(x(e.signals.escape,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="return")return h(e.output,s),ie(e,t.message,r,"done"),await e.output.flush(),r;let o=!1;(n.name==="left"||n.name==="right")&&(r=!r,o=!0),(n.name==="y"||n.name==="Y")&&(r=!0,o=!0),(n.name==="n"||n.name==="N")&&(r=!1,o=!0),o&&(h(e.output,s),s=ie(e,t.message,r,"active"),await e.output.flush())}return m})}finally{k(e.output),await e.output.flush()}};var q=(e,t,r,s,i,n)=>{if(n==="done")return e.output.writeln(g(C),u(` ${t}`),p(` \xB7 ${r}`)),1;if(n==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;let o=r.length>0?u(r):s!==void 0?p(s):u(""),a=i!==void 0?L(D):R(B);e.output.writeln(a,u(` ${t}`)),e.output.writeln(p(y),u(" "),o);let c=2;return i!==void 0?(e.output.writeln(p(w),u(" "),L(i)),c=3):(e.output.writeln(p(w)),c=3),c},et=async(e,t)=>{let r=t.initialValue??"",s=r.length,i,n=0;E(e.output);try{return await O(async()=>{n=q(e,t.message,r,t.placeholder,i,"active"),await e.output.flush();let o=()=>{h(e.output,n),q(e,t.message,r,t.placeholder,void 0,"cancel")};for await(let a of P(e.input)){if(a.name==="c"&&a.ctrl){if(x(e.signals.ctrlC,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="escape"){if(x(e.signals.escape,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="return"){if(t.validate!==void 0){let c=t.validate(r);if(c!==void 0){i=c,h(e.output,n),n=q(e,t.message,r,t.placeholder,i,"active"),await e.output.flush();continue}}return h(e.output,n),q(e,t.message,r,t.placeholder,void 0,"done"),await e.output.flush(),r}if(i=void 0,a.name==="backspace")s>0&&(r=r.slice(0,s-1)+r.slice(s),s--);else if(a.name==="left")s>0&&s--;else if(a.name==="right")s<r.length&&s++;else if(a.name==="home")s=0;else if(a.name==="end")s=r.length;else if(a.char!==void 0)r=r.slice(0,s)+a.char+r.slice(s),s++;else continue;h(e.output,n),n=q(e,t.message,r,t.placeholder,i,"active"),await e.output.flush()}return m})}finally{k(e.output),await e.output.flush()}};var oe=(e,t,r,s,i)=>{if(i==="done"){let n=r[s];return e.output.writeln(g(C),u(` ${t}`),p(` \xB7 ${n?.label??""}`)),1}if(i==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;e.output.writeln(R(B),u(` ${t}`));for(let n=0;n<r.length;n++){let o=r[n],a=n===s,c=o.disabled===!0,d=a?g(F):p(H),l=c?p(` ${o.label}`):a?u(` ${o.label}`):p(` ${o.label}`),f=o.hint!==void 0?p(` (${o.hint})`):u("");e.output.writeln(p(y),u(" "),d,l,f)}return e.output.writeln(p(w)),r.length+2},we=(e,t,r)=>{let s=e.length,i=t;for(let n=0;n<s;n++)if(i=(i+r+s)%s,e[i]?.disabled!==!0)return i;return t},tt=async(e,t)=>{let r=0;if(t.initialValue!==void 0){let i=t.options.findIndex(n=>n.value===t.initialValue);i>=0&&(r=i)}t.options[r]?.disabled===!0&&(r=we(t.options,r,1));let s=0;E(e.output);try{return await O(async()=>{s=oe(e,t.message,t.options,r,"active"),await e.output.flush();let i=()=>{h(e.output,s),oe(e,t.message,t.options,r,"cancel")};for await(let n of P(e.input)){if(n.name==="c"&&n.ctrl){if(x(e.signals.ctrlC,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="escape"){if(x(e.signals.escape,e)==="cancel")return i(),await e.output.flush(),m;continue}if(n.name==="return")return h(e.output,s),oe(e,t.message,t.options,r,"done"),await e.output.flush(),t.options[r].value;let o=!1;(n.name==="up"||n.name==="k")&&(r=we(t.options,r,-1),o=!0),(n.name==="down"||n.name==="j")&&(r=we(t.options,r,1),o=!0),o&&(h(e.output,s),s=oe(e,t.message,t.options,r,"active"),await e.output.flush())}return m})}finally{k(e.output),await e.output.flush()}};var W=(e,t,r,s,i,n,o)=>{if(o==="done"){let d=[...i].sort((l,f)=>l-f).map(l=>r[l]?.label??"").join(", ");return e.output.writeln(g(C),u(` ${t}`),p(` \xB7 ${d}`)),1}if(o==="cancel")return e.output.writeln(S(A),u(` ${t}`)),1;let a=n!==void 0?L(D):R(B);e.output.writeln(a,u(` ${t}`));for(let d=0;d<r.length;d++){let l=r[d],f=d===s,b=i.has(d),G=l.disabled===!0,de=b?g(De):p(Ge),me=G?p(` ${l.label}`):f?u(` ${l.label}`):p(` ${l.label}`),he=l.hint!==void 0?p(` (${l.hint})`):u("");e.output.writeln(p(y),u(" "),de,me,he)}let c=r.length+2;return n!==void 0?e.output.writeln(p(w),u(" "),L(n)):e.output.writeln(p(w)),c},Ce=(e,t,r)=>{let s=e.length,i=t;for(let n=0;n<s;n++)if(i=(i+r+s)%s,e[i]?.disabled!==!0)return i;return t},rt=async(e,t)=>{let r=0,s=new Set;if(t.initialValues!==void 0)for(let o of t.initialValues){let a=t.options.findIndex(c=>c.value===o);a>=0&&s.add(a)}t.options[r]?.disabled===!0&&(r=Ce(t.options,r,1));let i=0,n;E(e.output);try{return await O(async()=>{i=W(e,t.message,t.options,r,s,n,"active"),await e.output.flush();let o=()=>{h(e.output,i),W(e,t.message,t.options,r,s,void 0,"cancel")};for await(let a of P(e.input)){if(a.name==="c"&&a.ctrl){if(x(e.signals.ctrlC,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="escape"){if(x(e.signals.escape,e)==="cancel")return o(),await e.output.flush(),m;continue}if(a.name==="return"){if(t.required!==!1&&s.size===0){n="Please select at least one option.",h(e.output,i),i=W(e,t.message,t.options,r,s,n,"active"),await e.output.flush();continue}return h(e.output,i),W(e,t.message,t.options,r,s,void 0,"done"),await e.output.flush(),[...s].sort((d,l)=>d-l).map(d=>t.options[d].value)}n=void 0;let c=!1;if((a.name==="up"||a.name==="k")&&(r=Ce(t.options,r,-1),c=!0),(a.name==="down"||a.name==="j")&&(r=Ce(t.options,r,1),c=!0),a.name==="space"&&t.options[r]?.disabled!==!0&&(s.has(r)?s.delete(r):s.add(r),c=!0),a.name==="a"){let d=t.options.every((l,f)=>l.disabled===!0||s.has(f));for(let l=0;l<t.options.length;l++)t.options[l]?.disabled!==!0&&(d?s.delete(l):s.add(l));c=!0}c&&(h(e.output,i),i=W(e,t.message,t.options,r,s,n,"active"),await e.output.flush())}return m})}finally{k(e.output),await e.output.flush()}};var st=(e,t)=>{e.output.writeln(_(_e),u(" "),Le(t)),e.output.writeln(_(y))},nt=(e,t)=>{e.output.writeln(_(y)),e.output.writeln(_(w),u(" "),u(t))},it=e=>{e.output.writeln(u(""))},ot=(e,t)=>{e.output.writeln(u(" "),p(t))},at=e=>{e.output.writeln(_(y))},lt={info:(e,t)=>{e.output.writeln(U("info",t))},success:(e,t)=>{e.output.writeln(U("success",t))},warn:(e,t)=>{e.output.writeln(U("warning",t))},error:(e,t)=>{e.output.writeln(U("error",t))},step:(e,t)=>{e.output.writeln(p(Ue),u(" "),p(t))},message:(e,t,r)=>{e.output.writeln(p(r??y),u(" "),u(t))}};var ut=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],ct=80,pt=(e,t,r)=>{let s=r?.frames??ut,i=r?.interval??ct,n=t,o=0,a,c=()=>{e.output.write(u(`\r${" ".repeat(n.length+4)}\r`))},d=()=>{a!==void 0&&(clearInterval(a),a=void 0,c())};return{start:l=>{l!==void 0&&(n=l),a=setInterval(()=>{let f=s[o%s.length];e.output.write(u("\r"),R(f??""),u(` ${n}`)),o++},i)},stop:l=>{d(),l!==void 0&&(n=l)},update:l=>{n=l},succeed:l=>{d(),e.output.writeln(g(C),u(` ${l??n}`))},fail:l=>{d(),e.output.writeln(S(A),u(` ${l??n}`))},warn:l=>{d(),e.output.writeln(L(D),u(` ${l??n}`))},info:l=>{d(),e.output.writeln(Be($e),u(` ${l??n}`))}}};var dt=(e,t)=>{let r=0,s=t.label??"",i=!1,n=()=>{let o=t.total>0?Math.round(r/t.total*100):0;ne(e.output),e.output.write(p(y),u(" "),ye(o,{width:t.width??20,label:s}))};return{start:o=>{o!==void 0&&(s=o),i=!0,e.output.writeln(p(C),u(` ${s}`)),n()},advance:(o,a)=>{i&&(r=Math.min(r+o,t.total),a!==void 0&&(s=a),n())},stop:o=>{i&&(i=!1,r=t.total,o!==void 0&&(s=o),ne(e.output),e.output.writeln(p(y),u(" "),ye(100,{width:t.width??20,label:s})))}}};var Ve={};N(Ve,{clearScreenSeq:()=>gt,enterAlternateScreen:()=>mt,exitAlternateScreen:()=>ht,getTerminalSize:()=>bt,hideCursorSeq:()=>ft,showCursorSeq:()=>yt});var mt=()=>"\x1B[?1049h",ht=()=>"\x1B[?1049l",ft=()=>"\x1B[?25l",yt=()=>"\x1B[?25h",gt=()=>"\x1B[2J\x1B[H",bt=()=>{try{let{columns:e,rows:t}=Deno.consoleSize();return{cols:e,rows:t}}catch{return{cols:80,rows:24}}};var ce={};N(ce,{bgBlue:()=>vt,bgGreen:()=>Ct,bold:()=>xt,cyan:()=>Se,dim:()=>ae,green:()=>le,inverse:()=>Re,moveTo:()=>v,red:()=>Te,reset:()=>ue,stripAnsi:()=>ke,truncate:()=>z,visibleLength:()=>j,white:()=>wt,yellow:()=>ve});var v=(e,t)=>`\x1B[${e};${t}H`,xt=e=>`\x1B[1m${e}\x1B[22m`,ae=e=>`\x1B[2m${e}\x1B[22m`,le=e=>`\x1B[32m${e}\x1B[39m`,ve=e=>`\x1B[33m${e}\x1B[39m`,Te=e=>`\x1B[31m${e}\x1B[39m`,Se=e=>`\x1B[36m${e}\x1B[39m`,wt=e=>`\x1B[37m${e}\x1B[39m`,Ct=e=>`\x1B[42m${e}\x1B[49m`,vt=e=>`\x1B[44m${e}\x1B[49m`,Re=e=>`\x1B[7m${e}\x1B[27m`,ue=()=>"\x1B[0m",Tt=/\x1b\[[0-9;]*[a-zA-Z]/g,ke=e=>e.replace(Tt,""),j=e=>ke(e).length,z=(e,t)=>{if(ke(e).length<=t)return e;let s=0,i=0,n=e;for(;i<n.length&&s<t-1;){if(n[i]==="\x1B"){let o=n.indexOf("m",i);if(o!==-1){i=o+1;continue}}s++,i++}return n.slice(0,i)+"\u2026"+ue()};var Ke={};N(Ke,{calculateLayout:()=>St});var St=(e,t,r)=>{let s=r.leftWidth<=1?Math.floor(e*r.leftWidth):Math.min(Math.floor(r.leftWidth),e),i=e-s,n=t-1,o=r.rightTopHeight<=1?Math.floor(n*r.rightTopHeight):Math.min(Math.floor(r.rightTopHeight),n),a=n-o;return{left:{id:"left",x:1,y:1,width:s,height:n},rightTop:{id:"rightTop",x:s+1,y:1,width:i,height:o},rightBottom:{id:"rightBottom",x:s+1,y:o+1,width:i,height:a},statusBar:{id:"statusBar",x:1,y:t,width:e,height:1}}};var Fe={};N(Fe,{nextSelectableIndex:()=>kt,renderList:()=>At});var Rt=(e,t)=>{switch(t){case"green":return le(e);case"yellow":return ve(e);case"red":return Te(e);case"cyan":return Se(e);case"dim":return ae(e);default:return e}},kt=(e,t,r)=>{let s=r==="up"?-1:1,i=t+s;for(;i>=0&&i<e.length;){if(e[i].selectable!==!1)return i;i+=s}return t},At=(e,t,r)=>{let s=[],i=r.width-2,n=r.height-2,o=0;t>=n&&(o=t-n+1);for(let a=0;a<n;a++){let c=o+a,d=r.y+1+a;if(c>=e.length){s.push(v(d,r.x+1)+" ".repeat(i));continue}let l=e[c],f=l.selectable!==!1,b=c===t&&f,G=l.active?le("\u25CF"):b?"\u25B8":" ",de=l.badge!==void 0?" "+Rt(`[${l.badge}]`,l.badgeColor??"dim"):"",me=l.dimmed?ae(l.label):l.label,he=` ${G} ${me}${de}`,fe=z(he,i),Pe=Math.max(0,i-j(fe));b?s.push(v(d,r.x+1)+Re(fe+" ".repeat(Pe))):s.push(v(d,r.x+1)+fe+" ".repeat(Pe))}return s.join("")};var Y=()=>({char:" ",fg:-1,bg:-1,fgRGB:null,bgRGB:null,bold:!1,dim:!1,italic:!1,underline:!1,inverse:!1}),pe=(e,t)=>{let r=[];for(let s=0;s<e;s++){let i=[];for(let n=0;n<t;n++)i.push(Y());r.push(i)}return r},X=e=>{let t=[];for(let r=0;r<e;r++)t.push(Y());return t},J=class{#e;#t;#r;#i=null;#o=0;#n;#s=new Set;constructor(t,r){this.#e=t,this.#t=r,this.#r=pe(t,r),this.#n=t-1}get rows(){return this.#e}get cols(){return this.#t}getCell(t,r){return t<0||t>=this.#e||r<0||r>=this.#t?Y():this.#r[t][r]}setCell(t,r,s,i){t<0||t>=this.#e||r<0||r>=this.#t||(this.#r[t][r]={char:i,fg:s.fg,bg:s.bg,fgRGB:s.fgRGB,bgRGB:s.bgRGB,bold:s.bold,dim:s.dim,italic:s.italic,underline:s.underline,inverse:s.inverse},this.#s.add(t))}scrollUp(t=1){for(let r=0;r<t;r++)this.#r.splice(this.#o,1),this.#r.splice(this.#n,0,X(this.#t));for(let r=this.#o;r<=this.#n;r++)this.#s.add(r)}scrollDown(t=1){for(let r=0;r<t;r++)this.#r.splice(this.#n,1),this.#r.splice(this.#o,0,X(this.#t));for(let r=this.#o;r<=this.#n;r++)this.#s.add(r)}setScrollRegion(t,r){this.#o=Math.max(0,t),this.#n=Math.min(this.#e-1,r)}insertLines(t,r){for(let s=0;s<t;s++)this.#r.splice(this.#n,1),this.#r.splice(r,0,X(this.#t));for(let s=r;s<=this.#n;s++)this.#s.add(s)}deleteLines(t,r){for(let s=0;s<t;s++)this.#r.splice(r,1),this.#r.splice(this.#n,0,X(this.#t));for(let s=r;s<=this.#n;s++)this.#s.add(s)}clearLine(t,r){if(t<0||t>=this.#e)return;let s=this.#r[t];if(r===2)for(let i=0;i<this.#t;i++)s[i]=Y();this.#s.add(t)}clearLineRange(t,r,s){if(t<0||t>=this.#e)return;let i=this.#r[t];for(let n=r;n<=Math.min(s,this.#t-1);n++)i[n]=Y();this.#s.add(t)}clearDisplay(t,r,s){if(t===0){this.clearLineRange(r,s,this.#t-1);for(let i=r+1;i<this.#e;i++)this.clearLine(i,2)}else if(t===1){for(let i=0;i<r;i++)this.clearLine(i,2);this.clearLineRange(r,0,s)}else{this.#r=pe(this.#e,this.#t);for(let i=0;i<this.#e;i++)this.#s.add(i)}}enterAlternateScreen(){this.#i=this.#r,this.#r=pe(this.#e,this.#t);for(let t=0;t<this.#e;t++)this.#s.add(t)}exitAlternateScreen(){if(this.#i!==null){this.#r=this.#i,this.#i=null;for(let t=0;t<this.#e;t++)this.#s.add(t)}}resize(t,r){let s=pe(t,r),i=Math.min(t,this.#e),n=Math.min(r,this.#t);for(let o=0;o<i;o++)for(let a=0;a<n;a++)s[o][a]=this.#r[o][a];this.#e=t,this.#t=r,this.#r=s,this.#n=t-1;for(let o=0;o<t;o++)this.#s.add(o)}getLine(t){return t<0||t>=this.#e?X(this.#t):this.#r[t]}getGrid(){return this.#r}getDirtyLines(){return this.#s}clearDirty(){this.#s.clear()}markAllDirty(){for(let t=0;t<this.#e;t++)this.#s.add(t)}};var Z=class{row=0;col=0;visible=!0;#e=0;#t=0;moveTo(t,r){this.row=t,this.col=r}moveUp(t=1){this.row=Math.max(0,this.row-t)}moveDown(t=1){this.row+=t}moveForward(t=1){this.col+=t}moveBack(t=1){this.col=Math.max(0,this.col-t)}moveToColumn(t){this.col=t}save(){this.#e=this.row,this.#t=this.col}restore(){this.row=this.#e,this.col=this.#t}clamp(t,r){this.row=Math.max(0,Math.min(this.row,t-1)),this.col=Math.max(0,Math.min(this.col,r-1))}};var Q=()=>({fg:-1,bg:-1,fgRGB:null,bgRGB:null,bold:!1,dim:!1,italic:!1,underline:!1,inverse:!1}),Ae=(e,t)=>{let r={...t},s=0;for(;s<e.length;){let i=e[s];switch(i){case 0:Object.assign(r,Q());break;case 1:r.bold=!0;break;case 2:r.dim=!0;break;case 3:r.italic=!0;break;case 4:r.underline=!0;break;case 7:r.inverse=!0;break;case 22:r.bold=!1,r.dim=!1;break;case 23:r.italic=!1;break;case 24:r.underline=!1;break;case 27:r.inverse=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:r.fg=i-30;break;case 39:r.fg=-1;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:r.bg=i-40;break;case 49:r.bg=-1;break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:r.fg=i-90+8;break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:r.bg=i-100+8;break;case 38:s+1<e.length&&e[s+1]===5&&s+2<e.length?(r.fg=e[s+2],r.fgRGB=null,s+=2):s+1<e.length&&e[s+1]===2&&s+4<e.length&&(r.fgRGB={r:e[s+2],g:e[s+3],b:e[s+4]},r.fg=-1,s+=4);break;case 48:s+1<e.length&&e[s+1]===5&&s+2<e.length?(r.bg=e[s+2],r.bgRGB=null,s+=2):s+1<e.length&&e[s+1]===2&&s+4<e.length&&(r.bgRGB={r:e[s+2],g:e[s+3],b:e[s+4]},r.bg=-1,s+=4);break}s++}return r};var ee=class{#e="GROUND";#t="";#r="";#i="";feed(t){let r=[],s=()=>{this.#i.length>0&&(r.push({type:"text",text:this.#i}),this.#i="")};for(let i=0;i<t.length;i++){let n=t[i],o=n.charCodeAt(0);switch(this.#e){case"GROUND":n==="\x1B"?(s(),this.#e="ESC"):o<32&&o!==27?(s(),r.push({type:"control",code:o})):this.#i+=n;break;case"ESC":n==="["?(this.#e="CSI_PARAM",this.#t=""):n==="]"?(this.#e="OSC",this.#r=""):(r.push({type:"esc",command:n}),this.#e="GROUND");break;case"CSI_PARAM":if(o>=48&&o<=63||n===";"||n==="?")this.#t+=n;else if(o>=64&&o<=126){let a=this.#t.replace(/^\?/,""),c=this.#t.startsWith("?"),d=a.length>0?a.split(";").map(f=>{let b=parseInt(f,10);return isNaN(b)?0:b}):[],l=(c?"?":"")+n;r.push({type:"csi",command:l,params:d}),this.#e="GROUND"}else this.#t+=n;break;case"OSC":if(n==="\x07"||n==="\\"&&this.#r.endsWith("\x1B")){let a=n==="\\"?this.#r.slice(0,-1):this.#r,c=a.indexOf(";"),d=c>=0?parseInt(a.slice(0,c),10):0,l=c>=0?a.slice(c+1):a;r.push({type:"osc",command:isNaN(d)?0:d,data:l}),this.#e="GROUND"}else this.#r+=n;break}}return s(),r}};var te=class{screen;cursor;#e;#t;constructor(t,r){this.screen=new J(t,r),this.cursor=new Z,this.#e=new ee,this.#t=Q()}write(t){let r=this.#e.feed(t);for(let s of r)switch(s.type){case"text":this.#r(s.text);break;case"csi":this.#o(s.command,s.params);break;case"esc":this.#n(s.command);break;case"control":this.#i(s.code);break;case"osc":break}}resize(t,r){this.screen.resize(t,r),this.cursor.clamp(t,r)}getScreen(){return this.screen}getCursor(){return this.cursor}#r(t){for(let r of t)this.cursor.col>=this.screen.cols&&(this.cursor.col=0,this.cursor.row++,this.cursor.row>=this.screen.rows&&(this.screen.scrollUp(),this.cursor.row=this.screen.rows-1)),this.screen.setCell(this.cursor.row,this.cursor.col,this.#t,r),this.cursor.col++}#i(t){switch(t){case 13:this.cursor.col=0;break;case 10:this.cursor.row++,this.cursor.row>=this.screen.rows&&(this.screen.scrollUp(),this.cursor.row=this.screen.rows-1);break;case 9:this.cursor.col=Math.min(this.screen.cols-1,(Math.floor(this.cursor.col/8)+1)*8);break;case 8:this.cursor.moveBack();break;case 7:break}}#o(t,r){let s=r[0]??0,i=r[1]??0,n=s||1;switch(t){case"A":this.cursor.moveUp(n);break;case"B":this.cursor.moveDown(n);break;case"C":this.cursor.moveForward(n);break;case"D":this.cursor.moveBack(n);break;case"H":case"f":this.cursor.moveTo((s||1)-1,(i||1)-1);break;case"G":this.cursor.moveToColumn((s||1)-1);break;case"d":this.cursor.moveTo((s||1)-1,this.cursor.col);break;case"J":this.screen.clearDisplay(s,this.cursor.row,this.cursor.col);break;case"K":s===0?this.screen.clearLineRange(this.cursor.row,this.cursor.col,this.screen.cols-1):s===1?this.screen.clearLineRange(this.cursor.row,0,this.cursor.col):this.screen.clearLine(this.cursor.row,2);break;case"m":this.#t=Ae(r.length>0?r:[0],this.#t);break;case"S":this.screen.scrollUp(n);break;case"T":this.screen.scrollDown(n);break;case"L":this.screen.insertLines(n,this.cursor.row);break;case"M":this.screen.deleteLines(n,this.cursor.row);break;case"s":this.cursor.save();break;case"u":this.cursor.restore();break;case"r":this.screen.setScrollRegion((s||1)-1,(i||this.screen.rows)-1);break;case"?h":s===25&&(this.cursor.visible=!0),s===1049&&this.screen.enterAlternateScreen();break;case"?l":s===25&&(this.cursor.visible=!1),s===1049&&this.screen.exitAlternateScreen();break}this.cursor.clamp(this.screen.rows,this.screen.cols)}#n(t){switch(t){case"7":this.cursor.save();break;case"8":this.cursor.restore();break;case"M":this.cursor.row===0?this.screen.scrollDown():this.cursor.moveUp();break;case"c":this.screen.clearDisplay(2,0,0),this.cursor.moveTo(0,0),this.#t=Q();break}}};var Bt=e=>{let t=[];return e.bold&&t.push(1),e.dim&&t.push(2),e.italic&&t.push(3),e.underline&&t.push(4),e.fgRGB!==null?t.push(38,2,e.fgRGB.r,e.fgRGB.g,e.fgRGB.b):e.fg>=0&&e.fg<8?t.push(30+e.fg):e.fg>=8&&e.fg<16?t.push(90+(e.fg-8)):e.fg>=16&&t.push(38,5,e.fg),t.length===0?"":`\x1B[${t.join(";")}m`},Mt=e=>e.fg===-1&&e.fgRGB===null&&!e.bold&&!e.dim&&!e.italic&&!e.underline,Oe=(e,t,r)=>{let s=[],i=e.getDirtyLines(),n=r.fullRedraw===!0||i.size>=r.height,o=Math.min(r.height,e.rows),a=Math.min(r.width,e.cols);for(let c=0;c<o;c++){if(!n&&!i.has(c))continue;s.push(`\x1B[${r.offsetRow+c};${r.offsetCol}H`);let d=e.getLine(c),l=!1,f=0;for(;f<a;f++){let b=f<d.length?d[f]:void 0;if(b===void 0||Mt(b))l&&(s.push("\x1B[0m"),l=!1),s.push(b?.char??" ");else{let G=Bt(b);s.push(G),l=!0,s.push(b.char)}}l&&s.push("\x1B[0m")}return e.clearDirty(),s.join("")};var Ee=class{#e;#t=!1;constructor(t,r){this.#e=new te(t,r)}write(t){this.#e.write(t),this.#t=!0}render(t,r=!1){let s={offsetRow:t.y+1,offsetCol:t.x+1,width:t.width-2,height:t.height-2,fullRedraw:r};return this.#t=!1,Oe(this.#e.getScreen(),this.#e.getCursor(),s)}resize(t,r){this.#e.resize(t,r),this.#t=!0}get dirty(){return this.#t}clearDirty(){this.#t=!1}get terminal(){return this.#e}};var qe={};N(qe,{drawBox:()=>He,fillBox:()=>Nt});var It={single:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},He=e=>{let t=e.borderStyle??"single",r=It[t],s=e.width-2,i=[],n=r.tl;if(e.title!==void 0){let o=` ${e.title} `;n+=o+r.h.repeat(Math.max(0,s-o.length))}else n+=r.h.repeat(s);if(n+=r.tr,i.push(v(e.y,e.x)+n),e.skipInterior===!0)for(let o=1;o<e.height-1;o++)i.push(v(e.y+o,e.x)+r.v+v(e.y+o,e.x+e.width-1)+r.v);else for(let o=1;o<e.height-1;o++)i.push(v(e.y+o,e.x)+r.v+ue()+" ".repeat(s)+r.v);return i.push(v(e.y+e.height-1,e.x)+r.bl+r.h.repeat(s)+r.br),i.join("")},Nt=(e,t)=>{let r=He(e),s=e.width-2,i=e.height-2,n=[];for(let o=0;o<i;o++){let a=o<t.length?t[o]:"",c=z(a??"",s),d=Math.max(0,s-j(c));n.push(v(e.y+1+o,e.x+1)+c+" ".repeat(d))}return r+n.join("")};export{We as a,ze as b,Ie as c,O as d,Ze as e,Qe as f,et as g,tt as h,rt as i,st as j,nt as k,it as l,ot as m,at as n,lt as o,pt as p,dt as q,Ve as r,ce as s,qe as t,Ke as u,Fe as v,Ee as w};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-GWZUQPFD.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 ClaudeCodeModel,b as claudeCodeFactory};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as E,b as A}from"./chunk-6V6C6MWY.js";import{e as x}from"./chunk-BNMKKNLB.js";import{a as P,d as $}from"./chunk-P2MUEKFT.js";import{h as j,p as S}from"./chunk-GKOMIH2B.js";import{f as k,h as b,k as C}from"./chunk-MBG7SPPO.js";import{d,f as R,g as v,k as h}from"./chunk-YVN2NZL4.js";import{a as w}from"./chunk-MG65QJY6.js";import{a as c,b as l,c as y}from"./chunk-FFWPJP7A.js";import{i as f}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var I=r=>{let t=j(r);if(t.kind==="repo")return t},H=r=>P(async t=>{try{let{specifier:n}=r,e=r.recipePath??"recipe.json",s=await S(n.owner,n.repo,n.ref,e),o=r.cwd;r.projectName!==void 0&&(o=`${r.cwd}/${r.projectName}`,await f.fs.mkdir(o,{recursive:!0}));let a={...r.variables};r.projectName!==void 0&&a.project_name===void 0&&(a.project_name=r.projectName);let m=`https://raw.githubusercontent.com/${n.owner}/${n.repo}/${n.ref}`,i=await x(s,{cwd:o,registryUrl:m,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:a}),u=await E(o),g=A(s,u),O=r.dryRun?"Would write":"Cloned";t.out.writeln(v(`\u2713 ${O} ${i.written.length} file(s) from ${s.name}`));for(let p of i.written)t.out.writeln(` \u2192 ${p}`);if(i.postInstallRan.length>0){t.out.writeln(d(`
2
+ import{a as E,b as A}from"./chunk-HP5W5XT6.js";import{e as x}from"./chunk-F35K7YVH.js";import{a as P,d as $}from"./chunk-P2MUEKFT.js";import{h as j,p as S}from"./chunk-TEOMM3RD.js";import{f as k,h as b,k as C}from"./chunk-ZC4F4MYU.js";import{d,f as R,g as v,k as h}from"./chunk-YVN2NZL4.js";import{a as w}from"./chunk-MG65QJY6.js";import{a as c,b as l,c as y}from"./chunk-FFWPJP7A.js";import{i as f}from"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var I=r=>{let t=j(r);if(t.kind==="repo")return t},H=r=>P(async t=>{try{let{specifier:n}=r,e=r.recipePath??"recipe.json",s=await S(n.owner,n.repo,n.ref,e),o=r.cwd;r.projectName!==void 0&&(o=`${r.cwd}/${r.projectName}`,await f.fs.mkdir(o,{recursive:!0}));let a={...r.variables};r.projectName!==void 0&&a.project_name===void 0&&(a.project_name=r.projectName);let m=`https://raw.githubusercontent.com/${n.owner}/${n.repo}/${n.ref}`,i=await x(s,{cwd:o,registryUrl:m,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:a}),u=await E(o),g=A(s,u),O=r.dryRun?"Would write":"Cloned";t.out.writeln(v(`\u2713 ${O} ${i.written.length} file(s) from ${s.name}`));for(let p of i.written)t.out.writeln(` \u2192 ${p}`);if(i.postInstallRan.length>0){t.out.writeln(d(`
3
3
  Post-install:`));for(let p of i.postInstallRan)t.out.writeln(d(` \u2713 ${p}`))}if(g.instructions.length>0){t.out.writeln(d(`
4
4
  Dependencies:`));for(let p of g.instructions)t.out.writeln(d(` Run: ${p}`))}return c({recipe:s,result:i,depInfo:g,targetDir:o})}catch(n){let e=n instanceof Error?n.message:String(n);return l({_tag:"ApplyError",message:e})}});var J=async r=>{let t=w(r??[],{string:["recipe","name","var"],boolean:["force","dry-run","skip-existing","verbose"],collect:["var"],alias:{p:"name"}}),n=t._[0],e=k({renderer:C.ansi(),sink:b.stdout()});if(n===void 0)return e.writeln("Usage: eser kit clone <specifier> [options]"),e.writeln(),e.writeln("Specifier formats:"),e.writeln(" owner/repo GitHub repo (default branch)"),e.writeln(" owner/repo#ref GitHub repo at specific tag/branch"),e.writeln(),e.writeln("Options:"),e.writeln(" --recipe <path> Path to recipe.json (default: recipe.json)"),e.writeln(" --name, -p <dir> Target directory"),e.writeln(" --var key=value Template variable (repeatable)"),e.writeln(" --force Overwrite existing files"),e.writeln(" --dry-run Preview without writing"),await e.close(),c(void 0);let s=I(n);if(s===void 0)return e.writeln(R(`Invalid specifier: '${n}'. Use format: owner/repo or gh:owner/repo#ref`)),await e.close(),l({exitCode:1});let o={};for(let m of t.var){let[i,...u]=String(m).split("=");i!==void 0&&i!==""&&(o[i]=u.join("="))}e.writeln(h(`
5
5
  Cloning from ${s.owner}/${s.repo}@${s.ref}...
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a,b,c,d}from"./chunk-MPGRKZIA.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{c as cmd,b as cmdPrefix,d as extractPrefix,a as setCommandPrefix};
2
+ import{a,b,c,d}from"./chunk-OAT2D23A.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";export{c as cmd,b as cmdPrefix,d as extractPrefix,a as setCommandPrefix};
@@ -1,11 +1,11 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import"./chunk-7ZYDAZBD.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import"./chunk-XOSAN6PX.js";import{a as h}from"./chunk-BNQAZLIQ.js";import{f,h as g,k as p}from"./chunk-MBG7SPPO.js";import{c as n,d,f as u}from"./chunk-YVN2NZL4.js";import"./chunk-J7YTWK67.js";import{d as o}from"./chunk-5MVJUALI.js";import"./chunk-ZRUM5PE7.js";import"./chunk-SH4H7OLV.js";import"./chunk-ZEFYMWGZ.js";import"./chunk-MG65QJY6.js";import{a as l,b as m}from"./chunk-FFWPJP7A.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
2
+ import"./chunk-7ZYDAZBD.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import"./chunk-JHEL4OFF.js";import{a as h}from"./chunk-BNQAZLIQ.js";import{f,h as g,k as p}from"./chunk-ZC4F4MYU.js";import{c as n,d,f as u}from"./chunk-YVN2NZL4.js";import"./chunk-J7YTWK67.js";import{d as o}from"./chunk-BLXGL5MA.js";import"./chunk-MCWDLVWU.js";import"./chunk-G5VGZMKA.js";import"./chunk-MJ2IPSAE.js";import"./chunk-MG65QJY6.js";import{a as l,b as m}from"./chunk-FFWPJP7A.js";import"./chunk-WJKE6XHF.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
3
3
 
4
4
  Format: type(scope): description
5
5
  Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build
6
6
  Max 72 characters. One line only. No body. No quotes. No backticks.
7
7
 
8
8
  Example output:
9
- feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-WOZXOD2F.js")).defaultFactories(),r=new w({factories:s}),a=e;if(a===void 0)try{await o`which claude`.noThrow().code()===0&&(a="claude-code")}catch{}a===void 0&&(a="anthropic"),await r.addModel("default",{provider:a,model:"default"});let c=r.getDefault();if(c===null)throw new Error("No AI model available for commit message generation");let k=await c.generateText({system:b,messages:[h("user",`Generate a commit message for this diff:
9
+ feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-AD5UWQSM.js")).defaultFactories(),r=new w({factories:s}),a=e;if(a===void 0)try{await o`which claude`.noThrow().code()===0&&(a="claude-code")}catch{}a===void 0&&(a="anthropic"),await r.addModel("default",{provider:a,model:"default"});let c=r.getDefault();if(c===null)throw new Error("No AI model available for commit message generation");let k=await c.generateText({system:b,messages:[h("user",`Generate a commit message for this diff:
10
10
 
11
11
  ${i}`)],maxTokens:256});return await r.close(),x(k).trim()},O={name:"ai-commitmsg",description:"Generate commit message from git diff using AI",run:async i=>{try{let e=i.provider,t=await o`git diff --cached`.noThrow().text();return t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0?{name:"ai-commitmsg",passed:!0,issues:[],mutations:[],stats:{skipped:1}}:{name:"ai-commitmsg",passed:!0,issues:[{message:`Suggested: ${await y(t,e)}`}],mutations:[],stats:{generated:1}}}catch(e){return{name:"ai-commitmsg",passed:!1,issues:[{message:e instanceof Error?e.message:String(e)}],mutations:[],stats:{errors:1}}}}};export{y as generateCommitMessage,v as main,O as workflowTool};