@caspian2026/agent-sdk 0.0.2
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.
- package/dist/chunk-018smjq7.js +26 -0
- package/dist/chunk-055q0a2m.js +146 -0
- package/dist/chunk-07069jq1.js +30 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0awwmrwr.js +46 -0
- package/dist/chunk-0htx82k2.js +64 -0
- package/dist/chunk-0jmt5sx1.js +104 -0
- package/dist/chunk-0kj8bq80.js +252 -0
- package/dist/chunk-0kxcq8h9.js +86 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-10qhq6f8.js +458 -0
- package/dist/chunk-15m49c67.js +121 -0
- package/dist/chunk-15sfg4bs.js +65 -0
- package/dist/chunk-162ewhvy.js +869 -0
- package/dist/chunk-177s15bv.js +120 -0
- package/dist/chunk-19e603rv.js +284 -0
- package/dist/chunk-1ax1znzj.js +537 -0
- package/dist/chunk-1c4j7qn2.js +319 -0
- package/dist/chunk-1gx78081.js +66 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1nk93fqz.js +357 -0
- package/dist/chunk-1xct96nd.js +2520 -0
- package/dist/chunk-1xvcvdef.js +90 -0
- package/dist/chunk-1yrcnrs7.js +261 -0
- package/dist/chunk-21bcvwr7.js +660 -0
- package/dist/chunk-2352ts05.js +667 -0
- package/dist/chunk-23jzrwsw.js +43 -0
- package/dist/chunk-26hg7303.js +62 -0
- package/dist/chunk-2f21meep.js +122 -0
- package/dist/chunk-2fwze72g.js +24 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2h05vtpv.js +83 -0
- package/dist/chunk-2h0y6m16.js +465 -0
- package/dist/chunk-2n7bbxm6.js +168 -0
- package/dist/chunk-2nv3d0he.js +108 -0
- package/dist/chunk-2vqrdwx9.js +1811 -0
- package/dist/chunk-3389cj3w.js +120 -0
- package/dist/chunk-35sgv3er.js +231 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3e20cj49.js +443 -0
- package/dist/chunk-3mr5ryx4.js +122 -0
- package/dist/chunk-3nk79af8.js +8 -0
- package/dist/chunk-3qbdzsvm.js +120 -0
- package/dist/chunk-3yprydpw.js +213 -0
- package/dist/chunk-430yrtmk.js +492 -0
- package/dist/chunk-46hd1gyd.js +140 -0
- package/dist/chunk-46hdszda.js +63 -0
- package/dist/chunk-46n7byh8.js +102 -0
- package/dist/chunk-4cp6193g.js +9076 -0
- package/dist/chunk-4dn3n459.js +409 -0
- package/dist/chunk-4hv90qcz.js +8 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4nspekjp.js +69 -0
- package/dist/chunk-505mxxa9.js +19 -0
- package/dist/chunk-50bay5qy.js +224 -0
- package/dist/chunk-537qfvn5.js +345 -0
- package/dist/chunk-55raexh7.js +14358 -0
- package/dist/chunk-572vjq78.js +56 -0
- package/dist/chunk-5apfzkpy.js +87 -0
- package/dist/chunk-5ccdsxgy.js +74 -0
- package/dist/chunk-5dmhsqap.js +32 -0
- package/dist/chunk-5fs6nkjr.js +98 -0
- package/dist/chunk-5nchekqe.js +87 -0
- package/dist/chunk-5pp28k2r.js +120 -0
- package/dist/chunk-5rt4b8q9.js +116 -0
- package/dist/chunk-5rv9c8yd.js +1072 -0
- package/dist/chunk-5z28bqne.js +6748 -0
- package/dist/chunk-64c1avct.js +13 -0
- package/dist/chunk-66zry909.js +11 -0
- package/dist/chunk-682qgta2.js +102 -0
- package/dist/chunk-68ffk5qa.js +14 -0
- package/dist/chunk-68w91pzt.js +79 -0
- package/dist/chunk-69fgaak0.js +654 -0
- package/dist/chunk-69n11zng.js +436 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6gh20s05.js +146 -0
- package/dist/chunk-6maej1hh.js +502 -0
- package/dist/chunk-6nsd9606.js +790 -0
- package/dist/chunk-6p4cyhb3.js +16 -0
- package/dist/chunk-6t4a9cgj.js +877 -0
- package/dist/chunk-6t8yqfks.js +227 -0
- package/dist/chunk-6vthy0fj.js +213 -0
- package/dist/chunk-70cw4cg9.js +1026 -0
- package/dist/chunk-70eey1nh.js +164 -0
- package/dist/chunk-76j2e9vy.js +68 -0
- package/dist/chunk-7acgdm7x.js +93 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7gvwg1v9.js +122 -0
- package/dist/chunk-7h2ybnf3.js +636 -0
- package/dist/chunk-7kcm5hn2.js +155 -0
- package/dist/chunk-7m2hp89m.js +73 -0
- package/dist/chunk-7mqab3z7.js +31 -0
- package/dist/chunk-7sgtxrsc.js +1059 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7xyswgjh.js +8 -0
- package/dist/chunk-7yxvpj5j.js +1452 -0
- package/dist/chunk-80a8vabn.js +93 -0
- package/dist/chunk-83e71kz6.js +180 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-8g5pe1gr.js +37 -0
- package/dist/chunk-8g747a8x.js +26 -0
- package/dist/chunk-8hj8ms5q.js +111 -0
- package/dist/chunk-8mkwsdk1.js +61 -0
- package/dist/chunk-8n42zyfx.js +40 -0
- package/dist/chunk-8qhxyqj9.js +1155 -0
- package/dist/chunk-8y30k9pz.js +38 -0
- package/dist/chunk-960ze3jj.js +124 -0
- package/dist/chunk-97wgdsab.js +35 -0
- package/dist/chunk-9grztvcg.js +93 -0
- package/dist/chunk-9x5zgy22.js +12 -0
- package/dist/chunk-a8792r1c.js +620 -0
- package/dist/chunk-ahr1r7c6.js +4275 -0
- package/dist/chunk-ase86y73.js +15 -0
- package/dist/chunk-b0kf00ff.js +637 -0
- package/dist/chunk-b0qptb1k.js +640 -0
- package/dist/chunk-b1kcd3ss.js +27 -0
- package/dist/chunk-b2fd462a.js +54 -0
- package/dist/chunk-bdrjvs5k.js +157 -0
- package/dist/chunk-beg7bdyz.js +90 -0
- package/dist/chunk-bg4x9ex0.js +21 -0
- package/dist/chunk-bktfq0ns.js +95 -0
- package/dist/chunk-bmbq6nt1.js +145 -0
- package/dist/chunk-bvf2z3g6.js +1003 -0
- package/dist/chunk-bxcfz5gy.js +56 -0
- package/dist/chunk-c11swzas.js +5368 -0
- package/dist/chunk-c37j5zxe.js +57 -0
- package/dist/chunk-c5mz5vw2.js +117 -0
- package/dist/chunk-c6sjhj89.js +1284 -0
- package/dist/chunk-c7jwbe76.js +29030 -0
- package/dist/chunk-cc2tg4q8.js +311 -0
- package/dist/chunk-cdhmrbj4.js +6353 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-chakj069.js +310 -0
- package/dist/chunk-chsyvavm.js +3435 -0
- package/dist/chunk-cnsj3vq2.js +35 -0
- package/dist/chunk-ctdg0qxh.js +1386 -0
- package/dist/chunk-cxq7gc42.js +386 -0
- package/dist/chunk-d1pyf9as.js +8586 -0
- package/dist/chunk-d4kwjqjy.js +308 -0
- package/dist/chunk-d4mdda98.js +94 -0
- package/dist/chunk-d7886r6a.js +13870 -0
- package/dist/chunk-d7f1pzkq.js +95 -0
- package/dist/chunk-ddsjkqs4.js +39 -0
- package/dist/chunk-dm3n2qgd.js +24 -0
- package/dist/chunk-e2mv8ts8.js +115 -0
- package/dist/chunk-e4bhfc6d.js +2720 -0
- package/dist/chunk-e4p1jbs4.js +58 -0
- package/dist/chunk-e7h4qxgw.js +21 -0
- package/dist/chunk-e8p3fy6v.js +202 -0
- package/dist/chunk-e97mp86b.js +111 -0
- package/dist/chunk-ebqwkhyf.js +145 -0
- package/dist/chunk-eenq3avg.js +69 -0
- package/dist/chunk-efgjfast.js +61 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-en8wkxh7.js +173 -0
- package/dist/chunk-enkdxqas.js +33 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-ercvcek8.js +266 -0
- package/dist/chunk-etgh9xvt.js +369 -0
- package/dist/chunk-ev3qkf76.js +106 -0
- package/dist/chunk-evp5pb9x.js +3567 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-exah13mz.js +94 -0
- package/dist/chunk-f0rzvqmq.js +87 -0
- package/dist/chunk-f1m9pect.js +258 -0
- package/dist/chunk-fajg8x36.js +8158 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fbvw6wq9.js +116 -0
- package/dist/chunk-feyzykye.js +10 -0
- package/dist/chunk-fn1vvj8k.js +894 -0
- package/dist/chunk-fshfxw2q.js +183 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-g9f19ttm.js +15 -0
- package/dist/chunk-gcpfxk0c.js +644 -0
- package/dist/chunk-gdg6411p.js +106 -0
- package/dist/chunk-gkyzz8er.js +849 -0
- package/dist/chunk-gxahdggv.js +71 -0
- package/dist/chunk-h6fsks9j.js +220 -0
- package/dist/chunk-h9n54swm.js +27 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hchy0hq6.js +159 -0
- package/dist/chunk-hh3k5s1s.js +180 -0
- package/dist/chunk-hqqkj5pg.js +202 -0
- package/dist/chunk-htpehq9t.js +251 -0
- package/dist/chunk-hwfknpxv.js +39 -0
- package/dist/chunk-hwn8vetn.js +394 -0
- package/dist/chunk-hx3j6n92.js +178 -0
- package/dist/chunk-hyb749hd.js +194 -0
- package/dist/chunk-hzgnejb1.js +90 -0
- package/dist/chunk-hzknr99c.js +477 -0
- package/dist/chunk-j3zhb8vv.js +152 -0
- package/dist/chunk-j5bth84e.js +97 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-jaaxk89e.js +113 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jfja8q7w.js +91 -0
- package/dist/chunk-jgjqa49s.js +27 -0
- package/dist/chunk-jgpmpgx6.js +19 -0
- package/dist/chunk-jgwd85hp.js +91 -0
- package/dist/chunk-jk69qtzx.js +277 -0
- package/dist/chunk-jr1xm1dd.js +147 -0
- package/dist/chunk-jss0azv7.js +2337 -0
- package/dist/chunk-jxpmkae9.js +108 -0
- package/dist/chunk-jy9rxxqe.js +102 -0
- package/dist/chunk-jyw3np47.js +264 -0
- package/dist/chunk-jzthz1bx.js +15 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k2rybwww.js +92 -0
- package/dist/chunk-k3939ggz.js +168 -0
- package/dist/chunk-k591cwbg.js +345 -0
- package/dist/chunk-k5ez1h65.js +108 -0
- package/dist/chunk-k8vp0atq.js +2331 -0
- package/dist/chunk-kajf3jgq.js +694 -0
- package/dist/chunk-kbm69rtz.js +276 -0
- package/dist/chunk-kjh11txh.js +419 -0
- package/dist/chunk-kqggbte3.js +326 -0
- package/dist/chunk-kr6qfwq0.js +95 -0
- package/dist/chunk-kvfg8eeg.js +150 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m1cehfta.js +861 -0
- package/dist/chunk-m87bhhqv.js +61 -0
- package/dist/chunk-mg7pbk0r.js +151 -0
- package/dist/chunk-mpbfkp8j.js +418 -0
- package/dist/chunk-mpk1sjyk.js +117 -0
- package/dist/chunk-msecaxyj.js +74 -0
- package/dist/chunk-mswx2nma.js +103 -0
- package/dist/chunk-mw1kpeg9.js +6895 -0
- package/dist/chunk-mxr2s6d1.js +89 -0
- package/dist/chunk-my40g5hp.js +560 -0
- package/dist/chunk-n0kmh4ra.js +338 -0
- package/dist/chunk-n18q5yqs.js +397 -0
- package/dist/chunk-n7pnyq43.js +131 -0
- package/dist/chunk-naybw0p0.js +32 -0
- package/dist/chunk-nb6abcch.js +83 -0
- package/dist/chunk-ne5r3k03.js +350 -0
- package/dist/chunk-nebezy1d.js +997 -0
- package/dist/chunk-netzwgv1.js +154 -0
- package/dist/chunk-nhapyawz.js +32994 -0
- package/dist/chunk-npnvheft.js +156 -0
- package/dist/chunk-nrtksr2p.js +51 -0
- package/dist/chunk-nw9t5pq9.js +132 -0
- package/dist/chunk-nxgsnh2y.js +735 -0
- package/dist/chunk-p11xp4xp.js +266 -0
- package/dist/chunk-p1hwrf72.js +74 -0
- package/dist/chunk-p1zj9mg9.js +567 -0
- package/dist/chunk-p39a677r.js +115 -0
- package/dist/chunk-p7vkh4wx.js +15 -0
- package/dist/chunk-p8na2wwp.js +14 -0
- package/dist/chunk-pcb7fbyg.js +259 -0
- package/dist/chunk-pckwmrzd.js +409 -0
- package/dist/chunk-ped973jn.js +111 -0
- package/dist/chunk-phd1qfpc.js +5971 -0
- package/dist/chunk-pkkngdv0.js +524 -0
- package/dist/chunk-ppwjyveh.js +8 -0
- package/dist/chunk-pqvr8jq7.js +324 -0
- package/dist/chunk-prcah3ys.js +106 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-pxdzy0jh.js +134 -0
- package/dist/chunk-q3jr5t07.js +62 -0
- package/dist/chunk-q6cfkntd.js +675 -0
- package/dist/chunk-q6m26rc8.js +88 -0
- package/dist/chunk-q6xs51jj.js +332 -0
- package/dist/chunk-q7jnesv8.js +74 -0
- package/dist/chunk-q7zpf4r2.js +440 -0
- package/dist/chunk-q8c88vjm.js +24 -0
- package/dist/chunk-qajrkk97.js +298 -0
- package/dist/chunk-qatfdxvd.js +34 -0
- package/dist/chunk-qb6k2afy.js +153 -0
- package/dist/chunk-qfk94vcn.js +329 -0
- package/dist/chunk-qj2e1apf.js +471 -0
- package/dist/chunk-qj2mk79w.js +111 -0
- package/dist/chunk-qk7dfae6.js +267 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qq0phwn8.js +458 -0
- package/dist/chunk-qwqjesx7.js +258 -0
- package/dist/chunk-qygmcg7w.js +60 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-qzj4e8fn.js +357 -0
- package/dist/chunk-ratvcbmn.js +255 -0
- package/dist/chunk-rkg741k3.js +37 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rsq0h0rz.js +91 -0
- package/dist/chunk-rvnb2gn6.js +1053 -0
- package/dist/chunk-rx278zpa.js +75 -0
- package/dist/chunk-s3hsqf80.js +473 -0
- package/dist/chunk-s4cb0bcb.js +655 -0
- package/dist/chunk-s8kj6ajy.js +32 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sfcpjh4r.js +98 -0
- package/dist/chunk-spybh2dy.js +175 -0
- package/dist/chunk-sw9ax3ym.js +92 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t29a6zb5.js +45 -0
- package/dist/chunk-t9p85zff.js +24 -0
- package/dist/chunk-tc1aazk4.js +131 -0
- package/dist/chunk-tdbz9gbm.js +1030 -0
- package/dist/chunk-tjcfpk38.js +208 -0
- package/dist/chunk-tp2jxmcx.js +8427 -0
- package/dist/chunk-tqmtkm0k.js +92 -0
- package/dist/chunk-tvgvt220.js +22820 -0
- package/dist/chunk-v0qraze5.js +291 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v8g3kad0.js +101 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-vawgyev5.js +157 -0
- package/dist/chunk-vb3x3cxe.js +375 -0
- package/dist/chunk-vf612n57.js +472 -0
- package/dist/chunk-vjn8mbcw.js +198 -0
- package/dist/chunk-vmbfv1y5.js +295 -0
- package/dist/chunk-vrf54kmt.js +321 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vzgkedm9.js +159745 -0
- package/dist/chunk-w004kfw0.js +245 -0
- package/dist/chunk-w0yhbmxn.js +132 -0
- package/dist/chunk-w4yn8cq7.js +123 -0
- package/dist/chunk-waqwgprq.js +1164 -0
- package/dist/chunk-wayfjcwt.js +447 -0
- package/dist/chunk-wby6yd4m.js +91 -0
- package/dist/chunk-wha6v7za.js +705 -0
- package/dist/chunk-wjcq2vkf.js +641 -0
- package/dist/chunk-wtjt9qyk.js +2670 -0
- package/dist/chunk-x2pvw7xw.js +42 -0
- package/dist/chunk-x6r4v44b.js +8 -0
- package/dist/chunk-x8d2ehd7.js +19 -0
- package/dist/chunk-xd6kmmb1.js +95 -0
- package/dist/chunk-xp61y5ba.js +125 -0
- package/dist/chunk-xv3era3s.js +8 -0
- package/dist/chunk-xxw9a0bq.js +58 -0
- package/dist/chunk-xzhaa7gd.js +112 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y4ca9kqz.js +3830 -0
- package/dist/chunk-yff68ex1.js +113 -0
- package/dist/chunk-yg4vgpxs.js +436 -0
- package/dist/chunk-yk62vxj2.js +2964 -0
- package/dist/chunk-ym5r3jnk.js +2007 -0
- package/dist/chunk-ysanv95x.js +225 -0
- package/dist/chunk-yvtzznds.js +63 -0
- package/dist/chunk-yyex5gsf.js +269 -0
- package/dist/chunk-yyf72f78.js +456 -0
- package/dist/chunk-z19sd3bt.js +1648 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z9n0183s.js +39 -0
- package/dist/chunk-zb8f6h5g.js +9174 -0
- package/dist/chunk-zctfbr1v.js +594 -0
- package/dist/chunk-zesnmkg3.js +2840 -0
- package/dist/chunk-zf47r1b7.js +94 -0
- package/dist/chunk-zghtdbat.js +253 -0
- package/dist/chunk-zpmwvd09.js +275 -0
- package/dist/chunk-zqncgyf6.js +127 -0
- package/dist/chunk-zr6mz36s.js +281 -0
- package/dist/chunk-zshzdw1n.js +141 -0
- package/dist/chunk-zx5kw7z4.js +40 -0
- package/dist/chunk-zzm33q8x.js +8 -0
- package/dist/cli.js +91 -0
- package/dist/download-ripgrep.js +24821 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/package.json +122 -0
- package/scripts/postinstall.cjs +319 -0
|
@@ -0,0 +1,1026 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ValidationErrorsList,
|
|
4
|
+
init_ValidationErrorsList
|
|
5
|
+
} from "./chunk-qk7dfae6.js";
|
|
6
|
+
import {
|
|
7
|
+
init_useSettingsErrors,
|
|
8
|
+
useSettingsErrors
|
|
9
|
+
} from "./chunk-efgjfast.js";
|
|
10
|
+
import {
|
|
11
|
+
PressEnterToContinue,
|
|
12
|
+
init_PressEnterToContinue
|
|
13
|
+
} from "./chunk-qatfdxvd.js";
|
|
14
|
+
import {
|
|
15
|
+
detectUnreachableRules,
|
|
16
|
+
init_shadowedRuleDetection
|
|
17
|
+
} from "./chunk-kr6qfwq0.js";
|
|
18
|
+
import {
|
|
19
|
+
McpParsingWarnings,
|
|
20
|
+
init_McpParsingWarnings
|
|
21
|
+
} from "./chunk-fshfxw2q.js";
|
|
22
|
+
import {
|
|
23
|
+
AGENT_DESCRIPTIONS_THRESHOLD,
|
|
24
|
+
getAgentDescriptionsTotalTokens,
|
|
25
|
+
init_statusNoticeHelpers
|
|
26
|
+
} from "./chunk-q8c88vjm.js";
|
|
27
|
+
import {
|
|
28
|
+
BASH_MAX_OUTPUT_DEFAULT,
|
|
29
|
+
BASH_MAX_OUTPUT_UPPER_LIMIT,
|
|
30
|
+
MAX_MEMORY_CHARACTER_COUNT,
|
|
31
|
+
SandboxManager,
|
|
32
|
+
TASK_MAX_OUTPUT_DEFAULT,
|
|
33
|
+
TASK_MAX_OUTPUT_UPPER_LIMIT,
|
|
34
|
+
cleanupStaleLocks,
|
|
35
|
+
countMcpToolTokens,
|
|
36
|
+
getAllLockInfo,
|
|
37
|
+
getCachedKeybindingWarnings,
|
|
38
|
+
getDoctorDiagnostic,
|
|
39
|
+
getKeybindingsPath,
|
|
40
|
+
getLargeMemoryFiles,
|
|
41
|
+
getMemoryFiles,
|
|
42
|
+
getPluginErrorMessage,
|
|
43
|
+
init_AppState,
|
|
44
|
+
init_analyzeContext,
|
|
45
|
+
init_claudemd,
|
|
46
|
+
init_doctorDiagnostic,
|
|
47
|
+
init_envValidation,
|
|
48
|
+
init_loadUserBindings,
|
|
49
|
+
init_outputFormatting,
|
|
50
|
+
init_outputLimits,
|
|
51
|
+
init_pidLock,
|
|
52
|
+
init_plugin,
|
|
53
|
+
init_sandbox_adapter,
|
|
54
|
+
init_tokenEstimation,
|
|
55
|
+
isKeybindingCustomizationEnabled,
|
|
56
|
+
isPidBasedLockingEnabled,
|
|
57
|
+
roughTokenCountEstimation,
|
|
58
|
+
useAppState,
|
|
59
|
+
validateBoundedIntEnvVar
|
|
60
|
+
} from "./chunk-vzgkedm9.js";
|
|
61
|
+
import {
|
|
62
|
+
getXDGStateHome,
|
|
63
|
+
init_xdg
|
|
64
|
+
} from "./chunk-4nspekjp.js";
|
|
65
|
+
import {
|
|
66
|
+
init_useExitOnCtrlCDWithKeybindings,
|
|
67
|
+
useExitOnCtrlCDWithKeybindings
|
|
68
|
+
} from "./chunk-kbm69rtz.js";
|
|
69
|
+
import {
|
|
70
|
+
init_useKeybinding
|
|
71
|
+
} from "./chunk-68ffk5qa.js";
|
|
72
|
+
import {
|
|
73
|
+
getInitialSettings,
|
|
74
|
+
getMainLoopModel,
|
|
75
|
+
getModelMaxOutputTokens,
|
|
76
|
+
init_context,
|
|
77
|
+
init_file,
|
|
78
|
+
init_model,
|
|
79
|
+
init_permissionRuleParser,
|
|
80
|
+
init_settings1 as init_settings,
|
|
81
|
+
init_stringUtils,
|
|
82
|
+
pathExists,
|
|
83
|
+
permissionRuleValueToString,
|
|
84
|
+
plural
|
|
85
|
+
} from "./chunk-tp2jxmcx.js";
|
|
86
|
+
import {
|
|
87
|
+
Pane,
|
|
88
|
+
ThemedBox_default,
|
|
89
|
+
ThemedText,
|
|
90
|
+
init_src,
|
|
91
|
+
useKeybindings
|
|
92
|
+
} from "./chunk-c7jwbe76.js";
|
|
93
|
+
import {
|
|
94
|
+
require_jsx_dev_runtime,
|
|
95
|
+
require_react
|
|
96
|
+
} from "./chunk-7sgtxrsc.js";
|
|
97
|
+
import {
|
|
98
|
+
figures_default,
|
|
99
|
+
init_figures
|
|
100
|
+
} from "./chunk-qajrkk97.js";
|
|
101
|
+
import {
|
|
102
|
+
getClaudeConfigHomeDir,
|
|
103
|
+
init_envUtils
|
|
104
|
+
} from "./chunk-jaaxk89e.js";
|
|
105
|
+
import {
|
|
106
|
+
getOriginalCwd,
|
|
107
|
+
init_state
|
|
108
|
+
} from "./chunk-k8vp0atq.js";
|
|
109
|
+
import {
|
|
110
|
+
__esm,
|
|
111
|
+
__toESM
|
|
112
|
+
} from "./chunk-qp2qdcda.js";
|
|
113
|
+
|
|
114
|
+
// src/components/KeybindingWarnings.tsx
|
|
115
|
+
function KeybindingWarnings() {
|
|
116
|
+
if (!isKeybindingCustomizationEnabled()) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const warnings = getCachedKeybindingWarnings();
|
|
120
|
+
if (warnings.length === 0) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
const errors = warnings.filter((w) => w.severity === "error");
|
|
124
|
+
const warns = warnings.filter((w) => w.severity === "warning");
|
|
125
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
126
|
+
flexDirection: "column",
|
|
127
|
+
marginTop: 1,
|
|
128
|
+
marginBottom: 1,
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
131
|
+
bold: true,
|
|
132
|
+
color: errors.length > 0 ? "error" : "warning",
|
|
133
|
+
children: "Keybinding Configuration Issues"
|
|
134
|
+
}, undefined, false, undefined, this),
|
|
135
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
138
|
+
dimColor: true,
|
|
139
|
+
children: "Location: "
|
|
140
|
+
}, undefined, false, undefined, this),
|
|
141
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
142
|
+
dimColor: true,
|
|
143
|
+
children: getKeybindingsPath()
|
|
144
|
+
}, undefined, false, undefined, this)
|
|
145
|
+
]
|
|
146
|
+
}, undefined, true, undefined, this),
|
|
147
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
148
|
+
marginLeft: 1,
|
|
149
|
+
flexDirection: "column",
|
|
150
|
+
marginTop: 1,
|
|
151
|
+
children: [
|
|
152
|
+
errors.map((error, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
153
|
+
flexDirection: "column",
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
158
|
+
dimColor: true,
|
|
159
|
+
children: "\u2514 "
|
|
160
|
+
}, undefined, false, undefined, this),
|
|
161
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
162
|
+
color: "error",
|
|
163
|
+
children: "[Error]"
|
|
164
|
+
}, undefined, false, undefined, this),
|
|
165
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
166
|
+
dimColor: true,
|
|
167
|
+
children: [
|
|
168
|
+
" ",
|
|
169
|
+
error.message
|
|
170
|
+
]
|
|
171
|
+
}, undefined, true, undefined, this)
|
|
172
|
+
]
|
|
173
|
+
}, undefined, true, undefined, this),
|
|
174
|
+
error.suggestion && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
175
|
+
marginLeft: 3,
|
|
176
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
177
|
+
dimColor: true,
|
|
178
|
+
children: [
|
|
179
|
+
"\u2192 ",
|
|
180
|
+
error.suggestion
|
|
181
|
+
]
|
|
182
|
+
}, undefined, true, undefined, this)
|
|
183
|
+
}, undefined, false, undefined, this)
|
|
184
|
+
]
|
|
185
|
+
}, `error-${i}`, true, undefined, this)),
|
|
186
|
+
warns.map((warning, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
187
|
+
flexDirection: "column",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
192
|
+
dimColor: true,
|
|
193
|
+
children: "\u2514 "
|
|
194
|
+
}, undefined, false, undefined, this),
|
|
195
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
196
|
+
color: "warning",
|
|
197
|
+
children: "[Warning]"
|
|
198
|
+
}, undefined, false, undefined, this),
|
|
199
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
200
|
+
dimColor: true,
|
|
201
|
+
children: [
|
|
202
|
+
" ",
|
|
203
|
+
warning.message
|
|
204
|
+
]
|
|
205
|
+
}, undefined, true, undefined, this)
|
|
206
|
+
]
|
|
207
|
+
}, undefined, true, undefined, this),
|
|
208
|
+
warning.suggestion && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
209
|
+
marginLeft: 3,
|
|
210
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
211
|
+
dimColor: true,
|
|
212
|
+
children: [
|
|
213
|
+
"\u2192 ",
|
|
214
|
+
warning.suggestion
|
|
215
|
+
]
|
|
216
|
+
}, undefined, true, undefined, this)
|
|
217
|
+
}, undefined, false, undefined, this)
|
|
218
|
+
]
|
|
219
|
+
}, `warning-${i}`, true, undefined, this))
|
|
220
|
+
]
|
|
221
|
+
}, undefined, true, undefined, this)
|
|
222
|
+
]
|
|
223
|
+
}, undefined, true, undefined, this);
|
|
224
|
+
}
|
|
225
|
+
var jsx_dev_runtime;
|
|
226
|
+
var init_KeybindingWarnings = __esm(() => {
|
|
227
|
+
init_src();
|
|
228
|
+
init_loadUserBindings();
|
|
229
|
+
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// src/components/sandbox/SandboxDoctorSection.tsx
|
|
233
|
+
function SandboxDoctorSection() {
|
|
234
|
+
if (!SandboxManager.isSupportedPlatform()) {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
if (!SandboxManager.isSandboxEnabledInSettings()) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
const depCheck = SandboxManager.checkDependencies();
|
|
241
|
+
const hasErrors = depCheck.errors.length > 0;
|
|
242
|
+
const hasWarnings = depCheck.warnings.length > 0;
|
|
243
|
+
if (!hasErrors && !hasWarnings) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
const statusColor = hasErrors ? "error" : "warning";
|
|
247
|
+
const statusText = hasErrors ? "Missing dependencies" : "Available (with warnings)";
|
|
248
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
249
|
+
flexDirection: "column",
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
252
|
+
bold: true,
|
|
253
|
+
children: "Sandbox"
|
|
254
|
+
}, undefined, false, undefined, this),
|
|
255
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
256
|
+
children: [
|
|
257
|
+
"\u2514 Status: ",
|
|
258
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
259
|
+
color: statusColor,
|
|
260
|
+
children: statusText
|
|
261
|
+
}, undefined, false, undefined, this)
|
|
262
|
+
]
|
|
263
|
+
}, undefined, true, undefined, this),
|
|
264
|
+
depCheck.errors.map((e, i) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
265
|
+
color: "error",
|
|
266
|
+
children: [
|
|
267
|
+
"\u2514 ",
|
|
268
|
+
e
|
|
269
|
+
]
|
|
270
|
+
}, i, true, undefined, this)),
|
|
271
|
+
depCheck.warnings.map((w, i) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
272
|
+
color: "warning",
|
|
273
|
+
children: [
|
|
274
|
+
"\u2514 ",
|
|
275
|
+
w
|
|
276
|
+
]
|
|
277
|
+
}, i, true, undefined, this)),
|
|
278
|
+
hasErrors && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
279
|
+
dimColor: true,
|
|
280
|
+
children: "\u2514 Run /sandbox for install instructions"
|
|
281
|
+
}, undefined, false, undefined, this)
|
|
282
|
+
]
|
|
283
|
+
}, undefined, true, undefined, this);
|
|
284
|
+
}
|
|
285
|
+
var jsx_dev_runtime2;
|
|
286
|
+
var init_SandboxDoctorSection = __esm(() => {
|
|
287
|
+
init_src();
|
|
288
|
+
init_sandbox_adapter();
|
|
289
|
+
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// src/utils/doctorContextWarnings.ts
|
|
293
|
+
async function checkClaudeMdFiles() {
|
|
294
|
+
const largeFiles = getLargeMemoryFiles(await getMemoryFiles());
|
|
295
|
+
if (largeFiles.length === 0) {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
const details = largeFiles.sort((a, b) => b.content.length - a.content.length).map((file) => `${file.path}: ${file.content.length.toLocaleString()} chars`);
|
|
299
|
+
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)`;
|
|
300
|
+
return {
|
|
301
|
+
type: "claudemd_files",
|
|
302
|
+
severity: "warning",
|
|
303
|
+
message,
|
|
304
|
+
details,
|
|
305
|
+
currentValue: largeFiles.length,
|
|
306
|
+
threshold: MAX_MEMORY_CHARACTER_COUNT
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
async function checkAgentDescriptions(agentInfo) {
|
|
310
|
+
if (!agentInfo) {
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
const totalTokens = getAgentDescriptionsTotalTokens(agentInfo);
|
|
314
|
+
if (totalTokens <= AGENT_DESCRIPTIONS_THRESHOLD) {
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
const agentTokens = agentInfo.activeAgents.filter((a) => a.source !== "built-in").map((agent) => {
|
|
318
|
+
const description = `${agent.agentType}: ${agent.whenToUse}`;
|
|
319
|
+
return {
|
|
320
|
+
name: agent.agentType,
|
|
321
|
+
tokens: roughTokenCountEstimation(description)
|
|
322
|
+
};
|
|
323
|
+
}).sort((a, b) => b.tokens - a.tokens);
|
|
324
|
+
const details = agentTokens.slice(0, 5).map((agent) => `${agent.name}: ~${agent.tokens.toLocaleString()} tokens`);
|
|
325
|
+
if (agentTokens.length > 5) {
|
|
326
|
+
details.push(`(${agentTokens.length - 5} more custom agents)`);
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
type: "agent_descriptions",
|
|
330
|
+
severity: "warning",
|
|
331
|
+
message: `Large agent descriptions (~${totalTokens.toLocaleString()} tokens > ${AGENT_DESCRIPTIONS_THRESHOLD.toLocaleString()})`,
|
|
332
|
+
details,
|
|
333
|
+
currentValue: totalTokens,
|
|
334
|
+
threshold: AGENT_DESCRIPTIONS_THRESHOLD
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
async function checkMcpTools(tools, getToolPermissionContext, agentInfo) {
|
|
338
|
+
const mcpTools = tools.filter((tool) => tool.isMcp);
|
|
339
|
+
if (mcpTools.length === 0) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
try {
|
|
343
|
+
const model = getMainLoopModel();
|
|
344
|
+
const { mcpToolTokens, mcpToolDetails } = await countMcpToolTokens(tools, getToolPermissionContext, agentInfo, model);
|
|
345
|
+
if (mcpToolTokens <= MCP_TOOLS_THRESHOLD) {
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
const toolsByServer = new Map;
|
|
349
|
+
for (const tool of mcpToolDetails) {
|
|
350
|
+
const parts = tool.name.split("__");
|
|
351
|
+
const serverName = parts[1] || "unknown";
|
|
352
|
+
const current = toolsByServer.get(serverName) || { count: 0, tokens: 0 };
|
|
353
|
+
toolsByServer.set(serverName, {
|
|
354
|
+
count: current.count + 1,
|
|
355
|
+
tokens: current.tokens + tool.tokens
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
const sortedServers = Array.from(toolsByServer.entries()).sort((a, b) => b[1].tokens - a[1].tokens);
|
|
359
|
+
const details = sortedServers.slice(0, 5).map(([name, info]) => `${name}: ${info.count} tools (~${info.tokens.toLocaleString()} tokens)`);
|
|
360
|
+
if (sortedServers.length > 5) {
|
|
361
|
+
details.push(`(${sortedServers.length - 5} more servers)`);
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
type: "mcp_tools",
|
|
365
|
+
severity: "warning",
|
|
366
|
+
message: `Large MCP tools context (~${mcpToolTokens.toLocaleString()} tokens > ${MCP_TOOLS_THRESHOLD.toLocaleString()})`,
|
|
367
|
+
details,
|
|
368
|
+
currentValue: mcpToolTokens,
|
|
369
|
+
threshold: MCP_TOOLS_THRESHOLD
|
|
370
|
+
};
|
|
371
|
+
} catch (_error) {
|
|
372
|
+
const estimatedTokens = mcpTools.reduce((total, tool) => {
|
|
373
|
+
const chars = (tool.name?.length || 0) + tool.description.length;
|
|
374
|
+
return total + roughTokenCountEstimation(chars.toString());
|
|
375
|
+
}, 0);
|
|
376
|
+
if (estimatedTokens <= MCP_TOOLS_THRESHOLD) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return {
|
|
380
|
+
type: "mcp_tools",
|
|
381
|
+
severity: "warning",
|
|
382
|
+
message: `Large MCP tools context (~${estimatedTokens.toLocaleString()} tokens estimated > ${MCP_TOOLS_THRESHOLD.toLocaleString()})`,
|
|
383
|
+
details: [
|
|
384
|
+
`${mcpTools.length} MCP tools detected (token count estimated)`
|
|
385
|
+
],
|
|
386
|
+
currentValue: estimatedTokens,
|
|
387
|
+
threshold: MCP_TOOLS_THRESHOLD
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
async function checkUnreachableRules(getToolPermissionContext) {
|
|
392
|
+
const context = await getToolPermissionContext();
|
|
393
|
+
const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
|
|
394
|
+
const unreachable = detectUnreachableRules(context, {
|
|
395
|
+
sandboxAutoAllowEnabled
|
|
396
|
+
});
|
|
397
|
+
if (unreachable.length === 0) {
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
const details = unreachable.flatMap((r) => [
|
|
401
|
+
`${permissionRuleValueToString(r.rule.ruleValue)}: ${r.reason}`,
|
|
402
|
+
` Fix: ${r.fix}`
|
|
403
|
+
]);
|
|
404
|
+
return {
|
|
405
|
+
type: "unreachable_rules",
|
|
406
|
+
severity: "warning",
|
|
407
|
+
message: `${unreachable.length} ${plural(unreachable.length, "unreachable permission rule")} detected`,
|
|
408
|
+
details,
|
|
409
|
+
currentValue: unreachable.length,
|
|
410
|
+
threshold: 0
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
async function checkContextWarnings(tools, agentInfo, getToolPermissionContext) {
|
|
414
|
+
const [claudeMdWarning, agentWarning, mcpWarning, unreachableRulesWarning] = await Promise.all([
|
|
415
|
+
checkClaudeMdFiles(),
|
|
416
|
+
checkAgentDescriptions(agentInfo),
|
|
417
|
+
checkMcpTools(tools, getToolPermissionContext, agentInfo),
|
|
418
|
+
checkUnreachableRules(getToolPermissionContext)
|
|
419
|
+
]);
|
|
420
|
+
return {
|
|
421
|
+
claudeMdWarning,
|
|
422
|
+
agentWarning,
|
|
423
|
+
mcpWarning,
|
|
424
|
+
unreachableRulesWarning
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
var MCP_TOOLS_THRESHOLD = 25000;
|
|
428
|
+
var init_doctorContextWarnings = __esm(() => {
|
|
429
|
+
init_tokenEstimation();
|
|
430
|
+
init_analyzeContext();
|
|
431
|
+
init_claudemd();
|
|
432
|
+
init_model();
|
|
433
|
+
init_permissionRuleParser();
|
|
434
|
+
init_shadowedRuleDetection();
|
|
435
|
+
init_sandbox_adapter();
|
|
436
|
+
init_statusNoticeHelpers();
|
|
437
|
+
init_stringUtils();
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
// src/screens/Doctor.tsx
|
|
441
|
+
import { join } from "path";
|
|
442
|
+
function DistTagsDisplay({
|
|
443
|
+
promise
|
|
444
|
+
}) {
|
|
445
|
+
const distTags = import_react.use(promise);
|
|
446
|
+
if (!distTags.latest) {
|
|
447
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
448
|
+
dimColor: true,
|
|
449
|
+
children: "\u2514 Failed to fetch versions"
|
|
450
|
+
}, undefined, false, undefined, this);
|
|
451
|
+
}
|
|
452
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
453
|
+
children: [
|
|
454
|
+
distTags.stable && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
455
|
+
children: [
|
|
456
|
+
"\u2514 Stable version: ",
|
|
457
|
+
distTags.stable
|
|
458
|
+
]
|
|
459
|
+
}, undefined, true, undefined, this),
|
|
460
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
461
|
+
children: [
|
|
462
|
+
"\u2514 Latest version: ",
|
|
463
|
+
distTags.latest
|
|
464
|
+
]
|
|
465
|
+
}, undefined, true, undefined, this)
|
|
466
|
+
]
|
|
467
|
+
}, undefined, true, undefined, this);
|
|
468
|
+
}
|
|
469
|
+
function Doctor({ onDone }) {
|
|
470
|
+
const agentDefinitions = useAppState((s) => s.agentDefinitions);
|
|
471
|
+
const mcpTools = useAppState((s) => s.mcp.tools);
|
|
472
|
+
const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
|
|
473
|
+
const pluginsErrors = useAppState((s) => s.plugins.errors);
|
|
474
|
+
useExitOnCtrlCDWithKeybindings();
|
|
475
|
+
const tools = import_react.useMemo(() => {
|
|
476
|
+
return mcpTools || [];
|
|
477
|
+
}, [mcpTools]);
|
|
478
|
+
const [diagnostic, setDiagnostic] = import_react.useState(null);
|
|
479
|
+
const [agentInfo, setAgentInfo] = import_react.useState(null);
|
|
480
|
+
const [contextWarnings, setContextWarnings] = import_react.useState(null);
|
|
481
|
+
const [versionLockInfo, setVersionLockInfo] = import_react.useState(null);
|
|
482
|
+
const validationErrors = useSettingsErrors();
|
|
483
|
+
const distTagsPromise = import_react.useMemo(() => getDoctorDiagnostic().then((diag) => {
|
|
484
|
+
const fetchDistTags = diag.installationType === "native" ? getGcsDistTags : getNpmDistTags;
|
|
485
|
+
return fetchDistTags().catch(() => ({ latest: null, stable: null }));
|
|
486
|
+
}), []);
|
|
487
|
+
const autoUpdatesChannel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
488
|
+
const errorsExcludingMcp = validationErrors.filter((error) => error.mcpErrorMetadata === undefined);
|
|
489
|
+
const envValidationErrors = import_react.useMemo(() => {
|
|
490
|
+
const envVars = [
|
|
491
|
+
{
|
|
492
|
+
name: "BASH_MAX_OUTPUT_LENGTH",
|
|
493
|
+
default: BASH_MAX_OUTPUT_DEFAULT,
|
|
494
|
+
upperLimit: BASH_MAX_OUTPUT_UPPER_LIMIT
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
name: "TASK_MAX_OUTPUT_LENGTH",
|
|
498
|
+
default: TASK_MAX_OUTPUT_DEFAULT,
|
|
499
|
+
upperLimit: TASK_MAX_OUTPUT_UPPER_LIMIT
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
name: "CLAUDE_CODE_MAX_OUTPUT_TOKENS",
|
|
503
|
+
...getModelMaxOutputTokens("claude-opus-4-6")
|
|
504
|
+
}
|
|
505
|
+
];
|
|
506
|
+
return envVars.map((v) => {
|
|
507
|
+
const value = process.env[v.name];
|
|
508
|
+
const result = validateBoundedIntEnvVar(v.name, value, v.default, v.upperLimit);
|
|
509
|
+
return { name: v.name, ...result };
|
|
510
|
+
}).filter((v) => v.status !== "valid");
|
|
511
|
+
}, []);
|
|
512
|
+
import_react.useEffect(() => {
|
|
513
|
+
getDoctorDiagnostic().then(setDiagnostic);
|
|
514
|
+
(async () => {
|
|
515
|
+
const userAgentsDir = join(getClaudeConfigHomeDir(), "agents");
|
|
516
|
+
const projectAgentsDir = join(getOriginalCwd(), ".claude", "agents");
|
|
517
|
+
const { activeAgents, allAgents, failedFiles } = agentDefinitions;
|
|
518
|
+
const [userDirExists, projectDirExists] = await Promise.all([
|
|
519
|
+
pathExists(userAgentsDir),
|
|
520
|
+
pathExists(projectAgentsDir)
|
|
521
|
+
]);
|
|
522
|
+
const agentInfoData = {
|
|
523
|
+
activeAgents: activeAgents.map((a) => ({
|
|
524
|
+
agentType: a.agentType,
|
|
525
|
+
source: a.source
|
|
526
|
+
})),
|
|
527
|
+
userAgentsDir,
|
|
528
|
+
projectAgentsDir,
|
|
529
|
+
userDirExists,
|
|
530
|
+
projectDirExists,
|
|
531
|
+
failedFiles
|
|
532
|
+
};
|
|
533
|
+
setAgentInfo(agentInfoData);
|
|
534
|
+
const warnings = await checkContextWarnings(tools, {
|
|
535
|
+
activeAgents,
|
|
536
|
+
allAgents,
|
|
537
|
+
failedFiles
|
|
538
|
+
}, async () => toolPermissionContext);
|
|
539
|
+
setContextWarnings(warnings);
|
|
540
|
+
if (isPidBasedLockingEnabled()) {
|
|
541
|
+
const locksDir = join(getXDGStateHome(), "claude", "locks");
|
|
542
|
+
const staleLocksCleaned = cleanupStaleLocks(locksDir);
|
|
543
|
+
const locks = getAllLockInfo(locksDir);
|
|
544
|
+
setVersionLockInfo({
|
|
545
|
+
enabled: true,
|
|
546
|
+
locks,
|
|
547
|
+
locksDir,
|
|
548
|
+
staleLocksCleaned
|
|
549
|
+
});
|
|
550
|
+
} else {
|
|
551
|
+
setVersionLockInfo({
|
|
552
|
+
enabled: false,
|
|
553
|
+
locks: [],
|
|
554
|
+
locksDir: "",
|
|
555
|
+
staleLocksCleaned: 0
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
})();
|
|
559
|
+
}, [toolPermissionContext, tools, agentDefinitions]);
|
|
560
|
+
const handleDismiss = import_react.useCallback(() => {
|
|
561
|
+
onDone("Claude Code diagnostics dismissed", { display: "system" });
|
|
562
|
+
}, [onDone]);
|
|
563
|
+
useKeybindings({
|
|
564
|
+
"confirm:yes": handleDismiss,
|
|
565
|
+
"confirm:no": handleDismiss
|
|
566
|
+
}, { context: "Confirmation" });
|
|
567
|
+
if (!diagnostic) {
|
|
568
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Pane, {
|
|
569
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
570
|
+
dimColor: true,
|
|
571
|
+
children: "Checking installation status\u2026"
|
|
572
|
+
}, undefined, false, undefined, this)
|
|
573
|
+
}, undefined, false, undefined, this);
|
|
574
|
+
}
|
|
575
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Pane, {
|
|
576
|
+
children: [
|
|
577
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
578
|
+
flexDirection: "column",
|
|
579
|
+
children: [
|
|
580
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
581
|
+
bold: true,
|
|
582
|
+
children: "Diagnostics"
|
|
583
|
+
}, undefined, false, undefined, this),
|
|
584
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
585
|
+
children: [
|
|
586
|
+
"\u2514 Currently running: ",
|
|
587
|
+
diagnostic.installationType,
|
|
588
|
+
" (",
|
|
589
|
+
diagnostic.version,
|
|
590
|
+
")"
|
|
591
|
+
]
|
|
592
|
+
}, undefined, true, undefined, this),
|
|
593
|
+
diagnostic.packageManager && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
594
|
+
children: [
|
|
595
|
+
"\u2514 Package manager: ",
|
|
596
|
+
diagnostic.packageManager
|
|
597
|
+
]
|
|
598
|
+
}, undefined, true, undefined, this),
|
|
599
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
600
|
+
children: [
|
|
601
|
+
"\u2514 Path: ",
|
|
602
|
+
diagnostic.installationPath
|
|
603
|
+
]
|
|
604
|
+
}, undefined, true, undefined, this),
|
|
605
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
606
|
+
children: [
|
|
607
|
+
"\u2514 Invoked: ",
|
|
608
|
+
diagnostic.invokedBinary
|
|
609
|
+
]
|
|
610
|
+
}, undefined, true, undefined, this),
|
|
611
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
612
|
+
children: [
|
|
613
|
+
"\u2514 Config install method: ",
|
|
614
|
+
diagnostic.configInstallMethod
|
|
615
|
+
]
|
|
616
|
+
}, undefined, true, undefined, this),
|
|
617
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
618
|
+
children: [
|
|
619
|
+
"\u2514 Search: ",
|
|
620
|
+
diagnostic.ripgrepStatus.working ? "OK" : "Not working",
|
|
621
|
+
" (",
|
|
622
|
+
diagnostic.ripgrepStatus.mode === "embedded" ? "bundled" : diagnostic.ripgrepStatus.mode === "builtin" ? "vendor" : diagnostic.ripgrepStatus.systemPath || "system",
|
|
623
|
+
")"
|
|
624
|
+
]
|
|
625
|
+
}, undefined, true, undefined, this),
|
|
626
|
+
diagnostic.recommendation && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
627
|
+
children: [
|
|
628
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {}, undefined, false, undefined, this),
|
|
629
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
630
|
+
color: "warning",
|
|
631
|
+
children: [
|
|
632
|
+
"Recommendation: ",
|
|
633
|
+
diagnostic.recommendation.split(`
|
|
634
|
+
`)[0]
|
|
635
|
+
]
|
|
636
|
+
}, undefined, true, undefined, this),
|
|
637
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
638
|
+
dimColor: true,
|
|
639
|
+
children: diagnostic.recommendation.split(`
|
|
640
|
+
`)[1]
|
|
641
|
+
}, undefined, false, undefined, this)
|
|
642
|
+
]
|
|
643
|
+
}, undefined, true, undefined, this),
|
|
644
|
+
diagnostic.multipleInstallations.length > 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
645
|
+
children: [
|
|
646
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {}, undefined, false, undefined, this),
|
|
647
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
648
|
+
color: "warning",
|
|
649
|
+
children: "Warning: Multiple installations found"
|
|
650
|
+
}, undefined, false, undefined, this),
|
|
651
|
+
diagnostic.multipleInstallations.map((install, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
652
|
+
children: [
|
|
653
|
+
"\u2514 ",
|
|
654
|
+
install.type,
|
|
655
|
+
" at ",
|
|
656
|
+
install.path
|
|
657
|
+
]
|
|
658
|
+
}, i, true, undefined, this))
|
|
659
|
+
]
|
|
660
|
+
}, undefined, true, undefined, this),
|
|
661
|
+
diagnostic.warnings.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
662
|
+
children: [
|
|
663
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {}, undefined, false, undefined, this),
|
|
664
|
+
diagnostic.warnings.map((warning, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
665
|
+
flexDirection: "column",
|
|
666
|
+
children: [
|
|
667
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
668
|
+
color: "warning",
|
|
669
|
+
children: [
|
|
670
|
+
"Warning: ",
|
|
671
|
+
warning.issue
|
|
672
|
+
]
|
|
673
|
+
}, undefined, true, undefined, this),
|
|
674
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
675
|
+
children: [
|
|
676
|
+
"Fix: ",
|
|
677
|
+
warning.fix
|
|
678
|
+
]
|
|
679
|
+
}, undefined, true, undefined, this)
|
|
680
|
+
]
|
|
681
|
+
}, i, true, undefined, this))
|
|
682
|
+
]
|
|
683
|
+
}, undefined, true, undefined, this),
|
|
684
|
+
errorsExcludingMcp.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
685
|
+
flexDirection: "column",
|
|
686
|
+
marginTop: 1,
|
|
687
|
+
marginBottom: 1,
|
|
688
|
+
children: [
|
|
689
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
690
|
+
bold: true,
|
|
691
|
+
children: "Invalid Settings"
|
|
692
|
+
}, undefined, false, undefined, this),
|
|
693
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ValidationErrorsList, {
|
|
694
|
+
errors: errorsExcludingMcp
|
|
695
|
+
}, undefined, false, undefined, this)
|
|
696
|
+
]
|
|
697
|
+
}, undefined, true, undefined, this)
|
|
698
|
+
]
|
|
699
|
+
}, undefined, true, undefined, this),
|
|
700
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
701
|
+
flexDirection: "column",
|
|
702
|
+
children: [
|
|
703
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
704
|
+
bold: true,
|
|
705
|
+
children: "Updates"
|
|
706
|
+
}, undefined, false, undefined, this),
|
|
707
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
708
|
+
children: [
|
|
709
|
+
"\u2514 Auto-updates:",
|
|
710
|
+
" ",
|
|
711
|
+
diagnostic.packageManager ? "Managed by package manager" : diagnostic.autoUpdates
|
|
712
|
+
]
|
|
713
|
+
}, undefined, true, undefined, this),
|
|
714
|
+
diagnostic.hasUpdatePermissions !== null && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
715
|
+
children: [
|
|
716
|
+
"\u2514 Update permissions:",
|
|
717
|
+
" ",
|
|
718
|
+
diagnostic.hasUpdatePermissions ? "Yes" : "No (requires sudo)"
|
|
719
|
+
]
|
|
720
|
+
}, undefined, true, undefined, this),
|
|
721
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
722
|
+
children: [
|
|
723
|
+
"\u2514 Auto-update channel: ",
|
|
724
|
+
autoUpdatesChannel
|
|
725
|
+
]
|
|
726
|
+
}, undefined, true, undefined, this),
|
|
727
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(import_react.Suspense, {
|
|
728
|
+
fallback: null,
|
|
729
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DistTagsDisplay, {
|
|
730
|
+
promise: distTagsPromise
|
|
731
|
+
}, undefined, false, undefined, this)
|
|
732
|
+
}, undefined, false, undefined, this)
|
|
733
|
+
]
|
|
734
|
+
}, undefined, true, undefined, this),
|
|
735
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(SandboxDoctorSection, {}, undefined, false, undefined, this),
|
|
736
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(McpParsingWarnings, {}, undefined, false, undefined, this),
|
|
737
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(KeybindingWarnings, {}, undefined, false, undefined, this),
|
|
738
|
+
envValidationErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
739
|
+
flexDirection: "column",
|
|
740
|
+
children: [
|
|
741
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
742
|
+
bold: true,
|
|
743
|
+
children: "Environment Variables"
|
|
744
|
+
}, undefined, false, undefined, this),
|
|
745
|
+
envValidationErrors.map((validation, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
746
|
+
children: [
|
|
747
|
+
"\u2514 ",
|
|
748
|
+
validation.name,
|
|
749
|
+
":",
|
|
750
|
+
" ",
|
|
751
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
752
|
+
color: validation.status === "capped" ? "warning" : "error",
|
|
753
|
+
children: validation.message
|
|
754
|
+
}, undefined, false, undefined, this)
|
|
755
|
+
]
|
|
756
|
+
}, i, true, undefined, this))
|
|
757
|
+
]
|
|
758
|
+
}, undefined, true, undefined, this),
|
|
759
|
+
versionLockInfo?.enabled && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
760
|
+
flexDirection: "column",
|
|
761
|
+
children: [
|
|
762
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
763
|
+
bold: true,
|
|
764
|
+
children: "Version Locks"
|
|
765
|
+
}, undefined, false, undefined, this),
|
|
766
|
+
versionLockInfo.staleLocksCleaned > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
767
|
+
dimColor: true,
|
|
768
|
+
children: [
|
|
769
|
+
"\u2514 Cleaned ",
|
|
770
|
+
versionLockInfo.staleLocksCleaned,
|
|
771
|
+
" stale lock(s)"
|
|
772
|
+
]
|
|
773
|
+
}, undefined, true, undefined, this),
|
|
774
|
+
versionLockInfo.locks.length === 0 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
775
|
+
dimColor: true,
|
|
776
|
+
children: "\u2514 No active version locks"
|
|
777
|
+
}, undefined, false, undefined, this) : versionLockInfo.locks.map((lock, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
778
|
+
children: [
|
|
779
|
+
"\u2514 ",
|
|
780
|
+
lock.version,
|
|
781
|
+
": PID ",
|
|
782
|
+
lock.pid,
|
|
783
|
+
" ",
|
|
784
|
+
lock.isProcessRunning ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
785
|
+
children: "(running)"
|
|
786
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
787
|
+
color: "warning",
|
|
788
|
+
children: "(stale)"
|
|
789
|
+
}, undefined, false, undefined, this)
|
|
790
|
+
]
|
|
791
|
+
}, i, true, undefined, this))
|
|
792
|
+
]
|
|
793
|
+
}, undefined, true, undefined, this),
|
|
794
|
+
agentInfo?.failedFiles && agentInfo.failedFiles.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
795
|
+
flexDirection: "column",
|
|
796
|
+
children: [
|
|
797
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
798
|
+
bold: true,
|
|
799
|
+
color: "error",
|
|
800
|
+
children: "Agent Parse Errors"
|
|
801
|
+
}, undefined, false, undefined, this),
|
|
802
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
803
|
+
color: "error",
|
|
804
|
+
children: [
|
|
805
|
+
"\u2514 Failed to parse ",
|
|
806
|
+
agentInfo.failedFiles.length,
|
|
807
|
+
" agent file(s):"
|
|
808
|
+
]
|
|
809
|
+
}, undefined, true, undefined, this),
|
|
810
|
+
agentInfo.failedFiles.map((file, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
811
|
+
dimColor: true,
|
|
812
|
+
children: [
|
|
813
|
+
" ",
|
|
814
|
+
"\u2514 ",
|
|
815
|
+
file.path,
|
|
816
|
+
": ",
|
|
817
|
+
file.error
|
|
818
|
+
]
|
|
819
|
+
}, i, true, undefined, this))
|
|
820
|
+
]
|
|
821
|
+
}, undefined, true, undefined, this),
|
|
822
|
+
pluginsErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
823
|
+
flexDirection: "column",
|
|
824
|
+
children: [
|
|
825
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
826
|
+
bold: true,
|
|
827
|
+
color: "error",
|
|
828
|
+
children: "Plugin Errors"
|
|
829
|
+
}, undefined, false, undefined, this),
|
|
830
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
831
|
+
color: "error",
|
|
832
|
+
children: [
|
|
833
|
+
"\u2514 ",
|
|
834
|
+
pluginsErrors.length,
|
|
835
|
+
" plugin error(s) detected:"
|
|
836
|
+
]
|
|
837
|
+
}, undefined, true, undefined, this),
|
|
838
|
+
pluginsErrors.map((error, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
839
|
+
dimColor: true,
|
|
840
|
+
children: [
|
|
841
|
+
" ",
|
|
842
|
+
"\u2514 ",
|
|
843
|
+
error.source || "unknown",
|
|
844
|
+
"plugin" in error && error.plugin ? ` [${error.plugin}]` : "",
|
|
845
|
+
":",
|
|
846
|
+
" ",
|
|
847
|
+
getPluginErrorMessage(error)
|
|
848
|
+
]
|
|
849
|
+
}, i, true, undefined, this))
|
|
850
|
+
]
|
|
851
|
+
}, undefined, true, undefined, this),
|
|
852
|
+
contextWarnings?.unreachableRulesWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
853
|
+
flexDirection: "column",
|
|
854
|
+
children: [
|
|
855
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
856
|
+
bold: true,
|
|
857
|
+
color: "warning",
|
|
858
|
+
children: "Unreachable Permission Rules"
|
|
859
|
+
}, undefined, false, undefined, this),
|
|
860
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
861
|
+
children: [
|
|
862
|
+
"\u2514",
|
|
863
|
+
" ",
|
|
864
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
865
|
+
color: "warning",
|
|
866
|
+
children: [
|
|
867
|
+
figures_default.warning,
|
|
868
|
+
" ",
|
|
869
|
+
contextWarnings.unreachableRulesWarning.message
|
|
870
|
+
]
|
|
871
|
+
}, undefined, true, undefined, this)
|
|
872
|
+
]
|
|
873
|
+
}, undefined, true, undefined, this),
|
|
874
|
+
contextWarnings.unreachableRulesWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
875
|
+
dimColor: true,
|
|
876
|
+
children: [
|
|
877
|
+
" ",
|
|
878
|
+
"\u2514 ",
|
|
879
|
+
detail
|
|
880
|
+
]
|
|
881
|
+
}, i, true, undefined, this))
|
|
882
|
+
]
|
|
883
|
+
}, undefined, true, undefined, this),
|
|
884
|
+
contextWarnings && (contextWarnings.claudeMdWarning || contextWarnings.agentWarning || contextWarnings.mcpWarning) && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
885
|
+
flexDirection: "column",
|
|
886
|
+
children: [
|
|
887
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
888
|
+
bold: true,
|
|
889
|
+
children: "Context Usage Warnings"
|
|
890
|
+
}, undefined, false, undefined, this),
|
|
891
|
+
contextWarnings.claudeMdWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
892
|
+
children: [
|
|
893
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
894
|
+
children: [
|
|
895
|
+
"\u2514",
|
|
896
|
+
" ",
|
|
897
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
898
|
+
color: "warning",
|
|
899
|
+
children: [
|
|
900
|
+
figures_default.warning,
|
|
901
|
+
" ",
|
|
902
|
+
contextWarnings.claudeMdWarning.message
|
|
903
|
+
]
|
|
904
|
+
}, undefined, true, undefined, this)
|
|
905
|
+
]
|
|
906
|
+
}, undefined, true, undefined, this),
|
|
907
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
908
|
+
children: [
|
|
909
|
+
" ",
|
|
910
|
+
"\u2514 Files:"
|
|
911
|
+
]
|
|
912
|
+
}, undefined, true, undefined, this),
|
|
913
|
+
contextWarnings.claudeMdWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
914
|
+
dimColor: true,
|
|
915
|
+
children: [
|
|
916
|
+
" ",
|
|
917
|
+
"\u2514 ",
|
|
918
|
+
detail
|
|
919
|
+
]
|
|
920
|
+
}, i, true, undefined, this))
|
|
921
|
+
]
|
|
922
|
+
}, undefined, true, undefined, this),
|
|
923
|
+
contextWarnings.agentWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
924
|
+
children: [
|
|
925
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
926
|
+
children: [
|
|
927
|
+
"\u2514",
|
|
928
|
+
" ",
|
|
929
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
930
|
+
color: "warning",
|
|
931
|
+
children: [
|
|
932
|
+
figures_default.warning,
|
|
933
|
+
" ",
|
|
934
|
+
contextWarnings.agentWarning.message
|
|
935
|
+
]
|
|
936
|
+
}, undefined, true, undefined, this)
|
|
937
|
+
]
|
|
938
|
+
}, undefined, true, undefined, this),
|
|
939
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
940
|
+
children: [
|
|
941
|
+
" ",
|
|
942
|
+
"\u2514 Top contributors:"
|
|
943
|
+
]
|
|
944
|
+
}, undefined, true, undefined, this),
|
|
945
|
+
contextWarnings.agentWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
946
|
+
dimColor: true,
|
|
947
|
+
children: [
|
|
948
|
+
" ",
|
|
949
|
+
"\u2514 ",
|
|
950
|
+
detail
|
|
951
|
+
]
|
|
952
|
+
}, i, true, undefined, this))
|
|
953
|
+
]
|
|
954
|
+
}, undefined, true, undefined, this),
|
|
955
|
+
contextWarnings.mcpWarning && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
956
|
+
children: [
|
|
957
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
958
|
+
children: [
|
|
959
|
+
"\u2514",
|
|
960
|
+
" ",
|
|
961
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
962
|
+
color: "warning",
|
|
963
|
+
children: [
|
|
964
|
+
figures_default.warning,
|
|
965
|
+
" ",
|
|
966
|
+
contextWarnings.mcpWarning.message
|
|
967
|
+
]
|
|
968
|
+
}, undefined, true, undefined, this)
|
|
969
|
+
]
|
|
970
|
+
}, undefined, true, undefined, this),
|
|
971
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
972
|
+
children: [
|
|
973
|
+
" ",
|
|
974
|
+
"\u2514 MCP servers:"
|
|
975
|
+
]
|
|
976
|
+
}, undefined, true, undefined, this),
|
|
977
|
+
contextWarnings.mcpWarning.details.map((detail, i) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
978
|
+
dimColor: true,
|
|
979
|
+
children: [
|
|
980
|
+
" ",
|
|
981
|
+
"\u2514 ",
|
|
982
|
+
detail
|
|
983
|
+
]
|
|
984
|
+
}, i, true, undefined, this))
|
|
985
|
+
]
|
|
986
|
+
}, undefined, true, undefined, this)
|
|
987
|
+
]
|
|
988
|
+
}, undefined, true, undefined, this),
|
|
989
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
990
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(PressEnterToContinue, {}, undefined, false, undefined, this)
|
|
991
|
+
}, undefined, false, undefined, this)
|
|
992
|
+
]
|
|
993
|
+
}, undefined, true, undefined, this);
|
|
994
|
+
}
|
|
995
|
+
var import_react, jsx_dev_runtime3, getGcsDistTags = async () => ({ latest: null, stable: null }), getNpmDistTags = async () => ({ latest: null, stable: null });
|
|
996
|
+
var init_Doctor = __esm(() => {
|
|
997
|
+
init_figures();
|
|
998
|
+
init_KeybindingWarnings();
|
|
999
|
+
init_McpParsingWarnings();
|
|
1000
|
+
init_context();
|
|
1001
|
+
init_envUtils();
|
|
1002
|
+
init_state();
|
|
1003
|
+
init_src();
|
|
1004
|
+
init_PressEnterToContinue();
|
|
1005
|
+
init_SandboxDoctorSection();
|
|
1006
|
+
init_ValidationErrorsList();
|
|
1007
|
+
init_useSettingsErrors();
|
|
1008
|
+
init_useExitOnCtrlCDWithKeybindings();
|
|
1009
|
+
init_src();
|
|
1010
|
+
init_useKeybinding();
|
|
1011
|
+
init_AppState();
|
|
1012
|
+
init_plugin();
|
|
1013
|
+
init_doctorContextWarnings();
|
|
1014
|
+
init_doctorDiagnostic();
|
|
1015
|
+
init_envValidation();
|
|
1016
|
+
init_file();
|
|
1017
|
+
init_pidLock();
|
|
1018
|
+
init_settings();
|
|
1019
|
+
init_outputLimits();
|
|
1020
|
+
init_outputFormatting();
|
|
1021
|
+
init_xdg();
|
|
1022
|
+
import_react = __toESM(require_react(), 1);
|
|
1023
|
+
jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
export { Doctor, init_Doctor };
|