@qitqode/qitqode-android-arm64 0.2.6 → 0.2.8
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-03zpnwk2.js +2 -0
- package/bundle/{chunk-p54bzjtv.js → chunk-060wbpz4.js} +1 -1
- package/bundle/{chunk-j0bwa5dk.js → chunk-0a4pmkc9.js} +2 -2
- package/bundle/chunk-0aqdzyar.js +2 -0
- package/bundle/{chunk-vygkwwjd.js → chunk-0egrckx0.js} +2 -2
- package/bundle/{chunk-bwbqkfv0.js → chunk-0ffmwhw7.js} +1 -1
- package/bundle/{chunk-953pqp3w.js → chunk-0tcggtwv.js} +1 -1
- package/bundle/{chunk-tkrwcjkr.js → chunk-0tm6589k.js} +2 -2
- package/bundle/{chunk-y7hgevfv.js → chunk-0w19vmd7.js} +2 -2
- package/bundle/{chunk-ehb4hd9c.js → chunk-0z1keh2w.js} +1 -1
- package/bundle/{chunk-at22twxx.js → chunk-1bxfzd6r.js} +2 -2
- package/bundle/{chunk-48r70n4s.js → chunk-1har4t9a.js} +1 -1
- package/bundle/{chunk-sfw5qddj.js → chunk-1p9s5jj1.js} +1 -1
- package/bundle/{chunk-2md6sx8d.js → chunk-1rgt2vmt.js} +1 -1
- package/bundle/{chunk-ksme3gj1.js → chunk-1v0khv7p.js} +1 -1
- package/bundle/{chunk-a7rp46yt.js → chunk-26cr51wa.js} +5 -5
- package/bundle/{chunk-fhqfqd5v.js → chunk-27saej0r.js} +2 -2
- package/bundle/{chunk-9hz56z6a.js → chunk-29gwtcey.js} +1 -1
- package/bundle/chunk-2a5gjgvp.js +2 -0
- package/bundle/{chunk-venprxdp.js → chunk-2caaqmec.js} +1 -1
- package/bundle/{chunk-ff548b0j.js → chunk-2kh0tg92.js} +2 -2
- package/bundle/{chunk-6evh2ke8.js → chunk-2nheahmq.js} +1 -1
- package/bundle/chunk-2pkfphgb.js +2 -0
- package/bundle/{chunk-99s035f0.js → chunk-2qm46qvn.js} +2 -2
- package/bundle/{chunk-8e4s6nc2.js → chunk-2t5yh25f.js} +1 -1
- package/bundle/{chunk-k1nh5sd2.js → chunk-2vaphpz0.js} +1 -1
- package/bundle/{chunk-f3zmdfqa.js → chunk-33ebjca6.js} +1 -1
- package/bundle/{chunk-2drzgtv3.js → chunk-35fj1sfm.js} +2 -2
- package/bundle/chunk-37cbrnke.js +8 -0
- package/bundle/{chunk-3kpse7zy.js → chunk-3bb4aqh9.js} +1 -1
- package/bundle/chunk-3cx4p07h.js +2 -0
- package/bundle/chunk-3f2cjzb4.js +2 -0
- package/bundle/chunk-3qvap1kv.js +2 -0
- package/bundle/{chunk-p6crzjtf.js → chunk-3va85mbe.js} +2 -2
- package/bundle/{chunk-y67kaj0b.js → chunk-3z2zn8rj.js} +1 -1
- package/bundle/{chunk-bzebyyfr.js → chunk-3zwma68w.js} +4 -4
- package/bundle/{chunk-4pshnq6g.js → chunk-4064rbtp.js} +1 -1
- package/bundle/chunk-42hvspe7.js +2 -0
- package/bundle/chunk-452tk6v3.js +2 -0
- package/bundle/{chunk-ejqzcdcx.js → chunk-48gap82w.js} +1 -1
- package/bundle/{chunk-ycvwpmd9.js → chunk-4aajzxm9.js} +2 -2
- package/bundle/chunk-4gqb1hps.js +2 -0
- package/bundle/{chunk-e8p92vz4.js → chunk-4pmvxnkj.js} +2 -2
- package/bundle/chunk-50qgz5ka.js +2 -0
- package/bundle/{chunk-zc0cdvcv.js → chunk-52xvhxek.js} +2 -2
- package/bundle/{chunk-y0527cg0.js → chunk-56wq8cqj.js} +1 -1
- package/bundle/{chunk-tzb26ntq.js → chunk-58f4y4b7.js} +3 -3
- package/bundle/{chunk-tr6rdr6h.js → chunk-59csnjc3.js} +2 -2
- package/bundle/chunk-5b0xyq5z.js +2 -0
- package/bundle/{chunk-mn9end71.js → chunk-5bv63rqj.js} +1 -1
- package/bundle/{chunk-w4synhfg.js → chunk-5cw8235e.js} +1 -1
- package/bundle/{chunk-5asx1706.js → chunk-5f0nhthe.js} +2 -2
- package/bundle/chunk-5j4nxpdy.js +2 -0
- package/bundle/{chunk-cbnkx933.js → chunk-5nmm1kvx.js} +2 -2
- package/bundle/chunk-5nxgk6hw.js +2 -0
- package/bundle/chunk-5qkvhr6y.js +2 -0
- package/bundle/{chunk-avefgbjg.js → chunk-5r7c6vvx.js} +2 -2
- package/bundle/{chunk-z6sbjvtv.js → chunk-5wx962mw.js} +1 -1
- package/bundle/{chunk-mhhtf0v3.js → chunk-5xkp27b1.js} +1 -1
- package/bundle/chunk-66qmmmdp.js +2 -0
- package/bundle/{chunk-3cr2p4mp.js → chunk-66wv82vf.js} +1 -1
- package/bundle/chunk-6dpdkzrk.js +2 -0
- package/bundle/chunk-6p6m5956.js +3 -0
- package/bundle/{chunk-dnsh1v42.js → chunk-6ps30qax.js} +2 -2
- package/bundle/{chunk-hqbbs9dm.js → chunk-6qwk6z87.js} +3 -3
- package/bundle/{chunk-khzzmyk2.js → chunk-6tqbnxar.js} +1 -1
- package/bundle/chunk-6yhn9syz.js +2 -0
- package/bundle/{chunk-m5dm7a1t.js → chunk-72crs18f.js} +1 -1
- package/bundle/{chunk-hwrrrbqd.js → chunk-7adsab4h.js} +1 -1
- package/bundle/{chunk-97q2t1yz.js → chunk-7b60whxm.js} +1 -1
- package/bundle/chunk-7g59hc61.js +2 -0
- package/bundle/{chunk-5pzs51sp.js → chunk-7jy53zqy.js} +1 -1
- package/bundle/chunk-7p88j56s.js +2 -0
- package/bundle/{chunk-3jf3jhrs.js → chunk-7thhd7ds.js} +1 -1
- package/bundle/chunk-7trngc9g.js +2 -0
- package/bundle/{chunk-5df5aja0.js → chunk-82xrfk5x.js} +2 -2
- package/bundle/{chunk-jqk3v8d6.js → chunk-85wh85pk.js} +1 -1
- package/bundle/chunk-8cebbmtf.js +2 -0
- package/bundle/chunk-8csas2jc.js +2 -0
- package/bundle/chunk-8g4jdqq1.js +2 -0
- package/bundle/chunk-8j1xcdmd.js +2 -0
- package/bundle/{chunk-7vmx8bg9.js → chunk-8jmb5bd4.js} +2 -2
- package/bundle/{chunk-8wwdrwf2.js → chunk-8p0t8qah.js} +1 -1
- package/bundle/{chunk-bbng1cea.js → chunk-8ysp6vf8.js} +1 -1
- package/bundle/{chunk-rn83r0js.js → chunk-8yzghzjq.js} +1 -1
- package/bundle/{chunk-q3nvzhyh.js → chunk-9009v4d0.js} +2 -2
- package/bundle/chunk-90r2z49k.js +2 -0
- package/bundle/{chunk-j164q40b.js → chunk-92r1gw2j.js} +2 -2
- package/bundle/chunk-94mjwy22.js +2 -0
- package/bundle/{chunk-xdteq9bd.js → chunk-9cf2ktyh.js} +1 -1
- package/bundle/{chunk-ngfxxfem.js → chunk-9cn8cmt0.js} +1 -1
- package/bundle/{chunk-55ykn8nz.js → chunk-a1z8rnq7.js} +4 -4
- package/bundle/{chunk-j9h1sp4g.js → chunk-a48mx917.js} +2 -2
- package/bundle/{chunk-et3804wr.js → chunk-a8bjcvda.js} +1 -1
- package/bundle/chunk-aenrd7dk.js +2 -0
- package/bundle/{chunk-cz5vta94.js → chunk-afr8m0q1.js} +1 -1
- package/bundle/{chunk-f31yvp20.js → chunk-ag8wxwwz.js} +1 -1
- package/bundle/chunk-ahmy80vb.js +2 -0
- package/bundle/chunk-avn12jkt.js +2 -0
- package/bundle/{chunk-6scf311w.js → chunk-ax64ngf2.js} +1 -1
- package/bundle/{chunk-43ttzy29.js → chunk-ayb3bdb7.js} +2 -2
- package/bundle/{chunk-dnnkq5y4.js → chunk-az3nss5m.js} +2 -2
- package/bundle/chunk-b7ncyat6.js +2 -0
- package/bundle/{chunk-g3wvtyw3.js → chunk-b7sr9rn3.js} +1 -1
- package/bundle/{chunk-24rkf2gk.js → chunk-bc2krtaf.js} +1 -1
- package/bundle/{chunk-gjd3wf8b.js → chunk-bjv1h2dq.js} +1 -1
- package/bundle/{chunk-cng61dby.js → chunk-bnaj2hh3.js} +1 -1
- package/bundle/{chunk-70q8qcb2.js → chunk-bpfq8fz4.js} +1 -1
- package/bundle/chunk-brk6bge4.js +3 -0
- package/bundle/{chunk-eg3syjtv.js → chunk-bwadggys.js} +2 -2
- package/bundle/chunk-c2a74stf.js +2 -0
- package/bundle/{chunk-q9tgdghx.js → chunk-c3yjbent.js} +1 -1
- package/bundle/{chunk-7x6yrtzn.js → chunk-c76cjhn0.js} +1 -1
- package/bundle/{chunk-21rq4592.js → chunk-ccf4pgkr.js} +2 -2
- package/bundle/chunk-ce5e7j62.js +2 -0
- package/bundle/{chunk-tm34qp8j.js → chunk-cf9m9m9q.js} +1 -1
- package/bundle/{chunk-39z96pc6.js → chunk-cfwz1hgr.js} +3 -3
- package/bundle/{chunk-jww55nk9.js → chunk-cghz0855.js} +1 -1
- package/bundle/{chunk-5c2438af.js → chunk-cr5tknvb.js} +1 -1
- package/bundle/chunk-cw1gwjx9.js +2 -0
- package/bundle/chunk-czw30fjs.js +2 -0
- package/bundle/{chunk-05ck7acg.js → chunk-d30k7dpf.js} +1 -1
- package/bundle/{chunk-mjjaezwq.js → chunk-d839fr0w.js} +2 -2
- package/bundle/{chunk-nmzrrqgb.js → chunk-ddx2pcr4.js} +1 -1
- package/bundle/{chunk-pmg53fdd.js → chunk-dgcannw0.js} +1 -1
- package/bundle/{chunk-vnrjk2be.js → chunk-dhvx9p54.js} +1 -1
- package/bundle/chunk-dmkgjf1v.js +3 -0
- package/bundle/{chunk-nj1ntakd.js → chunk-dt3bsmfe.js} +2 -2
- package/bundle/chunk-dwhsvpag.js +2 -0
- package/bundle/{chunk-0smnwqk6.js → chunk-dwkrqtbc.js} +2 -2
- package/bundle/chunk-e01jgnnm.js +2 -0
- package/bundle/chunk-e0hfpdje.js +2 -0
- package/bundle/{chunk-r9w0thdk.js → chunk-e0vrxetq.js} +1 -1
- package/bundle/{chunk-k4gsktts.js → chunk-e2wfj86b.js} +1 -1
- package/bundle/chunk-e5jk67xh.js +2 -0
- package/bundle/{chunk-wkg3c643.js → chunk-eacpc64g.js} +2 -2
- package/bundle/{chunk-47k5jy1p.js → chunk-eewe7tx1.js} +2 -2
- package/bundle/{chunk-y29ejqg2.js → chunk-eg1m81ax.js} +1 -1
- package/bundle/chunk-eg4pq4hv.js +2 -0
- package/bundle/{chunk-bne5w117.js → chunk-ejhhrece.js} +3 -3
- package/bundle/{chunk-d7nsd979.js → chunk-epmc4aht.js} +1 -1
- package/bundle/chunk-ew3yz97p.js +2 -0
- package/bundle/{chunk-32j0q58h.js → chunk-eyr5ymt8.js} +1 -1
- package/bundle/chunk-ezgfhy4e.js +2 -0
- package/bundle/{chunk-45a4n21f.js → chunk-f2v4g7t1.js} +1 -1
- package/bundle/chunk-f2yfyhh8.js +2 -0
- package/bundle/chunk-f30em1wx.js +2 -0
- package/bundle/{chunk-5w76kdjr.js → chunk-f4mnp6xd.js} +1 -1
- package/bundle/{chunk-bkct64rs.js → chunk-f81kk8ra.js} +1 -1
- package/bundle/{chunk-3ktzxj69.js → chunk-f8cae1ap.js} +1 -1
- package/bundle/{chunk-ybane1en.js → chunk-fa8pwdwv.js} +1 -1
- package/bundle/{chunk-wwdpw27v.js → chunk-fej5x648.js} +1 -1
- package/bundle/{chunk-8yvx3pgy.js → chunk-fge37dke.js} +1 -1
- package/bundle/{chunk-nty5z2cj.js → chunk-fh3d0wce.js} +1 -1
- package/bundle/{chunk-gszvgz76.js → chunk-fjftb2sz.js} +2 -2
- package/bundle/{chunk-c36p881g.js → chunk-fs1vb39f.js} +3 -3
- package/bundle/{chunk-0xrb12s8.js → chunk-ftvvm4r5.js} +2 -2
- package/bundle/{chunk-nrat6ncm.js → chunk-fw1f47de.js} +1 -1
- package/bundle/{chunk-m7ganre7.js → chunk-g26redah.js} +1 -1
- package/bundle/{chunk-7g66qc1v.js → chunk-g3n465ee.js} +2 -2
- package/bundle/{chunk-313zqzc1.js → chunk-g4tyaj0m.js} +1 -1
- package/bundle/{chunk-fjbv3jht.js → chunk-g6y2c5az.js} +1 -1
- package/bundle/{chunk-qnvsqnz5.js → chunk-g7v6sp3c.js} +2 -2
- package/bundle/{chunk-n23d0q00.js → chunk-g878zd6e.js} +1 -1
- package/bundle/{chunk-p5be5ddp.js → chunk-g9nwqwqp.js} +1 -1
- package/bundle/chunk-gbvm6dpv.js +2 -0
- package/bundle/{chunk-fsqses4g.js → chunk-gc5rhnht.js} +2 -2
- package/bundle/{chunk-kengqzja.js → chunk-gefx3n08.js} +2 -2
- package/bundle/{chunk-yz25607t.js → chunk-ggncq8w8.js} +1 -1
- package/bundle/{chunk-7mppvhv9.js → chunk-gsg6zn7e.js} +2 -2
- package/bundle/{chunk-5nrc5rhh.js → chunk-gznt3dv8.js} +1 -1
- package/bundle/{chunk-p169ee92.js → chunk-h1bvqstw.js} +1 -1
- package/bundle/{chunk-pe2xdkez.js → chunk-h4hs2rhf.js} +2 -2
- package/bundle/chunk-h5w91zr4.js +2 -0
- package/bundle/{chunk-d6jhs818.js → chunk-h8mfbbjh.js} +2 -2
- package/bundle/{chunk-hjt94wce.js → chunk-he9kpk9r.js} +282 -276
- package/bundle/chunk-hmpb3c21.js +2 -0
- package/bundle/{chunk-920z7g7j.js → chunk-hz02vrqs.js} +1 -1
- package/bundle/{chunk-68v3b6ns.js → chunk-j10a984e.js} +2 -2
- package/bundle/chunk-j32rr7rt.js +2 -0
- package/bundle/chunk-j871xzr7.js +2 -0
- package/bundle/{chunk-0qd3567w.js → chunk-jmmtcr2r.js} +1 -1
- package/bundle/{chunk-has2rz35.js → chunk-jpn9zfj5.js} +1 -1
- package/bundle/{chunk-vshycswk.js → chunk-jqj1ay7x.js} +1 -1
- package/bundle/{chunk-vsz4s6zt.js → chunk-jr80q31w.js} +1 -1
- package/bundle/chunk-k3hgwszx.js +2 -0
- package/bundle/{chunk-wy3a4cab.js → chunk-kckr30tf.js} +1 -1
- package/bundle/{chunk-z1932c3f.js → chunk-kgv68cpb.js} +1 -1
- package/bundle/{chunk-vkaa7k3e.js → chunk-khpfseej.js} +2 -2
- package/bundle/{chunk-bd21p9zz.js → chunk-kre93a89.js} +2 -2
- package/bundle/{chunk-smznrv7k.js → chunk-kveztc6k.js} +1 -1
- package/bundle/{chunk-jnrnncqc.js → chunk-kwfe4em6.js} +1 -1
- package/bundle/chunk-kx88qekb.js +2 -0
- package/bundle/{chunk-4agaj51z.js → chunk-m4r8sepw.js} +1 -1
- package/bundle/{chunk-bqn6bqws.js → chunk-m7tmgvh6.js} +1 -1
- package/bundle/{chunk-qp1n7kwe.js → chunk-makegrxs.js} +1 -1
- package/bundle/{chunk-yhj01dz9.js → chunk-mr17tppa.js} +2 -2
- package/bundle/{chunk-5pwv2p3s.js → chunk-mv7q6ach.js} +1 -1
- package/bundle/chunk-n61e0znt.js +2 -0
- package/bundle/{chunk-j8fcfhr2.js → chunk-n6tqtk6h.js} +2 -2
- package/bundle/chunk-n6v36np0.js +2 -0
- package/bundle/chunk-ndd4cn3z.js +2 -0
- package/bundle/{chunk-t5r3w9e1.js → chunk-nfafk3ts.js} +1 -1
- package/bundle/{chunk-kth84vdn.js → chunk-nga216dm.js} +1 -1
- package/bundle/{chunk-cj7r8w1e.js → chunk-njsmma3a.js} +1 -1
- package/bundle/chunk-nr2j8ytn.js +3 -0
- package/bundle/{chunk-rrv0n73b.js → chunk-ntr0ezf2.js} +1 -1
- package/bundle/chunk-nwj6mcxz.js +2 -0
- package/bundle/{chunk-t239rvej.js → chunk-p2fte9vz.js} +2 -2
- package/bundle/chunk-p5b5ekhh.js +2 -0
- package/bundle/{chunk-vf492zs6.js → chunk-p8ak162p.js} +1 -1
- package/bundle/chunk-pf23nw4z.js +2 -0
- package/bundle/{chunk-0428v6mw.js → chunk-phf37x1c.js} +1 -1
- package/bundle/{chunk-faee8zgc.js → chunk-phpxxd48.js} +1 -1
- package/bundle/{chunk-5tky3csh.js → chunk-pqg1wjb5.js} +1 -1
- package/bundle/chunk-pw3cv89g.js +2 -0
- package/bundle/{chunk-d51908mv.js → chunk-q3c8mfbq.js} +1 -1
- package/bundle/{chunk-ypdt9mmr.js → chunk-qbnt4ynd.js} +2 -2
- package/bundle/chunk-qc89yj61.js +2 -0
- package/bundle/{chunk-k5q9px67.js → chunk-qgek59e6.js} +1 -1
- package/bundle/{chunk-v6v9xn81.js → chunk-qgfbsmsx.js} +1 -1
- package/bundle/{chunk-450fef7h.js → chunk-qgkb6n8k.js} +2 -2
- package/bundle/{chunk-xe69cnsk.js → chunk-qk1jkc0n.js} +1 -1
- package/bundle/{chunk-w4brava0.js → chunk-qk5vy2pr.js} +1 -1
- package/bundle/chunk-qn8tz704.js +2 -0
- package/bundle/{chunk-k3dacdp5.js → chunk-qq9m8fxv.js} +7 -7
- package/bundle/{chunk-q3h42a94.js → chunk-qxdpgdfk.js} +2 -2
- package/bundle/chunk-qxre2gqn.js +2 -0
- package/bundle/chunk-rdk62809.js +2 -0
- package/bundle/chunk-rew6r516.js +2 -0
- package/bundle/chunk-rjhvdfn5.js +2 -0
- package/bundle/{chunk-wyj8cpx5.js → chunk-rk0fnvp5.js} +1 -1
- package/bundle/{chunk-mh19kwzw.js → chunk-rmsqb6r4.js} +1 -1
- package/bundle/{chunk-jg1ccs3j.js → chunk-rva2ekrt.js} +1 -1
- package/bundle/{chunk-ac7482n2.js → chunk-rwnwjm82.js} +2 -2
- package/bundle/{chunk-ggxzf22k.js → chunk-rye1yjnr.js} +1 -1
- package/bundle/{chunk-s4vx9x1v.js → chunk-ryrxgn6d.js} +1 -1
- package/bundle/{chunk-pxm4qvqk.js → chunk-s2tc3qs0.js} +2 -2
- package/bundle/{chunk-mhtxp66q.js → chunk-s8z7v1me.js} +2 -2
- package/bundle/{chunk-9zm6r55d.js → chunk-sa0rrreh.js} +2 -2
- package/bundle/{chunk-mmjgf680.js → chunk-sbjymf20.js} +2 -2
- package/bundle/{chunk-ptqk1j2r.js → chunk-scnbt714.js} +1 -1
- package/bundle/chunk-skgr9ypq.js +2 -0
- package/bundle/{chunk-tg226j37.js → chunk-sm1g81cv.js} +1 -1
- package/bundle/chunk-sv40pwe2.js +2 -0
- package/bundle/{chunk-3vvd7j14.js → chunk-sy9w1t2y.js} +1 -1
- package/bundle/{chunk-p4027t94.js → chunk-sz0favtz.js} +1 -1
- package/bundle/{chunk-g22e4gw7.js → chunk-t18ka1e7.js} +1 -1
- package/bundle/{chunk-7hvf9dgx.js → chunk-t3w43rft.js} +1 -1
- package/bundle/{chunk-5zkj5xv9.js → chunk-t6zz47zk.js} +2 -2
- package/bundle/{chunk-6m9jb0s9.js → chunk-t8fjgkp8.js} +2 -2
- package/bundle/{chunk-7bcm7gg1.js → chunk-tbx741en.js} +1 -1
- package/bundle/chunk-tfhpjmny.js +2 -0
- package/bundle/chunk-tnete6ye.js +2 -0
- package/bundle/chunk-tpyq7ycb.js +2 -0
- package/bundle/{chunk-ezrqhqkp.js → chunk-trstb8ee.js} +1 -1
- package/bundle/{chunk-h9wh48d0.js → chunk-tsmj98yf.js} +2 -2
- package/bundle/{chunk-m80v76m9.js → chunk-txkdt4ep.js} +1 -1
- package/bundle/chunk-v5h5wxw5.js +2 -0
- package/bundle/chunk-v6141yq1.js +2 -0
- package/bundle/{chunk-cmb62jkt.js → chunk-vbfej8ds.js} +2 -2
- package/bundle/chunk-vfd3azkp.js +3 -0
- package/bundle/chunk-vjs69r6x.js +2 -0
- package/bundle/{chunk-xy0gnpen.js → chunk-vkjqy92f.js} +1 -1
- package/bundle/chunk-vmhar83s.js +2 -0
- package/bundle/{chunk-24ygjbpf.js → chunk-vph4w4yy.js} +2 -2
- package/bundle/chunk-vqvnw12p.js +2 -0
- package/bundle/{chunk-h62chdmw.js → chunk-vr8nwzp0.js} +1 -1
- package/bundle/{chunk-w46g7kdq.js → chunk-vs3s49jw.js} +2 -2
- package/bundle/{chunk-n78f8hfk.js → chunk-vsqvnxbz.js} +1 -1
- package/bundle/{chunk-t8c4cs6z.js → chunk-w0nc0gcx.js} +1 -1
- package/bundle/{chunk-qkvqvgcx.js → chunk-w0sng8a9.js} +1 -1
- package/bundle/chunk-w0sztk4y.js +2 -0
- package/bundle/chunk-w6bb320d.js +2 -0
- package/bundle/{chunk-55fcmswd.js → chunk-w7a33cwa.js} +2 -2
- package/bundle/{chunk-fyhqp4pb.js → chunk-w9qh2479.js} +1 -1
- package/bundle/{chunk-xwdxgg16.js → chunk-waa1ggtj.js} +1 -1
- package/bundle/{chunk-fr34mnyg.js → chunk-wb05bp10.js} +2 -2
- package/bundle/{chunk-gy21fw82.js → chunk-wb47k8ah.js} +2 -2
- package/bundle/{chunk-dxdggn90.js → chunk-wd8f9r4k.js} +1 -1
- package/bundle/chunk-wf41m019.js +2 -0
- package/bundle/{chunk-r5zy4za0.js → chunk-wgkcyqn1.js} +2 -2
- package/bundle/{chunk-ph8hn1wt.js → chunk-wm9nh9nb.js} +2 -2
- package/bundle/{chunk-g42krp0z.js → chunk-wn63q3xp.js} +1 -1
- package/bundle/{chunk-73r8bjjz.js → chunk-wqk1v8t0.js} +2 -2
- package/bundle/chunk-wqw6yjrg.js +2 -0
- package/bundle/{chunk-qey1efpx.js → chunk-wr6rnxr5.js} +1 -1
- package/bundle/chunk-ws08rxge.js +2 -0
- package/bundle/{chunk-xdd3553a.js → chunk-wtt5wms9.js} +1 -1
- package/bundle/{chunk-pb30kkbs.js → chunk-wtxh5m6j.js} +3 -3
- package/bundle/chunk-wz3dvc3g.js +2 -0
- package/bundle/{chunk-p4b0s5td.js → chunk-x00hwy3x.js} +1 -1
- package/bundle/chunk-x2pmqvdc.js +2 -0
- package/bundle/chunk-x4wfq39v.js +2 -0
- package/bundle/{chunk-pt0xphq9.js → chunk-xs6v0r9m.js} +1 -1
- package/bundle/{chunk-d0x5pbkm.js → chunk-xy8arehp.js} +1 -1
- package/bundle/{chunk-0cnwsf8p.js → chunk-y0h3jfkj.js} +1 -1
- package/bundle/{chunk-pr7z5dj8.js → chunk-y3gy62q5.js} +1 -1
- package/bundle/chunk-yb6m08zj.js +2 -0
- package/bundle/chunk-ybcqkgs7.js +2 -0
- package/bundle/{chunk-vcygx6hs.js → chunk-ydgst3h8.js} +2 -2
- package/bundle/{chunk-qxcyz5hc.js → chunk-ykpj10nz.js} +2 -2
- package/bundle/{chunk-t0761rhq.js → chunk-ynf17943.js} +2 -2
- package/bundle/{chunk-da6kggv7.js → chunk-ytyzrqev.js} +2 -2
- package/bundle/{chunk-ztyy3ga3.js → chunk-z0kbyr00.js} +2 -2
- package/bundle/{chunk-65bmsp2t.js → chunk-zfrftgcy.js} +1 -1
- package/bundle/chunk-zj1jc1xt.js +2 -0
- package/bundle/chunk-zm0m0504.js +2 -0
- package/bundle/{chunk-w9gzfsy7.js → chunk-zqdjk4rf.js} +2 -2
- package/bundle/{chunk-ha1w0xzh.js → chunk-zrhw1szj.js} +1 -1
- package/bundle/{chunk-804vmbcd.js → chunk-zsg29gba.js} +1 -1
- package/bundle/{chunk-6ar91jvd.js → chunk-zwhmg9dj.js} +1 -1
- 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-0ppnq3a4.js +0 -2
- package/bundle/chunk-0te0vcdn.js +0 -2
- package/bundle/chunk-11h06z17.js +0 -2
- package/bundle/chunk-28yv4fqe.js +0 -2
- package/bundle/chunk-34a52hyr.js +0 -2
- package/bundle/chunk-3d73kfea.js +0 -2
- package/bundle/chunk-3n3gb3vd.js +0 -2
- package/bundle/chunk-3sq60y9f.js +0 -2
- package/bundle/chunk-49mbnqvc.js +0 -2
- package/bundle/chunk-4fr6kae9.js +0 -2
- package/bundle/chunk-516w1nc4.js +0 -2
- package/bundle/chunk-535nm66j.js +0 -2
- package/bundle/chunk-5kpxpm8e.js +0 -2
- package/bundle/chunk-5nm5s0h2.js +0 -2
- package/bundle/chunk-5ysbwr4x.js +0 -3
- package/bundle/chunk-6dvmyeg7.js +0 -2
- package/bundle/chunk-6ex981t8.js +0 -2
- package/bundle/chunk-6gpf2bjs.js +0 -2
- package/bundle/chunk-6jeg2r5j.js +0 -2
- package/bundle/chunk-6nry7tah.js +0 -2
- package/bundle/chunk-7bgzcpdw.js +0 -2
- package/bundle/chunk-7kjvcbwa.js +0 -2
- package/bundle/chunk-7x30x94y.js +0 -2
- package/bundle/chunk-86hsh44c.js +0 -3
- package/bundle/chunk-8jma2btf.js +0 -2
- package/bundle/chunk-8sbb95a4.js +0 -2
- package/bundle/chunk-93e0w75z.js +0 -2
- package/bundle/chunk-97gp818s.js +0 -2
- package/bundle/chunk-9epf2zbh.js +0 -2
- package/bundle/chunk-agv04nt7.js +0 -2
- package/bundle/chunk-be7smmar.js +0 -2
- package/bundle/chunk-bg1t0kke.js +0 -2
- package/bundle/chunk-bryx5cx9.js +0 -2
- package/bundle/chunk-c13rrw41.js +0 -2
- package/bundle/chunk-c2kkv619.js +0 -2
- package/bundle/chunk-c3zge8cg.js +0 -3
- package/bundle/chunk-c5xj1y5v.js +0 -2
- package/bundle/chunk-cfhfc86j.js +0 -8
- package/bundle/chunk-ckpm4dvv.js +0 -2
- package/bundle/chunk-cqkaamvn.js +0 -2
- package/bundle/chunk-ct8twng1.js +0 -2
- package/bundle/chunk-d38y7bvh.js +0 -2
- package/bundle/chunk-d6hxsfm6.js +0 -2
- package/bundle/chunk-descb9jz.js +0 -2
- package/bundle/chunk-dvr2b9r1.js +0 -2
- package/bundle/chunk-ea5fktnn.js +0 -2
- package/bundle/chunk-f0t7rryn.js +0 -3
- package/bundle/chunk-f4mf6tpp.js +0 -2
- package/bundle/chunk-f97k17t8.js +0 -2
- package/bundle/chunk-g4ehhdzp.js +0 -2
- package/bundle/chunk-gd6qpdjw.js +0 -2
- package/bundle/chunk-gdn91t9j.js +0 -2
- package/bundle/chunk-gehn9fd9.js +0 -2
- package/bundle/chunk-hhax4mxw.js +0 -2
- package/bundle/chunk-hjb1etf8.js +0 -2
- package/bundle/chunk-jvkzdap1.js +0 -2
- package/bundle/chunk-kg8fcv91.js +0 -2
- package/bundle/chunk-kgptyf7n.js +0 -3
- package/bundle/chunk-kjjjrjnb.js +0 -2
- package/bundle/chunk-ky88ba80.js +0 -2
- package/bundle/chunk-m5cfmhwh.js +0 -2
- package/bundle/chunk-m7qxxbns.js +0 -2
- package/bundle/chunk-n8wg5h5p.js +0 -2
- package/bundle/chunk-nvs0d8jg.js +0 -2
- package/bundle/chunk-p6hcj3kv.js +0 -2
- package/bundle/chunk-pexmns0j.js +0 -2
- package/bundle/chunk-pt603np4.js +0 -2
- package/bundle/chunk-pz1avwyt.js +0 -2
- package/bundle/chunk-qk5bfcv8.js +0 -2
- package/bundle/chunk-qr06byhp.js +0 -2
- package/bundle/chunk-r7sq3maz.js +0 -2
- package/bundle/chunk-rcrjbhaz.js +0 -2
- package/bundle/chunk-rmgs9nmj.js +0 -2
- package/bundle/chunk-rytavefg.js +0 -2
- package/bundle/chunk-sh9vjnsh.js +0 -2
- package/bundle/chunk-st0c5wwc.js +0 -2
- package/bundle/chunk-teb3k2sf.js +0 -2
- package/bundle/chunk-ts798jvf.js +0 -2
- package/bundle/chunk-tx5aj02v.js +0 -2
- package/bundle/chunk-v1t51rrq.js +0 -2
- package/bundle/chunk-vdrz2t9c.js +0 -2
- package/bundle/chunk-vh9ptqn0.js +0 -2
- package/bundle/chunk-vj4x8hvz.js +0 -2
- package/bundle/chunk-w72rctxz.js +0 -2
- package/bundle/chunk-wbw9zv3h.js +0 -2
- package/bundle/chunk-x6mw98c2.js +0 -2
- package/bundle/chunk-y6p57wgh.js +0 -2
- package/bundle/chunk-y6xs8v17.js +0 -2
- package/bundle/chunk-z3xsfpc6.js +0 -2
- package/bundle/chunk-zkm3yyyf.js +0 -2
- package/bundle/chunk-zn5pw733.js +0 -2
- package/bundle/chunk-zxwvnmea.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{me as a,ne as b,oe as c,pe as d,qe as e,re as f,se as g,te as h,ue as i,ve as j,we as k}from"./chunk-qbnt4ynd.js";import"./chunk-0a4pmkc9.js";import"./chunk-35fj1sfm.js";import"./chunk-e0vrxetq.js";export{c as providerConfigFromInit,d as httpRequest,j as getInstanceMetadataEndpoint,k as fromInstanceMetadata,h as fromContainerMetadata,i as Endpoint,f as ENV_CMDS_RELATIVE_URI,e as ENV_CMDS_FULL_URI,g as ENV_CMDS_AUTH_TOKEN,a as DEFAULT_TIMEOUT,b as DEFAULT_MAX_RETRIES};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-e0vrxetq.js";var{create:tr,defineProperty:Pe,getOwnPropertyDescriptor:rr,getOwnPropertyNames:nr,getPrototypeOf:ir}=Object,or=Object.prototype.hasOwnProperty,vt=(u)=>{throw TypeError(u)},N=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),xt=(u,e)=>{for(var t in e)Pe(u,t,{get:e[t],enumerable:!0})},ar=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nr(e))!or.call(u,r)&&r!==t&&Pe(u,r,{get:()=>e[r],enumerable:!(n=rr(e,r))||n.enumerable});return u},Uu=(u,e,t)=>(t=u!=null?tr(ir(u)):{},ar(e||!u||!u.__esModule?Pe(t,"default",{value:u,enumerable:!0}):t,u)),Bt=(u,e,t)=>e.has(u)||vt("Cannot "+t),ku=(u,e,t)=>(Bt(u,e,"read from private field"),t?t.call(u):e.get(u)),sr=(u,e,t)=>e.has(u)?vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(u):e.set(u,t),Dr=(u,e,t,n)=>(Bt(u,e,"write to private field"),n?n.call(u,t):e.set(u,t),t),je=N((u,e)=>{e.exports=t;function t(n){return String(n).replace(/\s+/g," ")}}),lr=N((u,e)=>{e.exports=p;var t=9,n=10,r=32,i=33,a=58,o=91,s=92,l=93,D=94,c=96,f=4,h=1024;function p(d){var C=this.Parser,g=this.Compiler;E(C)&&v(C,d),A(g)&&F(g)}function E(d){return!!(d&&d.prototype&&d.prototype.blockTokenizers)}function A(d){return!!(d&&d.prototype&&d.prototype.visitors)}function v(d,C){for(var g=C||{},y=d.prototype,w=y.blockTokenizers,T=y.inlineTokenizers,b=y.blockMethods,k=y.inlineMethods,L=w.definition,I=T.reference,x=[],S=-1,M=b.length,z;++S<M;)z=b[S],!(z==="newline"||z==="indentedCode"||z==="paragraph"||z==="footnoteDefinition")&&x.push([z]);x.push(["footnoteDefinition"]),g.inlineNotes&&(B(k,"reference","inlineNote"),T.inlineNote=J),B(b,"definition","footnoteDefinition"),B(k,"reference","footnoteCall"),w.definition=O,w.footnoteDefinition=V,T.footnoteCall=q,T.reference=j,y.interruptFootnoteDefinition=x,j.locator=I.locator,q.locator=$,J.locator=U;function V(R,P,G){for(var W=this,Y=W.interruptFootnoteDefinition,K=W.offset,eu=P.length+1,H=0,Q=[],lu,Du,uu,_,X,pu,yu,hu,Fu,nu,du,tu,Z;H<eu&&(_=P.charCodeAt(H),!(_!==t&&_!==r));)H++;if(P.charCodeAt(H++)===o&&P.charCodeAt(H++)===D){for(Du=H;H<eu;){if(_=P.charCodeAt(H),_!==_||_===n||_===t||_===r)return;if(_===l){uu=H,H++;break}H++}if(!(uu===void 0||Du===uu||P.charCodeAt(H++)!==a)){if(G)return!0;for(lu=P.slice(Du,uu),X=R.now(),Fu=0,nu=0,du=H,tu=[];H<eu;){if(_=P.charCodeAt(H),_!==_||_===n)Z={start:Fu,contentStart:du||H,contentEnd:H,end:H},tu.push(Z),_===n&&(Fu=H+1,nu=0,du=void 0,Z.end=Fu);else if(nu!==void 0)if(_===r||_===t)nu+=_===r?1:f-nu%f,nu>f&&(nu=void 0,du=H);else{if(nu<f&&Z&&(Z.contentStart===Z.contentEnd||m(Y,w,W,[R,P.slice(H,h),!0])))break;nu=void 0,du=H}H++}for(H=-1,eu=tu.length;eu>0&&(Z=tu[eu-1],Z.contentStart===Z.contentEnd);)eu--;for(pu=R(P.slice(0,Z.contentEnd));++H<eu;)Z=tu[H],K[X.line+H]=(K[X.line+H]||0)+(Z.contentStart-Z.start),Q.push(P.slice(Z.contentStart,Z.end));return yu=W.enterBlock(),hu=W.tokenizeBlock(Q.join(""),X),yu(),pu({type:"footnoteDefinition",identifier:lu.toLowerCase(),label:lu,children:hu})}}}function q(R,P,G){var W=P.length+1,Y=0,K,eu,H,Q;if(P.charCodeAt(Y++)===o&&P.charCodeAt(Y++)===D){for(eu=Y;Y<W;){if(Q=P.charCodeAt(Y),Q!==Q||Q===n||Q===t||Q===r)return;if(Q===l){H=Y,Y++;break}Y++}if(!(H===void 0||eu===H))return G?!0:(K=P.slice(eu,H),R(P.slice(0,Y))({type:"footnoteReference",identifier:K.toLowerCase(),label:K}))}}function J(R,P,G){var W=this,Y=P.length+1,K=0,eu=0,H,Q,lu,Du,uu,_,X;if(P.charCodeAt(K++)===D&&P.charCodeAt(K++)===o){for(lu=K;K<Y;){if(Q=P.charCodeAt(K),Q!==Q)return;if(_===void 0)if(Q===s)K+=2;else if(Q===o)eu++,K++;else if(Q===l)if(eu===0){Du=K,K++;break}else eu--,K++;else if(Q===c){for(uu=K,_=1;P.charCodeAt(uu+_)===c;)_++;K+=_}else K++;else if(Q===c){for(uu=K,X=1;P.charCodeAt(uu+X)===c;)X++;K+=X,_===X&&(_=void 0),X=void 0}else K++}if(Du!==void 0)return G?!0:(H=R.now(),H.column+=2,H.offset+=2,R(P.slice(0,K))({type:"footnote",children:W.tokenizeInline(P.slice(lu,Du),H)}))}}function j(R,P,G){var W=0;if(P.charCodeAt(W)===i&&W++,P.charCodeAt(W)===o&&P.charCodeAt(W+1)!==D)return I.call(this,R,P,G)}function O(R,P,G){for(var W=0,Y=P.charCodeAt(W);Y===r||Y===t;)Y=P.charCodeAt(++W);if(Y===o&&P.charCodeAt(W+1)!==D)return L.call(this,R,P,G)}function $(R,P){return R.indexOf("[",P)}function U(R,P){return R.indexOf("^[",P)}}function F(d){var C=d.prototype.visitors,g=" ";C.footnote=y,C.footnoteReference=w,C.footnoteDefinition=T;function y(b){return"^["+this.all(b).join("")+"]"}function w(b){return"[^"+(b.label||b.identifier)+"]"}function T(b){for(var k=this.all(b).join(`
|
|
3
3
|
|
|
4
4
|
`).split(`
|
|
5
5
|
`),L=0,I=k.length,x;++L<I;)x=k[L],x!==""&&(k[L]=g+x);return"[^"+(b.label||b.identifier)+"]: "+k.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Tl as an,Ul as _i,Vl as bn,Wl as Ni,Yl as Yr,Zl as zr}from"./chunk-tzb26ntq.js";import{$l as yo,Am as Z,Bm as go,Cm as Kn,Dm as lo,Em as so,Fm as _o,Gm as No,Hm as po,Im as Ao,Jm as To,Km as Ir,Lm as Oo,Mm as $o,Nm as Do,Om as Lr,Pm as vo,Qm as dr,Rm as Bo,Sm as Gr,Tm as Jr,Um as Mr,Vm as Sr,Wm as Cr,Xm as Hr,Ym as Qo,Zm as Io,_l as uo,_m as Fo,bm as er,cm as mr,dm as ur,dn as ui,em as yr,fm as fr,gm as gr,hm as lr,im as sr,jm as _r,km as Nr,lm as pr,mm as Ar,nm as V,om as Tr,pm as Or,qm as $r,rm as Dr,sm as vr,tm as Br,um as j,vm as v,wm as yn,xm as un,ym as Xo,zm as Qr}from"./chunk-mh19kwzw.js";import{Kn as Fn,On as jn}from"./chunk-vcygx6hs.js";import{Pn as gi}from"./chunk-khzzmyk2.js";import{Qn as Mo}from"./chunk-y7hgevfv.js";import{Bq as ni,vq as Wn,wq as hn,xq as Nn,yq as hr,zq as ti}from"./chunk-q3nvzhyh.js";import{Cq as ri}from"./chunk-5df5aja0.js";import{Dr as gn}from"./chunk-xy0gnpen.js";import{as as ro}from"./chunk-tkrwcjkr.js";import{es as Ro}from"./chunk-fr34mnyg.js";import{Ns as nn,Ws as c}from"./chunk-tr6rdr6h.js";import{Zs as Xr,at as qo,bt as k,ft as mo,kt as $n}from"./chunk-at22twxx.js";import{lt as a}from"./chunk-kgptyf7n.js";import{az as pn,iz as Jn,wz as Cn}from"./chunk-55fcmswd.js";import{DE as h,LD as Ko,SD as Xn,TN as N,ZD as ln,eH as r,hK as Zr,iJ as Uo,lB as cn,mI as Ln,nE as Ur,zB as vn}from"./chunk-qnvsqnz5.js";import{uO as On}from"./chunk-r9w0thdk.js";var Vo={};On(Vo,{run:()=>$i});var mn={time_created:j().notNull().$default(()=>Date.now()),time_updated:j().notNull().$onUpdate(()=>Date.now())};var J=un("project",{id:v().$type().primaryKey(),worktree:v().notNull(),vcs:v(),name:v(),icon_url:v(),icon_color:v(),...mn,time_initialized:j(),sandboxes:v({mode:"json"}).notNull().$type(),commands:v({mode:"json"}).$type()});var fn=un("session",{id:v().$type().primaryKey(),project_id:v().$type().notNull().references(()=>J.id,{onDelete:"cascade"}),workspace_id:v().$type(),parent_id:v().$type(),context_from:v().$type(),context_watermark:v().$type(),slug:v().notNull(),directory:v().notNull(),title:v().notNull(),version:v().notNull(),share_url:v(),summary_additions:j(),summary_deletions:j(),summary_files:j(),summary_diffs:v({mode:"json"}).$type(),revert:v({mode:"json"}).$type(),permission:v({mode:"json"}).$type(),...mn,time_compacting:j(),time_archived:j(),last_checkpoint_message_id:v().$type()},(n)=>[yn("session_project_idx").on(n.project_id),yn("session_workspace_idx").on(n.workspace_id),yn("session_parent_idx").on(n.parent_id),yn("session_context_from_idx").on(n.context_from)]),eo=un("message",{id:v().$type().primaryKey(),session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),agent_id:v().notNull().default("main"),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("message_session_time_created_id_idx").on(n.session_id,n.time_created,n.id),yn("message_session_agent_idx").on(n.session_id,n.agent_id,n.id)]),Yo=un("part",{id:v().$type().primaryKey(),message_id:v().$type().notNull().references(()=>eo.id,{onDelete:"cascade"}),session_id:v().$type().notNull(),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("part_message_id_id_idx").on(n.message_id,n.id),yn("part_session_idx").on(n.session_id)]),zo=un("todo",{session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),content:v().notNull(),status:v().notNull(),position:j().notNull(),...mn},(n)=>[Xo({columns:[n.session_id,n.position]}),yn("todo_session_idx").on(n.session_id)]),co=un("permission",{project_id:v().primaryKey().references(()=>J.id,{onDelete:"cascade"}),...mn,data:v({mode:"json"}).notNull().$type()});var ko=un("session_share",{session_id:v().primaryKey().references(()=>fn.id,{onDelete:"cascade"}),id:v().notNull(),secret:v().notNull(),url:v().notNull(),...mn});import z from"path";var U=c.create({service:"json-migration"});async function $i(n,o){let i=z.join($n.Path.data,"storage");if(!await mo.exists(i))return U.info("storage directory does not exist, skipping migration"),{projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]};U.info("starting json to sqlite migration",{storageDir:i});let l=performance.now();n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = OFF"),n.run("PRAGMA cache_size = 10000"),n.run("PRAGMA temp_store = MEMORY");let e={projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]},A={sessions:0,todos:0,permissions:0,shares:0},_=e.errors,T=1000,M=Date.now();async function x(f){return qo.scan(f,{cwd:i,absolute:!0})}async function C(f,d,S){let B=S-d,p=Array(B);for(let E=0;E<B;E++)p[E]=mo.readJson(f[d+E]);let G=await Promise.allSettled(p),W=Array(B);for(let E=0;E<G.length;E++){let q=G[E];if(q.status==="fulfilled"){W[E]=q.value;continue}_.push(`failed to read ${f[d+E]}: ${q.reason}`)}return W}function H(f,d,S){if(f.length===0)return 0;try{return n.insert(d).values(f).onConflictDoNothing().run(),f.length}catch(B){return _.push(`failed to migrate ${S} batch: ${B}`),0}}U.info("scanning files...");let[K,$,Q,L,g,s,m]=await Promise.all([x("project/*.json"),x("session/*/*.json"),x("message/*/*.json"),x("part/*/*.json"),x("todo/*.json"),x("permission/*.json"),x("session_share/*.json")]);U.info("file scan complete",{projects:K.length,sessions:$.length,messages:Q.length,parts:L.length,todos:g.length,permissions:s.length,shares:m.length});let y=Math.max(1,K.length+$.length+Q.length+L.length+g.length+s.length+m.length),t=o?.progress,u=0,D=(f,d)=>{u=Math.min(y,u+d),t?.({current:u,total:y,label:f})};t?.({current:u,total:y,label:"starting"}),n.run("BEGIN TRANSACTION");let I=new Set,O=[];for(let f=0;f<K.length;f+=T){let d=Math.min(f+T,K.length),S=await C(K,f,d);O.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename(K[f+B],".json");I.add(G),O.push({id:G,worktree:p.worktree??"/",vcs:p.vcs,name:p.name??void 0,icon_url:p.icon?.url,icon_color:p.icon?.color,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_initialized:p.time?.initialized,sandboxes:p.sandboxes??[],commands:p.commands})}e.projects+=H(O,J,"project"),D("projects",d-f)}U.info("migrated projects",{count:e.projects,duration:Math.round(performance.now()-l)});let P=$.map((f)=>z.basename(z.dirname(f))),Y=new Set,en=[];for(let f=0;f<$.length;f+=T){let d=Math.min(f+T,$.length),S=await C($,f,d);en.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename($[f+B],".json"),W=P[f+B];if(!I.has(W)){A.sessions++;continue}Y.add(G),en.push({id:G,project_id:W,parent_id:p.parentID??null,slug:p.slug??"",directory:p.directory??"",title:p.title??"",version:p.version??"",share_url:p.share?.url??null,summary_additions:p.summary?.additions??null,summary_deletions:p.summary?.deletions??null,summary_files:p.summary?.files??null,summary_diffs:p.summary?.diffs??null,revert:p.revert??null,permission:p.permission??null,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_compacting:p.time?.compacting??null,time_archived:p.time?.archived??null})}e.sessions+=H(en,fn,"session"),D("sessions",d-f)}if(U.info("migrated sessions",{count:e.sessions}),A.sessions>0)U.warn("skipped orphaned sessions",{count:A.sessions});let sn=[],R=[],kn=new Map;for(let f of Q){let d=z.basename(z.dirname(f));if(!Y.has(d))continue;sn.push(f),R.push(d)}for(let f=0;f<sn.length;f+=T){let d=Math.min(f+T,sn.length),S=await C(sn,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=sn[f+G],q=z.basename(E,".json"),xn=R[f+G];kn.set(q,xn);let Bn=W;delete Bn.id,delete Bn.sessionID,B[p++]={id:q,session_id:xn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:Bn}}B.length=p,e.messages+=H(B,eo,"message"),D("messages",d-f)}U.info("migrated messages",{count:e.messages});for(let f=0;f<L.length;f+=T){let d=Math.min(f+T,L.length),S=await C(L,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=L[f+G],q=z.basename(E,".json"),xn=z.basename(z.dirname(E)),Bn=kn.get(xn);if(!Bn){_.push(`part missing message session: ${E}`);continue}if(!Y.has(Bn))continue;let wn=W;delete wn.id,delete wn.messageID,delete wn.sessionID,B[p++]={id:q,message_id:xn,session_id:Bn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:wn}}B.length=p,e.parts+=H(B,Yo,"part"),D("parts",d-f)}U.info("migrated parts",{count:e.parts});let Tn=g.map((f)=>z.basename(f,".json"));for(let f=0;f<g.length;f+=T){let d=Math.min(f+T,g.length),S=await C(g,f,d),B=[];for(let p=0;p<S.length;p++){let G=S[p];if(!G)continue;let W=Tn[f+p];if(!Y.has(W)){A.todos++;continue}if(!Array.isArray(G)){_.push(`todo not an array: ${g[f+p]}`);continue}for(let E=0;E<G.length;E++){let q=G[E];if(!q?.content||!q?.status)continue;B.push({session_id:W,content:q.content,status:q.status,position:E,time_created:M,time_updated:M})}}e.todos+=H(B,zo,"todo"),D("todos",d-f)}if(U.info("migrated todos",{count:e.todos}),A.todos>0)U.warn("skipped orphaned todos",{count:A.todos});let qn=s.map((f)=>z.basename(f,".json")),Hn=[];for(let f=0;f<s.length;f+=T){let d=Math.min(f+T,s.length),S=await C(s,f,d);Hn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=qn[f+B];if(!I.has(G)){A.permissions++;continue}Hn.push({project_id:G,data:p})}e.permissions+=H(Hn,co,"permission"),D("permissions",d-f)}if(U.info("migrated permissions",{count:e.permissions}),A.permissions>0)U.warn("skipped orphaned permissions",{count:A.permissions});let Vn=m.map((f)=>z.basename(f,".json")),dn=[];for(let f=0;f<m.length;f+=T){let d=Math.min(f+T,m.length),S=await C(m,f,d);dn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=Vn[f+B];if(!Y.has(G)){A.shares++;continue}if(!p?.id||!p?.secret||!p?.url){_.push(`session_share missing id/secret/url: ${m[f+B]}`);continue}dn.push({session_id:G,id:p.id,secret:p.secret,url:p.url})}e.shares+=H(dn,ko,"session_share"),D("shares",d-f)}if(U.info("migrated session shares",{count:e.shares}),A.shares>0)U.warn("skipped orphaned session shares",{count:A.shares});if(n.run("COMMIT"),U.info("json migration complete",{projects:e.projects,sessions:e.sessions,messages:e.messages,parts:e.parts,todos:e.todos,permissions:e.permissions,shares:e.shares,errorCount:e.errors.length,duration:Math.round(performance.now()-l)}),e.errors.length>0)U.warn("migration errors",{errors:e.errors.slice(0,20)});return t?.({current:y,total:y,label:"complete"}),e}var In={};On(In,{use:()=>Ce,transaction:()=>xe,textDecoder:()=>re,sumDistinct:()=>rr,sum:()=>or,sql:()=>V,relationsOrderToSQL:()=>Rt,relationsFilterToSQL:()=>Kt,relationToSQL:()=>xt,relationExtrasToSQL:()=>Ht,processRelations:()=>Ct,placeholder:()=>Or,param:()=>Ar,orderSelectedFields:()=>oe,orderByOperators:()=>St,or:()=>lo,operators:()=>Mt,notLike:()=>Gr,notInArray:()=>Ir,notIlike:()=>Mr,notExists:()=>Lr,notBetween:()=>dr,not:()=>so,noopMapper:()=>Nr,noopEncoder:()=>_r,noopDecoder:()=>sr,ne:()=>go,name:()=>gr,min:()=>tr,max:()=>ir,mapUpdateSet:()=>ne,mapResultRow:()=>ht,mapRelationalRow:()=>Jt,mapColumnsInSQLToAlias:()=>it,mapColumnsInAliasedSQLToAlias:()=>rt,lte:()=>Ao,lt:()=>po,like:()=>Bo,l2Distance:()=>Xt,l1Distance:()=>Zt,jaccardDistance:()=>Ut,isWithEnum:()=>bt,isView:()=>vr,isTable:()=>Yi,isSQLWrapper:()=>mr,isNull:()=>Oo,isNotNull:()=>$o,isDriverValueEncoder:()=>lr,isConfig:()=>at,is:()=>Mi,innerProduct:()=>Wt,inArray:()=>To,ilike:()=>Jr,haveSameKeys:()=>jt,hasOwnEntityKind:()=>Ji,hammingDistance:()=>Pt,gte:()=>No,gt:()=>_o,getViewSelectedFields:()=>Ft,getViewName:()=>Br,getTableUniqueName:()=>Xi,getTableName:()=>Zi,getTableLikeName:()=>wt,getTableColumns:()=>Vt,getTableAsAliasSQL:()=>Gt,getOriginalColumnFromAlias:()=>ot,getOrderByOperators:()=>dt,getColumns:()=>qt,getColumnTable:()=>Ci,getColumnNameAndConfig:()=>kt,getChannelPath:()=>li,fillPlaceholders:()=>$r,fieldSelectionToSQL:()=>Lt,extractTablesFromSchema:()=>It,extractExtendedColumnType:()=>mt,exists:()=>Do,eq:()=>Z,entityKind:()=>Gi,effect:()=>He,desc:()=>Io,defineRelationsPart:()=>Qt,defineRelations:()=>Bt,createRelationsHelper:()=>vt,countDistinct:()=>bo,count:()=>fo,cosineDistance:()=>Et,close:()=>Se,buildRelationsParts:()=>Dt,buildRelations:()=>$t,bindIfParam:()=>Qr,between:()=>vo,avgDistinct:()=>nr,avg:()=>ho,assertUnreachable:()=>ct,asc:()=>Qo,arrayOverlaps:()=>Hr,arrayContains:()=>Sr,arrayContained:()=>Cr,applyMixins:()=>zt,and:()=>Kn,aliasedTableColumn:()=>nt,aliasedTable:()=>hi,aliasedRelation:()=>bi,aliasedColumn:()=>ai,WithSubquery:()=>ci,ViewSelectionAliasProxyHandler:()=>ji,ViewBaseConfig:()=>ki,View:()=>Dr,TransactionRollbackError:()=>ft,TableSchema:()=>Ui,TableColumns:()=>Wi,TableAliasProxyHandler:()=>Fi,Table:()=>Pi,Subquery:()=>zi,StringChunk:()=>ur,SQL:()=>yr,RelationsHelperStatic:()=>Ot,RelationsBuilderTable:()=>Tt,RelationsBuilderJunctionColumn:()=>At,RelationsBuilderColumn:()=>pt,RelationTableAliasProxyHandler:()=>wi,Relation:()=>Nt,QueryPromise:()=>tt,Placeholder:()=>Tr,Path:()=>Eo,Param:()=>pr,OriginalName:()=>Ei,One:()=>_t,NotFoundError:()=>Me,NoopLogger:()=>di,Name:()=>fr,Many:()=>st,IsAlias:()=>Ri,FakePrimitiveParam:()=>er,ExtraConfigColumns:()=>Ki,ExtraConfigBuilder:()=>xi,DrizzleQueryError:()=>yt,DrizzleError:()=>ut,DefaultLogger:()=>Li,Count:()=>lt,ConsoleLogWriter:()=>Ii,ColumnTableAliasProxyHandler:()=>Vi,ColumnBuilder:()=>et,ColumnAliasProxyHandler:()=>qi,Column:()=>Si,Client:()=>Mn,CONSTANTS:()=>Yt,BaseName:()=>Hi,AggregatedField:()=>gt});import Di from"crypto";import wo,{existsSync as vi,readdirSync as Bi}from"fs";import{join as Qi}from"path";function jo(n){if(wo.existsSync(`${n.migrationsFolder}/meta/_journal.json`))throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');let o=n.migrationsFolder,i=[],l=Bi(o).map((e)=>({path:Qi(o,e,"migration.sql"),name:e})).filter((e)=>vi(e.path));l.sort((e,A)=>e.name.localeCompare(A.name));for(let e of l){let A=e.path,_=e.name.slice(0,14),T=wo.readFileSync(A).toString(),M=T.split("--> statement-breakpoint").map((C)=>{return C}),x=Fo(_);i.push({sql:M,bps:!0,folderMillis:x,hash:Di.createHash("sha256").update(T).digest("hex"),name:e.name})}return i}function ao(n,o){if(Array.isArray(o)||"migrationsJournal"in o){let l=Array.isArray(o)?o:o.migrationsJournal,e=Array.isArray(o)?void 0:o.migrationsTable,A=l.map((_)=>({sql:_.sql.split("--> statement-breakpoint"),folderMillis:_.timestamp,hash:"",bps:!0,name:_.name}));return n.dialect.migrate(A,n.session,{migrationsTable:e})}let i=jo(o);return n.dialect.migrate(i,n.session,o)}function fo(n){return V`count(${n||V.raw("*")})`.mapWith(Number)}function bo(n){return V`count(distinct ${n})`.mapWith(Number)}function ho(n){return V`avg(${n})`.mapWith(String)}function nr(n){return V`avg(distinct ${n})`.mapWith(String)}function or(n){return V`sum(${n})`.mapWith(String)}function rr(n){return V`sum(distinct ${n})`.mapWith(String)}function ir(n){return V`max(${n})`.mapWith(uo(n,yo)?n:String)}function tr(n){return V`min(${n})`.mapWith(uo(n,yo)?n:String)}import oo from"path";var Un={};On(Un,{workspaceID:()=>De,useEffect:()=>Qe,use:()=>Be,make:()=>ve,invalidate:()=>Le,has:()=>Ie,get:()=>xo,directory:()=>no,context:()=>Ho,bind:()=>$e});import{EventEmitter as ie}from"events";var Rn=new ie;var Lo=new Set;function xr(n){return Lo.add(n),()=>{Lo.delete(n)}}async function Go(n){await Promise.allSettled([...Lo].map((o)=>o(n)))}function En(n){return n()}var jr={};On(jr,{setInitialized:()=>se,list:()=>ge,layer:()=>Fr,get:()=>le,fromRow:()=>_n,defaultLayer:()=>Co,UpdateInput:()=>fe,Service:()=>Gn,Info:()=>Vr,Event:()=>wr});import*as F from"fs/promises";import*as cr from"os";import*as Dn from"path";var te=N.String.pipe(N.brand("ProjectID")),w=te.pipe(Fn((n)=>({global:n.make("global"),zod:a.string().pipe(a.custom())})));import*as Qn from"fs/promises";import*as b from"path";import*as Er from"crypto";async function Jo(n){let o=b.resolve(n);while(!0){let i=b.join(o,".git"),l=await Qn.stat(i).catch(()=>null);if(l){if(l.isDirectory())return i;let _=(await Qn.readFile(i,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(!_)return null;let T=b.isAbsolute(_[1])?_[1]:b.resolve(o,_[1]);return b.resolve(T,"../..")}let e=b.dirname(o);if(e===o)return null;o=e}}async function Kr(n){let o=await Qn.readFile(n,"utf-8").catch(()=>null);if(o===null)return null;return o.trim()||null}async function Rr(n){let o=await Kr(n);if(o)return o;let i=Er.randomUUID();try{return await Qn.writeFile(n,i,{flag:"wx"}),i}catch(l){if(l.code!=="EEXIST")throw l;let e=await Kr(n);if(e)return e;throw Error(`Project ID file was concurrently created but is empty: ${n}`)}}async function Pr(n){let o=await Jo(n);if(o){let l=b.join(o,"qitqode-project-id");return w.make(await Rr(l))}let i=b.join(n,".qitqode-project-id");return w.make(await Rr(i))}async function me(n){let o=await Jo(n);if(!o)return;let i=Dn.join(n,".qitqode-project-id"),l=Dn.join(o,"qitqode-project-id"),e=(T)=>F.access(T).then(()=>!0).catch(()=>!1);if(await e(i)){if(!await e(l)){let T=await F.readFile(i,"utf-8");await F.writeFile(l,T)}await F.unlink(i).catch(()=>{})}let A=Dn.join(o,"info","exclude");if(await F.mkdir(Dn.dirname(A),{recursive:!0}),!(await F.readFile(A,"utf-8").catch(()=>"")).includes(".qitqode-project-id"))await F.appendFile(A,`
|
|
2
|
+
import{Ul as an,Vl as _i,Wl as bn,Xl as Ni,Zl as Yr,_l as zr}from"./chunk-58f4y4b7.js";import{$l as uo,$m as Fo,Am as Qr,Bm as Z,Cm as go,Dm as Kn,Em as lo,Fm as so,Gm as _o,Hm as No,Im as po,Jm as Ao,Km as To,Lm as Ir,Mm as Oo,Nm as $o,Om as Do,Pm as Lr,Qm as vo,Rm as dr,Sm as Bo,Tm as Gr,Um as Jr,Vm as Mr,Wm as Sr,Xm as Cr,Ym as Hr,Zm as Qo,_m as Io,am as yo,cm as er,dm as mr,em as ur,en as ui,fm as yr,gm as fr,hm as gr,im as lr,jm as sr,km as _r,lm as Nr,mm as pr,nm as Ar,om as V,pm as Tr,qm as Or,rm as $r,sm as Dr,tm as vr,um as Br,vm as j,wm as v,xm as yn,ym as un,zm as Xo}from"./chunk-rmsqb6r4.js";import{Ln as Fn,Pn as jn}from"./chunk-ydgst3h8.js";import{Qn as gi}from"./chunk-6tqbnxar.js";import{Rn as Mo}from"./chunk-0w19vmd7.js";import{Aq as ti,Cq as ni,wq as Wn,xq as hn,yq as Nn,zq as hr}from"./chunk-9009v4d0.js";import{Dq as ri}from"./chunk-82xrfk5x.js";import{Er as gn}from"./chunk-vkjqy92f.js";import{bs as ro}from"./chunk-0tm6589k.js";import{fs as Ro}from"./chunk-wb05bp10.js";import{Os as nn,Xs as c}from"./chunk-59csnjc3.js";import{_s as Xr,bt as qo,ct as k,gt as mo,lt as $n}from"./chunk-1bxfzd6r.js";import{mt as a}from"./chunk-6p6m5956.js";import{bz as pn,jz as Jn,xz as Cn}from"./chunk-w7a33cwa.js";import{AB as vn,EE as h,MD as Ko,TD as Xn,UN as N,_D as ln,fH as r,iK as Zr,jJ as Uo,mB as cn,nI as Ln,oE as Ur}from"./chunk-g7v6sp3c.js";import{vO as On}from"./chunk-e0vrxetq.js";var Vo={};On(Vo,{run:()=>$i});var mn={time_created:j().notNull().$default(()=>Date.now()),time_updated:j().notNull().$onUpdate(()=>Date.now())};var J=un("project",{id:v().$type().primaryKey(),worktree:v().notNull(),vcs:v(),name:v(),icon_url:v(),icon_color:v(),...mn,time_initialized:j(),sandboxes:v({mode:"json"}).notNull().$type(),commands:v({mode:"json"}).$type()});var fn=un("session",{id:v().$type().primaryKey(),project_id:v().$type().notNull().references(()=>J.id,{onDelete:"cascade"}),workspace_id:v().$type(),parent_id:v().$type(),context_from:v().$type(),context_watermark:v().$type(),slug:v().notNull(),directory:v().notNull(),title:v().notNull(),version:v().notNull(),share_url:v(),summary_additions:j(),summary_deletions:j(),summary_files:j(),summary_diffs:v({mode:"json"}).$type(),revert:v({mode:"json"}).$type(),permission:v({mode:"json"}).$type(),...mn,time_compacting:j(),time_archived:j(),last_checkpoint_message_id:v().$type()},(n)=>[yn("session_project_idx").on(n.project_id),yn("session_workspace_idx").on(n.workspace_id),yn("session_parent_idx").on(n.parent_id),yn("session_context_from_idx").on(n.context_from)]),eo=un("message",{id:v().$type().primaryKey(),session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),agent_id:v().notNull().default("main"),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("message_session_time_created_id_idx").on(n.session_id,n.time_created,n.id),yn("message_session_agent_idx").on(n.session_id,n.agent_id,n.id)]),Yo=un("part",{id:v().$type().primaryKey(),message_id:v().$type().notNull().references(()=>eo.id,{onDelete:"cascade"}),session_id:v().$type().notNull(),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("part_message_id_id_idx").on(n.message_id,n.id),yn("part_session_idx").on(n.session_id)]),zo=un("todo",{session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),content:v().notNull(),status:v().notNull(),position:j().notNull(),...mn},(n)=>[Xo({columns:[n.session_id,n.position]}),yn("todo_session_idx").on(n.session_id)]),co=un("permission",{project_id:v().primaryKey().references(()=>J.id,{onDelete:"cascade"}),...mn,data:v({mode:"json"}).notNull().$type()});var ko=un("session_share",{session_id:v().primaryKey().references(()=>fn.id,{onDelete:"cascade"}),id:v().notNull(),secret:v().notNull(),url:v().notNull(),...mn});import z from"path";var U=c.create({service:"json-migration"});async function $i(n,o){let i=z.join($n.Path.data,"storage");if(!await mo.exists(i))return U.info("storage directory does not exist, skipping migration"),{projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]};U.info("starting json to sqlite migration",{storageDir:i});let l=performance.now();n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = OFF"),n.run("PRAGMA cache_size = 10000"),n.run("PRAGMA temp_store = MEMORY");let e={projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]},A={sessions:0,todos:0,permissions:0,shares:0},_=e.errors,T=1000,M=Date.now();async function x(f){return qo.scan(f,{cwd:i,absolute:!0})}async function C(f,d,S){let B=S-d,p=Array(B);for(let E=0;E<B;E++)p[E]=mo.readJson(f[d+E]);let G=await Promise.allSettled(p),W=Array(B);for(let E=0;E<G.length;E++){let q=G[E];if(q.status==="fulfilled"){W[E]=q.value;continue}_.push(`failed to read ${f[d+E]}: ${q.reason}`)}return W}function H(f,d,S){if(f.length===0)return 0;try{return n.insert(d).values(f).onConflictDoNothing().run(),f.length}catch(B){return _.push(`failed to migrate ${S} batch: ${B}`),0}}U.info("scanning files...");let[K,$,Q,L,g,s,m]=await Promise.all([x("project/*.json"),x("session/*/*.json"),x("message/*/*.json"),x("part/*/*.json"),x("todo/*.json"),x("permission/*.json"),x("session_share/*.json")]);U.info("file scan complete",{projects:K.length,sessions:$.length,messages:Q.length,parts:L.length,todos:g.length,permissions:s.length,shares:m.length});let y=Math.max(1,K.length+$.length+Q.length+L.length+g.length+s.length+m.length),t=o?.progress,u=0,D=(f,d)=>{u=Math.min(y,u+d),t?.({current:u,total:y,label:f})};t?.({current:u,total:y,label:"starting"}),n.run("BEGIN TRANSACTION");let I=new Set,O=[];for(let f=0;f<K.length;f+=T){let d=Math.min(f+T,K.length),S=await C(K,f,d);O.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename(K[f+B],".json");I.add(G),O.push({id:G,worktree:p.worktree??"/",vcs:p.vcs,name:p.name??void 0,icon_url:p.icon?.url,icon_color:p.icon?.color,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_initialized:p.time?.initialized,sandboxes:p.sandboxes??[],commands:p.commands})}e.projects+=H(O,J,"project"),D("projects",d-f)}U.info("migrated projects",{count:e.projects,duration:Math.round(performance.now()-l)});let P=$.map((f)=>z.basename(z.dirname(f))),Y=new Set,en=[];for(let f=0;f<$.length;f+=T){let d=Math.min(f+T,$.length),S=await C($,f,d);en.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename($[f+B],".json"),W=P[f+B];if(!I.has(W)){A.sessions++;continue}Y.add(G),en.push({id:G,project_id:W,parent_id:p.parentID??null,slug:p.slug??"",directory:p.directory??"",title:p.title??"",version:p.version??"",share_url:p.share?.url??null,summary_additions:p.summary?.additions??null,summary_deletions:p.summary?.deletions??null,summary_files:p.summary?.files??null,summary_diffs:p.summary?.diffs??null,revert:p.revert??null,permission:p.permission??null,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_compacting:p.time?.compacting??null,time_archived:p.time?.archived??null})}e.sessions+=H(en,fn,"session"),D("sessions",d-f)}if(U.info("migrated sessions",{count:e.sessions}),A.sessions>0)U.warn("skipped orphaned sessions",{count:A.sessions});let sn=[],R=[],kn=new Map;for(let f of Q){let d=z.basename(z.dirname(f));if(!Y.has(d))continue;sn.push(f),R.push(d)}for(let f=0;f<sn.length;f+=T){let d=Math.min(f+T,sn.length),S=await C(sn,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=sn[f+G],q=z.basename(E,".json"),xn=R[f+G];kn.set(q,xn);let Bn=W;delete Bn.id,delete Bn.sessionID,B[p++]={id:q,session_id:xn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:Bn}}B.length=p,e.messages+=H(B,eo,"message"),D("messages",d-f)}U.info("migrated messages",{count:e.messages});for(let f=0;f<L.length;f+=T){let d=Math.min(f+T,L.length),S=await C(L,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=L[f+G],q=z.basename(E,".json"),xn=z.basename(z.dirname(E)),Bn=kn.get(xn);if(!Bn){_.push(`part missing message session: ${E}`);continue}if(!Y.has(Bn))continue;let wn=W;delete wn.id,delete wn.messageID,delete wn.sessionID,B[p++]={id:q,message_id:xn,session_id:Bn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:wn}}B.length=p,e.parts+=H(B,Yo,"part"),D("parts",d-f)}U.info("migrated parts",{count:e.parts});let Tn=g.map((f)=>z.basename(f,".json"));for(let f=0;f<g.length;f+=T){let d=Math.min(f+T,g.length),S=await C(g,f,d),B=[];for(let p=0;p<S.length;p++){let G=S[p];if(!G)continue;let W=Tn[f+p];if(!Y.has(W)){A.todos++;continue}if(!Array.isArray(G)){_.push(`todo not an array: ${g[f+p]}`);continue}for(let E=0;E<G.length;E++){let q=G[E];if(!q?.content||!q?.status)continue;B.push({session_id:W,content:q.content,status:q.status,position:E,time_created:M,time_updated:M})}}e.todos+=H(B,zo,"todo"),D("todos",d-f)}if(U.info("migrated todos",{count:e.todos}),A.todos>0)U.warn("skipped orphaned todos",{count:A.todos});let qn=s.map((f)=>z.basename(f,".json")),Hn=[];for(let f=0;f<s.length;f+=T){let d=Math.min(f+T,s.length),S=await C(s,f,d);Hn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=qn[f+B];if(!I.has(G)){A.permissions++;continue}Hn.push({project_id:G,data:p})}e.permissions+=H(Hn,co,"permission"),D("permissions",d-f)}if(U.info("migrated permissions",{count:e.permissions}),A.permissions>0)U.warn("skipped orphaned permissions",{count:A.permissions});let Vn=m.map((f)=>z.basename(f,".json")),dn=[];for(let f=0;f<m.length;f+=T){let d=Math.min(f+T,m.length),S=await C(m,f,d);dn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=Vn[f+B];if(!Y.has(G)){A.shares++;continue}if(!p?.id||!p?.secret||!p?.url){_.push(`session_share missing id/secret/url: ${m[f+B]}`);continue}dn.push({session_id:G,id:p.id,secret:p.secret,url:p.url})}e.shares+=H(dn,ko,"session_share"),D("shares",d-f)}if(U.info("migrated session shares",{count:e.shares}),A.shares>0)U.warn("skipped orphaned session shares",{count:A.shares});if(n.run("COMMIT"),U.info("json migration complete",{projects:e.projects,sessions:e.sessions,messages:e.messages,parts:e.parts,todos:e.todos,permissions:e.permissions,shares:e.shares,errorCount:e.errors.length,duration:Math.round(performance.now()-l)}),e.errors.length>0)U.warn("migration errors",{errors:e.errors.slice(0,20)});return t?.({current:y,total:y,label:"complete"}),e}var In={};On(In,{use:()=>Ce,transaction:()=>xe,textDecoder:()=>re,sumDistinct:()=>rr,sum:()=>or,sql:()=>V,relationsOrderToSQL:()=>Rt,relationsFilterToSQL:()=>Kt,relationToSQL:()=>xt,relationExtrasToSQL:()=>Ht,processRelations:()=>Ct,placeholder:()=>Or,param:()=>Ar,orderSelectedFields:()=>oe,orderByOperators:()=>St,or:()=>lo,operators:()=>Mt,notLike:()=>Gr,notInArray:()=>Ir,notIlike:()=>Mr,notExists:()=>Lr,notBetween:()=>dr,not:()=>so,noopMapper:()=>Nr,noopEncoder:()=>_r,noopDecoder:()=>sr,ne:()=>go,name:()=>gr,min:()=>tr,max:()=>ir,mapUpdateSet:()=>ne,mapResultRow:()=>ht,mapRelationalRow:()=>Jt,mapColumnsInSQLToAlias:()=>it,mapColumnsInAliasedSQLToAlias:()=>rt,lte:()=>Ao,lt:()=>po,like:()=>Bo,l2Distance:()=>Xt,l1Distance:()=>Zt,jaccardDistance:()=>Ut,isWithEnum:()=>bt,isView:()=>vr,isTable:()=>Yi,isSQLWrapper:()=>mr,isNull:()=>Oo,isNotNull:()=>$o,isDriverValueEncoder:()=>lr,isConfig:()=>at,is:()=>Mi,innerProduct:()=>Wt,inArray:()=>To,ilike:()=>Jr,haveSameKeys:()=>jt,hasOwnEntityKind:()=>Ji,hammingDistance:()=>Pt,gte:()=>No,gt:()=>_o,getViewSelectedFields:()=>Ft,getViewName:()=>Br,getTableUniqueName:()=>Xi,getTableName:()=>Zi,getTableLikeName:()=>wt,getTableColumns:()=>Vt,getTableAsAliasSQL:()=>Gt,getOriginalColumnFromAlias:()=>ot,getOrderByOperators:()=>dt,getColumns:()=>qt,getColumnTable:()=>Ci,getColumnNameAndConfig:()=>kt,getChannelPath:()=>li,fillPlaceholders:()=>$r,fieldSelectionToSQL:()=>Lt,extractTablesFromSchema:()=>It,extractExtendedColumnType:()=>mt,exists:()=>Do,eq:()=>Z,entityKind:()=>Gi,effect:()=>He,desc:()=>Io,defineRelationsPart:()=>Qt,defineRelations:()=>Bt,createRelationsHelper:()=>vt,countDistinct:()=>bo,count:()=>fo,cosineDistance:()=>Et,close:()=>Se,buildRelationsParts:()=>Dt,buildRelations:()=>$t,bindIfParam:()=>Qr,between:()=>vo,avgDistinct:()=>nr,avg:()=>ho,assertUnreachable:()=>ct,asc:()=>Qo,arrayOverlaps:()=>Hr,arrayContains:()=>Sr,arrayContained:()=>Cr,applyMixins:()=>zt,and:()=>Kn,aliasedTableColumn:()=>nt,aliasedTable:()=>hi,aliasedRelation:()=>bi,aliasedColumn:()=>ai,WithSubquery:()=>ci,ViewSelectionAliasProxyHandler:()=>ji,ViewBaseConfig:()=>ki,View:()=>Dr,TransactionRollbackError:()=>ft,TableSchema:()=>Ui,TableColumns:()=>Wi,TableAliasProxyHandler:()=>Fi,Table:()=>Pi,Subquery:()=>zi,StringChunk:()=>ur,SQL:()=>yr,RelationsHelperStatic:()=>Ot,RelationsBuilderTable:()=>Tt,RelationsBuilderJunctionColumn:()=>At,RelationsBuilderColumn:()=>pt,RelationTableAliasProxyHandler:()=>wi,Relation:()=>Nt,QueryPromise:()=>tt,Placeholder:()=>Tr,Path:()=>Eo,Param:()=>pr,OriginalName:()=>Ei,One:()=>_t,NotFoundError:()=>Me,NoopLogger:()=>di,Name:()=>fr,Many:()=>st,IsAlias:()=>Ri,FakePrimitiveParam:()=>er,ExtraConfigColumns:()=>Ki,ExtraConfigBuilder:()=>xi,DrizzleQueryError:()=>yt,DrizzleError:()=>ut,DefaultLogger:()=>Li,Count:()=>lt,ConsoleLogWriter:()=>Ii,ColumnTableAliasProxyHandler:()=>Vi,ColumnBuilder:()=>et,ColumnAliasProxyHandler:()=>qi,Column:()=>Si,Client:()=>Mn,CONSTANTS:()=>Yt,BaseName:()=>Hi,AggregatedField:()=>gt});import Di from"crypto";import wo,{existsSync as vi,readdirSync as Bi}from"fs";import{join as Qi}from"path";function jo(n){if(wo.existsSync(`${n.migrationsFolder}/meta/_journal.json`))throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');let o=n.migrationsFolder,i=[],l=Bi(o).map((e)=>({path:Qi(o,e,"migration.sql"),name:e})).filter((e)=>vi(e.path));l.sort((e,A)=>e.name.localeCompare(A.name));for(let e of l){let A=e.path,_=e.name.slice(0,14),T=wo.readFileSync(A).toString(),M=T.split("--> statement-breakpoint").map((C)=>{return C}),x=Fo(_);i.push({sql:M,bps:!0,folderMillis:x,hash:Di.createHash("sha256").update(T).digest("hex"),name:e.name})}return i}function ao(n,o){if(Array.isArray(o)||"migrationsJournal"in o){let l=Array.isArray(o)?o:o.migrationsJournal,e=Array.isArray(o)?void 0:o.migrationsTable,A=l.map((_)=>({sql:_.sql.split("--> statement-breakpoint"),folderMillis:_.timestamp,hash:"",bps:!0,name:_.name}));return n.dialect.migrate(A,n.session,{migrationsTable:e})}let i=jo(o);return n.dialect.migrate(i,n.session,o)}function fo(n){return V`count(${n||V.raw("*")})`.mapWith(Number)}function bo(n){return V`count(distinct ${n})`.mapWith(Number)}function ho(n){return V`avg(${n})`.mapWith(String)}function nr(n){return V`avg(distinct ${n})`.mapWith(String)}function or(n){return V`sum(${n})`.mapWith(String)}function rr(n){return V`sum(distinct ${n})`.mapWith(String)}function ir(n){return V`max(${n})`.mapWith(uo(n,yo)?n:String)}function tr(n){return V`min(${n})`.mapWith(uo(n,yo)?n:String)}import oo from"path";var Un={};On(Un,{workspaceID:()=>De,useEffect:()=>Qe,use:()=>Be,make:()=>ve,invalidate:()=>Le,has:()=>Ie,get:()=>xo,directory:()=>no,context:()=>Ho,bind:()=>$e});import{EventEmitter as ie}from"events";var Rn=new ie;var Lo=new Set;function xr(n){return Lo.add(n),()=>{Lo.delete(n)}}async function Go(n){await Promise.allSettled([...Lo].map((o)=>o(n)))}function En(n){return n()}var jr={};On(jr,{setInitialized:()=>se,list:()=>ge,layer:()=>Fr,get:()=>le,fromRow:()=>_n,defaultLayer:()=>Co,UpdateInput:()=>fe,Service:()=>Gn,Info:()=>Vr,Event:()=>wr});import*as F from"fs/promises";import*as cr from"os";import*as Dn from"path";var te=N.String.pipe(N.brand("ProjectID")),w=te.pipe(Fn((n)=>({global:n.make("global"),zod:a.string().pipe(a.custom())})));import*as Qn from"fs/promises";import*as b from"path";import*as Er from"crypto";async function Jo(n){let o=b.resolve(n);while(!0){let i=b.join(o,".git"),l=await Qn.stat(i).catch(()=>null);if(l){if(l.isDirectory())return i;let _=(await Qn.readFile(i,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(!_)return null;let T=b.isAbsolute(_[1])?_[1]:b.resolve(o,_[1]);return b.resolve(T,"../..")}let e=b.dirname(o);if(e===o)return null;o=e}}async function Kr(n){let o=await Qn.readFile(n,"utf-8").catch(()=>null);if(o===null)return null;return o.trim()||null}async function Rr(n){let o=await Kr(n);if(o)return o;let i=Er.randomUUID();try{return await Qn.writeFile(n,i,{flag:"wx"}),i}catch(l){if(l.code!=="EEXIST")throw l;let e=await Kr(n);if(e)return e;throw Error(`Project ID file was concurrently created but is empty: ${n}`)}}async function Pr(n){let o=await Jo(n);if(o){let l=b.join(o,"qitqode-project-id");return w.make(await Rr(l))}let i=b.join(n,".qitqode-project-id");return w.make(await Rr(i))}async function me(n){let o=await Jo(n);if(!o)return;let i=Dn.join(n,".qitqode-project-id"),l=Dn.join(o,"qitqode-project-id"),e=(T)=>F.access(T).then(()=>!0).catch(()=>!1);if(await e(i)){if(!await e(l)){let T=await F.readFile(i,"utf-8");await F.writeFile(l,T)}await F.unlink(i).catch(()=>{})}let A=Dn.join(o,"info","exclude");if(await F.mkdir(Dn.dirname(A),{recursive:!0}),!(await F.readFile(A,"utf-8").catch(()=>"")).includes(".qitqode-project-id"))await F.appendFile(A,`
|
|
3
3
|
.qitqode-project-id
|
|
4
4
|
`)}var Wr=c.create({service:"project"}),ue=262144,So=N.Literal("git"),kr=N.Struct({url:N.optional(N.String),override:N.optional(N.String),color:N.optional(N.String)}),qr=N.Struct({start:N.optional(N.String.annotate({description:"Startup script to run when creating a new workspace (worktree)"}))}),ye=N.Struct({created:N.Number,updated:N.Number,initialized:N.optional(N.Number)}),Vr=N.Struct({id:w,worktree:N.String,vcs:N.optional(So),name:N.optional(N.String),icon:N.optional(kr),commands:N.optional(qr),time:ye,sandboxes:N.Array(N.String)}).annotate({identifier:"Project"}).pipe(Fn((n)=>({zod:jn(n)}))),wr={Updated:zr.define("project.updated",Vr.zod)};function _n(n){let o=n.icon_url||n.icon_color?{url:n.icon_url??void 0,color:n.icon_color??void 0}:void 0;return{id:n.id,worktree:n.worktree,vcs:n.vcs?N.decodeUnknownSync(So)(n.vcs):void 0,name:n.name??void 0,icon:o,time:{created:n.time_created,updated:n.time_updated,initialized:n.time_initialized??void 0},sandboxes:n.sandboxes,commands:n.commands??void 0}}var fe=a.object({projectID:w.zod,name:a.string().optional(),icon:jn(kr).optional(),commands:jn(qr).optional()});class Gn extends vn.Service()("@qitqode/Project"){}var Fr=h.effect(Gn,r.gen(function*(){let n=yield*k.Service,o=yield*Zr.Path,i=yield*an.ChildProcessSpawner,l=r.fnUntraced(function*(t,u){return yield*Yr(i,t,u)},r.catch(()=>r.succeed({code:1,text:"",stderr:""}))),e=(t)=>r.sync(()=>In.use(t)),A=(t)=>r.sync(()=>Rn.emit("event",{directory:"global",project:t.id,payload:{type:wr.Updated.type,properties:t}})),_=N.decodeUnknownSync(N.optional(So))(nn.QITQODE_FAKE_VCS),T=(t,u)=>{if(!u)return t;if(u=u.replace(/[\r\n]+$/,""),!u)return t;if(u=k.windowsPath(u),o.isAbsolute(u))return o.normalize(u);return o.resolve(t,u)},M=yield*Ur.Scope,x=r.fn("Project.fromDirectory")(function*(t){Wr.info("fromDirectory",{directory:t});let u=yield*r.gen(function*(){if(nn.QITQODE_DISABLE_GIT)return{id:w.global,worktree:t,sandbox:t,vcs:_};let Y=(yield*n.up({targets:[".git"],start:t}).pipe(r.orDie))[0];if(!Y)return{id:w.global,worktree:"/",sandbox:"/",vcs:_};let en=o.dirname(Y),sn=process.env.HOME??process.env.USERPROFILE??cr.homedir();if(en===sn||Dn.parse(en).root===en)return Wr.warn("ignoring .git at home or filesystem root, snapshots disabled",{dotgit:Y}),{id:w.global,worktree:t,sandbox:t,vcs:_};let R=en,kn=yield*r.sync(()=>Mo("git")),Tn;if(!kn)return{id:Tn??w.global,worktree:R,sandbox:R,vcs:_};let qn=yield*l(["rev-parse","--git-common-dir"],{cwd:R});if(qn.code!==0)return{id:Tn??w.global,worktree:R,sandbox:R,vcs:_};let Hn=(()=>{let dn=T(R,qn.text.trim());return dn===R?R:o.dirname(dn)})();if(Tn==null)yield*r.promise(()=>me(R)),Tn=yield*r.promise(()=>Pr(R));let Vn=yield*l(["rev-parse","--show-toplevel"],{cwd:R});if(Vn.code!==0)return{id:Tn,worktree:R,sandbox:R,vcs:_};return R=T(R,Vn.text.trim()),{id:Tn,sandbox:R,worktree:Hn,vcs:"git"}}),D=yield*e((P)=>P.select().from(J).where(Z(J.id,u.id)).get()),I=D?_n(D):{id:u.id,worktree:u.worktree,vcs:u.vcs,sandboxes:[],time:{created:Date.now(),updated:Date.now()}};if(nn.QITQODE_EXPERIMENTAL_ICON_DISCOVERY)yield*C(I).pipe(r.ignore,r.forkIn(M));let O={...I,worktree:u.worktree,vcs:u.vcs,time:{...I.time,updated:Date.now()}};if(u.sandbox!==O.worktree&&!O.sandboxes.includes(u.sandbox))O.sandboxes.push(u.sandbox);if(O.sandboxes=yield*r.forEach(O.sandboxes,(P)=>n.exists(P).pipe(r.orDie,r.map((Y)=>Y?P:void 0)),{concurrency:16}).pipe(r.map((P)=>P.filter((Y)=>Y!==void 0))),yield*e((P)=>P.insert(J).values({id:O.id,worktree:O.worktree,vcs:O.vcs??null,name:O.name,icon_url:O.icon?.url,icon_color:O.icon?.color,time_created:O.time.created,time_updated:O.time.updated,time_initialized:O.time.initialized,sandboxes:O.sandboxes,commands:O.commands}).onConflictDoUpdate({target:J.id,set:{worktree:O.worktree,vcs:O.vcs??null,name:O.name,icon_url:O.icon?.url,icon_color:O.icon?.color,time_updated:O.time.updated,time_initialized:O.time.initialized,sandboxes:O.sandboxes,commands:O.commands}}).run()),u.id!==w.global)yield*e((P)=>P.update(fn).set({project_id:u.id}).where(Kn(Z(fn.project_id,w.global),Z(fn.directory,u.worktree))).run());return yield*A(O),{project:O,sandbox:u.sandbox}}),C=r.fn("Project.discover")(function*(t){if(t.vcs!=="git")return;if(t.icon?.override)return;if(t.icon?.url)return;let D=(yield*n.glob("**/favicon.{ico,png,svg,jpg,jpeg,webp}",{cwd:t.worktree,absolute:!0,include:"file"}).pipe(r.orDie)).sort((sn,R)=>sn.length-R.length)[0];if(!D)return;let I=yield*n.stat(D).pipe(r.orDie);if(Number(I.size)>ue)return;let O=yield*n.readFile(D).pipe(r.orDie),P=Buffer.from(O).toString("base64"),en=`data:${k.mimeType(D)};base64,${P}`;yield*$({projectID:t.id,icon:{url:en}})}),H=r.fn("Project.list")(function*(){return yield*e((t)=>t.select().from(J).all().map(_n))}),K=r.fn("Project.get")(function*(t){let u=yield*e((D)=>D.select().from(J).where(Z(J.id,t)).get());return u?_n(u):void 0}),$=r.fn("Project.update")(function*(t){let u=yield*e((I)=>I.update(J).set({name:t.name,icon_url:t.icon?.url,icon_color:t.icon?.color,commands:t.commands,time_updated:Date.now()}).where(Z(J.id,t.projectID)).returning().get());if(!u)throw Error(`Project not found: ${t.projectID}`);let D=_n(u);return yield*A(D),D}),Q=r.fn("Project.initGit")(function*(t){if(t.project.vcs==="git")return t.project;if(!(yield*r.sync(()=>Mo("git"))))throw Error("Git is not installed");let u=yield*l(["init","--quiet"],{cwd:t.directory});if(u.code!==0)throw Error(u.stderr.trim()||u.text.trim()||"Failed to initialize git repository");let{project:D}=yield*x(t.directory);return D}),L=r.fn("Project.setInitialized")(function*(t){yield*e((u)=>u.update(J).set({time_initialized:Date.now()}).where(Z(J.id,t)).run())}),g=r.fn("Project.sandboxes")(function*(t){let u=yield*e((I)=>I.select().from(J).where(Z(J.id,t)).get());if(!u)return[];let D=_n(u);return yield*r.forEach(D.sandboxes,(I)=>n.isDir(I).pipe(r.orDie,r.map((O)=>O?I:void 0)),{concurrency:16}).pipe(r.map((I)=>I.filter((O)=>O!==void 0)))}),s=r.fnUntraced(function*(t,u){let D=yield*e((I)=>I.update(J).set({sandboxes:u,time_updated:Date.now()}).where(Z(J.id,t)).returning().get());if(!D)throw Error(`Project not found: ${t}`);yield*A(_n(D))}),m=r.fn("Project.addSandbox")(function*(t,u){let D=yield*e((O)=>O.select().from(J).where(Z(J.id,t)).get());if(!D)throw Error(`Project not found: ${t}`);let I=[...D.sandboxes];if(!I.includes(u))I.push(u);yield*s(t,I)}),y=r.fn("Project.removeSandbox")(function*(t,u){let D=yield*e((O)=>O.select().from(J).where(Z(J.id,t)).get());if(!D)throw Error(`Project not found: ${t}`);let I=D.sandboxes.filter((O)=>O!==u);yield*s(t,I)});return Gn.of({fromDirectory:x,discover:C,list:H,get:K,update:$,initGit:Q,setInitialized:L,sandboxes:g,addSandbox:m,removeSandbox:y})})),Co=Fr.pipe(h.provide(bn),h.provide(k.defaultLayer),h.provide(Xr.layer));function ge(){return In.use((n)=>n.select().from(J).all().map((o)=>_n(o)))}function le(n){let o=In.use((i)=>i.select().from(J).where(Z(J.id,n)).get());if(!o)return;return _n(o)}function se(n){In.use((o)=>o.update(J).set({time_initialized:Date.now()}).where(Z(J.id,n)).run())}import{parse as _e}from"path";var rn=gn.create("instance");hr(()=>rn.use());var tn=new Map,Ne=ni(Gn,Co),pe=new Set(["/etc","/proc","/sys","/dev","/boot","/root","/var","/private/etc","/private/var"]);function Ae(n){if(n===_e(n).root)return"filesystem root is not a valid project directory";for(let o of pe)if(n===o||k.contains(o,n))return"target is a protected system directory";return null}function Te(n){let o=Ae(n);if(o)throw Error("Access denied: "+o)}var Pn={all:void 0};function ar(n){return En(async()=>{let o=n.project&&n.worktree?{directory:n.directory,worktree:n.worktree,project:n.project}:await Ne.runPromise((i)=>i.fromDirectory(n.directory)).then(({project:i,sandbox:l})=>({directory:n.directory,worktree:l,project:i}));return await rn.provide(o,async()=>{await n.init?.()}),o})}function br(n,o){let i=o.catch((l)=>{if(tn.get(n)===i)tn.delete(n);throw l});return tn.set(n,i),i}var on={async provide(n){let o=k.resolve(n.directory);Te(o);let i=tn.get(o);if(!i)c.Default.info("creating instance",{directory:o}),i=br(o,ar({directory:o,init:n.init}));let l=await i;return rn.provide(l,async()=>{return n.fn()})},get current(){return rn.use()},get directory(){return rn.use().directory},get worktree(){return rn.use().worktree},get project(){return rn.use().project},containsPath(n,o){let i=o??on;if(k.contains(i.directory,n))return!0;if(i.worktree==="/")return!1;return k.contains(i.worktree,n)},bind(n){let o=rn.use();return(...i)=>rn.provide(o,()=>n(...i))},restore(n,o){return rn.provide(n,o)},async reload(n){let o=k.resolve(n.directory);c.Default.info("reloading instance",{directory:o}),await Go(o),tn.delete(o);let i=br(o,ar({...n,directory:o}));return Rn.emit("event",{directory:o,project:n.project?.id,workspace:Nn.workspaceID,payload:{type:"server.instance.disposed",properties:{directory:o}}}),await i},async dispose(){let{directory:n,project:o}=on;c.Default.info("disposing instance",{directory:n}),await Go(n),tn.delete(n),Rn.emit("event",{directory:n,project:o.id,workspace:Nn.workspaceID,payload:{type:"server.instance.disposed",properties:{directory:n}}})},async disposeAll(){if(Pn.all)return Pn.all;return Pn.all=En(async()=>{c.Default.info("disposing all instances");let n=[...tn.entries()];for(let[o,i]of n){if(tn.get(o)!==i)continue;let l=await i.catch((e)=>{c.Default.warn("instance dispose failed",{key:o,error:e});return});if(!l){if(tn.get(o)===i)tn.delete(o);continue}if(tn.get(o)!==i)continue;await rn.provide(l,async()=>{await on.dispose()})}}).finally(()=>{Pn.all=void 0}),Pn.all}};var oi="~qitqode/InstanceState",$e=(n)=>{try{return on.bind(n)}catch(l){if(!(l instanceof gn.NotFound))throw l}let o=Ln.getCurrent(),i=o?vn.getReferenceUnsafe(o.context,Wn):void 0;if(!i)return n;return(...l)=>on.restore(i,()=>n(...l))},Ho=r.gen(function*(){return(yield*Wn)??on.current}),De=r.gen(function*(){return(yield*hn)??Nn.workspaceID}),no=r.map(Ho,(n)=>n.directory),ve=(n)=>r.gen(function*(){let o=yield*Jn.make({capacity:Number.POSITIVE_INFINITY,lookup:()=>r.gen(function*(){return yield*n(yield*Ho)})}),i=xr((l)=>r.runPromise(Jn.invalidate(o,l).pipe(r.provide(ri))));return yield*r.addFinalizer(()=>r.sync(i)),{[oi]:oi,cache:o}}),xo=(n)=>r.gen(function*(){return yield*Jn.get(n.cache,yield*no)}),Be=(n,o)=>r.map(xo(n),o),Qe=(n,o)=>r.flatMap(xo(n),o),Ie=(n)=>r.gen(function*(){return yield*Jn.has(n.cache,yield*no)}),Le=(n)=>r.gen(function*(){return yield*Jn.invalidate(n.cache,yield*no)});var ei={};On(ei,{make:()=>de});function ii(n,o,i){if(n&&o!==void 0)return Nn.restore(o,()=>on.restore(n,i));if(n)return on.restore(n,i);if(o!==void 0)return Nn.restore(o,i);return i()}function de(){return r.gen(function*(){let n=yield*r.context(),i=(yield*Wn)??(()=>{try{return on.current}catch(_){if(!(_ instanceof gn.NotFound))throw _}})(),l=(yield*hn)??Nn.workspaceID,e=(_)=>ti(_,{instance:i,workspace:l}),A=(_)=>e(_).pipe(r.provide(n));return{promise:(_)=>ii(i,l,()=>r.runPromise(A(_))),fork:(_)=>ii(i,l,()=>r.runFork(A(_)))}})}var mi={};On(mi,{make:()=>Ge,Cancelled:()=>Zn});class Zn extends N.TaggedErrorClass()("RunnerCancelled",{}){}var Ge=(n,o)=>{let i=pn.makeUnsafe({_tag:"Idle"}),l=o?.onIdle??r.void,e=o?.onBusy??r.void,A=o?.onInterrupt,_=0,T=()=>pn.getUnsafe(i),M=()=>{return _+=1,_},x=(m,y)=>Xn.isFailure(y)&&Ko.hasInterruptsOnly(y.cause)?ln.fail(m,new Zn).pipe(r.asVoid):ln.done(m,y).pipe(r.asVoid),C=()=>pn.modify(i,(m)=>[m._tag==="Idle"?l:r.void,m]).pipe(r.flatten),H=(m,y,t)=>pn.modify(i,(u)=>[r.gen(function*(){if(u._tag==="Running"&&u.run.id===m)yield*l;yield*x(y,t)}),u._tag==="Running"&&u.run.id===m?{_tag:"Idle"}:u]).pipe(r.flatten),K=(m,y)=>r.gen(function*(){let t=M(),u=yield*m.pipe(r.onExit((D)=>H(t,y,D)),r.forkIn(n));return{id:t,done:y,fiber:u}}),$=(m)=>pn.modifyEffect(i,r.fnUntraced(function*(y){if(y._tag==="Shell"&&y.shell.id===m)return[l,{_tag:"Idle"}];if(y._tag==="ShellThenRun"&&y.shell.id===m){let t=yield*K(y.run.work,y.run.done);return[r.void,{_tag:"Running",run:t}]}return[r.void,y]})).pipe(r.flatten),Q=(m)=>Ln.interrupt(m.fiber),L=(m)=>pn.modifyEffect(i,r.fnUntraced(function*(y){switch(y._tag){case"Running":case"ShellThenRun":if(o?.onReentryWarn)yield*o.onReentryWarn({label:o.label??"(unlabeled)",existingRunId:y.run.id});return[ln.await(y.run.done),y];case"Shell":{let t={id:M(),done:yield*ln.make(),work:m};return[ln.await(t.done),{_tag:"ShellThenRun",shell:y.shell,run:t}]}case"Idle":{let t=yield*ln.make(),u=yield*K(m,t);return[ln.await(t),{_tag:"Running",run:u}]}}})).pipe(r.flatten,r.catch((y)=>y instanceof Zn?A??r.die(y):r.fail(y))),g=(m)=>pn.modifyEffect(i,r.fnUntraced(function*(y){if(y._tag!=="Idle")return[r.sync(()=>{if(o?.busy)o.busy();throw Error("Runner is busy")}),y];yield*e;let t=M(),u=yield*m.pipe(r.ensuring($(t)),r.forkChild),D={id:t,fiber:u};return[r.gen(function*(){let I=yield*Ln.await(u);if(Xn.isSuccess(I))return I.value;if(Ko.hasInterruptsOnly(I.cause)&&A)return yield*A;return yield*r.failCause(I.cause)}),{_tag:"Shell",shell:D}]})).pipe(r.flatten),s=pn.modify(i,(m)=>{switch(m._tag){case"Idle":return[r.void,m];case"Running":return[r.gen(function*(){yield*Ln.interrupt(m.run.fiber);let y=yield*Ln.await(m.run.fiber);yield*x(m.run.done,y),yield*ln.await(m.run.done).pipe(r.exit,r.asVoid),yield*C()}),{_tag:"Idle"}];case"Shell":return[r.gen(function*(){yield*Q(m.shell),yield*C()}),{_tag:"Idle"}];case"ShellThenRun":return[r.gen(function*(){yield*ln.fail(m.run.done,new Zn).pipe(r.asVoid),yield*Q(m.shell),yield*C()}),{_tag:"Idle"}]}}).pipe(r.flatten);return{get state(){return T()},get busy(){return T()._tag!=="Idle"},ensureRunning:L,startShell:g,cancel:s}};import{Database as Je}from"bun:sqlite";function yi(n){let o=new Je(n,{create:!0});return ui({client:o})}var Me=ro.create("NotFoundError",a.object({message:a.string()})),fi=c.create({service:"db"});function li(){if(["latest","beta","prod"].includes(Ro)||nn.QITQODE_DISABLE_CHANNEL_DB)return oo.join($n.Path.data,"qitqode.db");let n=Ro.replace(/[^a-zA-Z0-9._-]/g,"-");return oo.join($n.Path.data,`qitqode-${n}.db`)}var Eo=En(()=>{if(nn.QITQODE_DB){if(nn.QITQODE_DB===":memory:"||oo.isAbsolute(nn.QITQODE_DB))return nn.QITQODE_DB;return oo.join($n.Path.data,nn.QITQODE_DB)}return li()}),Mn=gi(()=>{fi.info("opening database",{path:Eo});let n=yi(Eo);n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = NORMAL"),n.run("PRAGMA busy_timeout = 5000"),n.run("PRAGMA cache_size = -64000"),n.run("PRAGMA foreign_keys = ON"),n.run("PRAGMA wal_checkpoint(PASSIVE)");let o=[{sql:"CREATE TABLE `project` (\n\t`id` text PRIMARY KEY,\n\t`worktree` text NOT NULL,\n\t`vcs` text,\n\t`name` text,\n\t`icon_url` text,\n\t`icon_color` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`time_initialized` integer,\n\t`sandboxes` text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `message` (\n\t`id` text PRIMARY KEY,\n\t`session_id` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_message_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `part` (\n\t`id` text PRIMARY KEY,\n\t`message_id` text NOT NULL,\n\t`session_id` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_part_message_id_message_id_fk` FOREIGN KEY (`message_id`) REFERENCES `message`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `permission` (\n\t`project_id` text PRIMARY KEY,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_permission_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `session` (\n\t`id` text PRIMARY KEY,\n\t`project_id` text NOT NULL,\n\t`parent_id` text,\n\t`slug` text NOT NULL,\n\t`directory` text NOT NULL,\n\t`title` text NOT NULL,\n\t`version` text NOT NULL,\n\t`share_url` text,\n\t`summary_additions` integer,\n\t`summary_deletions` integer,\n\t`summary_files` integer,\n\t`summary_diffs` text,\n\t`revert` text,\n\t`permission` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`time_compacting` integer,\n\t`time_archived` integer,\n\tCONSTRAINT `fk_session_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `todo` (\n\t`session_id` text NOT NULL,\n\t`content` text NOT NULL,\n\t`status` text NOT NULL,\n\t`priority` text NOT NULL,\n\t`position` integer NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `todo_pk` PRIMARY KEY(`session_id`, `position`),\n\tCONSTRAINT `fk_todo_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `session_share` (\n\t`session_id` text PRIMARY KEY,\n\t`id` text NOT NULL,\n\t`secret` text NOT NULL,\n\t`url` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `fk_session_share_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE INDEX `message_session_idx` ON `message` (`session_id`);--> statement-breakpoint\nCREATE INDEX `part_message_idx` ON `part` (`message_id`);--> statement-breakpoint\nCREATE INDEX `part_session_idx` ON `part` (`session_id`);--> statement-breakpoint\nCREATE INDEX `session_project_idx` ON `session` (`project_id`);--> statement-breakpoint\nCREATE INDEX `session_parent_idx` ON `session` (`parent_id`);--> statement-breakpoint\nCREATE INDEX `todo_session_idx` ON `todo` (`session_id`);",timestamp:1769552633000,name:"20260127222353_familiar_lady_ursula"},{sql:"ALTER TABLE `project` ADD `commands` text;",timestamp:1770830228000,name:"20260211171708_add_project_commands"},{sql:"CREATE TABLE `control_account` (\n\t`email` text NOT NULL,\n\t`url` text NOT NULL,\n\t`access_token` text NOT NULL,\n\t`refresh_token` text NOT NULL,\n\t`token_expiry` integer,\n\t`active` integer NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `control_account_pk` PRIMARY KEY(`email`, `url`)\n);\n",timestamp:1770993676000,name:"20260213144116_wakeful_the_professor"},{sql:"CREATE TABLE `workspace` (\n\t`id` text PRIMARY KEY,\n\t`branch` text,\n\t`project_id` text NOT NULL,\n\t`config` text NOT NULL,\n\tCONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n",timestamp:1772056728000,name:"20260225215848_workspace"},{sql:"ALTER TABLE `session` ADD `workspace_id` text;--> statement-breakpoint\nCREATE INDEX `session_workspace_idx` ON `session` (`workspace_id`);",timestamp:1772228279000,name:"20260227213759_add_session_workspace_id"},{sql:"CREATE TABLE `account` (\n\t`id` text PRIMARY KEY,\n\t`email` text NOT NULL,\n\t`url` text NOT NULL,\n\t`access_token` text NOT NULL,\n\t`refresh_token` text NOT NULL,\n\t`token_expiry` integer,\n\t`selected_org_id` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `account_state` (\n\t`id` integer PRIMARY KEY NOT NULL,\n\t`active_account_id` text,\n\tFOREIGN KEY (`active_account_id`) REFERENCES `account`(`id`) ON UPDATE no action ON DELETE set null\n);\n",timestamp:1772310750000,name:"20260228203230_blue_harpoon"},{sql:"ALTER TABLE `workspace` ADD `type` text NOT NULL;--> statement-breakpoint\nALTER TABLE `workspace` ADD `name` text;--> statement-breakpoint\nALTER TABLE `workspace` ADD `directory` text;--> statement-breakpoint\nALTER TABLE `workspace` ADD `extra` text;--> statement-breakpoint\nALTER TABLE `workspace` DROP COLUMN `config`;",timestamp:1772579546000,name:"20260303231226_add_workspace_fields"},{sql:"ALTER TABLE `account_state` ADD `active_org_id` text;--> statement-breakpoint\nUPDATE `account_state` SET `active_org_id` = (SELECT `selected_org_id` FROM `account` WHERE `account`.`id` = `account_state`.`active_account_id`);--> statement-breakpoint\nALTER TABLE `account` DROP COLUMN `selected_org_id`;\n",timestamp:1773097200000,name:"20260309230000_move_org_to_state"},{sql:"DROP INDEX IF EXISTS `message_session_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `part_message_idx`;--> statement-breakpoint\nCREATE INDEX `message_session_time_created_id_idx` ON `message` (`session_id`,`time_created`,`id`);--> statement-breakpoint\nCREATE INDEX `part_message_id_id_idx` ON `part` (`message_id`,`id`);",timestamp:1773290071000,name:"20260312043431_session_message_cursor"},{sql:"CREATE TABLE `event_sequence` (\n\t`aggregate_id` text PRIMARY KEY,\n\t`seq` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `event` (\n\t`id` text PRIMARY KEY,\n\t`aggregate_id` text NOT NULL,\n\t`seq` integer NOT NULL,\n\t`type` text NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_event_aggregate_id_event_sequence_aggregate_id_fk` FOREIGN KEY (`aggregate_id`) REFERENCES `event_sequence`(`aggregate_id`) ON DELETE CASCADE\n);\n",timestamp:1774309702000,name:"20260323234822_events"},{sql:"PRAGMA foreign_keys=OFF;--> statement-breakpoint\nCREATE TABLE `__new_workspace` (\n\t`id` text PRIMARY KEY,\n\t`type` text NOT NULL,\n\t`name` text DEFAULT '' NOT NULL,\n\t`branch` text,\n\t`directory` text,\n\t`extra` text,\n\t`project_id` text NOT NULL,\n\tCONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nINSERT INTO `__new_workspace`(`id`, `type`, `branch`, `name`, `directory`, `extra`, `project_id`) SELECT `id`, `type`, `branch`, `name`, `directory`, `extra`, `project_id` FROM `workspace`;--> statement-breakpoint\nDROP TABLE `workspace`;--> statement-breakpoint\nALTER TABLE `__new_workspace` RENAME TO `workspace`;--> statement-breakpoint\nPRAGMA foreign_keys=ON;",timestamp:1775843113000,name:"20260410174513_workspace-name"},{sql:"CREATE TABLE `session_entry` (\n\t`id` text PRIMARY KEY,\n\t`session_id` text NOT NULL,\n\t`type` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_session_entry_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE INDEX `session_entry_session_idx` ON `session_entry` (`session_id`);--> statement-breakpoint\nCREATE INDEX `session_entry_session_type_idx` ON `session_entry` (`session_id`,`type`);--> statement-breakpoint\nCREATE INDEX `session_entry_time_created_idx` ON `session_entry` (`time_created`);",timestamp:1776103196000,name:"20260413175956_chief_energizer"},{sql:"ALTER TABLE `session` ADD `context_from` text;--> statement-breakpoint\nALTER TABLE `session` ADD `context_watermark` text;--> statement-breakpoint\nCREATE INDEX `session_context_from_idx` ON `session` (`context_from`);\n",timestamp:1776873600000,name:"20260422160000_context_inheritance"},{sql:"CREATE TABLE `task_registry` (\n `id` text PRIMARY KEY,\n `parent_session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `status` text NOT NULL,\n `agent` text NOT NULL,\n `description` text NOT NULL,\n `context_mode` text NOT NULL,\n `background` integer NOT NULL,\n `last_turn_time` integer NOT NULL,\n `turn_count` integer NOT NULL DEFAULT 0,\n `error` text,\n `time_completed` integer,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `task_registry_parent_idx` ON `task_registry` (`parent_session_id`);--> statement-breakpoint\nCREATE INDEX `task_registry_status_idx` ON `task_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `task_registry_status_last_turn_idx` ON `task_registry` (`status`, `last_turn_time`);\n",timestamp:1776877200000,name:"20260422170000_task_registry"},{sql:"DROP INDEX IF EXISTS `session_entry_session_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `session_entry_session_type_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `session_entry_time_created_idx`;--> statement-breakpoint\nDROP TABLE IF EXISTS `session_entry`;\n",timestamp:1776956061000,name:"20260423145421_remove_session_entry"},{sql:"DROP INDEX IF EXISTS `task_registry_parent_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `task_registry_status_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `task_registry_status_last_turn_idx`;--> statement-breakpoint\nALTER TABLE `task_registry` RENAME TO `actor_registry`;--> statement-breakpoint\nCREATE INDEX `actor_registry_parent_idx` ON `actor_registry` (`parent_session_id`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_idx` ON `actor_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_last_turn_idx` ON `actor_registry` (`status`, `last_turn_time`);\n",timestamp:1778803200000,name:"20260515000000_actor_rename"},{sql:"CREATE TABLE `memory_fts` (\n `path` text PRIMARY KEY NOT NULL,\n `scope` text NOT NULL,\n `scope_id` text DEFAULT '' NOT NULL,\n `type` text NOT NULL,\n `body` text NOT NULL,\n `fingerprint` text NOT NULL,\n `last_indexed_at` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE INDEX `memory_fts_scope_idx` ON `memory_fts` (`scope`, `scope_id`);\n--> statement-breakpoint\nCREATE INDEX `memory_fts_type_idx` ON `memory_fts` (`type`);\n--> statement-breakpoint\nCREATE VIRTUAL TABLE `memory_fts_idx` USING fts5(\n body,\n content='memory_fts',\n content_rowid='rowid',\n tokenize='unicode61 remove_diacritics 1'\n);\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.rowid;\nEND;\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.rowid;\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n",timestamp:1778806800000,name:"20260515010000_memory_fts"},{sql:"CREATE TABLE `task` (\n `id` text NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `parent_task_id` text,\n `kind` text NOT NULL DEFAULT 'user',\n `status` text NOT NULL,\n `focus` integer NOT NULL DEFAULT 0,\n `summary` text NOT NULL,\n `created_at` integer NOT NULL,\n `last_event_at` integer NOT NULL,\n `ended_at` integer,\n `cleanup_after` integer,\n PRIMARY KEY (`session_id`, `id`)\n);--> statement-breakpoint\nCREATE INDEX `task_session_idx` ON `task` (`session_id`);--> statement-breakpoint\nCREATE INDEX `task_parent_idx` ON `task` (`session_id`, `parent_task_id`);--> statement-breakpoint\nCREATE INDEX `task_status_idx` ON `task` (`status`);--> statement-breakpoint\nCREATE INDEX `task_kind_idx` ON `task` (`kind`);--> statement-breakpoint\nCREATE UNIQUE INDEX `task_focus_per_session_idx` ON `task` (`session_id`) WHERE focus = 1;--> statement-breakpoint\nCREATE TABLE `task_event` (\n `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `task_id` text NOT NULL,\n `at` integer NOT NULL,\n `kind` text NOT NULL,\n `summary` text,\n FOREIGN KEY (`session_id`, `task_id`) REFERENCES `task`(`session_id`, `id`) ON DELETE CASCADE\n);--> statement-breakpoint\nCREATE INDEX `task_event_task_idx` ON `task_event` (`session_id`, `task_id`, `at`);\n",timestamp:1778810400000,name:"20260515020000_user_task"},{sql:"ALTER TABLE `session` ADD `last_checkpoint_message_id` text;\n",timestamp:1779148800000,name:"20260519000000_last_checkpoint_message_id"},{sql:"ALTER TABLE `message` ADD `agent_id` text;--> statement-breakpoint\nCREATE INDEX `message_session_agent_idx` ON `message` (`session_id`,`agent_id`,`id`);\n",timestamp:1779321600000,name:"20260521000000_message_agent_id"},{sql:"DROP TABLE `actor_registry`;--> statement-breakpoint\nCREATE TABLE `actor_registry` (\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `actor_id` text NOT NULL,\n `mode` text NOT NULL,\n `parent_actor_id` text,\n `status` text NOT NULL,\n `agent` text NOT NULL,\n `description` text NOT NULL,\n `context_mode` text NOT NULL,\n `context_watermark` text,\n `background` integer NOT NULL,\n `tools` text,\n `last_turn_time` integer NOT NULL,\n `turn_count` integer NOT NULL DEFAULT 0,\n `error` text,\n `time_completed` integer,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL,\n PRIMARY KEY (`session_id`, `actor_id`)\n);--> statement-breakpoint\nCREATE INDEX `actor_registry_session_agent_idx` ON `actor_registry` (`session_id`, `agent`);--> statement-breakpoint\nCREATE INDEX `actor_registry_session_parent_idx` ON `actor_registry` (`session_id`, `parent_actor_id`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_idx` ON `actor_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_last_turn_idx` ON `actor_registry` (`status`, `last_turn_time`);\n",timestamp:1779321660000,name:"20260521000100_actor_registry_v6"},{sql:"DROP TRIGGER IF EXISTS `memory_fts_ai`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_ad`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_au`;--> statement-breakpoint\nDROP TABLE IF EXISTS `memory_fts_idx`;--> statement-breakpoint\nDROP TABLE IF EXISTS `memory_fts`;--> statement-breakpoint\nCREATE TABLE `memory_fts` (\n `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,\n `path` text NOT NULL UNIQUE,\n `scope` text NOT NULL,\n `scope_id` text DEFAULT '' NOT NULL,\n `type` text NOT NULL,\n `body` text NOT NULL,\n `fingerprint` text NOT NULL,\n `last_indexed_at` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `memory_fts_scope_idx` ON `memory_fts` (`scope`, `scope_id`);--> statement-breakpoint\nCREATE INDEX `memory_fts_type_idx` ON `memory_fts` (`type`);--> statement-breakpoint\nCREATE VIRTUAL TABLE `memory_fts_idx` USING fts5(\n body,\n content='memory_fts',\n content_rowid='id',\n tokenize='unicode61 remove_diacritics 1'\n);--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.id;\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.id;\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;\n",timestamp:1779325200000,name:"20260521010000_memory_fts_v6"},{sql:"-- Fix v6.1 trigger pattern: external content FTS5 vtab requires the 'delete'\n-- magic command to remove OLD body's tokens, NOT a plain DELETE FROM the vtab.\n-- The previous DELETE FROM pattern was contentless-mode syntax misapplied to\n-- external-content mode, leaving stale tokens accumulating until vtab corrupts.\nDROP TRIGGER IF EXISTS `memory_fts_ai`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_ad`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_au`;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(`memory_fts_idx`, rowid, body) VALUES('delete', OLD.id, OLD.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(`memory_fts_idx`, rowid, body) VALUES('delete', OLD.id, OLD.body);\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;\n",timestamp:1779328800000,name:"20260521020000_memory_fts_triggers"},{sql:"UPDATE `message` SET `agent_id` = 'main' WHERE `agent_id` IS NULL;--> statement-breakpoint\nCREATE TABLE `message_new` (\n `id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `agent_id` text NOT NULL DEFAULT 'main',\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL,\n `data` text NOT NULL\n);--> statement-breakpoint\nINSERT INTO `message_new` SELECT `id`, `session_id`, COALESCE(`agent_id`, 'main'), `time_created`, `time_updated`, `data` FROM `message`;--> statement-breakpoint\nDROP TABLE `message`;--> statement-breakpoint\nALTER TABLE `message_new` RENAME TO `message`;--> statement-breakpoint\nCREATE INDEX `message_session_time_created_id_idx` ON `message` (`session_id`,`time_created`,`id`);--> statement-breakpoint\nCREATE INDEX `message_session_agent_idx` ON `message` (`session_id`,`agent_id`,`id`);\n",timestamp:1779753600000,name:"20260526000000_agent_id_main"},{sql:"ALTER TABLE `actor_registry` ADD COLUMN `last_outcome` text;--> statement-breakpoint\nALTER TABLE `actor_registry` ADD COLUMN `lifecycle` text NOT NULL DEFAULT 'ephemeral';--> statement-breakpoint\nALTER TABLE `actor_registry` RENAME COLUMN `error` TO `last_error`;--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'success' WHERE `status` = 'completed';--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'failure' WHERE `status` = 'failed';--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'cancelled' WHERE `status` = 'cancelled';--> statement-breakpoint\nUPDATE `actor_registry` SET `status` = 'idle' WHERE `status` IN ('completed','failed','cancelled');--> statement-breakpoint\nUPDATE `actor_registry` SET `lifecycle` = CASE `mode` WHEN 'peer' THEN 'persistent' WHEN 'main' THEN 'persistent' ELSE 'ephemeral' END;\n",timestamp:1779840000000,name:"20260527000000_actor_lifecycle"},{sql:"CREATE TABLE `inbox` (\n `id` text PRIMARY KEY NOT NULL,\n `receiver_session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `receiver_actor_id` text NOT NULL,\n `sender_session_id` text,\n `sender_actor_id` text,\n `type` text NOT NULL DEFAULT 'text',\n `content` text NOT NULL,\n `created_at` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `inbox_receiver_idx` ON `inbox` (`receiver_session_id`,`receiver_actor_id`,`id`);--> statement-breakpoint\nCREATE INDEX `inbox_created_idx` ON `inbox` (`created_at`);\n",timestamp:1779840060000,name:"20260527000100_inbox"},{sql:"-- todo: drop priority column\nALTER TABLE `todo` DROP COLUMN `priority`;\n--> statement-breakpoint\n\n-- task: drop focus-dependent index before dropping its column\nDROP INDEX `task_focus_per_session_idx`;\n--> statement-breakpoint\nDROP INDEX `task_kind_idx`;\n--> statement-breakpoint\nALTER TABLE `task` DROP COLUMN `focus`;\n--> statement-breakpoint\nALTER TABLE `task` DROP COLUMN `kind`;\n--> statement-breakpoint\n\n-- migrate status values: proposed/active -> open\nUPDATE `task` SET `status` = 'open' WHERE `status` IN ('proposed', 'active');\n",timestamp:1780012800000,name:"20260529000000_task_todo_redesign"},{sql:"ALTER TABLE `task` ADD COLUMN `owner` text;\n",timestamp:1780444800000,name:"20260603000000_task_in_progress_owner"},{sql:"CREATE TABLE `workflow_run` (\n `id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `name` text NOT NULL,\n `status` text NOT NULL,\n `running` integer NOT NULL DEFAULT 0,\n `succeeded` integer NOT NULL DEFAULT 0,\n `failed` integer NOT NULL DEFAULT 0,\n `current_phase` text,\n `parent_actor_id` text,\n `args` text,\n `error` text,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `workflow_run_session_idx` ON `workflow_run` (`session_id`);--> statement-breakpoint\nCREATE INDEX `workflow_run_status_idx` ON `workflow_run` (`status`);\n",timestamp:1780444800000,name:"20260603000000_workflow_run"},{sql:"ALTER TABLE `workflow_run` ADD COLUMN `script_sha` text;\n",timestamp:1780531200000,name:"20260604000000_workflow_script_sha"},{sql:"CREATE TABLE `claude_import` (\n `source_uuid` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL,\n `source_path` text NOT NULL,\n `source_mtime` integer NOT NULL,\n `time_imported` integer NOT NULL\n);\n",timestamp:1780876800000,name:"20260608000000_claude_import"},{sql:"ALTER TABLE `claude_import` ADD `message_ids` text;\n",timestamp:1780880400000,name:"20260608010000_claude_import_message_ids"},{sql:"CREATE TABLE `history_fts` (\n `part_id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL,\n `message_id` text NOT NULL,\n `project_id` text NOT NULL,\n `kind` text NOT NULL,\n `tool_name` text,\n `body` text NOT NULL,\n `time_created` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `history_fts_session_idx` ON `history_fts` (`session_id`, `time_created`);--> statement-breakpoint\nCREATE INDEX `history_fts_project_idx` ON `history_fts` (`project_id`, `time_created`);--> statement-breakpoint\nCREATE INDEX `history_fts_message_idx` ON `history_fts` (`message_id`);--> statement-breakpoint\nCREATE VIRTUAL TABLE `history_fts_idx` USING fts5(\n body,\n content='history_fts',\n content_rowid='rowid',\n tokenize='unicode61 remove_diacritics 1'\n);--> statement-breakpoint\nCREATE TRIGGER `history_fts_ai` AFTER INSERT ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `history_fts_ad` AFTER DELETE ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(`history_fts_idx`, rowid, body) VALUES('delete', OLD.rowid, OLD.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `history_fts_au` AFTER UPDATE ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(`history_fts_idx`, rowid, body) VALUES('delete', OLD.rowid, OLD.body);\n INSERT INTO `history_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n",timestamp:1780963200000,name:"20260609000000_history_fts"},{sql:"ALTER TABLE `workflow_run` ADD COLUMN `agent_timeout_ms` integer;\n",timestamp:1781046000000,name:"20260609230000_workflow_agent_timeout"},{sql:"CREATE TABLE `external_import` (\n `source` text NOT NULL,\n `source_key` text NOT NULL,\n `session_id` text NOT NULL,\n `source_path` text NOT NULL,\n `source_mtime` integer NOT NULL,\n `time_imported` integer NOT NULL,\n `message_ids` text,\n PRIMARY KEY (`source`, `source_key`)\n);\n\nINSERT INTO `external_import` (`source`, `source_key`, `session_id`, `source_path`, `source_mtime`, `time_imported`, `message_ids`)\nSELECT 'cc', `source_uuid`, `session_id`, `source_path`, `source_mtime`, `time_imported`, `message_ids`\nFROM `claude_import`;\n\nDROP TABLE `claude_import`;\n",timestamp:1781222400000,name:"20260612000000_external_import"}];if(o.length>0){if(fi.info("applying migrations",{count:o.length,mode:"bundled"}),nn.QITQODE_SKIP_MIGRATIONS)for(let i of o)i.sql="select 1;";ao(n,o)}return n});function Se(){Mn().$client.close(),Mn.reset()}var Yn=gn.create("database");function Ce(n){try{return n(Yn.use().tx)}catch(o){if(o instanceof gn.NotFound){let i=[],l=Yn.provide({effects:i,tx:Mn()},()=>n(Mn()));for(let e of i)e();return l}throw o}}function He(n){let o=Un.bind(n);try{Yn.use().effects.push(o)}catch{o()}}function xe(n,o){try{return n(Yn.use().tx)}catch(i){if(i instanceof gn.NotFound){let l=[],e=Un.bind((_)=>Yn.provide({tx:_,effects:l},()=>n(_))),A=Mn().transaction(e,{behavior:o?.behavior});for(let _ of l)_();return A}throw i}}var Oi={};On(Oi,{layer:()=>Ti,defaultLayer:()=>we,Service:()=>to,NotFoundError:()=>Zo});import X from"path";var Sn={};On(Sn,{layer:()=>pi,defaultLayer:()=>Ee,Service:()=>io,Git:()=>Sn});var Ke=["--no-optional-locks","-c","core.autocrlf=false","-c","core.fsmonitor=false","-c","core.longpaths=true","-c","core.symlinks=true","-c","core.quotepath=false"],zn=(n)=>n.text().trim(),Po=(n)=>n.split("\x00").filter(Boolean),Re=(n)=>({exitCode:1,text:()=>"",stdout:Buffer.alloc(0),stderr:Buffer.from(n instanceof Error?n.message:String(n))}),si=(n)=>{if(n==="??")return"added";if(n.includes("U"))return"modified";if(n.includes("A")&&!n.includes("D"))return"added";if(n.includes("D")&&!n.includes("A"))return"deleted";return"modified"};class io extends vn.Service()("@qitqode/Git"){}var pi=h.effect(io,r.gen(function*(){let n=yield*an.ChildProcessSpawner,o=r.fn("Git.run")(function*(g,s){let m=_i.make("git",[...Ke,...g],{cwd:s.cwd,env:s.env,extendEnv:!0,stdin:"ignore",stdout:"pipe",stderr:"pipe"}),y=yield*Ni(n,m);return{exitCode:y.code,text:()=>y.text,stdout:Buffer.from(y.text),stderr:Buffer.from(y.stderr)}},r.scoped,r.catch((g)=>r.succeed(Re(g)))),i=r.fn("Git.text")(function*(g,s){return(yield*o(g,s)).text()}),l=r.fn("Git.lines")(function*(g,s){return(yield*i(g,s)).split(/\r?\n/).map((m)=>m.trim()).filter(Boolean)}),e=r.fnUntraced(function*(g){return yield*l(["for-each-ref","--format=%(refname:short)","refs/heads"],{cwd:g})}),A=r.fnUntraced(function*(g,s){let m=yield*o(["config","init.defaultBranch"],{cwd:g}),y=zn(m);if(!y||!s.includes(y))return;return{name:y,ref:y}}),_=r.fnUntraced(function*(g){let s=yield*l(["remote"],{cwd:g});if(s.includes("origin"))return"origin";if(s.length===1)return s[0];if(s.includes("upstream"))return"upstream";return s[0]}),T=r.fn("Git.branch")(function*(g){let s=yield*o(["symbolic-ref","--quiet","--short","HEAD"],{cwd:g});if(s.exitCode!==0)return;return zn(s)||void 0}),M=r.fn("Git.prefix")(function*(g){let s=yield*o(["rev-parse","--show-prefix"],{cwd:g});if(s.exitCode!==0)return"";return zn(s)}),x=r.fn("Git.defaultBranch")(function*(g){let s=yield*_(g);if(s){let t=yield*o(["symbolic-ref",`refs/remotes/${s}/HEAD`],{cwd:g});if(t.exitCode===0){let u=zn(t).replace(/^refs\/remotes\//,""),D=u.startsWith(`${s}/`)?u.slice(`${s}/`.length):"";if(D)return{name:D,ref:u}}}let m=yield*e(g),y=yield*A(g,m);if(y)return y;if(m.includes("main"))return{name:"main",ref:"main"};if(m.includes("master"))return{name:"master",ref:"master"}}),C=r.fn("Git.hasHead")(function*(g){return(yield*o(["rev-parse","--verify","HEAD"],{cwd:g})).exitCode===0}),H=r.fn("Git.mergeBase")(function*(g,s,m="HEAD"){let y=yield*o(["merge-base",s,m],{cwd:g});if(y.exitCode!==0)return;return zn(y)||void 0}),K=r.fn("Git.show")(function*(g,s,m,y=""){let t=y?`${y}${m}`:m,u=yield*o(["show",`${s}:${t}`],{cwd:g});if(u.exitCode!==0)return"";if(u.stdout.includes(0))return"";return u.text()}),$=r.fn("Git.status")(function*(g){return Po(yield*i(["status","--porcelain=v1","--untracked-files=all","--no-renames","-z","--","."],{cwd:g})).flatMap((s)=>{let m=s.slice(3);if(!m)return[];let y=s.slice(0,2);return[{file:m,code:y,status:si(y)}]})}),Q=r.fn("Git.diff")(function*(g,s){let m=Po(yield*i(["diff","--no-ext-diff","--no-renames","--name-status","-z",s,"--","."],{cwd:g}));return m.flatMap((y,t)=>{if(t%2!==0)return[];let u=m[t+1];if(!y||!u)return[];return[{file:u,code:y,status:si(y)}]})}),L=r.fn("Git.stats")(function*(g,s){return Po(yield*i(["diff","--no-ext-diff","--no-renames","--numstat","-z",s,"--","."],{cwd:g})).flatMap((m)=>{let y=m.indexOf("\t"),t=m.indexOf("\t",y+1);if(y===-1||t===-1)return[];let u=m.slice(t+1);if(!u)return[];let D=m.slice(0,y),I=m.slice(y+1,t),O=D==="-"?0:Number.parseInt(D||"0",10),P=I==="-"?0:Number.parseInt(I||"0",10);return[{file:u,additions:Number.isFinite(O)?O:0,deletions:Number.isFinite(P)?P:0}]})});return io.of({run:o,branch:T,prefix:M,defaultBranch:x,hasHead:C,mergeBase:H,show:K,status:$,diff:Q,stats:L})})),Ee=pi.pipe(h.provide(bn));var An=c.create({service:"storage"}),Zo=ro.create("NotFoundError",a.object({message:a.string()})),Pe=N.Struct({path:N.optional(N.Struct({root:N.optional(N.String)}))}),We=N.Struct({id:N.String}),Ue=N.Struct({id:N.String}),Ze=N.Struct({additions:N.Number,deletions:N.Number}),Xe=N.Struct({id:N.String,projectID:N.String,summary:N.Struct({diffs:N.Array(Ze)})}),Ye=N.decodeUnknownOption(Pe),ze=N.decodeUnknownOption(We),ce=N.decodeUnknownOption(Ue),ke=N.decodeUnknownOption(Xe);class to extends vn.Service()("@qitqode/Storage"){}function qe(n,o){return X.join(n,...o)+".json"}function Wo(n){if(!n||typeof n!=="object")return!1;if("code"in n&&n.code==="ENOENT")return!0;if("reason"in n&&n.reason&&typeof n.reason==="object"&&"_tag"in n.reason)return n.reason._tag==="NotFound";return!1}function Ve(n){let o=Number.parseInt(n,10);return Number.isNaN(o)?0:o}var Ai=[r.fn("Storage.migration.1")(function*(n,o,i){let l=X.resolve(n,"../project");if(!(yield*o.isDir(l)))return;let e=yield*o.glob("*",{cwd:l,include:"all"});for(let A of e){let _=X.join(l,A);if(!(yield*o.isDir(_)))continue;An.info(`migrating project ${A}`);let T=A,M="/";if(T!=="global"){for(let H of yield*o.glob("storage/session/message/*/*.json",{cwd:_,absolute:!0})){let K=Ye(yield*o.readJson(H),{onExcessProperty:"preserve"}),$=cn.isSome(K)?K.value.path?.root:void 0;if(!$)continue;M=$;break}if(!M)continue;if(!(yield*o.isDir(M)))continue;let x=yield*i.run(["rev-list","--max-parents=0","--all"],{cwd:M}),[C]=x.text().split(`
|
|
5
|
-
`).filter(Boolean).map((H)=>H.trim()).toSorted();if(!C)continue;T=C,yield*o.writeWithDirs(X.join(n,"project",T+".json"),JSON.stringify({id:C,vcs:"git",worktree:M,time:{created:Date.now(),initialized:Date.now()}},null,2)),An.info(`migrating sessions for project ${T}`);for(let H of yield*o.glob("storage/session/info/*.json",{cwd:_,absolute:!0})){let K=X.join(n,"session",T,X.basename(H));An.info("copying",{sessionFile:H,dest:K});let $=yield*o.readJson(H),Q=ze($,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(K,JSON.stringify($,null,2)),cn.isNone(Q))continue;An.info(`migrating messages for session ${Q.value.id}`);for(let L of yield*o.glob(`storage/session/message/${Q.value.id}/*.json`,{cwd:_,absolute:!0})){let g=X.join(n,"message",Q.value.id,X.basename(L));An.info("copying",{msgFile:L,dest:g});let s=yield*o.readJson(L),m=ce(s,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(g,JSON.stringify(s,null,2)),cn.isNone(m))continue;An.info(`migrating parts for message ${m.value.id}`);for(let y of yield*o.glob(`storage/session/part/${Q.value.id}/${m.value.id}/*.json`,{cwd:_,absolute:!0})){let t=X.join(n,"part",m.value.id,X.basename(y)),u=yield*o.readJson(y);An.info("copying",{partFile:y,dest:t}),yield*o.writeWithDirs(t,JSON.stringify(u,null,2))}}}}}}),r.fn("Storage.migration.2")(function*(n,o){for(let i of yield*o.glob("session/*/*.json",{cwd:n,absolute:!0})){let l=yield*o.readJson(i),e=ke(l,{onExcessProperty:"preserve"});if(cn.isNone(e))continue;let A=e.value.summary.diffs;yield*o.writeWithDirs(X.join(n,"session_diff",e.value.id+".json"),JSON.stringify(A,null,2)),yield*o.writeWithDirs(X.join(n,"session",e.value.projectID,e.value.id+".json"),JSON.stringify({...l,summary:{additions:A.reduce((_,T)=>_+T.additions,0),deletions:A.reduce((_,T)=>_+T.deletions,0)}},null,2))}})],Ti=h.effect(to,r.gen(function*(){let n=yield*k.Service,o=yield*Sn.Service,i=yield*Uo.make({lookup:()=>Cn.make(),idleTimeToLive:0}),l=yield*r.cached(r.gen(function*(){let $=X.join($n.Path.data,"storage"),Q=X.join($,"migration"),L=yield*n.readFileString(Q).pipe(r.map(Ve),r.catchIf(Wo,()=>r.succeed(0)),r.orElseSucceed(()=>0));for(let g=L;g<Ai.length;g++){An.info("running migration",{index:g});let s=Ai[g],m=yield*r.exit(s($,n,o));if(Xn.isFailure(m)){An.error("failed to run migration",{index:g,cause:m.cause});break}yield*n.writeWithDirs(Q,String(g+1))}return{dir:$}})),e=($)=>r.fail(new Zo({message:`Resource not found: ${$}`})),A=($,Q)=>Q.pipe(r.catchIf(Wo,()=>e($))),_=r.fnUntraced(function*($,Q){yield*n.writeWithDirs($,JSON.stringify(Q,null,2))}),T=($,Q)=>r.scoped(r.gen(function*(){let L=qe((yield*l).dir,$);return yield*Q(L,yield*Uo.get(i,L))})),M=r.fn("Storage.remove")(function*($){yield*T($,(Q,L)=>Cn.withWriteLock(L,n.remove(Q).pipe(r.catchIf(Wo,()=>r.void))))}),x=($)=>r.gen(function*(){return yield*T($,(L,g)=>Cn.withReadLock(g,A(L,n.readJson(L))))}),C=($,Q)=>r.gen(function*(){return yield*T($,(g,s)=>Cn.withWriteLock(s,r.gen(function*(){let m=yield*A(g,n.readJson(g));return Q(m),yield*_(g,m),m})))}),H=($,Q)=>r.gen(function*(){yield*T($,(L,g)=>Cn.withWriteLock(g,_(L,Q)))}),K=r.fn("Storage.list")(function*($){let Q=(yield*l).dir,L=X.join(Q,...$);return(yield*n.glob("**/*",{cwd:L,include:"file"}).pipe(r.catch(()=>r.succeed([])))).map((s)=>[...$,...s.slice(0,-5).split(X.sep)]).toSorted((s,m)=>s.join("/").localeCompare(m.join("/")))});return to.of({remove:M,read:x,update:C,write:H,list:K})})),we=Ti.pipe(h.provide(k.defaultLayer),h.provide(Sn.defaultLayer));export{Rn as
|
|
5
|
+
`).filter(Boolean).map((H)=>H.trim()).toSorted();if(!C)continue;T=C,yield*o.writeWithDirs(X.join(n,"project",T+".json"),JSON.stringify({id:C,vcs:"git",worktree:M,time:{created:Date.now(),initialized:Date.now()}},null,2)),An.info(`migrating sessions for project ${T}`);for(let H of yield*o.glob("storage/session/info/*.json",{cwd:_,absolute:!0})){let K=X.join(n,"session",T,X.basename(H));An.info("copying",{sessionFile:H,dest:K});let $=yield*o.readJson(H),Q=ze($,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(K,JSON.stringify($,null,2)),cn.isNone(Q))continue;An.info(`migrating messages for session ${Q.value.id}`);for(let L of yield*o.glob(`storage/session/message/${Q.value.id}/*.json`,{cwd:_,absolute:!0})){let g=X.join(n,"message",Q.value.id,X.basename(L));An.info("copying",{msgFile:L,dest:g});let s=yield*o.readJson(L),m=ce(s,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(g,JSON.stringify(s,null,2)),cn.isNone(m))continue;An.info(`migrating parts for message ${m.value.id}`);for(let y of yield*o.glob(`storage/session/part/${Q.value.id}/${m.value.id}/*.json`,{cwd:_,absolute:!0})){let t=X.join(n,"part",m.value.id,X.basename(y)),u=yield*o.readJson(y);An.info("copying",{partFile:y,dest:t}),yield*o.writeWithDirs(t,JSON.stringify(u,null,2))}}}}}}),r.fn("Storage.migration.2")(function*(n,o){for(let i of yield*o.glob("session/*/*.json",{cwd:n,absolute:!0})){let l=yield*o.readJson(i),e=ke(l,{onExcessProperty:"preserve"});if(cn.isNone(e))continue;let A=e.value.summary.diffs;yield*o.writeWithDirs(X.join(n,"session_diff",e.value.id+".json"),JSON.stringify(A,null,2)),yield*o.writeWithDirs(X.join(n,"session",e.value.projectID,e.value.id+".json"),JSON.stringify({...l,summary:{additions:A.reduce((_,T)=>_+T.additions,0),deletions:A.reduce((_,T)=>_+T.deletions,0)}},null,2))}})],Ti=h.effect(to,r.gen(function*(){let n=yield*k.Service,o=yield*Sn.Service,i=yield*Uo.make({lookup:()=>Cn.make(),idleTimeToLive:0}),l=yield*r.cached(r.gen(function*(){let $=X.join($n.Path.data,"storage"),Q=X.join($,"migration"),L=yield*n.readFileString(Q).pipe(r.map(Ve),r.catchIf(Wo,()=>r.succeed(0)),r.orElseSucceed(()=>0));for(let g=L;g<Ai.length;g++){An.info("running migration",{index:g});let s=Ai[g],m=yield*r.exit(s($,n,o));if(Xn.isFailure(m)){An.error("failed to run migration",{index:g,cause:m.cause});break}yield*n.writeWithDirs(Q,String(g+1))}return{dir:$}})),e=($)=>r.fail(new Zo({message:`Resource not found: ${$}`})),A=($,Q)=>Q.pipe(r.catchIf(Wo,()=>e($))),_=r.fnUntraced(function*($,Q){yield*n.writeWithDirs($,JSON.stringify(Q,null,2))}),T=($,Q)=>r.scoped(r.gen(function*(){let L=qe((yield*l).dir,$);return yield*Q(L,yield*Uo.get(i,L))})),M=r.fn("Storage.remove")(function*($){yield*T($,(Q,L)=>Cn.withWriteLock(L,n.remove(Q).pipe(r.catchIf(Wo,()=>r.void))))}),x=($)=>r.gen(function*(){return yield*T($,(L,g)=>Cn.withReadLock(g,A(L,n.readJson(L))))}),C=($,Q)=>r.gen(function*(){return yield*T($,(g,s)=>Cn.withWriteLock(s,r.gen(function*(){let m=yield*A(g,n.readJson(g));return Q(m),yield*_(g,m),m})))}),H=($,Q)=>r.gen(function*(){yield*T($,(L,g)=>Cn.withWriteLock(g,_(L,Q)))}),K=r.fn("Storage.list")(function*($){let Q=(yield*l).dir,L=X.join(Q,...$);return(yield*n.glob("**/*",{cwd:L,include:"file"}).pipe(r.catch(()=>r.succeed([])))).map((s)=>[...$,...s.slice(0,-5).split(X.sep)]).toSorted((s,m)=>s.join("/").localeCompare(m.join("/")))});return to.of({remove:M,read:x,update:C,write:H,list:K})})),we=Ti.pipe(h.provide(k.defaultLayer),h.provide(Sn.defaultLayer));export{Rn as rl,xr as sl,En as tl,mn as ul,J as vl,fn as wl,eo as xl,Yo as yl,zo as zl,co as Al,ko as Bl,Vo as Cl,fo as Dl,In as El,Sn as Fl,Zo as Gl,Oi as Hl,w as Il,Jo as Jl,Pr as Kl,se as Ll,jr as Ml,Ae as Nl,on as Ol,Un as Pl,de as Ql,ei as Rl,mi as Sl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Od as H,Pd as I}from"./chunk-gc5rhnht.js";import{be as G}from"./chunk-f4mnp6xd.js";import{Zf as B}from"./chunk-5nmm1kvx.js";import{lg as E}from"./chunk-gefx3n08.js";import"./chunk-5f0nhthe.js";import"./chunk-ayb3bdb7.js";import"./chunk-h4hs2rhf.js";import"./chunk-brk6bge4.js";import"./chunk-nfg7nt13.js";import"./chunk-qgkb6n8k.js";import"./chunk-4aajzxm9.js";import"./chunk-he9kpk9r.js";import"./chunk-vs3s49jw.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-t8fjgkp8.js";import"./chunk-0egrckx0.js";import"./chunk-qq9m8fxv.js";import"./chunk-2qm46qvn.js";import"./chunk-tsmj98yf.js";import"./chunk-58f4y4b7.js";import"./chunk-rmsqb6r4.js";import"./chunk-qxdpgdfk.js";import"./chunk-6qwk6z87.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-eewe7tx1.js";import{ho as D}from"./chunk-37cbrnke.js";import"./chunk-wm9nh9nb.js";import"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-az3nss5m.js";import"./chunk-p2fte9vz.js";import"./chunk-ggncq8w8.js";import"./chunk-t3w43rft.js";import"./chunk-eacpc64g.js";import"./chunk-27saej0r.js";import"./chunk-9009v4d0.js";import"./chunk-82xrfk5x.js";import"./chunk-wqk1v8t0.js";import"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import"./chunk-6yhn9syz.js";import"./chunk-wb05bp10.js";import"./chunk-wgkcyqn1.js";import{Os as f}from"./chunk-59csnjc3.js";import"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import"./chunk-e0vrxetq.js";var T=G({command:"serve",builder:(b)=>B(b).option("auto-password",{type:"boolean",default:!1,describe:"generate a random ephemeral QITQODE_SERVER_PASSWORD for this run and print it"}),describe:"starts a headless qitqode server",handler:async(b)=>{let A=await H(b);if(b["auto-password"]&&!f.QITQODE_SERVER_PASSWORD){let z=crypto.randomUUID();process.env.QITQODE_SERVER_PASSWORD=z,console.log('Generated ephemeral server password (basic auth, username "qitqode"):'),console.log(` ${z}`)}if(I(A,f.QITQODE_SERVER_PASSWORD))console.error("ERROR: Binding to non-loopback address without QITQODE_SERVER_PASSWORD is not allowed."),console.error("Set QITQODE_SERVER_PASSWORD, pass --auto-password, or pass --no-auth to override (DANGEROUS)."),process.exit(1);if(!f.QITQODE_SERVER_PASSWORD)console.error(""),console.error("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.error("\u2551 WARNING: server is running WITHOUT authentication. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Any process or browser page that can reach this address can read \u2551"),console.error("\u2551 project files, run shell commands, and open terminals as you. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Set QITQODE_SERVER_PASSWORD, or restart with --auto-password to \u2551"),console.error("\u2551 generate an ephemeral password for this run. \u2551"),console.error("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.error("");if(process.env.QITQODE_KEY)console.log("Using QITQODE_KEY for authentication.");else if(!await D())console.error("Warning: no QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");let j=await E.listen(A);console.log(`qitqode server listening on http://${j.hostname}:${j.port}`),await new Promise(()=>{}),await j.stop()}});export{T as ServeCommand};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{zk as
|
|
2
|
+
import{uO as M,xO as T}from"./chunk-e0vrxetq.js";var F=M((H)=>{var X=(k,z)=>()=>(z||k((z={exports:{}}).exports,z),z.exports),c=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sync=k.isexe=void 0;var z=T("fs"),J=T("fs/promises"),K=async(Z,Q={})=>{let{ignoreErrors:Y=!1}=Q;try{return q(await(0,J.stat)(Z),Q)}catch($){let A=$;if(Y||A.code==="EACCES")return!1;throw A}};k.isexe=K;var V=(Z,Q={})=>{let{ignoreErrors:Y=!1}=Q;try{return q((0,z.statSync)(Z),Q)}catch($){let A=$;if(Y||A.code==="EACCES")return!1;throw A}};k.sync=V;var q=(Z,Q)=>Z.isFile()&&B(Z,Q),B=(Z,Q)=>{let Y=Q.uid??process.getuid?.(),$=Q.groups??process.getgroups?.()??[],A=Q.gid??process.getgid?.()??$[0];if(Y===void 0||A===void 0)throw Error("cannot get uid or gid");let C=new Set([A,...$]),G=Z.mode,U=Z.uid,u=Z.gid,_=parseInt("100",8),L=parseInt("010",8),w=parseInt("001",8),E=_|L;return!!(G&w||G&L&&C.has(u)||G&_&&U===Y||G&E&&Y===0)}}),m=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sync=k.isexe=void 0;var z=T("fs"),J=T("fs/promises"),K=T("path"),V=async(Q,Y={})=>{let{ignoreErrors:$=!1}=Y;try{return Z(await(0,J.stat)(Q),Q,Y)}catch(A){let C=A;if($||C.code==="EACCES")return!1;throw C}};k.isexe=V;var q=(Q,Y={})=>{let{ignoreErrors:$=!1}=Y;try{return Z((0,z.statSync)(Q),Q,Y)}catch(A){let C=A;if($||C.code==="EACCES")return!1;throw C}};k.sync=q;var B=(Q,Y)=>{let{pathExt:$=process.env.PATHEXT||""}=Y,A=$.split(K.delimiter);if(A.indexOf("")!==-1)return!0;for(let C of A){let G=C.toLowerCase(),U=Q.substring(Q.length-G.length).toLowerCase();if(G&&U===G)return!0}return!1},Z=(Q,Y,$)=>Q.isFile()&&B(Y,$)}),h=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0})}),N=H&&H.__createBinding||(Object.create?function(k,z,J,K){K===void 0&&(K=J);var V=Object.getOwnPropertyDescriptor(z,J);(!V||("get"in V?!z.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return z[J]}}),Object.defineProperty(k,K,V)}:function(k,z,J,K){K===void 0&&(K=J),k[K]=z[J]}),d=H&&H.__setModuleDefault||(Object.create?function(k,z){Object.defineProperty(k,"default",{enumerable:!0,value:z})}:function(k,z){k.default=z}),O=H&&H.__importStar||function(){var k=function(z){return k=Object.getOwnPropertyNames||function(J){var K=[];for(var V in J)Object.prototype.hasOwnProperty.call(J,V)&&(K[K.length]=V);return K},k(z)};return function(z){if(z&&z.__esModule)return z;var J={};if(z!=null)for(var K=k(z),V=0;V<K.length;V++)K[V]!=="default"&&N(J,z,K[V]);return d(J,z),J}}(),x=H&&H.__exportStar||function(k,z){for(var J in k)J!=="default"&&!Object.prototype.hasOwnProperty.call(z,J)&&N(z,k,J)};Object.defineProperty(H,"__esModule",{value:!0});H.sync=H.isexe=H.posix=H.win32=void 0;var R=O(c());H.posix=R;var W=O(m());H.win32=W;x(h(),H);var a=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=a==="win32"?W:R;H.isexe=b.isexe;H.sync=b.sync});var zk=M((Zk,P)=>{var{isexe:p,sync:o}=F(),{join:r,delimiter:e,sep:I,posix:y}=T("path"),S=process.platform==="win32",D=new RegExp(`[${y.sep}${I===y.sep?"":I}]`.replace(/(\\)/g,"\\$1")),t=new RegExp(`^\\.${D.source}`),g=(k)=>Object.assign(Error(`not found: ${k}`),{code:"ENOENT"}),v=(k,{path:z=process.env.PATH,pathExt:J=process.env.PATHEXT,delimiter:K=e})=>{let V=k.match(D)?[""]:[...S?[process.cwd()]:[],...(z||"").split(K)];if(S){let q=J||[".EXE",".CMD",".BAT",".COM"].join(K),B=q.split(K).flatMap((Z)=>[Z,Z.toLowerCase()]);if(k.includes(".")&&B[0]!=="")B.unshift("");return{pathEnv:V,pathExt:B,pathExtExe:q}}return{pathEnv:V,pathExt:[""]}},f=(k,z)=>{let J=/^".*"$/.test(k)?k.slice(1,-1):k;return(!J&&t.test(z)?z.slice(0,2):"")+r(J,z)},l=async(k,z={})=>{let{pathEnv:J,pathExt:K,pathExtExe:V}=v(k,z),q=[];for(let B of J){let Z=f(B,k);for(let Q of K){let Y=Z+Q;if(await p(Y,{pathExt:V,ignoreErrors:!0})){if(!z.all)return Y;q.push(Y)}}}if(z.all&&q.length)return q;if(z.nothrow)return null;throw g(k)},kk=(k,z={})=>{let{pathEnv:J,pathExt:K,pathExtExe:V}=v(k,z),q=[];for(let B of J){let Z=f(B,k);for(let Q of K){let Y=Z+Q;if(o(Y,{pathExt:V,ignoreErrors:!0})){if(!z.all)return Y;q.push(Y)}}}if(z.all&&q.length)return q;if(z.nothrow)return null;throw g(k)};P.exports=l;l.sync=kk});
|
|
3
|
+
export{zk as Zr};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{X as s,Y as t,_ as a}from"./chunk-nr2j8ytn.js";import{$ as o}from"./chunk-4pmvxnkj.js";import{Qd as i}from"./chunk-ytyzrqev.js";import{be as n}from"./chunk-f4mnp6xd.js";import{eg as J}from"./chunk-bwadggys.js";import{lg as f}from"./chunk-gefx3n08.js";import"./chunk-5f0nhthe.js";import"./chunk-ayb3bdb7.js";import"./chunk-h4hs2rhf.js";import"./chunk-brk6bge4.js";import"./chunk-nfg7nt13.js";import"./chunk-qgkb6n8k.js";import"./chunk-4aajzxm9.js";import{Ch as p,rh as l}from"./chunk-he9kpk9r.js";import"./chunk-vs3s49jw.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-t8fjgkp8.js";import"./chunk-0egrckx0.js";import{Uk as g}from"./chunk-qq9m8fxv.js";import"./chunk-2qm46qvn.js";import"./chunk-tsmj98yf.js";import"./chunk-58f4y4b7.js";import"./chunk-rmsqb6r4.js";import"./chunk-qxdpgdfk.js";import"./chunk-6qwk6z87.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-eewe7tx1.js";import{bo as b}from"./chunk-37cbrnke.js";import"./chunk-wm9nh9nb.js";import"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-az3nss5m.js";import"./chunk-p2fte9vz.js";import"./chunk-ggncq8w8.js";import"./chunk-t3w43rft.js";import"./chunk-eacpc64g.js";import"./chunk-27saej0r.js";import"./chunk-9009v4d0.js";import"./chunk-82xrfk5x.js";import"./chunk-wqk1v8t0.js";import{Fr as d}from"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import"./chunk-6yhn9syz.js";import"./chunk-wb05bp10.js";import"./chunk-wgkcyqn1.js";import{Os as I,Xs as D}from"./chunk-59csnjc3.js";import{gt as x}from"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import"./chunk-e0vrxetq.js";import q from"path";import{pathToFileURL as Kj}from"url";import{EOL as T}from"os";function G(j){let M=j.state;return{input:M.input,metadata:"metadata"in M?M.metadata:{},part:j}}function z(j){let M=j.description?J.Style.TEXT_DIM+` ${j.description}`+J.Style.TEXT_NORMAL:"";J.println(J.Style.TEXT_NORMAL+j.icon,J.Style.TEXT_NORMAL+j.title+M)}function h(j,M){if(J.empty(),z(j),!M?.trim())return;J.println(M),J.empty()}function u(j){let M=j.state,X="input"in M?M.input:void 0,Z=("title"in M&&M.title?M.title:void 0)||(X&&typeof X==="object"&&Object.keys(X).length>0?JSON.stringify(X):"Unknown");z({icon:"\u2699",title:`${j.tool} ${Z}`})}function e(j){let M=j.path??"",X=`${j.kind} "${j.pattern}"`,Z=M?`in ${E(M)}`:"",H=j.count===void 0?Z:`${Z}${Z?" \xB7 ":""}${j.count} ${j.count===1?"match":"matches"}`;z({icon:"\u2731",title:X,...H&&{description:H}})}function Mj(j){e({kind:"Glob",pattern:j.input.pattern,path:j.input.path,count:j.metadata.count})}function Nj(j){e({kind:"Grep",pattern:j.input.pattern,path:j.input.path,count:j.metadata.matches})}function Vj(j){let M=E(j.input.filePath),X=Object.entries(j.input).filter(([H,C])=>{if(H==="filePath")return!1;return typeof C==="string"||typeof C==="number"||typeof C==="boolean"}),Z=X.length?`[${X.map(([H,C])=>`${H}=${C}`).join(", ")}]`:void 0;z({icon:"\u2192",title:`Read ${M}`,...Z&&{description:Z}})}function Xj(j){h({icon:"\u2190",title:`Write ${E(j.input.filePath)}`},j.part.state.status==="completed"?j.part.state.output:void 0)}function Yj(j){z({icon:"%",title:`WebFetch ${j.input.url}`})}function Zj(j){let M=E(j.input.filePath),X=j.metadata.diff;h({icon:"\u2190",title:`Edit ${M}`},X)}function _j(j){z({icon:"\u25C7",title:`Exa Code Search "${j.input.query}"`})}function $j(j){z({icon:"\u25C8",title:`Web Search "${j.input.query}"`})}function c(j){let M=j.part.state.input?.operation??j.part.state.input,X=j.part.state.status,Z=typeof M?.subagent_type==="string"&&M.subagent_type.trim().length>0?M.subagent_type:"unknown",H=d.titlecase(Z),C=typeof M?.description==="string"&&M.description.trim().length>0?M.description:void 0,w=X==="error"?"\u2717":X==="running"?"\u2022":"\u2713",L=C??`${H} Task`;z({icon:w,title:L,description:C?`${H} Agent`:void 0})}function Gj(j){z({icon:"\u2192",title:`Skill "${j.input.name}"`})}function Hj(j){let M=j.part.state.status==="completed"?j.part.state.output?.trim():void 0;h({icon:"$",title:`${j.input.command}`},M)}function E(j){if(!j)return"";if(q.isAbsolute(j))return q.relative(process.cwd(),j)||".";return j}var Dj=n({command:"run [message..]",describe:"run qitqode with a message",builder:(j)=>{return j.positional("message",{describe:"message to send",type:"string",array:!0,default:[]}).option("command",{describe:"the command to run, use message for args",type:"string"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],describe:"session id to continue",type:"string"}).option("fork",{describe:"fork the session before continuing (requires --continue or --session)",type:"boolean"}).option("share",{type:"boolean",describe:"share the session"}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}).option("agent",{type:"string",describe:"agent to use"}).option("format",{type:"string",choices:["default","json"],default:"default",describe:"format: default (formatted) or json (raw JSON events)"}).option("file",{alias:["f"],type:"string",array:!0,describe:"file(s) to attach to message"}).option("title",{type:"string",describe:"title for the session (uses truncated prompt if no value provided)"}).option("attach",{type:"string",describe:"attach to a running qitqode server (e.g., http://localhost:4096)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}).option("dir",{type:"string",describe:"directory to run in, path on remote server if attaching"}).option("port",{type:"number",describe:"port for the local server (defaults to random port if no value provided)"}).option("variant",{type:"string",describe:"model variant (provider-specific reasoning effort, e.g., high, max, minimal)"}).option("thinking",{type:"boolean",describe:"show thinking blocks",default:!1}).option("dangerously-skip-permissions",{type:"boolean",describe:"auto-approve permissions that are not explicitly denied (dangerous!)",default:!1})},handler:async(j)=>{let M=[...j.message,...j["--"]||[]].join(" "),X=(()=>{if(!j.dir)return;if(j.attach)return j.dir;try{return process.chdir(j.dir),process.cwd()}catch{J.error("Failed to change directory to "+j.dir),process.exit(1)}})(),Z=[];if(j.file){let N=Array.isArray(j.file)?j.file:[j.file];for(let Y of N){let V=q.resolve(process.cwd(),Y);if(!await x.exists(V))J.error(`File not found: ${Y}`),process.exit(1);let W=await x.isDir(V)?"application/x-directory":"text/plain";Z.push({type:"file",url:Kj(V).href,filename:q.basename(V),mime:W})}}if(!process.stdin.isTTY)M+=`
|
|
3
|
+
`+await Bun.stdin.text();if(M.trim().length===0&&!j.command)J.error("You must provide a message or a command"),process.exit(1);if(j.fork&&!j.continue&&!j.session)J.error("--fork requires --continue or --session"),process.exit(1);let H=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}];function C(){if(j.title===void 0)return;if(j.title!=="")return j.title;return M.slice(0,50)+(M.length>50?"...":"")}async function w(N){let Y=j.continue?(await N.session.list()).data?.find((_)=>!_.parentID)?.id:j.session;if(Y&&j.fork)return(await N.session.fork({sessionID:Y})).data?.id;if(Y)return Y;let V=C();return(await N.session.create({title:V,permission:H})).data?.id}async function L(N,Y){let V=await N.config.get();if(!V.data)return;if(V.data.share!=="auto"&&!I.QITQODE_AUTO_SHARE&&!j.share)return;let W=await N.session.share({sessionID:Y}).catch((_)=>{if(_ instanceof Error&&_.message.includes("disabled"))J.println(J.Style.TEXT_DANGER_BOLD+"! "+_.message);return{error:_}});if(!W.error&&"data"in W&&W.data?.share?.url)J.println(J.Style.TEXT_INFO_BOLD+"~ "+W.data.share.url)}async function v(N){function Y(B){try{if(B.tool==="bash")return Hj(G(B));if(B.tool==="glob")return Mj(G(B));if(B.tool==="grep")return Nj(G(B));if(B.tool==="read")return Vj(G(B));if(B.tool==="write")return Xj(G(B));if(B.tool==="webfetch")return Yj(G(B));if(B.tool==="edit")return Zj(G(B));if(B.tool==="codesearch")return _j(G(B));if(B.tool==="websearch")return $j(G(B));if(B.tool==="actor")return c(G(B));if(B.tool==="skill")return Gj(G(B));return u(B)}catch{return u(B)}}function V(B,F){if(j.format==="json")return process.stdout.write(JSON.stringify({type:B,timestamp:Date.now(),sessionID:S,...F})+T),!0;return!1}let W=await N.event.subscribe(),_;async function r(B,F){let A=new Map,Q=D.create({service:"cli.run"}),O=W.stream[Symbol.asyncIterator](),Jj=B.completion.then(()=>"DONE");try{while(!0){let y=await Promise.race([O.next(),Jj]);if(y==="DONE")break;if(y.done)break;let $=y.value;if(F.onEvent($),B.onEvent($),Q.debug("event received",{type:$.type}),$.type==="message.updated"&&$.properties.info.role==="assistant"&&j.format!=="json"&&A.get("start")!==!0)J.empty(),J.println(`> ${$.properties.info.agent} \xB7 ${$.properties.info.modelID}`),J.empty(),A.set("start",!0);if($.type==="message.part.updated"){let K=$.properties.part;if(K.sessionID!==S)continue;if(K.type==="tool"&&(K.state.status==="completed"||K.state.status==="error")){if(V("tool_use",{part:K}))continue;if(K.state.status==="completed"){Y(K);continue}z({icon:"\u2717",title:`${K.tool} failed`}),J.error(K.state.error)}if(K.type==="tool"&&K.tool==="actor"&&K.state.status==="running"&&j.format!=="json"){if(A.get(K.id)===!0)continue;c(G(K)),A.set(K.id,!0)}if(K.type==="step-start"){if(V("step_start",{part:K}))continue}if(K.type==="step-finish"){if(V("step_finish",{part:K}))continue}if(K.type==="text"&&K.time?.end){if(V("text",{part:K}))continue;let R=K.text.trim();if(!R)continue;if(!process.stdout.isTTY){process.stdout.write(R+T);continue}J.empty(),J.println(R),J.empty()}if(K.type==="reasoning"&&K.time?.end&&j.thinking){if(V("reasoning",{part:K}))continue;let R=K.text.trim();if(!R)continue;let k=`Thinking: ${R}`;if(process.stdout.isTTY){J.empty(),J.println(`${J.Style.TEXT_DIM}\x1B[3m${k}\x1B[0m${J.Style.TEXT_NORMAL}`),J.empty();continue}process.stdout.write(k+T)}}if($.type==="session.error"){let K=$.properties;if(K.sessionID!==S||!K.error)continue;let R=String(K.error.name);if("data"in K.error&&K.error.data&&"message"in K.error.data)R=String(K.error.data.message);if(_=_?_+T+R:R,V("error",{error:K.error}))continue;J.error(R)}if($.type==="permission.asked"){let K=$.properties;if(K.sessionID!==S)continue;if(j["dangerously-skip-permissions"])await N.permission.reply({requestID:K.id,reply:"once"});else J.println(J.Style.TEXT_WARNING_BOLD+"!",J.Style.TEXT_NORMAL+`permission requested: ${K.permission} (${K.patterns.join(", ")}); auto-rejecting`),await N.permission.reply({requestID:K.id,reply:"reject"})}}}finally{F.fail(Error("QitQode event stream closed before connecting")),B.stop(),await O.return?.(void 0).catch(()=>{})}}let jj=await(async()=>{if(!j.agent)return;let B=j.agent;if(j.attach){let A=await N.app.agents(void 0,{throwOnError:!0}).then((O)=>O.data??[]).catch(()=>{return});if(!A){J.println(J.Style.TEXT_WARNING_BOLD+"!",J.Style.TEXT_NORMAL,`failed to list agents from ${j.attach}. Falling back to default agent`);return}let Q=A.find((O)=>O.name===B);if(!Q){J.println(J.Style.TEXT_WARNING_BOLD+"!",J.Style.TEXT_NORMAL,`agent "${B}" not found. Falling back to default agent`);return}if(Q.mode==="subagent"){J.println(J.Style.TEXT_WARNING_BOLD+"!",J.Style.TEXT_NORMAL,`agent "${B}" is a subagent, not a primary agent. Falling back to default agent`);return}return B}let F=await p.runPromise(l.Service.use((A)=>A.get(B)));if(!F){J.println(J.Style.TEXT_WARNING_BOLD+"!",J.Style.TEXT_NORMAL,`agent "${B}" not found. Falling back to default agent`);return}if(F.mode==="subagent"){J.println(J.Style.TEXT_WARNING_BOLD+"!",J.Style.TEXT_NORMAL,`agent "${B}" is a subagent, not a primary agent. Falling back to default agent`);return}return B})(),m=a(jj),S=await w(N);if(!S)J.error("Session not found"),process.exit(1);await L(N,S);let Bj=D.create({service:"cli.run.poll"}),P=t({sessionID:S,query:async()=>{try{return(await N.session.status()).data?.[S]}catch(B){throw Bj.debug("session.status query failed",{error:B}),B}}}),U=s();r(P,U).catch((B)=>{console.error(B),process.exit(1)});try{await U.wait()}catch(B){throw P.stop(),B}if(j.command)await N.session.command({sessionID:S,agent:m,model:j.model,command:j.command,arguments:M,variant:j.variant});else{let B=j.model?g.parseModel(j.model):void 0;await N.session.prompt({sessionID:S,agent:m,model:B,variant:j.variant,parts:[...Z,{type:"text",text:M}]})}P.markStarted()}if(j.attach){let N=o({password:j.password}),Y=b({baseUrl:j.attach,directory:X,headers:N});return await v(Y)}await i(process.cwd(),async()=>{let Y=b({baseUrl:"http://qitqode.internal",fetch:async(V,W)=>{let _=new Request(V,W);return f.Default().app.fetch(_)}});await v(Y)})}});export{Dj as RunCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Mr as x}from"./chunk-z0kbyr00.js";import{As as q,Bs as H,es as K,fs as j,ts as V}from"./chunk-wb05bp10.js";import{gt as M,lt as I}from"./chunk-1bxfzd6r.js";import{_D as v,fH as _}from"./chunk-g7v6sp3c.js";import{vO as a}from"./chunk-e0vrxetq.js";var U={};a(U,{validateArchiveMetadata:()=>P,validateArchiveEntries:()=>g,replaceDirectoryAtomically:()=>C,extractZip:()=>p,assertArchiveDestinationSafe:()=>T});import m from"path";import c from"fs/promises";function g(o,r){let n=m.resolve(r);for(let e of o){let t=e.trim().replaceAll("\\","/");if(!t)continue;if(t.includes("\x00")||m.posix.isAbsolute(t)||/^[a-z]:\//i.test(t))throw Error(`Unsafe archive entry: ${e}`);if(t.split("/").includes(".."))throw Error(`Unsafe archive entry: ${e}`);let s=m.resolve(n,...t.split("/"));if(s!==n&&!s.startsWith(`${n}${m.sep}`))throw Error(`Unsafe archive entry: ${e}`)}}function P(o){for(let r of o.split(/\r?\n/))if(/^[bclps]/.test(r))throw Error("Archive contains an unsafe special entry")}async function u(o){let r=await c.readdir(o,{withFileTypes:!0});await Promise.all(r.map(async(n)=>{let e=m.join(o,n.name);if(n.isSymbolicLink())throw Error(`Archive contains a symbolic link: ${n.name}`);if(n.isDirectory())await u(e)}))}async function b(o){return c.lstat(o).catch((r)=>{if(r.code==="ENOENT")return;throw r})}async function T(o){let r=m.resolve(o),n=m.parse(r),e=n.root;for(let t of r.slice(n.root.length).split(m.sep).filter(Boolean)){e=m.join(e,t);let s=await b(e);if(!s)return;if(s.isSymbolicLink())throw Error(`Archive destination contains a symbolic link: ${e}`)}}async function C(o,r){let n=m.resolve(r);await T(n);let e=await b(n);if(e&&!e.isDirectory())throw Error("Archive destination must be a directory");let t=m.join(m.dirname(n),`.qitqode-backup-${crypto.randomUUID()}`);if(e)await c.rename(n,t);try{await c.rename(o,n)}catch(s){if(e)await c.rename(t,n);throw s}if(e)await c.rm(t,{recursive:!0,force:!0})}async function p(o,r){let n=m.resolve(o),e=m.resolve(r),t=await x(process.platform==="win32"?["tar","-tf",n]:["unzip","-Z1",n]);g(t.stdout.toString().split(/\r?\n/),e);let s=await x(process.platform==="win32"?["tar","-tvf",n]:["unzip","-Z","-l",n]);P(s.stdout.toString()),await T(m.dirname(e)),await c.mkdir(m.dirname(e),{recursive:!0}),await T(m.dirname(e));let f=await c.mkdtemp(m.join(m.dirname(e),".qitqode-extract-"));try{if(process.platform==="win32"){let w=n.replace(/'/g,"''"),R=f.replace(/'/g,"''"),S=`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${w}' -DestinationPath '${R}' -Force`;await x(["powershell","-NoProfile","-NonInteractive","-Command",S])}else await x(["unzip","-o","-q",n,"-d",f]);await u(f),await C(f,e)}finally{await c.rm(f,{recursive:!0,force:!0})}}var $={};a($,{isValidHex:()=>J,hexToRgb:()=>F,hexToAnsiBold:()=>y});function J(o){if(!o)return!1;return/^#[0-9a-fA-F]{6}$/.test(o)}function F(o){let r=parseInt(o.slice(1,3),16),n=parseInt(o.slice(3,5),16),e=parseInt(o.slice(5,7),16);return{r,g:n,b:e}}function y(o){if(!J(o))return;let{r,g:n,b:e}=F(o);return`\x1B[38;2;${r};${n};${e}m\x1B[1m`}var Q={};a(Q,{awaitDeferred:()=>k});function k(o,r){return _.ensuring(v.await(o),_.sync(r))}import d from"os";import oo from"path";var i;async function A(){if(i)return i;let o=oo.join(I.Path.data,"installation_id"),r=await M.readText(o).catch(()=>{return});if(r&&r.trim())return i=r.trim(),i;return i=crypto.randomUUID(),await M.write(o,i),i}function ro(){if(process.env.USER)return process.env.USER;if(process.env.USERNAME)return process.env.USERNAME;return d.userInfo().username}function no(){return Intl.DateTimeFormat().resolvedOptions().locale}function eo(){return Intl.DateTimeFormat().resolvedOptions().timeZone}async function to(){let o=d.cpus();return{os:{platform:d.platform(),arch:d.arch(),release:d.release(),hostname:d.hostname()},cpu:{model:o[0]?.model??"unknown",count:o.length},memory:{total_bytes:d.totalmem()},user:{username:ro(),homedir:d.homedir()},runtime:{bun_version:Bun.version,node_version:process.versions.node,pid:process.pid,timezone:eo(),locale:no()},paths:{cwd:process.cwd(),data:I.Path.data,config:I.Path.config},qitqode:{version:K,channel:j,installation_id:await A(),run_id:q,process_role:H}}}var W={};a(W,{toString:()=>mo,parse:()=>co,match:()=>so,fromParsedKey:()=>fo});function so(o,r){if(!o)return!1;let n={...o,super:o.super??!1},e={...r,super:r.super??!1};return V(n,e)}function fo(o,r=!1){return{name:o.name===" "?"space":o.name,ctrl:o.ctrl,meta:o.meta,shift:o.shift,super:o.super??!1,leader:r}}function mo(o){if(!o)return"";let r=[];if(o.ctrl)r.push("ctrl");if(o.meta)r.push("alt");if(o.super)r.push("super");if(o.shift)r.push("shift");if(o.name)if(o.name==="delete")r.push("del");else r.push(o.name);let n=r.join("+");if(o.leader)n=n?`<leader> ${n}`:"<leader>";return n}function co(o){if(o==="none")return[];return o.split(",").map((r)=>{let e=r.replace(/<leader>/g,"leader+").toLowerCase().split("+"),t={ctrl:!1,meta:!1,shift:!1,leader:!1,name:""};for(let s of e)switch(s){case"ctrl":t.ctrl=!0;break;case"alt":case"meta":case"option":t.meta=!0;break;case"super":t.super=!0;break;case"shift":t.shift=!0;break;case"leader":t.leader=!0;break;case"esc":t.name="escape";break;default:t.name=s;break}return t})}var B={};a(B,{create:()=>io,NotFound:()=>O});import{AsyncLocalStorage as ao}from"async_hooks";class O extends Error{name;constructor(o){super(`No context found for ${o}`);this.name=o}}function io(o){let r=new ao;return{use(){let n=r.getStore();if(!n)throw new O(o);return n},provide(n,e){return r.run(n,e)}}}var X={};a(X,{truncateMiddle:()=>To,truncate:()=>Ro,todayTimeOrDateTime:()=>xo,titlecase:()=>wo,time:()=>N,pluralize:()=>Mo,number:()=>Io,duration:()=>Eo,datetime:()=>G});function wo(o){return o.replace(/\b\w/g,(r)=>r.toUpperCase())}function N(o){return new Date(o).toLocaleTimeString(void 0,{timeStyle:"short"})}function G(o){let r=new Date(o),n=N(o),e=r.toLocaleDateString();return`${n} \xB7 ${e}`}function xo(o){let r=new Date(o),n=new Date;if(r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate())return N(o);else return G(o)}function Io(o){if(o>=1e6)return(o/1e6).toFixed(1)+"M";else if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()}function Eo(o){if(o<1000)return`${o}ms`;if(o<60000)return`${(o/1000).toFixed(1)}s`;if(o<3600000){let e=Math.floor(o/60000),t=Math.floor(o%60000/1000);return`${e}m ${t}s`}if(o<86400000){let e=Math.floor(o/3600000),t=Math.floor(o%3600000/60000);return`${e}h ${t}m`}let r=Math.floor(o%86400000/3600000);return`${Math.floor(o/86400000)}d ${r}h`}function Ro(o,r){if(r<=0)return"";if(o.length<=r)return o;return o.slice(0,r-1)+"\u2026"}function To(o,r=35){if(r<=0)return"";if(o.length<=r)return o;let n="\u2026",e=Math.ceil((r-n.length)/2),t=Math.floor((r-n.length)/2);return o.slice(0,e)+n+(t>0?o.slice(-t):"")}function Mo(o,r,n){return(o===1?r:n).replace("{}",o.toString())}var h={};a(h,{write:()=>Oo,read:()=>_o});var E=new Map;function Y(o){if(!E.has(o))E.set(o,{readers:0,writer:!1,waitingReaders:[],waitingWriters:[]});return E.get(o)}function So(o){let r=E.get(o);if(!r||r.writer||r.readers>0)return;if(r.waitingWriters.length>0){r.waitingWriters.shift()();return}while(r.waitingReaders.length>0)r.waitingReaders.shift()();if(r.readers===0&&!r.writer&&r.waitingReaders.length===0&&r.waitingWriters.length===0)E.delete(o)}function L(o){return new Promise((r)=>{let n=()=>{o.acquire();let e=!1;r({[Symbol.dispose]:()=>{if(e)return;e=!0,o.release(),So(o.key)}})};if(o.available())n();else o.waiting.push(n)})}async function _o(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.waitingWriters.length===0,acquire:()=>r.readers++,release:()=>r.readers--,waiting:r.waitingReaders})}async function Oo(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.readers===0,acquire:()=>{r.writer=!0},release:()=>{r.writer=!1},waiting:r.waitingWriters})}var z={};a(z,{listen:()=>No,emit:()=>go,client:()=>Po});function No(o){onmessage=async(r)=>{let n=JSON.parse(r.data);if(n.type==="rpc.request")try{let e=await o[n.method](n.input);postMessage(JSON.stringify({type:"rpc.result",result:e,id:n.id}))}catch(e){postMessage(JSON.stringify({type:"rpc.result",error:e instanceof Error?e.message:String(e),id:n.id}))}}}function go(o,r){postMessage(JSON.stringify({type:"rpc.event",event:o,data:r}))}function Po(o){let r=new Map,n=new Map,e=0;return o.onmessage=async(t)=>{let s=JSON.parse(t.data);if(s.type==="rpc.result"){let f=r.get(s.id);if(f)if(r.delete(s.id),"error"in s)f.reject(Error(typeof s.error==="string"?s.error:"RPC call failed"));else f.resolve(s.result)}if(s.type==="rpc.event"){let f=n.get(s.event);if(f)for(let w of f)w(s.data)}},{call(t,s){let f=e++;return new Promise((w,R)=>{r.set(f,{resolve:w,reject:R});try{o.postMessage(JSON.stringify({type:"rpc.request",method:t,input:s,id:f}))}catch(S){r.delete(f),R(S)}})},on(t,s){let f=n.get(t);if(!f)f=new Set,n.set(t,f);return f.add(s),()=>{f.delete(s)}}}}var D={};a(D,{estimate:()=>Z});function Z(o){return Math.max(0,Math.round((o||"").length/4))}export{U as yr,$ as zr,Q as Ar,A as Br,to as Cr,W as Dr,B as Er,X as Fr,h as Gr,Po as Hr,z as Ir,D as Jr};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{O as
|
|
2
|
+
import{If as _}from"./chunk-35fj1sfm.js";import{uO as r}from"./chunk-e0vrxetq.js";var O=r((e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.getRegionInfo=e.resolveRegionConfig=e.NODE_REGION_CONFIG_FILE_OPTIONS=e.NODE_REGION_CONFIG_OPTIONS=e.REGION_INI_NAME=e.REGION_ENV_NAME=e.resolveEndpointsConfig=e.resolveCustomEndpointsConfig=e.nodeFipsConfigSelectors=e.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=e.DEFAULT_USE_FIPS_ENDPOINT=e.CONFIG_USE_FIPS_ENDPOINT=e.ENV_USE_FIPS_ENDPOINT=e.nodeDualstackConfigSelectors=e.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=e.DEFAULT_USE_DUALSTACK_ENDPOINT=e.CONFIG_USE_DUALSTACK_ENDPOINT=e.ENV_USE_DUALSTACK_ENDPOINT=void 0;var t=_();Object.defineProperty(e,"ENV_USE_DUALSTACK_ENDPOINT",{enumerable:!0,get:function(){return t.ENV_USE_DUALSTACK_ENDPOINT}});Object.defineProperty(e,"CONFIG_USE_DUALSTACK_ENDPOINT",{enumerable:!0,get:function(){return t.CONFIG_USE_DUALSTACK_ENDPOINT}});Object.defineProperty(e,"DEFAULT_USE_DUALSTACK_ENDPOINT",{enumerable:!0,get:function(){return t.DEFAULT_USE_DUALSTACK_ENDPOINT}});Object.defineProperty(e,"NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS",{enumerable:!0,get:function(){return t.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS}});Object.defineProperty(e,"nodeDualstackConfigSelectors",{enumerable:!0,get:function(){return t.nodeDualstackConfigSelectors}});Object.defineProperty(e,"ENV_USE_FIPS_ENDPOINT",{enumerable:!0,get:function(){return t.ENV_USE_FIPS_ENDPOINT}});Object.defineProperty(e,"CONFIG_USE_FIPS_ENDPOINT",{enumerable:!0,get:function(){return t.CONFIG_USE_FIPS_ENDPOINT}});Object.defineProperty(e,"DEFAULT_USE_FIPS_ENDPOINT",{enumerable:!0,get:function(){return t.DEFAULT_USE_FIPS_ENDPOINT}});Object.defineProperty(e,"NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS",{enumerable:!0,get:function(){return t.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS}});Object.defineProperty(e,"nodeFipsConfigSelectors",{enumerable:!0,get:function(){return t.nodeFipsConfigSelectors}});Object.defineProperty(e,"resolveCustomEndpointsConfig",{enumerable:!0,get:function(){return t.resolveCustomEndpointsConfig}});Object.defineProperty(e,"resolveEndpointsConfig",{enumerable:!0,get:function(){return t.resolveEndpointsConfig}});Object.defineProperty(e,"REGION_ENV_NAME",{enumerable:!0,get:function(){return t.REGION_ENV_NAME}});Object.defineProperty(e,"REGION_INI_NAME",{enumerable:!0,get:function(){return t.REGION_INI_NAME}});Object.defineProperty(e,"NODE_REGION_CONFIG_OPTIONS",{enumerable:!0,get:function(){return t.NODE_REGION_CONFIG_OPTIONS}});Object.defineProperty(e,"NODE_REGION_CONFIG_FILE_OPTIONS",{enumerable:!0,get:function(){return t.NODE_REGION_CONFIG_FILE_OPTIONS}});Object.defineProperty(e,"resolveRegionConfig",{enumerable:!0,get:function(){return t.resolveRegionConfig}});Object.defineProperty(e,"getRegionInfo",{enumerable:!0,get:function(){return t.getRegionInfo}})});var u=r((n)=>{Object.defineProperty(n,"__esModule",{value:!0});n.loadConfig=void 0;var o=_();Object.defineProperty(n,"loadConfig",{enumerable:!0,get:function(){return o.loadConfig}})});
|
|
3
|
+
export{O as je,u as ke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-r9w0thdk.js";var e={"ui.sessionReview.title":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0627\u0644\u062C\u0644\u0633\u0629","ui.sessionReview.title.lastTurn":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0622\u062E\u0631 \u062F\u0648\u0631","ui.sessionReview.diffStyle.unified":"\u0645\u0648\u062D\u062F","ui.sessionReview.diffStyle.split":"\u0645\u0646\u0642\u0633\u0645","ui.sessionReview.openFile":"\u0641\u062A\u062D \u0645\u0644\u0641","ui.sessionReview.selection.line":"\u0633\u0637\u0631 {{line}}","ui.sessionReview.selection.lines":"\u0627\u0644\u0623\u0633\u0637\u0631 {{start}}-{{end}}","ui.sessionReview.expandAll":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0643\u0644","ui.sessionReview.collapseAll":"\u0637\u064A \u0627\u0644\u0643\u0644","ui.sessionReview.change.added":"\u0645\u0636\u0627\u0641","ui.sessionReview.change.removed":"\u0645\u062D\u0630\u0648\u0641","ui.sessionReview.change.modified":"\u0645\u0639\u062F\u0644","ui.sessionReview.image.loading":"\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...","ui.sessionReview.image.placeholder":"\u0635\u0648\u0631\u0629","ui.sessionReview.largeDiff.title":"Diff \u0643\u0628\u064A\u0631 \u062C\u062F\u0627 \u0644\u0639\u0631\u0636\u0647","ui.sessionReview.largeDiff.meta":"\u0627\u0644\u062D\u062F: {{limit}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627. \u0627\u0644\u062D\u0627\u0644\u064A: {{current}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627.","ui.sessionReview.largeDiff.renderAnyway":"\u0627\u0639\u0631\u0636 \u0639\u0644\u0649 \u0623\u064A \u062D\u0627\u0644","ui.fileMedia.kind.image":"\u0635\u0648\u0631\u0629","ui.fileMedia.kind.audio":"\u0635\u0648\u062A","ui.fileMedia.state.removed":"\u062A\u0645\u062A \u0625\u0632\u0627\u0644\u0629 {{kind}}","ui.fileMedia.state.loading":"\u062C\u0627\u0631\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}...","ui.fileMedia.state.error":"\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631","ui.fileMedia.binary.title":"\u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A","ui.fileMedia.binary.description.path":"{{path}} \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.fileMedia.binary.description.default":"\u0647\u0630\u0627 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.lineComment.label.prefix":"\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u0623\u0636\u0641 \u062A\u0639\u0644\u064A\u0642\u064B\u0627","ui.lineComment.submit":"\u062A\u0639\u0644\u064A\u0642","ui.sessionTurn.steps.show":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.steps.hide":"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.summary.response":"\u0627\u0633\u062A\u062C\u0627\u0628\u0629","ui.sessionTurn.diff.showMore":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A ({{count}})","ui.sessionTurn.retry.retrying":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","ui.sessionTurn.retry.inSeconds":"\u062E\u0644\u0627\u0644 {{seconds}} \u062B\u0648\u0627\u0646\u064A","ui.sessionTurn.retry.attempt":"\u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u0645\u0632\u062F\u062D\u0645 \u062D\u0627\u0644\u064A\u0627","ui.sessionTurn.error.freeUsageExceeded":"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u062D\u062F \u0627\u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u062C\u0627\u0646\u064A","ui.sessionTurn.error.addQredits":"\u0625\u0636\u0627\u0641\u0629 \u0631\u0635\u064A\u062F","ui.sessionTurn.status.delegating":"\u062A\u0641\u0648\u064A\u0636 \u0627\u0644\u0639\u0645\u0644","ui.sessionTurn.status.planning":"\u062A\u062E\u0637\u064A\u0637 \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.sessionTurn.status.gatheringContext":"\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.gatheredContext":"\u062A\u0645 \u0627\u0644\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.searchingCodebase":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0642\u0627\u0639\u062F\u0629 \u0627\u0644\u062A\u0639\u0644\u064A\u0645\u0627\u062A \u0627\u0644\u0628\u0631\u0645\u062C\u064A\u0629","ui.sessionTurn.status.searchingWeb":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0627\u0644\u0648\u064A\u0628","ui.sessionTurn.status.makingEdits":"\u0625\u062C\u0631\u0627\u0621 \u062A\u0639\u062F\u064A\u0644\u0627\u062A","ui.sessionTurn.status.runningCommands":"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0623\u0648\u0627\u0645\u0631","ui.sessionTurn.status.thinking":"\u062A\u0641\u0643\u064A\u0631","ui.sessionTurn.status.thinkingWithTopic":"\u062A\u0641\u0643\u064A\u0631 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u062C\u0645\u0639 \u0627\u0644\u0623\u0641\u0643\u0627\u0631","ui.sessionTurn.status.consideringNextSteps":"\u0627\u0644\u0646\u0638\u0631 \u0641\u064A \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.messagePart.questions.dismissed":"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0623\u0633\u0626\u0644\u0629","ui.messagePart.compaction":"\u062A\u0645 \u0636\u063A\u0637 \u0627\u0644\u062C\u0644\u0633\u0629","ui.messagePart.context.read.one":"{{count}} \u0642\u0631\u0627\u0621\u0629","ui.messagePart.context.read.other":"{{count}} \u0642\u0631\u0627\u0621\u0627\u062A","ui.messagePart.context.search.one":"{{count}} \u0628\u062D\u062B","ui.messagePart.context.search.other":"{{count}} \u0639\u0645\u0644\u064A\u0627\u062A \u0628\u062D\u062B","ui.messagePart.context.list.one":"{{count}} \u0642\u0627\u0626\u0645\u0629","ui.messagePart.context.list.other":"{{count}} \u0642\u0648\u0627\u0626\u0645","ui.messagePart.diagnostic.error":"\u062E\u0637\u0623","ui.messagePart.title.edit":"\u062A\u062D\u0631\u064A\u0631","ui.messagePart.title.write":"\u0643\u062A\u0627\u0628\u0629","ui.messagePart.option.typeOwnAnswer":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0627\u0644\u062E\u0627\u0635\u0629","ui.messagePart.review.title":"\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u062C\u0627\u0628\u0627\u062A\u0643","ui.list.loading":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.list.empty":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C","ui.list.clearFilter":"\u0645\u0633\u062D \u0639\u0627\u0645\u0644 \u0627\u0644\u062A\u0635\u0641\u064A\u0629","ui.list.emptyWithFilter.prefix":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644\u0640","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u0631\u0633\u0627\u0644\u0629 \u062C\u062F\u064A\u062F\u0629","ui.textField.copyToClipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","ui.textField.copyLink":"\u0646\u0633\u062E \u0627\u0644\u0631\u0627\u0628\u0637","ui.textField.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E","ui.imagePreview.alt":"\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0635\u0648\u0631\u0629","ui.scrollView.ariaLabel":"\u0645\u062D\u062A\u0648\u0649 \u0642\u0627\u0628\u0644 \u0644\u0644\u062A\u0645\u0631\u064A\u0631","ui.tool.read":"\u0642\u0631\u0627\u0621\u0629","ui.tool.loaded":"\u062A\u0645 \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.tool.list":"\u0642\u0627\u0626\u0645\u0629","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"\u062C\u0644\u0628 \u0627\u0644\u0648\u064A\u0628","ui.tool.websearch":"\u0628\u062D\u062B \u0627\u0644\u0648\u064A\u0628","ui.tool.codesearch":"\u0628\u062D\u062B \u0627\u0644\u0643\u0648\u062F","ui.tool.shell":"Shell","ui.tool.patch":"\u062A\u0635\u062D\u064A\u062D","ui.tool.todos":"\u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.todos.read":"\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.questions":"\u0623\u0633\u0626\u0644\u0629","ui.tool.agent":"\u0648\u0643\u064A\u0644 {{type}}","ui.tool.agent.default":"\u0648\u0643\u064A\u0644","ui.common.file.one":"\u0645\u0644\u0641","ui.common.file.other":"\u0645\u0644\u0641\u0627\u062A","ui.common.question.one":"\u0633\u0624\u0627\u0644","ui.common.question.other":"\u0623\u0633\u0626\u0644\u0629","ui.common.add":"\u0625\u0636\u0627\u0641\u0629","ui.common.back":"\u0631\u062C\u0648\u0639","ui.common.cancel":"\u0625\u0644\u063A\u0627\u0621","ui.common.confirm":"\u062A\u0623\u0643\u064A\u062F","ui.common.dismiss":"\u0631\u0641\u0636","ui.common.close":"\u0625\u063A\u0644\u0627\u0642","ui.common.next":"\u0627\u0644\u062A\u0627\u0644\u064A","ui.common.submit":"\u0625\u0631\u0633\u0627\u0644","ui.permission.deny":"\u0631\u0641\u0636","ui.permission.allowAlways":"\u0627\u0644\u0633\u0645\u0627\u062D \u062F\u0627\u0626\u0645\u064B\u0627","ui.permission.allowOnce":"\u0627\u0644\u0633\u0645\u0627\u062D \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629","ui.message.expand":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.collapse":"\u0637\u064A \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.copy":"\u0646\u0633\u062E","ui.message.copyMessage":"\u0646\u0633\u062E \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.forkMessage":"\u062A\u0634\u0639\u0628 \u0625\u0644\u0649 \u062C\u0644\u0633\u0629 \u062C\u062F\u064A\u062F\u0629","ui.message.revertMessage":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0639\u064A\u064A\u0646 \u0625\u0644\u0649 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629","ui.message.copyResponse":"\u0646\u0633\u062E \u0627\u0644\u0631\u062F","ui.message.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E!","ui.message.interrupted":"\u062A\u0645\u062A \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629","ui.message.queued":"\u0641\u064A \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631","ui.message.attachment.alt":"\u0645\u0631\u0641\u0642","ui.patch.action.deleted":"\u0645\u062D\u0630\u0648\u0641","ui.patch.action.created":"\u062A\u0645 \u0627\u0644\u0625\u0646\u0634\u0627\u0621","ui.patch.action.moved":"\u0645\u0646\u0642\u0648\u0644","ui.patch.action.patched":"\u0645\u0635\u062D\u062D","ui.question.subtitle.answered":"{{count}} \u0623\u062C\u064A\u0628","ui.question.answer.none":"(\u0644\u0627 \u062A\u0648\u062C\u062F \u0625\u062C\u0627\u0628\u0629)","ui.question.review.notAnswered":"(\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0631\u062F)","ui.question.multiHint":"\u062D\u062F\u062F \u0643\u0644 \u0645\u0627 \u064A\u0646\u0637\u0628\u0642","ui.question.singleHint":"\u062D\u062F\u062F \u0625\u062C\u0627\u0628\u0629 \u0648\u0627\u062D\u062F\u0629","ui.question.custom.placeholder":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643...","ui.fileSearch.placeholder":"\u0628\u062D\u062B","ui.fileSearch.previousMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629","ui.fileSearch.nextMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.fileSearch.close":"\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0628\u062D\u062B","ui.tool.task":"\u0645\u0647\u0645\u0629","ui.tool.skill":"\u0645\u0647\u0627\u0631\u0629","ui.basicTool.called":"\u062A\u0645 \u0627\u0633\u062A\u062F\u0639\u0627\u0621 `{{tool}}`","ui.toolErrorCard.failed":"\u0641\u0634\u0644","ui.toolErrorCard.copyError":"\u0646\u0633\u062E \u0627\u0644\u062E\u0637\u0623","ui.message.duration.seconds":"{{count}}\u062B","ui.message.duration.minutesSeconds":"{{minutes}}\u062F {{seconds}}\u062B"};export{e as dict};
|
|
2
|
+
import"./chunk-e0vrxetq.js";var e={"ui.sessionReview.title":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0627\u0644\u062C\u0644\u0633\u0629","ui.sessionReview.title.lastTurn":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0622\u062E\u0631 \u062F\u0648\u0631","ui.sessionReview.diffStyle.unified":"\u0645\u0648\u062D\u062F","ui.sessionReview.diffStyle.split":"\u0645\u0646\u0642\u0633\u0645","ui.sessionReview.openFile":"\u0641\u062A\u062D \u0645\u0644\u0641","ui.sessionReview.selection.line":"\u0633\u0637\u0631 {{line}}","ui.sessionReview.selection.lines":"\u0627\u0644\u0623\u0633\u0637\u0631 {{start}}-{{end}}","ui.sessionReview.expandAll":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0643\u0644","ui.sessionReview.collapseAll":"\u0637\u064A \u0627\u0644\u0643\u0644","ui.sessionReview.change.added":"\u0645\u0636\u0627\u0641","ui.sessionReview.change.removed":"\u0645\u062D\u0630\u0648\u0641","ui.sessionReview.change.modified":"\u0645\u0639\u062F\u0644","ui.sessionReview.image.loading":"\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...","ui.sessionReview.image.placeholder":"\u0635\u0648\u0631\u0629","ui.sessionReview.largeDiff.title":"Diff \u0643\u0628\u064A\u0631 \u062C\u062F\u0627 \u0644\u0639\u0631\u0636\u0647","ui.sessionReview.largeDiff.meta":"\u0627\u0644\u062D\u062F: {{limit}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627. \u0627\u0644\u062D\u0627\u0644\u064A: {{current}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627.","ui.sessionReview.largeDiff.renderAnyway":"\u0627\u0639\u0631\u0636 \u0639\u0644\u0649 \u0623\u064A \u062D\u0627\u0644","ui.fileMedia.kind.image":"\u0635\u0648\u0631\u0629","ui.fileMedia.kind.audio":"\u0635\u0648\u062A","ui.fileMedia.state.removed":"\u062A\u0645\u062A \u0625\u0632\u0627\u0644\u0629 {{kind}}","ui.fileMedia.state.loading":"\u062C\u0627\u0631\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}...","ui.fileMedia.state.error":"\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631","ui.fileMedia.binary.title":"\u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A","ui.fileMedia.binary.description.path":"{{path}} \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.fileMedia.binary.description.default":"\u0647\u0630\u0627 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.lineComment.label.prefix":"\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u0623\u0636\u0641 \u062A\u0639\u0644\u064A\u0642\u064B\u0627","ui.lineComment.submit":"\u062A\u0639\u0644\u064A\u0642","ui.sessionTurn.steps.show":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.steps.hide":"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.summary.response":"\u0627\u0633\u062A\u062C\u0627\u0628\u0629","ui.sessionTurn.diff.showMore":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A ({{count}})","ui.sessionTurn.retry.retrying":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","ui.sessionTurn.retry.inSeconds":"\u062E\u0644\u0627\u0644 {{seconds}} \u062B\u0648\u0627\u0646\u064A","ui.sessionTurn.retry.attempt":"\u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u0645\u0632\u062F\u062D\u0645 \u062D\u0627\u0644\u064A\u0627","ui.sessionTurn.error.freeUsageExceeded":"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u062D\u062F \u0627\u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u062C\u0627\u0646\u064A","ui.sessionTurn.error.addQredits":"\u0625\u0636\u0627\u0641\u0629 \u0631\u0635\u064A\u062F","ui.sessionTurn.status.delegating":"\u062A\u0641\u0648\u064A\u0636 \u0627\u0644\u0639\u0645\u0644","ui.sessionTurn.status.planning":"\u062A\u062E\u0637\u064A\u0637 \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.sessionTurn.status.gatheringContext":"\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.gatheredContext":"\u062A\u0645 \u0627\u0644\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.searchingCodebase":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0642\u0627\u0639\u062F\u0629 \u0627\u0644\u062A\u0639\u0644\u064A\u0645\u0627\u062A \u0627\u0644\u0628\u0631\u0645\u062C\u064A\u0629","ui.sessionTurn.status.searchingWeb":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0627\u0644\u0648\u064A\u0628","ui.sessionTurn.status.makingEdits":"\u0625\u062C\u0631\u0627\u0621 \u062A\u0639\u062F\u064A\u0644\u0627\u062A","ui.sessionTurn.status.runningCommands":"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0623\u0648\u0627\u0645\u0631","ui.sessionTurn.status.thinking":"\u062A\u0641\u0643\u064A\u0631","ui.sessionTurn.status.thinkingWithTopic":"\u062A\u0641\u0643\u064A\u0631 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u062C\u0645\u0639 \u0627\u0644\u0623\u0641\u0643\u0627\u0631","ui.sessionTurn.status.consideringNextSteps":"\u0627\u0644\u0646\u0638\u0631 \u0641\u064A \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.messagePart.questions.dismissed":"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0623\u0633\u0626\u0644\u0629","ui.messagePart.compaction":"\u062A\u0645 \u0636\u063A\u0637 \u0627\u0644\u062C\u0644\u0633\u0629","ui.messagePart.context.read.one":"{{count}} \u0642\u0631\u0627\u0621\u0629","ui.messagePart.context.read.other":"{{count}} \u0642\u0631\u0627\u0621\u0627\u062A","ui.messagePart.context.search.one":"{{count}} \u0628\u062D\u062B","ui.messagePart.context.search.other":"{{count}} \u0639\u0645\u0644\u064A\u0627\u062A \u0628\u062D\u062B","ui.messagePart.context.list.one":"{{count}} \u0642\u0627\u0626\u0645\u0629","ui.messagePart.context.list.other":"{{count}} \u0642\u0648\u0627\u0626\u0645","ui.messagePart.diagnostic.error":"\u062E\u0637\u0623","ui.messagePart.title.edit":"\u062A\u062D\u0631\u064A\u0631","ui.messagePart.title.write":"\u0643\u062A\u0627\u0628\u0629","ui.messagePart.option.typeOwnAnswer":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0627\u0644\u062E\u0627\u0635\u0629","ui.messagePart.review.title":"\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u062C\u0627\u0628\u0627\u062A\u0643","ui.list.loading":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.list.empty":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C","ui.list.clearFilter":"\u0645\u0633\u062D \u0639\u0627\u0645\u0644 \u0627\u0644\u062A\u0635\u0641\u064A\u0629","ui.list.emptyWithFilter.prefix":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644\u0640","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u0631\u0633\u0627\u0644\u0629 \u062C\u062F\u064A\u062F\u0629","ui.textField.copyToClipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","ui.textField.copyLink":"\u0646\u0633\u062E \u0627\u0644\u0631\u0627\u0628\u0637","ui.textField.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E","ui.imagePreview.alt":"\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0635\u0648\u0631\u0629","ui.scrollView.ariaLabel":"\u0645\u062D\u062A\u0648\u0649 \u0642\u0627\u0628\u0644 \u0644\u0644\u062A\u0645\u0631\u064A\u0631","ui.tool.read":"\u0642\u0631\u0627\u0621\u0629","ui.tool.loaded":"\u062A\u0645 \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.tool.list":"\u0642\u0627\u0626\u0645\u0629","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"\u062C\u0644\u0628 \u0627\u0644\u0648\u064A\u0628","ui.tool.websearch":"\u0628\u062D\u062B \u0627\u0644\u0648\u064A\u0628","ui.tool.codesearch":"\u0628\u062D\u062B \u0627\u0644\u0643\u0648\u062F","ui.tool.shell":"Shell","ui.tool.patch":"\u062A\u0635\u062D\u064A\u062D","ui.tool.todos":"\u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.todos.read":"\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.questions":"\u0623\u0633\u0626\u0644\u0629","ui.tool.agent":"\u0648\u0643\u064A\u0644 {{type}}","ui.tool.agent.default":"\u0648\u0643\u064A\u0644","ui.common.file.one":"\u0645\u0644\u0641","ui.common.file.other":"\u0645\u0644\u0641\u0627\u062A","ui.common.question.one":"\u0633\u0624\u0627\u0644","ui.common.question.other":"\u0623\u0633\u0626\u0644\u0629","ui.common.add":"\u0625\u0636\u0627\u0641\u0629","ui.common.back":"\u0631\u062C\u0648\u0639","ui.common.cancel":"\u0625\u0644\u063A\u0627\u0621","ui.common.confirm":"\u062A\u0623\u0643\u064A\u062F","ui.common.dismiss":"\u0631\u0641\u0636","ui.common.close":"\u0625\u063A\u0644\u0627\u0642","ui.common.next":"\u0627\u0644\u062A\u0627\u0644\u064A","ui.common.submit":"\u0625\u0631\u0633\u0627\u0644","ui.permission.deny":"\u0631\u0641\u0636","ui.permission.allowAlways":"\u0627\u0644\u0633\u0645\u0627\u062D \u062F\u0627\u0626\u0645\u064B\u0627","ui.permission.allowOnce":"\u0627\u0644\u0633\u0645\u0627\u062D \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629","ui.message.expand":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.collapse":"\u0637\u064A \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.copy":"\u0646\u0633\u062E","ui.message.copyMessage":"\u0646\u0633\u062E \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.forkMessage":"\u062A\u0634\u0639\u0628 \u0625\u0644\u0649 \u062C\u0644\u0633\u0629 \u062C\u062F\u064A\u062F\u0629","ui.message.revertMessage":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0639\u064A\u064A\u0646 \u0625\u0644\u0649 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629","ui.message.copyResponse":"\u0646\u0633\u062E \u0627\u0644\u0631\u062F","ui.message.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E!","ui.message.interrupted":"\u062A\u0645\u062A \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629","ui.message.queued":"\u0641\u064A \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631","ui.message.attachment.alt":"\u0645\u0631\u0641\u0642","ui.patch.action.deleted":"\u0645\u062D\u0630\u0648\u0641","ui.patch.action.created":"\u062A\u0645 \u0627\u0644\u0625\u0646\u0634\u0627\u0621","ui.patch.action.moved":"\u0645\u0646\u0642\u0648\u0644","ui.patch.action.patched":"\u0645\u0635\u062D\u062D","ui.question.subtitle.answered":"{{count}} \u0623\u062C\u064A\u0628","ui.question.answer.none":"(\u0644\u0627 \u062A\u0648\u062C\u062F \u0625\u062C\u0627\u0628\u0629)","ui.question.review.notAnswered":"(\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0631\u062F)","ui.question.multiHint":"\u062D\u062F\u062F \u0643\u0644 \u0645\u0627 \u064A\u0646\u0637\u0628\u0642","ui.question.singleHint":"\u062D\u062F\u062F \u0625\u062C\u0627\u0628\u0629 \u0648\u0627\u062D\u062F\u0629","ui.question.custom.placeholder":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643...","ui.fileSearch.placeholder":"\u0628\u062D\u062B","ui.fileSearch.previousMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629","ui.fileSearch.nextMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.fileSearch.close":"\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0628\u062D\u062B","ui.tool.task":"\u0645\u0647\u0645\u0629","ui.tool.skill":"\u0645\u0647\u0627\u0631\u0629","ui.basicTool.called":"\u062A\u0645 \u0627\u0633\u062A\u062F\u0639\u0627\u0621 `{{tool}}`","ui.toolErrorCard.failed":"\u0641\u0634\u0644","ui.toolErrorCard.copyError":"\u0646\u0633\u062E \u0627\u0644\u062E\u0637\u0623","ui.message.duration.seconds":"{{count}}\u062B","ui.message.duration.minutesSeconds":"{{minutes}}\u062F {{seconds}}\u062B"};export{e as dict};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{H as
|
|
2
|
+
import{fq as C}from"./chunk-p2fte9vz.js";import{spawn as E}from"child_process";async function H(z){if(process.platform==="linux"){if(await new Promise((D)=>{let A=!1,x=(j)=>{if(A)return;A=!0,D(j)};try{let j=E("xdg-open",[z],{stdio:"ignore",detached:!0});j.once("error",()=>x(!1)),j.once("spawn",()=>{j.unref(),x(!0)})}catch{x(!1)}}))return!0}try{let q=await C(z);if(!q)return!1;return q.once("error",()=>{}),!0}catch{return!1}}
|
|
3
|
+
export{H as Dh};
|