@caspian2026/agent-sdk 0.0.24 → 0.0.26

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 (362) hide show
  1. package/dist/gateway/index.js +98 -22
  2. package/dist/gateway/worker.js +196 -47
  3. package/dist/sdk/query.cjs +2 -362
  4. package/dist/sdk/query.js +2 -367
  5. package/package.json +4 -6
  6. package/dist/chunk-05kvhzd7.js +0 -3561
  7. package/dist/chunk-07069jq1.js +0 -30
  8. package/dist/chunk-0731m51q.js +0 -8
  9. package/dist/chunk-08bspa4b.js +0 -673
  10. package/dist/chunk-0brkf8q8.js +0 -89
  11. package/dist/chunk-0n843xh7.js +0 -261
  12. package/dist/chunk-0nbp5jwx.js +0 -8583
  13. package/dist/chunk-0nj16az9.js +0 -169
  14. package/dist/chunk-0paqc2yw.js +0 -15
  15. package/dist/chunk-0q6b50ps.js +0 -111
  16. package/dist/chunk-0r5bb9j4.js +0 -477
  17. package/dist/chunk-0rpz1wgn.js +0 -1030
  18. package/dist/chunk-0t81d427.js +0 -41
  19. package/dist/chunk-0vaw02wq.js +0 -24
  20. package/dist/chunk-0vkfrmqm.js +0 -690
  21. package/dist/chunk-0vp3wfab.js +0 -12
  22. package/dist/chunk-0vr10742.js +0 -1809
  23. package/dist/chunk-0xjaqda8.js +0 -1124
  24. package/dist/chunk-13ehyphg.js +0 -223
  25. package/dist/chunk-15jsw9bb.js +0 -349
  26. package/dist/chunk-16m7eyyw.js +0 -1385
  27. package/dist/chunk-1ae3nt9j.js +0 -31
  28. package/dist/chunk-1gq4r3v1.js +0 -308
  29. package/dist/chunk-1gx78081.js +0 -66
  30. package/dist/chunk-1h2famwb.js +0 -49
  31. package/dist/chunk-1n546sfg.js +0 -200
  32. package/dist/chunk-1qg06d60.js +0 -494
  33. package/dist/chunk-1t0rqstn.js +0 -146
  34. package/dist/chunk-1z8p2eqd.js +0 -40
  35. package/dist/chunk-1zjh9cc5.js +0 -266
  36. package/dist/chunk-20ahkkrb.js +0 -132
  37. package/dist/chunk-21pbfch8.js +0 -105
  38. package/dist/chunk-26wtxbdc.js +0 -13870
  39. package/dist/chunk-2fwze72g.js +0 -24
  40. package/dist/chunk-2gcbr1c7.js +0 -107
  41. package/dist/chunk-2grc1yr8.js +0 -654
  42. package/dist/chunk-2gzv8nrw.js +0 -205
  43. package/dist/chunk-2r212cvt.js +0 -253
  44. package/dist/chunk-2s74bt6e.js +0 -317
  45. package/dist/chunk-2v385w7r.js +0 -7422
  46. package/dist/chunk-2wtkvpp2.js +0 -167
  47. package/dist/chunk-31rsspfr.js +0 -418
  48. package/dist/chunk-3c25bcsw.js +0 -17
  49. package/dist/chunk-3jm08aaw.js +0 -91
  50. package/dist/chunk-3mgywd32.js +0 -8
  51. package/dist/chunk-3nk79af8.js +0 -8
  52. package/dist/chunk-3v4sk2py.js +0 -101
  53. package/dist/chunk-3vwft0eh.js +0 -349
  54. package/dist/chunk-3vy1jt9p.js +0 -1010
  55. package/dist/chunk-3wvqzq9w.js +0 -92
  56. package/dist/chunk-3wvv2s8d.js +0 -336
  57. package/dist/chunk-4060b3s2.js +0 -108
  58. package/dist/chunk-434e0vh4.js +0 -275
  59. package/dist/chunk-46dm23zs.js +0 -344
  60. package/dist/chunk-4bh4qs70.js +0 -209
  61. package/dist/chunk-4cxzbqws.js +0 -94
  62. package/dist/chunk-4jm600zv.js +0 -13
  63. package/dist/chunk-4k9d7gxv.js +0 -118
  64. package/dist/chunk-4nc3t6ms.js +0 -396
  65. package/dist/chunk-4pbx3g7s.js +0 -26
  66. package/dist/chunk-4qhh8bpa.js +0 -54
  67. package/dist/chunk-4v63px9y.js +0 -133
  68. package/dist/chunk-4xnnzt3j.js +0 -74
  69. package/dist/chunk-4zchh01h.js +0 -201
  70. package/dist/chunk-5216fha8.js +0 -1163
  71. package/dist/chunk-55raexh7.js +0 -14358
  72. package/dist/chunk-5bffhf64.js +0 -81
  73. package/dist/chunk-5ccdsxgy.js +0 -74
  74. package/dist/chunk-5ddh2hyn.js +0 -91
  75. package/dist/chunk-5e6ncq5j.js +0 -61
  76. package/dist/chunk-5ekyhb1w.js +0 -422
  77. package/dist/chunk-5fy4r8rv.js +0 -52
  78. package/dist/chunk-5h5kx2jd.js +0 -34
  79. package/dist/chunk-5mbgdvyz.js +0 -847
  80. package/dist/chunk-5n1jc02d.js +0 -87
  81. package/dist/chunk-5pysjah8.js +0 -1543
  82. package/dist/chunk-5ssfz438.js +0 -323
  83. package/dist/chunk-5z28bqne.js +0 -6748
  84. package/dist/chunk-603y0mmg.js +0 -50
  85. package/dist/chunk-62v5kkff.js +0 -90
  86. package/dist/chunk-64c1avct.js +0 -13
  87. package/dist/chunk-64r16v22.js +0 -162
  88. package/dist/chunk-64smdx4a.js +0 -418
  89. package/dist/chunk-66zry909.js +0 -11
  90. package/dist/chunk-68ffk5qa.js +0 -14
  91. package/dist/chunk-69n11zng.js +0 -436
  92. package/dist/chunk-6dj5t602.js +0 -341
  93. package/dist/chunk-6dngjwkh.js +0 -63
  94. package/dist/chunk-6nsd9606.js +0 -790
  95. package/dist/chunk-6pkh8frk.js +0 -253
  96. package/dist/chunk-6qcmt5eb.js +0 -251
  97. package/dist/chunk-6ww7451s.js +0 -60
  98. package/dist/chunk-6xgb0kqz.js +0 -90
  99. package/dist/chunk-72ys9m07.js +0 -121
  100. package/dist/chunk-741sgvtx.js +0 -121
  101. package/dist/chunk-7aw745vx.js +0 -40175
  102. package/dist/chunk-7c8b8cfb.js +0 -219
  103. package/dist/chunk-7mwt4e1z.js +0 -234
  104. package/dist/chunk-7sgtxrsc.js +0 -1059
  105. package/dist/chunk-7wm5s02e.js +0 -216
  106. package/dist/chunk-7xyswgjh.js +0 -8
  107. package/dist/chunk-80a197ez.js +0 -1438
  108. package/dist/chunk-83hfzbx3.js +0 -10
  109. package/dist/chunk-8akrsgad.js +0 -55
  110. package/dist/chunk-8g5pe1gr.js +0 -37
  111. package/dist/chunk-8s07t4k7.js +0 -40
  112. package/dist/chunk-8yhf030a.js +0 -69
  113. package/dist/chunk-928tzaa8.js +0 -107
  114. package/dist/chunk-949pjzj9.js +0 -266
  115. package/dist/chunk-9aycd4z9.js +0 -490
  116. package/dist/chunk-9bzqvsz5.js +0 -211
  117. package/dist/chunk-9q3xfy27.js +0 -460
  118. package/dist/chunk-9vzg1360.js +0 -153
  119. package/dist/chunk-9wbh8n1y.js +0 -63
  120. package/dist/chunk-9x5zgy22.js +0 -12
  121. package/dist/chunk-9zdj4ypz.js +0 -206
  122. package/dist/chunk-a0bvcgyd.js +0 -127
  123. package/dist/chunk-a4m3yr2q.js +0 -117
  124. package/dist/chunk-a8jd4gee.js +0 -227
  125. package/dist/chunk-ase86y73.js +0 -15
  126. package/dist/chunk-atfzpm6r.js +0 -325
  127. package/dist/chunk-awqsddp2.js +0 -338
  128. package/dist/chunk-awrgzpk6.js +0 -29
  129. package/dist/chunk-b0kf00ff.js +0 -637
  130. package/dist/chunk-b1kcd3ss.js +0 -27
  131. package/dist/chunk-b4hy21c4.js +0 -140
  132. package/dist/chunk-b9mkm8mg.js +0 -111
  133. package/dist/chunk-bdjx14rd.js +0 -594
  134. package/dist/chunk-bfb41q9h.js +0 -295
  135. package/dist/chunk-bg4x9ex0.js +0 -21
  136. package/dist/chunk-bh5zqvyc.js +0 -36
  137. package/dist/chunk-bn0zv2y2.js +0 -1154
  138. package/dist/chunk-bn7t681c.js +0 -2669
  139. package/dist/chunk-br4wgffc.js +0 -393
  140. package/dist/chunk-brjd9zmk.js +0 -42
  141. package/dist/chunk-byfawrfx.js +0 -121
  142. package/dist/chunk-c6sjhj89.js +0 -1284
  143. package/dist/chunk-c7jwbe76.js +0 -29030
  144. package/dist/chunk-cdef9v7b.js +0 -27
  145. package/dist/chunk-cdz5yb0r.js +0 -57
  146. package/dist/chunk-cevq1787.js +0 -2718
  147. package/dist/chunk-cgfdkzhb.js +0 -12
  148. package/dist/chunk-cgqw4x5z.js +0 -155
  149. package/dist/chunk-cmmmc8e0.js +0 -212
  150. package/dist/chunk-cnsj3vq2.js +0 -35
  151. package/dist/chunk-cxrktb5g.js +0 -51
  152. package/dist/chunk-cyhrb0bk.js +0 -251
  153. package/dist/chunk-d23rmn8r.js +0 -62
  154. package/dist/chunk-d4mdda98.js +0 -94
  155. package/dist/chunk-dcwp94cj.js +0 -152
  156. package/dist/chunk-ddsjkqs4.js +0 -39
  157. package/dist/chunk-ddv56j39.js +0 -148
  158. package/dist/chunk-dfq6pbq7.js +0 -5822
  159. package/dist/chunk-dfzkwynj.js +0 -5368
  160. package/dist/chunk-dkgkd8b7.js +0 -516
  161. package/dist/chunk-dpnmf0pq.js +0 -312
  162. package/dist/chunk-dygx7vcc.js +0 -226
  163. package/dist/chunk-e0abab5b.js +0 -445
  164. package/dist/chunk-e5qhvhjy.js +0 -168
  165. package/dist/chunk-e60y6r1n.js +0 -20
  166. package/dist/chunk-e68kgvcq.js +0 -79
  167. package/dist/chunk-e9w9zc0g.js +0 -392
  168. package/dist/chunk-ecj9w6tm.js +0 -558
  169. package/dist/chunk-ehtwnxpg.js +0 -1591
  170. package/dist/chunk-eqp1rfft.js +0 -17
  171. package/dist/chunk-etdt1xz3.js +0 -19
  172. package/dist/chunk-ewadzrm8.js +0 -103
  173. package/dist/chunk-f03s83vj.js +0 -91
  174. package/dist/chunk-f3kk0p3s.js +0 -150
  175. package/dist/chunk-f3pjerx4.js +0 -4265
  176. package/dist/chunk-f6h5weh6.js +0 -61
  177. package/dist/chunk-fajg8x36.js +0 -8158
  178. package/dist/chunk-fbv4apne.js +0 -51
  179. package/dist/chunk-fcynwjpm.js +0 -1072
  180. package/dist/chunk-fdvaf6nn.js +0 -20
  181. package/dist/chunk-feyzykye.js +0 -10
  182. package/dist/chunk-ff85rwvc.js +0 -180
  183. package/dist/chunk-fqak69ft.js +0 -458
  184. package/dist/chunk-fxdkbabd.js +0 -195
  185. package/dist/chunk-fyc5fepv.js +0 -10
  186. package/dist/chunk-g78c6ztj.js +0 -89
  187. package/dist/chunk-g8ee7yza.js +0 -105
  188. package/dist/chunk-g9f19ttm.js +0 -15
  189. package/dist/chunk-gcktsbxb.js +0 -77
  190. package/dist/chunk-gdwdqewd.js +0 -19
  191. package/dist/chunk-gg55fns0.js +0 -6440
  192. package/dist/chunk-gnpt1t6q.js +0 -209364
  193. package/dist/chunk-gsbw2j2b.js +0 -276
  194. package/dist/chunk-gybt680f.js +0 -9114
  195. package/dist/chunk-gz1e8y1w.js +0 -33
  196. package/dist/chunk-gz7vn2gg.js +0 -114
  197. package/dist/chunk-h0d5eat0.js +0 -101
  198. package/dist/chunk-h27tjbp3.js +0 -33118
  199. package/dist/chunk-h2yy8k4c.js +0 -58
  200. package/dist/chunk-h5acpdqt.js +0 -103
  201. package/dist/chunk-h63r8vps.js +0 -2840
  202. package/dist/chunk-h64x5b04.js +0 -860
  203. package/dist/chunk-h92snc84.js +0 -420
  204. package/dist/chunk-h9n54swm.js +0 -27
  205. package/dist/chunk-hafcrnpc.js +0 -145
  206. package/dist/chunk-hakdhagh.js +0 -16606
  207. package/dist/chunk-hk4phsaw.js +0 -388
  208. package/dist/chunk-hph1bmqw.js +0 -65
  209. package/dist/chunk-hvnztnp3.js +0 -71
  210. package/dist/chunk-hwfknpxv.js +0 -39
  211. package/dist/chunk-j2xxd002.js +0 -1052
  212. package/dist/chunk-j3qbygme.js +0 -105
  213. package/dist/chunk-j5bth84e.js +0 -97
  214. package/dist/chunk-j64ga6ta.js +0 -8035
  215. package/dist/chunk-jbwgyskk.js +0 -385
  216. package/dist/chunk-jd32zbps.js +0 -15
  217. package/dist/chunk-jdhkh2bb.js +0 -618
  218. package/dist/chunk-jeqcwgt7.js +0 -177
  219. package/dist/chunk-jf75p9ap.js +0 -445
  220. package/dist/chunk-jgvk0za1.js +0 -260
  221. package/dist/chunk-jhpaevah.js +0 -565
  222. package/dist/chunk-jmjwrbwd.js +0 -635
  223. package/dist/chunk-jpdbfwvq.js +0 -100
  224. package/dist/chunk-jps4m6sz.js +0 -183
  225. package/dist/chunk-jwf0s51s.js +0 -867
  226. package/dist/chunk-jxge4dgh.js +0 -83
  227. package/dist/chunk-jz71gv95.js +0 -1161
  228. package/dist/chunk-jzthz1bx.js +0 -15
  229. package/dist/chunk-jzvd2ycp.js +0 -120
  230. package/dist/chunk-k0p9w03v.js +0 -4957
  231. package/dist/chunk-k4dcreh0.js +0 -442
  232. package/dist/chunk-k7akhwkn.js +0 -151
  233. package/dist/chunk-k8vp0atq.js +0 -2331
  234. package/dist/chunk-kgd7gfvk.js +0 -407
  235. package/dist/chunk-km5ycg1j.js +0 -87
  236. package/dist/chunk-kvyrxzj8.js +0 -26
  237. package/dist/chunk-kwekc97v.js +0 -18
  238. package/dist/chunk-ky1z78ve.js +0 -119
  239. package/dist/chunk-mcws22k3.js +0 -42
  240. package/dist/chunk-mjazvyd8.js +0 -528
  241. package/dist/chunk-mswx2nma.js +0 -103
  242. package/dist/chunk-mz6a0phh.js +0 -2962
  243. package/dist/chunk-n2tg12hg.js +0 -374
  244. package/dist/chunk-n3fv4ya7.js +0 -146
  245. package/dist/chunk-n4eabmqd.js +0 -93
  246. package/dist/chunk-n4tx7baq.js +0 -193
  247. package/dist/chunk-n6g4jbeh.js +0 -289
  248. package/dist/chunk-n6wzfxf1.js +0 -100
  249. package/dist/chunk-ndcmqfkv.js +0 -244
  250. package/dist/chunk-netzwgv1.js +0 -154
  251. package/dist/chunk-nhcg04jt.js +0 -120
  252. package/dist/chunk-nhsm3ntd.js +0 -439
  253. package/dist/chunk-njev89d1.js +0 -2335
  254. package/dist/chunk-nmgj86tt.js +0 -24
  255. package/dist/chunk-ns7x6xam.js +0 -22820
  256. package/dist/chunk-p7vkh4wx.js +0 -15
  257. package/dist/chunk-p8na2wwp.js +0 -14
  258. package/dist/chunk-p97fd5af.js +0 -684
  259. package/dist/chunk-pe3rkfp2.js +0 -74
  260. package/dist/chunk-pgtnj1mt.js +0 -705
  261. package/dist/chunk-phmnkw9y.js +0 -283
  262. package/dist/chunk-pnds7g1q.js +0 -130
  263. package/dist/chunk-ppwjyveh.js +0 -8
  264. package/dist/chunk-pqqxdk5f.js +0 -543
  265. package/dist/chunk-ps49ymvj.js +0 -43
  266. package/dist/chunk-pwwa7s62.js +0 -11
  267. package/dist/chunk-q3hfrat2.js +0 -313
  268. package/dist/chunk-qajrkk97.js +0 -298
  269. package/dist/chunk-qatfdxvd.js +0 -34
  270. package/dist/chunk-qb5qcctj.js +0 -206
  271. package/dist/chunk-qb6k2afy.js +0 -153
  272. package/dist/chunk-qgk93a75.js +0 -85
  273. package/dist/chunk-qkczt8cr.js +0 -24
  274. package/dist/chunk-qn1be1vf.js +0 -267
  275. package/dist/chunk-qnfx3qtx.js +0 -617
  276. package/dist/chunk-qnwne2m4.js +0 -87
  277. package/dist/chunk-qp2qdcda.js +0 -100
  278. package/dist/chunk-qpp3wwh5.js +0 -697
  279. package/dist/chunk-r0bx1gc7.js +0 -174
  280. package/dist/chunk-radnwk8x.js +0 -107
  281. package/dist/chunk-rkv5jq0y.js +0 -71
  282. package/dist/chunk-rmbbmd3s.js +0 -68
  283. package/dist/chunk-rmgbs5an.js +0 -640
  284. package/dist/chunk-rn0v1hk8.js +0 -34
  285. package/dist/chunk-rnxctq9p.js +0 -1646
  286. package/dist/chunk-rtd39n81.js +0 -95
  287. package/dist/chunk-s8gy4ky9.js +0 -122
  288. package/dist/chunk-s8kj6ajy.js +0 -32
  289. package/dist/chunk-sd36yzx8.js +0 -954
  290. package/dist/chunk-sdenh194.js +0 -121
  291. package/dist/chunk-sdtqp75c.js +0 -55
  292. package/dist/chunk-sedbc8ep.js +0 -212
  293. package/dist/chunk-sfrb15b2.js +0 -321
  294. package/dist/chunk-sgpmpn90.js +0 -35
  295. package/dist/chunk-sh02d2qn.js +0 -38
  296. package/dist/chunk-shd4yhsf.js +0 -32
  297. package/dist/chunk-shkycj1q.js +0 -178
  298. package/dist/chunk-sk7h93je.js +0 -153
  299. package/dist/chunk-sm8g6fsm.js +0 -122
  300. package/dist/chunk-snrjy66h.js +0 -671
  301. package/dist/chunk-sq4a0yjh.js +0 -116
  302. package/dist/chunk-sr3t4thh.js +0 -895
  303. package/dist/chunk-srj6qnf6.js +0 -107
  304. package/dist/chunk-sz62n77p.js +0 -155
  305. package/dist/chunk-szj5wvdy.js +0 -28
  306. package/dist/chunk-t29a6zb5.js +0 -45
  307. package/dist/chunk-t2ecddwj.js +0 -731
  308. package/dist/chunk-t33hmmmm.js +0 -113
  309. package/dist/chunk-t4khqff1.js +0 -16
  310. package/dist/chunk-t9p85zff.js +0 -24
  311. package/dist/chunk-ta3jyvxs.js +0 -984
  312. package/dist/chunk-tkx5eec8.js +0 -54
  313. package/dist/chunk-v1kzp02e.js +0 -785
  314. package/dist/chunk-v4t6dyyh.js +0 -9076
  315. package/dist/chunk-v78fj8by.js +0 -145
  316. package/dist/chunk-v8kjswxt.js +0 -61
  317. package/dist/chunk-v9smspw2.js +0 -4301
  318. package/dist/chunk-vf612n57.js +0 -472
  319. package/dist/chunk-vkhrrvfq.js +0 -44
  320. package/dist/chunk-vt5wm07k.js +0 -74
  321. package/dist/chunk-vvvrv61g.js +0 -875
  322. package/dist/chunk-vyjeh50y.js +0 -2149
  323. package/dist/chunk-w0kxcv73.js +0 -97
  324. package/dist/chunk-w6m6trzq.js +0 -58
  325. package/dist/chunk-wa8yn2p0.js +0 -2007
  326. package/dist/chunk-wb18cecv.js +0 -995
  327. package/dist/chunk-wgk9sxk7.js +0 -329
  328. package/dist/chunk-wh0ev1bw.js +0 -111
  329. package/dist/chunk-wka1647p.js +0 -98
  330. package/dist/chunk-wnwfwyj4.js +0 -90
  331. package/dist/chunk-wpdchyy2.js +0 -97
  332. package/dist/chunk-x3g44n7k.js +0 -114
  333. package/dist/chunk-x47h283a.js +0 -56
  334. package/dist/chunk-x6r4v44b.js +0 -8
  335. package/dist/chunk-x7fdwq3d.js +0 -33
  336. package/dist/chunk-x8d2ehd7.js +0 -19
  337. package/dist/chunk-xbeg2hej.js +0 -257
  338. package/dist/chunk-xeb6075z.js +0 -3435
  339. package/dist/chunk-xhfmdq1y.js +0 -147
  340. package/dist/chunk-xhscn33a.js +0 -138
  341. package/dist/chunk-xv3era3s.js +0 -8
  342. package/dist/chunk-xz5gbhc3.js +0 -93
  343. package/dist/chunk-y1784krc.js +0 -19
  344. package/dist/chunk-y1vyezct.js +0 -123
  345. package/dist/chunk-y45ecntg.js +0 -942
  346. package/dist/chunk-y4ca9kqz.js +0 -3830
  347. package/dist/chunk-y9bhjjdz.js +0 -145
  348. package/dist/chunk-yb3bxv3w.js +0 -30
  349. package/dist/chunk-ye2q9gqj.js +0 -332
  350. package/dist/chunk-yfg3adfq.js +0 -88
  351. package/dist/chunk-yst0wmgw.js +0 -269
  352. package/dist/chunk-ywe9dbnz.js +0 -460
  353. package/dist/chunk-yyex5gsf.js +0 -269
  354. package/dist/chunk-yz2kzqk5.js +0 -439
  355. package/dist/chunk-z263ehpg.js +0 -131
  356. package/dist/chunk-z2dp53wn.js +0 -17
  357. package/dist/chunk-zaq348h2.js +0 -281
  358. package/dist/chunk-zr0qx9q0.js +0 -642
  359. package/dist/chunk-zxh62ved.js +0 -31
  360. package/dist/chunk-zy5vn8sd.js +0 -329
  361. package/dist/chunk-zzm33q8x.js +0 -8
  362. package/dist/cli.js +0 -91
@@ -1,1030 +0,0 @@
1
- // @bun
2
- import {
3
- ValidationErrorsList,
4
- init_ValidationErrorsList
5
- } from "./chunk-qn1be1vf.js";
6
- import {
7
- PressEnterToContinue,
8
- init_PressEnterToContinue
9
- } from "./chunk-qatfdxvd.js";
10
- import {
11
- init_useSettingsErrors,
12
- useSettingsErrors
13
- } from "./chunk-9wbh8n1y.js";
14
- import {
15
- detectUnreachableRules,
16
- init_shadowedRuleDetection
17
- } from "./chunk-rtd39n81.js";
18
- import {
19
- AGENT_DESCRIPTIONS_THRESHOLD,
20
- getAgentDescriptionsTotalTokens,
21
- init_statusNoticeHelpers
22
- } from "./chunk-0vaw02wq.js";
23
- import {
24
- McpParsingWarnings,
25
- init_McpParsingWarnings
26
- } from "./chunk-jps4m6sz.js";
27
- import {
28
- cleanupStaleLocks,
29
- getAllLockInfo,
30
- getDoctorDiagnostic,
31
- init_doctorDiagnostic,
32
- init_pidLock,
33
- isPidBasedLockingEnabled
34
- } from "./chunk-ta3jyvxs.js";
35
- import {
36
- getXDGStateHome,
37
- init_xdg
38
- } from "./chunk-x7fdwq3d.js";
39
- import {
40
- BASH_MAX_OUTPUT_DEFAULT,
41
- BASH_MAX_OUTPUT_UPPER_LIMIT,
42
- MAX_MEMORY_CHARACTER_COUNT,
43
- SandboxManager,
44
- TASK_MAX_OUTPUT_DEFAULT,
45
- TASK_MAX_OUTPUT_UPPER_LIMIT,
46
- countMcpToolTokens,
47
- getCachedKeybindingWarnings,
48
- getKeybindingsPath,
49
- getLargeMemoryFiles,
50
- getMemoryFiles,
51
- getPluginErrorMessage,
52
- init_AppState,
53
- init_analyzeContext,
54
- init_claudemd,
55
- init_envValidation,
56
- init_loadUserBindings,
57
- init_outputFormatting,
58
- init_outputLimits,
59
- init_plugin,
60
- init_sandbox_adapter,
61
- init_tokenEstimation,
62
- isKeybindingCustomizationEnabled,
63
- roughTokenCountEstimation,
64
- useAppState,
65
- validateBoundedIntEnvVar
66
- } from "./chunk-gnpt1t6q.js";
67
- import {
68
- init_useExitOnCtrlCDWithKeybindings,
69
- useExitOnCtrlCDWithKeybindings
70
- } from "./chunk-4k9d7gxv.js";
71
- import {
72
- init_useKeybinding
73
- } from "./chunk-68ffk5qa.js";
74
- import {
75
- getMainLoopModel,
76
- getModelMaxOutputTokens,
77
- init_context,
78
- init_model
79
- } from "./chunk-5pysjah8.js";
80
- import {
81
- getInitialSettings,
82
- init_file,
83
- init_permissionRuleParser,
84
- init_settings1 as init_settings,
85
- init_stringUtils,
86
- pathExists,
87
- permissionRuleValueToString,
88
- plural
89
- } from "./chunk-dfq6pbq7.js";
90
- import {
91
- Pane,
92
- ThemedBox_default,
93
- ThemedText,
94
- init_src,
95
- useKeybindings
96
- } from "./chunk-c7jwbe76.js";
97
- import {
98
- require_jsx_dev_runtime,
99
- require_react
100
- } from "./chunk-7sgtxrsc.js";
101
- import {
102
- figures_default,
103
- init_figures
104
- } from "./chunk-qajrkk97.js";
105
- import {
106
- getClaudeConfigHomeDir,
107
- init_envUtils
108
- } from "./chunk-5n1jc02d.js";
109
- import {
110
- getOriginalCwd,
111
- init_state
112
- } from "./chunk-k8vp0atq.js";
113
- import {
114
- __esm,
115
- __toESM
116
- } from "./chunk-qp2qdcda.js";
117
-
118
- // src/components/KeybindingWarnings.tsx
119
- function KeybindingWarnings() {
120
- if (!isKeybindingCustomizationEnabled()) {
121
- return null;
122
- }
123
- const warnings = getCachedKeybindingWarnings();
124
- if (warnings.length === 0) {
125
- return null;
126
- }
127
- const errors = warnings.filter((w) => w.severity === "error");
128
- const warns = warnings.filter((w) => w.severity === "warning");
129
- return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
130
- flexDirection: "column",
131
- marginTop: 1,
132
- marginBottom: 1,
133
- children: [
134
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
135
- bold: true,
136
- color: errors.length > 0 ? "error" : "warning",
137
- children: "Keybinding Configuration Issues"
138
- }, undefined, false, undefined, this),
139
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
140
- children: [
141
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
142
- dimColor: true,
143
- children: "Location: "
144
- }, undefined, false, undefined, this),
145
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
146
- dimColor: true,
147
- children: getKeybindingsPath()
148
- }, undefined, false, undefined, this)
149
- ]
150
- }, undefined, true, undefined, this),
151
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
152
- marginLeft: 1,
153
- flexDirection: "column",
154
- marginTop: 1,
155
- children: [
156
- errors.map((error, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
157
- flexDirection: "column",
158
- children: [
159
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
160
- children: [
161
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
162
- dimColor: true,
163
- children: "\u2514 "
164
- }, undefined, false, undefined, this),
165
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
166
- color: "error",
167
- children: "[Error]"
168
- }, undefined, false, undefined, this),
169
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
170
- dimColor: true,
171
- children: [
172
- " ",
173
- error.message
174
- ]
175
- }, undefined, true, undefined, this)
176
- ]
177
- }, undefined, true, undefined, this),
178
- error.suggestion && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
179
- marginLeft: 3,
180
- children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
181
- dimColor: true,
182
- children: [
183
- "\u2192 ",
184
- error.suggestion
185
- ]
186
- }, undefined, true, undefined, this)
187
- }, undefined, false, undefined, this)
188
- ]
189
- }, `error-${i}`, true, undefined, this)),
190
- warns.map((warning, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
191
- flexDirection: "column",
192
- children: [
193
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
194
- children: [
195
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
196
- dimColor: true,
197
- children: "\u2514 "
198
- }, undefined, false, undefined, this),
199
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
200
- color: "warning",
201
- children: "[Warning]"
202
- }, undefined, false, undefined, this),
203
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
204
- dimColor: true,
205
- children: [
206
- " ",
207
- warning.message
208
- ]
209
- }, undefined, true, undefined, this)
210
- ]
211
- }, undefined, true, undefined, this),
212
- warning.suggestion && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
213
- marginLeft: 3,
214
- children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
215
- dimColor: true,
216
- children: [
217
- "\u2192 ",
218
- warning.suggestion
219
- ]
220
- }, undefined, true, undefined, this)
221
- }, undefined, false, undefined, this)
222
- ]
223
- }, `warning-${i}`, true, undefined, this))
224
- ]
225
- }, undefined, true, undefined, this)
226
- ]
227
- }, undefined, true, undefined, this);
228
- }
229
- var jsx_dev_runtime;
230
- var init_KeybindingWarnings = __esm(() => {
231
- init_src();
232
- init_loadUserBindings();
233
- jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
234
- });
235
-
236
- // src/components/sandbox/SandboxDoctorSection.tsx
237
- function SandboxDoctorSection() {
238
- if (!SandboxManager.isSupportedPlatform()) {
239
- return null;
240
- }
241
- if (!SandboxManager.isSandboxEnabledInSettings()) {
242
- return null;
243
- }
244
- const depCheck = SandboxManager.checkDependencies();
245
- const hasErrors = depCheck.errors.length > 0;
246
- const hasWarnings = depCheck.warnings.length > 0;
247
- if (!hasErrors && !hasWarnings) {
248
- return null;
249
- }
250
- const statusColor = hasErrors ? "error" : "warning";
251
- const statusText = hasErrors ? "Missing dependencies" : "Available (with warnings)";
252
- return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
253
- flexDirection: "column",
254
- children: [
255
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
256
- bold: true,
257
- children: "Sandbox"
258
- }, undefined, false, undefined, this),
259
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
260
- children: [
261
- "\u2514 Status: ",
262
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
263
- color: statusColor,
264
- children: statusText
265
- }, undefined, false, undefined, this)
266
- ]
267
- }, undefined, true, undefined, this),
268
- depCheck.errors.map((e, i) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
269
- color: "error",
270
- children: [
271
- "\u2514 ",
272
- e
273
- ]
274
- }, i, true, undefined, this)),
275
- depCheck.warnings.map((w, i) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
276
- color: "warning",
277
- children: [
278
- "\u2514 ",
279
- w
280
- ]
281
- }, i, true, undefined, this)),
282
- hasErrors && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
283
- dimColor: true,
284
- children: "\u2514 Run /sandbox for install instructions"
285
- }, undefined, false, undefined, this)
286
- ]
287
- }, undefined, true, undefined, this);
288
- }
289
- var jsx_dev_runtime2;
290
- var init_SandboxDoctorSection = __esm(() => {
291
- init_src();
292
- init_sandbox_adapter();
293
- jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
294
- });
295
-
296
- // src/utils/doctorContextWarnings.ts
297
- async function checkClaudeMdFiles() {
298
- const largeFiles = getLargeMemoryFiles(await getMemoryFiles());
299
- if (largeFiles.length === 0) {
300
- return null;
301
- }
302
- const details = largeFiles.sort((a, b) => b.content.length - a.content.length).map((file) => `${file.path}: ${file.content.length.toLocaleString()} chars`);
303
- const message = largeFiles.length === 1 ? `Large CLAUDE.md file detected (${largeFiles[0].content.length.toLocaleString()} chars > ${MAX_MEMORY_CHARACTER_COUNT.toLocaleString()})` : `${largeFiles.length} large CLAUDE.md files detected (each > ${MAX_MEMORY_CHARACTER_COUNT.toLocaleString()} chars)`;
304
- return {
305
- type: "claudemd_files",
306
- severity: "warning",
307
- message,
308
- details,
309
- currentValue: largeFiles.length,
310
- threshold: MAX_MEMORY_CHARACTER_COUNT
311
- };
312
- }
313
- async function checkAgentDescriptions(agentInfo) {
314
- if (!agentInfo) {
315
- return null;
316
- }
317
- const totalTokens = getAgentDescriptionsTotalTokens(agentInfo);
318
- if (totalTokens <= AGENT_DESCRIPTIONS_THRESHOLD) {
319
- return null;
320
- }
321
- const agentTokens = agentInfo.activeAgents.filter((a) => a.source !== "built-in").map((agent) => {
322
- const description = `${agent.agentType}: ${agent.whenToUse}`;
323
- return {
324
- name: agent.agentType,
325
- tokens: roughTokenCountEstimation(description)
326
- };
327
- }).sort((a, b) => b.tokens - a.tokens);
328
- const details = agentTokens.slice(0, 5).map((agent) => `${agent.name}: ~${agent.tokens.toLocaleString()} tokens`);
329
- if (agentTokens.length > 5) {
330
- details.push(`(${agentTokens.length - 5} more custom agents)`);
331
- }
332
- return {
333
- type: "agent_descriptions",
334
- severity: "warning",
335
- message: `Large agent descriptions (~${totalTokens.toLocaleString()} tokens > ${AGENT_DESCRIPTIONS_THRESHOLD.toLocaleString()})`,
336
- details,
337
- currentValue: totalTokens,
338
- threshold: AGENT_DESCRIPTIONS_THRESHOLD
339
- };
340
- }
341
- async function checkMcpTools(tools, getToolPermissionContext, agentInfo) {
342
- const mcpTools = tools.filter((tool) => tool.isMcp);
343
- if (mcpTools.length === 0) {
344
- return null;
345
- }
346
- try {
347
- const model = getMainLoopModel();
348
- const { mcpToolTokens, mcpToolDetails } = await countMcpToolTokens(tools, getToolPermissionContext, agentInfo, model);
349
- if (mcpToolTokens <= MCP_TOOLS_THRESHOLD) {
350
- return null;
351
- }
352
- const toolsByServer = new Map;
353
- for (const tool of mcpToolDetails) {
354
- const parts = tool.name.split("__");
355
- const serverName = parts[1] || "unknown";
356
- const current = toolsByServer.get(serverName) || { count: 0, tokens: 0 };
357
- toolsByServer.set(serverName, {
358
- count: current.count + 1,
359
- tokens: current.tokens + tool.tokens
360
- });
361
- }
362
- const sortedServers = Array.from(toolsByServer.entries()).sort((a, b) => b[1].tokens - a[1].tokens);
363
- const details = sortedServers.slice(0, 5).map(([name, info]) => `${name}: ${info.count} tools (~${info.tokens.toLocaleString()} tokens)`);
364
- if (sortedServers.length > 5) {
365
- details.push(`(${sortedServers.length - 5} more servers)`);
366
- }
367
- return {
368
- type: "mcp_tools",
369
- severity: "warning",
370
- message: `Large MCP tools context (~${mcpToolTokens.toLocaleString()} tokens > ${MCP_TOOLS_THRESHOLD.toLocaleString()})`,
371
- details,
372
- currentValue: mcpToolTokens,
373
- threshold: MCP_TOOLS_THRESHOLD
374
- };
375
- } catch (_error) {
376
- const estimatedTokens = mcpTools.reduce((total, tool) => {
377
- const chars = (tool.name?.length || 0) + tool.description.length;
378
- return total + roughTokenCountEstimation(chars.toString());
379
- }, 0);
380
- if (estimatedTokens <= MCP_TOOLS_THRESHOLD) {
381
- return null;
382
- }
383
- return {
384
- type: "mcp_tools",
385
- severity: "warning",
386
- message: `Large MCP tools context (~${estimatedTokens.toLocaleString()} tokens estimated > ${MCP_TOOLS_THRESHOLD.toLocaleString()})`,
387
- details: [
388
- `${mcpTools.length} MCP tools detected (token count estimated)`
389
- ],
390
- currentValue: estimatedTokens,
391
- threshold: MCP_TOOLS_THRESHOLD
392
- };
393
- }
394
- }
395
- async function checkUnreachableRules(getToolPermissionContext) {
396
- const context = await getToolPermissionContext();
397
- const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
398
- const unreachable = detectUnreachableRules(context, {
399
- sandboxAutoAllowEnabled
400
- });
401
- if (unreachable.length === 0) {
402
- return null;
403
- }
404
- const details = unreachable.flatMap((r) => [
405
- `${permissionRuleValueToString(r.rule.ruleValue)}: ${r.reason}`,
406
- ` Fix: ${r.fix}`
407
- ]);
408
- return {
409
- type: "unreachable_rules",
410
- severity: "warning",
411
- message: `${unreachable.length} ${plural(unreachable.length, "unreachable permission rule")} detected`,
412
- details,
413
- currentValue: unreachable.length,
414
- threshold: 0
415
- };
416
- }
417
- async function checkContextWarnings(tools, agentInfo, getToolPermissionContext) {
418
- const [claudeMdWarning, agentWarning, mcpWarning, unreachableRulesWarning] = await Promise.all([
419
- checkClaudeMdFiles(),
420
- checkAgentDescriptions(agentInfo),
421
- checkMcpTools(tools, getToolPermissionContext, agentInfo),
422
- checkUnreachableRules(getToolPermissionContext)
423
- ]);
424
- return {
425
- claudeMdWarning,
426
- agentWarning,
427
- mcpWarning,
428
- unreachableRulesWarning
429
- };
430
- }
431
- var MCP_TOOLS_THRESHOLD = 25000;
432
- var init_doctorContextWarnings = __esm(() => {
433
- init_tokenEstimation();
434
- init_analyzeContext();
435
- init_claudemd();
436
- init_model();
437
- init_permissionRuleParser();
438
- init_shadowedRuleDetection();
439
- init_sandbox_adapter();
440
- init_statusNoticeHelpers();
441
- init_stringUtils();
442
- });
443
-
444
- // src/screens/Doctor.tsx
445
- import { join } from "path";
446
- function DistTagsDisplay({
447
- promise
448
- }) {
449
- const distTags = import_react.use(promise);
450
- if (!distTags.latest) {
451
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
452
- dimColor: true,
453
- children: "\u2514 Failed to fetch versions"
454
- }, undefined, false, undefined, this);
455
- }
456
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
457
- children: [
458
- distTags.stable && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
459
- children: [
460
- "\u2514 Stable version: ",
461
- distTags.stable
462
- ]
463
- }, undefined, true, undefined, this),
464
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
465
- children: [
466
- "\u2514 Latest version: ",
467
- distTags.latest
468
- ]
469
- }, undefined, true, undefined, this)
470
- ]
471
- }, undefined, true, undefined, this);
472
- }
473
- function Doctor({ onDone }) {
474
- const agentDefinitions = useAppState((s) => s.agentDefinitions);
475
- const mcpTools = useAppState((s) => s.mcp.tools);
476
- const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
477
- const pluginsErrors = useAppState((s) => s.plugins.errors);
478
- useExitOnCtrlCDWithKeybindings();
479
- const tools = import_react.useMemo(() => {
480
- return mcpTools || [];
481
- }, [mcpTools]);
482
- const [diagnostic, setDiagnostic] = import_react.useState(null);
483
- const [agentInfo, setAgentInfo] = import_react.useState(null);
484
- const [contextWarnings, setContextWarnings] = import_react.useState(null);
485
- const [versionLockInfo, setVersionLockInfo] = import_react.useState(null);
486
- const validationErrors = useSettingsErrors();
487
- const distTagsPromise = import_react.useMemo(() => getDoctorDiagnostic().then((diag) => {
488
- const fetchDistTags = diag.installationType === "native" ? getGcsDistTags : getNpmDistTags;
489
- return fetchDistTags().catch(() => ({ latest: null, stable: null }));
490
- }), []);
491
- const autoUpdatesChannel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
492
- const errorsExcludingMcp = validationErrors.filter((error) => error.mcpErrorMetadata === undefined);
493
- const envValidationErrors = import_react.useMemo(() => {
494
- const envVars = [
495
- {
496
- name: "BASH_MAX_OUTPUT_LENGTH",
497
- default: BASH_MAX_OUTPUT_DEFAULT,
498
- upperLimit: BASH_MAX_OUTPUT_UPPER_LIMIT
499
- },
500
- {
501
- name: "TASK_MAX_OUTPUT_LENGTH",
502
- default: TASK_MAX_OUTPUT_DEFAULT,
503
- upperLimit: TASK_MAX_OUTPUT_UPPER_LIMIT
504
- },
505
- {
506
- name: "CLAUDE_CODE_MAX_OUTPUT_TOKENS",
507
- ...getModelMaxOutputTokens("claude-opus-4-6")
508
- }
509
- ];
510
- return envVars.map((v) => {
511
- const value = process.env[v.name];
512
- const result = validateBoundedIntEnvVar(v.name, value, v.default, v.upperLimit);
513
- return { name: v.name, ...result };
514
- }).filter((v) => v.status !== "valid");
515
- }, []);
516
- import_react.useEffect(() => {
517
- getDoctorDiagnostic().then(setDiagnostic);
518
- (async () => {
519
- const userAgentsDir = join(getClaudeConfigHomeDir(), "agents");
520
- const projectAgentsDir = join(getOriginalCwd(), ".claude", "agents");
521
- const { activeAgents, allAgents, failedFiles } = agentDefinitions;
522
- const [userDirExists, projectDirExists] = await Promise.all([
523
- pathExists(userAgentsDir),
524
- pathExists(projectAgentsDir)
525
- ]);
526
- const agentInfoData = {
527
- activeAgents: activeAgents.map((a) => ({
528
- agentType: a.agentType,
529
- source: a.source
530
- })),
531
- userAgentsDir,
532
- projectAgentsDir,
533
- userDirExists,
534
- projectDirExists,
535
- failedFiles
536
- };
537
- setAgentInfo(agentInfoData);
538
- const warnings = await checkContextWarnings(tools, {
539
- activeAgents,
540
- allAgents,
541
- failedFiles
542
- }, async () => toolPermissionContext);
543
- setContextWarnings(warnings);
544
- if (isPidBasedLockingEnabled()) {
545
- const locksDir = join(getXDGStateHome(), "claude", "locks");
546
- const staleLocksCleaned = cleanupStaleLocks(locksDir);
547
- const locks = getAllLockInfo(locksDir);
548
- setVersionLockInfo({
549
- enabled: true,
550
- locks,
551
- locksDir,
552
- staleLocksCleaned
553
- });
554
- } else {
555
- setVersionLockInfo({
556
- enabled: false,
557
- locks: [],
558
- locksDir: "",
559
- staleLocksCleaned: 0
560
- });
561
- }
562
- })();
563
- }, [toolPermissionContext, tools, agentDefinitions]);
564
- const handleDismiss = import_react.useCallback(() => {
565
- onDone("Claude Code diagnostics dismissed", { display: "system" });
566
- }, [onDone]);
567
- useKeybindings({
568
- "confirm:yes": handleDismiss,
569
- "confirm:no": handleDismiss
570
- }, { context: "Confirmation" });
571
- if (!diagnostic) {
572
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Pane, {
573
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
574
- dimColor: true,
575
- children: "Checking installation status\u2026"
576
- }, undefined, false, undefined, this)
577
- }, undefined, false, undefined, this);
578
- }
579
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Pane, {
580
- children: [
581
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
582
- flexDirection: "column",
583
- children: [
584
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
585
- bold: true,
586
- children: "Diagnostics"
587
- }, undefined, false, undefined, this),
588
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
589
- children: [
590
- "\u2514 Currently running: ",
591
- diagnostic.installationType,
592
- " (",
593
- diagnostic.version,
594
- ")"
595
- ]
596
- }, undefined, true, undefined, this),
597
- diagnostic.packageManager && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
598
- children: [
599
- "\u2514 Package manager: ",
600
- diagnostic.packageManager
601
- ]
602
- }, undefined, true, undefined, this),
603
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
604
- children: [
605
- "\u2514 Path: ",
606
- diagnostic.installationPath
607
- ]
608
- }, undefined, true, undefined, this),
609
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
610
- children: [
611
- "\u2514 Invoked: ",
612
- diagnostic.invokedBinary
613
- ]
614
- }, undefined, true, undefined, this),
615
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
616
- children: [
617
- "\u2514 Config install method: ",
618
- diagnostic.configInstallMethod
619
- ]
620
- }, undefined, true, undefined, this),
621
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
622
- children: [
623
- "\u2514 Search: ",
624
- diagnostic.ripgrepStatus.working ? "OK" : "Not working",
625
- " (",
626
- diagnostic.ripgrepStatus.mode === "embedded" ? "bundled" : diagnostic.ripgrepStatus.mode === "builtin" ? "vendor" : diagnostic.ripgrepStatus.systemPath || "system",
627
- ")"
628
- ]
629
- }, undefined, true, undefined, this),
630
- diagnostic.recommendation && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
631
- children: [
632
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {}, undefined, false, undefined, this),
633
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
634
- color: "warning",
635
- children: [
636
- "Recommendation: ",
637
- diagnostic.recommendation.split(`
638
- `)[0]
639
- ]
640
- }, undefined, true, undefined, this),
641
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
642
- dimColor: true,
643
- children: diagnostic.recommendation.split(`
644
- `)[1]
645
- }, undefined, false, undefined, this)
646
- ]
647
- }, undefined, true, undefined, this),
648
- diagnostic.multipleInstallations.length > 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
649
- children: [
650
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {}, undefined, false, undefined, this),
651
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
652
- color: "warning",
653
- children: "Warning: Multiple installations found"
654
- }, undefined, false, undefined, this),
655
- diagnostic.multipleInstallations.map((install, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
656
- children: [
657
- "\u2514 ",
658
- install.type,
659
- " at ",
660
- install.path
661
- ]
662
- }, i, true, undefined, this))
663
- ]
664
- }, undefined, true, undefined, this),
665
- diagnostic.warnings.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
666
- children: [
667
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {}, undefined, false, undefined, this),
668
- diagnostic.warnings.map((warning, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
669
- flexDirection: "column",
670
- children: [
671
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
672
- color: "warning",
673
- children: [
674
- "Warning: ",
675
- warning.issue
676
- ]
677
- }, undefined, true, undefined, this),
678
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
679
- children: [
680
- "Fix: ",
681
- warning.fix
682
- ]
683
- }, undefined, true, undefined, this)
684
- ]
685
- }, i, true, undefined, this))
686
- ]
687
- }, undefined, true, undefined, this),
688
- errorsExcludingMcp.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
689
- flexDirection: "column",
690
- marginTop: 1,
691
- marginBottom: 1,
692
- children: [
693
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
694
- bold: true,
695
- children: "Invalid Settings"
696
- }, undefined, false, undefined, this),
697
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ValidationErrorsList, {
698
- errors: errorsExcludingMcp
699
- }, undefined, false, undefined, this)
700
- ]
701
- }, undefined, true, undefined, this)
702
- ]
703
- }, undefined, true, undefined, this),
704
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
705
- flexDirection: "column",
706
- children: [
707
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
708
- bold: true,
709
- children: "Updates"
710
- }, undefined, false, undefined, this),
711
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
712
- children: [
713
- "\u2514 Auto-updates:",
714
- " ",
715
- diagnostic.packageManager ? "Managed by package manager" : diagnostic.autoUpdates
716
- ]
717
- }, undefined, true, undefined, this),
718
- diagnostic.hasUpdatePermissions !== null && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
719
- children: [
720
- "\u2514 Update permissions:",
721
- " ",
722
- diagnostic.hasUpdatePermissions ? "Yes" : "No (requires sudo)"
723
- ]
724
- }, undefined, true, undefined, this),
725
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
726
- children: [
727
- "\u2514 Auto-update channel: ",
728
- autoUpdatesChannel
729
- ]
730
- }, undefined, true, undefined, this),
731
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(import_react.Suspense, {
732
- fallback: null,
733
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DistTagsDisplay, {
734
- promise: distTagsPromise
735
- }, undefined, false, undefined, this)
736
- }, undefined, false, undefined, this)
737
- ]
738
- }, undefined, true, undefined, this),
739
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(SandboxDoctorSection, {}, undefined, false, undefined, this),
740
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(McpParsingWarnings, {}, undefined, false, undefined, this),
741
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(KeybindingWarnings, {}, undefined, false, undefined, this),
742
- envValidationErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
743
- flexDirection: "column",
744
- children: [
745
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
746
- bold: true,
747
- children: "Environment Variables"
748
- }, undefined, false, undefined, this),
749
- envValidationErrors.map((validation, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
750
- children: [
751
- "\u2514 ",
752
- validation.name,
753
- ":",
754
- " ",
755
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
756
- color: validation.status === "capped" ? "warning" : "error",
757
- children: validation.message
758
- }, undefined, false, undefined, this)
759
- ]
760
- }, i, true, undefined, this))
761
- ]
762
- }, undefined, true, undefined, this),
763
- versionLockInfo?.enabled && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
764
- flexDirection: "column",
765
- children: [
766
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
767
- bold: true,
768
- children: "Version Locks"
769
- }, undefined, false, undefined, this),
770
- versionLockInfo.staleLocksCleaned > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
771
- dimColor: true,
772
- children: [
773
- "\u2514 Cleaned ",
774
- versionLockInfo.staleLocksCleaned,
775
- " stale lock(s)"
776
- ]
777
- }, undefined, true, undefined, this),
778
- versionLockInfo.locks.length === 0 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
779
- dimColor: true,
780
- children: "\u2514 No active version locks"
781
- }, undefined, false, undefined, this) : versionLockInfo.locks.map((lock, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
782
- children: [
783
- "\u2514 ",
784
- lock.version,
785
- ": PID ",
786
- lock.pid,
787
- " ",
788
- lock.isProcessRunning ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
789
- children: "(running)"
790
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
791
- color: "warning",
792
- children: "(stale)"
793
- }, undefined, false, undefined, this)
794
- ]
795
- }, i, true, undefined, this))
796
- ]
797
- }, undefined, true, undefined, this),
798
- agentInfo?.failedFiles && agentInfo.failedFiles.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
799
- flexDirection: "column",
800
- children: [
801
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
802
- bold: true,
803
- color: "error",
804
- children: "Agent Parse Errors"
805
- }, undefined, false, undefined, this),
806
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
807
- color: "error",
808
- children: [
809
- "\u2514 Failed to parse ",
810
- agentInfo.failedFiles.length,
811
- " agent file(s):"
812
- ]
813
- }, undefined, true, undefined, this),
814
- agentInfo.failedFiles.map((file, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
815
- dimColor: true,
816
- children: [
817
- " ",
818
- "\u2514 ",
819
- file.path,
820
- ": ",
821
- file.error
822
- ]
823
- }, i, true, undefined, this))
824
- ]
825
- }, undefined, true, undefined, this),
826
- pluginsErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
827
- flexDirection: "column",
828
- children: [
829
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
830
- bold: true,
831
- color: "error",
832
- children: "Plugin Errors"
833
- }, undefined, false, undefined, this),
834
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
835
- color: "error",
836
- children: [
837
- "\u2514 ",
838
- pluginsErrors.length,
839
- " plugin error(s) detected:"
840
- ]
841
- }, undefined, true, undefined, this),
842
- pluginsErrors.map((error, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
843
- dimColor: true,
844
- children: [
845
- " ",
846
- "\u2514 ",
847
- error.source || "unknown",
848
- "plugin" in error && error.plugin ? ` [${error.plugin}]` : "",
849
- ":",
850
- " ",
851
- getPluginErrorMessage(error)
852
- ]
853
- }, i, true, undefined, this))
854
- ]
855
- }, undefined, true, undefined, this),
856
- contextWarnings?.unreachableRulesWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
857
- flexDirection: "column",
858
- children: [
859
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
860
- bold: true,
861
- color: "warning",
862
- children: "Unreachable Permission Rules"
863
- }, undefined, false, undefined, this),
864
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
865
- children: [
866
- "\u2514",
867
- " ",
868
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
869
- color: "warning",
870
- children: [
871
- figures_default.warning,
872
- " ",
873
- contextWarnings.unreachableRulesWarning.message
874
- ]
875
- }, undefined, true, undefined, this)
876
- ]
877
- }, undefined, true, undefined, this),
878
- contextWarnings.unreachableRulesWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
879
- dimColor: true,
880
- children: [
881
- " ",
882
- "\u2514 ",
883
- detail
884
- ]
885
- }, i, true, undefined, this))
886
- ]
887
- }, undefined, true, undefined, this),
888
- contextWarnings && (contextWarnings.claudeMdWarning || contextWarnings.agentWarning || contextWarnings.mcpWarning) && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
889
- flexDirection: "column",
890
- children: [
891
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
892
- bold: true,
893
- children: "Context Usage Warnings"
894
- }, undefined, false, undefined, this),
895
- contextWarnings.claudeMdWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
896
- children: [
897
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
898
- children: [
899
- "\u2514",
900
- " ",
901
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
902
- color: "warning",
903
- children: [
904
- figures_default.warning,
905
- " ",
906
- contextWarnings.claudeMdWarning.message
907
- ]
908
- }, undefined, true, undefined, this)
909
- ]
910
- }, undefined, true, undefined, this),
911
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
912
- children: [
913
- " ",
914
- "\u2514 Files:"
915
- ]
916
- }, undefined, true, undefined, this),
917
- contextWarnings.claudeMdWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
918
- dimColor: true,
919
- children: [
920
- " ",
921
- "\u2514 ",
922
- detail
923
- ]
924
- }, i, true, undefined, this))
925
- ]
926
- }, undefined, true, undefined, this),
927
- contextWarnings.agentWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
928
- children: [
929
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
930
- children: [
931
- "\u2514",
932
- " ",
933
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
934
- color: "warning",
935
- children: [
936
- figures_default.warning,
937
- " ",
938
- contextWarnings.agentWarning.message
939
- ]
940
- }, undefined, true, undefined, this)
941
- ]
942
- }, undefined, true, undefined, this),
943
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
944
- children: [
945
- " ",
946
- "\u2514 Top contributors:"
947
- ]
948
- }, undefined, true, undefined, this),
949
- contextWarnings.agentWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
950
- dimColor: true,
951
- children: [
952
- " ",
953
- "\u2514 ",
954
- detail
955
- ]
956
- }, i, true, undefined, this))
957
- ]
958
- }, undefined, true, undefined, this),
959
- contextWarnings.mcpWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
960
- children: [
961
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
962
- children: [
963
- "\u2514",
964
- " ",
965
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
966
- color: "warning",
967
- children: [
968
- figures_default.warning,
969
- " ",
970
- contextWarnings.mcpWarning.message
971
- ]
972
- }, undefined, true, undefined, this)
973
- ]
974
- }, undefined, true, undefined, this),
975
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
976
- children: [
977
- " ",
978
- "\u2514 MCP servers:"
979
- ]
980
- }, undefined, true, undefined, this),
981
- contextWarnings.mcpWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
982
- dimColor: true,
983
- children: [
984
- " ",
985
- "\u2514 ",
986
- detail
987
- ]
988
- }, i, true, undefined, this))
989
- ]
990
- }, undefined, true, undefined, this)
991
- ]
992
- }, undefined, true, undefined, this),
993
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
994
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(PressEnterToContinue, {}, undefined, false, undefined, this)
995
- }, undefined, false, undefined, this)
996
- ]
997
- }, undefined, true, undefined, this);
998
- }
999
- var import_react, jsx_dev_runtime3, getGcsDistTags = async () => ({ latest: null, stable: null }), getNpmDistTags = async () => ({ latest: null, stable: null });
1000
- var init_Doctor = __esm(() => {
1001
- init_figures();
1002
- init_KeybindingWarnings();
1003
- init_McpParsingWarnings();
1004
- init_context();
1005
- init_envUtils();
1006
- init_state();
1007
- init_src();
1008
- init_PressEnterToContinue();
1009
- init_SandboxDoctorSection();
1010
- init_ValidationErrorsList();
1011
- init_useSettingsErrors();
1012
- init_useExitOnCtrlCDWithKeybindings();
1013
- init_src();
1014
- init_useKeybinding();
1015
- init_AppState();
1016
- init_plugin();
1017
- init_doctorContextWarnings();
1018
- init_doctorDiagnostic();
1019
- init_envValidation();
1020
- init_file();
1021
- init_pidLock();
1022
- init_settings();
1023
- init_outputLimits();
1024
- init_outputFormatting();
1025
- init_xdg();
1026
- import_react = __toESM(require_react(), 1);
1027
- jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
1028
- });
1029
-
1030
- export { Doctor, init_Doctor };