@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.
- package/dist/gateway/index.js +98 -22
- package/dist/gateway/worker.js +196 -47
- package/dist/sdk/query.cjs +2 -362
- package/dist/sdk/query.js +2 -367
- package/package.json +4 -6
- package/dist/chunk-05kvhzd7.js +0 -3561
- package/dist/chunk-07069jq1.js +0 -30
- package/dist/chunk-0731m51q.js +0 -8
- package/dist/chunk-08bspa4b.js +0 -673
- package/dist/chunk-0brkf8q8.js +0 -89
- package/dist/chunk-0n843xh7.js +0 -261
- package/dist/chunk-0nbp5jwx.js +0 -8583
- package/dist/chunk-0nj16az9.js +0 -169
- package/dist/chunk-0paqc2yw.js +0 -15
- package/dist/chunk-0q6b50ps.js +0 -111
- package/dist/chunk-0r5bb9j4.js +0 -477
- package/dist/chunk-0rpz1wgn.js +0 -1030
- package/dist/chunk-0t81d427.js +0 -41
- package/dist/chunk-0vaw02wq.js +0 -24
- package/dist/chunk-0vkfrmqm.js +0 -690
- package/dist/chunk-0vp3wfab.js +0 -12
- package/dist/chunk-0vr10742.js +0 -1809
- package/dist/chunk-0xjaqda8.js +0 -1124
- package/dist/chunk-13ehyphg.js +0 -223
- package/dist/chunk-15jsw9bb.js +0 -349
- package/dist/chunk-16m7eyyw.js +0 -1385
- package/dist/chunk-1ae3nt9j.js +0 -31
- package/dist/chunk-1gq4r3v1.js +0 -308
- package/dist/chunk-1gx78081.js +0 -66
- package/dist/chunk-1h2famwb.js +0 -49
- package/dist/chunk-1n546sfg.js +0 -200
- package/dist/chunk-1qg06d60.js +0 -494
- package/dist/chunk-1t0rqstn.js +0 -146
- package/dist/chunk-1z8p2eqd.js +0 -40
- package/dist/chunk-1zjh9cc5.js +0 -266
- package/dist/chunk-20ahkkrb.js +0 -132
- package/dist/chunk-21pbfch8.js +0 -105
- package/dist/chunk-26wtxbdc.js +0 -13870
- package/dist/chunk-2fwze72g.js +0 -24
- package/dist/chunk-2gcbr1c7.js +0 -107
- package/dist/chunk-2grc1yr8.js +0 -654
- package/dist/chunk-2gzv8nrw.js +0 -205
- package/dist/chunk-2r212cvt.js +0 -253
- package/dist/chunk-2s74bt6e.js +0 -317
- package/dist/chunk-2v385w7r.js +0 -7422
- package/dist/chunk-2wtkvpp2.js +0 -167
- package/dist/chunk-31rsspfr.js +0 -418
- package/dist/chunk-3c25bcsw.js +0 -17
- package/dist/chunk-3jm08aaw.js +0 -91
- package/dist/chunk-3mgywd32.js +0 -8
- package/dist/chunk-3nk79af8.js +0 -8
- package/dist/chunk-3v4sk2py.js +0 -101
- package/dist/chunk-3vwft0eh.js +0 -349
- package/dist/chunk-3vy1jt9p.js +0 -1010
- package/dist/chunk-3wvqzq9w.js +0 -92
- package/dist/chunk-3wvv2s8d.js +0 -336
- package/dist/chunk-4060b3s2.js +0 -108
- package/dist/chunk-434e0vh4.js +0 -275
- package/dist/chunk-46dm23zs.js +0 -344
- package/dist/chunk-4bh4qs70.js +0 -209
- package/dist/chunk-4cxzbqws.js +0 -94
- package/dist/chunk-4jm600zv.js +0 -13
- package/dist/chunk-4k9d7gxv.js +0 -118
- package/dist/chunk-4nc3t6ms.js +0 -396
- package/dist/chunk-4pbx3g7s.js +0 -26
- package/dist/chunk-4qhh8bpa.js +0 -54
- package/dist/chunk-4v63px9y.js +0 -133
- package/dist/chunk-4xnnzt3j.js +0 -74
- package/dist/chunk-4zchh01h.js +0 -201
- package/dist/chunk-5216fha8.js +0 -1163
- package/dist/chunk-55raexh7.js +0 -14358
- package/dist/chunk-5bffhf64.js +0 -81
- package/dist/chunk-5ccdsxgy.js +0 -74
- package/dist/chunk-5ddh2hyn.js +0 -91
- package/dist/chunk-5e6ncq5j.js +0 -61
- package/dist/chunk-5ekyhb1w.js +0 -422
- package/dist/chunk-5fy4r8rv.js +0 -52
- package/dist/chunk-5h5kx2jd.js +0 -34
- package/dist/chunk-5mbgdvyz.js +0 -847
- package/dist/chunk-5n1jc02d.js +0 -87
- package/dist/chunk-5pysjah8.js +0 -1543
- package/dist/chunk-5ssfz438.js +0 -323
- package/dist/chunk-5z28bqne.js +0 -6748
- package/dist/chunk-603y0mmg.js +0 -50
- package/dist/chunk-62v5kkff.js +0 -90
- package/dist/chunk-64c1avct.js +0 -13
- package/dist/chunk-64r16v22.js +0 -162
- package/dist/chunk-64smdx4a.js +0 -418
- package/dist/chunk-66zry909.js +0 -11
- package/dist/chunk-68ffk5qa.js +0 -14
- package/dist/chunk-69n11zng.js +0 -436
- package/dist/chunk-6dj5t602.js +0 -341
- package/dist/chunk-6dngjwkh.js +0 -63
- package/dist/chunk-6nsd9606.js +0 -790
- package/dist/chunk-6pkh8frk.js +0 -253
- package/dist/chunk-6qcmt5eb.js +0 -251
- package/dist/chunk-6ww7451s.js +0 -60
- package/dist/chunk-6xgb0kqz.js +0 -90
- package/dist/chunk-72ys9m07.js +0 -121
- package/dist/chunk-741sgvtx.js +0 -121
- package/dist/chunk-7aw745vx.js +0 -40175
- package/dist/chunk-7c8b8cfb.js +0 -219
- package/dist/chunk-7mwt4e1z.js +0 -234
- package/dist/chunk-7sgtxrsc.js +0 -1059
- package/dist/chunk-7wm5s02e.js +0 -216
- package/dist/chunk-7xyswgjh.js +0 -8
- package/dist/chunk-80a197ez.js +0 -1438
- package/dist/chunk-83hfzbx3.js +0 -10
- package/dist/chunk-8akrsgad.js +0 -55
- package/dist/chunk-8g5pe1gr.js +0 -37
- package/dist/chunk-8s07t4k7.js +0 -40
- package/dist/chunk-8yhf030a.js +0 -69
- package/dist/chunk-928tzaa8.js +0 -107
- package/dist/chunk-949pjzj9.js +0 -266
- package/dist/chunk-9aycd4z9.js +0 -490
- package/dist/chunk-9bzqvsz5.js +0 -211
- package/dist/chunk-9q3xfy27.js +0 -460
- package/dist/chunk-9vzg1360.js +0 -153
- package/dist/chunk-9wbh8n1y.js +0 -63
- package/dist/chunk-9x5zgy22.js +0 -12
- package/dist/chunk-9zdj4ypz.js +0 -206
- package/dist/chunk-a0bvcgyd.js +0 -127
- package/dist/chunk-a4m3yr2q.js +0 -117
- package/dist/chunk-a8jd4gee.js +0 -227
- package/dist/chunk-ase86y73.js +0 -15
- package/dist/chunk-atfzpm6r.js +0 -325
- package/dist/chunk-awqsddp2.js +0 -338
- package/dist/chunk-awrgzpk6.js +0 -29
- package/dist/chunk-b0kf00ff.js +0 -637
- package/dist/chunk-b1kcd3ss.js +0 -27
- package/dist/chunk-b4hy21c4.js +0 -140
- package/dist/chunk-b9mkm8mg.js +0 -111
- package/dist/chunk-bdjx14rd.js +0 -594
- package/dist/chunk-bfb41q9h.js +0 -295
- package/dist/chunk-bg4x9ex0.js +0 -21
- package/dist/chunk-bh5zqvyc.js +0 -36
- package/dist/chunk-bn0zv2y2.js +0 -1154
- package/dist/chunk-bn7t681c.js +0 -2669
- package/dist/chunk-br4wgffc.js +0 -393
- package/dist/chunk-brjd9zmk.js +0 -42
- package/dist/chunk-byfawrfx.js +0 -121
- package/dist/chunk-c6sjhj89.js +0 -1284
- package/dist/chunk-c7jwbe76.js +0 -29030
- package/dist/chunk-cdef9v7b.js +0 -27
- package/dist/chunk-cdz5yb0r.js +0 -57
- package/dist/chunk-cevq1787.js +0 -2718
- package/dist/chunk-cgfdkzhb.js +0 -12
- package/dist/chunk-cgqw4x5z.js +0 -155
- package/dist/chunk-cmmmc8e0.js +0 -212
- package/dist/chunk-cnsj3vq2.js +0 -35
- package/dist/chunk-cxrktb5g.js +0 -51
- package/dist/chunk-cyhrb0bk.js +0 -251
- package/dist/chunk-d23rmn8r.js +0 -62
- package/dist/chunk-d4mdda98.js +0 -94
- package/dist/chunk-dcwp94cj.js +0 -152
- package/dist/chunk-ddsjkqs4.js +0 -39
- package/dist/chunk-ddv56j39.js +0 -148
- package/dist/chunk-dfq6pbq7.js +0 -5822
- package/dist/chunk-dfzkwynj.js +0 -5368
- package/dist/chunk-dkgkd8b7.js +0 -516
- package/dist/chunk-dpnmf0pq.js +0 -312
- package/dist/chunk-dygx7vcc.js +0 -226
- package/dist/chunk-e0abab5b.js +0 -445
- package/dist/chunk-e5qhvhjy.js +0 -168
- package/dist/chunk-e60y6r1n.js +0 -20
- package/dist/chunk-e68kgvcq.js +0 -79
- package/dist/chunk-e9w9zc0g.js +0 -392
- package/dist/chunk-ecj9w6tm.js +0 -558
- package/dist/chunk-ehtwnxpg.js +0 -1591
- package/dist/chunk-eqp1rfft.js +0 -17
- package/dist/chunk-etdt1xz3.js +0 -19
- package/dist/chunk-ewadzrm8.js +0 -103
- package/dist/chunk-f03s83vj.js +0 -91
- package/dist/chunk-f3kk0p3s.js +0 -150
- package/dist/chunk-f3pjerx4.js +0 -4265
- package/dist/chunk-f6h5weh6.js +0 -61
- package/dist/chunk-fajg8x36.js +0 -8158
- package/dist/chunk-fbv4apne.js +0 -51
- package/dist/chunk-fcynwjpm.js +0 -1072
- package/dist/chunk-fdvaf6nn.js +0 -20
- package/dist/chunk-feyzykye.js +0 -10
- package/dist/chunk-ff85rwvc.js +0 -180
- package/dist/chunk-fqak69ft.js +0 -458
- package/dist/chunk-fxdkbabd.js +0 -195
- package/dist/chunk-fyc5fepv.js +0 -10
- package/dist/chunk-g78c6ztj.js +0 -89
- package/dist/chunk-g8ee7yza.js +0 -105
- package/dist/chunk-g9f19ttm.js +0 -15
- package/dist/chunk-gcktsbxb.js +0 -77
- package/dist/chunk-gdwdqewd.js +0 -19
- package/dist/chunk-gg55fns0.js +0 -6440
- package/dist/chunk-gnpt1t6q.js +0 -209364
- package/dist/chunk-gsbw2j2b.js +0 -276
- package/dist/chunk-gybt680f.js +0 -9114
- package/dist/chunk-gz1e8y1w.js +0 -33
- package/dist/chunk-gz7vn2gg.js +0 -114
- package/dist/chunk-h0d5eat0.js +0 -101
- package/dist/chunk-h27tjbp3.js +0 -33118
- package/dist/chunk-h2yy8k4c.js +0 -58
- package/dist/chunk-h5acpdqt.js +0 -103
- package/dist/chunk-h63r8vps.js +0 -2840
- package/dist/chunk-h64x5b04.js +0 -860
- package/dist/chunk-h92snc84.js +0 -420
- package/dist/chunk-h9n54swm.js +0 -27
- package/dist/chunk-hafcrnpc.js +0 -145
- package/dist/chunk-hakdhagh.js +0 -16606
- package/dist/chunk-hk4phsaw.js +0 -388
- package/dist/chunk-hph1bmqw.js +0 -65
- package/dist/chunk-hvnztnp3.js +0 -71
- package/dist/chunk-hwfknpxv.js +0 -39
- package/dist/chunk-j2xxd002.js +0 -1052
- package/dist/chunk-j3qbygme.js +0 -105
- package/dist/chunk-j5bth84e.js +0 -97
- package/dist/chunk-j64ga6ta.js +0 -8035
- package/dist/chunk-jbwgyskk.js +0 -385
- package/dist/chunk-jd32zbps.js +0 -15
- package/dist/chunk-jdhkh2bb.js +0 -618
- package/dist/chunk-jeqcwgt7.js +0 -177
- package/dist/chunk-jf75p9ap.js +0 -445
- package/dist/chunk-jgvk0za1.js +0 -260
- package/dist/chunk-jhpaevah.js +0 -565
- package/dist/chunk-jmjwrbwd.js +0 -635
- package/dist/chunk-jpdbfwvq.js +0 -100
- package/dist/chunk-jps4m6sz.js +0 -183
- package/dist/chunk-jwf0s51s.js +0 -867
- package/dist/chunk-jxge4dgh.js +0 -83
- package/dist/chunk-jz71gv95.js +0 -1161
- package/dist/chunk-jzthz1bx.js +0 -15
- package/dist/chunk-jzvd2ycp.js +0 -120
- package/dist/chunk-k0p9w03v.js +0 -4957
- package/dist/chunk-k4dcreh0.js +0 -442
- package/dist/chunk-k7akhwkn.js +0 -151
- package/dist/chunk-k8vp0atq.js +0 -2331
- package/dist/chunk-kgd7gfvk.js +0 -407
- package/dist/chunk-km5ycg1j.js +0 -87
- package/dist/chunk-kvyrxzj8.js +0 -26
- package/dist/chunk-kwekc97v.js +0 -18
- package/dist/chunk-ky1z78ve.js +0 -119
- package/dist/chunk-mcws22k3.js +0 -42
- package/dist/chunk-mjazvyd8.js +0 -528
- package/dist/chunk-mswx2nma.js +0 -103
- package/dist/chunk-mz6a0phh.js +0 -2962
- package/dist/chunk-n2tg12hg.js +0 -374
- package/dist/chunk-n3fv4ya7.js +0 -146
- package/dist/chunk-n4eabmqd.js +0 -93
- package/dist/chunk-n4tx7baq.js +0 -193
- package/dist/chunk-n6g4jbeh.js +0 -289
- package/dist/chunk-n6wzfxf1.js +0 -100
- package/dist/chunk-ndcmqfkv.js +0 -244
- package/dist/chunk-netzwgv1.js +0 -154
- package/dist/chunk-nhcg04jt.js +0 -120
- package/dist/chunk-nhsm3ntd.js +0 -439
- package/dist/chunk-njev89d1.js +0 -2335
- package/dist/chunk-nmgj86tt.js +0 -24
- package/dist/chunk-ns7x6xam.js +0 -22820
- package/dist/chunk-p7vkh4wx.js +0 -15
- package/dist/chunk-p8na2wwp.js +0 -14
- package/dist/chunk-p97fd5af.js +0 -684
- package/dist/chunk-pe3rkfp2.js +0 -74
- package/dist/chunk-pgtnj1mt.js +0 -705
- package/dist/chunk-phmnkw9y.js +0 -283
- package/dist/chunk-pnds7g1q.js +0 -130
- package/dist/chunk-ppwjyveh.js +0 -8
- package/dist/chunk-pqqxdk5f.js +0 -543
- package/dist/chunk-ps49ymvj.js +0 -43
- package/dist/chunk-pwwa7s62.js +0 -11
- package/dist/chunk-q3hfrat2.js +0 -313
- package/dist/chunk-qajrkk97.js +0 -298
- package/dist/chunk-qatfdxvd.js +0 -34
- package/dist/chunk-qb5qcctj.js +0 -206
- package/dist/chunk-qb6k2afy.js +0 -153
- package/dist/chunk-qgk93a75.js +0 -85
- package/dist/chunk-qkczt8cr.js +0 -24
- package/dist/chunk-qn1be1vf.js +0 -267
- package/dist/chunk-qnfx3qtx.js +0 -617
- package/dist/chunk-qnwne2m4.js +0 -87
- package/dist/chunk-qp2qdcda.js +0 -100
- package/dist/chunk-qpp3wwh5.js +0 -697
- package/dist/chunk-r0bx1gc7.js +0 -174
- package/dist/chunk-radnwk8x.js +0 -107
- package/dist/chunk-rkv5jq0y.js +0 -71
- package/dist/chunk-rmbbmd3s.js +0 -68
- package/dist/chunk-rmgbs5an.js +0 -640
- package/dist/chunk-rn0v1hk8.js +0 -34
- package/dist/chunk-rnxctq9p.js +0 -1646
- package/dist/chunk-rtd39n81.js +0 -95
- package/dist/chunk-s8gy4ky9.js +0 -122
- package/dist/chunk-s8kj6ajy.js +0 -32
- package/dist/chunk-sd36yzx8.js +0 -954
- package/dist/chunk-sdenh194.js +0 -121
- package/dist/chunk-sdtqp75c.js +0 -55
- package/dist/chunk-sedbc8ep.js +0 -212
- package/dist/chunk-sfrb15b2.js +0 -321
- package/dist/chunk-sgpmpn90.js +0 -35
- package/dist/chunk-sh02d2qn.js +0 -38
- package/dist/chunk-shd4yhsf.js +0 -32
- package/dist/chunk-shkycj1q.js +0 -178
- package/dist/chunk-sk7h93je.js +0 -153
- package/dist/chunk-sm8g6fsm.js +0 -122
- package/dist/chunk-snrjy66h.js +0 -671
- package/dist/chunk-sq4a0yjh.js +0 -116
- package/dist/chunk-sr3t4thh.js +0 -895
- package/dist/chunk-srj6qnf6.js +0 -107
- package/dist/chunk-sz62n77p.js +0 -155
- package/dist/chunk-szj5wvdy.js +0 -28
- package/dist/chunk-t29a6zb5.js +0 -45
- package/dist/chunk-t2ecddwj.js +0 -731
- package/dist/chunk-t33hmmmm.js +0 -113
- package/dist/chunk-t4khqff1.js +0 -16
- package/dist/chunk-t9p85zff.js +0 -24
- package/dist/chunk-ta3jyvxs.js +0 -984
- package/dist/chunk-tkx5eec8.js +0 -54
- package/dist/chunk-v1kzp02e.js +0 -785
- package/dist/chunk-v4t6dyyh.js +0 -9076
- package/dist/chunk-v78fj8by.js +0 -145
- package/dist/chunk-v8kjswxt.js +0 -61
- package/dist/chunk-v9smspw2.js +0 -4301
- package/dist/chunk-vf612n57.js +0 -472
- package/dist/chunk-vkhrrvfq.js +0 -44
- package/dist/chunk-vt5wm07k.js +0 -74
- package/dist/chunk-vvvrv61g.js +0 -875
- package/dist/chunk-vyjeh50y.js +0 -2149
- package/dist/chunk-w0kxcv73.js +0 -97
- package/dist/chunk-w6m6trzq.js +0 -58
- package/dist/chunk-wa8yn2p0.js +0 -2007
- package/dist/chunk-wb18cecv.js +0 -995
- package/dist/chunk-wgk9sxk7.js +0 -329
- package/dist/chunk-wh0ev1bw.js +0 -111
- package/dist/chunk-wka1647p.js +0 -98
- package/dist/chunk-wnwfwyj4.js +0 -90
- package/dist/chunk-wpdchyy2.js +0 -97
- package/dist/chunk-x3g44n7k.js +0 -114
- package/dist/chunk-x47h283a.js +0 -56
- package/dist/chunk-x6r4v44b.js +0 -8
- package/dist/chunk-x7fdwq3d.js +0 -33
- package/dist/chunk-x8d2ehd7.js +0 -19
- package/dist/chunk-xbeg2hej.js +0 -257
- package/dist/chunk-xeb6075z.js +0 -3435
- package/dist/chunk-xhfmdq1y.js +0 -147
- package/dist/chunk-xhscn33a.js +0 -138
- package/dist/chunk-xv3era3s.js +0 -8
- package/dist/chunk-xz5gbhc3.js +0 -93
- package/dist/chunk-y1784krc.js +0 -19
- package/dist/chunk-y1vyezct.js +0 -123
- package/dist/chunk-y45ecntg.js +0 -942
- package/dist/chunk-y4ca9kqz.js +0 -3830
- package/dist/chunk-y9bhjjdz.js +0 -145
- package/dist/chunk-yb3bxv3w.js +0 -30
- package/dist/chunk-ye2q9gqj.js +0 -332
- package/dist/chunk-yfg3adfq.js +0 -88
- package/dist/chunk-yst0wmgw.js +0 -269
- package/dist/chunk-ywe9dbnz.js +0 -460
- package/dist/chunk-yyex5gsf.js +0 -269
- package/dist/chunk-yz2kzqk5.js +0 -439
- package/dist/chunk-z263ehpg.js +0 -131
- package/dist/chunk-z2dp53wn.js +0 -17
- package/dist/chunk-zaq348h2.js +0 -281
- package/dist/chunk-zr0qx9q0.js +0 -642
- package/dist/chunk-zxh62ved.js +0 -31
- package/dist/chunk-zy5vn8sd.js +0 -329
- package/dist/chunk-zzm33q8x.js +0 -8
- package/dist/cli.js +0 -91
package/dist/chunk-9zdj4ypz.js
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
SETTING_SOURCE_TO_SCOPE,
|
|
4
|
-
cacheAndRegisterPlugin,
|
|
5
|
-
getAddDirEnabledPlugins,
|
|
6
|
-
getInMemoryInstalledPlugins,
|
|
7
|
-
getPluginById,
|
|
8
|
-
init_addDirPluginSettings,
|
|
9
|
-
init_installedPluginsManager,
|
|
10
|
-
init_marketplaceManager,
|
|
11
|
-
init_pluginIdentifier,
|
|
12
|
-
init_pluginInstallationHelpers,
|
|
13
|
-
migrateFromEnabledPlugins,
|
|
14
|
-
registerPluginInstallation,
|
|
15
|
-
scopeToSettingSource
|
|
16
|
-
} from "./chunk-gnpt1t6q.js";
|
|
17
|
-
import {
|
|
18
|
-
getInitialSettings,
|
|
19
|
-
getSettingsForSource,
|
|
20
|
-
init_schemas,
|
|
21
|
-
init_settings1 as init_settings,
|
|
22
|
-
isLocalPluginSource,
|
|
23
|
-
updateSettingsForSource
|
|
24
|
-
} from "./chunk-dfq6pbq7.js";
|
|
25
|
-
import {
|
|
26
|
-
getCwd,
|
|
27
|
-
init_cwd
|
|
28
|
-
} from "./chunk-s8kj6ajy.js";
|
|
29
|
-
import {
|
|
30
|
-
init_debug,
|
|
31
|
-
init_log,
|
|
32
|
-
logError,
|
|
33
|
-
logForDebugging
|
|
34
|
-
} from "./chunk-gg55fns0.js";
|
|
35
|
-
import {
|
|
36
|
-
__esm
|
|
37
|
-
} from "./chunk-qp2qdcda.js";
|
|
38
|
-
|
|
39
|
-
// src/utils/plugins/pluginStartupCheck.ts
|
|
40
|
-
import { join } from "path";
|
|
41
|
-
async function checkEnabledPlugins() {
|
|
42
|
-
const settings = getInitialSettings();
|
|
43
|
-
const enabledPlugins = [];
|
|
44
|
-
const addDirPlugins = getAddDirEnabledPlugins();
|
|
45
|
-
for (const [pluginId, value] of Object.entries(addDirPlugins)) {
|
|
46
|
-
if (pluginId.includes("@") && value) {
|
|
47
|
-
enabledPlugins.push(pluginId);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (settings.enabledPlugins) {
|
|
51
|
-
for (const [pluginId, value] of Object.entries(settings.enabledPlugins)) {
|
|
52
|
-
if (!pluginId.includes("@")) {
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
const idx = enabledPlugins.indexOf(pluginId);
|
|
56
|
-
if (value) {
|
|
57
|
-
if (idx === -1) {
|
|
58
|
-
enabledPlugins.push(pluginId);
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
if (idx !== -1) {
|
|
62
|
-
enabledPlugins.splice(idx, 1);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return enabledPlugins;
|
|
68
|
-
}
|
|
69
|
-
function getPluginEditableScopes() {
|
|
70
|
-
const result = new Map;
|
|
71
|
-
const addDirPlugins = getAddDirEnabledPlugins();
|
|
72
|
-
for (const [pluginId, value] of Object.entries(addDirPlugins)) {
|
|
73
|
-
if (!pluginId.includes("@")) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (value === true) {
|
|
77
|
-
result.set(pluginId, "flag");
|
|
78
|
-
} else if (value === false) {
|
|
79
|
-
result.delete(pluginId);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const scopeSources = [
|
|
83
|
-
{ scope: "managed", source: "policySettings" },
|
|
84
|
-
{ scope: "user", source: "userSettings" },
|
|
85
|
-
{ scope: "project", source: "projectSettings" },
|
|
86
|
-
{ scope: "local", source: "localSettings" },
|
|
87
|
-
{ scope: "flag", source: "flagSettings" }
|
|
88
|
-
];
|
|
89
|
-
for (const { scope, source } of scopeSources) {
|
|
90
|
-
const settings = getSettingsForSource(source);
|
|
91
|
-
if (!settings?.enabledPlugins) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
for (const [pluginId, value] of Object.entries(settings.enabledPlugins)) {
|
|
95
|
-
if (!pluginId.includes("@")) {
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
if (pluginId in addDirPlugins && addDirPlugins[pluginId] !== value) {
|
|
99
|
-
logForDebugging(`Plugin ${pluginId} from --add-dir (${addDirPlugins[pluginId]}) overridden by ${source} (${value})`);
|
|
100
|
-
}
|
|
101
|
-
if (value === true) {
|
|
102
|
-
result.set(pluginId, scope);
|
|
103
|
-
} else if (value === false) {
|
|
104
|
-
result.delete(pluginId);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
logForDebugging(`Found ${result.size} enabled plugins with scopes: ${Array.from(result.entries()).map(([id, scope]) => `${id}(${scope})`).join(", ")}`);
|
|
109
|
-
return result;
|
|
110
|
-
}
|
|
111
|
-
function isPersistableScope(scope) {
|
|
112
|
-
return scope !== "flag";
|
|
113
|
-
}
|
|
114
|
-
function settingSourceToScope(source) {
|
|
115
|
-
return SETTING_SOURCE_TO_SCOPE[source];
|
|
116
|
-
}
|
|
117
|
-
async function getInstalledPlugins() {
|
|
118
|
-
migrateFromEnabledPlugins().catch((error) => {
|
|
119
|
-
logError(error);
|
|
120
|
-
});
|
|
121
|
-
const v2Data = getInMemoryInstalledPlugins();
|
|
122
|
-
const installed = Object.keys(v2Data.plugins);
|
|
123
|
-
logForDebugging(`Found ${installed.length} installed plugins`);
|
|
124
|
-
return installed;
|
|
125
|
-
}
|
|
126
|
-
async function findMissingPlugins(enabledPlugins) {
|
|
127
|
-
try {
|
|
128
|
-
const installedPlugins = await getInstalledPlugins();
|
|
129
|
-
const notInstalled = enabledPlugins.filter((id) => !installedPlugins.includes(id));
|
|
130
|
-
const lookups = await Promise.all(notInstalled.map(async (pluginId) => {
|
|
131
|
-
try {
|
|
132
|
-
const plugin = await getPluginById(pluginId);
|
|
133
|
-
return { pluginId, found: plugin !== null && plugin !== undefined };
|
|
134
|
-
} catch (error) {
|
|
135
|
-
logForDebugging(`Failed to check plugin ${pluginId} in marketplace: ${error}`);
|
|
136
|
-
return { pluginId, found: false };
|
|
137
|
-
}
|
|
138
|
-
}));
|
|
139
|
-
const missing = lookups.filter(({ found }) => found).map(({ pluginId }) => pluginId);
|
|
140
|
-
return missing;
|
|
141
|
-
} catch (error) {
|
|
142
|
-
logError(error);
|
|
143
|
-
return [];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async function installSelectedPlugins(pluginsToInstall, onProgress, scope = "user") {
|
|
147
|
-
const projectPath = scope !== "user" ? getCwd() : undefined;
|
|
148
|
-
const settingSource = scopeToSettingSource(scope);
|
|
149
|
-
const settings = getSettingsForSource(settingSource);
|
|
150
|
-
const updatedEnabledPlugins = { ...settings?.enabledPlugins };
|
|
151
|
-
const installed = [];
|
|
152
|
-
const failed = [];
|
|
153
|
-
for (let i = 0;i < pluginsToInstall.length; i++) {
|
|
154
|
-
const pluginId = pluginsToInstall[i];
|
|
155
|
-
if (!pluginId)
|
|
156
|
-
continue;
|
|
157
|
-
if (onProgress) {
|
|
158
|
-
onProgress(pluginId, i + 1, pluginsToInstall.length);
|
|
159
|
-
}
|
|
160
|
-
try {
|
|
161
|
-
const pluginInfo = await getPluginById(pluginId);
|
|
162
|
-
if (!pluginInfo) {
|
|
163
|
-
failed.push({
|
|
164
|
-
name: pluginId,
|
|
165
|
-
error: "Plugin not found in any marketplace"
|
|
166
|
-
});
|
|
167
|
-
continue;
|
|
168
|
-
}
|
|
169
|
-
const { entry, marketplaceInstallLocation } = pluginInfo;
|
|
170
|
-
if (!isLocalPluginSource(entry.source)) {
|
|
171
|
-
await cacheAndRegisterPlugin(pluginId, entry, scope, projectPath);
|
|
172
|
-
} else {
|
|
173
|
-
registerPluginInstallation({
|
|
174
|
-
pluginId,
|
|
175
|
-
installPath: join(marketplaceInstallLocation, entry.source),
|
|
176
|
-
version: entry.version
|
|
177
|
-
}, scope, projectPath);
|
|
178
|
-
}
|
|
179
|
-
updatedEnabledPlugins[pluginId] = true;
|
|
180
|
-
installed.push(pluginId);
|
|
181
|
-
} catch (error) {
|
|
182
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
183
|
-
failed.push({ name: pluginId, error: errorMessage });
|
|
184
|
-
logError(error);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
updateSettingsForSource(settingSource, {
|
|
188
|
-
...settings,
|
|
189
|
-
enabledPlugins: updatedEnabledPlugins
|
|
190
|
-
});
|
|
191
|
-
return { installed, failed };
|
|
192
|
-
}
|
|
193
|
-
var init_pluginStartupCheck = __esm(() => {
|
|
194
|
-
init_cwd();
|
|
195
|
-
init_debug();
|
|
196
|
-
init_log();
|
|
197
|
-
init_settings();
|
|
198
|
-
init_addDirPluginSettings();
|
|
199
|
-
init_installedPluginsManager();
|
|
200
|
-
init_marketplaceManager();
|
|
201
|
-
init_pluginIdentifier();
|
|
202
|
-
init_pluginInstallationHelpers();
|
|
203
|
-
init_schemas();
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
export { checkEnabledPlugins, getPluginEditableScopes, isPersistableScope, settingSourceToScope, getInstalledPlugins, findMissingPlugins, installSelectedPlugins, init_pluginStartupCheck };
|
package/dist/chunk-a0bvcgyd.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
ThemePicker,
|
|
4
|
-
init_ThemePicker
|
|
5
|
-
} from "./chunk-949pjzj9.js";
|
|
6
|
-
import"./chunk-jf75p9ap.js";
|
|
7
|
-
import"./chunk-gnpt1t6q.js";
|
|
8
|
-
import"./chunk-mcws22k3.js";
|
|
9
|
-
import"./chunk-jzthz1bx.js";
|
|
10
|
-
import"./chunk-f6h5weh6.js";
|
|
11
|
-
import"./chunk-hwfknpxv.js";
|
|
12
|
-
import"./chunk-1gx78081.js";
|
|
13
|
-
import"./chunk-ehtwnxpg.js";
|
|
14
|
-
import"./chunk-e68kgvcq.js";
|
|
15
|
-
import"./chunk-p97fd5af.js";
|
|
16
|
-
import"./chunk-x47h283a.js";
|
|
17
|
-
import"./chunk-wb18cecv.js";
|
|
18
|
-
import"./chunk-2gzv8nrw.js";
|
|
19
|
-
import"./chunk-e0abab5b.js";
|
|
20
|
-
import"./chunk-cgfdkzhb.js";
|
|
21
|
-
import"./chunk-4k9d7gxv.js";
|
|
22
|
-
import"./chunk-j5bth84e.js";
|
|
23
|
-
import"./chunk-t2ecddwj.js";
|
|
24
|
-
import"./chunk-68ffk5qa.js";
|
|
25
|
-
import"./chunk-ps49ymvj.js";
|
|
26
|
-
import"./chunk-dkgkd8b7.js";
|
|
27
|
-
import"./chunk-5pysjah8.js";
|
|
28
|
-
import"./chunk-pgtnj1mt.js";
|
|
29
|
-
import"./chunk-hph1bmqw.js";
|
|
30
|
-
import"./chunk-p7vkh4wx.js";
|
|
31
|
-
import"./chunk-y9bhjjdz.js";
|
|
32
|
-
import"./chunk-dcwp94cj.js";
|
|
33
|
-
import"./chunk-tkx5eec8.js";
|
|
34
|
-
import"./chunk-dfzkwynj.js";
|
|
35
|
-
import"./chunk-xeb6075z.js";
|
|
36
|
-
import"./chunk-fcynwjpm.js";
|
|
37
|
-
import"./chunk-v4t6dyyh.js";
|
|
38
|
-
import"./chunk-zy5vn8sd.js";
|
|
39
|
-
import"./chunk-v8kjswxt.js";
|
|
40
|
-
import"./chunk-dfq6pbq7.js";
|
|
41
|
-
import"./chunk-rnxctq9p.js";
|
|
42
|
-
import"./chunk-pqqxdk5f.js";
|
|
43
|
-
import"./chunk-6nsd9606.js";
|
|
44
|
-
import"./chunk-64c1avct.js";
|
|
45
|
-
import"./chunk-8g5pe1gr.js";
|
|
46
|
-
import"./chunk-4pbx3g7s.js";
|
|
47
|
-
import"./chunk-26wtxbdc.js";
|
|
48
|
-
import"./chunk-6dngjwkh.js";
|
|
49
|
-
import"./chunk-4jm600zv.js";
|
|
50
|
-
import"./chunk-s8gy4ky9.js";
|
|
51
|
-
import"./chunk-cxrktb5g.js";
|
|
52
|
-
import"./chunk-3c25bcsw.js";
|
|
53
|
-
import"./chunk-5ekyhb1w.js";
|
|
54
|
-
import"./chunk-fqak69ft.js";
|
|
55
|
-
import"./chunk-cdz5yb0r.js";
|
|
56
|
-
import {
|
|
57
|
-
Pane,
|
|
58
|
-
init_src,
|
|
59
|
-
useTheme
|
|
60
|
-
} from "./chunk-c7jwbe76.js";
|
|
61
|
-
import"./chunk-0vkfrmqm.js";
|
|
62
|
-
import {
|
|
63
|
-
require_jsx_dev_runtime
|
|
64
|
-
} from "./chunk-7sgtxrsc.js";
|
|
65
|
-
import"./chunk-0xjaqda8.js";
|
|
66
|
-
import"./chunk-x8d2ehd7.js";
|
|
67
|
-
import"./chunk-byfawrfx.js";
|
|
68
|
-
import"./chunk-3vy1jt9p.js";
|
|
69
|
-
import"./chunk-vkhrrvfq.js";
|
|
70
|
-
import"./chunk-qnfx3qtx.js";
|
|
71
|
-
import"./chunk-64r16v22.js";
|
|
72
|
-
import"./chunk-s8kj6ajy.js";
|
|
73
|
-
import"./chunk-8yhf030a.js";
|
|
74
|
-
import"./chunk-zxh62ved.js";
|
|
75
|
-
import"./chunk-5z28bqne.js";
|
|
76
|
-
import"./chunk-qajrkk97.js";
|
|
77
|
-
import"./chunk-gg55fns0.js";
|
|
78
|
-
import"./chunk-5n1jc02d.js";
|
|
79
|
-
import"./chunk-fbv4apne.js";
|
|
80
|
-
import"./chunk-k8vp0atq.js";
|
|
81
|
-
import"./chunk-vf612n57.js";
|
|
82
|
-
import"./chunk-07069jq1.js";
|
|
83
|
-
import"./chunk-d4mdda98.js";
|
|
84
|
-
import"./chunk-55raexh7.js";
|
|
85
|
-
import"./chunk-v9smspw2.js";
|
|
86
|
-
import"./chunk-v1kzp02e.js";
|
|
87
|
-
import"./chunk-7wm5s02e.js";
|
|
88
|
-
import"./chunk-b0kf00ff.js";
|
|
89
|
-
import"./chunk-netzwgv1.js";
|
|
90
|
-
import {
|
|
91
|
-
__esm,
|
|
92
|
-
__toESM
|
|
93
|
-
} from "./chunk-qp2qdcda.js";
|
|
94
|
-
|
|
95
|
-
// src/commands/theme/theme.tsx
|
|
96
|
-
function ThemePickerCommand({ onDone }) {
|
|
97
|
-
const [, setTheme] = useTheme();
|
|
98
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Pane, {
|
|
99
|
-
color: "permission",
|
|
100
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemePicker, {
|
|
101
|
-
onThemeSelect: (setting) => {
|
|
102
|
-
setTheme(setting);
|
|
103
|
-
onDone(`Theme set to ${setting}`);
|
|
104
|
-
},
|
|
105
|
-
onCancel: () => {
|
|
106
|
-
onDone("Theme picker dismissed", { display: "system" });
|
|
107
|
-
},
|
|
108
|
-
skipExitHandling: true
|
|
109
|
-
}, undefined, false, undefined, this)
|
|
110
|
-
}, undefined, false, undefined, this);
|
|
111
|
-
}
|
|
112
|
-
var jsx_dev_runtime, call = async (onDone, _context) => {
|
|
113
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemePickerCommand, {
|
|
114
|
-
onDone
|
|
115
|
-
}, undefined, false, undefined, this);
|
|
116
|
-
};
|
|
117
|
-
var init_theme = __esm(() => {
|
|
118
|
-
init_src();
|
|
119
|
-
init_ThemePicker();
|
|
120
|
-
init_src();
|
|
121
|
-
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
122
|
-
});
|
|
123
|
-
init_theme();
|
|
124
|
-
|
|
125
|
-
export {
|
|
126
|
-
call
|
|
127
|
-
};
|
package/dist/chunk-a4m3yr2q.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Select,
|
|
4
|
-
init_CustomSelect
|
|
5
|
-
} from "./chunk-gnpt1t6q.js";
|
|
6
|
-
import {
|
|
7
|
-
init_config,
|
|
8
|
-
saveCurrentProjectConfig
|
|
9
|
-
} from "./chunk-dfq6pbq7.js";
|
|
10
|
-
import {
|
|
11
|
-
Dialog,
|
|
12
|
-
Link,
|
|
13
|
-
ThemedBox_default,
|
|
14
|
-
ThemedText,
|
|
15
|
-
init_src
|
|
16
|
-
} from "./chunk-c7jwbe76.js";
|
|
17
|
-
import {
|
|
18
|
-
require_jsx_dev_runtime,
|
|
19
|
-
require_react
|
|
20
|
-
} from "./chunk-7sgtxrsc.js";
|
|
21
|
-
import {
|
|
22
|
-
init_analytics,
|
|
23
|
-
logEvent
|
|
24
|
-
} from "./chunk-x8d2ehd7.js";
|
|
25
|
-
import {
|
|
26
|
-
__esm,
|
|
27
|
-
__toESM
|
|
28
|
-
} from "./chunk-qp2qdcda.js";
|
|
29
|
-
|
|
30
|
-
// src/components/ClaudeMdExternalIncludesDialog.tsx
|
|
31
|
-
function ClaudeMdExternalIncludesDialog({
|
|
32
|
-
onDone,
|
|
33
|
-
isStandaloneDialog,
|
|
34
|
-
externalIncludes
|
|
35
|
-
}) {
|
|
36
|
-
import_react.default.useEffect(() => {
|
|
37
|
-
logEvent("tengu_claude_md_includes_dialog_shown", {});
|
|
38
|
-
}, []);
|
|
39
|
-
const handleSelection = import_react.useCallback((value) => {
|
|
40
|
-
if (value === "no") {
|
|
41
|
-
logEvent("tengu_claude_md_external_includes_dialog_declined", {});
|
|
42
|
-
saveCurrentProjectConfig((current) => ({
|
|
43
|
-
...current,
|
|
44
|
-
hasClaudeMdExternalIncludesApproved: false,
|
|
45
|
-
hasClaudeMdExternalIncludesWarningShown: true
|
|
46
|
-
}));
|
|
47
|
-
} else {
|
|
48
|
-
logEvent("tengu_claude_md_external_includes_dialog_accepted", {});
|
|
49
|
-
saveCurrentProjectConfig((current) => ({
|
|
50
|
-
...current,
|
|
51
|
-
hasClaudeMdExternalIncludesApproved: true,
|
|
52
|
-
hasClaudeMdExternalIncludesWarningShown: true
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
onDone();
|
|
56
|
-
}, [onDone]);
|
|
57
|
-
const handleEscape = import_react.useCallback(() => {
|
|
58
|
-
handleSelection("no");
|
|
59
|
-
}, [handleSelection]);
|
|
60
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
61
|
-
title: "Allow external CLAUDE.md file imports?",
|
|
62
|
-
color: "warning",
|
|
63
|
-
onCancel: handleEscape,
|
|
64
|
-
hideBorder: !isStandaloneDialog,
|
|
65
|
-
hideInputGuide: !isStandaloneDialog,
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
68
|
-
children: "This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories."
|
|
69
|
-
}, undefined, false, undefined, this),
|
|
70
|
-
externalIncludes && externalIncludes.length > 0 && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
71
|
-
flexDirection: "column",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
74
|
-
dimColor: true,
|
|
75
|
-
children: "External imports:"
|
|
76
|
-
}, undefined, false, undefined, this),
|
|
77
|
-
externalIncludes.map((include, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
78
|
-
dimColor: true,
|
|
79
|
-
children: [
|
|
80
|
-
" ",
|
|
81
|
-
include.path
|
|
82
|
-
]
|
|
83
|
-
}, i, true, undefined, this))
|
|
84
|
-
]
|
|
85
|
-
}, undefined, true, undefined, this),
|
|
86
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
87
|
-
dimColor: true,
|
|
88
|
-
children: [
|
|
89
|
-
"Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks",
|
|
90
|
-
" ",
|
|
91
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Link, {
|
|
92
|
-
url: "https://code.claude.com/docs/en/security"
|
|
93
|
-
}, undefined, false, undefined, this),
|
|
94
|
-
" "
|
|
95
|
-
]
|
|
96
|
-
}, undefined, true, undefined, this),
|
|
97
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
98
|
-
options: [
|
|
99
|
-
{ label: "Yes, allow external imports", value: "yes" },
|
|
100
|
-
{ label: "No, disable external imports", value: "no" }
|
|
101
|
-
],
|
|
102
|
-
onChange: (value) => handleSelection(value)
|
|
103
|
-
}, undefined, false, undefined, this)
|
|
104
|
-
]
|
|
105
|
-
}, undefined, true, undefined, this);
|
|
106
|
-
}
|
|
107
|
-
var import_react, jsx_dev_runtime;
|
|
108
|
-
var init_ClaudeMdExternalIncludesDialog = __esm(() => {
|
|
109
|
-
init_analytics();
|
|
110
|
-
init_src();
|
|
111
|
-
init_config();
|
|
112
|
-
init_CustomSelect();
|
|
113
|
-
import_react = __toESM(require_react(), 1);
|
|
114
|
-
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
export { ClaudeMdExternalIncludesDialog, init_ClaudeMdExternalIncludesDialog };
|
package/dist/chunk-a8jd4gee.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
getStoredChangelogFromMemory,
|
|
4
|
-
init_releaseNotes,
|
|
5
|
-
parseChangelog
|
|
6
|
-
} from "./chunk-13ehyphg.js";
|
|
7
|
-
import {
|
|
8
|
-
init_sessionStorage,
|
|
9
|
-
loadMessageLogs
|
|
10
|
-
} from "./chunk-gnpt1t6q.js";
|
|
11
|
-
import {
|
|
12
|
-
gt,
|
|
13
|
-
init_semver
|
|
14
|
-
} from "./chunk-ps49ymvj.js";
|
|
15
|
-
import {
|
|
16
|
-
getDisplayPath,
|
|
17
|
-
getInitialSettings,
|
|
18
|
-
init_file,
|
|
19
|
-
init_settings1 as init_settings
|
|
20
|
-
} from "./chunk-dfq6pbq7.js";
|
|
21
|
-
import {
|
|
22
|
-
init_format,
|
|
23
|
-
truncate,
|
|
24
|
-
truncateToWidth,
|
|
25
|
-
truncateToWidthNoEllipsis
|
|
26
|
-
} from "./chunk-fqak69ft.js";
|
|
27
|
-
import {
|
|
28
|
-
init_src,
|
|
29
|
-
stringWidth
|
|
30
|
-
} from "./chunk-c7jwbe76.js";
|
|
31
|
-
import {
|
|
32
|
-
getCwd,
|
|
33
|
-
init_cwd
|
|
34
|
-
} from "./chunk-s8kj6ajy.js";
|
|
35
|
-
import {
|
|
36
|
-
getDirectConnectServerUrl,
|
|
37
|
-
getSessionId,
|
|
38
|
-
init_state
|
|
39
|
-
} from "./chunk-k8vp0atq.js";
|
|
40
|
-
import {
|
|
41
|
-
__esm
|
|
42
|
-
} from "./chunk-qp2qdcda.js";
|
|
43
|
-
|
|
44
|
-
// src/utils/logoV2Utils.ts
|
|
45
|
-
function getLayoutMode(columns) {
|
|
46
|
-
if (columns >= 70)
|
|
47
|
-
return "horizontal";
|
|
48
|
-
return "compact";
|
|
49
|
-
}
|
|
50
|
-
function calculateLayoutDimensions(columns, layoutMode, optimalLeftWidth) {
|
|
51
|
-
if (layoutMode === "horizontal") {
|
|
52
|
-
const leftWidth = optimalLeftWidth;
|
|
53
|
-
const usedSpace = BORDER_PADDING + CONTENT_PADDING + DIVIDER_WIDTH + leftWidth;
|
|
54
|
-
const availableForRight = columns - usedSpace;
|
|
55
|
-
let rightWidth = Math.max(30, availableForRight);
|
|
56
|
-
const totalWidth2 = Math.min(leftWidth + rightWidth + DIVIDER_WIDTH + CONTENT_PADDING, columns - BORDER_PADDING);
|
|
57
|
-
if (totalWidth2 < leftWidth + rightWidth + DIVIDER_WIDTH + CONTENT_PADDING) {
|
|
58
|
-
rightWidth = totalWidth2 - leftWidth - DIVIDER_WIDTH - CONTENT_PADDING;
|
|
59
|
-
}
|
|
60
|
-
return { leftWidth, rightWidth, totalWidth: totalWidth2 };
|
|
61
|
-
}
|
|
62
|
-
const totalWidth = Math.min(columns - BORDER_PADDING, MAX_LEFT_WIDTH + 20);
|
|
63
|
-
return {
|
|
64
|
-
leftWidth: totalWidth,
|
|
65
|
-
rightWidth: totalWidth,
|
|
66
|
-
totalWidth
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function calculateOptimalLeftWidth(welcomeMessage, truncatedCwd, modelLine) {
|
|
70
|
-
const contentWidth = Math.max(stringWidth(welcomeMessage), stringWidth(truncatedCwd), stringWidth(modelLine), 20);
|
|
71
|
-
return Math.min(contentWidth + 4, MAX_LEFT_WIDTH);
|
|
72
|
-
}
|
|
73
|
-
function formatWelcomeMessage(username) {
|
|
74
|
-
if (!username || username.length > MAX_USERNAME_LENGTH) {
|
|
75
|
-
return "Welcome back!";
|
|
76
|
-
}
|
|
77
|
-
return `Welcome back ${username}!`;
|
|
78
|
-
}
|
|
79
|
-
function truncatePath(path, maxLength) {
|
|
80
|
-
if (stringWidth(path) <= maxLength)
|
|
81
|
-
return path;
|
|
82
|
-
const separator = "/";
|
|
83
|
-
const ellipsis = "\u2026";
|
|
84
|
-
const ellipsisWidth = 1;
|
|
85
|
-
const separatorWidth = 1;
|
|
86
|
-
const parts = path.split(separator);
|
|
87
|
-
const first = parts[0] || "";
|
|
88
|
-
const last = parts[parts.length - 1] || "";
|
|
89
|
-
const firstWidth = stringWidth(first);
|
|
90
|
-
const lastWidth = stringWidth(last);
|
|
91
|
-
if (parts.length === 1) {
|
|
92
|
-
return truncateToWidth(path, maxLength);
|
|
93
|
-
}
|
|
94
|
-
if (first === "" && ellipsisWidth + separatorWidth + lastWidth >= maxLength) {
|
|
95
|
-
return `${separator}${truncateToWidth(last, Math.max(1, maxLength - separatorWidth))}`;
|
|
96
|
-
}
|
|
97
|
-
if (first !== "" && ellipsisWidth * 2 + separatorWidth + lastWidth >= maxLength) {
|
|
98
|
-
return `${ellipsis}${separator}${truncateToWidth(last, Math.max(1, maxLength - ellipsisWidth - separatorWidth))}`;
|
|
99
|
-
}
|
|
100
|
-
if (parts.length === 2) {
|
|
101
|
-
const availableForFirst = maxLength - ellipsisWidth - separatorWidth - lastWidth;
|
|
102
|
-
return `${truncateToWidthNoEllipsis(first, availableForFirst)}${ellipsis}${separator}${last}`;
|
|
103
|
-
}
|
|
104
|
-
let available = maxLength - firstWidth - lastWidth - ellipsisWidth - 2 * separatorWidth;
|
|
105
|
-
if (available <= 0) {
|
|
106
|
-
const availableForFirst = Math.max(0, maxLength - lastWidth - ellipsisWidth - 2 * separatorWidth);
|
|
107
|
-
const truncatedFirst = truncateToWidthNoEllipsis(first, availableForFirst);
|
|
108
|
-
return `${truncatedFirst}${separator}${ellipsis}${separator}${last}`;
|
|
109
|
-
}
|
|
110
|
-
const middleParts = [];
|
|
111
|
-
for (let i = parts.length - 2;i > 0; i--) {
|
|
112
|
-
const part = parts[i];
|
|
113
|
-
if (part && stringWidth(part) + separatorWidth <= available) {
|
|
114
|
-
middleParts.unshift(part);
|
|
115
|
-
available -= stringWidth(part) + separatorWidth;
|
|
116
|
-
} else {
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (middleParts.length === 0) {
|
|
121
|
-
return `${first}${separator}${ellipsis}${separator}${last}`;
|
|
122
|
-
}
|
|
123
|
-
return `${first}${separator}${ellipsis}${separator}${middleParts.join(separator)}${separator}${last}`;
|
|
124
|
-
}
|
|
125
|
-
async function getRecentActivity() {
|
|
126
|
-
if (cachePromise) {
|
|
127
|
-
return cachePromise;
|
|
128
|
-
}
|
|
129
|
-
const currentSessionId = getSessionId();
|
|
130
|
-
cachePromise = loadMessageLogs(10).then((logs) => {
|
|
131
|
-
cachedActivity = logs.filter((log) => {
|
|
132
|
-
if (log.isSidechain)
|
|
133
|
-
return false;
|
|
134
|
-
if (log.sessionId === currentSessionId)
|
|
135
|
-
return false;
|
|
136
|
-
if (log.summary?.includes("I apologize"))
|
|
137
|
-
return false;
|
|
138
|
-
const hasSummary = log.summary && log.summary !== "No prompt";
|
|
139
|
-
const hasFirstPrompt = log.firstPrompt && log.firstPrompt !== "No prompt";
|
|
140
|
-
return hasSummary || hasFirstPrompt;
|
|
141
|
-
}).slice(0, 3);
|
|
142
|
-
return cachedActivity;
|
|
143
|
-
}).catch(() => {
|
|
144
|
-
cachedActivity = [];
|
|
145
|
-
return cachedActivity;
|
|
146
|
-
});
|
|
147
|
-
return cachePromise;
|
|
148
|
-
}
|
|
149
|
-
function getRecentActivitySync() {
|
|
150
|
-
return cachedActivity;
|
|
151
|
-
}
|
|
152
|
-
function getLogoDisplayData() {
|
|
153
|
-
const version = process.env.DEMO_VERSION ?? "0.0.24";
|
|
154
|
-
const serverUrl = getDirectConnectServerUrl();
|
|
155
|
-
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
156
|
-
const cwd = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
157
|
-
const billingType = "API Usage Billing";
|
|
158
|
-
const agentName = getInitialSettings().agent;
|
|
159
|
-
return {
|
|
160
|
-
version,
|
|
161
|
-
cwd,
|
|
162
|
-
billingType,
|
|
163
|
-
agentName
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
function formatModelAndBilling(modelName, billingType, availableWidth) {
|
|
167
|
-
const separator = " \xB7 ";
|
|
168
|
-
const combinedWidth = stringWidth(modelName) + separator.length + stringWidth(billingType);
|
|
169
|
-
const shouldSplit = combinedWidth > availableWidth;
|
|
170
|
-
if (shouldSplit) {
|
|
171
|
-
return {
|
|
172
|
-
shouldSplit: true,
|
|
173
|
-
truncatedModel: truncate(modelName, availableWidth),
|
|
174
|
-
truncatedBilling: truncate(billingType, availableWidth)
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
return {
|
|
178
|
-
shouldSplit: false,
|
|
179
|
-
truncatedModel: truncate(modelName, Math.max(availableWidth - stringWidth(billingType) - separator.length, 10)),
|
|
180
|
-
truncatedBilling: billingType
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function getRecentReleaseNotesSync(maxItems) {
|
|
184
|
-
if (process.env.USER_TYPE === "ant") {
|
|
185
|
-
const changelog2 = "";
|
|
186
|
-
if (changelog2) {
|
|
187
|
-
const commits = changelog2.trim().split(`
|
|
188
|
-
`).filter(Boolean);
|
|
189
|
-
return commits.slice(0, maxItems);
|
|
190
|
-
}
|
|
191
|
-
return [];
|
|
192
|
-
}
|
|
193
|
-
const changelog = getStoredChangelogFromMemory();
|
|
194
|
-
if (!changelog) {
|
|
195
|
-
return [];
|
|
196
|
-
}
|
|
197
|
-
let parsed;
|
|
198
|
-
try {
|
|
199
|
-
parsed = parseChangelog(changelog);
|
|
200
|
-
} catch {
|
|
201
|
-
return [];
|
|
202
|
-
}
|
|
203
|
-
const allNotes = [];
|
|
204
|
-
const versions = Object.keys(parsed).sort((a, b) => gt(a, b) ? -1 : 1).slice(0, 3);
|
|
205
|
-
for (const version of versions) {
|
|
206
|
-
const notes = parsed[version];
|
|
207
|
-
if (notes) {
|
|
208
|
-
allNotes.push(...notes);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return allNotes.slice(0, maxItems);
|
|
212
|
-
}
|
|
213
|
-
var MAX_LEFT_WIDTH = 50, MAX_USERNAME_LENGTH = 20, BORDER_PADDING = 4, DIVIDER_WIDTH = 1, CONTENT_PADDING = 2, cachedActivity, cachePromise = null;
|
|
214
|
-
var init_logoV2Utils = __esm(() => {
|
|
215
|
-
init_state();
|
|
216
|
-
init_src();
|
|
217
|
-
init_cwd();
|
|
218
|
-
init_file();
|
|
219
|
-
init_format();
|
|
220
|
-
init_releaseNotes();
|
|
221
|
-
init_semver();
|
|
222
|
-
init_sessionStorage();
|
|
223
|
-
init_settings();
|
|
224
|
-
cachedActivity = [];
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
export { getLayoutMode, calculateLayoutDimensions, calculateOptimalLeftWidth, formatWelcomeMessage, truncatePath, getRecentActivity, getRecentActivitySync, getLogoDisplayData, formatModelAndBilling, getRecentReleaseNotesSync, init_logoV2Utils };
|
package/dist/chunk-ase86y73.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__esm
|
|
4
|
-
} from "./chunk-qp2qdcda.js";
|
|
5
|
-
|
|
6
|
-
// src/commands/output-style/output-style.tsx
|
|
7
|
-
async function call(onDone) {
|
|
8
|
-
onDone("/output-style has been deprecated. Use /config to change your output style, or set it in your settings file. Changes take effect on the next session.", { display: "system" });
|
|
9
|
-
}
|
|
10
|
-
var init_output_style = () => {};
|
|
11
|
-
init_output_style();
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
call
|
|
15
|
-
};
|