@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-ndcmqfkv.js
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
getDesktopPath,
|
|
4
|
-
init_file
|
|
5
|
-
} from "./chunk-dfq6pbq7.js";
|
|
6
|
-
import"./chunk-rnxctq9p.js";
|
|
7
|
-
import"./chunk-pqqxdk5f.js";
|
|
8
|
-
import"./chunk-6nsd9606.js";
|
|
9
|
-
import"./chunk-64c1avct.js";
|
|
10
|
-
import"./chunk-4pbx3g7s.js";
|
|
11
|
-
import"./chunk-26wtxbdc.js";
|
|
12
|
-
import"./chunk-3c25bcsw.js";
|
|
13
|
-
import"./chunk-5ekyhb1w.js";
|
|
14
|
-
import"./chunk-fqak69ft.js";
|
|
15
|
-
import"./chunk-cdz5yb0r.js";
|
|
16
|
-
import"./chunk-c7jwbe76.js";
|
|
17
|
-
import"./chunk-0vkfrmqm.js";
|
|
18
|
-
import"./chunk-7sgtxrsc.js";
|
|
19
|
-
import"./chunk-0xjaqda8.js";
|
|
20
|
-
import {
|
|
21
|
-
init_analytics,
|
|
22
|
-
logEvent
|
|
23
|
-
} from "./chunk-x8d2ehd7.js";
|
|
24
|
-
import"./chunk-3vy1jt9p.js";
|
|
25
|
-
import"./chunk-vkhrrvfq.js";
|
|
26
|
-
import"./chunk-qnfx3qtx.js";
|
|
27
|
-
import"./chunk-64r16v22.js";
|
|
28
|
-
import"./chunk-s8kj6ajy.js";
|
|
29
|
-
import"./chunk-8yhf030a.js";
|
|
30
|
-
import"./chunk-zxh62ved.js";
|
|
31
|
-
import"./chunk-5z28bqne.js";
|
|
32
|
-
import"./chunk-qajrkk97.js";
|
|
33
|
-
import {
|
|
34
|
-
getFsImplementation,
|
|
35
|
-
init_debug,
|
|
36
|
-
init_errors,
|
|
37
|
-
init_fsOperations,
|
|
38
|
-
init_log,
|
|
39
|
-
init_slowOperations,
|
|
40
|
-
jsonStringify,
|
|
41
|
-
logError,
|
|
42
|
-
logForDebugging,
|
|
43
|
-
toError
|
|
44
|
-
} from "./chunk-gg55fns0.js";
|
|
45
|
-
import"./chunk-5n1jc02d.js";
|
|
46
|
-
import"./chunk-fbv4apne.js";
|
|
47
|
-
import {
|
|
48
|
-
getSessionId,
|
|
49
|
-
init_state
|
|
50
|
-
} from "./chunk-k8vp0atq.js";
|
|
51
|
-
import"./chunk-vf612n57.js";
|
|
52
|
-
import"./chunk-07069jq1.js";
|
|
53
|
-
import"./chunk-d4mdda98.js";
|
|
54
|
-
import"./chunk-v1kzp02e.js";
|
|
55
|
-
import"./chunk-7wm5s02e.js";
|
|
56
|
-
import"./chunk-netzwgv1.js";
|
|
57
|
-
import {
|
|
58
|
-
__esm
|
|
59
|
-
} from "./chunk-qp2qdcda.js";
|
|
60
|
-
|
|
61
|
-
// src/utils/heapDumpService.ts
|
|
62
|
-
import { createWriteStream, writeFileSync } from "fs";
|
|
63
|
-
import { readdir, readFile, writeFile } from "fs/promises";
|
|
64
|
-
import { join } from "path";
|
|
65
|
-
import { pipeline } from "stream/promises";
|
|
66
|
-
import {
|
|
67
|
-
getHeapSnapshot,
|
|
68
|
-
getHeapSpaceStatistics,
|
|
69
|
-
getHeapStatistics
|
|
70
|
-
} from "v8";
|
|
71
|
-
async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
72
|
-
const usage = process.memoryUsage();
|
|
73
|
-
const heapStats = getHeapStatistics();
|
|
74
|
-
const resourceUsage = process.resourceUsage();
|
|
75
|
-
const uptimeSeconds = process.uptime();
|
|
76
|
-
let heapSpaceStats;
|
|
77
|
-
try {
|
|
78
|
-
heapSpaceStats = getHeapSpaceStatistics();
|
|
79
|
-
} catch {}
|
|
80
|
-
const activeHandles = process._getActiveHandles().length;
|
|
81
|
-
const activeRequests = process._getActiveRequests().length;
|
|
82
|
-
let openFileDescriptors;
|
|
83
|
-
try {
|
|
84
|
-
openFileDescriptors = (await readdir("/proc/self/fd")).length;
|
|
85
|
-
} catch {}
|
|
86
|
-
let smapsRollup;
|
|
87
|
-
try {
|
|
88
|
-
smapsRollup = await readFile("/proc/self/smaps_rollup", "utf8");
|
|
89
|
-
} catch {}
|
|
90
|
-
const nativeMemory = usage.rss - usage.heapUsed;
|
|
91
|
-
const bytesPerSecond = uptimeSeconds > 0 ? usage.rss / uptimeSeconds : 0;
|
|
92
|
-
const mbPerHour = bytesPerSecond * 3600 / (1024 * 1024);
|
|
93
|
-
const potentialLeaks = [];
|
|
94
|
-
if (heapStats.number_of_detached_contexts > 0) {
|
|
95
|
-
potentialLeaks.push(`${heapStats.number_of_detached_contexts} detached context(s) - possible iframe/context leak`);
|
|
96
|
-
}
|
|
97
|
-
if (activeHandles > 100) {
|
|
98
|
-
potentialLeaks.push(`${activeHandles} active handles - possible timer/socket leak`);
|
|
99
|
-
}
|
|
100
|
-
if (nativeMemory > usage.heapUsed) {
|
|
101
|
-
potentialLeaks.push("Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)");
|
|
102
|
-
}
|
|
103
|
-
if (mbPerHour > 100) {
|
|
104
|
-
potentialLeaks.push(`High memory growth rate: ${mbPerHour.toFixed(1)} MB/hour`);
|
|
105
|
-
}
|
|
106
|
-
if (openFileDescriptors && openFileDescriptors > 500) {
|
|
107
|
-
potentialLeaks.push(`${openFileDescriptors} open file descriptors - possible file/socket leak`);
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
timestamp: new Date().toISOString(),
|
|
111
|
-
sessionId: getSessionId(),
|
|
112
|
-
trigger,
|
|
113
|
-
dumpNumber,
|
|
114
|
-
uptimeSeconds,
|
|
115
|
-
memoryUsage: {
|
|
116
|
-
heapUsed: usage.heapUsed,
|
|
117
|
-
heapTotal: usage.heapTotal,
|
|
118
|
-
external: usage.external,
|
|
119
|
-
arrayBuffers: usage.arrayBuffers,
|
|
120
|
-
rss: usage.rss
|
|
121
|
-
},
|
|
122
|
-
memoryGrowthRate: {
|
|
123
|
-
bytesPerSecond,
|
|
124
|
-
mbPerHour
|
|
125
|
-
},
|
|
126
|
-
v8HeapStats: {
|
|
127
|
-
heapSizeLimit: heapStats.heap_size_limit,
|
|
128
|
-
mallocedMemory: heapStats.malloced_memory,
|
|
129
|
-
peakMallocedMemory: heapStats.peak_malloced_memory,
|
|
130
|
-
detachedContexts: heapStats.number_of_detached_contexts,
|
|
131
|
-
nativeContexts: heapStats.number_of_native_contexts
|
|
132
|
-
},
|
|
133
|
-
v8HeapSpaces: heapSpaceStats?.map((space) => ({
|
|
134
|
-
name: space.space_name,
|
|
135
|
-
size: space.space_size,
|
|
136
|
-
used: space.space_used_size,
|
|
137
|
-
available: space.space_available_size
|
|
138
|
-
})),
|
|
139
|
-
resourceUsage: {
|
|
140
|
-
maxRSS: resourceUsage.maxRSS * 1024,
|
|
141
|
-
userCPUTime: resourceUsage.userCPUTime,
|
|
142
|
-
systemCPUTime: resourceUsage.systemCPUTime
|
|
143
|
-
},
|
|
144
|
-
activeHandles,
|
|
145
|
-
activeRequests,
|
|
146
|
-
openFileDescriptors,
|
|
147
|
-
analysis: {
|
|
148
|
-
potentialLeaks,
|
|
149
|
-
recommendation: potentialLeaks.length > 0 ? `WARNING: ${potentialLeaks.length} potential leak indicator(s) found. See potentialLeaks array.` : "No obvious leak indicators. Check heap snapshot for retained objects."
|
|
150
|
-
},
|
|
151
|
-
smapsRollup,
|
|
152
|
-
platform: process.platform,
|
|
153
|
-
nodeVersion: process.version,
|
|
154
|
-
ccVersion: "0.0.24"
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
158
|
-
try {
|
|
159
|
-
const sessionId = getSessionId();
|
|
160
|
-
const diagnostics = await captureMemoryDiagnostics(trigger, dumpNumber);
|
|
161
|
-
const toGB = (bytes) => (bytes / 1024 / 1024 / 1024).toFixed(3);
|
|
162
|
-
logForDebugging(`[HeapDump] Memory state:
|
|
163
|
-
heapUsed: ${toGB(diagnostics.memoryUsage.heapUsed)} GB (in snapshot)
|
|
164
|
-
external: ${toGB(diagnostics.memoryUsage.external)} GB (NOT in snapshot)
|
|
165
|
-
rss: ${toGB(diagnostics.memoryUsage.rss)} GB (total process)
|
|
166
|
-
${diagnostics.analysis.recommendation}`);
|
|
167
|
-
const dumpDir = getDesktopPath();
|
|
168
|
-
await getFsImplementation().mkdir(dumpDir);
|
|
169
|
-
const suffix = dumpNumber > 0 ? `-dump${dumpNumber}` : "";
|
|
170
|
-
const heapFilename = `${sessionId}${suffix}.heapsnapshot`;
|
|
171
|
-
const diagFilename = `${sessionId}${suffix}-diagnostics.json`;
|
|
172
|
-
const heapPath = join(dumpDir, heapFilename);
|
|
173
|
-
const diagPath = join(dumpDir, diagFilename);
|
|
174
|
-
await writeFile(diagPath, jsonStringify(diagnostics, null, 2), {
|
|
175
|
-
mode: 384
|
|
176
|
-
});
|
|
177
|
-
logForDebugging(`[HeapDump] Diagnostics written to ${diagPath}`);
|
|
178
|
-
await writeHeapSnapshot(heapPath);
|
|
179
|
-
logForDebugging(`[HeapDump] Heap dump written to ${heapPath}`);
|
|
180
|
-
logEvent("tengu_heap_dump", {
|
|
181
|
-
triggerManual: trigger === "manual",
|
|
182
|
-
triggerAuto15GB: trigger === "auto-1.5GB",
|
|
183
|
-
dumpNumber,
|
|
184
|
-
success: true
|
|
185
|
-
});
|
|
186
|
-
return { success: true, heapPath, diagPath };
|
|
187
|
-
} catch (err) {
|
|
188
|
-
const error = toError(err);
|
|
189
|
-
logError(error);
|
|
190
|
-
logEvent("tengu_heap_dump", {
|
|
191
|
-
triggerManual: trigger === "manual",
|
|
192
|
-
triggerAuto15GB: trigger === "auto-1.5GB",
|
|
193
|
-
dumpNumber,
|
|
194
|
-
success: false
|
|
195
|
-
});
|
|
196
|
-
return { success: false, error: error.message };
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
async function writeHeapSnapshot(filepath) {
|
|
200
|
-
if (typeof Bun !== "undefined") {
|
|
201
|
-
writeFileSync(filepath, Bun.generateHeapSnapshot("v8", "arraybuffer"), {
|
|
202
|
-
mode: 384
|
|
203
|
-
});
|
|
204
|
-
Bun.gc(true);
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
const writeStream = createWriteStream(filepath, { mode: 384 });
|
|
208
|
-
const heapSnapshotStream = getHeapSnapshot();
|
|
209
|
-
await pipeline(heapSnapshotStream, writeStream);
|
|
210
|
-
}
|
|
211
|
-
var init_heapDumpService = __esm(() => {
|
|
212
|
-
init_state();
|
|
213
|
-
init_analytics();
|
|
214
|
-
init_debug();
|
|
215
|
-
init_errors();
|
|
216
|
-
init_file();
|
|
217
|
-
init_fsOperations();
|
|
218
|
-
init_log();
|
|
219
|
-
init_slowOperations();
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
// src/commands/heapdump/heapdump.ts
|
|
223
|
-
async function call() {
|
|
224
|
-
const result = await performHeapDump();
|
|
225
|
-
if (!result.success) {
|
|
226
|
-
return {
|
|
227
|
-
type: "text",
|
|
228
|
-
value: `Failed to create heap dump: ${result.error}`
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
type: "text",
|
|
233
|
-
value: `${result.heapPath}
|
|
234
|
-
${result.diagPath}`
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
var init_heapdump = __esm(() => {
|
|
238
|
-
init_heapDumpService();
|
|
239
|
-
});
|
|
240
|
-
init_heapdump();
|
|
241
|
-
|
|
242
|
-
export {
|
|
243
|
-
call
|
|
244
|
-
};
|
package/dist/chunk-netzwgv1.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__esm,
|
|
4
|
-
__export
|
|
5
|
-
} from "./chunk-qp2qdcda.js";
|
|
6
|
-
|
|
7
|
-
// node_modules/.bun/supports-color@10.2.2/node_modules/supports-color/index.js
|
|
8
|
-
var exports_supports_color = {};
|
|
9
|
-
__export(exports_supports_color, {
|
|
10
|
-
default: () => supports_color_default,
|
|
11
|
-
createSupportsColor: () => createSupportsColor
|
|
12
|
-
});
|
|
13
|
-
import process from "process";
|
|
14
|
-
import os from "os";
|
|
15
|
-
import tty from "tty";
|
|
16
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
|
|
17
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
18
|
-
const position = argv.indexOf(prefix + flag);
|
|
19
|
-
const terminatorPosition = argv.indexOf("--");
|
|
20
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
21
|
-
}
|
|
22
|
-
function envForceColor() {
|
|
23
|
-
if (!("FORCE_COLOR" in env)) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (env.FORCE_COLOR === "true") {
|
|
27
|
-
return 1;
|
|
28
|
-
}
|
|
29
|
-
if (env.FORCE_COLOR === "false") {
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
if (env.FORCE_COLOR.length === 0) {
|
|
33
|
-
return 1;
|
|
34
|
-
}
|
|
35
|
-
const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
36
|
-
if (![0, 1, 2, 3].includes(level)) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
return level;
|
|
40
|
-
}
|
|
41
|
-
function translateLevel(level) {
|
|
42
|
-
if (level === 0) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
level,
|
|
47
|
-
hasBasic: true,
|
|
48
|
-
has256: level >= 2,
|
|
49
|
-
has16m: level >= 3
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
53
|
-
const noFlagForceColor = envForceColor();
|
|
54
|
-
if (noFlagForceColor !== undefined) {
|
|
55
|
-
flagForceColor = noFlagForceColor;
|
|
56
|
-
}
|
|
57
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
58
|
-
if (forceColor === 0) {
|
|
59
|
-
return 0;
|
|
60
|
-
}
|
|
61
|
-
if (sniffFlags) {
|
|
62
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
63
|
-
return 3;
|
|
64
|
-
}
|
|
65
|
-
if (hasFlag("color=256")) {
|
|
66
|
-
return 2;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
70
|
-
return 1;
|
|
71
|
-
}
|
|
72
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
73
|
-
return 0;
|
|
74
|
-
}
|
|
75
|
-
const min = forceColor || 0;
|
|
76
|
-
if (env.TERM === "dumb") {
|
|
77
|
-
return min;
|
|
78
|
-
}
|
|
79
|
-
if (process.platform === "win32") {
|
|
80
|
-
const osRelease = os.release().split(".");
|
|
81
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
82
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
83
|
-
}
|
|
84
|
-
return 1;
|
|
85
|
-
}
|
|
86
|
-
if ("CI" in env) {
|
|
87
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
88
|
-
return 3;
|
|
89
|
-
}
|
|
90
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
91
|
-
return 1;
|
|
92
|
-
}
|
|
93
|
-
return min;
|
|
94
|
-
}
|
|
95
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
96
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
97
|
-
}
|
|
98
|
-
if (env.COLORTERM === "truecolor") {
|
|
99
|
-
return 3;
|
|
100
|
-
}
|
|
101
|
-
if (env.TERM === "xterm-kitty") {
|
|
102
|
-
return 3;
|
|
103
|
-
}
|
|
104
|
-
if (env.TERM === "xterm-ghostty") {
|
|
105
|
-
return 3;
|
|
106
|
-
}
|
|
107
|
-
if (env.TERM === "wezterm") {
|
|
108
|
-
return 3;
|
|
109
|
-
}
|
|
110
|
-
if ("TERM_PROGRAM" in env) {
|
|
111
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
112
|
-
switch (env.TERM_PROGRAM) {
|
|
113
|
-
case "iTerm.app": {
|
|
114
|
-
return version >= 3 ? 3 : 2;
|
|
115
|
-
}
|
|
116
|
-
case "Apple_Terminal": {
|
|
117
|
-
return 2;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
122
|
-
return 2;
|
|
123
|
-
}
|
|
124
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
125
|
-
return 1;
|
|
126
|
-
}
|
|
127
|
-
if ("COLORTERM" in env) {
|
|
128
|
-
return 1;
|
|
129
|
-
}
|
|
130
|
-
return min;
|
|
131
|
-
}
|
|
132
|
-
function createSupportsColor(stream, options = {}) {
|
|
133
|
-
const level = _supportsColor(stream, {
|
|
134
|
-
streamIsTTY: stream && stream.isTTY,
|
|
135
|
-
...options
|
|
136
|
-
});
|
|
137
|
-
return translateLevel(level);
|
|
138
|
-
}
|
|
139
|
-
var env, flagForceColor, supportsColor, supports_color_default;
|
|
140
|
-
var init_supports_color = __esm(() => {
|
|
141
|
-
({ env } = process);
|
|
142
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
143
|
-
flagForceColor = 0;
|
|
144
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
145
|
-
flagForceColor = 1;
|
|
146
|
-
}
|
|
147
|
-
supportsColor = {
|
|
148
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
149
|
-
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
150
|
-
};
|
|
151
|
-
supports_color_default = supportsColor;
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
export { createSupportsColor, exports_supports_color, init_supports_color };
|
package/dist/chunk-nhcg04jt.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
init_config,
|
|
4
|
-
saveCurrentProjectConfig
|
|
5
|
-
} from "./chunk-dfq6pbq7.js";
|
|
6
|
-
import {
|
|
7
|
-
require_jsx_dev_runtime,
|
|
8
|
-
require_react
|
|
9
|
-
} from "./chunk-7sgtxrsc.js";
|
|
10
|
-
import {
|
|
11
|
-
__toESM
|
|
12
|
-
} from "./chunk-qp2qdcda.js";
|
|
13
|
-
|
|
14
|
-
// src/context/stats.tsx
|
|
15
|
-
init_config();
|
|
16
|
-
var import_react = __toESM(require_react(), 1);
|
|
17
|
-
var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
18
|
-
function percentile(sorted, p) {
|
|
19
|
-
const index = p / 100 * (sorted.length - 1);
|
|
20
|
-
const lower = Math.floor(index);
|
|
21
|
-
const upper = Math.ceil(index);
|
|
22
|
-
if (lower === upper) {
|
|
23
|
-
return sorted[lower];
|
|
24
|
-
}
|
|
25
|
-
return sorted[lower] + (sorted[upper] - sorted[lower]) * (index - lower);
|
|
26
|
-
}
|
|
27
|
-
var RESERVOIR_SIZE = 1024;
|
|
28
|
-
function createStatsStore() {
|
|
29
|
-
const metrics = new Map;
|
|
30
|
-
const histograms = new Map;
|
|
31
|
-
const sets = new Map;
|
|
32
|
-
return {
|
|
33
|
-
increment(name, value = 1) {
|
|
34
|
-
metrics.set(name, (metrics.get(name) ?? 0) + value);
|
|
35
|
-
},
|
|
36
|
-
set(name, value) {
|
|
37
|
-
metrics.set(name, value);
|
|
38
|
-
},
|
|
39
|
-
observe(name, value) {
|
|
40
|
-
let h = histograms.get(name);
|
|
41
|
-
if (!h) {
|
|
42
|
-
h = { reservoir: [], count: 0, sum: 0, min: value, max: value };
|
|
43
|
-
histograms.set(name, h);
|
|
44
|
-
}
|
|
45
|
-
h.count++;
|
|
46
|
-
h.sum += value;
|
|
47
|
-
if (value < h.min) {
|
|
48
|
-
h.min = value;
|
|
49
|
-
}
|
|
50
|
-
if (value > h.max) {
|
|
51
|
-
h.max = value;
|
|
52
|
-
}
|
|
53
|
-
if (h.reservoir.length < RESERVOIR_SIZE) {
|
|
54
|
-
h.reservoir.push(value);
|
|
55
|
-
} else {
|
|
56
|
-
const j = Math.floor(Math.random() * h.count);
|
|
57
|
-
if (j < RESERVOIR_SIZE) {
|
|
58
|
-
h.reservoir[j] = value;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
add(name, value) {
|
|
63
|
-
let s = sets.get(name);
|
|
64
|
-
if (!s) {
|
|
65
|
-
s = new Set;
|
|
66
|
-
sets.set(name, s);
|
|
67
|
-
}
|
|
68
|
-
s.add(value);
|
|
69
|
-
},
|
|
70
|
-
getAll() {
|
|
71
|
-
const result = Object.fromEntries(metrics);
|
|
72
|
-
for (const [name, h] of histograms) {
|
|
73
|
-
if (h.count === 0) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
result[`${name}_count`] = h.count;
|
|
77
|
-
result[`${name}_min`] = h.min;
|
|
78
|
-
result[`${name}_max`] = h.max;
|
|
79
|
-
result[`${name}_avg`] = h.sum / h.count;
|
|
80
|
-
const sorted = [...h.reservoir].sort((a, b) => a - b);
|
|
81
|
-
result[`${name}_p50`] = percentile(sorted, 50);
|
|
82
|
-
result[`${name}_p95`] = percentile(sorted, 95);
|
|
83
|
-
result[`${name}_p99`] = percentile(sorted, 99);
|
|
84
|
-
}
|
|
85
|
-
for (const [name, s] of sets) {
|
|
86
|
-
result[name] = s.size;
|
|
87
|
-
}
|
|
88
|
-
return result;
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
var StatsContext = import_react.createContext(null);
|
|
93
|
-
function StatsProvider({
|
|
94
|
-
store: externalStore,
|
|
95
|
-
children
|
|
96
|
-
}) {
|
|
97
|
-
const internalStore = import_react.useMemo(() => createStatsStore(), []);
|
|
98
|
-
const store = externalStore ?? internalStore;
|
|
99
|
-
import_react.useEffect(() => {
|
|
100
|
-
const flush = () => {
|
|
101
|
-
const metrics = store.getAll();
|
|
102
|
-
if (Object.keys(metrics).length > 0) {
|
|
103
|
-
saveCurrentProjectConfig((current) => ({
|
|
104
|
-
...current,
|
|
105
|
-
lastSessionMetrics: metrics
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
process.on("exit", flush);
|
|
110
|
-
return () => {
|
|
111
|
-
process.off("exit", flush);
|
|
112
|
-
};
|
|
113
|
-
}, [store]);
|
|
114
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(StatsContext.Provider, {
|
|
115
|
-
value: store,
|
|
116
|
-
children
|
|
117
|
-
}, undefined, false, undefined, this);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { createStatsStore, StatsProvider };
|