@qitqode/qitqode-android-arm64 0.1.34 → 0.1.36
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/bundle/{chunk-7311jry1.js → chunk-00sr2gwz.js} +2 -2
- package/bundle/{chunk-azhw650z.js → chunk-02xcb52z.js} +2 -2
- package/bundle/{chunk-gws1rn1v.js → chunk-08q55ya0.js} +1 -1
- package/bundle/chunk-092bx2yw.js +2 -0
- package/bundle/{chunk-xgr6jnd6.js → chunk-0g25z230.js} +1 -1
- package/bundle/chunk-0j6dhrew.js +2 -0
- package/bundle/chunk-0jrgk6vk.js +2 -0
- package/bundle/chunk-0qn52zsd.js +2 -0
- package/bundle/chunk-10accb7b.js +2 -0
- package/bundle/{chunk-rjy5mqwz.js → chunk-132tcp2j.js} +2 -2
- package/bundle/chunk-13kpdfr7.js +2 -0
- package/bundle/chunk-15s8zwgf.js +2 -0
- package/bundle/{chunk-nj4d554m.js → chunk-1bx2sjn6.js} +1 -1
- package/bundle/chunk-1kgyfja6.js +2 -0
- package/bundle/{chunk-bv29k2pf.js → chunk-1mcsf4yb.js} +2 -2
- package/bundle/{chunk-kwx9ewe0.js → chunk-1wpjmwnh.js} +1 -1
- package/bundle/chunk-1yv5h8k4.js +2 -0
- package/bundle/chunk-24rw1br0.js +3 -0
- package/bundle/{chunk-snr44en9.js → chunk-25bp7pcm.js} +2 -2
- package/bundle/{chunk-kmcsz8yv.js → chunk-2dkrfc1s.js} +1 -1
- package/bundle/chunk-364ccew0.js +3 -0
- package/bundle/{chunk-ppkqr9cn.js → chunk-37dvnent.js} +2 -2
- package/bundle/chunk-3bkdbqjj.js +2 -0
- package/bundle/chunk-3bnqw3xp.js +3 -0
- package/bundle/{chunk-08m0hkdz.js → chunk-3dr4469n.js} +1 -1
- package/bundle/{chunk-2fkfbdcy.js → chunk-3gw6r3hf.js} +179 -179
- package/bundle/{chunk-n96tvjgj.js → chunk-3mepk08v.js} +2 -2
- package/bundle/chunk-3sz6gw10.js +3 -0
- package/bundle/chunk-41x11r2s.js +3 -0
- package/bundle/{chunk-xqdrr7xg.js → chunk-45mjcxqk.js} +1 -1
- package/bundle/{chunk-qrtc3etn.js → chunk-4fa390yr.js} +2 -2
- package/bundle/chunk-4gs87ghj.js +3 -0
- package/bundle/chunk-4kqdzdv5.js +3 -0
- package/bundle/{chunk-3k2b05fv.js → chunk-4sazy0nq.js} +1 -1
- package/bundle/chunk-4tbqsrsn.js +2 -0
- package/bundle/{chunk-ngccf7ga.js → chunk-52b1v7mn.js} +1 -1
- package/bundle/chunk-53kns5wy.js +2 -0
- package/bundle/{chunk-11v7vz3y.js → chunk-549ptbaj.js} +1 -1
- package/bundle/chunk-559ek1ym.js +2 -0
- package/bundle/{chunk-34p46th6.js → chunk-5bate758.js} +1 -1
- package/bundle/{chunk-kdcnder5.js → chunk-5kmfnkzv.js} +1 -1
- package/bundle/{chunk-9msnx26q.js → chunk-5pkg052s.js} +2 -2
- package/bundle/chunk-5yfzzmv0.js +2 -0
- package/bundle/{chunk-rsszcqxd.js → chunk-60qyqqxx.js} +1 -1
- package/bundle/{chunk-94pcpztx.js → chunk-64s7vfj7.js} +2 -2
- package/bundle/{chunk-bzgj60w4.js → chunk-6sfhbckv.js} +1 -1
- package/bundle/{chunk-8762ty72.js → chunk-70pb4kcm.js} +2 -2
- package/bundle/{chunk-04hvaaje.js → chunk-72zxassf.js} +1 -1
- package/bundle/{chunk-yz6898wy.js → chunk-73ckx171.js} +1 -1
- package/bundle/chunk-7cbj28fp.js +2 -0
- package/bundle/chunk-7dep7g7c.js +2 -0
- package/bundle/{chunk-gj0wt0cy.js → chunk-7fawtcnn.js} +1 -1
- package/bundle/{chunk-zfn0z4sh.js → chunk-7gbytqkn.js} +2 -2
- package/bundle/{chunk-x66ycpfs.js → chunk-7jhrxzjx.js} +2 -2
- package/bundle/{chunk-09pkckr1.js → chunk-7vftsy04.js} +1 -1
- package/bundle/{chunk-zfd70p01.js → chunk-8dxdeksr.js} +1 -1
- package/bundle/{chunk-6styp5dn.js → chunk-8fgamz4y.js} +1 -1
- package/bundle/{chunk-9qdr9t8c.js → chunk-8q6z6emx.js} +1 -1
- package/bundle/{chunk-4ttf9rjd.js → chunk-8r3410c2.js} +1 -1
- package/bundle/{chunk-3mzcr3fw.js → chunk-8tp4whyw.js} +1 -1
- package/bundle/chunk-8yn64y27.js +2 -0
- package/bundle/{chunk-41v0x1jk.js → chunk-8yr682pv.js} +2 -2
- package/bundle/chunk-8ywa7az5.js +2 -0
- package/bundle/chunk-8ywdddts.js +2 -0
- package/bundle/chunk-8zmreqxx.js +2 -0
- package/bundle/chunk-92zjark4.js +2 -0
- package/bundle/chunk-983rqajz.js +7 -0
- package/bundle/{chunk-kjyw00jp.js → chunk-9cw4cnz0.js} +1 -1
- package/bundle/{chunk-2swch6mx.js → chunk-9dh9bc9d.js} +1 -1
- package/bundle/{chunk-y437vyza.js → chunk-9fkmhmh6.js} +1 -1
- package/bundle/{chunk-7vd91wsd.js → chunk-9nk0ts0s.js} +1 -1
- package/bundle/{chunk-p9cnzxb8.js → chunk-9s4whpg1.js} +2 -2
- package/bundle/{chunk-yajd975f.js → chunk-9xvctnjr.js} +1 -1
- package/bundle/chunk-9yakc5yv.js +28 -0
- package/bundle/{chunk-4wxxyrxn.js → chunk-9zre5e54.js} +1 -1
- package/bundle/chunk-a42q5mx4.js +3 -0
- package/bundle/{chunk-yt3f3j35.js → chunk-a9y27zd2.js} +1 -1
- package/bundle/{chunk-mex0fe9s.js → chunk-acyj91wq.js} +1 -1
- package/bundle/chunk-aq28ejhv.js +2 -0
- package/bundle/{chunk-pkc4ddw1.js → chunk-atpzz901.js} +1 -1
- package/bundle/chunk-ax1y4699.js +2 -0
- package/bundle/{chunk-dctj3c22.js → chunk-b0jh0rby.js} +2 -2
- package/bundle/chunk-b0x888w9.js +2 -0
- package/bundle/chunk-b10px5g4.js +2 -0
- package/bundle/chunk-b1qhpxee.js +2 -0
- package/bundle/chunk-b4ysd5b4.js +9 -0
- package/bundle/chunk-bcs2gvmp.js +2 -0
- package/bundle/{chunk-7mxt5b0h.js → chunk-bjcb9kt0.js} +1 -1
- package/bundle/{chunk-67d5d8mr.js → chunk-bnz0mxak.js} +1 -1
- package/bundle/{chunk-wwgd4rzx.js → chunk-brh35yt5.js} +2 -2
- package/bundle/chunk-bs020a3x.js +2 -0
- package/bundle/{chunk-7eexey82.js → chunk-c72jajx9.js} +1 -1
- package/bundle/{chunk-81trveht.js → chunk-cagk1sjd.js} +1 -1
- package/bundle/{chunk-1byd3wma.js → chunk-cdh26622.js} +2 -2
- package/bundle/chunk-cjxcnhmq.js +14 -0
- package/bundle/{chunk-ygjtwjnk.js → chunk-cx0j6mpq.js} +1 -1
- package/bundle/{chunk-zh3fny3z.js → chunk-cx7p4ezk.js} +2 -2
- package/bundle/chunk-d0xs3j5h.js +2 -0
- package/bundle/{chunk-pxmhe36r.js → chunk-d1rn44wz.js} +1 -1
- package/bundle/chunk-d72rty3t.js +2 -0
- package/bundle/{chunk-0c6ep9mc.js → chunk-d93z6hrn.js} +1 -1
- package/bundle/{chunk-seghf5fc.js → chunk-dgx4rq86.js} +1 -1
- package/bundle/{chunk-qzj6027k.js → chunk-dh1h513y.js} +1 -1
- package/bundle/chunk-dj951pms.js +2 -0
- package/bundle/chunk-dp6zktka.js +2 -0
- package/bundle/{chunk-ba3h1pzs.js → chunk-dshnn54c.js} +1 -1
- package/bundle/{chunk-73myw3bj.js → chunk-dt899wbf.js} +2 -2
- package/bundle/chunk-dvqdtdza.js +2 -0
- package/bundle/{chunk-6ynxf3q7.js → chunk-dvxk6mr6.js} +2 -2
- package/bundle/chunk-dx7h5r8j.js +2 -0
- package/bundle/{chunk-bnss5dkk.js → chunk-dykqn0nj.js} +2 -2
- package/bundle/chunk-e03tgfpb.js +8 -0
- package/bundle/chunk-e07dbha4.js +2 -0
- package/bundle/chunk-e88wd9ex.js +2 -0
- package/bundle/{chunk-y9zstzed.js → chunk-eaqfnwdj.js} +1 -1
- package/bundle/chunk-ebabnv33.js +3 -0
- package/bundle/chunk-ebdpg3cn.js +2 -0
- package/bundle/{chunk-w9nzsd3w.js → chunk-ebkztnpf.js} +180 -178
- package/bundle/chunk-ec7pznsp.js +2 -0
- package/bundle/chunk-et7kz7kx.js +2 -0
- package/bundle/{chunk-kfmz2p27.js → chunk-ev3a2sxv.js} +2 -2
- package/bundle/{chunk-d00c1k9w.js → chunk-ewpzqnj4.js} +1 -1
- package/bundle/chunk-eyc6tb5h.js +2 -0
- package/bundle/chunk-eywryd3k.js +2 -0
- package/bundle/chunk-eze57bty.js +2 -0
- package/bundle/{chunk-qddt2gcs.js → chunk-ezrskm25.js} +1 -1
- package/bundle/chunk-f36ctnbp.js +3 -0
- package/bundle/{chunk-q5fygrnr.js → chunk-f77nxt23.js} +2 -2
- package/bundle/chunk-fa47vzfc.js +2 -0
- package/bundle/chunk-fe397ph0.js +2 -0
- package/bundle/chunk-fjm9kstr.js +5 -0
- package/bundle/{chunk-5xq3h51b.js → chunk-fmxm4kaj.js} +2 -2
- package/bundle/chunk-fr75ytdr.js +2 -0
- package/bundle/chunk-fw2tnbt6.js +2 -0
- package/bundle/chunk-fwr2qgqb.js +2 -0
- package/bundle/chunk-g204pt98.js +2 -0
- package/bundle/chunk-g5prcvq2.js +14 -0
- package/bundle/{chunk-ggydr1ze.js → chunk-g794ey6w.js} +1 -1
- package/bundle/chunk-gcgmwqhh.js +2 -0
- package/bundle/{chunk-rmve21dh.js → chunk-gg7bg3ek.js} +1 -1
- package/bundle/{chunk-9x25d115.js → chunk-gkj4a27z.js} +1 -1
- package/bundle/chunk-gvtjxg0d.js +2 -0
- package/bundle/chunk-gw36mrg4.js +2 -0
- package/bundle/{chunk-z8gdmvgg.js → chunk-gwfx7tx7.js} +2 -2
- package/bundle/{chunk-q8hd01j7.js → chunk-gxmxx8jb.js} +1 -1
- package/bundle/{chunk-tge53d52.js → chunk-h1kg35mn.js} +1 -1
- package/bundle/chunk-h36qec67.js +2 -0
- package/bundle/{chunk-0msqaywp.js → chunk-h7w35n7w.js} +1 -1
- package/bundle/chunk-h9gtymfm.js +2 -0
- package/bundle/chunk-h9qn35pn.js +2 -0
- package/bundle/{chunk-mr8j7rc6.js → chunk-hb9mc5f9.js} +1 -1
- package/bundle/{chunk-5a7fs1hg.js → chunk-hbh2034m.js} +1 -1
- package/bundle/{chunk-df2aswz3.js → chunk-hcy77w6t.js} +1 -1
- package/bundle/{chunk-6a7c7wnf.js → chunk-hgsykghj.js} +2 -2
- package/bundle/chunk-hhjkezfz.js +2 -0
- package/bundle/chunk-hnz570f9.js +3 -0
- package/bundle/{chunk-0csy9x1n.js → chunk-htkwc2se.js} +2 -2
- package/bundle/chunk-j21dnncc.js +4 -0
- package/bundle/{chunk-1yt5rsew.js → chunk-j63fkt6n.js} +1 -1
- package/bundle/chunk-ja18tvc7.js +2 -0
- package/bundle/{chunk-03xppy47.js → chunk-jcjaw7tk.js} +2 -2
- package/bundle/{chunk-jkh6eg7d.js → chunk-jf6ry79j.js} +4 -4
- package/bundle/{chunk-ke7n9t5p.js → chunk-jgz1a29w.js} +3 -3
- package/bundle/{chunk-ebcdxmdd.js → chunk-jngchw38.js} +1 -1
- package/bundle/{chunk-j5ymkhry.js → chunk-jqn27885.js} +1 -1
- package/bundle/chunk-jr2q5295.js +3 -0
- package/bundle/{chunk-hj3ddt53.js → chunk-jts0dma5.js} +2 -2
- package/bundle/chunk-jw16f6t0.js +4 -0
- package/bundle/chunk-jxg15t11.js +2 -0
- package/bundle/{chunk-7hm0c2yg.js → chunk-kqhh2pm9.js} +1 -1
- package/bundle/{chunk-0h8wdch6.js → chunk-kt0ej3nq.js} +1 -1
- package/bundle/chunk-kwzawx7r.js +2 -0
- package/bundle/{chunk-n6msxne8.js → chunk-kx2dp8ch.js} +1 -1
- package/bundle/chunk-m0mek3es.js +2 -0
- package/bundle/chunk-m31d2n6h.js +2 -0
- package/bundle/{chunk-egn55fa2.js → chunk-mcc5ynma.js} +3 -3
- package/bundle/{chunk-md8161zd.js → chunk-mdzzcrf9.js} +2 -2
- package/bundle/{chunk-knpyt206.js → chunk-mqtqcc10.js} +2 -2
- package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
- package/bundle/{chunk-xkv3yta0.js → chunk-mvsrzvc4.js} +4 -4
- package/bundle/{chunk-b4knxpqh.js → chunk-mw2hr4pd.js} +1 -1
- package/bundle/{chunk-vszbqv24.js → chunk-mzbr0m2v.js} +1 -1
- package/bundle/{chunk-bj00xk8k.js → chunk-n0trgp1c.js} +2 -2
- package/bundle/chunk-n14qktbg.js +2 -0
- package/bundle/{chunk-yjk6zv2z.js → chunk-n2ygpy76.js} +1 -1
- package/bundle/{chunk-4ntbxet5.js → chunk-n7xgfm5x.js} +2 -2
- package/bundle/{chunk-06k6egt2.js → chunk-neqy8j4n.js} +1 -1
- package/bundle/{chunk-nj61v4n7.js → chunk-njkserae.js} +1 -1
- package/bundle/{chunk-n6gtdx5h.js → chunk-nq495be3.js} +1 -1
- package/bundle/chunk-nr4q9fv7.js +2 -0
- package/bundle/{chunk-p3qkexpk.js → chunk-nsjp44fp.js} +1 -1
- package/bundle/chunk-nzzsj54n.js +2 -0
- package/bundle/chunk-p19qfw59.js +2 -0
- package/bundle/chunk-p2yxj9s4.js +2 -0
- package/bundle/{chunk-1dtzxt2w.js → chunk-p3rp99na.js} +1 -1
- package/bundle/chunk-p8czsxp0.js +3 -0
- package/bundle/chunk-p8k48st6.js +5 -0
- package/bundle/{chunk-79agp7v3.js → chunk-p8kpqyxb.js} +2 -2
- package/bundle/{chunk-9fxkh84w.js → chunk-p9zrk16q.js} +1 -1
- package/bundle/{chunk-xhkd9yf3.js → chunk-pmv8yr8c.js} +2 -2
- package/bundle/{chunk-ee23d2nz.js → chunk-pnq1h5az.js} +2 -2
- package/bundle/chunk-pq3qwxa8.js +2 -0
- package/bundle/{chunk-wfd5h6ax.js → chunk-pqnbdygz.js} +2 -2
- package/bundle/chunk-ps9p14y6.js +2 -0
- package/bundle/{chunk-zfcp509b.js → chunk-pxx2hz0g.js} +2 -2
- package/bundle/{chunk-zpf31kxb.js → chunk-q7rt76qw.js} +1 -1
- package/bundle/{chunk-rq4w0by4.js → chunk-q81m4m9z.js} +1 -1
- package/bundle/chunk-qagc6v17.js +2 -0
- package/bundle/{chunk-mq6jn47r.js → chunk-qb35hqm4.js} +1 -1
- package/bundle/chunk-qc0zhbhm.js +2 -0
- package/bundle/{chunk-keveg5gx.js → chunk-qdcf1ay5.js} +2 -2
- package/bundle/chunk-qp9y0g73.js +3 -0
- package/bundle/chunk-qpd0gab8.js +2 -0
- package/bundle/{chunk-6b196wjz.js → chunk-qqne79vp.js} +2 -2
- package/bundle/{chunk-g4gjz7sq.js → chunk-qs4wef8c.js} +1 -1
- package/bundle/chunk-r0ewmh6f.js +2 -0
- package/bundle/chunk-r3df289z.js +2 -0
- package/bundle/{chunk-by855es0.js → chunk-r58gzg6m.js} +1 -1
- package/bundle/{chunk-fmq0m4k5.js → chunk-r6ndvzd0.js} +1 -1
- package/bundle/chunk-r78kfhvz.js +2 -0
- package/bundle/{chunk-dyv2hqvc.js → chunk-rcyhqkv5.js} +1 -1
- package/bundle/{chunk-h2m8fdqm.js → chunk-rd4x4tsv.js} +1 -1
- package/bundle/chunk-rebsz3bj.js +2 -0
- package/bundle/{chunk-yp5bypsp.js → chunk-rexdr63q.js} +2 -2
- package/bundle/{chunk-1me21qdc.js → chunk-rgxy4ngt.js} +1 -1
- package/bundle/chunk-rph5xswc.js +2 -0
- package/bundle/{chunk-dcndy4sr.js → chunk-rph9zj24.js} +1 -1
- package/bundle/chunk-rqmvj7f4.js +3 -0
- package/bundle/{chunk-ryfqwsft.js → chunk-rrd0jf5m.js} +1 -1
- package/bundle/{chunk-mpygdb5a.js → chunk-s8mghr5a.js} +2 -2
- package/bundle/chunk-schtpyjs.js +2 -0
- package/bundle/{chunk-nmehsm3w.js → chunk-shwjjrj8.js} +1 -1
- package/bundle/{chunk-08f4khsw.js → chunk-snt1kefv.js} +3 -3
- package/bundle/{chunk-s8hq6trz.js → chunk-srxx88nb.js} +1 -1
- package/bundle/{chunk-gy0wm7e1.js → chunk-std2bgv7.js} +2 -2
- package/bundle/{chunk-dffhkd30.js → chunk-swcgsrbj.js} +1 -1
- package/bundle/chunk-sy3n0qhc.js +800 -0
- package/bundle/{chunk-wgk7ynt3.js → chunk-t01bhw5h.js} +3 -3
- package/bundle/chunk-t0jjes17.js +2 -0
- package/bundle/{chunk-y370dqf3.js → chunk-t5tfppwv.js} +2 -2
- package/bundle/chunk-t8rke5fr.js +8 -0
- package/bundle/chunk-tabcpx7t.js +4 -0
- package/bundle/{chunk-gmzrvxnv.js → chunk-tdmn21z0.js} +2 -2
- package/bundle/{chunk-71zw0qhf.js → chunk-tdxbm1nd.js} +1 -1
- package/bundle/{chunk-p825vsjy.js → chunk-te5tfq79.js} +1 -1
- package/bundle/chunk-tf4xwqz7.js +2 -0
- package/bundle/{chunk-fg35hwa0.js → chunk-tgd5ctnt.js} +2 -2
- package/bundle/chunk-tqazneg6.js +2 -0
- package/bundle/{chunk-qa2j0qmy.js → chunk-txqc7543.js} +2 -2
- package/bundle/chunk-tzg4z74d.js +2 -0
- package/bundle/{chunk-a3a1trap.js → chunk-v3x5nrc4.js} +2 -2
- package/bundle/chunk-v8dd6tyn.js +2 -0
- package/bundle/chunk-v8ksjgc3.js +2 -0
- package/bundle/chunk-v8vcwx23.js +2 -0
- package/bundle/chunk-vc4e6xc4.js +10 -0
- package/bundle/chunk-vcrakhgy.js +3 -0
- package/bundle/{chunk-za63b5mc.js → chunk-vdpd4akk.js} +2 -2
- package/bundle/{chunk-6p7yg5sr.js → chunk-vftqwdpg.js} +1 -1
- package/bundle/chunk-vg41rtdy.js +2 -0
- package/bundle/{chunk-r0k21apr.js → chunk-vgaxv70x.js} +2 -2
- package/bundle/{chunk-nkk4fyqf.js → chunk-vgnddhdj.js} +1 -1
- package/bundle/{chunk-xd3xc1vv.js → chunk-vm58fkrv.js} +1 -1
- package/bundle/{chunk-qg2vk5fw.js → chunk-vsys768k.js} +1 -1
- package/bundle/{chunk-s4qtphwx.js → chunk-w03fdrxe.js} +1 -1
- package/bundle/chunk-w1ypf53m.js +3 -0
- package/bundle/chunk-w24660y4.js +3 -0
- package/bundle/{chunk-z1ay3qd0.js → chunk-w3bmf3zz.js} +1 -1
- package/bundle/{chunk-28cm7m3t.js → chunk-w57j3pgz.js} +82 -82
- package/bundle/{chunk-vsr8mnj6.js → chunk-w5940jxm.js} +1 -1
- package/bundle/chunk-w6rf2knb.js +2 -0
- package/bundle/chunk-w9pdvcf9.js +3 -0
- package/bundle/{chunk-yk97q51d.js → chunk-wev34grp.js} +2 -2
- package/bundle/chunk-wh7r96t3.js +2 -0
- package/bundle/{chunk-1pg6pv0m.js → chunk-wm77svwm.js} +1 -1
- package/bundle/chunk-wnjqaxze.js +2 -0
- package/bundle/{chunk-qkjdr337.js → chunk-x6rr6ss1.js} +1 -1
- package/bundle/{chunk-bbzztav6.js → chunk-xdacgfba.js} +1 -1
- package/bundle/{chunk-6p94fpbn.js → chunk-xdjwapwy.js} +2 -2
- package/bundle/chunk-xfz698bh.js +2 -0
- package/bundle/{chunk-zwnhf4z1.js → chunk-xhbb8b5g.js} +1 -1
- package/bundle/chunk-xqwvx3qq.js +2 -0
- package/bundle/chunk-xxj3sgd5.js +2 -0
- package/bundle/chunk-xyjehgzm.js +3 -0
- package/bundle/{chunk-cs38g1bx.js → chunk-y0ydzdfc.js} +1 -1
- package/bundle/{chunk-wvf5q2hz.js → chunk-y1b2h15z.js} +1 -1
- package/bundle/{chunk-1gf116rg.js → chunk-yacccwf6.js} +1 -1
- package/bundle/chunk-ydc6ypjt.js +77 -0
- package/bundle/{chunk-dhqaqeq6.js → chunk-yeq7b87a.js} +1 -1
- package/bundle/chunk-yfp9y71y.js +2 -0
- package/bundle/chunk-yg9c1v8v.js +2 -0
- package/bundle/{chunk-e6xnynaz.js → chunk-yha554nm.js} +2 -2
- package/bundle/{chunk-rv1stdvb.js → chunk-yj6rbe9p.js} +2 -2
- package/bundle/chunk-yjjh339w.js +2 -0
- package/bundle/{chunk-j8q252w3.js → chunk-yjp0btmq.js} +3 -3
- package/bundle/{chunk-c5pb87yf.js → chunk-ymtcm4xd.js} +1 -1
- package/bundle/chunk-yt6vd7a5.js +2 -0
- package/bundle/{chunk-ssk8tkwd.js → chunk-yw9pfqxt.js} +1 -1
- package/bundle/{chunk-g6cyhxwg.js → chunk-yykjvt7f.js} +2 -2
- package/bundle/{chunk-sfes6pp1.js → chunk-yzh4rmrt.js} +1 -1
- package/bundle/chunk-yzq3c3dq.js +2 -0
- package/bundle/{chunk-prh3c44x.js → chunk-yzwgvjzd.js} +1 -1
- package/bundle/chunk-z1j25911.js +2 -0
- package/bundle/{chunk-rkwrjphh.js → chunk-z1rshv6g.js} +1 -1
- package/bundle/chunk-z29ahthm.js +2 -0
- package/bundle/{chunk-jgjnz82k.js → chunk-zaan8jk6.js} +1 -1
- package/bundle/{chunk-6gb65bv1.js → chunk-zbqzm65q.js} +1 -1
- package/bundle/{chunk-bk4phk66.js → chunk-zesbm9k1.js} +1 -1
- package/bundle/{chunk-c6vfwjg4.js → chunk-zfcfyagt.js} +1 -1
- package/bundle/{chunk-ywkvq7zb.js → chunk-zfnbk5gy.js} +1 -1
- package/bundle/chunk-zgre4gc2.js +2 -0
- package/bundle/{chunk-z7430qxg.js → chunk-zrmx397j.js} +1 -1
- package/bundle/chunk-zthkjx33.js +2 -0
- package/bundle/chunk-zxddasg8.js +2 -0
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0x5jn813.js +0 -2
- package/bundle/chunk-1hmq2fpt.js +0 -14
- package/bundle/chunk-28t9akfn.js +0 -2
- package/bundle/chunk-2h1fcqvf.js +0 -2
- package/bundle/chunk-2scyp9ns.js +0 -2
- package/bundle/chunk-2tw58kwb.js +0 -2
- package/bundle/chunk-2vxx0tax.js +0 -2
- package/bundle/chunk-2ybt3p5z.js +0 -2
- package/bundle/chunk-2zpkw3ge.js +0 -2
- package/bundle/chunk-397be2x0.js +0 -2
- package/bundle/chunk-3c78nkgn.js +0 -2
- package/bundle/chunk-3vnnxq40.js +0 -2
- package/bundle/chunk-425mq6k8.js +0 -2
- package/bundle/chunk-43yv7tz1.js +0 -2
- package/bundle/chunk-499gp5g5.js +0 -2
- package/bundle/chunk-4sw6frjt.js +0 -2
- package/bundle/chunk-4xw14sed.js +0 -2
- package/bundle/chunk-536naqqv.js +0 -2
- package/bundle/chunk-57najm15.js +0 -2
- package/bundle/chunk-5he3d7cy.js +0 -2
- package/bundle/chunk-5vzrn6za.js +0 -3
- package/bundle/chunk-696z96a6.js +0 -2
- package/bundle/chunk-6hybp2mt.js +0 -2
- package/bundle/chunk-6v9nbb4c.js +0 -3
- package/bundle/chunk-6y423jax.js +0 -3
- package/bundle/chunk-72ghkgcn.js +0 -2
- package/bundle/chunk-741teh8k.js +0 -2
- package/bundle/chunk-7b3wx6kn.js +0 -2
- package/bundle/chunk-7bwe0ayr.js +0 -3
- package/bundle/chunk-7hh0654f.js +0 -3
- package/bundle/chunk-891yevv2.js +0 -2
- package/bundle/chunk-8d5k45yj.js +0 -2
- package/bundle/chunk-8eje5baf.js +0 -8
- package/bundle/chunk-8ktgy41r.js +0 -2
- package/bundle/chunk-8q73cjyj.js +0 -2
- package/bundle/chunk-8y623qdx.js +0 -2
- package/bundle/chunk-921vn745.js +0 -2
- package/bundle/chunk-9y97bzht.js +0 -8
- package/bundle/chunk-a0rp7gh4.js +0 -77
- package/bundle/chunk-a48t0g95.js +0 -3
- package/bundle/chunk-a8119c3a.js +0 -2
- package/bundle/chunk-akk84fnc.js +0 -2
- package/bundle/chunk-aw7j7brm.js +0 -2
- package/bundle/chunk-b34t8v7x.js +0 -2
- package/bundle/chunk-b8hmj4jq.js +0 -2
- package/bundle/chunk-bja8q0ke.js +0 -3
- package/bundle/chunk-c5fa8cb1.js +0 -2
- package/bundle/chunk-cfw9pyt7.js +0 -2
- package/bundle/chunk-ckbwdrm3.js +0 -2
- package/bundle/chunk-cz3h5n1v.js +0 -3
- package/bundle/chunk-d80hk5x9.js +0 -3
- package/bundle/chunk-d8dk05kd.js +0 -2
- package/bundle/chunk-dwajajaq.js +0 -2
- package/bundle/chunk-dxcrggvq.js +0 -2
- package/bundle/chunk-e7ah0e61.js +0 -2
- package/bundle/chunk-e7v9trve.js +0 -11
- package/bundle/chunk-efndtzby.js +0 -2
- package/bundle/chunk-eq2pepce.js +0 -2
- package/bundle/chunk-esp6jv63.js +0 -7
- package/bundle/chunk-f693s9vn.js +0 -2
- package/bundle/chunk-f9v5n0t6.js +0 -2
- package/bundle/chunk-fdadk5tw.js +0 -2
- package/bundle/chunk-ftepqwyq.js +0 -2
- package/bundle/chunk-g4nq9swr.js +0 -3
- package/bundle/chunk-gdb67zmn.js +0 -14
- package/bundle/chunk-gk28ffhg.js +0 -2
- package/bundle/chunk-gpfc4z4v.js +0 -2
- package/bundle/chunk-gqvg02zp.js +0 -2
- package/bundle/chunk-h3k1dk9m.js +0 -2
- package/bundle/chunk-h8c3dcqt.js +0 -2
- package/bundle/chunk-hfq11w4h.js +0 -2
- package/bundle/chunk-hg0etbkx.js +0 -3
- package/bundle/chunk-hw5qyht3.js +0 -3
- package/bundle/chunk-hwf58w1k.js +0 -2
- package/bundle/chunk-j0jdkqf5.js +0 -5
- package/bundle/chunk-jm722vy1.js +0 -4
- package/bundle/chunk-kdvs4871.js +0 -2
- package/bundle/chunk-kk3ve911.js +0 -2
- package/bundle/chunk-kv72hxkp.js +0 -3
- package/bundle/chunk-m4j7jyrd.js +0 -3
- package/bundle/chunk-mdts0641.js +0 -2
- package/bundle/chunk-mf3sm0pk.js +0 -2
- package/bundle/chunk-mkng9ykt.js +0 -2
- package/bundle/chunk-npv80mcx.js +0 -2
- package/bundle/chunk-ny9hnvzy.js +0 -2
- package/bundle/chunk-p15sv2dg.js +0 -3
- package/bundle/chunk-pe98rznj.js +0 -2
- package/bundle/chunk-q1czj6be.js +0 -2
- package/bundle/chunk-q6wm9yt0.js +0 -2
- package/bundle/chunk-qbx70v64.js +0 -2
- package/bundle/chunk-qc3ce3vc.js +0 -3
- package/bundle/chunk-qek6a75r.js +0 -2
- package/bundle/chunk-qkk1as5n.js +0 -2
- package/bundle/chunk-qsm9xw87.js +0 -2
- package/bundle/chunk-qyzze0dv.js +0 -2
- package/bundle/chunk-r2w3gr8d.js +0 -2
- package/bundle/chunk-r5bqcpkz.js +0 -2
- package/bundle/chunk-r67c858b.js +0 -2
- package/bundle/chunk-r9fvfkee.js +0 -2
- package/bundle/chunk-rq47pn3r.js +0 -2
- package/bundle/chunk-rvt1tdy8.js +0 -2
- package/bundle/chunk-ry7q8xn6.js +0 -2
- package/bundle/chunk-s27xvrft.js +0 -2
- package/bundle/chunk-s2vasbwj.js +0 -2
- package/bundle/chunk-scy39p6q.js +0 -2
- package/bundle/chunk-shenqgrx.js +0 -2
- package/bundle/chunk-sz0gkx88.js +0 -5
- package/bundle/chunk-t5qamf96.js +0 -2
- package/bundle/chunk-t9mz17gb.js +0 -3
- package/bundle/chunk-tt8jke90.js +0 -2
- package/bundle/chunk-ttevj0pj.js +0 -2
- package/bundle/chunk-v6tgn668.js +0 -2
- package/bundle/chunk-v7c54cyj.js +0 -2
- package/bundle/chunk-vgefaens.js +0 -2
- package/bundle/chunk-vkq0faj8.js +0 -2
- package/bundle/chunk-vkqzmzpw.js +0 -2
- package/bundle/chunk-vv59b4re.js +0 -2
- package/bundle/chunk-vwqy7n3g.js +0 -2
- package/bundle/chunk-w5kg2yz0.js +0 -3
- package/bundle/chunk-wbzs30fk.js +0 -28
- package/bundle/chunk-wet3bnwn.js +0 -2
- package/bundle/chunk-wfegee41.js +0 -2
- package/bundle/chunk-wmaz57f6.js +0 -800
- package/bundle/chunk-wn076jwj.js +0 -2
- package/bundle/chunk-x0m1qye9.js +0 -2
- package/bundle/chunk-x9s90xd1.js +0 -3
- package/bundle/chunk-xy5cjach.js +0 -2
- package/bundle/chunk-y70aachh.js +0 -2
- package/bundle/chunk-ya8g02hv.js +0 -9
- package/bundle/chunk-yqk58hf6.js +0 -3
- package/bundle/chunk-ysgxt83y.js +0 -2
- package/bundle/chunk-zm5dfk2b.js +0 -3
- package/bundle/chunk-zph1c2q1.js +0 -3
- package/bundle/chunk-zwdnh860.js +0 -2
package/bundle/chunk-4sw6frjt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$f as d,Yf as a,Zf as b,_f as c,ag as e}from"./chunk-gdb67zmn.js";import"./chunk-0csy9x1n.js";import"./chunk-knpyt206.js";import"./chunk-ya8g02hv.js";import"./chunk-6y423jax.js";import"./chunk-nfg7nt13.js";import"./chunk-rv1stdvb.js";import"./chunk-q5fygrnr.js";import"./chunk-28cm7m3t.js";import"./chunk-w9nzsd3w.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import"./chunk-wmaz57f6.js";import"./chunk-hg0etbkx.js";import"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import"./chunk-nj4d554m.js";import"./chunk-1hmq2fpt.js";import"./chunk-y370dqf3.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import"./chunk-8eje5baf.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-vkqzmzpw.js";import"./chunk-x9s90xd1.js";import"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import"./chunk-3k2b05fv.js";export{c as url,b as openapi,d as listen,e as Server,a as Default};
|
package/bundle/chunk-4xw14sed.js
DELETED
package/bundle/chunk-536naqqv.js
DELETED
package/bundle/chunk-57najm15.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ag as i,Bg as j,Cg as k,Dg as l,Eg as m,Fg as n,sg as a,tg as b,ug as c,vg as d,wg as e,xg as f,yg as g,zg as h}from"./chunk-ya8g02hv.js";import"./chunk-zfcp509b.js";import"./chunk-8eje5baf.js";import"./chunk-hw5qyht3.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-vkqzmzpw.js";import"./chunk-x9s90xd1.js";import"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-3k2b05fv.js";export{e as resolveDevicePoll,j as refreshAccessToken,i as probeToken,k as loginDevice,m as loginBrowser,l as login,c as isReplitEnv,g as isNearExpiry,d as getConfig,f as getCallbackUri,h as fetchQreditsBalance,n as checkoutApiKey,a as ForgewiseError,b as DeviceFlowUnsupportedError};
|
package/bundle/chunk-5he3d7cy.js
DELETED
package/bundle/chunk-5vzrn6za.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{bp as E,cp as e,dp as I}from"./chunk-1hmq2fpt.js";import{Ap as _0,Bp as O0,Cp as G,Dp as Z0,fp as b,hp as g,ip as n,lp as i,mp as x}from"./chunk-y370dqf3.js";import{Kp as p}from"./chunk-keveg5gx.js";import{Ct as c,nu as T,ou as X,st as t,vt as y,xt as A,xu as q}from"./chunk-x9s90xd1.js";import{Nu as d,Ru as Q,yu as s}from"./chunk-e7v9trve.js";import{Tu as w}from"./chunk-m4j7jyrd.js";import{OI as B,YD as v,bK as a,lG as o,oO as M}from"./chunk-a0rp7gh4.js";import{aQ as F}from"./chunk-3k2b05fv.js";var h={};F(h,{waitForDependencies:()=>R0,layer:()=>$0,get:()=>C0,defaultLayer:()=>j0,TuiConfig:()=>h,Service:()=>C,Info:()=>W0});import r from"path";var D={};F(D,{Keybinds:()=>Q0,ConfigKeybinds:()=>D});var _=(O,Z)=>M.String.pipe(M.optional,M.withDecodingDefault(B.succeed(O))).annotate({description:Z}),B0=process.platform==="win32"?"ctrl+z,ctrl+-,super+z":"ctrl+-,super+z",K0=M.Struct({leader:_("ctrl+x","Leader key for keybind combinations"),app_exit:_("ctrl+c,ctrl+d,<leader>q","Exit the application"),editor_open:_("<leader>e","Open external editor"),theme_list:_("<leader>t","List available themes"),sidebar_toggle:_("<leader>b","Toggle sidebar"),scrollbar_toggle:_("none","Toggle session scrollbar"),status_view:_("<leader>s","View status"),session_export:_("<leader>x","Export session to editor"),session_new:_("<leader>n","Create a new session"),session_list:_("<leader>l","List all sessions"),session_timeline:_("<leader>g","Show session timeline"),session_fork:_("none","Fork session from message"),session_rename:_("ctrl+r","Rename session"),session_delete:_("ctrl+d","Delete session"),stash_delete:_("ctrl+d","Delete stash entry"),model_provider_list:_("ctrl+a","Open provider list from model dialog"),model_favorite_toggle:_("ctrl+f","Toggle model favorite status"),session_share:_("none","Share current session"),session_unshare:_("none","Unshare current session"),session_interrupt:_("escape","Interrupt current session"),session_compact:_("<leader>c","Compact the session"),messages_page_up:_("pageup,ctrl+alt+b","Scroll messages up by one page"),messages_page_down:_("pagedown,ctrl+alt+f","Scroll messages down by one page"),messages_line_up:_("ctrl+alt+y","Scroll messages up by one line"),messages_line_down:_("ctrl+alt+e","Scroll messages down by one line"),messages_half_page_up:_("ctrl+alt+u","Scroll messages up by half page"),messages_half_page_down:_("ctrl+alt+d","Scroll messages down by half page"),messages_first:_("ctrl+g,home","Navigate to first message"),messages_last:_("ctrl+alt+g,end","Navigate to last message"),messages_next:_("none","Navigate to next message"),messages_previous:_("none","Navigate to previous message"),messages_last_user:_("none","Navigate to last user message"),messages_copy:_("<leader>y","Copy message"),messages_undo:_("<leader>u","Undo message"),messages_redo:_("<leader>r","Redo message"),messages_toggle_conceal:_("<leader>h","Toggle code block concealment in messages"),tool_details:_("none","Toggle tool details visibility"),model_list:_("<leader>m","List available models"),model_cycle_recent:_("f2","Next recently used model"),model_cycle_recent_reverse:_("shift+f2","Previous recently used model"),model_cycle_favorite:_("none","Next favorite model"),model_cycle_favorite_reverse:_("none","Previous favorite model"),command_list:_("ctrl+p","List available commands"),agent_list:_("<leader>a","List agents"),agent_cycle:_("ctrl+space","Next agent"),agent_cycle_reverse:_("none","Previous agent"),variant_cycle:_("ctrl+t","Cycle model variants"),variant_list:_("none","List model variants"),input_clear:_("ctrl+c","Clear input field"),input_paste:_("super+v,ctrl+v","Paste from clipboard"),input_submit:_("return","Submit input"),input_newline:_("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline in input"),input_move_left:_("left,ctrl+b","Move cursor left in input"),input_move_right:_("right,ctrl+f","Move cursor right in input"),input_move_up:_("up","Move cursor up in input"),input_move_down:_("down","Move cursor down in input"),input_select_left:_("shift+left","Select left in input"),input_select_right:_("shift+right","Select right in input"),input_select_up:_("shift+up","Select up in input"),input_select_down:_("shift+down","Select down in input"),input_line_home:_("ctrl+a","Move to start of line in input"),input_line_end:_("ctrl+e","Move to end of line in input"),input_select_line_home:_("ctrl+shift+a","Select to start of line in input"),input_select_line_end:_("ctrl+shift+e","Select to end of line in input"),input_visual_line_home:_("alt+a","Move to start of visual line in input"),input_visual_line_end:_("alt+e","Move to end of visual line in input"),input_select_visual_line_home:_("alt+shift+a","Select to start of visual line in input"),input_select_visual_line_end:_("alt+shift+e","Select to end of visual line in input"),input_buffer_home:_("home","Move to start of buffer in input"),input_buffer_end:_("end","Move to end of buffer in input"),input_select_buffer_home:_("shift+home","Select to start of buffer in input"),input_select_buffer_end:_("shift+end","Select to end of buffer in input"),input_delete_line:_("ctrl+shift+d","Delete line in input"),input_delete_to_line_end:_("ctrl+k","Delete to end of line in input"),input_delete_to_line_start:_("ctrl+u","Delete to start of line in input"),input_backspace:_("backspace,shift+backspace","Backspace in input"),input_delete:_("ctrl+d,delete,shift+delete","Delete character in input"),input_undo:_(B0,"Undo in input"),input_redo:_("ctrl+.,super+shift+z","Redo in input"),input_word_forward:_("alt+f,alt+right,ctrl+right","Move word forward in input"),input_word_backward:_("alt+b,alt+left,ctrl+left","Move word backward in input"),input_select_word_forward:_("alt+shift+f,alt+shift+right","Select word forward in input"),input_select_word_backward:_("alt+shift+b,alt+shift+left","Select word backward in input"),input_delete_word_forward:_("alt+d,alt+delete,ctrl+delete","Delete word forward in input"),input_delete_word_backward:_("ctrl+w,ctrl+backspace,alt+backspace","Delete word backward in input"),history_previous:_("up","Previous history item"),history_next:_("down","Next history item"),session_child_first:_("<leader>down","Go to first child session"),session_child_cycle:_("right","Go to next child session"),session_child_cycle_reverse:_("left","Go to previous child session"),session_parent:_("up","Go to parent session"),terminal_suspend:_("ctrl+z","Suspend terminal"),terminal_title_toggle:_("none","Toggle terminal title"),tips_toggle:_("<leader>h","Toggle tips on home screen"),plugin_manager:_("none","Open plugin manager dialog"),display_thinking:_("none","Toggle thinking blocks visibility")}).annotate({identifier:"KeybindsConfig"}),Q0=p(K0);var V0=w.object(Object.fromEntries(Object.keys(D.Keybinds.shape).map((O)=>[O,w.string().optional()]))).strict(),R=w.object({scroll_speed:w.number().min(0.001).optional().describe("TUI scroll speed"),scroll_acceleration:w.object({enabled:w.boolean().describe("Enable scroll acceleration")}).optional().describe("Scroll acceleration settings"),diff_style:w.enum(["auto","stacked"]).optional().describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),mouse:w.boolean().optional().describe("Enable or disable mouse capture (default: true on desktop, false on Android/Termux)"),accessible:w.boolean().optional().describe("Screen-reader friendly mode: linear main-screen rendering, no mouse capture, reduced motion, no sound (default: false)"),reduce_motion:w.boolean().optional().describe("Disable spinners and other animations, showing static text instead (default: false)"),sound:w.boolean().optional().describe("Enable or disable sound cues (default: true)"),announcements:w.enum(["quiet","normal","verbose"]).optional().describe("Verbosity of accessible-mode screen-reader announcements: 'quiet' announces only turn boundaries, errors, and stops; 'normal' adds tool-start lines; 'verbose' adds tool-completion lines (default: normal). Errors are always announced.")}),P=w.object({$schema:w.string().optional(),theme:w.string().optional(),keybinds:V0.optional(),plugin:I.Spec.zod.array().optional(),plugin_enabled:w.record(w.string(),w.boolean()).optional()}).extend(R.shape).strict();var H=q.create({service:"tui.migrate"}),Y0="https://qitqode.com/tui.json",D0=P.shape.theme.optional(),l=w.record(w.string(),w.unknown()).optional(),H0=w.object({scroll_speed:R.shape.scroll_speed.catch(void 0),scroll_acceleration:R.shape.scroll_acceleration.catch(void 0),diff_style:R.shape.diff_style.catch(void 0)}).strip();async function k(O){let Z=await G0(O);for(let W of Z){let j=await Q.readText(W).catch((m)=>{H.warn("failed to read config for tui migration",{path:W,error:m});return});if(!j)continue;let V=[],K=b(j,V,{allowTrailingComma:!0});if(V.length||!K||typeof K!=="object"||Array.isArray(K))continue;let $=D0.safeParse("theme"in K?K.theme:void 0),J=l.safeParse("keybinds"in K?K.keybinds:void 0),N=l.safeParse("tui"in K?K.tui:void 0),Y={theme:$.success?$.data:void 0,keybinds:J.success?J.data:void 0,tui:N.success?N.data:void 0},L=Y.tui?J0(Y.tui):void 0;if(Y.theme===void 0&&Y.keybinds===void 0&&!L)continue;let U=r.join(r.dirname(W),"tui.json");if(await Q.exists(U))continue;let z={$schema:Y0};if(Y.theme!==void 0)z.theme=Y.theme;if(Y.keybinds!==void 0)z.keybinds=Y.keybinds;if(L)Object.assign(z,L);if(!await Q.write(U,JSON.stringify(z,null,2)).then(()=>!0).catch((m)=>{return H.warn("failed to write tui migration target",{from:W,to:U,error:m}),!1}))continue;if(!await A0(W,j)){H.warn("tui config migrated but source file was not stripped",{from:W,to:U});continue}H.info("migrated tui config",{from:W,to:U})}}function J0(O){let Z=H0.parse(O);if(Z.scroll_speed===void 0&&Z.diff_style===void 0&&Z.scroll_acceleration===void 0)return;return Z}async function A0(O,Z){let W=O+".tui-migration.bak";if(!(await Q.exists(W)?!0:await Q.write(W,Z).then(()=>!0).catch(($)=>{return H.warn("failed to backup source config during tui migration",{path:O,backup:W,error:$}),!1})))return!1;let K=["theme","keybinds","tui"].reduce(($,J)=>{let N=g($,[J],void 0,{formattingOptions:{insertSpaces:!0,tabSize:2}});if(!N.length)return $;return n($,N)},Z);return Q.write(O,K).then(()=>{return H.info("stripped tui keys from server config",{path:O,backup:W}),!0}).catch(($)=>{return H.warn("failed to strip legacy tui keys from server config",{path:O,backup:W,error:$}),!1})}async function G0(O){let Z=[...G(T.Path.config,"qitqode"),...await Q.findUp(["qitqode.json","qitqode.jsonc"],O.cwd,void 0,{rootFirst:!0})];for(let j of A(O.directories))Z.push(...G(j,"qitqode"));if(X.QITQODE_CONFIG)Z.push(X.QITQODE_CONFIG);return(await Promise.all(A(Z).map(async(j)=>{return await Q.exists(j)?j:void 0}))).filter((j)=>!!j)}var f=v.Reference("CurrentWorkingDirectory",{defaultValue:()=>process.cwd()});var u=q.create({service:"tui.config"}),W0=P;class C extends v.Service()("@qitqode/TuiConfig"){}function N0(O,Z){if(Q.contains(Z.directory,O))return"local";return"global"}function U0(O){let Z={...O};if(!("tui"in Z))return Z;if(!s(Z.tui))return delete Z.tui,Z;let W=Z.tui;return delete Z.tui,{...W,...Z}}async function M0(O,Z){if(!O.plugin)return O;for(let W=0;W<O.plugin.length;W++)O.plugin[W]=await I.resolvePluginSpec(O.plugin[W],Z);return O}async function S(O,Z,W){let j=await z0(Z);if(O.result=c(O.result,j),!j.plugin?.length)return;let V=N0(Z,W),K=I.deduplicatePluginOrigins([...O.result.plugin_origins??[],...j.plugin.map(($)=>({spec:$,scope:V,source:Z}))]);O.result.plugin=K.map(($)=>$.spec),O.result.plugin_origins=K}var I0=B.fn("TuiConfig.loadState")(function*(O){let Z=yield*O0(O.directory);yield*B.promise(()=>k({directories:Z,cwd:O.directory}));let W=X.QITQODE_DISABLE_PROJECT_CONFIG?[]:yield*_0("tui",O.directory),j={result:{}};for(let $ of G(T.Path.config,"tui"))yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);if(X.QITQODE_TUI_CONFIG){let $=X.QITQODE_TUI_CONFIG;yield*B.promise(()=>S(j,$,O)).pipe(B.orDie),u.debug("loaded custom tui config",{path:$})}for(let $ of W)yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);let V=A(Z).filter(($)=>$.endsWith(".qitqode")||$===X.QITQODE_CONFIG_DIR);for(let $ of V){if(!$.endsWith(".qitqode")&&$!==X.QITQODE_CONFIG_DIR)continue;for(let J of G($,"tui"))yield*B.promise(()=>S(j,J,O)).pipe(B.orDie)}let K={...j.result.keybinds??{}};if(process.platform==="win32")K.terminal_suspend="none",K.input_undo??=A(["ctrl+z",...D.Keybinds.shape.input_undo.parse(void 0).split(",")]).join(",");return j.result.keybinds=D.Keybinds.parse(K),{config:j.result,dirs:j.result.plugin?.length?V:[]}}),$0=o.effect(C,B.gen(function*(){let O=yield*f,Z=yield*x.Service,W=yield*I0({directory:O}),j=yield*B.forEach(W.dirs,($)=>Z.install($,{add:[{name:"@qitqode/plugin",version:y?void 0:t}]}).pipe(B.forkScoped),{concurrency:"unbounded"}),V=B.fn("TuiConfig.get")(()=>B.succeed(W.config)),K=B.fn("TuiConfig.waitForDependencies")(()=>B.forEach(j,a.join,{concurrency:"unbounded"}).pipe(B.ignore(),B.asVoid));return C.of({get:V,waitForDependencies:K})}).pipe(B.withSpan("TuiConfig.layer"))),j0=$0.pipe(o.provide(x.defaultLayer),o.provide(d.defaultLayer)),{runPromise:w0}=i(C,j0);async function R0(){await w0((O)=>O.waitForDependencies())}async function C0(){return w0((O)=>O.get())}async function z0(O){let Z=await Z0(O);if(!Z)return{};return P0(Z,O).catch((W)=>{return u.warn("failed to load tui config",{path:O,error:W}),{}})}async function P0(O,Z){return e.substitute({text:O,type:"path",path:Z,missing:"empty"}).then((W)=>E.jsonc(W,Z)).then((W)=>{if(!s(W))return{};return E.schema(W0,U0(W),Z)}).then((W)=>M0(W,Z)).catch((W)=>{return u.warn("invalid tui config",{path:Z,error:W}),{}})}
|
|
3
|
-
export{W0 as u,C as v,$0 as w,j0 as x,R0 as y,C0 as z,h as A};
|
package/bundle/chunk-696z96a6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ed as b}from"./chunk-ppkqr9cn.js";import{Rd as f}from"./chunk-yajd975f.js";import{gh as S}from"./chunk-28cm7m3t.js";import"./chunk-w9nzsd3w.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import{Cl as v}from"./chunk-wmaz57f6.js";import"./chunk-hg0etbkx.js";import{Vl as U,bm as R,lm as k}from"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import"./chunk-nj4d554m.js";import"./chunk-1hmq2fpt.js";import"./chunk-y370dqf3.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import"./chunk-8eje5baf.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-vkqzmzpw.js";import{eu as Z}from"./chunk-x9s90xd1.js";import"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import"./chunk-3k2b05fv.js";var i=f({command:"stats",describe:"show token usage and cost statistics",builder:(z)=>{return z.option("days",{describe:"show stats for the last N days (default: all time)",type:"number"}).option("tools",{describe:"number of tools to show (default: all)",type:"number"}).option("models",{describe:"show model statistics (default: hidden). Pass a number to show top N, otherwise shows all"}).option("project",{describe:"filter by project (default: all projects, empty string: current project)",type:"string"})},handler:async(z)=>{await b(process.cwd(),async()=>{let E=await y(z.days,z.project),_;if(z.models===!0)_=1/0;else if(typeof z.models==="number")_=z.models;u(E,z.tools,_)})}});async function w(){return k.project}async function p(){return R.use((E)=>E.select().from(U).all()).map((E)=>v.fromRow(E))}async function y(z,E){let _=await p(),L=86400000,J=(()=>{if(z===void 0)return 0;if(z===0){let V=new Date;return V.setHours(0,0,0,0),V.getTime()}return Date.now()-z*86400000})(),K=(()=>{if(z===void 0)return;if(z===0)return 1;return z})(),Y=J>0?_.filter((V)=>V.time.updated>=J):_;if(E!==void 0)if(E===""){let V=await w();Y=Y.filter((F)=>F.projectID===V.id)}else Y=Y.filter((V)=>V.projectID===E);let G={totalSessions:Y.length,totalMessages:0,totalCost:0,totalTokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}},toolUsage:{},modelUsage:{},dateRange:{earliest:Date.now(),latest:Date.now()},days:0,costPerDay:0,tokensPerSession:0,medianTokensPerSession:0};if(Y.length>1000)console.log(`Large dataset detected (${Y.length} sessions). This may take a while...`);if(Y.length===0)return G.days=K??0,G;let C=Date.now(),x=0,X=[],h=20;for(let V=0;V<Y.length;V+=h){let D=Y.slice(V,V+h).map(async(Q)=>{let W=await S.runPromise(v.Service.use((O)=>O.messages({sessionID:Q.id,agentID:"*"}))),N=0,H={input:0,output:0,reasoning:0,cache:{read:0,write:0}},j={},A={};for(let O of W){if(O.info.role==="assistant"){N+=O.info.cost||0;let B=`${O.info.providerID}/${O.info.modelID}`;if(!A[B])A[B]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};if(A[B].messages++,A[B].cost+=O.info.cost||0,O.info.tokens)H.input+=O.info.tokens.input||0,H.output+=O.info.tokens.output||0,H.reasoning+=O.info.tokens.reasoning||0,H.cache.read+=O.info.tokens.cache?.read||0,H.cache.write+=O.info.tokens.cache?.write||0,A[B].tokens.input+=O.info.tokens.input||0,A[B].tokens.output+=(O.info.tokens.output||0)+(O.info.tokens.reasoning||0),A[B].tokens.cache.read+=O.info.tokens.cache?.read||0,A[B].tokens.cache.write+=O.info.tokens.cache?.write||0}for(let B of O.parts)if(B.type==="tool"&&B.tool)j[B.tool]=(j[B.tool]||0)+1}return{messageCount:W.length,sessionCost:N,sessionTokens:H,sessionTotalTokens:H.input+H.output+H.reasoning+H.cache.read+H.cache.write,sessionToolUsage:j,sessionModelUsage:A,earliestTime:J>0?Q.time.updated:Q.time.created,latestTime:Q.time.updated}}),M=await Promise.all(D);for(let Q of M){C=Math.min(C,Q.earliestTime),x=Math.max(x,Q.latestTime),X.push(Q.sessionTotalTokens),G.totalMessages+=Q.messageCount,G.totalCost+=Q.sessionCost,G.totalTokens.input+=Q.sessionTokens.input,G.totalTokens.output+=Q.sessionTokens.output,G.totalTokens.reasoning+=Q.sessionTokens.reasoning,G.totalTokens.cache.read+=Q.sessionTokens.cache.read,G.totalTokens.cache.write+=Q.sessionTokens.cache.write;for(let[W,N]of Object.entries(Q.sessionToolUsage))G.toolUsage[W]=(G.toolUsage[W]||0)+N;for(let[W,N]of Object.entries(Q.sessionModelUsage)){if(!G.modelUsage[W])G.modelUsage[W]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};G.modelUsage[W].messages+=N.messages,G.modelUsage[W].tokens.input+=N.tokens.input,G.modelUsage[W].tokens.output+=N.tokens.output,G.modelUsage[W].tokens.cache.read+=N.tokens.cache.read,G.modelUsage[W].tokens.cache.write+=N.tokens.cache.write,G.modelUsage[W].cost+=N.cost}}}let $=Math.max(1,Math.ceil((x-C)/86400000)),q=K??$;G.dateRange={earliest:C,latest:x},G.days=q,G.costPerDay=G.totalCost/q;let I=G.totalTokens.input+G.totalTokens.output+G.totalTokens.reasoning+G.totalTokens.cache.read+G.totalTokens.cache.write;G.tokensPerSession=Y.length>0?I/Y.length:0,X.sort((V,F)=>V-F);let P=Math.floor(X.length/2);return G.medianTokensPerSession=X.length===0?0:X.length%2===0?(X[P-1]+X[P])/2:X[P],G}function u(z,E,_){function J(x,X){let $=55-x.length-X.length,q=Math.max(0,$);return`\u2502${x}${" ".repeat(q)}${X} \u2502`}console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 OVERVIEW \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(J("Sessions",z.totalSessions.toLocaleString())),console.log(J("Messages",z.totalMessages.toLocaleString())),console.log(J("Days",z.days.toString())),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 COST & TOKENS \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let K=isNaN(z.totalCost)?0:z.totalCost,Y=isNaN(z.costPerDay)?0:z.costPerDay,G=isNaN(z.tokensPerSession)?0:z.tokensPerSession;console.log(J("Total Cost",`$${K.toFixed(2)}`)),console.log(J("Avg Cost/Day",`$${Y.toFixed(2)}`)),console.log(J("Avg Tokens/Session",Z.number(Math.round(G))));let C=isNaN(z.medianTokensPerSession)?0:z.medianTokensPerSession;if(console.log(J("Median Tokens/Session",Z.number(Math.round(C)))),console.log(J("Input",Z.number(z.totalTokens.input))),console.log(J("Output",Z.number(z.totalTokens.output))),console.log(J("Cache Read",Z.number(z.totalTokens.cache.read))),console.log(J("Cache Write",Z.number(z.totalTokens.cache.write))),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),_!==void 0&&Object.keys(z.modelUsage).length>0){let x=Object.entries(z.modelUsage).sort(([,h],[,$])=>$.messages-h.messages),X=_===1/0?x:x.slice(0,_);console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 MODEL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let[h,$]of X)console.log(`\u2502 ${h.padEnd(54)} \u2502`),console.log(J(" Messages",$.messages.toLocaleString())),console.log(J(" Input Tokens",Z.number($.tokens.input))),console.log(J(" Output Tokens",Z.number($.tokens.output))),console.log(J(" Cache Read",Z.number($.tokens.cache.read))),console.log(J(" Cache Write",Z.number($.tokens.cache.write))),console.log(J(" Cost",`$${$.cost.toFixed(4)}`)),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");process.stdout.write("\x1B[1A"),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}if(console.log(),Object.keys(z.toolUsage).length>0){let x=Object.entries(z.toolUsage).sort(([,q],[,I])=>I-q),X=E?x.slice(0,E):x;console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 TOOL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let h=Math.max(...X.map(([,q])=>q)),$=Object.values(z.toolUsage).reduce((q,I)=>q+I,0);for(let[q,I]of X){let P=Math.max(1,Math.floor(I/h*20)),V="\u2588".repeat(P),F=(I/$*100).toFixed(1),D=18,W=` ${(q.length>18?q.substring(0,16)+"..":q).padEnd(18)} ${V.padEnd(20)} ${I.toString().padStart(3)} (${F.padStart(4)}%)`,N=Math.max(0,56-W.length-1);console.log(`\u2502${W}${" ".repeat(N)} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}console.log()}export{u as displayStats,y as aggregateSessionStats,i as StatsCommand};
|
package/bundle/chunk-6hybp2mt.js
DELETED
package/bundle/chunk-6v9nbb4c.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rd as q}from"./chunk-yajd975f.js";import{Vf as v}from"./chunk-p9cnzxb8.js";import{gh as S}from"./chunk-28cm7m3t.js";import"./chunk-w9nzsd3w.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import"./chunk-wmaz57f6.js";import"./chunk-hg0etbkx.js";import{cm as Q,lm as H}from"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import"./chunk-nj4d554m.js";import"./chunk-1hmq2fpt.js";import"./chunk-y370dqf3.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import"./chunk-8eje5baf.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-vkqzmzpw.js";import"./chunk-x9s90xd1.js";import{Gu as K}from"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import"./chunk-3k2b05fv.js";var P=q({command:"pr <number>",describe:"fetch and checkout a GitHub PR branch, then run qitqode",builder:(Y)=>Y.positional("number",{type:"number",describe:"PR number to checkout",demandOption:!0}),async handler(Y){await H.provide({directory:process.cwd(),async fn(){if(H.project.vcs!=="git")v.error("Could not find git repository. Please run this command from a git repository."),process.exit(1);let J=Y.number,Z=`pr/${J}`;if(v.println(`Fetching and checking out PR #${J}...`),(await K.run(["gh","pr","checkout",`${J}`,"--branch",Z,"--force"],{nothrow:!0})).code!==0)v.error(`Failed to checkout PR #${J}. Make sure you have gh CLI installed and authenticated.`),process.exit(1);let _=await K.text(["gh","pr","view",`${J}`,"--json","headRepository,headRepositoryOwner,isCrossRepository,headRefName,body"],{nothrow:!0}),V;if(_.code===0){let j=_.text;if(j.trim()){let z=JSON.parse(j);if(z&&z.isCrossRepository&&z.headRepository&&z.headRepositoryOwner){let L=z.headRepositoryOwner.login,W=z.headRepository.name,C=L;if(!(await S.runPromise(Q.Service.use((F)=>F.run(["remote"],{cwd:H.worktree}))).then((F)=>F.text().trim())).split(`
|
|
3
|
-
`).includes(C))await S.runPromise(Q.Service.use((F)=>F.run(["remote","add",C,`https://github.com/${L}/${W}.git`],{cwd:H.worktree}))),v.println(`Added fork remote: ${C}`);let X=z.headRefName;await S.runPromise(Q.Service.use((F)=>F.run(["branch",`--set-upstream-to=${C}/${X}`,Z],{cwd:H.worktree})))}if(z&&z.body){let L=z.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/);if(L){let W=L[0];v.println(`Found qitqode session: ${W}`),v.println("Importing session...");let C=await K.text(["qitqode","import",W],{nothrow:!0});if(C.code===0){let X=C.text.trim().match(/Imported session: ([a-zA-Z0-9_-]+)/);if(X)V=X[1],v.println(`Session imported: ${V}`)}}}}}v.println(`Successfully checked out PR #${J} as branch '${Z}'`),v.println(),v.println("Starting qitqode..."),v.println();let D=V?["-s",V]:[],$=await K.spawn(["qitqode",...D],{stdin:"inherit",stdout:"inherit",stderr:"inherit",cwd:process.cwd()}).exited;if($!==0)throw Error(`qitqode exited with code ${$}`)}})}});export{P as PrCommand};
|
package/bundle/chunk-6y423jax.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cQ as o}from"./chunk-3k2b05fv.js";var i=(t)=>`standard-openapi: ${t}`,s=new Map,r=async(t)=>{let e=s.get(t);if(e)return e;let a;switch(t){case"valibot":a=(await import("./chunk-rsszcqxd.js")).default();break;case"zod":a=(await import("./chunk-r5bqcpkz.js")).default();break;default:a=(await import("./chunk-6hybp2mt.js")).default()}return s.set(t,a),a},d=async(t,e={})=>{let a=await r(t["~standard"].vendor),{components:n={},options:c}=e;return{schema:await a(t,{components:n,options:c}),components:Object.keys(n).length>0?n:void 0}};
|
|
3
|
-
export{i as Gg,d as Hg};
|
package/bundle/chunk-72ghkgcn.js
DELETED
package/bundle/chunk-741teh8k.js
DELETED
package/bundle/chunk-7b3wx6kn.js
DELETED
package/bundle/chunk-7bwe0ayr.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rd as a}from"./chunk-yajd975f.js";import{Sf as d}from"./chunk-9msnx26q.js";import{Vf as i}from"./chunk-p9cnzxb8.js";import{$l as p,bm as n}from"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import{ap as f}from"./chunk-nj4d554m.js";import"./chunk-keveg5gx.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-x9s90xd1.js";import{Au as m}from"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-3k2b05fv.js";import{spawn as y}from"child_process";import{Database as g}from"bun:sqlite";import{EOL as l}from"os";var b=a({command:"$0 [query]",describe:"open an interactive sqlite3 shell or run a query",builder:(t)=>{return t.positional("query",{type:"string",describe:"SQL query to execute"}).option("format",{type:"string",choices:["json","tsv"],default:"tsv",describe:"Output format"})},handler:async(t)=>{let o=t.query;if(o){let r=new g(n.Path,{readonly:!0});try{let e=r.query(o).all();if(t.format==="json")console.log(JSON.stringify(e,null,2));else if(e.length>0){let s=Object.keys(e[0]);console.log(s.join("\t"));for(let u of e)console.log(s.map((h)=>u[h]).join("\t"))}}catch(e){i.error(m(e)),process.exit(1)}r.close();return}let c=y("sqlite3",[n.Path],{stdio:"inherit"});await new Promise((r)=>c.on("close",r))}}),w=a({command:"path",describe:"print the database path",handler:()=>{console.log(n.Path)}}),q=a({command:"migrate",describe:"migrate JSON data to SQLite (merges with existing data)",handler:async()=>{let t=new g(n.Path),o=process.stderr.isTTY,c=-1;if(o)process.stderr.write("\x1B[?25l");try{let r=await p.run(f({client:t}),{progress:(e)=>{let s=Math.floor(e.current/e.total*100);if(s===c)return;if(c=s,o)process.stderr.write(d(s,`${e.current}/${e.total}`)+" ");else process.stderr.write(`sqlite-migration:${s}${l}`)}});if(o)process.stderr.write(`
|
|
3
|
-
`);if(o)process.stderr.write("\x1B[?25h");else process.stderr.write(`sqlite-migration:done${l}`);if(i.println(`Migration complete: ${r.projects} projects, ${r.sessions} sessions, ${r.messages} messages`),r.errors.length>0)i.println(`${r.errors.length} errors occurred during migration`)}catch(r){if(o)process.stderr.write("\x1B[?25h");i.error(`Migration failed: ${m(r)}`),process.exit(1)}finally{t.close()}}}),v=a({command:"db",describe:"database tools",builder:(t)=>{return t.command(b).command(w).command(q).demandCommand()},handler:()=>{}});export{v as DbCommand};
|
package/bundle/chunk-7hh0654f.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ag as E}from"./chunk-gdb67zmn.js";import"./chunk-0csy9x1n.js";import"./chunk-knpyt206.js";import"./chunk-ya8g02hv.js";import"./chunk-6y423jax.js";import"./chunk-nfg7nt13.js";import"./chunk-rv1stdvb.js";import"./chunk-q5fygrnr.js";import"./chunk-28cm7m3t.js";import"./chunk-w9nzsd3w.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import"./chunk-wmaz57f6.js";import"./chunk-hg0etbkx.js";import"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import"./chunk-nj4d554m.js";import"./chunk-1hmq2fpt.js";import"./chunk-y370dqf3.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import"./chunk-8eje5baf.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-vkqzmzpw.js";import"./chunk-x9s90xd1.js";import"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import{cQ as z}from"./chunk-3k2b05fv.js";var J={command:"generate",handler:async()=>{let A=await E.openapi();for(let q of Object.values(A.paths))for(let y of["get","post","put","delete","patch"]){let k=q[y];if(!k?.operationId)continue;k["x-codeSamples"]=[{lang:"js",source:['import { createQitQodeClient } from "@qitqode/sdk"',"","const client = createQitQodeClient()",`await client.${k.operationId}({`," ...","})"].join(`
|
|
3
|
-
`)}]}let F=JSON.stringify(A,null,2),B=await import("./chunk-ke7n9t5p.js"),C=await import("./chunk-0h8wdch6.js"),D=await import("./chunk-vsr8mnj6.js"),G=await(B.format??B.default?.format)(F,{parser:"json",plugins:[C.default??C,D.default??D],printWidth:120});await new Promise((q,y)=>{process.stdout.write(G,(k)=>{if(k)y(k);else q()})})}};export{J as GenerateCommand};
|
package/bundle/chunk-891yevv2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ef as M}from"./chunk-cz3h5n1v.js";import"./chunk-yqk58hf6.js";import{ZP as B}from"./chunk-ee23d2nz.js";import{$P as X,_P as b,cQ as V}from"./chunk-3k2b05fv.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
|
package/bundle/chunk-8d5k45yj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ed as y}from"./chunk-ppkqr9cn.js";import{Rd as L}from"./chunk-yajd975f.js";import{Ug as N,gh as w}from"./chunk-28cm7m3t.js";import"./chunk-w9nzsd3w.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import{Cl as v,tl as q}from"./chunk-wmaz57f6.js";import"./chunk-hg0etbkx.js";import{Vl as V,Wl as A,Xl as E,bm as k,lm as O}from"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import"./chunk-nj4d554m.js";import"./chunk-1hmq2fpt.js";import"./chunk-y370dqf3.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import"./chunk-8eje5baf.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-vkqzmzpw.js";import"./chunk-x9s90xd1.js";import{Ru as P}from"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import"./chunk-3k2b05fv.js";import{EOL as X}from"os";function U(C){let G=C.match(/^https?:\/\/[^/]+\/share\/([a-zA-Z0-9_-]+)$/);return G?G[1]:null}function M(C,G){try{return new URL(C).origin===new URL(G).origin}catch{return!1}}function S(C){let G=C.find((z)=>z.type==="session");if(!G)return null;let Z=new Map,Q=new Map;for(let z of C)if(z.type==="message")Z.set(z.data.id,z.data);else if(z.type==="part"){if(!Q.has(z.data.messageID))Q.set(z.data.messageID,[]);Q.get(z.data.messageID).push(z.data)}if(Z.size===0)return null;return{info:G.data,messages:Array.from(Z.values()).map((z)=>({info:z,parts:Q.get(z.id)??[]}))}}var m=L({command:"import <file>",describe:"import session data from JSON file or URL",builder:(C)=>{return C.positional("file",{describe:"path to JSON file or share URL",type:"string",demandOption:!0})},handler:async(C)=>{await y(process.cwd(),async()=>{let G;if(C.file.startsWith("http://")||C.file.startsWith("https://")){let J=U(C.file);if(!J){let Y=await w.runPromise(N.Service.use((R)=>R.url()));process.stdout.write(`Invalid URL format. Expected: ${Y}/share/<slug>`),process.stdout.write(X);return}let _=new URL(C.file).origin,$=await w.runPromise(N.Service.use((Y)=>Y.request())),j=M(C.file,$.baseUrl)?$.headers:{},W=$.api.data(J),K=await fetch(`${_}${W}`,{headers:j});if(!K.ok&&W!==`/api/share/${J}/data`)K=await fetch(`${_}/api/share/${J}/data`,{headers:j});if(!K.ok){process.stdout.write(`Failed to fetch share data: ${K.statusText}`),process.stdout.write(X);return}let H=await K.json(),B=S(H);if(!B){process.stdout.write(`Share not found or empty: ${J}`),process.stdout.write(X);return}G=B}else if(G=await P.readJson(C.file).catch(()=>{return}),!G){process.stdout.write(`File not found: ${C.file}`),process.stdout.write(X);return}if(!G){process.stdout.write("Failed to read session data"),process.stdout.write(X);return}let Q=v.Info.parse({...G.info,projectID:O.project.id}),z=v.toRow(Q);k.use((J)=>J.insert(V).values(z).onConflictDoUpdate({target:V.id,set:{project_id:z.project_id}}).run());for(let J of G.messages){let F=q.Info.parse(J.info),{id:_,sessionID:$,...j}=F;k.use((W)=>W.insert(A).values({id:_,session_id:z.id,time_created:F.time?.created??Date.now(),data:j}).onConflictDoNothing().run());for(let W of J.parts){let K=q.Part.parse(W),{id:H,sessionID:B,messageID:Y,...R}=K;k.use((T)=>T.insert(E).values({id:H,message_id:Y,session_id:z.id,data:R}).onConflictDoNothing().run())}}process.stdout.write(`Imported session: ${G.info.id}`),process.stdout.write(X)})}});export{S as transformShareData,M as shouldAttachShareAuthHeaders,U as parseShareUrl,m as ImportCommand};
|
package/bundle/chunk-8eje5baf.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kq as qO,lq as EO,nq as HO}from"./chunk-hw5qyht3.js";import{rt as u}from"./chunk-vkqzmzpw.js";import{ku as X$,nu as J$,ou as R,xu as FO}from"./chunk-x9s90xd1.js";import{Su as Y1}from"./chunk-zh3fny3z.js";import{OI as c}from"./chunk-a0rp7gh4.js";import{_P as J1,aQ as D1,cQ as RO}from"./chunk-3k2b05fv.js";function x$({onRequest:O,onSseError:$,onSseEvent:Z,responseTransformer:J,responseValidator:Y,sseDefaultRetryDelay:D,sseMaxRetryAttempts:W,sseMaxRetryDelay:G,sseSleepFn:V,url:K,...z}){let L,M=V??((U)=>new Promise((j)=>setTimeout(j,U)));return{stream:async function*(){let U=D??3000,j=0,B=z.signal??new AbortController().signal;while(!0){if(B.aborted)break;j++;let l=z.headers instanceof Headers?z.headers:new Headers(z.headers);if(L!==void 0)l.set("Last-Event-ID",L);try{let E={redirect:"follow",...z,body:z.serializedBody,headers:l,signal:B},A=new Request(K,E);if(O)A=await O(K,E);let Q=await(z.fetch??globalThis.fetch)(A);if(!Q.ok)throw Error(`SSE failed: ${Q.status} ${Q.statusText}`);if(!Q.body)throw Error("No body in SSE response");let w=Q.body.pipeThrough(new TextDecoderStream).getReader(),T="",T$=()=>{try{w.cancel()}catch{}};B.addEventListener("abort",T$);try{while(!0){let{done:CO,value:vO}=await w.read();if(CO)break;T+=vO,T=T.replace(/\r\n?/g,`
|
|
3
|
-
`);let _$=T.split(`
|
|
4
|
-
|
|
5
|
-
`);T=_$.pop()??"";for(let yO of _$){let cO=yO.split(`
|
|
6
|
-
`),n=[],N$;for(let F of cO)if(F.startsWith("data:"))n.push(F.replace(/^data:\s*/,""));else if(F.startsWith("event:"))N$=F.replace(/^event:\s*/,"");else if(F.startsWith("id:"))L=F.replace(/^id:\s*/,"");else if(F.startsWith("retry:")){let R$=Number.parseInt(F.replace(/^retry:\s*/,""),10);if(!Number.isNaN(R$))U=R$}let h,B$=!1;if(n.length){let F=n.join(`
|
|
7
|
-
`);try{h=JSON.parse(F),B$=!0}catch{h=F}}if(B$){if(Y)await Y(h);if(J)h=await J(h)}if(Z?.({data:h,event:N$,id:L,retry:U}),n.length)yield h}}}finally{B.removeEventListener("abort",T$),w.releaseLock()}break}catch(E){if($?.(E),W!==void 0&&j>=W)break;let A=Math.min(U*2**(j-1),G??30000);await M(A)}}}()}}var uO=(O)=>{switch(O){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},dO=(O)=>{switch(O){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},mO=(O)=>{switch(O){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},p=({allowReserved:O,explode:$,name:Z,style:J,value:Y})=>{if(!$){let G=(O?Y:Y.map((V)=>encodeURIComponent(V))).join(dO(J));switch(J){case"label":return`.${G}`;case"matrix":return`;${Z}=${G}`;case"simple":return G;default:return`${Z}=${G}`}}let D=uO(J),W=Y.map((G)=>{if(J==="label"||J==="simple")return O?G:encodeURIComponent(G);return f({allowReserved:O,name:Z,value:G})}).join(D);return J==="label"||J==="matrix"?D+W:W},f=({allowReserved:O,name:$,value:Z})=>{if(Z===void 0||Z===null)return"";if(typeof Z==="object")throw Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${$}=${O?Z:encodeURIComponent(Z)}`},i=({allowReserved:O,explode:$,name:Z,style:J,value:Y,valueOnly:D})=>{if(Y instanceof Date)return D?Y.toISOString():`${Z}=${Y.toISOString()}`;if(J!=="deepObject"&&!$){let V=[];Object.entries(Y).forEach(([z,L])=>{V=[...V,z,O?L:encodeURIComponent(L)]});let K=V.join(",");switch(J){case"form":return`${Z}=${K}`;case"label":return`.${K}`;case"matrix":return`;${Z}=${K}`;default:return K}}let W=mO(J),G=Object.entries(Y).map(([V,K])=>f({allowReserved:O,name:J==="deepObject"?`${Z}[${V}]`:V,value:K})).join(W);return J==="label"||J==="matrix"?W+G:G};var lO=/\{[^{}]+\}/g,nO=({path:O,url:$})=>{let Z=$,J=$.match(lO);if(J)for(let Y of J){let D=!1,W=Y.substring(1,Y.length-1),G="simple";if(W.endsWith("*"))D=!0,W=W.substring(0,W.length-1);if(W.startsWith("."))W=W.substring(1),G="label";else if(W.startsWith(";"))W=W.substring(1),G="matrix";let V=O[W];if(V===void 0||V===null)continue;if(Array.isArray(V)){Z=Z.replace(Y,p({explode:D,name:W,style:G,value:V}));continue}if(typeof V==="object"){Z=Z.replace(Y,i({explode:D,name:W,style:G,value:V,valueOnly:!0}));continue}if(G==="matrix"){Z=Z.replace(Y,`;${f({name:W,value:V})}`);continue}let K=encodeURIComponent(G==="label"?`.${V}`:V);Z=Z.replace(Y,K)}return Z},w$=({baseUrl:O,path:$,query:Z,querySerializer:J,url:Y})=>{let D=Y.startsWith("/")?Y:`/${Y}`,W=(O??"")+D;if($)W=nO({path:$,url:W});let G=Z?J(Z):"";if(G.startsWith("?"))G=G.substring(1);if(G)W+=`?${G}`;return W};function e(O){let $=O.body!==void 0;if($&&O.bodySerializer){if("serializedBody"in O)return O.serializedBody!==void 0&&O.serializedBody!==""?O.serializedBody:null;return O.body!==""?O.body:null}if($)return O.body;return}var F$=async(O,$)=>{let Z=typeof $==="function"?await $(O):$;if(!Z)return;if(O.scheme==="bearer")return`Bearer ${Z}`;if(O.scheme==="basic")return`Basic ${btoa(Z)}`;return Z};var $$={bodySerializer:(O)=>JSON.stringify(O,($,Z)=>typeof Z==="bigint"?Z.toString():Z)};var q$=({parameters:O={},...$}={})=>{return(J)=>{let Y=[];if(J&&typeof J==="object")for(let D in J){let W=J[D];if(W===void 0||W===null)continue;let G=O[D]||$;if(Array.isArray(W)){let V=p({allowReserved:G.allowReserved,explode:!0,name:D,style:"form",value:W,...G.array});if(V)Y.push(V)}else if(typeof W==="object"){let V=i({allowReserved:G.allowReserved,explode:!0,name:D,style:"deepObject",value:W,...G.object});if(V)Y.push(V)}else{let V=f({allowReserved:G.allowReserved,name:D,value:W});if(V)Y.push(V)}}return Y.join("&")}},E$=(O)=>{if(!O)return"stream";let $=O.split(";")[0]?.trim();if(!$)return;if($.startsWith("application/json")||$.endsWith("+json"))return"json";if($==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((Z)=>$.startsWith(Z)))return"blob";if($.startsWith("text/"))return"text";return},pO=(O,$)=>{if(!$)return!1;if(O.headers.has($)||O.query?.[$]||O.headers.get("Cookie")?.includes(`${$}=`))return!0;return!1};async function H$(O){for(let $ of O.security??[]){if(pO(O,$.name))continue;let Z=await F$($,O.auth);if(!Z)continue;let J=$.name??"Authorization";switch($.in){case"query":if(!O.query)O.query={};O.query[J]=Z;break;case"cookie":O.headers.append("Cookie",`${J}=${Z}`);break;case"header":default:O.headers.set(J,Z);break}}}var O$=(O)=>w$({baseUrl:O.baseUrl,path:O.path,query:O.query,querySerializer:typeof O.querySerializer==="function"?O.querySerializer:q$(O.querySerializer),url:O.url}),Z$=(O,$)=>{let Z={...O,...$};if(Z.baseUrl?.endsWith("/"))Z.baseUrl=Z.baseUrl.substring(0,Z.baseUrl.length-1);return Z.headers=s(O.headers,$.headers),Z},iO=(O)=>{let $=[];return O.forEach((Z,J)=>{$.push([J,Z])}),$},s=(...O)=>{let $=new Headers;for(let Z of O){if(!Z)continue;let J=Z instanceof Headers?iO(Z):Object.entries(Z);for(let[Y,D]of J)if(D===null)$.delete(Y);else if(Array.isArray(D))for(let W of D)$.append(Y,W);else if(D!==void 0)$.set(Y,typeof D==="object"?JSON.stringify(D):D)}return $};class r{fns=[];clear(){this.fns=[]}eject(O){let $=this.getInterceptorIndex(O);if(this.fns[$])this.fns[$]=null}exists(O){let $=this.getInterceptorIndex(O);return Boolean(this.fns[$])}getInterceptorIndex(O){if(typeof O==="number")return this.fns[O]?O:-1;return this.fns.indexOf(O)}update(O,$){let Z=this.getInterceptorIndex(O);if(this.fns[Z])return this.fns[Z]=$,O;return!1}use(O){return this.fns.push(O),this.fns.length-1}}var A$=()=>({error:new r,request:new r,response:new r}),rO=q$({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),sO={"Content-Type":"application/json"},b=(O={})=>({...$$,headers:sO,parseAs:"auto",querySerializer:rO,...O});var C=(O={})=>{let $=Z$(b(),O),Z=()=>({...$}),J=(z)=>{return $=Z$($,z),Z()},Y=A$(),D=async(z)=>{let L={...$,...z,fetch:z.fetch??$.fetch??globalThis.fetch,headers:s($.headers,z.headers),serializedBody:void 0};if(L.security)await H$(L);if(L.requestValidator)await L.requestValidator(L);if(L.body!==void 0&&L.bodySerializer)L.serializedBody=L.bodySerializer(L.body);if(L.body===void 0||L.serializedBody==="")L.headers.delete("Content-Type");let M=L,_=O$(M);return{opts:M,url:_}},W=async(z)=>{let L=z.throwOnError??$.throwOnError,M=z.responseStyle??$.responseStyle,_,S;try{let{opts:U,url:j}=await D(z),B={redirect:"follow",...U,body:e(U)};_=new Request(j,B);for(let Q of Y.request.fns)if(Q)_=await Q(_,U);let l=U.fetch;S=await l(_);for(let Q of Y.response.fns)if(Q)S=await Q(S,_,U);let E={request:_,response:S};if(S.ok){let Q=(U.parseAs==="auto"?E$(S.headers.get("Content-Type")):U.parseAs)??"json";if(S.status===204||S.headers.get("Content-Length")==="0"){let T;switch(Q){case"arrayBuffer":case"blob":case"text":T=await S[Q]();break;case"formData":T=new FormData;break;case"stream":T=S.body;break;case"json":default:T={};break}return U.responseStyle==="data"?T:{data:T,...E}}let w;switch(Q){case"arrayBuffer":case"blob":case"formData":case"text":w=await S[Q]();break;case"json":{let T=await S.text();w=T?JSON.parse(T):{};break}case"stream":return U.responseStyle==="data"?S.body:{data:S.body,...E}}if(Q==="json"){if(U.responseValidator)await U.responseValidator(w);if(U.responseTransformer)w=await U.responseTransformer(w)}return U.responseStyle==="data"?w:{data:w,...E}}let A=await S.text(),o;try{o=JSON.parse(A)}catch{}throw o??A}catch(U){let j=U;for(let B of Y.error.fns)if(B)j=await B(j,S,_,z);if(j=j||{},L)throw j;return M==="data"?void 0:{error:j,request:_,response:S}}},G=(z)=>(L)=>W({...L,method:z}),V=(z)=>async(L)=>{let{opts:M,url:_}=await D(L);return x$({...M,body:M.body,method:z,onRequest:async(S,U)=>{let j=new Request(S,U);for(let B of Y.request.fns)if(B)j=await B(j,M);return j},serializedBody:e(M),url:_})};return{buildUrl:(z)=>O$({...$,...z}),connect:G("CONNECT"),delete:G("DELETE"),get:G("GET"),getConfig:Z,head:G("HEAD"),interceptors:Y,options:G("OPTIONS"),patch:G("PATCH"),post:G("POST"),put:G("PUT"),request:W,setConfig:J,sse:{connect:V("CONNECT"),delete:V("DELETE"),get:V("GET"),head:V("HEAD"),options:V("OPTIONS"),patch:V("PATCH"),post:V("POST"),put:V("PUT"),trace:V("TRACE")},trace:G("TRACE")}};var tO={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},aO=Object.entries(tO),h$=(O,$)=>{if(!$)$=new Map;for(let Z of O)if("in"in Z){if(Z.key)$.set(Z.key,{in:Z.in,map:Z.map})}else if("key"in Z)$.set(Z.key,{map:Z.map});else if(Z.args)h$(Z.args,$);return $},oO=(O)=>{for(let[$,Z]of Object.entries(O))if(Z&&typeof Z==="object"&&!Array.isArray(Z)&&!Object.keys(Z).length)delete O[$]},X=(O,$)=>{let Z={body:Object.create(null),headers:Object.create(null),path:Object.create(null),query:Object.create(null)},J=h$($),Y;for(let[D,W]of O.entries()){if($[D])Y=$[D];if(!Y)continue;if("in"in Y)if(Y.key){let G=J.get(Y.key),V=G.map||Y.key;if(G.in)Z[G.in][V]=W}else Z.body=W;else for(let[G,V]of Object.entries(W??{})){let K=J.get(G);if(K)if(K.in){let z=K.map||G;Z[K.in][z]=V}else Z[K.map]=V;else{let z=aO.find(([L])=>G.startsWith(L));if(z){let[L,M]=z;Z[M][G.slice(L.length)]=V}else if("allowExtra"in Y&&Y.allowExtra){for(let[L,M]of Object.entries(Y.allowExtra))if(M){Z[L][G]=V;break}}}}}return oO(Z),Z};var k$=C(b({baseUrl:"http://localhost:4096"}));class I{client;constructor(O){this.client=O?.client??k$}}class P${defaultKey="default";instances=new Map;get(O){let $=this.instances.get(O??this.defaultKey);if(!$)throw Error('No SDK client found. Create one with "new QitQodeClient()" to fix this error.');return $}set(O,$){this.instances.set($??this.defaultKey,O)}}class g$ extends I{get(O){return(O?.client??this.client).get({url:"/global/config",...O})}update(O,$){let Z=X([O],[{args:[{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/global/config",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class f$ extends I{scan(O){return(O?.client??this.client).get({url:"/global/import/scan",...O})}run(O,$){let Z=X([O],[{args:[{in:"body",key:"sources"},{in:"body",key:"force"}]}]);return($?.client??this.client).post({url:"/global/import/run",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class b$ extends I{health(O){return(O?.client??this.client).get({url:"/global/health",...O})}event(O){return(O?.client??this.client).sse.get({url:"/global/event",...O})}dispose(O){return(O?.client??this.client).post({url:"/global/dispose",...O})}upgrade(O,$){let Z=X([O],[{args:[{in:"body",key:"target"}]}]);return($?.client??this.client).post({url:"/global/upgrade",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_config;get config(){return this._config??=new g$({client:this.client})}_import;get import(){return this._import??=new f$({client:this.client})}}class C$ extends I{remove(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"}]}]);return($?.client??this.client).delete({url:"/auth/{providerID}",...$,...Z})}set(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"},{key:"auth",map:"body"}]}]);return($?.client??this.client).put({url:"/auth/{providerID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class v$ extends I{log(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"service"},{in:"body",key:"level"},{in:"body",key:"message"},{in:"body",key:"extra"}]}]);return($?.client??this.client).post({url:"/log",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}agents(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/agent",...$,...Z})}skills(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/skill",...$,...Z})}}class y$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/adaptor",...$,...Z})}}class c$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"type"},{in:"body",key:"branch"},{in:"body",key:"extra"}]}]);return($?.client??this.client).post({url:"/experimental/workspace",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/status",...$,...Z})}remove(O,$){let Z=X([O],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/experimental/workspace/{id}",...$,...Z})}sessionRestore(O,$){let Z=X([O],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/experimental/workspace/{id}/session-restore",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_adaptor;get adaptor(){return this._adaptor??=new y$({client:this.client})}}class u$ extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console",...$,...Z})}listOrgs(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console/orgs",...$,...Z})}switchOrg(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"accountID"},{in:"body",key:"orgID"}]}]);return($?.client??this.client).post({url:"/experimental/console/switch",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class d$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"cursor"},{in:"query",key:"search"},{in:"query",key:"limit"},{in:"query",key:"archived"}]}]);return($?.client??this.client).get({url:"/experimental/session",...$,...Z})}}class m$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/resource",...$,...Z})}}class l$ extends I{_workspace;get workspace(){return this._workspace??=new c$({client:this.client})}_console;get console(){return this._console??=new u$({client:this.client})}_session;get session(){return this._session??=new d$({client:this.client})}_resource;get resource(){return this._resource??=new m$({client:this.client})}}class n$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project",...$,...Z})}current(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project/current",...$,...Z})}initGit(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/project/git/init",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"icon"},{in:"body",key:"commands"}]}]);return($?.client??this.client).patch({url:"/project/{projectID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class p$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"},{in:"body",key:"args"},{in:"body",key:"cwd"},{in:"body",key:"title"},{in:"body",key:"env"}]}]);return($?.client??this.client).post({url:"/pty",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}remove(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/pty/{ptyID}",...$,...Z})}get(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"size"}]}]);return($?.client??this.client).put({url:"/pty/{ptyID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}connectToken(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/pty/{ptyID}/connect-token",...$,...Z})}connect(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}/connect",...$,...Z})}}class i$ extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/config",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}providers(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config/providers",...$,...Z})}}class r$ extends I{ids(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/tool/ids",...$,...Z})}list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"provider"},{in:"query",key:"model"}]}]);return($?.client??this.client).get({url:"/experimental/tool",...$,...Z})}}class s$ extends I{remove(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeRemoveInput",map:"body"}]}]);return($?.client??this.client).delete({url:"/experimental/worktree",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/worktree",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeCreateInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reset(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeResetInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree/reset",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class t$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"search"},{in:"query",key:"limit"}]}]);return($?.client??this.client).get({url:"/session",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"parentID"},{in:"body",key:"contextFrom"},{in:"body",key:"contextWatermark"},{in:"body",key:"title"},{in:"body",key:"permission"},{in:"body",key:"workspaceID"}]}]);return($?.client??this.client).post({url:"/session",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/status",...$,...Z})}delete(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}",...$,...Z})}get(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"permission"},{in:"body",key:"time"}]}]);return($?.client??this.client).patch({url:"/session/{sessionID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}children(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/children",...$,...Z})}init(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"modelID"},{in:"body",key:"providerID"},{in:"body",key:"messageID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/init",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}fork(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/fork",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}abort(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/abort",...$,...Z})}actors(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/actors",...$,...Z})}todo(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/todo",...$,...Z})}task(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/task",...$,...Z})}unshare(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/share",...$,...Z})}share(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/share",...$,...Z})}diff(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"messageID"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/diff",...$,...Z})}summarize(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"providerID"},{in:"body",key:"modelID"},{in:"body",key:"auto"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/summarize",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}revert(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"partID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/revert",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}unrevert(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/unrevert",...$,...Z})}messages(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"before"},{in:"query",key:"agent_id"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/message",...$,...Z})}prompt(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"agent"},{in:"body",key:"agentID"},{in:"body",key:"task_id"},{in:"body",key:"source"},{in:"body",key:"provenance"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/message",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}deleteMessage(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}",...$,...Z})}message(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/message/{messageID}",...$,...Z})}promptAsync(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"agent"},{in:"body",key:"agentID"},{in:"body",key:"task_id"},{in:"body",key:"source"},{in:"body",key:"provenance"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/prompt_async",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}command(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"arguments"},{in:"body",key:"command"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/command",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}predict(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/predict",...$,...Z})}shell(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/shell",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class a$ extends I{delete(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"part",map:"body"}]}]);return($?.client??this.client).patch({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class o$ extends I{respond(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"permissionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"response"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/permissions/{permissionID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reply(O,$){let Z=X([O],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return($?.client??this.client).post({url:"/permission/{requestID}/reply",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/permission",...$,...Z})}}class e$ extends I{balance(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/qredits/balance",...$,...Z})}}class $O extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"sessionID"}]}]);return($?.client??this.client).get({url:"/workflows",...$,...Z})}resume(O,$){let Z=X([O],[{args:[{in:"path",key:"runID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/workflows/{runID}/resume",...$,...Z})}}class OO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question",...$,...Z})}neverAsk(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question/never-ask",...$,...Z})}setNeverAsk(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enabled"}]}]);return($?.client??this.client).post({url:"/question/never-ask",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reply(O,$){let Z=X([O],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"answers"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reply",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reject(O,$){let Z=X([O],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reject",...$,...Z})}}class ZO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/bash-interactive",...$,...Z})}reply(O,$){let Z=X([O],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"output"},{in:"body",key:"exitCode"}]}]);return($?.client??this.client).post({url:"/bash-interactive/{id}/reply",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class XO extends I{_interactive;get interactive(){return this._interactive??=new ZO({client:this.client})}}class JO extends I{authorize(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"inputs"}]}]);return($?.client??this.client).post({url:"/provider/{providerID}/oauth/authorize",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}callback(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"code"}]}]);return($?.client??this.client).post({url:"/provider/{providerID}/oauth/callback",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class YO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider",...$,...Z})}auth(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider/auth",...$,...Z})}_oauth;get oauth(){return this._oauth??=new JO({client:this.client})}}class WO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/sync/history",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class GO extends I{start(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/sync/start",...$,...Z})}replay(O,$){let Z=X([O],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"events"}]}]);return($?.client??this.client).post({url:"/sync/replay",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_history;get history(){return this._history??=new WO({client:this.client})}}class VO extends I{text(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"pattern"}]}]);return($?.client??this.client).get({url:"/find",...$,...Z})}files(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"},{in:"query",key:"dirs"},{in:"query",key:"type"},{in:"query",key:"limit"}]}]);return($?.client??this.client).get({url:"/find/file",...$,...Z})}symbols(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"}]}]);return($?.client??this.client).get({url:"/find/symbol",...$,...Z})}}class DO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file",...$,...Z})}read(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file/content",...$,...Z})}status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/file/status",...$,...Z})}}class zO extends I{subscribe(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).sse.get({url:"/event",...$,...Z})}}class LO extends I{remove(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/mcp/{name}/auth",...$,...Z})}start(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth",...$,...Z})}callback(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"code"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/callback",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}authenticate(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/authenticate",...$,...Z})}}class IO extends I{status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/mcp",...$,...Z})}add(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"config"}]}]);return($?.client??this.client).post({url:"/mcp",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}connect(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/connect",...$,...Z})}disconnect(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/disconnect",...$,...Z})}_auth;get auth(){return this._auth??=new LO({client:this.client})}}class KO extends I{next(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/tui/control/next",...$,...Z})}response(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/control/response",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class UO extends I{appendPrompt(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return($?.client??this.client).post({url:"/tui/append-prompt",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}openHelp(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-help",...$,...Z})}openSessions(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-sessions",...$,...Z})}openThemes(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-themes",...$,...Z})}openModels(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-models",...$,...Z})}submitPrompt(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/submit-prompt",...$,...Z})}clearPrompt(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/clear-prompt",...$,...Z})}executeCommand(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/tui/execute-command",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}showToast(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"message"},{in:"body",key:"variant"},{in:"body",key:"duration"}]}]);return($?.client??this.client).post({url:"/tui/show-toast",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}publish(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/publish",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}selectSession(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/tui/select-session",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_control;get control(){return this._control??=new KO({client:this.client})}}class SO extends I{dispose(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/instance/dispose",...$,...Z})}}class jO extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/path",...$,...Z})}}class MO extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/vcs",...$,...Z})}diff(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"mode"}]}]);return($?.client??this.client).get({url:"/vcs/diff",...$,...Z})}}class QO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/command",...$,...Z})}}class TO extends I{status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/lsp",...$,...Z})}}class _O extends I{status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/formatter",...$,...Z})}}class t extends I{static __registry=new P$;constructor(O){super(O);t.__registry.set(this,O?.key)}_global;get global(){return this._global??=new b$({client:this.client})}_auth;get auth(){return this._auth??=new C$({client:this.client})}_app;get app(){return this._app??=new v$({client:this.client})}_experimental;get experimental(){return this._experimental??=new l$({client:this.client})}_project;get project(){return this._project??=new n$({client:this.client})}_pty;get pty(){return this._pty??=new p$({client:this.client})}_config;get config(){return this._config??=new i$({client:this.client})}_tool;get tool(){return this._tool??=new r$({client:this.client})}_worktree;get worktree(){return this._worktree??=new s$({client:this.client})}_session;get session(){return this._session??=new t$({client:this.client})}_part;get part(){return this._part??=new a$({client:this.client})}_permission;get permission(){return this._permission??=new o$({client:this.client})}_qredits;get qredits(){return this._qredits??=new e$({client:this.client})}_workflow;get workflow(){return this._workflow??=new $O({client:this.client})}_question;get question(){return this._question??=new OO({client:this.client})}_bash;get bash(){return this._bash??=new XO({client:this.client})}_provider;get provider(){return this._provider??=new YO({client:this.client})}_sync;get sync(){return this._sync??=new GO({client:this.client})}_find;get find(){return this._find??=new VO({client:this.client})}_file;get file(){return this._file??=new DO({client:this.client})}_event;get event(){return this._event??=new zO({client:this.client})}_mcp;get mcp(){return this._mcp??=new IO({client:this.client})}_tui;get tui(){return this._tui??=new UO({client:this.client})}_instance;get instance(){return this._instance??=new SO({client:this.client})}_path;get path(){return this._path??=new jO({client:this.client})}_vcs;get vcs(){return this._vcs??=new MO({client:this.client})}_command;get command(){return this._command??=new QO({client:this.client})}_lsp;get lsp(){return this._lsp??=new TO({client:this.client})}_formatter;get formatter(){return this._formatter??=new _O({client:this.client})}}function NO(O){if(!O?.fetch)O={...O,fetch:(Z)=>{return Z.timeout=!1,fetch(Z)}};if(O?.directory)O.headers={...O.headers,"x-qitqode-directory":encodeURIComponent(O.directory)};return O}function eO(O,$,Z){if(!O)return;if(!$)return O;if(O===$)return $;if(Z&&O===Z($))return $;return O}function $1(O,$){if(O.method!=="GET"&&O.method!=="HEAD")return O;let Z=new URL(O.url),J=!1;for(let[D,W]of[["x-qitqode-directory","directory"],["x-qitqode-workspace","workspace"]]){let G=eO(O.headers.get(D),W==="directory"?$.directory:$.workspace,W==="directory"?encodeURIComponent:void 0);if(!G)continue;if(!Z.searchParams.has(W))Z.searchParams.set(W,G);J=!0}if(!J)return O;let Y=new Request(Z,O);return Y.headers.delete("x-qitqode-directory"),Y.headers.delete("x-qitqode-workspace"),Y}function O1(O){if(O=NO(O),O?.experimental_workspaceID)O.headers={...O.headers,"x-qitqode-workspace":O.experimental_workspaceID};let $=C(O);return $.interceptors.request.use((Z)=>$1(Z,{directory:O?.directory,workspace:O?.experimental_workspaceID})),$.interceptors.response.use((Z)=>{if(Z.headers.get("content-type")==="text/html")throw Error("Request is not supported by this version of QitQode Server (Server responded with text/html)");return Z}),new t({client:$})}var W1=J1(Y1(),1);import xO from"path";var V1="QITQODE_KEY was rejected by the server (401/403). Check that the key is correct and has not expired.",Y$=`[qitqode] ${V1}`;function BO(O){if(O?.type!=="api"||typeof O.key!=="string")return;let Z=O.metadata?.method==="api-key"?"api-key":"sso";return{key:O.key,method:Z}}async function v(){if(process.env.QITQODE_KEY)return{key:process.env.QITQODE_KEY,method:"api-key"};let O=xO.join(J$.Path.data,"auth.json");try{let{readFile:$}=await import("fs/promises"),Z=await X$.withLock("auth-file",async()=>{let J=await $(O,"utf8"),Y=JSON.parse(J);return BO(Y?.forgewise)});if(Z)return Z}catch{}if(process.env.QITQODE_AUTH_CONTENT)try{let $=JSON.parse(process.env.QITQODE_AUTH_CONTENT);return BO($?.forgewise)}catch{}return}async function a(){if(process.env.QITQODE_KEY)return;let O=xO.join(J$.Path.data,"auth.json"),{readFile:$,writeFile:Z,chmod:J,rename:Y}=await import("fs/promises");await X$.withLock("auth-file",async()=>{let D=await $(O,"utf8"),W=JSON.parse(D);if(!("forgewise"in W))return;delete W.forgewise;let G=O+".tmp";await Z(G,JSON.stringify(W,null,2),"utf8"),await J(G,384),await Y(G,O)})}function y(O){return O.method==="api-key"?{"x-api-key":O.key}:{authorization:`Bearer ${O.key}`}}var Q$={};D1(Q$,{toolDescriptionEffect:()=>T1,resolveWorkflowSummaries:()=>j1,resolveWorkflowSpec:()=>M1,resolveToolManifest:()=>fO,resolveToolDescription:()=>bO,resolveTierRatings:()=>F1,resolveSubmitBatch:()=>b1,resolveRetrieveBatch:()=>C1,resolvePrompt:()=>kO,resolveListTiers:()=>w1,resolveGetHistory:()=>H1,resolveGenerateInlineComments:()=>P1,resolveGenerateDocumentation:()=>k1,resolveForgewiseConfig:()=>x1,resolveFetchQreditsBalance:()=>A1,resolveCompressTrajectorySafe:()=>q1,resolveChatCompletion:()=>f1,resolveChatBoolean:()=>g1,resolveBraveSearch:()=>E1,resolveBashArity:()=>Q1,resolveAnalyzeCodeForIssues:()=>h1,resolveAgentPrompt:()=>U1,remoteStats:()=>x,isBackendBillingError:()=>z1,clearRemoteCache:()=>K1,beginIdempotentAttempt:()=>hO,BackendRemote:()=>Q$,BackendRateLimitError:()=>m,BackendInsufficientBalanceError:()=>d,BackendAuthRejectedError:()=>H,BackendAccountNotLinkedError:()=>U$});import{createHash as AO,randomUUID as wO}from"crypto";var N=FO.create({service:"backend.remote"}),I$=30000,K$=5000,P=new Map,x={failures:0,authRejections:0,missingPrompts:0,missingToolDescriptions:0},W$=new Set,G$=new Set;class H extends Error{name="BackendAuthRejectedError";constructor(O){super(u.copy().invalidCredentials(O))}}class d extends Error{name="BackendInsufficientBalanceError";status=402;code;constructor(O,$){super(u.copy().insufficientBalance(O));this.code=$}}class m extends Error{name="BackendRateLimitError";status=429;retryAfterMs;constructor(O,$){let Z=O!==void 0?` Retry in about ${Math.max(1,Math.round(O/1000))}s.`:"";super(u.copy().rateLimit+Z+($?` (${$})`:""));this.retryAfterMs=O}}class U$ extends Error{name="BackendAccountNotLinkedError";status=409;constructor(O){super(u.copy().accountNotLinked(O))}}function z1(O){return O instanceof d||O instanceof m}var L1=600000,k=new Map;function I1(O,$){try{return AO("sha256").update(`${O}\x00${JSON.stringify($)}`).digest("hex").slice(0,16)}catch{return"unscoped"}}function hO(O,$,Z){let J=Date.now(),Y;try{Y=AO("sha256").update(`${O}\x00${$}\x00${JSON.stringify(Z)??""}`).digest("hex")}catch{return{key:`${$}-${wO()}`,settle:()=>{}}}let D=()=>k.delete(Y),W=k.get(Y);if(W&&W.expires>J)return{key:W.key,settle:D};if(k.size>256){for(let[V,K]of k)if(K.expires<=J)k.delete(V)}let G=`${$}-${Y.slice(0,16)}-${wO()}`;return k.set(Y,{key:G,expires:J+L1}),{key:G,settle:D}}function K1(){P.clear(),z$.clear(),V$.clear(),W$.clear(),G$.clear(),k.clear()}async function g(O,$){let Z=R.QITQODE_BACKEND_URL,J=Date.now(),Y=`${Z}::${O}`,D=P.get(Y);if(D&&D.expires>J)return D.value;try{let W=await v(),G=W?y(W):void 0,K=await $(HO({baseUrl:Z,headers:G,fetch:(z,L)=>fetch(z,{...L,signal:L?.signal??AbortSignal.timeout(K$)})}));return P.set(Y,{value:K,expires:J+I$}),K}catch(W){if(W instanceof EO){if(x.authRejections++,await a().catch(()=>{}),N.warn("backend rejected the credential; prompting re-auth",{cacheKey:O,baseUrl:Z,status:W.status}),process.env.QITQODE_KEY)N.error(Y$),console.error(Y$);throw new H(`HTTP ${W.status}`)}throw x.failures++,N.warn("backend request failed; surfacing error",{cacheKey:O,baseUrl:Z,error:W instanceof Error?W.message:String(W)}),W}}async function kO(O){if(O.indexOf("/")<=0)return;return g(`prompt:${O}`,($)=>$.prompt(O).then((Z)=>Z??void 0))}async function U1(O){let $=`agent/${O}`,Z=await kO($);if(Z===void 0||Z===""){if(!W$.has(O))W$.add(O),x.missingPrompts++,N.warn("backend served no content for agent prompt; running with an empty prompt",{prompt:$,baseUrl:R.QITQODE_BACKEND_URL,missingPrompts:x.missingPrompts})}return Z}var V$=new Map;function D$(O){let $=V$.get(O);if(!$)$={unsupported:!1},V$.set(O,$);return $}async function S1(){let O=D$(R.QITQODE_BACKEND_URL);if(O.inFlight)return O.inFlight;let $=g("workflow.catalog",(Z)=>Z.workflowSpecs().then((J)=>J??void 0)).then((Z)=>{let J=new Map;for(let Y of Z??[])if(Y&&typeof Y.name==="string"&&typeof Y.script==="string")J.set(Y.name,Y);return J});O.inFlight=$;try{return await $}finally{if(O.inFlight===$)O.inFlight=void 0}}async function PO(O,$){let Z=R.QITQODE_BACKEND_URL;if(!D$(Z).unsupported)try{return O(await S1())}catch(J){if(!gO(J))throw J;D$(Z).unsupported=!0,N.warn("backend has no workflowSpecs route; falling back to per-name workflow lookups",{baseUrl:Z})}return $()}async function j1(){return PO((O)=>[...O.values()].map(({script:$,...Z})=>Z),()=>g("workflow.list",(O)=>O.workflowSummaries()))}async function M1(O){return PO(($)=>$.get(O),()=>g(`workflow.get:${O}`,($)=>$.workflowSpec(O).then((Z)=>Z??void 0)))}async function Q1(){return g("permission.arity",(O)=>O.bashArity())}var z$=new Map;function L$(O){let $=z$.get(O);if(!$)$={unsupported:!1},z$.set(O,$);return $}function gO(O){return O instanceof qO&&(O.status===404||O.status===501)}async function fO(){let O=L$(R.QITQODE_BACKEND_URL);if(O.inFlight)return O.inFlight;let $=g("tool.manifest",(Z)=>Z.toolManifest().then((J)=>J??void 0)).then((Z)=>{let J=new Map;for(let Y of Z??[])if(Y&&typeof Y.id==="string"&&typeof Y.description==="string")J.set(Y.id,Y.description);return J});O.inFlight=$;try{return await $}finally{if(O.inFlight===$)O.inFlight=void 0}}async function bO(O){let $=R.QITQODE_BACKEND_URL,Z;if(!L$($).unsupported)try{Z=(await fO()).get(O)}catch(J){if(!gO(J))throw J;L$($).unsupported=!0,N.warn("backend has no toolManifest route; falling back to one request per tool description",{baseUrl:$})}if(Z===void 0||Z==="")Z=await g(`tool.description:${O}`,(J)=>J.toolDescription(O).then((Y)=>Y??void 0));if(Z===void 0||Z===""){if(!G$.has(O))G$.add(O),x.missingToolDescriptions++,N.warn("backend served no content for tool description; running with an empty description",{tool:O,baseUrl:R.QITQODE_BACKEND_URL,missingToolDescriptions:x.missingToolDescriptions})}return Z}function T1(O){return c.promise(()=>bO(O)).pipe(c.catchDefect(($)=>$ instanceof H?c.succeed(void 0):c.die($)))}function _1(O){if(!O)return{};try{let $=JSON.parse(O);if($&&typeof $==="object")return{code:typeof $.error==="string"?$.error:void 0,detail:typeof $.message==="string"?$.message:void 0}}catch{}return{detail:O.slice(0,300)}}function N1(O){let $=O.headers?.get?.("retry-after-ms");if($){let J=Number.parseFloat($);if(!Number.isNaN(J))return J}let Z=O.headers?.get?.("retry-after");if(Z){let J=Number.parseFloat(Z);if(!Number.isNaN(J))return Math.ceil(J*1000);let Y=Date.parse(Z)-Date.now();if(!Number.isNaN(Y)&&Y>0)return Math.ceil(Y)}return}async function S$(O,$){let Z=await O.text().catch(()=>""),{code:J,detail:Y}=_1(Z);if(O.status===402)return new d(Y,J);if(O.status===409)return new U$(Y);if(O.status===429)return new m(N1(O),Y);let D=Y?`: ${Y}`:J?`: ${J}`:"";return Error(`${$} failed: ${O.status}${D}`)}function B1(O){if(O===null||typeof O!=="object")return O;if(O.data!==void 0)return O.data;let $={};for(let[Z,J]of Object.entries(O)){if(Z==="success"||Z==="data"||Z==="error"||Z==="message")continue;$[Z]=J}return Object.keys($).length>0?$:void 0}function j$(O,$){let{error:Z,message:J}=O;if(Z==="insufficient_balance")return new d(J,Z);if(Z==="rate_limited"||Z==="too_many_requests")return new m(void 0,J);return Error(`${$} returned failure: ${Z??"unknown error"}${J?` \u2014 ${J}`:""}`)}async function q(O,$,Z,J={}){let Y=R.QITQODE_BACKEND_URL,D=`${Y}::post:${O}`;if(!J.noCache){let W=Date.now(),G=P.get(D);if(G&&G.expires>W)return G.value}try{let W=await v(),G=W?y(W):{},V=J.billable?hO(I1(Y,G),$,Z):void 0,K=V?{"x-idempotency-key":V.key}:{},z=await fetch(`${Y}/${$}`,{method:"POST",headers:{"Content-Type":"application/json",...G,...K},body:JSON.stringify(Z),signal:J.signal});if(z.status===401||z.status===403){V?.settle();let U=await z.text().catch(()=>"");if(U.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${U}`);throw x.authRejections++,await a().catch(()=>{}),N.warn("backend rejected the credential; prompting re-auth",{fnName:$,baseUrl:Y,status:z.status}),new H(`HTTP ${z.status}`)}if(!z.ok){let U=await S$(z,`Backend POST /${$}`);if(z.status<500)V?.settle();throw U}let L=await z.json(),M=L!==null&&typeof L==="object"&&typeof L.error==="string";if((!J.acceptTopLevel||typeof L?.success==="boolean"||M)&&!L.success)throw V?.settle(),j$(L,`Backend POST /${$}`);V?.settle();let S=J.acceptTopLevel?B1(L):L.data;if(!J.noCache)P.set(D,{value:S,expires:Date.now()+I$});return S}catch(W){if(W instanceof H)throw W;throw x.failures++,N.warn("backend POST request failed; surfacing error",{fnName:$,baseUrl:Y,error:W instanceof Error?W.message:String(W)}),W}}async function M$(O,$,Z={}){let J=R.QITQODE_BACKEND_URL;try{let Y=await v(),D=Y?y(Y):{},W=new URLSearchParams(Object.entries($).map(([z,L])=>[z,String(L)])).toString(),G=W?`${J}/${O}?${W}`:`${J}/${O}`,V=await fetch(G,{method:"GET",headers:{...D},signal:Z.signal});if(V.status===401||V.status===403){let z=await V.text().catch(()=>"");if(z.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${z}`);throw x.authRejections++,await a().catch(()=>{}),N.warn("backend rejected the credential; prompting re-auth",{fnName:O,baseUrl:J,status:V.status}),new H(`HTTP ${V.status}`)}if(!V.ok)throw await S$(V,`Backend GET /${O}`);let K=await V.json();if(!K.success)throw j$(K,`Backend GET /${O}`);return K.data}catch(Y){if(Y instanceof H)throw Y;throw x.failures++,N.warn("backend GET request failed; surfacing error",{fnName:O,baseUrl:J,error:Y instanceof Error?Y.message:String(Y)}),Y}}async function R1(O,$,Z){let J=R.QITQODE_BACKEND_URL,Y=`${J}::public:${O}`,D=Date.now(),W=P.get(Y);if(W&&W.expires>D)return W.value;try{let G=await fetch(`${J}/${$}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z),signal:AbortSignal.timeout(K$)});if(!G.ok)throw await S$(G,`Backend public POST /${$}`);let V=await G.json();if(!V.success)throw j$(V,`Backend public POST /${$}`);let K=V.data;return P.set(Y,{value:K,expires:D+I$}),K}catch(G){throw x.failures++,N.warn("backend public request failed; surfacing error",{fnName:$,baseUrl:J,error:G instanceof Error?G.message:String(G)}),G}}async function x1(){try{return await R1("forgewise.config","forgewiseConfig",{})}catch(O){let $=await v().catch(()=>null);if(!$)throw O;let Z=R.QITQODE_BACKEND_URL,J=await fetch(`${Z}/forgewiseConfig`,{method:"POST",headers:{"Content-Type":"application/json",...y($)},body:JSON.stringify({}),signal:AbortSignal.timeout(K$)}).catch(()=>null);if(!J?.ok)throw O;let Y=await J.json().catch(()=>null);if(!Y?.success)throw O;return Y.data}}async function w1(){return M$("listTiers",{}).then((O)=>{if(!Array.isArray(O))return[];return O.flatMap(($)=>{if(typeof $==="string")return[{id:$}];if(!$||typeof $!=="object"||Array.isArray($))return[];let Z=$;return typeof Z.id==="string"?[{id:Z.id,...typeof Z.label==="string"?{label:Z.label}:{},...typeof Z.providerID==="string"?{providerID:Z.providerID}:{},...typeof Z.modelID==="string"?{modelID:Z.modelID}:{}}]:[]})}).catch((O)=>{return N.warn("listTiers fetch failed; using hardcoded tier fallback",{error:O instanceof Error?O.message:String(O)}),[]})}async function F1(){return M$("TIER_RATINGS",{}).catch((O)=>{N.warn("TIER_RATINGS fetch failed; no tier ratings will be shown",{error:O instanceof Error?O.message:String(O)});return})}async function q1(O){return q("compaction.trajectory","compressTrajectorySafe",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(120000)})}async function E1(O,$){let Z=$?.timeoutMs??30000,J={query:O};if($?.numResults)J.options={count:$.numResults};return q("brave.search","braveSearch",J,{noCache:!0,signal:AbortSignal.timeout(Z)})}async function H1(O){return q("qredits.history","getHistory",O,{noCache:!0})}async function A1(O){return q("forgewise.qredits.balance","fetchQreditsBalance",O,{noCache:!0,acceptTopLevel:!0})}async function h1(O){return q(`code.analyze:${O.filePath}`,"analyzeCodeForIssues",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function k1(O){return q(`code.docs:${O.filePath}:${O.functionName??""}`,"generateDocumentation",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function P1(O){return q(`code.comments:${O.filePath}`,"generateInlineComments",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function g1(O,$,Z){return q("chat.boolean","chatBoolean",{sample:O,test:$},{noCache:!0,billable:!0,signal:AbortSignal.timeout(Z?.timeoutMs??30000)})}async function f1(O,$){let Z={message:O},J={};if($?.provider!==void 0)J.provider=$.provider;if($?.temperature!==void 0)J.temperature=$.temperature;if($?.maxTokens!==void 0)J.maxTokens=$.maxTokens;if(Object.keys(J).length>0)Z.options=J;return q("chat.completion","chatCompletion",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout($?.timeoutMs??30000)})}async function b1(O){return q("batch.submit","submitBatch",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function C1(O){return M$("retrieveBatch",{batchId:O.batchId},{signal:AbortSignal.timeout(30000)})}
|
|
8
|
-
export{NO as Lp,O1 as Mp,V1 as Np,Y$ as Op,v as Pp,a as Qp,H as Rp,d as Sp,m as Tp,U$ as Up,x1 as Vp,w1 as Wp,F1 as Xp,H1 as Yp,A1 as Zp,Q$ as _p};
|
package/bundle/chunk-8ktgy41r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ae as a,be as b,ce as c,de as d,ee as e,fe as f,ge as g,he as h,ie as i,je as j,ke as k}from"./chunk-bnss5dkk.js";import"./chunk-41v0x1jk.js";import"./chunk-a3a1trap.js";import"./chunk-3k2b05fv.js";export{c as providerConfigFromInit,d as httpRequest,j as getInstanceMetadataEndpoint,k as fromInstanceMetadata,h as fromContainerMetadata,i as Endpoint,f as ENV_CMDS_RELATIVE_URI,e as ENV_CMDS_FULL_URI,g as ENV_CMDS_AUTH_TOKEN,a as DEFAULT_TIMEOUT,b as DEFAULT_MAX_RETRIES};
|
package/bundle/chunk-8q73cjyj.js
DELETED
package/bundle/chunk-8y623qdx.js
DELETED
package/bundle/chunk-921vn745.js
DELETED
package/bundle/chunk-9y97bzht.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{a as ZB,b as $B}from"./chunk-5xq3h51b.js";import"./chunk-d80hk5x9.js";import"./chunk-1pg6pv0m.js";import{B as XB}from"./chunk-gsez13bg.js";import{C as BB,E as JB}from"./chunk-c8k32724.js";import"./chunk-zm5dfk2b.js";import{I as VB}from"./chunk-t9mz17gb.js";import{O as YB}from"./chunk-6p7yg5sr.js";import"./chunk-x66ycpfs.js";import"./chunk-03xppy47.js";import{Rd as e}from"./chunk-yajd975f.js";import{Of as n,Pf as D,Qf as w,Rf as i}from"./chunk-9msnx26q.js";import{Vf as H}from"./chunk-p9cnzxb8.js";import{Cg as s}from"./chunk-ya8g02hv.js";import{gh as U}from"./chunk-28cm7m3t.js";import"./chunk-w9nzsd3w.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import{Xj as R,ok as o,rl as r}from"./chunk-wmaz57f6.js";import"./chunk-hg0etbkx.js";import{km as O}from"./chunk-za63b5mc.js";import"./chunk-j8q252w3.js";import"./chunk-nj4d554m.js";import"./chunk-1hmq2fpt.js";import"./chunk-y370dqf3.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import{Mp as a,Pp as t}from"./chunk-8eje5baf.js";import"./chunk-xqdrr7xg.js";import"./chunk-6b196wjz.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-wwgd4rzx.js";import"./chunk-qc3ce3vc.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import{qt as v}from"./chunk-vkqzmzpw.js";import{Ut as f,Vt as c,Wt as u,Yt as l,gu as g,ru as x}from"./chunk-x9s90xd1.js";import{Au as N,Ou as p,Qu as _}from"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import{OI as S}from"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import{cQ as I}from"./chunk-3k2b05fv.js";import E from"path";import{fileURLToPath as HB}from"url";import{writeHeapSnapshot as KB}from"v8";import MB,{EOL as M}from"os";var zB={free:"free",default:"default",fast:"fast",economy:"economical",power:"power",orchestrated:"orchestrated"},T="build";function h(B){if(B.agent)return B.agent;if(B.headless||B.fullauto)return T;return}function jB(B){for(let[V,X]of Object.entries(zB))if(B[V]){let Z=v[X];if(Z)return`${Z.providerID}/${Z.modelID}`}return}function GB(B){return async(X,Z)=>{let Y=new Request(X,Z),W=Y.body?await Y.text():void 0,$=await B.call("fetch",{url:Y.url,method:Y.method,headers:Object.fromEntries(Y.headers.entries()),body:W});return new Response($.body,{status:$.status,headers:$.headers})}}function QB(B){return{subscribe:async(V)=>{return B.on("global.event",(X)=>{V(X)})}}}async function bB(){if(typeof globalThis.QITQODE_WORKER_PATH<"u")return globalThis.QITQODE_WORKER_PATH;let B=new URL("./cli/cmd/tui/worker.js",import.meta.url);if(await p(HB(B)))return B;return new URL("./worker.ts",import.meta.url)}async function PB(B){let V=process.stdin.isTTY?void 0:await Bun.stdin.text();if(!B)return V;if(!V)return B;return V+`
|
|
3
|
-
`+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let W=await V.event.subscribe(),$=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),A=W.stream[Symbol.asyncIterator](),P=$.completion.then(()=>"DONE");(async()=>{try{while(!0){let z=await Promise.race([A.next(),P]);if(z==="DONE")break;let y=z;if(y.done)break;let j=y.value;$.onEvent(j);let K=j.properties;if(j.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let C=String(J.text??"").trim();if(C)process.stdout.write(C+M)}}if(j.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(j.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,C=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(C)}}}finally{$.stop(),await A.return?.(void 0).catch(()=>{})}})().catch((z)=>{console.error(z),process.exit(1)});let q=B.model?r.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:q,parts:[{type:"text",text:B.prompt}]}),$.markStarted(),await $.completion}var nB=e({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>n(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(zB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=JB();try{BB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=jB(B)??B.model,Y=_(process.env.PWD??process.cwd()),W=B.project?_(E.isAbsolute(B.project)?B.project:E.join(Y,B.project)):_(process.cwd()),$=O(W);if($){if(B.project){H.error("Cannot start in "+W+": "+$),process.exitCode=1;return}let J=_(MB.homedir());if(O(J)){H.error("Cannot start in "+W+": "+$),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:W,home:J}),W=J}let A=await bB();try{process.chdir(W)}catch{H.error("Failed to change directory to "+W);return}let P=_(process.cwd()),k=l({[c]:"worker",[f]:u()}),q=new Worker(A,{env:k});q.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let z=g(q),y=()=>{z.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:N(J)})})};process.on("SIGUSR2",y);let j=!1,K=async()=>{if(j)return;j=!0,process.off("SIGUSR2",y),await o(z.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:N(J)})}),q.terminate()};try{let J=import("./chunk-425mq6k8.js"),C=import("./chunk-qbx70v64.js").then(({TuiConfig:F})=>F.get()),L=await PB(B.prompt),WB=await C;if(B.headless&&D(w(B))){H.error("--headless cannot be combined with network-listener flags (--port, --hostname, --mdns)"),process.exitCode=1;return}let m=w(B),b=D(m)?{url:(await z.call("server",m)).url,fetch:void 0,events:void 0}:{url:"http://qitqode.internal",fetch:GB(z),events:QB(z)};if(setTimeout(()=>{z.call("checkUpgrade",{directory:P}).catch(()=>{})},1000).unref?.(),B.headless){if(!L){H.error("--headless requires a prompt: pass --prompt or pipe input via stdin"),process.exitCode=1;return}if(B.sso){try{let G=await s({tryOpen:!1,onCode:(Q)=>{if(process.stdout.write(M),process.stdout.write(" To sign in, open: "+Q.verificationUri+M),process.stdout.write(" and enter code: "+Q.userCode+M),Q.verificationUriComplete)process.stdout.write(M+" Or open this link directly:"+M+" "+Q.verificationUriComplete+M);process.stdout.write(M+" Waiting for approval... (ctrl+c to cancel)"+M)}});await U.runPromise(S.gen(function*(){yield*(yield*R.Service).set("forgewise",VB(G,{rotateRefreshToken:!0}))})),process.stdout.write(" Signed in as "+(G.name||G.email)+M)}catch(G){H.error("SSO sign-in failed: "+N(G)),process.exitCode=1;return}await d({url:b.url,fetch:b.fetch,prompt:L,model:Z,agent:h(B)??T,directory:P});return}let F=ZB(typeof B["api-key"]==="string"?String(B["api-key"]):"");if(F)await U.runPromise($B(F));else if(!await U.runPromise(S.gen(function*(){if(yield*S.promise(()=>t()))return!0;return!!(yield*(yield*R.Service).get("forgewise"))}))){H.error(`Not signed in. Use one of:
|
|
4
|
-
qode auth login (browser / device-code flow)
|
|
5
|
-
qode auth login --api-key (paste a Qortex API key)
|
|
6
|
-
--api-key <key> (inline for this run)
|
|
7
|
-
$QLEX_API_KEY (environment variable)
|
|
8
|
-
$QITQODE_KEY (environment variable)`),process.exitCode=1;return}await d({url:b.url,fetch:b.fetch,prompt:L,model:Z,agent:h(B)??T,directory:P})}else{let{tui:F}=await J;await F({url:b.url,async onSnapshot(){let G=KB("tui.heapsnapshot"),Q=await z.call("snapshot",void 0);return[G,Q]},config:WB,directory:P,fetch:b.fetch,events:b.events,args:{continue:B.continue,sessionID:B.session,agent:h(B),model:Z,prompt:L,fork:B.fork,neverAsk:B["never-ask"]||B.fullauto||!1,fullauto:B.fullauto||!1,themeMode:B.dark?"dark":B.light?"light":void 0,monochrome:B.monochrome||!1,headless:!1}})}}finally{await K()}}finally{V?.()}process.exit(0)}});export{h as resolveStartupAgent,nB as TuiThreadCommand};
|