@kaeawc/auto-mobile 0.0.92 → 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 (257) hide show
  1. package/dist/build-info.json +12 -12
  2. package/dist/schemas/test-plan.schema.json +370 -52
  3. package/dist/src/ble-peripheral.py +153 -0
  4. package/dist/src/{chunk-r14wwk37.js → chunk-026y62r9.js} +12 -12
  5. package/dist/src/chunk-0jyfg947.js +4 -0
  6. package/dist/src/{chunk-950qcq1e.js → chunk-0zfpp1wh.js} +4 -4
  7. package/dist/src/chunk-13qxf7ym.js +7 -0
  8. package/dist/src/chunk-1scenrk7.js +4 -0
  9. package/dist/src/chunk-1vb5ph1k.js +4 -0
  10. package/dist/src/chunk-20g565q7.js +5 -0
  11. package/dist/src/chunk-21h6dhdm.js +5 -0
  12. package/dist/src/{chunk-2e6s75qv.js → chunk-25mfpthk.js} +8 -8
  13. package/dist/src/{chunk-9rkfyt6q.js → chunk-2b39zyxc.js} +3 -3
  14. package/dist/src/chunk-2gzd6wbd.js +4 -0
  15. package/dist/src/{chunk-eka89q3k.js → chunk-3dntffy9.js} +1 -1
  16. package/dist/src/chunk-3gfczcsn.js +4 -0
  17. package/dist/src/chunk-3h5jz1vb.js +9 -0
  18. package/dist/src/chunk-41zcy6b3.js +5 -0
  19. package/dist/src/chunk-47n9m2de.js +4 -0
  20. package/dist/src/chunk-4vxeq0vd.js +58 -0
  21. package/dist/src/chunk-59dx6qaf.js +4 -0
  22. package/dist/src/chunk-5sdf9y92.js +4 -0
  23. package/dist/src/chunk-5wk1t46v.js +5 -0
  24. package/dist/src/chunk-661c50hh.js +17 -0
  25. package/dist/src/chunk-68n6bjjd.js +21 -0
  26. package/dist/src/{chunk-zg67wjkh.js → chunk-69pmjdf2.js} +3 -3
  27. package/dist/src/chunk-6hrj3jt6.js +145 -0
  28. package/dist/src/{chunk-b4cxdzwy.js → chunk-6myr26wx.js} +8 -8
  29. package/dist/src/chunk-6n96k09n.js +4 -0
  30. package/dist/src/chunk-6vwrbkre.js +4 -0
  31. package/dist/src/chunk-6wk0yrab.js +4 -0
  32. package/dist/src/chunk-6yhm9een.js +4 -0
  33. package/dist/src/chunk-7k7gjg2t.js +7 -0
  34. package/dist/src/chunk-7n5fz68h.js +4 -0
  35. package/dist/src/chunk-8cvnpnbp.js +4 -0
  36. package/dist/src/chunk-8kzv7rk7.js +4 -0
  37. package/dist/src/chunk-8nj68t1v.js +167 -0
  38. package/dist/src/{chunk-r20pe1nv.js → chunk-96r3bpg7.js} +3 -3
  39. package/dist/src/chunk-97x887te.js +4 -0
  40. package/dist/src/{chunk-sz1a7p43.js → chunk-99a6tbvd.js} +1 -1
  41. package/dist/src/chunk-9p5d2994.js +5 -0
  42. package/dist/src/{chunk-w7zsh13a.js → chunk-9q265er0.js} +4 -4
  43. package/dist/src/chunk-9xgnrv5w.js +5 -0
  44. package/dist/src/chunk-9xgsmshb.js +5 -0
  45. package/dist/src/chunk-a02d1wgv.js +4 -0
  46. package/dist/src/{chunk-km0dy5vc.js → chunk-a9ps00a1.js} +10 -10
  47. package/dist/src/chunk-aewdveet.js +5 -0
  48. package/dist/src/chunk-b3tdtq7r.js +9 -0
  49. package/dist/src/chunk-bn7jx7a2.js +4 -0
  50. package/dist/src/chunk-bnyw27ja.js +4 -0
  51. package/dist/src/{chunk-s1zq65ny.js → chunk-bpwsg76p.js} +2 -2
  52. package/dist/src/chunk-bvranw3g.js +4 -0
  53. package/dist/src/chunk-c25a84zb.js +4 -0
  54. package/dist/src/chunk-c27yv1dx.js +5 -0
  55. package/dist/src/chunk-c3ewxm4x.js +5 -0
  56. package/dist/src/chunk-cb1ga9rd.js +7 -0
  57. package/dist/src/chunk-cn7fwy7k.js +4 -0
  58. package/dist/src/chunk-cnvy4a64.js +4 -0
  59. package/dist/src/chunk-cqhw4yr6.js +5 -0
  60. package/dist/src/{chunk-v90es00d.js → chunk-ctmfshjc.js} +2 -2
  61. package/dist/src/chunk-ctwmhz13.js +4 -0
  62. package/dist/src/{chunk-qv2918jt.js → chunk-d3jx9bz5.js} +2 -2
  63. package/dist/src/{chunk-wry6skrm.js → chunk-d6rb08ga.js} +1 -1
  64. package/dist/src/chunk-ddqhj4eg.js +5 -0
  65. package/dist/src/{chunk-d57432wq.js → chunk-ddrhs1c3.js} +2 -2
  66. package/dist/src/chunk-dnjnh9p6.js +4 -0
  67. package/dist/src/{chunk-ajsrz473.js → chunk-dw5rwgya.js} +3 -3
  68. package/dist/src/chunk-e0870khr.js +5 -0
  69. package/dist/src/chunk-ea3k10kj.js +4 -0
  70. package/dist/src/chunk-emv82m1w.js +7 -0
  71. package/dist/src/chunk-f3m6pdnx.js +4 -0
  72. package/dist/src/chunk-f84z32cb.js +4 -0
  73. package/dist/src/chunk-fpczgf0z.js +4 -0
  74. package/dist/src/chunk-g2js4c2v.js +971 -0
  75. package/dist/src/chunk-g3af2qbk.js +5 -0
  76. package/dist/src/chunk-gadtna7s.js +11 -0
  77. package/dist/src/{chunk-c9nk1r78.js → chunk-gcyx407v.js} +3 -3
  78. package/dist/src/{chunk-jdqvcq0a.js → chunk-gfpntwc1.js} +3 -3
  79. package/dist/src/chunk-gmnm5e3e.js +4 -0
  80. package/dist/src/chunk-gp6vb5gf.js +4 -0
  81. package/dist/src/chunk-gppgy7pa.js +4 -0
  82. package/dist/src/chunk-hegfz0ae.js +5 -0
  83. package/dist/src/chunk-hpzxdp1k.js +17 -0
  84. package/dist/src/{chunk-2v7tw1nj.js → chunk-j69g8b50.js} +3 -3
  85. package/dist/src/chunk-jvstjnqm.js +19 -0
  86. package/dist/src/chunk-jzqrv78s.js +4 -0
  87. package/dist/src/chunk-k2948b8d.js +4 -0
  88. package/dist/src/chunk-k4ftd40d.js +4 -0
  89. package/dist/src/chunk-kd9vfaxh.js +5 -0
  90. package/dist/src/{chunk-34zxqcmq.js → chunk-kdczmgwk.js} +3 -3
  91. package/dist/src/chunk-ke3wn14v.js +4 -0
  92. package/dist/src/chunk-kh5n7m6w.js +4 -0
  93. package/dist/src/{chunk-0dfnyfkh.js → chunk-khejfph4.js} +3 -3
  94. package/dist/src/chunk-kny2xemh.js +4 -0
  95. package/dist/src/chunk-knyzw9md.js +4 -0
  96. package/dist/src/chunk-mbzpt2hp.js +4 -0
  97. package/dist/src/chunk-mm8rcxad.js +4 -0
  98. package/dist/src/chunk-nc4516tx.js +4 -0
  99. package/dist/src/{chunk-stfzjr9y.js → chunk-ntfrqrqn.js} +5 -5
  100. package/dist/src/chunk-nz5h2j52.js +4 -0
  101. package/dist/src/chunk-p22s97qy.js +4 -0
  102. package/dist/src/chunk-p9kt1sgr.js +6 -0
  103. package/dist/src/{chunk-9y5bcy28.js → chunk-pf282r5g.js} +4 -4
  104. package/dist/src/chunk-pnd4mrxy.js +4 -0
  105. package/dist/src/chunk-pqqteyj6.js +4 -0
  106. package/dist/src/chunk-qj1tbnv2.js +8 -0
  107. package/dist/src/chunk-qnh9egwr.js +4 -0
  108. package/dist/src/chunk-qy3khhf8.js +8 -0
  109. package/dist/src/chunk-r0vp315h.js +11 -0
  110. package/dist/src/chunk-r4j43b9s.js +237 -0
  111. package/dist/src/{chunk-4pfftt07.js → chunk-r54cxxze.js} +3 -3
  112. package/dist/src/chunk-r6pvhj33.js +325 -0
  113. package/dist/src/chunk-rb7aa5gr.js +54 -0
  114. package/dist/src/chunk-rdj50kb4.js +4 -0
  115. package/dist/src/chunk-rnd4vcas.js +4 -0
  116. package/dist/src/chunk-s3y3zfcx.js +14 -0
  117. package/dist/src/chunk-s4g43k75.js +5 -0
  118. package/dist/src/chunk-sfqe223f.js +311 -0
  119. package/dist/src/chunk-sqdrxjw5.js +7 -0
  120. package/dist/src/{chunk-0w1spptt.js → chunk-t54k47em.js} +4 -4
  121. package/dist/src/chunk-tek4pnvv.js +26 -0
  122. package/dist/src/chunk-tn74y7af.js +4 -0
  123. package/dist/src/chunk-tvq0nzam.js +5 -0
  124. package/dist/src/chunk-tx4f0h9c.js +6 -0
  125. package/dist/src/chunk-vdqag3fj.js +5 -0
  126. package/dist/src/chunk-vz5zzs57.js +4 -0
  127. package/dist/src/chunk-w4s2vfpj.js +4 -0
  128. package/dist/src/chunk-w5yypt53.js +42 -0
  129. package/dist/src/{chunk-r0f1q783.js → chunk-w68v64vh.js} +3 -3
  130. package/dist/src/chunk-whwj0pdk.js +5 -0
  131. package/dist/src/chunk-wnmqt1dc.js +4 -0
  132. package/dist/src/{chunk-8en08r7q.js → chunk-wpe46vsa.js} +3 -3
  133. package/dist/src/chunk-wxdjeb4k.js +27 -0
  134. package/dist/src/chunk-xcqzwf9j.js +247 -0
  135. package/dist/src/chunk-xezekwwn.js +5 -0
  136. package/dist/src/chunk-xf19m15s.js +4 -0
  137. package/dist/src/chunk-xghbxha4.js +4 -0
  138. package/dist/src/{chunk-jhnbfj19.js → chunk-xn9m3xc2.js} +5 -5
  139. package/dist/src/{chunk-a4k9rt7z.js → chunk-yqfz4vts.js} +3 -3
  140. package/dist/src/chunk-z8tvs8nk.js +5 -0
  141. package/dist/src/chunk-zm2rehqb.js +5 -0
  142. package/dist/src/chunk-zs6dqm35.js +4 -0
  143. package/dist/src/daemon/processEntry.js +2 -2
  144. package/dist/src/index.js +4 -4
  145. package/dist/src/runtime/bunRuntimeGuard.js +2 -2
  146. package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -2
  147. package/ios/CameraPosterInjection/Injection/CameraPosterInjection.m +466 -0
  148. package/package.json +4 -3
  149. package/schemas/test-plan.schema.json +370 -52
  150. package/dist/src/chunk-09442h7v.js +0 -4
  151. package/dist/src/chunk-0e4gm1kj.js +0 -5
  152. package/dist/src/chunk-0eb8576f.js +0 -4
  153. package/dist/src/chunk-0rjm4nx7.js +0 -5
  154. package/dist/src/chunk-1zmh2eak.js +0 -4
  155. package/dist/src/chunk-28k63ha3.js +0 -5
  156. package/dist/src/chunk-2d4wmp8b.js +0 -4
  157. package/dist/src/chunk-32jpxz2y.js +0 -323
  158. package/dist/src/chunk-3jmvqygr.js +0 -238
  159. package/dist/src/chunk-3swvfhqt.js +0 -5
  160. package/dist/src/chunk-44bt78m9.js +0 -5
  161. package/dist/src/chunk-488vt2bp.js +0 -4
  162. package/dist/src/chunk-4fgdhcwx.js +0 -5
  163. package/dist/src/chunk-4jp2se4w.js +0 -4
  164. package/dist/src/chunk-4vhr9e4t.js +0 -4
  165. package/dist/src/chunk-4xd6zs3y.js +0 -15
  166. package/dist/src/chunk-51567pg8.js +0 -4
  167. package/dist/src/chunk-5agqsfev.js +0 -4
  168. package/dist/src/chunk-5d706gmr.js +0 -4
  169. package/dist/src/chunk-5kd4rqk7.js +0 -5
  170. package/dist/src/chunk-61t538bm.js +0 -4
  171. package/dist/src/chunk-6d3mmqxt.js +0 -54
  172. package/dist/src/chunk-6hyt398x.js +0 -5
  173. package/dist/src/chunk-6mnr8kpm.js +0 -4
  174. package/dist/src/chunk-79q5xsdc.js +0 -42
  175. package/dist/src/chunk-7bdgand3.js +0 -4
  176. package/dist/src/chunk-84cp9dw5.js +0 -4
  177. package/dist/src/chunk-86f2h5ww.js +0 -5
  178. package/dist/src/chunk-8cghfzb2.js +0 -19
  179. package/dist/src/chunk-9tf2p9y9.js +0 -5
  180. package/dist/src/chunk-a2sc4jm0.js +0 -5
  181. package/dist/src/chunk-aa5ng3d1.js +0 -4
  182. package/dist/src/chunk-b3h0a6ca.js +0 -4
  183. package/dist/src/chunk-b6a737qt.js +0 -4
  184. package/dist/src/chunk-bn64x5z5.js +0 -5
  185. package/dist/src/chunk-bvh649za.js +0 -12
  186. package/dist/src/chunk-c9tyfg4j.js +0 -26
  187. package/dist/src/chunk-cfsdfqnm.js +0 -4
  188. package/dist/src/chunk-cxyf04jc.js +0 -7
  189. package/dist/src/chunk-da08tx5v.js +0 -4
  190. package/dist/src/chunk-f2tc08m2.js +0 -4
  191. package/dist/src/chunk-f8tnk179.js +0 -5
  192. package/dist/src/chunk-f9s1kkhx.js +0 -5
  193. package/dist/src/chunk-fbp8a4rx.js +0 -4
  194. package/dist/src/chunk-fd2z0sze.js +0 -4
  195. package/dist/src/chunk-fk927f4q.js +0 -54
  196. package/dist/src/chunk-fxmr3a0f.js +0 -4
  197. package/dist/src/chunk-gaqwhd44.js +0 -4
  198. package/dist/src/chunk-ggtd5x5a.js +0 -5
  199. package/dist/src/chunk-gndcfrm7.js +0 -4
  200. package/dist/src/chunk-h3n4adc6.js +0 -310
  201. package/dist/src/chunk-h5pjbb83.js +0 -4
  202. package/dist/src/chunk-hgnnh302.js +0 -4
  203. package/dist/src/chunk-hmke8nhx.js +0 -5
  204. package/dist/src/chunk-j2bx12hn.js +0 -4
  205. package/dist/src/chunk-j70y1a2g.js +0 -4
  206. package/dist/src/chunk-js1jpyxp.js +0 -6
  207. package/dist/src/chunk-kbjq0qvb.js +0 -4
  208. package/dist/src/chunk-kfwx57xd.js +0 -4
  209. package/dist/src/chunk-kzwctna2.js +0 -4
  210. package/dist/src/chunk-m9ehyehy.js +0 -4
  211. package/dist/src/chunk-mct91p1f.js +0 -4
  212. package/dist/src/chunk-mf9spd4g.js +0 -5
  213. package/dist/src/chunk-mgrcansb.js +0 -4
  214. package/dist/src/chunk-mqc1d0eb.js +0 -6
  215. package/dist/src/chunk-n1zmpk0z.js +0 -4
  216. package/dist/src/chunk-ncyjf63g.js +0 -4
  217. package/dist/src/chunk-nr64d21q.js +0 -973
  218. package/dist/src/chunk-nwm2pq5v.js +0 -168
  219. package/dist/src/chunk-pm06b05d.js +0 -9
  220. package/dist/src/chunk-q50s00ry.js +0 -4
  221. package/dist/src/chunk-qwye1958.js +0 -14
  222. package/dist/src/chunk-r8z9pfve.js +0 -5
  223. package/dist/src/chunk-rdpgkjf6.js +0 -4
  224. package/dist/src/chunk-rkr0dks9.js +0 -5
  225. package/dist/src/chunk-rn84t3sf.js +0 -11
  226. package/dist/src/chunk-s123kn7n.js +0 -4
  227. package/dist/src/chunk-s73qn3fx.js +0 -4
  228. package/dist/src/chunk-sjn0nj4p.js +0 -5
  229. package/dist/src/chunk-sns0c35v.js +0 -7
  230. package/dist/src/chunk-t4dr5c8v.js +0 -8
  231. package/dist/src/chunk-tc8k9c1j.js +0 -4
  232. package/dist/src/chunk-teznhase.js +0 -4
  233. package/dist/src/chunk-ty9xgmz4.js +0 -4
  234. package/dist/src/chunk-tyazf3sk.js +0 -145
  235. package/dist/src/chunk-v6npjrjm.js +0 -5
  236. package/dist/src/chunk-vbvtzkwz.js +0 -5
  237. package/dist/src/chunk-vefd8qee.js +0 -8
  238. package/dist/src/chunk-vs9r72ta.js +0 -17
  239. package/dist/src/chunk-w2mwa0jk.js +0 -4
  240. package/dist/src/chunk-w88k0bgr.js +0 -4
  241. package/dist/src/chunk-wzdt0enk.js +0 -4
  242. package/dist/src/chunk-xhhv854c.js +0 -4
  243. package/dist/src/chunk-y58270hd.js +0 -4
  244. package/dist/src/chunk-yk0hmbex.js +0 -4
  245. package/dist/src/chunk-ympy4fdz.js +0 -28
  246. package/dist/src/chunk-yw436axy.js +0 -4
  247. package/dist/src/chunk-z04jrpjy.js +0 -5
  248. package/dist/src/chunk-z2xznczw.js +0 -4
  249. package/dist/src/chunk-z4xnrgps.js +0 -4
  250. package/dist/src/chunk-z7csyszv.js +0 -4
  251. package/dist/src/chunk-z8t0v07j.js +0 -11
  252. package/dist/src/chunk-z916af47.js +0 -228
  253. package/dist/src/chunk-zcr8he8q.js +0 -5
  254. package/dist/src/chunk-zd9vmkzn.js +0 -9
  255. package/dist/src/chunk-zj939v0h.js +0 -5
  256. package/dist/src/chunk-zkdjwtc1.js +0 -4
  257. package/dist/src/chunk-zkv5kzt6.js +0 -4
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{yu}from"./chunk-8cvnpnbp.js";import"./chunk-661c50hh.js";import"./chunk-vdqag3fj.js";import"./chunk-e0870khr.js";import"./chunk-4vxeq0vd.js";import"./chunk-9xgnrv5w.js";import"./chunk-cb1ga9rd.js";import"./chunk-sfqe223f.js";import"./chunk-r6pvhj33.js";import"./chunk-w5yypt53.js";import"./chunk-aewdveet.js";import"./chunk-r0vp315h.js";import"./chunk-5wk1t46v.js";export{yu as SwipeOn};
3
+
4
+ //# debugId=587011F9E5DBCF6264756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Ss}from"./chunk-sfqe223f.js";import"./chunk-r6pvhj33.js";import"./chunk-r0vp315h.js";import"./chunk-5wk1t46v.js";export{Ss as InstalledAppsRepository};
3
+
4
+ //# debugId=C07AEC969DD5273F64756E2164756E21
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import{bi,cu,Ho,bm}from"./chunk-8nj68t1v.js";import{Ur,Hd,e}from"./chunk-r0vp315h.js";import{w,wp,ci,ps,bk,mt,hd,Mp,Np,Nu,xn,Nc}from"./chunk-sfqe223f.js";import{mu}from"./chunk-z8tvs8nk.js";import{t}from"./chunk-2b39zyxc.js";var D={success:"boolean",error:"string"};function ip(n,i,o){if(n.hasStructured)n.envelope.structuredContent=i;if(n.textPart)n.textPart.text=o??Nc(i);E(n.envelope,i)}function E(n,i){let o=n;for(let[s,r]of Object.entries(D)){if(!(s in o))continue;if(typeof i[s]===r)o[s]=i[s];else delete o[s]}}var LI=["getAndroid","getApple","startDevice","provisionDevice"],ES=`Call ${wp.length>2?`${wp.slice(0,-1).join(", ")}, or ${wp[wp.length-1]}`:wp.join(" or ")} to acquire a new device session.`;function P(n,i){if(!i||i.releaseReason!=="heartbeat-timeout"&&i.releaseReason!=="missing-first-heartbeat")return n;let{ageMs:o,timeoutMs:s}=i.heartbeat,r=i.releaseReason==="heartbeat-timeout"?s+ps:s;return`${n} No heartbeat for ${o} ms (limit ${r} ms; set AUTOMOBILE_SESSION_HEARTBEAT_TIMEOUT_MS to change).`}function ON(n){return{error:{code:"no_active_device_session",message:n.message,reason:n.reason,...bi(n.reason),...p()}}}function p(n){return{retryable:!1,nextAction:ci,...n===void 0?{}:{ownerPid:n},recovery:{action:"acquire_replacement_session",tools:[...wp]}}}function BI(n){if(!Z6(n))return;let i=xn(n)?.payload,o=i?.error,s=o!==null&&typeof o==="object"&&!Array.isArray(o)?o:i,{sessionUuid:r,reason:a}=s??{};return{...typeof r==="string"&&r.length>0?{sessionUuid:r}:{},...typeof a==="string"&&a.length>0?{reason:a}:{}}}function vA({message:n,sessionUuid:i,reason:o,release:s,idleTimeoutMs:r}){return{error:{code:Ho,message:P(n,s),sessionUuid:i,reason:o,...bi(o),...cu(o,r??s?.cliIdleTimeoutMs),...p(s?.ownerPid),...s?{release:s}:{}}}}function MN(n){let i=bm(n);if(!i)return;return vA({message:i.message,sessionUuid:i.sessionUuid,reason:i.releaseReason,idleTimeoutMs:i.details.idleTimeoutMs})}function $I(n){if(!(n instanceof Error)||n.name!=="SessionRecoveryIdentityLossError")return;let i=(u)=>Reflect.get(n,u),o=i("sessionUuid"),s=i("terminalReleaseReason"),r=i("reason");if(typeof o!=="string"||typeof s!=="string"||typeof r!=="string")return;let a=i("target"),c=a!==null&&typeof a==="object"?Reflect.get(a,"deviceId"):void 0,d=i("deviceId")??c,l=i("ownerPid");return{message:n.message,sessionUuid:o,reason:s,recoveryReason:r,...typeof d==="string"?{deviceId:d}:{},...typeof l==="number"?{ownerPid:l}:{}}}function Y6(n){return{sessionUuid:n.sessionUuid,reason:n.reason,...bi(n.reason),recoveryReason:n.recoveryReason,...n.deviceId===void 0?{}:{deviceId:n.deviceId},...n.ownerPid===void 0?{}:{ownerPid:n.ownerPid}}}function z7(n){let{error:i}=vA({message:n.message,sessionUuid:n.sessionUuid,reason:n.reason});return{error:{...i,...p(n.ownerPid),...Y6(n)}}}function Hr(n){return LI.includes(n)}function NN(n){let i=xn(n)?.payload,o=i?.runtime,s=o&&typeof o==="object"?o.session:void 0,a=(s&&typeof s==="object"?s.sessionUuid:void 0)??i?.sessionId;return typeof a==="string"&&a.trim().length>0?a:void 0}function f(n){let i=xn(n)?.payload;if(!i||"platform"in i||"runtime"in i)return i;let o=i.device;if(o&&typeof o==="object"&&!Array.isArray(o))return o;return}function j7(n){let i=f(n)?.runtime;if(!i||typeof i!=="object"||!("deviceId"in i))return;let{deviceId:o}=i;return typeof o==="string"&&o.trim().length>0?o:void 0}function FN(n){let i=xn(n)?.payload,o=i?.sessionUuid;if(typeof o!=="string"||o.trim().length===0)return;let s=i?.deviceId;return typeof s==="string"&&s.trim().length>0?{sessionUuid:o,deviceId:s}:{sessionUuid:o}}function K7(n){let i=f(n)?.platform;return i==="android"||i==="ios"?i:void 0}function J6(n){let i=f(n)?.platform;return typeof i==="string"&&Object.hasOwn(Hd,i)?i:void 0}function G7(n){let i=f(n)?.formFactor;return typeof i==="string"?i:void 0}function X6(n){if(!n||typeof n!=="object"||!("isError"in n)||n.isError!==!0)return!1;let i=xn(n)?.payload?.error;return i!==null&&typeof i==="object"&&"code"in i&&i.code===mu}function Wy(n){return n==="setActiveDevice"||Hr(n)}function Y7(n){if(!n||typeof n!=="object"||!("isError"in n)||n.isError!==!0)return;let i=xn(n)?.payload;if(!i||i.code!==hd&&i.code!==Mp)return;let{retryAfterMs:o}=i;return typeof o==="number"&&Number.isFinite(o)&&o>=0?{retryAfterMs:o}:{}}function J7(n){if(!X6(n))return;let i=xn(n)?.payload?.error;if(!i||typeof i!=="object"||!("sessionUuid"in i)||typeof i.sessionUuid!=="string"||!("remainingMs"in i)||typeof i.remainingMs!=="number"||!Number.isFinite(i.remainingMs))return;return{sessionUuid:i.sessionUuid,remainingMs:i.remainingMs}}var I=["session_ownership_lost","no_active_device_session",Np];function S(n){return typeof n.code==="string"&&I.includes(n.code)||n.nextAction===ci}function Z6(n){if(!n||typeof n!=="object"||n.isError!==!0)return!1;let i=n.content;if(!n.structuredContent&&!Array.isArray(i))return!1;let s=xn(n,(a)=>{e.debug("[MCP] Session-invalid probe: error result was not JSON",{error:a})})?.payload;if(!s)return!1;if(S(s))return!0;let r=s.error;return r!==null&&typeof r==="object"&&!Array.isArray(r)&&S(r)}function x(n){return typeof n==="object"&&n!==null}function qi(n,i){let o=n.params;if(o&&typeof o==="object"&&Object.hasOwn(o,i))return o[i];return x(n)?n[i]:void 0}var R=(n)=>typeof n==="object"&&n!==null&&!Array.isArray(n),zy=(n)=>{let i=[],o=[],s=!1,r=!1;if(!n)return{labels:i,definitions:o,hasDefinitions:s,hasLabels:r};for(let a of n){if(typeof a==="string"){i.push(a),r=!0;continue}if(R(a)){i.push(a.label),o.push(a),s=!0;continue}}return{labels:i,definitions:o,hasDefinitions:s,hasLabels:r}},X7=(n)=>zy(n).labels,Z7=(n,i)=>zy(n).definitions.find((o)=>o.label===i)?.platform;function g(n){return`${n.positions.join(",")}|${n.arrived.map((i)=>i?1:0).join("")}`}function v(n,i,o){return n[o].events[i.positions[o]]}function L(n,i){return n.every((o,s)=>i.positions[s]>=o.events.length)}function b(n,i,o){let s=[];for(let r=0;r<n.length;r++)if(i.arrived[r]&&v(n,i,r)?.lock===o)s.push(r);return s}function _(n,i,o){let s=v(n,i,o),r=[...i.positions],a=[...i.arrived],c=[...b(n,i,s.lock),o];if(c.length<s.deviceCount)return a[o]=!0,{state:{positions:r,arrived:a}};for(let l of c)r[l]+=1,a[l]=!1;let d=c.map((l)=>n[l].device).sort().join(", ");return{state:{positions:r,arrived:a},release:`"${s.lock}" {${d}}`}}function A(n,i){let o=[];for(let s=0;s<n.length;s++)if(!i.arrived[s]&&v(n,i,s)!==void 0)o.push(_(n,i,s));return o}function O(n){return n.positions.reduce((i,o)=>i+o,0)}function T(n,i){let o=[],s=i;while(s!==void 0){let r=n.get(s);if(r?.release)o.push(r.release);s=r?.parent}return o.reverse()}function M(n,i,o){let{state:s}=o,r=[],a=[];for(let c=0;c<n.length;c++){let d=v(n,s,c);if(d===void 0){a.push(n[c].device);continue}let l=b(n,s,d.lock).map((u)=>n[u].device);r.push({device:n[c].device,event:d,waitingWith:l})}return{stalled:r,finished:a,releasedGenerations:T(i,o.key)}}function m(n,i){let o=i;while(n.get(o)!==o)o=n.get(o);return o}function U(n){let i=new Map,o=(r,a)=>{let c=`${r}:${a}`;if(!i.has(c))i.set(c,c);return c};for(let r of n){let a=o("device",r.device);for(let c of r.events)i.set(m(i,o("lock",c.lock)),m(i,a))}let s=new Map;for(let r of n){let a=m(i,`device:${r.device}`);s.set(a,[...s.get(a)??[],r])}return Array.from(s.values())}function y(n,i=1e4){for(let o of U(n)){let r=o.some((a)=>a.events.some((c)=>c.unmodeled===!0))?null:N(o,i);if(r!==null)return r}return null}function N(n,i){let o={positions:n.map(()=>0),arrived:n.map(()=>!1)},s=new Map([[g(o),{}]]),r=[o],a;while(r.length>0){let c=r.pop();if(L(n,c))return null;let d=g(c),l=A(n,c);if(l.length===0){let u=O(c);if(a===void 0||u>a.progress)a={key:d,state:c,progress:u};continue}for(let u of l){let h=g(u.state);if(s.has(h))continue;if(s.size>=i)return null;s.set(h,{parent:d,release:u.release}),r.push(u.state)}}return a===void 0?null:M(n,s,a)}function j(n){let{device:i,event:o,waitingWith:s}=n;return`device "${i}" waits at ${o.tool} lock "${o.lock}" (step ${o.stepIndex}; ${s.length}/${o.deviceCount} arrived: ${s.join(", ")})`}function C(n){let i=Array.from(new Set(n.stalled.map((r)=>`"${r.event.lock}"`))),o=n.releasedGenerations.length>0?n.releasedGenerations.join(" -> "):"none",s=n.finished.length>0?` Tracks already finished (cannot arrive again): ${n.finished.join(", ")}.`:"";return`barrier/criticalSection coordination can never complete: under every possible arrival order at least one device track deadlocks. One reachable stall: ${n.stalled.map(j).join("; ")}. Locks involved: ${i.join(", ")}. Generations released before the stall: ${o}.${s} Each device's track runs sequentially, so a device blocked at one lock never reaches the later lock its peers are waiting at. Reorder the coordination steps so devices visit shared locks in a consistent order, or add the arrivals the stalled locks are missing.`}var F=new Set(["barrier","criticalSection"]);function jy(n){return F.has(n)}function k(n){return typeof n==="string"&&n.length>0}function B(n){return typeof n==="number"&&Number.isInteger(n)&&n>=1}function V(n){return typeof n==="object"&&n!==null}var G=new Set(["android","ios","tvos","visionos","watchos"]);class dh{static validate(n){if(!n.name||typeof n.name!=="string")throw new t("Plan must have a valid name");if(!n.steps||!Array.isArray(n.steps))throw new t("Plan must have a steps array");if(this.validateMultiDeviceRequirements(n),n.devices!==void 0)this.validateDevicesField(n),this.validateDeviceLabelsPresent(n);this.validateCoordinationLocks(n)}static validateUntrusted(n){if(!V(n))throw new t("Plan must have a valid name");this.validate(n)}static validateDevicesField(n){if(!Array.isArray(n.devices))throw new t("Plan 'devices' field must be an array of device labels");if(n.devices.length===0)throw new t("Plan 'devices' array cannot be empty. Remove the field or specify at least one device.");let{labels:i,definitions:o,hasDefinitions:s,hasLabels:r}=zy(n.devices);if(s&&r)throw new t("Plan 'devices' must be a list of labels or a list of objects with label/platform (do not mix formats).");if(s)for(let c of o)this.validateDeviceDefinition(c);if(i.length!==n.devices.length)throw new t("Plan 'devices' entries must be strings or objects with label/platform.");if(new Set(i).size!==i.length)throw new t(`Plan 'devices' array contains duplicate labels: [${i.join(", ")}]`);for(let c of i)if(typeof c!=="string"||c.trim()==="")throw new t(`Invalid device label: ${JSON.stringify(c)}. Device labels must be non-empty strings.`)}static validateDeviceDefinition(n){if(!n.label||n.label.trim()==="")throw new t(`Invalid device label: ${JSON.stringify(n.label)}. Device labels must be non-empty strings.`);if(!n.platform||!G.has(n.platform))throw new t(`Invalid device platform for ${n.label}: ${JSON.stringify(n.platform)}.`)}static validateDeviceLabelsPresent(n){if(!n.devices||n.devices.length===0)return;let i=new Set(zy(n.devices).labels),o={mismatchedInCriticalSection:[],missingLabels:[],invalidLabels:[],missingInCriticalSection:[],invalidInCriticalSection:[]};for(let l=0;l<n.steps.length;l++){let u=n.steps[l];if(this.recordStepDeviceLabel(u,l,i,o),u.tool==="criticalSection")this.recordCriticalSectionDeviceLabels(u,l,i,o)}let{missingLabels:s,invalidLabels:r,missingInCriticalSection:a,invalidInCriticalSection:c}=o,d=[...o.mismatchedInCriticalSection];if(s.length>0){let l=s.map((u)=>`step ${u.index} (${u.tool})`).join(", ");d.push(`Plan declares 'devices' field but the following steps are missing 'device' parameter: ${l}`)}if(r.length>0){let l=r.map((u)=>`step ${u.index} (${u.tool}): device="${u.device}"`).join(", ");d.push(`Plan declares devices [${Array.from(i).join(", ")}] but the following steps use invalid device labels: ${l}`)}if(a.length>0){let l=a.map((u)=>`step ${u.parentIndex}.steps[${u.subIndex}] (${u.tool})`).join(", ");d.push(`Every step inside a criticalSection must declare a 'device' parameter, but the following sub-steps are missing it: ${l}`)}if(c.length>0){let l=c.map((u)=>`step ${u.parentIndex}.steps[${u.subIndex}] (${u.tool}): device="${u.device}"`).join(", ");d.push(`Plan declares devices [${Array.from(i).join(", ")}] but the following criticalSection sub-steps use invalid device labels: ${l}`)}if(d.length>0)throw new t(d.join(`
3
+ `))}static recordStepDeviceLabel(n,i,o,s){let r=qi(n,"device");if(r===void 0||r===null||r==="")s.missingLabels.push({index:i,tool:n.tool});else if(typeof r!=="string"||!o.has(r))s.invalidLabels.push({index:i,tool:n.tool,device:String(r)})}static recordCriticalSectionDeviceLabels(n,i,o,s){let r=n.params?.steps;if(!Array.isArray(r))return;let a=qi(n,"device"),c=typeof a==="string"&&o.has(a)?a:void 0;for(let d=0;d<r.length;d++)this.recordCriticalSectionSubstepLabel(r[d],i,d,{labelErrors:s,deviceSet:o,ownerDevice:c})}static recordCriticalSectionSubstepLabel(n,i,o,{labelErrors:s,deviceSet:r,ownerDevice:a}){if(!n||typeof n!=="object")return;let d=n.params?.device,l=String(n.tool??"unknown");if(d===void 0||d===null||d==="")s.missingInCriticalSection.push({parentIndex:i,subIndex:o,tool:l});else if(typeof d!=="string"||!r.has(d))s.invalidInCriticalSection.push({parentIndex:i,subIndex:o,tool:l,device:String(d)});else if(a!==void 0&&d!==a)s.mismatchedInCriticalSection.push(`step ${i}.steps[${o}] (${l}): device="${d}" differs from criticalSection owner device="${a}". Put it in its own step for that device or use a separate criticalSection step.`)}static validateCoordinationLocks(n){this.validateNoAuthoredLockNamespace(n),this.validateCriticalSectionLocks(n),this.validateBarrierParams(n),this.validateCoordinationTimeouts(n),this.validateNoCrossToolLockSharing(n),this.validateBarrierConsistentDeviceCount(n),this.validateBarrierDistinctDeviceCounts(n),this.validateBarrierGenerationCompleteness(n),this.validateBarrierExcessDeviceArrivals(n),this.validateCoordinationScheduleFeasibility(n)}static validateCoordinationScheduleFeasibility(n){let i=this.collectCoordinationTracks(n);if(i===null||i.length<2)return;let o=y(i);if(o!==null)throw new t(C(o))}static collectCoordinationTracks(n){let i=new Map;for(let o=0;o<n.steps.length;o++){let s=n.steps[o];if(!jy(s.tool))continue;let r=this.resolveCoordinationEvent(s,o);if(r===null)return null;let a=i.get(r.device)??{device:r.device,events:[]};a.events.push(r.event),i.set(r.device,a)}return Array.from(i.values())}static resolveCoordinationEvent(n,i){let o=qi(n,"device"),s=qi(n,"lock"),r=qi(n,"deviceCount");if(!k(o)||!k(s)||!B(r))return null;let a=n.optional===!0||this.hasNestedCoordination(n);return{device:o,event:{tool:n.tool,lock:s,deviceCount:r,stepIndex:i,unmodeled:a}}}static hasNestedCoordination(n){let i=qi(n,"steps");if(!Array.isArray(i))return!1;return i.some((o)=>typeof o==="object"&&o!==null&&("tool"in o)&&jy(String(o.tool)))}static validateCoordinationTimeouts(n){let i=[];for(let o=0;o<n.steps.length;o++){let s=n.steps[o];if(s.tool!=="criticalSection"&&s.tool!=="barrier")continue;let r=qi(s,"timeout");if(r===void 0)continue;if(typeof r!=="number"||!Number.isInteger(r)||r<1||r>Ur)i.push(`${s.tool} step ${o} declares 'timeout' of ${JSON.stringify(r)}, which must be a positive integer no greater than setTimeout's usable range (${Ur}ms, ~24.8 days) -- Node/Bun clamp larger delays to 1ms instead of honoring them.`)}if(i.length>0)throw new t(i.join(`
4
+ `))}static validateNoAuthoredLockNamespace(n){let i=[];for(let o=0;o<n.steps.length;o++){let s=n.steps[o];if(qi(s,"__lockNamespace")!==void 0)i.push(`step ${o} (${s.tool}) sets '__lockNamespace', which is a reserved field injected internally by the plan executor. Authored plans must not set it.`)}if(i.length>0)throw new t(i.join(`
5
+ `))}static validateNoCrossToolLockSharing(n){let i=new Set,o=new Set;for(let r of n.steps){if(r.tool!=="criticalSection"&&r.tool!=="barrier")continue;let a=qi(r,"lock");if(typeof a!=="string"||a.length===0)continue;(r.tool==="criticalSection"?i:o).add(a)}let s=Array.from(i).filter((r)=>o.has(r));if(s.length>0)throw new t(`lock name${s.length===1?"":"s"} ${s.map((r)=>`"${r}"`).join(", ")} ${s.length===1?"is":"are"} used by both a criticalSection step and a barrier step. Both tools share the runtime coordinator's lock namespace and expected-count state, so mixing tool types on the same lock name is racy and can pair mismatched participants or overwrite the expected count. Use a distinct lock name per tool type.`)}static validateCriticalSectionLocks(n){let i=this.collectCriticalSectionLockUsage(n),o=[];for(let[s,r]of i.entries())this.validateCriticalSectionLock(s,r,o);if(o.length>0)throw new t(o.join(`
6
+ `))}static collectCriticalSectionLockUsage(n){let i=new Map;for(let o=0;o<n.steps.length;o++){let s=n.steps[o];if(s.tool!=="criticalSection")continue;let r=qi(s,"lock");if(typeof r!=="string"||r.length===0)continue;let a=i.get(r)??[];a.push({stepIndex:o,device:qi(s,"device"),deviceCount:qi(s,"deviceCount")}),i.set(r,a)}return i}static validateCriticalSectionLock(n,i,o){let s=new Set(i.map((a)=>a.deviceCount).filter((a)=>typeof a==="number"));if(s.size>1){let a=i.map((c)=>`step ${c.stepIndex} deviceCount=${String(c.deviceCount)}`).join(", ");o.push(`criticalSection lock "${n}" has inconsistent deviceCount values: ${a}. All steps sharing a lock must declare the same deviceCount.`);return}let r=s.size===1?s.values().next().value:void 0;if(r!==void 0&&i.length!==r)o.push(`criticalSection lock "${n}" declares deviceCount=${r} but ${i.length} step${i.length===1?"":"s"} reference${i.length===1?"s":""} it. Every participating device needs its own criticalSection step with this lock.`);this.validateCriticalSectionDevices(n,i,o)}static validateCriticalSectionDevices(n,i,o){let s=new Map;for(let r of i){if(typeof r.device!=="string"||r.device.length===0)continue;let a=s.get(r.device)??[];a.push(r.stepIndex),s.set(r.device,a)}for(let[r,a]of s.entries())if(a.length>1)o.push(`criticalSection lock "${n}" is entered twice by device "${r}" (steps ${a.join(", ")}). Each device can participate in a given lock at most once.`)}static validateBarrierParams(n){let i=[];for(let o=0;o<n.steps.length;o++){let s=n.steps[o];if(s.tool!=="barrier")continue;let r=qi(s,"lock");if(typeof r!=="string"||r.length===0)i.push(`barrier step ${o} is missing a non-empty 'lock' parameter.`);let a=qi(s,"deviceCount");if(typeof a!=="number"||!Number.isInteger(a)||a<1)i.push(`barrier step ${o} must declare a positive integer 'deviceCount', got ${JSON.stringify(a)}.`)}if(i.length>0)throw new t(i.join(`
7
+ `))}static validateBarrierDistinctDeviceCounts(n){let i=this.collectBarrierLockUsage(n),o=[];for(let[s,r]of i.entries())for(let a of r.deviceCounts)if(r.devices.size<a){let c=Array.from(r.devices).join(", ")||"none";o.push(`barrier lock "${s}" declares deviceCount=${a} but only ${r.devices.size} distinct device${r.devices.size===1?"":"s"} (${c}) ever target it in this plan. No round can ever complete.`)}if(o.length>0)throw new t(o.join(`
8
+ `))}static validateBarrierConsistentDeviceCount(n){let i=this.collectBarrierLockUsage(n),o=[];for(let[s,r]of i.entries()){if(r.deviceCounts.size<=1)continue;let a=Array.from(r.deviceCounts).sort((c,d)=>c-d).join(", ");o.push(`barrier lock "${s}" is reused with inconsistent deviceCount values (${a}). The runtime coordinator keeps a single shared expected count per lock name, so mixed-count reuse is racy and can deadlock depending on arrival order. Use a distinct lock name for each deviceCount instead.`)}if(o.length>0)throw new t(o.join(`
9
+ `))}static validateBarrierGenerationCompleteness(n){let i=this.collectBarrierLockUsage(n),o=[];for(let[s,r]of i.entries()){if(r.deviceCounts.size!==1)continue;let a=r.deviceCounts.values().next().value;if(a<1||r.arrivals%a===0)continue;o.push(`barrier lock "${s}" has ${r.arrivals} total arrival${r.arrivals===1?"":"s"} across the plan, which is not a multiple of its deviceCount=${a}. At least one generation is necessarily incomplete and would deadlock waiting for a device that never arrives.`)}if(o.length>0)throw new t(o.join(`
10
+ `))}static validateBarrierExcessDeviceArrivals(n){let i=this.collectBarrierLockUsage(n),o=[];for(let[s,r]of i.entries()){if(r.deviceCounts.size!==1)continue;let a=r.deviceCounts.values().next().value;if(a<1||r.arrivals%a!==0)continue;let c=r.arrivals/a;for(let[d,l]of r.deviceOccurrences.entries()){if(l<=c)continue;o.push(`barrier lock "${s}" has ${c} generation${c===1?"":"s"} available (deviceCount=${a}, ${r.arrivals} total arrivals), but device "${d}" arrives ${l} times. A device can participate in a lock at most once per generation, since each device's track executes sequentially, so this device would deadlock waiting for a generation that never admits it again.`)}}if(o.length>0)throw new t(o.join(`
11
+ `))}static collectBarrierLockUsage(n){let i=new Map;for(let o of n.steps)if(o.tool==="barrier")this.recordBarrierLockUsage(i,o);return i}static recordBarrierLockUsage(n,i){let o=qi(i,"lock");if(typeof o!=="string"||o.length===0)return;let s=n.get(o)??{devices:new Set,deviceCounts:new Set,arrivals:0,deviceOccurrences:new Map};s.arrivals+=1;let r=qi(i,"device");if(typeof r==="string"&&r.length>0)s.devices.add(r),s.deviceOccurrences.set(r,(s.deviceOccurrences.get(r)??0)+1);let a=qi(i,"deviceCount");if(typeof a==="number"&&Number.isInteger(a)&&a>=1)s.deviceCounts.add(a);n.set(o,s)}static hasMultiDeviceFeatures(n){if(n.devices&&n.devices.length>0)return!0;for(let i of n.steps){if(i.tool==="criticalSection"||i.tool==="barrier")return!0;if(i.params?.device!==void 0)return!0}return!1}static validateMultiDeviceRequirements(n){if(this.hasMultiDeviceFeatures(n)&&(!n.devices||n.devices.length===0))throw new t("Plan uses multi-device features (device labels or criticalSection/barrier) but does not declare 'devices' field. Add a 'devices' array at the top level of your plan.")}}function fm(n,i){return Math.round(Math.min(1,Math.max(0,n/i))*1e4)/1e4}function LN(n,i,o=!1){let s=w.sessionManager();if(!s)return;let r=n?s.getSessionForDevice(n)??void 0:void 0;if(!r&&o){let{error:a}=ON({message:(n?`deviceGestureRecording start refused: no session of yours holds device '${n}'. `:"deviceGestureRecording start refused: the session holds no device. ")+"Call getAndroid or getApple to acquire a session on it first.",reason:"device_not_held"});return{success:!1,...a,error:a.message}}if(!n)return;try{Nu({action:"deviceGestureRecording start",deviceId:n,ownerSessionUuid:r,requesterSessionUuid:i,sessionManager:s,remedy:bk})}catch(a){if(!(a instanceof mt))throw a;return e.warn(`[DeviceGestureRecording] ${a.message}`),{success:!1,error:a.message,...a.toPayload()}}return}class jH extends t{payload;code="no_active_device_session";retryable=!1;constructor(n,i){super(n);this.payload=i;this.name="DeviceGestureRecordingStartUnheldError"}toPayload(){return this.payload}get reason(){return this.payload.reason}get nextAction(){return this.payload.nextAction}}function Q7(n,i,o=!0){let s=LN(n,i,o);if(!s)return;let r=s.error,a={...s};if(delete a.success,delete a.error,"code"in s&&s.code==="device_owned_by_other_session"&&n)throw new mt("deviceGestureRecording start",n,i,{remedy:bk,message:r});throw new jH(r,a)}
12
+ export{ip,LI,ES,ON,BI,vA,MN,$I,Y6,z7,Hr,NN,j7,FN,K7,J6,G7,X6,Wy,Y7,J7,Z6,qi,zy,X7,Z7,jy,dh,fm,LN,jH,Q7};
13
+
14
+ //# debugId=8A41813FB8F9CA9864756E2164756E21
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{i}from"./chunk-r0vp315h.js";import{$t,_z,In,_k}from"./chunk-sfqe223f.js";import{qc,BX}from"./chunk-13qxf7ym.js";var p={getConfig:qc,updateConfig:BX};class o extends _k{constructor(n=$t(_z),s=i,t=p){super({socketPath:n,timer:s,serverName:"DeviceSnapshot",responseType:"device_snapshot_response",evictedKey:"evictedSnapshotNames",methodLabel:"device snapshot",getConfig:t.getConfig,updateConfig:async(r)=>{let{config:c,evictedSnapshotNames:a}=await t.updateConfig(r);return{config:c,evictedItems:a}}})}}var e=new In;function XK(){return e.instance?.getSocketPath()??$t(_z)}async function ZK(){await e.start(()=>new o)}async function QK(){await e.stop()}
3
+ export{XK,ZK,QK};
4
+
5
+ //# debugId=FDE6EDCEDFC8BC5164756E2164756E21