noskills 4.1.55 → 4.5.0

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 (188) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +106 -58
  3. package/chunks/ajan-bridge-T5M4DPDT.js +1 -0
  4. package/chunks/anthropic-TS7EMQML.js +1 -0
  5. package/chunks/approve-HEW3VFYH.js +1 -0
  6. package/chunks/ask-AXHTCVD6.js +2 -0
  7. package/chunks/block-VN76CXZW.js +1 -0
  8. package/chunks/{browser-XLYVEO2J.js → browser-BGFD24RX.js} +1 -1
  9. package/chunks/bun-WZ7BVR7Y.js +1 -0
  10. package/chunks/cancel-7WRAST62.js +1 -0
  11. package/chunks/chunk-3ZJ3UGQL.js +48 -0
  12. package/chunks/chunk-4PF2MT7S.js +29 -0
  13. package/chunks/chunk-575Y3OEG.js +1 -0
  14. package/chunks/{chunk-DZTBXXB3.js → chunk-5DZHAHXW.js} +23 -23
  15. package/chunks/chunk-5PBNUBBY.js +3 -0
  16. package/chunks/{chunk-HNAHPI6V.js → chunk-5RLCKUIF.js} +1 -1
  17. package/chunks/chunk-6YSS6PEL.js +3 -0
  18. package/chunks/chunk-7GC46XEU.js +1 -0
  19. package/chunks/{chunk-LBPD4EIH.js → chunk-7PPUGTKL.js} +1 -1
  20. package/chunks/chunk-AUZWXMWA.js +27 -0
  21. package/chunks/chunk-CH6A3LES.js +91 -0
  22. package/chunks/{chunk-UG26APX2.js → chunk-CML74SNT.js} +1 -1
  23. package/chunks/chunk-CTTMQSHF.js +1 -0
  24. package/chunks/chunk-DBKXMYLF.js +4 -0
  25. package/chunks/chunk-DEHRWREM.js +1 -0
  26. package/chunks/chunk-EIGFDYGQ.js +1 -0
  27. package/chunks/chunk-EIMBEXUJ.js +1 -0
  28. package/chunks/chunk-EJYSOUEA.js +1 -0
  29. package/chunks/chunk-ENP4P2YH.js +0 -0
  30. package/chunks/{chunk-RJX4ZXQ4.js → chunk-EROZRDGT.js} +1 -1
  31. package/chunks/chunk-FE4MKOI4.js +1 -0
  32. package/chunks/chunk-GQTHILPL.js +5 -0
  33. package/chunks/chunk-HISXAZ4Y.js +1 -0
  34. package/chunks/chunk-I4Z2RF7L.js +31 -0
  35. package/chunks/chunk-IFE5SYGK.js +1 -0
  36. package/chunks/chunk-IGDFEGCH.js +2 -0
  37. package/chunks/chunk-JL3MAFYQ.js +1 -0
  38. package/chunks/chunk-JYVB6UAV.js +1 -0
  39. package/chunks/chunk-KJLEPI7T.js +1 -0
  40. package/chunks/chunk-KM64FL2X.js +1 -0
  41. package/chunks/chunk-KMLNG3EC.js +1 -0
  42. package/chunks/chunk-KRKOWSYW.js +148 -0
  43. package/chunks/chunk-KRRPOVQG.js +1 -0
  44. package/chunks/{chunk-CKETVOVQ.js → chunk-LJEWPIEI.js} +1 -1
  45. package/chunks/{chunk-VAP3TSYK.js → chunk-LN4NDYT6.js} +1 -1
  46. package/chunks/{chunk-Z3O5HAIO.js → chunk-NGCBWJML.js} +1 -1
  47. package/chunks/chunk-O4KKKYCH.js +1 -0
  48. package/chunks/chunk-OAWYVETM.js +1 -0
  49. package/chunks/chunk-PKEQKXZW.js +23 -0
  50. package/chunks/chunk-PRQ5CRIG.js +1 -0
  51. package/chunks/{chunk-SWYX6WYQ.js → chunk-PSX63TYP.js} +2 -2
  52. package/chunks/{chunk-5P46WSNG.js → chunk-Q4TI7EYT.js} +1 -1
  53. package/chunks/chunk-QKWJ72HI.js +3 -0
  54. package/chunks/chunk-RAQY37P6.js +1 -0
  55. package/chunks/{openai-QGEN33SU.js → chunk-S4MUTKHT.js} +3 -3
  56. package/chunks/chunk-SLO22P65.js +1 -0
  57. package/chunks/chunk-UE56BMAW.js +21 -0
  58. package/chunks/{chunk-O2NUECRA.js → chunk-VJRCTYGL.js} +1 -1
  59. package/chunks/chunk-VXU6XZ66.js +39 -0
  60. package/chunks/chunk-W4TQLLUK.js +7 -0
  61. package/chunks/{chunk-PKYW3S5P.js → chunk-XDRX4ZBJ.js} +1 -1
  62. package/chunks/{chunk-XNGHRJVK.js → chunk-Y5E7ZCCX.js} +1 -1
  63. package/chunks/chunk-Z7OYXH3J.js +1 -0
  64. package/chunks/claude-code-DIWRQKZA.js +1 -0
  65. package/chunks/cmd-46ZIHXLB.js +1 -0
  66. package/chunks/concern-QSENGU6C.js +1 -0
  67. package/chunks/{config-CZDLCSOC.js → config-S3UXTJN2.js} +1 -1
  68. package/chunks/decision-ledger-GY2W6VWL.js +1 -0
  69. package/chunks/delegate-WKXIER7E.js +1 -0
  70. package/chunks/deno-YM5PW6ZM.js +1 -0
  71. package/chunks/{diagrams-H7NLJF7W.js → diagrams-A7W2EBYV.js} +1 -1
  72. package/chunks/diagrams-CBCUA47B.js +1 -0
  73. package/chunks/{dist-UI3SRKS3.js → dist-3MH5UCQU.js} +3 -3
  74. package/chunks/done-WR3UFYJT.js +1 -0
  75. package/chunks/followup-5EGZEF5Q.js +1 -0
  76. package/chunks/free-KJQHRYZA.js +1 -0
  77. package/chunks/gemini-IWP24T63.js +1 -0
  78. package/chunks/init-437SU6XH.js +1 -0
  79. package/chunks/invoke-hook-LMCWNF65.js +13 -0
  80. package/chunks/kiro-THWCXS5L.js +1 -0
  81. package/chunks/{learn-KIZTV5OH.js → learn-ZTYKBZER.js} +1 -1
  82. package/chunks/ledger-FOOPJ2UO.js +1 -0
  83. package/chunks/list-HNGIOVBK.js +1 -0
  84. package/chunks/loader-command-3A5FK2RF.js +1 -0
  85. package/chunks/loader-reactor-YZM7HO4G.js +1 -0
  86. package/chunks/manager-2MOLEJ4Q.js +3 -0
  87. package/chunks/mod-6EZYRKWV.js +1 -0
  88. package/chunks/{mod-TYCXSLSH.js → mod-7VTKN6Q5.js} +1 -1
  89. package/chunks/mod-7X5TKHKC.js +1 -0
  90. package/chunks/mod-AJIRKRAH.js +1 -0
  91. package/chunks/mod-SFSUQWSB.js +8 -0
  92. package/chunks/mod-TGOMO3CJ.js +1 -0
  93. package/chunks/{multipart-parser-UVM6CEKF.js → multipart-parser-DKDFOZKD.js} +1 -1
  94. package/chunks/next-Y6FOPM4Z.js +15 -0
  95. package/chunks/node-AZK2C657.js +12 -0
  96. package/chunks/node-GQQ42DT2.js +68 -0
  97. package/chunks/node-J4GTOSL2.js +1 -0
  98. package/chunks/ollama-2KAMCXVL.js +1 -0
  99. package/chunks/openai-HHE35TAX.js +31 -0
  100. package/chunks/openai-YES2XJDU.js +1 -0
  101. package/chunks/opencode-S4M7WJTO.js +1 -0
  102. package/chunks/{pack-33LQ7SJT.js → pack-KUT53Z24.js} +4 -4
  103. package/chunks/plan-export-PG2BVRQZ.js +3 -0
  104. package/chunks/purge-JGNJNEET.js +4 -0
  105. package/chunks/reopen-RPDXN3CF.js +1 -0
  106. package/chunks/reset-RBCQO2RF.js +1 -0
  107. package/chunks/review-VMS5MYOV.js +1 -0
  108. package/chunks/{rule-XREVPB5P.js → rule-IB4VKSBC.js} +2 -2
  109. package/chunks/run-62PWXVII.js +3 -0
  110. package/chunks/sdk-FR7Z4YSC.js +1 -0
  111. package/chunks/{session-HBP5GGI2.js → session-Q43KMFL2.js} +1 -1
  112. package/chunks/spec-4RKLPOEM.js +1 -0
  113. package/chunks/{src-GLQPTDNR.js → src-HXQVVTGQ.js} +1 -1
  114. package/chunks/status-OGLFEFF7.js +1 -0
  115. package/chunks/sync-H35O5DN5.js +1 -0
  116. package/chunks/{unstable_chmod-RZ5DE3XZ.js → unstable_chmod-44MCKF3B.js} +1 -1
  117. package/chunks/validate-JX7UTAK5.js +1 -0
  118. package/chunks/vertexai-WF5CKMYI.js +1 -0
  119. package/chunks/watch-SOZDHLSC.js +8 -0
  120. package/chunks/web-3VGRM3W4.js +1 -0
  121. package/chunks/wontfix-RBOGLLWJ.js +1 -0
  122. package/chunks/workerd-I7MLRCLJ.js +1 -0
  123. package/noskills.js +1 -1
  124. package/package.json +2 -2
  125. package/chunks/anthropic-LDUWIUPL.js +0 -1
  126. package/chunks/approve-73ZFRV7E.js +0 -1
  127. package/chunks/ask-VGI3BFZW.js +0 -2
  128. package/chunks/block-5APPOQQK.js +0 -1
  129. package/chunks/bun-5VMFSLLY.js +0 -1
  130. package/chunks/cancel-ZYRZPFRH.js +0 -1
  131. package/chunks/chunk-2GF5IUQD.js +0 -39
  132. package/chunks/chunk-2N4GTHXQ.js +0 -1
  133. package/chunks/chunk-5CNPFLE6.js +0 -1
  134. package/chunks/chunk-5MN3MWQN.js +0 -1
  135. package/chunks/chunk-65A35QPF.js +0 -1
  136. package/chunks/chunk-7UX6WIXX.js +0 -1
  137. package/chunks/chunk-AGPCY6XP.js +0 -1
  138. package/chunks/chunk-AGWPQX43.js +0 -31
  139. package/chunks/chunk-AP3YBNPX.js +0 -1
  140. package/chunks/chunk-D3IKJ7FF.js +0 -1
  141. package/chunks/chunk-EKZXJCT7.js +0 -5
  142. package/chunks/chunk-H77MLIL5.js +0 -4
  143. package/chunks/chunk-JVCVWI3B.js +0 -3
  144. package/chunks/chunk-OLM5RTFK.js +0 -1
  145. package/chunks/chunk-OTRBRRIO.js +0 -1
  146. package/chunks/chunk-U5SHLIO4.js +0 -3
  147. package/chunks/chunk-UT6ZCLRA.js +0 -1
  148. package/chunks/chunk-XS5JHAC7.js +0 -1
  149. package/chunks/chunk-XXBSEOQR.js +0 -148
  150. package/chunks/chunk-YSLRAWBK.js +0 -1
  151. package/chunks/chunk-YSSDQJTT.js +0 -91
  152. package/chunks/chunk-YTNM7A5Y.js +0 -3
  153. package/chunks/claude-code-BWCSAVK2.js +0 -1
  154. package/chunks/cmd-ZXO6KFK6.js +0 -1
  155. package/chunks/concern-RB444PUE.js +0 -1
  156. package/chunks/delegate-QBPFR44C.js +0 -1
  157. package/chunks/deno-QOH6TCLQ.js +0 -1
  158. package/chunks/diagrams-I2QKL7WR.js +0 -1
  159. package/chunks/done-Z2MFKQ45.js +0 -1
  160. package/chunks/followup-JR63B3JS.js +0 -1
  161. package/chunks/free-R4ZTZ76O.js +0 -1
  162. package/chunks/gemini-YR5KT32S.js +0 -1
  163. package/chunks/init-F7JCAPQS.js +0 -1
  164. package/chunks/invoke-hook-CGV6UHU7.js +0 -13
  165. package/chunks/kiro-RGYUKJAX.js +0 -3
  166. package/chunks/list-6EQP6VUL.js +0 -1
  167. package/chunks/manager-R5KNPWLT.js +0 -6
  168. package/chunks/mod-A77UWGGG.js +0 -1
  169. package/chunks/next-J2YKXUKA.js +0 -7
  170. package/chunks/node-3FTYLC7H.js +0 -67
  171. package/chunks/node-BPWE6I45.js +0 -1
  172. package/chunks/ollama-LTZ43OHQ.js +0 -3
  173. package/chunks/openai-Y74OQTVB.js +0 -23
  174. package/chunks/opencode-PZDL7VDP.js +0 -1
  175. package/chunks/purge-G22VY6CI.js +0 -4
  176. package/chunks/reopen-JTFZBGHT.js +0 -1
  177. package/chunks/reset-AW2IS3F6.js +0 -1
  178. package/chunks/review-EESYDNMA.js +0 -1
  179. package/chunks/run-K7FAF7RR.js +0 -3
  180. package/chunks/sdk-6IMATOQ3.js +0 -40
  181. package/chunks/spec-5B3HC5PT.js +0 -1
  182. package/chunks/status-CQ4U3KBF.js +0 -1
  183. package/chunks/sync-TJLHMISX.js +0 -1
  184. package/chunks/vertexai-RUXZ24C2.js +0 -1
  185. package/chunks/watch-WCX4YBL5.js +0 -8
  186. package/chunks/web-PEDL6264.js +0 -1
  187. package/chunks/wontfix-7JMQAMWG.js +0 -1
  188. package/chunks/workerd-IIQRIOBX.js +0 -1
@@ -0,0 +1,29 @@
1
+ var j=(o,i,r)=>{let e=!1,s=n=>{if(e)throw new Error(`${n}: the ${o} FFI library is already closed. Open a new handle before calling any symbol again.`)},t=(n,g)=>g.length===0?()=>(s(n),g()):g.length===1?E=>(s(n),g(E)):(E,f)=>(s(n),g(E,f)),c={},l=Object.entries(i);for(let[n,g]of l)c[n]=t(n,g);return{symbols:c,close:()=>{e||(e=!0,r())}}};var Cr={EserAjanVersion:{parameters:[],result:"pointer"},EserAjanInit:{parameters:[],result:"i32"},EserAjanShutdown:{parameters:[],result:"void"},EserAjanFree:{parameters:["pointer"],result:"void"},EserAjanConfigLoad:{parameters:["pointer"],result:"pointer"},EserAjanDIResolve:{parameters:["pointer"],result:"pointer"},EserAjanAiCreateModel:{parameters:["pointer"],result:"pointer"},EserAjanAiGenerateText:{parameters:["pointer","pointer"],result:"pointer",nonblocking:!0},EserAjanAiStreamText:{parameters:["pointer","pointer"],result:"pointer",nonblocking:!0},EserAjanAiStreamRead:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanAiCancelRequest:{parameters:["pointer"],result:"pointer"},EserAjanAiCloseModel:{parameters:["pointer"],result:"pointer"},EserAjanAiFreeStream:{parameters:["pointer"],result:"pointer"},EserAjanAiBatchCreate:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanAiBatchGet:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanAiBatchList:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanAiBatchDownload:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanAiBatchCancel:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanFormatEncode:{parameters:["pointer"],result:"pointer"},EserAjanFormatDecode:{parameters:["pointer"],result:"pointer"},EserAjanFormatList:{parameters:[],result:"pointer"},EserAjanFormatEncodeDocument:{parameters:["pointer"],result:"pointer"},EserAjanLogCreate:{parameters:["pointer"],result:"pointer"},EserAjanLogWrite:{parameters:["pointer"],result:"pointer"},EserAjanLogClose:{parameters:["pointer"],result:"pointer"},EserAjanLogShouldLog:{parameters:["pointer"],result:"pointer"},EserAjanLogConfigure:{parameters:["pointer"],result:"pointer"},EserAjanHttpCreate:{parameters:["pointer"],result:"pointer"},EserAjanHttpRequest:{parameters:["pointer"],result:"pointer"},EserAjanHttpClose:{parameters:["pointer"],result:"pointer"},EserAjanHttpRequestStream:{parameters:["pointer"],result:"pointer"},EserAjanHttpStreamRead:{parameters:["pointer"],result:"pointer"},EserAjanHttpStreamClose:{parameters:["pointer"],result:"pointer"},EserAjanNoskillsInit:{parameters:["pointer"],result:"pointer"},EserAjanNoskillsSpecNew:{parameters:["pointer"],result:"pointer"},EserAjanNoskillsNext:{parameters:["pointer"],result:"pointer"},EserAjanWorkflowRun:{parameters:["pointer"],result:"pointer"},EserAjanCryptoHash:{parameters:["pointer"],result:"pointer"},EserAjanCacheCreate:{parameters:["pointer"],result:"pointer"},EserAjanCacheGetDir:{parameters:["pointer"],result:"pointer"},EserAjanCacheGetVersionedPath:{parameters:["pointer"],result:"pointer"},EserAjanCacheList:{parameters:["pointer"],result:"pointer"},EserAjanCacheRemove:{parameters:["pointer"],result:"pointer"},EserAjanCacheClear:{parameters:["pointer"],result:"pointer"},EserAjanCacheClose:{parameters:["pointer"],result:"pointer"},EserAjanCsGenerate:{parameters:["pointer"],result:"pointer"},EserAjanCsSync:{parameters:["pointer"],result:"pointer"},EserAjanKitListRecipes:{parameters:["pointer"],result:"pointer"},EserAjanKitApplyRecipe:{parameters:["pointer"],result:"pointer"},EserAjanKitCloneRecipe:{parameters:["pointer"],result:"pointer"},EserAjanKitNewProject:{parameters:["pointer"],result:"pointer"},EserAjanKitUpdateRecipe:{parameters:["pointer"],result:"pointer"},EserAjanPostsCreateService:{parameters:["pointer"],result:"pointer"},EserAjanPostsCompose:{parameters:["pointer"],result:"pointer"},EserAjanPostsGetTimeline:{parameters:["pointer"],result:"pointer"},EserAjanPostsSearch:{parameters:["pointer"],result:"pointer"},EserAjanPostsClose:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseGitCurrentBranch:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseGitLatestTag:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseGitLog:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseValidateCommitMsg:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseGenerateChangelog:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseBumpVersion:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseWalkFiles:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseValidateFiles:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseCheckCircularDeps:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseCheckExportNames:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseCheckModExports:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseCheckPackageConfigs:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseCheckDocs:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseWalkFilesStreamCreate:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseWalkFilesStreamRead:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseWalkFilesStreamClose:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseValidateFilesStreamCreate:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseValidateFilesStreamRead:{parameters:["pointer"],result:"pointer"},EserAjanCodebaseValidateFilesStreamClose:{parameters:["pointer"],result:"pointer"},EserAjanCollectorSpecifierToIdentifier:{parameters:["pointer"],result:"pointer"},EserAjanCollectorWalkFiles:{parameters:["pointer"],result:"pointer"},EserAjanCollectorGenerateManifest:{parameters:["pointer"],result:"pointer"},EserAjanParsingTokenize:{parameters:["pointer"],result:"pointer"},EserAjanParsingSimpleTokens:{parameters:[],result:"pointer"},EserAjanParsingTokenizeStreamCreate:{parameters:["pointer"],result:"pointer"},EserAjanParsingTokenizeStreamPush:{parameters:["pointer"],result:"pointer"},EserAjanParsingTokenizeStreamClose:{parameters:["pointer"],result:"pointer"},EserAjanShellExec:{parameters:["pointer"],result:"pointer"},EserAjanShellTuiKeypressCreate:{parameters:["pointer"],result:"pointer"},EserAjanShellTuiKeypressRead:{parameters:["pointer"],result:"pointer"},EserAjanShellTuiKeypressClose:{parameters:["pointer"],result:"pointer"},EserAjanShellTuiSetStdinRaw:{parameters:["pointer"],result:"pointer"},EserAjanShellTuiGetSize:{parameters:["pointer"],result:"pointer"},EserAjanShellExecSpawn:{parameters:["pointer"],result:"pointer"},EserAjanShellExecRead:{parameters:["pointer"],result:"pointer"},EserAjanShellExecWrite:{parameters:["pointer"],result:"pointer"},EserAjanShellExecClose:{parameters:["pointer"],result:"pointer"},EserAjanShellPtySpawn:{parameters:["pointer"],result:"pointer"},EserAjanShellPtyRead:{parameters:["pointer"],result:"pointer",nonblocking:!0},EserAjanShellPtyWrite:{parameters:["pointer"],result:"pointer"},EserAjanShellPtyResize:{parameters:["pointer"],result:"pointer"},EserAjanShellPtyKill:{parameters:["pointer"],result:"pointer"},EserAjanShellPtyClose:{parameters:["pointer"],result:"pointer"}},u=o=>{let r=new TextEncoder().encode(o),e=new ArrayBuffer(r.length+1),s=new Uint8Array(e);return s.set(r),s},fr=o=>{let i=r=>{if(r===null)return"";try{return new Deno.UnsafePointerView(r).getCString()}finally{o.EserAjanFree(r)}};return{EserAjanVersion:()=>i(o.EserAjanVersion()),EserAjanInit:()=>o.EserAjanInit(),EserAjanShutdown:()=>{o.EserAjanShutdown()},EserAjanFree:r=>{o.EserAjanFree(r)},EserAjanConfigLoad:r=>{let e=u(r),s=o.EserAjanConfigLoad(Deno.UnsafePointer.of(e));return i(s)},EserAjanDIResolve:r=>{let e=u(r),s=o.EserAjanDIResolve(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiCreateModel:r=>{let e=u(r),s=o.EserAjanAiCreateModel(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiGenerateText:async(r,e)=>{let s=u(r),t=u(e),c=await o.EserAjanAiGenerateText(Deno.UnsafePointer.of(s),Deno.UnsafePointer.of(t));return i(c)},EserAjanAiStreamText:async(r,e)=>{let s=u(r),t=u(e),c=await o.EserAjanAiStreamText(Deno.UnsafePointer.of(s),Deno.UnsafePointer.of(t));return i(c)},EserAjanAiStreamRead:async r=>{let e=u(r),s=await o.EserAjanAiStreamRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiCancelRequest:r=>{let e=u(r),s=o.EserAjanAiCancelRequest(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiCloseModel:r=>{let e=u(r),s=o.EserAjanAiCloseModel(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiFreeStream:r=>{let e=u(r),s=o.EserAjanAiFreeStream(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiBatchCreate:async r=>{let e=u(r),s=await o.EserAjanAiBatchCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiBatchGet:async r=>{let e=u(r),s=await o.EserAjanAiBatchGet(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiBatchList:async r=>{let e=u(r),s=await o.EserAjanAiBatchList(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiBatchDownload:async r=>{let e=u(r),s=await o.EserAjanAiBatchDownload(Deno.UnsafePointer.of(e));return i(s)},EserAjanAiBatchCancel:async r=>{let e=u(r),s=await o.EserAjanAiBatchCancel(Deno.UnsafePointer.of(e));return i(s)},EserAjanFormatEncode:r=>{let e=u(r),s=o.EserAjanFormatEncode(Deno.UnsafePointer.of(e));return i(s)},EserAjanFormatDecode:r=>{let e=u(r),s=o.EserAjanFormatDecode(Deno.UnsafePointer.of(e));return i(s)},EserAjanFormatList:()=>{let r=o.EserAjanFormatList();return i(r)},EserAjanFormatEncodeDocument:r=>{let e=u(r),s=o.EserAjanFormatEncodeDocument(Deno.UnsafePointer.of(e));return i(s)},EserAjanLogCreate:r=>{let e=u(r),s=o.EserAjanLogCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanLogWrite:r=>{let e=u(r),s=o.EserAjanLogWrite(Deno.UnsafePointer.of(e));return i(s)},EserAjanLogClose:r=>{let e=u(r),s=o.EserAjanLogClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanLogShouldLog:r=>{let e=u(r),s=o.EserAjanLogShouldLog(Deno.UnsafePointer.of(e));return i(s)},EserAjanLogConfigure:r=>{let e=u(r),s=o.EserAjanLogConfigure(Deno.UnsafePointer.of(e));return i(s)},EserAjanHttpCreate:r=>{let e=u(r),s=o.EserAjanHttpCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanHttpRequest:r=>{let e=u(r),s=o.EserAjanHttpRequest(Deno.UnsafePointer.of(e));return i(s)},EserAjanHttpClose:r=>{let e=u(r),s=o.EserAjanHttpClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanHttpRequestStream:r=>{let e=u(r),s=o.EserAjanHttpRequestStream(Deno.UnsafePointer.of(e));return i(s)},EserAjanHttpStreamRead:r=>{let e=u(r),s=o.EserAjanHttpStreamRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanHttpStreamClose:r=>{let e=u(r),s=o.EserAjanHttpStreamClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanNoskillsInit:r=>{let e=u(r),s=o.EserAjanNoskillsInit(Deno.UnsafePointer.of(e));return i(s)},EserAjanNoskillsSpecNew:r=>{let e=u(r),s=o.EserAjanNoskillsSpecNew(Deno.UnsafePointer.of(e));return i(s)},EserAjanNoskillsNext:r=>{let e=u(r),s=o.EserAjanNoskillsNext(Deno.UnsafePointer.of(e));return i(s)},EserAjanWorkflowRun:r=>{let e=u(r),s=o.EserAjanWorkflowRun(Deno.UnsafePointer.of(e));return i(s)},EserAjanCryptoHash:r=>{let e=u(r),s=o.EserAjanCryptoHash(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheCreate:r=>{let e=u(r),s=o.EserAjanCacheCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheGetDir:r=>{let e=u(r),s=o.EserAjanCacheGetDir(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheGetVersionedPath:r=>{let e=u(r),s=o.EserAjanCacheGetVersionedPath(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheList:r=>{let e=u(r),s=o.EserAjanCacheList(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheRemove:r=>{let e=u(r),s=o.EserAjanCacheRemove(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheClear:r=>{let e=u(r),s=o.EserAjanCacheClear(Deno.UnsafePointer.of(e));return i(s)},EserAjanCacheClose:r=>{let e=u(r),s=o.EserAjanCacheClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanCsGenerate:r=>{let e=u(r),s=o.EserAjanCsGenerate(Deno.UnsafePointer.of(e));return i(s)},EserAjanCsSync:r=>{let e=u(r),s=o.EserAjanCsSync(Deno.UnsafePointer.of(e));return i(s)},EserAjanKitListRecipes:r=>{let e=u(r),s=o.EserAjanKitListRecipes(Deno.UnsafePointer.of(e));return i(s)},EserAjanKitApplyRecipe:r=>{let e=u(r),s=o.EserAjanKitApplyRecipe(Deno.UnsafePointer.of(e));return i(s)},EserAjanKitCloneRecipe:r=>{let e=u(r),s=o.EserAjanKitCloneRecipe(Deno.UnsafePointer.of(e));return i(s)},EserAjanKitNewProject:r=>{let e=u(r),s=o.EserAjanKitNewProject(Deno.UnsafePointer.of(e));return i(s)},EserAjanKitUpdateRecipe:r=>{let e=u(r),s=o.EserAjanKitUpdateRecipe(Deno.UnsafePointer.of(e));return i(s)},EserAjanPostsCreateService:r=>{let e=u(r),s=o.EserAjanPostsCreateService(Deno.UnsafePointer.of(e));return i(s)},EserAjanPostsCompose:r=>{let e=u(r),s=o.EserAjanPostsCompose(Deno.UnsafePointer.of(e));return i(s)},EserAjanPostsGetTimeline:r=>{let e=u(r),s=o.EserAjanPostsGetTimeline(Deno.UnsafePointer.of(e));return i(s)},EserAjanPostsSearch:r=>{let e=u(r),s=o.EserAjanPostsSearch(Deno.UnsafePointer.of(e));return i(s)},EserAjanPostsClose:r=>{let e=u(r),s=o.EserAjanPostsClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseGitCurrentBranch:r=>{let e=u(r),s=o.EserAjanCodebaseGitCurrentBranch(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseGitLatestTag:r=>{let e=u(r),s=o.EserAjanCodebaseGitLatestTag(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseGitLog:r=>{let e=u(r),s=o.EserAjanCodebaseGitLog(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseValidateCommitMsg:r=>{let e=u(r),s=o.EserAjanCodebaseValidateCommitMsg(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseGenerateChangelog:r=>{let e=u(r),s=o.EserAjanCodebaseGenerateChangelog(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseBumpVersion:r=>{let e=u(r),s=o.EserAjanCodebaseBumpVersion(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseWalkFiles:r=>{let e=u(r),s=o.EserAjanCodebaseWalkFiles(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseValidateFiles:r=>{let e=u(r),s=o.EserAjanCodebaseValidateFiles(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseCheckCircularDeps:r=>{let e=u(r),s=o.EserAjanCodebaseCheckCircularDeps(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseCheckExportNames:r=>{let e=u(r),s=o.EserAjanCodebaseCheckExportNames(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseCheckModExports:r=>{let e=u(r),s=o.EserAjanCodebaseCheckModExports(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseCheckPackageConfigs:r=>{let e=u(r),s=o.EserAjanCodebaseCheckPackageConfigs(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseCheckDocs:r=>{let e=u(r),s=o.EserAjanCodebaseCheckDocs(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseWalkFilesStreamCreate:r=>{let e=u(r),s=o.EserAjanCodebaseWalkFilesStreamCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseWalkFilesStreamRead:r=>{let e=u(r),s=o.EserAjanCodebaseWalkFilesStreamRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseWalkFilesStreamClose:r=>{let e=u(r),s=o.EserAjanCodebaseWalkFilesStreamClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseValidateFilesStreamCreate:r=>{let e=u(r),s=o.EserAjanCodebaseValidateFilesStreamCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseValidateFilesStreamRead:r=>{let e=u(r),s=o.EserAjanCodebaseValidateFilesStreamRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanCodebaseValidateFilesStreamClose:r=>{let e=u(r),s=o.EserAjanCodebaseValidateFilesStreamClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanCollectorSpecifierToIdentifier:r=>{let e=u(r),s=o.EserAjanCollectorSpecifierToIdentifier(Deno.UnsafePointer.of(e));return i(s)},EserAjanCollectorWalkFiles:r=>{let e=u(r),s=o.EserAjanCollectorWalkFiles(Deno.UnsafePointer.of(e));return i(s)},EserAjanCollectorGenerateManifest:r=>{let e=u(r),s=o.EserAjanCollectorGenerateManifest(Deno.UnsafePointer.of(e));return i(s)},EserAjanParsingTokenize:r=>{let e=u(r),s=o.EserAjanParsingTokenize(Deno.UnsafePointer.of(e));return i(s)},EserAjanParsingSimpleTokens:()=>{let r=o.EserAjanParsingSimpleTokens();return i(r)},EserAjanParsingTokenizeStreamCreate:r=>{let e=u(r),s=o.EserAjanParsingTokenizeStreamCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanParsingTokenizeStreamPush:r=>{let e=u(r),s=o.EserAjanParsingTokenizeStreamPush(Deno.UnsafePointer.of(e));return i(s)},EserAjanParsingTokenizeStreamClose:r=>{let e=u(r),s=o.EserAjanParsingTokenizeStreamClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellExec:r=>{let e=u(r),s=o.EserAjanShellExec(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellTuiKeypressCreate:r=>{let e=u(r),s=o.EserAjanShellTuiKeypressCreate(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellTuiKeypressRead:r=>{let e=u(r),s=o.EserAjanShellTuiKeypressRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellTuiKeypressClose:r=>{let e=u(r),s=o.EserAjanShellTuiKeypressClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellTuiSetStdinRaw:r=>{let e=u(r),s=o.EserAjanShellTuiSetStdinRaw(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellTuiGetSize:r=>{let e=u(r),s=o.EserAjanShellTuiGetSize(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellExecSpawn:r=>{let e=u(r),s=o.EserAjanShellExecSpawn(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellExecRead:r=>{let e=u(r),s=o.EserAjanShellExecRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellExecWrite:r=>{let e=u(r),s=o.EserAjanShellExecWrite(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellExecClose:r=>{let e=u(r),s=o.EserAjanShellExecClose(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellPtySpawn:r=>{let e=u(r),s=o.EserAjanShellPtySpawn(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellPtyRead:async r=>{let e=u(r),s=await o.EserAjanShellPtyRead(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellPtyWrite:r=>{let e=u(r),s=o.EserAjanShellPtyWrite(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellPtyResize:r=>{let e=u(r),s=o.EserAjanShellPtyResize(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellPtyKill:r=>{let e=u(r),s=o.EserAjanShellPtyKill(Deno.UnsafePointer.of(e));return i(s)},EserAjanShellPtyClose:r=>{let e=u(r),s=o.EserAjanShellPtyClose(Deno.UnsafePointer.of(e));return i(s)}}},J={name:"deno",available:()=>typeof Deno<"u"&&typeof Deno.dlopen=="function",open:o=>{let i=Deno.dlopen(o,Cr);return Promise.resolve(j("deno",fr(i.symbols),()=>{i.close()}))}};var K={name:"bun",available:()=>typeof globalThis.Bun<"u",open:async o=>{let i=await import("bun:ffi"),{dlopen:r,CString:e}=i,s=r(o,{EserAjanVersion:{args:[],returns:"ptr"},EserAjanInit:{args:[],returns:"i32"},EserAjanShutdown:{args:[],returns:"void"},EserAjanFree:{args:["ptr"],returns:"void"},EserAjanConfigLoad:{args:["ptr"],returns:"ptr"},EserAjanDIResolve:{args:["ptr"],returns:"ptr"},EserAjanAiCreateModel:{args:["ptr"],returns:"ptr"},EserAjanAiGenerateText:{args:["ptr","ptr"],returns:"ptr"},EserAjanAiStreamText:{args:["ptr","ptr"],returns:"ptr"},EserAjanAiStreamRead:{args:["ptr"],returns:"ptr"},EserAjanAiCancelRequest:{args:["ptr"],returns:"ptr"},EserAjanAiCloseModel:{args:["ptr"],returns:"ptr"},EserAjanAiFreeStream:{args:["ptr"],returns:"ptr"},EserAjanAiBatchCreate:{args:["ptr"],returns:"ptr"},EserAjanAiBatchGet:{args:["ptr"],returns:"ptr"},EserAjanAiBatchList:{args:["ptr"],returns:"ptr"},EserAjanAiBatchDownload:{args:["ptr"],returns:"ptr"},EserAjanAiBatchCancel:{args:["ptr"],returns:"ptr"},EserAjanFormatEncode:{args:["ptr"],returns:"ptr"},EserAjanFormatDecode:{args:["ptr"],returns:"ptr"},EserAjanFormatList:{args:[],returns:"ptr"},EserAjanFormatEncodeDocument:{args:["ptr"],returns:"ptr"},EserAjanLogCreate:{args:["ptr"],returns:"ptr"},EserAjanLogWrite:{args:["ptr"],returns:"ptr"},EserAjanLogClose:{args:["ptr"],returns:"ptr"},EserAjanLogShouldLog:{args:["ptr"],returns:"ptr"},EserAjanLogConfigure:{args:["ptr"],returns:"ptr"},EserAjanHttpCreate:{args:["ptr"],returns:"ptr"},EserAjanHttpRequest:{args:["ptr"],returns:"ptr"},EserAjanHttpClose:{args:["ptr"],returns:"ptr"},EserAjanHttpRequestStream:{args:["ptr"],returns:"ptr"},EserAjanHttpStreamRead:{args:["ptr"],returns:"ptr"},EserAjanHttpStreamClose:{args:["ptr"],returns:"ptr"},EserAjanNoskillsInit:{args:["ptr"],returns:"ptr"},EserAjanNoskillsSpecNew:{args:["ptr"],returns:"ptr"},EserAjanNoskillsNext:{args:["ptr"],returns:"ptr"},EserAjanWorkflowRun:{args:["ptr"],returns:"ptr"},EserAjanCryptoHash:{args:["ptr"],returns:"ptr"},EserAjanCacheCreate:{args:["ptr"],returns:"ptr"},EserAjanCacheGetDir:{args:["ptr"],returns:"ptr"},EserAjanCacheGetVersionedPath:{args:["ptr"],returns:"ptr"},EserAjanCacheList:{args:["ptr"],returns:"ptr"},EserAjanCacheRemove:{args:["ptr"],returns:"ptr"},EserAjanCacheClear:{args:["ptr"],returns:"ptr"},EserAjanCacheClose:{args:["ptr"],returns:"ptr"},EserAjanCsGenerate:{args:["ptr"],returns:"ptr"},EserAjanCsSync:{args:["ptr"],returns:"ptr"},EserAjanKitListRecipes:{args:["ptr"],returns:"ptr"},EserAjanKitApplyRecipe:{args:["ptr"],returns:"ptr"},EserAjanKitCloneRecipe:{args:["ptr"],returns:"ptr"},EserAjanKitNewProject:{args:["ptr"],returns:"ptr"},EserAjanKitUpdateRecipe:{args:["ptr"],returns:"ptr"},EserAjanPostsCreateService:{args:["ptr"],returns:"ptr"},EserAjanPostsCompose:{args:["ptr"],returns:"ptr"},EserAjanPostsGetTimeline:{args:["ptr"],returns:"ptr"},EserAjanPostsSearch:{args:["ptr"],returns:"ptr"},EserAjanPostsClose:{args:["ptr"],returns:"ptr"},EserAjanCodebaseGitCurrentBranch:{args:["ptr"],returns:"ptr"},EserAjanCodebaseGitLatestTag:{args:["ptr"],returns:"ptr"},EserAjanCodebaseGitLog:{args:["ptr"],returns:"ptr"},EserAjanCodebaseValidateCommitMsg:{args:["ptr"],returns:"ptr"},EserAjanCodebaseGenerateChangelog:{args:["ptr"],returns:"ptr"},EserAjanCodebaseBumpVersion:{args:["ptr"],returns:"ptr"},EserAjanCodebaseWalkFiles:{args:["ptr"],returns:"ptr"},EserAjanCodebaseValidateFiles:{args:["ptr"],returns:"ptr"},EserAjanCodebaseCheckCircularDeps:{args:["ptr"],returns:"ptr"},EserAjanCodebaseCheckExportNames:{args:["ptr"],returns:"ptr"},EserAjanCodebaseCheckModExports:{args:["ptr"],returns:"ptr"},EserAjanCodebaseCheckPackageConfigs:{args:["ptr"],returns:"ptr"},EserAjanCodebaseCheckDocs:{args:["ptr"],returns:"ptr"},EserAjanCodebaseWalkFilesStreamCreate:{args:["ptr"],returns:"ptr"},EserAjanCodebaseWalkFilesStreamRead:{args:["ptr"],returns:"ptr"},EserAjanCodebaseWalkFilesStreamClose:{args:["ptr"],returns:"ptr"},EserAjanCodebaseValidateFilesStreamCreate:{args:["ptr"],returns:"ptr"},EserAjanCodebaseValidateFilesStreamRead:{args:["ptr"],returns:"ptr"},EserAjanCodebaseValidateFilesStreamClose:{args:["ptr"],returns:"ptr"},EserAjanCollectorSpecifierToIdentifier:{args:["ptr"],returns:"ptr"},EserAjanCollectorWalkFiles:{args:["ptr"],returns:"ptr"},EserAjanCollectorGenerateManifest:{args:["ptr"],returns:"ptr"},EserAjanParsingTokenize:{args:["ptr"],returns:"ptr"},EserAjanParsingSimpleTokens:{args:[],returns:"ptr"},EserAjanParsingTokenizeStreamCreate:{args:["ptr"],returns:"ptr"},EserAjanParsingTokenizeStreamPush:{args:["ptr"],returns:"ptr"},EserAjanParsingTokenizeStreamClose:{args:["ptr"],returns:"ptr"},EserAjanShellExec:{args:["ptr"],returns:"ptr"},EserAjanShellTuiKeypressCreate:{args:["ptr"],returns:"ptr"},EserAjanShellTuiKeypressRead:{args:["ptr"],returns:"ptr"},EserAjanShellTuiKeypressClose:{args:["ptr"],returns:"ptr"},EserAjanShellTuiSetStdinRaw:{args:["ptr"],returns:"ptr"},EserAjanShellTuiGetSize:{args:["ptr"],returns:"ptr"},EserAjanShellExecSpawn:{args:["ptr"],returns:"ptr"},EserAjanShellExecRead:{args:["ptr"],returns:"ptr"},EserAjanShellExecWrite:{args:["ptr"],returns:"ptr"},EserAjanShellExecClose:{args:["ptr"],returns:"ptr"},EserAjanShellPtySpawn:{args:["ptr"],returns:"ptr"},EserAjanShellPtyRead:{args:["ptr"],returns:"ptr"},EserAjanShellPtyWrite:{args:["ptr"],returns:"ptr"},EserAjanShellPtyResize:{args:["ptr"],returns:"ptr"},EserAjanShellPtyKill:{args:["ptr"],returns:"ptr"},EserAjanShellPtyClose:{args:["ptr"],returns:"ptr"}}),{symbols:t}=s,c=n=>new TextEncoder().encode(n+"\0"),l=n=>{if(n===null||n===0)return"";try{return new e(n).toString()}finally{t.EserAjanFree(n)}};return j("bun",{EserAjanVersion:()=>l(t.EserAjanVersion()),EserAjanInit:()=>t.EserAjanInit(),EserAjanShutdown:()=>{t.EserAjanShutdown()},EserAjanFree:n=>{t.EserAjanFree(n)},EserAjanConfigLoad:n=>l(t.EserAjanConfigLoad(c(n))),EserAjanDIResolve:n=>l(t.EserAjanDIResolve(c(n))),EserAjanAiCreateModel:n=>l(t.EserAjanAiCreateModel(c(n))),EserAjanAiGenerateText:(n,g)=>l(t.EserAjanAiGenerateText(c(n),c(g))),EserAjanAiStreamText:(n,g)=>l(t.EserAjanAiStreamText(c(n),c(g))),EserAjanAiStreamRead:n=>l(t.EserAjanAiStreamRead(c(n))),EserAjanAiCancelRequest:n=>l(t.EserAjanAiCancelRequest(c(n))),EserAjanAiCloseModel:n=>l(t.EserAjanAiCloseModel(c(n))),EserAjanAiFreeStream:n=>l(t.EserAjanAiFreeStream(c(n))),EserAjanAiBatchCreate:n=>l(t.EserAjanAiBatchCreate(c(n))),EserAjanAiBatchGet:n=>l(t.EserAjanAiBatchGet(c(n))),EserAjanAiBatchList:n=>l(t.EserAjanAiBatchList(c(n))),EserAjanAiBatchDownload:n=>l(t.EserAjanAiBatchDownload(c(n))),EserAjanAiBatchCancel:n=>l(t.EserAjanAiBatchCancel(c(n))),EserAjanFormatEncode:n=>l(t.EserAjanFormatEncode(c(n))),EserAjanFormatDecode:n=>l(t.EserAjanFormatDecode(c(n))),EserAjanFormatList:()=>l(t.EserAjanFormatList()),EserAjanFormatEncodeDocument:n=>l(t.EserAjanFormatEncodeDocument(c(n))),EserAjanLogCreate:n=>l(t.EserAjanLogCreate(c(n))),EserAjanLogWrite:n=>l(t.EserAjanLogWrite(c(n))),EserAjanLogClose:n=>l(t.EserAjanLogClose(c(n))),EserAjanLogShouldLog:n=>l(t.EserAjanLogShouldLog(c(n))),EserAjanLogConfigure:n=>l(t.EserAjanLogConfigure(c(n))),EserAjanHttpCreate:n=>l(t.EserAjanHttpCreate(c(n))),EserAjanHttpRequest:n=>l(t.EserAjanHttpRequest(c(n))),EserAjanHttpClose:n=>l(t.EserAjanHttpClose(c(n))),EserAjanHttpRequestStream:n=>l(t.EserAjanHttpRequestStream(c(n))),EserAjanHttpStreamRead:n=>l(t.EserAjanHttpStreamRead(c(n))),EserAjanHttpStreamClose:n=>l(t.EserAjanHttpStreamClose(c(n))),EserAjanNoskillsInit:n=>l(t.EserAjanNoskillsInit(c(n))),EserAjanNoskillsSpecNew:n=>l(t.EserAjanNoskillsSpecNew(c(n))),EserAjanNoskillsNext:n=>l(t.EserAjanNoskillsNext(c(n))),EserAjanWorkflowRun:n=>l(t.EserAjanWorkflowRun(c(n))),EserAjanCryptoHash:n=>l(t.EserAjanCryptoHash(c(n))),EserAjanCacheCreate:n=>l(t.EserAjanCacheCreate(c(n))),EserAjanCacheGetDir:n=>l(t.EserAjanCacheGetDir(c(n))),EserAjanCacheGetVersionedPath:n=>l(t.EserAjanCacheGetVersionedPath(c(n))),EserAjanCacheList:n=>l(t.EserAjanCacheList(c(n))),EserAjanCacheRemove:n=>l(t.EserAjanCacheRemove(c(n))),EserAjanCacheClear:n=>l(t.EserAjanCacheClear(c(n))),EserAjanCacheClose:n=>l(t.EserAjanCacheClose(c(n))),EserAjanCsGenerate:n=>l(t.EserAjanCsGenerate(c(n))),EserAjanCsSync:n=>l(t.EserAjanCsSync(c(n))),EserAjanKitListRecipes:n=>l(t.EserAjanKitListRecipes(c(n))),EserAjanKitApplyRecipe:n=>l(t.EserAjanKitApplyRecipe(c(n))),EserAjanKitCloneRecipe:n=>l(t.EserAjanKitCloneRecipe(c(n))),EserAjanKitNewProject:n=>l(t.EserAjanKitNewProject(c(n))),EserAjanKitUpdateRecipe:n=>l(t.EserAjanKitUpdateRecipe(c(n))),EserAjanPostsCreateService:n=>l(t.EserAjanPostsCreateService(c(n))),EserAjanPostsCompose:n=>l(t.EserAjanPostsCompose(c(n))),EserAjanPostsGetTimeline:n=>l(t.EserAjanPostsGetTimeline(c(n))),EserAjanPostsSearch:n=>l(t.EserAjanPostsSearch(c(n))),EserAjanPostsClose:n=>l(t.EserAjanPostsClose(c(n))),EserAjanCodebaseGitCurrentBranch:n=>l(t.EserAjanCodebaseGitCurrentBranch(c(n))),EserAjanCodebaseGitLatestTag:n=>l(t.EserAjanCodebaseGitLatestTag(c(n))),EserAjanCodebaseGitLog:n=>l(t.EserAjanCodebaseGitLog(c(n))),EserAjanCodebaseValidateCommitMsg:n=>l(t.EserAjanCodebaseValidateCommitMsg(c(n))),EserAjanCodebaseGenerateChangelog:n=>l(t.EserAjanCodebaseGenerateChangelog(c(n))),EserAjanCodebaseBumpVersion:n=>l(t.EserAjanCodebaseBumpVersion(c(n))),EserAjanCodebaseWalkFiles:n=>l(t.EserAjanCodebaseWalkFiles(c(n))),EserAjanCodebaseValidateFiles:n=>l(t.EserAjanCodebaseValidateFiles(c(n))),EserAjanCodebaseCheckCircularDeps:n=>l(t.EserAjanCodebaseCheckCircularDeps(c(n))),EserAjanCodebaseCheckExportNames:n=>l(t.EserAjanCodebaseCheckExportNames(c(n))),EserAjanCodebaseCheckModExports:n=>l(t.EserAjanCodebaseCheckModExports(c(n))),EserAjanCodebaseCheckPackageConfigs:n=>l(t.EserAjanCodebaseCheckPackageConfigs(c(n))),EserAjanCodebaseCheckDocs:n=>l(t.EserAjanCodebaseCheckDocs(c(n))),EserAjanCodebaseWalkFilesStreamCreate:n=>l(t.EserAjanCodebaseWalkFilesStreamCreate(c(n))),EserAjanCodebaseWalkFilesStreamRead:n=>l(t.EserAjanCodebaseWalkFilesStreamRead(c(n))),EserAjanCodebaseWalkFilesStreamClose:n=>l(t.EserAjanCodebaseWalkFilesStreamClose(c(n))),EserAjanCodebaseValidateFilesStreamCreate:n=>l(t.EserAjanCodebaseValidateFilesStreamCreate(c(n))),EserAjanCodebaseValidateFilesStreamRead:n=>l(t.EserAjanCodebaseValidateFilesStreamRead(c(n))),EserAjanCodebaseValidateFilesStreamClose:n=>l(t.EserAjanCodebaseValidateFilesStreamClose(c(n))),EserAjanCollectorSpecifierToIdentifier:n=>l(t.EserAjanCollectorSpecifierToIdentifier(c(n))),EserAjanCollectorWalkFiles:n=>l(t.EserAjanCollectorWalkFiles(c(n))),EserAjanCollectorGenerateManifest:n=>l(t.EserAjanCollectorGenerateManifest(c(n))),EserAjanParsingTokenize:n=>l(t.EserAjanParsingTokenize(c(n))),EserAjanParsingSimpleTokens:()=>l(t.EserAjanParsingSimpleTokens()),EserAjanParsingTokenizeStreamCreate:n=>l(t.EserAjanParsingTokenizeStreamCreate(c(n))),EserAjanParsingTokenizeStreamPush:n=>l(t.EserAjanParsingTokenizeStreamPush(c(n))),EserAjanParsingTokenizeStreamClose:n=>l(t.EserAjanParsingTokenizeStreamClose(c(n))),EserAjanShellExec:n=>l(t.EserAjanShellExec(c(n))),EserAjanShellTuiKeypressCreate:n=>l(t.EserAjanShellTuiKeypressCreate(c(n))),EserAjanShellTuiKeypressRead:n=>l(t.EserAjanShellTuiKeypressRead(c(n))),EserAjanShellTuiKeypressClose:n=>l(t.EserAjanShellTuiKeypressClose(c(n))),EserAjanShellTuiSetStdinRaw:n=>l(t.EserAjanShellTuiSetStdinRaw(c(n))),EserAjanShellTuiGetSize:n=>l(t.EserAjanShellTuiGetSize(c(n))),EserAjanShellExecSpawn:n=>l(t.EserAjanShellExecSpawn(c(n))),EserAjanShellExecRead:n=>l(t.EserAjanShellExecRead(c(n))),EserAjanShellExecWrite:n=>l(t.EserAjanShellExecWrite(c(n))),EserAjanShellExecClose:n=>l(t.EserAjanShellExecClose(c(n))),EserAjanShellPtySpawn:n=>l(t.EserAjanShellPtySpawn(c(n))),EserAjanShellPtyRead:n=>Promise.resolve(l(t.EserAjanShellPtyRead(c(n)))),EserAjanShellPtyWrite:n=>l(t.EserAjanShellPtyWrite(c(n))),EserAjanShellPtyResize:n=>l(t.EserAjanShellPtyResize(c(n))),EserAjanShellPtyKill:n=>l(t.EserAjanShellPtyKill(c(n))),EserAjanShellPtyClose:n=>l(t.EserAjanShellPtyClose(c(n)))},()=>{s.close()})}};var O={name:"node",available:()=>{let o=globalThis;return typeof o.process<"u"&&typeof o.process.versions?.node=="string"&&typeof o.Deno>"u"&&typeof o.Bun>"u"},open:async o=>{let r=await import("koffi");if(r.default!==void 0&&(r=r.default),typeof r.load!="function")throw new Error("koffi module loaded but koffi.load is not a function. Check that the installed koffi satisfies the range this package declares for it in package.json.");let e=r.load(o),s=e.func("void EserAjanFree(void* ptr)"),t=a=>{if(a==null)return"";try{return r.decode(a,"char",-1)??""}finally{s(a)}},c=e.func("void* EserAjanVersion()"),l=e.func("int EserAjanInit()"),n=e.func("void EserAjanShutdown()"),g=e.func("void* EserAjanConfigLoad(const char* path)"),E=e.func("void* EserAjanDIResolve(const char* name)"),f=e.func("void* EserAjanAiCreateModel(const char* configJSON)"),m=e.func("void* EserAjanAiGenerateText(const char* modelHandle, const char* optionsJSON)"),k=e.func("void* EserAjanAiStreamText(const char* modelHandle, const char* optionsJSON)"),w=e.func("void* EserAjanAiStreamRead(const char* streamHandle)"),N=e.func("void* EserAjanAiCancelRequest(const char* requestJSON)"),T=e.func("void* EserAjanAiCloseModel(const char* modelHandle)"),h=e.func("void* EserAjanAiFreeStream(const char* streamHandle)"),B=e.func("void* EserAjanAiBatchCreate(const char* requestJSON)"),b=e.func("void* EserAjanAiBatchGet(const char* requestJSON)"),R=e.func("void* EserAjanAiBatchList(const char* requestJSON)"),S=e.func("void* EserAjanAiBatchDownload(const char* requestJSON)"),P=e.func("void* EserAjanAiBatchCancel(const char* requestJSON)"),v=e.func("void* EserAjanFormatEncode(const char* requestJSON)"),L=e.func("void* EserAjanFormatDecode(const char* requestJSON)"),x=e.func("void* EserAjanFormatList()"),A=e.func("void* EserAjanFormatEncodeDocument(const char* requestJSON)"),F=e.func("void* EserAjanLogCreate(const char* configJSON)"),_=e.func("void* EserAjanLogWrite(const char* requestJSON)"),$=e.func("void* EserAjanLogClose(const char* handle)"),Y=e.func("void* EserAjanLogShouldLog(const char* requestJSON)"),Q=e.func("void* EserAjanLogConfigure(const char* requestJSON)"),X=e.func("void* EserAjanHttpCreate(const char* configJSON)"),Z=e.func("void* EserAjanHttpRequest(const char* requestJSON)"),ee=e.func("void* EserAjanHttpClose(const char* handle)"),re=e.func("void* EserAjanHttpRequestStream(const char* requestJSON)"),te=e.func("void* EserAjanHttpStreamRead(const char* handle)"),ne=e.func("void* EserAjanHttpStreamClose(const char* handle)"),se=e.func("void* EserAjanNoskillsInit(const char* requestJSON)"),ae=e.func("void* EserAjanNoskillsSpecNew(const char* requestJSON)"),oe=e.func("void* EserAjanNoskillsNext(const char* requestJSON)"),ie=e.func("void* EserAjanWorkflowRun(const char* requestJSON)"),ce=e.func("void* EserAjanCryptoHash(const char* requestJSON)"),le=e.func("void* EserAjanCacheCreate(const char* requestJSON)"),ue=e.func("void* EserAjanCacheGetDir(const char* handle)"),ge=e.func("void* EserAjanCacheGetVersionedPath(const char* requestJSON)"),Ae=e.func("void* EserAjanCacheList(const char* handle)"),Ee=e.func("void* EserAjanCacheRemove(const char* requestJSON)"),pe=e.func("void* EserAjanCacheClear(const char* handle)"),de=e.func("void* EserAjanCacheClose(const char* handle)"),je=e.func("void* EserAjanCsGenerate(const char* requestJSON)"),Ce=e.func("void* EserAjanCsSync(const char* requestJSON)"),fe=e.func("void* EserAjanKitListRecipes(const char* requestJSON)"),he=e.func("void* EserAjanKitApplyRecipe(const char* requestJSON)"),Se=e.func("void* EserAjanKitCloneRecipe(const char* requestJSON)"),Pe=e.func("void* EserAjanKitNewProject(const char* requestJSON)"),me=e.func("void* EserAjanKitUpdateRecipe(const char* requestJSON)"),ke=e.func("void* EserAjanPostsCreateService(const char* requestJSON)"),we=e.func("void* EserAjanPostsCompose(const char* requestJSON)"),be=e.func("void* EserAjanPostsGetTimeline(const char* requestJSON)"),Re=e.func("void* EserAjanPostsSearch(const char* requestJSON)"),ve=e.func("void* EserAjanPostsClose(const char* requestJSON)"),Fe=e.func("void* EserAjanCodebaseGitCurrentBranch(const char* requestJSON)"),ye=e.func("void* EserAjanCodebaseGitLatestTag(const char* requestJSON)"),De=e.func("void* EserAjanCodebaseGitLog(const char* requestJSON)"),Ne=e.func("void* EserAjanCodebaseValidateCommitMsg(const char* requestJSON)"),Te=e.func("void* EserAjanCodebaseGenerateChangelog(const char* requestJSON)"),Le=e.func("void* EserAjanCodebaseBumpVersion(const char* requestJSON)"),xe=e.func("void* EserAjanCodebaseWalkFiles(const char* requestJSON)"),Ge=e.func("void* EserAjanCodebaseValidateFiles(const char* requestJSON)"),Ue=e.func("void* EserAjanCodebaseCheckCircularDeps(const char* requestJSON)"),qe=e.func("void* EserAjanCodebaseCheckExportNames(const char* requestJSON)"),We=e.func("void* EserAjanCodebaseCheckModExports(const char* requestJSON)"),Be=e.func("void* EserAjanCodebaseCheckPackageConfigs(const char* requestJSON)"),Je=e.func("void* EserAjanCodebaseCheckDocs(const char* requestJSON)"),Ke=e.func("void* EserAjanCodebaseWalkFilesStreamCreate(const char* requestJSON)"),Oe=e.func("void* EserAjanCodebaseWalkFilesStreamRead(const char* handle)"),Ie=e.func("void* EserAjanCodebaseWalkFilesStreamClose(const char* handle)"),Ve=e.func("void* EserAjanCodebaseValidateFilesStreamCreate(const char* requestJSON)"),He=e.func("void* EserAjanCodebaseValidateFilesStreamRead(const char* handle)"),Me=e.func("void* EserAjanCodebaseValidateFilesStreamClose(const char* handle)"),ze=e.func("void* EserAjanCollectorSpecifierToIdentifier(const char* requestJSON)"),_e=e.func("void* EserAjanCollectorWalkFiles(const char* requestJSON)"),$e=e.func("void* EserAjanCollectorGenerateManifest(const char* requestJSON)"),Ye=e.func("void* EserAjanParsingTokenize(const char* requestJSON)"),Qe=e.func("void* EserAjanParsingSimpleTokens()"),Xe=e.func("void* EserAjanParsingTokenizeStreamCreate(const char* requestJSON)"),Ze=e.func("void* EserAjanParsingTokenizeStreamPush(const char* requestJSON)"),er=e.func("void* EserAjanParsingTokenizeStreamClose(const char* requestJSON)"),rr=e.func("void* EserAjanShellExec(const char* requestJSON)"),tr=e.func("void* EserAjanShellTuiKeypressCreate(const char* requestJSON)"),nr=e.func("void* EserAjanShellTuiKeypressRead(const char* handle)"),sr=e.func("void* EserAjanShellTuiKeypressClose(const char* handle)"),ar=e.func("void* EserAjanShellTuiSetStdinRaw(const char* requestJSON)"),or=e.func("void* EserAjanShellTuiGetSize(const char* requestJSON)"),ir=e.func("void* EserAjanShellExecSpawn(const char* requestJSON)"),cr=e.func("void* EserAjanShellExecRead(const char* handle)"),lr=e.func("void* EserAjanShellExecWrite(const char* requestJSON)"),ur=e.func("void* EserAjanShellExecClose(const char* handle)"),gr=e.func("void* EserAjanShellPtySpawn(const char* requestJSON)"),Ar=e.func("void* EserAjanShellPtyRead(const char* handle)"),Er=e.func("void* EserAjanShellPtyWrite(const char* requestJSON)"),pr=e.func("void* EserAjanShellPtyResize(const char* requestJSON)"),dr=e.func("void* EserAjanShellPtyKill(const char* requestJSON)"),jr=e.func("void* EserAjanShellPtyClose(const char* handle)");return j("node",{EserAjanVersion:()=>t(c()),EserAjanInit:()=>l(),EserAjanShutdown:()=>{n()},EserAjanFree:a=>{a!=null&&s(a)},EserAjanConfigLoad:a=>t(g(a)),EserAjanDIResolve:a=>t(E(a)),EserAjanAiCreateModel:a=>t(f(a)),EserAjanAiGenerateText:(a,G)=>t(m(a,G)),EserAjanAiStreamText:(a,G)=>t(k(a,G)),EserAjanAiStreamRead:a=>t(w(a)),EserAjanAiCancelRequest:a=>t(N(a)),EserAjanAiCloseModel:a=>t(T(a)),EserAjanAiFreeStream:a=>t(h(a)),EserAjanAiBatchCreate:a=>t(B(a)),EserAjanAiBatchGet:a=>t(b(a)),EserAjanAiBatchList:a=>t(R(a)),EserAjanAiBatchDownload:a=>t(S(a)),EserAjanAiBatchCancel:a=>t(P(a)),EserAjanFormatEncode:a=>t(v(a)),EserAjanFormatDecode:a=>t(L(a)),EserAjanFormatList:()=>t(x()),EserAjanFormatEncodeDocument:a=>t(A(a)),EserAjanLogCreate:a=>t(F(a)),EserAjanLogWrite:a=>t(_(a)),EserAjanLogClose:a=>t($(a)),EserAjanLogShouldLog:a=>t(Y(a)),EserAjanLogConfigure:a=>t(Q(a)),EserAjanHttpCreate:a=>t(X(a)),EserAjanHttpRequest:a=>t(Z(a)),EserAjanHttpClose:a=>t(ee(a)),EserAjanHttpRequestStream:a=>t(re(a)),EserAjanHttpStreamRead:a=>t(te(a)),EserAjanHttpStreamClose:a=>t(ne(a)),EserAjanNoskillsInit:a=>t(se(a)),EserAjanNoskillsSpecNew:a=>t(ae(a)),EserAjanNoskillsNext:a=>t(oe(a)),EserAjanWorkflowRun:a=>t(ie(a)),EserAjanCryptoHash:a=>t(ce(a)),EserAjanCacheCreate:a=>t(le(a)),EserAjanCacheGetDir:a=>t(ue(a)),EserAjanCacheGetVersionedPath:a=>t(ge(a)),EserAjanCacheList:a=>t(Ae(a)),EserAjanCacheRemove:a=>t(Ee(a)),EserAjanCacheClear:a=>t(pe(a)),EserAjanCacheClose:a=>t(de(a)),EserAjanCsGenerate:a=>t(je(a)),EserAjanCsSync:a=>t(Ce(a)),EserAjanKitListRecipes:a=>t(fe(a)),EserAjanKitApplyRecipe:a=>t(he(a)),EserAjanKitCloneRecipe:a=>t(Se(a)),EserAjanKitNewProject:a=>t(Pe(a)),EserAjanKitUpdateRecipe:a=>t(me(a)),EserAjanPostsCreateService:a=>t(ke(a)),EserAjanPostsCompose:a=>t(we(a)),EserAjanPostsGetTimeline:a=>t(be(a)),EserAjanPostsSearch:a=>t(Re(a)),EserAjanPostsClose:a=>t(ve(a)),EserAjanCodebaseGitCurrentBranch:a=>t(Fe(a)),EserAjanCodebaseGitLatestTag:a=>t(ye(a)),EserAjanCodebaseGitLog:a=>t(De(a)),EserAjanCodebaseValidateCommitMsg:a=>t(Ne(a)),EserAjanCodebaseGenerateChangelog:a=>t(Te(a)),EserAjanCodebaseBumpVersion:a=>t(Le(a)),EserAjanCodebaseWalkFiles:a=>t(xe(a)),EserAjanCodebaseValidateFiles:a=>t(Ge(a)),EserAjanCodebaseCheckCircularDeps:a=>t(Ue(a)),EserAjanCodebaseCheckExportNames:a=>t(qe(a)),EserAjanCodebaseCheckModExports:a=>t(We(a)),EserAjanCodebaseCheckPackageConfigs:a=>t(Be(a)),EserAjanCodebaseCheckDocs:a=>t(Je(a)),EserAjanCodebaseWalkFilesStreamCreate:a=>t(Ke(a)),EserAjanCodebaseWalkFilesStreamRead:a=>t(Oe(a)),EserAjanCodebaseWalkFilesStreamClose:a=>t(Ie(a)),EserAjanCodebaseValidateFilesStreamCreate:a=>t(Ve(a)),EserAjanCodebaseValidateFilesStreamRead:a=>t(He(a)),EserAjanCodebaseValidateFilesStreamClose:a=>t(Me(a)),EserAjanCollectorSpecifierToIdentifier:a=>t(ze(a)),EserAjanCollectorWalkFiles:a=>t(_e(a)),EserAjanCollectorGenerateManifest:a=>t($e(a)),EserAjanParsingTokenize:a=>t(Ye(a)),EserAjanParsingSimpleTokens:()=>t(Qe()),EserAjanParsingTokenizeStreamCreate:a=>t(Xe(a)),EserAjanParsingTokenizeStreamPush:a=>t(Ze(a)),EserAjanParsingTokenizeStreamClose:a=>t(er(a)),EserAjanShellExec:a=>t(rr(a)),EserAjanShellTuiKeypressCreate:a=>t(tr(a)),EserAjanShellTuiKeypressRead:a=>t(nr(a)),EserAjanShellTuiKeypressClose:a=>t(sr(a)),EserAjanShellTuiSetStdinRaw:a=>t(ar(a)),EserAjanShellTuiGetSize:a=>t(or(a)),EserAjanShellExecSpawn:a=>t(ir(a)),EserAjanShellExecRead:a=>t(cr(a)),EserAjanShellExecWrite:a=>t(lr(a)),EserAjanShellExecClose:a=>t(ur(a)),EserAjanShellPtySpawn:a=>t(gr(a)),EserAjanShellPtyRead:a=>Promise.resolve(t(Ar(a))),EserAjanShellPtyWrite:a=>t(Er(a)),EserAjanShellPtyResize:a=>t(pr(a)),EserAjanShellPtyKill:a=>t(dr(a)),EserAjanShellPtyClose:a=>t(jr(a))},()=>{e.unload()})}};var q=()=>{let o=globalThis;if(typeof o.Deno<"u"){let i=o.Deno.build.os;return i==="darwin"?".dylib":i==="windows"?".dll":".so"}if(typeof o.process<"u"&&typeof o.process.platform=="string"){let i=o.process.platform;return i==="darwin"?".dylib":i==="win32"?".dll":".so"}return".so"},mr=()=>{let o=globalThis,i="linux",r="x64";if(typeof o.Deno<"u"){let e=o.Deno.build.os;i=e==="windows"?"win32":e,r=o.Deno.build.arch==="aarch64"?"arm64":"x64"}else typeof o.process<"u"&&(i=o.process.platform,r=o.process.arch==="arm64"?"arm64":"x64");return`${i}-${r}`},p,kr=()=>{if(p!==void 0)return p;let o=globalThis;if(p=null,typeof o.Deno?.statSync=="function")return p=i=>o.Deno.statSync(i),p;try{let i=typeof o.process?.getBuiltinModule=="function"?o.process.getBuiltinModule("node:fs"):void 0;typeof i?.statSync=="function"&&(p=r=>i.statSync(r))}catch{}return p},I=o=>{let i=kr();if(i===null)return!1;try{return i(o),!0}catch{return!1}},V=o=>{let i=[],r=o.replaceAll("\\","/");for(;r.length>0;){r.endsWith("/")||i.push(r);let e=r.lastIndexOf("/");if(e<0)break;r=r.slice(0,e)}return i},wr=o=>o.slice(o.lastIndexOf("/")+1),br=o=>{if(o!==void 0)return o;let i=globalThis;return typeof i.__dirname=="string"?i.__dirname:typeof i.process<"u"&&typeof i.process.cwd=="function"?i.process.cwd():"."},W=o=>{let r=`libeser_ajan${q()}`,e=[],s=new Set,t=A=>s.has(A)?!1:(s.add(A),e.push(A),I(A)),c=Rr("ESER_AJAN_LIB_PATH");if(c!==void 0){if(I(c))return c;e.push(`$ESER_AJAN_LIB_PATH = ${c}`)}let l=br(o),n=`${l}/${r}`;if(t(n))return n;let g=mr(),E={x64:"x86_64",arm64:"aarch64"},f={win32:"windows"},m=g.split("-"),k=m[0]??"linux",w=m[1]??"x64",N=E[w]??w,T=f[k]??k,h=`${N}-${T}`,b=`${`${l}/..`}/dist/${h}/${r}`;if(t(b))return b;let R=`${l}/dist/${h}/${r}`;if(t(R))return R;let S=globalThis,P=typeof S.process<"u"&&typeof S.process.cwd=="function"?S.process.cwd():".";if(P!==l){let A=`${P}/pkg/@eserstack/ajan/dist/${h}/${r}`;if(t(A))return A}let v=`${l}/../../ajan-${g}/${r}`;if(t(v))return v;let L=[...V(l),...V(P)];for(let A of L){if(wr(A)==="node_modules")continue;let F=`${A}/node_modules/@eserstack/ajan-${g}/${r}`;if(t(F))return F}let x=[`/usr/local/lib/${r}`,`/usr/lib/${r}`];for(let A of x)if(t(A))return A;throw new Error(`Could not find eser-ajan shared library (${r}).
2
+ Checked the following locations:
3
+ `+e.map(A=>` - ${A}`).join(`
4
+ `)+`
5
+
6
+ To fix this:
7
+ 1. Install: npm install @eserstack/ajan
8
+ 2. Or set ESER_AJAN_LIB_PATH to the full path of ${r}`)},Rr=o=>{let i=globalThis;if(typeof i.process<"u"&&typeof i.process.env=="object")return i.process.env[o]??void 0};var M=o=>{try{let i=globalThis;if(typeof i.process<"u"&&i.process.env!=null)return i.process.env[o]}catch{}},d=o=>{let i=M(o);return i!==void 0&&i.toLowerCase()==="disabled"},y=o=>{M("ESER_AJAN_DEBUG")!==void 0&&console.error(`[eser-ajan/ffi] ${o}`)},D=o=>o instanceof Error?o.message:String(o),z=import.meta.dirname,Tr=q,Lr=o=>W(o??z),H=[J,K,O],Fr=()=>{let o=globalThis;return typeof o.Deno<"u"&&typeof o.Deno.dlopen=="function"?"deno":typeof o.Bun<"u"?"bun":typeof o.process<"u"&&typeof o.process.versions?.node=="string"&&typeof o.Deno>"u"&&typeof o.Bun>"u"?"node":"unknown"},yr=o=>{let i=o?.backends,r=i===void 0?H:i.flatMap(s=>H.filter(t=>t.name===s));for(let s of r)if(s.available())return s;let e=Fr();throw new Error(`No FFI backend available for runtime "${e}".
9
+ Supported runtimes:
10
+ - Deno 2.7+ (Deno.dlopen)
11
+ - Bun 1.3+ (bun:ffi)
12
+ - Node 25+ (node:ffi, experimental)
13
+
14
+ Current runtime: ${e}`+(i===void 0?"":`
15
+ Restricted to backends: ${i.join(", ")}`))},Dr=async(o,i)=>{let r=typeof o=="string"?o:void 0,e=typeof o=="object"?o:i;if(d("ESER_AJAN"))throw y("ALL disabled \u2014 ESER_AJAN=disabled"),new Error(`Ajan is disabled via ESER_AJAN=disabled environment variable.
16
+ Unset ESER_AJAN to re-enable.`);let s=!d("ESER_AJAN_NATIVE")&&e?.native!==!1,t=!d("ESER_AJAN_WASM")&&e?.wasm!==!1;s||y(d("ESER_AJAN_NATIVE")?"native disabled by ESER_AJAN_NATIVE \u2014 trying WASM fallback":"native not requested by caller \u2014 trying WASM fallback"),t||y(d("ESER_AJAN_WASM")?"WASM fallback disabled by ESER_AJAN_WASM":"WASM fallback not offered by caller (native only)");let c;if(s)try{let n=r??W(z);return await yr(e).open(n)}catch(n){if(c=n,y(`native FFI failed: ${D(n)}`),r!==void 0)throw n}if(t)try{return await(await import("./mod-SFSUQWSB.js")).loadEserAjanWasm()}catch(n){throw new Error(`No native FFI backend available and WASM fallback failed.
17
+ Native error: ${c===void 0?"native FFI not attempted":D(c)}
18
+ WASM error: ${D(n)}
19
+
20
+ To fix this, install the @eserstack/ajan package or build the native library.
21
+ See: https://github.com/eser/stack/tree/main/pkg/@eserstack/ajan`,{cause:c??n})}let l=[];throw s||l.push(d("ESER_AJAN_NATIVE")?"ESER_AJAN_NATIVE=disabled":"native=false in LoadOptions"),t||l.push(d("ESER_AJAN_WASM")?"ESER_AJAN_WASM=disabled":"wasm=false in LoadOptions"),c!==void 0?new Error(`Native FFI failed and no fallback is available.
22
+ Native error: ${D(c)}
23
+ Fallback unavailable: ${l.join(", ")}
24
+
25
+ To fix this, install the @eserstack/ajan package or build the native library.
26
+ See: https://github.com/eser/stack/tree/main/pkg/@eserstack/ajan`,{cause:c}):new Error(`All FFI backends are disabled.
27
+ Reasons: ${l.join(", ")}
28
+
29
+ To fix this, unset the relevant environment variables or adjust LoadOptions.`)},C=new Map,Nr=(o,i)=>JSON.stringify({path:o??null,native:i?.native??null,wasm:i?.wasm??null,backends:i?.backends??null}),xr=async(o,i)=>{let s=Nr(typeof o=="string"?o:void 0,typeof o=="object"?o:i),t=C.get(s);t===void 0&&(t={library:Dr(o,i),refs:0},C.set(s,t),t.library.catch(()=>{C.get(s)===t&&C.delete(s)})),t.refs+=1;let c=await t.library,l=!1;return{symbols:c.symbols,close:()=>{l||(l=!0,C.get(s)!==t)||(t.refs-=1,!(t.refs>0)&&(C.delete(s),c.close()))}}};export{Tr as a,Lr as b,Fr as c,yr as d,xr as e};
@@ -0,0 +1 @@
1
+ import{e as t}from"./chunk-4PF2MT7S.js";var e=null,o=null,n=null,s=r=>r instanceof Error?r:new Error(String(r)),i=()=>(o===null&&(o=t().then(r=>{e=r,n=null}).catch(r=>{n=s(r)})),o),l=()=>e;var u=()=>{if(e!==null)return e;throw n!==null?new Error(`eser-ajan native library unavailable: ${n.message}`,{cause:n}):new Error("eser-ajan native library has not finished loading. Await ensureLib() before calling requireLibSync().")};export{i as a,l as b,u as c};
@@ -1,10 +1,10 @@
1
- import{d as y}from"./chunk-XXBSEOQR.js";import{a as b}from"./chunk-UT6ZCLRA.js";import{i as n}from"./chunk-XNGHRJVK.js";var x="<!-- noskills:start -->",g="<!-- noskills:end -->",Y=(e,t,s="npx eser noskills")=>{let o=[x,"## noskills orchestrator","","State-driven orchestration. Do NOT read `.eser/` files directly \u2014 noskills provides everything via JSON.","","### Protocol","",` ${s} spec <name> next # get instruction`,` ${s} spec <name> next --answer="response" # submit and advance`,` ${s} spec new "description" # create spec (name auto-generated)`,"","Every spec command MUST include `spec <name>`. Use `"+s+" spec list` for available specs.","","### Core rules","","- Call noskills ONCE per interaction. One question, one answer, one submit.","- Call `next` at: conversation start, before file edits, after completing work, at decisions.","- Never batch-submit. Never answer discovery questions yourself.","- Never skip steps or infer decisions. Ask first. Explicit > Clever.","- NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","- NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","- Execute noskills commands IMMEDIATELY \u2014 the output has all context needed.","- Display `roadmap` before content. Display `gate` prominently.","","### Interactive choices","","- Use AskUserQuestion for `interactiveOptions`. Use `commandMap` to resolve selections.","- On recurring patterns or corrections: ask 'Permanent rule?' \u2192 `"+s+' rule add "description"`.'];if((t?.allowGit??!1)||o.push("","### Git","","Read-only: log, diff, status, show, blame. No write commands (commit, push, checkout, etc.)."),o.push("","### Discovery","","Listen first: after spec creation, ask user to share context before mode selection.","Modes: full (default), validate, technical-depth, ship-fast, explore.","Pre-scan codebase before questions. Challenge premises. Propose alternatives.","With --from-plan: extract answers, present for user confirmation.","","### Execution","","- Re-read files before and after editing. Files >500 LOC: read in chunks.","- Run type-check + lint after every edit. Never mark AC passed if type-check fails.","- If search returns few results, re-run narrower \u2014 assume truncation.","- Clean dead code before structural refactors on files >300 LOC.","- Complete the spec \u2014 no mid-execution pauses or checkpoints.","- `meta` block has resume context for session start or after compaction."),e.length>0){o.push("","### Active Rules","");for(let i of e)o.push(`- ${i}`)}return o.push(g),o.join(`
2
- `)},S=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(x),c=a.indexOf(g);l!==-1&&c!==-1?a=a.slice(0,l)+r+a.slice(c+g.length):a=a.trimEnd()+`
1
+ import{a as b}from"./chunk-IFE5SYGK.js";import{f as y}from"./chunk-KRKOWSYW.js";import{i as n}from"./chunk-Y5E7ZCCX.js";var S="<!-- noskills:start -->",g="<!-- noskills:end -->",Y=(e,t,s="npx eser noskills")=>{let o=[S,"## noskills orchestrator","","State-driven orchestration. Do NOT read `.eser/` files directly \u2014 noskills provides everything via JSON.","","### Protocol","",` ${s} spec <name> next # get instruction`,` ${s} spec <name> next --answer="response" # submit and advance`,` ${s} spec new "description" # create spec (name auto-generated)`,"","Every spec command MUST include `spec <name>`. Use `"+s+" spec list` for available specs.","","### Core rules","","- Call noskills ONCE per interaction. One question, one answer, one submit.","- Call `next` at: conversation start, before file edits, after completing work, at decisions.","- Never batch-submit. Never answer discovery questions yourself.","- Never skip steps or infer decisions. Ask first. Explicit > Clever.","- NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","- NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","- Execute noskills commands IMMEDIATELY \u2014 the output has all context needed.","- Display `roadmap` before content. Display `gate` prominently.","","### Interactive choices","","- Use AskUserQuestion for `interactiveOptions`. Use `commandMap` to resolve selections.","- On recurring patterns or corrections: ask 'Permanent rule?' \u2192 `"+s+' rule add "description"`.'];if((t?.allowGit??!1)||o.push("","### Git","","Read-only: log, diff, status, show, blame. No write commands (commit, push, checkout, etc.)."),o.push("","### Spec Creation","","When the user wants a spec:",'1. Ask "What do you want to build?" \u2014 nothing else.',"2. Take their full answer as the description.",`3. Run: ${s} spec new "their answer"`,"Do NOT suggest names. Do NOT analyze before creating. Just ask, take the answer, create.","","### Concern Management","",'When user says "add concerns" or "manage concerns":',`- Run \`${s} concern list\` immediately. Do NOT analyze which concerns are appropriate.`,"- Present list via AskUserQuestion with multiSelect:true, max 4 options per question.",`- Add all selected concerns in ONE command: ${s} concern add open-source well-engineered long-lived`,"","### Discovery","","Listen first: after spec creation, ask user to share context before mode selection.","Modes: full (default), validate, technical-depth, ship-fast, explore.","Pre-scan codebase before questions. Challenge premises. Propose alternatives.","With --from-plan: extract answers, present for user confirmation.","","### Mode Management","","noskills manages Claude Code plan mode transitions automatically.","Follow the `modeDirective` field in each `noskills next` output.","","| Phase | Mode |","|-------|------|","| IDLE | plan mode optional \u2014 no active spec |","| DISCOVERY, DISCOVERY_REFINEMENT, SPEC_PROPOSAL | **plan mode** \u2014 read-only, no file edits |","| EXECUTING | **normal mode** \u2014 full write access for sub-agents |","| BLOCKED | **plan mode** \u2014 analyze the blocker, do not edit |","| COMPLETED | plan mode optional |","","Non-Claude-Code platforms: `modeDirective` is advisory. Hooks enforce file restrictions mechanically.","","### Execution","","- Re-read files before and after editing. Files >500 LOC: read in chunks.","- Run type-check + lint after every edit. Never mark AC passed if type-check fails.","- If search returns few results, re-run narrower \u2014 assume truncation.","- Clean dead code before structural refactors on files >300 LOC.","- Complete the spec \u2014 no mid-execution pauses or checkpoints.","- `meta` block has resume context for session start or after compaction."),e.length>0){o.push("","### Active Rules","");for(let i of e)o.push(`- ${i}`)}return o.push(g),o.join(`
2
+ `)},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(g);l!==-1&&c!==-1?a=a.slice(0,l)+r+a.slice(c+g.length):a=a.trimEnd()+`
3
3
 
4
4
  `+r+`
5
5
  `}catch{a=r+`
6
- `}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)+`
7
- `)};var K=async(e,t)=>{let s=`${e}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0});let o=`---
6
+ `}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}]},{matcher:"AskUserQuestion",hooks:[{type:"command",command:`${e} invoke-hook post-ask-user-question`,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)+`
7
+ `)};var q=async(e,t)=>{let s=`${e}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0});let o=`---
8
8
  name: noskills-executor
9
9
  description: "Executes a single noskills task."
10
10
  tools: Read, Edit, MultiEdit, Write, Bash, Grep, Glob, LS
@@ -30,7 +30,7 @@ When finished, provide a structured JSON summary:
30
30
 
31
31
  Do NOT return raw test output \u2014 summarize it in the verification field.
32
32
  The orchestrator will submit this to \`${t} next --answer\` on your behalf.
33
- `;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`,`---
33
+ `;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`,`---
34
34
  name: noskills-verifier
35
35
  description: "Independently verifies completed task work. Read-only. Never sees the executor's context."
36
36
  tools: Read, Bash, Grep, Glob, LS
@@ -59,52 +59,52 @@ When finished, provide a structured JSON summary:
59
59
  \\\`\\\`\\\`
60
60
 
61
61
  The orchestrator will use this report for the noskills status report.
62
- `)},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 S(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.","NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","","## 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(`
63
- `))};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.`,"NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Just run 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(`
62
+ `)},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.","NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","","## 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(`
63
+ `))};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",E="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.`,"NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Just run 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(`
64
64
  `)},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(`
65
65
  `),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(`
66
66
  `)},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(`
67
67
  `)}),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(`
68
- `)}),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(`
68
+ `)}),N=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(`
69
69
  `);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(`
70
70
  `).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(`
71
71
  `).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(`
72
72
  `)},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(`
73
73
  `)},ge=e=>{let t=[`# Tasks: ${e.title}`,""];return e.tasks?t.push(e.tasks):t.push("(no tasks yet)"),t.push(""),t.join(`
74
- `)},$={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
+ `)},$={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 N(`${s}/${k}`)&&await n.fs.remove(`${s}/${k}`),await N(`${s}/${E}`)&&await n.fs.remove(`${s}/${E}`)},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)+`
75
75
  `)},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)+`
76
76
  `);let i=he();await n.fs.writeTextFile(`${s}/${re}`,JSON.stringify(i,null,2)+`
77
77
  `)},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),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)+`
78
78
  `)}};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.","NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","","## 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(`
79
- `))};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.","NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","","## 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(`
80
- `))};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 xe="AGENTS.md",P="<!-- noskills:start -->",w="<!-- noskills:end -->",Se=(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.`,"NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Just run 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(`
79
+ `))};var I={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.","NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Each step has one next step. Just run it.","","## 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(`
80
+ `))};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.`,"NEVER suggest bypassing or skipping noskills. Discovery is not overhead.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next. After approve \u2192 run next. Just run 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(`
81
81
  `)},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(`
82
82
  `),Ae=e=>{let t=["### Active Rules",""];for(let s of e)t.push(`- ${s}`);return t.push(""),t.join(`
83
- `)},Te=(e,t,s)=>{let o=[P,Se(t,s),Re(t)];return e.length>0&&o.push(Ae(e)),o.push(w),o.join(`
84
- `)},m=async(e,t)=>{let s=`${e.root}/${xe}`,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()+`
83
+ `)},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(`
84
+ `)},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()+`
85
85
 
86
86
  `+o+`
87
87
  `}catch{i=o+`
88
- `}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(`
89
- `),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(`
90
- `),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(`
88
+ `}await n.fs.writeTextFile(s,i)};var Ce=".opencode/plugins",Oe=".opencode/agents",Ee=".opencode/skills",Ne="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(`
89
+ `),De=e=>["---","name: noskills-executor",'description: "Executes a single noskills task. Follows spec behavioral rules and reports structured results."',"tools:"," read: true"," write: true"," glob: true"," grep: true"," shell: true"," delegate: true","---","","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(`
90
+ `),Ie=()=>["---","name: noskills-verifier",`description: "Independently verifies completed task work. Read-only. Never sees the executor's context."`,"tools:"," read: true"," glob: true"," grep: true"," shell: true","---","","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(`
91
91
  `),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(`
92
92
  `);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(`
93
- `)},Pe=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},_={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 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)+`
94
- `)}};var Ue=".codex",je="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(`
93
+ `)},Pe=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},_={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`,De(e.commandPrefix)),await n.fs.writeTextFile(`${s}/noskills-verifier.md`,Ie())},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}`;await n.fs.mkdir(a,{recursive:!0}),await n.fs.writeTextFile(`${a}/${i}.md`,Fe(r))},async syncMcp(e){let t=`${e.root}/${Ne}`,s={};if(await Pe(t))try{let a=await n.fs.readTextFile(t);s=JSON.parse(a)}catch{}let i=[...e.commandPrefix.split(/\s+/),"mcp-serve"],r={...s,mcp:{...s.mcp,noskills:{type:"local",command:i,enabled:!0}}};await n.fs.writeTextFile(t,JSON.stringify(r,null,2)+`
94
+ `)}};var Ue=".codex",We="hooks.json",je=".codex/agents",Le=".codex/config.toml",He=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:"PostToolUse",command:`${e} invoke-hook post-ask-user-question`,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(`
95
95
  `),'"""',""].join(`
96
96
  `),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(`
97
97
  `),'"""',""].join(`
98
98
  `),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]
99
99
  command = "${s}"
100
100
  args = [${o}]
101
- `},Ve=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},U={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}/${Ue}`,o=`${s}/${je}`;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)+`
102
- `)},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?`
101
+ `},Ve=async e=>{try{return await n.fs.stat(e),!0}catch{return!1}},U={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}/${Ue}`,o=`${s}/${We}`;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=He(e.commandPrefix),l={hooks:[...r,...a.hooks]};await n.fs.writeTextFile(o,JSON.stringify(l,null,2)+`
102
+ `)},async syncAgents(e,t){let s=`${e.root}/${je}`;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}/${Le}`;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?`
103
103
 
104
- `:"")+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(`
104
+ `:"")+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(`
105
105
  `),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(`
106
- `),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}},j={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}/${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)+`
106
+ `),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 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)+`
107
107
  `)},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)+`
108
108
  `)}};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(`
109
109
  `)){let l=a.indexOf(":");if(l===-1)continue;let c=a.slice(0,l).trim(),u=a.slice(l+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[c]=d}else r[c]=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),l=a.split(`
110
- `)[0]??a;s.push({text:l,phases:Array.isArray(r.phases)?r.phases:void 0,appliesTo:Array.isArray(r.applies_to)?r.applies_to:void 0})}}catch{}return s};var at=async e=>(await rt(e)).map(s=>s.text),yt=(e,t)=>{let s=[],o=0;for(let i of e)i.phases!==void 0&&i.phases.length>0&&!i.phases.includes(t)||(i.appliesTo!==void 0&&i.appliesTo.length>0?o++:s.push(i.text));return{tier1:s,tier2Count:o}},ct=(e,t)=>{let s=t.startsWith("*.")?t.slice(1):null;return s!==null?e.endsWith(s):e.includes(t.replace(/\*/g,""))},gt=(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?!1:o.appliesTo.some(i=>ct(s,i))).map(o=>o.text),H=[A,C,$,D,F,_,U,j],W={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},kt=e=>{let t=e[0];return t===void 0?W:H.find(o=>o.id===t)?.capabilities.interaction??W},wt=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 l of t){let c=H.find(d=>d.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 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 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{rt as a,at as b,yt as c,gt as d,kt as e,wt as f};
110
+ `)[0]??a;s.push({text:l,phases:Array.isArray(r.phases)?r.phases:void 0,appliesTo:Array.isArray(r.applies_to)?r.applies_to:void 0})}}catch{}return s};var at=async e=>(await rt(e)).map(s=>s.text),yt=(e,t)=>{let s=[],o=0;for(let i of e)i.phases!==void 0&&i.phases.length>0&&!i.phases.includes(t)||(i.appliesTo!==void 0&&i.appliesTo.length>0?o++:s.push(i.text));return{tier1:s,tier2Count:o}},ct=(e,t)=>{let s=t.startsWith("*.")?t.slice(1):null;return s!==null?e.endsWith(s):e.includes(t.replace(/\*/g,""))},gt=(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?!1:o.appliesTo.some(i=>ct(s,i))).map(o=>o.text),L=[A,C,$,I,F,_,U,W],j={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},kt=e=>{let t=e[0];return t===void 0?j:L.find(o=>o.id===t)?.capabilities.interaction??j},wt=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 l of t){let c=L.find(d=>d.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 d=`${e}/${y.specsDir}`;try{for await(let p of n.fs.readDir(d))if(p.isDirectory){let H=`${d}/${p.name}/spec.md`;await c.syncSpecs(u,H)}}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{rt as a,at as b,yt as c,gt as d,kt as e,wt as f};
@@ -0,0 +1,3 @@
1
+ import{c as V}from"./chunk-CML74SNT.js";import{a as A}from"./chunk-JYVB6UAV.js";import{a as L,b as x}from"./chunk-575Y3OEG.js";import{a as W,b as N,f as b}from"./chunk-OAWYVETM.js";var m=class extends Error{statusCode;request;response;body;retryAfter;constructor(e,t){super(e,{cause:t?.cause}),this.name="HttpClientError",this.statusCode=t?.statusCode??null,this.request=t?.request??null,this.response=t?.response??null,this.body=t?.body,this.retryAfter=t?.retryAfter??null}},E=class extends m{code="RESPONSE_ERROR";constructor(e,t){super(e,t),this.name="HttpResponseError"}},v=class extends m{code="TIMEOUT";constructor(e,t){super(e,t),this.name="HttpTimeoutError"}},k=class extends m{code="ABORT_ERROR";constructor(e,t){super(e,t),this.name="HttpAbortError"}},_=class extends m{code="RATE_LIMITED";constructor(e,t){super(e,t),this.name="HttpRateLimitError"}},q=class extends m{code="NETWORK_ERROR";constructor(e,t){super(e,t),this.name="HttpNetworkError"}},te=s=>s===429?_:s>=500&&s<=599||s===408?E:null,U=(s,e)=>{if(s instanceof m)return s;if(s.name==="TimeoutError")return new v(s.message,{cause:s,...e!==void 0&&{statusCode:e.status,response:e}});if(s.name==="AbortError")return new k(s.message,{cause:s});if(e!==void 0){let t=te(e.status),r={statusCode:e.status,response:e,cause:s};return t!==null?new t(s.message,r):new E(s.message,r)}return s.message.includes("Failed to fetch")||s.message.includes("fetch failed")||s.message.includes("ECONNREFUSED")||s.message.includes("ENOTFOUND")?new q(s.message,{cause:s}):new m(s.message,{cause:s})};var X=async(s,e)=>{let t=s;for(let r of e)t=await r.intercept(t);return t},z=async(s,e)=>{let t=s;for(let r of e)t=await r.intercept(t);return t};var O=class extends Error{status;statusText;headers;body;retries;constructor(e){super(e.error),this.name="GoHttpError",this.status=e.status??0,this.statusText=e.statusText??"",this.headers=e.headers??{},this.body=e.body??"",this.retries=e.retries??0}},K=async(s={})=>{await L();let e=x();if(e===null)throw new Error("native library not available for createGoHttpClient");let t=e.symbols.EserAjanHttpCreate(JSON.stringify(s)),r=JSON.parse(t);if(r.error)throw new Error(r.error);let n=r.handle;return{request(o){let a=x();if(a===null)return Promise.reject(new Error("native library unavailable"));let u=a.symbols.EserAjanHttpRequest(JSON.stringify({handle:n,...o})),l=JSON.parse(u);return l.error?Promise.reject(new O({...l,error:l.error})):Promise.resolve(l)},requestStream(o){let a=x();if(a===null)return Promise.reject(new Error("native library unavailable"));let u=a.symbols.EserAjanHttpRequestStream(JSON.stringify({handle:n,...o})),l=JSON.parse(u);if(l.error||!l.handle)return Promise.reject(new O({error:l.error??"failed to open HTTP stream",status:l.status,statusText:l.statusText,headers:l.headers,body:l.body}));let i=l.handle,f=l.status??200,p=l.statusText??"",c=l.headers??{},S=new ReadableStream({pull(y){let M=x();if(M===null){y.error(new Error("native library unavailable"));return}let j=M.symbols.EserAjanHttpStreamRead(i),T=JSON.parse(j);if(T.error){y.error(new Error(T.error));return}if(T.done){y.close();return}if(T.chunk){let g=atob(T.chunk),d=new Uint8Array(g.length);for(let H=0;H<g.length;H++)d[H]=g.charCodeAt(H);y.enqueue(d)}},cancel(){let y=x();y!==null&&y.symbols.EserAjanHttpStreamClose(i)}});return Promise.resolve({body:S,status:f,statusText:p,headers:c})},close(){let o=x();o!==null&&o.symbols.EserAjanHttpClose(JSON.stringify({handle:n}))}}};var ie=3e4,G={maxAttempts:3,initialDelay:1e3,maxDelay:3e4,factor:2,jitter:!0,retryableStatuses:[408,429,500,502,503,504],respectRetryAfter:!0},ae=s=>new Promise(e=>setTimeout(e,s)),I=(s,e)=>{if(e.startsWith("http://")||e.startsWith("https://"))return e;if(s!==void 0&&s!==""){let t=s.replace(/\/$/,""),r=e.startsWith("/")?e:`/${e}`;return`${t}${r}`}return e};var D=s=>{if(s===null)return null;let e=Number(s);if(!Number.isNaN(e)&&e>=0)return Math.round(e*1e3);let t=new Date(s);return Number.isNaN(t.getTime())?null:Math.max(0,t.getTime()-Date.now())},F=s=>{let e=s.get("X-RateLimit-Remaining")??s.get("x-rate-limit-remaining"),t=s.get("X-RateLimit-Limit")??s.get("x-rate-limit-limit"),r=s.get("X-RateLimit-Reset")??s.get("x-rate-limit-reset"),n=s.get("Retry-After");if(e===null&&t===null&&r===null&&n===null)return;let o=D(n);return{...e!==null&&{remaining:Number(e)},...t!==null&&{limit:Number(t)},...r!==null&&{resetAt:Number(r)},...o!==null&&{retryAfterSeconds:o/1e3}}},Y=(s,e)=>{let t=e.initialDelay*Math.pow(e.factor,s);return t=Math.min(t,e.maxDelay),e.jitter&&(t=t*(.5+Math.random()*.5)),Math.round(t)},ue=(s,e)=>s===!1||e===!1?!1:s===void 0&&e===void 0?G:{...G,...s??{},...e??{}},le=async s=>{try{return await s.clone().json()}catch{return await s.clone().text().catch(()=>{})}},pe=s=>{if(typeof s=="object"&&s!==null){let e=s,t=e.error??e.message??e.detail??e.title;if(t!==void 0)return String(t)}return null},J=class s{config;#e=null;#t=null;constructor(e){this.config=e??{}}withDefaults(e){return new s({...this.config,...e,headers:{...this.config.headers??{},...e.headers??{}}})}async request(e,t,r){return await this.#r(),this.#e!==null?this.#n(e,t,r):this._execute(e,t,r)}get(e,t){return this._execute("GET",e,t)}post(e,t){return this._execute("POST",e,t)}put(e,t){return this._execute("PUT",e,t)}patch(e,t){return this._execute("PATCH",e,t)}delete(e,t){return this._execute("DELETE",e,t)}async requestStream(e,t,r){return await this.#r(),this.#e!==null?this.#o(e,t,r):this._executeStream(e,t,r)}postStream(e,t){return this.requestStream("POST",e,t)}requestResult(e,t,r){return b(this._execute(e,t,r),C)}getResult(e,t){return b(this._execute("GET",e,t),C)}postResult(e,t){return b(this._execute("POST",e,t),C)}putResult(e,t){return b(this._execute("PUT",e,t),C)}patchResult(e,t){return b(this._execute("PATCH",e,t),C)}deleteResult(e,t){return b(this._execute("DELETE",e,t),C)}requestStreamResult(e,t,r){return b(this._executeStream(e,t,r),C)}postStreamResult(e,t){return b(this._executeStream("POST",e,t),C)}async _executeFetch(e,t,r,n){let o=this.config.fetchFn??fetch,a=this.config._delayFn??ae,u=I(this.config.baseUrl,t),l=new URL(u);if(r?.params!==void 0)for(let[g,d]of Object.entries(r.params))l.searchParams.set(g,d);let i={...this.config.headers??{},...r?.headers??{}},f,p=r?.body;p!==void 0&&(typeof p=="string"||p instanceof ArrayBuffer||ArrayBuffer.isView(p)||p instanceof Blob||p instanceof FormData||p instanceof URLSearchParams||p instanceof ReadableStream?f=p:typeof p=="object"&&p!==null&&(f=JSON.stringify(p),i["Content-Type"]===void 0&&(i["Content-Type"]="application/json")));let c=ue(this.config.retry,r?.retry),S=r?.timeout??this.config.timeout??ie,y=c===!1?1:c.maxAttempts??G.maxAttempts,M=this.config.interceptors?.request??[],j=0,T;for(let g=0;g<y;g++){g>0&&j++;let d,H;try{let R=r?.signal,w=AbortSignal.timeout(S),h=R!==void 0?AbortSignal.any([w,R]):w,P=new Request(l.toString(),{method:e,headers:i,body:f,signal:h});H=await X(P,M),d=await o(H)}catch(R){let w=R instanceof Error?R:new Error(String(R)),h=U(w);if(h instanceof v||h instanceof k)throw h;if(T=h,g<y-1){let P=Y(g,c===!1?G:c);await a(P)}continue}let $=F(d.headers);if(!d.ok){let R=await le(d),w=pe(R)??`HTTP ${d.status}`,h=$!==void 0?D(d.headers.get("Retry-After")):null,P=d.status===429?new _(w,{statusCode:d.status,response:d,body:R,...h!==null&&{retryAfter:h/1e3}}):new E(w,{statusCode:d.status,response:d,body:R});if((c!==!1?c.retryableStatuses:[]).includes(d.status)&&g<y-1){if(T=P,d.status===429&&c!==!1&&c.respectRetryAfter&&h!==null){await a(h);continue}let ee=Y(g,c===!1?G:c);await a(ee);continue}throw P}return await n(d,H,j,$)}throw T??new m(`Request failed after ${y} attempt(s)`)}_execute(e,t,r){let n=this.config.interceptors?.response??[];return this._executeFetch(e,t,r,async(o,a,u,l)=>{let i;if(o.status===204||o.status===304||o.headers.get("Content-Length")==="0")i=void 0;else if((o.headers.get("Content-Type")??"").includes("application/json"))i=await o.json();else{let c=await o.text();try{i=JSON.parse(c)}catch{i=c}}let f={data:i,status:o.status,statusText:o.statusText,headers:o.headers,request:a,raw:o,retries:u,...l!==void 0&&{rateLimit:l}};return f=await z(f,n),f})}_executeStream(e,t,r){return this._executeFetch(e,t,r,(n,o,a,u)=>n.body===null?Promise.reject(new q("Response body is null \u2014 server sent no body for a streaming request")):Promise.resolve({body:n.body,status:n.status,statusText:n.statusText,headers:n.headers,request:o,raw:n,retries:a,...u!==void 0&&{rateLimit:u}}))}#s(e){if(e instanceof O){if(e.status>0){let r=e.body;try{r=JSON.parse(e.body)}catch{}let n=D(e.headers["Retry-After"]??e.headers["retry-after"]??null),o={statusCode:e.status,body:r,...n!==null&&{retryAfter:n/1e3}};return e.status===429?new _(`HTTP ${e.status}`,o):new E(`HTTP ${e.status}`,o)}return new q(e.message,{cause:e})}let t=e instanceof Error?e:new Error(String(e));return U(t)}#r(){return this.config.fetchFn!==void 0?Promise.resolve():this.#t!==null?this.#t:(this.#t=K({baseUrl:this.config.baseUrl,timeout:this.config.timeout,headers:this.config.headers}).then(e=>{this.#e=e},()=>{}),this.#t)}async#n(e,t,r){let n=I(this.config.baseUrl,t),o={...this.config.headers??{},...r?.headers??{}},a=r?.body,u;a!==void 0&&(typeof a=="string"?u=a:typeof a=="object"&&a!==null&&!(a instanceof ReadableStream)&&(u=JSON.stringify(a),o["Content-Type"]===void 0&&(o["Content-Type"]="application/json")));let l={method:e,url:n,headers:o,...u!==void 0&&{body:u},...r?.timeout!==void 0&&{timeout:r.timeout}},i;try{i=await this.#e.request(l)}catch(y){throw this.#s(y)}let f=i.headers["content-type"]??i.headers["Content-Type"]??"",p;if(f.includes("application/json"))p=JSON.parse(i.body);else try{p=JSON.parse(i.body)}catch{p=i.body}let c=new Response(i.body,{status:i.status,statusText:i.statusText,headers:i.headers}),S=F(c.headers);return{data:p,status:i.status,statusText:i.statusText,headers:c.headers,request:new Request(n,{method:e,headers:o}),raw:c,retries:i.retries,...S!==void 0&&{rateLimit:S}}}async#o(e,t,r){let n=I(this.config.baseUrl,t),o={...this.config.headers??{},...r?.headers??{}},a=r?.body,u;a!==void 0&&(typeof a=="string"?u=a:typeof a=="object"&&a!==null&&!(a instanceof ReadableStream)&&(u=JSON.stringify(a),o["Content-Type"]===void 0&&(o["Content-Type"]="application/json")));let l={method:e,url:n,headers:o,...u!==void 0&&{body:u},...r?.timeout!==void 0&&{timeout:r.timeout}},i;try{i=await this.#e.requestStream(l)}catch(c){throw this.#s(c)}let f=new Headers(i.headers),p=F(f);return{body:i.body,status:i.status,statusText:i.statusText,headers:f,request:new Request(n,{method:e,headers:o}),raw:new Response(i.body,{status:i.status,statusText:i.statusText,headers:i.headers}),retries:0,...p!==void 0&&{rateLimit:p}}}close(){this.#e?.close(),this.#e=null,this.#t=null}},Q=s=>new J(s),C=s=>{if(s instanceof m)return s;let e=s instanceof Error?s:new Error(String(s));return new m(e.message,{cause:e})};var de="http://localhost:11434",B=class{capabilities=["text_generation","streaming","vision"];provider="ollama";modelId;_baseUrl;_client;config;constructor(e,t){this._baseUrl=e,this._client=Q({baseUrl:e,retry:!1}),this.config=t,this.modelId=t.model}async generateText(e,t){let r=Z(this.config,e,!1);try{let n=await this._client.post("/api/chat",{body:r,signal:t});return W(fe(n.data,this.modelId))}catch(n){if(n instanceof A)return N(n);let o=n instanceof m?n.statusCode??void 0:void 0;return N(new A(n instanceof Error?n.message:String(n),{provider:"ollama",statusCode:o,cause:n instanceof Error?n:void 0}))}}async*streamText(e,t){let r=Z(this.config,e,!0);try{let n=await this._client.postStream("/api/chat",{body:r,signal:t});for await(let o of V(n.body)){let a=ye(o);a!==null&&(yield a)}}catch(n){if(n instanceof A)yield{kind:"error",error:n};else{let o=n instanceof m?n.statusCode??void 0:void 0;yield{kind:"error",error:new A(n instanceof Error?n.message:String(n),{provider:"ollama",statusCode:o,cause:n instanceof Error?n:void 0})}}}}close(){return Promise.resolve()}getRawClient(){return null}},_e={provider:"ollama",createModel(s){let e=s.properties?.baseUrl??de;return Promise.resolve(new B(e,s))}},Z=(s,e,t)=>{let r=me(e.messages,e.system),n={model:s.model,messages:r,stream:t},o={};return e.temperature!==void 0&&(o.temperature=e.temperature),e.maxTokens!==void 0&&(o.num_predict=e.maxTokens),e.topP!==void 0&&(o.top_p=e.topP),e.stopWords!==void 0&&(o.stop=e.stopWords),Object.keys(o).length>0&&(n.options=o),e.responseFormat!==void 0&&(e.responseFormat.type==="json_schema"?n.format=e.responseFormat.jsonSchema:e.responseFormat.type==="json_object"&&(n.format="json")),n},me=(s,e)=>{let t=[];e!==void 0&&t.push({role:"system",content:e});for(let r of s){if(r.role==="system"){let u=[];for(let l of r.content)l.kind==="text"&&u.push(l.text);t.push({role:"system",content:u.join(`
2
+ `)});continue}let n=[],o=[];for(let u of r.content)u.kind==="text"?n.push(u.text):u.kind==="image"&&u.image.url!==void 0&&o.push(u.image.url);let a={role:r.role==="tool"?"user":r.role,content:n.join(`
3
+ `)};o.length>0&&(a.images=o),t.push(a)}return t},fe=(s,e)=>{let t=[];return s.message?.content!==void 0&&t.push({kind:"text",text:s.message.content}),{content:t,stopReason:s.done_reason==="length"?"max_tokens":"end_turn",usage:{inputTokens:s.prompt_eval_count??0,outputTokens:s.eval_count??0,totalTokens:(s.prompt_eval_count??0)+(s.eval_count??0)},modelId:e,rawResponse:s}},ye=s=>{if(s===null||typeof s!="object")return null;let e=s;return e.done===!0?{kind:"message_done",stopReason:e.done_reason==="length"?"max_tokens":"end_turn",usage:{inputTokens:e.prompt_eval_count??0,outputTokens:e.eval_count??0,totalTokens:(e.prompt_eval_count??0)+(e.eval_count??0)}}:e.message?.content!==void 0&&e.message.content.length>0?{kind:"content_delta",textDelta:e.message.content}:e.response!==void 0&&e.response.length>0?{kind:"content_delta",textDelta:e.response}:null};export{B as a,_e as b};
@@ -1,2 +1,2 @@
1
- import{i as r}from"./chunk-XNGHRJVK.js";var o=()=>{let e=r.env.get("XDG_CONFIG_HOME");return e!==void 0&&e.length>0?`${e}/eser/noskills`:`${r.env.get("HOME")??r.env.get("USERPROFILE")??"~"}/.config/eser/noskills`},i=()=>`${o()}/user.json`,a=async e=>{let t=i();try{let n=await r.fs.readTextFile(t),s=JSON.parse(n);return typeof s.name!="string"||s.name.length===0?null:{name:s.name,email:s.email??""}}catch{return null}},u=async e=>{let t=o();await r.fs.mkdir(t,{recursive:!0}),await r.fs.writeTextFile(i(),JSON.stringify({name:e.name,email:e.email},null,2)+`
1
+ import{i as r}from"./chunk-Y5E7ZCCX.js";var o=()=>{let e=r.env.get("XDG_CONFIG_HOME");return e!==void 0&&e.length>0?`${e}/eser/noskills`:`${r.env.get("HOME")??r.env.get("USERPROFILE")??"~"}/.config/eser/noskills`},i=()=>`${o()}/user.json`,a=async e=>{let t=i();try{let n=await r.fs.readTextFile(t),s=JSON.parse(n);return typeof s.name!="string"||s.name.length===0?null:{name:s.name,email:s.email??""}}catch{return null}},u=async e=>{let t=o();await r.fs.mkdir(t,{recursive:!0}),await r.fs.writeTextFile(i(),JSON.stringify({name:e.name,email:e.email},null,2)+`
2
2
  `)},g=async()=>{try{return await r.fs.remove(i()),!0}catch{return!1}},l=async()=>{try{let e=(await r.exec.exec("git",["config","user.name"])).trim(),t=(await r.exec.exec("git",["config","user.email"])).trim();return e.length===0?null:{name:e,email:t}}catch{return null}},f=e=>e.email.length>0?`${e.name} <${e.email}>`:e.name,U=e=>e.name,c=()=>({name:"Unknown User",email:""}),x=async e=>{let t=await a();if(t!==null)return t;let n=await l();return n!==null?n:c()};export{i as a,a as b,u as c,g as d,l as e,f,U as g,x as h};
@@ -0,0 +1,3 @@
1
+ import{b as w}from"./chunk-EROZRDGT.js";import{f as g}from"./chunk-KRKOWSYW.js";import{i as f}from"./chunk-Y5E7ZCCX.js";var C=c=>{let t=c.split(/\n/).flatMap(i=>i.trim().length>0?[i.trim()]:[]);return t.length>1?t:c.split(/\.(?=\s+[A-Z])|;\s+/).map(i=>i.trim()).filter(i=>i.length>5)},T=(c,t=[])=>{let i=[],u=c.find(r=>r.questionId==="ambition");if(u!==void 0){let r=u.answer,a=r.match(/10[- ]?star[:\s]+(.+?)(?:\n|$)/is),l=r.match(/5[- ]?star[:\s]+(.+?)(?:\n|$)/is),n=(a!==null?a[1].trim():l!==null?l[1].trim():r.replace(/1[- ]?star[:\s]+[^.]*\.\s*/i,"").trim()).replace(/^(the|a|an|with|plus|also)\s+/i,"").replace(/^(the\s+)?(target|goal|objective)[:\s]+/i,"").trim();n.length>0&&(n=n.charAt(0).toUpperCase()+n.slice(1)),n=n.replace(/[.\u2026]+$/,"").trim(),n.length>140&&(n=n.slice(0,137)+"..."),n.length>3&&i.push(n)}let o=c.find(r=>r.questionId==="verification");if(o!==void 0){let r=o.answer.split(/\n/).map(a=>a.replace(/^\s*[-\u2022*]\s*/,"").trim()).filter(a=>a.length>0);for(let a of r)i.push(a)}for(let r of t){let a=r.choice.toLowerCase();if(a.includes("accepted")||a.includes("add to scope")){let l=r.question.replace(/^should\s+(we|i)\s+/i,"").replace(/\?+$/,"").trim(),e=l.charAt(0).toUpperCase()+l.slice(1);i.push(e)}}return i.length===0&&i.push("_Tasks need to be defined before execution. Add tasks manually or run discovery with more detail._"),i.push("Write or update tests for all new and changed behavior"),i.push("Update documentation for all public-facing changes (README, API docs, CHANGELOG)"),i},D=(c,t)=>typeof t=="string"?{id:`${c}-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,title:t,placeholder:"_To be addressed during execution._",condition:null}:t,x=(c,t)=>{if(c.condition===null)return!0;if(t===null)return!1;let u={involvesWebUI:o=>o.involvesWebUI,involvesCLI:o=>o.involvesCLI,involvesPublicAPI:o=>o.involvesPublicAPI,involvesMigration:o=>o.involvesMigration,involvesDataHandling:o=>o.involvesDataHandling}[c.condition];return u!==void 0?u(t):!0},A=(c,t,i,u,o,r,a,l)=>{let e=[];e.push(`# Spec: ${c}`),e.push(""),e.push("## Status: draft"),e.push(""),i.length>0&&(e.push(`## Concerns: ${i.map(s=>s.id).join(", ")}`),e.push("")),e.push("## Discovery Answers"),e.push("");for(let s of t){if(e.push(`### ${s.questionId}`),e.push(""),e.push(s.answer),"user"in s&&s.user!=="Unknown User"){let p=s;e.push(""),e.push(`_-- ${p.user}_`)}e.push("")}for(let s of i)if(s.specSections.length>0)for(let p of s.specSections){let h=D(s.id,p);x(h,o??null)&&(e.push(`## ${h.title} (${s.id})`),e.push(""),e.push(h.placeholder),e.push(""))}for(let s of i){let p=s.registries??[];if(p.length===0)continue;let h=s.reviewDimensions??[];for(let d of p){let m=h.find(_=>_.id===d);m!==void 0&&(e.push(`## ${m.label} (${s.id})`),e.push(""),e.push(`_${m.prompt}_`),e.push(""),d==="error-rescue"?(e.push("| Codepath | What Can Go Wrong | Exception Class | Rescued? | Recovery Action | User Sees |"),e.push("|----------|-------------------|-----------------|----------|----------------|-----------|"),e.push("| _To be filled during execution._ | | | | | |")):d==="failure-modes"?(e.push("| Codepath | Failure Mode | Rescued? | Tested? | User Sees | Logged? |"),e.push("|----------|--------------|----------|---------|-----------|---------|"),e.push("| _To be filled during execution._ | | | | | |")):d==="test-plan"?(e.push("| Behavior | Test Layer | Happy Path | Failure Path | Edge Case |"),e.push("|----------|------------|------------|--------------|-----------|"),e.push("| _To be filled during execution._ | | | | |")):e.push("_To be filled during execution._"),e.push(""))}}if(u.length>0){e.push("## Decisions"),e.push(""),e.push("| # | Decision | Choice | Promoted |"),e.push("|---|----------|--------|----------|");for(let s=0;s<u.length;s++){let p=u[s];e.push(`| ${s+1} | ${p.question} | ${p.choice} | ${p.promoted?"yes":"no"} |`)}e.push("")}let n=t.find(s=>s.questionId==="scope_boundary");if(n!==void 0){e.push("## Out of Scope"),e.push("");let s=C(n.answer);for(let p of s)e.push(`- ${p}`);e.push("")}let v=T(t,u);e.push("## Tasks"),e.push("");for(let s=0;s<v.length;s++)e.push(`- [ ] task-${s+1}: ${v[s]}`);e.push("");let $=t.find(s=>s.questionId==="verification");if(e.push("## Verification"),e.push(""),$!==void 0){let s=C($.answer);for(let p of s)e.push(`- ${p}`)}else e.push("_To be defined._");e.push("");let y=r??[];if(y.length>0){e.push("## Custom Acceptance Criteria"),e.push("");for(let s of y)e.push(`- ${s.text} _-- ${s.user}, ${s.addedInPhase}_`);e.push("")}let S=(a??[]).filter(s=>!s.text.startsWith("[TASK] "));if(S.length>0){e.push("## Notes"),e.push("");for(let s of S)e.push(`- ${s.text} _-- ${s.user}, ${s.phase}_`);e.push("")}let b=l??[];if(b.length>0){e.push("## Transition History"),e.push(""),e.push("| From | To | User | Timestamp | Reason |"),e.push("|------|----|------|-----------|--------|");for(let s of b)e.push(`| ${s.from} | ${s.to} | ${s.user} | ${s.timestamp} | ${s.reason??"-"} |`);e.push("")}return e.join(`
2
+ `)};var U=async(c,t,i)=>{if(t.spec===null)throw new Error("No active spec");let u=`${c}/${g.specDir(t.spec)}`,o=`${c}/${g.specFile(t.spec)}`;await f.fs.mkdir(u,{recursive:!0});let r=A(t.spec,t.discovery.answers,i,t.decisions,t.classification,t.customACs,t.specNotes,t.transitionHistory);await f.fs.writeTextFile(o,r);let a=w(t.spec,r),l=`${u}/progress.json`,e={spec:t.spec,status:"draft",tasks:a.tasks.map(n=>({id:n.id,title:n.title,status:"pending"})),decisions:t.decisions.map(n=>({question:n.question,choice:n.choice,promoted:n.promoted})),debt:[],updatedAt:new Date().toISOString()};return await f.fs.writeTextFile(l,JSON.stringify(e,null,2)+`
3
+ `),o};export{U as a};
@@ -0,0 +1 @@
1
+ import{h as _,i as b}from"./chunk-EJYSOUEA.js";import{a as k,k as w}from"./chunk-JYVB6UAV.js";import{a as h,b as f}from"./chunk-OAWYVETM.js";var y=class{capabilities=["text_generation","streaming","tool_calling","vision","batch_processing"];provider="anthropic";modelId;client;config;constructor(t,n){this.client=t,this.config=n,this.modelId=n.model}async generateText(t,n){let o=p(this.config,t);try{let s=await this.client.messages.create(o,{signal:n,timeout:this.config.requestTimeoutMs});return h(x(s,this.modelId))}catch(s){return f(i(s))}}async*streamText(t,n){let o=p(this.config,t);try{let s=await this.client.messages.create({...o,stream:!0},{signal:n,timeout:this.config.requestTimeoutMs}),r=null,l=null,c="",d=0,u=0;for await(let a of s)if(a.type==="message_start")d=a.message?.usage?.input_tokens??0;else if(a.type==="content_block_start")a.content_block?.type==="tool_use"&&(r=a.content_block.id??null,l=a.content_block.name??null,c="");else if(a.type==="content_block_delta")a.delta?.type==="text_delta"?yield{kind:"content_delta",textDelta:a.delta.text}:a.delta?.type==="input_json_delta"&&(c+=a.delta.partial_json??"",yield{kind:"tool_call_delta",textDelta:a.delta.partial_json});else if(a.type==="content_block_stop"){if(r!==null&&l!==null){let m={};try{m=JSON.parse(c||"{}")}catch{}yield{kind:"tool_call_delta",toolCall:{id:r,name:l,arguments:m}},r=null,l=null,c=""}}else a.type==="message_delta"&&(u=a.usage?.output_tokens??u,yield{kind:"message_done",stopReason:C(a.delta?.stop_reason),usage:{inputTokens:d,outputTokens:u,totalTokens:d+u}})}catch(s){yield{kind:"error",error:i(s)}}}async submitBatch(t,n){let o=t.items.map(s=>({custom_id:s.customId,params:p(this.config,s.options)}));try{let s=await this.client.beta.messages.batches.create({requests:o},{signal:n});return g(s)}catch(s){throw i(s)}}async getBatchJob(t,n){try{let o=await this.client.beta.messages.batches.retrieve(t,{signal:n});return g(o)}catch(o){throw i(o)}}async listBatchJobs(t,n){try{let o=await this.client.beta.messages.batches.list({limit:t?.limit,after_id:t?.after},{signal:n}),s=[];for(let r of o.data??[])s.push(g(r));return s}catch(o){throw i(o)}}async downloadBatchResults(t,n){try{let o=await this.client.beta.messages.batches.results(t.id,{signal:n}),s=[];for await(let r of o)r.result?.type==="succeeded"?s.push({customId:r.custom_id,result:x(r.result.message,this.modelId)}):s.push({customId:r.custom_id,error:r.result?.error?.message??"Unknown error"});return s}catch(o){throw i(o)}}async cancelBatchJob(t,n){try{await this.client.beta.messages.batches.cancel(t,{signal:n})}catch(o){throw i(o)}}async close(){}getRawClient(){return this.client}},J={provider:"anthropic",async createModel(e){let{default:t}=await import("./sdk-FR7Z4YSC.js"),n={};e.apiKey!==void 0&&(n.apiKey=e.apiKey),e.baseUrl!==void 0&&(n.baseURL=e.baseUrl);let o=new t(n);return new y(o,e)}},p=(e,t)=>{let n={model:e.model,max_tokens:t.maxTokens??e.maxTokens,messages:B(t.messages)};return t.system!==void 0&&(n.system=t.system),t.temperature!==void 0&&(n.temperature=t.temperature),t.topP!==void 0&&(n.top_p=t.topP),t.stopWords!==void 0&&(n.stop_sequences=t.stopWords),t.tools!==void 0&&(n.tools=t.tools.map(o=>({name:o.name,description:o.description,input_schema:o.parameters??{type:"object",properties:{}}}))),t.toolChoice!==void 0&&(n.tool_choice={type:t.toolChoice}),t.thinkingBudget!==void 0&&(n.thinking={type:"enabled",budget_tokens:t.thinkingBudget}),n},B=e=>{let t=[];for(let n of e){if(n.role==="system")continue;let o=n.content.map(T);t.push({role:n.role==="tool"?"user":n.role,content:o})}return t},T=e=>{switch(e.kind){case"text":return{type:"text",text:e.text};case"image":{if(e.image.data!==void 0)return{type:"image",source:{type:"base64",media_type:e.image.mimeType??"image/png",data:R(e.image.data)}};if(e.image.url!==void 0){if(_(e.image.url)){let t=b(e.image.url);if(t!==null)return{type:"image",source:{type:"base64",media_type:t.mimeType,data:R(t.data)}}}return{type:"image",source:{type:"url",url:e.image.url}}}return{type:"text",text:"[unsupported image]"}}case"tool_call":return{type:"tool_use",id:e.toolCall.id,name:e.toolCall.name,input:e.toolCall.arguments};case"tool_result":return{type:"tool_result",tool_use_id:e.toolResult.toolCallId,content:e.toolResult.content,is_error:e.toolResult.isError};default:return{type:"text",text:`[unsupported content: ${e.kind}]`}}},x=(e,t)=>{let n=[];for(let o of e.content??[])o.type==="text"?n.push({kind:"text",text:o.text}):o.type==="thinking"?n.push({kind:"text",text:`[thinking] ${o.thinking}`}):o.type==="tool_use"&&n.push({kind:"tool_call",toolCall:{id:o.id,name:o.name,arguments:o.input??{}}});return{content:n,stopReason:C(e.stop_reason),usage:{inputTokens:e.usage?.input_tokens??0,outputTokens:e.usage?.output_tokens??0,totalTokens:(e.usage?.input_tokens??0)+(e.usage?.output_tokens??0)},modelId:t,rawResponse:e}},C=e=>e==="end_turn"?"end_turn":e==="max_tokens"?"max_tokens":e==="tool_use"?"tool_use":e==="stop_sequence"?"stop":"end_turn",g=e=>({id:e.id,status:v(e.processing_status),createdAt:new Date(e.created_at),completedAt:e.ended_at!==void 0?new Date(e.ended_at):void 0,totalCount:e.request_counts?.total??0,doneCount:e.request_counts?.succeeded??0,failedCount:e.request_counts?.errored??0}),v=e=>e==="in_progress"?"processing":e==="ended"?"completed":e==="canceling"||e==="canceled"?"cancelled":"pending",i=e=>{if(e instanceof k)return e;let t=e instanceof Error?e:new Error(String(e)),n=e?.status??e?.statusCode??500;return w("anthropic",n,t)},R=e=>{let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)};export{y as a,J as b};
@@ -1,4 +1,4 @@
1
- import{i as l}from"./chunk-XNGHRJVK.js";var F=s=>{if(s===void 0)return"json";for(let n of s)if(n==="-o"||n.startsWith("--output")){let t=s.indexOf(n);if(n.includes("="))return x(n.split("=")[1]??"json");let i=s[t+1];if(i!==void 0&&!i.startsWith("-"))return x(i)}return"json"},O=s=>{if(s===void 0)return[];let n=[],t=!1;for(let i=0;i<s.length;i++){if(t){t=!1;continue}let o=s[i];if(!o.startsWith("--output=")){if(o==="-o"||o==="--output"){t=!0;continue}n.push(o)}}return n},x=s=>{let n=s.toLowerCase();return n==="md"||n==="markdown"?"markdown":n==="text"||n==="txt"||n==="plain"?"text":"json"},e=(s,n)=>s[n],$=s=>JSON.stringify(s,null,2),w=s=>{let n=s,t=[],i=e(n,"phase");i!==void 0&&(t.push(`# noskills \u2014 ${i}`),t.push(""));let o=e(n,"instruction");o!==void 0&&(t.push("## Instruction"),t.push(""),t.push(o),t.push(""));let a=e(n,"questions");if(a!==void 0&&a.length>0)for(let r of a){if(t.push(`## Question: ${r.id}`),t.push(""),t.push(`> ${r.text}`),r.extras!==void 0&&r.extras.length>0){t.push(""),t.push("Also consider:");for(let m of r.extras)t.push(`- ${m}`)}t.push("")}let h=e(n,"statusReport");if(h!==void 0){t.push("## Acceptance Criteria"),t.push("");for(let r of h.criteria)t.push(`- [ ] ${r}`);t.push("")}let p=e(n,"previousIterationDebt");if(p!==void 0){t.push(`## Debt (from iteration ${p.fromIteration})`),t.push(""),t.push(`> ${p.note}`),t.push("");for(let r of p.items)t.push(`- ${r}`);t.push("")}e(n,"verificationFailed")===!0&&(t.push("## Verification FAILED"),t.push(""),t.push("```"),t.push(String(e(n,"verificationOutput")??"")),t.push("```"),t.push(""));let c=e(n,"behavioral");if(c!==void 0){t.push("## Behavioral"),t.push(""),t.push(`**Tone:** ${c.tone}`),t.push("");for(let r of c.rules)t.push(`- ${r}`);c.urgency!==void 0&&(t.push(""),t.push(`**Urgency:** ${c.urgency}`)),t.push("")}let f=e(n,"meta");f!==void 0&&(t.push("---"),t.push(""),t.push(`*${f.resumeHint}*`),t.push(""));let d=e(n,"transition");if(d!==void 0){t.push("## Next Steps"),t.push("");for(let[r,m]of Object.entries(d))r!=="iteration"&&t.push(`- **${r}:** \`${m}\``);t.push("")}let u=e(n,"summary");u!==void 0&&(t.push("## Summary"),t.push(""),t.push(`- Spec: ${u.spec}`),t.push(`- Iterations: ${u.iterations}`),t.push(`- Decisions: ${u.decisionsCount}`),t.push(""));let g=e(n,"clearContext");return g!==void 0&&(t.push("---"),t.push(""),t.push(`**Action required:** ${g.reason}`),t.push("")),t.join(`
1
+ import{i as l}from"./chunk-Y5E7ZCCX.js";var F=s=>{if(s===void 0)return"json";for(let n of s)if(n==="-o"||n.startsWith("--output")){let t=s.indexOf(n);if(n.includes("="))return x(n.split("=")[1]??"json");let i=s[t+1];if(i!==void 0&&!i.startsWith("-"))return x(i)}return"json"},O=s=>{if(s===void 0)return[];let n=[],t=!1;for(let i=0;i<s.length;i++){if(t){t=!1;continue}let o=s[i];if(!o.startsWith("--output=")){if(o==="-o"||o==="--output"){t=!0;continue}n.push(o)}}return n},x=s=>{let n=s.toLowerCase();return n==="md"||n==="markdown"?"markdown":n==="text"||n==="txt"||n==="plain"?"text":"json"},e=(s,n)=>s[n],$=s=>JSON.stringify(s,null,2),w=s=>{let n=s,t=[],i=e(n,"phase");i!==void 0&&(t.push(`# noskills \u2014 ${i}`),t.push(""));let o=e(n,"instruction");o!==void 0&&(t.push("## Instruction"),t.push(""),t.push(o),t.push(""));let a=e(n,"questions");if(a!==void 0&&a.length>0)for(let r of a){if(t.push(`## Question: ${r.id}`),t.push(""),t.push(`> ${r.text}`),r.extras!==void 0&&r.extras.length>0){t.push(""),t.push("Also consider:");for(let m of r.extras)t.push(`- ${m}`)}t.push("")}let h=e(n,"statusReport");if(h!==void 0){t.push("## Acceptance Criteria"),t.push("");for(let r of h.criteria)t.push(`- [ ] ${r}`);t.push("")}let p=e(n,"previousIterationDebt");if(p!==void 0){t.push(`## Debt (from iteration ${p.fromIteration})`),t.push(""),t.push(`> ${p.note}`),t.push("");for(let r of p.items)t.push(`- ${r}`);t.push("")}e(n,"verificationFailed")===!0&&(t.push("## Verification FAILED"),t.push(""),t.push("```"),t.push(String(e(n,"verificationOutput")??"")),t.push("```"),t.push(""));let c=e(n,"behavioral");if(c!==void 0){t.push("## Behavioral"),t.push(""),t.push(`**Tone:** ${c.tone}`),t.push("");for(let r of c.rules)t.push(`- ${r}`);c.urgency!==void 0&&(t.push(""),t.push(`**Urgency:** ${c.urgency}`)),t.push("")}let f=e(n,"meta");f!==void 0&&(t.push("---"),t.push(""),t.push(`*${f.resumeHint}*`),t.push(""));let d=e(n,"transition");if(d!==void 0){t.push("## Next Steps"),t.push("");for(let[r,m]of Object.entries(d))r!=="iteration"&&t.push(`- **${r}:** \`${m}\``);t.push("")}let u=e(n,"summary");u!==void 0&&(t.push("## Summary"),t.push(""),t.push(`- Spec: ${u.spec}`),t.push(`- Iterations: ${u.iterations}`),t.push(`- Decisions: ${u.decisionsCount}`),t.push(""));let g=e(n,"clearContext");return g!==void 0&&(t.push("---"),t.push(""),t.push(`**Action required:** ${g.reason}`),t.push("")),t.join(`
2
2
  `)},k=s=>{let n=s,t=[],i=e(n,"phase");i!==void 0&&t.push(`[${i}]`);let o=e(n,"instruction");o!==void 0&&t.push(o);let a=e(n,"questions");if(a!==void 0&&a.length>0){for(let u of a)if(t.push(""),t.push(`Question [${u.id}]: ${u.text}`),u.extras!==void 0)for(let g of u.extras)t.push(` - ${g}`)}let h=e(n,"statusReport");if(h!==void 0){t.push(""),t.push("Criteria:");for(let u of h.criteria)t.push(` - ${u}`)}let p=e(n,"previousIterationDebt");if(p!==void 0){t.push(""),t.push(p.note);for(let u of p.items)t.push(` - ${u}`)}e(n,"verificationFailed")===!0&&(t.push(""),t.push(`Verification failed: ${String(e(n,"verificationOutput")??"").slice(0,200)}`));let c=e(n,"meta");c!==void 0&&(t.push(""),t.push(c.resumeHint));let f=e(n,"summary");f!==void 0&&t.push(`Spec: ${f.spec}, Iterations: ${f.iterations}, Decisions: ${f.decisionsCount}`);let d=e(n,"clearContext");return d!==void 0&&(t.push(""),t.push(d.reason)),t.join(`
3
3
  `)},b=(s,n)=>{switch(n){case"markdown":return w(s);case"text":return k(s);default:return $(s)}},v=async(s,n)=>{let t=b(s,n),i=new TextEncoder,o=l.process.stdout.getWriter();await o.write(i.encode(t+`
4
4
  `)),o.releaseLock()};export{F as a,O as b,b as c,v as d};