@reason-machines/cli-linux-x64 0.2.419 → 0.2.421

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 (160) hide show
  1. package/THIRD_PARTY_NOTICES.txt +8 -7
  2. package/bin/reason +2 -2
  3. package/bin/runtime/srt/sandbox-runtime.mjs +52 -52
  4. package/bin/vm-hands/api-18d75dfn.js +2 -0
  5. package/bin/vm-hands/api-credentials-3vhge1ap.js +2 -0
  6. package/bin/vm-hands/connect-cli-5r07fda9.js +2 -0
  7. package/bin/vm-hands/custom-endpoint-device-17t4efc4.js +2 -0
  8. package/bin/vm-hands/desktop-account-6sjrxy69.js +2 -0
  9. package/bin/vm-hands/device-workspace-s50q53sz.js +2 -0
  10. package/bin/vm-hands/fsevents-p3d8kd0p.js +2 -0
  11. package/bin/vm-hands/hands-worker-source-kddz4y15.js +2 -0
  12. package/bin/vm-hands/index-wrw65904.js +12818 -0
  13. package/bin/vm-hands/install-receipt-ysa70fvh.js +2 -0
  14. package/bin/vm-hands/local-automation-764g234v.js +2 -0
  15. package/bin/vm-hands/local-capabilities-mg6eae35.js +2 -0
  16. package/bin/vm-hands/local-desktop-users-cppjjr81.js +2 -0
  17. package/bin/vm-hands/local-display-mac-0qz3b627.js +2 -0
  18. package/bin/vm-hands/local-display-session-a59620te.js +2 -0
  19. package/bin/vm-hands/local-display-video-6zdpjv5n.js +2 -0
  20. package/bin/vm-hands/local-managed-process-s7j196kq.js +2 -0
  21. package/bin/vm-hands/local-pty-session-rpk05ap5.js +2 -0
  22. package/bin/vm-hands/managed-runtime-vg23x3np.js +2 -0
  23. package/bin/vm-hands/network-contract-trkxqc0w.js +2 -0
  24. package/bin/vm-hands/package-xqbhdf15.js +2 -0
  25. package/bin/vm-hands/permissions-zkrmth58.js +2 -0
  26. package/bin/vm-hands/reason-hands-protocol-xn3ddz70.js +2 -0
  27. package/bin/vm-hands/serve-service-y2sa6493.js +2 -0
  28. package/bin/vm-hands/status-6qmcgcem.js +10 -0
  29. package/bin/vm-hands/version-42drg7mg.js +2 -0
  30. package/bin/vm-hands/{vm-hands-entry-lite-agsp101y.js → vm-hands-entry-lite-21qpxvt8.js} +2 -2
  31. package/bin/vm-hands/vm-hands-entry-lite-2x8g6ktg.js +5 -0
  32. package/bin/vm-hands/vm-hands-entry-lite-33hwmnd3.js +2 -0
  33. package/bin/vm-hands/vm-hands-entry-lite-3krzmhkk.js +3 -0
  34. package/bin/vm-hands/vm-hands-entry-lite-4vks5phw.js +42 -0
  35. package/bin/vm-hands/vm-hands-entry-lite-4wpqs406.js +126 -0
  36. package/bin/vm-hands/vm-hands-entry-lite-50zbqwkv.js +3 -0
  37. package/bin/vm-hands/vm-hands-entry-lite-5dtfehjv.js +3 -0
  38. package/bin/vm-hands/vm-hands-entry-lite-60pg3wxj.js +3 -0
  39. package/bin/vm-hands/vm-hands-entry-lite-6c67a3jc.js +3 -0
  40. package/bin/vm-hands/vm-hands-entry-lite-7fsj5nrx.js +539 -0
  41. package/bin/vm-hands/vm-hands-entry-lite-8r31b0ps.js +5 -0
  42. package/bin/vm-hands/vm-hands-entry-lite-8wf6y7xy.js +105 -0
  43. package/bin/vm-hands/vm-hands-entry-lite-aj139v8j.js +3 -0
  44. package/bin/vm-hands/vm-hands-entry-lite-avc65bd7.js +65 -0
  45. package/bin/vm-hands/{vm-hands-entry-lite-vsa7t6m9.js → vm-hands-entry-lite-beyyy1gz.js} +54 -54
  46. package/bin/vm-hands/vm-hands-entry-lite-bx5zy5bd.js +2 -0
  47. package/bin/vm-hands/vm-hands-entry-lite-c8ga19q0.js +3 -0
  48. package/bin/vm-hands/vm-hands-entry-lite-djg69hf4.js +3 -0
  49. package/bin/vm-hands/vm-hands-entry-lite-dk79tnax.js +3 -0
  50. package/bin/vm-hands/vm-hands-entry-lite-dsxpxqd3.js +4 -0
  51. package/bin/vm-hands/vm-hands-entry-lite-ec9jemny.js +5 -0
  52. package/bin/vm-hands/vm-hands-entry-lite-fbhqfzbq.js +4 -0
  53. package/bin/vm-hands/{vm-hands-entry-lite-4k4h9rcq.js → vm-hands-entry-lite-fcvf8md1.js} +2 -2
  54. package/bin/vm-hands/vm-hands-entry-lite-g4zd2d5n.js +2 -0
  55. package/bin/vm-hands/vm-hands-entry-lite-gvh1qskx.js +128 -0
  56. package/bin/vm-hands/vm-hands-entry-lite-hbs3tpdg.js +3 -0
  57. package/bin/vm-hands/vm-hands-entry-lite-hek6nw5m.js +9 -0
  58. package/bin/vm-hands/vm-hands-entry-lite-hk6trmwa.js +4 -0
  59. package/bin/vm-hands/vm-hands-entry-lite-jev771b3.js +3 -0
  60. package/bin/vm-hands/vm-hands-entry-lite-jzz73e3f.js +112 -0
  61. package/bin/vm-hands/vm-hands-entry-lite-m1yxqqaz.js +14 -0
  62. package/bin/vm-hands/vm-hands-entry-lite-np07qyeq.js +3 -0
  63. package/bin/vm-hands/vm-hands-entry-lite-nzmkyezg.js +3 -0
  64. package/bin/vm-hands/vm-hands-entry-lite-pf5qtbj5.js +5 -0
  65. package/bin/vm-hands/vm-hands-entry-lite-qy9xg6em.js +3 -0
  66. package/bin/vm-hands/{vm-hands-entry-lite-6y6pz2yw.js → vm-hands-entry-lite-rfz60hb3.js} +2 -2
  67. package/bin/vm-hands/vm-hands-entry-lite-s1nwwtcs.js +452 -0
  68. package/bin/vm-hands/vm-hands-entry-lite-s4bharcb.js +9 -0
  69. package/bin/vm-hands/vm-hands-entry-lite-s5qkb1fk.js +6 -0
  70. package/bin/vm-hands/vm-hands-entry-lite-tdgtpx8e.js +2 -0
  71. package/bin/vm-hands/vm-hands-entry-lite-vpz54vwj.js +7 -0
  72. package/bin/vm-hands/vm-hands-entry-lite-weqw6ykz.js +52 -0
  73. package/bin/vm-hands/vm-hands-entry-lite-wx4ax7wg.js +4 -0
  74. package/bin/vm-hands/{vm-hands-entry-lite-fzkfajew.js → vm-hands-entry-lite-ycnrtwdf.js} +5 -9
  75. package/bin/vm-hands/vm-hands-entry-lite-yretc2th.js +3 -0
  76. package/bin/vm-hands/vm-hands-entry-lite-z76nfb19.js +3 -0
  77. package/bin/vm-hands/vm-hands-entry-lite-zp6naptr.js +3 -0
  78. package/bin/vm-hands/vm-hands-entry-lite.js +3 -1
  79. package/bin/vm-hands/vm-hands-executor-957e80sb.js +11 -0
  80. package/bin/vm-hands/vm-hands-op-runner-65erpgzp.js +2 -0
  81. package/bin/vm-hands/vm-hands-runtime-6stbsbbw.js +4 -0
  82. package/bin/vm-hands/worker-preview-readiness-w62n91kr.js +2 -0
  83. package/bin/vm-hands/worker-sandbox-2r5nseff.js +2 -0
  84. package/package.json +1 -1
  85. package/bin/vm-hands/api-credentials-s4897qxy.js +0 -2
  86. package/bin/vm-hands/api-m73x3da5.js +0 -2
  87. package/bin/vm-hands/ask-relay-4kwcx2b7.js +0 -8
  88. package/bin/vm-hands/connect-cli-34b18gjs.js +0 -2
  89. package/bin/vm-hands/custom-endpoint-device-j012b4bd.js +0 -2
  90. package/bin/vm-hands/desktop-account-0q0arpzk.js +0 -2
  91. package/bin/vm-hands/device-workspace-3jxhs54b.js +0 -2
  92. package/bin/vm-hands/hands-worker-source-y64axsw3.js +0 -2
  93. package/bin/vm-hands/index-194s4vz0.js +0 -12818
  94. package/bin/vm-hands/install-receipt-1g68b446.js +0 -2
  95. package/bin/vm-hands/local-automation-k2w46hn2.js +0 -2
  96. package/bin/vm-hands/local-capabilities-tdzbqmrb.js +0 -2
  97. package/bin/vm-hands/local-desktop-users-6thzvydd.js +0 -2
  98. package/bin/vm-hands/local-display-mac-59ma7sxa.js +0 -2
  99. package/bin/vm-hands/local-display-session-4833qq7h.js +0 -2
  100. package/bin/vm-hands/local-display-video-c1143mz6.js +0 -2
  101. package/bin/vm-hands/local-managed-process-mr0zpk7c.js +0 -2
  102. package/bin/vm-hands/local-pty-session-bwarwpsd.js +0 -2
  103. package/bin/vm-hands/managed-runtime-vz1wqwwg.js +0 -2
  104. package/bin/vm-hands/network-contract-gprc37sw.js +0 -2
  105. package/bin/vm-hands/package-ej9snd47.js +0 -2
  106. package/bin/vm-hands/permissions-7sfghef4.js +0 -2
  107. package/bin/vm-hands/reason-hands-protocol-jsrkawe2.js +0 -2
  108. package/bin/vm-hands/serve-service-kngyzh74.js +0 -2
  109. package/bin/vm-hands/status-jz29fb95.js +0 -96
  110. package/bin/vm-hands/version-g29vt13t.js +0 -2
  111. package/bin/vm-hands/vm-hands-entry-lite-0h4qmgm2.js +0 -9
  112. package/bin/vm-hands/vm-hands-entry-lite-0k13wmzm.js +0 -3
  113. package/bin/vm-hands/vm-hands-entry-lite-1exfjv79.js +0 -52
  114. package/bin/vm-hands/vm-hands-entry-lite-26q3hbdc.js +0 -3
  115. package/bin/vm-hands/vm-hands-entry-lite-28s7v15d.js +0 -4
  116. package/bin/vm-hands/vm-hands-entry-lite-2m5dwrdf.js +0 -6
  117. package/bin/vm-hands/vm-hands-entry-lite-37hvds7z.js +0 -5
  118. package/bin/vm-hands/vm-hands-entry-lite-3rqdzqhk.js +0 -112
  119. package/bin/vm-hands/vm-hands-entry-lite-4gh5kfr4.js +0 -3
  120. package/bin/vm-hands/vm-hands-entry-lite-6nwbqg37.js +0 -3
  121. package/bin/vm-hands/vm-hands-entry-lite-714wspqb.js +0 -3
  122. package/bin/vm-hands/vm-hands-entry-lite-7zk0r3p9.js +0 -5
  123. package/bin/vm-hands/vm-hands-entry-lite-9qep7pka.js +0 -4
  124. package/bin/vm-hands/vm-hands-entry-lite-am6kj1n1.js +0 -3
  125. package/bin/vm-hands/vm-hands-entry-lite-as1tkffn.js +0 -5
  126. package/bin/vm-hands/vm-hands-entry-lite-bxt4n1nj.js +0 -3
  127. package/bin/vm-hands/vm-hands-entry-lite-c2g3wmkp.js +0 -3
  128. package/bin/vm-hands/vm-hands-entry-lite-d2w8tghq.js +0 -3
  129. package/bin/vm-hands/vm-hands-entry-lite-d98m00b8.js +0 -3
  130. package/bin/vm-hands/vm-hands-entry-lite-daxcxjze.js +0 -344
  131. package/bin/vm-hands/vm-hands-entry-lite-dcnyve97.js +0 -3
  132. package/bin/vm-hands/vm-hands-entry-lite-e1b89x66.js +0 -3
  133. package/bin/vm-hands/vm-hands-entry-lite-ej5ffjck.js +0 -105
  134. package/bin/vm-hands/vm-hands-entry-lite-ejkba2nk.js +0 -3
  135. package/bin/vm-hands/vm-hands-entry-lite-f3wh0dza.js +0 -5
  136. package/bin/vm-hands/vm-hands-entry-lite-f5xb489y.js +0 -4
  137. package/bin/vm-hands/vm-hands-entry-lite-feybcq63.js +0 -3
  138. package/bin/vm-hands/vm-hands-entry-lite-fpp2bs9y.js +0 -452
  139. package/bin/vm-hands/vm-hands-entry-lite-gt497d5x.js +0 -3
  140. package/bin/vm-hands/vm-hands-entry-lite-gxper06w.js +0 -3
  141. package/bin/vm-hands/vm-hands-entry-lite-j2ng164q.js +0 -9
  142. package/bin/vm-hands/vm-hands-entry-lite-jp9q2vsx.js +0 -127
  143. package/bin/vm-hands/vm-hands-entry-lite-magmzx9c.js +0 -3
  144. package/bin/vm-hands/vm-hands-entry-lite-ntx8fdyq.js +0 -5
  145. package/bin/vm-hands/vm-hands-entry-lite-pfzczmaa.js +0 -4
  146. package/bin/vm-hands/vm-hands-entry-lite-pkc4ry5x.js +0 -539
  147. package/bin/vm-hands/vm-hands-entry-lite-pp7jfqzr.js +0 -3
  148. package/bin/vm-hands/vm-hands-entry-lite-q8wkrzer.js +0 -66
  149. package/bin/vm-hands/vm-hands-entry-lite-s823n1q9.js +0 -3
  150. package/bin/vm-hands/vm-hands-entry-lite-s9xf5z69.js +0 -7
  151. package/bin/vm-hands/vm-hands-entry-lite-tchc7z17.js +0 -128
  152. package/bin/vm-hands/vm-hands-entry-lite-tytfs183.js +0 -42
  153. package/bin/vm-hands/vm-hands-entry-lite-v4jtxgaj.js +0 -4
  154. package/bin/vm-hands/vm-hands-entry-lite-vgpt2n1v.js +0 -11
  155. package/bin/vm-hands/vm-hands-entry-lite-xp3qzxk5.js +0 -3
  156. package/bin/vm-hands/vm-hands-executor-epyhpjv3.js +0 -11
  157. package/bin/vm-hands/vm-hands-op-runner-fn1qph82.js +0 -2
  158. package/bin/vm-hands/vm-hands-runtime-8vt9etvv.js +0 -4
  159. package/bin/vm-hands/worker-preview-readiness-yfjgban2.js +0 -2
  160. package/bin/vm-hands/worker-sandbox-z0t69av8.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wr,qn,Vr,Wn}from"./vm-hands-entry-lite-g4zd2d5n.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{Wr as installationReceiptPath,Vr as installerReasonAlias,qn as installerReceiptLauncher,Wn as loadInstallationReceipt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cn,Os,Is,Ds,Ns,An}from"./vm-hands-entry-lite-ycnrtwdf.js";import"./vm-hands-entry-lite-gvh1qskx.js";import"./vm-hands-entry-lite-4wpqs406.js";import"./vm-hands-entry-lite-nzmkyezg.js";import"./vm-hands-entry-lite-pf5qtbj5.js";import"./vm-hands-entry-lite-21qpxvt8.js";import"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-hk6trmwa.js";import"./vm-hands-entry-lite-8wf6y7xy.js";import"./vm-hands-entry-lite-g4zd2d5n.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-m1yxqqaz.js";import"./vm-hands-entry-lite-jzz73e3f.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-4vks5phw.js";import"./vm-hands-entry-lite-fbhqfzbq.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{Is as ensureLocalBrowser,Cn as localAutomationAvailable,Ds as localBrowserProfile,Os as localUserChromeHost,Ns as runAutomationCallLocally,An as runLocalAutomation};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wo,$i,un,Vo,Go,Es,xs,Ko,Jo,ks,Cs,As,Ps}from"./vm-hands-entry-lite-7fsj5nrx.js";import"./vm-hands-entry-lite-dsxpxqd3.js";import"./vm-hands-entry-lite-s1nwwtcs.js";import"./vm-hands-entry-lite-beyyy1gz.js";import"./vm-hands-entry-lite-s4bharcb.js";import"./vm-hands-entry-lite-vpz54vwj.js";import"./vm-hands-entry-lite-s5qkb1fk.js";import"./vm-hands-entry-lite-wx4ax7wg.js";import"./vm-hands-entry-lite-bx5zy5bd.js";import"./vm-hands-entry-lite-ycnrtwdf.js";import"./vm-hands-entry-lite-gvh1qskx.js";import"./vm-hands-entry-lite-4wpqs406.js";import"./vm-hands-entry-lite-nzmkyezg.js";import"./vm-hands-entry-lite-pf5qtbj5.js";import"./vm-hands-entry-lite-21qpxvt8.js";import"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-hk6trmwa.js";import"./vm-hands-entry-lite-8wf6y7xy.js";import"./vm-hands-entry-lite-g4zd2d5n.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-m1yxqqaz.js";import"./vm-hands-entry-lite-jzz73e3f.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-4vks5phw.js";import"./vm-hands-entry-lite-fbhqfzbq.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";export{r as LocalCapabilityError,Wo as SHORT_REQUEST_CAPABILITIES,ks as capabilityInventoryForRoots,$i as confinedExecutionShell,Vo as defaultLocalCommandRunner,Cs as deliverLocalHandsEnvironment,Jo as enrolledRootPaths,Ps as executeLocalOperation,xs as grantLocalHandsWorkspaceControl,Es as openHandsWorkspaceGrant,As as rebindLocalHandsControl,Go as runFileCapability,Ko as runTransferCapability,un as spawnCaptured};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kt,da,pa,Ii,Di}from"./vm-hands-entry-lite-fbhqfzbq.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{da as forgetLocalDesktopUse,Di as holdLocalDesktop,kt as noteLocalDesktopUse,pa as releaseLocalDesktop,Ii as trackDesktopRun};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ye,mt,Jn,Zn}from"./vm-hands-entry-lite-jzz73e3f.js";export{Ye as macScreenStatus,Zn as openMacInput,Jn as openMacWindowBounds,mt as requestMacScreenAccess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$t,Ls,G,qe,Bt}from"./vm-hands-entry-lite-gvh1qskx.js";import"./vm-hands-entry-lite-4wpqs406.js";import"./vm-hands-entry-lite-nzmkyezg.js";import"./vm-hands-entry-lite-pf5qtbj5.js";import"./vm-hands-entry-lite-21qpxvt8.js";import"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-hk6trmwa.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-m1yxqqaz.js";import"./vm-hands-entry-lite-jzz73e3f.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-fbhqfzbq.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{qe as ensureLinuxDesktop,$t as localDisplayAvailable,Ls as localDisplayReady,G as privateDirectory,Bt as runLocalDisplayStream};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Tn,Rn,On,In,Pr}from"./vm-hands-entry-lite-4wpqs406.js";import"./vm-hands-entry-lite-hk6trmwa.js";import"./vm-hands-entry-lite-m1yxqqaz.js";import"./vm-hands-entry-lite-jzz73e3f.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{Tn as MAC_SCREEN,Rn as WINDOWS_SCREEN,On as createDisplayVideoLane,Pr as localDisplayVideoAvailable,In as simulatorVideoFfmpeg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nt,ur,Ts,Rs}from"./vm-hands-entry-lite-dsxpxqd3.js";import"./vm-hands-entry-lite-s1nwwtcs.js";import"./vm-hands-entry-lite-beyyy1gz.js";import"./vm-hands-entry-lite-s4bharcb.js";import"./vm-hands-entry-lite-s5qkb1fk.js";import"./vm-hands-entry-lite-wx4ax7wg.js";import"./vm-hands-entry-lite-pf5qtbj5.js";import"./vm-hands-entry-lite-21qpxvt8.js";import"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-hk6trmwa.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-4vks5phw.js";import"./vm-hands-entry-lite-fbhqfzbq.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{nt as ManagedProcessStoppedError,Ts as controlManagedDeviceProcess,Rs as retireManagedDeviceProcess,ur as runManagedDeviceProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Rr,jt,Or,Xo,Dn,Ir,Nn}from"./vm-hands-entry-lite-nzmkyezg.js";import"./vm-hands-entry-lite-pf5qtbj5.js";import"./vm-hands-entry-lite-21qpxvt8.js";import"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{jt as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES,Or as LOCAL_PTY_MAX_SESSIONS,Rr as LOCAL_PTY_MAX_SESSION_MS,Ir as defaultConnect,Xo as defaultLoginShell,Dn as ptyRuntimeSupported,Nn as runLocalPtySession};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ms,gs,_s,ys,bs,vs,Ss}from"./vm-hands-entry-lite-2x8g6ktg.js";import"./vm-hands-entry-lite-wx4ax7wg.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{bs as acquireManagedRuntimeDirectoryLock,_s as currentManagedRuntimeVersion,Ss as flushManagedRuntimeLifecycleEvents,ys as isManagedRuntimeVersionExecutable,gs as legacyManagedRuntimePaths,ms as managedRuntimePaths,vs as recordManagedRuntimeLifecycle};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{tt,Te,Ws,Vs,Gs,ei,Ks,rn,ti,bt,Re,vt,ri,ni,ii,oi,si,ai,ci,li,ui,di,pi,hi,fi,mi,gi,_i,pe,Y,Oe,q,yi,wi,bi,Q,vi,Si,Ei,xi,ki,St,Ci,Js,or,Ai,Zs,ts,Xs,Ys,Qs,ea,ta,ra,na,ia,oa,sa,aa,ca,la,ua}from"./vm-hands-entry-lite-4vks5phw.js";export{Ci as AUTOMATION_CLOUD_SESSIONS,St as AUTOMATION_USER_CHROME,pi as HANDS_CLOUD_ACCESS,hi as HANDS_CLOUD_ACCESS_KEY,pe as HANDS_CONFINEMENT,Y as HANDS_CONFINEMENT_KEY,ni as HANDS_ENVIRONMENT_AT_CLAIM,ii as HANDS_ENVIRONMENT_AT_CLAIM_KEY,ti as HANDS_ENVIRONMENT_DELIVERY,bt as HANDS_ENVIRONMENT_DELIVER_CONTROL,fi as HANDS_HEADLESS_BROWSER,mi as HANDS_HEADLESS_BROWSER_KEY,yi as HANDS_JOBS_USER,wi as HANDS_JOBS_USER_KEY,gi as HANDS_LARGE_ENVIRONMENT,_i as HANDS_LARGE_ENVIRONMENT_KEY,Oe as HANDS_MODEL_JOBS_EGRESS,q as HANDS_MODEL_JOBS_EGRESS_KEY,ai as HANDS_REBIND,di as HANDS_REBIND_CONTROL,ui as HANDS_REBIND_KEY,vi as HANDS_SESSION_CAP_KEY,Si as HANDS_SESSION_CAP_NONE,bi as HANDS_SESSION_GROUP,Q as HANDS_SESSION_GROUP_KEY,oi as HANDS_WORKSPACE_CHECK,si as HANDS_WORKSPACE_CHECK_KEY,ci as HANDS_WORKSPACE_GRANT,li as HANDS_WORKSPACE_GRANT_KEY,xi as JOBS_START_WAIT,ki as JOBS_START_WAIT_KEY,Te as LOCAL_OPERATION_MAX_BYTES,tt as LOCAL_RUNTIME_PROTOCOL_VERSION,Gs as LOCAL_RUNTIME_ROUTES,rn as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,ei as LOCAL_RUNTIME_SESSION_PATH,or as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,Ws as RELAY_HOST_ALIAS_HEADER,Vs as RELAY_HOST_ALIAS_VERSION,ri as VM_HANDS_UNBIND_UNVERIFIED_EVENT,Re as VM_HANDS_WORKSPACE_DEFERRED_KEY,vt as VM_HANDS_WORKSPACE_GRANT_CONTROL,Ei as WORKER_PREVIEW_CARRIED_JOBS,Js as WORKER_STARTUP_TIMING_STAGES,Ai as buildLocalRuntimeDeviceProofBytes,Ks as localRuntimeSessionRoutable,na as parseLocalRuntimeDisconnectResponse,Ys as parseLocalRuntimeEnrollmentResponse,Zs as parseLocalRuntimeErrorEnvelope,ea as parseLocalRuntimeFirstHeartbeat,Qs as parseLocalRuntimeHeartbeatResponse,ra as parseLocalRuntimeIdentityResponse,oa as parseLocalRuntimeLifecycleResponse,ia as parseLocalRuntimeLocalSubscriptionResponse,sa as parseLocalRuntimeOperationClaim,ua as parseLocalRuntimeOperationCompletionResponse,la as parseLocalRuntimeOperationEnvironmentResponse,ca as parseLocalRuntimeOperationEventsResponse,aa as parseLocalRuntimeOperationHeartbeatResponse,ts as parseLocalRuntimeProofChallenge,Xs as parseLocalRuntimeRegistrationResponse,ta as parseLocalRuntimeRootsSyncResponse};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn}from"./vm-hands-entry-lite-60pg3wxj.js";export default cn();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qo,es,zs,qs}from"./vm-hands-entry-lite-m1yxqqaz.js";import"./vm-hands-entry-lite-jzz73e3f.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{qs as allowMacPermissions,zs as permissionsSummary,es as readMacPermissions,Qo as reasonIdentity};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{P,Mr,$r,Ln,ut,Mn,Br,Ke,ve,$n,Je,Wt,ne,Ze,Bn,Se,Vt,Fr,Gt,jr,Fn,ae,U,N,ce,Ur,Hr,jn}from"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{jr as REASON_HANDS_CLOSE_CODES,Je as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,Br as REASON_HANDS_JOB_MAX_INPUT_CHARS,Ke as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,ve as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,$n as REASON_HANDS_JOB_MAX_RECORDS,Mn as REASON_HANDS_MAX_ERROR_CHARS,Mr as REASON_HANDS_MAX_FRAME_BYTES,$r as REASON_HANDS_MAX_INPUT_CHARS,ut as REASON_HANDS_MAX_OUTPUT_CHARS,Ln as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,P as REASON_HANDS_PROTOCOL_VERSION,Fr as REASON_HANDS_PTY_ANCHOR_EXIT_MS,Gt as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,Vt as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,Se as REASON_HANDS_PTY_MAX_DIMENSION,ne as REASON_HANDS_PTY_MAX_INPUT_BYTES,Ze as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,Bn as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,Wt as REASON_HANDS_PTY_PROTOCOL_VERSION,Fn as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,U as isReasonHandsGeneration,ce as isReasonHandsPtyJobId,ae as isReasonHandsRequestId,N as isReasonHandsUuid,Ur as parseReasonHandsJobRequest,Hr as parseReasonHandsJobResult,jn as parseReasonHandsPtyReceipt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{zr,Ee,J,Hn,$s,ho,Bs,Xe,Yo,zn,Fs,js,qr,Us,Hs}from"./vm-hands-entry-lite-8wf6y7xy.js";import"./vm-hands-entry-lite-g4zd2d5n.js";import"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-jev771b3.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-6c67a3jc.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{zr as WORKER_SERVICE_ENV,J as WorkerServiceError,ho as connectServiceLabel,Ee as defaultWorkerServiceHost,js as installWorkerService,Xe as installedWorkerService,Bs as isConnectServiceLabel,Hs as removeWorkerService,qr as restartWorkerService,Us as retargetWorkerServiceLogs,Yo as retireLegacyWorkerService,Fs as workerServiceDefinitionCurrent,Hn as workerServiceLauncher,zn as workerServiceProcessRunning,$s as workerServiceRetargetPending};
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import"./vm-hands-entry-lite-8r31b0ps.js";import"./vm-hands-entry-lite-fcvf8md1.js";import{g}from"./vm-hands-entry-lite-aj139v8j.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-rfz60hb3.js";import"./vm-hands-entry-lite-50zbqwkv.js";import{Ht,lt}from"./vm-hands-entry-lite-pf5qtbj5.js";import{w,M,lr,Fe,rt}from"./vm-hands-entry-lite-weqw6ykz.js";import"./vm-hands-entry-lite-4vks5phw.js";import"./vm-hands-entry-lite-7fsj5nrx.js";import"./vm-hands-entry-lite-s1nwwtcs.js";import"./vm-hands-entry-lite-33hwmnd3.js";import"./vm-hands-entry-lite-s5qkb1fk.js";import"./vm-hands-entry-lite-vpz54vwj.js";import"./vm-hands-entry-lite-z76nfb19.js";import"./vm-hands-entry-lite-4wpqs406.js";import"./vm-hands-entry-lite-jzz73e3f.js";import"./vm-hands-entry-lite-hek6nw5m.js";import"./vm-hands-entry-lite-m1yxqqaz.js";import"./vm-hands-entry-lite-hk6trmwa.js";import"./vm-hands-entry-lite-2x8g6ktg.js";import"./vm-hands-entry-lite-g4zd2d5n.js";import"./vm-hands-entry-lite-8wf6y7xy.js";import"./vm-hands-entry-lite-bx5zy5bd.js";import"./vm-hands-entry-lite-tdgtpx8e.js";import"./vm-hands-entry-lite-beyyy1gz.js";import"./vm-hands-entry-lite-21qpxvt8.js";import"./vm-hands-entry-lite-dsxpxqd3.js";import"./vm-hands-entry-lite-fbhqfzbq.js";import"./vm-hands-entry-lite-nzmkyezg.js";import"./vm-hands-entry-lite-gvh1qskx.js";import"./vm-hands-entry-lite-ycnrtwdf.js";import"./vm-hands-entry-lite-ec9jemny.js";import"./vm-hands-entry-lite-s4bharcb.js";import"./vm-hands-entry-lite-wx4ax7wg.js";import{a}from"./vm-hands-entry-lite-jev771b3.js";import{t,o,u,i,s,n}from"./vm-hands-entry-lite-avc65bd7.js";import"./vm-hands-entry-lite-6c67a3jc.js";import{readFileSync as me,realpathSync as k,renameSync as ge,unlinkSync as fe,writeFileSync as he}from"fs";import{dirname as ye,join as I}from"path";function h(e){return`claude mcp add --transport http reason ${e}`}function C(e){return`codex mcp add reason --url ${e}
3
+ codex mcp login reason`}var F=h("https://mcp.reasonmachines.com/mcp"),z=C("https://mcp.reasonmachines.com/mcp"),B=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,H=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var b="https://github.com/reason-machines/reason-plugins",X=`Connect a coding agent to Reason over MCP
4
+
5
+ Usage:
6
+ reason mcp Show how to connect Claude Code, Codex, or another MCP client
7
+ reason mcp uninstall Remove only this machine's registrations of the earlier, retired server
8
+
9
+ Plugins for Claude Code and Codex: ${b}
10
+ `;var P=s(["granted","not_granted","unknown"]),y=i({status:P,checkedAt:o().finite(),executablePath:t().min(1)});var Oe=i({version:n(1),key:t(),at:o(),self:i({principal_type:t(),user_id:t().optional(),user_name:t().nullish(),email:t().nullish(),org_id:t(),organization_name:t().nullish(),organization_slug:t().nullish(),mcp_connections:u(i({client_id:t(),client_name:t(),last_used_at:t().nullable()})).optional()})});var x=30000;function L(e,c=Date.now(),R=null){let r=lt(e),d=(()=>{if(r?.state!=="connected"&&r?.state!=="starting")return!1;try{return process.kill(r.pid,0),!0}catch{return!1}})(),S=d&&r?.state==="connected",p=(f)=>S&&c-f>=0&&c-f<x,l=y.safeParse(r?.fullDiskAccess),m=Ht(r,R,c);return{...m?{permission_recovery:m}:{},full_disk_access:l.success&&p(l.data.checkedAt)?l.data.status:"unknown",keep_awake:{enabled:lr(e)==="battery_and_ac",holding:r?.idleSleepHold===!0&&p(Date.parse(r.lastHeartbeatAt??""))},executable:d&&l.success?l.data.executablePath:null}}function De(e=g()){if(process.platform!=="darwin")return null;let c=Fe(I(rt(k(a()),e),"worker.json"));return c?L(w(c).daemon,Date.now(),M(c)):null}export{De as connectionMacState};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{_t}from"./vm-hands-entry-lite-33hwmnd3.js";export{_t as CLI_VERSION};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var e=String.raw`(function(loadFfi, existsSync) {
2
+ var qt=String.raw`(function(loadFfi, existsSync) {
3
3
  const STARTF_USESTDHANDLES = 0x100;
4
4
  const CREATE_SUSPENDED = 0x4;
5
5
  const CREATE_UNICODE_ENVIRONMENT = 0x400;
@@ -242,4 +242,4 @@ var e=String.raw`(function(loadFfi, existsSync) {
242
242
  }
243
243
  return { available, unavailableReason, defaultShell, shellArgs, quoteArg, environmentBlock, spawn };
244
244
  })`;
245
- export{e as yh};
245
+ export{qt};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{Zr}from"./vm-hands-entry-lite-hek6nw5m.js";import{dt}from"./vm-hands-entry-lite-5dtfehjv.js";import{a}from"./vm-hands-entry-lite-jev771b3.js";import{A}from"./vm-hands-entry-lite-6c67a3jc.js";import{randomUUID as f}from"crypto";import{chmodSync as U,closeSync as h,constants as g,existsSync as me,fstatSync as F,lstatSync as R,mkdirSync as B,openSync as G,readFileSync as Y,readdirSync as z,readlinkSync as J,realpathSync as P,renameSync as _,rmSync as p,statSync as K,symlinkSync as _t,unlinkSync as M,writeFileSync as L}from"fs";import{basename as vt,dirname as S,isAbsolute as fe,join as c,relative as ge,resolve as b,sep as _e}from"path";import{createRequire as H}from"module";var q=1,j=1,ye=128,ve=65536;var he=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;var D=/^[a-z0-9_.-]{1,80}$/,be=64,Ee="so.ara.device-broker",Me=[Ee,"com.reasonmachines.device-broker"],Pt=Zr(Me);var we=["service.install_started","service.install_completed","service.install_failed","service.launcher_adopted","service.launcher_conflict","service.started","service.reconnecting","service.reconnected","service.idle_sleep_held","service.idle_sleep_released","service.idle_sleep_failed","service.start_failed","service.stopped","service.exit_failed","service.singleton_rejected","credential.migration_started","credential.migration_completed","credential.migration_failed","credential.store_started","credential.store_completed","credential.store_failed","credential.delete_started","credential.delete_completed","credential.delete_failed","update.check_started","update.not_available","update.download_started","update.downloaded","update.verified","update.activated","update.rollback","update.failed","executor.update.check_started","executor.update.not_available","executor.update.download_started","executor.update.downloaded","executor.update.verified","executor.update.activated","executor.update.rollback","executor.update.failed","identity.refresh_completed","identity.refresh_failed","update.device_moved","update.components_installed","update.deferred","update.deferral_expired","worker.previous_exit","worker.capabilities_withheld","identity.computer_use_unavailable"];function X(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function W(e,t,n=[]){let r=new Set([...t,...n]);return t.every((i)=>(i in e))&&Object.keys(e).every((i)=>r.has(i))}function E(e){return typeof e==="string"&&he.test(e)}function Z(e){return typeof e==="string"&&!Number.isNaN(Date.parse(e))&&new Date(e).toISOString()===e}function k(e){B(e,{recursive:!0,mode:448}),U(e,448)}function Re(e,t){k(S(e));let n=`${e}.${process.pid}.${f()}.tmp`;try{L(n,t,{mode:384,flag:"wx"}),U(n,384),_(n,e)}finally{if(me(n))M(n)}}function ms(e={}){if((e.platform??process.platform)!=="darwin")throw new dt("unsupported_platform","The managed Reason runtime is currently available only on macOS.");let n=e.environment??process.env,r=T(n,"REASON_CLI_CHANNEL")==="staging",i=r?T(n,"REASON_MANAGED_RUNTIME_ROOT")?.trim():void 0,o=e.root!==void 0||Boolean(i&&fe(i))?null:c(e.home??a(),"Library","Application Support"),d=e.root??(o?c(o,r?"Reason Staging":"Reason","CLI"):i);return{executableName:"reason",root:d,...o?{legacyRoot:c(o,"Ara",...r?["staging","runtime"]:["runtime"])}:{},versions:c(d,"versions"),current:c(d,"current"),previous:c(d,"previous"),brokerLock:c(d,"broker.lock"),transitionLock:c(d,"transition.lock"),lifecycleEvents:c(d,"lifecycle-events")}}function gs(e){let t=e.legacyRoot;if(!t)return null;return{root:t,versions:c(t,"versions"),current:c(t,"current"),previous:c(t,"previous"),brokerLock:c(t,"broker.lock"),transitionLock:c(t,"transition.lock"),lifecycleEvents:c(t,"lifecycle-events")}}function pe(e,t){let n;try{if(!R(e).isSymbolicLink())return null;n=J(e)}catch{return null}let r=n.match(/^versions\/(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)\/(ara|Reason|reason)$/);return r&&(r[2]==="ara"||r[2]===t)?r[1]:null}function _s(e){return pe(e.current,e.executableName)}function O(e,t,n){let i=ge(t,e).split(_e);return i.length===2&&E(i[0])&&(i[1]==="ara"||n!==void 0&&i[1]===n)?i[0]:null}function Le(e,t){try{return R(t).isSymbolicLink()&&b(S(t),J(t))===b(e.current)}catch{return!1}}function ys(e,t=process.execPath){try{return O(P(t),P(e.versions),e.executableName)!==null}catch{let n=b(t);return n===b(e.current)||Le(e,n)||O(n,b(e.versions),e.executableName)!==null}}function Ae(e){return X(e)&&W(e,["schema_version","pid","nonce","started_at","runtime_version"])&&e.schema_version===q&&typeof e.pid==="number"&&Number.isSafeInteger(e.pid)&&e.pid>0&&typeof e.nonce==="string"&&/^[0-9a-f-]{36}$/.test(e.nonce)&&Z(e.started_at)&&E(e.runtime_version)}function Q(e,t){try{let n=R(e);if(!n.isDirectory()||!A(n))return null;let r=G(c(e,t),g.O_RDONLY|g.O_NOFOLLOW|g.O_NONBLOCK);try{let i=F(r);if(!i.isFile()||i.nlink!==1||!A(i)||i.size>4096)return null;return Y(r,"utf8")}finally{h(r)}}catch{return null}}function N(e){try{let t=JSON.parse(Q(e,"owner.json")??"null");return Ae(t)?t:null}catch{return null}}function ee(e){try{return process.kill(e,0),!0}catch(t){return!(t instanceof Error&&("code"in t)&&t.code==="ESRCH")}}var C="lease",Ne=2,Se=4,y;function ke(){if(y!==void 0)return y;if(y=null,process.platform!=="linux"&&process.platform!=="darwin")return null;let e;try{e=H(import.meta.url)("bun:ffi")}catch{return null}let t=process.platform==="darwin"?"__error":"__errno_location",n=process.platform==="darwin"?["/usr/lib/libSystem.B.dylib"]:["libc.so.6",`libc.musl-${process.arch==="arm64"?"aarch64":"x86_64"}.so.1`];for(let r of n)try{let i=e.dlopen(r,{flock:{args:[e.FFIType.i32,e.FFIType.i32],returns:e.FFIType.i32},[t]:{args:[],returns:e.FFIType.ptr}}),s=i.symbols[t]();if(s===null)continue;return y={flock:(o,d)=>i.symbols.flock(o,d),errno:()=>e.read.i32(s),wouldBlock:process.platform==="darwin"?35:11},y}catch{}return null}var v,Ie=3221225472,Te=4,xe=128,Pe=32;function De(e){if(v===void 0){v=null;try{let s=H(import.meta.url)("bun:ffi"),{FFIType:o}=s;v={kernel:s.dlopen("kernel32.dll",{CreateFileW:{args:[o.ptr,o.u32,o.u32,o.ptr,o.u32,o.u32,o.ptr],returns:o.i64_fast},CloseHandle:{args:[o.i64_fast],returns:o.i32},GetLastError:{args:[],returns:o.u32}}).symbols,ptr:(l)=>s.ptr(l)}}catch{return null}}if(!v)return null;let{kernel:t,ptr:n}=v,r=Buffer.from(`${e}\x00`,"utf16le"),i=t.CreateFileW(n(r),Ie,0,null,Te,xe,null);if(Number(i)===-1)return t.GetLastError()===Pe?"busy":null;return{release:()=>{t.CloseHandle(i)}}}function Oe(e){if(process.platform==="win32")return De(`${e}.lease`);let t=ke();if(!t)return null;let n=G(`${e}.lease`,g.O_RDWR|g.O_CREAT|g.O_NOFOLLOW,384);try{let r=F(n);if(!r.isFile()||r.nlink!==1||!A(r))return h(n),"busy";if(t.flock(n,Ne|Se)===0)return{release:()=>h(n)};let i=t.errno();return h(n),i===t.wouldBlock?"busy":null}catch(r){throw h(n),r}}function bs(e){k(S(e.path));let t=Oe(e.path);if(t==="busy")return{acquired:!1,owner:N(e.path),recoveredStaleOwner:!1};let n=t!==null;try{let r=Ce(e,t);if(r.acquired)n=!1;return r}finally{if(n)t.release()}}function Ce(e,t){let n=e.alive??ee,r=!1;for(let i=0;i<4;i+=1){let s={schema_version:q,pid:e.pid??process.pid,nonce:e.nonce?.()??f(),started_at:(e.now?.()??new Date).toISOString(),runtime_version:e.runtimeVersion},o=`${e.path}.init-${process.pid}-${f()}`,d=!1;try{if(B(o,{mode:448}),L(c(o,"owner.json"),`${JSON.stringify(s)}
3
+ `,{mode:384,flag:"wx"}),t!==null)L(c(o,C),`flock
4
+ `,{mode:384,flag:"wx"});e.beforePublish?.();try{throw R(e.path),Object.assign(Error("Managed runtime lock exists."),{code:"EEXIST"})}catch(m){if(m.code!=="ENOENT")throw m}_(o,e.path),d=!0;let l=!1;return{acquired:!0,owner:s,recoveredStaleOwner:r,release(){if(l)return;if(l=!0,N(e.path)?.nonce===s.nonce)p(e.path,{recursive:!0,force:!0});t?.release()}}}catch(l){let m=l.code;if(!["EEXIST","ENOTEMPTY"].includes(m??""))throw l;let u=N(e.path),re=(e.now?.()??new Date).getTime(),ie=u&&e.staleAfterMs!==void 0?re-Date.parse(u.started_at)<e.staleAfterMs:!1,ae=u!==null&&!(t!==null&&Q(e.path,C)!==null)&&n(u.pid);if(!u||ae||ie)return{acquired:!1,owner:u,recoveredStaleOwner:!1};let I=`${e.path}.stale-${process.pid}-${f()}`;try{_(e.path,I),p(I,{recursive:!0,force:!0}),r=!0}catch(x){let oe=x.code;if(!["ENOENT","EEXIST"].includes(oe??""))throw x}}finally{if(!d)p(o,{recursive:!0,force:!0})}}throw new dt("lock_unavailable","Could not acquire the managed Reason runtime lock.")}function te(e){return X(e)&&W(e,["schema_version","event_id","occurred_at","event","runtime_version"],["from_version","to_version","reason_code","duration_ms","attempt_count","retry_in_ms","capabilities"])&&e.schema_version===j&&typeof e.event_id==="string"&&/^[0-9a-f-]{36}$/.test(e.event_id)&&Z(e.occurred_at)&&typeof e.event==="string"&&we.includes(e.event)&&E(e.runtime_version)&&(e.from_version===void 0||E(e.from_version))&&(e.to_version===void 0||E(e.to_version))&&(e.reason_code===void 0||typeof e.reason_code==="string"&&D.test(e.reason_code))&&(e.duration_ms===void 0||typeof e.duration_ms==="number"&&Number.isSafeInteger(e.duration_ms)&&e.duration_ms>=0&&e.duration_ms<=86400000)&&(e.attempt_count===void 0||typeof e.attempt_count==="number"&&Number.isSafeInteger(e.attempt_count)&&e.attempt_count>=1&&e.attempt_count<=1e5)&&(e.retry_in_ms===void 0||typeof e.retry_in_ms==="number"&&Number.isSafeInteger(e.retry_in_ms)&&e.retry_in_ms>=0&&e.retry_in_ms<=30000)&&(e.capabilities===void 0||Array.isArray(e.capabilities)&&e.capabilities.length<=be&&e.capabilities.every((t)=>typeof t==="string"&&D.test(t)))}var Ve=/^(\d{22}-[0-9a-f-]{36}\.json)$/,Ue=/^(\d{22}-[0-9a-f-]{36}\.json)\.sending-(\d+)-[0-9a-f-]{36}$/,Fe=300000,w=0n;function Be(e){let t=BigInt(new Date(e.occurred_at).getTime())*1000000n;return w=t>w?t:w+1n,`${String(w).padStart(22,"0")}-${e.event_id}.json`}function ne(e){try{return z(e.lifecycleEvents).filter((t)=>Ve.test(t)).sort()}catch{return[]}}function V(e){try{let t=JSON.parse(Y(e,"utf8"));return te(t)?t:null}catch{return null}}function $e(e,t=ee,n=Date.now()){let r;try{r=z(e.lifecycleEvents)}catch{return}for(let i of r){let s=i.match(Ue);if(!s)continue;let o=c(e.lifecycleEvents,i),d=c(e.lifecycleEvents,s[1]),l=!t(Number(s[2]));if(!l)try{l=n-K(o).mtimeMs>=Fe}catch{continue}if(!l)continue;try{_(o,d)}catch(m){let u=m.code;if(u==="EEXIST")M(o);else if(u!=="ENOENT")throw m}}}function Ge(e){let n=ne(e).flatMap((i)=>{try{return[{name:i,size:K(c(e.lifecycleEvents,i)).size}]}catch{return[]}}),r=n.reduce((i,s)=>i+s.size,0);while(n.length>ye||r>ve){let i=n.shift();if(!i)break;try{M(c(e.lifecycleEvents,i.name)),r-=i.size}catch(s){if(s.code!=="ENOENT")throw s}}}function vs(e,t,n={}){let r={schema_version:j,event_id:n.eventId?.()??f(),occurred_at:(n.now?.()??new Date).toISOString(),...t};if(!te(r))throw new dt("invalid_lifecycle_event","Managed runtime lifecycle event is invalid.");return k(e.lifecycleEvents),Re(c(e.lifecycleEvents,Be(r)),`${JSON.stringify(r)}
5
+ `),Ge(e),r}async function Ss(e,t,n){$e(e);let r=0;for(let i of ne(e)){let s=c(e.lifecycleEvents,i);if(n){let l=V(s);if(!l||!n(l))continue}let o=`${s}.sending-${process.pid}-${f()}`;try{_(s,o)}catch(l){if(l.code==="ENOENT")continue;throw l}let d=V(o);if(!d){M(o);continue}try{await t(d),M(o),r+=1}catch{try{_(o,s)}catch(l){if(l.code!=="ENOENT")throw l}break}}return r}export{ms,gs,_s,ys,bs,vs,Ss};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{er}from"./vm-hands-entry-lite-djg69hf4.js";var _t=er.version;export{_t};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var ue=".reason/workspace",Ce="workspace_base",Z="sessions",Ae="workspace_layout",de=".reason/workspace/sessions",rr=/^[0-9a-f]{8}$/;function Qe(t){if(!X(t))return!1;let e=".reason/workspace/sessions/";if(!t.startsWith(e))return!1;let n=t.slice(e.length).split("/");return n.length===2&&rr.test(n[0])}var i=4096,S="workspaces/pi";function X(t){if(typeof t!=="string"||!t||t.length>i)return!1;if(t.startsWith("/")||t.includes("\x00")||t.includes("\\"))return!1;return t.split("/").every((e)=>e!==""&&e!=="."&&e!=="..")}function O(t){if(t.kind==="root"){if(t.path===void 0)return".";if(!X(t.path))throw Error("invalid_device_workspace_identity");return t.path}if(!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/.test(t.workspaceId)||t.workspaceId==="."||t.workspaceId==="..")throw Error("invalid_device_workspace_identity");let e=t.layout==="sessions"?"sessions":S;return`${t.base?`${t.base}/`:""}${e}/${t.workspaceId}/repo`}function H(t){if(!t||typeof t!=="object"||Array.isArray(t))return null;let e=t;if(e.kind==="root"&&Object.keys(e).length===1)return{kind:"root"};if(e.kind==="root"&&Object.keys(e).length===2&&X(e.path))return{kind:"root",path:e.path};if(e.kind!=="managed"||typeof e.workspaceId!=="string"||Object.keys(e).length!==2+(e.base===void 0?0:1)+(e.layout===void 0?0:1)||e.base!==void 0&&e.base!==".reason/workspace"||e.layout!==void 0&&e.layout!=="sessions")return null;let n={kind:"managed",workspaceId:e.workspaceId,...e.base===".reason/workspace"?{base:".reason/workspace"}:{},...e.layout==="sessions"?{layout:"sessions"}:{}};try{return O(n),n}catch{return null}}var c="/home/runner";var Yr="/run/reason/sessions",a=/^(?:\/[A-Za-z0-9._-]+)+$/,Qr=/-sidechat-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,en=/^(.+)-repository-[a-z0-9][a-z0-9._-]*-[0-9a-f]{12}$/;function _(t){return Qr.exec(t)?.[1]??en.exec(t)?.[1]??t}var nr=/^((?:\/[A-Za-z0-9._-]+)+)\/\.reason\/workspace\/(workspaces\/pi|sessions)\/([^/]+)$/;function E(t,e=c,n="sessions"){if(!a.test(e)||e.split("/").some((s)=>s==="."||s===".."))throw Error("invalid_cloud_payload_home");let r=`${e}/${O({kind:"managed",workspaceId:t,base:".reason/workspace",...n?{layout:n}:{}})}`,o=`${Yr}/${_(t)}`;return{home:e,root:r.slice(0,-5),checkout:r,control:o,jobEnv:`${o}/job.env`,cloudAccess:`${o}/cloud-access`,logs:`${o}/logs`,pin:`${o}/ws`}}function A(t){return nr.exec(t.replace(/\/+$/,""))?.[2]==="sessions"?"sessions":null}function tn(t){let e=nr.exec(t.replace(/\/+$/,""));if(!e)return null;try{let n=E(e[3],e[1],A(t));return n.root===t.replace(/\/+$/,"")?n:null}catch{return null}}
3
+ export{ue,Ce,Z,Ae,de,rr,Qe,X,O,H,Yr,Qr,en,nr,tn};
@@ -0,0 +1,42 @@
1
+ // @bun
2
+ import{t,Et,k,o,d,u,c,_,ee,s,n}from"./vm-hands-entry-lite-avc65bd7.js";var I=t().max(201).regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/).refine((e)=>e.split("/").every((r)=>r!=="."&&r!=="..")),y=t().min(1).max(255).regex(/^[A-Za-z0-9_][A-Za-z0-9_./-]*$/).refine((e)=>!e.includes("..")&&!e.includes("//")&&!e.endsWith("/")&&!e.endsWith(".lock")),x=t().regex(/^[a-f0-9]{40}$/),O=o().int().positive(),T=t().min(1).max(256),D=t().max(60000),L={version:n(1),repoFullName:I},C=u(t().max(1024).regex(/^(?:Co-authored-by: [^<>\r\n\x00]+ <[^<>\s]+@[^<>\s]+>|Reason-Contributor-ID: rc_[a-f0-9]{32})$/)).max(1000),j=c({expectedTrailers:C,missingFromHead:C}),z=_("action",[c({action:n("edit"),title:T.optional(),body:D.optional(),base:y.optional()}),c({action:s(["ready","draft","close"])}),c({action:n("metadata"),field:s(["reviewer","assignee","label"]),change:s(["add","remove"]),value:t().min(1).max(100).refine((e)=>!/[\r\n\0]/.test(e))})]),Pe=_("kind",[c({...L,kind:n("read"),path:t().min(1).max(2048),accept:s(["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"]).optional()}),c({...L,kind:n("pr_review_context"),number:O,after:t().min(1).max(1024).optional()}),c({...L,kind:n("prepare"),branch:y,baseSha:x,defaultBranch:y,diagnosticsVersion:n(1).optional()}),c({...L,kind:n("publish"),branch:y,defaultBranch:y,baseSha:x,remoteHeadSha:x.nullable(),contributorTrailers:C.optional()}),c({...L,kind:n("pr_create"),head:y,base:y,title:T,body:D,draft:d()}),c({...L,kind:n("pr_mutation"),number:O,mutation:z}),c({...L,kind:n("pr_merge"),number:O,expectedHeadSha:x,expectedBaseRef:y,method:s(["merge","squash","rebase"]),commitBody:t().max(65536).optional()})]),V=["local_device_gh_prepare_setup","local_device_gh_prepare_metadata","local_device_gh_prepare_private_init","local_device_gh_prepare_fetch","local_device_gh_prepare_base_mismatch","local_device_gh_prepare_checkout_validation","local_device_gh_prepare_checkout_init","local_device_gh_prepare_materialization"];function F(e){return V.some((r)=>r===e)}class ir extends Error{code;constructor(e){super(e);this.code=e}}function Qn(e,r,i){let l=Pe.safeParse(e);return r==="failed"&&l.success&&l.data.kind==="prepare"&&l.data.diagnosticsVersion===1&&F(i)}var yt=245760,No=_("kind",[c({kind:n("pr_review_context"),body:t().max(yt)}),c({kind:n("prepare"),headSha:x}),c({kind:n("read"),status:o().int().min(200).max(599),headers:ee(t(),t().max(8192)).refine((e)=>Object.keys(e).every((r)=>r==="link"||r==="content-type")),body:t().max(yt)}),c({kind:n("publish"),headSha:x,scannedObjectCount:o().int().min(0).max(5000),attribution:j.optional()}),c({kind:n("pr_create"),url:t().max(1024).regex(/^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/[1-9][0-9]*$/)}),c({kind:n("pr_mutation"),number:O,applied:n(!0)}),c({kind:n("pr_merge"),number:O,merged:n(!0)})]).refine((e)=>new TextEncoder().encode(JSON.stringify(e)).byteLength<=yt,"local_device_gh_result_too_large"),B=c({source:s(["agent","human"]),operationId:k()}),oe=c({version:n(1),userId:Et(),deviceId:Et(),rootId:Et(),runId:Et(),merge:B.optional(),contributorRefresh:Et().optional(),repoFullName:I.nullable(),rootRevision:t().regex(/^[1-9][0-9]*$/),readOnly:d(),generation:o().int().positive().nullable(),fenceId:Et().nullable()}).refine((e)=>e.generation===null===(e.fenceId===null));function w(e){return/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(e)&&e.split("/").every((r)=>r!=="."&&r!=="..")}function Lo(e,r,i={},l="read"){if(w(e)&&(r==="/search/issues"||r.startsWith("/search/issues?")))return W(e,r,i);if(!w(e)||!r.startsWith(`/repos/${e}/`)&&r!==`/repos/${e}`)throw Error("local_device_gh_repository_mismatch");if(/[\\#\u0000-\u001f]/.test(r)||/%(?:2e|5c|00)/i.test(r))throw Error("local_device_gh_path_denied");let g=new URL(r,"https://api.github.com");if(g.pathname!==r.split("?")[0]||g.username||g.password)throw Error("local_device_gh_path_denied");let h;try{h=decodeURIComponent(g.pathname.slice(`/repos/${e}`.length))}catch{throw Error("local_device_gh_path_denied")}if(h.includes("%")||h.split("/").some((p)=>p==="."||p===".."))throw Error("local_device_gh_path_denied");if((i.method??"GET").toUpperCase()!=="GET"||i.body!=null)throw Error("local_device_gh_mutation_not_admitted");if(![/^$/,/^\/commits$/,/^\/pulls$/,/^\/pulls\/[1-9][0-9]*(?:\/(?:commits|files|reviews|comments))?$/,/^\/issues\/[1-9][0-9]*(?:\/comments)?$/,/^\/issues\/comments\/[1-9][0-9]*\/reactions$/,/^\/commits\/[A-Za-z0-9_./-]+(?:\/(?:check-runs|status))?$/,/^\/check-runs\/[1-9][0-9]*(?:\/annotations)?$/,/^\/branches\/[A-Za-z0-9_./-]+$/,/^\/git\/ref\/heads\/[A-Za-z0-9_./-]+$/,/^\/compare\/[A-Za-z0-9_./-]+\.\.\.[A-Za-z0-9_./-]+$/].some((p)=>p.test(h)))throw Error("local_device_gh_path_denied");if(g.searchParams.forEach((p,b)=>{if(b==="per_page"&&/^[1-9][0-9]*$/.test(p)&&Number(p)<=100)return;if(b==="page"&&/^[1-9][0-9]*$/.test(p)&&Number(p)<=100)return;if(h==="/pulls"&&b==="state"&&["open","closed","all"].includes(p))return;if(h==="/pulls"&&b==="sort"&&p==="updated")return;if(h==="/pulls"&&b==="direction"&&p==="desc")return;if(h==="/pulls"&&["head","base"].includes(b)&&/^[A-Za-z0-9_./:-]{1,255}$/.test(p))return;throw Error("local_device_gh_query_denied")}),i.headers)new Headers(i.headers).forEach((b,G)=>{if(G!=="accept"||!["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"].includes(b))throw Error("local_device_gh_header_denied")})}function W(e,r,i){if(/[\\#\u0000-\u001f]/.test(r))throw Error("local_device_gh_path_denied");let l=new URL(r,"https://api.github.com");if(l.pathname!=="/search/issues"||l.username||l.password)throw Error("local_device_gh_path_denied");if((i.method??"GET").toUpperCase()!=="GET"||i.body!=null)throw Error("local_device_gh_mutation_not_admitted");let g=null;l.searchParams.forEach((f,p)=>{if(p==="q"&&g===null){g=f;return}if(p==="per_page"&&/^[1-9][0-9]*$/.test(f)&&Number(f)<=100)return;if(p==="page"&&/^[1-9][0-9]*$/.test(f)&&Number(f)<=100)return;throw Error("local_device_gh_query_denied")});let h=`repo:${e.toLowerCase()} `,S=g?.toLowerCase()??"";if(S.length>512||!(S+" ").startsWith(h)||/(?:^|\s)(?:repo|org|user):/.test(S.slice(h.length)))throw Error("local_device_gh_query_denied");if(i.headers)new Headers(i.headers).forEach((f,p)=>{if(p!=="accept"||f!=="application/vnd.github+json")throw Error("local_device_gh_header_denied")})}var Mo=`query PullRequestReviewContext($owner: String!, $repo: String!, $number: Int!, $after: String) {
3
+ repository(owner: $owner, name: $repo) {
4
+ nameWithOwner
5
+ pullRequest(number: $number) {
6
+ number
7
+ reviewDecision
8
+ headRefOid
9
+ baseRefOid
10
+ baseRef {
11
+ branchProtectionRule {
12
+ requiresApprovingReviews
13
+ requiredApprovingReviewCount
14
+ requiresStatusChecks
15
+ requiredStatusCheckContexts
16
+ requiresConversationResolution
17
+ dismissesStaleReviews
18
+ }
19
+ }
20
+ reviewThreads(first: 100, after: $after) {
21
+ nodes {
22
+ id isResolved isOutdated viewerCanResolve viewerCanUnresolve
23
+ path line originalLine startLine originalStartLine diffSide startDiffSide
24
+ comments(first: 100) {
25
+ nodes {
26
+ id databaseId body createdAt updatedAt url
27
+ author { __typename login }
28
+ replyTo { databaseId }
29
+ }
30
+ pageInfo { hasNextPage }
31
+ }
32
+ }
33
+ pageInfo { hasNextPage endCursor }
34
+ }
35
+ }
36
+ }
37
+ }`;function et(e){return e.kind==="read"||e.kind==="pr_review_context"}var wt=["inspect_project","fs.read","fs.write","fs.search","fs.watch","fs.upload","fs.export","fs.import","fs.download","exec.run","exec.full","process.run.v1","process.full.v1","pty.start","pty.input","pty.resize","pty.close","git.run","process.list","process.signal","ports.list","tunnel.open","tunnel.close","env.discover","setup.run","mcp.discover","mcp.start","mcp.proxy","browser.snapshot","browser.navigate","browser.act","computer.snapshot","computer.act","computer.use","browser.use","browser.recording.v1","browser.pr-proof.v1","hands.connect","jobs.control","environment.install","github.local.v1","inference.ollama.v1","inference.custom.v1","delegate.devin.copy.v1","delegate.cursor.copy.v1","display.stream.v1","automation.call.v1","preview.serve.v1","workspace.setup.v1","simulator.call.v1","simulator.stream.v1"];var tt=2,v="/app/local-runtime",Te=262144,Ws="x-reason-relay-host-alias",Vs="v1";function m(e,r){return{path:`${v}${e}`,routerPath:e,auth:r}}function E(e,r){return{...m(e,"device_proof"),forOperation(i){return m(`/operations/${encodeURIComponent(i)}${r}`,"device_proof")}}}var Gs={register:m("/register","registration_bearer"),enroll:m("/enroll","none"),authChallenge:m("/auth/challenge","none"),identity:m("/identity","device_proof"),heartbeat:m("/heartbeat","device_proof"),rootsSync:m("/roots/sync","device_proof"),disconnect:m("/disconnect","device_proof"),lifecycle:m("/lifecycle","device_proof"),localSubscription:m("/local-subscription","device_proof"),ownerWorkspaces:m("/owner-workspaces","device_proof"),ownerWorkspaceEnrollment:m("/owner-workspaces/enrollment","device_proof"),sessionWorktrees:m("/session-worktrees","device_proof"),operationClaim:m("/operations/claim","device_proof"),operationHeartbeat:E("/operations/:operationId/heartbeat","/heartbeat"),operationEvents:E("/operations/:operationId/events","/events"),operationComplete:E("/operations/:operationId/complete","/complete"),operationEnvironment:E("/operations/:operationId/environment","/environment"),operationEnvironmentAck:E("/operations/:operationId/environment-ack","/environment-ack"),operationCustomEndpointCredential:E("/operations/:operationId/custom-endpoint-credential","/custom-endpoint-credential")},ei=`${v}/session`;var J=[/^\/app\/local-runtime\/heartbeat$/,/^\/app\/local-runtime\/operations\/claim$/,/^\/app\/local-runtime\/operations\/[0-9a-fA-F-]{36}\/(?:heartbeat|events|complete|environment|environment-ack)$/];function Ks(e){return J.some((r)=>r.test(e))}var rn=60000;var ti="hands_control_v1",bt="environment.deliver",Re="vm_hands_workspace_deferred",vt="vm_hands.workspace_grant",ri="hands.unbind_unverified",ni="claim_v1",ii="environment_at_claim",oi="ready_v1",si="workspace_check",ai="rebind_v1",ci="grant_v1",li="workspace_grant",ui="resident_rebind",di="hands.rebind",pi="snapshot_v1",hi="cloud_access",fi="playwright_v1",mi="headless_browser",gi="v1",_i="job_env_large_values",pe="srt_root_v1",Y="hands_confinement",Oe="gid_v1",q="model_jobs_egress",yi="setpriv_v1",wi="jobs_user",bi="spawning_attempt_v1",Q="hands_session_group";var vi="session_cap",Si="none",Ei="same_launch_v1",xi="exit_v1",ki="start_wait",St="user_chrome",Ci="cloud_sessions";function N(e){if(!a(e)||Object.keys(e).length!==5||e.version!==1)return!1;let r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return["boot_generation","recording_operation_id","recording_attempt_id"].every((i)=>typeof e[i]==="string"&&r.test(e[i]))&&typeof e.root_version==="string"&&/^[0-9]{1,20}(?:\.[0-9]{1,6})?$/.test(e.root_version)}function A(e){if(!a(e)||Object.keys(e).length!==6)return!1;let r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return typeof e.device_id==="string"&&r.test(e.device_id)&&(e.binding==="workspace_source"||e.binding==="mcp_control")&&Number.isSafeInteger(e.target_revision)&&Number(e.target_revision)>=0&&Number.isSafeInteger(e.root_grant_revision)&&Number(e.root_grant_revision)>0&&Number.isSafeInteger(e.target_generation)&&Number(e.target_generation)>0&&typeof e.target_fence_id==="string"&&r.test(e.target_fence_id)}var Js=["lock_acquired","enrollment_started","enrollment_completed","readiness_started","readiness_completed","inventory_completed","control_ready"],or=86400000;var K=["production","staging"];function P(e){if(!a(e)||Object.keys(e).length!==3)return!1;let r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return["organization_id","user_id","device_id"].every((i)=>Object.hasOwn(e,i)&&typeof e[i]==="string"&&r.test(e[i])&&e[i]!=="00000000-0000-0000-0000-000000000000")}var Z="DEVICE-PROOF-V2";function Ai(e,r=Z){let i=e.method.toUpperCase();if(!/^[A-Z]+$/.test(i)||!e.pathAndQuery.startsWith(`${v}/`)||e.pathAndQuery.includes(`
38
+ `)||!/^[0-9]{1,20}$/.test(e.timestamp)||!/^[A-Za-z0-9_-]{22,43}$/.test(e.nonce)||e.challenge.length<16||e.challenge.length>1024||e.challenge.includes(`
39
+ `)||!/^[a-f0-9]{64}$/.test(e.bodySha256))throw Error("Invalid Reason Device proof input.");return Buffer.from([r,i,e.pathAndQuery,e.timestamp,e.nonce,e.challenge,e.bodySha256].join(`
40
+ `),"utf8")}function a(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function X(e,r){return typeof e==="string"&&r.some((i)=>i===e)}function H(e){return a(e)&&typeof e.id==="string"&&typeof e.label==="string"&&typeof e.path_fingerprint==="string"}function te(e){return a(e)&&Number.isInteger(e.seq)&&Number(e.seq)>=0&&typeof e.kind==="string"&&/^[A-Za-z0-9._:-]{1,64}$/.test(e.kind)&&a(e.payload)}function R(e){throw Error(e)}function Zs(e,r){let i=a(e)?e:{},l=typeof i.error==="string"?i.error:`http_${r}`,g=typeof i.detail==="string"?i.detail:typeof i.message==="string"?i.message:`Reason Device request failed (${r})`;return{code:l,message:g}}function ts(e){if(!a(e)||typeof e.challenge!=="string"||e.challenge.length<16||e.challenge.length>1024||e.challenge.includes(`
41
+ `)||typeof e.expires_at!=="string"||!Number.isFinite(Date.parse(e.expires_at)))R("Reason returned an invalid Device proof challenge.");return{challenge:e.challenge,expires_at:e.expires_at}}function M(e,r){if(!a(e)||typeof e.device_id!=="string"||e.auth_scheme!=="p256"||e.organization_id!==void 0&&typeof e.organization_id!=="string"||e.protocol_version!==tt||!Array.isArray(e.roots)||!e.roots.every(H)||r&&typeof e.organization_id!=="string"||e.device_credential!==void 0)R(r?"Reason returned an invalid Device enrollment.":"Reason returned an invalid Device registration.");return{...{device_id:e.device_id,...typeof e.organization_id==="string"?{organization_id:e.organization_id}:{},protocol_version:tt,roots:e.roots},auth_scheme:"p256"}}function Xs(e){return M(e,!1)}function Ys(e){let r=M(e,!0);if(typeof r.organization_id!=="string")return R("Reason returned an invalid Device enrollment.");return{...r,organization_id:r.organization_id}}function Qs(e){if(!a(e)||typeof e.server_time!=="string"||typeof e.drain!=="boolean")return R("Reason returned an invalid Device heartbeat.");return{server_time:e.server_time,drain:e.drain,...U(e),...typeof e.update_policy==="string"||e.update_policy===null?{update_policy:e.update_policy}:{},...typeof e.supported_protocol_version==="number"?{supported_protocol_version:e.supported_protocol_version}:{},...re(e.latest_cli_versions),...e.hands_prespawn===!0?{hands_prespawn:!0}:{}}}var ne=["account_root_metadata_supported","workspace_root_metadata_supported","account_root_path_supported","home_contained_roots_supported","root_paths_supported","startup_supported"];function U(e){return Object.fromEntries(ne.filter((r)=>e[r]===!0).map((r)=>[r,!0]))}function ea(e){if(!a(e))return;try{return{...ts(e),...U(e)}}catch{return}}function re(e){if(!a(e))return{};let r={};for(let i of K){let l=e[i];if(typeof l==="string"&&/^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/.test(l))r[i]=l}return Object.keys(r).length>0?{latest_cli_versions:r}:{}}function ta(e){if(!a(e)||!Array.isArray(e.roots)||!e.roots.every(H))return R("Reason returned an invalid Device root sync.");return{roots:e.roots}}function ra(e){if(!a(e)||e.user_id!==void 0&&typeof e.user_id!=="string"||typeof e.organization_id!=="string"||typeof e.organization_name!=="string"||typeof e.organization_slug!=="string")return R("Reason returned an invalid Device identity.");return{...typeof e.user_id==="string"?{user_id:e.user_id}:{},organization_id:e.organization_id,organization_name:e.organization_name,organization_slug:e.organization_slug}}function na(e){if(!a(e)||e.disconnected!==!0)return R("Reason did not disconnect this Device.");let r=e.sessions_moved;return typeof r==="number"&&Number.isSafeInteger(r)&&r>=0?{disconnected:!0,sessions_moved:r}:{disconnected:!0}}function ia(e){if(a(e)&&e.ok===!0&&typeof e.expires==="number")return{ok:!0,expires:e.expires};if(a(e)&&e.ok===!1&&typeof e.error==="string")return{ok:!1,error:e.error};return R("Reason did not answer the local login hand-over.")}function oa(e){if(!a(e)||e.accepted!==!0)return R("Reason did not accept the Device lifecycle event.");return{accepted:!0}}function ie(e){return Buffer.byteLength(JSON.stringify(e),"utf8")}function sa(e,r=wt){if(!a(e)||typeof e.operation_id!=="string"||typeof e.attempt_id!=="string"||typeof e.attempt_token!=="string"||!/^(?:reason|ara)_attempt_/.test(e.attempt_token)||typeof e.lease_until!=="string"||typeof e.run_id!=="string"||typeof e.root_id!=="string"||e.owner!==void 0&&!P(e.owner)||!X(e.capability,r)||!a(e.payload)||e.protocol_version!==tt||ie(e.payload)>Te||e.authority!==void 0&&!A(e.authority)||e.local_github_authority!==void 0&&!oe.safeParse(e.local_github_authority).success||e.capability==="github.local.v1"&&!oe.safeParse(e.local_github_authority).success||e.recording_authority!==void 0&&!N(e.recording_authority)||e.capability==="browser.recording.v1"&&(!N(e.recording_authority)||!P(e.owner))||e.capability!=="browser.recording.v1"&&e.recording_authority!==void 0)return R("Reason returned an invalid Device operation claim.");let i={operation_id:e.operation_id,attempt_id:e.attempt_id,attempt_token:e.attempt_token,lease_until:e.lease_until,run_id:e.run_id,root_id:e.root_id,capability:e.capability,payload:e.payload,...A(e.authority)?{authority:e.authority}:{},...N(e.recording_authority)?{recording_authority:Object.freeze({...e.recording_authority})}:{},...e.local_github_authority!==void 0?{local_github_authority:oe.parse(e.local_github_authority)}:{},...e.capability==="hands.connect"&&a(e.environment)&&a(e.environment.payload)&&A(e.environment.authority)?{environment:{payload:e.environment.payload,authority:e.environment.authority}}:{},protocol_version:tt};if(e.owner!==void 0)i.owner=Object.freeze({...e.owner});return i}function aa(e){if(!a(e)||typeof e.lease_until!=="string"||!Array.isArray(e.controls)||!e.controls.every(te)||!Number.isInteger(e.next_control_seq)||Number(e.next_control_seq)<0)return R("Reason returned an invalid Device operation heartbeat.");return{lease_until:e.lease_until,controls:e.controls,next_control_seq:Number(e.next_control_seq)}}function ca(e){if(!a(e)||!Number.isInteger(e.next_event_seq)||Number(e.next_event_seq)<0||typeof e.duplicate!=="boolean"||!Number.isInteger(e.accepted_count)||Number(e.accepted_count)<0)return R("Reason returned an invalid Device operation event result.");return{next_event_seq:Number(e.next_event_seq),duplicate:e.duplicate,accepted_count:Number(e.accepted_count)}}function la(e){if(!a(e)||!a(e.payload)||!A(e.authority))return R("Reason returned an invalid Device environment delivery.");return{payload:e.payload,authority:e.authority}}function ae(e){return e==="succeeded"||e==="failed"||e==="cancelled"||e==="expired"}function ua(e){if(!a(e)||!ae(e.status)||typeof e.idempotent!=="boolean")return R("Reason returned an invalid Device operation completion.");return{status:e.status,idempotent:e.idempotent}}
42
+ export{Pe,ir,Qn,yt,No,oe,Lo,Mo,et,wt,tt,Te,Ws,Vs,Gs,ei,Ks,rn,ti,bt,Re,vt,ri,ni,ii,oi,si,ai,ci,li,ui,di,pi,hi,fi,mi,gi,_i,pe,Y,Oe,q,yi,wi,bi,Q,vi,Si,Ei,xi,ki,St,Ci,Js,or,Ai,Zs,ts,Xs,Ys,Qs,ea,ta,ra,na,ia,oa,sa,aa,ca,la,ua};
@@ -0,0 +1,126 @@
1
+ // @bun
2
+ import{S,Jt,Kn,Ye,Jn,Zn}from"./vm-hands-entry-lite-jzz73e3f.js";import{Yn}from"./vm-hands-entry-lite-hek6nw5m.js";import{Un}from"./vm-hands-entry-lite-hk6trmwa.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as ys,spawn as Xe}from"child_process";import{existsSync as ws}from"fs";import{connect as xs}from"net";function pn(){let e=new Set,t=null,n=(s)=>({holder:t?.viewer??null,you:t===s,same_user:Boolean(t?.viewer&&s.viewer&&t.viewer.user_id===s.viewer.user_id)}),o=()=>{for(let s of e)s.notify(n(s))};return{join(s){return e.add(s),s.notify(n(s)),()=>{if(!e.delete(s))return;if(t!==s)return;t=null,o()}},claim(s){if(t===s||!e.has(s))return;t=s,o()}}}var ut=pn();import{createHash as St}from"crypto";import{once as Sn}from"events";import{createWriteStream as vn,existsSync as mr,mkdirSync as gr,mkdtempSync as hr,readFileSync as le,readdirSync as br,renameSync as yr,realpathSync as En,rmSync as Dn,statSync as Ne,writeFileSync as wr}from"fs";import{delimiter as _r,dirname as vt,join as b}from"path";import{finished as Cn}from"stream/promises";var We="omljlfpmafedpplnpkkahegadhkimdje",so="https://chromewebstore.google.com/detail/reason/omljlfpmafedpplnpkkahegadhkimdje";var O={ocu:{repository:"https://github.com/iFurySt/open-codex-computer-use.git",revision:"386a260d1ab8b690adbbb27f7471595cf0c2b752",version:"0.3.5"},obu:{repository:"https://github.com/iFurySt/open-browser-use.git",revision:"ac015846df75928fbcf0f3a0f3ba3a210ce1a507",version:"0.1.42"}},H={version:"155.0.8059.84",macArm64Sha256:"13b9e98ce56f5ce18e100a009f455c9285f399e7c9dc8a76fdf2f3a9755bb5f2",linux64Sha256:"cf0f049892dea22e6a6db26d47ed0d7776b7158edcbec4634086633df8bafcbc",win64Sha256:"507f2a031441d10c62b5e3d4e863f09ac1198a571c1419976cbd8387f639afde"};var J={ocu:{url:`https://registry.npmjs.org/open-computer-use/-/open-computer-use-${O.ocu.version}.tgz`,sha256:"7c16a87c8cd357787b02c0ebd040dd5f93880c1fb51c1901caa2e0c05d063130",size_bytes:5844280},obu:{url:`https://registry.npmjs.org/open-browser-use/-/open-browser-use-${O.obu.version}.tgz`,sha256:"9386d8ce0a147b3f55e1807b68edf736836378807541c457c9b5f6ca2cabaa4e",size_bytes:21372018},extension:{url:`https://github.com/iFurySt/open-browser-use/releases/download/v${O.obu.version}/open-browser-use-chrome-extension-${O.obu.version}.zip`,sha256:"c9c07bec1175e12ea6985b0e7784a5ef01fd03f014b958224a1e17dcd838a241",size_bytes:31070}},F="pnbmoicbkopffjjgfgfglopechaiemkp";import{spawn as Me}from"child_process";import{createRequire as fn}from"module";import{join as mn}from"path";var gn=30000,hn=1048576;function Te(){return process.env.SystemRoot??"C:\\Windows"}function bn(){return mn(Te(),"System32","WindowsPowerShell","v1.0","powershell.exe")}var yn=String.raw`
3
+ $ErrorActionPreference = "Stop"
4
+ Add-Type -TypeDefinition @"
5
+ using System;
6
+ using System.Runtime.InteropServices;
7
+ public static class ReasonInput {
8
+ [StructLayout(LayoutKind.Sequential)] public struct MOUSEINPUT { public int dx; public int dy; public int mouseData; public uint dwFlags; public uint time; public IntPtr dwExtraInfo; }
9
+ [StructLayout(LayoutKind.Sequential)] public struct KEYBDINPUT { public ushort wVk; public ushort wScan; public uint dwFlags; public uint time; public IntPtr dwExtraInfo; }
10
+ [StructLayout(LayoutKind.Explicit)] public struct UNION { [FieldOffset(0)] public MOUSEINPUT mi; [FieldOffset(0)] public KEYBDINPUT ki; }
11
+ [StructLayout(LayoutKind.Sequential)] public struct INPUT { public uint type; public UNION u; }
12
+ [DllImport("user32.dll")] static extern uint SendInput(uint count, INPUT[] inputs, int size);
13
+ [DllImport("user32.dll")] public static extern bool SetProcessDPIAware();
14
+ [DllImport("user32.dll")] public static extern int GetSystemMetrics(int index);
15
+ [DllImport("user32.dll")] static extern uint MapVirtualKey(uint code, uint type);
16
+ [DllImport("user32.dll")] public static extern uint GetClipboardSequenceNumber();
17
+ static void Send(INPUT input) { SendInput(1, new INPUT[] { input }, Marshal.SizeOf(typeof(INPUT))); }
18
+ public static void Mouse(uint flags, int x, int y, int data) {
19
+ INPUT input = new INPUT(); input.type = 0;
20
+ input.u.mi.dx = x; input.u.mi.dy = y; input.u.mi.mouseData = data; input.u.mi.dwFlags = flags; Send(input);
21
+ }
22
+ public static void Key(ushort vk, ushort unit, uint flags) {
23
+ INPUT input = new INPUT(); input.type = 1;
24
+ input.u.ki.wVk = vk; input.u.ki.wScan = vk != 0 ? (ushort)MapVirtualKey(vk, 0) : unit; input.u.ki.dwFlags = flags; Send(input);
25
+ }
26
+ }
27
+ "@
28
+ [void][ReasonInput]::SetProcessDPIAware()
29
+ $width = [ReasonInput]::GetSystemMetrics(0)
30
+ $height = [ReasonInput]::GetSystemMetrics(1)
31
+ $session = [Diagnostics.Process]::GetCurrentProcess().SessionId
32
+ [Console]::Out.WriteLine('{"session":' + $session + ',"width":' + $width + ',"height":' + $height + '}')
33
+ [Console]::Out.Flush()
34
+ $mode = "__MODE__"
35
+ if ($mode -eq "probe") { exit 0 }
36
+ if ($mode -eq "clipboard") {
37
+ # Only changes made during this pairing: never export the initial clipboard.
38
+ $parent = Get-Process -Id __PARENT__
39
+ $last = [ReasonInput]::GetClipboardSequenceNumber()
40
+ while (-not $parent.HasExited) {
41
+ Start-Sleep -Milliseconds 100
42
+ $count = [ReasonInput]::GetClipboardSequenceNumber()
43
+ if ($count -eq $last) { continue }
44
+ $last = $count
45
+ try { $text = Get-Clipboard -Raw } catch { continue }
46
+ if (-not $text) { continue }
47
+ $bytes = [Text.Encoding]::UTF8.GetBytes($text)
48
+ if ($bytes.Length -gt __MAX_TEXT_BYTES__) { continue }
49
+ [Console]::Out.WriteLine("c " + [Convert]::ToBase64String($bytes))
50
+ [Console]::Out.Flush()
51
+ }
52
+ exit 0
53
+ }
54
+ $scaleX = 65535.0 / [Math]::Max(1, $width - 1)
55
+ $scaleY = 65535.0 / [Math]::Max(1, $height - 1)
56
+ while ($null -ne ($line = [Console]::In.ReadLine())) {
57
+ $n = $line.Split(" ")
58
+ try {
59
+ switch ($n[0]) {
60
+ "p" { [ReasonInput]::Mouse(0x8001, [int]([int]$n[1] * $scaleX), [int]([int]$n[2] * $scaleY), 0) }
61
+ "b" { [ReasonInput]::Mouse([uint32]$n[1], 0, 0, [int]$n[2]) }
62
+ "k" { [ReasonInput]::Key([uint16]$n[1], [uint16]$n[2], [uint32]$n[3]) }
63
+ "c" { Set-Clipboard -Value ([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($n[1]))) }
64
+ }
65
+ } catch { [Console]::Error.WriteLine("input: $_") }
66
+ }
67
+ `;function Oe(e){let t=yn.replace("__MODE__",e).replace("__PARENT__",String(process.pid)).replace("__MAX_TEXT_BYTES__",String(S));return[bn(),["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",Buffer.from(t,"utf16le").toString("base64")]]}var wn=["USERPROFILE","LOCALAPPDATA","APPDATA","TEMP","TMP","PSModuleAnalysisCachePath"];function Ae(){let e=wn.flatMap((t)=>process.env[t]?[[t,process.env[t]]]:[]);return{...Object.fromEntries(e),SystemRoot:Te(),windir:Te()}}function ht(e){let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!=="object")return null;let n=t,o=(s,i)=>typeof s==="number"&&Number.isSafeInteger(s)&&s>=i;return o(n.session,0)&&o(n.width,1)&&o(n.height,1)?{session:n.session,width:n.width,height:n.height}:null}function bt(){return new Promise((e)=>{let t=Me(...Oe("probe"),{env:Ae(),stdio:["ignore","pipe","ignore"],windowsHide:!0}),n="",o=setTimeout(()=>{t.kill("SIGKILL"),e(null)},gn);t.stdout.setEncoding("utf8").on("data",(s)=>{n+=s}),t.once("error",()=>{clearTimeout(o),e(null)}),t.once("close",()=>{clearTimeout(o),e(ht(n.split(/\r?\n/)[0]??""))})})}var Z;function yt(){if(Z!==void 0)return Z;if(process.platform!=="win32")return Z=!1;try{let e=fn(import.meta.url)("bun:ffi"),{symbols:t}=e.dlopen("kernel32.dll",{GetCurrentProcessId:{args:[],returns:e.FFIType.u32},ProcessIdToSessionId:{args:[e.FFIType.u32,e.FFIType.ptr],returns:e.FFIType.i32}}),n=new Uint32Array(1);return Z=t.ProcessIdToSessionId(t.GetCurrentProcessId(),n)!==0&&n[0]>0}catch{return Z=!1}}var lt=[{bit:1,down:2,up:4},{bit:2,down:32,up:64},{bit:4,down:8,up:16}],dt=2048,pt=4096,xn=[[8,dt,120],[16,dt,-120],[32,pt,-120],[64,pt,120]],ft=1,Re=2,_n=4,kn=new Set([65505,65506]),mt=new Set([65507,65508,65511,65512,65513,65514,65027,65515,65516]),gt=new Map([[65505,[160,!1]],[65506,[161,!1]],[65507,[162,!1]],[65508,[163,!0]],[65511,[164,!1]],[65512,[165,!0]],[65513,[164,!1]],[65514,[165,!0]],[65027,[165,!0]],[65515,[91,!0]],[65516,[92,!0]],[65288,[8,!1]],[65289,[9,!1]],[65056,[9,!1]],[65293,[13,!1]],[65307,[27,!1]],[65535,[46,!0]],[65379,[45,!0]],[65360,[36,!0]],[65367,[35,!0]],[65365,[33,!0]],[65366,[34,!0]],[65361,[37,!0]],[65362,[38,!0]],[65363,[39,!0]],[65364,[40,!0]],[65383,[93,!0]],[65509,[20,!1]],[65299,[19,!1]],[65300,[145,!1]],[65377,[44,!0]],[65407,[144,!0]],[32,[32,!1]],[65421,[13,!0]],[65408,[32,!1]],[65450,[106,!1]],[65451,[107,!1]],[65452,[108,!1]],[65453,[109,!1]],[65454,[110,!1]],[65455,[111,!0]],[65429,[36,!1]],[65430,[37,!1]],[65431,[38,!1]],[65432,[39,!1]],[65433,[40,!1]],[65434,[33,!1]],[65435,[34,!1]],[65436,[35,!1]],[65438,[45,!1]],[65439,[46,!1]],...Array.from({length:10},(e,t)=>[65456+t,[96+t,!1]]),...Array.from({length:24},(e,t)=>[65470+t,[112+t,!1]])]);class wt{x=-1;y=-1;mask=0;held=new Set;pressed=new Set;pointer(e,t,n){let o=[];if(e!==this.x||t!==this.y)this.x=e,this.y=t,o.push(`p ${e} ${t}`);for(let s of lt){let i=(this.mask&s.bit)!==0,a=(n&s.bit)!==0;if(i!==a)o.push(`b ${a?s.down:s.up} 0`)}for(let[s,i,a]of xn)if(!(this.mask&s)&&n&s)o.push(`b ${i} ${a}`);return this.mask=n,o}key(e,t){let n=e?0:Re;if(kn.has(t)||mt.has(t))if(e)this.held.add(t);else this.held.delete(t);let o=gt.get(t);if(o)return[`k ${o[0]} 0 ${n|(o[1]?ft:0)}`];let s=t<256?t:(t&4278190080)===16777216?t&16777215:0,i=String.fromCharCode(s),a=[...this.held].some((y)=>mt.has(y)),d=/^[A-Za-z0-9]$/.test(i)?i.toUpperCase().charCodeAt(0):0;if(d&&(e?a:this.pressed.has(d))){if(e)this.pressed.add(d);else this.pressed.delete(d);return[`k ${d} 0 ${n}`]}if(s<33||s>=127&&s<160||s>65535||s>=55296&&s<57344)return[];return[`k 0 ${s} ${n|_n}`]}release(){let e=lt.filter((t)=>this.mask&t.bit).map((t)=>`b ${t.up} 0`);for(let t of this.pressed)e.push(`k ${t} 0 ${Re}`);for(let t of this.held){let[n,o]=gt.get(t);e.push(`k ${n} 0 ${Re|(o?ft:0)}`)}return this.mask=0,this.pressed.clear(),this.held.clear(),e}}function xt(e){let t=Me(...Oe("input"),{env:Ae(),stdio:["pipe","pipe","ignore"],windowsHide:!0}),n=new wt,o="",s=!1,i=null,a=()=>{if(i?.kill("SIGKILL"),t.exitCode!==null||t.signalCode!==null)return;t.stdin.end(n.release().map((p)=>`${p}
68
+ `).join("")),setTimeout(()=>t.kill("SIGKILL"),2000).unref()},d=(p)=>{if(s)return;s=!0,a(),e.end(p)},y=(p)=>d({error:new r("display_unavailable",p)}),h=(p)=>{if(s||p.length===0)return;if(t.stdin.write(p.map((w)=>`${w}
69
+ `).join("")),t.stdin.writableLength>hn)d({reason:"input_backpressure"})},g=()=>{i=Me(...Oe("clipboard"),{env:Ae(),stdio:["ignore","pipe","ignore"],windowsHide:!0});let p="";i.stdout?.on("data",(w)=>{if(s)return;p+=w.toString("ascii");for(let f=p.indexOf(`
70
+ `);f>=0;f=p.indexOf(`
71
+ `)){let M=p.slice(0,f).replace(/\r$/,"");if(p=p.slice(f+1),!M.startsWith("c "))continue;let E=M.slice(2);if(E.length>Math.ceil(S/3)*4||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(E)){d({reason:"display_protocol"});return}let c=Buffer.from(E,"base64");if(c.byteLength<=S)e.clipboard(c.toString("utf8"));if(s)return}if(p.length>Math.ceil(S/3)*4+4)d({reason:"display_protocol"})}),i.once("error",()=>y("Reason could not watch this computer's desktop clipboard.")),i.once("exit",()=>{if(!s)y("Reason could not watch this computer's desktop clipboard.")})};return t.stdout.on("data",(p)=>{if(s||o===null)return;o+=p.toString("utf8");let w=o.indexOf(`
72
+ `);if(w<0){if(o.length>4096)d({reason:"display_protocol"});return}let f=ht(o.slice(0,w).trim());if(o=null,!f)d({reason:"display_protocol"});else if(f.session===0)y("This Windows worker runs as a service, which has no desktop: run it in the signed-in desktop session.");else g(),e.ready({width:f.width,height:f.height})}),t.stdin.on("error",()=>{return}),t.once("error",()=>y("Reason could not start this computer's desktop input.")),t.once("exit",()=>{if(o!==null)y("Reason could not start this computer's desktop input.");else d({reason:"display_closed"})}),{pointer:(p,w,f)=>h(n.pointer(p,w,f)),key:(p,w)=>h(n.key(p,w)),clipboard:(p)=>h([`c ${Buffer.from(p,"utf8").toString("base64")}`]),close(){s=!0,a()}}}var Mn=["none","standard","all"],ue="22.23.3",An={"linux-x64":"1084aa36196bba4c3a5e69a1ee388a6e4ff729dad09445fbcd434b28fe3c24af","linux-arm64":"5ced2d48d1d7198739b7f86804de0171aefb6823b684b12341d3321afc3cb0b2","darwin-arm64":"23b25245dcfb9af7262f8ff142e9e2e0af025368117329e7a7458a51e5922f53","win32-x64":"2b0ff57b049cda1bbcea2240eec20467018713c1efe1f7360c2681859b90ed71","win32-arm64":"33dad22e4cef5ee8f9fbb1b0d037fdacd0e56d12a4580f0d63f68b894deab535"},$e={"linux-x64":{ocu:"dist/linux/amd64/open-computer-use",obu:"native/linux-amd64/open-browser-use"},"linux-arm64":{ocu:"dist/linux/arm64/open-computer-use",obu:"native/linux-arm64/open-browser-use"},"darwin-arm64":{ocu:"dist/Open Computer Use.app/Contents/MacOS/OpenComputerUse",obu:"native/darwin-arm64/open-browser-use"},"win32-x64":{ocu:"dist/windows/amd64/open-computer-use.exe",obu:"native/windows-amd64/open-browser-use.exe"},"win32-arm64":{ocu:"dist/windows/arm64/open-computer-use.exe",obu:"native/windows-arm64/open-browser-use.exe"}},Et="chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",Dt="chrome-win64/chrome.exe",W={version:"9.0.2",url:"https://ffmpeg.martin-riedl.de/download/macos/arm64/1789931890_9.0.2/ffmpeg.zip",sha256:"c8ed4c4e6978a03c485edbfe4e0a5dc2380f8a30bba5150531b31b094492d924"},$n={version:W.version,url:"https://ffmpeg.martin-riedl.de/download/macos/arm64/1789931890_9.0.2/ffprobe.zip",sha256:"fcbe839537485eaee7a7a8bc5cbc0f90d53617e80943e8a5b2e31cb851197ea6"},Le={version:W.version,url:`https://github.com/GyanD/codexffmpeg/releases/download/${W.version}/ffmpeg-${W.version}-essentials_build.zip`,sha256:"60f467265b1e312373dbcd92200c2618a74850f98d3d078e94296bb3fa2047ba"},_t=`ffmpeg-${Le.version}-essentials_build/bin`,z="com.ifuryst.open_browser_use.extension",It="com.reasonmachines.browser_use.extension",Ft="/tmp/reason-browser-use",Ue=["tint2","picom","xterm","pcmanfm"],Pt=["fonts-droid-fallback"],Ct=["pulseaudio"],Rt=["tigervnc-standalone-server"],Ln=["xvfb","openbox","x11vnc","x11-utils","x11-xserver-utils","xdotool","dbus-x11","at-spi2-core","python3","python3-gi","gir1.2-atspi-2.0","gir1.2-gtk-3.0","fonts-dejavu-core",...Pt,"galculator","chromium","ffmpeg","tmux",...Ct,...Rt,...Ue],Nn=new Set([...Ue,...Pt,...Ct,...Rt]),kt=Ln.filter((e)=>e!=="chromium"&&!Nn.has(e)),Bn=["Xvfb","openbox","x11vnc","xdotool","dbus-launch","python3","ffmpeg","tmux"],ce="/usr/bin/chromium",Hn=["/usr/local/bin","/usr/bin","/bin","/opt/homebrew/bin"];function Fn(e=process.platform,t=process.arch){let n=`${e}-${t}`;return n==="linux-x64"||n==="linux-arm64"||n==="darwin-arm64"||n==="win32-x64"||n==="win32-arm64"?n:null}function K(e){return e==="win32-x64"||e==="win32-arm64"}function Be(e){return K(e)?`node-v${ue}-${e.replace("win32","win")}`:`node-v${ue}-${e}`}function de(e){return{node:{version:ue,url:`https://nodejs.org/dist/v${ue}/${Be(e)}${K(e)?".zip":".tar.gz"}`,sha256:An[e]},open_computer_use:{version:O.ocu.version,url:J.ocu.url,sha256:J.ocu.sha256},open_browser_use:{version:O.obu.version,url:J.obu.url,sha256:J.obu.sha256},...e==="darwin-arm64"?{chrome_for_testing:{version:H.version,url:`https://storage.googleapis.com/chrome-for-testing-public/${H.version}/mac-arm64/chrome-mac-arm64.zip`,sha256:H.macArm64Sha256}}:K(e)?{chrome_for_testing:{version:H.version,url:`https://storage.googleapis.com/chrome-for-testing-public/${H.version}/win64/chrome-win64.zip`,sha256:H.win64Sha256}}:{}}}function zn(e){let t={extension:F};for(let[n,o]of Object.entries(de(e)))t[n]=`${o.version}@${o.sha256}`;return t}function Mt(e){return b(e,".local","share","reason","desktop")}function Tr(e,t=Un()){let n=Mt(t),o=(p)=>b(n,p,de(e)[p]?.version??""),s=o("open_computer_use"),i=o("open_browser_use"),a=e==="darwin-arm64",d=K(e),y=b(t,"Library","Application Support"),h=b(process.platform==="win32"&&process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:b(t,"AppData","Local"),"OpenBrowserUse"),g=a?b(y,"Google","Chrome","NativeMessagingHosts",`${z}.json`):d?b(h,"NativeMessagingHosts",`${z}.json`):b(t,".config","google-chrome","NativeMessagingHosts",`${z}.json`);return{root:n,automation:b(vt(n),"automation"),receipt:b(n,"receipt.json"),minimal:is(t),node:d?b(o("node"),Be(e),"node.exe"):b(o("node"),"bin","node"),ocuDir:s,ocu:b(s,$e[e].ocu),ocuApp:a?b(s,"dist","Open Computer Use.app"):null,obuDir:i,obu:b(i,"cli","open-browser-use.js"),nativeHost:b(i,$e[e].obu),extensionDir:a?b(y,"OpenBrowserUse","chrome-extension","release"):d?b(h,"chrome-extension","release"):b(t,".local","share","open-browser-use","chrome-extension","release"),setupNativeHostManifest:g,nativeHostManifests:a?[g,b(y,"Google","ChromeForTesting","NativeMessagingHosts",`${z}.json`)]:d?[g]:[b(t,".config","chromium","NativeMessagingHosts",`${z}.json`),b(t,".config","google-chrome-for-testing","NativeMessagingHosts",`${z}.json`)],browser:a?b(o("chrome_for_testing"),Et):d?b(o("chrome_for_testing"),Dt):ce,userChromeHost:a?b(n,"user-chrome","reason-browser-use"):null,userChromeRegistration:a?b(y,"Google","Chrome","NativeMessagingHosts",`${It}.json`):null,ffmpegDir:b(n,"ffmpeg"),ffmpeg:a?b(n,"ffmpeg",W.version,"ffmpeg"):d?b(n,"ffmpeg",Le.version,_t,"ffmpeg.exe"):null,ffprobe:a?b(n,"ffprobe",$n.version,"ffprobe"):d?b(n,"ffmpeg",Le.version,_t,"ffprobe.exe"):null}}function jn(e){try{let t=JSON.parse(le(e,"utf8"));if(typeof t!=="object"||t===null)return null;let n=t,o=n.pins;if(n.schema_version!==1||typeof n.platform!=="string"||typeof o!=="object"||o===null||!Object.values(o).every((s)=>typeof s==="string")||!Mn.includes(n.permissions)||!Array.isArray(n.missing_system_packages)||!n.missing_system_packages.every((s)=>typeof s==="string")||typeof n.updated_at!=="string")return null;return{schema_version:1,platform:n.platform,pins:o,permissions:n.permissions,missing_system_packages:n.missing_system_packages,updated_at:n.updated_at}}catch{return null}}function A(e){try{return Ne(e).isFile()}catch{return!1}}function Tt(e){try{let t=Ne(e);return t.isFile()&&(t.mode&73)!==0}catch{return!1}}function Gn(e){try{return le(e,"utf8")}catch{return null}}function U(e){for(let t of Hn){let n=b(t,e);try{let o=Ne(n);if(o.isFile()&&(o.mode&73)!==0)return n}catch{}}return null}function Vn(e){try{let t=JSON.parse(le(b(e,"package.json"),"utf8"));return typeof t==="object"&&t!==null&&typeof t.version==="string"?t.version:null}catch{return null}}function Wn(e,t,n){let o=de(n)[e];if(!o)return!1;let s=K(n);if(e==="node")return A(s?b(t,Be(n),"node.exe"):b(t,"bin","node"));if(e==="chrome_for_testing")return A(b(t,s?Dt:Et));let i=$e[n][e==="open_computer_use"?"ocu":"obu"];return Vn(t)===o.version&&A(b(t,i))&&(e==="open_computer_use"||A(b(t,"cli","open-browser-use.js")))}function Xn(e){return St("sha256").update(Buffer.from(e,"base64")).digest("hex").slice(0,32).replace(/./g,(t)=>String.fromCharCode(97+Number.parseInt(t,16)))}function He(e){try{let t=JSON.parse(le(e,"utf8"));return typeof t==="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function qn(e){let t=He(b(e.extensionDir,"manifest.json"));return t!==null&&t.version===O.obu.version&&typeof t.key==="string"&&Xn(t.key)===F}function Qn(e,t){let n=e?.allowed_origins;return e!==null&&e.name===z&&Array.isArray(n)&&n.length===1&&n[0]===`chrome-extension://${F}/`&&(t===void 0||e.path===t)}function es(e){return qn(e)&&A(e.nativeHost)&&e.nativeHostManifests.every((t)=>Qn(He(t),e.nativeHost))}function ts(e){return`#!/bin/sh
73
+ # Reason's Chrome extension host (reason desktop install): Open Browser Use on Reason's socket directory.
74
+ obu=${`'${e.replaceAll("'","'\\''")}'`}
75
+ case "$1" in
76
+ chrome-extension://*) exec "$obu" host --socket-dir ${Ft} ;;
77
+ mcp) shift; exec "$obu" mcp --socket-dir ${Ft} "$@" ;;
78
+ esac
79
+ exec "$obu" "$@"
80
+ `}function ns(e){let t=He(e),n=t?.allowed_origins;return t!==null&&t.name===It&&t.type==="stdio"&&Array.isArray(n)&&n.includes(`chrome-extension://${We}/`)&&typeof t.path==="string"&&Tt(t.path)}function ss(e,t){if(!e.userChromeHost||!e.userChromeRegistration)return null;if(!t||Gn(e.userChromeHost)!==ts(e.nativeHost)||!Tt(e.userChromeHost))return{code:"user_chrome_browser_use_missing"};return ns(e.userChromeRegistration)?{host:e.userChromeHost}:{code:"user_chrome_native_host_unregistered"}}var rs={display:["display","desktop_session","desktop_video"],computer:["display","desktop_session","system_packages","node","open_computer_use"],browser:["display","desktop_session","system_packages","node","open_computer_use","open_browser_use","browser_extension","browser","chrome_for_testing"]};function x(e={}){let t=e.platform===void 0?Fn():e.platform;if(!t)return null;let n=Tr(t,e.home),o=jn(n.receipt),s=zn(t),i=o!==null&&o.platform===t&&JSON.stringify(Object.entries(o.pins).sort())===JSON.stringify(Object.entries(s).sort()),a=[],d=de(t);for(let c of["node","open_computer_use","open_browser_use","chrome_for_testing"]){let _=d[c];if(!_)continue;let v=Wn(c,b(n.root,c,_.version),t),D=o?.pins[c],L=v&&D===s[c]?"ready":D!==void 0&&D!==s[c]?"outdated":"missing";a.push({name:c,state:L,detail:_.version})}let y=o?.pins.extension===F&&es(n);a.push({name:"browser_extension",state:y?"ready":"missing",detail:F});let h=U("Xvfb"),g=U("x11vnc"),p=U("openbox");if(K(t))a.push(yt()?{name:"desktop_session",state:"ready",detail:"signed-in desktop session"}:{name:"desktop_session",state:"missing",detail:"run the worker in the signed-in desktop session, not as a service"}),a.push(n.ffmpeg&&A(n.ffmpeg)?{name:"desktop_video",state:"ready",detail:n.ffmpeg}:{name:"desktop_video",state:"missing",detail:"run `reason desktop install` for desktop video"});else if(t!=="darwin-arm64"){a.push(A(ce)?{name:"browser",state:"ready",detail:ce}:{name:"browser",state:"missing",detail:`non-snap Chromium at ${ce}`});let c=h!==null&&g!==null&&p!==null;a.push({name:"display",state:c?"ready":"missing",detail:"Xvfb + openbox + x11vnc"});let _=Bn.filter((P)=>U(P)===null),v=(o?.missing_system_packages??kt).filter((P)=>kt.includes(P)),D=_.length===0&&v.length===0;a.push(D?{name:"system_packages",state:"ready"}:{name:"system_packages",state:"missing",detail:[...new Set([...v,..._])].join(" ")});let L=Ue.filter((P)=>U(P)===null);a.push(L.length===0?{name:"desktop_look",state:"ready"}:{name:"desktop_look",state:"missing",detail:L.join(" ")})}let w=n.ffmpeg&&A(n.ffmpeg)?n.ffmpeg:U("ffmpeg"),f=!w?null:w===n.ffmpeg?n.ffprobe:b(vt(En(w)),"ffprobe"),M=i&&a.every((c)=>c.state==="ready"),E=(c)=>i&&a.every((_)=>!rs[c].includes(_.name)||_.state==="ready");return{platform:t,root:n.root,automation:n.automation,ready:M,features:{display:E("display"),computer:E("computer"),browser:E("browser")},node:n.node,ocu:n.ocu,obu:n.obu,nativeHost:n.nativeHost,extensionDir:n.extensionDir,browser:n.browser,ffmpeg:w,ffprobe:f&&A(f)?f:null,userChrome:ss(n,i&&["node","open_browser_use"].every((c)=>a.find((_)=>_.name===c)?.state==="ready")),pulseaudio:U("pulseaudio"),xvnc:U("Xvnc"),xvfb:h,x11vnc:g,openbox:p,components:a}}function Ot(e){return os(e)?Yn():[]}function os(e){return e?.platform==="darwin-arm64"&&e.ffmpeg===b(e.root,"ffmpeg",W.version,"ffmpeg")}async function co(e,t,n,o=fetch){try{let s=await o(e,{redirect:"follow"});if(!s.ok||!s.body)throw Error(`download failed (HTTP ${s.status}): ${e}`);let i=St("sha256"),a=vn(n,{mode:384});try{let y=s.body.getReader();for(let h=await y.read();!h.done;h=await y.read())if(i.update(h.value),!a.write(h.value))await Sn(a,"drain")}finally{a.end(),await Cn(a)}let d=i.digest("hex");if(d!==t)throw Error(`digest mismatch for ${e}: expected ${t}, got ${d}`)}catch(s){throw Dn(n,{force:!0}),s}}function is(e){return b(Mt(e),"minimal.json")}import{spawn as as}from"child_process";import{existsSync as cs}from"fs";import{connect as us}from"net";import{join as pe}from"path";var $t="reason_desktop",Q={sampleRate:48000,channels:2,codec:"opus"},ls=5000,ds=107,ps=262144,Pn=(e)=>pe(e,"native"),Ve=(e)=>`unix:${e}`;function Fe(e,t=1000){if(!cs(e))return Promise.resolve(!1);return new Promise((n)=>{let o=us({path:e}),s=(i)=>{o.destroy(),n(i)};o.setTimeout(t,()=>s(!1)),o.once("error",()=>s(!1)),o.once("close",()=>s(!1)),o.once("connect",()=>s(!0))})}async function ao(e,t){if(!t)return null;let n=Pn(e);if(Buffer.byteLength(n)>ds||/["'\\\s]/.test(n))return null;try{if(await Fe(n))return n;let o=as(t,["--daemonize=no","--system=no","--use-pid-file=no","--exit-idle-time=-1","--disallow-exit=yes","--realtime=no","--high-priority=no","--disallow-module-loading=yes","--log-level=warning",`--log-target=file:${pe(e,"pulseaudio.log")}`,"-n",`--load=module-native-protocol-unix socket="${n}" auth-anonymous=1 auth-cookie-enabled=0`,`--load=module-null-sink sink_name=${$t} rate=${Q.sampleRate} channels=${Q.channels} sink_properties=device.description=Reason_desktop`],{detached:!0,stdio:"ignore",env:{HOME:e,PATH:"/usr/bin:/bin",XDG_RUNTIME_DIR:e,PULSE_RUNTIME_PATH:pe(e,"runtime"),PULSE_STATE_PATH:pe(e,"state")}}),s=!1;o.once("error",()=>{s=!0}),o.once("exit",()=>{s=!0}),o.unref();let i=Date.now()+ls;while(Date.now()<i){if(await Fe(n))return n;if(s)return await Fe(n)?n:null;await new Promise((a)=>setTimeout(a,50))}if(!s)o.kill("SIGKILL");return null}catch{return null}}function Lt(){let{sampleRate:e,channels:t}=Q;return["-hide_banner","-loglevel","error","-nostdin","-fflags","nobuffer","-f","pulse","-sample_rate",String(e),"-channels",String(t),"-fragment_size",String(e*t*2/50),"-i",`${$t}.monitor`,"-vn","-ac",String(t),"-ar",String(e),"-c:a","libopus","-b:a","64k","-application","lowdelay","-frame_duration","20","-flush_packets","1","-page_duration","20000","-f","ogg","pipe:1"]}var fs=[79,103,103,83],ms=Buffer.from("OpusHead"),gs=Buffer.from("OpusTags"),At=(e,t)=>e.byteLength>=t.byteLength&&t.every((n,o)=>e[o]===n);class ze extends Error{constructor(e){super(e);this.name="OggProtocolError"}}class je{buffer=new Uint8Array(0);partial=[];partialBytes=0;push(e){let t=new Uint8Array(this.buffer.byteLength+e.byteLength);t.set(this.buffer),t.set(e,this.buffer.byteLength);let n=[],o=0;while(t.byteLength-o>=27){if(fs.some((w,f)=>t[o+f]!==w)||t[o+4]!==0)throw new ze("invalid_page");let s=(t[o+5]&1)!==0,i=t[o+26];if(t.byteLength-o<27+i)break;let a=t.subarray(o+27,o+27+i),d=a.reduce((w,f)=>w+f,0),y=27+i+d;if(t.byteLength-o<y)break;if(!s&&this.partialBytes>0)this.resetPartial();let h=s&&this.partialBytes===0,g=o+27+i,p=g;for(let w of a){if(g+=w,w===255)continue;if(this.appendPartial(t.subarray(p,g),h),p=g,!h){let f=this.takePartial();if(f.byteLength>0&&!At(f,ms)&&!At(f,gs))n.push(f)}h=!1,this.resetPartial()}if(p<g)this.appendPartial(t.subarray(p,g),h);o+=y}return this.buffer=t.slice(o),n}appendPartial(e,t){if(t||e.byteLength===0)return;if(this.partialBytes+=e.byteLength,this.partialBytes>ps)throw new ze("packet_too_large");this.partial.push(e.slice())}takePartial(){if(this.partial.length===1)return this.partial[0];let e=new Uint8Array(this.partialBytes),t=0;for(let n of this.partial)e.set(n,t),t+=n.byteLength;return e}resetPartial(){this.partial=[],this.partialBytes=0}}import{spawn as hs}from"child_process";var Nt=1048576,bs=String.raw`
81
+ import gi, json, os, sys
82
+ gi.require_version("Gtk", "3.0")
83
+ from gi.repository import Gtk, Gdk, GLib
84
+ if not Gtk.init_check()[0]:
85
+ sys.exit(1)
86
+ clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
87
+ pending = b""
88
+ generation = 0
89
+ def send(value):
90
+ print(json.dumps(value, ensure_ascii=True), flush=True)
91
+ def changed(clipboard, event):
92
+ global generation
93
+ generation += 1
94
+ current = generation
95
+ def received(clipboard, text, unused):
96
+ if current == generation and text is not None and len(text.encode("utf-8")) <= ${S}:
97
+ send({"text": text})
98
+ clipboard.request_text(received, None)
99
+ # No request_text on startup: never share the pre-existing clipboard.
100
+ clipboard.connect("owner-change", changed)
101
+ def input_ready(fd, condition):
102
+ global pending
103
+ chunk = os.read(fd, 65536)
104
+ if not chunk:
105
+ Gtk.main_quit()
106
+ return False
107
+ pending += chunk
108
+ while b"\n" in pending:
109
+ line, pending = pending.split(b"\n", 1)
110
+ text = json.loads(line)
111
+ if not isinstance(text, str) or len(text.encode("utf-8")) > ${S} or "\x00" in text:
112
+ sys.exit(1)
113
+ clipboard.set_text(text, -1)
114
+ send("ack")
115
+ if len(pending) > ${S*6+2}:
116
+ sys.exit(1)
117
+ return True
118
+ GLib.io_add_watch(0, GLib.IO_IN | GLib.IO_HUP, input_ready)
119
+ send("ready")
120
+ Gtk.main()
121
+ `;function Ut(e,t){let n=hs("/usr/bin/python3",["-I","-u","-c",bs],{env:{DISPLAY:e.display,XAUTHORITY:e.xauthority},stdio:["pipe","pipe","ignore"]}),o=!1,s=!0,i="",a=0,d=[],y=setTimeout(()=>g(),5000),h=()=>{o=!0,clearTimeout(y),d.length=0,n.kill("SIGKILL")},g=()=>{if(o)return;h(),t.end({error:new r("display_unavailable","Reason could not start this Linux desktop's UTF-8 clipboard.")})},p=(w,f=32)=>{if(o)return;if(!s){w();return}if(a+=f,a>Nt)h(),t.end({reason:"input_backpressure"});else d.push({apply:w,bytes:f})};return n.stdout.on("data",(w)=>{if(o)return;i+=w.toString("ascii");for(let f=i.indexOf(`
122
+ `);f>=0;f=i.indexOf(`
123
+ `)){let M=i.slice(0,f);i=i.slice(f+1);let E;try{E=JSON.parse(M)}catch{g();return}if(E==="ready"||E==="ack"){clearTimeout(y),s=!1;while(!s&&!o&&d.length){let c=d.shift();a-=c.bytes,c.apply()}}else if(E&&typeof E==="object"&&"text"in E&&typeof E.text==="string"&&Buffer.byteLength(E.text)<=S)t.clipboard(E.text);else{g();return}if(o)return}if(i.length>S*6+32)g()}),n.stdin.on("error",g),n.once("error",g),n.once("exit",g),{apply:p,write(w){if(Buffer.byteLength(w)>S||w.includes("\x00")){g();return}let f=`${JSON.stringify(w)}
124
+ `;p(()=>{if(s=!0,y=setTimeout(()=>g(),5000),n.stdin.write(f),n.stdin.writableLength>Nt)h(),t.end({reason:"input_backpressure"})},Buffer.byteLength(f))},close:h}}var X={smooth:{fps:60,crf:23,kbps:8000,x264Preset:"ultrafast",threads:2,scale:1},sharp:{fps:30,crf:19,kbps:1e4,x264Preset:"superfast",scale:1},data_saver:{fps:20,crf:28,kbps:2000,x264Preset:"ultrafast",scale:0.75},balanced:{fps:30,crf:23,kbps:4000,x264Preset:"ultrafast",threads:2,scale:1}},_s="avc1.4D002A",Bt={width:1920,height:1080},ks=262144,Ss=0.2,vs=250,Es=1e4,Ds=1024,Ge=1e4,Is=500,Ps=60,Cs=1e4,Rs=1000,Ht=1048576,Ms=-223,Ts=-308,Tn={kind:"mac_screen",sound:null},Rn={kind:"windows_screen",sound:null},Os,zt=()=>Os??=x()?.ffmpeg??null,me=(e,t,n)=>Xe(e,t,{env:n,stdio:["ignore","pipe","ignore"],windowsHide:!0}),As,qe=()=>As??=Ot(x()),jt=(e,t,n)=>{let[o,...s]=[...qe(),e];return me(o,[...s,...t],n)},Gt=()=>nn?.videotoolbox?"h264_videotoolbox":"libx264",$s=()=>Math.round(performance.now()*1000),Ke=new Set,Vt=!1;function Yt(e){if(Ke.add(e),e.once("exit",()=>Ke.delete(e)),Vt)return;Vt=!0,process.once("exit",()=>{for(let t of Ke)try{t.kill("SIGKILL")}catch{}})}function Zt(e){try{e.stdout?.destroy()}catch{}if(e.exitCode!==null||e.signalCode!==null)return;try{e.kill("SIGTERM")}catch{return}let t=setTimeout(()=>{if(e.exitCode===null&&e.signalCode===null)try{e.kill("SIGKILL")}catch{}},Is);e.once("exit",()=>clearTimeout(t))}function Ls(e,t,n){return{args:["-f","x11grab","-draw_mouse","1","-framerate",String(e),"-video_size",`${t.width}x${t.height}`,"-i",n],size:t}}function Ns(e){return{args:["-f","avfoundation","-capture_cursor","1","-pixel_format","nv12","-framerate",String(e),"-i","Capture screen 0:none"],size:null}}function Us(e,t){return{args:["-f","gdigrab","-draw_mouse","1","-framerate",String(e),"-offset_x","0","-offset_y","0","-video_size",`${t.width}x${t.height}`,"-i","desktop"],size:t}}function Bs(e){return{args:["-probesize","32","-analyzeduration","0","-f","image2pipe","-c:v","mjpeg","-framerate",String(e),"-i","pipe:0"],size:null}}var Qt=1700000;function en(e){return Math.min(1,Math.round(Math.sqrt(Qt/(e.width*e.height))*100)/100)}function Hs(e,t,n){let o=Xe(n.axe,["stream-video","--udid",n.udid,"--format","ffmpeg","--fps","30","--quality","85","--scale",String(Math.min(0.99,en(n.size)))],{stdio:["ignore","pipe","ignore"]}),s=Xe(e,t,{env:{},stdio:["pipe","pipe","ignore"]});o.stdout.pipe(s.stdin),s.stdin.on("error",()=>{});let i=()=>{if(o.exitCode===null&&o.signalCode===null)o.kill("SIGTERM")};return s.once("exit",i),s.once("error",i),o.once("exit",()=>{if(s.exitCode===null&&s.signalCode===null)s.kill("SIGTERM")}),o.once("error",()=>{if(s.exitCode===null&&s.signalCode===null)s.kill("SIGTERM")}),s}function Wt(e){let t=Math.min(1,Bt.width/e.width,Bt.height/e.height);return{width:Math.round(e.width*t),height:Math.round(e.height*t)}}function fe(e,t,n,o="libx264"){let s=X[e],i=(p)=>Math.max(2,Math.floor(p/2)*2),a={width:i(n.width*s.scale),height:i(n.height*s.scale)},d=a.width!==t.size?.width||a.height!==t.size.height,y=Math.max(1,Math.round(s.kbps*2/s.fps)),h=["-g",String(s.fps*Ps)],g=o==="h264_videotoolbox"?["-c:v","h264_videotoolbox","-realtime","1","-prio_speed","1","-allow_sw","1","-profile:v","main","-level","4.2","-bf","0","-pix_fmt","nv12",...h,"-b:v",`${s.kbps}k`,"-maxrate",`${s.kbps}k`,"-bufsize",`${y}k`,"-bsf:v","h264_metadata=aud=insert"]:["-c:v","libx264","-preset",s.x264Preset,"-tune","zerolatency","-profile:v","main","-level","4.2","-bf","0","-pix_fmt","yuv420p",...s.threads?["-threads",String(s.threads)]:[],"-x264-params","aud=1:repeat-headers=1",...h,"-crf",String(s.crf),"-maxrate",`${s.kbps}k`,"-bufsize",`${y}k`];return["-hide_banner","-loglevel","error","-nostdin","-fflags","nobuffer",...t.args,"-an",...d?["-vf",`scale=${a.width}:${a.height}:flags=fast_bilinear`]:[],...g,"-flush_packets","1","-f","h264","pipe:1"]}class tn{buffer=new Uint8Array(0);scanned=0;key=!1;micros=0;push(e,t){if(this.buffer.byteLength===0)this.micros=t;let n=new Uint8Array(this.buffer.byteLength+e.byteLength);n.set(this.buffer),n.set(e,this.buffer.byteLength),this.buffer=n;let o=[],s=this.scanned;while(s+3<this.buffer.byteLength){if(this.buffer[s]!==0||this.buffer[s+1]!==0||this.buffer[s+2]!==1){s++;continue}let i=this.buffer[s+3]&31,a=s>0&&this.buffer[s-1]===0?s-1:s;if(i===9&&a>0)o.push({data:this.buffer.slice(0,a),key:this.key,micros:this.micros}),this.buffer=this.buffer.subarray(a),this.key=!1,this.micros=t,s-=a;if(i===5)this.key=!0;s+=3}return this.scanned=s,o}}function Fs(e,t){let n=xs({path:e}),o=Buffer.alloc(0),s="version",i=0,a=!1,d=[],y=0,h=!1,g=(c)=>{if(h)return;h=!0,n.destroy(),t.end(c)},p=()=>g({reason:"display_protocol"}),w=(c)=>{if(h)return;if(!a){if(y+=c.byteLength,y>Ht)g({reason:"input_backpressure"});else d.push(c);return}if(n.write(c),n.writableLength>Ht)g({reason:"input_backpressure"})},f=(c)=>{o=o.subarray(c)},M=()=>{switch(s){case"version":{if(o.byteLength<12)return!1;let c=/^RFB (\d{3})\.(\d{3})\n$/.exec(o.subarray(0,12).toString("latin1"));if(!c||Number(c[1])*1000+Number(c[2])<3007)return p(),!1;return f(12),n.write(`RFB 003.007
125
+ `),s="security",!0}case"security":{if(o.byteLength<1)return!1;let c=o[0];if(c===0)return p(),!1;if(o.byteLength<1+c)return!1;if(!o.subarray(1,1+c).includes(1))return p(),!1;return f(1+c),n.write(Buffer.from([1,1])),s="init",!0}case"init":{if(o.byteLength<24)return!1;let c=o.readUInt32BE(20);if(c>65536)return p(),!1;if(o.byteLength<24+c)return!1;let _={width:o.readUInt16BE(0),height:o.readUInt16BE(2)};if(f(24+c),_.width===0||_.height===0)return p(),!1;s="messages";let v=Buffer.alloc(12);v.writeUInt8(2,0),v.writeUInt16BE(2,2),v.writeInt32BE(Ts,4),v.writeInt32BE(Ms,8),n.write(v),a=!0;for(let D of d)n.write(D);return d=[],y=0,t.ready(_),!h}case"skip":{let c=Math.min(i,o.byteLength);if(f(c),i-=c,i>0)return!1;return s="messages",!0}case"messages":{if(o.byteLength<1)return!1;switch(o[0]){case 1:{if(o.byteLength<6)return!1;let c=6+o.readUInt16BE(4)*6;if(o.byteLength<c)return!1;return f(c),!0}case 2:return f(1),!0;case 3:{if(o.byteLength<8)return!1;let c=o.readUInt32BE(4);if(c>S/2)return f(8),s="skip",i=c,!0;if(o.byteLength<8+c)return!1;let _=o.subarray(8,8+c).toString("latin1");return f(8+c),t.clipboard(_),!h}default:return p(),!1}}}},E=!1;return n.once("connect",()=>{E=!0}),n.on("data",(c)=>{if(h)return;o=o.byteLength?Buffer.concat([o,c]):c;while(!h&&M());}),n.once("error",()=>{if(!E)g({error:new r("display_unavailable","Reason could not reach this machine's desktop server.")})}),n.once("close",()=>g({reason:"display_closed"})),{pointer(c,_,v){let D=Buffer.alloc(6);D.writeUInt8(5,0),D.writeUInt8(v&255,1),D.writeUInt16BE(c,2),D.writeUInt16BE(_,4),w(D)},key(c,_){let v=Buffer.alloc(8);v.writeUInt8(4,0),v.writeUInt8(c?1:0,1),v.writeUInt32BE(_>>>0,4),w(v)},clipboard(c){if(Array.from(c).some((D)=>D.codePointAt(0)>255)){g({reason:"clipboard_unicode_unsupported"});return}let _=Buffer.from(c,"latin1"),v=Buffer.alloc(8);v.writeUInt8(6,0),v.writeUInt32BE(_.byteLength,4),w(Buffer.concat([v,_]))},close(){h=!0,n.destroy()}}}class Je{run=null;viewers=new Set;get running(){return this.run!==null}start(e,t,n,o){this.viewers.add(e),this.stop();let s;try{s=n()}catch{this.fail();return}Yt(s);let i={child:s,splitter:new tn};this.run=i;for(let d of[...this.viewers])d.started(t);s.stdout?.on("data",(d)=>{if(this.run!==i)return;for(let y of i.splitter.push(d,o()))for(let h of[...this.viewers])h.unit(y)});let a=()=>{if(this.run!==i)return;this.run=null,this.fail()};s.once("exit",a),s.once("error",a)}leave(e){if(!this.viewers.delete(e))return;if(this.viewers.size===0)this.stop()}stop(){if(!this.run)return;Zt(this.run.child),this.run=null}fail(){for(let e of[...this.viewers])e.failed()}}var Kt=new WeakMap;function zs(e){let t=Kt.get(e);if(!t)Kt.set(e,t=new Je);return t}var ee=new Map;function On(e,t,n={}){let o=n.micros??$s,s=new Kn,i=t.request.preset,a=null,d=null,y=null,h=!1,g=null,p=!1,w=!1,f=null,M=0,E=0,c=!1,_=null,v=null,D=0,L=null,P=[],te=0,N=[],Ze=new Uint32Array(Ge+1),ge=0,he=null,be=0,q=0,ye=0,Qe=0,et=0,ne=null,we=0,j={frames:0,bytes:0,since:o()},G=[],Y=0,xe,_e=!1,rn=o(),R={},V=()=>Math.round((o()-rn)/1000),tt=n.control??ut,ke=null,Se=null,nt=0,ve=!1,st={pause(){if(!g?.running)return;g.stop(),ve=!0},adopt(u){let l=u!==null&&(u.width!==d?.width||u.height!==d?.height);if(l)d=u;if(!l&&!ve)return;if(ve=!1,g)ae();else Ie()}},on=(u)=>{if(!n.resizeDesktop||!a||"kind"in a||e.done)return;let l=a.display,m=()=>[...ee.get(l)??[]];nt++,n.resizeDesktop(a,u,()=>{for(let k of m())k.pause()}).then((k)=>{for(let I of m())I.adopt(k)})},T=(u)=>{let l=Jt(u);return e.send(l),Qe+=l.byteLength,l.byteLength},se=(u)=>{if(e.done)return;if(e.open)T({type:"error",code:u});e.end({reason:u})},re=()=>Math.max(ks,X[i].kbps*1000/8*Ss),oe=()=>o()/1000,an=()=>{while(N.length>1&&N[0].atMs<oe()-Es)N.shift();return N[0]?.rttMs??null},rt=(u)=>{let l=an();if(l===null||P.length===0)return!1;let m=(l+vs)*u;return oe()-P[0].sentMs>m||te>m/1000*X[i].kbps*1000/8},cn=(u)=>{if(D===0)return;let l=Math.min(u,D-1);if(L!==null&&l<=L)return;L=l;let m=oe();while(P.length&&P[0].seq<=l){let k=P.shift();if(te-=k.bytes,k.seq!==l)continue;let I=Math.max(0,m-k.sentMs);while(N.length&&N.at(-1).rttMs>=I)N.pop();N.push({atMs:m,rttMs:I}),Ze[Math.min(Ge,Math.round(I))]++,ge++,he=Math.min(he??I,I)}},un=()=>{let u=0;for(let l=0;l<=Ge;l++)if(u+=Ze[l],u*2>=ge)return l;return 0},ln=()=>e.bufferedAmount<=re()/2&&!rt(0.5),ot=()=>{_e=!0,G=[],Y=0,g?.leave(Ee),g=null},it=(u)=>{if(e.done)return;if(u.key)R.first_key_ms??=V();if(!h){if(!g||G.length===0&&!u.key)return;if(G.push(u),Y+=u.data.byteLength,Y>re())ot();return}if(c){q++;return}if(e.bufferedAmount>re()||rt(1)){c=!0,q++,_=setInterval(()=>{if(e.done||!ln())return;if(_)clearInterval(_);_=null,c=!1,ae()},n.drainPollMs??25);return}if(!p){if(!u.key){q++;return}if(T({type:"hello",width:d.width,height:d.height,fps:X[i].fps,preset:i,codec:_s}),p=!0,R.first_frame_ms??=V(),!w&&a?.sound)T({type:"audioHello",...Q}),w=!0}let l=T({type:"frame",key:u.key,seq:D,captureMicros:u.micros,data:u.data});if(P.push({seq:D,sentMs:oe(),bytes:l}),te+=l,P.length>Ds)te-=P.shift().bytes;D++,be++,ne??=u.micros,we=u.micros,j.frames++,j.bytes+=l},Ee={started(u){i=u,p=!1,G=[],Y=0},unit:it,failed:()=>se("encoder_failed")},De=()=>{let u=(n.ffmpeg??zt)();if(!a||!d){se("encoder_failed");return}let[l,m]=[a,d],k="kind"in l&&l.kind==="simulator"?l.stream:null;if(!u&&!k){se("encoder_failed");return}if(g??="kind"in l&&l.kind==="mac_screen"?zs(n.spawn??jt):new Je,R.encoder_ms===void 0)R.encoder_ms=V(),R.encoder_shared=g.running;g.start(Ee,i,()=>{let I=X[i].fps;if(k)return k(I,X[i].kbps,Qt);if("kind"in l&&l.kind==="simulator"){let C=Math.min(0.99,en(l.size)),B={width:l.size.width*C,height:l.size.height*C};return Hs(u,fe(i,Bs(Math.min(I,30)),B,(n.macEncoder??Gt)()),l)}if("kind"in l&&l.kind==="windows_screen")return(n.spawn??me)(u,fe(i,Us(I,m),Wt(m)),{SystemRoot:process.env.SystemRoot??"C:\\Windows"});return"kind"in l?(n.spawn??jt)(u,fe(i,Ns(I),Wt(m),(n.macEncoder??Gt)()),{}):(n.spawn??me)(u,fe(i,Ls(I,m,l.display),m),{DISPLAY:l.display,XAUTHORITY:l.xauthority})},o)},ie=()=>{if(!f)return;Zt(f.child),f=null},dn=()=>{let u=(n.ffmpeg??zt)();if(f||e.done||!w||!a?.sound||!u)return;let l;try{l=(n.spawn??me)(u,Lt(),{PULSE_SERVER:Ve(a.sound)})}catch{return}Yt(l);let m={child:l,reader:new je};f=m,l.stdout?.on("data",(I)=>{if(f!==m||e.done)return;let C;try{C=m.reader.push(I)}catch{ie();return}let B=o();for(let Ce of C){if(e.bufferedAmount>re()){E++;continue}T({type:"audio",captureMicros:B,data:Ce}),M++}});let k=()=>{if(f===m)ie()};l.once("exit",k),l.once("error",k)},ae=()=>{if(!g||e.done)return;ye++,De()},Ie=()=>{if(e.done||!d)return;if(!h){if(g||_e)return;De(),xe=setTimeout(()=>{if(!h)ot()},Cs);return}if(clearTimeout(xe),R.encoder_early===void 0){if(R.encoder_early=g!==null,_e)R.hold_lapsed=!0}if(!g)De();let u=G;G=[],Y=0;for(let l of u)it(l);v??=setInterval(()=>{let l=o(),m=Math.max(0.001,(l-j.since)/1e6);T({type:"stats",stats:{fps:Math.round(j.frames/m*10)/10,kbps:Math.round(j.bytes*8/1000/m),dropped:q,restarts:ye,queued_bytes:e.bufferedAmount}}),j={frames:0,bytes:0,since:l}},Rs)};t.desktop.then((u)=>{if(e.done)return;a=u;let l={ready(m){d=m,R.desktop_ms??=V(),Ie()},clipboard(m){if(e.open&&Buffer.byteLength(m)<=S)T({type:"serverClipboard",text:m})},end(m){if("reason"in m&&e.open)T({type:"error",code:m.reason});e.end(m)}};if("kind"in u&&u.kind==="simulator")y=u.input,l.ready(u.points);else if("kind"in u&&u.kind==="windows_screen")y=(n.windowsInput??xt)(l);else if("kind"in u)y=(n.macInput??((m)=>Zn(m,qe())))(l);else{let m=ee.get(u.display);if(!m)ee.set(u.display,m=new Set);m.add(st);let k=(n.linuxClipboard??Ut)(u,l),I=Fs(u.rfbSocket,{...l,clipboard:(C)=>{if(!k)l.clipboard(C)}});y=k?{pointer:(C,B,Ce)=>k.apply(()=>I.pointer(C,B,Ce)),key:(C,B)=>k.apply(()=>I.key(C,B)),clipboard:(C)=>k.write(C),close(){k.close(),I.close()}}:I}at()},(u)=>e.end({error:u}));function at(){if(Se||!t.viewerSameNetwork||!h||e.done||!a||!("kind"in a)||a.kind!=="mac_screen")return;Se=(n.macWindows??Jn)((u)=>{if(e.open)T({type:"windows",bounds:u})})}let ct={viewer:t.viewer??null,notify(u){if(e.open)T({type:"control",control:u})}},Pe=(u)=>{if(!y)return;if(!a||!("kind"in a)||a.kind!=="simulator")tt.claim(ct);u(y)};return{opened(){R.relay_ms??=V()},received(u){et+=u.byteLength;let l;try{l=s.push(u)}catch{se("viewer_protocol");return}for(let m of l){if(e.done)return;switch(m.type){case"ping":T({type:"pong",token:m.token});break;case"pointer":Pe((k)=>k.pointer(m.x,m.y,m.buttons));break;case"key":Pe((k)=>k.key(m.down,m.keysym));break;case"clientClipboard":Pe((k)=>k.clipboard(m.text));break;case"config":if(m.preset!==i)i=m.preset,ae();break;case"keyframeRequest":if(p&&!c)ae();break;case"ack":cn(m.seq);break;case"audioEnable":if(m.on)dn();else ie();break;case"resize":on({width:m.width,height:m.height});break;default:break}}if(!h&&!e.done){if(h=!0,R.viewer_ms=V(),t.viewer)ke=tt.join(ct);Ie(),at()}},close(){if(a&&!("kind"in a)){let u=ee.get(a.display);if(u?.delete(st),u?.size===0)ee.delete(a.display)}if(ke?.(),ke=null,Se?.close(),_)clearInterval(_);if(v)clearInterval(v);clearTimeout(xe),g?.leave(Ee),ie(),y?.close()},summary:()=>({output_bytes:Qe,input_bytes:et,video:{preset:i,frames:be,dropped:q,restarts:ye,avg_fps:ne!==null&&we>ne?Math.round((be-1)/((we-ne)/1e6)*10)/10:0,min_rtt_ms:Math.round(he??0),p50_rtt_ms:ge?un():0,audio_packets:M,audio_dropped:E,resizes:nt,connect:R}})}}var Xt=null,nn=null,js=null,Gs=null;function Vs(){let e=x();return e?.features.display?e.ffmpeg:null}function sn(e){return Xt??=new Promise((t)=>{ys(e,["-hide_banner","-encoders"],{env:{},timeout:5000,killSignal:"SIGKILL",maxBuffer:1048576,encoding:"utf8"},(n,o)=>{let s=(i)=>!n&&new RegExp(`^\\s*V\\S*\\s+${i}\\s`,"m").test(o);t(nn={x264:s("libx264"),videotoolbox:s("h264_videotoolbox")})})}),Xt}var qt=null;function In(){return qt??=(async()=>{let e=[x()?.ffmpeg,"/opt/homebrew/bin/ffmpeg","/usr/local/bin/ffmpeg"].find((n)=>Boolean(n&&ws(n)));if(!e)return null;let t=await sn(e);return t.videotoolbox||t.x264?e:null})(),qt}function Pr(e=process.platform,t={}){if(e!=="linux"&&e!=="darwin"&&e!=="win32")return Promise.resolve(!1);let n=(t.ffmpeg??Vs)();if(!n)return Promise.resolve(!1);let o=(t.encoders??sn)(n);if(e==="linux")return o.then((i)=>i.x264);if(e==="win32"){let i=t.windowsScreen?t.windowsScreen():Gs??=bt();return Promise.all([o,i]).then(([a,d])=>a.x264&&(d?.session??0)>0)}let s=t.macScreen?t.macScreen():js??=Ye(qe());return Promise.all([o,s]).then(([i,a])=>(i.x264||i.videotoolbox)&&a?.screen===!0&&a.accessibility)}
126
+ export{We,so,F,Pn,Ve,ao,Tn,Rn,On,In,Pr,Ft,Tr,x,co};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Tt,I}from"./vm-hands-entry-lite-8r31b0ps.js";import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{g,Kt}from"./vm-hands-entry-lite-aj139v8j.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";function Ni(e,i){let r=T(e,"REASON_API_URL")?.trim();if(!r)return Kt(i);let t=new URL(r);if(t.protocol!=="https:"&&!(t.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(t.hostname)))throw Error("REASON_API_URL must use HTTPS (HTTP is allowed only for loopback development).");return t.origin}function l(e){return T(e,"REASON_API_URL")?.trim()?Ni(e,"production"):void 0}function Ho(e){return T(e,"REASON_API_KEY")?.trim()||void 0}async function zo(e,i){let r=e.env??process.env,t=Ho(r);if(!t)return(e.getCredentials??Tt)({apiOrigin:l(r),signal:i});let a=Ni(r,e.channel??g({env:r})),o=await(e.fetchImpl??fetch)(a+"/v3/self",{redirect:"error",headers:{authorization:"Bearer "+t,accept:"application/json"},signal:i}),p=await o.json().catch(()=>({})),n=be(p)?p:{};if(!o.ok){let s=typeof n.detail==="string"?n.detail:typeof n.message==="string"?n.message:"API key authentication failed ("+o.status+")";throw new I(o.status,typeof n.error==="string"?n.error:"api_key_auth_failed",s)}if(typeof n.org_id!=="string"||!n.org_id)throw Error("The API key in the environment did not resolve to a Workspace.");let c=Array.isArray(n.scopes)?n.scopes.filter((s)=>typeof s==="string"):[];return{credentialKind:"api_key",apiOrigin:a,accessToken:t,orgId:n.org_id,clientId:"api-key",refreshToken:"",expiresAt:"",scopes:c}}async function hs(e){let i=await zo(e),r=l(e.env??process.env);if(!i)throw Error(r?`Not signed in to ${r}. Set REASON_API_KEY, or run \`reason login --api-url ${r}\`.`:"Not signed in. Run `reason login`, or set REASON_API_KEY.");return i}
3
+ export{Ni,Ho,zo,hs};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var i="libara_device_keychain.dylib",e="libreason_device_keychain.dylib";class dt extends Error{code;constructor(n,t){super(t);this.code=n;this.name="ManagedRuntimeError"}}import{existsSync as s}from"fs";import{join as a}from"path";function fo(n){let t=a(n,e);return s(t)?t:a(n,i)}
3
+ export{dt,fo};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{he}from"./vm-hands-entry-lite-hbs3tpdg.js";var cn=he(function(t,e){e.exports={name:"playwright-core",version:"1.60.0",description:"A high-level API to automate web browsers",repository:{type:"git",url:"git+https://github.com/microsoft/playwright.git"},homepage:"https://playwright.dev",engines:{node:">=18"},author:{name:"Microsoft Corporation"},license:"Apache-2.0",exports:{".":{types:"./index.d.ts",import:"./index.mjs",require:"./index.js",default:"./index.js"},"./package.json":"./package.json","./lib/bootstrap":"./lib/bootstrap.js","./lib/coreBundle":"./lib/coreBundle.js","./lib/utilsBundle":"./lib/utilsBundle.js","./lib/tools/cli-client/program":"./lib/tools/cli-client/program.js"},bin:{"playwright-core":"cli.js"},types:"types/types.d.ts"}});
3
+ export{cn};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{sr}from"./vm-hands-entry-lite-rfz60hb3.js";import{Be}from"./vm-hands-entry-lite-zp6naptr.js";import{execFileSync as p}from"child_process";import{realpathSync as S,statSync as w}from"fs";import{tmpdir as P}from"os";import{createRequire as b}from"module";import{win32 as r}from"path";var h=["/bin/bash","/usr/bin/bash"],g="Git Bash was not found. Install Git for Windows (https://git-scm.com/download/win), then run `reason connect`.";function c(o){try{return w(o).isFile()}catch{return!1}}var i=(o)=>[r.join(o,"bin","bash.exe"),r.join(o,"usr","bin","bash.exe")];function x(o,e){let t=r.normalize(o).toLowerCase(),s=(e.SystemRoot??e.SYSTEMROOT??"C:\\Windows").toLowerCase();return t.startsWith(r.join(s,"system32").toLowerCase()+"\\")||t.startsWith(r.join(s,"sysnative").toLowerCase()+"\\")||t.includes("\\windowsapps\\")}function f(o=process.env,e=c){let t=[];for(let s of(o.PATH??o.Path??"").split(";"))if(s&&r.isAbsolute(s))t.push(r.join(s,"git.exe"));for(let s of[o.ProgramW6432,o.ProgramFiles,o["ProgramFiles(x86)"]])if(s)t.push(r.join(s,"Git","cmd","git.exe"));if(o.LOCALAPPDATA)t.push(r.join(o.LOCALAPPDATA,"Programs","Git","cmd","git.exe"));return t.find(e)??null}var a;function jo(o=process.platform){if(o!=="win32")return"git";return a??=f(),a}function J(o){let e=process.platform==="win32"?f(o):"git";if(!e)return null;try{return p(e,["--exec-path"],{encoding:"utf8",timeout:5000,windowsHide:!0,stdio:["ignore","pipe","ignore"],env:o}).trim()||null}catch{return null}}function y(o=process.env,e=J,t=c){let s=[],l=e(o);if(l)s.push(...i(r.resolve(l,"..","..","..")));for(let n of[o.ProgramW6432,o.ProgramFiles,o["ProgramFiles(x86)"]])if(n)s.push(...i(r.join(n,"Git")));if(o.LOCALAPPDATA)s.push(...i(r.join(o.LOCALAPPDATA,"Programs","Git")));for(let n of(o.PATH??o.Path??"").split(";"))if(n&&r.isAbsolute(n))s.push(r.join(n,"bash.exe"));return s.find((n)=>!x(n,o)&&t(n))??null}var d;function fe(o=process.platform){if(o!=="win32")return h.find(c)??null;return d??=y(),d}function se(o=process.platform){let e=fe(o);if(!e)throw Error(o==="win32"?g:"bash_unavailable");return e}function Uo(o=process.platform){return S(o==="win32"?P():"/tmp")}function De(o=process.platform,e=process.env){if(o!=="win32")return"/usr/bin:/bin";let t=e.SystemRoot??e.SYSTEMROOT??"C:\\Windows";return[r.join(t,"System32"),t,r.join(t,"System32","Wbem"),r.join(t,"System32","WindowsPowerShell","v1.0")].join(";")}function C(o,e=process.platform){if(e!=="win32"||/[\\/]/.test(o))return o;let t=/\.exe$/i.test(o)?o:`${o}.exe`,s=De(e).split(";");return r.join(t.toLowerCase()==="powershell.exe"?s[3]:s[0],t)}function Ne(o=process.platform,e=process.env){if(o!=="win32")return{PATH:De(o)};let t=e.SystemRoot??e.SYSTEMROOT??"C:\\Windows";return{PATH:De(o,e),SystemRoot:t,WINDIR:t}}function Le(o=process.platform){return o==="win32"?{windowsHide:!0}:{detached:!0}}var u;function m(){if(u===void 0)u=Be(sr)(b(import.meta.url));return u}function Me(o,e=process.platform){let t=o.pid;if(e!=="win32"||t===void 0)return;let s=m();if(s?.track(t))o.once("close",()=>s.release(t))}function $e(o,e="SIGTERM",t=process.platform){if(t!=="win32"){process.kill(-o,e);return}if(e===0){process.kill(o,0);return}if(m()?.terminate(o))return;p(C("taskkill",t),["/PID",String(o),"/T","/F"],{stdio:"ignore",timeout:1e4,windowsHide:!0})}function A(o,e=63,t=process.platform){return t==="win32"||o.uid===process.getuid?.()&&(o.mode&e)===0}var N=/^(?:con|prn|aux|nul|com[0-9\u00b9\u00b2\u00b3]|lpt[0-9\u00b9\u00b2\u00b3]|conin\$|conout\$)(?:\..*)?$|:|[. ]$/i;function sn(o){return o!=="."&&o!==".."&&N.test(o)}
3
+ export{jo,fe,se,Uo,De,C,Ne,Le,Me,$e,A,sn};