newcraw 1.0.2 → 1.0.4

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-DECTPCL5.js +50 -0
  2. package/dist/{acp-J4WDYGRX.js → acp-HA476EHW.js} +69 -40
  3. package/dist/acp-HA476EHW.js.map +7 -0
  4. package/dist/{agentsValidate-UBOER2IN.js → agentsValidate-EDPFUUMG.js} +13 -10
  5. package/dist/{agentsValidate-UBOER2IN.js.map → agentsValidate-EDPFUUMG.js.map} +1 -1
  6. package/dist/{ask-MGUO3L35.js → ask-5SP4YYRD.js} +62 -52
  7. package/dist/ask-5SP4YYRD.js.map +7 -0
  8. package/dist/{autoUpdater-2GS6LRPK.js → autoUpdater-FFMM2DR7.js} +5 -4
  9. package/dist/chunk-2BVCVKKB.js +135 -0
  10. package/dist/chunk-2BVCVKKB.js.map +7 -0
  11. package/dist/{chunk-2C43OXE7.js → chunk-2JCTO2EY.js} +38 -59
  12. package/dist/chunk-2JCTO2EY.js.map +7 -0
  13. package/dist/{chunk-OJIMOLIC.js → chunk-3CKC4ABU.js} +3631 -7464
  14. package/dist/chunk-3CKC4ABU.js.map +7 -0
  15. package/dist/chunk-ARCEUG3V.js +88 -0
  16. package/dist/chunk-ARCEUG3V.js.map +7 -0
  17. package/dist/{chunk-RUXIBQ3B.js → chunk-BJYXLCRS.js} +4 -4
  18. package/dist/{chunk-VKI7ORIO.js → chunk-BMKE6FT5.js} +37 -18
  19. package/dist/{chunk-VKI7ORIO.js.map → chunk-BMKE6FT5.js.map} +1 -1
  20. package/dist/chunk-BQCOSNM3.js +93 -0
  21. package/dist/chunk-BQCOSNM3.js.map +7 -0
  22. package/dist/chunk-CHB5K4GI.js +107 -0
  23. package/dist/chunk-CHB5K4GI.js.map +7 -0
  24. package/dist/chunk-D4OZACS2.js +35 -0
  25. package/dist/chunk-EHQ2M5B4.js +166 -0
  26. package/dist/{chunk-ZYSVG4X3.js.map → chunk-EHQ2M5B4.js.map} +2 -2
  27. package/dist/chunk-EUBZGAIN.js +372 -0
  28. package/dist/chunk-EUBZGAIN.js.map +7 -0
  29. package/dist/{chunk-UYRR6F5S.js → chunk-FIMCETCB.js} +9 -3
  30. package/dist/{chunk-UYRR6F5S.js.map → chunk-FIMCETCB.js.map} +1 -1
  31. package/dist/{chunk-DEF3KFP7.js → chunk-GVLJUD6R.js} +4 -2
  32. package/dist/{chunk-DEF3KFP7.js.map → chunk-GVLJUD6R.js.map} +1 -1
  33. package/dist/chunk-HLBLZKZH.js +45 -0
  34. package/dist/chunk-HLBLZKZH.js.map +7 -0
  35. package/dist/{chunk-XS6PU75S.js → chunk-IVWPPTDM.js} +1 -1
  36. package/dist/{chunk-A7X6OCZE.js → chunk-IXFBUXQW.js} +1 -1
  37. package/dist/{chunk-HSJ6HYAO.js → chunk-IZZTKEZH.js} +18 -10
  38. package/dist/chunk-IZZTKEZH.js.map +7 -0
  39. package/dist/{chunk-2EFL22PV.js → chunk-JI4HCLK7.js} +7 -3
  40. package/dist/chunk-JI4HCLK7.js.map +7 -0
  41. package/dist/chunk-JLVECHVJ.js +36 -0
  42. package/dist/chunk-JLVECHVJ.js.map +7 -0
  43. package/dist/{chunk-XXU2NVOE.js → chunk-KJTPUTU7.js} +30 -6
  44. package/dist/chunk-KJTPUTU7.js.map +7 -0
  45. package/dist/{chunk-V5U6BHT2.js → chunk-KS646CDL.js} +7 -3
  46. package/dist/{chunk-V5U6BHT2.js.map → chunk-KS646CDL.js.map} +1 -1
  47. package/dist/{chunk-53A4JHFW.js → chunk-MJ3MLGVB.js} +23 -4
  48. package/dist/chunk-MJ3MLGVB.js.map +7 -0
  49. package/dist/chunk-MJLWBVZP.js +822 -0
  50. package/dist/chunk-MJLWBVZP.js.map +7 -0
  51. package/dist/chunk-MMF5RMLU.js +65 -0
  52. package/dist/chunk-MMF5RMLU.js.map +7 -0
  53. package/dist/{chunk-QH2M65BR.js → chunk-MUW3J7CP.js} +7 -3
  54. package/dist/{chunk-QH2M65BR.js.map → chunk-MUW3J7CP.js.map} +1 -1
  55. package/dist/{chunk-3LMXSKZ7.js → chunk-NFXLN6FJ.js} +1 -1
  56. package/dist/chunk-NT7RDVDA.js +33 -0
  57. package/dist/{chunk-KQSHIOZK.js.map → chunk-NT7RDVDA.js.map} +1 -1
  58. package/dist/{chunk-OZHBEG7U.js → chunk-O4EKE3YR.js} +15 -5
  59. package/dist/{chunk-OZHBEG7U.js.map → chunk-O4EKE3YR.js.map} +1 -1
  60. package/dist/chunk-Q2OBTLBI.js +5473 -0
  61. package/dist/chunk-Q2OBTLBI.js.map +7 -0
  62. package/dist/{chunk-WWDVA4NV.js → chunk-QJ7MQIHN.js} +22 -6
  63. package/dist/{chunk-WWDVA4NV.js.map → chunk-QJ7MQIHN.js.map} +1 -1
  64. package/dist/{chunk-N5OHRWG2.js → chunk-QSRXXZO7.js} +4 -2
  65. package/dist/{chunk-N5OHRWG2.js.map → chunk-QSRXXZO7.js.map} +1 -1
  66. package/dist/{chunk-GZTCXXSS.js → chunk-QT5GS374.js} +57 -46
  67. package/dist/{chunk-GZTCXXSS.js.map → chunk-QT5GS374.js.map} +1 -1
  68. package/dist/chunk-QX5Y5CE5.js +683 -0
  69. package/dist/{chunk-F3COCCAE.js.map → chunk-QX5Y5CE5.js.map} +1 -1
  70. package/dist/{chunk-IIFUDVGS.js → chunk-U6IF5D3J.js} +310 -177
  71. package/dist/chunk-U6IF5D3J.js.map +7 -0
  72. package/dist/{chunk-VQSCECTS.js → chunk-UPRKGNBR.js} +6 -4
  73. package/dist/{chunk-VQSCECTS.js.map → chunk-UPRKGNBR.js.map} +1 -1
  74. package/dist/chunk-UUCRNFMH.js +62 -0
  75. package/dist/chunk-UUCRNFMH.js.map +7 -0
  76. package/dist/chunk-UYWZQVH5.js +35 -0
  77. package/dist/chunk-UYWZQVH5.js.map +7 -0
  78. package/dist/{chunk-XMGUQHMF.js → chunk-VSSVN6WG.js} +11 -1
  79. package/dist/chunk-VSSVN6WG.js.map +7 -0
  80. package/dist/{chunk-VHS2MZQS.js → chunk-W7Q3VYAB.js} +9 -6
  81. package/dist/{chunk-VHS2MZQS.js.map → chunk-W7Q3VYAB.js.map} +1 -1
  82. package/dist/{chunk-JWXQNBBA.js → chunk-WAXMRSVR.js} +7 -1
  83. package/dist/{chunk-JWXQNBBA.js.map → chunk-WAXMRSVR.js.map} +1 -1
  84. package/dist/{chunk-BWYKUDJR.js → chunk-X3NER6FY.js} +14 -8
  85. package/dist/{chunk-BWYKUDJR.js.map → chunk-X3NER6FY.js.map} +1 -1
  86. package/dist/{chunk-IM33F5CM.js → chunk-XYQZLDRB.js} +1668 -1623
  87. package/dist/chunk-XYQZLDRB.js.map +7 -0
  88. package/dist/{chunk-LOIZNQOU.js → chunk-ZM5FMRLS.js} +9 -3
  89. package/dist/{chunk-LOIZNQOU.js.map → chunk-ZM5FMRLS.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-4KO6TA5J.js} +251 -485
  93. package/dist/cli-4KO6TA5J.js.map +7 -0
  94. package/dist/commands-JSY7CGSU.js +54 -0
  95. package/dist/{config-GTJWCNPF.js → config-DQEFVW3Y.js} +9 -6
  96. package/dist/{context-WF3TTXQU.js → context-HVQCTO5R.js} +8 -7
  97. package/dist/{costTracker-2G3ZI2JF.js → costTracker-VSWW7SRT.js} +3 -2
  98. package/dist/{customCommands-QOWK57EX.js → customCommands-XCINU5TG.js} +6 -5
  99. package/dist/{env-37BAP7QF.js → env-ZOPEXWMF.js} +10 -7
  100. package/dist/{gateway-IZYO6YFJ.js → gateway-SUXSILQL.js} +542 -96
  101. package/dist/gateway-SUXSILQL.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-HB3BYVNG.js} +6 -5
  107. package/dist/{kodeAgentSessionResume-UEEDRJ3N.js → kodeAgentSessionResume-IGSZZY3G.js} +6 -5
  108. package/dist/{kodeAgentStreamJson-VIXFTYL5.js → kodeAgentStreamJson-4ZKIWKS3.js} +4 -2
  109. package/dist/{kodeAgentStreamJsonSession-XC3IPREZ.js → kodeAgentStreamJsonSession-4L76UC75.js} +15 -4
  110. package/dist/kodeAgentStreamJsonSession-4L76UC75.js.map +7 -0
  111. package/dist/{kodeAgentStructuredStdio-SI5C7AAD.js → kodeAgentStructuredStdio-5DCUC6V6.js} +3 -3
  112. package/dist/{kodeHooks-V36SHCTC.js → kodeHooks-H6DMC3XX.js} +6 -5
  113. package/dist/{llm-CYUDKJNR.js → llm-OJZ6DZVC.js} +306 -60
  114. package/dist/llm-OJZ6DZVC.js.map +7 -0
  115. package/dist/{llmLazy-IXVVBRTN.js → llmLazy-TDLZZDPL.js} +2 -2
  116. package/dist/{loader-OEJ6C3TN.js → loader-MOVYZ76M.js} +6 -5
  117. package/dist/{mcp-KE3SILMX.js → mcp-DUYSIR5L.js} +10 -9
  118. package/dist/{mentionProcessor-GAU2WAYB.js → mentionProcessor-EKVLXJN4.js} +14 -7
  119. package/dist/{mentionProcessor-GAU2WAYB.js.map → mentionProcessor-EKVLXJN4.js.map} +1 -1
  120. package/dist/{messages-WCSGGSEU.js → messages-23ICFVMC.js} +2 -2
  121. package/dist/{model-4TQIV5J2.js → model-FUBCTRTV.js} +10 -7
  122. package/dist/{openai-KTZV6F7N.js → openai-SMYIAIO4.js} +8 -7
  123. package/dist/{outputStyles-WX5RYQOA.js → outputStyles-HBOYJFBE.js} +6 -5
  124. package/dist/{pluginRuntime-JXMJZ2LC.js → pluginRuntime-ATZMDZA7.js} +11 -8
  125. package/dist/{pluginRuntime-JXMJZ2LC.js.map → pluginRuntime-ATZMDZA7.js.map} +1 -1
  126. package/dist/{pluginValidation-JNQZYLUP.js → pluginValidation-7CGOMT6F.js} +8 -7
  127. package/dist/prompts-MFESKNYZ.js +58 -0
  128. package/dist/query-BFEFOX4S.js +58 -0
  129. package/dist/{responsesStreaming-2AIT6GHG.js → responsesStreaming-JORGEFQC.js} +1 -1
  130. package/dist/{ripgrep-KDPQAMB2.js → ripgrep-KNJBCJIQ.js} +5 -4
  131. package/dist/sandbox-P3FR4G4D.js +63 -0
  132. package/dist/{skillMarketplace-IXAGP3Q2.js → skillMarketplace-PCMKVV4O.js} +5 -4
  133. package/dist/{state-MSCYLB6Y.js → state-XBYIQ7R4.js} +6 -3
  134. package/dist/structuredOutput-KAVFUV2Z.js +9 -0
  135. package/dist/theme-4ZSXUILR.js +15 -0
  136. package/dist/thinking-TTNUZUB3.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-R6ZGMKP6.js +24 -0
  140. package/dist/toolPermissionContextState-R6ZGMKP6.js.map +7 -0
  141. package/dist/{toolPermissionSettings-EUZKGZU2.js → toolPermissionSettings-GMEYTJEA.js} +9 -8
  142. package/dist/toolPermissionSettings-GMEYTJEA.js.map +7 -0
  143. package/dist/tools-7FVKB7BG.js +55 -0
  144. package/dist/tools-7FVKB7BG.js.map +7 -0
  145. package/dist/{userInput-LJL4CVOB.js → userInput-SZEUY5J6.js} +49 -34
  146. package/dist/{userInput-LJL4CVOB.js.map → userInput-SZEUY5J6.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 +2 -2
  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-DECTPCL5.js.map} +0 -0
  184. /package/dist/{autoUpdater-2GS6LRPK.js.map → autoUpdater-FFMM2DR7.js.map} +0 -0
  185. /package/dist/{chunk-RUXIBQ3B.js.map → chunk-BJYXLCRS.js.map} +0 -0
  186. /package/dist/{chunk-AXWJI6N5.js.map → chunk-D4OZACS2.js.map} +0 -0
  187. /package/dist/{chunk-XS6PU75S.js.map → chunk-IVWPPTDM.js.map} +0 -0
  188. /package/dist/{chunk-A7X6OCZE.js.map → chunk-IXFBUXQW.js.map} +0 -0
  189. /package/dist/{chunk-3LMXSKZ7.js.map → chunk-NFXLN6FJ.js.map} +0 -0
  190. /package/dist/{commands-AVEBLFVS.js.map → commands-JSY7CGSU.js.map} +0 -0
  191. /package/dist/{config-GTJWCNPF.js.map → config-DQEFVW3Y.js.map} +0 -0
  192. /package/dist/{context-WF3TTXQU.js.map → context-HVQCTO5R.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-XCINU5TG.js.map} +0 -0
  195. /package/dist/{env-37BAP7QF.js.map → env-ZOPEXWMF.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-HB3BYVNG.js.map} +0 -0
  199. /package/dist/{kodeAgentStreamJson-VIXFTYL5.js.map → kodeAgentSessionResume-IGSZZY3G.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-H6DMC3XX.js.map} +0 -0
  203. /package/dist/{loader-OEJ6C3TN.js.map → llmLazy-TDLZZDPL.js.map} +0 -0
  204. /package/dist/{mcp-KE3SILMX.js.map → loader-MOVYZ76M.js.map} +0 -0
  205. /package/dist/{messages-WCSGGSEU.js.map → mcp-DUYSIR5L.js.map} +0 -0
  206. /package/dist/{model-4TQIV5J2.js.map → messages-23ICFVMC.js.map} +0 -0
  207. /package/dist/{openai-KTZV6F7N.js.map → model-FUBCTRTV.js.map} +0 -0
  208. /package/dist/{outputStyles-WX5RYQOA.js.map → openai-SMYIAIO4.js.map} +0 -0
  209. /package/dist/{pluginValidation-JNQZYLUP.js.map → outputStyles-HBOYJFBE.js.map} +0 -0
  210. /package/dist/{prompts-LE6GK75N.js.map → pluginValidation-7CGOMT6F.js.map} +0 -0
  211. /package/dist/{query-GGIP6PWG.js.map → prompts-MFESKNYZ.js.map} +0 -0
  212. /package/dist/{responsesStreaming-2AIT6GHG.js.map → query-BFEFOX4S.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-KNJBCJIQ.js.map} +0 -0
  215. /package/dist/{state-MSCYLB6Y.js.map → sandbox-P3FR4G4D.js.map} +0 -0
  216. /package/dist/{theme-GAMFOLBW.js.map → skillMarketplace-PCMKVV4O.js.map} +0 -0
  217. /package/dist/{toolPermissionContext-I3IXPVED.js.map → state-XBYIQ7R4.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-4ZSXUILR.js.map} +0 -0
  220. /package/dist/{uuid-VA3KVASX.js.map → thinking-TTNUZUB3.js.map} +0 -0
@@ -1,16 +1,25 @@
1
1
  import { createRequire as __newcrawCreateRequire } from "node:module";
2
2
  const require = __newcrawCreateRequire(import.meta.url);
3
3
  import {
4
- ConfigParseError
5
- } from "./chunk-KQSHIOZK.js";
4
+ ConfigParseError,
5
+ init_errors
6
+ } from "./chunk-NT7RDVDA.js";
6
7
  import {
7
- debug
8
- } from "./chunk-GZTCXXSS.js";
8
+ debug,
9
+ init_debugLogger
10
+ } from "./chunk-QT5GS374.js";
9
11
  import {
10
12
  getCwd,
11
13
  getGlobalConfigFilePath,
14
+ init_env,
15
+ init_log,
16
+ init_state,
12
17
  logError
13
- } from "./chunk-IM33F5CM.js";
18
+ } from "./chunk-XYQZLDRB.js";
19
+ import {
20
+ __esm,
21
+ __export
22
+ } from "./chunk-D4OZACS2.js";
14
23
 
15
24
  // src/core/config/schema.ts
16
25
  function isAutoUpdaterStatus(value) {
@@ -18,48 +27,41 @@ function isAutoUpdaterStatus(value) {
18
27
  value
19
28
  );
20
29
  }
21
- var GLOBAL_CONFIG_KEYS = [
22
- "autoUpdaterStatus",
23
- "theme",
24
- "hasCompletedOnboarding",
25
- "lastOnboardingVersion",
26
- "lastReleaseNotesSeen",
27
- "verbose",
28
- "customApiKeyResponses",
29
- "primaryProvider",
30
- "preferredNotifChannel",
31
- "maxTokens",
32
- "autoCompactThreshold"
33
- ];
34
30
  function isGlobalConfigKey(key) {
35
31
  return GLOBAL_CONFIG_KEYS.includes(key);
36
32
  }
37
- var PROJECT_CONFIG_KEYS = [
38
- "dontCrawlDirectory",
39
- "enableArchitectTool",
40
- "hasTrustDialogAccepted",
41
- "hasCompletedProjectOnboarding"
42
- ];
43
33
  function isProjectConfigKey(key) {
44
34
  return PROJECT_CONFIG_KEYS.includes(key);
45
35
  }
36
+ var GLOBAL_CONFIG_KEYS, PROJECT_CONFIG_KEYS;
37
+ var init_schema = __esm({
38
+ "src/core/config/schema.ts"() {
39
+ GLOBAL_CONFIG_KEYS = [
40
+ "autoUpdaterStatus",
41
+ "theme",
42
+ "hasCompletedOnboarding",
43
+ "lastOnboardingVersion",
44
+ "lastReleaseNotesSeen",
45
+ "verbose",
46
+ "customApiKeyResponses",
47
+ "primaryProvider",
48
+ "preferredNotifChannel",
49
+ "maxTokens",
50
+ "autoCompactThreshold",
51
+ "slidingWindowThresholdRatio",
52
+ "slidingWindowPreserveCount"
53
+ ];
54
+ PROJECT_CONFIG_KEYS = [
55
+ "dontCrawlDirectory",
56
+ "enableArchitectTool",
57
+ "hasTrustDialogAccepted",
58
+ "hasCompletedProjectOnboarding"
59
+ ];
60
+ }
61
+ });
46
62
 
47
63
  // src/core/config/defaults.ts
48
64
  import { homedir } from "os";
49
- var DEFAULT_PROJECT_CONFIG = {
50
- allowedTools: [],
51
- deniedTools: [],
52
- askedTools: [],
53
- context: {},
54
- history: [],
55
- dontCrawlDirectory: false,
56
- enableArchitectTool: false,
57
- mcpContextUris: [],
58
- mcpServers: {},
59
- approvedMcprcServers: [],
60
- rejectedMcprcServers: [],
61
- hasTrustDialogAccepted: false
62
- };
63
65
  function defaultConfigForProject(projectPath) {
64
66
  const config = { ...DEFAULT_PROJECT_CONFIG };
65
67
  if (projectPath === homedir()) {
@@ -67,34 +69,45 @@ function defaultConfigForProject(projectPath) {
67
69
  }
68
70
  return config;
69
71
  }
70
- var DEFAULT_GLOBAL_CONFIG = {
71
- numStartups: 0,
72
- autoUpdaterStatus: "not_configured",
73
- theme: "dark",
74
- preferredNotifChannel: "iterm2",
75
- verbose: false,
76
- primaryProvider: "anthropic",
77
- customApiKeyResponses: {
78
- approved: [],
79
- rejected: []
80
- },
81
- stream: true,
82
- modelProfiles: [],
83
- modelPointers: {
84
- main: "",
85
- task: "",
86
- compact: "",
87
- quick: ""
88
- },
89
- lastDismissedUpdateVersion: void 0
90
- };
91
-
92
- // src/core/config/loader.ts
93
- import { existsSync, readFileSync, writeFileSync } from "fs";
94
- import { join, posix, resolve, win32 } from "path";
95
- import { cloneDeep, memoize, pick } from "lodash-es";
96
- import { homedir as homedir2 } from "os";
97
- import { randomBytes } from "crypto";
72
+ var DEFAULT_PROJECT_CONFIG, DEFAULT_GLOBAL_CONFIG;
73
+ var init_defaults = __esm({
74
+ "src/core/config/defaults.ts"() {
75
+ DEFAULT_PROJECT_CONFIG = {
76
+ allowedTools: [],
77
+ deniedTools: [],
78
+ askedTools: [],
79
+ context: {},
80
+ dontCrawlDirectory: false,
81
+ enableArchitectTool: false,
82
+ mcpContextUris: [],
83
+ mcpServers: {},
84
+ approvedMcprcServers: [],
85
+ rejectedMcprcServers: [],
86
+ hasTrustDialogAccepted: false
87
+ };
88
+ DEFAULT_GLOBAL_CONFIG = {
89
+ numStartups: 0,
90
+ autoUpdaterStatus: "not_configured",
91
+ theme: "dark",
92
+ preferredNotifChannel: "iterm2",
93
+ verbose: false,
94
+ primaryProvider: "anthropic",
95
+ customApiKeyResponses: {
96
+ approved: [],
97
+ rejected: []
98
+ },
99
+ stream: true,
100
+ modelProfiles: [],
101
+ modelPointers: {
102
+ main: "",
103
+ task: "",
104
+ compact: "",
105
+ quick: ""
106
+ },
107
+ lastDismissedUpdateVersion: void 0
108
+ };
109
+ }
110
+ });
98
111
 
99
112
  // src/utils/text/json.ts
100
113
  function safeParseJSON(json) {
@@ -108,6 +121,11 @@ function safeParseJSON(json) {
108
121
  return null;
109
122
  }
110
123
  }
124
+ var init_json = __esm({
125
+ "src/utils/text/json.ts"() {
126
+ init_log();
127
+ }
128
+ });
111
129
 
112
130
  // src/core/config/migrations.ts
113
131
  function migrateModelProfilesRemoveId(config) {
@@ -155,8 +173,43 @@ function migrateModelProfilesRemoveId(config) {
155
173
  defaultModelName
156
174
  };
157
175
  }
176
+ var init_migrations = __esm({
177
+ "src/core/config/migrations.ts"() {
178
+ }
179
+ });
158
180
 
159
181
  // src/core/config/loader.ts
182
+ var loader_exports = {};
183
+ __export(loader_exports, {
184
+ TEST_MCPRC_CONFIG_FOR_TESTING: () => TEST_MCPRC_CONFIG_FOR_TESTING,
185
+ addMcprcServerForTesting: () => addMcprcServerForTesting,
186
+ checkHasTrustDialogAccepted: () => checkHasTrustDialogAccepted,
187
+ clearMcprcConfigForTesting: () => clearMcprcConfigForTesting,
188
+ deleteConfigForCLI: () => deleteConfigForCLI,
189
+ enableConfigs: () => enableConfigs,
190
+ getAnthropicApiKey: () => getAnthropicApiKey,
191
+ getConfigForCLI: () => getConfigForCLI,
192
+ getCurrentProjectConfig: () => getCurrentProjectConfig,
193
+ getCustomApiKeyStatus: () => getCustomApiKeyStatus,
194
+ getGlobalConfig: () => getGlobalConfig,
195
+ getMcprcConfig: () => getMcprcConfig,
196
+ getOpenAIApiKey: () => getOpenAIApiKey,
197
+ getOrCreateUserID: () => getOrCreateUserID,
198
+ getProjectMcpServerDefinitions: () => getProjectMcpServerDefinitions,
199
+ isAutoUpdaterDisabled: () => isAutoUpdaterDisabled,
200
+ listConfigForCLI: () => listConfigForCLI,
201
+ normalizeApiKeyForConfig: () => normalizeApiKeyForConfig,
202
+ normalizeProjectPathForComparison: () => normalizeProjectPathForComparison,
203
+ removeMcprcServerForTesting: () => removeMcprcServerForTesting,
204
+ saveCurrentProjectConfig: () => saveCurrentProjectConfig,
205
+ saveGlobalConfig: () => saveGlobalConfig,
206
+ setConfigForCLI: () => setConfigForCLI
207
+ });
208
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
209
+ import { dirname, join, posix, resolve, win32 } from "path";
210
+ import { cloneDeep, memoize, pick } from "lodash-es";
211
+ import { homedir as homedir2 } from "os";
212
+ import { randomBytes } from "crypto";
160
213
  function expandHomeDirForPlatform(input, homeDirPath, platform) {
161
214
  const trimmed = input.trim();
162
215
  if (!trimmed) return trimmed;
@@ -210,13 +263,6 @@ function checkHasTrustDialogAccepted() {
210
263
  }
211
264
  return false;
212
265
  }
213
- var TEST_GLOBAL_CONFIG_FOR_TESTING = {
214
- ...DEFAULT_GLOBAL_CONFIG,
215
- autoUpdaterStatus: "disabled"
216
- };
217
- var TEST_PROJECT_CONFIG_FOR_TESTING = {
218
- ...DEFAULT_PROJECT_CONFIG
219
- };
220
266
  function saveGlobalConfig(config) {
221
267
  if (process.env.NODE_ENV === "test") {
222
268
  for (const key in config) {
@@ -260,6 +306,7 @@ function saveConfig(file, config, defaultConfig) {
260
306
  )
261
307
  );
262
308
  try {
309
+ mkdirSync(dirname(file), { recursive: true });
263
310
  writeFileSync(file, JSON.stringify(filteredConfig, null, 2), "utf-8");
264
311
  } catch (error) {
265
312
  const err = error;
@@ -273,7 +320,6 @@ function saveConfig(file, config, defaultConfig) {
273
320
  throw error;
274
321
  }
275
322
  }
276
- var configReadingAllowed = false;
277
323
  function enableConfigs() {
278
324
  configReadingAllowed = true;
279
325
  getConfig(
@@ -398,7 +444,6 @@ async function isAutoUpdaterDisabled() {
398
444
  const status = getGlobalConfig().autoUpdaterStatus;
399
445
  return status !== "enabled";
400
446
  }
401
- var TEST_MCPRC_CONFIG_FOR_TESTING = {};
402
447
  function clearMcprcConfigForTesting() {
403
448
  if (process.env.NODE_ENV === "test") {
404
449
  Object.keys(TEST_MCPRC_CONFIG_FOR_TESTING).forEach((key) => {
@@ -419,39 +464,6 @@ function removeMcprcServerForTesting(name) {
419
464
  delete TEST_MCPRC_CONFIG_FOR_TESTING[name];
420
465
  }
421
466
  }
422
- var getMcprcConfig = memoize(
423
- () => {
424
- if (process.env.NODE_ENV === "test") {
425
- return TEST_MCPRC_CONFIG_FOR_TESTING;
426
- }
427
- const mcprcPath = join(getCwd(), ".mcprc");
428
- if (!existsSync(mcprcPath)) {
429
- return {};
430
- }
431
- try {
432
- const mcprcContent = readFileSync(mcprcPath, "utf-8");
433
- const config = safeParseJSON(mcprcContent);
434
- if (config && typeof config === "object") {
435
- return config;
436
- }
437
- } catch {
438
- }
439
- return {};
440
- },
441
- () => {
442
- const cwd = getCwd();
443
- const mcprcPath = join(cwd, ".mcprc");
444
- if (existsSync(mcprcPath)) {
445
- try {
446
- const stat = readFileSync(mcprcPath, "utf-8");
447
- return `${cwd}:${stat}`;
448
- } catch {
449
- return cwd;
450
- }
451
- }
452
- return cwd;
453
- }
454
- );
455
467
  function parseMcpServersFromMcpJson(value) {
456
468
  if (!value || typeof value !== "object" || Array.isArray(value)) return {};
457
469
  const raw = value.mcpServers;
@@ -466,73 +478,6 @@ function parseMcpServersFromMcprc(value) {
466
478
  }
467
479
  return value;
468
480
  }
469
- var getProjectMcpServerDefinitions = memoize(
470
- () => {
471
- if (process.env.NODE_ENV === "test") {
472
- return {
473
- servers: {},
474
- sources: {},
475
- mcpJsonPath: join(getCwd(), ".mcp.json"),
476
- mcprcPath: join(getCwd(), ".mcprc")
477
- };
478
- }
479
- const cwd = getCwd();
480
- const mcpJsonPath = join(cwd, ".mcp.json");
481
- const mcprcPath = join(cwd, ".mcprc");
482
- let mcpJsonServers = {};
483
- let mcprcServers = {};
484
- if (existsSync(mcpJsonPath)) {
485
- try {
486
- const content = readFileSync(mcpJsonPath, "utf-8");
487
- const parsed = safeParseJSON(content);
488
- mcpJsonServers = parseMcpServersFromMcpJson(parsed);
489
- } catch {
490
- }
491
- }
492
- if (existsSync(mcprcPath)) {
493
- try {
494
- const content = readFileSync(mcprcPath, "utf-8");
495
- const parsed = safeParseJSON(content);
496
- mcprcServers = parseMcpServersFromMcprc(parsed);
497
- } catch {
498
- }
499
- }
500
- const sources = {};
501
- for (const name of Object.keys(mcpJsonServers)) {
502
- sources[name] = ".mcp.json";
503
- }
504
- for (const name of Object.keys(mcprcServers)) {
505
- sources[name] = ".mcprc";
506
- }
507
- return {
508
- servers: { ...mcpJsonServers, ...mcprcServers },
509
- sources,
510
- mcpJsonPath,
511
- mcprcPath
512
- };
513
- },
514
- () => {
515
- const cwd = getCwd();
516
- const mcpJsonPath = join(cwd, ".mcp.json");
517
- const mcprcPath = join(cwd, ".mcprc");
518
- const parts = [cwd];
519
- if (existsSync(mcpJsonPath)) {
520
- try {
521
- parts.push("mcp.json");
522
- parts.push(readFileSync(mcpJsonPath, "utf-8"));
523
- } catch {
524
- }
525
- }
526
- if (existsSync(mcprcPath)) {
527
- try {
528
- parts.push("mcprc");
529
- parts.push(readFileSync(mcprcPath, "utf-8"));
530
- } catch {
531
- }
532
- }
533
- return parts.join(":");
534
- }
535
- );
536
481
  function getOrCreateUserID() {
537
482
  const config = getGlobalConfig();
538
483
  if (config.userID) {
@@ -634,6 +579,128 @@ function getOpenAIApiKey() {
634
579
  function getAnthropicApiKey() {
635
580
  return process.env.ANTHROPIC_API_KEY || "";
636
581
  }
582
+ var TEST_GLOBAL_CONFIG_FOR_TESTING, TEST_PROJECT_CONFIG_FOR_TESTING, configReadingAllowed, TEST_MCPRC_CONFIG_FOR_TESTING, getMcprcConfig, getProjectMcpServerDefinitions;
583
+ var init_loader = __esm({
584
+ "src/core/config/loader.ts"() {
585
+ init_env();
586
+ init_state();
587
+ init_json();
588
+ init_errors();
589
+ init_debugLogger();
590
+ init_defaults();
591
+ init_schema();
592
+ init_migrations();
593
+ TEST_GLOBAL_CONFIG_FOR_TESTING = {
594
+ ...DEFAULT_GLOBAL_CONFIG,
595
+ autoUpdaterStatus: "disabled"
596
+ };
597
+ TEST_PROJECT_CONFIG_FOR_TESTING = {
598
+ ...DEFAULT_PROJECT_CONFIG
599
+ };
600
+ configReadingAllowed = false;
601
+ TEST_MCPRC_CONFIG_FOR_TESTING = {};
602
+ getMcprcConfig = memoize(
603
+ () => {
604
+ if (process.env.NODE_ENV === "test") {
605
+ return TEST_MCPRC_CONFIG_FOR_TESTING;
606
+ }
607
+ const mcprcPath = join(getCwd(), ".mcprc");
608
+ if (!existsSync(mcprcPath)) {
609
+ return {};
610
+ }
611
+ try {
612
+ const mcprcContent = readFileSync(mcprcPath, "utf-8");
613
+ const config = safeParseJSON(mcprcContent);
614
+ if (config && typeof config === "object") {
615
+ return config;
616
+ }
617
+ } catch {
618
+ }
619
+ return {};
620
+ },
621
+ () => {
622
+ const cwd = getCwd();
623
+ const mcprcPath = join(cwd, ".mcprc");
624
+ if (existsSync(mcprcPath)) {
625
+ try {
626
+ const stat = readFileSync(mcprcPath, "utf-8");
627
+ return `${cwd}:${stat}`;
628
+ } catch {
629
+ return cwd;
630
+ }
631
+ }
632
+ return cwd;
633
+ }
634
+ );
635
+ getProjectMcpServerDefinitions = memoize(
636
+ () => {
637
+ if (process.env.NODE_ENV === "test") {
638
+ return {
639
+ servers: {},
640
+ sources: {},
641
+ mcpJsonPath: join(getCwd(), ".mcp.json"),
642
+ mcprcPath: join(getCwd(), ".mcprc")
643
+ };
644
+ }
645
+ const cwd = getCwd();
646
+ const mcpJsonPath = join(cwd, ".mcp.json");
647
+ const mcprcPath = join(cwd, ".mcprc");
648
+ let mcpJsonServers = {};
649
+ let mcprcServers = {};
650
+ if (existsSync(mcpJsonPath)) {
651
+ try {
652
+ const content = readFileSync(mcpJsonPath, "utf-8");
653
+ const parsed = safeParseJSON(content);
654
+ mcpJsonServers = parseMcpServersFromMcpJson(parsed);
655
+ } catch {
656
+ }
657
+ }
658
+ if (existsSync(mcprcPath)) {
659
+ try {
660
+ const content = readFileSync(mcprcPath, "utf-8");
661
+ const parsed = safeParseJSON(content);
662
+ mcprcServers = parseMcpServersFromMcprc(parsed);
663
+ } catch {
664
+ }
665
+ }
666
+ const sources = {};
667
+ for (const name of Object.keys(mcpJsonServers)) {
668
+ sources[name] = ".mcp.json";
669
+ }
670
+ for (const name of Object.keys(mcprcServers)) {
671
+ sources[name] = ".mcprc";
672
+ }
673
+ return {
674
+ servers: { ...mcpJsonServers, ...mcprcServers },
675
+ sources,
676
+ mcpJsonPath,
677
+ mcprcPath
678
+ };
679
+ },
680
+ () => {
681
+ const cwd = getCwd();
682
+ const mcpJsonPath = join(cwd, ".mcp.json");
683
+ const mcprcPath = join(cwd, ".mcprc");
684
+ const parts = [cwd];
685
+ if (existsSync(mcpJsonPath)) {
686
+ try {
687
+ parts.push("mcp.json");
688
+ parts.push(readFileSync(mcpJsonPath, "utf-8"));
689
+ } catch {
690
+ }
691
+ }
692
+ if (existsSync(mcprcPath)) {
693
+ try {
694
+ parts.push("mcprc");
695
+ parts.push(readFileSync(mcprcPath, "utf-8"));
696
+ } catch {
697
+ }
698
+ }
699
+ return parts.join(":");
700
+ }
701
+ );
702
+ }
703
+ });
637
704
 
638
705
  // src/core/config/validator.ts
639
706
  function setAllPointersToModel(modelName) {
@@ -660,7 +727,7 @@ function setModelPointer(pointer, modelName) {
660
727
  }
661
728
  };
662
729
  saveGlobalConfig(updatedConfig);
663
- import("./model-4TQIV5J2.js").then(({ reloadModelManager }) => {
730
+ import("./model-FUBCTRTV.js").then(({ reloadModelManager }) => {
664
731
  reloadModelManager();
665
732
  });
666
733
  }
@@ -795,6 +862,67 @@ function createGPT5ModelProfile(name, modelName, apiKey, baseURL, provider = "op
795
862
  };
796
863
  return profile;
797
864
  }
865
+ var init_validator = __esm({
866
+ "src/core/config/validator.ts"() {
867
+ init_debugLogger();
868
+ init_loader();
869
+ }
870
+ });
871
+
872
+ // src/core/config/index.ts
873
+ var init_config = __esm({
874
+ "src/core/config/index.ts"() {
875
+ init_schema();
876
+ init_defaults();
877
+ init_loader();
878
+ init_validator();
879
+ }
880
+ });
881
+
882
+ // src/utils/config/index.ts
883
+ var config_exports = {};
884
+ __export(config_exports, {
885
+ DEFAULT_GLOBAL_CONFIG: () => DEFAULT_GLOBAL_CONFIG,
886
+ GLOBAL_CONFIG_KEYS: () => GLOBAL_CONFIG_KEYS,
887
+ PROJECT_CONFIG_KEYS: () => PROJECT_CONFIG_KEYS,
888
+ TEST_MCPRC_CONFIG_FOR_TESTING: () => TEST_MCPRC_CONFIG_FOR_TESTING,
889
+ addMcprcServerForTesting: () => addMcprcServerForTesting,
890
+ checkHasTrustDialogAccepted: () => checkHasTrustDialogAccepted,
891
+ clearMcprcConfigForTesting: () => clearMcprcConfigForTesting,
892
+ createGPT5ModelProfile: () => createGPT5ModelProfile,
893
+ deleteConfigForCLI: () => deleteConfigForCLI,
894
+ enableConfigs: () => enableConfigs,
895
+ getAnthropicApiKey: () => getAnthropicApiKey,
896
+ getConfigForCLI: () => getConfigForCLI,
897
+ getCurrentProjectConfig: () => getCurrentProjectConfig,
898
+ getCustomApiKeyStatus: () => getCustomApiKeyStatus,
899
+ getGPT5ConfigRecommendations: () => getGPT5ConfigRecommendations,
900
+ getGlobalConfig: () => getGlobalConfig,
901
+ getMcprcConfig: () => getMcprcConfig,
902
+ getOpenAIApiKey: () => getOpenAIApiKey,
903
+ getOrCreateUserID: () => getOrCreateUserID,
904
+ getProjectMcpServerDefinitions: () => getProjectMcpServerDefinitions,
905
+ isAutoUpdaterDisabled: () => isAutoUpdaterDisabled,
906
+ isAutoUpdaterStatus: () => isAutoUpdaterStatus,
907
+ isGPT5ModelName: () => isGPT5ModelName,
908
+ isGlobalConfigKey: () => isGlobalConfigKey,
909
+ isProjectConfigKey: () => isProjectConfigKey,
910
+ listConfigForCLI: () => listConfigForCLI,
911
+ normalizeApiKeyForConfig: () => normalizeApiKeyForConfig,
912
+ removeMcprcServerForTesting: () => removeMcprcServerForTesting,
913
+ saveCurrentProjectConfig: () => saveCurrentProjectConfig,
914
+ saveGlobalConfig: () => saveGlobalConfig,
915
+ setAllPointersToModel: () => setAllPointersToModel,
916
+ setConfigForCLI: () => setConfigForCLI,
917
+ setModelPointer: () => setModelPointer,
918
+ validateAndRepairAllGPT5Profiles: () => validateAndRepairAllGPT5Profiles,
919
+ validateAndRepairGPT5Profile: () => validateAndRepairGPT5Profile
920
+ });
921
+ var init_config2 = __esm({
922
+ "src/utils/config/index.ts"() {
923
+ init_config();
924
+ }
925
+ });
798
926
 
799
927
  export {
800
928
  isAutoUpdaterStatus,
@@ -804,6 +932,7 @@ export {
804
932
  isProjectConfigKey,
805
933
  DEFAULT_GLOBAL_CONFIG,
806
934
  safeParseJSON,
935
+ init_json,
807
936
  checkHasTrustDialogAccepted,
808
937
  saveGlobalConfig,
809
938
  getGlobalConfig,
@@ -826,11 +955,15 @@ export {
826
955
  listConfigForCLI,
827
956
  getOpenAIApiKey,
828
957
  getAnthropicApiKey,
958
+ loader_exports,
959
+ init_loader,
829
960
  setAllPointersToModel,
830
961
  setModelPointer,
831
962
  isGPT5ModelName,
832
963
  validateAndRepairGPT5Profile,
833
964
  validateAndRepairAllGPT5Profiles,
834
965
  getGPT5ConfigRecommendations,
835
- createGPT5ModelProfile
966
+ createGPT5ModelProfile,
967
+ config_exports,
968
+ init_config2 as init_config
836
969
  };