@kaeawc/auto-mobile 0.0.93 → 0.0.94

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.
Files changed (228) hide show
  1. package/dist/build-info.json +12 -12
  2. package/dist/src/ble-peripheral.py +153 -0
  3. package/dist/src/{chunk-r6z1eztj.js → chunk-026y62r9.js} +11 -11
  4. package/dist/src/chunk-0jyfg947.js +4 -0
  5. package/dist/src/{chunk-8g1922rp.js → chunk-0zfpp1wh.js} +4 -4
  6. package/dist/src/{chunk-qf6nynk6.js → chunk-13qxf7ym.js} +5 -5
  7. package/dist/src/chunk-1scenrk7.js +4 -0
  8. package/dist/src/chunk-1vb5ph1k.js +4 -0
  9. package/dist/src/{chunk-710rxz9y.js → chunk-20g565q7.js} +3 -3
  10. package/dist/src/chunk-21h6dhdm.js +5 -0
  11. package/dist/src/chunk-25mfpthk.js +78 -0
  12. package/dist/src/{chunk-rbpdk7m0.js → chunk-2b39zyxc.js} +3 -3
  13. package/dist/src/chunk-2gzd6wbd.js +4 -0
  14. package/dist/src/{chunk-xgan0qqp.js → chunk-3dntffy9.js} +1 -1
  15. package/dist/src/chunk-3gfczcsn.js +4 -0
  16. package/dist/src/{chunk-dgrbdpb7.js → chunk-3h5jz1vb.js} +6 -6
  17. package/dist/src/{chunk-t6c8akcm.js → chunk-41zcy6b3.js} +3 -3
  18. package/dist/src/chunk-47n9m2de.js +4 -0
  19. package/dist/src/chunk-4vxeq0vd.js +58 -0
  20. package/dist/src/chunk-59dx6qaf.js +4 -0
  21. package/dist/src/chunk-5sdf9y92.js +4 -0
  22. package/dist/src/{chunk-58wzr3mt.js → chunk-5wk1t46v.js} +3 -3
  23. package/dist/src/{chunk-vy3bwm1d.js → chunk-661c50hh.js} +5 -5
  24. package/dist/src/chunk-68n6bjjd.js +21 -0
  25. package/dist/src/{chunk-v6pya0dm.js → chunk-69pmjdf2.js} +3 -3
  26. package/dist/src/{chunk-e98dqnc9.js → chunk-6hrj3jt6.js} +20 -20
  27. package/dist/src/{chunk-wbh8spm5.js → chunk-6myr26wx.js} +8 -8
  28. package/dist/src/chunk-6n96k09n.js +4 -0
  29. package/dist/src/chunk-6vwrbkre.js +4 -0
  30. package/dist/src/chunk-6wk0yrab.js +4 -0
  31. package/dist/src/chunk-6yhm9een.js +4 -0
  32. package/dist/src/{chunk-mjrps0ac.js → chunk-7k7gjg2t.js} +5 -5
  33. package/dist/src/chunk-7n5fz68h.js +4 -0
  34. package/dist/src/chunk-8cvnpnbp.js +4 -0
  35. package/dist/src/chunk-8kzv7rk7.js +4 -0
  36. package/dist/src/chunk-8nj68t1v.js +167 -0
  37. package/dist/src/{chunk-g7tmjbkt.js → chunk-96r3bpg7.js} +3 -3
  38. package/dist/src/chunk-97x887te.js +4 -0
  39. package/dist/src/{chunk-8ph29g99.js → chunk-99a6tbvd.js} +1 -1
  40. package/dist/src/chunk-9p5d2994.js +5 -0
  41. package/dist/src/{chunk-aabchzxk.js → chunk-9q265er0.js} +4 -4
  42. package/dist/src/{chunk-jh6vhqzx.js → chunk-9xgnrv5w.js} +3 -3
  43. package/dist/src/chunk-9xgsmshb.js +5 -0
  44. package/dist/src/chunk-a02d1wgv.js +4 -0
  45. package/dist/src/{chunk-ndt1ccxm.js → chunk-a9ps00a1.js} +10 -10
  46. package/dist/src/{chunk-5d2hft6c.js → chunk-aewdveet.js} +3 -3
  47. package/dist/src/{chunk-ycaj2sgf.js → chunk-b3tdtq7r.js} +6 -6
  48. package/dist/src/chunk-bn7jx7a2.js +4 -0
  49. package/dist/src/{chunk-3y6eykz9.js → chunk-bnyw27ja.js} +2 -2
  50. package/dist/src/{chunk-rqc9ap3x.js → chunk-bpwsg76p.js} +2 -2
  51. package/dist/src/chunk-bvranw3g.js +4 -0
  52. package/dist/src/chunk-c25a84zb.js +4 -0
  53. package/dist/src/chunk-c27yv1dx.js +5 -0
  54. package/dist/src/chunk-c3ewxm4x.js +5 -0
  55. package/dist/src/{chunk-rvvy1bte.js → chunk-cb1ga9rd.js} +5 -5
  56. package/dist/src/chunk-cn7fwy7k.js +4 -0
  57. package/dist/src/chunk-cnvy4a64.js +4 -0
  58. package/dist/src/{chunk-7rz9898k.js → chunk-cqhw4yr6.js} +3 -3
  59. package/dist/src/{chunk-g04bwyj3.js → chunk-ctmfshjc.js} +2 -2
  60. package/dist/src/chunk-ctwmhz13.js +4 -0
  61. package/dist/src/{chunk-waqwcjyn.js → chunk-d3jx9bz5.js} +2 -2
  62. package/dist/src/{chunk-ayp07wbb.js → chunk-d6rb08ga.js} +1 -1
  63. package/dist/src/chunk-ddqhj4eg.js +5 -0
  64. package/dist/src/{chunk-r7bpkgff.js → chunk-ddrhs1c3.js} +2 -2
  65. package/dist/src/chunk-dnjnh9p6.js +4 -0
  66. package/dist/src/{chunk-wyrkw6hw.js → chunk-dw5rwgya.js} +3 -3
  67. package/dist/src/{chunk-3xkpk44w.js → chunk-e0870khr.js} +3 -3
  68. package/dist/src/chunk-ea3k10kj.js +4 -0
  69. package/dist/src/chunk-emv82m1w.js +7 -0
  70. package/dist/src/chunk-f3m6pdnx.js +4 -0
  71. package/dist/src/chunk-f84z32cb.js +4 -0
  72. package/dist/src/chunk-fpczgf0z.js +4 -0
  73. package/dist/src/{chunk-2tqzq5qh.js → chunk-g2js4c2v.js} +18 -18
  74. package/dist/src/chunk-g3af2qbk.js +5 -0
  75. package/dist/src/{chunk-3qwrzxh0.js → chunk-gadtna7s.js} +6 -6
  76. package/dist/src/{chunk-ybbtagbt.js → chunk-gcyx407v.js} +3 -3
  77. package/dist/src/{chunk-bfw6125s.js → chunk-gfpntwc1.js} +3 -3
  78. package/dist/src/chunk-gmnm5e3e.js +4 -0
  79. package/dist/src/chunk-gp6vb5gf.js +4 -0
  80. package/dist/src/chunk-gppgy7pa.js +4 -0
  81. package/dist/src/chunk-hegfz0ae.js +5 -0
  82. package/dist/src/chunk-hpzxdp1k.js +17 -0
  83. package/dist/src/{chunk-qcxzr2my.js → chunk-j69g8b50.js} +3 -3
  84. package/dist/src/chunk-jvstjnqm.js +19 -0
  85. package/dist/src/chunk-jzqrv78s.js +4 -0
  86. package/dist/src/chunk-k2948b8d.js +4 -0
  87. package/dist/src/chunk-k4ftd40d.js +4 -0
  88. package/dist/src/{chunk-bxmsax22.js → chunk-kd9vfaxh.js} +3 -3
  89. package/dist/src/{chunk-s3jc6cwp.js → chunk-kdczmgwk.js} +3 -3
  90. package/dist/src/{chunk-t6bfvfkg.js → chunk-ke3wn14v.js} +1 -1
  91. package/dist/src/chunk-kh5n7m6w.js +4 -0
  92. package/dist/src/{chunk-6wt9rgjf.js → chunk-khejfph4.js} +3 -3
  93. package/dist/src/chunk-kny2xemh.js +4 -0
  94. package/dist/src/chunk-knyzw9md.js +4 -0
  95. package/dist/src/chunk-mbzpt2hp.js +4 -0
  96. package/dist/src/chunk-mm8rcxad.js +4 -0
  97. package/dist/src/chunk-nc4516tx.js +4 -0
  98. package/dist/src/{chunk-6bznss4t.js → chunk-ntfrqrqn.js} +5 -5
  99. package/dist/src/chunk-nz5h2j52.js +4 -0
  100. package/dist/src/chunk-p22s97qy.js +4 -0
  101. package/dist/src/chunk-p9kt1sgr.js +6 -0
  102. package/dist/src/{chunk-yb97j25b.js → chunk-pf282r5g.js} +4 -4
  103. package/dist/src/chunk-pnd4mrxy.js +4 -0
  104. package/dist/src/chunk-pqqteyj6.js +4 -0
  105. package/dist/src/{chunk-6xmss8er.js → chunk-qj1tbnv2.js} +6 -6
  106. package/dist/src/chunk-qnh9egwr.js +4 -0
  107. package/dist/src/chunk-qy3khhf8.js +8 -0
  108. package/dist/src/{chunk-z637nqg8.js → chunk-r0vp315h.js} +6 -6
  109. package/dist/src/chunk-r4j43b9s.js +237 -0
  110. package/dist/src/{chunk-1p7xf5kb.js → chunk-r54cxxze.js} +3 -3
  111. package/dist/src/{chunk-yf7ympyz.js → chunk-r6pvhj33.js} +92 -92
  112. package/dist/src/chunk-rb7aa5gr.js +54 -0
  113. package/dist/src/chunk-rdj50kb4.js +4 -0
  114. package/dist/src/chunk-rnd4vcas.js +4 -0
  115. package/dist/src/{chunk-w5b2jwk3.js → chunk-s3y3zfcx.js} +8 -8
  116. package/dist/src/chunk-s4g43k75.js +5 -0
  117. package/dist/src/chunk-sfqe223f.js +311 -0
  118. package/dist/src/{chunk-284ptqa4.js → chunk-sqdrxjw5.js} +5 -5
  119. package/dist/src/{chunk-zgja5f3p.js → chunk-t54k47em.js} +4 -4
  120. package/dist/src/{chunk-3sy6ahhz.js → chunk-tek4pnvv.js} +10 -10
  121. package/dist/src/chunk-tn74y7af.js +4 -0
  122. package/dist/src/{chunk-thbh3jew.js → chunk-tvq0nzam.js} +3 -3
  123. package/dist/src/{chunk-0jrrsnc9.js → chunk-tx4f0h9c.js} +4 -4
  124. package/dist/src/chunk-vdqag3fj.js +5 -0
  125. package/dist/src/chunk-vz5zzs57.js +4 -0
  126. package/dist/src/chunk-w4s2vfpj.js +4 -0
  127. package/dist/src/{chunk-4hw3665t.js → chunk-w5yypt53.js} +11 -11
  128. package/dist/src/{chunk-8037tzzj.js → chunk-w68v64vh.js} +3 -3
  129. package/dist/src/chunk-whwj0pdk.js +5 -0
  130. package/dist/src/chunk-wnmqt1dc.js +4 -0
  131. package/dist/src/{chunk-cyy71ggq.js → chunk-wpe46vsa.js} +3 -3
  132. package/dist/src/{chunk-w3vs79ex.js → chunk-wxdjeb4k.js} +19 -19
  133. package/dist/src/chunk-xcqzwf9j.js +247 -0
  134. package/dist/src/chunk-xezekwwn.js +5 -0
  135. package/dist/src/chunk-xf19m15s.js +4 -0
  136. package/dist/src/chunk-xghbxha4.js +4 -0
  137. package/dist/src/{chunk-00167wan.js → chunk-xn9m3xc2.js} +5 -5
  138. package/dist/src/{chunk-26k317v5.js → chunk-yqfz4vts.js} +3 -3
  139. package/dist/src/chunk-z8tvs8nk.js +5 -0
  140. package/dist/src/chunk-zm2rehqb.js +5 -0
  141. package/dist/src/chunk-zs6dqm35.js +4 -0
  142. package/dist/src/daemon/processEntry.js +2 -2
  143. package/dist/src/index.js +4 -4
  144. package/dist/src/runtime/bunRuntimeGuard.js +2 -2
  145. package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -2
  146. package/package.json +2 -2
  147. package/dist/src/chunk-0n6swkwg.js +0 -5
  148. package/dist/src/chunk-0qsy1qsx.js +0 -57
  149. package/dist/src/chunk-11m8wj8j.js +0 -237
  150. package/dist/src/chunk-23p5f095.js +0 -4
  151. package/dist/src/chunk-28re4xrg.js +0 -4
  152. package/dist/src/chunk-2f9rkmhx.js +0 -5
  153. package/dist/src/chunk-2fxdh48t.js +0 -4
  154. package/dist/src/chunk-2tbdrbt6.js +0 -4
  155. package/dist/src/chunk-32gvv9b4.js +0 -21
  156. package/dist/src/chunk-3f3t1x97.js +0 -8
  157. package/dist/src/chunk-3fspkbc7.js +0 -4
  158. package/dist/src/chunk-3vg455e6.js +0 -4
  159. package/dist/src/chunk-49bsqdx3.js +0 -4
  160. package/dist/src/chunk-5snsn9cf.js +0 -4
  161. package/dist/src/chunk-5tm9mn47.js +0 -54
  162. package/dist/src/chunk-5zc77a5t.js +0 -4
  163. package/dist/src/chunk-64j0majr.js +0 -19
  164. package/dist/src/chunk-65y8v4td.js +0 -17
  165. package/dist/src/chunk-6awz7vhq.js +0 -5
  166. package/dist/src/chunk-6ep7f5ge.js +0 -4
  167. package/dist/src/chunk-7cs2da62.js +0 -5
  168. package/dist/src/chunk-7g103b54.js +0 -4
  169. package/dist/src/chunk-7j5vj4pa.js +0 -4
  170. package/dist/src/chunk-7tw8x05v.js +0 -4
  171. package/dist/src/chunk-7zy586cb.js +0 -4
  172. package/dist/src/chunk-84nanf8s.js +0 -5
  173. package/dist/src/chunk-8gvwcv2p.js +0 -4
  174. package/dist/src/chunk-8thrmfat.js +0 -4
  175. package/dist/src/chunk-8zgzzs7k.js +0 -78
  176. package/dist/src/chunk-97b1zmaq.js +0 -4
  177. package/dist/src/chunk-9fth9ayh.js +0 -4
  178. package/dist/src/chunk-9j6anhjr.js +0 -4
  179. package/dist/src/chunk-bfjwqk8q.js +0 -4
  180. package/dist/src/chunk-bnhscm2n.js +0 -4
  181. package/dist/src/chunk-c1vs4g1n.js +0 -4
  182. package/dist/src/chunk-ct3e7yng.js +0 -4
  183. package/dist/src/chunk-ddzkz92z.js +0 -4
  184. package/dist/src/chunk-drdz8hee.js +0 -5
  185. package/dist/src/chunk-eersndy7.js +0 -5
  186. package/dist/src/chunk-eggq53ks.js +0 -4
  187. package/dist/src/chunk-f2dya7cs.js +0 -4
  188. package/dist/src/chunk-fbakd6cw.js +0 -4
  189. package/dist/src/chunk-fgb98zjj.js +0 -5
  190. package/dist/src/chunk-fmpad823.js +0 -5
  191. package/dist/src/chunk-g0xr8zw0.js +0 -4
  192. package/dist/src/chunk-g3rjs80x.js +0 -4
  193. package/dist/src/chunk-g78rtrfv.js +0 -4
  194. package/dist/src/chunk-gabgv3y5.js +0 -4
  195. package/dist/src/chunk-gmr45m8f.js +0 -4
  196. package/dist/src/chunk-gsyfebqj.js +0 -4
  197. package/dist/src/chunk-h5rpn9wr.js +0 -247
  198. package/dist/src/chunk-hb1x7v55.js +0 -4
  199. package/dist/src/chunk-hrfytkxh.js +0 -168
  200. package/dist/src/chunk-j4yjzbak.js +0 -4
  201. package/dist/src/chunk-jd6a5v6p.js +0 -5
  202. package/dist/src/chunk-kn5spq15.js +0 -4
  203. package/dist/src/chunk-m94qs0f0.js +0 -4
  204. package/dist/src/chunk-n03dmn5q.js +0 -5
  205. package/dist/src/chunk-n72qhwd9.js +0 -4
  206. package/dist/src/chunk-nr6y0n4y.js +0 -5
  207. package/dist/src/chunk-pcsen2vs.js +0 -4
  208. package/dist/src/chunk-ppfr0b8h.js +0 -4
  209. package/dist/src/chunk-q10bdnat.js +0 -4
  210. package/dist/src/chunk-q9xmq595.js +0 -4
  211. package/dist/src/chunk-qyqypn28.js +0 -5
  212. package/dist/src/chunk-r2epb56s.js +0 -4
  213. package/dist/src/chunk-r5bxavdx.js +0 -311
  214. package/dist/src/chunk-r8jf3d92.js +0 -4
  215. package/dist/src/chunk-rc0dbypm.js +0 -4
  216. package/dist/src/chunk-rhcty4ms.js +0 -4
  217. package/dist/src/chunk-rpvckv3p.js +0 -4
  218. package/dist/src/chunk-ry0mz41y.js +0 -4
  219. package/dist/src/chunk-sfv61xjb.js +0 -6
  220. package/dist/src/chunk-t7w8rctc.js +0 -4
  221. package/dist/src/chunk-v2wd4n3e.js +0 -5
  222. package/dist/src/chunk-w4zga19f.js +0 -4
  223. package/dist/src/chunk-w7hkv422.js +0 -5
  224. package/dist/src/chunk-xa73x2cx.js +0 -5
  225. package/dist/src/chunk-y2vs6jwg.js +0 -4
  226. package/dist/src/chunk-yattm52s.js +0 -4
  227. package/dist/src/chunk-yjawdzk8.js +0 -4
  228. package/dist/src/chunk-zs1sghs9.js +0 -4
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{it}from"./chunk-r5bxavdx.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{it as IosCtrlProxyBuilder};
3
-
4
- //# debugId=9943A18F1B1E11A164756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{Tr,gt,ct,pe,ge,yV,pee,Fh}from"./chunk-e98dqnc9.js";import{f,Be,Pae}from"./chunk-58wzr3mt.js";import{i,e}from"./chunk-z637nqg8.js";import{Dr,N}from"./chunk-r5bxavdx.js";import{sS,Qi}from"./chunk-h5rpn9wr.js";import{FS}from"./chunk-hrfytkxh.js";import{NQ,Xy,Z4,Zy,Q4,ph,D0,m_,LQ}from"./chunk-64j0majr.js";import{n,a,Me,S,s,aP,Ne,_}from"./chunk-4hw3665t.js";import{r,t}from"./chunk-rbpdk7m0.js";var H="Invalid tools/call request: ",X="Invalid tools/call result: ",Z="AutoMobile drives Android and iOS devices. Start with listDevices, getAndroid or getApple, then bind your session. Call observe before acting and again after each action; element ids are only valid for the observation that returned them. Prefer tapOn/sendKeys on observed elements over raw coordinates. Large artifacts (screenshots, logs) are resources, not inline output. Read the automobile usage skill (skill://auto-mobile-usage/SKILL.md) for the full workflow before your first device call.";function ee(o=process.env){return Be(f.SERVER_INSTRUCTIONS,o)?Z:void 0}function rM(o,c,l={}){let{cacheHints:d,requestState:u,instructions:m=ee()}=l,p=new Fh(o,{capabilities:{...c,prompts:void 0},...d&&{cacheHints:d},...u&&{requestState:u},...m!==void 0&&{instructions:m}});if(c.prompts)p.server.registerCapabilities({prompts:c.prompts});return te(p.server),p}class q{result;constructor(o){this.result=o}}function te(o){let c=o._wrapHandler.bind(o);o._wrapHandler=(l,d)=>{if(l!=="tools/call")return c(l,(m,p)=>d(m,L(p)));let u=c(l,async(m,p)=>{let v=await d(m,L(p));if(ph(v))throw new q(v);return v});return async(m,p)=>{try{return await u(m,p)}catch(v){if(v instanceof q)return v.result;throw re(v)}}}}function re(o){if(!(o instanceof ge)||o instanceof Qi||o.code!==pe.InvalidParams)return o;if(o.message.startsWith(H))return new ge(sS.InternalError,o.message.slice(H.length),o.data);if(o.message.startsWith(X))return new Qi(sS.InvalidParams,o.message,o.data);return o}function L(o){return{...o,mcpReq:{...o.mcpReq,signal:oe(o.mcpReq.signal)}}}function oe(o){let c=new AbortController,l=()=>{c.abort(ne(o.reason)?void 0:o.reason)};if(o.aborted)l();else o.addEventListener("abort",l,{once:!0});return c.signal}function ne(o){return o instanceof ct&&o.code===gt.ConnectionClosed}var D="x-auto-mobile-mcp-session-id";function xU(o){let c=o["x-auto-mobile-mcp-session-id"],l=Array.isArray(c)?c[0]:c;return typeof l==="string"&&l.length>0?l:void 0}var w=s({version:_(1),toolName:n(),argumentsHash:n(),deviceIds:S(n())}),ie={createSecret:()=>crypto.getRandomValues(new Uint8Array(32))},z=600000,ae=w.extend({expiresAt:a().finite()});function se(o){let c=xU({[D]:o.http?.req?.headers.get(D)??void 0});return JSON.stringify(["ambiguous-device",c??null])}function ce(o={}){let c=o.timer??i,l,d=()=>(l??=NQ({key:(o.secretProvider??ie).createSecret(),ttlSeconds:z/1000,bind:se}),l);return{mint:(u,m)=>d().mint({...u,expiresAt:c.now()+z},m),verify:async(u,m)=>{let p=ae.parse(await d().verify(u,m));if(c.now()>=p.expiresAt)throw Error("expired");return w.parse(p)}}}var CU=ce();import{createHash as Se}from"crypto";function PE(o=process.env){return Pae(f.ELICITATION,o)!=="off"}class h{declined=new Set;static key(o){return[...new Set(o)].sort().join("\x00")}remembers(o){return this.declined.has(h.key(o))}remember(o){this.declined.add(h.key(o))}}function j(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function TP(o){let c=j(o)?o.elicitation:void 0;if(!j(c))return"none";if(c.form!==void 0)return"form";return c.url!==void 0?"url":"bare"}function le(o){return`[elicitation] ${o.toolName} era=${o.era} declared=${o.declared} outcome=${o.outcome} candidates=${o.candidateCount}`+(o.latencyMs===void 0?"":` latencyMs=${o.latencyMs}`)}var B={record:(o)=>e.info(le(o))};function OJ(o){return{record(c){B.record(c),o.recordElicitationEvent(c)}}}var K=B;function MJ(o){K=o}var AE={record:(o)=>K.record(o)};var de=20000;function U(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function nM(o){let c=U(o)?o.elicitation:void 0;if(!U(c))return!1;return c.form!==void 0||c.url===void 0}function V(o,c){return{declaresElicitation:()=>c.mcpReq.envelope===void 0&&nM(o.server.getClientCapabilities()),declaration:()=>c.mcpReq.envelope===void 0?TP(o.server.getClientCapabilities()):"none",elicit:(l,d)=>o.server.request({method:"elicitation/create",params:l},{signal:d})}}var ue=s({isError:_(!0),content:S(aP({type:n()})).min(1)}),me=s({code:_(FS),candidates:S(s({deviceId:n(),platform:n().default("unknown")}))}),fe=s({type:_("text"),text:n()});function ve(o){let c=ue.safeParse(o),l=c.success?fe.safeParse(c.data.content[0]):void 0;if(!l?.success||!l.data.text.includes(FS))return;try{let d=me.safeParse(JSON.parse(l.data.text));return d.success?d.data:void 0}catch(d){e.debug(`ambiguous device result is not JSON: ${r(d)}`);return}}function b(o){let c=new Map((ve(o)?.candidates??[]).map((l)=>[l.deviceId,l]));return c.size>1?[...c.values()]:void 0}function I(o,c){return{mode:"form",message:`${o} matched ${c.length} devices. Which device should it use?`,requestedSchema:{type:"object",properties:{deviceId:{type:"string",title:"Device",description:"The device this call should run on.",oneOf:c.map(({deviceId:l,platform:d})=>({const:l,title:`${l} (${d})`}))}},required:["deviceId"]}}}function ye(o,c){if(o.action!=="accept")return;let l=o.content?.deviceId;return typeof l==="string"&&c.some(({deviceId:d})=>d===l)?l:void 0}function Re(o,c){if(o.action!=="accept")return{outcome:o.action};let l=ye(o,c);return l===void 0?{outcome:"invalid"}:{outcome:"accept",deviceId:l}}async function Ce(o,c,l,d){let u=new AbortController,m=!1,p=()=>u.abort();d.callSignal.addEventListener("abort",p,{once:!0});let v=d.timer.setTimeout(()=>{m=!0,p()},d.timeoutMs);try{let g=await o.elicit(I(c,l),u.signal);return Re(g,l)}catch(g){if(u.signal.aborted)return e.debug(`device choice for ${c} not answered: ${r(g)}`),{outcome:m?"timeout":"cancel"};return e.warn(`device choice elicitation for ${c} failed: ${r(g)}`,g),{outcome:"error"}}finally{d.timer.clearTimeout(v),d.callSignal.removeEventListener("abort",p)}}function F(o,c,l={}){let d=l.timer??i,u=l.timeoutMs??de,m=l.recorder??AE,p=()=>c.declaration?.()??(c.declaresElicitation()?"form":"none"),v=l.enabled??(()=>PE()),g=(R,C,E)=>m.record({toolName:R.name,era:"legacy",declared:p(),outcome:E,candidateCount:C,atMs:d.now()}),y=(R)=>{if(!v())return"disabled";if(!c.declaresElicitation())return"not_offered";return l.declines?.remembers(R)?"remembered":void 0};return{...o,execute:async(R)=>{let C=await o.execute(R),E=R.args.deviceId===void 0?b(C):void 0;if(!E)return C;let x=E.map(({deviceId:Y})=>Y),A=y(x);if(A)return g(R,E.length,A),C;let Q=d.now(),T=await Ce(c,R.name,E,{timer:d,timeoutMs:u,callSignal:R.extra.signal}),O=d.now();if(m.record({toolName:R.name,era:"legacy",declared:p(),outcome:T.outcome,candidateCount:E.length,atMs:O,latencyMs:O-Q}),T.outcome==="decline"||T.outcome==="cancel")l.declines?.remember(x);return T.deviceId===void 0?C:o.execute({...R,args:{...R.args,deviceId:T.deviceId}})}}}async function DU(o,c,l,d){let u=await c(o),m=b(u);if(!m)return u;let p=d?.timer??i,v=p.now(),g=(C,E)=>{let x=p.now();d?.recorder.record({toolName:o.name,era:"modern",declared:d.declared,outcome:C,candidateCount:m.length,atMs:x,...E?{latencyMs:x-v}:{}})},y=await l({candidates:m,inputRequests:{deviceChoice:yV.elicit(I(o.name,m))}});if(!y)return g("not_offered",!1),u;if("pending"in y)return g("asked",!1),y.pending;let R=pee(y.responses,"deviceChoice",s({deviceId:n().refine((C)=>m.some(({deviceId:E})=>E===C)&&(y.offeredDeviceIds===void 0||y.offeredDeviceIds.includes(C)))}));return g(R?"accept":Ee(y.responses),!0),R?c({...o,args:{...o.args,deviceId:R.deviceId}}):u}function Ee(o){let c=o.deviceChoice,l=typeof c==="object"&&c!==null&&"action"in c?c.action:void 0;return l==="decline"||l==="cancel"?l:"invalid"}function W(o,c=AE,l=()=>PE()){return{...o,execute:async(d)=>{let u=!l();if(d.args.deviceId!==void 0||u||!nM(d.extra.envelope?.[Tr])){let v=await o.execute(d),g=d.args.deviceId===void 0&&b(v);if(g)xe(c,d,g.length,u?"disabled":"not_offered");return v}let m={...d.args};delete m.deviceId;let p=Se("sha256").update(Dr(m)).digest("hex");return DU(d,(v)=>o.execute(v),async({candidates:v,inputRequests:g})=>{if(d.extra.inputResponses!==void 0){let y=w.safeParse(d.extra.deviceChoiceState?.verified);if(!y.success||y.data.toolName!==d.name||y.data.argumentsHash!==p)return;return{responses:d.extra.inputResponses,offeredDeviceIds:y.data.deviceIds}}if(!d.extra.deviceChoiceState)return;return{pending:yV({requestState:await d.extra.deviceChoiceState.mint({version:1,toolName:d.name,argumentsHash:p,deviceIds:v.map(({deviceId:y})=>y)}),inputRequests:g})}},{recorder:c,declared:TP(d.extra.envelope?.[Tr])})}}}function xe(o,c,l,d){o.record({toolName:c.name,era:"modern",declared:TP(c.extra.envelope?.[Tr]),outcome:d,candidateCount:l,atMs:i.now()})}function Te(o,c){let l=o._meta?.progressToken;if(l===void 0)return;return async(d,u,m)=>{try{await o.sendNotification({method:"notifications/progress",params:{progressToken:l,progress:d,total:u,...m&&{message:m}}})}catch(p){e.warn(`${c}: ${p}`)}}}async function he(o,c,l){l.prepare?.(o);let d=o.params.name,u=o.params.arguments||{};if(!d)throw new t("Tool name is missing in the request");return l.execute({name:d,args:u,progressToken:c._meta?.progressToken,progress:Te(c,l.progressFailureMessage),extra:c})}function be(o,c){return{signal:o.mcpReq.signal,_meta:o.mcpReq._meta,...o.mcpReq.envelope!==void 0&&{envelope:o.mcpReq.envelope},...o.mcpReq.inputResponses!==void 0&&{inputResponses:o.mcpReq.inputResponses},...c&&{deviceChoiceState:{verified:o.mcpReq.requestState(),mint:(l)=>c.mint(l,o)}},sendNotification:(l)=>o.mcpReq.notify(l)}}function iM(o,c,l={}){let d=new h,u=l.era==="modern"?W(c):c,m=l.era==="modern"?l.deviceChoiceRequestState??CU:void 0;o.server.setRequestHandler("tools/call",async(p,v)=>await he(p,be(v,m),l.era!=="modern"&&l.ambiguousDeviceElicitation?F(c,V(o,v),{declines:d,...l.ambiguousDeviceElicitation}):u))}function Vb(o,c=N.isToolResultsNoStructuredContentEnabled()){if(!o)return"no-schema";if(c)return"flag";return null}function jK(o){return o!==null&&typeof o==="object"&&"structuredContent"in o}function Wb(o,c){if(c!==null&&jK(o))delete o.structuredContent;return o}var J=aP({taskId:n()}),we=aP({taskId:n(),inputResponses:Ne(n(),Me()).optional()});function KK(o){let c=o._oninitialize.bind(o);o.setRequestHandler("initialize",async(l,d)=>{let u=await c(l);if(!(Q4(l.params.capabilities)||G(d)))return u;return{...u,capabilities:{...u.capabilities,extensions:{...u.capabilities.extensions,[Xy]:{}}}}})}function G(o){return Zy({envelope:o.mcpReq.envelope,meta:o.mcpReq._meta})}function M(o){if(!G(o))throw D0()}function P(o){if(!o.ownerKey)throw m_("not_found");return o.ownerKey}function NJ(o,c){let l=o.server;KK(l),l.setRequestHandler("tasks/get",{params:J},async(d,u)=>{M(u);let m=await c.taskManager.get(P(c),d.taskId);return LQ(m)}),l.setRequestHandler("tasks/update",{params:we},async(d,u)=>{M(u);let m=u.mcpReq.inputResponses??d.inputResponses??{};return await c.taskManager.update(P(c),d.taskId,m),Z4}),l.setRequestHandler("tasks/cancel",{params:J},async(d,u)=>(M(u),await c.taskManager.cancel(P(c),d.taskId),Z4))}
3
- export{rM,xU,CU,PE,TP,OJ,MJ,AE,nM,DU,iM,Vb,jK,Wb,KK,NJ};
4
-
5
- //# debugId=907B41DE3198CE5664756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{vV}from"./chunk-s3jc6cwp.js";import"./chunk-3f3t1x97.js";import"./chunk-w7hkv422.js";import"./chunk-thbh3jew.js";import"./chunk-vy3bwm1d.js";import"./chunk-ycaj2sgf.js";import"./chunk-7rz9898k.js";import"./chunk-qyqypn28.js";import"./chunk-fgb98zjj.js";import"./chunk-3xkpk44w.js";import"./chunk-0qsy1qsx.js";import"./chunk-zgja5f3p.js";import"./chunk-rvvy1bte.js";import"./chunk-r5bxavdx.js";import"./chunk-yf7ympyz.js";import"./chunk-4hw3665t.js";import"./chunk-5d2hft6c.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{vV as InputText};
3
-
4
- //# debugId=2BD32C6D83C9358664756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{ZC,Pi,sf,Hs,si}from"./chunk-r5bxavdx.js";import"./chunk-58wzr3mt.js";import"./chunk-z637nqg8.js";import"./chunk-yf7ympyz.js";import"./chunk-5d2hft6c.js";import{jy,kA,EA,J7,MS}from"./chunk-hrfytkxh.js";import{Lh}from"./chunk-84nanf8s.js";import{t}from"./chunk-rbpdk7m0.js";function m(r,o,e){let i=sf(r,o);if(!i.value)throw new t(`${e} requires a value.`);return{value:i.value,consumed:i.last-o}}function v(r,o){let e=Hs(Pi(r).inlineValue);if(e===void 0)throw new t(`${o} must be true or false.`);return e}function d(r){let o={preferRunning:!0};for(let e=0;e<r.length;e++)e+=f(o,r,e,Pi(r[e]).flag);if(o.platform!=="android"&&o.platform!=="ios")throw new t("--platform must be android or ios.");return o}function f(r,o,e,i){let u={"--platform":"platform","--device-id":"deviceId","--name":"name","--min-os-version":"minOsVersion","--max-os-version":"maxOsVersion"}[i];if(u){let{value:s,consumed:a}=m(o,e,i);return r[u]=s,a}if(i==="--timeout-ms"){let{value:s,consumed:a}=m(o,e,i),c=Number(s);if(!Number.isFinite(c)||c<=0)throw new t("--timeout-ms must be a positive number.");return r.timeoutMs=c,a}if(i==="--create-if-missing")return r.createIfMissing=v(o[e],i),0;if(i==="--no-prefer-running")return r.preferRunning=!v(o[e],i),0;throw new t(`Unknown boot-device argument: ${i}`)}async function I(r){let o=d(r),e=await J7(o),n=await new MS({deviceManager:e?.deviceManager??new si,deviceMatcher:new ZC,deviceCreationGate:kA(),deviceProvisioner:e?.deviceProvisioner??EA(void 0,void 0,jy()),matchingStrategy:Lh,bootRecovery:e?.recovery}).boot(e?.request??o);console.log(JSON.stringify({deviceId:n.device.deviceId,name:n.device.name,platform:n.device.platform,osVersion:n.device.osVersion,source:n.source,processId:n.processId,provisioned:n.provisioned}))}export{I as runBootDeviceCommand};
3
-
4
- //# debugId=6DB7911BF534575A64756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- var UW=process.ppid;
3
- export{UW};
4
-
5
- //# debugId=58A7067B3CA2D91A64756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{dw,TF,gc}from"./chunk-3f3t1x97.js";import"./chunk-w7hkv422.js";import"./chunk-vy3bwm1d.js";import"./chunk-ycaj2sgf.js";import"./chunk-7rz9898k.js";import"./chunk-qyqypn28.js";import"./chunk-fgb98zjj.js";import"./chunk-3xkpk44w.js";import"./chunk-0qsy1qsx.js";import"./chunk-rvvy1bte.js";import"./chunk-r5bxavdx.js";import"./chunk-yf7ympyz.js";import"./chunk-4hw3665t.js";import"./chunk-5d2hft6c.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{gc as TapOnElement,dw as tapFocusFailure,TF as tapResolvedLayer};
3
-
4
- //# debugId=B84A7EEF49306CF164756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{i}from"./chunk-z637nqg8.js";import{Bt,oz,Pn,An,mk}from"./chunk-r5bxavdx.js";import{NG,eX}from"./chunk-w3vs79ex.js";var a={getConfig:NG,updateConfig:eX};class t extends mk{constructor(r=Bt(oz),n=i,o=a,d=An("videoRecording config/set")){super({socketPath:r,timer:n,serverName:"VideoRecording",responseType:"video_recording_response",evictedKey:"evictedRecordingIds",methodLabel:"video recording",getConfig:o.getConfig,updateConfig:async(c)=>{let{config:g,evictedRecordingIds:s}=await o.updateConfig(c);return{config:g,evictedItems:s}},authenticator:d})}}var e=new Pn;function AK(){return e.instance?.getSocketPath()??Bt(oz)}async function TK(){await e.start(()=>new t)}async function kK(){await e.stop()}
3
- export{AK,TK,kK};
4
-
5
- //# debugId=6DC0619BD881894464756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{xK,CK,DK}from"./chunk-eersndy7.js";import"./chunk-qf6nynk6.js";import"./chunk-26k317v5.js";import"./chunk-0qsy1qsx.js";import"./chunk-v6pya0dm.js";import"./chunk-r5bxavdx.js";import"./chunk-yf7ympyz.js";import"./chunk-4hw3665t.js";import"./chunk-5d2hft6c.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{xK as getDeviceSnapshotSocketPath,CK as startDeviceSnapshotSocketServer,DK as stopDeviceSnapshotSocketServer};
3
-
4
- //# debugId=E5CADEC29176498D64756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{E}from"./chunk-r5bxavdx.js";import"./chunk-yf7ympyz.js";import"./chunk-4hw3665t.js";import"./chunk-5d2hft6c.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{E as AndroidCtrlProxyClient};
3
-
4
- //# debugId=DDD44B064BF4FB1664756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{sr}from"./chunk-0qsy1qsx.js";import"./chunk-yf7ympyz.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{sr as FeatureFlagService};
3
-
4
- //# debugId=926AE1EEA9BF77BD64756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{ij,Dae,xc,xY,CY}from"./chunk-r5bxavdx.js";import"./chunk-yf7ympyz.js";import"./chunk-5d2hft6c.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{Dae as getLastStartupTimingMs,xc as getPerformanceMonitor,ij as setLastTtiMs,xY as startPerformanceMonitor,CY as stopPerformanceMonitor};
3
-
4
- //# debugId=FDF1DCAAE32F661F64756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{e}from"./chunk-z637nqg8.js";import{ra,TL,m3,oa}from"./chunk-0qsy1qsx.js";import{ft,Tt,aj}from"./chunk-r5bxavdx.js";import{t,u}from"./chunk-rbpdk7m0.js";function tW(n){throw new t(`${n} is not supported on tvOS; use focus navigation via pressButton (up/down/left/right/select).`)}function cs(n,r){if(n==="tvos")tW(r)}async function rW(n,r,s,o){let i=TL.find((a)=>a===r);if(!i)tW(`press ${r}`);return s?.throwIfAborted(),await(await oa(n,s)).request({type:"request_press_button",action:i,...o===void 0?{}:{durationMs:o}},s,o===void 0?void 0:{timeoutMs:o+m3}),{success:!0,button:r,keyCode:0}}async function lte(n,r,s,o={}){let{signal:i}=o,a=()=>{throw new t("tvOS sendKeys supports only type commands into the already focused field; focus it with pressButton select first.")};if(s!==void 0||o.container!==void 0||o.selectionStrategy!==void 0||o.layer!==void 0||o.display!==void 0)a();let p=r.map((d)=>{if(d.action!=="type"||d.text.length===0)return a();if(d.operation==="replace")throw new t("Text replacement is unsupported on tvOS; only appending type commands are supported. Clear/select the existing text via the on-screen keyboard with pressButton, then type.");return d}),l=[];for(let[d,c]of p.entries()){i?.throwIfAborted();try{await(await oa(n,i)).request({type:"request_append_text",text:c.text},i)}catch(k){i?.throwIfAborted();let h=u(k,"tvOS text entry failed; focus the field with pressButton select first");return e.warn("tvOS sendKeys failed",h),l.push({index:d,action:"type",success:!1,error:h.message}),{success:!1,completedCommands:d,failedIndex:d,commands:l,error:h.message}}l.push({index:d,action:"type",success:!0,textLength:[...c.text].length})}return{success:!0,completedCommands:l.length,commands:l}}function ute(n,r){m(n,r,"XR spatial-panel input injection is unsupported: display touches cannot reach this app's SpatialPanel. Use tapOn/tapAny (accessibility node click) or keyboard focus keys instead.")}function m(n,r,s){if(!r)return;let o=ft(n.viewHierarchy),i=aj(n),a=n.backStack?.tasks.find((d)=>d.id===n.backStack?.currentTaskId&&d.packageName===i)??n.backStack?.tasks.find((d)=>d.packageName===i),p=Tt(a?.bounds);if(!i||i.startsWith("com.android.systemui")||!p)return;if(o?.windows?.some((d)=>{if(d.type!==1||d.packageName!==i)return!1;let c=Tt(d.bounds);return c&&(c.left<p.left||c.top<p.top||c.right>p.right||c.bottom>p.bottom)}))throw new t(s)}function yL(n,r){m(n,r,"display-input swipe scrolling is unsupported on XR spatial panels; use tapOn/tapAny node click or keyboard focus keys instead")}var f=0.953125,g=0.552;function nW(n,r){if(!r)return;return{panel:(n&&S(n)[0])??null}}function S(n){return n.tasks.filter((r)=>{let s=r.bounds;return!!r.packageName&&!r.packageName.startsWith("com.android.systemui")&&r.windowingMode==="freeform"&&!!s&&Object.values(s).every(Number.isFinite)&&s.right>s.left&&s.bottom>s.top})}var y="Android XR coordinates assume the app panel is in its default pose (not moved or scaled). If the panel was moved or scaled, the gesture lands on the wrong spot: keep the panel in its default position, or reopen the app to restore it, then observe again before retrying.";function w(n,r,s){let o=S(n);if(o.length>1)return`${o.length} app panels are open (${o.map((a)=>a.packageName).join(", ")}), and only one can sit at the default pose. Close the other app panels, observe again, and retry.`;let i=r&&b(r,s);if(i&&(i.left<0||i.top<0||i.right>s.width||i.bottom>s.height))return`the ${r.packageName} panel (${r.bounds.right-r.bounds.left}x${r.bounds.bottom-r.bounds.top}) does not fit the screenshot at the default pose. Restore the panel to its default size and position, observe again, and retry.`;return}function xC(n,r){let s=nW(n?.backStack,r);if(!s||!n?.backStack)return;let o=w(n.backStack,s.panel,c3(n));if(o)throw new t(`Android XR coordinates assume the default panel pose, which does not hold here: ${o}`);return y}function vL(n,r){return[...new Set([n,r].filter((s)=>s!==void 0))].join(" ")||void 0}async function pte(n,r,s,...o){let i=await l3(s,n),a=await r(s,...o);return i?{...a,warning:vL(a.warning,i)}:a}function x(n){let r;for(let s of n?.tasks??[]){let o=s.bounds;if(s.windowingMode!=="fullscreen"||!o||!Object.values(o).every(Number.isFinite))continue;let i=o.right-o.left,a=o.bottom-o.top;if(i>0&&a>0&&(!r||i*a>r.width*r.height))r={width:i,height:a}}return r}function c3(n){if(n.screenshotImageSize)return n.screenshotImageSize;let r=x(n.backStack),s=Math.min(Math.max(n.screenSize.width,r?.width??n.screenSize.width),Math.max(n.screenSize.height,r?.height??n.screenSize.height));return{width:s,height:s}}function b(n,r){let s=(n.bounds.right-n.bounds.left)*f/2,o=(n.bounds.bottom-n.bounds.top)*f/2;return{left:r.width/2-s,right:r.width/2+s,top:r.height*g-o,bottom:r.height*g+o}}function mte(n,r,s){let o=r&&b(r,s);if(!r||!o||n.x<o.left||n.x>=o.right||n.y<o.top||n.y>=o.bottom)throw new t("There is no app panel under that screenshot point. XR system UI (home-space launcher and environment buttons) cannot be tapped with tapAt. Open an app panel and choose a screenshot point inside it.");return{x:Math.min(r.bounds.right-1,Math.max(r.bounds.left,Math.round(r.bounds.left+(n.x-o.left)/f))),y:Math.min(r.bounds.bottom-1,Math.max(r.bounds.top,Math.round(r.bounds.top+(n.y-o.top)/f)))}}function d3(n,r,s){let o=nW(n,r);if(!o)return;if(s)throw new t("XR edge gestures hit the system. Omit fromEdge and swipe inside an open app panel.");if(!o.panel)throw new t("No app panel is available. Swipes outside an app panel would dismiss XR home-space panels. Open an app panel and retry swipeOn inside it.");return o.panel.bounds}async function l3(n,r){return n?.backStack?xC(n,await r(n)):void 0}async function iW(n,r,s,o){return d3(n.backStack,await r(n),o)??s}function fte(n,r){let s=new WeakMap;return(o,i)=>{let a=s.get(o);if(!a)a=ra({...n(),backStack:o.backStack,signal:i},r),s.set(o,a);return a}}
3
- export{tW,cs,rW,lte,ute,yL,nW,xC,vL,pte,c3,mte,d3,l3,iW,fte};
4
-
5
- //# debugId=D5474FBDADA14C8764756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{RK}from"./chunk-7cs2da62.js";import"./chunk-6awz7vhq.js";import"./chunk-w3vs79ex.js";import"./chunk-g7tmjbkt.js";import"./chunk-v2wd4n3e.js";import"./chunk-284ptqa4.js";import"./chunk-0qsy1qsx.js";import"./chunk-v6pya0dm.js";import"./chunk-r5bxavdx.js";import"./chunk-yf7ympyz.js";import"./chunk-4hw3665t.js";import"./chunk-5d2hft6c.js";import"./chunk-z637nqg8.js";import"./chunk-58wzr3mt.js";export{RK as cleanupDaemonChildProcesses};
3
-
4
- //# debugId=37A7B78CD38AE44A64756E2164756E21