@qitqode/qitqode-android-arm64 0.1.35 → 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-t3eymzg1.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-aa8hymcv.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-hv6eccx1.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-w1n4rf6n.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-er38zew1.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-zddknkw7.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-8vg4fmg2.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-9ayxg9mq.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-exmw8jfa.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-tbgczapt.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-gckgaqqr.js → chunk-mqtqcc10.js} +2 -2
- package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
- package/bundle/{chunk-6a77w77q.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-54wh8b12.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-6ged58yw.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-txbwmwxj.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-axdzm75h.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-t2vm08v6.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-yprmd5b7.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-a1hzeejj.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-5e4fxy99.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-sjw56r2n.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-0442cmw2.js +0 -2
- package/bundle/chunk-085pvqr4.js +0 -2
- package/bundle/chunk-0x5jn813.js +0 -2
- package/bundle/chunk-11g2rpv8.js +0 -3
- package/bundle/chunk-28t9akfn.js +0 -2
- package/bundle/chunk-2h1fcqvf.js +0 -2
- package/bundle/chunk-2kens6wh.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-31g86yn6.js +0 -2
- package/bundle/chunk-397be2x0.js +0 -2
- package/bundle/chunk-3c78nkgn.js +0 -2
- package/bundle/chunk-3d91q2qd.js +0 -2
- package/bundle/chunk-43yv7tz1.js +0 -2
- package/bundle/chunk-496ajawz.js +0 -2
- package/bundle/chunk-499gp5g5.js +0 -2
- package/bundle/chunk-4hzm14xt.js +0 -3
- package/bundle/chunk-4xw14sed.js +0 -2
- package/bundle/chunk-536naqqv.js +0 -2
- package/bundle/chunk-57nvmhjq.js +0 -2
- package/bundle/chunk-5he3d7cy.js +0 -2
- package/bundle/chunk-5qr286w8.js +0 -2
- package/bundle/chunk-606vpgc4.js +0 -4
- package/bundle/chunk-6a1skxcj.js +0 -3
- package/bundle/chunk-6cj7cn5x.js +0 -2
- package/bundle/chunk-6hybp2mt.js +0 -2
- 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-891yevv2.js +0 -2
- package/bundle/chunk-8c1ypgw5.js +0 -3
- package/bundle/chunk-8ktgy41r.js +0 -2
- package/bundle/chunk-8q73cjyj.js +0 -2
- package/bundle/chunk-8rt63jbm.js +0 -2
- package/bundle/chunk-8y623qdx.js +0 -2
- package/bundle/chunk-921vn745.js +0 -2
- package/bundle/chunk-945ebhte.js +0 -2
- package/bundle/chunk-9548cc0c.js +0 -2
- package/bundle/chunk-9yrypq1r.js +0 -14
- package/bundle/chunk-a0rp7gh4.js +0 -77
- package/bundle/chunk-a48t0g95.js +0 -3
- package/bundle/chunk-a949at1c.js +0 -3
- package/bundle/chunk-akk84fnc.js +0 -2
- package/bundle/chunk-aw7j7brm.js +0 -2
- package/bundle/chunk-b6cybdj3.js +0 -2
- package/bundle/chunk-c5fa8cb1.js +0 -2
- package/bundle/chunk-ca4r31we.js +0 -2
- package/bundle/chunk-ckbwdrm3.js +0 -2
- package/bundle/chunk-cqj21rfj.js +0 -3
- package/bundle/chunk-cz3h5n1v.js +0 -3
- package/bundle/chunk-dhc6e1t7.js +0 -2
- package/bundle/chunk-dk6rbqvp.js +0 -2
- package/bundle/chunk-dk975etf.js +0 -3
- package/bundle/chunk-dwajajaq.js +0 -2
- package/bundle/chunk-dxcrggvq.js +0 -2
- package/bundle/chunk-dyt3n3fe.js +0 -2
- package/bundle/chunk-e74efvj2.js +0 -800
- package/bundle/chunk-e7ah0e61.js +0 -2
- package/bundle/chunk-e7v9trve.js +0 -11
- package/bundle/chunk-e8ws454m.js +0 -2
- package/bundle/chunk-efndtzby.js +0 -2
- package/bundle/chunk-eq2pepce.js +0 -2
- package/bundle/chunk-eva3nqqb.js +0 -14
- package/bundle/chunk-f3bnn9rf.js +0 -8
- package/bundle/chunk-f693s9vn.js +0 -2
- package/bundle/chunk-ftepqwyq.js +0 -2
- package/bundle/chunk-g18ax6yp.js +0 -2
- package/bundle/chunk-gadyp6mb.js +0 -2
- package/bundle/chunk-ge8315te.js +0 -5
- package/bundle/chunk-gk28ffhg.js +0 -2
- package/bundle/chunk-gpfc4z4v.js +0 -2
- package/bundle/chunk-gqvg02zp.js +0 -2
- package/bundle/chunk-gsyt2sv7.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-hw5qyht3.js +0 -3
- package/bundle/chunk-hwf58w1k.js +0 -2
- package/bundle/chunk-jyczz3yh.js +0 -8
- package/bundle/chunk-k8k8z6b7.js +0 -3
- package/bundle/chunk-kk3ve911.js +0 -2
- package/bundle/chunk-kv72hxkp.js +0 -3
- package/bundle/chunk-m4j7jyrd.js +0 -3
- package/bundle/chunk-mf3sm0pk.js +0 -2
- package/bundle/chunk-mkng9ykt.js +0 -2
- package/bundle/chunk-mxvypy3s.js +0 -2
- package/bundle/chunk-n5ypgxrn.js +0 -28
- package/bundle/chunk-n9xw9kqc.js +0 -2
- package/bundle/chunk-nc4wbc89.js +0 -2
- package/bundle/chunk-ngk67rt3.js +0 -3
- package/bundle/chunk-nj2bbtmx.js +0 -2
- package/bundle/chunk-nr1g57b2.js +0 -2
- package/bundle/chunk-p0ahbpxv.js +0 -2
- package/bundle/chunk-p7y8z5rd.js +0 -2
- package/bundle/chunk-pt26gerr.js +0 -2
- package/bundle/chunk-qkk1as5n.js +0 -2
- package/bundle/chunk-qsm9xw87.js +0 -2
- package/bundle/chunk-qw980y8h.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-rcn0dhbj.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-s5nde2kd.js +0 -5
- package/bundle/chunk-scy39p6q.js +0 -2
- package/bundle/chunk-srpe3v8e.js +0 -9
- package/bundle/chunk-st5jaszz.js +0 -3
- package/bundle/chunk-t5qamf96.js +0 -2
- package/bundle/chunk-t9mz17gb.js +0 -3
- package/bundle/chunk-tns5x4w0.js +0 -3
- package/bundle/chunk-ttevj0pj.js +0 -2
- package/bundle/chunk-v7c54cyj.js +0 -2
- package/bundle/chunk-vgefaens.js +0 -2
- package/bundle/chunk-vv59b4re.js +0 -2
- package/bundle/chunk-vwqy7n3g.js +0 -2
- package/bundle/chunk-vysa9hp4.js +0 -7
- package/bundle/chunk-wn076jwj.js +0 -2
- package/bundle/chunk-x0m1qye9.js +0 -2
- package/bundle/chunk-xvntsbb1.js +0 -3
- package/bundle/chunk-y70aachh.js +0 -2
- package/bundle/chunk-yqk58hf6.js +0 -3
- package/bundle/chunk-ysgxt83y.js +0 -2
- package/bundle/chunk-ze9e6nt3.js +0 -3
- package/bundle/chunk-znzan00b.js +0 -3
- package/bundle/chunk-zrp55k47.js +0 -2
- package/bundle/chunk-zwdnh860.js +0 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{At as nZ}from"./chunk-cx7p4ezk.js";import{Qt as X$}from"./chunk-xqwvx3qq.js";import{Bu as R,Ku as k}from"./chunk-j21dnncc.js";import{Xu as h,_u as YZ}from"./chunk-vc4e6xc4.js";import{UI as Z$}from"./chunk-ydc6ypjt.js";import{gQ as pZ,iQ as XZ,kQ as GZ}from"./chunk-4sazy0nq.js";function X1({onRequest:Z,onSseError:$,onSseEvent:X,responseTransformer:J,responseValidator:G,sseDefaultRetryDelay:z,sseMaxRetryAttempts:W,sseMaxRetryDelay:V,sseSleepFn:O,url:K,...L}){let Q,D=O??((j)=>new Promise((N)=>setTimeout(N,j)));return{stream:async function*(){let j=z??3000,N=0,I=L.signal??new AbortController().signal;while(!0){if(I.aborted)break;N++;let g=L.headers instanceof Headers?L.headers:new Headers(L.headers);if(Q!==void 0)g.set("Last-Event-ID",Q);try{let A={redirect:"follow",...L,body:L.serializedBody,headers:g,signal:I},C=new Request(K,A);if(Z)C=await Z(K,A);let x=await(L.fetch??globalThis.fetch)(C);if(!x.ok)throw Error(`SSE failed: ${x.status} ${x.statusText}`);if(!x.body)throw Error("No body in SSE response");let q=x.body.pipeThrough(new TextDecoderStream).getReader(),S="",o$=()=>{try{q.cancel()}catch{}};I.addEventListener("abort",o$);try{while(!0){let{done:_Z,value:TZ}=await q.read();if(_Z)break;S+=TZ,S=S.replace(/\r\n?/g,`
|
|
3
|
+
`);let t$=S.split(`
|
|
4
|
+
|
|
5
|
+
`);S=t$.pop()??"";for(let qZ of t$){let wZ=qZ.split(`
|
|
6
|
+
`),Y$=[],e$;for(let w of wZ)if(w.startsWith("data:"))Y$.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))e$=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))Q=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let Z1=Number.parseInt(w.replace(/^retry:\s*/,""),10);if(!Number.isNaN(Z1))j=Z1}let b,$1=!1;if(Y$.length){let w=Y$.join(`
|
|
7
|
+
`);try{b=JSON.parse(w),$1=!0}catch{b=w}}if($1){if(G)await G(b);if(J)b=await J(b)}if(X?.({data:b,event:e$,id:Q,retry:j}),Y$.length)yield b}}}finally{I.removeEventListener("abort",o$),q.releaseLock()}break}catch(A){if($?.(A),W!==void 0&&N>=W)break;let C=Math.min(j*2**(N-1),V??30000);await D(C)}}}()}}var HZ=(Z)=>{switch(Z){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},FZ=(Z)=>{switch(Z){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},EZ=(Z)=>{switch(Z){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},W$=({allowReserved:Z,explode:$,name:X,style:J,value:G})=>{if(!$){let V=(Z?G:G.map((O)=>encodeURIComponent(O))).join(FZ(J));switch(J){case"label":return`.${V}`;case"matrix":return`;${X}=${V}`;case"simple":return V;default:return`${X}=${V}`}}let z=HZ(J),W=G.map((V)=>{if(J==="label"||J==="simple")return Z?V:encodeURIComponent(V);return c({allowReserved:Z,name:X,value:V})}).join(z);return J==="label"||J==="matrix"?z+W:W},c=({allowReserved:Z,name:$,value:X})=>{if(X===void 0||X===null)return"";if(typeof X==="object")throw Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${$}=${Z?X:encodeURIComponent(X)}`},V$=({allowReserved:Z,explode:$,name:X,style:J,value:G,valueOnly:z})=>{if(G instanceof Date)return z?G.toISOString():`${X}=${G.toISOString()}`;if(J!=="deepObject"&&!$){let O=[];Object.entries(G).forEach(([L,Q])=>{O=[...O,L,Z?Q:encodeURIComponent(Q)]});let K=O.join(",");switch(J){case"form":return`${X}=${K}`;case"label":return`.${K}`;case"matrix":return`;${X}=${K}`;default:return K}}let W=EZ(J),V=Object.entries(G).map(([O,K])=>c({allowReserved:Z,name:J==="deepObject"?`${X}[${O}]`:O,value:K})).join(W);return J==="label"||J==="matrix"?W+V:V};var AZ=/\{[^{}]+\}/g,PZ=({path:Z,url:$})=>{let X=$,J=$.match(AZ);if(J)for(let G of J){let z=!1,W=G.substring(1,G.length-1),V="simple";if(W.endsWith("*"))z=!0,W=W.substring(0,W.length-1);if(W.startsWith("."))W=W.substring(1),V="label";else if(W.startsWith(";"))W=W.substring(1),V="matrix";let O=Z[W];if(O===void 0||O===null)continue;if(Array.isArray(O)){X=X.replace(G,W$({explode:z,name:W,style:V,value:O}));continue}if(typeof O==="object"){X=X.replace(G,V$({explode:z,name:W,style:V,value:O,valueOnly:!0}));continue}if(V==="matrix"){X=X.replace(G,`;${c({name:W,value:O})}`);continue}let K=encodeURIComponent(V==="label"?`.${O}`:O);X=X.replace(G,K)}return X},J1=({baseUrl:Z,path:$,query:X,querySerializer:J,url:G})=>{let z=G.startsWith("/")?G:`/${G}`,W=(Z??"")+z;if($)W=PZ({path:$,url:W});let V=X?J(X):"";if(V.startsWith("?"))V=V.substring(1);if(V)W+=`?${V}`;return W};function R$(Z){let $=Z.body!==void 0;if($&&Z.bodySerializer){if("serializedBody"in Z)return Z.serializedBody!==void 0&&Z.serializedBody!==""?Z.serializedBody:null;return Z.body!==""?Z.body:null}if($)return Z.body;return}var G1=async(Z,$)=>{let X=typeof $==="function"?await $(Z):$;if(!X)return;if(Z.scheme==="bearer")return`Bearer ${X}`;if(Z.scheme==="basic")return`Basic ${btoa(X)}`;return X};var _$={bodySerializer:(Z)=>JSON.stringify(Z,($,X)=>typeof X==="bigint"?X.toString():X)};var Y1=({parameters:Z={},...$}={})=>{return(J)=>{let G=[];if(J&&typeof J==="object")for(let z in J){let W=J[z];if(W===void 0||W===null)continue;let V=Z[z]||$;if(Array.isArray(W)){let O=W$({allowReserved:V.allowReserved,explode:!0,name:z,style:"form",value:W,...V.array});if(O)G.push(O)}else if(typeof W==="object"){let O=V$({allowReserved:V.allowReserved,explode:!0,name:z,style:"deepObject",value:W,...V.object});if(O)G.push(O)}else{let O=c({allowReserved:V.allowReserved,name:z,value:W});if(O)G.push(O)}}return G.join("&")}},W1=(Z)=>{if(!Z)return"stream";let $=Z.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((X)=>$.startsWith(X)))return"blob";if($.startsWith("text/"))return"text";return},kZ=(Z,$)=>{if(!$)return!1;if(Z.headers.has($)||Z.query?.[$]||Z.headers.get("Cookie")?.includes(`${$}=`))return!0;return!1};async function V1(Z){for(let $ of Z.security??[]){if(kZ(Z,$.name))continue;let X=await G1($,Z.auth);if(!X)continue;let J=$.name??"Authorization";switch($.in){case"query":if(!Z.query)Z.query={};Z.query[J]=X;break;case"cookie":Z.headers.append("Cookie",`${J}=${X}`);break;case"header":default:Z.headers.set(J,X);break}}}var T$=(Z)=>J1({baseUrl:Z.baseUrl,path:Z.path,query:Z.query,querySerializer:typeof Z.querySerializer==="function"?Z.querySerializer:Y1(Z.querySerializer),url:Z.url}),q$=(Z,$)=>{let X={...Z,...$};if(X.baseUrl?.endsWith("/"))X.baseUrl=X.baseUrl.substring(0,X.baseUrl.length-1);return X.headers=O$(Z.headers,$.headers),X},gZ=(Z)=>{let $=[];return Z.forEach((X,J)=>{$.push([J,X])}),$},O$=(...Z)=>{let $=new Headers;for(let X of Z){if(!X)continue;let J=X instanceof Headers?gZ(X):Object.entries(X);for(let[G,z]of J)if(z===null)$.delete(G);else if(Array.isArray(z))for(let W of z)$.append(G,W);else if(z!==void 0)$.set(G,typeof z==="object"?JSON.stringify(z):z)}return $};class z${fns=[];clear(){this.fns=[]}eject(Z){let $=this.getInterceptorIndex(Z);if(this.fns[$])this.fns[$]=null}exists(Z){let $=this.getInterceptorIndex(Z);return Boolean(this.fns[$])}getInterceptorIndex(Z){if(typeof Z==="number")return this.fns[Z]?Z:-1;return this.fns.indexOf(Z)}update(Z,$){let X=this.getInterceptorIndex(Z);if(this.fns[X])return this.fns[X]=$,Z;return!1}use(Z){return this.fns.push(Z),this.fns.length-1}}var z1=()=>({error:new z$,request:new z$,response:new z$}),CZ=Y1({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),bZ={"Content-Type":"application/json"},s=(Z={})=>({..._$,headers:bZ,parseAs:"auto",querySerializer:CZ,...Z});var a=(Z={})=>{let $=q$(s(),Z),X=()=>({...$}),J=(L)=>{return $=q$($,L),X()},G=z1(),z=async(L)=>{let Q={...$,...L,fetch:L.fetch??$.fetch??globalThis.fetch,headers:O$($.headers,L.headers),serializedBody:void 0};if(Q.security)await V1(Q);if(Q.requestValidator)await Q.requestValidator(Q);if(Q.body!==void 0&&Q.bodySerializer)Q.serializedBody=Q.bodySerializer(Q.body);if(Q.body===void 0||Q.serializedBody==="")Q.headers.delete("Content-Type");let D=Q,B=T$(D);return{opts:D,url:B}},W=async(L)=>{let Q=L.throwOnError??$.throwOnError,D=L.responseStyle??$.responseStyle,B,U;try{let{opts:j,url:N}=await z(L),I={redirect:"follow",...j,body:R$(j)};B=new Request(N,I);for(let x of G.request.fns)if(x)B=await x(B,j);let g=j.fetch;U=await g(B);for(let x of G.response.fns)if(x)U=await x(U,B,j);let A={request:B,response:U};if(U.ok){let x=(j.parseAs==="auto"?W1(U.headers.get("Content-Type")):j.parseAs)??"json";if(U.status===204||U.headers.get("Content-Length")==="0"){let S;switch(x){case"arrayBuffer":case"blob":case"text":S=await U[x]();break;case"formData":S=new FormData;break;case"stream":S=U.body;break;case"json":default:S={};break}return j.responseStyle==="data"?S:{data:S,...A}}let q;switch(x){case"arrayBuffer":case"blob":case"formData":case"text":q=await U[x]();break;case"json":{let S=await U.text();q=S?JSON.parse(S):{};break}case"stream":return j.responseStyle==="data"?U.body:{data:U.body,...A}}if(x==="json"){if(j.responseValidator)await j.responseValidator(q);if(j.responseTransformer)q=await j.responseTransformer(q)}return j.responseStyle==="data"?q:{data:q,...A}}let C=await U.text(),S$;try{S$=JSON.parse(C)}catch{}throw S$??C}catch(j){let N=j;for(let I of G.error.fns)if(I)N=await I(N,U,B,L);if(N=N||{},Q)throw N;return D==="data"?void 0:{error:N,request:B,response:U}}},V=(L)=>(Q)=>W({...Q,method:L}),O=(L)=>async(Q)=>{let{opts:D,url:B}=await z(Q);return X1({...D,body:D.body,method:L,onRequest:async(U,j)=>{let N=new Request(U,j);for(let I of G.request.fns)if(I)N=await I(N,D);return N},serializedBody:R$(D),url:B})};return{buildUrl:(L)=>T$({...$,...L}),connect:V("CONNECT"),delete:V("DELETE"),get:V("GET"),getConfig:X,head:V("HEAD"),interceptors:G,options:V("OPTIONS"),patch:V("PATCH"),post:V("POST"),put:V("PUT"),request:W,setConfig:J,sse:{connect:O("CONNECT"),delete:O("DELETE"),get:O("GET"),head:O("HEAD"),options:O("OPTIONS"),patch:O("PATCH"),post:O("POST"),put:O("PUT"),trace:O("TRACE")},trace:V("TRACE")}};var hZ={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},fZ=Object.entries(hZ),O1=(Z,$)=>{if(!$)$=new Map;for(let X of Z)if("in"in X){if(X.key)$.set(X.key,{in:X.in,map:X.map})}else if("key"in X)$.set(X.key,{map:X.map});else if(X.args)O1(X.args,$);return $},vZ=(Z)=>{for(let[$,X]of Object.entries(Z))if(X&&typeof X==="object"&&!Array.isArray(X)&&!Object.keys(X).length)delete Z[$]},Y=(Z,$)=>{let X={body:Object.create(null),headers:Object.create(null),path:Object.create(null),query:Object.create(null)},J=O1($),G;for(let[z,W]of Z.entries()){if($[z])G=$[z];if(!G)continue;if("in"in G)if(G.key){let V=J.get(G.key),O=V.map||G.key;if(V.in)X[V.in][O]=W}else X.body=W;else for(let[V,O]of Object.entries(W??{})){let K=J.get(V);if(K)if(K.in){let L=K.map||V;X[K.in][L]=O}else X[K.map]=O;else{let L=fZ.find(([Q])=>V.startsWith(Q));if(L){let[Q,D]=L;X[D][V.slice(Q.length)]=O}else if("allowExtra"in G&&G.allowExtra){for(let[Q,D]of Object.entries(G.allowExtra))if(D){X[Q][V]=O;break}}}}}return vZ(X),X};var L1=a(s({baseUrl:"http://localhost:4096"}));class M{client;constructor(Z){this.client=Z?.client??L1}}class D1{defaultKey="default";instances=new Map;get(Z){let $=this.instances.get(Z??this.defaultKey);if(!$)throw Error('No SDK client found. Create one with "new QitQodeClient()" to fix this error.');return $}set(Z,$){this.instances.set($??this.defaultKey,Z)}}class Q1 extends M{get(Z){return(Z?.client??this.client).get({url:"/global/config",...Z})}update(Z,$){let X=Y([Z],[{args:[{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/global/config",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class M1 extends M{scan(Z){return(Z?.client??this.client).get({url:"/global/import/scan",...Z})}run(Z,$){let X=Y([Z],[{args:[{in:"body",key:"sources"},{in:"body",key:"force"}]}]);return($?.client??this.client).post({url:"/global/import/run",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class K1 extends M{health(Z){return(Z?.client??this.client).get({url:"/global/health",...Z})}event(Z){return(Z?.client??this.client).sse.get({url:"/global/event",...Z})}dispose(Z){return(Z?.client??this.client).post({url:"/global/dispose",...Z})}upgrade(Z,$){let X=Y([Z],[{args:[{in:"body",key:"target"}]}]);return($?.client??this.client).post({url:"/global/upgrade",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_config;get config(){return this._config??=new Q1({client:this.client})}_import;get import(){return this._import??=new M1({client:this.client})}}class B1 extends M{remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"providerID"}]}]);return($?.client??this.client).delete({url:"/auth/{providerID}",...$,...X})}set(Z,$){let X=Y([Z],[{args:[{in:"path",key:"providerID"},{key:"auth",map:"body"}]}]);return($?.client??this.client).put({url:"/auth/{providerID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class j1 extends M{log(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}agents(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/agent",...$,...X})}skills(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/skill",...$,...X})}}class N1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/adaptor",...$,...X})}}class U1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace",...$,...X})}create(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/status",...$,...X})}remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/experimental/workspace/{id}",...$,...X})}sessionRestore(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_adaptor;get adaptor(){return this._adaptor??=new N1({client:this.client})}}class I1 extends M{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console",...$,...X})}listOrgs(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console/orgs",...$,...X})}switchOrg(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class x1 extends M{list(Z,$){let X=Y([Z],[{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",...$,...X})}}class S1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/resource",...$,...X})}}class R1 extends M{_workspace;get workspace(){return this._workspace??=new U1({client:this.client})}_console;get console(){return this._console??=new I1({client:this.client})}_session;get session(){return this._session??=new x1({client:this.client})}_resource;get resource(){return this._resource??=new S1({client:this.client})}}class _1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project",...$,...X})}current(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project/current",...$,...X})}initGit(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/project/git/init",...$,...X})}update(Z,$){let X=Y([Z],[{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}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class T1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty",...$,...X})}create(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/pty/{ptyID}",...$,...X})}get(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}",...$,...X})}update(Z,$){let X=Y([Z],[{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}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}connectToken(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/pty/{ptyID}/connect-token",...$,...X})}connect(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}/connect",...$,...X})}}class q1 extends M{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config",...$,...X})}update(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/config",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}providers(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config/providers",...$,...X})}}class w1 extends M{ids(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/tool/ids",...$,...X})}list(Z,$){let X=Y([Z],[{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",...$,...X})}}class H1 extends M{remove(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeRemoveInput",map:"body"}]}]);return($?.client??this.client).delete({url:"/experimental/worktree",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/worktree",...$,...X})}create(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeCreateInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reset(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeResetInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree/reset",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class F1 extends M{list(Z,$){let X=Y([Z],[{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",...$,...X})}create(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/status",...$,...X})}delete(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}",...$,...X})}get(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}",...$,...X})}update(Z,$){let X=Y([Z],[{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}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}children(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/children",...$,...X})}init(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}fork(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}abort(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/abort",...$,...X})}actors(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/actors",...$,...X})}todo(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/todo",...$,...X})}task(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/task",...$,...X})}unshare(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/share",...$,...X})}share(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/share",...$,...X})}diff(Z,$){let X=Y([Z],[{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",...$,...X})}summarize(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}revert(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}unrevert(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/unrevert",...$,...X})}messages(Z,$){let X=Y([Z],[{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",...$,...X})}prompt(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}deleteMessage(Z,$){let X=Y([Z],[{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}",...$,...X})}message(Z,$){let X=Y([Z],[{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}",...$,...X})}promptAsync(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}command(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}predict(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/predict",...$,...X})}shell(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class E1 extends M{delete(Z,$){let X=Y([Z],[{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}",...$,...X})}update(Z,$){let X=Y([Z],[{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}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class A1 extends M{respond(Z,$){let X=Y([Z],[{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}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reply(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/permission",...$,...X})}}class P1 extends M{balance(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/qredits/balance",...$,...X})}}class k1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"sessionID"}]}]);return($?.client??this.client).get({url:"/workflows",...$,...X})}resume(Z,$){let X=Y([Z],[{args:[{in:"path",key:"runID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/workflows/{runID}/resume",...$,...X})}}class g1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question",...$,...X})}neverAsk(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question/never-ask",...$,...X})}setNeverAsk(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enabled"}]}]);return($?.client??this.client).post({url:"/question/never-ask",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reply(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reject(Z,$){let X=Y([Z],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reject",...$,...X})}}class C1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/bash-interactive",...$,...X})}reply(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class b1 extends M{_interactive;get interactive(){return this._interactive??=new C1({client:this.client})}}class h1 extends M{authorize(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}callback(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class f1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider",...$,...X})}auth(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider/auth",...$,...X})}_oauth;get oauth(){return this._oauth??=new h1({client:this.client})}}class v1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/sync/history",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class y1 extends M{start(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/sync/start",...$,...X})}replay(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_history;get history(){return this._history??=new v1({client:this.client})}}class c1 extends M{text(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"pattern"}]}]);return($?.client??this.client).get({url:"/find",...$,...X})}files(Z,$){let X=Y([Z],[{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",...$,...X})}symbols(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"}]}]);return($?.client??this.client).get({url:"/find/symbol",...$,...X})}}class u1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file",...$,...X})}read(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file/content",...$,...X})}status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/file/status",...$,...X})}}class d1 extends M{subscribe(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).sse.get({url:"/event",...$,...X})}}class m1 extends M{remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/mcp/{name}/auth",...$,...X})}start(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth",...$,...X})}callback(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}authenticate(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/authenticate",...$,...X})}}class l1 extends M{status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/mcp",...$,...X})}add(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"config"}]}]);return($?.client??this.client).post({url:"/mcp",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}connect(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/connect",...$,...X})}disconnect(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/disconnect",...$,...X})}_auth;get auth(){return this._auth??=new m1({client:this.client})}}class p1 extends M{next(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/tui/control/next",...$,...X})}response(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/control/response",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class n1 extends M{appendPrompt(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return($?.client??this.client).post({url:"/tui/append-prompt",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}openHelp(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-help",...$,...X})}openSessions(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-sessions",...$,...X})}openThemes(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-themes",...$,...X})}openModels(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-models",...$,...X})}submitPrompt(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/submit-prompt",...$,...X})}clearPrompt(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/clear-prompt",...$,...X})}executeCommand(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/tui/execute-command",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}showToast(Z,$){let X=Y([Z],[{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",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}publish(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/publish",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}selectSession(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/tui/select-session",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_control;get control(){return this._control??=new p1({client:this.client})}}class i1 extends M{dispose(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/instance/dispose",...$,...X})}}class r1 extends M{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/path",...$,...X})}}class s1 extends M{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/vcs",...$,...X})}diff(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"mode"}]}]);return($?.client??this.client).get({url:"/vcs/diff",...$,...X})}}class a1 extends M{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/command",...$,...X})}}class o1 extends M{status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/lsp",...$,...X})}}class t1 extends M{status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/formatter",...$,...X})}}class L$ extends M{static __registry=new D1;constructor(Z){super(Z);L$.__registry.set(this,Z?.key)}_global;get global(){return this._global??=new K1({client:this.client})}_auth;get auth(){return this._auth??=new B1({client:this.client})}_app;get app(){return this._app??=new j1({client:this.client})}_experimental;get experimental(){return this._experimental??=new R1({client:this.client})}_project;get project(){return this._project??=new _1({client:this.client})}_pty;get pty(){return this._pty??=new T1({client:this.client})}_config;get config(){return this._config??=new q1({client:this.client})}_tool;get tool(){return this._tool??=new w1({client:this.client})}_worktree;get worktree(){return this._worktree??=new H1({client:this.client})}_session;get session(){return this._session??=new F1({client:this.client})}_part;get part(){return this._part??=new E1({client:this.client})}_permission;get permission(){return this._permission??=new A1({client:this.client})}_qredits;get qredits(){return this._qredits??=new P1({client:this.client})}_workflow;get workflow(){return this._workflow??=new k1({client:this.client})}_question;get question(){return this._question??=new g1({client:this.client})}_bash;get bash(){return this._bash??=new b1({client:this.client})}_provider;get provider(){return this._provider??=new f1({client:this.client})}_sync;get sync(){return this._sync??=new y1({client:this.client})}_find;get find(){return this._find??=new c1({client:this.client})}_file;get file(){return this._file??=new u1({client:this.client})}_event;get event(){return this._event??=new d1({client:this.client})}_mcp;get mcp(){return this._mcp??=new l1({client:this.client})}_tui;get tui(){return this._tui??=new n1({client:this.client})}_instance;get instance(){return this._instance??=new i1({client:this.client})}_path;get path(){return this._path??=new r1({client:this.client})}_vcs;get vcs(){return this._vcs??=new s1({client:this.client})}_command;get command(){return this._command??=new a1({client:this.client})}_lsp;get lsp(){return this._lsp??=new o1({client:this.client})}_formatter;get formatter(){return this._formatter??=new t1({client:this.client})}}function e1(Z){if(!Z?.fetch)Z={...Z,fetch:(X)=>{return X.timeout=!1,fetch(X)}};if(Z?.directory)Z.headers={...Z.headers,"x-qitqode-directory":encodeURIComponent(Z.directory)};return Z}function yZ(Z,$,X){if(!Z)return;if(!$)return Z;if(Z===$)return $;if(X&&Z===X($))return $;return Z}function cZ(Z,$){if(Z.method!=="GET"&&Z.method!=="HEAD")return Z;let X=new URL(Z.url),J=!1;for(let[z,W]of[["x-qitqode-directory","directory"],["x-qitqode-workspace","workspace"]]){let V=yZ(Z.headers.get(z),W==="directory"?$.directory:$.workspace,W==="directory"?encodeURIComponent:void 0);if(!V)continue;if(!X.searchParams.has(W))X.searchParams.set(W,V);J=!0}if(!J)return Z;let G=new Request(X,Z);return G.headers.delete("x-qitqode-directory"),G.headers.delete("x-qitqode-workspace"),G}function uZ(Z){if(Z=e1(Z),Z?.experimental_workspaceID)Z.headers={...Z.headers,"x-qitqode-workspace":Z.experimental_workspaceID};let $=a(Z);return $.interceptors.request.use((X)=>cZ(X,{directory:Z?.directory,workspace:Z?.experimental_workspaceID})),$.interceptors.response.use((X)=>{if(X.headers.get("content-type")==="text/html")throw Error("Request is not supported by this version of QitQode Server (Server responded with text/html)");return X}),new L$({client:$})}class D$ extends Error{name="BackendCallError";status;fn;constructor(Z,$,X){super(`backend function call failed (${Z}): ${$}${X?` ${X}`:""}`);this.status=Z,this.fn=$}}class Q$ extends Error{name="BackendAuthError";status;constructor(Z,$){super(`backend authentication rejected (${Z})${$?`: ${$}`:""}`);this.status=Z}}function dZ(Z){if(!Z)return!1;try{let $=JSON.parse(Z);if($&&$.code==="ERR_GATEWAY_REQUIRED")return!0}catch{}return Z.includes("ERR_GATEWAY_REQUIRED")}function $Z(Z){let $=Z.fetch??fetch,X=Z.baseUrl.replace(/\/+$/,"");async function J(G,z={}){let W=new Headers(Z.headers);W.set("content-type","application/json");let V=await $(`${X}/${G}`,{method:"POST",headers:W,body:JSON.stringify(z)});if(!V.ok){let K=await V.text().catch(()=>"");if((V.status===401||V.status===403)&&!dZ(K))throw new Q$(V.status,K||void 0);throw new D$(V.status,G,K||void 0)}let O=await V.json();if(!O.success)throw Error(`backend function call returned failure: ${G} \u2014 ${O.error??"unknown error"}`);return O.data}return{promptNames:()=>J("promptNames"),prompt:(G)=>J("prompt",{name:G}),tiers:()=>J("tiers"),workflowSummaries:()=>J("workflowSummaries"),workflowSpec:(G)=>J("workflowSpec",{name:G}),workflowSpecs:()=>J("workflowSpecs"),bashArity:()=>J("bashArity"),toolManifest:()=>J("toolManifest"),toolDescription:(G)=>J("toolDescription",{id:G})}}var iZ=pZ(nZ(),1);import G0 from"path";import Y0 from"crypto";var P={};XZ(P,{setKeySequenceForTest:()=>Z0,setKeyForTest:()=>$0,resetForTest:()=>eZ,isEnvelope:()=>aZ,encryptionKey:()=>tZ,encrypt:()=>X0,decrypt:()=>J0,AuthKeyring:()=>P});import M$ from"crypto";import{execFile as sZ}from"child_process";var u="qitqode",o="auth-encryption-key",JZ="__qitqode_encrypted__";function aZ(Z){return typeof Z==="object"&&Z!==null&&Z[JZ]===1&&Z.alg==="aes-256-gcm"}function d(Z,$,X){return new Promise((J)=>{let G=sZ(Z,$,{timeout:5000},(z,W)=>{let V=z?z.code??1:0;J({code:typeof V==="number"?V:1,stdout:W??""})});if(X!==void 0)G.stdin?.write(X),G.stdin?.end()})}async function ZZ(Z,$){return(await d(Z,$)).code===0}async function oZ(){if(process.env.QITQODE_DISABLE_KEYRING)return;if(process.platform==="darwin"){if(!await ZZ("security",["help"]))return;return{async get(){let Z=await d("security",["find-generic-password","-s",u,"-a",o,"-w"]);return Z.code===0?Z.stdout.trim():void 0},async set(Z){return(await d("security",["add-generic-password","-U","-s",u,"-a",o,"-w",Z])).code===0}}}if(process.platform==="linux"){if(!await ZZ("secret-tool",["search","service",u])){let Z=await d("secret-tool",["lookup","service",u,"account",o]);if(Z.code!==0&&Z.code!==1)return}return{async get(){let Z=await d("secret-tool",["lookup","service",u,"account",o]);return Z.code===0&&Z.stdout.trim()?Z.stdout.trim():void 0},async set(Z){return(await d("secret-tool",["store","--label","QitQode auth encryption key","service",u,"account",o],Z)).code===0}}}return}var K$,m;function tZ(){if(m!==void 0&&m.length>0)return Promise.resolve(m.shift());return K$??=(async()=>{let Z=await oZ();if(!Z)return;let $=await Z.get();if($){let X=Buffer.from($,"base64");if(X.length===32)return X;return}return h.withLock("auth-keyring-init",async()=>{let X=await Z.get();if(X){let W=Buffer.from(X,"base64");return W.length===32?W:void 0}let J=M$.randomBytes(32);if(!await Z.set(J.toString("base64")))return;let G=await Z.get();if(!G)return;let z=Buffer.from(G,"base64");return z.length===32?z:void 0})})(),K$}function eZ(){K$=void 0,m=void 0}function $0(Z){K$=Promise.resolve(Z),m=void 0}function Z0(Z){m=[...Z]}function X0(Z,$){let X=M$.randomBytes(12),J=M$.createCipheriv("aes-256-gcm",$,X),G=Buffer.concat([J.update(Z,"utf8"),J.final()]);return{[JZ]:1,alg:"aes-256-gcm",iv:X.toString("base64"),tag:J.getAuthTag().toString("base64"),data:G.toString("base64")}}function J0(Z,$){let X=M$.createDecipheriv("aes-256-gcm",$,Buffer.from(Z.iv,"base64"));return X.setAuthTag(Buffer.from(Z.tag,"base64")),Buffer.concat([X.update(Buffer.from(Z.data,"base64")),X.final()]).toString("utf8")}var W0="The server rejected QITQODE_KEY and there is no signed-in Forgewise session on this machine to repair it with. Replace QITQODE_KEY, or run `qitqode auth login`.",w$=`[qitqode] ${W0}`,l="forgewise";function B$(Z){if(Z?.type!=="api"||typeof Z.key!=="string")return;let X=Z.metadata?.method==="api-key"?"api-key":"sso";return{key:Z.key,method:X}}function E(Z){if(!Z)return"none";return Y0.createHash("sha256").update(`${Z.method}:${Z.key}`).digest("hex").slice(0,16)}var j$;function WZ(Z){j$=Z}async function N$(){let{readFile:Z}=await import("fs/promises"),$=JSON.parse(await Z(VZ(),"utf8"));if(!P.isEnvelope($))return{data:$,key:void 0};let X=await P.encryptionKey();if(!X)throw Error("auth.json is encrypted but the OS keyring is unavailable");return{data:JSON.parse(P.decrypt($,X)),key:X}}async function H$(Z){let{writeFile:$,chmod:X,rename:J}=await import("fs/promises"),G=Z.key?P.encrypt(JSON.stringify(Z.data),Z.key):Z.data,z=VZ(),W=z+".tmp";await $(W,JSON.stringify(G,null,2),"utf8"),await X(W,384),await J(W,z)}function VZ(){return G0.join(YZ.Path.data,"auth.json")}async function p(){if(j$)return j$;if(process.env.QITQODE_KEY)return{key:process.env.QITQODE_KEY,method:"api-key"};try{let Z=await h.withLock("auth-file",async()=>{let{data:$}=await N$();return B$($?.[l])});if(Z)return Z}catch{}if(process.env.QITQODE_AUTH_CONTENT)try{let Z=JSON.parse(process.env.QITQODE_AUTH_CONTENT);return B$(Z?.forgewise)}catch{}return}async function U$(){if(j$=void 0,process.env.QITQODE_KEY)return;await h.withLock("auth-file",async()=>{let Z=await N$();if(!(l in Z.data))return;delete Z.data[l],await H$(Z)})}function t(Z){return Z.method==="api-key"?{"x-api-key":Z.key}:{authorization:`Bearer ${Z.key}`}}var I$=k.create({service:"auth.forgewise.checkout"}),V0="qitqode",z0=5000;async function F$(Z){let X=`${new URL(R.QITQODE_BACKEND_URL).origin}/auth/keys/checkout`;try{let J=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Z}`},body:JSON.stringify({app:V0}),signal:AbortSignal.timeout(z0)});if(!J.ok)return I$.warn("API key checkout returned non-200; falling back to Bearer credential",{status:J.status,url:X}),null;let G=await J.json();if(typeof G?.key!=="string"||!G.key)return I$.warn("API key checkout response missing key field; falling back to Bearer credential",{url:X}),null;return I$.info("API key checkout succeeded; credential upgraded to api-key method",{url:X}),G.key}catch(J){return I$.warn("API key checkout failed; falling back to Bearer credential",{url:X,error:J instanceof Error?J.message:String(J)}),null}}var a$={};XZ(a$,{toolDescriptionEffect:()=>R0,resolveWorkflowSummaries:()=>I0,resolveWorkflowSpec:()=>x0,resolveToolManifest:()=>xZ,resolveToolDescription:()=>SZ,resolveTierRatings:()=>F0,resolveSubmitBatch:()=>v0,resolveRetrieveBatch:()=>y0,resolvePrompt:()=>NZ,resolveListTiers:()=>H0,resolveGetHistory:()=>P0,resolveGenerateInlineComments:()=>b0,resolveGenerateDocumentation:()=>C0,resolveForgewiseConfig:()=>s$,resolveFetchQreditsBalance:()=>k0,resolveCompressTrajectorySafe:()=>E0,resolveChatCompletion:()=>f0,resolveChatBoolean:()=>h0,resolveBraveSearch:()=>A0,resolveBashArity:()=>S0,resolveAnalyzeCodeForIssues:()=>g0,resolveAgentPrompt:()=>N0,remoteStats:()=>H,isBackendBillingError:()=>M0,clearRemoteCache:()=>j0,beginIdempotentAttempt:()=>jZ,BackendRemote:()=>a$,BackendRateLimitError:()=>G$,BackendInsufficientBalanceError:()=>J$,BackendAuthRejectedError:()=>r,BackendAccountNotLinkedError:()=>l$});import{createHash as BZ,randomUUID as KZ}from"crypto";import E$ from"crypto";class T extends Error{cause;constructor(Z,$){super(Z);this.name="ForgewiseError",this.cause=$}}class n extends T{constructor(Z="Device flow is not supported by this issuer."){super(Z);this.name="DeviceFlowUnsupportedError"}}function zZ(Z,$,X){if(Z>=200&&Z<300)return{kind:"success"};let J=$?.error??"";if(J==="authorization_pending")return{kind:"wait",intervalMs:X};if(J==="slow_down")return{kind:"wait",intervalMs:X+5000};if(J==="access_denied")return{kind:"fatal",message:"Sign-in was denied in the browser."};if(J==="expired_token")return{kind:"fatal",message:"The sign-in code expired before it was approved. Try again."};return{kind:"fatal",message:`Device sign-in failed: ${$?.error_description||J||`HTTP ${Z}`}`}}var LZ="openid profile email",A$=(Z)=>Z.toString("base64url");function M9(){let Z=A$(E$.randomBytes(32)),$=A$(E$.createHash("sha256").update(Z).digest()),X=A$(E$.randomBytes(16));return{verifier:Z,challenge:$,state:X}}function K9(Z){let $=new URL(`${Z.issuer}/api/oauth/authorize`);return $.searchParams.set("response_type","code"),$.searchParams.set("client_id",Z.clientId),$.searchParams.set("redirect_uri",Z.redirectUri),$.searchParams.set("scope",LZ),$.searchParams.set("state",Z.state),$.searchParams.set("code_challenge",Z.challenge),$.searchParams.set("code_challenge_method","S256"),$.toString()}async function P$(Z,$){let X=await fetch(`${Z}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${$.access_token}`}});if(!X.ok)throw new T(`Failed to fetch user profile (${X.status})`);let J=await X.json();if(!J.sub)throw new T("Userinfo response is missing required 'sub' field \u2014 the server returned an invalid user profile.");return{sub:J.sub,name:J.name??"",email:J.email??"",access_token:$.access_token,expires_at:Date.now()+($.expires_in??3600)*1000,...$.refresh_token?{refresh_token:$.refresh_token}:{}}}async function B9(Z){let $=await fetch(`${Z.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:Z.code,redirect_uri:Z.redirectUri,client_id:Z.clientId,code_verifier:Z.verifier}).toString(),signal:Z.signal??null});if(!$.ok){let J=await $.text().catch(()=>"");throw new T(`Token exchange failed (${$.status}): ${J}`)}let X=await $.json();return P$(Z.issuer,X)}async function j9(Z,$,X=5000){let J=new AbortController,G=setTimeout(()=>J.abort(),X);try{let z=await fetch(`${Z}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${$}`},signal:J.signal});if(z.status===401||z.status===403)return!1;if(!z.ok)return null;return!0}catch{return null}finally{clearTimeout(G)}}async function k$(Z){let{issuer:$,clientId:X}=await OZ(),J;try{J=await fetch(`${$}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:X,refresh_token:Z}).toString()})}catch(z){throw new T(`Could not reach the sign-in server to refresh the session: ${z instanceof Error?z.message:String(z)}`,z)}if(!J.ok){let z=await J.json().catch(()=>{return});if(z?.error==="invalid_grant")return"invalid_grant";throw new T(`Token refresh failed (${J.status}): ${z?.error??""}`)}let G=await J.json();return{issuer:$,...G}}async function N9(Z){let $=await k$(Z);if($==="invalid_grant")return"invalid_grant";return P$($.issuer,$)}async function U9(Z){let $;try{$=await fetch(`${Z.issuer}/api/oauth/device_authorization`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Z.clientId,scope:LZ}).toString(),signal:Z.signal??null})}catch{if(Z.signal?.aborted)throw new T("Login cancelled");throw new n}if($.status===404||$.status===405||$.status===501)throw new n;if(!$.ok){let J=await $.text().catch(()=>"");throw new T(`Device authorization failed (${$.status}): ${J}`)}let X;try{X=await $.json()}catch{throw new n}if(!X.device_code||!X.user_code||!X.verification_uri)throw new n;return{deviceCode:X.device_code,info:{userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete,expiresAt:Date.now()+(X.expires_in??900)*1000},intervalMs:Math.max(1,X.interval??5)*1000}}async function I9(Z){let $;try{$=await fetch(`${Z.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:Z.deviceCode,client_id:Z.clientId}).toString(),signal:Z.signal??null})}catch{if(Z.signal?.aborted)throw new T("Login cancelled");return{kind:"wait",intervalMs:Z.currentIntervalMs}}let X;try{X=await $.json()}catch{X=void 0}let J=zZ($.status,X,Z.currentIntervalMs);if(J.kind==="success"){if(!X?.access_token)throw new T("Token endpoint returned success without an access_token.");return{kind:"success",profile:await P$(Z.issuer,{access_token:X.access_token,expires_in:X.expires_in})}}if(J.kind==="fatal")throw new T(J.message);return{kind:"wait",intervalMs:J.intervalMs}}function DZ(Z,$){let X={sub:Z.sub,name:Z.name,email:Z.email,expires_at:String(Z.expires_at),...$.rotateRefreshToken&&Z.refresh_token?{refresh_token:Z.refresh_token}:{}};return{type:"api",key:Z.access_token,metadata:X}}function g$(Z,$){return{type:"api",key:$,metadata:{method:"api-key",sub:Z.sub,name:Z.name,email:Z.email,access_token:Z.access_token,access_token_expires_at:String(Z.expires_at),...Z.refresh_token?{refresh_token:Z.refresh_token}:{}}}}var i=k.create({service:"auth.recovery"}),O0=30000,L0=5,e,$$=0,b$=new Set;async function MZ(Z){if(b$.has(E(Z)))return{kind:"definitive",reason:"the stored sign-in has already been established as no longer valid"};if(e)return e;if($$>=L0)return i.warn("recovery budget exhausted for this process; reporting inconclusive",{attempts:$$}),{kind:"inconclusive",reason:`automatic sign-in repair was attempted ${$$} times in this session without success`};return e=D0(Z).finally(()=>{e=void 0}),e}function QZ(){$$++}async function D0(Z){let $=E(Z),X=process.env.QITQODE_KEY,J=!!X&&Z?.key===X;i.info("attempting automatic credential recovery",{rejected:$,source:J?"env":"file",attempt:$$});let G;try{G=await h.withLock("auth-file",()=>Q0(Z,$,J))}catch(z){let W=z instanceof Error?z.message:String(z);return i.warn("credential recovery could not run",{error:W}),{kind:"inconclusive",reason:`automatic sign-in repair could not run (${W})`}}if(G.kind==="recovered"){if(J)WZ(G.credential);i.info("credential recovered",{from:$,to:E(G.credential),via:G.reason})}else if(G.kind==="definitive")await U$().catch(()=>{}),b$.add($),b$.add(E(void 0)),i.info("credential rejection is definitive; stored credential cleared",{reason:G.reason});return G}async function Q0(Z,$,X){let J;try{J=await N$()}catch(D){if(D?.code==="ENOENT")return{kind:"definitive",reason:"no stored sign-in to repair"};let B=D instanceof Error?D.message:String(D);return i.warn("stored sign-in could not be read; treating the rejection as inconclusive",{error:B}),{kind:"inconclusive",reason:`the stored sign-in could not be read (${B})`}}let G=J.data[l],z=B$(G);if(!X&&z&&E(z)!==$)return{kind:"recovered",credential:z,reason:"adopted a credential rotated by another process"};let W=G?.metadata??{},V=(D)=>typeof D==="string"&&D?D:void 0,O=V(W.refresh_token),K=V(W.access_token)??(z?.method==="sso"?z.key:void 0),L=Number(W.access_token_expires_at??W.expires_at??0),Q={sub:V(W.sub)??"",name:V(W.name)??"",email:V(W.email)??""};if(K&&K!==Z?.key&&L>Date.now()+O0){QZ();let D=await F$(K);if(D){let B={...Q,access_token:K,expires_at:L,...O?{refresh_token:O}:{}};return await C$(J,g$(B,D)),{kind:"recovered",credential:{key:D,method:"api-key"},reason:"minted a key from the SSO session"}}}if(O){let D;try{QZ(),D=await k$(O)}catch(N){return{kind:"inconclusive",reason:`could not reach the sign-in server (${N instanceof Error?N.message:String(N)})`}}if(D==="invalid_grant")return{kind:"definitive",reason:"the stored sign-in was revoked or has expired"};let B={...Q,access_token:D.access_token,expires_at:Date.now()+(D.expires_in??3600)*1000,...D.refresh_token?{refresh_token:D.refresh_token}:{}},U=DZ(B,{rotateRefreshToken:!0});await C$(J,U);let j=await F$(B.access_token);if(j)return await C$(J,g$(B,j)),{kind:"recovered",credential:{key:j,method:"api-key"},reason:"refreshed the sign-in and minted a new key"};return{kind:"recovered",credential:{key:B.access_token,method:"sso"},reason:"refreshed the sign-in"}}return{kind:"definitive",reason:"the stored sign-in has no session left to renew"}}async function C$(Z,$){Z.data[l]=$,await H$(Z)}var _=k.create({service:"backend.remote"}),d$=30000,m$=5000,v=new Map,H={failures:0,authRejections:0,missingPrompts:0,missingToolDescriptions:0},h$=new Set,f$=new Set;class r extends Error{name="BackendAuthRejectedError";constructor(Z){super(X$.copy().invalidCredentials(Z))}}class J$ extends Error{name="BackendInsufficientBalanceError";status=402;code;constructor(Z,$){super(X$.copy().insufficientBalance(Z));this.code=$}}class G$ extends Error{name="BackendRateLimitError";status=429;retryAfterMs;constructor(Z,$){let X=Z!==void 0?` Retry in about ${Math.max(1,Math.round(Z/1000))}s.`:"";super(X$.copy().rateLimit+X+($?` (${$})`:""));this.retryAfterMs=Z}}class l$ extends Error{name="BackendAccountNotLinkedError";status=409;constructor(Z){super(X$.copy().accountNotLinked(Z))}}function M0(Z){return Z instanceof J$||Z instanceof G$}var K0=600000,f=new Map;function B0(Z,$){try{return BZ("sha256").update(`${Z}\x00${JSON.stringify($)}`).digest("hex").slice(0,16)}catch{return"unscoped"}}function jZ(Z,$,X){let J=Date.now(),G;try{G=BZ("sha256").update(`${Z}\x00${$}\x00${JSON.stringify(X)??""}`).digest("hex")}catch{return{key:`${$}-${KZ()}`,settle:()=>{}}}let z=()=>f.delete(G),W=f.get(G);if(W&&W.expires>J)return{key:W.key,settle:z};if(f.size>256){for(let[O,K]of f)if(K.expires<=J)f.delete(O)}let V=`${$}-${G.slice(0,16)}-${KZ()}`;return f.set(G,{key:V,expires:J+K0}),{key:V,settle:z}}function j0(){v.clear(),c$.clear(),v$.clear(),h$.clear(),f$.clear(),f.clear()}async function p$(Z){H.authRejections++;let{credential:$,status:X,label:J,baseUrl:G}=Z;if(!Z.repairSpent){let z=E($),W=await MZ($);if(W.kind==="recovered"&&E(W.credential)!==z)return _.info("backend rejected the credential; repaired it automatically and retrying",{label:J,baseUrl:G,status:X,via:W.reason}),{retry:!0};if(W.kind==="inconclusive")return _.warn("backend rejected the credential but repair was inconclusive; leaving it in place",{label:J,baseUrl:G,status:X,reason:W.reason}),{retry:!1,error:Error(`Backend auth check could not complete: ${W.reason}`)}}if(await U$().catch(()=>{}),_.warn("backend rejected the credential and it could not be repaired; prompting re-auth",{label:J,baseUrl:G,status:X}),process.env.QITQODE_KEY)_.error(w$),console.error(w$);return{retry:!1,error:new r(`HTTP ${X}`)}}async function y(Z,$){let X=R.QITQODE_BACKEND_URL,J=Date.now(),G=`${X}::${Z}`,z=v.get(G);if(z&&z.expires>J)return z.value;let W=!1;for(;;)try{let V=await p(),O=V?t(V):void 0,L=await $($Z({baseUrl:X,headers:O,fetch:(Q,D)=>fetch(Q,{...D,signal:D?.signal??AbortSignal.timeout(m$)})}));return v.set(G,{value:L,expires:Date.now()+d$}),L}catch(V){if(V instanceof Q$){let O=await p$({credential:await p(),status:V.status,label:Z,baseUrl:X,repairSpent:W});if(W=!0,O.retry)continue;throw O.error}throw H.failures++,_.warn("backend request failed; surfacing error",{cacheKey:Z,baseUrl:X,error:V instanceof Error?V.message:String(V)}),V}}async function NZ(Z){if(Z.indexOf("/")<=0)return;return y(`prompt:${Z}`,($)=>$.prompt(Z).then((X)=>X??void 0))}async function N0(Z){let $=`agent/${Z}`,X=await NZ($);if(X===void 0||X===""){if(!h$.has(Z))h$.add(Z),H.missingPrompts++,_.warn("backend served no content for agent prompt; running with an empty prompt",{prompt:$,baseUrl:R.QITQODE_BACKEND_URL,missingPrompts:H.missingPrompts})}return X}var v$=new Map;function y$(Z){let $=v$.get(Z);if(!$)$={unsupported:!1},v$.set(Z,$);return $}async function U0(){let Z=y$(R.QITQODE_BACKEND_URL);if(Z.inFlight)return Z.inFlight;let $=y("workflow.catalog",(X)=>X.workflowSpecs().then((J)=>J??void 0)).then((X)=>{let J=new Map;for(let G of X??[])if(G&&typeof G.name==="string"&&typeof G.script==="string")J.set(G.name,G);return J});Z.inFlight=$;try{return await $}finally{if(Z.inFlight===$)Z.inFlight=void 0}}async function UZ(Z,$){let X=R.QITQODE_BACKEND_URL;if(!y$(X).unsupported)try{return Z(await U0())}catch(J){if(!IZ(J))throw J;y$(X).unsupported=!0,_.warn("backend has no workflowSpecs route; falling back to per-name workflow lookups",{baseUrl:X})}return $()}async function I0(){return UZ((Z)=>[...Z.values()].map(({script:$,...X})=>X),()=>y("workflow.list",(Z)=>Z.workflowSummaries()))}async function x0(Z){return UZ(($)=>$.get(Z),()=>y(`workflow.get:${Z}`,($)=>$.workflowSpec(Z).then((X)=>X??void 0)))}async function S0(){return y("permission.arity",(Z)=>Z.bashArity())}var c$=new Map;function u$(Z){let $=c$.get(Z);if(!$)$={unsupported:!1},c$.set(Z,$);return $}function IZ(Z){return Z instanceof D$&&(Z.status===404||Z.status===501)}async function xZ(){let Z=u$(R.QITQODE_BACKEND_URL);if(Z.inFlight)return Z.inFlight;let $=y("tool.manifest",(X)=>X.toolManifest().then((J)=>J??void 0)).then((X)=>{let J=new Map;for(let G of X??[])if(G&&typeof G.id==="string"&&typeof G.description==="string")J.set(G.id,G.description);return J});Z.inFlight=$;try{return await $}finally{if(Z.inFlight===$)Z.inFlight=void 0}}async function SZ(Z){let $=R.QITQODE_BACKEND_URL,X;if(!u$($).unsupported)try{X=(await xZ()).get(Z)}catch(J){if(!IZ(J))throw J;u$($).unsupported=!0,_.warn("backend has no toolManifest route; falling back to one request per tool description",{baseUrl:$})}if(X===void 0||X==="")X=await y(`tool.description:${Z}`,(J)=>J.toolDescription(Z).then((G)=>G??void 0));if(X===void 0||X===""){if(!f$.has(Z))f$.add(Z),H.missingToolDescriptions++,_.warn("backend served no content for tool description; running with an empty description",{tool:Z,baseUrl:R.QITQODE_BACKEND_URL,missingToolDescriptions:H.missingToolDescriptions})}return X}function R0(Z){return Z$.promise(()=>SZ(Z)).pipe(Z$.catchDefect(($)=>$ instanceof r?Z$.succeed(void 0):Z$.die($)))}function _0(Z){if(!Z)return{};try{let $=JSON.parse(Z);if($&&typeof $==="object")return{code:typeof $.error==="string"?$.error:void 0,detail:typeof $.message==="string"?$.message:void 0}}catch{}return{detail:Z.slice(0,300)}}function T0(Z){let $=Z.headers?.get?.("retry-after-ms");if($){let J=Number.parseFloat($);if(!Number.isNaN(J))return J}let X=Z.headers?.get?.("retry-after");if(X){let J=Number.parseFloat(X);if(!Number.isNaN(J))return Math.ceil(J*1000);let G=Date.parse(X)-Date.now();if(!Number.isNaN(G)&&G>0)return Math.ceil(G)}return}async function n$(Z,$){let X=await Z.text().catch(()=>""),{code:J,detail:G}=_0(X);if(Z.status===402)return new J$(G,J);if(Z.status===409)return new l$(G);if(Z.status===429)return new G$(T0(Z),G);let z=G?`: ${G}`:J?`: ${J}`:"";return Error(`${$} failed: ${Z.status}${z}`)}function q0(Z){if(Z===null||typeof Z!=="object")return Z;if(Z.data!==void 0)return Z.data;let $={};for(let[X,J]of Object.entries(Z)){if(X==="success"||X==="data"||X==="error"||X==="message")continue;$[X]=J}return Object.keys($).length>0?$:void 0}function i$(Z,$){let{error:X,message:J}=Z;if(X==="insufficient_balance")return new J$(J,X);if(X==="rate_limited"||X==="too_many_requests")return new G$(void 0,J);return Error(`${$} returned failure: ${X??"unknown error"}${J?` \u2014 ${J}`:""}`)}async function F(Z,$,X,J={}){let G=R.QITQODE_BACKEND_URL,z=`${G}::post:${Z}`;if(!J.noCache){let O=Date.now(),K=v.get(z);if(K&&K.expires>O)return K.value}let W=!1,V=!1;do{V=!1;try{let O=await p(),K=O?t(O):{},L=J.billable?jZ(B0(G,K),$,X):void 0,Q=L?{"x-idempotency-key":L.key}:{},D=await fetch(`${G}/${$}`,{method:"POST",headers:{"Content-Type":"application/json",...K,...Q},body:JSON.stringify(X),signal:J.signal});if(D.status===401||D.status===403){L?.settle();let I=await D.text().catch(()=>"");if(I.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${I}`);let g=await p$({credential:O,status:D.status,label:$,baseUrl:G,repairSpent:W});if(W=!0,g.retry){V=!0;continue}throw g.error}if(!D.ok){let I=await n$(D,`Backend POST /${$}`);if(D.status<500)L?.settle();throw I}let B=await D.json(),U=B!==null&&typeof B==="object"&&typeof B.error==="string";if((!J.acceptTopLevel||typeof B?.success==="boolean"||U)&&!B.success)throw L?.settle(),i$(B,`Backend POST /${$}`);L?.settle();let N=J.acceptTopLevel?q0(B):B.data;if(!J.noCache)v.set(z,{value:N,expires:Date.now()+d$});return N}catch(O){if(O instanceof r)throw O;throw H.failures++,_.warn("backend POST request failed; surfacing error",{fnName:$,baseUrl:G,error:O instanceof Error?O.message:String(O)}),O}}while(V);throw Error(`Backend POST /${$} exhausted its auth retry without a verdict`)}async function r$(Z,$,X={}){let J=R.QITQODE_BACKEND_URL,G=!1,z=!1;do{z=!1;try{let W=await p(),V=W?t(W):{},O=new URLSearchParams(Object.entries($).map(([D,B])=>[D,String(B)])).toString(),K=O?`${J}/${Z}?${O}`:`${J}/${Z}`,L=await fetch(K,{method:"GET",headers:{...V},signal:X.signal});if(L.status===401||L.status===403){let D=await L.text().catch(()=>"");if(D.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${D}`);let B=await p$({credential:W,status:L.status,label:Z,baseUrl:J,repairSpent:G});if(G=!0,B.retry){z=!0;continue}throw B.error}if(!L.ok)throw await n$(L,`Backend GET /${Z}`);let Q=await L.json();if(!Q.success)throw i$(Q,`Backend GET /${Z}`);return Q.data}catch(W){if(W instanceof r)throw W;throw H.failures++,_.warn("backend GET request failed; surfacing error",{fnName:Z,baseUrl:J,error:W instanceof Error?W.message:String(W)}),W}}while(z);throw Error(`Backend GET /${Z} exhausted its auth retry without a verdict`)}async function w0(Z,$,X){let J=R.QITQODE_BACKEND_URL,G=`${J}::public:${Z}`,z=Date.now(),W=v.get(G);if(W&&W.expires>z)return W.value;try{let V=await fetch(`${J}/${$}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X),signal:AbortSignal.timeout(m$)});if(!V.ok)throw await n$(V,`Backend public POST /${$}`);let O=await V.json();if(!O.success)throw i$(O,`Backend public POST /${$}`);let K=O.data;return v.set(G,{value:K,expires:z+d$}),K}catch(V){throw H.failures++,_.warn("backend public request failed; surfacing error",{fnName:$,baseUrl:J,error:V instanceof Error?V.message:String(V)}),V}}async function s$(){try{return await w0("forgewise.config","forgewiseConfig",{})}catch(Z){let $=await p().catch(()=>null);if(!$)throw Z;let X=R.QITQODE_BACKEND_URL,J=await fetch(`${X}/forgewiseConfig`,{method:"POST",headers:{"Content-Type":"application/json",...t($)},body:JSON.stringify({}),signal:AbortSignal.timeout(m$)}).catch(()=>null);if(!J?.ok)throw Z;let G=await J.json().catch(()=>null);if(!G?.success)throw Z;return G.data}}async function H0(){return r$("listTiers",{}).then((Z)=>{if(!Array.isArray(Z))return[];return Z.flatMap(($)=>{if(typeof $==="string")return[{id:$}];if(!$||typeof $!=="object"||Array.isArray($))return[];let X=$;return typeof X.id==="string"?[{id:X.id,...typeof X.label==="string"?{label:X.label}:{},...typeof X.providerID==="string"?{providerID:X.providerID}:{},...typeof X.modelID==="string"?{modelID:X.modelID}:{}}]:[]})}).catch((Z)=>{return _.warn("listTiers fetch failed; using hardcoded tier fallback",{error:Z instanceof Error?Z.message:String(Z)}),[]})}async function F0(){return r$("TIER_RATINGS",{}).catch((Z)=>{_.warn("TIER_RATINGS fetch failed; no tier ratings will be shown",{error:Z instanceof Error?Z.message:String(Z)});return})}async function E0(Z){return F("compaction.trajectory","compressTrajectorySafe",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(120000)})}async function A0(Z,$){let X=$?.timeoutMs??30000,J={query:Z};if($?.numResults)J.options={count:$.numResults};return F("brave.search","braveSearch",J,{noCache:!0,signal:AbortSignal.timeout(X)})}async function P0(Z){return F("qredits.history","getHistory",Z,{noCache:!0})}async function k0(Z){return F("forgewise.qredits.balance","fetchQreditsBalance",Z,{noCache:!0,acceptTopLevel:!0})}async function g0(Z){return F(`code.analyze:${Z.filePath}`,"analyzeCodeForIssues",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function C0(Z){return F(`code.docs:${Z.filePath}:${Z.functionName??""}`,"generateDocumentation",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function b0(Z){return F(`code.comments:${Z.filePath}`,"generateInlineComments",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function h0(Z,$,X){return F("chat.boolean","chatBoolean",{sample:Z,test:$},{noCache:!0,billable:!0,signal:AbortSignal.timeout(X?.timeoutMs??30000)})}async function f0(Z,$){let X={message:Z},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)X.options=J;return F("chat.completion","chatCompletion",X,{noCache:!0,billable:!0,signal:AbortSignal.timeout($?.timeoutMs??30000)})}async function v0(Z){return F("batch.submit","submitBatch",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function y0(Z){return r$("retrieveBatch",{batchId:Z.batchId},{signal:AbortSignal.timeout(30000)})}var c0=k.create({service:"forgewise.config"}),u0="https://accounts.forgewise.tech",d0="forgewise-cli",RZ=!1,m0={defaultFallbacks:0};function x$(...Z){return Z.find(($)=>$!==void 0&&$.trim().length>0)}function y9(){return!!process.env.REPLIT_DEV_DOMAIN}async function OZ(){let Z=process.env.ACCOUNTS_ISSUER,$=process.env.FORGEWISE_CLIENT_ID;if(Z&&$)return{issuer:Z.replace(/\/+$/,""),clientId:$};let X,J;try{X=await s$()}catch(O){X=void 0,J=O}let G=x$(Z,X?.issuer,u0).replace(/\/+$/,""),z=x$($,X?.clientId,d0),W=x$(Z,X?.issuer)===void 0,V=x$($,X?.clientId)===void 0;if((W||V)&&!RZ)RZ=!0,m0.defaultFallbacks++,c0.warn("remote Forgewise coordinate lookup unavailable; falling back to baked-in defaults",{issuer:G,clientId:z,usedDefaultIssuer:W,usedDefaultClientId:V,remoteError:J instanceof Error?J.message:J?String(J):void 0});return{issuer:G,clientId:z}}
|
|
8
|
+
export{P as Mp,e1 as Np,uZ as Op,dZ as Pp,$Z as Qp,W0 as Rp,w$ as Sp,E as Tp,p as Up,U$ as Vp,F$ as Wp,y9 as Xp,OZ as Yp,T as Zp,n as _p,zZ as $p,M9 as aq,K9 as bq,B9 as cq,j9 as dq,N9 as eq,U9 as fq,I9 as gq,DZ as hq,g$ as iq,MZ as jq,r as kq,J$ as lq,G$ as mq,l$ as nq,H0 as oq,F0 as pq,P0 as qq,k0 as rq,a$ as sq};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Dd as m,Gd as P,Hd as R,Id as k,Jd as O,Ld as q,Md as $,Nd as I}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Pd as h}from"./chunk-9xvctnjr.js";import{Sf as r}from"./chunk-9s4whpg1.js";import{Xg as L}from"./chunk-w57j3pgz.js";import{Jh as E}from"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{Tj as N,gl as x}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import{am as i}from"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import{Vu as C,_u as j}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{gQ as F}from"./chunk-4sazy0nq.js";import u from"path";import U from"fs/promises";var T=F(N(),1);import{EOL as S}from"os";var c=["bash","read","write","edit","glob","grep","webfetch","actor","task"],B=h({command:"create",describe:"create a new agent",builder:(o)=>o.option("path",{type:"string",describe:"directory path to generate the agent file"}).option("description",{type:"string",describe:"what the agent should do"}).option("mode",{type:"string",describe:"agent mode",choices:["all","primary","subagent"]}).option("tools",{type:"string",describe:`comma-separated list of tools to enable (default: all). Available: "${c.join(", ")}"`}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}),async handler(o){await i.provide({directory:process.cwd(),async fn(){let{path:l,description:t,mode:s,tools:p}=o,d=l&&t&&s&&p!==void 0;if(!d)r.empty(),R("Create agent");let D=i.project,g;if(l)g=u.join(l,"agent");else{let e="global";if(D.vcs==="git"){let n=await $({message:"Location",options:[{label:"Current project",value:"project",hint:i.worktree},{label:"Global",value:"global",hint:j.Path.config}]});if(m(n))throw new r.CancelledError;e=n}g=u.join(e==="global"?j.Path.config:u.join(i.worktree,".qitqode"),"agent")}let b;if(t)b=t;else{let e=await I({message:"Description",placeholder:"What should this agent do?",validate:(n)=>n&&n.length>0?void 0:"Required"});if(m(e))throw new r.CancelledError;b=e}let w=q();w.start("Generating agent configuration...");let G=o.model?x.parseModel(o.model):void 0,f=await L.runPromise(E.Service.use((e)=>e.generate({description:b,model:G}))).catch((e)=>{if(w.stop(`LLM failed to generate agent: ${e.message}`,1),d)process.exit(1);throw new r.CancelledError});w.stop(`Agent ${f.identifier} generated`);let y;if(p!==void 0)y=p?p.split(",").map((e)=>e.trim()):c;else{let e=await O({message:"Select tools to enable (Space to toggle)",options:c.map((n)=>({label:n,value:n})),initialValues:c});if(m(e))throw new r.CancelledError;y=e}let v;if(s)v=s;else{let e=await $({message:"Agent mode",options:[{label:"All",value:"all",hint:"Can function in both primary and subagent roles"},{label:"Primary",value:"primary",hint:"Acts as a primary/main agent"},{label:"Subagent",value:"subagent",hint:"Can be used as a subagent by other agents"}],initialValue:"all"});if(m(e))throw new r.CancelledError;v=e}let A={};for(let e of c)if(!y.includes(e))A[e]=!1;let M={description:f.whenToUse,mode:v};if(Object.keys(A).length>0)M.tools=A;let V=T.default.stringify(f.systemPrompt,M),a=u.join(g,`${f.identifier}.md`);if(await U.mkdir(g,{recursive:!0}),await C.exists(a)){if(d)console.error(`Error: Agent file already exists: ${a}`),process.exit(1);throw P.error(`Agent file already exists: ${a}`),new r.CancelledError}if(await C.write(a,V),d)console.log(a);else P.success(`Agent created: ${a}`),k("Done")}})}}),J=h({command:"list",describe:"list all available agents",async handler(){await i.provide({directory:process.cwd(),async fn(){let l=(await L.runPromise(E.Service.use((t)=>t.list()))).sort((t,s)=>{if(t.native!==s.native)return t.native?-1:1;return t.name.localeCompare(s.name)});for(let t of l)process.stdout.write(`${t.name} (${t.mode})`+S),process.stdout.write(` ${JSON.stringify(t.permission,null,2)}`+S)}})}}),ne=h({command:"agent",describe:"manage agents",builder:(o)=>o.command(B).command(J).demandCommand(),async handler(){}});export{ne as AgentCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{o as L}from"./chunk-3gw6r3hf.js";import"./chunk-jw16f6t0.js";import{A as K}from"./chunk-4kqdzdv5.js";import{B as N}from"./chunk-gsez13bg.js";import{C as F,E as J}from"./chunk-c8k32724.js";import"./chunk-rqmvj7f4.js";import"./chunk-a9y27zd2.js";import"./chunk-pmv8yr8c.js";import{N as M}from"./chunk-132tcp2j.js";import"./chunk-jf6ry79j.js";import"./chunk-3bnqw3xp.js";import"./chunk-6sfhbckv.js";import"./chunk-5kmfnkzv.js";import"./chunk-jcjaw7tk.js";import{Pd as B}from"./chunk-9xvctnjr.js";import"./chunk-1mcsf4yb.js";import"./chunk-txqc7543.js";import"./chunk-p8k48st6.js";import{Sf as z}from"./chunk-9s4whpg1.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-w24660y4.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var x=B({command:"attach <url>",describe:"attach to a running qitqode server",builder:(j)=>j.positional("url",{type:"string",describe:"http://localhost:4096",demandOption:!0}).option("dir",{type:"string",description:"directory to run in"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],type:"string",describe:"session id to continue"}).option("fork",{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}),handler:async(j)=>{let Q=J();try{F();let q=N(j);if(q){z.error(q),process.exitCode=1;return}let R=(()=>{if(!j.dir)return;try{return process.chdir(j.dir),process.cwd()}catch{return j.dir}})(),S=M({password:j.password}),V=await K.get();await L({url:j.url,config:V,args:{continue:j.continue,sessionID:j.session,fork:j.fork},directory:R,headers:S})}finally{Q?.()}}});export{x as AttachCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Be as F}from"./chunk-cdh26622.js";import{Ne as z,Qe as B,ff as D}from"./chunk-b0jh0rby.js";import{Er as x}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as q}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{kQ as o}from"./chunk-4sazy0nq.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-60qyqqxx.js")).default();break;case"zod":a=(await import("./chunk-kwzawx7r.js")).default();break;default:a=(await import("./chunk-4tbqsrsn.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 vg,d as wg};
|