newcraw 1.0.2 → 1.0.3

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 (220) hide show
  1. package/dist/REPL-CTTH53A7.js +50 -0
  2. package/dist/{acp-J4WDYGRX.js → acp-25PIN25O.js} +69 -40
  3. package/dist/acp-25PIN25O.js.map +7 -0
  4. package/dist/{agentsValidate-UBOER2IN.js → agentsValidate-BXDD54YP.js} +13 -10
  5. package/dist/{agentsValidate-UBOER2IN.js.map → agentsValidate-BXDD54YP.js.map} +1 -1
  6. package/dist/{ask-MGUO3L35.js → ask-EL4XAA5P.js} +62 -52
  7. package/dist/ask-EL4XAA5P.js.map +7 -0
  8. package/dist/{autoUpdater-2GS6LRPK.js → autoUpdater-DKMSJXWW.js} +5 -4
  9. package/dist/{chunk-2C43OXE7.js → chunk-2OVXJBJV.js} +38 -59
  10. package/dist/chunk-2OVXJBJV.js.map +7 -0
  11. package/dist/{chunk-53A4JHFW.js → chunk-3D3C7MRI.js} +23 -4
  12. package/dist/chunk-3D3C7MRI.js.map +7 -0
  13. package/dist/{chunk-VKI7ORIO.js → chunk-3ZQRACCP.js} +37 -18
  14. package/dist/{chunk-VKI7ORIO.js.map → chunk-3ZQRACCP.js.map} +1 -1
  15. package/dist/chunk-4A6CDBDH.js +822 -0
  16. package/dist/chunk-4A6CDBDH.js.map +7 -0
  17. package/dist/{chunk-VQSCECTS.js → chunk-53VETVCP.js} +6 -4
  18. package/dist/{chunk-VQSCECTS.js.map → chunk-53VETVCP.js.map} +1 -1
  19. package/dist/{chunk-WWDVA4NV.js → chunk-6WT3ZRYF.js} +22 -6
  20. package/dist/{chunk-WWDVA4NV.js.map → chunk-6WT3ZRYF.js.map} +1 -1
  21. package/dist/{chunk-RUXIBQ3B.js → chunk-7E2L7EH2.js} +4 -4
  22. package/dist/{chunk-VHS2MZQS.js → chunk-7PWVUHQ2.js} +9 -6
  23. package/dist/{chunk-VHS2MZQS.js.map → chunk-7PWVUHQ2.js.map} +1 -1
  24. package/dist/{chunk-2EFL22PV.js → chunk-ADJ4YEII.js} +7 -3
  25. package/dist/chunk-ADJ4YEII.js.map +7 -0
  26. package/dist/chunk-AKNZJBBU.js +372 -0
  27. package/dist/chunk-AKNZJBBU.js.map +7 -0
  28. package/dist/chunk-ALQSPHXV.js +135 -0
  29. package/dist/chunk-ALQSPHXV.js.map +7 -0
  30. package/dist/{chunk-XS6PU75S.js → chunk-APSIF3YK.js} +1 -1
  31. package/dist/{chunk-IM33F5CM.js → chunk-BMJ5XGFR.js} +1668 -1623
  32. package/dist/chunk-BMJ5XGFR.js.map +7 -0
  33. package/dist/chunk-BQCOSNM3.js +93 -0
  34. package/dist/chunk-BQCOSNM3.js.map +7 -0
  35. package/dist/{chunk-OJIMOLIC.js → chunk-BTCASL4X.js} +3621 -7413
  36. package/dist/chunk-BTCASL4X.js.map +7 -0
  37. package/dist/chunk-CHB5K4GI.js +107 -0
  38. package/dist/chunk-CHB5K4GI.js.map +7 -0
  39. package/dist/{chunk-QH2M65BR.js → chunk-D2FSAFMO.js} +7 -3
  40. package/dist/{chunk-QH2M65BR.js.map → chunk-D2FSAFMO.js.map} +1 -1
  41. package/dist/chunk-D4OZACS2.js +35 -0
  42. package/dist/{chunk-IIFUDVGS.js → chunk-ENLHVQCX.js} +310 -177
  43. package/dist/chunk-ENLHVQCX.js.map +7 -0
  44. package/dist/{chunk-A7X6OCZE.js → chunk-ERKWSZ3K.js} +1 -1
  45. package/dist/{chunk-UYRR6F5S.js → chunk-FSSZHQEJ.js} +9 -3
  46. package/dist/{chunk-UYRR6F5S.js.map → chunk-FSSZHQEJ.js.map} +1 -1
  47. package/dist/chunk-GV73HKJO.js +5473 -0
  48. package/dist/chunk-GV73HKJO.js.map +7 -0
  49. package/dist/{chunk-GZTCXXSS.js → chunk-GZ4BEVMZ.js} +57 -46
  50. package/dist/{chunk-GZTCXXSS.js.map → chunk-GZ4BEVMZ.js.map} +1 -1
  51. package/dist/chunk-HLBLZKZH.js +45 -0
  52. package/dist/chunk-HLBLZKZH.js.map +7 -0
  53. package/dist/chunk-JLVECHVJ.js +36 -0
  54. package/dist/chunk-JLVECHVJ.js.map +7 -0
  55. package/dist/chunk-KNSAVNMD.js +683 -0
  56. package/dist/{chunk-F3COCCAE.js.map → chunk-KNSAVNMD.js.map} +1 -1
  57. package/dist/{chunk-V5U6BHT2.js → chunk-KRN3WHHL.js} +7 -3
  58. package/dist/{chunk-V5U6BHT2.js.map → chunk-KRN3WHHL.js.map} +1 -1
  59. package/dist/{chunk-3LMXSKZ7.js → chunk-NFYAVT54.js} +1 -1
  60. package/dist/chunk-NT7RDVDA.js +33 -0
  61. package/dist/{chunk-KQSHIOZK.js.map → chunk-NT7RDVDA.js.map} +1 -1
  62. package/dist/chunk-NW7WSLD5.js +166 -0
  63. package/dist/{chunk-ZYSVG4X3.js.map → chunk-NW7WSLD5.js.map} +2 -2
  64. package/dist/{chunk-HSJ6HYAO.js → chunk-P52SGBC4.js} +18 -10
  65. package/dist/chunk-P52SGBC4.js.map +7 -0
  66. package/dist/{chunk-XXU2NVOE.js → chunk-PC6QOCGI.js} +30 -6
  67. package/dist/chunk-PC6QOCGI.js.map +7 -0
  68. package/dist/{chunk-N5OHRWG2.js → chunk-QSRXXZO7.js} +4 -2
  69. package/dist/{chunk-N5OHRWG2.js.map → chunk-QSRXXZO7.js.map} +1 -1
  70. package/dist/{chunk-DEF3KFP7.js → chunk-QZFKONA3.js} +4 -2
  71. package/dist/{chunk-DEF3KFP7.js.map → chunk-QZFKONA3.js.map} +1 -1
  72. package/dist/{chunk-JWXQNBBA.js → chunk-RE226X4F.js} +7 -1
  73. package/dist/{chunk-JWXQNBBA.js.map → chunk-RE226X4F.js.map} +1 -1
  74. package/dist/chunk-RF57YWGW.js +88 -0
  75. package/dist/chunk-RF57YWGW.js.map +7 -0
  76. package/dist/chunk-UGBECBIR.js +62 -0
  77. package/dist/chunk-UGBECBIR.js.map +7 -0
  78. package/dist/chunk-UYWZQVH5.js +35 -0
  79. package/dist/chunk-UYWZQVH5.js.map +7 -0
  80. package/dist/{chunk-LOIZNQOU.js → chunk-VHZRJ7RI.js} +9 -3
  81. package/dist/{chunk-LOIZNQOU.js.map → chunk-VHZRJ7RI.js.map} +1 -1
  82. package/dist/{chunk-XMGUQHMF.js → chunk-VSSVN6WG.js} +11 -1
  83. package/dist/chunk-VSSVN6WG.js.map +7 -0
  84. package/dist/{chunk-OZHBEG7U.js → chunk-XV7LPJNT.js} +15 -5
  85. package/dist/{chunk-OZHBEG7U.js.map → chunk-XV7LPJNT.js.map} +1 -1
  86. package/dist/chunk-Y7MDOB3N.js +65 -0
  87. package/dist/chunk-Y7MDOB3N.js.map +7 -0
  88. package/dist/{chunk-BWYKUDJR.js → chunk-ZLAB3Z4G.js} +14 -8
  89. package/dist/{chunk-BWYKUDJR.js.map → chunk-ZLAB3Z4G.js.map} +1 -1
  90. package/dist/{chunk-755HIAI3.js → chunk-ZMO4E7IW.js} +3 -42
  91. package/dist/chunk-ZMO4E7IW.js.map +7 -0
  92. package/dist/{cli-KZGF3FV5.js → cli-Z2BNJWHT.js} +251 -485
  93. package/dist/cli-Z2BNJWHT.js.map +7 -0
  94. package/dist/commands-3Y3OQOXT.js +54 -0
  95. package/dist/{config-GTJWCNPF.js → config-5RS7HDIK.js} +9 -6
  96. package/dist/{context-WF3TTXQU.js → context-XZXRRYKS.js} +8 -7
  97. package/dist/{costTracker-2G3ZI2JF.js → costTracker-VSWW7SRT.js} +3 -2
  98. package/dist/{customCommands-QOWK57EX.js → customCommands-6KDAODFQ.js} +6 -5
  99. package/dist/{env-37BAP7QF.js → env-WIM2DQ4L.js} +10 -7
  100. package/dist/{gateway-IZYO6YFJ.js → gateway-DKHC7H3K.js} +542 -96
  101. package/dist/gateway-DKHC7H3K.js.map +7 -0
  102. package/dist/identity-3KZQQVBG.js +16 -0
  103. package/dist/index.js +8 -6
  104. package/dist/index.js.map +1 -1
  105. package/dist/{kodeAgentSessionId-KTGFX2BE.js → kodeAgentSessionId-4SH24DVH.js} +1 -1
  106. package/dist/{kodeAgentSessionLoad-6F7SJXBC.js → kodeAgentSessionLoad-4S452GGD.js} +6 -5
  107. package/dist/{kodeAgentSessionResume-UEEDRJ3N.js → kodeAgentSessionResume-MSMG4QUR.js} +6 -5
  108. package/dist/{kodeAgentStreamJson-VIXFTYL5.js → kodeAgentStreamJson-4ZKIWKS3.js} +4 -2
  109. package/dist/{kodeAgentStreamJsonSession-XC3IPREZ.js → kodeAgentStreamJsonSession-CYG6MLKP.js} +15 -4
  110. package/dist/kodeAgentStreamJsonSession-CYG6MLKP.js.map +7 -0
  111. package/dist/{kodeAgentStructuredStdio-SI5C7AAD.js → kodeAgentStructuredStdio-5DCUC6V6.js} +3 -3
  112. package/dist/{kodeHooks-V36SHCTC.js → kodeHooks-WX3N6CL6.js} +6 -5
  113. package/dist/{llm-CYUDKJNR.js → llm-V2W4KJIA.js} +239 -57
  114. package/dist/llm-V2W4KJIA.js.map +7 -0
  115. package/dist/{llmLazy-IXVVBRTN.js → llmLazy-I7SO67YA.js} +2 -2
  116. package/dist/{loader-OEJ6C3TN.js → loader-YJGRGJNH.js} +6 -5
  117. package/dist/{mcp-KE3SILMX.js → mcp-WG3RQQCZ.js} +10 -9
  118. package/dist/{mentionProcessor-GAU2WAYB.js → mentionProcessor-PKWDUKTN.js} +14 -7
  119. package/dist/{mentionProcessor-GAU2WAYB.js.map → mentionProcessor-PKWDUKTN.js.map} +1 -1
  120. package/dist/{messages-WCSGGSEU.js → messages-RXHQ6VKL.js} +2 -2
  121. package/dist/{model-4TQIV5J2.js → model-JNWAZGT7.js} +10 -7
  122. package/dist/{openai-KTZV6F7N.js → openai-6NL5UXO7.js} +8 -7
  123. package/dist/{outputStyles-WX5RYQOA.js → outputStyles-BVPXT3MW.js} +6 -5
  124. package/dist/{pluginRuntime-JXMJZ2LC.js → pluginRuntime-XHI3TCRJ.js} +11 -8
  125. package/dist/{pluginRuntime-JXMJZ2LC.js.map → pluginRuntime-XHI3TCRJ.js.map} +1 -1
  126. package/dist/{pluginValidation-JNQZYLUP.js → pluginValidation-WDFL352C.js} +8 -7
  127. package/dist/prompts-C4RUFGX2.js +58 -0
  128. package/dist/query-IA3UKMGR.js +58 -0
  129. package/dist/{responsesStreaming-2AIT6GHG.js → responsesStreaming-JORGEFQC.js} +1 -1
  130. package/dist/{ripgrep-KDPQAMB2.js → ripgrep-BHDXRABJ.js} +5 -4
  131. package/dist/sandbox-QOXESHL4.js +63 -0
  132. package/dist/{skillMarketplace-IXAGP3Q2.js → skillMarketplace-RIAMO2YA.js} +5 -4
  133. package/dist/{state-MSCYLB6Y.js → state-TM2XZQE2.js} +6 -3
  134. package/dist/structuredOutput-KAVFUV2Z.js +9 -0
  135. package/dist/theme-BXUQNXSD.js +15 -0
  136. package/dist/thinking-BCZ4WDT6.js +18 -0
  137. package/dist/{toolPermissionContext-I3IXPVED.js → toolPermissionContext-JCQ5MFUT.js} +1 -1
  138. package/dist/toolPermissionContext-JCQ5MFUT.js.map +7 -0
  139. package/dist/toolPermissionContextState-ILRPUITK.js +24 -0
  140. package/dist/toolPermissionContextState-ILRPUITK.js.map +7 -0
  141. package/dist/{toolPermissionSettings-EUZKGZU2.js → toolPermissionSettings-LNYZ6XFE.js} +9 -8
  142. package/dist/toolPermissionSettings-LNYZ6XFE.js.map +7 -0
  143. package/dist/tools-HIPUGTF5.js +55 -0
  144. package/dist/tools-HIPUGTF5.js.map +7 -0
  145. package/dist/{userInput-LJL4CVOB.js → userInput-I33T2RX2.js} +49 -34
  146. package/dist/{userInput-LJL4CVOB.js.map → userInput-I33T2RX2.js.map} +1 -1
  147. package/dist/{uuid-VA3KVASX.js → uuid-RQH3OZ3W.js} +1 -1
  148. package/dist/uuid-RQH3OZ3W.js.map +7 -0
  149. package/dist/workspace-EP63OB5S.js +21 -0
  150. package/dist/workspace-EP63OB5S.js.map +7 -0
  151. package/package.json +1 -1
  152. package/web/dist/assets/index-XuLVvSQF.js +251 -0
  153. package/web/dist/assets/index-pSid9IlY.css +10 -0
  154. package/web/dist/index.html +2 -2
  155. package/dist/REPL-IAK7ZN2Z.js +0 -42
  156. package/dist/acp-J4WDYGRX.js.map +0 -7
  157. package/dist/ask-MGUO3L35.js.map +0 -7
  158. package/dist/chunk-2C43OXE7.js.map +0 -7
  159. package/dist/chunk-2EFL22PV.js.map +0 -7
  160. package/dist/chunk-53A4JHFW.js.map +0 -7
  161. package/dist/chunk-755HIAI3.js.map +0 -7
  162. package/dist/chunk-AXWJI6N5.js +0 -11
  163. package/dist/chunk-F3COCCAE.js +0 -654
  164. package/dist/chunk-HSJ6HYAO.js.map +0 -7
  165. package/dist/chunk-IIFUDVGS.js.map +0 -7
  166. package/dist/chunk-IM33F5CM.js.map +0 -7
  167. package/dist/chunk-KQSHIOZK.js +0 -24
  168. package/dist/chunk-OJIMOLIC.js.map +0 -7
  169. package/dist/chunk-XMGUQHMF.js.map +0 -7
  170. package/dist/chunk-XXU2NVOE.js.map +0 -7
  171. package/dist/chunk-ZYSVG4X3.js +0 -151
  172. package/dist/cli-KZGF3FV5.js.map +0 -7
  173. package/dist/commands-AVEBLFVS.js +0 -46
  174. package/dist/gateway-IZYO6YFJ.js.map +0 -7
  175. package/dist/kodeAgentStreamJsonSession-XC3IPREZ.js.map +0 -7
  176. package/dist/llm-CYUDKJNR.js.map +0 -7
  177. package/dist/prompts-LE6GK75N.js +0 -48
  178. package/dist/query-GGIP6PWG.js +0 -50
  179. package/dist/theme-GAMFOLBW.js +0 -14
  180. package/dist/tools-3HOUIDM3.js +0 -47
  181. package/web/dist/assets/index-COAJqX1Z.css +0 -1
  182. package/web/dist/assets/index-CzS_4LmC.js +0 -179
  183. /package/dist/{REPL-IAK7ZN2Z.js.map → REPL-CTTH53A7.js.map} +0 -0
  184. /package/dist/{autoUpdater-2GS6LRPK.js.map → autoUpdater-DKMSJXWW.js.map} +0 -0
  185. /package/dist/{chunk-RUXIBQ3B.js.map → chunk-7E2L7EH2.js.map} +0 -0
  186. /package/dist/{chunk-XS6PU75S.js.map → chunk-APSIF3YK.js.map} +0 -0
  187. /package/dist/{chunk-AXWJI6N5.js.map → chunk-D4OZACS2.js.map} +0 -0
  188. /package/dist/{chunk-A7X6OCZE.js.map → chunk-ERKWSZ3K.js.map} +0 -0
  189. /package/dist/{chunk-3LMXSKZ7.js.map → chunk-NFYAVT54.js.map} +0 -0
  190. /package/dist/{commands-AVEBLFVS.js.map → commands-3Y3OQOXT.js.map} +0 -0
  191. /package/dist/{config-GTJWCNPF.js.map → config-5RS7HDIK.js.map} +0 -0
  192. /package/dist/{context-WF3TTXQU.js.map → context-XZXRRYKS.js.map} +0 -0
  193. /package/dist/{costTracker-2G3ZI2JF.js.map → costTracker-VSWW7SRT.js.map} +0 -0
  194. /package/dist/{customCommands-QOWK57EX.js.map → customCommands-6KDAODFQ.js.map} +0 -0
  195. /package/dist/{env-37BAP7QF.js.map → env-WIM2DQ4L.js.map} +0 -0
  196. /package/dist/{kodeAgentSessionId-KTGFX2BE.js.map → identity-3KZQQVBG.js.map} +0 -0
  197. /package/dist/{kodeAgentSessionLoad-6F7SJXBC.js.map → kodeAgentSessionId-4SH24DVH.js.map} +0 -0
  198. /package/dist/{kodeAgentSessionResume-UEEDRJ3N.js.map → kodeAgentSessionLoad-4S452GGD.js.map} +0 -0
  199. /package/dist/{kodeAgentStreamJson-VIXFTYL5.js.map → kodeAgentSessionResume-MSMG4QUR.js.map} +0 -0
  200. /package/dist/{kodeAgentStructuredStdio-SI5C7AAD.js.map → kodeAgentStreamJson-4ZKIWKS3.js.map} +0 -0
  201. /package/dist/{kodeHooks-V36SHCTC.js.map → kodeAgentStructuredStdio-5DCUC6V6.js.map} +0 -0
  202. /package/dist/{llmLazy-IXVVBRTN.js.map → kodeHooks-WX3N6CL6.js.map} +0 -0
  203. /package/dist/{loader-OEJ6C3TN.js.map → llmLazy-I7SO67YA.js.map} +0 -0
  204. /package/dist/{mcp-KE3SILMX.js.map → loader-YJGRGJNH.js.map} +0 -0
  205. /package/dist/{messages-WCSGGSEU.js.map → mcp-WG3RQQCZ.js.map} +0 -0
  206. /package/dist/{model-4TQIV5J2.js.map → messages-RXHQ6VKL.js.map} +0 -0
  207. /package/dist/{openai-KTZV6F7N.js.map → model-JNWAZGT7.js.map} +0 -0
  208. /package/dist/{outputStyles-WX5RYQOA.js.map → openai-6NL5UXO7.js.map} +0 -0
  209. /package/dist/{pluginValidation-JNQZYLUP.js.map → outputStyles-BVPXT3MW.js.map} +0 -0
  210. /package/dist/{prompts-LE6GK75N.js.map → pluginValidation-WDFL352C.js.map} +0 -0
  211. /package/dist/{query-GGIP6PWG.js.map → prompts-C4RUFGX2.js.map} +0 -0
  212. /package/dist/{responsesStreaming-2AIT6GHG.js.map → query-IA3UKMGR.js.map} +0 -0
  213. /package/dist/{ripgrep-KDPQAMB2.js.map → responsesStreaming-JORGEFQC.js.map} +0 -0
  214. /package/dist/{skillMarketplace-IXAGP3Q2.js.map → ripgrep-BHDXRABJ.js.map} +0 -0
  215. /package/dist/{state-MSCYLB6Y.js.map → sandbox-QOXESHL4.js.map} +0 -0
  216. /package/dist/{theme-GAMFOLBW.js.map → skillMarketplace-RIAMO2YA.js.map} +0 -0
  217. /package/dist/{toolPermissionContext-I3IXPVED.js.map → state-TM2XZQE2.js.map} +0 -0
  218. /package/dist/{toolPermissionSettings-EUZKGZU2.js.map → structuredOutput-KAVFUV2Z.js.map} +0 -0
  219. /package/dist/{tools-3HOUIDM3.js.map → theme-BXUQNXSD.js.map} +0 -0
  220. /package/dist/{uuid-VA3KVASX.js.map → thinking-BCZ4WDT6.js.map} +0 -0
@@ -1,19 +1,22 @@
1
1
  #!/usr/bin/env bun
2
2
  import { createRequire as __newcrawCreateRequire } from "node:module";
3
3
  const require = __newcrawCreateRequire(import.meta.url);
4
- import {
5
- KodeAgentStructuredStdio
6
- } from "./chunk-N5OHRWG2.js";
7
- import {
8
- assertMinVersion
9
- } from "./chunk-OZHBEG7U.js";
10
4
  import {
11
5
  ensurePackagedRuntimeEnv,
12
6
  ensureYogaWasmPath
13
7
  } from "./chunk-A44DGORI.js";
14
8
  import {
15
9
  getAllTools
16
- } from "./chunk-VKI7ORIO.js";
10
+ } from "./chunk-3ZQRACCP.js";
11
+ import {
12
+ showSetupScreens
13
+ } from "./chunk-AKNZJBBU.js";
14
+ import {
15
+ KodeAgentStructuredStdio
16
+ } from "./chunk-QSRXXZO7.js";
17
+ import {
18
+ assertMinVersion
19
+ } from "./chunk-XV7LPJNT.js";
17
20
  import {
18
21
  getToolDescription
19
22
  } from "./chunk-T25Z3JMG.js";
@@ -22,18 +25,26 @@ import {
22
25
  } from "./chunk-NQE3GGE3.js";
23
26
  import {
24
27
  Doctor,
25
- Onboarding,
26
28
  ResumeConversation,
27
- Select,
28
29
  addToHistory,
29
- clearTerminal,
30
- grantReadPermissionForOriginalDir,
31
30
  hasPermissionsToUseTool,
32
31
  review_default,
33
- useExitOnCtrlCD,
34
32
  useTerminalSize
35
- } from "./chunk-OJIMOLIC.js";
36
- import "./chunk-XS6PU75S.js";
33
+ } from "./chunk-BTCASL4X.js";
34
+ import {
35
+ Select,
36
+ grantReadPermissionForOriginalDir,
37
+ useExitOnCtrlCD
38
+ } from "./chunk-GV73HKJO.js";
39
+ import "./chunk-53VETVCP.js";
40
+ import "./chunk-NFYAVT54.js";
41
+ import "./chunk-APSIF3YK.js";
42
+ import "./chunk-PC6QOCGI.js";
43
+ import "./chunk-JX5ZQYTQ.js";
44
+ import "./chunk-XJQATPV7.js";
45
+ import "./chunk-D2FSAFMO.js";
46
+ import "./chunk-Y7MDOB3N.js";
47
+ import "./chunk-7E2L7EH2.js";
37
48
  import {
38
49
  addMcpServer,
39
50
  ensureConfigScope,
@@ -48,94 +59,110 @@ import {
48
59
  parseEnvVars,
49
60
  parseMcpHeaders,
50
61
  removeMcpServer
51
- } from "./chunk-WWDVA4NV.js";
52
- import "./chunk-VQSCECTS.js";
53
- import "./chunk-HSJ6HYAO.js";
54
- import "./chunk-3LMXSKZ7.js";
55
- import "./chunk-XXU2NVOE.js";
56
- import "./chunk-JX5ZQYTQ.js";
57
- import "./chunk-XJQATPV7.js";
58
- import "./chunk-V5U6BHT2.js";
59
- import "./chunk-7ZFLZNOW.js";
60
- import {
61
- clearOutputStyleCache
62
- } from "./chunk-VHS2MZQS.js";
63
- import "./chunk-QH2M65BR.js";
64
- import "./chunk-RUXIBQ3B.js";
65
- import "./chunk-JWXQNBBA.js";
66
- import "./chunk-2C43OXE7.js";
67
- import "./chunk-BWYKUDJR.js";
68
- import "./chunk-2EFL22PV.js";
62
+ } from "./chunk-6WT3ZRYF.js";
63
+ import "./chunk-P52SGBC4.js";
64
+ import "./chunk-UGBECBIR.js";
65
+ import "./chunk-ZLAB3Z4G.js";
69
66
  import "./chunk-U7S4MEYP.js";
70
- import "./chunk-UYRR6F5S.js";
67
+ import "./chunk-FSSZHQEJ.js";
71
68
  import "./chunk-TY3CCSAT.js";
72
69
  import {
73
70
  clearAgentCache,
74
71
  setFlagAgentsFromCliJson
75
- } from "./chunk-LOIZNQOU.js";
72
+ } from "./chunk-VHZRJ7RI.js";
73
+ import "./chunk-ERKWSZ3K.js";
74
+ import "./chunk-RE226X4F.js";
75
+ import "./chunk-4A6CDBDH.js";
76
+ import "./chunk-KRN3WHHL.js";
77
+ import "./chunk-7ZFLZNOW.js";
78
+ import {
79
+ clearOutputStyleCache
80
+ } from "./chunk-7PWVUHQ2.js";
76
81
  import {
77
82
  setEnabledSettingSourcesFromCli
78
83
  } from "./chunk-INJSFEKL.js";
84
+ import "./chunk-ADJ4YEII.js";
85
+ import "./chunk-JLVECHVJ.js";
86
+ import "./chunk-2OVXJBJV.js";
79
87
  import "./chunk-2UO3BFZH.js";
80
- import "./chunk-A7X6OCZE.js";
88
+ import "./chunk-CHB5K4GI.js";
81
89
  import {
82
90
  getModelManager,
91
+ init_model,
83
92
  isDefaultSlowAndCapableModel
84
- } from "./chunk-F3COCCAE.js";
93
+ } from "./chunk-KNSAVNMD.js";
85
94
  import {
86
95
  getContext,
87
96
  removeContext,
88
97
  setContext
89
- } from "./chunk-53A4JHFW.js";
98
+ } from "./chunk-3D3C7MRI.js";
90
99
  import {
91
100
  getTheme
92
- } from "./chunk-DEF3KFP7.js";
101
+ } from "./chunk-QZFKONA3.js";
93
102
  import {
94
- checkHasTrustDialogAccepted,
95
103
  deleteConfigForCLI,
96
104
  enableConfigs,
97
105
  getConfigForCLI,
98
106
  getCurrentProjectConfig,
99
107
  getGlobalConfig,
100
108
  getProjectMcpServerDefinitions,
109
+ init_config,
101
110
  listConfigForCLI,
102
111
  saveCurrentProjectConfig,
103
112
  saveGlobalConfig,
104
113
  setConfigForCLI,
105
114
  validateAndRepairAllGPT5Profiles
106
- } from "./chunk-IIFUDVGS.js";
115
+ } from "./chunk-ENLHVQCX.js";
107
116
  import {
108
- ConfigParseError
109
- } from "./chunk-KQSHIOZK.js";
117
+ ConfigParseError,
118
+ init_errors
119
+ } from "./chunk-NT7RDVDA.js";
110
120
  import {
111
121
  debug,
112
- initDebugLogger
113
- } from "./chunk-GZTCXXSS.js";
122
+ initDebugLogger,
123
+ init_debugLogger
124
+ } from "./chunk-GZ4BEVMZ.js";
114
125
  import {
115
126
  BunShell,
116
127
  CACHE_PATHS,
117
- PRODUCT_COMMAND,
118
- PRODUCT_NAME,
119
128
  dateToFilename,
120
129
  formatDate,
121
130
  getCwd,
122
131
  getNextAvailableLogForkNumber,
123
132
  initSentry,
133
+ init_log,
134
+ init_sentry,
135
+ init_shell,
136
+ init_state,
124
137
  loadLogList,
125
138
  logError,
126
139
  parseLogFilename,
127
140
  setCwd,
128
141
  setOriginalCwd
129
- } from "./chunk-IM33F5CM.js";
142
+ } from "./chunk-BMJ5XGFR.js";
143
+ import {
144
+ PRODUCT_COMMAND,
145
+ PRODUCT_NAME,
146
+ init_product
147
+ } from "./chunk-UYWZQVH5.js";
130
148
  import {
131
- MACRO
132
- } from "./chunk-ZYSVG4X3.js";
133
- import "./chunk-755HIAI3.js";
134
- import "./chunk-AXWJI6N5.js";
149
+ MACRO,
150
+ init_macros
151
+ } from "./chunk-NW7WSLD5.js";
152
+ import "./chunk-ZMO4E7IW.js";
153
+ import "./chunk-HLBLZKZH.js";
154
+ import "./chunk-D4OZACS2.js";
155
+
156
+ // src/entrypoints/cli.tsx
157
+ init_sentry();
135
158
 
136
159
  // src/entrypoints/cli/runCli.tsx
160
+ init_product();
137
161
  import { existsSync, readFileSync, writeFileSync as writeFileSync2 } from "node:fs";
138
162
 
163
+ // src/entrypoints/cli/printMode.ts
164
+ init_log();
165
+
139
166
  // src/entrypoints/cli/stdio/canUseTool.ts
140
167
  function createStdioCanUseTool(args) {
141
168
  if (args.normalizedPermissionPromptTool !== "stdio" || !args.structured) {
@@ -290,7 +317,7 @@ function createPrintModeControlRequestHandler(args) {
290
317
 
291
318
  // src/entrypoints/cli/stdio/streamJsonSession.ts
292
319
  async function runPrintModeStreamJsonSession(args) {
293
- const { runKodeAgentStreamJsonSession } = await import("./kodeAgentStreamJsonSession-XC3IPREZ.js");
320
+ const { runKodeAgentStreamJsonSession } = await import("./kodeAgentStreamJsonSession-CYG6MLKP.js");
294
321
  await runKodeAgentStreamJsonSession(args);
295
322
  }
296
323
 
@@ -430,12 +457,10 @@ async function runPrintMode({
430
457
  if (normalizedOutputFormat === "text") {
431
458
  addToHistory(inputPrompt);
432
459
  const { resultText: response } = await ask({
433
- commands,
434
460
  hasPermissionsToUseTool,
435
461
  messageLogName: dateToFilename(/* @__PURE__ */ new Date()),
436
462
  prompt: inputPrompt,
437
463
  cwd: cwd2,
438
- tools: toolsForPrint,
439
464
  safeMode: safe,
440
465
  initialMessages,
441
466
  persistSession: sessionPersistence !== false
@@ -444,19 +469,19 @@ async function runPrintMode({
444
469
  `);
445
470
  process.exit(0);
446
471
  }
447
- const { createUserMessage } = await import("./messages-WCSGGSEU.js");
448
- const { getSystemPrompt } = await import("./prompts-LE6GK75N.js");
449
- const { getContext: getContext2 } = await import("./context-WF3TTXQU.js");
450
- const { getTotalCost } = await import("./costTracker-2G3ZI2JF.js");
451
- const { query } = await import("./query-GGIP6PWG.js");
452
- const { getKodeAgentSessionId } = await import("./kodeAgentSessionId-KTGFX2BE.js");
453
- const { kodeMessageToSdkMessage, makeSdkInitMessage, makeSdkResultMessage } = await import("./kodeAgentStreamJson-VIXFTYL5.js");
454
- const { KodeAgentStructuredStdio: KodeAgentStructuredStdio2 } = await import("./kodeAgentStructuredStdio-SI5C7AAD.js");
472
+ const { createUserMessage } = await import("./messages-RXHQ6VKL.js");
473
+ const { getSystemPrompt } = await import("./prompts-C4RUFGX2.js");
474
+ const { getContext: getContext2 } = await import("./context-XZXRRYKS.js");
475
+ const { getTotalCost } = await import("./costTracker-VSWW7SRT.js");
476
+ const { query } = await import("./query-IA3UKMGR.js");
477
+ const { getKodeAgentSessionId } = await import("./kodeAgentSessionId-4SH24DVH.js");
478
+ const { kodeMessageToSdkMessage, makeSdkInitMessage, makeSdkResultMessage, makeSdkReasoningMessage } = await import("./kodeAgentStreamJson-4ZKIWKS3.js");
479
+ const { KodeAgentStructuredStdio: KodeAgentStructuredStdio2 } = await import("./kodeAgentStructuredStdio-5DCUC6V6.js");
455
480
  const {
456
481
  loadToolPermissionContextFromDisk,
457
482
  persistToolPermissionUpdateToDisk
458
- } = await import("./toolPermissionSettings-EUZKGZU2.js");
459
- const { applyToolPermissionContextUpdates } = await import("./toolPermissionContext-I3IXPVED.js");
483
+ } = await import("./toolPermissionSettings-LNYZ6XFE.js");
484
+ const { applyToolPermissionContextUpdates } = await import("./toolPermissionContext-JCQ5MFUT.js");
460
485
  const sessionIdForSdk = getKodeAgentSessionId();
461
486
  const startedAt = Date.now();
462
487
  const sdkMessages = [];
@@ -581,6 +606,7 @@ async function runPrintMode({
581
606
  const initMsg = makeSdkInitMessage({
582
607
  sessionId: sessionIdForSdk,
583
608
  cwd: cwd2,
609
+ model: typeof model === "string" && model.trim() ? model.trim() : void 0,
584
610
  tools: availableTools,
585
611
  slashCommands
586
612
  });
@@ -693,6 +719,7 @@ async function runPrintMode({
693
719
  }
694
720
  let lastAssistant = null;
695
721
  let queryError = null;
722
+ const reasoningEvents = [];
696
723
  try {
697
724
  for await (const m of query(baseMessages, systemPrompt, ctx, canUseTool, {
698
725
  options: printOptions,
@@ -700,8 +727,18 @@ async function runPrintMode({
700
727
  messageId: void 0,
701
728
  readFileTimestamps: {},
702
729
  setToolJSX: () => {
703
- }
730
+ },
731
+ reasoningEvents
704
732
  })) {
733
+ while (reasoningEvents.length > 0) {
734
+ const event = reasoningEvents.shift();
735
+ const sdkReasoning = makeSdkReasoningMessage(event, sessionIdForSdk);
736
+ if (normalizedOutputFormat === "stream-json") {
737
+ writeSdkLine(sdkReasoning);
738
+ } else {
739
+ sdkMessages.push(sdkReasoning);
740
+ }
741
+ }
705
742
  if (m.type === "assistant") lastAssistant = m;
706
743
  const sdk = kodeMessageToSdkMessage(m, sessionIdForSdk);
707
744
  if (!sdk) continue;
@@ -711,6 +748,15 @@ async function runPrintMode({
711
748
  sdkMessages.push(sdk);
712
749
  }
713
750
  }
751
+ while (reasoningEvents.length > 0) {
752
+ const event = reasoningEvents.shift();
753
+ const sdkReasoning = makeSdkReasoningMessage(event, sessionIdForSdk);
754
+ if (normalizedOutputFormat === "stream-json") {
755
+ writeSdkLine(sdkReasoning);
756
+ } else {
757
+ sdkMessages.push(sdkReasoning);
758
+ }
759
+ }
714
760
  } catch (e) {
715
761
  abortController.abort();
716
762
  queryError = e;
@@ -778,7 +824,11 @@ async function runPrintMode({
778
824
  process.exit(0);
779
825
  }
780
826
 
827
+ // src/entrypoints/cli/setup.ts
828
+ init_config();
829
+
781
830
  // src/utils/session/cleanup.ts
831
+ init_log();
782
832
  import { promises as fs } from "fs";
783
833
  import { join } from "path";
784
834
  var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
@@ -827,6 +877,8 @@ function cleanupOldMessageFilesInBackground() {
827
877
  }
828
878
 
829
879
  // src/entrypoints/cli/setup.ts
880
+ init_state();
881
+ init_debugLogger();
830
882
  async function setup(cwd2, safeMode) {
831
883
  if (cwd2 !== process.cwd()) {
832
884
  setOriginalCwd(cwd2);
@@ -835,9 +887,9 @@ async function setup(cwd2, safeMode) {
835
887
  grantReadPermissionForOriginalDir();
836
888
  let agentLoader;
837
889
  try {
838
- agentLoader = await import("./loader-OEJ6C3TN.js");
890
+ agentLoader = await import("./loader-YJGRGJNH.js");
839
891
  } catch {
840
- agentLoader = await import("./loader-OEJ6C3TN.js");
892
+ agentLoader = await import("./loader-YJGRGJNH.js");
841
893
  }
842
894
  const { startAgentWatcher } = agentLoader;
843
895
  await startAgentWatcher(() => {
@@ -861,332 +913,16 @@ async function setup(cwd2, safeMode) {
861
913
  }
862
914
  }
863
915
 
864
- // src/entrypoints/cli/setupScreens.tsx
865
- import React6 from "react";
866
-
867
- // src/ui/components/TrustDialog.tsx
868
- import React from "react";
869
- import { Box, Text, useInput } from "ink";
870
- import { homedir } from "os";
871
- function TrustDialog({ onDone }) {
872
- const theme = getTheme();
873
- React.useEffect(() => {
874
- }, []);
875
- function onChange(value) {
876
- const config = getCurrentProjectConfig();
877
- switch (value) {
878
- case "yes": {
879
- const isHomeDir = homedir() === getCwd();
880
- if (!isHomeDir) {
881
- saveCurrentProjectConfig({
882
- ...config,
883
- hasTrustDialogAccepted: true
884
- });
885
- }
886
- onDone();
887
- break;
888
- }
889
- case "no": {
890
- process.exit(1);
891
- break;
892
- }
893
- }
894
- }
895
- const exitState = useExitOnCtrlCD(() => process.exit(0));
896
- useInput((_input, key) => {
897
- if (key.escape) {
898
- process.exit(0);
899
- return;
900
- }
901
- });
902
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
903
- Box,
904
- {
905
- flexDirection: "column",
906
- gap: 1,
907
- padding: 1,
908
- borderStyle: "round",
909
- borderColor: theme.warning
910
- },
911
- /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.warning }, "Do you trust the files in this folder?"),
912
- /* @__PURE__ */ React.createElement(Text, { bold: true }, process.cwd()),
913
- /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React.createElement(Text, null, PRODUCT_NAME, " may read files in this folder. Reading untrusted files may lead to ", PRODUCT_NAME, " to behave in an unexpected ways."), /* @__PURE__ */ React.createElement(Text, null, "With your permission ", PRODUCT_NAME, " may execute files in this folder. Executing untrusted code is unsafe.")),
914
- /* @__PURE__ */ React.createElement(
915
- Select,
916
- {
917
- options: [
918
- { label: "Yes, proceed", value: "yes" },
919
- { label: "No, exit", value: "no" }
920
- ],
921
- onChange: (value) => onChange(value)
922
- }
923
- )
924
- ), /* @__PURE__ */ React.createElement(Box, { marginLeft: 3 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, exitState.pending ? /* @__PURE__ */ React.createElement(React.Fragment, null, "Press ", exitState.keyName, " again to exit") : /* @__PURE__ */ React.createElement(React.Fragment, null, "Enter to confirm \xB7 Esc to exit"))));
925
- }
926
-
927
- // src/ui/screens/MCPServerApproval.tsx
928
- import React5 from "react";
929
- import { render } from "ink";
930
-
931
- // src/ui/components/MCPServerMultiselectDialog.tsx
932
- import React3 from "react";
933
- import { Box as Box2, Text as Text3, useInput as useInput2 } from "ink";
934
- import { MultiSelect } from "@inkjs/ui";
935
- import { partition } from "lodash-es";
936
-
937
- // src/ui/components/MCPServerDialogCopy.tsx
938
- import React2 from "react";
939
- import { Text as Text2 } from "ink";
940
- import Link from "ink-link";
941
- function MCPServerDialogCopy() {
942
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Text2, null, "MCP servers provide additional functionality to ", PRODUCT_NAME, ". They may execute code, make network requests, or access system resources via tool calls. All tool calls will require your explicit approval before execution. For more information, see", " ", /* @__PURE__ */ React2.createElement(Link, { url: "https://github.com/YOUR_USERNAME/newcraw/blob/main/docs/mcp.md" }, "MCP documentation")), /* @__PURE__ */ React2.createElement(Text2, { dimColor: true }, "Remember: You can always change these choices later by running `", PRODUCT_COMMAND, " mcp reset-project-choices`"));
943
- }
944
-
945
- // src/ui/components/MCPServerMultiselectDialog.tsx
946
- function MCPServerMultiselectDialog({
947
- serverNames,
948
- onDone
949
- }) {
950
- const theme = getTheme();
951
- function onSubmit(selectedServers) {
952
- const config = getCurrentProjectConfig();
953
- if (!config.approvedMcprcServers) {
954
- config.approvedMcprcServers = [];
955
- }
956
- if (!config.rejectedMcprcServers) {
957
- config.rejectedMcprcServers = [];
958
- }
959
- const [approvedServers, rejectedServers] = partition(
960
- serverNames,
961
- (server) => selectedServers.includes(server)
962
- );
963
- config.approvedMcprcServers.push(...approvedServers);
964
- config.rejectedMcprcServers.push(...rejectedServers);
965
- saveCurrentProjectConfig(config);
966
- onDone();
967
- }
968
- const exitState = useExitOnCtrlCD(() => process.exit());
969
- useInput2((_input, key) => {
970
- if (key.escape) {
971
- const config = getCurrentProjectConfig();
972
- if (!config.rejectedMcprcServers) {
973
- config.rejectedMcprcServers = [];
974
- }
975
- for (const server of serverNames) {
976
- if (!config.rejectedMcprcServers.includes(server)) {
977
- config.rejectedMcprcServers.push(server);
978
- }
979
- }
980
- saveCurrentProjectConfig(config);
981
- onDone();
982
- return;
983
- }
984
- });
985
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
986
- Box2,
987
- {
988
- flexDirection: "column",
989
- gap: 1,
990
- padding: 1,
991
- borderStyle: "round",
992
- borderColor: theme.warning
993
- },
994
- /* @__PURE__ */ React3.createElement(Text3, { bold: true, color: theme.warning }, "New MCP Servers Detected"),
995
- /* @__PURE__ */ React3.createElement(Text3, null, "This project contains an MCP config file (.mcp.json or .mcprc) with", " ", serverNames.length, " MCP servers that require your approval."),
996
- /* @__PURE__ */ React3.createElement(MCPServerDialogCopy, null),
997
- /* @__PURE__ */ React3.createElement(Text3, null, "Please select the servers you want to enable:"),
998
- /* @__PURE__ */ React3.createElement(
999
- MultiSelect,
1000
- {
1001
- options: serverNames.map((server) => ({
1002
- label: server,
1003
- value: server
1004
- })),
1005
- defaultValue: serverNames,
1006
- onSubmit
1007
- }
1008
- )
1009
- ), /* @__PURE__ */ React3.createElement(Box2, { marginLeft: 3 }, /* @__PURE__ */ React3.createElement(Text3, { dimColor: true }, exitState.pending ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, "Press ", exitState.keyName, " again to exit") : /* @__PURE__ */ React3.createElement(React3.Fragment, null, "Space to select \xB7 Enter to confirm \xB7 Esc to reject all"))));
1010
- }
1011
-
1012
- // src/ui/components/MCPServerApprovalDialog.tsx
1013
- import React4 from "react";
1014
- import { Box as Box3, Text as Text4, useInput as useInput3 } from "ink";
1015
- function MCPServerApprovalDialog({
1016
- serverName,
1017
- onDone
1018
- }) {
1019
- const theme = getTheme();
1020
- function onChange(value) {
1021
- const config = getCurrentProjectConfig();
1022
- switch (value) {
1023
- case "yes": {
1024
- if (!config.approvedMcprcServers) {
1025
- config.approvedMcprcServers = [];
1026
- }
1027
- if (!config.approvedMcprcServers.includes(serverName)) {
1028
- config.approvedMcprcServers.push(serverName);
1029
- }
1030
- saveCurrentProjectConfig(config);
1031
- onDone();
1032
- break;
1033
- }
1034
- case "no": {
1035
- if (!config.rejectedMcprcServers) {
1036
- config.rejectedMcprcServers = [];
1037
- }
1038
- if (!config.rejectedMcprcServers.includes(serverName)) {
1039
- config.rejectedMcprcServers.push(serverName);
1040
- }
1041
- saveCurrentProjectConfig(config);
1042
- onDone();
1043
- break;
1044
- }
1045
- }
1046
- }
1047
- const exitState = useExitOnCtrlCD(() => process.exit(0));
1048
- useInput3((_input, key) => {
1049
- if (key.escape) {
1050
- onDone();
1051
- return;
1052
- }
1053
- });
1054
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
1055
- Box3,
1056
- {
1057
- flexDirection: "column",
1058
- gap: 1,
1059
- padding: 1,
1060
- borderStyle: "round",
1061
- borderColor: theme.warning
1062
- },
1063
- /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: theme.warning }, "New MCP Server Detected"),
1064
- /* @__PURE__ */ React4.createElement(Text4, null, "This project contains an MCP config file (.mcp.json or .mcprc) with an MCP server that requires your approval:"),
1065
- /* @__PURE__ */ React4.createElement(Text4, { bold: true }, serverName),
1066
- /* @__PURE__ */ React4.createElement(MCPServerDialogCopy, null),
1067
- /* @__PURE__ */ React4.createElement(Text4, null, "Do you want to approve this MCP server?"),
1068
- /* @__PURE__ */ React4.createElement(
1069
- Select,
1070
- {
1071
- options: [
1072
- { label: "Yes, approve this server", value: "yes" },
1073
- { label: "No, reject this server", value: "no" }
1074
- ],
1075
- onChange: (value) => onChange(value)
1076
- }
1077
- )
1078
- ), /* @__PURE__ */ React4.createElement(Box3, { marginLeft: 3 }, /* @__PURE__ */ React4.createElement(Text4, { dimColor: true }, exitState.pending ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, "Press ", exitState.keyName, " again to exit") : /* @__PURE__ */ React4.createElement(React4.Fragment, null, "Enter to confirm \xB7 Esc to reject"))));
1079
- }
1080
-
1081
- // src/ui/screens/MCPServerApproval.tsx
1082
- async function handleMcprcServerApprovals() {
1083
- const { servers } = getProjectMcpServerDefinitions();
1084
- const pendingServers = Object.keys(servers).filter(
1085
- (serverName) => getMcprcServerStatus(serverName) === "pending"
1086
- );
1087
- if (pendingServers.length === 0) {
1088
- return;
1089
- }
1090
- await new Promise((resolve) => {
1091
- const clearScreenAndResolve = () => {
1092
- process.stdout.write("\x1B[2J\x1B[3J\x1B[H", () => {
1093
- resolve();
1094
- });
1095
- };
1096
- if (pendingServers.length === 1 && pendingServers[0] !== void 0) {
1097
- const result = render(
1098
- /* @__PURE__ */ React5.createElement(
1099
- MCPServerApprovalDialog,
1100
- {
1101
- serverName: pendingServers[0],
1102
- onDone: () => {
1103
- result.unmount?.();
1104
- clearScreenAndResolve();
1105
- }
1106
- }
1107
- ),
1108
- { exitOnCtrlC: false }
1109
- );
1110
- } else {
1111
- const result = render(
1112
- /* @__PURE__ */ React5.createElement(
1113
- MCPServerMultiselectDialog,
1114
- {
1115
- serverNames: pendingServers,
1116
- onDone: () => {
1117
- result.unmount?.();
1118
- clearScreenAndResolve();
1119
- }
1120
- }
1121
- ),
1122
- { exitOnCtrlC: false }
1123
- );
1124
- }
1125
- });
1126
- }
1127
-
1128
- // src/entrypoints/cli/setupScreens.tsx
1129
- function completeOnboarding() {
1130
- const config = getGlobalConfig();
1131
- saveGlobalConfig({
1132
- ...config,
1133
- hasCompletedOnboarding: true,
1134
- lastOnboardingVersion: MACRO.VERSION
1135
- });
1136
- }
1137
- async function showSetupScreens(safeMode, print) {
1138
- if (process.env.NODE_ENV === "test") {
1139
- return;
1140
- }
1141
- const config = getGlobalConfig();
1142
- if (!config.theme || !config.hasCompletedOnboarding) {
1143
- await clearTerminal();
1144
- const { render: render3 } = await import("ink");
1145
- await new Promise((resolve) => {
1146
- render3(
1147
- /* @__PURE__ */ React6.createElement(
1148
- Onboarding,
1149
- {
1150
- onDone: async () => {
1151
- completeOnboarding();
1152
- await clearTerminal();
1153
- resolve();
1154
- }
1155
- }
1156
- ),
1157
- {
1158
- exitOnCtrlC: false
1159
- }
1160
- );
1161
- });
1162
- }
1163
- if (!print) {
1164
- if (safeMode) {
1165
- if (!checkHasTrustDialogAccepted()) {
1166
- await new Promise((resolve) => {
1167
- const onDone = () => {
1168
- grantReadPermissionForOriginalDir();
1169
- resolve();
1170
- };
1171
- (async () => {
1172
- const { render: render3 } = await import("ink");
1173
- render3(/* @__PURE__ */ React6.createElement(TrustDialog, { onDone }), {
1174
- exitOnCtrlC: false
1175
- });
1176
- })();
1177
- });
1178
- }
1179
- }
1180
- await handleMcprcServerApprovals();
1181
- }
1182
- }
1183
-
1184
916
  // src/entrypoints/cli/runCli.tsx
1185
- import React10 from "react";
917
+ import React4 from "react";
1186
918
  import { ReadStream } from "tty";
1187
919
  import { openSync } from "fs";
920
+ init_config();
921
+ init_log();
922
+ init_debugLogger();
1188
923
  import { Command } from "@commander-js/extra-typings";
1189
924
  import { cwd } from "process";
925
+ init_model();
1190
926
 
1191
927
  // src/utils/model/modelConfigYaml.ts
1192
928
  import yaml from "js-yaml";
@@ -1392,11 +1128,13 @@ function applyModelConfigYamlImport(existingConfig, yamlText, options = {}) {
1392
1128
  }
1393
1129
 
1394
1130
  // src/ui/screens/LogList.tsx
1395
- import React8, { useEffect, useState } from "react";
1131
+ init_log();
1132
+ import React2, { useEffect, useState } from "react";
1396
1133
 
1397
1134
  // src/ui/components/LogSelector.tsx
1398
- import React7 from "react";
1399
- import { Box as Box4, Text as Text5 } from "ink";
1135
+ import React from "react";
1136
+ import { Box, Text } from "ink";
1137
+ init_log();
1400
1138
  function LogSelector({
1401
1139
  logs,
1402
1140
  onSelect
@@ -1428,17 +1166,19 @@ function LogSelector({
1428
1166
  value: log.value.toString()
1429
1167
  };
1430
1168
  });
1431
- return /* @__PURE__ */ React7.createElement(Box4, { flexDirection: "column", height: "100%", width: "100%" }, /* @__PURE__ */ React7.createElement(Box4, { paddingLeft: 9 }, /* @__PURE__ */ React7.createElement(Text5, { bold: true, color: getTheme().text }, "Modified"), /* @__PURE__ */ React7.createElement(Text5, null, " "), /* @__PURE__ */ React7.createElement(Text5, { bold: true, color: getTheme().text }, "Created"), /* @__PURE__ */ React7.createElement(Text5, null, " "), /* @__PURE__ */ React7.createElement(Text5, { bold: true, color: getTheme().text }, "# Messages"), /* @__PURE__ */ React7.createElement(Text5, null, " "), /* @__PURE__ */ React7.createElement(Text5, { bold: true, color: getTheme().text }, "First message")), /* @__PURE__ */ React7.createElement(
1169
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", height: "100%", width: "100%" }, /* @__PURE__ */ React.createElement(Box, { paddingLeft: 9 }, /* @__PURE__ */ React.createElement(Text, { bold: true, color: getTheme().text }, "Modified"), /* @__PURE__ */ React.createElement(Text, null, " "), /* @__PURE__ */ React.createElement(Text, { bold: true, color: getTheme().text }, "Created"), /* @__PURE__ */ React.createElement(Text, null, " "), /* @__PURE__ */ React.createElement(Text, { bold: true, color: getTheme().text }, "# Messages"), /* @__PURE__ */ React.createElement(Text, null, " "), /* @__PURE__ */ React.createElement(Text, { bold: true, color: getTheme().text }, "First message")), /* @__PURE__ */ React.createElement(
1432
1170
  Select,
1433
1171
  {
1434
1172
  options,
1435
1173
  onChange: (index) => onSelect(parseInt(index, 10)),
1436
1174
  visibleOptionCount: visibleCount
1437
1175
  }
1438
- ), hiddenCount > 0 && /* @__PURE__ */ React7.createElement(Box4, { paddingLeft: 2 }, /* @__PURE__ */ React7.createElement(Text5, { color: getTheme().secondaryText }, "and ", hiddenCount, " more\u2026")));
1176
+ ), hiddenCount > 0 && /* @__PURE__ */ React.createElement(Box, { paddingLeft: 2 }, /* @__PURE__ */ React.createElement(Text, { color: getTheme().secondaryText }, "and ", hiddenCount, " more\u2026")));
1439
1177
  }
1440
1178
 
1441
1179
  // src/ui/screens/LogList.tsx
1180
+ init_log();
1181
+ init_log();
1442
1182
  function LogList({ context, type, logNumber }) {
1443
1183
  const [logs, setLogs] = useState([]);
1444
1184
  const [didSelectLog, setDidSelectLog] = useState(false);
@@ -1483,10 +1223,13 @@ function LogList({ context, type, logNumber }) {
1483
1223
  if (didSelectLog) {
1484
1224
  return null;
1485
1225
  }
1486
- return /* @__PURE__ */ React8.createElement(LogSelector, { logs, onSelect });
1226
+ return /* @__PURE__ */ React2.createElement(LogSelector, { logs, onSelect });
1487
1227
  }
1488
1228
 
1489
1229
  // src/entrypoints/mcp.ts
1230
+ init_state();
1231
+ init_model();
1232
+ init_log();
1490
1233
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
1491
1234
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
1492
1235
  import {
@@ -1494,6 +1237,7 @@ import {
1494
1237
  ListToolsRequestSchema
1495
1238
  } from "@modelcontextprotocol/sdk/types.js";
1496
1239
  import { zodToJsonSchema } from "zod-to-json-schema";
1240
+ init_macros();
1497
1241
  var state = {
1498
1242
  readFileTimestamps: {}
1499
1243
  };
@@ -1610,7 +1354,12 @@ async function startMCPServer(cwd2) {
1610
1354
  return await runServer();
1611
1355
  }
1612
1356
 
1357
+ // src/entrypoints/cli/runCli.tsx
1358
+ init_state();
1359
+ init_log();
1360
+
1613
1361
  // src/utils/session/conversationRecovery.ts
1362
+ init_log();
1614
1363
  import fs2 from "fs/promises";
1615
1364
  async function loadMessagesFromLog(logPath, tools) {
1616
1365
  try {
@@ -1642,6 +1391,7 @@ function deserializeMessages(messages, tools) {
1642
1391
  }
1643
1392
 
1644
1393
  // src/commands/approved-tools.ts
1394
+ init_config();
1645
1395
  var defaultConfigHandler = {
1646
1396
  getCurrentProjectConfig,
1647
1397
  saveCurrentProjectConfig
@@ -1672,11 +1422,13 @@ function handleRemoveApprovedTool(tool, projectConfigHandler = defaultConfigHand
1672
1422
 
1673
1423
  // src/entrypoints/cli/runCli.tsx
1674
1424
  import { cursorShow } from "ansi-escapes";
1425
+ init_log();
1426
+ init_shell();
1675
1427
 
1676
1428
  // src/ui/components/InvalidConfigDialog.tsx
1677
- import React9 from "react";
1678
- import { Box as Box5, Newline, Text as Text6, useInput as useInput4 } from "ink";
1679
- import { render as render2 } from "ink";
1429
+ import React3 from "react";
1430
+ import { Box as Box2, Newline, Text as Text2, useInput } from "ink";
1431
+ import { render } from "ink";
1680
1432
  import { writeFileSync } from "fs";
1681
1433
  function InvalidConfigDialog({
1682
1434
  filePath,
@@ -1685,7 +1437,7 @@ function InvalidConfigDialog({
1685
1437
  onReset
1686
1438
  }) {
1687
1439
  const theme = getTheme();
1688
- useInput4((_, key) => {
1440
+ useInput((_, key) => {
1689
1441
  if (key.escape) {
1690
1442
  onExit();
1691
1443
  }
@@ -1698,8 +1450,8 @@ function InvalidConfigDialog({
1698
1450
  onReset();
1699
1451
  }
1700
1452
  };
1701
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
1702
- Box5,
1453
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
1454
+ Box2,
1703
1455
  {
1704
1456
  flexDirection: "column",
1705
1457
  borderColor: theme.error,
@@ -1708,9 +1460,9 @@ function InvalidConfigDialog({
1708
1460
  width: 70,
1709
1461
  gap: 1
1710
1462
  },
1711
- /* @__PURE__ */ React9.createElement(Text6, { bold: true }, "Configuration Error"),
1712
- /* @__PURE__ */ React9.createElement(Box5, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React9.createElement(Text6, null, "The configuration file at ", /* @__PURE__ */ React9.createElement(Text6, { bold: true }, filePath), " contains invalid JSON."), /* @__PURE__ */ React9.createElement(Text6, null, errorDescription)),
1713
- /* @__PURE__ */ React9.createElement(Box5, { flexDirection: "column" }, /* @__PURE__ */ React9.createElement(Text6, { bold: true }, "Choose an option:"), /* @__PURE__ */ React9.createElement(
1463
+ /* @__PURE__ */ React3.createElement(Text2, { bold: true }, "Configuration Error"),
1464
+ /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React3.createElement(Text2, null, "The configuration file at ", /* @__PURE__ */ React3.createElement(Text2, { bold: true }, filePath), " contains invalid JSON."), /* @__PURE__ */ React3.createElement(Text2, null, errorDescription)),
1465
+ /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column" }, /* @__PURE__ */ React3.createElement(Text2, { bold: true }, "Choose an option:"), /* @__PURE__ */ React3.createElement(
1714
1466
  Select,
1715
1467
  {
1716
1468
  options: [
@@ -1720,14 +1472,14 @@ function InvalidConfigDialog({
1720
1472
  onChange: handleSelect
1721
1473
  }
1722
1474
  ))
1723
- ), exitState.pending ? /* @__PURE__ */ React9.createElement(Text6, { dimColor: true }, "Press ", exitState.keyName, " again to exit") : /* @__PURE__ */ React9.createElement(Newline, null));
1475
+ ), exitState.pending ? /* @__PURE__ */ React3.createElement(Text2, { dimColor: true }, "Press ", exitState.keyName, " again to exit") : /* @__PURE__ */ React3.createElement(Newline, null));
1724
1476
  }
1725
1477
  function showInvalidConfigDialog({
1726
1478
  error
1727
1479
  }) {
1728
1480
  return new Promise((resolve) => {
1729
- render2(
1730
- /* @__PURE__ */ React9.createElement(
1481
+ render(
1482
+ /* @__PURE__ */ React3.createElement(
1731
1483
  InvalidConfigDialog,
1732
1484
  {
1733
1485
  filePath: error.filePath,
@@ -1752,6 +1504,8 @@ function showInvalidConfigDialog({
1752
1504
  }
1753
1505
 
1754
1506
  // src/entrypoints/cli/runCli.tsx
1507
+ init_errors();
1508
+ init_macros();
1755
1509
  function omitKeys(input, ...keys) {
1756
1510
  const result = { ...input };
1757
1511
  for (const key of keys) {
@@ -1770,6 +1524,13 @@ async function runCli() {
1770
1524
  logError(`GPT-5 configuration validation failed: ${repairError}`);
1771
1525
  }
1772
1526
  });
1527
+ queueMicrotask(async () => {
1528
+ try {
1529
+ const { tryInitSandboxPool } = await import("./sandbox-QOXESHL4.js");
1530
+ await tryInitSandboxPool();
1531
+ } catch {
1532
+ }
1533
+ });
1773
1534
  } catch (error) {
1774
1535
  if (error instanceof ConfigParseError) {
1775
1536
  await showInvalidConfigDialog({ error });
@@ -2010,12 +1771,12 @@ async function parseArgs(stdinContent, renderContext) {
2010
1771
  assertMinVersion();
2011
1772
  {
2012
1773
  const requested = Array.isArray(pluginDir) && pluginDir.length > 0 ? pluginDir : [];
2013
- const { listEnabledInstalledPluginPackRoots } = await import("./skillMarketplace-IXAGP3Q2.js");
1774
+ const { listEnabledInstalledPluginPackRoots } = await import("./skillMarketplace-RIAMO2YA.js");
2014
1775
  const installed = listEnabledInstalledPluginPackRoots();
2015
1776
  const all = [...installed, ...requested].filter(Boolean);
2016
1777
  const deduped = Array.from(new Set(all));
2017
1778
  if (deduped.length > 0) {
2018
- const { configureSessionPlugins } = await import("./pluginRuntime-JXMJZ2LC.js");
1779
+ const { configureSessionPlugins } = await import("./pluginRuntime-XHI3TCRJ.js");
2019
1780
  const { errors } = await configureSessionPlugins({
2020
1781
  pluginDirs: deduped
2021
1782
  });
@@ -2025,9 +1786,9 @@ async function parseArgs(stdinContent, renderContext) {
2025
1786
  }
2026
1787
  }
2027
1788
  const [{ ask }, { getTools }, { getCommands }] = await Promise.all([
2028
- import("./ask-MGUO3L35.js"),
2029
- import("./tools-3HOUIDM3.js"),
2030
- import("./commands-AVEBLFVS.js")
1789
+ import("./ask-EL4XAA5P.js"),
1790
+ import("./tools-HIPUGTF5.js"),
1791
+ import("./commands-3Y3OQOXT.js")
2031
1792
  ]);
2032
1793
  const commands = await getCommands();
2033
1794
  const mcpClientsPromise = Array.isArray(mcpConfig) && mcpConfig.length > 0 || strictMcpConfig === true ? getClientsForCliMcpConfig({
@@ -2046,10 +1807,10 @@ async function parseArgs(stdinContent, renderContext) {
2046
1807
  const {
2047
1808
  loadKodeAgentSessionMessages,
2048
1809
  findMostRecentKodeAgentSessionId
2049
- } = await import("./kodeAgentSessionLoad-6F7SJXBC.js");
2050
- const { listKodeAgentSessions, resolveResumeSessionIdentifier } = await import("./kodeAgentSessionResume-UEEDRJ3N.js");
2051
- const { isUuid } = await import("./uuid-VA3KVASX.js");
2052
- const { setKodeAgentSessionId, getKodeAgentSessionId } = await import("./kodeAgentSessionId-KTGFX2BE.js");
1810
+ } = await import("./kodeAgentSessionLoad-4S452GGD.js");
1811
+ const { listKodeAgentSessions, resolveResumeSessionIdentifier } = await import("./kodeAgentSessionResume-MSMG4QUR.js");
1812
+ const { isUuid } = await import("./uuid-RQH3OZ3W.js");
1813
+ const { setKodeAgentSessionId, getKodeAgentSessionId } = await import("./kodeAgentSessionId-4SH24DVH.js");
2053
1814
  const { randomUUID } = await import("crypto");
2054
1815
  const wantsContinue = Boolean(continueConversation);
2055
1816
  const wantsResume = resume !== void 0;
@@ -2172,7 +1933,7 @@ async function parseArgs(stdinContent, renderContext) {
2172
1933
  { getLatestVersion, getUpdateCommandSuggestions },
2173
1934
  semverMod
2174
1935
  ] = await Promise.all([
2175
- import("./autoUpdater-2GS6LRPK.js"),
1936
+ import("./autoUpdater-DKMSJXWW.js"),
2176
1937
  import("semver")
2177
1938
  ]);
2178
1939
  const semver = semverMod?.default ?? semverMod;
@@ -2202,9 +1963,9 @@ async function parseArgs(stdinContent, renderContext) {
2202
1963
  }
2203
1964
  const context2 = {};
2204
1965
  (async () => {
2205
- const { render: render3 } = await import("ink");
2206
- const { unmount } = render3(
2207
- /* @__PURE__ */ React10.createElement(
1966
+ const { render: render2 } = await import("ink");
1967
+ const { unmount } = render2(
1968
+ /* @__PURE__ */ React4.createElement(
2208
1969
  ResumeConversation,
2209
1970
  {
2210
1971
  cwd: cwd2,
@@ -2232,10 +1993,10 @@ async function parseArgs(stdinContent, renderContext) {
2232
1993
  }
2233
1994
  const isDefaultModel = await isDefaultSlowAndCapableModel();
2234
1995
  {
2235
- const { render: render3 } = await import("ink");
2236
- const { REPL } = await import("./REPL-IAK7ZN2Z.js");
2237
- render3(
2238
- /* @__PURE__ */ React10.createElement(
1996
+ const { render: render2 } = await import("ink");
1997
+ const { REPL } = await import("./REPL-CTTH53A7.js");
1998
+ render2(
1999
+ /* @__PURE__ */ React4.createElement(
2239
2000
  REPL,
2240
2001
  {
2241
2002
  commands,
@@ -2320,7 +2081,7 @@ async function parseArgs(stdinContent, renderContext) {
2320
2081
  { replace: !!replace }
2321
2082
  );
2322
2083
  saveGlobalConfig(nextConfig);
2323
- await import("./model-4TQIV5J2.js").then(({ reloadModelManager }) => {
2084
+ await import("./model-JNWAZGT7.js").then(({ reloadModelManager }) => {
2324
2085
  reloadModelManager();
2325
2086
  });
2326
2087
  if (warnings.length > 0) {
@@ -2338,7 +2099,7 @@ async function parseArgs(stdinContent, renderContext) {
2338
2099
  const workingDir = typeof options?.cwd === "string" ? options.cwd : cwd();
2339
2100
  const asJson = options?.json === true;
2340
2101
  await setup(workingDir, false);
2341
- const { reloadModelManager, getModelManager: getModelManager2 } = await import("./model-4TQIV5J2.js");
2102
+ const { reloadModelManager, getModelManager: getModelManager2 } = await import("./model-JNWAZGT7.js");
2342
2103
  reloadModelManager();
2343
2104
  const manager = getModelManager2();
2344
2105
  const config2 = getGlobalConfig();
@@ -2412,7 +2173,7 @@ Model profiles (${active.length}/${profiles.length} active):
2412
2173
  try {
2413
2174
  const workingDir = typeof options?.cwd === "string" ? options.cwd : cwd();
2414
2175
  await setup(workingDir, false);
2415
- const { validateAgentTemplates } = await import("./agentsValidate-UBOER2IN.js");
2176
+ const { validateAgentTemplates } = await import("./agentsValidate-BXDD54YP.js");
2416
2177
  const report = await validateAgentTemplates({
2417
2178
  cwd: workingDir,
2418
2179
  paths: Array.isArray(paths) ? paths : [],
@@ -2456,7 +2217,7 @@ Model profiles (${active.length}/${profiles.length} active):
2456
2217
  const registerMarketplaceCommands = (marketplaceCmd2) => {
2457
2218
  marketplaceCmd2.command("add <source>").description("Add a marketplace from a URL, path, or GitHub repo").action(async (source) => {
2458
2219
  try {
2459
- const { addMarketplace } = await import("./skillMarketplace-IXAGP3Q2.js");
2220
+ const { addMarketplace } = await import("./skillMarketplace-RIAMO2YA.js");
2460
2221
  console.log("Adding marketplace...");
2461
2222
  const { name } = await addMarketplace(source);
2462
2223
  console.log(`Successfully added marketplace: ${name}`);
@@ -2468,7 +2229,7 @@ Model profiles (${active.length}/${profiles.length} active):
2468
2229
  });
2469
2230
  marketplaceCmd2.command("list").description("List all configured marketplaces").option("--json", "Output as JSON").action(async (options) => {
2470
2231
  try {
2471
- const { listMarketplaces } = await import("./skillMarketplace-IXAGP3Q2.js");
2232
+ const { listMarketplaces } = await import("./skillMarketplace-RIAMO2YA.js");
2472
2233
  const marketplaces = listMarketplaces();
2473
2234
  if (options.json) {
2474
2235
  console.log(JSON.stringify(marketplaces, null, 2));
@@ -2507,7 +2268,7 @@ Model profiles (${active.length}/${profiles.length} active):
2507
2268
  });
2508
2269
  marketplaceCmd2.command("remove <name>").alias("rm").description("Remove a configured marketplace").action(async (name) => {
2509
2270
  try {
2510
- const { removeMarketplace } = await import("./skillMarketplace-IXAGP3Q2.js");
2271
+ const { removeMarketplace } = await import("./skillMarketplace-RIAMO2YA.js");
2511
2272
  removeMarketplace(name);
2512
2273
  console.log(`Successfully removed marketplace: ${name}`);
2513
2274
  process.exit(0);
@@ -2524,7 +2285,7 @@ Model profiles (${active.length}/${profiles.length} active):
2524
2285
  listMarketplaces,
2525
2286
  refreshAllMarketplacesAsync,
2526
2287
  refreshMarketplaceAsync
2527
- } = await import("./skillMarketplace-IXAGP3Q2.js");
2288
+ } = await import("./skillMarketplace-RIAMO2YA.js");
2528
2289
  const trimmed = typeof name === "string" ? name.trim() : "";
2529
2290
  if (trimmed) {
2530
2291
  console.log(`Updating marketplace: ${trimmed}...`);
@@ -2575,9 +2336,9 @@ Model profiles (${active.length}/${profiles.length} active):
2575
2336
  );
2576
2337
  process.exit(1);
2577
2338
  }
2578
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2339
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2579
2340
  await setCwd2(options.cwd ?? cwd());
2580
- const { installSkillPlugin } = await import("./skillMarketplace-IXAGP3Q2.js");
2341
+ const { installSkillPlugin } = await import("./skillMarketplace-RIAMO2YA.js");
2581
2342
  const result = installSkillPlugin(plugin, {
2582
2343
  scope,
2583
2344
  force: options.force === true
@@ -2604,9 +2365,9 @@ ${skillList}`);
2604
2365
  );
2605
2366
  process.exit(1);
2606
2367
  }
2607
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2368
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2608
2369
  await setCwd2(options.cwd ?? cwd());
2609
- const { uninstallSkillPlugin } = await import("./skillMarketplace-IXAGP3Q2.js");
2370
+ const { uninstallSkillPlugin } = await import("./skillMarketplace-RIAMO2YA.js");
2610
2371
  const result = uninstallSkillPlugin(plugin, { scope });
2611
2372
  const skillList = result.removedSkills.length > 0 ? `Skills: ${result.removedSkills.join(", ")}` : "Skills: (none)";
2612
2373
  console.log(`Uninstalled ${result.pluginSpec}
@@ -2630,9 +2391,9 @@ ${skillList}`);
2630
2391
  );
2631
2392
  process.exit(1);
2632
2393
  }
2633
- const { setCwd: setCwd2, getCwd: getCwd2 } = await import("./state-MSCYLB6Y.js");
2394
+ const { setCwd: setCwd2, getCwd: getCwd2 } = await import("./state-TM2XZQE2.js");
2634
2395
  await setCwd2(options.cwd ?? cwd());
2635
- const { listInstalledSkillPlugins } = await import("./skillMarketplace-IXAGP3Q2.js");
2396
+ const { listInstalledSkillPlugins } = await import("./skillMarketplace-RIAMO2YA.js");
2636
2397
  const all = listInstalledSkillPlugins();
2637
2398
  const filtered = Object.fromEntries(
2638
2399
  Object.entries(all).filter(([, record]) => {
@@ -2676,9 +2437,9 @@ ${skillList}`);
2676
2437
  );
2677
2438
  process.exit(1);
2678
2439
  }
2679
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2440
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2680
2441
  await setCwd2(options.cwd ?? cwd());
2681
- const { enableSkillPlugin } = await import("./skillMarketplace-IXAGP3Q2.js");
2442
+ const { enableSkillPlugin } = await import("./skillMarketplace-RIAMO2YA.js");
2682
2443
  const result = enableSkillPlugin(plugin, { scope });
2683
2444
  console.log(`Enabled ${result.pluginSpec}`);
2684
2445
  process.exit(0);
@@ -2700,9 +2461,9 @@ ${skillList}`);
2700
2461
  );
2701
2462
  process.exit(1);
2702
2463
  }
2703
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2464
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2704
2465
  await setCwd2(options.cwd ?? cwd());
2705
- const { disableSkillPlugin } = await import("./skillMarketplace-IXAGP3Q2.js");
2466
+ const { disableSkillPlugin } = await import("./skillMarketplace-RIAMO2YA.js");
2706
2467
  const result = disableSkillPlugin(plugin, { scope });
2707
2468
  console.log(`Disabled ${result.pluginSpec}`);
2708
2469
  process.exit(0);
@@ -2713,9 +2474,9 @@ ${skillList}`);
2713
2474
  });
2714
2475
  pluginCmd.command("validate <path>").description("Validate a plugin or marketplace manifest").option("--cwd <cwd>", "The current working directory", String, cwd()).action(async (path, options) => {
2715
2476
  try {
2716
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2477
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2717
2478
  await setCwd2(options.cwd ?? cwd());
2718
- const { formatValidationResult, validatePluginOrMarketplacePath } = await import("./pluginValidation-JNQZYLUP.js");
2479
+ const { formatValidationResult, validatePluginOrMarketplacePath } = await import("./pluginValidation-WDFL352C.js");
2719
2480
  const result = validatePluginOrMarketplacePath(path);
2720
2481
  console.log(
2721
2482
  `Validating ${result.fileType} manifest: ${result.filePath}
@@ -2737,9 +2498,9 @@ ${skillList}`);
2737
2498
  registerMarketplaceCommands(marketplaceCmd);
2738
2499
  skillsCmd.command("install <plugin>").description("Install a skill plugin pack (<plugin>@<marketplace>)").option("--cwd <cwd>", "The current working directory", String, cwd()).option("--project", "Install into this project (.newcraw/...)", () => true).option("--force", "Overwrite existing installed files", () => true).action(async (plugin, options) => {
2739
2500
  try {
2740
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2501
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2741
2502
  await setCwd2(options.cwd ?? cwd());
2742
- const { installSkillPlugin } = await import("./skillMarketplace-IXAGP3Q2.js");
2503
+ const { installSkillPlugin } = await import("./skillMarketplace-RIAMO2YA.js");
2743
2504
  const result = installSkillPlugin(plugin, {
2744
2505
  project: options.project === true,
2745
2506
  force: options.force === true
@@ -2755,9 +2516,9 @@ ${skillList}`);
2755
2516
  });
2756
2517
  skillsCmd.command("uninstall <plugin>").description("Uninstall a skill plugin pack (<plugin>@<marketplace>)").option("--cwd <cwd>", "The current working directory", String, cwd()).option("--project", "Uninstall from this project (.newcraw/...)", () => true).action(async (plugin, options) => {
2757
2518
  try {
2758
- const { setCwd: setCwd2 } = await import("./state-MSCYLB6Y.js");
2519
+ const { setCwd: setCwd2 } = await import("./state-TM2XZQE2.js");
2759
2520
  await setCwd2(options.cwd ?? cwd());
2760
- const { uninstallSkillPlugin } = await import("./skillMarketplace-IXAGP3Q2.js");
2521
+ const { uninstallSkillPlugin } = await import("./skillMarketplace-RIAMO2YA.js");
2761
2522
  const result = uninstallSkillPlugin(plugin, {
2762
2523
  project: options.project === true
2763
2524
  });
@@ -2772,7 +2533,7 @@ ${skillList}`);
2772
2533
  });
2773
2534
  skillsCmd.command("list-installed").description("List installed skill plugins").action(async () => {
2774
2535
  try {
2775
- const { listInstalledSkillPlugins } = await import("./skillMarketplace-IXAGP3Q2.js");
2536
+ const { listInstalledSkillPlugins } = await import("./skillMarketplace-RIAMO2YA.js");
2776
2537
  console.log(JSON.stringify(listInstalledSkillPlugins(), null, 2));
2777
2538
  process.exit(0);
2778
2539
  } catch (error) {
@@ -3418,11 +3179,11 @@ ${skillList}`);
3418
3179
  const ink = await import("ink");
3419
3180
  const reactModule = await import("react");
3420
3181
  const inkjsui = await import("@inkjs/ui");
3421
- const utilsTheme = await import("./theme-GAMFOLBW.js");
3422
- const { render: render3 } = ink;
3423
- const React11 = reactModule;
3424
- const { MultiSelect: MultiSelect2 } = inkjsui;
3425
- const { Box: Box6, Text: Text7 } = ink;
3182
+ const utilsTheme = await import("./theme-BXUQNXSD.js");
3183
+ const { render: render2 } = ink;
3184
+ const React5 = reactModule;
3185
+ const { MultiSelect } = inkjsui;
3186
+ const { Box: Box3, Text: Text3 } = ink;
3426
3187
  const { getTheme: getTheme2 } = utilsTheme;
3427
3188
  await new Promise((resolve) => {
3428
3189
  function ClaudeDesktopImport() {
@@ -3493,8 +3254,8 @@ ${skillList}`);
3493
3254
  await importServers(selectedServers);
3494
3255
  }
3495
3256
  };
3496
- return /* @__PURE__ */ React11.createElement(Box6, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React11.createElement(
3497
- Box6,
3257
+ return /* @__PURE__ */ React5.createElement(Box3, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React5.createElement(
3258
+ Box3,
3498
3259
  {
3499
3260
  flexDirection: "column",
3500
3261
  borderStyle: "round",
@@ -3502,11 +3263,11 @@ ${skillList}`);
3502
3263
  padding: 1,
3503
3264
  width: "100%"
3504
3265
  },
3505
- /* @__PURE__ */ React11.createElement(Text7, { bold: true, color: theme.newcraw }, "Import MCP Servers from Desktop Config"),
3506
- /* @__PURE__ */ React11.createElement(Box6, { marginY: 1 }, /* @__PURE__ */ React11.createElement(Text7, null, "Found ", numServers, " MCP servers in the desktop config.")),
3507
- /* @__PURE__ */ React11.createElement(Text7, null, "Please select the servers you want to import:"),
3508
- /* @__PURE__ */ React11.createElement(Box6, { marginTop: 1 }, /* @__PURE__ */ React11.createElement(
3509
- MultiSelect2,
3266
+ /* @__PURE__ */ React5.createElement(Text3, { bold: true, color: theme.newcraw }, "Import MCP Servers from Desktop Config"),
3267
+ /* @__PURE__ */ React5.createElement(Box3, { marginY: 1 }, /* @__PURE__ */ React5.createElement(Text3, null, "Found ", numServers, " MCP servers in the desktop config.")),
3268
+ /* @__PURE__ */ React5.createElement(Text3, null, "Please select the servers you want to import:"),
3269
+ /* @__PURE__ */ React5.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React5.createElement(
3270
+ MultiSelect,
3510
3271
  {
3511
3272
  options: serverNames.map((name) => ({
3512
3273
  label: name,
@@ -3516,9 +3277,9 @@ ${skillList}`);
3516
3277
  onSubmit: handleConfirm
3517
3278
  }
3518
3279
  ))
3519
- ), /* @__PURE__ */ React11.createElement(Box6, { marginTop: 0, marginLeft: 3 }, /* @__PURE__ */ React11.createElement(Text7, { dimColor: true }, "Space to select \xB7 Enter to confirm \xB7 Esc to cancel")), isFinished && /* @__PURE__ */ React11.createElement(Box6, { marginTop: 1 }, /* @__PURE__ */ React11.createElement(Text7, { color: theme.success }, "Successfully imported", " ", importResults.filter((r) => r.success).length, " MCP server to local config.")));
3280
+ ), /* @__PURE__ */ React5.createElement(Box3, { marginTop: 0, marginLeft: 3 }, /* @__PURE__ */ React5.createElement(Text3, { dimColor: true }, "Space to select \xB7 Enter to confirm \xB7 Esc to cancel")), isFinished && /* @__PURE__ */ React5.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React5.createElement(Text3, { color: theme.success }, "Successfully imported", " ", importResults.filter((r) => r.success).length, " MCP server to local config.")));
3520
3281
  }
3521
- const { unmount } = render3(/* @__PURE__ */ React11.createElement(ClaudeDesktopImport, null));
3282
+ const { unmount } = render2(/* @__PURE__ */ React5.createElement(ClaudeDesktopImport, null));
3522
3283
  setTimeout(() => {
3523
3284
  unmount();
3524
3285
  resolve();
@@ -3559,8 +3320,8 @@ ${skillList}`);
3559
3320
  await new Promise((resolve) => {
3560
3321
  ;
3561
3322
  (async () => {
3562
- const { render: render3 } = await import("ink");
3563
- render3(/* @__PURE__ */ React10.createElement(Doctor, { onDone: () => resolve(), doctorMode: true }));
3323
+ const { render: render2 } = await import("ink");
3324
+ render2(/* @__PURE__ */ React4.createElement(Doctor, { onDone: () => resolve(), doctorMode: true }));
3564
3325
  })();
3565
3326
  });
3566
3327
  process.exit(0);
@@ -3568,7 +3329,7 @@ ${skillList}`);
3568
3329
  program.command("update").description("Show manual upgrade commands (no auto-install)").action(async () => {
3569
3330
  console.log(`Current version: ${MACRO.VERSION}`);
3570
3331
  console.log("Checking for updates...");
3571
- const { getLatestVersion, getUpdateCommandSuggestions } = await import("./autoUpdater-2GS6LRPK.js");
3332
+ const { getLatestVersion, getUpdateCommandSuggestions } = await import("./autoUpdater-DKMSJXWW.js");
3572
3333
  const latestVersion = await getLatestVersion();
3573
3334
  if (!latestVersion) {
3574
3335
  console.error("Failed to check for updates");
@@ -3597,9 +3358,9 @@ ${skillList}`);
3597
3358
  await setup(cwd2, false);
3598
3359
  const context2 = {};
3599
3360
  (async () => {
3600
- const { render: render3 } = await import("ink");
3601
- const { unmount } = render3(
3602
- /* @__PURE__ */ React10.createElement(LogList, { context: context2, type: "messages", logNumber: number }),
3361
+ const { render: render2 } = await import("ink");
3362
+ const { unmount } = render2(
3363
+ /* @__PURE__ */ React4.createElement(LogList, { context: context2, type: "messages", logNumber: number }),
3603
3364
  renderContextWithExitOnCtrlC
3604
3365
  );
3605
3366
  context2.unmount = unmount;
@@ -3623,8 +3384,8 @@ ${skillList}`);
3623
3384
  await setup(cwd2, safe);
3624
3385
  assertMinVersion();
3625
3386
  const [{ getTools }, { getCommands }] = await Promise.all([
3626
- import("./tools-3HOUIDM3.js"),
3627
- import("./commands-AVEBLFVS.js")
3387
+ import("./tools-HIPUGTF5.js"),
3388
+ import("./commands-3Y3OQOXT.js")
3628
3389
  ]);
3629
3390
  const [allTools, commands, mcpClients] = await Promise.all([
3630
3391
  getTools(
@@ -3635,9 +3396,9 @@ ${skillList}`);
3635
3396
  ]);
3636
3397
  const tools = disableSlashCommands === true ? allTools.filter((t) => t.name !== "SlashCommand") : allTools;
3637
3398
  if (identifier !== void 0) {
3638
- const { loadKodeAgentSessionMessages } = await import("./kodeAgentSessionLoad-6F7SJXBC.js");
3639
- const { resolveResumeSessionIdentifier } = await import("./kodeAgentSessionResume-UEEDRJ3N.js");
3640
- const { setKodeAgentSessionId } = await import("./kodeAgentSessionId-KTGFX2BE.js");
3399
+ const { loadKodeAgentSessionMessages } = await import("./kodeAgentSessionLoad-4S452GGD.js");
3400
+ const { resolveResumeSessionIdentifier } = await import("./kodeAgentSessionResume-MSMG4QUR.js");
3401
+ const { setKodeAgentSessionId } = await import("./kodeAgentSessionId-4SH24DVH.js");
3641
3402
  const rawIdentifier = String(identifier).trim();
3642
3403
  const isLegacyNumber = /^-?\\d+$/.test(rawIdentifier);
3643
3404
  const isLegacyPath = !isLegacyNumber && existsSync(rawIdentifier);
@@ -3705,10 +3466,10 @@ ${skillList}`);
3705
3466
  }
3706
3467
  const isDefaultModel = await isDefaultSlowAndCapableModel();
3707
3468
  {
3708
- const { render: render3 } = await import("ink");
3709
- const { REPL } = await import("./REPL-IAK7ZN2Z.js");
3710
- render3(
3711
- /* @__PURE__ */ React10.createElement(
3469
+ const { render: render2 } = await import("ink");
3470
+ const { REPL } = await import("./REPL-CTTH53A7.js");
3471
+ render2(
3472
+ /* @__PURE__ */ React4.createElement(
3712
3473
  REPL,
3713
3474
  {
3714
3475
  initialPrompt: "",
@@ -3733,7 +3494,7 @@ ${skillList}`);
3733
3494
  process.exit(1);
3734
3495
  }
3735
3496
  } else {
3736
- const { listKodeAgentSessions } = await import("./kodeAgentSessionResume-UEEDRJ3N.js");
3497
+ const { listKodeAgentSessions } = await import("./kodeAgentSessionResume-MSMG4QUR.js");
3737
3498
  const sessions = listKodeAgentSessions({ cwd: cwd2 });
3738
3499
  if (sessions.length === 0) {
3739
3500
  console.error("No conversation found to resume");
@@ -3741,9 +3502,9 @@ ${skillList}`);
3741
3502
  }
3742
3503
  const context2 = {};
3743
3504
  (async () => {
3744
- const { render: render3 } = await import("ink");
3745
- const { unmount } = render3(
3746
- /* @__PURE__ */ React10.createElement(
3505
+ const { render: render2 } = await import("ink");
3506
+ const { unmount } = render2(
3507
+ /* @__PURE__ */ React4.createElement(
3747
3508
  ResumeConversation,
3748
3509
  {
3749
3510
  cwd: cwd2,
@@ -3775,9 +3536,9 @@ ${skillList}`);
3775
3536
  await setup(cwd2, false);
3776
3537
  const context2 = {};
3777
3538
  (async () => {
3778
- const { render: render3 } = await import("ink");
3779
- const { unmount } = render3(
3780
- /* @__PURE__ */ React10.createElement(LogList, { context: context2, type: "errors", logNumber: number }),
3539
+ const { render: render2 } = await import("ink");
3540
+ const { unmount } = render2(
3541
+ /* @__PURE__ */ React4.createElement(LogList, { context: context2, type: "errors", logNumber: number }),
3781
3542
  renderContextWithExitOnCtrlC
3782
3543
  );
3783
3544
  context2.unmount = unmount;
@@ -3838,8 +3599,8 @@ async function gracefulExit(code = 0) {
3838
3599
  }
3839
3600
  isGracefulExitInProgress = true;
3840
3601
  try {
3841
- const { runSessionEndHooks } = await import("./kodeHooks-V36SHCTC.js");
3842
- const { getKodeAgentSessionId } = await import("./kodeAgentSessionId-KTGFX2BE.js");
3602
+ const { runSessionEndHooks } = await import("./kodeHooks-WX3N6CL6.js");
3603
+ const { getKodeAgentSessionId } = await import("./kodeAgentSessionId-4SH24DVH.js");
3843
3604
  const { tmpdir } = await import("os");
3844
3605
  const { join: join2 } = await import("path");
3845
3606
  const sessionId = getKodeAgentSessionId();
@@ -3876,6 +3637,11 @@ async function gracefulExit(code = 0) {
3876
3637
  resetCursor();
3877
3638
  } catch {
3878
3639
  }
3640
+ try {
3641
+ const { shutdownSandboxPool } = await import("./sandbox-QOXESHL4.js");
3642
+ await shutdownSandboxPool();
3643
+ } catch {
3644
+ }
3879
3645
  try {
3880
3646
  BunShell.getInstance().close();
3881
3647
  } catch {