@caspian2026/agent-sdk 0.0.25 → 0.0.27
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 +1005 -982
- package/dist/sdk/query.cjs +2 -362
- package/dist/sdk/query.js +2 -367
- package/package.json +126 -128
- package/dist/chunk-04n4fe72.js +0 -107
- package/dist/chunk-04ys66ej.js +0 -344
- package/dist/chunk-07069jq1.js +0 -30
- package/dist/chunk-0731m51q.js +0 -8
- package/dist/chunk-086x4ct4.js +0 -26
- package/dist/chunk-0btqb97n.js +0 -295
- package/dist/chunk-0paqc2yw.js +0 -15
- package/dist/chunk-0r1rjydx.js +0 -145
- package/dist/chunk-0r5bb9j4.js +0 -477
- package/dist/chunk-0t81d427.js +0 -41
- package/dist/chunk-0teq2mz0.js +0 -420
- package/dist/chunk-0vkfrmqm.js +0 -690
- package/dist/chunk-0vp3wfab.js +0 -12
- package/dist/chunk-0warp8dx.js +0 -253
- package/dist/chunk-0xjaqda8.js +0 -1124
- package/dist/chunk-10gzv316.js +0 -62
- package/dist/chunk-11pq9n08.js +0 -168
- package/dist/chunk-1ae3nt9j.js +0 -31
- package/dist/chunk-1fmb0njn.js +0 -396
- package/dist/chunk-1gx78081.js +0 -66
- package/dist/chunk-1h2famwb.js +0 -49
- package/dist/chunk-1ng8xwxz.js +0 -276
- package/dist/chunk-1v7jp29h.js +0 -206
- package/dist/chunk-1xxy5zhb.js +0 -673
- package/dist/chunk-20b73w7w.js +0 -117
- package/dist/chunk-20qxd83a.js +0 -1161
- package/dist/chunk-2239ny9q.js +0 -90
- package/dist/chunk-22d4rnef.js +0 -226
- package/dist/chunk-26wtxbdc.js +0 -13870
- package/dist/chunk-27225bjh.js +0 -618
- package/dist/chunk-2b0e32an.js +0 -5822
- package/dist/chunk-2bfa9w1y.js +0 -323
- package/dist/chunk-2epq04w1.js +0 -63
- package/dist/chunk-2fwze72g.js +0 -24
- package/dist/chunk-2gzv8nrw.js +0 -205
- package/dist/chunk-2mexte1r.js +0 -349
- package/dist/chunk-2mzaqh5g.js +0 -338
- package/dist/chunk-2tb6mzfc.js +0 -81
- package/dist/chunk-2xq0g43w.js +0 -558
- package/dist/chunk-334aeqg9.js +0 -90
- package/dist/chunk-34jx4rjd.js +0 -995
- package/dist/chunk-35w5nhex.js +0 -132
- package/dist/chunk-3c25bcsw.js +0 -17
- package/dist/chunk-3eaxj8dg.js +0 -151
- package/dist/chunk-3fdgrwd2.js +0 -111
- package/dist/chunk-3jw0r58d.js +0 -121
- package/dist/chunk-3mgywd32.js +0 -8
- package/dist/chunk-3nk79af8.js +0 -8
- package/dist/chunk-3vy1jt9p.js +0 -1010
- package/dist/chunk-3x78pd4j.js +0 -153
- package/dist/chunk-47x3dsmn.js +0 -95
- package/dist/chunk-49pqt48n.js +0 -108
- package/dist/chunk-4f7m9fjw.js +0 -317
- package/dist/chunk-4jm600zv.js +0 -13
- package/dist/chunk-4k9d7gxv.js +0 -118
- package/dist/chunk-4net8san.js +0 -155
- package/dist/chunk-4pbx3g7s.js +0 -26
- package/dist/chunk-4v125j4z.js +0 -58
- package/dist/chunk-4vxkv5vz.js +0 -1438
- package/dist/chunk-51fqpjy3.js +0 -121
- package/dist/chunk-52e64f2h.js +0 -439
- package/dist/chunk-52e9mdjv.js +0 -684
- package/dist/chunk-55raexh7.js +0 -14358
- package/dist/chunk-59pq5122.js +0 -269
- package/dist/chunk-5bsj67v1.js +0 -349
- package/dist/chunk-5ccdsxgy.js +0 -74
- package/dist/chunk-5ekyhb1w.js +0 -422
- package/dist/chunk-5gcqdn8x.js +0 -867
- package/dist/chunk-5h5kx2jd.js +0 -34
- package/dist/chunk-5hf3werb.js +0 -193
- package/dist/chunk-5n1jc02d.js +0 -87
- package/dist/chunk-5wfxvxm8.js +0 -127
- package/dist/chunk-5wjebwmn.js +0 -89
- package/dist/chunk-5z28bqne.js +0 -6748
- package/dist/chunk-5zwsxpjn.js +0 -671
- package/dist/chunk-60phw466.js +0 -29
- package/dist/chunk-64c1avct.js +0 -13
- package/dist/chunk-64r16v22.js +0 -162
- package/dist/chunk-65t1r7zs.js +0 -418
- package/dist/chunk-66zry909.js +0 -11
- package/dist/chunk-67hxjjgc.js +0 -731
- package/dist/chunk-68ffk5qa.js +0 -14
- package/dist/chunk-69dr6rrd.js +0 -177
- package/dist/chunk-69n11zng.js +0 -436
- package/dist/chunk-6dj5t602.js +0 -341
- package/dist/chunk-6dngjwkh.js +0 -63
- package/dist/chunk-6dp8sz55.js +0 -3561
- package/dist/chunk-6hqgg0sv.js +0 -103
- package/dist/chunk-6nsd9606.js +0 -790
- package/dist/chunk-6p0hbwz3.js +0 -65
- package/dist/chunk-6ywdv5vg.js +0 -97
- package/dist/chunk-6zc758qw.js +0 -640
- package/dist/chunk-7aw745vx.js +0 -40175
- package/dist/chunk-7fxaphbq.js +0 -116
- package/dist/chunk-7sgtxrsc.js +0 -1059
- package/dist/chunk-7wm5s02e.js +0 -216
- package/dist/chunk-7xdk4109.js +0 -442
- package/dist/chunk-7xyswgjh.js +0 -8
- package/dist/chunk-83hfzbx3.js +0 -10
- package/dist/chunk-87m69h0v.js +0 -219
- package/dist/chunk-8g5pe1gr.js +0 -37
- package/dist/chunk-8jbw0fnf.js +0 -167
- package/dist/chunk-8jf9se66.js +0 -321
- package/dist/chunk-8p65embj.js +0 -875
- package/dist/chunk-8qrmaff1.js +0 -2669
- package/dist/chunk-8r975mwc.js +0 -93
- package/dist/chunk-8yhf030a.js +0 -69
- package/dist/chunk-93emz367.js +0 -107
- package/dist/chunk-948mn975.js +0 -460
- package/dist/chunk-99chkt7r.js +0 -54
- package/dist/chunk-9f7c1hzz.js +0 -50
- package/dist/chunk-9fk9ps1g.js +0 -178
- package/dist/chunk-9rh0k0aq.js +0 -90
- package/dist/chunk-9x5zgy22.js +0 -12
- package/dist/chunk-a0k2vj5b.js +0 -460
- package/dist/chunk-a0m57ssq.js +0 -325
- package/dist/chunk-a0nsmmz1.js +0 -133
- package/dist/chunk-a25jh1v4.js +0 -105
- package/dist/chunk-a4j5ekv0.js +0 -83
- package/dist/chunk-a8k3zf58.js +0 -313
- package/dist/chunk-ah0zarbq.js +0 -260
- package/dist/chunk-ase86y73.js +0 -15
- package/dist/chunk-b0kf00ff.js +0 -637
- package/dist/chunk-b1kcd3ss.js +0 -27
- package/dist/chunk-b8kcqqds.js +0 -93
- package/dist/chunk-bg4x9ex0.js +0 -21
- package/dist/chunk-bh5zqvyc.js +0 -36
- package/dist/chunk-bqrkfekw.js +0 -267
- package/dist/chunk-brjd9zmk.js +0 -42
- package/dist/chunk-byfawrfx.js +0 -121
- package/dist/chunk-c6sjhj89.js +0 -1284
- package/dist/chunk-c7e5yv0q.js +0 -212
- package/dist/chunk-c7jwbe76.js +0 -29030
- package/dist/chunk-cb5v8w7k.js +0 -289
- package/dist/chunk-cdef9v7b.js +0 -27
- package/dist/chunk-cdz5yb0r.js +0 -57
- package/dist/chunk-cgfdkzhb.js +0 -12
- package/dist/chunk-cgqw4x5z.js +0 -155
- package/dist/chunk-cnsj3vq2.js +0 -35
- package/dist/chunk-cqxm7ggc.js +0 -123
- package/dist/chunk-cxrktb5g.js +0 -51
- package/dist/chunk-d089t7dk.js +0 -312
- package/dist/chunk-d1z934cp.js +0 -71
- package/dist/chunk-d4mdda98.js +0 -94
- package/dist/chunk-d7xw8v91.js +0 -332
- package/dist/chunk-dc06c3rw.js +0 -1154
- package/dist/chunk-ddsjkqs4.js +0 -39
- package/dist/chunk-dfzkwynj.js +0 -5368
- package/dist/chunk-dnmp7s85.js +0 -20
- package/dist/chunk-dqqwjkv3.js +0 -8583
- package/dist/chunk-dt2mr4vf.js +0 -2962
- package/dist/chunk-dztm97gg.js +0 -150
- package/dist/chunk-e0abab5b.js +0 -445
- package/dist/chunk-e0ragz46.js +0 -209386
- package/dist/chunk-e9w9zc0g.js +0 -392
- package/dist/chunk-ebwskmsr.js +0 -107
- package/dist/chunk-efztk52j.js +0 -114
- package/dist/chunk-ehd8wacx.js +0 -40
- package/dist/chunk-ehtwnxpg.js +0 -1591
- package/dist/chunk-eqp1rfft.js +0 -17
- package/dist/chunk-etdt1xz3.js +0 -19
- package/dist/chunk-eva785x8.js +0 -88
- package/dist/chunk-ewadzrm8.js +0 -103
- package/dist/chunk-f2ajmcav.js +0 -92
- package/dist/chunk-fajg8x36.js +0 -8158
- package/dist/chunk-fbv4apne.js +0 -51
- package/dist/chunk-fcynwjpm.js +0 -1072
- package/dist/chunk-fev86f95.js +0 -1052
- package/dist/chunk-feyzykye.js +0 -10
- package/dist/chunk-ff85rwvc.js +0 -180
- package/dist/chunk-fk6ktvg2.js +0 -275
- package/dist/chunk-fqak69ft.js +0 -458
- package/dist/chunk-fqwas4jk.js +0 -281
- package/dist/chunk-fs35fdpj.js +0 -439
- package/dist/chunk-fvr3f9s3.js +0 -55
- package/dist/chunk-fyc5fepv.js +0 -10
- package/dist/chunk-g2g9cwt9.js +0 -54
- package/dist/chunk-g4znz46v.js +0 -2335
- package/dist/chunk-g5ts4e6k.js +0 -697
- package/dist/chunk-g6een9wr.js +0 -654
- package/dist/chunk-g7cmtx8r.js +0 -77
- package/dist/chunk-g9f19ttm.js +0 -15
- package/dist/chunk-gc7ap41t.js +0 -516
- package/dist/chunk-gdwdqewd.js +0 -19
- package/dist/chunk-gg14h3n4.js +0 -131
- package/dist/chunk-gg55fns0.js +0 -6440
- package/dist/chunk-gq7zab4e.js +0 -418
- package/dist/chunk-gydw3qy3.js +0 -169
- package/dist/chunk-gz1e8y1w.js +0 -33
- package/dist/chunk-h19r628d.js +0 -91
- package/dist/chunk-h2k8mt3z.js +0 -329
- package/dist/chunk-h9n54swm.js +0 -27
- package/dist/chunk-hakdhagh.js +0 -16606
- package/dist/chunk-hc2chp3g.js +0 -308
- package/dist/chunk-hemcv9t7.js +0 -153
- package/dist/chunk-hm62ntv3.js +0 -20
- package/dist/chunk-hmq09ytj.js +0 -100
- package/dist/chunk-hmv4hhqt.js +0 -2718
- package/dist/chunk-hwfknpxv.js +0 -39
- package/dist/chunk-j5bth84e.js +0 -97
- package/dist/chunk-j64ga6ta.js +0 -8035
- package/dist/chunk-j6v3w4yf.js +0 -244
- package/dist/chunk-jc29d2nm.js +0 -130
- package/dist/chunk-jd32zbps.js +0 -15
- package/dist/chunk-jd4sx4wh.js +0 -594
- package/dist/chunk-jha8n8b9.js +0 -33118
- package/dist/chunk-jj71qx7m.js +0 -122
- package/dist/chunk-jka9vpak.js +0 -114
- package/dist/chunk-jkf6ayv0.js +0 -32
- package/dist/chunk-jpz6t2tt.js +0 -61
- package/dist/chunk-jqt3sw12.js +0 -9114
- package/dist/chunk-jswd1q63.js +0 -101
- package/dist/chunk-jtc4aa2y.js +0 -1543
- package/dist/chunk-jyx3h86z.js +0 -635
- package/dist/chunk-jzthz1bx.js +0 -15
- package/dist/chunk-k0p9w03v.js +0 -4957
- package/dist/chunk-k6x3s7x5.js +0 -211
- package/dist/chunk-k7kmvnnx.js +0 -942
- package/dist/chunk-k8vp0atq.js +0 -2331
- package/dist/chunk-k9vm6x6z.js +0 -257
- package/dist/chunk-kb1edvhs.js +0 -120
- package/dist/chunk-kbhbe33q.js +0 -113
- package/dist/chunk-kgcgpp7z.js +0 -140
- package/dist/chunk-kvywbvqs.js +0 -261
- package/dist/chunk-kwekc97v.js +0 -18
- package/dist/chunk-kwyk9zp1.js +0 -74
- package/dist/chunk-ky1z78ve.js +0 -119
- package/dist/chunk-mcws22k3.js +0 -42
- package/dist/chunk-mr2z79r3.js +0 -1385
- package/dist/chunk-mst9nmns.js +0 -642
- package/dist/chunk-mswx2nma.js +0 -103
- package/dist/chunk-n1e3fjpz.js +0 -266
- package/dist/chunk-n6vjp9yg.js +0 -138
- package/dist/chunk-n84tqtvv.js +0 -120
- package/dist/chunk-n8ssddbw.js +0 -105
- package/dist/chunk-na35whkd.js +0 -227
- package/dist/chunk-netzwgv1.js +0 -154
- package/dist/chunk-ng7j0yy1.js +0 -100
- 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-pe3rkfp2.js +0 -74
- package/dist/chunk-pf0152j3.js +0 -40
- package/dist/chunk-pgtnj1mt.js +0 -705
- package/dist/chunk-ppwjyveh.js +0 -8
- package/dist/chunk-pq5qp2y4.js +0 -388
- package/dist/chunk-pqqxdk5f.js +0 -543
- package/dist/chunk-ps49ymvj.js +0 -43
- package/dist/chunk-pws8gq7m.js +0 -7422
- package/dist/chunk-pwwa7s62.js +0 -11
- package/dist/chunk-pyq0fabn.js +0 -860
- package/dist/chunk-q0p1m40t.js +0 -79
- package/dist/chunk-q0vhv550.js +0 -393
- package/dist/chunk-q7r0kt08.js +0 -1809
- package/dist/chunk-qajrkk97.js +0 -298
- package/dist/chunk-qatfdxvd.js +0 -34
- package/dist/chunk-qb6k2afy.js +0 -153
- package/dist/chunk-qg2qgx8h.js +0 -266
- package/dist/chunk-qkczt8cr.js +0 -24
- package/dist/chunk-qnfx3qtx.js +0 -617
- package/dist/chunk-qp2qdcda.js +0 -100
- package/dist/chunk-qtwgzej9.js +0 -85
- package/dist/chunk-r1dh0ymt.js +0 -91
- package/dist/chunk-r36xvgvv.js +0 -407
- package/dist/chunk-r48he8g3.js +0 -251
- package/dist/chunk-r63tqmtk.js +0 -146
- package/dist/chunk-rbdd3q5k.js +0 -101
- package/dist/chunk-rmbbmd3s.js +0 -68
- package/dist/chunk-rn0v1hk8.js +0 -34
- package/dist/chunk-rnxctq9p.js +0 -1646
- package/dist/chunk-rrs2mchs.js +0 -183
- package/dist/chunk-rtrybvnp.js +0 -209
- package/dist/chunk-rw2wkn45.js +0 -494
- package/dist/chunk-s4kzkdhd.js +0 -847
- package/dist/chunk-s7a0zn7b.js +0 -55
- package/dist/chunk-s8gy4ky9.js +0 -122
- package/dist/chunk-s8kj6ajy.js +0 -32
- package/dist/chunk-sag785ad.js +0 -283
- package/dist/chunk-scqjyben.js +0 -174
- package/dist/chunk-sd36yzx8.js +0 -954
- package/dist/chunk-sdtqm0nm.js +0 -374
- package/dist/chunk-sg60xg0x.js +0 -52
- package/dist/chunk-sgpmpn90.js +0 -35
- package/dist/chunk-sh02d2qn.js +0 -38
- package/dist/chunk-sz9y6z13.js +0 -61
- package/dist/chunk-szj5wvdy.js +0 -28
- package/dist/chunk-t29a6zb5.js +0 -45
- package/dist/chunk-t2b49hcf.js +0 -87
- package/dist/chunk-t2wqdppz.js +0 -445
- package/dist/chunk-t4khqff1.js +0 -16
- package/dist/chunk-t70t2gne.js +0 -121
- package/dist/chunk-t9p85zff.js +0 -24
- package/dist/chunk-tkrstmwz.js +0 -94
- package/dist/chunk-tnyb4exc.js +0 -74
- package/dist/chunk-tpn8jsvw.js +0 -71
- package/dist/chunk-tt7x5j1q.js +0 -111
- package/dist/chunk-tw1p628z.js +0 -984
- package/dist/chunk-twvdafcz.js +0 -528
- package/dist/chunk-tzwjafgn.js +0 -24
- package/dist/chunk-v140t8ay.js +0 -152
- 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-vcfbjkk9.js +0 -201
- package/dist/chunk-ve167rcs.js +0 -148
- package/dist/chunk-vf612n57.js +0 -472
- package/dist/chunk-vhffyae8.js +0 -895
- package/dist/chunk-vkhrrvfq.js +0 -44
- package/dist/chunk-vybkmfhf.js +0 -91
- package/dist/chunk-vyjeh50y.js +0 -2149
- package/dist/chunk-w6m6trzq.js +0 -58
- package/dist/chunk-w9b6kngq.js +0 -234
- package/dist/chunk-wa8yn2p0.js +0 -2007
- package/dist/chunk-wanceff6.js +0 -2840
- package/dist/chunk-wcze2nea.js +0 -336
- package/dist/chunk-wgk9sxk7.js +0 -329
- package/dist/chunk-wnxcgfsd.js +0 -253
- package/dist/chunk-wyjerrr6.js +0 -565
- package/dist/chunk-wz9brkq5.js +0 -60
- package/dist/chunk-x47h283a.js +0 -56
- package/dist/chunk-x59j3x9c.js +0 -98
- package/dist/chunk-x6r4v44b.js +0 -8
- package/dist/chunk-x7fdwq3d.js +0 -33
- package/dist/chunk-x8d2ehd7.js +0 -19
- package/dist/chunk-xeb6075z.js +0 -3435
- package/dist/chunk-xfw2pxwd.js +0 -223
- package/dist/chunk-xh06jc72.js +0 -200
- package/dist/chunk-xhfmdq1y.js +0 -147
- package/dist/chunk-xkwyg1d2.js +0 -195
- package/dist/chunk-xv3era3s.js +0 -8
- package/dist/chunk-xyapc58m.js +0 -87
- package/dist/chunk-xzgnc76g.js +0 -107
- package/dist/chunk-y1784krc.js +0 -19
- package/dist/chunk-y4ca9kqz.js +0 -3830
- package/dist/chunk-y9bhjjdz.js +0 -145
- package/dist/chunk-yb3bxv3w.js +0 -30
- package/dist/chunk-yddek6xk.js +0 -146
- package/dist/chunk-ypaq3d12.js +0 -4265
- package/dist/chunk-yq8z040g.js +0 -111
- package/dist/chunk-yqs481qq.js +0 -1163
- package/dist/chunk-ys9a9c9h.js +0 -105
- package/dist/chunk-yyex5gsf.js +0 -269
- package/dist/chunk-yzn396hn.js +0 -89
- package/dist/chunk-z2dp53wn.js +0 -17
- package/dist/chunk-zay4xp4n.js +0 -251
- package/dist/chunk-zc8bwy57.js +0 -212
- package/dist/chunk-zhx88cfx.js +0 -97
- package/dist/chunk-zkh6f4ct.js +0 -385
- package/dist/chunk-zq56gcca.js +0 -206
- package/dist/chunk-zrkefd22.js +0 -490
- package/dist/chunk-zs5p0yq1.js +0 -1030
- package/dist/chunk-zxh62ved.js +0 -31
- package/dist/chunk-zzm33q8x.js +0 -8
- package/dist/cli.js +0 -220
package/dist/chunk-gq7zab4e.js
DELETED
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
fetchUtilization,
|
|
4
|
-
init_usage
|
|
5
|
-
} from "./chunk-0vp3wfab.js";
|
|
6
|
-
import {
|
|
7
|
-
Select,
|
|
8
|
-
checkRemoteAgentEligibility,
|
|
9
|
-
formatPreconditionError,
|
|
10
|
-
getRemoteTaskSessionUrl,
|
|
11
|
-
init_RemoteAgentTask,
|
|
12
|
-
init_select,
|
|
13
|
-
init_teleport,
|
|
14
|
-
registerRemoteAgentTask,
|
|
15
|
-
teleportToRemote
|
|
16
|
-
} from "./chunk-e0ragz46.js";
|
|
17
|
-
import"./chunk-mcws22k3.js";
|
|
18
|
-
import"./chunk-jzthz1bx.js";
|
|
19
|
-
import"./chunk-jpz6t2tt.js";
|
|
20
|
-
import"./chunk-hwfknpxv.js";
|
|
21
|
-
import"./chunk-1gx78081.js";
|
|
22
|
-
import"./chunk-ehtwnxpg.js";
|
|
23
|
-
import"./chunk-q0p1m40t.js";
|
|
24
|
-
import"./chunk-52e9mdjv.js";
|
|
25
|
-
import"./chunk-x47h283a.js";
|
|
26
|
-
import"./chunk-34jx4rjd.js";
|
|
27
|
-
import"./chunk-2gzv8nrw.js";
|
|
28
|
-
import"./chunk-e0abab5b.js";
|
|
29
|
-
import"./chunk-cgfdkzhb.js";
|
|
30
|
-
import"./chunk-4k9d7gxv.js";
|
|
31
|
-
import"./chunk-j5bth84e.js";
|
|
32
|
-
import"./chunk-67hxjjgc.js";
|
|
33
|
-
import"./chunk-68ffk5qa.js";
|
|
34
|
-
import"./chunk-ps49ymvj.js";
|
|
35
|
-
import"./chunk-gc7ap41t.js";
|
|
36
|
-
import"./chunk-jtc4aa2y.js";
|
|
37
|
-
import"./chunk-pgtnj1mt.js";
|
|
38
|
-
import"./chunk-6p0hbwz3.js";
|
|
39
|
-
import"./chunk-p7vkh4wx.js";
|
|
40
|
-
import"./chunk-y9bhjjdz.js";
|
|
41
|
-
import"./chunk-v140t8ay.js";
|
|
42
|
-
import"./chunk-99chkt7r.js";
|
|
43
|
-
import"./chunk-dfzkwynj.js";
|
|
44
|
-
import"./chunk-xeb6075z.js";
|
|
45
|
-
import"./chunk-fcynwjpm.js";
|
|
46
|
-
import"./chunk-v4t6dyyh.js";
|
|
47
|
-
import"./chunk-h2k8mt3z.js";
|
|
48
|
-
import"./chunk-v8kjswxt.js";
|
|
49
|
-
import {
|
|
50
|
-
getFeatureValue_CACHED_MAY_BE_STALE,
|
|
51
|
-
init_growthbook
|
|
52
|
-
} from "./chunk-2b0e32an.js";
|
|
53
|
-
import"./chunk-rnxctq9p.js";
|
|
54
|
-
import"./chunk-pqqxdk5f.js";
|
|
55
|
-
import"./chunk-6nsd9606.js";
|
|
56
|
-
import"./chunk-64c1avct.js";
|
|
57
|
-
import"./chunk-8g5pe1gr.js";
|
|
58
|
-
import"./chunk-4pbx3g7s.js";
|
|
59
|
-
import"./chunk-26wtxbdc.js";
|
|
60
|
-
import"./chunk-6dngjwkh.js";
|
|
61
|
-
import"./chunk-4jm600zv.js";
|
|
62
|
-
import"./chunk-s8gy4ky9.js";
|
|
63
|
-
import"./chunk-cxrktb5g.js";
|
|
64
|
-
import"./chunk-3c25bcsw.js";
|
|
65
|
-
import"./chunk-5ekyhb1w.js";
|
|
66
|
-
import"./chunk-fqak69ft.js";
|
|
67
|
-
import"./chunk-cdz5yb0r.js";
|
|
68
|
-
import {
|
|
69
|
-
Dialog,
|
|
70
|
-
ThemedBox_default,
|
|
71
|
-
ThemedText,
|
|
72
|
-
init_src
|
|
73
|
-
} from "./chunk-c7jwbe76.js";
|
|
74
|
-
import"./chunk-0vkfrmqm.js";
|
|
75
|
-
import {
|
|
76
|
-
require_jsx_dev_runtime,
|
|
77
|
-
require_react
|
|
78
|
-
} from "./chunk-7sgtxrsc.js";
|
|
79
|
-
import"./chunk-0xjaqda8.js";
|
|
80
|
-
import {
|
|
81
|
-
init_analytics,
|
|
82
|
-
logEvent
|
|
83
|
-
} from "./chunk-x8d2ehd7.js";
|
|
84
|
-
import {
|
|
85
|
-
detectCurrentRepositoryWithHost,
|
|
86
|
-
init_detectRepository
|
|
87
|
-
} from "./chunk-byfawrfx.js";
|
|
88
|
-
import {
|
|
89
|
-
getDefaultBranch,
|
|
90
|
-
gitExe,
|
|
91
|
-
init_git
|
|
92
|
-
} from "./chunk-3vy1jt9p.js";
|
|
93
|
-
import"./chunk-vkhrrvfq.js";
|
|
94
|
-
import"./chunk-qnfx3qtx.js";
|
|
95
|
-
import {
|
|
96
|
-
execFileNoThrow,
|
|
97
|
-
init_execFileNoThrow
|
|
98
|
-
} from "./chunk-64r16v22.js";
|
|
99
|
-
import"./chunk-s8kj6ajy.js";
|
|
100
|
-
import"./chunk-8yhf030a.js";
|
|
101
|
-
import"./chunk-zxh62ved.js";
|
|
102
|
-
import"./chunk-5z28bqne.js";
|
|
103
|
-
import"./chunk-qajrkk97.js";
|
|
104
|
-
import"./chunk-gg55fns0.js";
|
|
105
|
-
import"./chunk-5n1jc02d.js";
|
|
106
|
-
import"./chunk-fbv4apne.js";
|
|
107
|
-
import"./chunk-k8vp0atq.js";
|
|
108
|
-
import"./chunk-vf612n57.js";
|
|
109
|
-
import"./chunk-07069jq1.js";
|
|
110
|
-
import"./chunk-d4mdda98.js";
|
|
111
|
-
import"./chunk-55raexh7.js";
|
|
112
|
-
import"./chunk-v9smspw2.js";
|
|
113
|
-
import"./chunk-v1kzp02e.js";
|
|
114
|
-
import"./chunk-7wm5s02e.js";
|
|
115
|
-
import"./chunk-b0kf00ff.js";
|
|
116
|
-
import"./chunk-netzwgv1.js";
|
|
117
|
-
import {
|
|
118
|
-
__esm,
|
|
119
|
-
__toESM
|
|
120
|
-
} from "./chunk-qp2qdcda.js";
|
|
121
|
-
|
|
122
|
-
// src/services/api/ultrareviewQuota.ts
|
|
123
|
-
async function fetchUltrareviewQuota() {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
var init_ultrareviewQuota = () => {};
|
|
127
|
-
|
|
128
|
-
// src/commands/review/reviewRemote.ts
|
|
129
|
-
function confirmOverage() {
|
|
130
|
-
sessionOverageConfirmed = true;
|
|
131
|
-
}
|
|
132
|
-
async function checkOverageGate() {
|
|
133
|
-
if (isTeamSubscriber() || isEnterpriseSubscriber()) {
|
|
134
|
-
return { kind: "proceed", billingNote: "" };
|
|
135
|
-
}
|
|
136
|
-
const [quota, utilization] = await Promise.all([
|
|
137
|
-
fetchUltrareviewQuota(),
|
|
138
|
-
fetchUtilization().catch(() => null)
|
|
139
|
-
]);
|
|
140
|
-
if (!quota) {
|
|
141
|
-
return { kind: "proceed", billingNote: "" };
|
|
142
|
-
}
|
|
143
|
-
if (quota.reviews_remaining > 0) {
|
|
144
|
-
return {
|
|
145
|
-
kind: "proceed",
|
|
146
|
-
billingNote: ` This is free ultrareview ${quota.reviews_used + 1} of ${quota.reviews_limit}.`
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
if (!utilization) {
|
|
150
|
-
return { kind: "proceed", billingNote: "" };
|
|
151
|
-
}
|
|
152
|
-
const extraUsage = utilization.extra_usage;
|
|
153
|
-
if (!extraUsage?.is_enabled) {
|
|
154
|
-
logEvent("tengu_review_overage_not_enabled", {});
|
|
155
|
-
return { kind: "not-enabled" };
|
|
156
|
-
}
|
|
157
|
-
const monthlyLimit = extraUsage.monthly_limit;
|
|
158
|
-
const usedCredits = extraUsage.used_credits ?? 0;
|
|
159
|
-
const available = monthlyLimit === null || monthlyLimit === undefined ? Infinity : monthlyLimit - usedCredits;
|
|
160
|
-
if (available < 10) {
|
|
161
|
-
logEvent("tengu_review_overage_low_balance", { available });
|
|
162
|
-
return { kind: "low-balance", available };
|
|
163
|
-
}
|
|
164
|
-
if (!sessionOverageConfirmed) {
|
|
165
|
-
logEvent("tengu_review_overage_dialog_shown", {});
|
|
166
|
-
return { kind: "needs-confirm" };
|
|
167
|
-
}
|
|
168
|
-
return {
|
|
169
|
-
kind: "proceed",
|
|
170
|
-
billingNote: " This review bills as Extra Usage."
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
async function launchRemoteReview(args, context, billingNote) {
|
|
174
|
-
const eligibility = await checkRemoteAgentEligibility();
|
|
175
|
-
if (!eligibility.eligible) {
|
|
176
|
-
const blockers = eligibility.errors.filter((e) => e.type !== "no_remote_environment");
|
|
177
|
-
if (blockers.length > 0) {
|
|
178
|
-
logEvent("tengu_review_remote_precondition_failed", {
|
|
179
|
-
precondition_errors: blockers.map((e) => e.type).join(",")
|
|
180
|
-
});
|
|
181
|
-
const reasons = blockers.map(formatPreconditionError).join(`
|
|
182
|
-
`);
|
|
183
|
-
return [
|
|
184
|
-
{
|
|
185
|
-
type: "text",
|
|
186
|
-
text: `Ultrareview cannot launch:
|
|
187
|
-
${reasons}`
|
|
188
|
-
}
|
|
189
|
-
];
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
const resolvedBillingNote = billingNote ?? "";
|
|
193
|
-
const prNumber = args.trim();
|
|
194
|
-
const isPrNumber = /^\d+$/.test(prNumber);
|
|
195
|
-
const CODE_REVIEW_ENV_ID = "env_011111111111111111111113";
|
|
196
|
-
const raw = getFeatureValue_CACHED_MAY_BE_STALE("tengu_review_bughunter_config", null);
|
|
197
|
-
const posInt = (v, fallback, max) => {
|
|
198
|
-
if (typeof v !== "number" || !Number.isFinite(v))
|
|
199
|
-
return fallback;
|
|
200
|
-
const n = Math.floor(v);
|
|
201
|
-
if (n <= 0)
|
|
202
|
-
return fallback;
|
|
203
|
-
return max !== undefined && n > max ? fallback : n;
|
|
204
|
-
};
|
|
205
|
-
const commonEnvVars = {
|
|
206
|
-
BUGHUNTER_DRY_RUN: "1",
|
|
207
|
-
BUGHUNTER_FLEET_SIZE: String(posInt(raw?.fleet_size, 5, 20)),
|
|
208
|
-
BUGHUNTER_MAX_DURATION: String(posInt(raw?.max_duration_minutes, 10, 25)),
|
|
209
|
-
BUGHUNTER_AGENT_TIMEOUT: String(posInt(raw?.agent_timeout_seconds, 600, 1800)),
|
|
210
|
-
BUGHUNTER_TOTAL_WALLCLOCK: String(posInt(raw?.total_wallclock_minutes, 22, 27)),
|
|
211
|
-
...process.env.BUGHUNTER_DEV_BUNDLE_B64 && {
|
|
212
|
-
BUGHUNTER_DEV_BUNDLE_B64: process.env.BUGHUNTER_DEV_BUNDLE_B64
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
let session;
|
|
216
|
-
let command;
|
|
217
|
-
let target;
|
|
218
|
-
if (isPrNumber) {
|
|
219
|
-
const repo = await detectCurrentRepositoryWithHost();
|
|
220
|
-
if (!repo || repo.host !== "github.com") {
|
|
221
|
-
logEvent("tengu_review_remote_precondition_failed", {});
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
session = await teleportToRemote({
|
|
225
|
-
initialMessage: null,
|
|
226
|
-
description: `ultrareview: ${repo.owner}/${repo.name}#${prNumber}`,
|
|
227
|
-
signal: context.abortController.signal,
|
|
228
|
-
branchName: `refs/pull/${prNumber}/head`,
|
|
229
|
-
environmentId: CODE_REVIEW_ENV_ID,
|
|
230
|
-
environmentVariables: {
|
|
231
|
-
BUGHUNTER_PR_NUMBER: prNumber,
|
|
232
|
-
BUGHUNTER_REPOSITORY: `${repo.owner}/${repo.name}`,
|
|
233
|
-
...commonEnvVars
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
command = `/ultrareview ${prNumber}`;
|
|
237
|
-
target = `${repo.owner}/${repo.name}#${prNumber}`;
|
|
238
|
-
} else {
|
|
239
|
-
const baseBranch = await getDefaultBranch() || "main";
|
|
240
|
-
const { stdout: mbOut, code: mbCode } = await execFileNoThrow(gitExe(), ["merge-base", baseBranch, "HEAD"], { preserveOutputOnError: false });
|
|
241
|
-
const mergeBaseSha = mbOut.trim();
|
|
242
|
-
if (mbCode !== 0 || !mergeBaseSha) {
|
|
243
|
-
logEvent("tengu_review_remote_precondition_failed", {});
|
|
244
|
-
return [
|
|
245
|
-
{
|
|
246
|
-
type: "text",
|
|
247
|
-
text: `Could not find merge-base with ${baseBranch}. Make sure you're in a git repo with a ${baseBranch} branch.`
|
|
248
|
-
}
|
|
249
|
-
];
|
|
250
|
-
}
|
|
251
|
-
const { stdout: diffStat, code: diffCode } = await execFileNoThrow(gitExe(), ["diff", "--shortstat", mergeBaseSha], { preserveOutputOnError: false });
|
|
252
|
-
if (diffCode === 0 && !diffStat.trim()) {
|
|
253
|
-
logEvent("tengu_review_remote_precondition_failed", {});
|
|
254
|
-
return [
|
|
255
|
-
{
|
|
256
|
-
type: "text",
|
|
257
|
-
text: `No changes against the ${baseBranch} fork point. Make some commits or stage files first.`
|
|
258
|
-
}
|
|
259
|
-
];
|
|
260
|
-
}
|
|
261
|
-
session = await teleportToRemote({
|
|
262
|
-
initialMessage: null,
|
|
263
|
-
description: `ultrareview: ${baseBranch}`,
|
|
264
|
-
signal: context.abortController.signal,
|
|
265
|
-
useBundle: true,
|
|
266
|
-
environmentId: CODE_REVIEW_ENV_ID,
|
|
267
|
-
environmentVariables: {
|
|
268
|
-
BUGHUNTER_BASE_BRANCH: mergeBaseSha,
|
|
269
|
-
...commonEnvVars
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
if (!session) {
|
|
273
|
-
logEvent("tengu_review_remote_teleport_failed", {});
|
|
274
|
-
return [
|
|
275
|
-
{
|
|
276
|
-
type: "text",
|
|
277
|
-
text: "Repo is too large. Push a PR and use `/ultrareview <PR#>` instead."
|
|
278
|
-
}
|
|
279
|
-
];
|
|
280
|
-
}
|
|
281
|
-
command = "/ultrareview";
|
|
282
|
-
target = baseBranch;
|
|
283
|
-
}
|
|
284
|
-
if (!session) {
|
|
285
|
-
logEvent("tengu_review_remote_teleport_failed", {});
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
registerRemoteAgentTask({
|
|
289
|
-
remoteTaskType: "ultrareview",
|
|
290
|
-
session,
|
|
291
|
-
command,
|
|
292
|
-
context,
|
|
293
|
-
isRemoteReview: true
|
|
294
|
-
});
|
|
295
|
-
logEvent("tengu_review_remote_launched", {});
|
|
296
|
-
const sessionUrl = getRemoteTaskSessionUrl(session.id);
|
|
297
|
-
return [
|
|
298
|
-
{
|
|
299
|
-
type: "text",
|
|
300
|
-
text: `Ultrareview launched for ${target} (~10\u201320 min, runs in the cloud). Track: ${sessionUrl}${resolvedBillingNote} Findings arrive via task-notification. Briefly acknowledge the launch to the user without repeating the target or URL \u2014 both are already visible in the tool output above.`
|
|
301
|
-
}
|
|
302
|
-
];
|
|
303
|
-
}
|
|
304
|
-
var isEnterpriseSubscriber = () => false, isTeamSubscriber = () => false, sessionOverageConfirmed = false;
|
|
305
|
-
var init_reviewRemote = __esm(() => {
|
|
306
|
-
init_growthbook();
|
|
307
|
-
init_analytics();
|
|
308
|
-
init_ultrareviewQuota();
|
|
309
|
-
init_usage();
|
|
310
|
-
init_RemoteAgentTask();
|
|
311
|
-
init_detectRepository();
|
|
312
|
-
init_execFileNoThrow();
|
|
313
|
-
init_git();
|
|
314
|
-
init_teleport();
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
// src/commands/review/UltrareviewOverageDialog.tsx
|
|
318
|
-
function UltrareviewOverageDialog({
|
|
319
|
-
onProceed,
|
|
320
|
-
onCancel
|
|
321
|
-
}) {
|
|
322
|
-
const [isLaunching, setIsLaunching] = import_react.useState(false);
|
|
323
|
-
const abortControllerRef = import_react.useRef(new AbortController);
|
|
324
|
-
const handleSelect = import_react.useCallback((value) => {
|
|
325
|
-
if (value === "proceed") {
|
|
326
|
-
setIsLaunching(true);
|
|
327
|
-
onProceed(abortControllerRef.current.signal).catch(() => setIsLaunching(false));
|
|
328
|
-
} else {
|
|
329
|
-
onCancel();
|
|
330
|
-
}
|
|
331
|
-
}, [onProceed, onCancel]);
|
|
332
|
-
const handleCancel = import_react.useCallback(() => {
|
|
333
|
-
abortControllerRef.current.abort();
|
|
334
|
-
onCancel();
|
|
335
|
-
}, [onCancel]);
|
|
336
|
-
const options = [
|
|
337
|
-
{ label: "Proceed with Extra Usage billing", value: "proceed" },
|
|
338
|
-
{ label: "Cancel", value: "cancel" }
|
|
339
|
-
];
|
|
340
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
341
|
-
title: "Ultrareview billing",
|
|
342
|
-
onCancel: handleCancel,
|
|
343
|
-
color: "background",
|
|
344
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
345
|
-
flexDirection: "column",
|
|
346
|
-
gap: 1,
|
|
347
|
-
children: [
|
|
348
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
349
|
-
children: "Your free ultrareviews for this organization are used. Further reviews bill as Extra Usage (pay-per-use)."
|
|
350
|
-
}, undefined, false, undefined, this),
|
|
351
|
-
isLaunching ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
352
|
-
color: "background",
|
|
353
|
-
children: "Launching\u2026"
|
|
354
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
355
|
-
options,
|
|
356
|
-
onChange: handleSelect,
|
|
357
|
-
onCancel: handleCancel
|
|
358
|
-
}, undefined, false, undefined, this)
|
|
359
|
-
]
|
|
360
|
-
}, undefined, true, undefined, this)
|
|
361
|
-
}, undefined, false, undefined, this);
|
|
362
|
-
}
|
|
363
|
-
var import_react, jsx_dev_runtime;
|
|
364
|
-
var init_UltrareviewOverageDialog = __esm(() => {
|
|
365
|
-
init_select();
|
|
366
|
-
init_src();
|
|
367
|
-
import_react = __toESM(require_react(), 1);
|
|
368
|
-
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
// src/commands/review/ultrareviewCommand.tsx
|
|
372
|
-
function contentBlocksToString(blocks) {
|
|
373
|
-
return blocks.map((b) => b.type === "text" ? b.text : "").filter(Boolean).join(`
|
|
374
|
-
`);
|
|
375
|
-
}
|
|
376
|
-
async function launchAndDone(args, context, onDone, billingNote, signal) {
|
|
377
|
-
const result = await launchRemoteReview(args, context, billingNote);
|
|
378
|
-
if (signal?.aborted)
|
|
379
|
-
return;
|
|
380
|
-
if (result) {
|
|
381
|
-
onDone(contentBlocksToString(result), { shouldQuery: true });
|
|
382
|
-
} else {
|
|
383
|
-
onDone("Ultrareview failed to launch the remote session. Check that this is a GitHub repo and try again.", { display: "system" });
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
var jsx_dev_runtime2, call = async (onDone, context, args) => {
|
|
387
|
-
const gate = await checkOverageGate();
|
|
388
|
-
if (gate.kind === "not-enabled") {
|
|
389
|
-
onDone("Free ultrareviews used. Enable Extra Usage at https://claude.ai/settings/billing to continue.", { display: "system" });
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
392
|
-
if (gate.kind === "low-balance") {
|
|
393
|
-
onDone(`Balance too low to launch ultrareview ($${gate.available.toFixed(2)} available, $10 minimum). Top up at https://claude.ai/settings/billing`, { display: "system" });
|
|
394
|
-
return null;
|
|
395
|
-
}
|
|
396
|
-
if (gate.kind === "needs-confirm") {
|
|
397
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(UltrareviewOverageDialog, {
|
|
398
|
-
onProceed: async (signal) => {
|
|
399
|
-
await launchAndDone(args, context, onDone, " This review bills as Extra Usage.", signal);
|
|
400
|
-
if (!signal.aborted)
|
|
401
|
-
confirmOverage();
|
|
402
|
-
},
|
|
403
|
-
onCancel: () => onDone("Ultrareview cancelled.", { display: "system" })
|
|
404
|
-
}, undefined, false, undefined, this);
|
|
405
|
-
}
|
|
406
|
-
await launchAndDone(args, context, onDone, gate.billingNote);
|
|
407
|
-
return null;
|
|
408
|
-
};
|
|
409
|
-
var init_ultrareviewCommand = __esm(() => {
|
|
410
|
-
init_reviewRemote();
|
|
411
|
-
init_UltrareviewOverageDialog();
|
|
412
|
-
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
413
|
-
});
|
|
414
|
-
init_ultrareviewCommand();
|
|
415
|
-
|
|
416
|
-
export {
|
|
417
|
-
call
|
|
418
|
-
};
|
package/dist/chunk-gydw3qy3.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
init_overageCreditGrant,
|
|
4
|
-
invalidateOverageCreditGrantCache
|
|
5
|
-
} from "./chunk-5h5kx2jd.js";
|
|
6
|
-
import {
|
|
7
|
-
fetchUtilization,
|
|
8
|
-
init_usage
|
|
9
|
-
} from "./chunk-0vp3wfab.js";
|
|
10
|
-
import {
|
|
11
|
-
getOAuthHeaders,
|
|
12
|
-
hasClaudeAiBillingAccess,
|
|
13
|
-
init_api,
|
|
14
|
-
init_billing,
|
|
15
|
-
prepareApiRequest
|
|
16
|
-
} from "./chunk-h2k8mt3z.js";
|
|
17
|
-
import {
|
|
18
|
-
init_browser,
|
|
19
|
-
openBrowser
|
|
20
|
-
} from "./chunk-v8kjswxt.js";
|
|
21
|
-
import {
|
|
22
|
-
getGlobalConfig,
|
|
23
|
-
init_config,
|
|
24
|
-
saveGlobalConfig
|
|
25
|
-
} from "./chunk-2b0e32an.js";
|
|
26
|
-
import {
|
|
27
|
-
getApiConfig,
|
|
28
|
-
init_apiConfig
|
|
29
|
-
} from "./chunk-5ekyhb1w.js";
|
|
30
|
-
import {
|
|
31
|
-
init_log,
|
|
32
|
-
logError
|
|
33
|
-
} from "./chunk-gg55fns0.js";
|
|
34
|
-
import {
|
|
35
|
-
axios_default,
|
|
36
|
-
init_axios
|
|
37
|
-
} from "./chunk-55raexh7.js";
|
|
38
|
-
import {
|
|
39
|
-
__esm
|
|
40
|
-
} from "./chunk-qp2qdcda.js";
|
|
41
|
-
|
|
42
|
-
// src/services/api/adminRequests.ts
|
|
43
|
-
async function createAdminRequest(params) {
|
|
44
|
-
const { accessToken, orgUUID } = await prepareApiRequest();
|
|
45
|
-
const headers = {
|
|
46
|
-
...getOAuthHeaders(accessToken),
|
|
47
|
-
"x-organization-uuid": orgUUID
|
|
48
|
-
};
|
|
49
|
-
const url = `${getApiConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/admin_requests`;
|
|
50
|
-
const response = await axios_default.post(url, params, { headers });
|
|
51
|
-
return response.data;
|
|
52
|
-
}
|
|
53
|
-
async function getMyAdminRequests(requestType, statuses) {
|
|
54
|
-
const { accessToken, orgUUID } = await prepareApiRequest();
|
|
55
|
-
const headers = {
|
|
56
|
-
...getOAuthHeaders(accessToken),
|
|
57
|
-
"x-organization-uuid": orgUUID
|
|
58
|
-
};
|
|
59
|
-
let url = `${getApiConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/admin_requests/me?request_type=${requestType}`;
|
|
60
|
-
for (const status of statuses) {
|
|
61
|
-
url += `&statuses=${status}`;
|
|
62
|
-
}
|
|
63
|
-
const response = await axios_default.get(url, {
|
|
64
|
-
headers
|
|
65
|
-
});
|
|
66
|
-
return response.data;
|
|
67
|
-
}
|
|
68
|
-
async function checkAdminRequestEligibility(requestType) {
|
|
69
|
-
const { accessToken, orgUUID } = await prepareApiRequest();
|
|
70
|
-
const headers = {
|
|
71
|
-
...getOAuthHeaders(accessToken),
|
|
72
|
-
"x-organization-uuid": orgUUID
|
|
73
|
-
};
|
|
74
|
-
const url = `${getApiConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/admin_requests/eligibility?request_type=${requestType}`;
|
|
75
|
-
const response = await axios_default.get(url, {
|
|
76
|
-
headers
|
|
77
|
-
});
|
|
78
|
-
return response.data;
|
|
79
|
-
}
|
|
80
|
-
var init_adminRequests = __esm(() => {
|
|
81
|
-
init_axios();
|
|
82
|
-
init_apiConfig();
|
|
83
|
-
init_api();
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
// src/commands/extra-usage/extra-usage-core.ts
|
|
87
|
-
async function runExtraUsage() {
|
|
88
|
-
if (!getGlobalConfig().hasVisitedExtraUsage) {
|
|
89
|
-
saveGlobalConfig((prev) => ({ ...prev, hasVisitedExtraUsage: true }));
|
|
90
|
-
}
|
|
91
|
-
invalidateOverageCreditGrantCache();
|
|
92
|
-
const isTeamOrEnterprise = false;
|
|
93
|
-
const hasBillingAccess = hasClaudeAiBillingAccess();
|
|
94
|
-
if (!hasBillingAccess && isTeamOrEnterprise) {
|
|
95
|
-
let extraUsage;
|
|
96
|
-
try {
|
|
97
|
-
const utilization = await fetchUtilization();
|
|
98
|
-
extraUsage = utilization?.extra_usage;
|
|
99
|
-
} catch (error) {
|
|
100
|
-
logError(error);
|
|
101
|
-
}
|
|
102
|
-
if (extraUsage?.is_enabled && extraUsage.monthly_limit === null) {
|
|
103
|
-
return {
|
|
104
|
-
type: "message",
|
|
105
|
-
value: "Your organization already has unlimited extra usage. No request needed."
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
try {
|
|
109
|
-
const eligibility = await checkAdminRequestEligibility("limit_increase");
|
|
110
|
-
if (eligibility?.is_allowed === false) {
|
|
111
|
-
return {
|
|
112
|
-
type: "message",
|
|
113
|
-
value: "Please contact your admin to manage extra usage settings."
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
} catch (error) {
|
|
117
|
-
logError(error);
|
|
118
|
-
}
|
|
119
|
-
try {
|
|
120
|
-
const pendingOrDismissedRequests = await getMyAdminRequests("limit_increase", ["pending", "dismissed"]);
|
|
121
|
-
if (pendingOrDismissedRequests && pendingOrDismissedRequests.length > 0) {
|
|
122
|
-
return {
|
|
123
|
-
type: "message",
|
|
124
|
-
value: "You have already submitted a request for extra usage to your admin."
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
} catch (error) {
|
|
128
|
-
logError(error);
|
|
129
|
-
}
|
|
130
|
-
try {
|
|
131
|
-
await createAdminRequest({
|
|
132
|
-
request_type: "limit_increase",
|
|
133
|
-
details: null
|
|
134
|
-
});
|
|
135
|
-
return {
|
|
136
|
-
type: "message",
|
|
137
|
-
value: extraUsage?.is_enabled ? "Request sent to your admin to increase extra usage." : "Request sent to your admin to enable extra usage."
|
|
138
|
-
};
|
|
139
|
-
} catch (error) {
|
|
140
|
-
logError(error);
|
|
141
|
-
}
|
|
142
|
-
return {
|
|
143
|
-
type: "message",
|
|
144
|
-
value: "Please contact your admin to manage extra usage settings."
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
const url = "https://claude.ai/settings/usage";
|
|
148
|
-
try {
|
|
149
|
-
const opened = await openBrowser(url);
|
|
150
|
-
return { type: "browser-opened", url, opened };
|
|
151
|
-
} catch (error) {
|
|
152
|
-
logError(error);
|
|
153
|
-
return {
|
|
154
|
-
type: "message",
|
|
155
|
-
value: `Failed to open browser. Please visit ${url} to manage extra usage.`
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
var init_extra_usage_core = __esm(() => {
|
|
160
|
-
init_adminRequests();
|
|
161
|
-
init_overageCreditGrant();
|
|
162
|
-
init_usage();
|
|
163
|
-
init_billing();
|
|
164
|
-
init_browser();
|
|
165
|
-
init_config();
|
|
166
|
-
init_log();
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
export { runExtraUsage, init_extra_usage_core };
|
package/dist/chunk-gz1e8y1w.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CLI_CU_CAPABILITIES,
|
|
4
|
-
CLI_HOST_BUNDLE_ID,
|
|
5
|
-
COMPUTER_USE_MCP_SERVER_NAME,
|
|
6
|
-
getTerminalBundleId,
|
|
7
|
-
init_common,
|
|
8
|
-
isComputerUseMCPServer
|
|
9
|
-
} from "./chunk-cxrktb5g.js";
|
|
10
|
-
import"./chunk-3c25bcsw.js";
|
|
11
|
-
import"./chunk-5ekyhb1w.js";
|
|
12
|
-
import"./chunk-8yhf030a.js";
|
|
13
|
-
import"./chunk-zxh62ved.js";
|
|
14
|
-
import"./chunk-5z28bqne.js";
|
|
15
|
-
import"./chunk-qajrkk97.js";
|
|
16
|
-
import"./chunk-gg55fns0.js";
|
|
17
|
-
import"./chunk-5n1jc02d.js";
|
|
18
|
-
import"./chunk-fbv4apne.js";
|
|
19
|
-
import"./chunk-k8vp0atq.js";
|
|
20
|
-
import"./chunk-vf612n57.js";
|
|
21
|
-
import"./chunk-07069jq1.js";
|
|
22
|
-
import"./chunk-d4mdda98.js";
|
|
23
|
-
import"./chunk-7wm5s02e.js";
|
|
24
|
-
import"./chunk-qp2qdcda.js";
|
|
25
|
-
init_common();
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
isComputerUseMCPServer,
|
|
29
|
-
getTerminalBundleId,
|
|
30
|
-
COMPUTER_USE_MCP_SERVER_NAME,
|
|
31
|
-
CLI_HOST_BUNDLE_ID,
|
|
32
|
-
CLI_CU_CAPABILITIES
|
|
33
|
-
};
|
package/dist/chunk-h19r628d.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CHANGELOG_URL,
|
|
4
|
-
fetchAndStoreChangelog,
|
|
5
|
-
getAllReleaseNotes,
|
|
6
|
-
getStoredChangelog,
|
|
7
|
-
init_releaseNotes
|
|
8
|
-
} from "./chunk-xfw2pxwd.js";
|
|
9
|
-
import"./chunk-ps49ymvj.js";
|
|
10
|
-
import"./chunk-2b0e32an.js";
|
|
11
|
-
import"./chunk-rnxctq9p.js";
|
|
12
|
-
import"./chunk-pqqxdk5f.js";
|
|
13
|
-
import"./chunk-6nsd9606.js";
|
|
14
|
-
import"./chunk-64c1avct.js";
|
|
15
|
-
import"./chunk-4pbx3g7s.js";
|
|
16
|
-
import"./chunk-26wtxbdc.js";
|
|
17
|
-
import"./chunk-3c25bcsw.js";
|
|
18
|
-
import"./chunk-5ekyhb1w.js";
|
|
19
|
-
import"./chunk-fqak69ft.js";
|
|
20
|
-
import"./chunk-cdz5yb0r.js";
|
|
21
|
-
import"./chunk-c7jwbe76.js";
|
|
22
|
-
import"./chunk-0vkfrmqm.js";
|
|
23
|
-
import"./chunk-7sgtxrsc.js";
|
|
24
|
-
import"./chunk-0xjaqda8.js";
|
|
25
|
-
import"./chunk-x8d2ehd7.js";
|
|
26
|
-
import"./chunk-3vy1jt9p.js";
|
|
27
|
-
import"./chunk-vkhrrvfq.js";
|
|
28
|
-
import"./chunk-qnfx3qtx.js";
|
|
29
|
-
import"./chunk-64r16v22.js";
|
|
30
|
-
import"./chunk-s8kj6ajy.js";
|
|
31
|
-
import"./chunk-8yhf030a.js";
|
|
32
|
-
import"./chunk-zxh62ved.js";
|
|
33
|
-
import"./chunk-5z28bqne.js";
|
|
34
|
-
import"./chunk-qajrkk97.js";
|
|
35
|
-
import"./chunk-gg55fns0.js";
|
|
36
|
-
import"./chunk-5n1jc02d.js";
|
|
37
|
-
import"./chunk-fbv4apne.js";
|
|
38
|
-
import"./chunk-k8vp0atq.js";
|
|
39
|
-
import"./chunk-vf612n57.js";
|
|
40
|
-
import"./chunk-07069jq1.js";
|
|
41
|
-
import"./chunk-d4mdda98.js";
|
|
42
|
-
import"./chunk-55raexh7.js";
|
|
43
|
-
import"./chunk-v1kzp02e.js";
|
|
44
|
-
import"./chunk-7wm5s02e.js";
|
|
45
|
-
import"./chunk-b0kf00ff.js";
|
|
46
|
-
import"./chunk-netzwgv1.js";
|
|
47
|
-
import {
|
|
48
|
-
__esm
|
|
49
|
-
} from "./chunk-qp2qdcda.js";
|
|
50
|
-
|
|
51
|
-
// src/commands/release-notes/release-notes.ts
|
|
52
|
-
function formatReleaseNotes(notes) {
|
|
53
|
-
return notes.map(([version, notes2]) => {
|
|
54
|
-
const header = `Version ${version}:`;
|
|
55
|
-
const bulletPoints = notes2.map((note) => `\xB7 ${note}`).join(`
|
|
56
|
-
`);
|
|
57
|
-
return `${header}
|
|
58
|
-
${bulletPoints}`;
|
|
59
|
-
}).join(`
|
|
60
|
-
|
|
61
|
-
`);
|
|
62
|
-
}
|
|
63
|
-
async function call() {
|
|
64
|
-
let freshNotes = [];
|
|
65
|
-
try {
|
|
66
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
67
|
-
setTimeout((rej) => rej(new Error("Timeout")), 500, reject);
|
|
68
|
-
});
|
|
69
|
-
await Promise.race([fetchAndStoreChangelog(), timeoutPromise]);
|
|
70
|
-
freshNotes = getAllReleaseNotes(await getStoredChangelog());
|
|
71
|
-
} catch {}
|
|
72
|
-
if (freshNotes.length > 0) {
|
|
73
|
-
return { type: "text", value: formatReleaseNotes(freshNotes) };
|
|
74
|
-
}
|
|
75
|
-
const cachedNotes = getAllReleaseNotes(await getStoredChangelog());
|
|
76
|
-
if (cachedNotes.length > 0) {
|
|
77
|
-
return { type: "text", value: formatReleaseNotes(cachedNotes) };
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
type: "text",
|
|
81
|
-
value: `See the full changelog at: ${CHANGELOG_URL}`
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
var init_release_notes = __esm(() => {
|
|
85
|
-
init_releaseNotes();
|
|
86
|
-
});
|
|
87
|
-
init_release_notes();
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
call
|
|
91
|
-
};
|