@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{iQ as d3,kQ as P5}from"./chunk-4sazy0nq.js";function R($,X,Y,J,Q){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?$!==X||!Q:!X.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?Q.call($,Y):Q?Q.value=Y:X.set($,Y),Y}function M($,X,Y,J){if(Y==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?$!==X||!J:!X.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?J:Y==="a"?J.call($):J?J.value:X.get($)}var t4=function(){let{crypto:$}=globalThis;if($?.randomUUID)return t4=$.randomUUID.bind($),$.randomUUID();let X=new Uint8Array(1),Y=$?()=>$.getRandomValues(X)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^Y()&15>>+J/4).toString(16))};function e$($){return typeof $==="object"&&$!==null&&(("name"in $)&&$.name==="AbortError"||("message"in $)&&String($.message).includes("FetchRequestCanceledException"))}var M8=($)=>{if($ instanceof Error)return $;if(typeof $==="object"&&$!==null){try{if(Object.prototype.toString.call($)==="[object Error]"){let X=Error($.message,$.cause?{cause:$.cause}:{});if($.stack)X.stack=$.stack;if($.cause&&!X.cause)X.cause=$.cause;if($.name)X.name=$.name;return X}}catch{}try{return Error(JSON.stringify($))}catch{}}return Error($)};class f extends Error{}class X$ extends f{constructor($,X,Y,J){super(`${X$.makeMessage($,X,Y)}`);this.status=$,this.headers=J,this.requestID=J?.get("request-id"),this.error=X}static makeMessage($,X,Y){let J=X?.message?typeof X.message==="string"?X.message:JSON.stringify(X.message):X?JSON.stringify(X):Y;if($&&J)return`${$} ${J}`;if($)return`${$} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate($,X,Y,J){if(!$||!J)return new f0({message:Y,cause:M8(X)});let Q=X;if($===400)return new E8($,Q,Y,J);if($===401)return new L8($,Q,Y,J);if($===403)return new Z8($,Q,Y,J);if($===404)return new S8($,Q,Y,J);if($===409)return new A8($,Q,Y,J);if($===422)return new C8($,Q,Y,J);if($===429)return new D8($,Q,Y,J);if($>=500)return new R8($,Q,Y,J);return new X$($,Q,Y,J)}}class q$ extends X${constructor({message:$}={}){super(void 0,void 0,$||"Request was aborted.",void 0)}}class f0 extends X${constructor({message:$,cause:X}){super(void 0,void 0,$||"Connection error.",void 0);if(X)this.cause=X}}class O8 extends f0{constructor({message:$}={}){super({message:$??"Request timed out."})}}class E8 extends X${}class L8 extends X${}class Z8 extends X${}class S8 extends X${}class A8 extends X${}class C8 extends X${}class D8 extends X${}class R8 extends X${}var o5=/^[a-z][a-z0-9+.-]*:/i,E7=($)=>{return o5.test($)},o4=($)=>(o4=Array.isArray,o4($)),e4=o4;function c6($){if(typeof $!=="object")return{};return $??{}}function L7($){if(!$)return!0;for(let X in $)return!1;return!0}function Z7($,X){return Object.prototype.hasOwnProperty.call($,X)}var S7=($,X)=>{if(typeof X!=="number"||!Number.isInteger(X))throw new f(`${$} must be an integer`);if(X<0)throw new f(`${$} must be a positive integer`);return X};var l6=($)=>{try{return JSON.parse($)}catch(X){return}};var A7=($)=>new Promise((X)=>setTimeout(X,$));var w0="0.71.2";var T7=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function e5(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var $Y=()=>{let $=e5();if($==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(Deno.build.os),"X-Stainless-Arch":C7(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if($==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(globalThis.process.platform??"unknown"),"X-Stainless-Arch":C7(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let X=XY();if(X)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${X.browser}`,"X-Stainless-Runtime-Version":X.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function XY(){if(typeof navigator>"u"||!navigator)return null;let $=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:X,pattern:Y}of $){let J=Y.exec(navigator.userAgent);if(J){let Q=J[1]||0,W=J[2]||0,z=J[3]||0;return{browser:X,version:`${Q}.${W}.${z}`}}}return null}var C7=($)=>{if($==="x32")return"x32";if($==="x86_64"||$==="x64")return"x64";if($==="arm")return"arm";if($==="aarch64"||$==="arm64")return"arm64";if($)return`other:${$}`;return"unknown"},D7=($)=>{if($=$.toLowerCase(),$.includes("ios"))return"iOS";if($==="android")return"Android";if($==="darwin")return"MacOS";if($==="win32")return"Windows";if($==="freebsd")return"FreeBSD";if($==="openbsd")return"OpenBSD";if($==="linux")return"Linux";if($)return`Other:${$}`;return"Unknown"},R7,_7=()=>{return R7??(R7=$Y())};function P7(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function $X(...$){let X=globalThis.ReadableStream;if(typeof X>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new X(...$)}function p6($){let X=Symbol.asyncIterator in $?$[Symbol.asyncIterator]():$[Symbol.iterator]();return $X({start(){},async pull(Y){let{done:J,value:Q}=await X.next();if(J)Y.close();else Y.enqueue(Q)},async cancel(){await X.return?.()}})}function T8($){if($[Symbol.asyncIterator])return $;let X=$.getReader();return{async next(){try{let Y=await X.read();if(Y?.done)X.releaseLock();return Y}catch(Y){throw X.releaseLock(),Y}},async return(){let Y=X.cancel();return X.releaseLock(),await Y,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function j7($){if($===null||typeof $!=="object")return;if($[Symbol.asyncIterator]){await $[Symbol.asyncIterator]().return?.();return}let X=$.getReader(),Y=X.cancel();X.releaseLock(),await Y}var k7=({headers:$,body:X})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(X)}};function b7($){let X=0;for(let Q of $)X+=Q.length;let Y=new Uint8Array(X),J=0;for(let Q of $)Y.set(Q,J),J+=Q.length;return Y}var x7;function _8($){let X;return(x7??(X=new globalThis.TextEncoder,x7=X.encode.bind(X)))($)}var f7;function XX($){let X;return(f7??(X=new globalThis.TextDecoder,f7=X.decode.bind(X)))($)}var Z$,S$;class N0{constructor(){Z$.set(this,void 0),S$.set(this,void 0),R(this,Z$,new Uint8Array,"f"),R(this,S$,null,"f")}decode($){if($==null)return[];let X=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?_8($):$;R(this,Z$,b7([M(this,Z$,"f"),X]),"f");let Y=[],J;while((J=QY(M(this,Z$,"f"),M(this,S$,"f")))!=null){if(J.carriage&&M(this,S$,"f")==null){R(this,S$,J.index,"f");continue}if(M(this,S$,"f")!=null&&(J.index!==M(this,S$,"f")+1||J.carriage)){Y.push(XX(M(this,Z$,"f").subarray(0,M(this,S$,"f")-1))),R(this,Z$,M(this,Z$,"f").subarray(M(this,S$,"f")),"f"),R(this,S$,null,"f");continue}let Q=M(this,S$,"f")!==null?J.preceding-1:J.preceding,W=XX(M(this,Z$,"f").subarray(0,Q));Y.push(W),R(this,Z$,M(this,Z$,"f").subarray(J.index),"f"),R(this,S$,null,"f")}return Y}flush(){if(!M(this,Z$,"f").length)return[];return this.decode(`
|
|
3
3
|
`)}}Z$=new WeakMap,S$=new WeakMap;N0.NEWLINE_CHARS=new Set([`
|
|
4
4
|
`,"\r"]);N0.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function QY($,X){for(let Q=X??0;Q<$.length;Q++){if($[Q]===10)return{preceding:Q,index:Q+1,carriage:!1};if($[Q]===13)return{preceding:Q,index:Q+1,carriage:!0}}return null}function I7($){for(let J=0;J<$.length-1;J++){if($[J]===10&&$[J+1]===10)return J+2;if($[J]===13&&$[J+1]===13)return J+2;if($[J]===13&&$[J+1]===10&&J+3<$.length&&$[J+2]===13&&$[J+3]===10)return J+4}return-1}var n6={off:0,error:200,warn:300,info:400,debug:500},YX=($,X,Y)=>{if(!$)return;if(Z7(n6,$))return $;G$(Y).warn(`${X} was set to ${JSON.stringify($)}, expected one of ${JSON.stringify(Object.keys(n6))}`);return};function P8(){}function i6($,X,Y){if(!X||n6[$]>n6[Y])return P8;else return X[$].bind(X)}var WY={error:P8,warn:P8,info:P8,debug:P8},v7=new WeakMap;function G$($){let X=$.logger,Y=$.logLevel??"off";if(!X)return WY;let J=v7.get(X);if(J&&J[0]===Y)return J[1];let Q={error:i6("error",X,Y),warn:i6("warn",X,Y),info:i6("info",X,Y),debug:i6("debug",X,Y)};return v7.set(X,[Y,Q]),Q}var $0=($)=>{if($.options)$.options={...$.options},delete $.options.headers;if($.headers)$.headers=Object.fromEntries(($.headers instanceof Headers?[...$.headers]:Object.entries($.headers)).map(([X,Y])=>[X,X.toLowerCase()==="x-api-key"||X.toLowerCase()==="authorization"||X.toLowerCase()==="cookie"||X.toLowerCase()==="set-cookie"?"***":Y]));if("retryOfRequestLogID"in $){if($.retryOfRequestLogID)$.retryOf=$.retryOfRequestLogID;delete $.retryOfRequestLogID}return $};var j8;class A${constructor($,X,Y){this.iterator=$,j8.set(this,void 0),this.controller=X,R(this,j8,Y,"f")}static fromSSEResponse($,X,Y){let J=!1,Q=Y?G$(Y):console;async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of zY($,X)){if(G.event==="completion")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="message_start"||G.event==="message_delta"||G.event==="message_stop"||G.event==="content_block_start"||G.event==="content_block_delta"||G.event==="content_block_stop")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="ping")continue;if(G.event==="error")throw new X$(void 0,l6(G.data)??G.data,void 0,$.headers)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}static fromReadableStream($,X,Y){let J=!1;async function*Q(){let z=new N0,G=T8($);for await(let V of G)for(let H of z.decode(V))yield H;for(let V of z.flush())yield V}async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of Q()){if(z)continue;if(G)yield JSON.parse(G)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}[(j8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let $=[],X=[],Y=this.iterator(),J=(Q)=>{return{next:()=>{if(Q.length===0){let W=Y.next();$.push(W),X.push(W)}return Q.shift()}}};return[new A$(()=>J($),this.controller,M(this,j8,"f")),new A$(()=>J(X),this.controller,M(this,j8,"f"))]}toReadableStream(){let $=this,X;return $X({async start(){X=$[Symbol.asyncIterator]()},async pull(Y){try{let{value:J,done:Q}=await X.next();if(Q)return Y.close();let W=_8(JSON.stringify(J)+`
|
|
5
5
|
`);Y.enqueue(W)}catch(J){Y.error(J)}},async cancel(){await X.return?.()}})}}async function*zY($,X){if(!$.body){if(X.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new f("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new f("Attempted to iterate over a response with no body")}let Y=new y7,J=new N0,Q=T8($.body);for await(let W of GY(Q))for(let z of J.decode(W)){let G=Y.decode(z);if(G)yield G}for(let W of J.flush()){let z=Y.decode(W);if(z)yield z}}async function*GY($){let X=new Uint8Array;for await(let Y of $){if(Y==null)continue;let J=Y instanceof ArrayBuffer?new Uint8Array(Y):typeof Y==="string"?_8(Y):Y,Q=new Uint8Array(X.length+J.length);Q.set(X),Q.set(J,X.length),X=Q;let W;while((W=I7(X))!==-1)yield X.slice(0,W),X=X.slice(W)}if(X.length>0)yield X}class y7{constructor(){this.event=null,this.data=[],this.chunks=[]}decode($){if($.endsWith("\r"))$=$.substring(0,$.length-1);if(!$){if(!this.event&&!this.data.length)return null;let Q={event:this.event,data:this.data.join(`
|
|
@@ -99,4 +99,4 @@ ${Q.content}`:Q.content;continue}if(Q.role==="user"){let W=[];for(let z of Q.con
|
|
|
99
99
|
`,wW=600000,d5=class{config;fetchFn;cache=new Map;constructor($){this.config=$,this.fetchFn=$.fetch??fetch}async discover($){let X=this.cache.get($);if(X&&X.expiresAt>Date.now())return X.data;let Y=`${this.config.instanceUrl}/api/graphql`;try{let J=await this.fetchFn(Y,{method:"POST",headers:{...this.config.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({query:qW,variables:{rootNamespaceId:$}})});if(!J.ok){let H=await J.text();throw new x({message:`Model discovery GraphQL request failed: ${J.status} ${J.statusText} - ${H}`,statusCode:J.status,responseBody:H})}let Q=await J.json();if(Q.errors&&Q.errors.length>0)throw new x({message:`Model discovery GraphQL errors: ${Q.errors.map((H)=>H.message).join(", ")}`});let W=Q.data?.aiChatAvailableModels,z=Q.data?.metadata,G=z?.featureFlags?.find((H)=>H.name==="ai_user_model_switching")?.enabled??!1,V={defaultModel:W?.defaultModel??null,selectableModels:W?.selectableModels??[],pinnedModel:W?.pinnedModel??null,modelSwitchingEnabled:G,instanceVersion:z?.version??null};return this.cache.set($,{data:V,expiresAt:Date.now()+wW}),V}catch(J){if(J instanceof x)throw J;throw new x({message:`Model discovery failed: ${J}`,cause:J})}}async getEffectiveModelRef($,X){let Y=await this.discover($);if(Y.pinnedModel)return Y.pinnedModel.ref;if(X&&Y.modelSwitchingEnabled){if(Y.selectableModels.some((Q)=>Q.ref===X))return X}return Y.defaultModel?.ref??null}invalidateCache(){this.cache.clear()}},NW=600000;function UW(){let $=process.env.XDG_CACHE_HOME||h6.join(c5.homedir(),".cache");return h6.join($,"opencode","gitlab-workflow-model-cache.json")}function FW($,X){let Y=(X||"https://gitlab.com").replace(/\/$/,"");return l5.createHash("sha256").update(`${$}\x00${Y}`).digest("hex").slice(0,12)}var p5=class{filePath;key;constructor($,X){this.filePath=UW(),this.key=FW($,X)}readAll(){try{if(!u$.existsSync(this.filePath))return{};let $=u$.readFileSync(this.filePath,"utf-8");return JSON.parse($)}catch{return{}}}writeAll($){try{let X=h6.dirname(this.filePath);u$.mkdirSync(X,{recursive:!0,mode:448}),u$.writeFileSync(this.filePath,JSON.stringify($,null,2),{mode:384})}catch{}}load(){return this.readAll()[this.key]??null}save($){let X=this.readAll();X[this.key]=$,this.writeAll(X)}isDiscoveryExpired(){let $=this.load();if(!$?.discovery||!$.updatedAt)return!0;return Date.now()-new Date($.updatedAt).getTime()>NW}saveDiscovery($,X){let Y=this.load();this.save({discovery:$,project:X!==void 0?X:Y?.project??null,selectedModelRef:Y?.selectedModelRef??null,selectedModelName:Y?.selectedModelName??null,updatedAt:new Date().toISOString()})}saveSelection($,X){let Y=this.load(),J=X;if(!J&&$&&Y?.discovery){let Q=Y.discovery;J=(Q.pinnedModel?.ref===$?Q.pinnedModel:Q.selectableModels.find((z)=>z.ref===$)??(Q.defaultModel?.ref===$?Q.defaultModel:null))?.name??null}this.save({discovery:Y?.discovery??null,project:Y?.project??null,selectedModelRef:$,selectedModelName:J,updatedAt:new Date().toISOString()})}clear(){let $=this.readAll();if(delete $[this.key],Object.keys($).length===0)try{if(u$.existsSync(this.filePath))u$.unlinkSync(this.filePath)}catch{}else this.writeAll($)}getSelectedModelRef(){return this.load()?.selectedModelRef??null}getSelectedModelName(){return this.load()?.selectedModelName??null}getDiscovery(){return this.load()?.discovery??null}};function B7($){if(!$||typeof $!=="object")return $;let X={};for(let[Y,J]of Object.entries($)){if(Y==="description"||Y==="examples"||Y==="default")continue;if(Y==="properties"&&typeof J==="object"&&J!==null){let Q={};for(let[W,z]of Object.entries(J))if(typeof z==="object"&&z!==null)Q[W]=B7(z);else Q[W]=z;X[Y]=Q}else if(Y==="items"&&typeof J==="object"&&J!==null)X[Y]=B7(J);else X[Y]=J}return X}function MW($){try{return JSON.stringify(B7(JSON.parse($)))}catch{return $}}function OW($){if(!$||typeof $!=="object")return $;let X={type:$.type||"object"};if($.required)X.required=$.required;if($.properties&&typeof $.properties==="object"){let Y={};for(let[J,Q]of Object.entries($.properties))if(typeof Q==="object"&&Q!==null){let W=Q;Y[J]={type:W.type||"string"}}else Y[J]={type:"string"};X.properties=Y}return X}function EW($){try{return JSON.stringify(OW(JSON.parse($)))}catch{return $}}var LW=class ${specificationVersion="v3";modelId;supportedUrls={};config;workflowOptions;tokenClient;projectDetector;modelDiscovery;modelCache;detectedProjectPath=null;sessionWorkflows=new Map;currentWorkflowId=null;currentWorkflowDefinition=null;persistedAgentEmitted=new Map;activeClients=new Set;_selectedModelRef;_selectedModelName;_rootNamespaceId;_discoveryPromise;get selectedModelRef(){return this._selectedModelRef??null}set selectedModelRef(X){this._selectedModelRef=X??void 0,this._selectedModelName=void 0,this.modelCache.saveSelection(X,null)}get selectedModelName(){return this._selectedModelName??null}set selectedModelName(X){this._selectedModelName=X??void 0,this.modelCache.saveSelection(this._selectedModelRef??null,X)}_toolExecutor=null;onUsageUpdate=null;sessionPreapprovedTools=[];sessionID="";set approvalHandler(X){this.workflowOptions.approvalHandler=X??void 0}get approvalHandler(){return this.workflowOptions.approvalHandler??null}onSelectModel=null;set systemPrompt(X){this.workflowOptions.systemPrompt=X??void 0}get systemPrompt(){return this.workflowOptions.systemPrompt??null}get toolExecutor(){return this._toolExecutor}set toolExecutor(X){if(X)try{let{AsyncResource:Y}=N7("async_hooks");this._toolExecutor=Y.bind(X)}catch{this._toolExecutor=X}else this._toolExecutor=null}constructor(X,Y,J={}){this.modelId=X,this.config=Y,this.workflowOptions=J;let Q=J.workingDirectory??process.cwd();this.modelCache=new p5(Q,Y.instanceUrl);let W=this.modelCache.load();if(W?.selectedModelRef)this._selectedModelRef=W.selectedModelRef;if(W?.selectedModelName)this._selectedModelName=W.selectedModelName;this.tokenClient=new HW({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,refreshApiKey:Y.refreshApiKey,fetch:Y.fetch,featureFlags:Y.featureFlags}),this.projectDetector=new u5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch}),this.modelDiscovery=new d5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch})}get provider(){return this.config.provider}async resolveProjectId(){if(this.workflowOptions.projectId)return this.workflowOptions.projectId;if(this.detectedProjectPath)return this.detectedProjectPath;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y)return this.detectedProjectPath=Y.pathWithNamespace,Y.pathWithNamespace;return}async resolveRootNamespaceId(){if(this.workflowOptions.rootNamespaceId)return this.workflowOptions.rootNamespaceId;if(this._rootNamespaceId!==void 0)return this._rootNamespaceId;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y?.namespaceId){let J=`gid://gitlab/Group/${Y.namespaceId}`;return this._rootNamespaceId=J,J}return this._rootNamespaceId=null,null}async resolveModelRef(){let X=sQ(this.modelId);if(this.modelId!=="duo-workflow")return X??"default";if(this._selectedModelRef)return this._selectedModelRef;if(!this._discoveryPromise)this._discoveryPromise=this.doResolveModelRef(),this._discoveryPromise.finally(()=>{this._discoveryPromise=void 0});return this._discoveryPromise}async doResolveModelRef(){let X=await this.resolveRootNamespaceId();if(!X)return this._selectedModelRef="default","default";try{let Y=await this.modelDiscovery.discover(X);if(this.modelCache.saveDiscovery(Y),Y.pinnedModel)return this._selectedModelRef=Y.pinnedModel.ref,this._selectedModelName=Y.pinnedModel.name,this.modelCache.saveSelection(Y.pinnedModel.ref,Y.pinnedModel.name),Y.pinnedModel.ref;let J=this.onSelectModel??this.workflowOptions.onSelectModel;if(Y.selectableModels.length>0&&J){let Q=await J(Y.selectableModels);if(Q){let W=Y.selectableModels.find((z)=>z.ref===Q);if(W)return this._selectedModelRef=W.ref,this._selectedModelName=W.name,this.modelCache.saveSelection(W.ref,W.name),W.ref}}if(Y.defaultModel)return this._selectedModelRef=Y.defaultModel.ref,this._selectedModelName=Y.defaultModel.name,this.modelCache.saveSelection(Y.defaultModel.ref,Y.defaultModel.name),Y.defaultModel.ref}catch{let Y=this.modelCache.load();if(Y?.selectedModelRef)return this._selectedModelRef=Y.selectedModelRef,this._selectedModelName=Y.selectedModelName??void 0,Y.selectedModelRef}return this._selectedModelRef="default","default"}async discoverModels(X){let Y=await this.modelDiscovery.discover(X);return this.modelCache.saveDiscovery(Y),Y}getModelCache(){return this.modelCache}stopWorkflow(){for(let X of this.activeClients)if(X.isConnected)X.stop()}resetWorkflow(X){if(X)this.sessionWorkflows.delete(X);else this.sessionWorkflows.clear(),this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}get workflowId(){return this.currentWorkflowId}createUsage(X){return{inputTokens:{total:X?.inputTotal,noCache:X?.inputTotal,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X?.outputTotal,text:X?.outputTotal,reasoning:void 0}}}createFinishReason(X,Y){return{unified:X,raw:Y}}async doGenerate(X){let{stream:Y}=await this.doStream(X),J=Y.getReader(),Q=[],W=[],z={unified:"other",raw:void 0},G=this.createUsage();try{while(!0){let{done:q,value:w}=await J.read();if(q)break;switch(w.type){case"text-delta":Q.push(w.delta);break;case"tool-call":W.push({type:"tool-call",toolCallId:w.toolCallId,toolName:w.toolName,input:w.input});break;case"finish":if(z=w.finishReason,w.usage)G=w.usage;break;case"error":throw w.error}}}finally{J.releaseLock()}let V=[],H=Q.join("");if(H)V.push({type:"text",text:H});return V.push(...W),{content:V,finishReason:z,usage:G,warnings:[]}}async doStream(X){let Y=this.extractGoalFromPrompt(X.prompt),J=await this.resolveModelRef(),Q=this.extractMcpTools(X),W=[...this.workflowOptions.preapprovedTools??Q.map((a)=>a.name),...this.sessionPreapprovedTools],z=this.buildAdditionalContext(X.prompt),G=this.toolExecutor??null,V=new Set(X.tools?.map((a)=>a.name)??[]),H=X.providerOptions?.gitlab,q=H?.workflowDefinition??this.workflowOptions.workflowDefinition,w=H?.flowConfig??void 0,B=H?.flowConfigSchemaVersion??void 0,U=H?.aiCatalogItemVersionId??void 0;await this.tokenClient.getToken(q??y6,this.workflowOptions.rootNamespaceId);let O=await this.resolveProjectId(),P=w??q??y6,j=this.sessionID,L=this.sessionWorkflows.get(j);if(L&&L.workflowDefinition!==P)this.sessionWorkflows.delete(j),L=void 0;let A=j==="";if(A&&this.currentWorkflowId&&this.currentWorkflowDefinition!==P)this.currentWorkflowId=null,this.currentWorkflowDefinition=null;let E;if(L)E=L.workflowId;else if(A&&this.currentWorkflowId)E=this.currentWorkflowId;else if(E=await this.tokenClient.createWorkflow(Y,{projectId:O,namespaceId:this.workflowOptions.namespaceId,workflowDefinition:q,agentPrivileges:this.workflowOptions.agentPrivileges,aiCatalogItemVersionId:U}),A)this.currentWorkflowId=E,this.currentWorkflowDefinition=P;else this.sessionWorkflows.set(j,{workflowId:E,workflowDefinition:P,agentEmitted:new Map,toolEntries:new Set}),L=this.sessionWorkflows.get(j);let _=new x5;this.activeClients.add(_);let c=0,n={streamClosed:!1,streamedInputChars:0,streamedOutputChars:0,pendingToolCount:0,approvalPending:!1,deferredClose:null,activeTextBlockId:null,agentMessageEmitted:new Map(L?.agentEmitted??this.persistedAgentEmitted),currentAgentMessageId:"",activeClient:_,processedRequestIDs:new Set,emittedToolEntries:new Set(L?.toolEntries),emittedToolKeys:new Set,sessionKey:j};for(let a of X.prompt)if(a.role==="system")n.streamedInputChars+=a.content.length;else if(a.role==="user"){for(let u of a.content)if(u.type==="text")n.streamedInputChars+=u.text.length}let p;return{stream:new ReadableStream({start:async(a)=>{try{await _.connect({instanceUrl:this.config.instanceUrl,modelRef:J,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition},(s4)=>{this.handleWorkflowEvent(n,s4,a,_,G,()=>`text-${c++}`,V,p,{aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition})});let u=q??y6,x$=this.workflowOptions.clientCapabilities??$W,u6=await this.buildWorkflowMetadata(),w2=JSON.stringify(u6),d6=JSON.stringify({workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,clientCapabilities:x$,preapproved_tools:W}).length+100,r4=this.trimPayload(Q,z,d6),r5=W.filter((s4)=>r4.mcpTools.some((s5)=>s5.name===s4));p={workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,additional_context:r4.additionalContext,clientCapabilities:x$,mcpTools:r4.mcpTools,preapproved_tools:r5};let M7=w??this.workflowOptions.flowConfig,O7=B??this.workflowOptions.flowConfigSchemaVersion;if(M7)p.flowConfig=M7;if(O7)p.flowConfigSchemaVersion=O7;else if(p.flowConfig)p.flowConfigSchemaVersion="v1";_.sendStartRequest(p),a.enqueue({type:"stream-start",warnings:[]}),a.enqueue({type:"response-metadata",id:E,modelId:J})}catch(u){if(!n.streamClosed)a.enqueue({type:"error",error:u instanceof x?u:new x({message:`Workflow connection failed: ${u}`,cause:u})}),n.streamClosed=!0,a.close()}},cancel:(a)=>{if(_.stop(),_.close(),this.activeClients.delete(_),n.activeClient=null,!n.streamClosed)if(n.sessionKey)this.sessionWorkflows.delete(n.sessionKey);else this.currentWorkflowId=null}}),request:{body:{workflowId:E,modelRef:J,goal:Y}}}}handleWorkflowEvent(X,Y,J,Q,W,z,G,V,H){if(X.streamClosed)return;switch(Y.type){case"checkpoint":{this.processCheckpoint(X,Y.data,J,z);break}case"tool-request":{let{requestID:q,data:w}=Y;if(X.processedRequestIDs.has(q))break;X.processedRequestIDs.add(q),X.emittedToolKeys.add(w.name);let B;try{JSON.parse(w.args),B=w.args}catch{B=w.args||"{}"}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:q,toolName:w.name,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:q,delta:B}),J.enqueue({type:"tool-input-end",id:q}),J.enqueue({type:"tool-call",toolCallId:q,toolName:w.name,input:B,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,q,w.name,B,W).catch(()=>{});break}case"builtin-tool-request":{if(X.processedRequestIDs.has(Y.requestID))break;X.processedRequestIDs.add(Y.requestID);let q=WW(Y.toolName,Y.data,G);X.emittedToolKeys.add(q.toolName);let w=JSON.stringify(q.args);if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:Y.requestID,toolName:q.toolName,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:Y.requestID,delta:w}),J.enqueue({type:"tool-input-end",id:Y.requestID}),J.enqueue({type:"tool-call",toolCallId:Y.requestID,toolName:q.toolName,input:w,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,Y.requestID,q.toolName,w,W).catch(()=>{});break}case"approval-required":{X.approvalPending=!0,this.approveAndResume(X,Y.tools,V,J,W,z,G,H).catch((q)=>{if(X.approvalPending=!1,X.deferredClose){let w=X.deferredClose;X.deferredClose=null,w()}});break}case"completed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","completed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}case"failed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"error",error:new x({message:`Workflow failed: ${g6(Y.error.message)}`,cause:Y.error})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);break}case"closed":{if(X.streamClosed)break;if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;if(Y.code!==1000)J.enqueue({type:"error",error:new x({message:`WebSocket closed unexpectedly: code=${Y.code} reason=${g6(Y.reason)}`,statusCode:Y.code})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);else{let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","closed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)}};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}}}processCheckpoint(X,Y,J,Q){if(!Y.checkpoint){if(Y.content){if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:Y.content}),X.streamedOutputChars+=Y.content.length}return}let W;try{W=JSON.parse(Y.checkpoint)}catch(G){return}let z=W.channel_values?.ui_chat_log;if(!z||!Array.isArray(z)||z.length===0)return;if(Y.status!=="RUNNING"&&Y.status!=="INPUT_REQUIRED"&&Y.status!=="FINISHED"&&Y.status!=="COMPLETED"&&Y.status!=="TOOL_CALL_APPROVAL_REQUIRED")return;for(let G=0;G<z.length;G++){let V=z[G];if(V.message_type==="tool"&&V.tool_info){let P=V.message_id||V.correlation_id||`tool-${G}`;if(X.emittedToolEntries.has(P))continue;let j=V.tool_info.name,L=JSON.stringify(V.tool_info.args??{});if(X.emittedToolKeys.has(j)){X.emittedToolEntries.add(P);let c=this.sessionWorkflows.get(X.sessionKey);if(c)c.toolEntries.add(P);continue}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:P,toolName:j,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:P,delta:L}),J.enqueue({type:"tool-input-end",id:P}),J.enqueue({type:"tool-call",toolCallId:P,toolName:j,input:L,providerExecuted:!0,dynamic:!0});let A=V.tool_info.tool_response,E=typeof A==="string"?A:A?A.content:V.content||"";J.enqueue({type:"tool-result",toolCallId:P,toolName:j,result:{output:E,title:j,metadata:{}},isError:!1}),X.emittedToolEntries.add(P);let _=this.sessionWorkflows.get(X.sessionKey);if(_)_.toolEntries.add(P);continue}if(V.message_type!=="agent")continue;let H=V.content||"",q=V.message_id||`idx-${G}`,w=X.agentMessageEmitted.get(q)??0;if(H.length<=w)continue;let B=H.slice(w);if(q!==X.currentAgentMessageId&&X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:B}),X.streamedOutputChars+=B.length,X.agentMessageEmitted.set(q,H.length),(this.sessionWorkflows.get(X.sessionKey)?.agentEmitted??this.persistedAgentEmitted).set(q,H.length),X.currentAgentMessageId=q}}async executeToolAndRespond(X,Y,J,Q,W,z,G){X.pendingToolCount++;let V=(H)=>{if(X.streamClosed)return;try{J.enqueue(H)}catch{}};try{if(G){let H=await G(W,z,Q);if(H.error&&/^Unknown tool:/.test(H.error)){let U=zW(W,z);if(U)H=U}Y.sendActionResponse(Q,H.result,H.error),X.streamedInputChars+=z.length,X.streamedOutputChars+=H.result.length;let q=H.result,w=H.title??`${W} result`,B=H.metadata??{output:H.result};if(H.error){let U;if(typeof H.error==="string")U=H.error;else if(H.error&&typeof H.error==="object")U=JSON.stringify(H.error);else U=String(H.error);V({type:"tool-result",toolCallId:Q,toolName:W,result:U,isError:!0})}else V({type:"tool-result",toolCallId:Q,toolName:W,result:{output:q,title:w,metadata:B},isError:!1})}else{let H=`Tool executor not configured for tool: ${W}`;Y.sendActionResponse(Q,"",H),V({type:"tool-result",toolCallId:Q,toolName:W,result:H,isError:!0})}}catch(H){let q=H instanceof Error?H.message:String(H),w=g6(q);Y.sendActionResponse(Q,"",w),V({type:"tool-result",toolCallId:Q,toolName:W,result:w,isError:!0})}finally{if(X.pendingToolCount--,this.onUsageUpdate)try{this.onUsageUpdate({inputTokens:Math.ceil(X.streamedInputChars/4),outputTokens:Math.ceil(X.streamedOutputChars/4)})}catch{}if(X.pendingToolCount<=0&&X.deferredClose){let H=X.deferredClose;X.deferredClose=null,H()}}}cleanupClient(X,Y=!1){if(X.activeClient)X.activeClient.close(),this.activeClients.delete(X.activeClient),X.activeClient=null;if(Y)if(X.sessionKey)this.sessionWorkflows.delete(X.sessionKey);else this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}async approveAndResume(X,Y,J,Q,W,z,G,V){let H=this.workflowOptions.approvalHandler;if(!H||!J){if(X.approvalPending=!1,X.deferredClose){let P=X.deferredClose;X.deferredClose=null,P()}return}let q;try{q=await H(Y)}catch(P){if(X.approvalPending=!1,!X.streamClosed)Q.error(P);return}X.approvalPending=!1,X.deferredClose=null,this.cleanupClient(X,!1);let w=q.approved?{approval:{tool_name:Y[0]?.name,tool_args_json:Y[0]?.args}}:{rejection:{message:q.message??"User rejected"}},B={...J,approval:w,preapproved_tools:q.approved?[...J.preapproved_tools??[],...Y.map((P)=>P.name)]:J.preapproved_tools??[]},U=new x5;this.activeClients.add(U),X.activeClient=U;let O=await this.resolveModelRef();try{await U.connect({instanceUrl:this.config.instanceUrl,modelRef:O,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:V?.aiCatalogItemVersionId,workflowDefinition:V?.workflowDefinition},(P)=>this.handleWorkflowEvent(X,P,Q,U,W,z,G,B,V)),U.sendStartRequest(B)}catch(P){if(this.cleanupClient(X,!0),!X.streamClosed)Q.error(P)}}async buildWorkflowMetadata(){let X={extended_logging:!1,tool_approval_for_session_enabled:!0};try{let Y=this.workflowOptions.workingDirectory??process.cwd(),J=await this.getGitInfo(Y);if(J.url)X.git_url=J.url;if(J.sha)X.git_sha=J.sha;if(J.branch)X.git_branch=J.branch}catch{}return X}async getGitInfo(X){let{execFile:Y}=await import("child_process"),{promisify:J}=await import("util"),Q=J(Y),W={cwd:X,timeout:3000},z=async(q,w)=>{try{let{stdout:B}=await Q(q,w,W);return B.trim()||void 0}catch{return}},[G,V,H]=await Promise.all([z("git",["remote","get-url","origin"]),z("git",["rev-parse","HEAD"]),z("git",["rev-parse","--abbrev-ref","HEAD"])]);return{url:G,sha:V,branch:H}}static SYSTEM_REMINDER_RE=/<system-reminder>([\s\S]*?)<\/system-reminder>/g;extractGoalFromPrompt(X){for(let Y=X.length-1;Y>=0;Y--){let J=X[Y];if(J.role==="user"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text);if(Q.length>0){let W=Q.join(`
|
|
100
100
|
`);return W.replace($.SYSTEM_REMINDER_RE,"").trim()||W}}}return""}extractMcpTools(X){if(this.workflowOptions.mcpTools&&this.workflowOptions.mcpTools.length>0)return this.workflowOptions.mcpTools;if(!X.tools||X.tools.length===0)return[];return X.tools.filter((Y)=>Y.type==="function").map((Y)=>({name:Y.name,description:Y.description||"",inputSchema:JSON.stringify(Y.inputSchema||{type:"object",properties:{}})}))}static MAX_START_REQUEST_BYTES=4194304;trimPayload(X,Y,J){let Q=$.MAX_START_REQUEST_BYTES-J,W=JSON.stringify(Y);if(JSON.stringify(X).length+W.length<=Q)return{mcpTools:X,additionalContext:Y};let V=X.map((U)=>({name:U.name,description:U.description,inputSchema:MW(U.inputSchema)}));if(JSON.stringify(V).length+W.length<=Q)return{mcpTools:V,additionalContext:Y};let q=V.map((U)=>({name:U.name,description:U.description,inputSchema:EW(U.inputSchema)}));if(JSON.stringify(q).length+W.length<=Q)return{mcpTools:q,additionalContext:Y};let B=[...q];while(B.length>0){if(JSON.stringify(B).length+W.length<=Q)break;B.pop()}return{mcpTools:B,additionalContext:Y}}buildAdditionalContext(X){let Y=[];if(this.workflowOptions.additionalContext)Y.push(...this.workflowOptions.additionalContext);for(let J of X)if(J.role==="system")Y.push({category:"system_prompt",content:J.content,metadata:JSON.stringify({role:"system"})});else if(J.role==="assistant"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text).join(`
|
|
101
101
|
`);if(Q)Y.push({category:"conversation",content:Q,metadata:JSON.stringify({role:"assistant"})})}else if(J.role==="user"){for(let Q of J.content)if(Q.type==="text"){let z=Q.text.matchAll($.SYSTEM_REMINDER_RE);for(let G of z){let V=G[1].trim();if(V)Y.push({category:"agent_context",content:V,metadata:JSON.stringify({source:"system-reminder"})})}}}return Y}},ZW="1d89f9fdb23ee96d4e603201f6861dab6e143c5c3c00469a018a2d94bdc03d4e",vE="36f2a70cddeb5a0889d4fd8295c241b7e9848e89cf9e599d0eed2d8e5350fbf5",SW="https://gitlab.com",AW=300000,yE=["api"],CW=class{fetch;constructor($=fetch){this.fetch=$}isTokenExpired($){return Date.now()>=$}needsRefresh($){return Date.now()>=$-AW}async refreshIfNeeded($,X){if(!this.needsRefresh($.expiresAt))return $;if(this.isTokenExpired($.expiresAt))throw new x({message:"OAuth token has expired and cannot be used"});return this.exchangeRefreshToken({instanceUrl:$.instanceUrl,refreshToken:$.refreshToken,clientId:X})}async exchangeAuthorizationCode($){let{instanceUrl:X,code:Y,codeVerifier:J,clientId:Q,redirectUri:W}=$,z=await this.exchangeToken({instanceUrl:X,grantType:"authorization_code",code:Y,codeVerifier:J,clientId:Q||this.getClientId(X),redirectUri:W});return this.createTokensFromResponse(z,X)}async exchangeRefreshToken($){let{instanceUrl:X,refreshToken:Y,clientId:J}=$,Q=await this.exchangeToken({instanceUrl:X,grantType:"refresh_token",refreshToken:Y,clientId:J||this.getClientId(X)});return this.createTokensFromResponse(Q,X)}getClientId($){let X=process.env.GITLAB_OAUTH_CLIENT_ID;if(X)return X;if($===SW)return ZW;throw new x({message:`No OAuth client ID configured for instance ${$}. Please provide a clientId parameter or set GITLAB_OAUTH_CLIENT_ID environment variable.`})}async exchangeToken($){let{instanceUrl:X,grantType:Y,code:J,codeVerifier:Q,refreshToken:W,clientId:z,redirectUri:G}=$,V={client_id:z,grant_type:Y};if(Y==="authorization_code"){if(!J||!Q||!G)throw new x({message:"Authorization code, code verifier, and redirect URI are required for authorization_code grant"});V.code=J,V.code_verifier=Q,V.redirect_uri=G}else if(Y==="refresh_token"){if(!W)throw new x({message:"Refresh token is required for refresh_token grant"});V.refresh_token=W}let H=`${X}/oauth/token`;try{let q=await this.fetch(H,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(V).toString()});if(!q.ok){let B=await q.text();throw new x({message:`OAuth token exchange failed: ${q.status} ${q.statusText}`,cause:Error(B)})}return await q.json()}catch(q){if(q instanceof x)throw q;throw new x({message:`Failed to exchange OAuth token: ${q instanceof Error?q.message:String(q)}`,cause:q instanceof Error?q:void 0})}}createTokensFromResponse($,X){let Y=this.createExpiresTimestamp($);return{accessToken:$.access_token,refreshToken:$.refresh_token||"",expiresAt:Y,instanceUrl:X}}createExpiresTimestamp($){let X=$.created_at*1000,Y=$.expires_in*1000;return X+Y}};function n5(){let $=i5.homedir(),X=process.env.XDG_DATA_HOME;if(X)return a4.join(X,"opencode","auth.json");if(process.platform!=="win32")return a4.join($,".local","share","opencode","auth.json");return a4.join($,".opencode","auth.json")}async function DW($){try{let X=n5();if(!q2.existsSync(X))return;let Y=JSON.parse(q2.readFileSync(X,"utf-8"));if(Y.gitlab?.type==="oauth"){let W=Y.gitlab;if(W.enterpriseUrl===$||W.enterpriseUrl===$.replace(/\/$/,""))return W}let J=$.replace(/\/$/,"");return Y[J]||Y[`${J}/`]}catch(X){throw Error(`Failed to load auth.json: ${X instanceof Error?X.message:X}`)}}async function v5($,X,Y){if($.apiKey)return $.apiKey;let J=await DW(X);if(J?.type==="oauth"){let W=new CW;if(W.needsRefresh(J.expires))try{let z=await W.exchangeRefreshToken({instanceUrl:X,refreshToken:J.refresh,clientId:Y}),G=n5(),V=JSON.parse(q2.readFileSync(G,"utf-8"));return V.gitlab={type:"oauth",refresh:z.refreshToken,access:z.accessToken,expires:z.expiresAt,enterpriseUrl:X},q2.writeFileSync(G,JSON.stringify(V,null,2),{mode:384}),z.accessToken}catch(z){let G=z instanceof Error?z.message:String(z),V=process.env[$.environmentVariableName];if(V)return V;throw new x({message:`OAuth token refresh failed and no fallback ${$.environmentVariableName} environment variable is set. Refresh error: ${G}. Re-authenticate with 'opencode auth login gitlab' or set ${$.environmentVariableName}.`})}else return J.access}let Q=process.env[$.environmentVariableName];if(!Q)throw new x({message:`${$.description} API key is missing. Pass it as the 'apiKey' parameter, set the ${$.environmentVariableName} environment variable, or authenticate with 'opencode auth login gitlab'.`});return Q}function RW($,X){let Y=$["User-Agent"];return{...$,"User-Agent":Y?`${Y} ${X}`:X}}function TW($={}){let X=$.instanceUrl??process.env.GITLAB_INSTANCE_URL??"https://gitlab.com",Y=$.name??"gitlab",J,Q,W=async()=>{if(J)return J;if(Q)return Q;return Q=v5({apiKey:$.apiKey,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId),J=await Q,Q=void 0,J},z=async()=>{J=void 0,Q=void 0,J=await v5({apiKey:void 0,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId)},G=()=>{let B=J||$.apiKey||process.env.GITLAB_TOKEN||"";if(!B)throw new x({message:"GitLab API key is missing. Pass it as the 'apiKey' parameter, set the GITLAB_TOKEN environment variable, or authenticate with 'opencode auth login gitlab'."});return RW({Authorization:`Bearer ${B}`,"Content-Type":"application/json",...$.headers},`ai-sdk-gitlab/${H7}`)};W().catch(()=>{});let V=(B,U)=>{let O=j5(B);if(!O)throw new x({message:`Unknown model ID: ${B}. Model must be registered in MODEL_MAPPINGS.`});if(U?.providerModel){let E=iQ(O.provider);if(!E.includes(U.providerModel))throw new x({message:`Invalid providerModel '${U.providerModel}' for provider '${O.provider}'. Valid models: ${E.join(", ")}`})}let P={DuoAgentPlatformNext:!0,...$.featureFlags,...U?.featureFlags},L={...{"User-Agent":`gitlab-ai-provider/${H7}`},...$.aiGatewayHeaders,...U?.aiGatewayHeaders},A={provider:`${Y}.agentic`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,maxTokens:U?.maxTokens,featureFlags:P,aiGatewayUrl:$.aiGatewayUrl,aiGatewayHeaders:L};if(O.provider==="openai")return new tQ(B,{...A,openaiModel:U?.providerModel??O.model});return new pQ(B,{...A,anthropicModel:U?.providerModel??O.model})},H=(B,U)=>{let O=j5(B);if(!O||O.provider!=="workflow")throw new x({message:`Unknown workflow model ID: ${B}. Use 'duo-workflow' or a 'duo-workflow-*' model ID.`});return new LW(B,{provider:`${Y}.workflow`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,featureFlags:{...$.featureFlags,...U?.featureFlags},aiGatewayUrl:$.aiGatewayUrl},U)},q=(B)=>{if(rQ(B))return H(B);return V(B)},w=Object.assign((B)=>q(B),{specificationVersion:"v3",languageModel:q,chat:q,agenticChat:V,workflowChat:H});return w.embeddingModel=(B)=>{throw new x({message:`GitLab provider does not support text embedding models. Model ID: ${B}`})},w.imageModel=(B)=>{throw new x({message:`GitLab provider does not support image models. Model ID: ${B}`})},w}var gE=TW(),_W="https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/raw/main/ai_gateway/model_selection/models.yml",PW=86400000,q7=200000,w7=64000;function U7(){let $=process.env.XDG_CACHE_HOME||m6.join(a5.homedir(),".cache");return m6.join($,"opencode","gitlab-model-configs.json")}function jW(){try{let $=U7();if(!d$.existsSync($))return null;let X=d$.readFileSync($,"utf-8");return JSON.parse(X)}catch{return null}}function kW($){try{let X=U7(),Y=m6.dirname(X);d$.mkdirSync(Y,{recursive:!0,mode:448});let J={configs:Object.fromEntries($),updatedAt:new Date().toISOString()};d$.writeFileSync(X,JSON.stringify(J,null,2),{mode:384})}catch{}}function y5($){let X=jW();if(!X)return null;let Y=new Date(X.updatedAt).getTime();if(Date.now()-Y>$)return null;return{configs:new Map(Object.entries(X.configs)),writtenAt:Y}}var xW=class{url;ttlMs;fetchFn;memCache=null;memExpiresAt=0;pending=null;constructor($){this.url=$?.url??_W,this.ttlMs=$?.ttlMs??PW,this.fetchFn=$?.fetch??fetch}async getConfigs(){if(this.memCache&&Date.now()<this.memExpiresAt)return this.memCache;let $=y5(this.ttlMs);if($)return this.memCache=$.configs,this.memExpiresAt=$.writtenAt+this.ttlMs,$.configs;if(this.pending)return this.pending;this.pending=this.fetchConfigs();try{return await this.pending}finally{this.pending=null}}async getConfig($){return(await this.getConfigs()).get($)??{context:q7,output:w7}}invalidateCache(){this.memCache=null,this.memExpiresAt=0;try{let $=U7();if(d$.existsSync($))d$.unlinkSync($)}catch{}}async fetchConfigs(){try{let $=await this.fetchFn(this.url);if(!$.ok)throw Error(`HTTP ${$.status}`);let X=await $.text(),Y=fW(X);return this.memCache=Y,this.memExpiresAt=Date.now()+this.ttlMs,kW(Y),Y}catch{return this.memCache??y5(1/0)?.configs??new Map}}};function fW($){let X=new Map,Y=null,J=0,Q=0,W=!1,z=-1;for(let G of $.split(`
|
|
102
|
-
`)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as
|
|
102
|
+
`)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as di,lQ as ei,h5 as fi,pQ as gi,o$ as hi,j5 as ii,jE as ji,iQ as ki,kE as li,xE as mi,nQ as ni,aQ as oi,rQ as pi,sQ as qi,fE as ri,tQ as si,H7 as ti,oQ as ui,eQ as vi,k5 as wi,y6 as xi,$W as yi,K7 as zi,U8 as Ai,YW as Bi,JW as Ci,x5 as Di,HW as Ei,BW as Fi,u5 as Gi,d5 as Hi,p5 as Ii,LW as Ji,ZW as Ki,vE as Li,SW as Mi,AW as Ni,yE as Oi,CW as Pi,TW as Qi,gE as Ri,xW as Si,fW as Ti,hE as Ui};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{S as
|
|
2
|
+
import{hh as r}from"./chunk-ebkztnpf.js";import{$j as e}from"./chunk-sy3n0qhc.js";import{mm as t}from"./chunk-yjp0btmq.js";import{Ap as l}from"./chunk-qdcf1ay5.js";import{$u as a}from"./chunk-hnz570f9.js";import{HP as o}from"./chunk-ydc6ypjt.js";var S={PromptAppend:t.define("tui.prompt.append",a.object({text:a.string()})),CommandExecute:t.define("tui.command.execute",a.object({command:a.union([a.enum(["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]),a.string()])})),ToastShow:t.define("tui.toast.show",a.object({title:a.string().optional(),message:a.string(),variant:a.enum(["info","success","warning","error"]),duration:a.number().default(5000).optional().describe("Duration in milliseconds")})),SessionSelect:t.define("tui.session.select",a.object({sessionID:e.zod.describe("Session ID to navigate to")})),InstructionsLoaded:r};class m extends o.Class("ConsoleState")({consoleManagedProviders:o.mutable(o.Array(o.String)),activeOrgName:o.optional(o.String),switchableOrgCount:o.Number}){static zod=l(this)}var f=m.make({consoleManagedProviders:[],activeOrgName:void 0,switchableOrgCount:0});
|
|
3
|
+
export{S as mg,m as ng,f as og};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:o});return e};var Oe=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoSession:f}=e,{ssoClient:S}=e,g=p.getProfileName({profile:e.profile??o?.profile});if(!r&&!t&&!n&&!a&&!f){let s=(await p.parseKnownFiles(e))[g];if(!s)throw new p.CredentialsProviderError(`Profile ${g} was not found.`,{logger:e.logger});if(!K(s))throw new p.CredentialsProviderError(`Profile ${g} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){let u=(await p.loadSsoSessionData(e))[s.sso_session],A=` configurations in profile ${g} and sso-session ${s.sso_session}`;if(n&&n!==u.sso_region)throw new p.CredentialsProviderError("Conflicting SSO region"+A,{tryNextLink:!1,logger:e.logger});if(r&&r!==u.sso_start_url)throw new p.CredentialsProviderError("Conflicting SSO start_url"+A,{tryNextLink:!1,logger:e.logger});s.sso_region=u.sso_region,s.sso_start_url=u.sso_start_url}let{sso_start_url:x,sso_account_id:T,sso_region:l,sso_role_name:i,sso_session:y}=Y(s,e.logger);return v({ssoStartUrl:x,ssoSession:y,ssoAccountId:T,ssoRegion:l,ssoRoleName:i,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!r||!t||!n||!a)throw new p.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return v({ssoStartUrl:r,ssoSession:f,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})};export{K as
|
|
2
|
+
import{ze as oe}from"./chunk-t01bhw5h.js";import{uf as _}from"./chunk-v3x5nrc4.js";import{gQ as m,kQ as ee}from"./chunk-4sazy0nq.js";var p=m(_(),1);var K=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var R=m(oe(),1);var c=m(_(),1);var b=300000,k="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var H=async(e,o={},r)=>{let{SSOOIDCClient:t}=await import("./chunk-mzbr0m2v.js"),n=(f)=>o.clientConfig?.[f]??o.parentClientConfig?.[f]??r?.[f];return new t(Object.assign({},o.clientConfig??{},{region:e??o.clientConfig?.region,logger:n("logger"),userAgentAppId:n("userAgentAppId")}))};var U=async(e,o,r={},t)=>{let{CreateTokenCommand:n}=await import("./chunk-mzbr0m2v.js");return(await H(o,r,t)).send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var q=m(_(),1);var C=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new q.TokenProviderError(`Token is expired. ${k}`,!1)};var W=m(_(),1);var w=(e,o,r=!1)=>{if(typeof o>"u")throw new W.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${k}`,!1)};var j=m(_(),1);import{promises as Q}from"fs";var{writeFile:Z}=Q,X=(e,o)=>{let r=j.getSSOTokenFilepath(e),t=JSON.stringify(o,null,2);return Z(r,t)};var z=new Date(0),J=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await c.parseKnownFiles(e),t=c.getProfileName({profile:e.profile??o?.profile}),n=r[t];if(!n)throw new c.TokenProviderError(`Profile '${t}' could not be found in shared credentials file.`,!1);else if(!n.sso_session)throw new c.TokenProviderError(`Profile '${t}' is missing required property 'sso_session'.`);let a=n.sso_session,S=(await c.loadSsoSessionData(e))[a];if(!S)throw new c.TokenProviderError(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let i of["sso_start_url","sso_region"])if(!S[i])throw new c.TokenProviderError(`Sso session '${a}' is missing required property '${i}'.`,!1);let{sso_start_url:g,sso_region:O}=S,s;try{s=await c.getSSOTokenFromFile(a)}catch(i){throw new c.TokenProviderError(`The SSO session token associated with profile=${t} was not found or is invalid. ${k}`,!1)}w("accessToken",s.accessToken),w("expiresAt",s.expiresAt);let{accessToken:x,expiresAt:T}=s,l={token:x,expiration:new Date(T)};if(l.expiration.getTime()-Date.now()>b)return l;if(Date.now()-z.getTime()<30000)return C(l),l;w("clientId",s.clientId,!0),w("clientSecret",s.clientSecret,!0),w("refreshToken",s.refreshToken,!0);try{z.setTime(Date.now());let i=await U(s,O,e,o);w("accessToken",i.accessToken),w("expiresIn",i.expiresIn);let y=new Date(Date.now()+i.expiresIn*1000);try{await X(a,{...s,accessToken:i.accessToken,expiresAt:y.toISOString(),refreshToken:i.refreshToken})}catch(I){}return{token:i.accessToken,expiration:y}}catch(i){return C(l),l}};var d=m(_(),1),E=!1,v=async({ssoStartUrl:e,ssoSession:o,ssoAccountId:r,ssoRegion:t,ssoRoleName:n,ssoClient:a,clientConfig:f,parentClientConfig:S,callerClientConfig:g,profile:O,filepath:s,configFilepath:x,ignoreCache:T,logger:l})=>{let i,y="To refresh this SSO session run aws sso login with the corresponding profile.";if(o)try{let h=await J({profile:O,filepath:s,configFilepath:x,ignoreCache:T})();i={accessToken:h.token,expiresAt:new Date(h.expiration).toISOString()}}catch(h){throw new d.CredentialsProviderError(h.message,{tryNextLink:E,logger:l})}else try{i=await d.getSSOTokenFromFile(e)}catch(h){throw new d.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:E,logger:l})}if(new Date(i.expiresAt).getTime()-Date.now()<=0)throw new d.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:E,logger:l});let{accessToken:I}=i,{SSOClient:u,GetRoleCredentialsCommand:A}=await import("./chunk-rrd0jf5m.js"),B=a||new u(Object.assign({},f??{},{logger:f?.logger??g?.logger??S?.logger,region:f?.region??t,userAgentAppId:f?.userAgentAppId??g?.userAgentAppId??S?.userAgentAppId})),F;try{F=await B.send(new A({accountId:r,roleName:n,accessToken:I}))}catch(h){throw new d.CredentialsProviderError(h,{tryNextLink:E,logger:l})}let{roleCredentials:{accessKeyId:P,secretAccessKey:D,sessionToken:$,expiration:L,credentialScope:M,accountId:G}={}}=F;if(!P||!D||!$||!L)throw new d.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:E,logger:l});let N={accessKeyId:P,secretAccessKey:D,sessionToken:$,expiration:new Date(L),...M&&{credentialScope:M},...G&&{accountId:G}};if(o)R.setCredentialFeature(N,"CREDENTIALS_SSO","s");else R.setCredentialFeature(N,"CREDENTIALS_SSO_LEGACY","u");return N};var V=m(_(),1),Y=(e,o)=>{let{sso_start_url:r,sso_account_id:t,sso_region:n,sso_role_name:a}=e;if(!r||!t||!n||!a)throw new V.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
|
|
3
|
+
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:o});return e};var Oe=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoSession:f}=e,{ssoClient:S}=e,g=p.getProfileName({profile:e.profile??o?.profile});if(!r&&!t&&!n&&!a&&!f){let s=(await p.parseKnownFiles(e))[g];if(!s)throw new p.CredentialsProviderError(`Profile ${g} was not found.`,{logger:e.logger});if(!K(s))throw new p.CredentialsProviderError(`Profile ${g} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){let u=(await p.loadSsoSessionData(e))[s.sso_session],A=` configurations in profile ${g} and sso-session ${s.sso_session}`;if(n&&n!==u.sso_region)throw new p.CredentialsProviderError("Conflicting SSO region"+A,{tryNextLink:!1,logger:e.logger});if(r&&r!==u.sso_start_url)throw new p.CredentialsProviderError("Conflicting SSO start_url"+A,{tryNextLink:!1,logger:e.logger});s.sso_region=u.sso_region,s.sso_start_url=u.sso_start_url}let{sso_start_url:x,sso_account_id:T,sso_region:l,sso_role_name:i,sso_session:y}=Y(s,e.logger);return v({ssoStartUrl:x,ssoSession:y,ssoAccountId:T,ssoRegion:l,ssoRoleName:i,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!r||!t||!n||!a)throw new p.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return v({ssoStartUrl:r,ssoSession:f,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})};export{K as Qd,Y as Rd,Oe as Sd};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{L as R9}from"./chunk-pmv8yr8c.js";import{Cd as E9}from"./chunk-37dvnent.js";import{Dd as P6,Gd as p$,Hd as S9,Id as U9,Ld as H9,Md as q6}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Pd as T0}from"./chunk-9xvctnjr.js";import{Sf as O}from"./chunk-9s4whpg1.js";import{Kg as j9,Tg as I9,Xg as E$}from"./chunk-w57j3pgz.js";import"./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{Lj as T9,ak as O6,bk as M0,gl as w9,il as D9,rl as b9}from"./chunk-sy3n0qhc.js";import{El as N9}from"./chunk-364ccew0.js";import{Tl as A0,am as T$}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{zt as C6}from"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import{Vt as F9,Yt as R6,Zt as M9,cu as A9}from"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import{Vu as L9}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import{UI as V9}from"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{gQ as q0,hQ as D,kQ as E}from"./chunk-4sazy0nq.js";var JZ=D((zZ)=>{/*!
|
|
3
3
|
* content-type
|
|
4
4
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
5
5
|
* MIT Licensed
|
|
@@ -23,9 +23,9 @@ Files in prompt:
|
|
|
23
23
|
${$.map((Y)=>` - ${Y.filename} (${(Y.content.length*0.75/1024).toFixed(0)} KB)`).join(`
|
|
24
24
|
`)}`:""}`}var jX=T0({command:"github",describe:"manage GitHub agent",builder:($)=>$.command(sK).command(oK).demandCommand(),async handler(){}}),sK=T0({command:"install",describe:"install the GitHub agent",async handler(){await T$.provide({directory:process.cwd(),async fn(){{let K=function(){let W;if(Y==="amazon-bedrock")W="Configure OIDC in AWS - https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services";else W=[` 2. Add the following secrets in org or repo (${$.owner}/${$.repo}) settings`,"",...Z[Y].env.map((V)=>` - ${V}`)].join(`
|
|
25
25
|
`);U9(["Next steps:","",` 1. Commit the \`${H6}\` file and push`,W,""," 3. Go to a GitHub issue and comment `/oc summarize` to see the agent in action",""," Learn more about the GitHub agent - https://opencode.ai/docs/github/#usage-examples"].join(`
|
|
26
|
-
`))};O.empty(),S9("Install GitHub agent");let $=await z();await G();let Z=await N9.get().then((W)=>{return delete W["github-copilot"],W}),Y=await J(),Q=await X();await L(),K();async function z(){if(T$.project.vcs!=="git")throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;let V=await E$.runPromise(A0.Service.use((P)=>P.run(["remote","get-url","origin"],{cwd:T$.worktree}))).then((P)=>P.text().trim()),A=rK(V);if(!A)throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;return{owner:A.owner,repo:A.repo,root:T$.worktree}}async function J(){let W={opencode:0,anthropic:1,openai:2,google:3},V=await q6({message:"Select provider",maxItems:8,options:R9(R6(Z),W,(A)=>W[A.id]===0?"recommended":void 0)});if(P6(V))throw new O.CancelledError;return V}async function X(){let W=Z[Y],V=await q6({message:"Select model",maxItems:8,options:
|
|
26
|
+
`))};O.empty(),S9("Install GitHub agent");let $=await z();await G();let Z=await N9.get().then((W)=>{return delete W["github-copilot"],W}),Y=await J(),Q=await X();await L(),K();async function z(){if(T$.project.vcs!=="git")throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;let V=await E$.runPromise(A0.Service.use((P)=>P.run(["remote","get-url","origin"],{cwd:T$.worktree}))).then((P)=>P.text().trim()),A=rK(V);if(!A)throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;return{owner:A.owner,repo:A.repo,root:T$.worktree}}async function J(){let W={opencode:0,anthropic:1,openai:2,google:3},V=await q6({message:"Select provider",maxItems:8,options:R9(R6(Z),W,(A)=>W[A.id]===0?"recommended":void 0)});if(P6(V))throw new O.CancelledError;return V}async function X(){let W=Z[Y],V=await q6({message:"Select model",maxItems:8,options:F9(W.models,R6(),M9((A)=>A.name??A.id),A9((A)=>({label:A.name??A.id,value:A.id})))});if(P6(V))throw new O.CancelledError;return V}async function G(){let W=H9();if(W.start("Installing GitHub app"),await y())return W.stop("GitHub app already installed");let A="https://github.com/apps/opencode-agent",P=process.platform==="darwin"?`open "${A}"`:process.platform==="win32"?`start "" "${A}"`:`xdg-open "${A}"`;nK(P,(m)=>{if(m)p$.warn(`Could not open browser. Please visit: ${A}`)}),W.message("Waiting for GitHub app to be installed");let r=120,U=0;do{if(await y())break;if(U>r)throw W.stop(`Failed to detect GitHub app installation. Make sure to install the app for the \`${$.owner}/${$.repo}\` repository.`),new O.CancelledError;U++,await P9(1000)}while(!0);W.stop("Installed GitHub app");async function y(){return await fetch(`https://api.opencode.ai/get_github_app_installation?owner=${$.owner}&repo=${$.repo}`).then((m)=>m.json()).then((m)=>m.installation)}}async function L(){let W=Y==="amazon-bedrock"?"":`
|
|
27
27
|
env:${Z[Y].env.map((V)=>`
|
|
28
|
-
${V}: \${{ secrets.${V} }}`).join("")}`;await
|
|
28
|
+
${V}: \${{ secrets.${V} }}`).join("")}`;await L9.write(C9.join($.root,H6),`name: opencode
|
|
29
29
|
|
|
30
30
|
on:
|
|
31
31
|
issue_comment:
|
|
@@ -77,7 +77,7 @@ Context: You are reviewing a comment on file "${F.file}" at line ${F.line}.
|
|
|
77
77
|
Diff context:
|
|
78
78
|
${F.diffHunk}`;return f}throw Error(`Comments must mention ${j.map((v)=>"`"+v+"`").join(" or ")}`)})(),I=[],H=M.matchAll(/!?\[.*?\]\((https:\/\/github\.com\/user-attachments\/[^)]+)\)/gi),C=M.matchAll(/<img .*?src="(https:\/\/github\.com\/user-attachments\/[^"]+)" \/>/gi),w=[...H,...C].sort((f,g)=>f.index-g.index);console.log("Images",JSON.stringify(w,null,2));let Z$=0;for(let f of w){let g=f[0],v=f[1],l=f.index,g6=C9.basename(v),b0=await fetch(v,{headers:{Authorization:`Bearer ${L$}`,Accept:"application/vnd.github.v3+json"}});if(!b0.ok){console.error(`Failed to download image: ${v}`);continue}let t$=`@${g6}`;M=M.slice(0,l+Z$)+t$+M.slice(l+Z$+g.length),Z$+=t$.length-g.length;let k6=b0.headers.get("content-type");I.push({filename:g6,mime:k6?.startsWith("image/")?k6:"text/plain",content:Buffer.from(await b0.arrayBuffer()).toString("base64"),start:l,end:l+t$.length,replacement:t$})}return{userPrompt:M,promptFiles:I}}function u9(){let B={task:["Task",O.Style.TEXT_WARNING_BOLD],bash:["Bash",O.Style.TEXT_DANGER_BOLD],edit:["Edit",O.Style.TEXT_SUCCESS_BOLD],glob:["Glob",O.Style.TEXT_INFO_BOLD],grep:["Grep",O.Style.TEXT_INFO_BOLD],list:["List",O.Style.TEXT_INFO_BOLD],read:["Read",O.Style.TEXT_HIGHLIGHT_BOLD],write:["Write",O.Style.TEXT_SUCCESS_BOLD],websearch:["Search",O.Style.TEXT_DIM_BOLD]};function F(M,I,H){O.println(M+"|",O.Style.TEXT_NORMAL+O.Style.TEXT_DIM+` ${I.padEnd(7," ")}`,"",O.Style.TEXT_NORMAL+H)}let j="";T9.subscribe(D9.Event.PartUpdated,(M)=>{if(M.properties.part.sessionID!==Q$.id)return;let I=M.properties.part;if(I.type==="tool"&&I.state.status==="completed"){let[H,C]=B[I.tool]??[I.tool,O.Style.TEXT_INFO_BOLD],w=I.state.title||Object.keys(I.state.input).length>0?JSON.stringify(I.state.input):"Unknown";console.log(),F(C,H,w)}if(I.type==="text"){if(j=I.text,I.time?.end){O.empty(),O.println(O.markdown(j)),O.empty(),j="";return}}})}async function s$(B){try{return await g$(`Summarize the following in less than 40 characters:
|
|
79
79
|
|
|
80
|
-
${B}`)}catch{return`Fix issue: ${j0?j0.issue.title:m.pull_request.title}`}}async function g$(B,F=[]){return console.log("Sending message to qitqode..."),E$.runPromise(
|
|
80
|
+
${B}`)}catch{return`Fix issue: ${j0?j0.issue.title:m.pull_request.title}`}}async function g$(B,F=[]){return console.log("Sending message to qitqode..."),E$.runPromise(V9.gen(function*(){let j=yield*I9.Service,M=yield*j.prompt({sessionID:Q$.id,messageID:O6.ascending(),variant:V,model:{providerID:L,modelID:W},parts:[{id:M0.ascending(),type:"text",text:B},...F.flatMap((w)=>[{id:M0.ascending(),type:"file",mime:w.mime,url:`data:${w.mime};base64,${w.content}`,filename:w.filename,source:{type:"file",text:{value:w.replacement,start:w.start,end:w.end},path:w.filename}}])]});if(M.info.role==="assistant"&&M.info.error){let w=M.info.error;if(console.error("Agent error:",w),w.name==="ContextOverflowError")throw Error(B9(F));throw Error(`${w.name}: ${w.data?.message||""}`)}let I=G9(M.parts);if(I)return I;console.log("Requesting summary from agent...");let H=yield*j.prompt({sessionID:Q$.id,messageID:O6.ascending(),variant:V,model:{providerID:L,modelID:W},tools:{"*":!1},parts:[{id:M0.ascending(),type:"text",text:"Summarize the actions (tool calls & reasoning) you did for the user in 1-2 sentences."}]});if(H.info.role==="assistant"&&H.info.error){let w=H.info.error;if(console.error("Summary agent error:",w),w.name==="ContextOverflowError")throw Error(B9(F));throw Error(`${w.name}: ${w.data?.message||""}`)}let C=G9(H.parts);if(!C)throw Error("Failed to get summary from agent");return C}))}async function l9(){try{return await n$.getIDToken("opencode-github-action")}catch(B){throw console.error("Failed to get OIDC token:",B instanceof Error?B.message:B),Error("Could not fetch an OIDC token. Make sure to add `id-token: write` to your workflow permissions.",{cause:B})}}async function d9(B){let F=B.startsWith("github_pat_")?await fetch(`${r}/exchange_github_app_token_with_pat`,{method:"POST",headers:{Authorization:`Bearer ${B}`},body:JSON.stringify({owner:U,repo:y})}):await fetch(`${r}/exchange_github_app_token`,{method:"POST",headers:{Authorization:`Bearer ${B}`}});if(!F.ok){let M=await F.json();throw Error(`App token exchange failed: ${F.status} ${F.statusText} - ${M.error}`)}return(await F.json()).token}async function i9(B){if(Z)return;console.log("Configuring git...");let F="http.https://github.com/.extraheader",j=await h$(["config","--local","--get",F]);if(j.exitCode===0)N0=j.stdout.toString().trim(),await h(["config","--local","--unset-all",F]);let M=Buffer.from(`x-access-token:${B}`,"utf8").toString("base64");await h(["config","--local",F,`AUTHORIZATION: basic ${M}`]),await h(["config","--global","user.name",i$]),await h(["config","--global","user.email",`${i$}@users.noreply.github.com`])}async function p9(){if(N0===void 0)return;await h(["config","--local","http.https://github.com/.extraheader",N0])}async function f6(B){console.log("Checking out new branch...");let F=_6(B);return await h(["checkout","-b",F]),F}async function n9(B){console.log("Checking out local branch...");let F=B.headRefName,j=Math.max(B.commits.totalCount,20);await h(["fetch","origin",`--depth=${j}`,F]),await h(["checkout",F])}async function a9(B){console.log("Checking out fork branch...");let F=B.headRefName,j=_6("pr"),M=Math.max(B.commits.totalCount,20);return await h(["remote","add","fork",`https://github.com/${B.headRepository.nameWithOwner}.git`]),await h(["fetch","fork",`--depth=${M}`,F]),await h(["checkout","-b",j,`fork/${F}`]),j}function _6(B){let F=new Date().toISOString().replace(/[:-]/g,"").replace(/\.\d{3}Z/,"").split("T").join("");if(B==="schedule"||B==="dispatch"){let j=crypto.randomUUID().slice(0,6);return`opencode/${B}-${j}-${F}`}return`opencode/${B}${Y$}-${F}`}async function v6(B,F,j,M){if(console.log("Pushing to new branch..."),j)if(await h(["add","."]),M)await r$(B);else await r$(B,W$);await h(["push","-u","origin",F])}async function r9(B,F){if(console.log("Pushing to local branch..."),F)await h(["add","."]),await r$(B,W$);await h(["push"])}async function s9(B,F,j){console.log("Pushing to fork branch...");let M=F.headRefName;if(j)await h(["add","."]),await r$(B,W$);await h(["push","fork",`HEAD:${M}`])}async function o$(B,F){console.log("Checking if branch is dirty...");let j=await S$(["rev-parse","--abbrev-ref","HEAD"]);if(j!==F)return console.log(`Branch changed during chat: expected ${F}, now on ${j}`),{dirty:!0,uncommittedChanges:!1,switched:!0};if((await h$(["status","--porcelain"])).stdout.toString().trim().length>0)return{dirty:!0,uncommittedChanges:!0,switched:!1};return{dirty:await S$(["rev-parse","HEAD"])!==B,uncommittedChanges:!1,switched:!1}}async function o9(B,F){let j=await h$(["rev-list","--count",`${B}..${F}`]);if(j.exitCode!==0){console.log(`rev-list failed, fetching origin/${B}...`),await h$(["fetch","origin",B,"--depth=1"]);let M=await h$(["rev-list","--count",`origin/${B}..${F}`]);if(M.exitCode!==0)return!0;return parseInt(M.stdout.toString().trim())>0}return parseInt(j.stdout.toString().trim())>0}async function t9(){console.log(`Asserting permissions for user ${W$}...`);let B;try{B=(await u.repos.getCollaboratorPermissionLevel({owner:U,repo:y,username:W$})).data.permission,console.log(` permission: ${B}`)}catch(F){throw console.error(`Failed to check permissions: ${F}`),Error(`Failed to check permissions for user ${W$}: ${F}`,{cause:F})}if(!["admin","write"].includes(B))throw Error(`User ${W$} does not have write permissions`)}async function e9(B){if(console.log("Adding reaction..."),K$){if(B==="pr_review")return await u.rest.reactions.createForPullRequestReviewComment({owner:U,repo:y,comment_id:K$,content:x$});return await u.rest.reactions.createForIssueComment({owner:U,repo:y,comment_id:K$,content:x$})}return await u.rest.reactions.createForIssue({owner:U,repo:y,issue_number:Y$,content:x$})}async function U$(B){if(console.log("Removing reaction..."),K$){if(B==="pr_review"){let C=(await u.rest.reactions.listForPullRequestReviewComment({owner:U,repo:y,comment_id:K$,content:x$})).data.find((w)=>w.user?.login===i$);if(!C)return;return await u.rest.reactions.deleteForPullRequestComment({owner:U,repo:y,comment_id:K$,reaction_id:C.id})}let I=(await u.rest.reactions.listForIssueComment({owner:U,repo:y,comment_id:K$,content:x$})).data.find((H)=>H.user?.login===i$);if(!I)return;return await u.rest.reactions.deleteForIssueComment({owner:U,repo:y,comment_id:K$,reaction_id:I.id})}let j=(await u.rest.reactions.listForIssue({owner:U,repo:y,issue_number:Y$,content:x$})).data.find((M)=>M.user?.login===i$);if(!j)return;await u.rest.reactions.deleteForIssue({owner:U,repo:y,issue_number:Y$,reaction_id:j.id})}async function I$(B){return console.log("Creating comment..."),await u.rest.issues.createComment({owner:U,repo:y,issue_number:Y$,body:B})}async function x6(B,F,j,M){console.log("Creating pull request...");try{let I=await D0(()=>u.rest.pulls.list({owner:U,repo:y,head:`${U}:${F}`,base:B,state:"open"}));if(I.data.length>0)return console.log(`PR #${I.data[0].number} already exists for branch ${F}`),I.data[0].number}catch(I){console.log(`Failed to check for existing PR: ${I}`)}if(!await o9(B,F))return console.log(`No commits between ${B} and ${F}, skipping PR creation`),null;try{return(await D0(()=>u.rest.pulls.create({owner:U,repo:y,head:F,base:B,title:j,body:M}))).data.number}catch(I){if(I instanceof Error&&I.message.includes("No commits between"))return console.log(`GitHub rejected PR: ${I.message}`),null;throw I}}async function D0(B,F=1,j=5000){try{return await B()}catch(M){if(F>0)return console.log(`Retrying after ${j}ms...`),await P9(j),D0(B,F-1,j);throw M}}function G$(B){let F=(()=>{if(!F$)return"";if(!B?.image)return"";let M=encodeURIComponent(Q$.title.substring(0,50)),I=Buffer.from(Q$.title.substring(0,700),"utf8").toString("base64");return`<a href="${a$}/s/${F$}"><img width="200" alt="${M}" src="https://social-cards.sst.dev/opencode-share/${I}.png?model=${L}/${W}&version=${Q$.version}&id=${F$}" /></a>
|
|
81
81
|
`})(),j=F$?`[opencode session](${a$}/s/${F$}) | `:"";return`
|
|
82
82
|
|
|
83
83
|
${F}${j}[github run](${f9})`}async function $8(){return await u.rest.repos.get({owner:U,repo:y})}async function Z8(){console.log("Fetching prompt data for issue...");let F=(await I0(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{eQ as D}from"./chunk-dt899wbf.js";import{fQ as C}from"./chunk-pnq1h5az.js";import{hQ as B}from"./chunk-4sazy0nq.js";var H=B((q)=>{Object.defineProperty(q,"__esModule",{value:!0});q.getMachineId=void 0;var E=D(),F=C();async function G(){try{let f=(await(0,E.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
3
3
|
`).find((z)=>z.includes("IOPlatformUUID"));if(!f)return;let k=f.split('" = "');if(k.length===2)return k[1].slice(0,-1)}catch(b){F.diag.debug(`error reading machine id: ${b}`)}return}q.getMachineId=G});export default H();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{te as Ij}from"./chunk-6a7c7wnf.js";import{xe as hj}from"./chunk-hj3ddt53.js";import{ye as Oj}from"./chunk-r0k21apr.js";import{Ae as vj,Be as $j,ze as _j}from"./chunk-wgk7ynt3.js";import{Ce as mj}from"./chunk-41v0x1jk.js";import{uf as Rj,vf as Pj,wf as Tj,xf as Aj,yf as Dj}from"./chunk-a3a1trap.js";import"./chunk-3k2b05fv.js";var Z=$j(),T=vj(),X=Pj(),Y=Tj(),w=Aj(),A=mj(),G=_j(),a=Rj(),S=Ij(),U=Dj(),r=Oj(),uj=hj(),lj=async(j,B,K)=>{return{operation:X.getSmithyContext(B).operation,region:await X.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function dj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:j.region},propertiesExtractor:(B,K)=>({signingProperties:{config:B,context:K}})}}function Cj(j){return{schemeId:"smithy.api#noAuth"}}var Ej=(j)=>{let B=[];switch(j.operation){case"CreateToken":{B.push(Cj());break}default:B.push(dj(j))}return B},xj=(j)=>{let B=S.resolveAwsSdkSigV4Config(j);return Object.assign(B,{authSchemePreference:X.normalizeProvider(j.authSchemePreference??[])})},aj=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Sj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fj="3.997.14",gj={version:fj},k="ref",q=-1,R=!0,p="isSet",o="PartitionResult",P="booleanEquals",E="getAttr",c={[k]:"Endpoint"},x={[k]:o},z={},t=[{[k]:"Region"}],i={conditions:[[p,[c]],[p,t],["aws.partition",t,o],[P,[{[k]:"UseFIPS"},R]],[P,[{[k]:"UseDualStack"},R]],[P,[{fn:E,argv:[x,"supportsDualStack"]},R]],[P,[{fn:E,argv:[x,"supportsFIPS"]},R]],["stringEquals",[{fn:E,argv:[x,"name"]},"aws-us-gov"]]],results:[[q],[q,"Invalid Configuration: FIPS and custom endpoint are not supported"],[q,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[c,z],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",z],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",z],[q,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",z],[q,"Invalid Configuration: Missing Region"]]},sj=2,W=1e8,rj=new Int32Array([-1,1,-1,0,13,3,1,4,W+12,2,5,W+12,3,8,6,4,7,W+11,5,W+9,W+10,4,11,9,6,10,W+8,7,W+6,W+7,5,12,W+5,6,W+4,W+5,3,W+1,14,4,W+2,W+3]),pj=w.BinaryDecisionDiagram.from(rj,sj,i.conditions,i.results),cj=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tj=(j,B={})=>{return cj.get(j,()=>w.decideEndpoint(pj,{endpointParams:j,logger:B.logger}))};w.customEndpointFunctions.aws=Z.awsEndpointFunctions;class Q extends X.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,Q.prototype)}}class D extends Q{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(j){super({name:"AccessDeniedException",$fault:"client",...j});Object.setPrototypeOf(this,D.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class m extends Q{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(j){super({name:"AuthorizationPendingException",$fault:"client",...j});Object.setPrototypeOf(this,m.prototype),this.error=j.error,this.error_description=j.error_description}}class _ extends Q{name="ExpiredTokenException";$fault="client";error;error_description;constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,_.prototype),this.error=j.error,this.error_description=j.error_description}}class v extends Q{name="InternalServerException";$fault="server";error;error_description;constructor(j){super({name:"InternalServerException",$fault:"server",...j});Object.setPrototypeOf(this,v.prototype),this.error=j.error,this.error_description=j.error_description}}class $ extends Q{name="InvalidClientException";$fault="client";error;error_description;constructor(j){super({name:"InvalidClientException",$fault:"client",...j});Object.setPrototypeOf(this,$.prototype),this.error=j.error,this.error_description=j.error_description}}class I extends Q{name="InvalidGrantException";$fault="client";error;error_description;constructor(j){super({name:"InvalidGrantException",$fault:"client",...j});Object.setPrototypeOf(this,I.prototype),this.error=j.error,this.error_description=j.error_description}}class O extends Q{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(j){super({name:"InvalidRequestException",$fault:"client",...j});Object.setPrototypeOf(this,O.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class h extends Q{name="InvalidScopeException";$fault="client";error;error_description;constructor(j){super({name:"InvalidScopeException",$fault:"client",...j});Object.setPrototypeOf(this,h.prototype),this.error=j.error,this.error_description=j.error_description}}class u extends Q{name="SlowDownException";$fault="client";error;error_description;constructor(j){super({name:"SlowDownException",$fault:"client",...j});Object.setPrototypeOf(this,u.prototype),this.error=j.error,this.error_description=j.error_description}}class l extends Q{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(j){super({name:"UnauthorizedClientException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype),this.error=j.error,this.error_description=j.error_description}}class d extends Q{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(j){super({name:"UnsupportedGrantTypeException",$fault:"client",...j});Object.setPrototypeOf(this,d.prototype),this.error=j.error,this.error_description=j.error_description}}var ij="AccessDeniedException",oj="AuthorizationPendingException",ej="AccessToken",nj="ClientSecret",jB="CreateToken",BB="CreateTokenRequest",FB="CreateTokenResponse",JB="CodeVerifier",KB="ExpiredTokenException",LB="InvalidClientException",QB="InvalidGrantException",WB="InvalidRequestException",XB="InternalServerException",YB="InvalidScopeException",ZB="IdToken",NB="RefreshToken",MB="SlowDownException",bB="UnauthorizedClientException",VB="UnsupportedGrantTypeException",HB="accessToken",H="client",qB="clientId",zB="clientSecret",UB="codeVerifier",wB="code",GB="deviceCode",F="error",kB="expiresIn",b="error_description",yB="grantType",RB="http",V="httpError",PB="idToken",e="reason",n="refreshToken",TB="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",AB="scope",DB="server",mB="tokenType",J="com.amazonaws.ssooidc",Bj=a.TypeRegistry.for(jj),Fj=[-3,jj,"SSOOIDCServiceException",0,[],[]];Bj.registerError(Fj,Q);var N=a.TypeRegistry.for(J),Jj=[-3,J,ij,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Jj,D);var Kj=[-3,J,oj,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Kj,m);var Lj=[-3,J,KB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Lj,_);var Qj=[-3,J,XB,{[F]:DB,[V]:500},[F,b],[0,0]];N.registerError(Qj,v);var Wj=[-3,J,LB,{[F]:H,[V]:401},[F,b],[0,0]];N.registerError(Wj,$);var Xj=[-3,J,QB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Xj,I);var Yj=[-3,J,WB,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Yj,O);var Zj=[-3,J,YB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Zj,h);var Nj=[-3,J,MB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Nj,u);var Mj=[-3,J,bB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Mj,l);var bj=[-3,J,VB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(bj,d);var Vj=[Bj,N],_B=[0,J,ej,8,0],vB=[0,J,nj,8,0],$B=[0,J,JB,8,0],IB=[0,J,ZB,8,0],Hj=[0,J,NB,8,0],qj=[3,J,BB,0,[qB,zB,yB,GB,wB,n,AB,TB,UB],[0,[()=>vB,0],0,0,0,[()=>Hj,0],64,0,[()=>$B,0]],3],zj=[3,J,FB,0,[HB,mB,kB,n,PB],[[()=>_B,0],0,1,[()=>Hj,0],[()=>IB,0]]],Uj=[9,J,jB,{[RB]:["POST","/token",200]},()=>qj,()=>zj],OB=(j)=>{return{apiVersion:"2019-06-10",base64Decoder:j?.base64Decoder??U.fromBase64,base64Encoder:j?.base64Encoder??U.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??tj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??Ej,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(B)=>B.getIdentityProvider("aws.auth#sigv4"),signer:new S.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(B)=>B.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new T.NoAuthSigner}],logger:j?.logger??new X.NoOpLogger,protocol:j?.protocol??uj.AwsRestJsonProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Vj,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:j?.serviceId??"SSO OIDC",urlParser:j?.urlParser??A.parseUrl,utf8Decoder:j?.utf8Decoder??U.fromUtf8,utf8Encoder:j?.utf8Encoder??U.toUtf8}},hB=(j)=>{X.emitWarningIfUnsupportedVersion(process.version);let B=Y.resolveDefaultsModeConfig(j),K=()=>B().then(X.loadConfigsForDefaultMode),M=OB(j);Z.emitWarningIfUnsupportedVersion(process.version);let L={profile:j?.profile,logger:M.logger};return{...M,...j,runtime:"node",defaultsMode:B,authSchemePreference:j?.authSchemePreference??Y.loadConfig(S.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,L),bodyLengthChecker:j?.bodyLengthChecker??U.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Z.createDefaultUserAgentProvider({serviceId:M.serviceId,clientVersion:gj.version}),maxAttempts:j?.maxAttempts??Y.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??Y.loadConfig(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...L}),requestHandler:r.NodeHttpHandler.create(j?.requestHandler??K),retryMode:j?.retryMode??Y.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||G.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??U.Hash.bind(null,"sha256"),streamCollector:j?.streamCollector??r.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??Y.loadConfig(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,L),useFipsEndpoint:j?.useFipsEndpoint??Y.loadConfig(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,L),userAgentAppId:j?.userAgentAppId??Y.loadConfig(Z.NODE_APP_ID_CONFIG_OPTIONS,L)}},uB=(j)=>{let{httpAuthSchemes:B,httpAuthSchemeProvider:K,credentials:M}=j;return{setHttpAuthScheme(L){let y=B.findIndex((C)=>C.schemeId===L.schemeId);if(y===-1)B.push(L);else B.splice(y,1,L)},httpAuthSchemes(){return B},setHttpAuthSchemeProvider(L){K=L},httpAuthSchemeProvider(){return K},setCredentials(L){M=L},credentials(){return M}}},lB=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},dB=(j,B)=>{let K=Object.assign(Z.getAwsRegionExtensionConfiguration(j),X.getDefaultExtensionConfiguration(j),A.getHttpHandlerExtensionConfiguration(j),uB(j));return B.forEach((M)=>M.configure(K)),Object.assign(j,Z.resolveAwsRegionExtensionConfiguration(K),X.resolveDefaultRuntimeConfig(K),A.resolveHttpHandlerRuntimeConfig(K),lB(K))};class f extends X.Client{config;constructor(...[j]){let B=hB(j||{});super(B);this.initConfig=B;let K=aj(B),M=Z.resolveUserAgentConfig(K),L=G.resolveRetryConfig(M),y=Y.resolveRegionConfig(L),C=Z.resolveHostHeaderConfig(y),wj=w.resolveEndpointConfig(C),Gj=xj(wj),kj=dB(Gj,j?.extensions||[]);this.config=kj,this.middlewareStack.use(a.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Z.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(A.getContentLengthPlugin(this.config)),this.middlewareStack.use(Z.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Z.getLoggerPlugin(this.config)),this.middlewareStack.use(Z.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(T.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lj,identityProviderConfigProvider:async(yj)=>new T.DefaultIdentityProviderConfig({"aws.auth#sigv4":yj.credentials})})),this.middlewareStack.use(T.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class g extends X.Command.classBuilder().ep(Sj).m(function(j,B,K,M){return[w.getEndpointPlugin(K,j.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Uj).build(){}var CB={CreateTokenCommand:g};class s extends f{}X.createAggregatedClient(CB,s);var EB={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},xB={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var{Command:aB,Client:SB}=X,fB=D,gB=Jj,sB=EB,rB=m,pB=Kj,cB=Uj,tB=g,iB=qj,oB=zj,eB=_,nB=Lj,jF=v,BF=Qj,FF=$,JF=Wj,KF=I,LF=Xj,QF=O,WF=Yj,XF=xB,YF=h,ZF=Zj,NF=s,MF=f,bF=Q,VF=Fj,HF=u,qF=Nj,zF=l,UF=Mj,wF=d,GF=bj,kF=Vj;export{kF as errorTypeRegistries,SB as __Client,GF as UnsupportedGrantTypeException$,wF as UnsupportedGrantTypeException,UF as UnauthorizedClientException$,zF as UnauthorizedClientException,qF as SlowDownException$,HF as SlowDownException,VF as SSOOIDCServiceException$,bF as SSOOIDCServiceException,MF as SSOOIDCClient,NF as SSOOIDC,ZF as InvalidScopeException$,YF as InvalidScopeException,XF as InvalidRequestExceptionReason,WF as InvalidRequestException$,QF as InvalidRequestException,LF as InvalidGrantException$,KF as InvalidGrantException,JF as InvalidClientException$,FF as InvalidClientException,BF as InternalServerException$,jF as InternalServerException,nB as ExpiredTokenException$,eB as ExpiredTokenException,oB as CreateTokenResponse$,iB as CreateTokenRequest$,tB as CreateTokenCommand,cB as CreateToken$,pB as AuthorizationPendingException$,rB as AuthorizationPendingException,sB as AccessDeniedExceptionReason,gB as AccessDeniedException$,fB as AccessDeniedException,aB as $Command};export default {get errorTypeRegistries(){return kF},get __Client(){return SB},get UnsupportedGrantTypeException$(){return GF},get UnsupportedGrantTypeException(){return wF},get UnauthorizedClientException$(){return UF},get UnauthorizedClientException(){return zF},get SlowDownException$(){return qF},get SlowDownException(){return HF},get SSOOIDCServiceException$(){return VF},get SSOOIDCServiceException(){return bF},get SSOOIDCClient(){return MF},get SSOOIDC(){return NF},get InvalidScopeException$(){return ZF},get InvalidScopeException(){return YF},get InvalidRequestExceptionReason(){return XF},get InvalidRequestException$(){return WF},get InvalidRequestException(){return QF},get InvalidGrantException$(){return LF},get InvalidGrantException(){return KF},get InvalidClientException$(){return JF},get InvalidClientException(){return FF},get InternalServerException$(){return BF},get InternalServerException(){return jF},get ExpiredTokenException$(){return nB},get ExpiredTokenException(){return eB},get CreateTokenResponse$(){return oB},get CreateTokenRequest$(){return iB},get CreateTokenCommand(){return tB},get CreateToken$(){return cB},get AuthorizationPendingException$(){return pB},get AuthorizationPendingException(){return rB},get AccessDeniedExceptionReason(){return sB},get AccessDeniedException$(){return gB},get AccessDeniedException(){return fB},get $Command(){return aB}};
|
|
2
|
+
import{re as Ij}from"./chunk-hgsykghj.js";import{ve as hj}from"./chunk-jts0dma5.js";import{we as Oj}from"./chunk-vgaxv70x.js";import{xe as _j,ye as vj,ze as $j}from"./chunk-t01bhw5h.js";import{Ae as mj}from"./chunk-8yr682pv.js";import{sf as Rj,tf as Pj,uf as Tj,vf as Aj,wf as Dj}from"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";var Z=$j(),T=vj(),X=Pj(),Y=Tj(),w=Aj(),A=mj(),G=_j(),a=Rj(),S=Ij(),U=Dj(),r=Oj(),uj=hj(),lj=async(j,B,K)=>{return{operation:X.getSmithyContext(B).operation,region:await X.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function dj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:j.region},propertiesExtractor:(B,K)=>({signingProperties:{config:B,context:K}})}}function Cj(j){return{schemeId:"smithy.api#noAuth"}}var Ej=(j)=>{let B=[];switch(j.operation){case"CreateToken":{B.push(Cj());break}default:B.push(dj(j))}return B},xj=(j)=>{let B=S.resolveAwsSdkSigV4Config(j);return Object.assign(B,{authSchemePreference:X.normalizeProvider(j.authSchemePreference??[])})},aj=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Sj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fj="3.997.14",gj={version:fj},k="ref",q=-1,R=!0,p="isSet",o="PartitionResult",P="booleanEquals",E="getAttr",c={[k]:"Endpoint"},x={[k]:o},z={},t=[{[k]:"Region"}],i={conditions:[[p,[c]],[p,t],["aws.partition",t,o],[P,[{[k]:"UseFIPS"},R]],[P,[{[k]:"UseDualStack"},R]],[P,[{fn:E,argv:[x,"supportsDualStack"]},R]],[P,[{fn:E,argv:[x,"supportsFIPS"]},R]],["stringEquals",[{fn:E,argv:[x,"name"]},"aws-us-gov"]]],results:[[q],[q,"Invalid Configuration: FIPS and custom endpoint are not supported"],[q,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[c,z],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",z],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",z],[q,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",z],[q,"Invalid Configuration: Missing Region"]]},sj=2,W=1e8,rj=new Int32Array([-1,1,-1,0,13,3,1,4,W+12,2,5,W+12,3,8,6,4,7,W+11,5,W+9,W+10,4,11,9,6,10,W+8,7,W+6,W+7,5,12,W+5,6,W+4,W+5,3,W+1,14,4,W+2,W+3]),pj=w.BinaryDecisionDiagram.from(rj,sj,i.conditions,i.results),cj=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tj=(j,B={})=>{return cj.get(j,()=>w.decideEndpoint(pj,{endpointParams:j,logger:B.logger}))};w.customEndpointFunctions.aws=Z.awsEndpointFunctions;class Q extends X.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,Q.prototype)}}class D extends Q{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(j){super({name:"AccessDeniedException",$fault:"client",...j});Object.setPrototypeOf(this,D.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class m extends Q{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(j){super({name:"AuthorizationPendingException",$fault:"client",...j});Object.setPrototypeOf(this,m.prototype),this.error=j.error,this.error_description=j.error_description}}class _ extends Q{name="ExpiredTokenException";$fault="client";error;error_description;constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,_.prototype),this.error=j.error,this.error_description=j.error_description}}class v extends Q{name="InternalServerException";$fault="server";error;error_description;constructor(j){super({name:"InternalServerException",$fault:"server",...j});Object.setPrototypeOf(this,v.prototype),this.error=j.error,this.error_description=j.error_description}}class $ extends Q{name="InvalidClientException";$fault="client";error;error_description;constructor(j){super({name:"InvalidClientException",$fault:"client",...j});Object.setPrototypeOf(this,$.prototype),this.error=j.error,this.error_description=j.error_description}}class I extends Q{name="InvalidGrantException";$fault="client";error;error_description;constructor(j){super({name:"InvalidGrantException",$fault:"client",...j});Object.setPrototypeOf(this,I.prototype),this.error=j.error,this.error_description=j.error_description}}class O extends Q{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(j){super({name:"InvalidRequestException",$fault:"client",...j});Object.setPrototypeOf(this,O.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class h extends Q{name="InvalidScopeException";$fault="client";error;error_description;constructor(j){super({name:"InvalidScopeException",$fault:"client",...j});Object.setPrototypeOf(this,h.prototype),this.error=j.error,this.error_description=j.error_description}}class u extends Q{name="SlowDownException";$fault="client";error;error_description;constructor(j){super({name:"SlowDownException",$fault:"client",...j});Object.setPrototypeOf(this,u.prototype),this.error=j.error,this.error_description=j.error_description}}class l extends Q{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(j){super({name:"UnauthorizedClientException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype),this.error=j.error,this.error_description=j.error_description}}class d extends Q{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(j){super({name:"UnsupportedGrantTypeException",$fault:"client",...j});Object.setPrototypeOf(this,d.prototype),this.error=j.error,this.error_description=j.error_description}}var ij="AccessDeniedException",oj="AuthorizationPendingException",ej="AccessToken",nj="ClientSecret",jB="CreateToken",BB="CreateTokenRequest",FB="CreateTokenResponse",JB="CodeVerifier",KB="ExpiredTokenException",LB="InvalidClientException",QB="InvalidGrantException",WB="InvalidRequestException",XB="InternalServerException",YB="InvalidScopeException",ZB="IdToken",NB="RefreshToken",MB="SlowDownException",bB="UnauthorizedClientException",VB="UnsupportedGrantTypeException",HB="accessToken",H="client",qB="clientId",zB="clientSecret",UB="codeVerifier",wB="code",GB="deviceCode",F="error",kB="expiresIn",b="error_description",yB="grantType",RB="http",V="httpError",PB="idToken",e="reason",n="refreshToken",TB="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",AB="scope",DB="server",mB="tokenType",J="com.amazonaws.ssooidc",Bj=a.TypeRegistry.for(jj),Fj=[-3,jj,"SSOOIDCServiceException",0,[],[]];Bj.registerError(Fj,Q);var N=a.TypeRegistry.for(J),Jj=[-3,J,ij,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Jj,D);var Kj=[-3,J,oj,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Kj,m);var Lj=[-3,J,KB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Lj,_);var Qj=[-3,J,XB,{[F]:DB,[V]:500},[F,b],[0,0]];N.registerError(Qj,v);var Wj=[-3,J,LB,{[F]:H,[V]:401},[F,b],[0,0]];N.registerError(Wj,$);var Xj=[-3,J,QB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Xj,I);var Yj=[-3,J,WB,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Yj,O);var Zj=[-3,J,YB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Zj,h);var Nj=[-3,J,MB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Nj,u);var Mj=[-3,J,bB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Mj,l);var bj=[-3,J,VB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(bj,d);var Vj=[Bj,N],_B=[0,J,ej,8,0],vB=[0,J,nj,8,0],$B=[0,J,JB,8,0],IB=[0,J,ZB,8,0],Hj=[0,J,NB,8,0],qj=[3,J,BB,0,[qB,zB,yB,GB,wB,n,AB,TB,UB],[0,[()=>vB,0],0,0,0,[()=>Hj,0],64,0,[()=>$B,0]],3],zj=[3,J,FB,0,[HB,mB,kB,n,PB],[[()=>_B,0],0,1,[()=>Hj,0],[()=>IB,0]]],Uj=[9,J,jB,{[RB]:["POST","/token",200]},()=>qj,()=>zj],OB=(j)=>{return{apiVersion:"2019-06-10",base64Decoder:j?.base64Decoder??U.fromBase64,base64Encoder:j?.base64Encoder??U.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??tj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??Ej,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(B)=>B.getIdentityProvider("aws.auth#sigv4"),signer:new S.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(B)=>B.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new T.NoAuthSigner}],logger:j?.logger??new X.NoOpLogger,protocol:j?.protocol??uj.AwsRestJsonProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Vj,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:j?.serviceId??"SSO OIDC",urlParser:j?.urlParser??A.parseUrl,utf8Decoder:j?.utf8Decoder??U.fromUtf8,utf8Encoder:j?.utf8Encoder??U.toUtf8}},hB=(j)=>{X.emitWarningIfUnsupportedVersion(process.version);let B=Y.resolveDefaultsModeConfig(j),K=()=>B().then(X.loadConfigsForDefaultMode),M=OB(j);Z.emitWarningIfUnsupportedVersion(process.version);let L={profile:j?.profile,logger:M.logger};return{...M,...j,runtime:"node",defaultsMode:B,authSchemePreference:j?.authSchemePreference??Y.loadConfig(S.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,L),bodyLengthChecker:j?.bodyLengthChecker??U.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Z.createDefaultUserAgentProvider({serviceId:M.serviceId,clientVersion:gj.version}),maxAttempts:j?.maxAttempts??Y.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??Y.loadConfig(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...L}),requestHandler:r.NodeHttpHandler.create(j?.requestHandler??K),retryMode:j?.retryMode??Y.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||G.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??U.Hash.bind(null,"sha256"),streamCollector:j?.streamCollector??r.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??Y.loadConfig(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,L),useFipsEndpoint:j?.useFipsEndpoint??Y.loadConfig(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,L),userAgentAppId:j?.userAgentAppId??Y.loadConfig(Z.NODE_APP_ID_CONFIG_OPTIONS,L)}},uB=(j)=>{let{httpAuthSchemes:B,httpAuthSchemeProvider:K,credentials:M}=j;return{setHttpAuthScheme(L){let y=B.findIndex((C)=>C.schemeId===L.schemeId);if(y===-1)B.push(L);else B.splice(y,1,L)},httpAuthSchemes(){return B},setHttpAuthSchemeProvider(L){K=L},httpAuthSchemeProvider(){return K},setCredentials(L){M=L},credentials(){return M}}},lB=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},dB=(j,B)=>{let K=Object.assign(Z.getAwsRegionExtensionConfiguration(j),X.getDefaultExtensionConfiguration(j),A.getHttpHandlerExtensionConfiguration(j),uB(j));return B.forEach((M)=>M.configure(K)),Object.assign(j,Z.resolveAwsRegionExtensionConfiguration(K),X.resolveDefaultRuntimeConfig(K),A.resolveHttpHandlerRuntimeConfig(K),lB(K))};class f extends X.Client{config;constructor(...[j]){let B=hB(j||{});super(B);this.initConfig=B;let K=aj(B),M=Z.resolveUserAgentConfig(K),L=G.resolveRetryConfig(M),y=Y.resolveRegionConfig(L),C=Z.resolveHostHeaderConfig(y),wj=w.resolveEndpointConfig(C),Gj=xj(wj),kj=dB(Gj,j?.extensions||[]);this.config=kj,this.middlewareStack.use(a.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Z.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(A.getContentLengthPlugin(this.config)),this.middlewareStack.use(Z.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Z.getLoggerPlugin(this.config)),this.middlewareStack.use(Z.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(T.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lj,identityProviderConfigProvider:async(yj)=>new T.DefaultIdentityProviderConfig({"aws.auth#sigv4":yj.credentials})})),this.middlewareStack.use(T.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class g extends X.Command.classBuilder().ep(Sj).m(function(j,B,K,M){return[w.getEndpointPlugin(K,j.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Uj).build(){}var CB={CreateTokenCommand:g};class s extends f{}X.createAggregatedClient(CB,s);var EB={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},xB={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var{Command:aB,Client:SB}=X,fB=D,gB=Jj,sB=EB,rB=m,pB=Kj,cB=Uj,tB=g,iB=qj,oB=zj,eB=_,nB=Lj,jF=v,BF=Qj,FF=$,JF=Wj,KF=I,LF=Xj,QF=O,WF=Yj,XF=xB,YF=h,ZF=Zj,NF=s,MF=f,bF=Q,VF=Fj,HF=u,qF=Nj,zF=l,UF=Mj,wF=d,GF=bj,kF=Vj;export{kF as errorTypeRegistries,SB as __Client,GF as UnsupportedGrantTypeException$,wF as UnsupportedGrantTypeException,UF as UnauthorizedClientException$,zF as UnauthorizedClientException,qF as SlowDownException$,HF as SlowDownException,VF as SSOOIDCServiceException$,bF as SSOOIDCServiceException,MF as SSOOIDCClient,NF as SSOOIDC,ZF as InvalidScopeException$,YF as InvalidScopeException,XF as InvalidRequestExceptionReason,WF as InvalidRequestException$,QF as InvalidRequestException,LF as InvalidGrantException$,KF as InvalidGrantException,JF as InvalidClientException$,FF as InvalidClientException,BF as InternalServerException$,jF as InternalServerException,nB as ExpiredTokenException$,eB as ExpiredTokenException,oB as CreateTokenResponse$,iB as CreateTokenRequest$,tB as CreateTokenCommand,cB as CreateToken$,pB as AuthorizationPendingException$,rB as AuthorizationPendingException,sB as AccessDeniedExceptionReason,gB as AccessDeniedException$,fB as AccessDeniedException,aB as $Command};export default {get errorTypeRegistries(){return kF},get __Client(){return SB},get UnsupportedGrantTypeException$(){return GF},get UnsupportedGrantTypeException(){return wF},get UnauthorizedClientException$(){return UF},get UnauthorizedClientException(){return zF},get SlowDownException$(){return qF},get SlowDownException(){return HF},get SSOOIDCServiceException$(){return VF},get SSOOIDCServiceException(){return bF},get SSOOIDCClient(){return MF},get SSOOIDC(){return NF},get InvalidScopeException$(){return ZF},get InvalidScopeException(){return YF},get InvalidRequestExceptionReason(){return XF},get InvalidRequestException$(){return WF},get InvalidRequestException(){return QF},get InvalidGrantException$(){return LF},get InvalidGrantException(){return KF},get InvalidClientException$(){return JF},get InvalidClientException(){return FF},get InternalServerException$(){return BF},get InternalServerException(){return jF},get ExpiredTokenException$(){return nB},get ExpiredTokenException(){return eB},get CreateTokenResponse$(){return oB},get CreateTokenRequest$(){return iB},get CreateTokenCommand(){return tB},get CreateToken$(){return cB},get AuthorizationPendingException$(){return pB},get AuthorizationPendingException(){return rB},get AccessDeniedExceptionReason(){return sB},get AccessDeniedException$(){return gB},get AccessDeniedException(){return fB},get $Command(){return aB}};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{E as
|
|
2
|
+
import{wf as i}from"./chunk-v3x5nrc4.js";import{hQ as f}from"./chunk-4sazy0nq.js";var o=f((e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.fromString=e.fromArrayBuffer=void 0;var n=i();Object.defineProperty(e,"fromArrayBuffer",{enumerable:!0,get:function(){return n.fromArrayBuffer}});Object.defineProperty(e,"fromString",{enumerable:!0,get:function(){return n.fromString}})});var E=f((m)=>{var u=o(),y=(r)=>{let t=u.fromString(r,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},b=(r)=>{if(typeof r==="string")return y(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},c=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return u.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};m.fromUtf8=y;m.toUint8Array=b;m.toUtf8=c});
|
|
3
|
+
export{E as nf};
|