claude-code-best 1.1.0 → 1.2.1
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/README.md +66 -75
- package/dist/chunk-03hxwxzh.js +344 -0
- package/dist/chunk-07069jq1.js +30 -0
- package/dist/{chunk-kq098bkj.js → chunk-08g51x43.js} +254 -320
- package/dist/{chunk-7tqhx6dr.js → chunk-093r60b7.js} +109 -213
- package/dist/{chunk-ahjgghpe.js → chunk-0aya4737.js} +1 -1
- package/dist/{chunk-b4mnbry0.js → chunk-0fsdxz74.js} +4 -4
- package/dist/chunk-0jzdwbdc.js +14 -0
- package/dist/chunk-0mbxeb5q.js +406 -0
- package/dist/chunk-0pryepme.js +66 -0
- package/dist/chunk-0qsm7jac.js +169 -0
- package/dist/{chunk-1cbn5kxf.js → chunk-0rpb2bdp.js} +3 -2
- package/dist/chunk-0se7sxd4.js +38 -0
- package/dist/{chunk-3m7ge6tj.js → chunk-0xnepnph.js} +14 -12
- package/dist/{chunk-q7tvkc86.js → chunk-0zsam7pn.js} +10 -115
- package/dist/{chunk-44fpr6jq.js → chunk-168xb8v1.js} +4 -2
- package/dist/{chunk-bj0rvnjw.js → chunk-19h3a9pw.js} +40 -30
- package/dist/chunk-19wjkpe7.js +115 -0
- package/dist/{chunk-wsqhnjj3.js → chunk-1atfzck5.js} +24 -24
- package/dist/{chunk-0e1xsncc.js → chunk-1cwdhk7a.js} +1 -1
- package/dist/{chunk-c8jv6rtj.js → chunk-1hq59w8z.js} +78 -69
- package/dist/chunk-1qzk963z.js +108 -0
- package/dist/{chunk-fk06pejm.js → chunk-1rrmvwjn.js} +9 -9
- package/dist/{chunk-d18z9pna.js → chunk-1thgdca1.js} +2 -2
- package/dist/chunk-1tjnmcw7.js +68 -0
- package/dist/chunk-1xj83yc8.js +219 -0
- package/dist/chunk-21j2jfen.js +435 -0
- package/dist/{chunk-wc6wwwyb.js → chunk-21z7acxh.js} +3 -3
- package/dist/chunk-22gbbc5x.js +313 -0
- package/dist/chunk-238g70xa.js +1 -1
- package/dist/{chunk-vpb723tx.js → chunk-23ad5t92.js} +5 -5
- package/dist/{chunk-vbbf707n.js → chunk-24r3gfks.js} +39 -29
- package/dist/chunk-24sahbec.js +71 -0
- package/dist/chunk-28az45r7.js +112 -0
- package/dist/{chunk-9g827w4j.js → chunk-2q39ej51.js} +6 -6
- package/dist/chunk-2qwgfjcj.js +5370 -0
- package/dist/{chunk-0cpnzx7t.js → chunk-2rgvd09y.js} +118 -151
- package/dist/chunk-2wq8q15s.js +475 -0
- package/dist/{chunk-bqq4zamw.js → chunk-2ys5wcxk.js} +3 -3
- package/dist/{chunk-t24ytdcw.js → chunk-31nce7eh.js} +12 -10
- package/dist/chunk-31q6p2ke.js +123 -0
- package/dist/chunk-3394wc12.js +1024 -0
- package/dist/{chunk-33khw5gy.js → chunk-365zvqv3.js} +7 -7
- package/dist/{chunk-9g2ncq68.js → chunk-36gkb95k.js} +124 -128
- package/dist/{chunk-khdjg2v9.js → chunk-37y42ayh.js} +39 -29
- package/dist/chunk-3816xd5p.js +195 -0
- package/dist/chunk-3a6bynts.js +656 -0
- package/dist/{chunk-qvd0k5dn.js → chunk-3avfhw6x.js} +190 -348
- package/dist/{chunk-660kcy7p.js → chunk-3b25ycrx.js} +14 -8
- package/dist/chunk-3b4xhwhp.js +113 -0
- package/dist/chunk-3fjzvf0e.js +128 -0
- package/dist/chunk-3fvc0a79.js +67 -0
- package/dist/chunk-3g50kcwk.js +513 -0
- package/dist/chunk-3jnmy0nd.js +114 -0
- package/dist/chunk-3jzsxj3v.js +310 -0
- package/dist/{chunk-frbv3xqa.js → chunk-3mpfxbab.js} +2 -2
- package/dist/{chunk-aqa7w38f.js → chunk-3v03e2kz.js} +5 -5
- package/dist/chunk-3x5hdd5g.js +1030 -0
- package/dist/{chunk-mecs0gpc.js → chunk-3xv7rjsy.js} +14 -11
- package/dist/{chunk-j3215c49.js → chunk-3ygnhge8.js} +232 -372
- package/dist/chunk-42x5tjk2.js +42 -0
- package/dist/chunk-430tvx8d.js +110 -0
- package/dist/{chunk-dh6c8y1j.js → chunk-43h8sw5x.js} +3 -3
- package/dist/chunk-44d150tz.js +1175 -0
- package/dist/chunk-45dj834r.js +115 -0
- package/dist/{chunk-yhd82045.js → chunk-46fcr28b.js} +30 -9
- package/dist/{chunk-wm2f2f1z.js → chunk-474y75ga.js} +2 -2
- package/dist/{chunk-6fkwz9yk.js → chunk-478rpnqm.js} +8 -8
- package/dist/{chunk-83z0wrnz.js → chunk-47j9e6m2.js} +2 -2
- package/dist/chunk-47wqjw88.js +112 -0
- package/dist/{chunk-v4t6dyyh.js → chunk-4cp6193g.js} +2 -2
- package/dist/chunk-4h102wt5.js +65 -0
- package/dist/{chunk-3mgywd32.js → chunk-4hv90qcz.js} +1 -1
- package/dist/chunk-4k2270je.js +295 -0
- package/dist/{chunk-2wcbcdky.js → chunk-4k842par.js} +5 -5
- package/dist/chunk-4nspekjp.js +69 -0
- package/dist/chunk-4pjqtps4.js +151 -0
- package/dist/chunk-4sehjy27.js +112 -0
- package/dist/{chunk-pgnnrm2v.js → chunk-4t86n23n.js} +21 -17
- package/dist/{chunk-2de1vaxf.js → chunk-4whfjn78.js} +68 -78
- package/dist/{chunk-41mpwc8h.js → chunk-53c9gb9c.js} +19 -15
- package/dist/chunk-53kt8caz.js +122 -0
- package/dist/chunk-5a6ahhvy.js +594 -0
- package/dist/{chunk-12pv5fez.js → chunk-5gbqknz6.js} +10 -8
- package/dist/{chunk-hfzj1m07.js → chunk-5kkvfgzs.js} +14 -5
- package/dist/{chunk-4ycz58wj.js → chunk-5pxygepg.js} +68 -8
- package/dist/{chunk-2w8633e3.js → chunk-5rgbq3kf.js} +61 -100
- package/dist/{chunk-ggqx30m9.js → chunk-5z28bqne.js} +23 -311
- package/dist/{chunk-7ejt5gqq.js → chunk-5z8w2q5k.js} +65 -48
- package/dist/chunk-60k6v40t.js +70 -0
- package/dist/{chunk-p7g7pf3f.js → chunk-61ahbn23.js} +8 -6
- package/dist/{chunk-rmbp2das.js → chunk-64pp4hsr.js} +21 -19
- package/dist/{chunk-0sb5scxx.js → chunk-652wnf1z.js} +5 -5
- package/dist/{chunk-q25bjaev.js → chunk-677as3nh.js} +2 -2
- package/dist/{chunk-xs0hwvpa.js → chunk-68pfxvxt.js} +14 -9
- package/dist/{chunk-epmheefa.js → chunk-69hys77v.js} +8 -8
- package/dist/{chunk-427m88ms.js → chunk-6p1cptq5.js} +9 -9
- package/dist/{chunk-0nqrscrr.js → chunk-6p3mtny2.js} +5 -5
- package/dist/{chunk-v1mgv1et.js → chunk-6p4cyhb3.js} +4 -3
- package/dist/{chunk-m17y8b22.js → chunk-6rxz872v.js} +39 -29
- package/dist/chunk-6sjxvthw.js +106 -0
- package/dist/{chunk-6mz58s8p.js → chunk-6xana182.js} +18 -14
- package/dist/{chunk-vaebptnz.js → chunk-6zn3fm1k.js} +39 -29
- package/dist/chunk-704jkbsp.js +183 -0
- package/dist/chunk-71sf47by.js +154 -0
- package/dist/chunk-73a5g713.js +78 -0
- package/dist/chunk-78p7h20f.js +259 -0
- package/dist/chunk-7a3b1d4s.js +75 -0
- package/dist/{chunk-fpf4cgbt.js → chunk-7bfach0x.js} +9 -9
- package/dist/{chunk-ckcagq32.js → chunk-7gqf9wej.js} +5 -5
- package/dist/{chunk-sa7nc0vv.js → chunk-7y25wk51.js} +1 -1
- package/dist/{chunk-vyd8jzde.js → chunk-81v55vtd.js} +96 -85
- package/dist/{chunk-dv1wfr85.js → chunk-8225arm6.js} +5 -4
- package/dist/chunk-86715d2d.js +186 -0
- package/dist/chunk-8ah9easf.js +365 -0
- package/dist/{chunk-rwexx5ns.js → chunk-8baq1s87.js} +1 -3
- package/dist/chunk-8fy8hx84.js +386 -0
- package/dist/{chunk-4pbx3g7s.js → chunk-8g747a8x.js} +1 -1
- package/dist/{chunk-xyqr1cww.js → chunk-8me0yq6v.js} +12 -12
- package/dist/{chunk-sdj9b9wh.js → chunk-8pn8tvgg.js} +9 -154
- package/dist/chunk-8qxyxgkb.js +161 -0
- package/dist/{chunk-ecsw41df.js → chunk-8xs4yp9x.js} +85 -77
- package/dist/{chunk-24x87knx.js → chunk-9000dg9h.js} +1327 -2882
- package/dist/{chunk-bmvb57qb.js → chunk-905d2hee.js} +5 -5
- package/dist/chunk-90qsc60s.js +378 -0
- package/dist/chunk-92x6xgex.js +265 -0
- package/dist/{chunk-jknt3rxg.js → chunk-9ctg4x6c.js} +7 -9
- package/dist/chunk-9e4z7dx7.js +389 -0
- package/dist/chunk-9hy6ejmp.js +151 -0
- package/dist/chunk-9jvggd30.js +173 -0
- package/dist/{chunk-z9tgzh90.js → chunk-9m729tsn.js} +46 -35
- package/dist/chunk-9r90d3jt.js +121 -0
- package/dist/chunk-9rx2m3cb.js +124 -0
- package/dist/chunk-9sr2etaw.js +110 -0
- package/dist/chunk-9z8hzgve.js +68 -0
- package/dist/{chunk-yxnwsp4f.js → chunk-9zy607vw.js} +8 -6
- package/dist/chunk-a0bz6g5e.js +63 -0
- package/dist/chunk-a136cvvz.js +27 -0
- package/dist/{chunk-n5t9m8h9.js → chunk-a1bjde7d.js} +7 -7
- package/dist/{chunk-mvss16tj.js → chunk-a2aj2mtb.js} +414 -636
- package/dist/{chunk-8hsyagr8.js → chunk-a3sfy6as.js} +1 -1
- package/dist/{chunk-8hq5kk3y.js → chunk-a4twdmhf.js} +3 -2
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-aegyxcne.js +111 -0
- package/dist/chunk-aj1dcvrh.js +131 -0
- package/dist/{chunk-1yabrspp.js → chunk-amxm6996.js} +2 -2
- package/dist/{chunk-t6h4wf3k.js → chunk-ar39mr9c.js} +11 -11
- package/dist/{chunk-r6b58y3x.js → chunk-ase86y73.js} +1 -3
- package/dist/chunk-asfxrz4f.js +94 -0
- package/dist/chunk-axj46c2c.js +196 -0
- package/dist/{chunk-m5eb5pt2.js → chunk-ayz6f38j.js} +6 -6
- package/dist/{chunk-5b7119h5.js → chunk-b00zd850.js} +8 -6
- package/dist/chunk-b2abjkf7.js +126 -0
- package/dist/{chunk-8bedvdm1.js → chunk-b81hd3m6.js} +1 -1
- package/dist/chunk-bcfd2zw7.js +20 -0
- package/dist/{chunk-n5516f5q.js → chunk-bd8zk9tn.js} +4 -4
- package/dist/chunk-bhdt6k7w.js +15 -0
- package/dist/{chunk-jy35mvy3.js → chunk-bmjmrk76.js} +7 -7
- package/dist/chunk-bqaqz1j1.js +126 -0
- package/dist/chunk-bsbmmfyt.js +17 -0
- package/dist/{chunk-snvypj85.js → chunk-bt64sq5y.js} +3 -2
- package/dist/{chunk-zq9xa1xe.js → chunk-bwevztsj.js} +109 -141
- package/dist/{chunk-vyc0rjyx.js → chunk-bwg7582d.js} +1 -1
- package/dist/{chunk-3be7ka25.js → chunk-bxcfz5gy.js} +1 -1
- package/dist/chunk-c2mn2fyg.js +1406 -0
- package/dist/chunk-c2tw0dep.js +1811 -0
- package/dist/{chunk-402jrnj6.js → chunk-c5bngssh.js} +8 -8
- package/dist/chunk-c6sjhj89.js +1284 -0
- package/dist/chunk-cb2hpe6k.js +443 -0
- package/dist/{chunk-91r0z5qq.js → chunk-ccr1s7qs.js} +1152 -1771
- package/dist/chunk-cewqh6rb.js +111 -0
- package/dist/{chunk-k9a8jemz.js → chunk-cg01f3ez.js} +7 -7
- package/dist/{chunk-f64npa3b.js → chunk-chsyvavm.js} +704 -4
- package/dist/{chunk-z8nbjar4.js → chunk-cmcbatgz.js} +7 -5
- package/dist/chunk-cnsj3vq2.js +35 -0
- package/dist/{chunk-rj86xm6z.js → chunk-cpwe0yw7.js} +1 -1
- package/dist/chunk-cqjmxeqv.js +269 -0
- package/dist/{chunk-qpm1tmzz.js → chunk-crefny3c.js} +125 -193
- package/dist/{chunk-ks0m9njy.js → chunk-d2jekryq.js} +8 -8
- package/dist/chunk-d4mdda98.js +94 -0
- package/dist/{chunk-26wtxbdc.js → chunk-d7886r6a.js} +6928 -6928
- package/dist/chunk-dfkgpfaj.js +135 -0
- package/dist/{chunk-9mfbqw9k.js → chunk-dm3n2qgd.js} +4 -4
- package/dist/chunk-dnj95atq.js +66 -0
- package/dist/{chunk-vjc1svpc.js → chunk-dqgzpb0q.js} +87 -77
- package/dist/chunk-drenq3c7.js +383 -0
- package/dist/chunk-drkm8yx2.js +34 -0
- package/dist/{chunk-ra8fbt9p.js → chunk-dvjzq9x9.js} +543 -874
- package/dist/{chunk-w7h2yphx.js → chunk-dwekpr47.js} +2 -2
- package/dist/{chunk-49k5ktrj.js → chunk-e18dg1md.js} +31 -16
- package/dist/chunk-e396ak46.js +111 -0
- package/dist/{chunk-r55r29js.js → chunk-e3c32vwa.js} +191 -276
- package/dist/chunk-e3m7kqkb.js +1185 -0
- package/dist/{chunk-9cc60ae5.js → chunk-ea9m4e0k.js} +79 -70
- package/dist/chunk-ecsa9nd5.js +63 -0
- package/dist/{chunk-cmdsbsb6.js → chunk-edzkkadh.js} +2 -2
- package/dist/chunk-ek1jasqg.js +142 -0
- package/dist/chunk-ep0hwv07.js +126 -0
- package/dist/{chunk-cs6y2pc9.js → chunk-ergam9ft.js} +5 -5
- package/dist/{chunk-ptwn7qw7.js → chunk-f2k8b4nd.js} +38 -10
- package/dist/{chunk-h0rbjg6x.js → chunk-f2mhrmww.js} +8 -1
- package/dist/{chunk-s84smrx4.js → chunk-f32cksgw.js} +155 -190
- package/dist/{chunk-vzqrbsd1.js → chunk-f69rgsm2.js} +5 -5
- package/dist/{chunk-f3bapa1x.js → chunk-f6rbj3gz.js} +12 -7
- package/dist/chunk-f7n3xete.js +113 -0
- package/dist/chunk-fbest4vx.js +109 -0
- package/dist/{chunk-v0wa5ref.js → chunk-fdtcb8qr.js} +13 -555
- package/dist/chunk-feh2j8m2.js +136 -0
- package/dist/chunk-feyzykye.js +10 -0
- package/dist/chunk-fkkysfev.js +158 -0
- package/dist/chunk-fn510gqw.js +216 -0
- package/dist/{chunk-ch53fgm5.js → chunk-ft9qsa01.js} +13 -11
- package/dist/chunk-fw0ckaxh.js +109 -0
- package/dist/{chunk-kd97kxjn.js → chunk-fz0ch109.js} +3 -2
- package/dist/{chunk-ks0dm6t3.js → chunk-fzn524wa.js} +17 -71
- package/dist/chunk-g1k68z1b.js +15 -0
- package/dist/{chunk-9t1x831d.js → chunk-g5nb4xhz.js} +86 -74
- package/dist/chunk-g82mdy27.js +429 -0
- package/dist/{chunk-68qevppc.js → chunk-g8sz060e.js} +82 -72
- package/dist/chunk-g9f19ttm.js +15 -0
- package/dist/{chunk-zz21rvr7.js → chunk-gdqxtdh4.js} +9 -6
- package/dist/chunk-get9fk3h.js +74 -0
- package/dist/{chunk-4x5ym4h2.js → chunk-gf6qjt7j.js} +130 -16
- package/dist/{chunk-bq6x1ehp.js → chunk-gpz0ddyz.js} +8 -8
- package/dist/{chunk-mwp7sj0q.js → chunk-gs5eeqmc.js} +110336 -114801
- package/dist/{chunk-qqfa0dqg.js → chunk-h4b85amj.js} +20 -32
- package/dist/{chunk-j4c8s7tn.js → chunk-h5zv78zq.js} +9 -6
- package/dist/{chunk-cgn27dqf.js → chunk-ha5d5zfj.js} +3 -3
- package/dist/{chunk-crr52hf4.js → chunk-han7cwc0.js} +14 -12
- package/dist/{chunk-dnyeb288.js → chunk-hbv0tk35.js} +74 -106
- package/dist/{chunk-nxsh6de2.js → chunk-hcgkak1j.js} +20 -125
- package/dist/{chunk-224x480q.js → chunk-hd1p4hrd.js} +8 -6
- package/dist/{chunk-tjaqa99q.js → chunk-hezj20qy.js} +3 -3
- package/dist/{chunk-z7pr85qw.js → chunk-hfdyez7b.js} +3 -3
- package/dist/chunk-hh7hqa2c.js +272 -0
- package/dist/chunk-hk4a2sks.js +83 -0
- package/dist/{chunk-5zh1fbrj.js → chunk-hq85v2s7.js} +3 -3
- package/dist/chunk-hr06142m.js +117 -0
- package/dist/chunk-j1b3r6v6.js +66 -0
- package/dist/{chunk-v8xem37v.js → chunk-j2fgn3kq.js} +8 -6
- package/dist/chunk-j2wgj22c.js +441 -0
- package/dist/{chunk-9gbamk79.js → chunk-j5bth84e.js} +5 -1
- package/dist/{chunk-vratq94g.js → chunk-j9gxwbe3.js} +1 -1
- package/dist/{chunk-cettj572.js → chunk-ja87jt56.js} +7 -131
- package/dist/{chunk-3r24h7t6.js → chunk-jaaxk89e.js} +1 -1
- package/dist/{chunk-f4jcw0ea.js → chunk-jaew3662.js} +18 -14
- package/dist/{chunk-e1ge9n4d.js → chunk-jb2nh0m0.js} +2 -2
- package/dist/{chunk-f9b4wb89.js → chunk-jb4fc073.js} +84 -75
- package/dist/chunk-jba8f3hz.js +108 -0
- package/dist/{chunk-er9vzjac.js → chunk-jbt0jgtc.js} +16 -14
- package/dist/{chunk-v399mzxk.js → chunk-jf0p00fz.js} +2 -2
- package/dist/{chunk-vygf94dw.js → chunk-jg4ge4de.js} +78 -69
- package/dist/chunk-jkvy2cmt.js +346 -0
- package/dist/{chunk-80qg1pzv.js → chunk-jmdy5vdy.js} +11 -9
- package/dist/{chunk-dqh7e4mt.js → chunk-jn08nxj8.js} +52 -42
- package/dist/{chunk-av73dywf.js → chunk-jna2tcvj.js} +8 -8
- package/dist/chunk-jwh384j5.js +126 -0
- package/dist/chunk-jwx2scxy.js +222 -0
- package/dist/{chunk-41xeh3t9.js → chunk-jy6c07wa.js} +4 -4
- package/dist/{chunk-ctmt7xh1.js → chunk-jy77nthd.js} +740 -907
- package/dist/{chunk-hzttn8j7.js → chunk-jyjpaqbt.js} +139 -135
- package/dist/chunk-jztjnw31.js +147 -0
- package/dist/chunk-k0jhzcwg.js +2540 -0
- package/dist/{chunk-myzwt5yw.js → chunk-k0kwfqr8.js} +9 -15
- package/dist/{chunk-bqfnp99q.js → chunk-k3s4yk22.js} +1 -1
- package/dist/{chunk-1dyeexvn.js → chunk-kd3mmsd2.js} +4 -4
- package/dist/{chunk-x51h62jq.js → chunk-ke78h68m.js} +78 -69
- package/dist/{chunk-1xkekb9y.js → chunk-kfd89dsd.js} +5 -3
- package/dist/chunk-ksvvwa9w.js +111 -0
- package/dist/{chunk-jy35z4n0.js → chunk-m1z5td19.js} +9 -9
- package/dist/{chunk-jafes477.js → chunk-m2bcpk8j.js} +4 -3
- package/dist/{chunk-n6fbyke9.js → chunk-m2mzpskw.js} +3 -3
- package/dist/{chunk-s2dmn3yg.js → chunk-m47q5mxt.js} +5 -5
- package/dist/{chunk-s7qj2hg5.js → chunk-m8vyp6rw.js} +2 -2
- package/dist/chunk-mm4m13ng.js +881 -0
- package/dist/{chunk-ghr4s9g6.js → chunk-mq1qrwhq.js} +79 -70
- package/dist/{chunk-45e9mkyr.js → chunk-mqqw60br.js} +43 -83
- package/dist/chunk-mtcdknc8.js +2842 -0
- package/dist/{chunk-cvge4pvp.js → chunk-mzd6frw6.js} +2 -2
- package/dist/{chunk-n2874aq5.js → chunk-n1neft0d.js} +13 -7
- package/dist/{chunk-bcrxtdcy.js → chunk-n2mysxn1.js} +40 -30
- package/dist/chunk-n4wkxbq0.js +365 -0
- package/dist/chunk-n57dw6h9.js +128 -0
- package/dist/chunk-n5wf3b82.js +118 -0
- package/dist/{chunk-zgrg0wk3.js → chunk-n7ce94nd.js} +27 -67
- package/dist/{chunk-me2ef6g4.js → chunk-n8mpqdje.js} +1 -1
- package/dist/{chunk-g5sg6y9q.js → chunk-na2e0dfj.js} +82 -72
- package/dist/chunk-netzwgv1.js +154 -0
- package/dist/{chunk-xszk7n10.js → chunk-nh3cd07f.js} +1 -1
- package/dist/{chunk-5tx8dsy0.js → chunk-npjsp3z3.js} +10493 -18453
- package/dist/{chunk-5hva0tsg.js → chunk-p2yv7m0g.js} +6 -6
- package/dist/chunk-p4rmbc1e.js +409 -0
- package/dist/chunk-p7jdncj4.js +122 -0
- package/dist/{chunk-zk2wsm7d.js → chunk-p7vkh4wx.js} +2 -2
- package/dist/{chunk-da4ve9t5.js → chunk-p8crqj70.js} +10 -10
- package/dist/{chunk-hy3g1nv8.js → chunk-prw4xz5q.js} +9 -7
- package/dist/{chunk-zsfxha74.js → chunk-pshjyzq4.js} +8 -7
- package/dist/{chunk-684kdqez.js → chunk-q08sb44h.js} +203 -304
- package/dist/{chunk-n7158r58.js → chunk-q78bgdtk.js} +79 -70
- package/dist/{chunk-e5pntxye.js → chunk-q7tpyeb3.js} +6 -4
- package/dist/{chunk-7ymfj7m3.js → chunk-q82r31er.js} +1 -1
- package/dist/chunk-qajrkk97.js +298 -0
- package/dist/chunk-qbrsmra3.js +23 -0
- package/dist/chunk-qhfn4vgv.js +66 -0
- package/dist/{chunk-d7mx1phm.js → chunk-qndzvkdx.js} +61 -103
- package/dist/{chunk-35y0r56v.js → chunk-qtfc6wdh.js} +1 -4
- package/dist/{chunk-v9y80148.js → chunk-qwcnwn5t.js} +100 -191
- package/dist/chunk-qwehvedn.js +440 -0
- package/dist/{chunk-2cgdr2n7.js → chunk-qwk9fq7r.js} +78 -69
- package/dist/chunk-qy75c2vm.js +70 -0
- package/dist/{chunk-rryx19hp.js → chunk-r2k2jy0y.js} +2 -2
- package/dist/chunk-r47p0ff0.js +61 -0
- package/dist/{chunk-t3bf8hcf.js → chunk-r5tk54yt.js} +2 -2
- package/dist/{chunk-bt9krt49.js → chunk-r8q993g6.js} +38 -32
- package/dist/{chunk-veb0gkcf.js → chunk-ra2rykps.js} +78 -69
- package/dist/{chunk-gbcqdr0x.js → chunk-rav5xp8h.js} +1 -1
- package/dist/chunk-rbe0tcn9.js +120 -0
- package/dist/chunk-rd5cfz3k.js +68 -0
- package/dist/{chunk-cenpqc2t.js → chunk-rdvaan98.js} +8 -6
- package/dist/{chunk-dr4qq42x.js → chunk-rgbbtszq.js} +9 -9
- package/dist/chunk-rjsb9s3q.js +206 -0
- package/dist/{chunk-fdwa7gem.js → chunk-rkak3kjw.js} +7 -7
- package/dist/{chunk-a6s8wnhe.js → chunk-rnam0xc5.js} +4 -4
- package/dist/chunk-rqkqbppr.js +112 -0
- package/dist/{chunk-ye18m1zb.js → chunk-rqvqqrpg.js} +38 -8
- package/dist/{chunk-rw466wqn.js → chunk-rvkvehat.js} +5284 -3093
- package/dist/chunk-s1baskk7.js +14 -0
- package/dist/{chunk-jt0pha6y.js → chunk-s5gnvx67.js} +227 -198
- package/dist/chunk-s7dtt7tw.js +109 -0
- package/dist/chunk-s9ftt1fh.js +135 -0
- package/dist/chunk-sc6sy490.js +240 -0
- package/dist/chunk-sh9er84d.js +1073 -0
- package/dist/{chunk-faycqscv.js → chunk-sk9xag9g.js} +2 -2
- package/dist/{chunk-zpc0kwkb.js → chunk-t0g8wbcq.js} +7 -7
- package/dist/chunk-tbgm1v8n.js +146 -0
- package/dist/{chunk-35b0ek0j.js → chunk-tcdv4gp8.js} +13 -9
- package/dist/{chunk-mt25echc.js → chunk-tezak8rx.js} +1 -1
- package/dist/chunk-thk6yn51.js +154 -0
- package/dist/{chunk-s2gm9vfk.js → chunk-tkf24yhv.js} +7 -7
- package/dist/{chunk-6td4c2eq.js → chunk-tkrjcekq.js} +54 -72
- package/dist/{chunk-9rcbyag3.js → chunk-tmdbrszg.js} +2 -2
- package/dist/chunk-tw2g1yhq.js +118 -0
- package/dist/chunk-twzjxwhf.js +182 -0
- package/dist/{chunk-m94pnhfa.js → chunk-v4e4f711.js} +39 -29
- package/dist/{chunk-b51jjfh5.js → chunk-v5k7zmqm.js} +43 -32
- package/dist/chunk-var1et7e.js +66 -0
- package/dist/chunk-vd11xbz3.js +304 -0
- package/dist/{chunk-hqmz36b3.js → chunk-vf612n57.js} +21 -101
- package/dist/chunk-vfhqj46w.js +144 -0
- package/dist/chunk-vkxx8ymr.js +2377 -0
- package/dist/{chunk-n9x557ea.js → chunk-vs094cby.js} +2332 -4220
- package/dist/{chunk-dxc7begm.js → chunk-vtb8z6as.js} +14 -10
- package/dist/{chunk-x51mdzqq.js → chunk-vzd3cjy9.js} +3 -3
- package/dist/chunk-w2es9743.js +439 -0
- package/dist/{chunk-8z039kef.js → chunk-w92b262y.js} +53 -54
- package/dist/chunk-wa1dpga1.js +236 -0
- package/dist/{chunk-qf2v384j.js → chunk-wbmacbfb.js} +9 -7
- package/dist/{chunk-ryj80g9p.js → chunk-wbn46nb4.js} +136 -178
- package/dist/{chunk-t9z6njcr.js → chunk-wtycm8km.js} +9 -9
- package/dist/{chunk-q6rax9kh.js → chunk-wymtgh88.js} +5 -5
- package/dist/{chunk-pa7saazk.js → chunk-x0aj8rh8.js} +28 -56
- package/dist/{chunk-1szr63w0.js → chunk-x69w7xr7.js} +86 -74
- package/dist/{chunk-k5gdea6r.js → chunk-x6qmm22r.js} +84 -75
- package/dist/{chunk-zrse3zpz.js → chunk-xbprynsc.js} +18 -46
- package/dist/chunk-xc0v11v6.js +914 -0
- package/dist/chunk-xed18bb5.js +233 -0
- package/dist/{chunk-gjyc3293.js → chunk-xj76qk4z.js} +288 -499
- package/dist/chunk-xmd9eezd.js +83 -0
- package/dist/chunk-xrzrbw0f.js +142 -0
- package/dist/{chunk-fzxg8v1y.js → chunk-xycy3c8q.js} +15 -12
- package/dist/chunk-y0m0rd5v.js +140 -0
- package/dist/chunk-y2vtmzre.js +137 -0
- package/dist/{chunk-vybkxr18.js → chunk-y5z1cjbk.js} +42 -32
- package/dist/chunk-y60q54ph.js +111 -0
- package/dist/{chunk-d7vv2ydf.js → chunk-y78t50v0.js} +2 -2
- package/dist/{chunk-xkr7as9h.js → chunk-y9bgt2k1.js} +13 -9
- package/dist/chunk-ycwdzwz5.js +233 -0
- package/dist/chunk-yfyc2y1v.js +136 -0
- package/dist/chunk-yg6gtf9j.js +152 -0
- package/dist/{chunk-kyer92r4.js → chunk-yk8vcecd.js} +33 -5
- package/dist/{chunk-hkn7tzgv.js → chunk-ym5r3jnk.js} +1 -1
- package/dist/chunk-yr6gqw17.js +132 -0
- package/dist/chunk-yw62vhjz.js +445 -0
- package/dist/{chunk-athjeyrt.js → chunk-yw79dz62.js} +4 -4
- package/dist/{chunk-5mrhhmas.js → chunk-yx64nmbh.js} +8 -5
- package/dist/chunk-yy232vtj.js +84 -0
- package/dist/chunk-z1bs6d7k.js +24 -0
- package/dist/chunk-z4mgvsdj.js +456 -0
- package/dist/chunk-z6e5jp2w.js +119 -0
- package/dist/{chunk-t7cbhqd2.js → chunk-z6zt2ns7.js} +111 -123
- package/dist/chunk-z735r3p2.js +114 -0
- package/dist/{chunk-rjz6btwk.js → chunk-z7ssqvt6.js} +4972 -4638
- package/dist/{chunk-bpts9jbq.js → chunk-z8nv1ah0.js} +39 -31
- package/dist/chunk-z9mbssbe.js +128 -0
- package/dist/chunk-zdctabq6.js +264 -0
- package/dist/{chunk-ve60fbtd.js → chunk-ze6zvkg6.js} +2 -2
- package/dist/{chunk-t0rgmccj.js → chunk-zejm280k.js} +1 -1
- package/dist/{chunk-krstc7m7.js → chunk-zfapazzd.js} +15 -11
- package/dist/{chunk-2j0j79p0.js → chunk-zg4ae27v.js} +8 -8
- package/dist/chunk-zqxe8qnw.js +3590 -0
- package/dist/{chunk-q6dpqj3z.js → chunk-zs2ddzfv.js} +10 -7
- package/dist/chunk-zy80g72r.js +512 -0
- package/dist/{chunk-g3t0act8.js → chunk-zzm33q8x.js} +1 -1
- package/dist/{chunk-s8fzxy94.js → chunk-zzzc1ead.js} +17 -13
- package/dist/cli.js +63 -11
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/package.json +8 -5
- package/scripts/postinstall.cjs +319 -0
- package/dist/chunk-0291smg3.js +0 -42
- package/dist/chunk-04g2ty3v.js +0 -104
- package/dist/chunk-069x95ne.js +0 -764
- package/dist/chunk-06x02eab.js +0 -655
- package/dist/chunk-09pjmga5.js +0 -713
- package/dist/chunk-0g90je6r.js +0 -145
- package/dist/chunk-0paqc2yw.js +0 -15
- package/dist/chunk-0rddv9vb.js +0 -328
- package/dist/chunk-162w6yv3.js +0 -756
- package/dist/chunk-1gjbaa3n.js +0 -128
- package/dist/chunk-23wg4mnt.js +0 -404
- package/dist/chunk-2gbjtg7c.js +0 -102
- package/dist/chunk-2v1q0ezq.js +0 -102
- package/dist/chunk-37n7jkxe.js +0 -436
- package/dist/chunk-38svjnh4.js +0 -158
- package/dist/chunk-3bg1089y.js +0 -616
- package/dist/chunk-3d8ck5ne.js +0 -112
- package/dist/chunk-3g6rf9sz.js +0 -106
- package/dist/chunk-3x3rr2n5.js +0 -57
- package/dist/chunk-4f6q3d38.js +0 -117
- package/dist/chunk-4h57km3m.js +0 -74
- package/dist/chunk-4kyh2618.js +0 -99
- package/dist/chunk-4w9vc9vc.js +0 -119
- package/dist/chunk-53hqpp5z.js +0 -208
- package/dist/chunk-5deqy8r0.js +0 -143
- package/dist/chunk-5m2rmc2k.js +0 -128
- package/dist/chunk-5wp9pkpt.js +0 -539
- package/dist/chunk-5ym9f6w3.js +0 -263
- package/dist/chunk-6f938733.js +0 -1027
- package/dist/chunk-6nenxecd.js +0 -115
- package/dist/chunk-6rja0h86.js +0 -1593
- package/dist/chunk-70q6dp4d.js +0 -96
- package/dist/chunk-7bn0wzs3.js +0 -1493
- package/dist/chunk-7e2e0bfm.js +0 -65
- package/dist/chunk-7ywadnax.js +0 -490
- package/dist/chunk-7z33j54s.js +0 -142
- package/dist/chunk-8yvfkzyh.js +0 -58
- package/dist/chunk-9abpx1kv.js +0 -2833
- package/dist/chunk-9ks2nswb.js +0 -114
- package/dist/chunk-9wrds5tr.js +0 -109
- package/dist/chunk-ab2twken.js +0 -102
- package/dist/chunk-abncjeag.js +0 -97
- package/dist/chunk-am6w4x6y.js +0 -103
- package/dist/chunk-b1xt9jqg.js +0 -28
- package/dist/chunk-b73bd7db.js +0 -496
- package/dist/chunk-bc7nvynh.js +0 -195
- package/dist/chunk-br17dhef.js +0 -103
- package/dist/chunk-c3k0sdey.js +0 -281
- package/dist/chunk-c909bmyv.js +0 -103
- package/dist/chunk-cftsv9w4.js +0 -129
- package/dist/chunk-cj1a7npk.js +0 -99
- package/dist/chunk-cpma9zs5.js +0 -335
- package/dist/chunk-cyscs4k5.js +0 -1330
- package/dist/chunk-czr7y063.js +0 -348
- package/dist/chunk-d93sndem.js +0 -372
- package/dist/chunk-ddz8xbpd.js +0 -481
- package/dist/chunk-dkhqx4hk.js +0 -84
- package/dist/chunk-dsrharmv.js +0 -359
- package/dist/chunk-eqmy5d05.js +0 -56
- package/dist/chunk-f2crxw2c.js +0 -5400
- package/dist/chunk-f8zga40p.js +0 -234
- package/dist/chunk-fbgm2ym6.js +0 -990
- package/dist/chunk-fcbbsswe.js +0 -119
- package/dist/chunk-fda654nt.js +0 -6121
- package/dist/chunk-ffmv9ezj.js +0 -104
- package/dist/chunk-fmjte7md.js +0 -38
- package/dist/chunk-fqtwqxxc.js +0 -293
- package/dist/chunk-g8k85nkd.js +0 -802
- package/dist/chunk-ge4ak7dj.js +0 -127
- package/dist/chunk-gpqemecy.js +0 -126
- package/dist/chunk-h19p6s3b.js +0 -131
- package/dist/chunk-j0sk1rct.js +0 -998
- package/dist/chunk-j1wfpa1a.js +0 -70
- package/dist/chunk-j829fx31.js +0 -3458
- package/dist/chunk-jqctzrvd.js +0 -722
- package/dist/chunk-jx817w05.js +0 -11
- package/dist/chunk-ka6sab33.js +0 -174
- package/dist/chunk-krjsvmwp.js +0 -101
- package/dist/chunk-kvpe50pm.js +0 -311
- package/dist/chunk-mez504fj.js +0 -113
- package/dist/chunk-mj6wbrae.js +0 -105
- package/dist/chunk-n0k8xrey.js +0 -319
- package/dist/chunk-n0pg2kpe.js +0 -122
- package/dist/chunk-n4qtqkp0.js +0 -295
- package/dist/chunk-n9meha2m.js +0 -73
- package/dist/chunk-ndk7q5n3.js +0 -169
- package/dist/chunk-ng6n9t4h.js +0 -56
- package/dist/chunk-p3pz13x2.js +0 -1933
- package/dist/chunk-p9ez6zgq.js +0 -2656
- package/dist/chunk-ph750kx1.js +0 -550
- package/dist/chunk-pxb99zqs.js +0 -117
- package/dist/chunk-q1yqc5n3.js +0 -100
- package/dist/chunk-q5b91nhh.js +0 -40
- package/dist/chunk-qtfqk0jr.js +0 -131
- package/dist/chunk-qzfmdh1t.js +0 -388
- package/dist/chunk-r3cv0j9n.js +0 -456
- package/dist/chunk-rx0pbgym.js +0 -97
- package/dist/chunk-s624rd5j.js +0 -531
- package/dist/chunk-satndwqj.js +0 -285
- package/dist/chunk-ssrxnkd1.js +0 -109
- package/dist/chunk-t2pgctqx.js +0 -106
- package/dist/chunk-t7sgwf31.js +0 -644
- package/dist/chunk-tth904tj.js +0 -53
- package/dist/chunk-typpbjhy.js +0 -128
- package/dist/chunk-vp6nrhdq.js +0 -102
- package/dist/chunk-vtjm53nt.js +0 -432
- package/dist/chunk-w412n7tq.js +0 -469
- package/dist/chunk-w4153rky.js +0 -1885
- package/dist/chunk-wdgv15as.js +0 -212
- package/dist/chunk-wgn9kydv.js +0 -58
- package/dist/chunk-whknbrk0.js +0 -184
- package/dist/chunk-x1k8e1xc.js +0 -56
- package/dist/chunk-x45xx6sc.js +0 -105
- package/dist/chunk-x4xvqbe5.js +0 -1166
- package/dist/chunk-x8b7vft8.js +0 -132
- package/dist/chunk-xaycc8qe.js +0 -44
- package/dist/chunk-xd4785ks.js +0 -73
- package/dist/chunk-xjxgmxhq.js +0 -463
- package/dist/chunk-xx2x3tz9.js +0 -166
- package/dist/chunk-y2j23eem.js +0 -101
- package/dist/chunk-y83j09wv.js +0 -123
- package/dist/chunk-yh8460pb.js +0 -119
- package/dist/chunk-z6nhchdb.js +0 -60
- package/dist/chunk-zbt73sj7.js +0 -192
- package/dist/chunk-zmwaatmq.js +0 -118
- package/dist/chunk-zvdg9tex.js +0 -135
- package/dist/chunk-zwa780cx.js +0 -584
- package/dist/{chunk-whvdag1y.js → chunk-3bfs3x0h.js} +9 -9
- package/dist/{chunk-27xc1csx.js → chunk-dggvswz1.js} +3 -3
package/dist/chunk-fbgm2ym6.js
DELETED
|
@@ -1,990 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
API_RESIZE_PARAMS,
|
|
4
|
-
init_src,
|
|
5
|
-
targetImageSize
|
|
6
|
-
} from "./chunk-f64npa3b.js";
|
|
7
|
-
import {
|
|
8
|
-
drainRunLoop,
|
|
9
|
-
init_drainRunLoop,
|
|
10
|
-
init_escHotkey,
|
|
11
|
-
init_swiftLoader,
|
|
12
|
-
notifyExpectedEscape,
|
|
13
|
-
requireComputerUseSwift
|
|
14
|
-
} from "./chunk-8z039kef.js";
|
|
15
|
-
import {
|
|
16
|
-
init_sleep,
|
|
17
|
-
sleep
|
|
18
|
-
} from "./chunk-8g5pe1gr.js";
|
|
19
|
-
import {
|
|
20
|
-
CLI_CU_CAPABILITIES,
|
|
21
|
-
CLI_HOST_BUNDLE_ID,
|
|
22
|
-
getTerminalBundleId,
|
|
23
|
-
init_common
|
|
24
|
-
} from "./chunk-rryx19hp.js";
|
|
25
|
-
import {
|
|
26
|
-
execFileNoThrow,
|
|
27
|
-
init_execFileNoThrow
|
|
28
|
-
} from "./chunk-athjeyrt.js";
|
|
29
|
-
import {
|
|
30
|
-
errorMessage,
|
|
31
|
-
init_debug,
|
|
32
|
-
init_errors,
|
|
33
|
-
logForDebugging
|
|
34
|
-
} from "./chunk-nxsh6de2.js";
|
|
35
|
-
import {
|
|
36
|
-
__esm,
|
|
37
|
-
__export,
|
|
38
|
-
__toCommonJS
|
|
39
|
-
} from "./chunk-qp2qdcda.js";
|
|
40
|
-
|
|
41
|
-
// packages/@ant/computer-use-input/src/backends/darwin.ts
|
|
42
|
-
var exports_darwin = {};
|
|
43
|
-
__export(exports_darwin, {
|
|
44
|
-
typeText: () => typeText,
|
|
45
|
-
moveMouse: () => moveMouse,
|
|
46
|
-
mouseScroll: () => mouseScroll,
|
|
47
|
-
mouseLocation: () => mouseLocation,
|
|
48
|
-
mouseButton: () => mouseButton,
|
|
49
|
-
keys: () => keys,
|
|
50
|
-
key: () => key,
|
|
51
|
-
getFrontmostAppInfo: () => getFrontmostAppInfo
|
|
52
|
-
});
|
|
53
|
-
var {$ } = globalThis.Bun;
|
|
54
|
-
async function osascript(script) {
|
|
55
|
-
const result = await $`osascript -e ${script}`.quiet().nothrow().text();
|
|
56
|
-
return result.trim();
|
|
57
|
-
}
|
|
58
|
-
async function jxa(script) {
|
|
59
|
-
const result = await $`osascript -l JavaScript -e ${script}`.quiet().nothrow().text();
|
|
60
|
-
return result.trim();
|
|
61
|
-
}
|
|
62
|
-
function buildMouseJxa(eventType, x, y, btn, clickState) {
|
|
63
|
-
let script = `ObjC.import("CoreGraphics"); var p = $.CGPointMake(${x},${y}); var e = $.CGEventCreateMouseEvent(null, $.${eventType}, p, ${btn});`;
|
|
64
|
-
if (clickState !== undefined) {
|
|
65
|
-
script += ` $.CGEventSetIntegerValueField(e, $.kCGMouseEventClickState, ${clickState});`;
|
|
66
|
-
}
|
|
67
|
-
script += ` $.CGEventPost($.kCGHIDEventTap, e);`;
|
|
68
|
-
return script;
|
|
69
|
-
}
|
|
70
|
-
var KEY_MAP, MODIFIER_MAP, moveMouse = async (x, y, _animated) => {
|
|
71
|
-
await jxa(buildMouseJxa("kCGEventMouseMoved", x, y, 0));
|
|
72
|
-
}, key = async (keyName, action) => {
|
|
73
|
-
if (action === "release")
|
|
74
|
-
return;
|
|
75
|
-
const lower = keyName.toLowerCase();
|
|
76
|
-
const keyCode = KEY_MAP[lower];
|
|
77
|
-
if (keyCode !== undefined) {
|
|
78
|
-
await osascript(`tell application "System Events" to key code ${keyCode}`);
|
|
79
|
-
} else {
|
|
80
|
-
await osascript(`tell application "System Events" to keystroke "${keyName.length === 1 ? keyName : lower}"`);
|
|
81
|
-
}
|
|
82
|
-
}, keys = async (parts) => {
|
|
83
|
-
const modifiers = [];
|
|
84
|
-
let finalKey = null;
|
|
85
|
-
for (const part of parts) {
|
|
86
|
-
const mod = MODIFIER_MAP[part.toLowerCase()];
|
|
87
|
-
if (mod)
|
|
88
|
-
modifiers.push(mod);
|
|
89
|
-
else
|
|
90
|
-
finalKey = part;
|
|
91
|
-
}
|
|
92
|
-
if (!finalKey)
|
|
93
|
-
return;
|
|
94
|
-
const lower = finalKey.toLowerCase();
|
|
95
|
-
const keyCode = KEY_MAP[lower];
|
|
96
|
-
const modStr = modifiers.length > 0 ? ` using {${modifiers.join(", ")}}` : "";
|
|
97
|
-
if (keyCode !== undefined) {
|
|
98
|
-
await osascript(`tell application "System Events" to key code ${keyCode}${modStr}`);
|
|
99
|
-
} else {
|
|
100
|
-
await osascript(`tell application "System Events" to keystroke "${finalKey.length === 1 ? finalKey : lower}"${modStr}`);
|
|
101
|
-
}
|
|
102
|
-
}, mouseLocation = async () => {
|
|
103
|
-
const result = await jxa('ObjC.import("CoreGraphics"); var e = $.CGEventCreate(null); var p = $.CGEventGetLocation(e); p.x + "," + p.y');
|
|
104
|
-
const [xStr, yStr] = result.split(",");
|
|
105
|
-
return { x: Math.round(Number(xStr)), y: Math.round(Number(yStr)) };
|
|
106
|
-
}, mouseButton = async (button, action, count) => {
|
|
107
|
-
const pos = await mouseLocation();
|
|
108
|
-
const btn = button === "left" ? 0 : button === "right" ? 1 : 2;
|
|
109
|
-
const downType = btn === 0 ? "kCGEventLeftMouseDown" : btn === 1 ? "kCGEventRightMouseDown" : "kCGEventOtherMouseDown";
|
|
110
|
-
const upType = btn === 0 ? "kCGEventLeftMouseUp" : btn === 1 ? "kCGEventRightMouseUp" : "kCGEventOtherMouseUp";
|
|
111
|
-
if (action === "click") {
|
|
112
|
-
for (let i = 0;i < (count ?? 1); i++) {
|
|
113
|
-
await jxa(buildMouseJxa(downType, pos.x, pos.y, btn, i + 1));
|
|
114
|
-
await jxa(buildMouseJxa(upType, pos.x, pos.y, btn, i + 1));
|
|
115
|
-
}
|
|
116
|
-
} else if (action === "press") {
|
|
117
|
-
await jxa(buildMouseJxa(downType, pos.x, pos.y, btn));
|
|
118
|
-
} else {
|
|
119
|
-
await jxa(buildMouseJxa(upType, pos.x, pos.y, btn));
|
|
120
|
-
}
|
|
121
|
-
}, mouseScroll = async (amount, direction) => {
|
|
122
|
-
const script = direction === "vertical" ? `ObjC.import("CoreGraphics"); var e = $.CGEventCreateScrollWheelEvent(null, 0, 1, ${amount}); $.CGEventPost($.kCGHIDEventTap, e);` : `ObjC.import("CoreGraphics"); var e = $.CGEventCreateScrollWheelEvent(null, 0, 2, 0, ${amount}); $.CGEventPost($.kCGHIDEventTap, e);`;
|
|
123
|
-
await jxa(script);
|
|
124
|
-
}, typeText = async (text) => {
|
|
125
|
-
const escaped = text.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
|
|
126
|
-
await osascript(`tell application "System Events" to keystroke "${escaped}"`);
|
|
127
|
-
}, getFrontmostAppInfo = () => {
|
|
128
|
-
try {
|
|
129
|
-
const result = Bun.spawnSync({
|
|
130
|
-
cmd: ["osascript", "-e", `
|
|
131
|
-
tell application "System Events"
|
|
132
|
-
set frontApp to first application process whose frontmost is true
|
|
133
|
-
set appName to name of frontApp
|
|
134
|
-
set bundleId to bundle identifier of frontApp
|
|
135
|
-
return bundleId & "|" & appName
|
|
136
|
-
end tell
|
|
137
|
-
`],
|
|
138
|
-
stdout: "pipe",
|
|
139
|
-
stderr: "pipe"
|
|
140
|
-
});
|
|
141
|
-
const output = new TextDecoder().decode(result.stdout).trim();
|
|
142
|
-
if (!output || !output.includes("|"))
|
|
143
|
-
return null;
|
|
144
|
-
const [bundleId, appName] = output.split("|", 2);
|
|
145
|
-
return { bundleId, appName };
|
|
146
|
-
} catch {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
var init_darwin = __esm(() => {
|
|
151
|
-
KEY_MAP = {
|
|
152
|
-
return: 36,
|
|
153
|
-
enter: 36,
|
|
154
|
-
tab: 48,
|
|
155
|
-
space: 49,
|
|
156
|
-
delete: 51,
|
|
157
|
-
backspace: 51,
|
|
158
|
-
escape: 53,
|
|
159
|
-
esc: 53,
|
|
160
|
-
left: 123,
|
|
161
|
-
right: 124,
|
|
162
|
-
down: 125,
|
|
163
|
-
up: 126,
|
|
164
|
-
f1: 122,
|
|
165
|
-
f2: 120,
|
|
166
|
-
f3: 99,
|
|
167
|
-
f4: 118,
|
|
168
|
-
f5: 96,
|
|
169
|
-
f6: 97,
|
|
170
|
-
f7: 98,
|
|
171
|
-
f8: 100,
|
|
172
|
-
f9: 101,
|
|
173
|
-
f10: 109,
|
|
174
|
-
f11: 103,
|
|
175
|
-
f12: 111,
|
|
176
|
-
home: 115,
|
|
177
|
-
end: 119,
|
|
178
|
-
pageup: 116,
|
|
179
|
-
pagedown: 121
|
|
180
|
-
};
|
|
181
|
-
MODIFIER_MAP = {
|
|
182
|
-
command: "command down",
|
|
183
|
-
cmd: "command down",
|
|
184
|
-
meta: "command down",
|
|
185
|
-
super: "command down",
|
|
186
|
-
shift: "shift down",
|
|
187
|
-
option: "option down",
|
|
188
|
-
alt: "option down",
|
|
189
|
-
control: "control down",
|
|
190
|
-
ctrl: "control down"
|
|
191
|
-
};
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
// packages/@ant/computer-use-input/src/backends/win32.ts
|
|
195
|
-
var exports_win32 = {};
|
|
196
|
-
__export(exports_win32, {
|
|
197
|
-
typeText: () => typeText2,
|
|
198
|
-
moveMouse: () => moveMouse2,
|
|
199
|
-
mouseScroll: () => mouseScroll2,
|
|
200
|
-
mouseLocation: () => mouseLocation2,
|
|
201
|
-
mouseButton: () => mouseButton2,
|
|
202
|
-
keys: () => keys2,
|
|
203
|
-
key: () => key2,
|
|
204
|
-
getFrontmostAppInfo: () => getFrontmostAppInfo2
|
|
205
|
-
});
|
|
206
|
-
function ps(script) {
|
|
207
|
-
const result = Bun.spawnSync({
|
|
208
|
-
cmd: ["powershell", "-NoProfile", "-NonInteractive", "-Command", script],
|
|
209
|
-
stdout: "pipe",
|
|
210
|
-
stderr: "pipe"
|
|
211
|
-
});
|
|
212
|
-
return new TextDecoder().decode(result.stdout).trim();
|
|
213
|
-
}
|
|
214
|
-
var WIN32_TYPES = `
|
|
215
|
-
Add-Type -Language CSharp @'
|
|
216
|
-
using System;
|
|
217
|
-
using System.Runtime.InteropServices;
|
|
218
|
-
using System.Text;
|
|
219
|
-
using System.Diagnostics;
|
|
220
|
-
|
|
221
|
-
public class CuWin32 {
|
|
222
|
-
// --- Cursor ---
|
|
223
|
-
[DllImport("user32.dll")] public static extern bool SetCursorPos(int X, int Y);
|
|
224
|
-
[DllImport("user32.dll")] public static extern bool GetCursorPos(out POINT p);
|
|
225
|
-
[StructLayout(LayoutKind.Sequential)] public struct POINT { public int X; public int Y; }
|
|
226
|
-
|
|
227
|
-
// --- SendInput ---
|
|
228
|
-
[StructLayout(LayoutKind.Sequential)] public struct MOUSEINPUT {
|
|
229
|
-
public int dx; public int dy; public int mouseData; public uint dwFlags; public uint time; public IntPtr dwExtraInfo;
|
|
230
|
-
}
|
|
231
|
-
[StructLayout(LayoutKind.Explicit)] public struct INPUT {
|
|
232
|
-
[FieldOffset(0)] public uint type;
|
|
233
|
-
[FieldOffset(4)] public MOUSEINPUT mi;
|
|
234
|
-
}
|
|
235
|
-
[StructLayout(LayoutKind.Sequential)] public struct KEYBDINPUT {
|
|
236
|
-
public ushort wVk; public ushort wScan; public uint dwFlags; public uint time; public IntPtr dwExtraInfo;
|
|
237
|
-
}
|
|
238
|
-
[StructLayout(LayoutKind.Explicit)] public struct KINPUT {
|
|
239
|
-
[FieldOffset(0)] public uint type;
|
|
240
|
-
[FieldOffset(4)] public KEYBDINPUT ki;
|
|
241
|
-
}
|
|
242
|
-
[DllImport("user32.dll", SetLastError=true)] public static extern uint SendInput(uint n, INPUT[] i, int cb);
|
|
243
|
-
[DllImport("user32.dll", SetLastError=true)] public static extern uint SendInput(uint n, KINPUT[] i, int cb);
|
|
244
|
-
|
|
245
|
-
// --- Keyboard ---
|
|
246
|
-
[DllImport("user32.dll")] public static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo);
|
|
247
|
-
[DllImport("user32.dll")] public static extern short VkKeyScan(char ch);
|
|
248
|
-
|
|
249
|
-
// --- Window ---
|
|
250
|
-
[DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow();
|
|
251
|
-
[DllImport("user32.dll")] public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint pid);
|
|
252
|
-
[DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetWindowText(IntPtr hWnd, StringBuilder sb, int max);
|
|
253
|
-
|
|
254
|
-
// Constants
|
|
255
|
-
public const uint INPUT_MOUSE = 0, INPUT_KEYBOARD = 1;
|
|
256
|
-
public const uint MOUSEEVENTF_LEFTDOWN = 0x0002, MOUSEEVENTF_LEFTUP = 0x0004;
|
|
257
|
-
public const uint MOUSEEVENTF_RIGHTDOWN = 0x0008, MOUSEEVENTF_RIGHTUP = 0x0010;
|
|
258
|
-
public const uint MOUSEEVENTF_MIDDLEDOWN = 0x0020, MOUSEEVENTF_MIDDLEUP = 0x0040;
|
|
259
|
-
public const uint MOUSEEVENTF_WHEEL = 0x0800, MOUSEEVENTF_HWHEEL = 0x1000;
|
|
260
|
-
public const uint KEYEVENTF_KEYUP = 0x0002;
|
|
261
|
-
}
|
|
262
|
-
'@
|
|
263
|
-
`, VK_MAP, MODIFIER_KEYS, moveMouse2 = async (x, y, _animated) => {
|
|
264
|
-
ps(`${WIN32_TYPES}; [CuWin32]::SetCursorPos(${Math.round(x)}, ${Math.round(y)}) | Out-Null`);
|
|
265
|
-
}, mouseLocation2 = async () => {
|
|
266
|
-
const out = ps(`${WIN32_TYPES}; $p = New-Object CuWin32+POINT; [CuWin32]::GetCursorPos([ref]$p) | Out-Null; "$($p.X),$($p.Y)"`);
|
|
267
|
-
const [xStr, yStr] = out.split(",");
|
|
268
|
-
return { x: Number(xStr), y: Number(yStr) };
|
|
269
|
-
}, mouseButton2 = async (button, action, count) => {
|
|
270
|
-
const downFlag = button === "left" ? "MOUSEEVENTF_LEFTDOWN" : button === "right" ? "MOUSEEVENTF_RIGHTDOWN" : "MOUSEEVENTF_MIDDLEDOWN";
|
|
271
|
-
const upFlag = button === "left" ? "MOUSEEVENTF_LEFTUP" : button === "right" ? "MOUSEEVENTF_RIGHTUP" : "MOUSEEVENTF_MIDDLEUP";
|
|
272
|
-
if (action === "click") {
|
|
273
|
-
const n = count ?? 1;
|
|
274
|
-
let clicks = "";
|
|
275
|
-
for (let i = 0;i < n; i++) {
|
|
276
|
-
clicks += `$i.mi.dwFlags=[CuWin32]::${downFlag}; [CuWin32]::SendInput(1, @($i), [Runtime.InteropServices.Marshal]::SizeOf($i)) | Out-Null; $i.mi.dwFlags=[CuWin32]::${upFlag}; [CuWin32]::SendInput(1, @($i), [Runtime.InteropServices.Marshal]::SizeOf($i)) | Out-Null; `;
|
|
277
|
-
}
|
|
278
|
-
ps(`${WIN32_TYPES}; $i = New-Object CuWin32+INPUT; $i.type=[CuWin32]::INPUT_MOUSE; ${clicks}`);
|
|
279
|
-
} else if (action === "press") {
|
|
280
|
-
ps(`${WIN32_TYPES}; $i = New-Object CuWin32+INPUT; $i.type=[CuWin32]::INPUT_MOUSE; $i.mi.dwFlags=[CuWin32]::${downFlag}; [CuWin32]::SendInput(1, @($i), [Runtime.InteropServices.Marshal]::SizeOf($i)) | Out-Null`);
|
|
281
|
-
} else {
|
|
282
|
-
ps(`${WIN32_TYPES}; $i = New-Object CuWin32+INPUT; $i.type=[CuWin32]::INPUT_MOUSE; $i.mi.dwFlags=[CuWin32]::${upFlag}; [CuWin32]::SendInput(1, @($i), [Runtime.InteropServices.Marshal]::SizeOf($i)) | Out-Null`);
|
|
283
|
-
}
|
|
284
|
-
}, mouseScroll2 = async (amount, direction) => {
|
|
285
|
-
const flag = direction === "vertical" ? "MOUSEEVENTF_WHEEL" : "MOUSEEVENTF_HWHEEL";
|
|
286
|
-
ps(`${WIN32_TYPES}; $i = New-Object CuWin32+INPUT; $i.type=[CuWin32]::INPUT_MOUSE; $i.mi.dwFlags=[CuWin32]::${flag}; $i.mi.mouseData=${amount * 120}; [CuWin32]::SendInput(1, @($i), [Runtime.InteropServices.Marshal]::SizeOf($i)) | Out-Null`);
|
|
287
|
-
}, key2 = async (keyName, action) => {
|
|
288
|
-
const lower = keyName.toLowerCase();
|
|
289
|
-
const vk = VK_MAP[lower];
|
|
290
|
-
const flags = action === "release" ? "2" : "0";
|
|
291
|
-
if (vk !== undefined) {
|
|
292
|
-
ps(`${WIN32_TYPES}; [CuWin32]::keybd_event(${vk}, 0, ${flags}, [UIntPtr]::Zero)`);
|
|
293
|
-
} else if (keyName.length === 1) {
|
|
294
|
-
const charCode = keyName.charCodeAt(0);
|
|
295
|
-
ps(`${WIN32_TYPES}; $vk = [CuWin32]::VkKeyScan([char]${charCode}) -band 0xFF; [CuWin32]::keybd_event([byte]$vk, 0, ${flags}, [UIntPtr]::Zero)`);
|
|
296
|
-
}
|
|
297
|
-
}, keys2 = async (parts) => {
|
|
298
|
-
const modifiers = [];
|
|
299
|
-
let finalKey = null;
|
|
300
|
-
for (const part of parts) {
|
|
301
|
-
const lower2 = part.toLowerCase();
|
|
302
|
-
if (MODIFIER_KEYS.has(lower2)) {
|
|
303
|
-
const vk2 = VK_MAP[lower2];
|
|
304
|
-
if (vk2 !== undefined)
|
|
305
|
-
modifiers.push(vk2);
|
|
306
|
-
} else {
|
|
307
|
-
finalKey = part;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
if (!finalKey)
|
|
311
|
-
return;
|
|
312
|
-
let script = WIN32_TYPES + "; ";
|
|
313
|
-
for (const vk2 of modifiers) {
|
|
314
|
-
script += `[CuWin32]::keybd_event(${vk2}, 0, 0, [UIntPtr]::Zero); `;
|
|
315
|
-
}
|
|
316
|
-
const lower = finalKey.toLowerCase();
|
|
317
|
-
const vk = VK_MAP[lower];
|
|
318
|
-
if (vk !== undefined) {
|
|
319
|
-
script += `[CuWin32]::keybd_event(${vk}, 0, 0, [UIntPtr]::Zero); [CuWin32]::keybd_event(${vk}, 0, 2, [UIntPtr]::Zero); `;
|
|
320
|
-
} else if (finalKey.length === 1) {
|
|
321
|
-
const charCode = finalKey.charCodeAt(0);
|
|
322
|
-
script += `$vk = [CuWin32]::VkKeyScan([char]${charCode}) -band 0xFF; [CuWin32]::keybd_event([byte]$vk, 0, 0, [UIntPtr]::Zero); [CuWin32]::keybd_event([byte]$vk, 0, 2, [UIntPtr]::Zero); `;
|
|
323
|
-
}
|
|
324
|
-
for (const mk of modifiers.reverse()) {
|
|
325
|
-
script += `[CuWin32]::keybd_event(${mk}, 0, 2, [UIntPtr]::Zero); `;
|
|
326
|
-
}
|
|
327
|
-
ps(script);
|
|
328
|
-
}, typeText2 = async (text) => {
|
|
329
|
-
const escaped = text.replace(/'/g, "''");
|
|
330
|
-
ps(`Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait('${escaped}')`);
|
|
331
|
-
}, getFrontmostAppInfo2 = () => {
|
|
332
|
-
try {
|
|
333
|
-
const out = ps(`${WIN32_TYPES}
|
|
334
|
-
$hwnd = [CuWin32]::GetForegroundWindow()
|
|
335
|
-
$procId = [uint32]0
|
|
336
|
-
[CuWin32]::GetWindowThreadProcessId($hwnd, [ref]$procId) | Out-Null
|
|
337
|
-
$proc = Get-Process -Id $procId -ErrorAction SilentlyContinue
|
|
338
|
-
"$($proc.MainModule.FileName)|$($proc.ProcessName)"`);
|
|
339
|
-
if (!out || !out.includes("|"))
|
|
340
|
-
return null;
|
|
341
|
-
const [exePath, appName] = out.split("|", 2);
|
|
342
|
-
return { bundleId: exePath, appName };
|
|
343
|
-
} catch {
|
|
344
|
-
return null;
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
var init_win32 = __esm(() => {
|
|
348
|
-
VK_MAP = {
|
|
349
|
-
return: 13,
|
|
350
|
-
enter: 13,
|
|
351
|
-
tab: 9,
|
|
352
|
-
space: 32,
|
|
353
|
-
backspace: 8,
|
|
354
|
-
delete: 46,
|
|
355
|
-
escape: 27,
|
|
356
|
-
esc: 27,
|
|
357
|
-
left: 37,
|
|
358
|
-
up: 38,
|
|
359
|
-
right: 39,
|
|
360
|
-
down: 40,
|
|
361
|
-
home: 36,
|
|
362
|
-
end: 35,
|
|
363
|
-
pageup: 33,
|
|
364
|
-
pagedown: 34,
|
|
365
|
-
f1: 112,
|
|
366
|
-
f2: 113,
|
|
367
|
-
f3: 114,
|
|
368
|
-
f4: 115,
|
|
369
|
-
f5: 116,
|
|
370
|
-
f6: 117,
|
|
371
|
-
f7: 118,
|
|
372
|
-
f8: 119,
|
|
373
|
-
f9: 120,
|
|
374
|
-
f10: 121,
|
|
375
|
-
f11: 122,
|
|
376
|
-
f12: 123,
|
|
377
|
-
shift: 160,
|
|
378
|
-
lshift: 160,
|
|
379
|
-
rshift: 161,
|
|
380
|
-
control: 162,
|
|
381
|
-
ctrl: 162,
|
|
382
|
-
lcontrol: 162,
|
|
383
|
-
rcontrol: 163,
|
|
384
|
-
alt: 164,
|
|
385
|
-
option: 164,
|
|
386
|
-
lalt: 164,
|
|
387
|
-
ralt: 165,
|
|
388
|
-
win: 91,
|
|
389
|
-
meta: 91,
|
|
390
|
-
command: 91,
|
|
391
|
-
cmd: 91,
|
|
392
|
-
super: 91,
|
|
393
|
-
insert: 45,
|
|
394
|
-
printscreen: 44,
|
|
395
|
-
pause: 19,
|
|
396
|
-
numlock: 144,
|
|
397
|
-
capslock: 20,
|
|
398
|
-
scrolllock: 145
|
|
399
|
-
};
|
|
400
|
-
MODIFIER_KEYS = new Set(["shift", "lshift", "rshift", "control", "ctrl", "lcontrol", "rcontrol", "alt", "option", "lalt", "ralt", "win", "meta", "command", "cmd", "super"]);
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
// packages/@ant/computer-use-input/src/backends/linux.ts
|
|
404
|
-
var exports_linux = {};
|
|
405
|
-
__export(exports_linux, {
|
|
406
|
-
typeText: () => typeText3,
|
|
407
|
-
moveMouse: () => moveMouse3,
|
|
408
|
-
mouseScroll: () => mouseScroll3,
|
|
409
|
-
mouseLocation: () => mouseLocation3,
|
|
410
|
-
mouseButton: () => mouseButton3,
|
|
411
|
-
keys: () => keys3,
|
|
412
|
-
key: () => key3,
|
|
413
|
-
getFrontmostAppInfo: () => getFrontmostAppInfo3
|
|
414
|
-
});
|
|
415
|
-
function run(cmd) {
|
|
416
|
-
const result = Bun.spawnSync({
|
|
417
|
-
cmd,
|
|
418
|
-
stdout: "pipe",
|
|
419
|
-
stderr: "pipe"
|
|
420
|
-
});
|
|
421
|
-
return new TextDecoder().decode(result.stdout).trim();
|
|
422
|
-
}
|
|
423
|
-
function mapKey(name) {
|
|
424
|
-
return KEY_MAP2[name.toLowerCase()] ?? name;
|
|
425
|
-
}
|
|
426
|
-
function mouseButtonNum(button) {
|
|
427
|
-
return button === "left" ? "1" : button === "right" ? "3" : "2";
|
|
428
|
-
}
|
|
429
|
-
var KEY_MAP2, MODIFIER_KEYS2, moveMouse3 = async (x, y, _animated) => {
|
|
430
|
-
run(["xdotool", "mousemove", "--sync", String(Math.round(x)), String(Math.round(y))]);
|
|
431
|
-
}, mouseLocation3 = async () => {
|
|
432
|
-
const out = run(["xdotool", "getmouselocation"]);
|
|
433
|
-
const xMatch = out.match(/x:(\d+)/);
|
|
434
|
-
const yMatch = out.match(/y:(\d+)/);
|
|
435
|
-
return {
|
|
436
|
-
x: xMatch ? Number(xMatch[1]) : 0,
|
|
437
|
-
y: yMatch ? Number(yMatch[1]) : 0
|
|
438
|
-
};
|
|
439
|
-
}, mouseButton3 = async (button, action, count) => {
|
|
440
|
-
const btn = mouseButtonNum(button);
|
|
441
|
-
if (action === "click") {
|
|
442
|
-
const n = count ?? 1;
|
|
443
|
-
run(["xdotool", "click", "--repeat", String(n), btn]);
|
|
444
|
-
} else if (action === "press") {
|
|
445
|
-
run(["xdotool", "mousedown", btn]);
|
|
446
|
-
} else {
|
|
447
|
-
run(["xdotool", "mouseup", btn]);
|
|
448
|
-
}
|
|
449
|
-
}, mouseScroll3 = async (amount, direction) => {
|
|
450
|
-
if (direction === "vertical") {
|
|
451
|
-
const btn = amount >= 0 ? "5" : "4";
|
|
452
|
-
const repeats = Math.abs(Math.round(amount));
|
|
453
|
-
if (repeats > 0) {
|
|
454
|
-
run(["xdotool", "click", "--repeat", String(repeats), btn]);
|
|
455
|
-
}
|
|
456
|
-
} else {
|
|
457
|
-
const btn = amount >= 0 ? "7" : "6";
|
|
458
|
-
const repeats = Math.abs(Math.round(amount));
|
|
459
|
-
if (repeats > 0) {
|
|
460
|
-
run(["xdotool", "click", "--repeat", String(repeats), btn]);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}, key3 = async (keyName, action) => {
|
|
464
|
-
const mapped = mapKey(keyName);
|
|
465
|
-
if (action === "press") {
|
|
466
|
-
run(["xdotool", "keydown", mapped]);
|
|
467
|
-
} else {
|
|
468
|
-
run(["xdotool", "keyup", mapped]);
|
|
469
|
-
}
|
|
470
|
-
}, keys3 = async (parts) => {
|
|
471
|
-
const modifiers = [];
|
|
472
|
-
let finalKey = null;
|
|
473
|
-
for (const part of parts) {
|
|
474
|
-
if (MODIFIER_KEYS2.has(part.toLowerCase())) {
|
|
475
|
-
modifiers.push(mapKey(part));
|
|
476
|
-
} else {
|
|
477
|
-
finalKey = part;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
if (!finalKey)
|
|
481
|
-
return;
|
|
482
|
-
const combo = [...modifiers, mapKey(finalKey)].join("+");
|
|
483
|
-
run(["xdotool", "key", combo]);
|
|
484
|
-
}, typeText3 = async (text) => {
|
|
485
|
-
run(["xdotool", "type", "--delay", "12", text]);
|
|
486
|
-
}, getFrontmostAppInfo3 = () => {
|
|
487
|
-
try {
|
|
488
|
-
const windowId = run(["xdotool", "getactivewindow"]);
|
|
489
|
-
if (!windowId)
|
|
490
|
-
return null;
|
|
491
|
-
const pidStr = run(["xdotool", "getwindowpid", windowId]);
|
|
492
|
-
if (!pidStr)
|
|
493
|
-
return null;
|
|
494
|
-
const pid = pidStr.trim();
|
|
495
|
-
let exePath = "";
|
|
496
|
-
try {
|
|
497
|
-
exePath = run(["readlink", "-f", `/proc/${pid}/exe`]);
|
|
498
|
-
} catch {}
|
|
499
|
-
let appName = "";
|
|
500
|
-
try {
|
|
501
|
-
appName = run(["cat", `/proc/${pid}/comm`]);
|
|
502
|
-
} catch {}
|
|
503
|
-
if (!exePath && !appName)
|
|
504
|
-
return null;
|
|
505
|
-
return { bundleId: exePath || `/proc/${pid}/exe`, appName: appName || "unknown" };
|
|
506
|
-
} catch {
|
|
507
|
-
return null;
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
var init_linux = __esm(() => {
|
|
511
|
-
KEY_MAP2 = {
|
|
512
|
-
return: "Return",
|
|
513
|
-
enter: "Return",
|
|
514
|
-
tab: "Tab",
|
|
515
|
-
space: "space",
|
|
516
|
-
backspace: "BackSpace",
|
|
517
|
-
delete: "Delete",
|
|
518
|
-
escape: "Escape",
|
|
519
|
-
esc: "Escape",
|
|
520
|
-
left: "Left",
|
|
521
|
-
up: "Up",
|
|
522
|
-
right: "Right",
|
|
523
|
-
down: "Down",
|
|
524
|
-
home: "Home",
|
|
525
|
-
end: "End",
|
|
526
|
-
pageup: "Prior",
|
|
527
|
-
pagedown: "Next",
|
|
528
|
-
f1: "F1",
|
|
529
|
-
f2: "F2",
|
|
530
|
-
f3: "F3",
|
|
531
|
-
f4: "F4",
|
|
532
|
-
f5: "F5",
|
|
533
|
-
f6: "F6",
|
|
534
|
-
f7: "F7",
|
|
535
|
-
f8: "F8",
|
|
536
|
-
f9: "F9",
|
|
537
|
-
f10: "F10",
|
|
538
|
-
f11: "F11",
|
|
539
|
-
f12: "F12",
|
|
540
|
-
shift: "shift",
|
|
541
|
-
lshift: "shift",
|
|
542
|
-
rshift: "shift",
|
|
543
|
-
control: "ctrl",
|
|
544
|
-
ctrl: "ctrl",
|
|
545
|
-
lcontrol: "ctrl",
|
|
546
|
-
rcontrol: "ctrl",
|
|
547
|
-
alt: "alt",
|
|
548
|
-
option: "alt",
|
|
549
|
-
lalt: "alt",
|
|
550
|
-
ralt: "alt",
|
|
551
|
-
win: "super",
|
|
552
|
-
meta: "super",
|
|
553
|
-
command: "super",
|
|
554
|
-
cmd: "super",
|
|
555
|
-
super: "super",
|
|
556
|
-
insert: "Insert",
|
|
557
|
-
printscreen: "Print",
|
|
558
|
-
pause: "Pause",
|
|
559
|
-
numlock: "Num_Lock",
|
|
560
|
-
capslock: "Caps_Lock",
|
|
561
|
-
scrolllock: "Scroll_Lock"
|
|
562
|
-
};
|
|
563
|
-
MODIFIER_KEYS2 = new Set([
|
|
564
|
-
"shift",
|
|
565
|
-
"lshift",
|
|
566
|
-
"rshift",
|
|
567
|
-
"control",
|
|
568
|
-
"ctrl",
|
|
569
|
-
"lcontrol",
|
|
570
|
-
"rcontrol",
|
|
571
|
-
"alt",
|
|
572
|
-
"option",
|
|
573
|
-
"lalt",
|
|
574
|
-
"ralt",
|
|
575
|
-
"win",
|
|
576
|
-
"meta",
|
|
577
|
-
"command",
|
|
578
|
-
"cmd",
|
|
579
|
-
"super"
|
|
580
|
-
]);
|
|
581
|
-
});
|
|
582
|
-
|
|
583
|
-
// packages/@ant/computer-use-input/src/index.ts
|
|
584
|
-
var exports_src = {};
|
|
585
|
-
__export(exports_src, {
|
|
586
|
-
typeText: () => typeText4,
|
|
587
|
-
moveMouse: () => moveMouse4,
|
|
588
|
-
mouseScroll: () => mouseScroll4,
|
|
589
|
-
mouseLocation: () => mouseLocation4,
|
|
590
|
-
mouseButton: () => mouseButton4,
|
|
591
|
-
keys: () => keys4,
|
|
592
|
-
key: () => key4,
|
|
593
|
-
isSupported: () => isSupported,
|
|
594
|
-
getFrontmostAppInfo: () => getFrontmostAppInfo4,
|
|
595
|
-
ComputerUseInputAPI: () => ComputerUseInputAPI
|
|
596
|
-
});
|
|
597
|
-
function loadBackend() {
|
|
598
|
-
try {
|
|
599
|
-
switch (process.platform) {
|
|
600
|
-
case "darwin":
|
|
601
|
-
return init_darwin(), __toCommonJS(exports_darwin);
|
|
602
|
-
case "win32":
|
|
603
|
-
return init_win32(), __toCommonJS(exports_win32);
|
|
604
|
-
case "linux":
|
|
605
|
-
return init_linux(), __toCommonJS(exports_linux);
|
|
606
|
-
default:
|
|
607
|
-
return null;
|
|
608
|
-
}
|
|
609
|
-
} catch {
|
|
610
|
-
return null;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
function unsupported() {
|
|
614
|
-
throw new Error(`computer-use-input is not supported on ${process.platform}`);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
class ComputerUseInputAPI {
|
|
618
|
-
}
|
|
619
|
-
var backend, isSupported, moveMouse4, key4, keys4, mouseLocation4, mouseButton4, mouseScroll4, typeText4, getFrontmostAppInfo4;
|
|
620
|
-
var init_src2 = __esm(() => {
|
|
621
|
-
backend = loadBackend();
|
|
622
|
-
isSupported = backend !== null;
|
|
623
|
-
moveMouse4 = backend?.moveMouse ?? unsupported;
|
|
624
|
-
key4 = backend?.key ?? unsupported;
|
|
625
|
-
keys4 = backend?.keys ?? unsupported;
|
|
626
|
-
mouseLocation4 = backend?.mouseLocation ?? unsupported;
|
|
627
|
-
mouseButton4 = backend?.mouseButton ?? unsupported;
|
|
628
|
-
mouseScroll4 = backend?.mouseScroll ?? unsupported;
|
|
629
|
-
typeText4 = backend?.typeText ?? unsupported;
|
|
630
|
-
getFrontmostAppInfo4 = backend?.getFrontmostAppInfo ?? (() => null);
|
|
631
|
-
});
|
|
632
|
-
|
|
633
|
-
// src/utils/computerUse/inputLoader.ts
|
|
634
|
-
function requireComputerUseInput() {
|
|
635
|
-
if (cached)
|
|
636
|
-
return cached;
|
|
637
|
-
const input = (init_src2(), __toCommonJS(exports_src));
|
|
638
|
-
if (!input.isSupported) {
|
|
639
|
-
throw new Error("@ant/computer-use-input is not supported on this platform");
|
|
640
|
-
}
|
|
641
|
-
return cached = input;
|
|
642
|
-
}
|
|
643
|
-
var cached;
|
|
644
|
-
var init_inputLoader = () => {};
|
|
645
|
-
|
|
646
|
-
// src/utils/computerUse/executor.ts
|
|
647
|
-
function computeTargetDims(logicalW, logicalH, scaleFactor) {
|
|
648
|
-
const physW = Math.round(logicalW * scaleFactor);
|
|
649
|
-
const physH = Math.round(logicalH * scaleFactor);
|
|
650
|
-
return targetImageSize(physW, physH, API_RESIZE_PARAMS);
|
|
651
|
-
}
|
|
652
|
-
async function readClipboardViaPbpaste() {
|
|
653
|
-
if (process.platform === "win32") {
|
|
654
|
-
const { stdout: stdout2, code: code2 } = await execFileNoThrow("powershell", ["-NoProfile", "-Command", "Get-Clipboard"], {
|
|
655
|
-
useCwd: false
|
|
656
|
-
});
|
|
657
|
-
if (code2 !== 0) {
|
|
658
|
-
throw new Error(`PowerShell Get-Clipboard exited with code ${code2}`);
|
|
659
|
-
}
|
|
660
|
-
return stdout2;
|
|
661
|
-
}
|
|
662
|
-
if (process.platform === "linux") {
|
|
663
|
-
const { stdout: stdout2, code: code2 } = await execFileNoThrow("xclip", ["-selection", "clipboard", "-o"], {
|
|
664
|
-
useCwd: false
|
|
665
|
-
});
|
|
666
|
-
if (code2 !== 0) {
|
|
667
|
-
throw new Error(`xclip exited with code ${code2}`);
|
|
668
|
-
}
|
|
669
|
-
return stdout2;
|
|
670
|
-
}
|
|
671
|
-
const { stdout, code } = await execFileNoThrow("pbpaste", [], {
|
|
672
|
-
useCwd: false
|
|
673
|
-
});
|
|
674
|
-
if (code !== 0) {
|
|
675
|
-
throw new Error(`pbpaste exited with code ${code}`);
|
|
676
|
-
}
|
|
677
|
-
return stdout;
|
|
678
|
-
}
|
|
679
|
-
async function writeClipboardViaPbcopy(text) {
|
|
680
|
-
if (process.platform === "win32") {
|
|
681
|
-
const { code: code2 } = await execFileNoThrow("powershell", ["-NoProfile", "-Command", `Set-Clipboard -Value '${text.replace(/'/g, "''")}'`], {
|
|
682
|
-
useCwd: false
|
|
683
|
-
});
|
|
684
|
-
if (code2 !== 0) {
|
|
685
|
-
throw new Error(`PowerShell Set-Clipboard exited with code ${code2}`);
|
|
686
|
-
}
|
|
687
|
-
return;
|
|
688
|
-
}
|
|
689
|
-
if (process.platform === "linux") {
|
|
690
|
-
const { code: code2 } = await execFileNoThrow("xclip", ["-selection", "clipboard"], {
|
|
691
|
-
input: text,
|
|
692
|
-
useCwd: false
|
|
693
|
-
});
|
|
694
|
-
if (code2 !== 0) {
|
|
695
|
-
throw new Error(`xclip exited with code ${code2}`);
|
|
696
|
-
}
|
|
697
|
-
return;
|
|
698
|
-
}
|
|
699
|
-
const { code } = await execFileNoThrow("pbcopy", [], {
|
|
700
|
-
input: text,
|
|
701
|
-
useCwd: false
|
|
702
|
-
});
|
|
703
|
-
if (code !== 0) {
|
|
704
|
-
throw new Error(`pbcopy exited with code ${code}`);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
function isBareEscape(parts) {
|
|
708
|
-
if (parts.length !== 1)
|
|
709
|
-
return false;
|
|
710
|
-
const lower = parts[0].toLowerCase();
|
|
711
|
-
return lower === "escape" || lower === "esc";
|
|
712
|
-
}
|
|
713
|
-
async function moveAndSettle(input, x, y) {
|
|
714
|
-
await input.moveMouse(x, y, false);
|
|
715
|
-
await sleep(MOVE_SETTLE_MS);
|
|
716
|
-
}
|
|
717
|
-
async function releasePressed(input, pressed) {
|
|
718
|
-
let k;
|
|
719
|
-
while ((k = pressed.pop()) !== undefined) {
|
|
720
|
-
try {
|
|
721
|
-
await input.key(k, "release");
|
|
722
|
-
} catch {}
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
async function withModifiers(input, mods, fn) {
|
|
726
|
-
const pressed = [];
|
|
727
|
-
try {
|
|
728
|
-
for (const m of mods) {
|
|
729
|
-
await input.key(m, "press");
|
|
730
|
-
pressed.push(m);
|
|
731
|
-
}
|
|
732
|
-
return await fn();
|
|
733
|
-
} finally {
|
|
734
|
-
await releasePressed(input, pressed);
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
async function typeViaClipboard(input, text) {
|
|
738
|
-
let saved;
|
|
739
|
-
try {
|
|
740
|
-
saved = await readClipboardViaPbpaste();
|
|
741
|
-
} catch {
|
|
742
|
-
logForDebugging("[computer-use] pbpaste before paste failed; proceeding without restore");
|
|
743
|
-
}
|
|
744
|
-
try {
|
|
745
|
-
await writeClipboardViaPbcopy(text);
|
|
746
|
-
if (await readClipboardViaPbpaste() !== text) {
|
|
747
|
-
throw new Error("Clipboard write did not round-trip.");
|
|
748
|
-
}
|
|
749
|
-
await input.keys([process.platform === "darwin" ? "command" : "ctrl", "v"]);
|
|
750
|
-
await sleep(100);
|
|
751
|
-
} finally {
|
|
752
|
-
if (typeof saved === "string") {
|
|
753
|
-
try {
|
|
754
|
-
await writeClipboardViaPbcopy(saved);
|
|
755
|
-
} catch {
|
|
756
|
-
logForDebugging("[computer-use] clipboard restore after paste failed");
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
async function animatedMove(input, targetX, targetY, mouseAnimationEnabled) {
|
|
762
|
-
if (!mouseAnimationEnabled) {
|
|
763
|
-
await moveAndSettle(input, targetX, targetY);
|
|
764
|
-
return;
|
|
765
|
-
}
|
|
766
|
-
const start = await input.mouseLocation();
|
|
767
|
-
const deltaX = targetX - start.x;
|
|
768
|
-
const deltaY = targetY - start.y;
|
|
769
|
-
const distance = Math.hypot(deltaX, deltaY);
|
|
770
|
-
if (distance < 1)
|
|
771
|
-
return;
|
|
772
|
-
const durationSec = Math.min(distance / 2000, 0.5);
|
|
773
|
-
if (durationSec < 0.03) {
|
|
774
|
-
await moveAndSettle(input, targetX, targetY);
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
const frameRate = 60;
|
|
778
|
-
const frameIntervalMs = 1000 / frameRate;
|
|
779
|
-
const totalFrames = Math.floor(durationSec * frameRate);
|
|
780
|
-
for (let frame = 1;frame <= totalFrames; frame++) {
|
|
781
|
-
const t = frame / totalFrames;
|
|
782
|
-
const eased = 1 - Math.pow(1 - t, 3);
|
|
783
|
-
await input.moveMouse(Math.round(start.x + deltaX * eased), Math.round(start.y + deltaY * eased), false);
|
|
784
|
-
if (frame < totalFrames) {
|
|
785
|
-
await sleep(frameIntervalMs);
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
await sleep(MOVE_SETTLE_MS);
|
|
789
|
-
}
|
|
790
|
-
function createCliExecutor(opts) {
|
|
791
|
-
if (process.platform !== "darwin" && process.platform !== "win32" && process.platform !== "linux") {
|
|
792
|
-
throw new Error(`createCliExecutor called on ${process.platform}. Computer control requires macOS, Windows, or Linux.`);
|
|
793
|
-
}
|
|
794
|
-
const cu = requireComputerUseSwift();
|
|
795
|
-
const { getMouseAnimationEnabled, getHideBeforeActionEnabled } = opts;
|
|
796
|
-
const terminalBundleId = getTerminalBundleId();
|
|
797
|
-
const surrogateHost = terminalBundleId ?? CLI_HOST_BUNDLE_ID;
|
|
798
|
-
const withoutTerminal = (allowed) => terminalBundleId === null ? [...allowed] : allowed.filter((id) => id !== terminalBundleId);
|
|
799
|
-
logForDebugging(terminalBundleId ? `[computer-use] terminal ${terminalBundleId} \u2192 surrogate host (hide-exempt, activate-skip, screenshot-excluded)` : "[computer-use] terminal not detected; falling back to sentinel host");
|
|
800
|
-
return {
|
|
801
|
-
capabilities: {
|
|
802
|
-
...CLI_CU_CAPABILITIES,
|
|
803
|
-
hostBundleId: CLI_HOST_BUNDLE_ID
|
|
804
|
-
},
|
|
805
|
-
async prepareForAction(allowlistBundleIds, displayId) {
|
|
806
|
-
if (!getHideBeforeActionEnabled()) {
|
|
807
|
-
return [];
|
|
808
|
-
}
|
|
809
|
-
return drainRunLoop(async () => {
|
|
810
|
-
try {
|
|
811
|
-
const result = await cu.apps.prepareDisplay(allowlistBundleIds, surrogateHost, displayId);
|
|
812
|
-
if (result.activated) {
|
|
813
|
-
logForDebugging(`[computer-use] prepareForAction: activated ${result.activated}`);
|
|
814
|
-
}
|
|
815
|
-
return result.hidden;
|
|
816
|
-
} catch (err) {
|
|
817
|
-
logForDebugging(`[computer-use] prepareForAction failed; continuing to action: ${errorMessage(err)}`, { level: "warn" });
|
|
818
|
-
return [];
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
|
-
},
|
|
822
|
-
async previewHideSet(allowlistBundleIds, displayId) {
|
|
823
|
-
return cu.apps.previewHideSet([...allowlistBundleIds, surrogateHost], displayId);
|
|
824
|
-
},
|
|
825
|
-
async getDisplaySize(displayId) {
|
|
826
|
-
return cu.display.getSize(displayId);
|
|
827
|
-
},
|
|
828
|
-
async listDisplays() {
|
|
829
|
-
return cu.display.listAll();
|
|
830
|
-
},
|
|
831
|
-
async findWindowDisplays(bundleIds) {
|
|
832
|
-
return cu.apps.findWindowDisplays(bundleIds);
|
|
833
|
-
},
|
|
834
|
-
async resolvePrepareCapture(opts2) {
|
|
835
|
-
const d = cu.display.getSize(opts2.preferredDisplayId);
|
|
836
|
-
const [targetW, targetH] = computeTargetDims(d.width, d.height, d.scaleFactor);
|
|
837
|
-
const raw = await drainRunLoop(() => cu.resolvePrepareCapture(withoutTerminal(opts2.allowedBundleIds), surrogateHost, SCREENSHOT_JPEG_QUALITY, targetW, targetH, opts2.preferredDisplayId, opts2.autoResolve, opts2.doHide));
|
|
838
|
-
return {
|
|
839
|
-
...raw,
|
|
840
|
-
hidden: raw.hidden ?? [],
|
|
841
|
-
displayId: raw.displayId ?? opts2.preferredDisplayId ?? d.displayId
|
|
842
|
-
};
|
|
843
|
-
},
|
|
844
|
-
async screenshot(opts2) {
|
|
845
|
-
const d = cu.display.getSize(opts2.displayId);
|
|
846
|
-
const [targetW, targetH] = computeTargetDims(d.width, d.height, d.scaleFactor);
|
|
847
|
-
return drainRunLoop(() => cu.screenshot.captureExcluding(withoutTerminal(opts2.allowedBundleIds), SCREENSHOT_JPEG_QUALITY, targetW, targetH, opts2.displayId));
|
|
848
|
-
},
|
|
849
|
-
async zoom(regionLogical, allowedBundleIds, displayId) {
|
|
850
|
-
const d = cu.display.getSize(displayId);
|
|
851
|
-
const [outW, outH] = computeTargetDims(regionLogical.w, regionLogical.h, d.scaleFactor);
|
|
852
|
-
return drainRunLoop(() => cu.screenshot.captureRegion(withoutTerminal(allowedBundleIds), regionLogical.x, regionLogical.y, regionLogical.w, regionLogical.h, outW, outH, SCREENSHOT_JPEG_QUALITY, displayId));
|
|
853
|
-
},
|
|
854
|
-
async key(keySequence, repeat) {
|
|
855
|
-
const input = requireComputerUseInput();
|
|
856
|
-
const parts = keySequence.split("+").filter((p) => p.length > 0);
|
|
857
|
-
const isEsc = isBareEscape(parts);
|
|
858
|
-
const n = repeat ?? 1;
|
|
859
|
-
await drainRunLoop(async () => {
|
|
860
|
-
for (let i = 0;i < n; i++) {
|
|
861
|
-
if (i > 0) {
|
|
862
|
-
await sleep(8);
|
|
863
|
-
}
|
|
864
|
-
if (isEsc) {
|
|
865
|
-
notifyExpectedEscape();
|
|
866
|
-
}
|
|
867
|
-
await input.keys(parts);
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
|
-
},
|
|
871
|
-
async holdKey(keyNames, durationMs) {
|
|
872
|
-
const input = requireComputerUseInput();
|
|
873
|
-
const pressed = [];
|
|
874
|
-
let orphaned = false;
|
|
875
|
-
try {
|
|
876
|
-
await drainRunLoop(async () => {
|
|
877
|
-
for (const k of keyNames) {
|
|
878
|
-
if (orphaned)
|
|
879
|
-
return;
|
|
880
|
-
if (isBareEscape([k])) {
|
|
881
|
-
notifyExpectedEscape();
|
|
882
|
-
}
|
|
883
|
-
await input.key(k, "press");
|
|
884
|
-
pressed.push(k);
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
await sleep(durationMs);
|
|
888
|
-
} finally {
|
|
889
|
-
orphaned = true;
|
|
890
|
-
await drainRunLoop(() => releasePressed(input, pressed));
|
|
891
|
-
}
|
|
892
|
-
},
|
|
893
|
-
async type(text, opts2) {
|
|
894
|
-
const input = requireComputerUseInput();
|
|
895
|
-
if (opts2.viaClipboard) {
|
|
896
|
-
await drainRunLoop(() => typeViaClipboard(input, text));
|
|
897
|
-
return;
|
|
898
|
-
}
|
|
899
|
-
await input.typeText(text);
|
|
900
|
-
},
|
|
901
|
-
readClipboard: readClipboardViaPbpaste,
|
|
902
|
-
writeClipboard: writeClipboardViaPbcopy,
|
|
903
|
-
async moveMouse(x, y) {
|
|
904
|
-
await moveAndSettle(requireComputerUseInput(), x, y);
|
|
905
|
-
},
|
|
906
|
-
async click(x, y, button, count, modifiers) {
|
|
907
|
-
const input = requireComputerUseInput();
|
|
908
|
-
await moveAndSettle(input, x, y);
|
|
909
|
-
if (modifiers && modifiers.length > 0) {
|
|
910
|
-
await drainRunLoop(() => withModifiers(input, modifiers, () => input.mouseButton(button, "click", count)));
|
|
911
|
-
} else {
|
|
912
|
-
await input.mouseButton(button, "click", count);
|
|
913
|
-
}
|
|
914
|
-
},
|
|
915
|
-
async mouseDown() {
|
|
916
|
-
await requireComputerUseInput().mouseButton("left", "press");
|
|
917
|
-
},
|
|
918
|
-
async mouseUp() {
|
|
919
|
-
await requireComputerUseInput().mouseButton("left", "release");
|
|
920
|
-
},
|
|
921
|
-
async getCursorPosition() {
|
|
922
|
-
return requireComputerUseInput().mouseLocation();
|
|
923
|
-
},
|
|
924
|
-
async drag(from, to) {
|
|
925
|
-
const input = requireComputerUseInput();
|
|
926
|
-
if (from !== undefined) {
|
|
927
|
-
await moveAndSettle(input, from.x, from.y);
|
|
928
|
-
}
|
|
929
|
-
await input.mouseButton("left", "press");
|
|
930
|
-
await sleep(MOVE_SETTLE_MS);
|
|
931
|
-
try {
|
|
932
|
-
await animatedMove(input, to.x, to.y, getMouseAnimationEnabled());
|
|
933
|
-
} finally {
|
|
934
|
-
await input.mouseButton("left", "release");
|
|
935
|
-
}
|
|
936
|
-
},
|
|
937
|
-
async scroll(x, y, dx, dy) {
|
|
938
|
-
const input = requireComputerUseInput();
|
|
939
|
-
await moveAndSettle(input, x, y);
|
|
940
|
-
if (dy !== 0) {
|
|
941
|
-
await input.mouseScroll(dy, "vertical");
|
|
942
|
-
}
|
|
943
|
-
if (dx !== 0) {
|
|
944
|
-
await input.mouseScroll(dx, "horizontal");
|
|
945
|
-
}
|
|
946
|
-
},
|
|
947
|
-
async getFrontmostApp() {
|
|
948
|
-
const info = requireComputerUseInput().getFrontmostAppInfo();
|
|
949
|
-
if (!info || !info.bundleId)
|
|
950
|
-
return null;
|
|
951
|
-
return { bundleId: info.bundleId, displayName: info.appName };
|
|
952
|
-
},
|
|
953
|
-
async appUnderPoint(x, y) {
|
|
954
|
-
return cu.apps.appUnderPoint(x, y);
|
|
955
|
-
},
|
|
956
|
-
async listInstalledApps() {
|
|
957
|
-
return drainRunLoop(() => cu.apps.listInstalled());
|
|
958
|
-
},
|
|
959
|
-
async getAppIcon(path) {
|
|
960
|
-
return cu.apps.iconDataUrl(path) ?? undefined;
|
|
961
|
-
},
|
|
962
|
-
async listRunningApps() {
|
|
963
|
-
return cu.apps.listRunning();
|
|
964
|
-
},
|
|
965
|
-
async openApp(bundleId) {
|
|
966
|
-
await cu.apps.open(bundleId);
|
|
967
|
-
}
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
async function unhideComputerUseApps(bundleIds) {
|
|
971
|
-
if (bundleIds.length === 0)
|
|
972
|
-
return;
|
|
973
|
-
const cu = requireComputerUseSwift();
|
|
974
|
-
await cu.apps.unhide([...bundleIds]);
|
|
975
|
-
}
|
|
976
|
-
var SCREENSHOT_JPEG_QUALITY = 0.75, MOVE_SETTLE_MS = 50;
|
|
977
|
-
var init_executor = __esm(() => {
|
|
978
|
-
init_src();
|
|
979
|
-
init_debug();
|
|
980
|
-
init_errors();
|
|
981
|
-
init_execFileNoThrow();
|
|
982
|
-
init_sleep();
|
|
983
|
-
init_common();
|
|
984
|
-
init_drainRunLoop();
|
|
985
|
-
init_escHotkey();
|
|
986
|
-
init_inputLoader();
|
|
987
|
-
init_swiftLoader();
|
|
988
|
-
});
|
|
989
|
-
|
|
990
|
-
export { createCliExecutor, unhideComputerUseApps, init_executor };
|