@reason-machines/cli-linux-x64 0.2.456 → 0.2.458

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 (41) hide show
  1. package/bin/reason +2 -2
  2. package/bin/vm-hands/{connect-cli-k9kktr5n.js → connect-cli-ra46yt61.js} +1 -1
  3. package/bin/vm-hands/{hands-worker-source-wjsjw77t.js → hands-worker-source-v7ds6vp1.js} +1 -1
  4. package/bin/vm-hands/{local-automation-xxw9v90w.js → local-automation-d6m82hz2.js} +1 -1
  5. package/bin/vm-hands/{local-capabilities-7fmb64cw.js → local-capabilities-knfs3f4m.js} +1 -1
  6. package/bin/vm-hands/{local-display-session-z75gxcyv.js → local-display-session-12vk21q8.js} +1 -1
  7. package/bin/vm-hands/local-display-video-14s59sd2.js +2 -0
  8. package/bin/vm-hands/{local-managed-process-cw1axg5g.js → local-managed-process-9k5m126b.js} +1 -1
  9. package/bin/vm-hands/{local-pty-session-7hps89vj.js → local-pty-session-gvnfgrxt.js} +1 -1
  10. package/bin/vm-hands/{managed-runtime-8v0yc2ah.js → managed-runtime-pkxf8pm7.js} +1 -1
  11. package/bin/vm-hands/{permissions-gh72bh8t.js → permissions-qdejbe14.js} +1 -1
  12. package/bin/vm-hands/{reason-hands-protocol-45dm5s53.js → reason-hands-protocol-nkj7481a.js} +1 -1
  13. package/bin/vm-hands/{serve-service-kqg6s85c.js → serve-service-0y3w5sj5.js} +1 -1
  14. package/bin/vm-hands/{status-r4t7ped0.js → status-w4sv5pnh.js} +1 -1
  15. package/bin/vm-hands/version-wharm62x.js +2 -0
  16. package/bin/vm-hands/{vm-hands-entry-lite-0hvjszsp.js → vm-hands-entry-lite-0nxa8avm.js} +1 -1
  17. package/bin/vm-hands/{vm-hands-entry-lite-tazdhdpd.js → vm-hands-entry-lite-0x3nqyax.js} +1 -1
  18. package/bin/vm-hands/{vm-hands-entry-lite-76rbdx3m.js → vm-hands-entry-lite-1qwwtep5.js} +1 -1
  19. package/bin/vm-hands/{vm-hands-entry-lite-53wwd6rh.js → vm-hands-entry-lite-2cadk44t.js} +1 -1
  20. package/bin/vm-hands/{vm-hands-entry-lite-1e8tpz1t.js → vm-hands-entry-lite-2d4yxt6s.js} +1 -1
  21. package/bin/vm-hands/{vm-hands-entry-lite-dbk2abyq.js → vm-hands-entry-lite-9ynaxc3m.js} +1 -1
  22. package/bin/vm-hands/{vm-hands-entry-lite-499mywh7.js → vm-hands-entry-lite-b8k78r34.js} +1 -1
  23. package/bin/vm-hands/{vm-hands-entry-lite-s29b2ttf.js → vm-hands-entry-lite-g11ygjyy.js} +1 -1
  24. package/bin/vm-hands/{vm-hands-entry-lite-3adw9jw3.js → vm-hands-entry-lite-gcjjhsm2.js} +1 -1
  25. package/bin/vm-hands/{vm-hands-entry-lite-yhte7j3v.js → vm-hands-entry-lite-hg4zeyaq.js} +1 -1
  26. package/bin/vm-hands/vm-hands-entry-lite-hq5kd671.js +2 -0
  27. package/bin/vm-hands/vm-hands-entry-lite-j4kapgvr.js +2 -0
  28. package/bin/vm-hands/{vm-hands-entry-lite-g03q6h68.js → vm-hands-entry-lite-j75w7ppy.js} +5 -5
  29. package/bin/vm-hands/{vm-hands-entry-lite-6h0e1w34.js → vm-hands-entry-lite-ndbx6t33.js} +1 -1
  30. package/bin/vm-hands/{vm-hands-entry-lite-wfqfp12p.js → vm-hands-entry-lite-q6p5cnw4.js} +1 -1
  31. package/bin/vm-hands/{vm-hands-entry-lite-wngx16r5.js → vm-hands-entry-lite-r2ydfzy4.js} +1 -1
  32. package/bin/vm-hands/{vm-hands-entry-lite-yyedjn2a.js → vm-hands-entry-lite-zcjwx0jz.js} +1 -1
  33. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  34. package/bin/vm-hands/{vm-hands-executor-yd63t0gb.js → vm-hands-executor-5cfss4kk.js} +1 -1
  35. package/bin/vm-hands/{vm-hands-op-runner-fkd4kb9z.js → vm-hands-op-runner-f29wpjzc.js} +1 -1
  36. package/bin/vm-hands/{vm-hands-runtime-tw9t583e.js → vm-hands-runtime-xc4te4a4.js} +3 -3
  37. package/package.json +1 -1
  38. package/bin/vm-hands/local-display-video-d1zzmxx0.js +0 -2
  39. package/bin/vm-hands/version-nndm6t5j.js +0 -2
  40. package/bin/vm-hands/vm-hands-entry-lite-3vmhs921.js +0 -2
  41. package/bin/vm-hands/vm-hands-entry-lite-hmbpv4gs.js +0 -2
package/bin/reason CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/reason
3
- size: 90666464 bytes
4
- sha256: 1abf808d8b7abf4406255a5ed2b635888f4368bf9c9d4ce12001649db669b63f
3
+ size: 90662368 bytes
4
+ sha256: 20d114f403125d65e85f3b996b38905e30eeb2086a5fd7966a6bee22044ed842
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{tt,ss,as,cs}from"./vm-hands-entry-lite-g03q6h68.js";import"./vm-hands-entry-lite-4fwf7wgb.js";import"./vm-hands-entry-lite-cm497v4t.js";import"./vm-hands-entry-lite-n4x7reax.js";import"./vm-hands-entry-lite-9jgf223h.js";import"./vm-hands-entry-lite-tazdhdpd.js";import"./vm-hands-entry-lite-0hvjszsp.js";import"./vm-hands-entry-lite-wfqfp12p.js";import"./vm-hands-entry-lite-6h0e1w34.js";import"./vm-hands-entry-lite-499mywh7.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-njs8k65s.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-dcxvxpne.js";import"./vm-hands-entry-lite-1e8tpz1t.js";import"./vm-hands-entry-lite-53wwd6rh.js";import"./vm-hands-entry-lite-yhte7j3v.js";import"./vm-hands-entry-lite-3adw9jw3.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-dbk2abyq.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-wngx16r5.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{ss as computerDisconnected,tt as connectionDirectory,as as connectionReport,cs as restartConnection};
2
+ import{tt,ss,as,cs}from"./vm-hands-entry-lite-j75w7ppy.js";import"./vm-hands-entry-lite-4fwf7wgb.js";import"./vm-hands-entry-lite-cm497v4t.js";import"./vm-hands-entry-lite-n4x7reax.js";import"./vm-hands-entry-lite-9jgf223h.js";import"./vm-hands-entry-lite-0x3nqyax.js";import"./vm-hands-entry-lite-0nxa8avm.js";import"./vm-hands-entry-lite-q6p5cnw4.js";import"./vm-hands-entry-lite-ndbx6t33.js";import"./vm-hands-entry-lite-b8k78r34.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-njs8k65s.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-dcxvxpne.js";import"./vm-hands-entry-lite-2d4yxt6s.js";import"./vm-hands-entry-lite-2cadk44t.js";import"./vm-hands-entry-lite-hg4zeyaq.js";import"./vm-hands-entry-lite-gcjjhsm2.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-9ynaxc3m.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{ss as computerDisconnected,tt as connectionDirectory,as as connectionReport,cs as restartConnection};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{D,R,Ko,b}from"./vm-hands-entry-lite-499mywh7.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{b as REASON_HANDS_WORKER_ARTIFACT_SHA256,R as REASON_HANDS_WORKER_ENTRYPOINT,Ko as REASON_HANDS_WORKER_SOURCE,D as REASON_HANDS_WORKER_VERSION};
2
+ import{D,R,Ko,b}from"./vm-hands-entry-lite-b8k78r34.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{b as REASON_HANDS_WORKER_ARTIFACT_SHA256,R as REASON_HANDS_WORKER_ENTRYPOINT,Ko as REASON_HANDS_WORKER_SOURCE,D as REASON_HANDS_WORKER_VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{xn,As,Ps,Ts,Rs,kn}from"./vm-hands-entry-lite-1e8tpz1t.js";import"./vm-hands-entry-lite-53wwd6rh.js";import"./vm-hands-entry-lite-yhte7j3v.js";import"./vm-hands-entry-lite-3adw9jw3.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-dbk2abyq.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-wngx16r5.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{Ps as ensureLocalBrowser,xn as localAutomationAvailable,Ts as localBrowserProfile,As as localUserChromeHost,Rs as runAutomationCallLocally,kn as runLocalAutomation};
2
+ import{xn,As,Ps,Ts,Rs,kn}from"./vm-hands-entry-lite-2d4yxt6s.js";import"./vm-hands-entry-lite-2cadk44t.js";import"./vm-hands-entry-lite-hg4zeyaq.js";import"./vm-hands-entry-lite-gcjjhsm2.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-9ynaxc3m.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{Ps as ensureLocalBrowser,xn as localAutomationAvailable,Ts as localBrowserProfile,As as localUserChromeHost,Rs as runAutomationCallLocally,kn as runLocalAutomation};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{zo,Li,cn,qo,Wo,Vo,Go,vs,Ss,Es,xs}from"./vm-hands-entry-lite-0hvjszsp.js";import"./vm-hands-entry-lite-wfqfp12p.js";import"./vm-hands-entry-lite-6h0e1w34.js";import"./vm-hands-entry-lite-499mywh7.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-njs8k65s.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-dcxvxpne.js";import"./vm-hands-entry-lite-1e8tpz1t.js";import"./vm-hands-entry-lite-53wwd6rh.js";import"./vm-hands-entry-lite-yhte7j3v.js";import"./vm-hands-entry-lite-3adw9jw3.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-dbk2abyq.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-wngx16r5.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";export{r as LocalCapabilityError,zo as SHORT_REQUEST_CAPABILITIES,vs as capabilityInventoryForRoots,Li as confinedExecutionShell,qo as defaultLocalCommandRunner,Ss as deliverLocalHandsEnvironment,Go as enrolledRootPaths,xs as executeLocalOperation,Es as rebindLocalHandsControl,Wo as runFileCapability,Vo as runTransferCapability,cn as spawnCaptured};
2
+ import{zo,Li,cn,qo,Wo,Vo,Go,vs,Ss,Es,xs}from"./vm-hands-entry-lite-0nxa8avm.js";import"./vm-hands-entry-lite-q6p5cnw4.js";import"./vm-hands-entry-lite-ndbx6t33.js";import"./vm-hands-entry-lite-b8k78r34.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-njs8k65s.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-dcxvxpne.js";import"./vm-hands-entry-lite-2d4yxt6s.js";import"./vm-hands-entry-lite-2cadk44t.js";import"./vm-hands-entry-lite-hg4zeyaq.js";import"./vm-hands-entry-lite-gcjjhsm2.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-9ynaxc3m.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";export{r as LocalCapabilityError,zo as SHORT_REQUEST_CAPABILITIES,vs as capabilityInventoryForRoots,Li as confinedExecutionShell,qo as defaultLocalCommandRunner,Ss as deliverLocalHandsEnvironment,Go as enrolledRootPaths,xs as executeLocalOperation,Es as rebindLocalHandsControl,Wo as runFileCapability,Vo as runTransferCapability,cn as spawnCaptured};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Lt,Os,G,ze,Mt}from"./vm-hands-entry-lite-53wwd6rh.js";import"./vm-hands-entry-lite-yhte7j3v.js";import"./vm-hands-entry-lite-3adw9jw3.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-wngx16r5.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{ze as ensureLinuxDesktop,Lt as localDisplayAvailable,Os as localDisplayReady,G as privateDirectory,Mt as runLocalDisplayStream};
2
+ import{Lt,Os,G,ze,Mt}from"./vm-hands-entry-lite-2cadk44t.js";import"./vm-hands-entry-lite-hg4zeyaq.js";import"./vm-hands-entry-lite-gcjjhsm2.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{ze as ensureLinuxDesktop,Lt as localDisplayAvailable,Os as localDisplayReady,G as privateDirectory,Mt as runLocalDisplayStream};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{An,Pn,Tn,Rn,Cr}from"./vm-hands-entry-lite-hg4zeyaq.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{An as MAC_SCREEN,Pn as WINDOWS_SCREEN,Tn as createDisplayVideoLane,Cr as localDisplayVideoAvailable,Rn as simulatorVideoFfmpeg};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{rt,cr,ks,Cs}from"./vm-hands-entry-lite-wfqfp12p.js";import"./vm-hands-entry-lite-6h0e1w34.js";import"./vm-hands-entry-lite-499mywh7.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{rt as ManagedProcessStoppedError,ks as controlManagedDeviceProcess,Cs as retireManagedDeviceProcess,cr as runManagedDeviceProcess};
2
+ import{rt,cr,ks,Cs}from"./vm-hands-entry-lite-q6p5cnw4.js";import"./vm-hands-entry-lite-ndbx6t33.js";import"./vm-hands-entry-lite-b8k78r34.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{rt as ManagedProcessStoppedError,ks as controlManagedDeviceProcess,Cs as retireManagedDeviceProcess,cr as runManagedDeviceProcess};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Pr,Bt,Tr,Jo,On,Rr,In}from"./vm-hands-entry-lite-3adw9jw3.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{Bt as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES,Tr as LOCAL_PTY_MAX_SESSIONS,Pr as LOCAL_PTY_MAX_SESSION_MS,Rr as defaultConnect,Jo as defaultLoginShell,On as ptyRuntimeSupported,In as runLocalPtySession};
2
+ import{Pr,Bt,Tr,Jo,On,Rr,In}from"./vm-hands-entry-lite-gcjjhsm2.js";import"./vm-hands-entry-lite-1f2cam25.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{Bt as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES,Tr as LOCAL_PTY_MAX_SESSIONS,Pr as LOCAL_PTY_MAX_SESSION_MS,Rr as defaultConnect,Jo as defaultLoginShell,On as ptyRuntimeSupported,In as runLocalPtySession};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{hs,fs,ms,gs,_s,ys,bs}from"./vm-hands-entry-lite-tazdhdpd.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{_s as acquireManagedRuntimeDirectoryLock,ms as currentManagedRuntimeVersion,bs as flushManagedRuntimeLifecycleEvents,gs as isManagedRuntimeVersionExecutable,fs as legacyManagedRuntimePaths,hs as managedRuntimePaths,ys as recordManagedRuntimeLifecycle};
2
+ import{hs,fs,ms,gs,_s,ys,bs}from"./vm-hands-entry-lite-0x3nqyax.js";import"./vm-hands-entry-lite-t5q30ne0.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{_s as acquireManagedRuntimeDirectoryLock,ms as currentManagedRuntimeVersion,bs as flushManagedRuntimeLifecycleEvents,gs as isManagedRuntimeVersionExecutable,fs as legacyManagedRuntimePaths,hs as managedRuntimePaths,ys as recordManagedRuntimeLifecycle};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Xo,Yo,Fs,js}from"./vm-hands-entry-lite-wngx16r5.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{js as allowMacPermissions,Fs as permissionsSummary,Yo as readMacPermissions,Xo as reasonIdentity};
2
+ import{Xo,Yo,Fs,js}from"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{js as allowMacPermissions,Fs as permissionsSummary,Yo as readMacPermissions,Xo as reasonIdentity};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{P,Nr,Lr,Dn,lt,Nn,Mr,Ge,ve,Ln,Ke,zt,ne,Je,Mn,Se,qt,$r,Wt,Br,$n,ae,U,N,ce,Fr,jr,Bn}from"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{Br as REASON_HANDS_CLOSE_CODES,Ke as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,Mr as REASON_HANDS_JOB_MAX_INPUT_CHARS,Ge as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,ve as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,Ln as REASON_HANDS_JOB_MAX_RECORDS,Nn as REASON_HANDS_MAX_ERROR_CHARS,Nr as REASON_HANDS_MAX_FRAME_BYTES,Lr as REASON_HANDS_MAX_INPUT_CHARS,lt as REASON_HANDS_MAX_OUTPUT_CHARS,Dn as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,P as REASON_HANDS_PROTOCOL_VERSION,$r as REASON_HANDS_PTY_ANCHOR_EXIT_MS,Wt as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,qt as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,Se as REASON_HANDS_PTY_MAX_DIMENSION,ne as REASON_HANDS_PTY_MAX_INPUT_BYTES,Je as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,Mn as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,zt as REASON_HANDS_PTY_PROTOCOL_VERSION,$n as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,U as isReasonHandsGeneration,ce as isReasonHandsPtyJobId,ae as isReasonHandsRequestId,N as isReasonHandsUuid,Fr as parseReasonHandsJobRequest,jr as parseReasonHandsJobResult,Bn as parseReasonHandsPtyReceipt};
2
+ import{P,Nr,Lr,Dn,lt,Nn,Mr,Ge,ve,Ln,Ke,zt,ne,Je,Mn,Se,qt,$r,Wt,Br,$n,ae,U,N,ce,Fr,jr,Bn}from"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-r7zs4ce2.js";export{Br as REASON_HANDS_CLOSE_CODES,Ke as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,Mr as REASON_HANDS_JOB_MAX_INPUT_CHARS,Ge as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,ve as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,Ln as REASON_HANDS_JOB_MAX_RECORDS,Nn as REASON_HANDS_MAX_ERROR_CHARS,Nr as REASON_HANDS_MAX_FRAME_BYTES,Lr as REASON_HANDS_MAX_INPUT_CHARS,lt as REASON_HANDS_MAX_OUTPUT_CHARS,Dn as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,P as REASON_HANDS_PROTOCOL_VERSION,$r as REASON_HANDS_PTY_ANCHOR_EXIT_MS,Wt as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,qt as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,Se as REASON_HANDS_PTY_MAX_DIMENSION,ne as REASON_HANDS_PTY_MAX_INPUT_BYTES,Je as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,Mn as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,zt as REASON_HANDS_PTY_PROTOCOL_VERSION,$n as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,U as isReasonHandsGeneration,ce as isReasonHandsPtyJobId,ae as isReasonHandsRequestId,N as isReasonHandsUuid,Fr as parseReasonHandsJobRequest,jr as parseReasonHandsJobResult,Bn as parseReasonHandsPtyReceipt};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ur,Ee,J,jn,Ds,uo,Ns,Ze,Zo,Un,Ls,Ms,Hr,$s,Bs}from"./vm-hands-entry-lite-dbk2abyq.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{Ur as WORKER_SERVICE_ENV,J as WorkerServiceError,uo as connectServiceLabel,Ee as defaultWorkerServiceHost,Ms as installWorkerService,Ze as installedWorkerService,Ns as isConnectServiceLabel,Bs as removeWorkerService,Hr as restartWorkerService,$s as retargetWorkerServiceLogs,Zo as retireLegacyWorkerService,Ls as workerServiceDefinitionCurrent,jn as workerServiceLauncher,Un as workerServiceProcessRunning,Ds as workerServiceRetargetPending};
2
+ import{Ur,Ee,J,jn,Ds,uo,Ns,Ze,Zo,Un,Ls,Ms,Hr,$s,Bs}from"./vm-hands-entry-lite-9ynaxc3m.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-9sa1knn7.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-8j7p91hr.js";import"./vm-hands-entry-lite-em7mk9tn.js";export{Ur as WORKER_SERVICE_ENV,J as WorkerServiceError,uo as connectServiceLabel,Ee as defaultWorkerServiceHost,Ms as installWorkerService,Ze as installedWorkerService,Ns as isConnectServiceLabel,Bs as removeWorkerService,Hr as restartWorkerService,$s as retargetWorkerServiceLogs,Zo as retireLegacyWorkerService,Ls as workerServiceDefinitionCurrent,jn as workerServiceLauncher,Un as workerServiceProcessRunning,Ds as workerServiceRetargetPending};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./vm-hands-entry-lite-9jgf223h.js";import"./vm-hands-entry-lite-fcvf8md1.js";import{g}from"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-em7mk9tn.js";import"./vm-hands-entry-lite-n4x7reax.js";import{jt,ct}from"./vm-hands-entry-lite-1f2cam25.js";import{w,M,ar,Be,tt}from"./vm-hands-entry-lite-g03q6h68.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-0hvjszsp.js";import"./vm-hands-entry-lite-6h0e1w34.js";import"./vm-hands-entry-lite-hmbpv4gs.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-njs8k65s.js";import"./vm-hands-entry-lite-cm497v4t.js";import"./vm-hands-entry-lite-yhte7j3v.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-yyedjn2a.js";import"./vm-hands-entry-lite-wngx16r5.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-tazdhdpd.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-dbk2abyq.js";import"./vm-hands-entry-lite-dcxvxpne.js";import"./vm-hands-entry-lite-3vmhs921.js";import"./vm-hands-entry-lite-499mywh7.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-wfqfp12p.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-3adw9jw3.js";import"./vm-hands-entry-lite-53wwd6rh.js";import"./vm-hands-entry-lite-1e8tpz1t.js";import"./vm-hands-entry-lite-4fwf7wgb.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-t5q30ne0.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{t,o,u,i,s,n}from"./vm-hands-entry-lite-ba3qq0bs.js";import"./vm-hands-entry-lite-8j7p91hr.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}
2
+ import"./vm-hands-entry-lite-9jgf223h.js";import"./vm-hands-entry-lite-fcvf8md1.js";import{g}from"./vm-hands-entry-lite-hw26gewc.js";import"./vm-hands-entry-lite-r7zs4ce2.js";import"./vm-hands-entry-lite-em7mk9tn.js";import"./vm-hands-entry-lite-n4x7reax.js";import{jt,ct}from"./vm-hands-entry-lite-1f2cam25.js";import{w,M,ar,Be,tt}from"./vm-hands-entry-lite-j75w7ppy.js";import"./vm-hands-entry-lite-tqc2ezda.js";import"./vm-hands-entry-lite-0nxa8avm.js";import"./vm-hands-entry-lite-ndbx6t33.js";import"./vm-hands-entry-lite-hq5kd671.js";import"./vm-hands-entry-lite-a3w8m8nb.js";import"./vm-hands-entry-lite-njs8k65s.js";import"./vm-hands-entry-lite-cm497v4t.js";import"./vm-hands-entry-lite-hg4zeyaq.js";import"./vm-hands-entry-lite-jcf61cb4.js";import"./vm-hands-entry-lite-zcjwx0jz.js";import"./vm-hands-entry-lite-r2ydfzy4.js";import"./vm-hands-entry-lite-d9g1pzzx.js";import"./vm-hands-entry-lite-0x3nqyax.js";import"./vm-hands-entry-lite-3pnjdh8m.js";import"./vm-hands-entry-lite-9ynaxc3m.js";import"./vm-hands-entry-lite-dcxvxpne.js";import"./vm-hands-entry-lite-j4kapgvr.js";import"./vm-hands-entry-lite-b8k78r34.js";import"./vm-hands-entry-lite-12rzrd95.js";import"./vm-hands-entry-lite-q6p5cnw4.js";import"./vm-hands-entry-lite-g9z467dk.js";import"./vm-hands-entry-lite-gcjjhsm2.js";import"./vm-hands-entry-lite-2cadk44t.js";import"./vm-hands-entry-lite-2d4yxt6s.js";import"./vm-hands-entry-lite-4fwf7wgb.js";import"./vm-hands-entry-lite-dh8f2h2d.js";import"./vm-hands-entry-lite-t5q30ne0.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{t,o,u,i,s,n}from"./vm-hands-entry-lite-ba3qq0bs.js";import"./vm-hands-entry-lite-8j7p91hr.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
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
4
 
5
5
  Usage:
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{gt}from"./vm-hands-entry-lite-hq5kd671.js";export{gt as CLI_VERSION};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{at,Dt,xr,bn,kr,vn,Sn,En}from"./vm-hands-entry-lite-dcxvxpne.js";import{Pe,rr,Xn,_t,Io,oe,Do,No,Qe,Te,en,Qn,wt,ni,ii,oi,si,ai,ci,li,ui,di,pi,hi,fi,mi,pe,Y,Re,q,gi,_i,yi,wi,bi,vi,Si,Ei,bt,xi}from"./vm-hands-entry-lite-tqc2ezda.js";import{ue,Z,O}from"./vm-hands-entry-lite-r7zs4ce2.js";import{P,zt}from"./vm-hands-entry-lite-3vmhs921.js";import{lr,ji,Ui,nt,Hi,zi,qi,Wi,Vi,Gi,pr,hr,fr,dn,pn,mr,Ji,hn,gr,me,ge,Pt,_r,wr,Tt}from"./vm-hands-entry-lite-6h0e1w34.js";import{D,R,b}from"./vm-hands-entry-lite-499mywh7.js";import{Mi,$i,ln,Bi,un,Fi,rt,cr}from"./vm-hands-entry-lite-wfqfp12p.js";import{K}from"./vm-hands-entry-lite-d9g1pzzx.js";import{He}from"./vm-hands-entry-lite-a3w8m8nb.js";import{j}from"./vm-hands-entry-lite-1f2cam25.js";import{vr,_n,to}from"./vm-hands-entry-lite-njs8k65s.js";import{yo,wo,ht,bo,vo,So,Eo,xo}from"./vm-hands-entry-lite-jcf61cb4.js";import{Pr,Bt,Tr,On,In}from"./vm-hands-entry-lite-3adw9jw3.js";import{Lt,ze,Mt}from"./vm-hands-entry-lite-53wwd6rh.js";import{Rn,x,so}from"./vm-hands-entry-lite-yhte7j3v.js";import{go,_o}from"./vm-hands-entry-lite-wngx16r5.js";import{Nt,xn,kn}from"./vm-hands-entry-lite-1e8tpz1t.js";import{ye,Xi,Yi}from"./vm-hands-entry-lite-dh8f2h2d.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";import{It}from"./vm-hands-entry-lite-2yz6b0n3.js";import{ke,Kt,Jt,Zt,E}from"./vm-hands-entry-lite-qyp2a4c3.js";import{a,ie}from"./vm-hands-entry-lite-9sa1knn7.js";import{t,k,o,d,u,i,W,_,ee,s,n,$o}from"./vm-hands-entry-lite-ba3qq0bs.js";import{fe,Ne,Le,Me,nn}from"./vm-hands-entry-lite-8j7p91hr.js";import{$e}from"./vm-hands-entry-lite-mcjca0ez.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{request as kl}from"http";import{request as Tl}from"https";import{lookup as Dl}from"dns/promises";import{isIP as Nl}from"net";async function Ml(e){let l=new URL(e.url);return await new Promise((c,p)=>{let m=(l.protocol==="https:"?Tl:kl)(l,{method:"POST",headers:{...e.headers,"accept-encoding":"identity"},signal:e.signal,timeout:bn},(f)=>c({response:f,close:()=>{f.destroy(),m.destroy(),f.socket?.destroy()}}));m.once("error",p),m.once("timeout",()=>m.destroy(Object.assign(Error("custom_endpoint_timeout"),{code:"ETIMEDOUT"}))),m.end(e.body)})}var Qi=new Set(["ENOTFOUND","EAI_AGAIN","EAI_NONAME","EAI_NODATA","EAI_FAIL","DNSException"]),$l=new Set(["ECONNREFUSED","ETIMEDOUT","ECONNRESET","EHOSTUNREACH","ENETUNREACH","EHOSTDOWN","ENETDOWN","EPIPE","ECONNABORTED","EADDRNOTAVAIL","ConnectionRefused","ConnectionClosed","ConnectionTimedOut","Timeout"]);function es(e,l=0){if(!e||typeof e!=="object"||l>3)return null;let c=e.code;if(typeof c==="string"){if(Qi.has(c))return"custom_endpoint_host_not_found";if($l.has(c))return"custom_endpoint_connection_failed";if(/^(?:ERR_TLS_|ERR_SSL_|CERT_|UNABLE_TO_(?:GET|VERIFY|DECRYPT)|DEPTH_ZERO_SELF_SIGNED|SELF_SIGNED_CERT|HOSTNAME_MISMATCH|EPROTO$)/.test(c))return"custom_endpoint_tls_failed"}for(let p of[...e instanceof AggregateError?e.errors:[],e.cause]){let m=es(p,l+1);if(m)return m}return null}async function Bl(e,l){let c=es(e),p=new URL(l).hostname.replace(/^\[|\]$/g,"");if(c!==null&&c!=="custom_endpoint_connection_failed"||Nl(p)!==0)return c;let m;return await Promise.race([Dl(p).then(()=>!0,(h)=>!Qi.has(String(h?.code))),new Promise((h)=>{m=setTimeout(()=>h(!0),5000)})]).finally(()=>clearTimeout(m))?c:"custom_endpoint_host_not_found"}function Fl(e){for(let l=42;;l++){if(l===127)l=256;let c=String.fromCodePoint(l);if(!e.includes(c))return c}}function Ul(e,l){let c=Buffer.from(e),p=Buffer.from(l),m=new Uint32Array(c.length);for(let h=1,y=0;h<c.length;h++){while(y&&c[h]!==c[y])y=m[y-1];if(c[h]===c[y])y++;m[h]=y}let f=0;return(h,y=!1)=>{let S=Buffer.allocUnsafe(h.length*p.length+f),w=0;for(let g of h){while(f&&c[f]!==g){let v=m[f-1];w+=c.copy(S,w,0,f-v),f=v}if(c[f]===g){if(f++,f===c.length)w+=p.copy(S,w),f=0}else S[w++]=g}if(y)w+=c.copy(S,w,0,f),f=0;return S.subarray(0,w)}}async function ts(e){e.signal.throwIfAborted();let l=vn.safeParse(e.payload);if(!l.success)throw new r("custom_endpoint_invalid_request","Invalid local model request.");let c=l.data,p=Sn.parse(await e.credential(e.signal));if(!kr(c,{baseUrl:c.baseUrl,api:p.api,execution:"device"}))throw new r("custom_endpoint_invalid_request","The request does not match the configured API.");e.signal.throwIfAborted();let m,f,h=0,y=0,S=0,w=Fl(p.apiKey),g=Ul(p.apiKey,w),v=async(I,A)=>{e.signal.throwIfAborted(),await new Promise((M,N)=>{let L=()=>{e.signal.removeEventListener("abort",L),N(e.signal.reason)};if(e.signal.addEventListener("abort",L,{once:!0}),e.signal.aborted){L();return}Promise.resolve().then(()=>(e.signal.throwIfAborted(),e.emit(I,A))).then(()=>{e.signal.removeEventListener("abort",L),M()},(B)=>{e.signal.removeEventListener("abort",L),N(B)})})},C=async(I)=>{if(h+=I.length,h>Dt)throw new r("custom_endpoint_response_too_large","Local model response exceeds the transport limit.");for(let A=0;A<I.length;A+=at){if(S>=xr)throw new r("custom_endpoint_response_too_large","Local model response exceeds the chunk limit.");await v(`custom_endpoint.chunk.${S++}`,{eof:!1,data:I.subarray(A,A+at).toString("base64")})}};try{let I=await Ml({url:c.url,body:c.body,signal:e.signal,headers:{...c.headers,...p.api==="anthropic-messages"?{"x-api-key":p.apiKey}:{authorization:`Bearer ${p.apiKey}`}}});m=I.response,f=I.close;let A=m.statusCode??500;if(A>=300&&A<400)throw new r("custom_endpoint_redirect_refused","Local model redirects are not followed.");if(m.headers["content-encoding"]&&m.headers["content-encoding"]!=="identity")throw new r("custom_endpoint_encoding_unsupported","The local server must honor identity encoding.");let M={};for(let N of["content-type","retry-after","x-request-id","request-id"]){let L=m.headers[N];if(typeof L==="string")M[N]=L.replaceAll(p.apiKey,w).slice(0,4096)}await v("custom_endpoint.headers",{status:A,statusText:(m.statusMessage??"").replaceAll(p.apiKey,w).slice(0,256),headers:M});for await(let N of m){e.signal.throwIfAborted();let L=Buffer.isBuffer(N)?N:Buffer.from(N);if(y+=L.length,y>Dt)throw new r("custom_endpoint_response_too_large","Local model response exceeds the transport limit.");await C(g(L))}return await C(g(Buffer.alloc(0),!0)),await v(`custom_endpoint.chunk.${S}`,{eof:!0}),{bytes:h,chunks:S}}catch(I){if(e.signal.throwIfAborted(),I instanceof r)throw I;throw new r((m?null:await Bl(I,c.url))??"custom_endpoint_request_failed","The local model server could not complete the request.")}finally{f?.()}}import{join as rs}from"path";function Hl(e,l){return e===rs(l,".ara","workspace")||e===rs(l,".reason","workspace")}function ns(e,l){let c=e.filter((p)=>Hl(p.path,l));return c.length===1?c[0].path:null}var jl=/^[a-f0-9]{64}$/;var on=32,ql=/^\/[^\x00-\x1f\x7f\\]*$/;function Er(e){if(typeof e!=="string"||e.length>4096||!ql.test(e))return!1;if(e==="/")return!0;return e.split("/").slice(1).every((l)=>l!==""&&l!=="."&&l!=="..")}function Cr(e,l){let c=l==="win32"?/^([A-Za-z]):[\\/]*(.*)$/.exec(e):null;if(!c)return e;let p=c[2].split(/[\\/]+/).filter(Boolean).join("/");return`/${c[1].toUpperCase()}:${p?`/${p}`:""}`}function sn(e){if(!e||typeof e!=="object"||Array.isArray(e))return;let l=e;if(!Er(l.home)||!Array.isArray(l.roots)||l.roots.length>on)return;let c=[];for(let p of l.roots){if(!p||typeof p!=="object"||Array.isArray(p))return;let{path_fingerprint:m,path:f}=p;if(typeof m!=="string"||!jl.test(m)||!Er(f))return;c.push({path_fingerprint:m,path:f})}return{home:l.home,roots:c}}function Wl(e){let l=/^Reason contributor (rc_[0-9a-f]{32})$/.exec(e.name)?.[1];return e.email.toLowerCase()==="343777287+reason-contributors@users.noreply.github.com"&&l?l:void 0}function zl(e){return Wl(e)??e.email.toLowerCase()}function mn(e){let l=/^Co-authored-by:\s*([^<>\r\n]+) <([^<>\s]+)>$/i.exec(e.trim());return l?zl({name:l[1],email:l[2]}):e.trim().toLowerCase()}var jt=(e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/[a-z]/gi,(l)=>`[${l.toLowerCase()}${l.toUpperCase()}]`),Gl=[...ke.map((e)=>`/(${e.map(jt).join("/")})(/|$)`),...Kt.map((e)=>`/(${e.map(jt).join("/")})(/|$)`),...[...Jt].map((e)=>`/(${jt(e)})$`),`/${jt(".env.")}[^/]*$`,...Zt.map((e)=>`/[^/]*${jt(e)}$`)],os=`function localGithubSandboxProfile(root, temporary) {
2
+ import{at,Dt,xr,bn,kr,vn,Sn,En}from"./vm-hands-entry-lite-dcxvxpne.js";import{Pe,rr,Xn,_t,Io,oe,Do,No,Qe,Te,en,Qn,wt,ni,ii,oi,si,ai,ci,li,ui,di,pi,hi,fi,mi,pe,Y,Re,q,gi,_i,yi,wi,bi,vi,Si,Ei,bt,xi}from"./vm-hands-entry-lite-tqc2ezda.js";import{ue,Z,O}from"./vm-hands-entry-lite-r7zs4ce2.js";import{P,zt}from"./vm-hands-entry-lite-j4kapgvr.js";import{lr,ji,Ui,nt,Hi,zi,qi,Wi,Vi,Gi,pr,hr,fr,dn,pn,mr,Ji,hn,gr,me,ge,Pt,_r,wr,Tt}from"./vm-hands-entry-lite-ndbx6t33.js";import{D,R,b}from"./vm-hands-entry-lite-b8k78r34.js";import{Mi,$i,ln,Bi,un,Fi,rt,cr}from"./vm-hands-entry-lite-q6p5cnw4.js";import{K}from"./vm-hands-entry-lite-d9g1pzzx.js";import{He}from"./vm-hands-entry-lite-a3w8m8nb.js";import{j}from"./vm-hands-entry-lite-1f2cam25.js";import{vr,_n,to}from"./vm-hands-entry-lite-njs8k65s.js";import{yo,wo,ht,bo,vo,So,Eo,xo}from"./vm-hands-entry-lite-jcf61cb4.js";import{Pr,Bt,Tr,On,In}from"./vm-hands-entry-lite-gcjjhsm2.js";import{Lt,ze,Mt}from"./vm-hands-entry-lite-2cadk44t.js";import{Rn,x,so}from"./vm-hands-entry-lite-hg4zeyaq.js";import{go,_o}from"./vm-hands-entry-lite-r2ydfzy4.js";import{Nt,xn,kn}from"./vm-hands-entry-lite-2d4yxt6s.js";import{ye,Xi,Yi}from"./vm-hands-entry-lite-dh8f2h2d.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";import{It}from"./vm-hands-entry-lite-2yz6b0n3.js";import{ke,Kt,Jt,Zt,E}from"./vm-hands-entry-lite-qyp2a4c3.js";import{a,ie}from"./vm-hands-entry-lite-9sa1knn7.js";import{t,k,o,d,u,i,W,_,ee,s,n,$o}from"./vm-hands-entry-lite-ba3qq0bs.js";import{fe,Ne,Le,Me,nn}from"./vm-hands-entry-lite-8j7p91hr.js";import{$e}from"./vm-hands-entry-lite-mcjca0ez.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{request as kl}from"http";import{request as Tl}from"https";import{lookup as Dl}from"dns/promises";import{isIP as Nl}from"net";async function Ml(e){let l=new URL(e.url);return await new Promise((c,p)=>{let m=(l.protocol==="https:"?Tl:kl)(l,{method:"POST",headers:{...e.headers,"accept-encoding":"identity"},signal:e.signal,timeout:bn},(f)=>c({response:f,close:()=>{f.destroy(),m.destroy(),f.socket?.destroy()}}));m.once("error",p),m.once("timeout",()=>m.destroy(Object.assign(Error("custom_endpoint_timeout"),{code:"ETIMEDOUT"}))),m.end(e.body)})}var Qi=new Set(["ENOTFOUND","EAI_AGAIN","EAI_NONAME","EAI_NODATA","EAI_FAIL","DNSException"]),$l=new Set(["ECONNREFUSED","ETIMEDOUT","ECONNRESET","EHOSTUNREACH","ENETUNREACH","EHOSTDOWN","ENETDOWN","EPIPE","ECONNABORTED","EADDRNOTAVAIL","ConnectionRefused","ConnectionClosed","ConnectionTimedOut","Timeout"]);function es(e,l=0){if(!e||typeof e!=="object"||l>3)return null;let c=e.code;if(typeof c==="string"){if(Qi.has(c))return"custom_endpoint_host_not_found";if($l.has(c))return"custom_endpoint_connection_failed";if(/^(?:ERR_TLS_|ERR_SSL_|CERT_|UNABLE_TO_(?:GET|VERIFY|DECRYPT)|DEPTH_ZERO_SELF_SIGNED|SELF_SIGNED_CERT|HOSTNAME_MISMATCH|EPROTO$)/.test(c))return"custom_endpoint_tls_failed"}for(let p of[...e instanceof AggregateError?e.errors:[],e.cause]){let m=es(p,l+1);if(m)return m}return null}async function Bl(e,l){let c=es(e),p=new URL(l).hostname.replace(/^\[|\]$/g,"");if(c!==null&&c!=="custom_endpoint_connection_failed"||Nl(p)!==0)return c;let m;return await Promise.race([Dl(p).then(()=>!0,(h)=>!Qi.has(String(h?.code))),new Promise((h)=>{m=setTimeout(()=>h(!0),5000)})]).finally(()=>clearTimeout(m))?c:"custom_endpoint_host_not_found"}function Fl(e){for(let l=42;;l++){if(l===127)l=256;let c=String.fromCodePoint(l);if(!e.includes(c))return c}}function Ul(e,l){let c=Buffer.from(e),p=Buffer.from(l),m=new Uint32Array(c.length);for(let h=1,y=0;h<c.length;h++){while(y&&c[h]!==c[y])y=m[y-1];if(c[h]===c[y])y++;m[h]=y}let f=0;return(h,y=!1)=>{let S=Buffer.allocUnsafe(h.length*p.length+f),w=0;for(let g of h){while(f&&c[f]!==g){let v=m[f-1];w+=c.copy(S,w,0,f-v),f=v}if(c[f]===g){if(f++,f===c.length)w+=p.copy(S,w),f=0}else S[w++]=g}if(y)w+=c.copy(S,w,0,f),f=0;return S.subarray(0,w)}}async function ts(e){e.signal.throwIfAborted();let l=vn.safeParse(e.payload);if(!l.success)throw new r("custom_endpoint_invalid_request","Invalid local model request.");let c=l.data,p=Sn.parse(await e.credential(e.signal));if(!kr(c,{baseUrl:c.baseUrl,api:p.api,execution:"device"}))throw new r("custom_endpoint_invalid_request","The request does not match the configured API.");e.signal.throwIfAborted();let m,f,h=0,y=0,S=0,w=Fl(p.apiKey),g=Ul(p.apiKey,w),v=async(I,A)=>{e.signal.throwIfAborted(),await new Promise((M,N)=>{let L=()=>{e.signal.removeEventListener("abort",L),N(e.signal.reason)};if(e.signal.addEventListener("abort",L,{once:!0}),e.signal.aborted){L();return}Promise.resolve().then(()=>(e.signal.throwIfAborted(),e.emit(I,A))).then(()=>{e.signal.removeEventListener("abort",L),M()},(B)=>{e.signal.removeEventListener("abort",L),N(B)})})},C=async(I)=>{if(h+=I.length,h>Dt)throw new r("custom_endpoint_response_too_large","Local model response exceeds the transport limit.");for(let A=0;A<I.length;A+=at){if(S>=xr)throw new r("custom_endpoint_response_too_large","Local model response exceeds the chunk limit.");await v(`custom_endpoint.chunk.${S++}`,{eof:!1,data:I.subarray(A,A+at).toString("base64")})}};try{let I=await Ml({url:c.url,body:c.body,signal:e.signal,headers:{...c.headers,...p.api==="anthropic-messages"?{"x-api-key":p.apiKey}:{authorization:`Bearer ${p.apiKey}`}}});m=I.response,f=I.close;let A=m.statusCode??500;if(A>=300&&A<400)throw new r("custom_endpoint_redirect_refused","Local model redirects are not followed.");if(m.headers["content-encoding"]&&m.headers["content-encoding"]!=="identity")throw new r("custom_endpoint_encoding_unsupported","The local server must honor identity encoding.");let M={};for(let N of["content-type","retry-after","x-request-id","request-id"]){let L=m.headers[N];if(typeof L==="string")M[N]=L.replaceAll(p.apiKey,w).slice(0,4096)}await v("custom_endpoint.headers",{status:A,statusText:(m.statusMessage??"").replaceAll(p.apiKey,w).slice(0,256),headers:M});for await(let N of m){e.signal.throwIfAborted();let L=Buffer.isBuffer(N)?N:Buffer.from(N);if(y+=L.length,y>Dt)throw new r("custom_endpoint_response_too_large","Local model response exceeds the transport limit.");await C(g(L))}return await C(g(Buffer.alloc(0),!0)),await v(`custom_endpoint.chunk.${S}`,{eof:!0}),{bytes:h,chunks:S}}catch(I){if(e.signal.throwIfAborted(),I instanceof r)throw I;throw new r((m?null:await Bl(I,c.url))??"custom_endpoint_request_failed","The local model server could not complete the request.")}finally{f?.()}}import{join as rs}from"path";function Hl(e,l){return e===rs(l,".ara","workspace")||e===rs(l,".reason","workspace")}function ns(e,l){let c=e.filter((p)=>Hl(p.path,l));return c.length===1?c[0].path:null}var jl=/^[a-f0-9]{64}$/;var on=32,ql=/^\/[^\x00-\x1f\x7f\\]*$/;function Er(e){if(typeof e!=="string"||e.length>4096||!ql.test(e))return!1;if(e==="/")return!0;return e.split("/").slice(1).every((l)=>l!==""&&l!=="."&&l!=="..")}function Cr(e,l){let c=l==="win32"?/^([A-Za-z]):[\\/]*(.*)$/.exec(e):null;if(!c)return e;let p=c[2].split(/[\\/]+/).filter(Boolean).join("/");return`/${c[1].toUpperCase()}:${p?`/${p}`:""}`}function sn(e){if(!e||typeof e!=="object"||Array.isArray(e))return;let l=e;if(!Er(l.home)||!Array.isArray(l.roots)||l.roots.length>on)return;let c=[];for(let p of l.roots){if(!p||typeof p!=="object"||Array.isArray(p))return;let{path_fingerprint:m,path:f}=p;if(typeof m!=="string"||!jl.test(m)||!Er(f))return;c.push({path_fingerprint:m,path:f})}return{home:l.home,roots:c}}function Wl(e){let l=/^Reason contributor (rc_[0-9a-f]{32})$/.exec(e.name)?.[1];return e.email.toLowerCase()==="343777287+reason-contributors@users.noreply.github.com"&&l?l:void 0}function zl(e){return Wl(e)??e.email.toLowerCase()}function mn(e){let l=/^Co-authored-by:\s*([^<>\r\n]+) <([^<>\s]+)>$/i.exec(e.trim());return l?zl({name:l[1],email:l[2]}):e.trim().toLowerCase()}var jt=(e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/[a-z]/gi,(l)=>`[${l.toLowerCase()}${l.toUpperCase()}]`),Gl=[...ke.map((e)=>`/(${e.map(jt).join("/")})(/|$)`),...Kt.map((e)=>`/(${e.map(jt).join("/")})(/|$)`),...[...Jt].map((e)=>`/(${jt(e)})$`),`/${jt(".env.")}[^/]*$`,...Zt.map((e)=>`/[^/]*${jt(e)}$`)],os=`function localGithubSandboxProfile(root, temporary) {
3
3
  return ['(version 1)','(deny default)','(import "system.sb")','(allow process-exec process-fork)',
4
4
  '(allow file-read* (subpath "/bin") (subpath "/sbin") (subpath "/usr/bin") (subpath "/usr/sbin") (subpath "/usr/libexec") (subpath "/usr/share") (subpath "/private/var/select") (literal "/private/var/db/xcode_select_link"))',
5
5
  '(allow file-read-metadata (path-ancestors "/opt/homebrew/bin") (path-ancestors "/usr/local/bin") (path-ancestors "/Library/Developer/CommandLineTools"))',
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{Kr}from"./vm-hands-entry-lite-yyedjn2a.js";import{ut}from"./vm-hands-entry-lite-3rwtqr28.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{A}from"./vm-hands-entry-lite-8j7p91hr.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=Kr(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 hs(e={}){if((e.platform??process.platform)!=="darwin")throw new ut("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 fs(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 ms(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 gs(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 _s(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)}
2
+ import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{Kr}from"./vm-hands-entry-lite-zcjwx0jz.js";import{ut}from"./vm-hands-entry-lite-3rwtqr28.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{A}from"./vm-hands-entry-lite-8j7p91hr.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=Kr(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 hs(e={}){if((e.platform??process.platform)!=="darwin")throw new ut("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 fs(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 ms(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 gs(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 _s(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
3
  `,{mode:384,flag:"wx"}),t!==null)L(c(o,C),`flock
4
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 ut("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 ys(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 ut("invalid_lifecycle_event","Managed runtime lifecycle event is invalid.");return k(e.lifecycleEvents),Re(c(e.lifecycleEvents,Be(r)),`${JSON.stringify(r)}
5
5
  `),Ge(e),r}async function bs(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{hs,fs,ms,gs,_s,ys,bs};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var Yt={name:"github-native-engineer-device-worker-production",version:"0.2.456",private:!0,type:"module",engines:{node:">=22",bun:">=1.3.0"},workspaces:["../../packages/runtime-distribution"],dependencies:{"@anthropic-ai/sandbox-runtime":"^0.0.73","@earendil-works/pi-tui":"1.0.0","@modelcontextprotocol/sdk":"^1.29.0","@reason/runtime-distribution":"workspace:*","playwright-core":"1.60.0",zod:"^4.4.3"},overrides:{"@hono/node-server":"^1.19.15","@earendil-works/pi-agent-core":"1.0.0","@earendil-works/pi-ai":"1.0.0","@earendil-works/pi-coding-agent":"1.0.0","@earendil-works/chord":"1.0.0","@earendil-works/pi-codemode":"1.0.0","@earendil-works/pi-mcp":"1.0.0","@earendil-works/pi-telemetry":"1.0.0","@earendil-works/pi-tui":"1.0.0","brace-expansion":"2.1.7",axios:"^1.20.0","basic-ftp":"^6.2.1","@grpc/grpc-js":"^1.14.5",browserslist:"^4.28.8","engine.io":"^6.6.7","fast-uri":"^3.1.8",hono:"^4.13.7","ip-address":"^10.7.1",nanoid:"^3.3.18",dompurify:"^3.4.17",postcss:"^8.5.23",qs:"^6.16.0","shell-quote":"^1.11.0","socket.io-parser":"^4.2.7",tmp:"^0.2.7",toml:"^4.2.0",undici:"^8.10.2",ws:"^8.21.0","js-yaml":"^4.3.2","@modelcontextprotocol/sdk":"^1.31.0","proxy-addr":"^2.0.8","source-map-js":"^1.2.2"}};
2
+ var Yt={name:"github-native-engineer-device-worker-production",version:"0.2.458",private:!0,type:"module",engines:{node:">=22",bun:">=1.3.0"},workspaces:["../../packages/runtime-distribution"],dependencies:{"@anthropic-ai/sandbox-runtime":"^0.0.73","@earendil-works/pi-tui":"1.0.0","@modelcontextprotocol/sdk":"^1.29.0","@reason/runtime-distribution":"workspace:*","playwright-core":"1.60.0",zod:"^4.4.3"},overrides:{"@hono/node-server":"^1.19.15","@earendil-works/pi-agent-core":"1.0.0","@earendil-works/pi-ai":"1.0.0","@earendil-works/pi-coding-agent":"1.0.0","@earendil-works/chord":"1.0.0","@earendil-works/pi-codemode":"1.0.0","@earendil-works/pi-mcp":"1.0.0","@earendil-works/pi-telemetry":"1.0.0","@earendil-works/pi-tui":"1.0.0","brace-expansion":"2.1.7",axios:"^1.20.0","basic-ftp":"^6.2.1","@grpc/grpc-js":"^1.14.5",browserslist:"^4.28.8","engine.io":"^6.6.7","fast-uri":"^3.1.8",hono:"^4.13.7","ip-address":"^10.7.1",nanoid:"^3.3.18",dompurify:"^3.4.17",postcss:"^8.5.23",qs:"^6.16.0","shell-quote":"^1.11.0","socket.io-parser":"^4.2.7",tmp:"^0.2.7",toml:"^4.2.0",undici:"^8.10.2",ws:"^8.21.0","js-yaml":"^4.3.2","@modelcontextprotocol/sdk":"^1.31.0","proxy-addr":"^2.0.8","source-map-js":"^1.2.2"}};
3
3
  export{Yt};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Wn,ko,Gt}from"./vm-hands-entry-lite-jcf61cb4.js";import{Cn,We,oo,An,Pn,Tn,Cr,x}from"./vm-hands-entry-lite-yhte7j3v.js";import{Et}from"./vm-hands-entry-lite-g9z467dk.js";import{Rr}from"./vm-hands-entry-lite-3adw9jw3.js";import{j}from"./vm-hands-entry-lite-1f2cam25.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as z,spawn as H}from"child_process";import{randomBytes as he}from"crypto";import{chmodSync as Qe,existsSync as I,lstatSync as _e,mkdirSync as De,readFileSync as we,rmSync as ee,writeFileSync as U}from"fs";import{connect as Re}from"net";import{join as y}from"path";var P=32,w=76;var B="./desktop-wallpaper-0pjhgyfk.jpg";var O="./dock-browser-afp005mt.png";var F="./dock-files-rywdm96b.png";var k="./dock-terminal-s41cj1jp.png";var K=`# Sets the X root window background and _XROOTPMAP_ID, as feh --bg-fill does.
2
+ import{Wn,ko,Gt}from"./vm-hands-entry-lite-jcf61cb4.js";import{Cn,We,oo,An,Pn,Tn,Cr,x}from"./vm-hands-entry-lite-hg4zeyaq.js";import{Et}from"./vm-hands-entry-lite-g9z467dk.js";import{Rr}from"./vm-hands-entry-lite-gcjjhsm2.js";import{j}from"./vm-hands-entry-lite-1f2cam25.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as z,spawn as H}from"child_process";import{randomBytes as he}from"crypto";import{chmodSync as Qe,existsSync as I,lstatSync as _e,mkdirSync as De,readFileSync as we,rmSync as ee,writeFileSync as U}from"fs";import{connect as Re}from"net";import{join as y}from"path";var P=32,w=76;var B="./desktop-wallpaper-0pjhgyfk.jpg";var O="./dock-browser-afp005mt.png";var F="./dock-files-rywdm96b.png";var k="./dock-terminal-s41cj1jp.png";var K=`# Sets the X root window background and _XROOTPMAP_ID, as feh --bg-fill does.
3
3
  # The native Blaxel image ships no feh, hsetroot or compositor, but it does ship
4
4
  # python3-gi and libX11. tint2 reads _XROOTPMAP_ID to draw its transparent panel.
5
5
  # Usage: DISPLAY=:99 python3 set-root-wallpaper.py IMAGE
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{qe,io,F,We,$t,Ar,x}from"./vm-hands-entry-lite-yhte7j3v.js";import{K}from"./vm-hands-entry-lite-d9g1pzzx.js";import{ft}from"./vm-hands-entry-lite-jcf61cb4.js";import{mt}from"./vm-hands-entry-lite-yyedjn2a.js";import{Gr}from"./vm-hands-entry-lite-wngx16r5.js";import{Et,Oi}from"./vm-hands-entry-lite-g9z467dk.js";import{G,ze}from"./vm-hands-entry-lite-53wwd6rh.js";import{Ee,jn}from"./vm-hands-entry-lite-dbk2abyq.js";import{bt}from"./vm-hands-entry-lite-tqc2ezda.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{C}from"./vm-hands-entry-lite-8j7p91hr.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{spawn as R,spawnSync as it}from"child_process";import{createHash as st,randomUUID as ge}from"crypto";import{closeSync as at,copyFileSync as ae,existsSync as M,fstatSync as ct,mkdirSync as ce,openSync as lt,readdirSync as U,readFileSync as X,readlinkSync as ut,renameSync as he,rmSync as dt,statSync as pt,writeFileSync as gt}from"fs";import{connect as ht}from"net";import{tmpdir as L,userInfo as we}from"os";import{basename as le,delimiter as wt,dirname as B,join as f}from"path";var z=`import { spawn, execFileSync } from "node:child_process";
2
+ import{qe,io,F,We,$t,Ar,x}from"./vm-hands-entry-lite-hg4zeyaq.js";import{K}from"./vm-hands-entry-lite-d9g1pzzx.js";import{ft}from"./vm-hands-entry-lite-jcf61cb4.js";import{mt}from"./vm-hands-entry-lite-zcjwx0jz.js";import{Gr}from"./vm-hands-entry-lite-r2ydfzy4.js";import{Et,Oi}from"./vm-hands-entry-lite-g9z467dk.js";import{G,ze}from"./vm-hands-entry-lite-2cadk44t.js";import{Ee,jn}from"./vm-hands-entry-lite-9ynaxc3m.js";import{bt}from"./vm-hands-entry-lite-tqc2ezda.js";import{a}from"./vm-hands-entry-lite-9sa1knn7.js";import{C}from"./vm-hands-entry-lite-8j7p91hr.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{spawn as R,spawnSync as it}from"child_process";import{createHash as st,randomUUID as ge}from"crypto";import{closeSync as at,copyFileSync as ae,existsSync as M,fstatSync as ct,mkdirSync as ce,openSync as lt,readdirSync as U,readFileSync as X,readlinkSync as ut,renameSync as he,rmSync as dt,statSync as pt,writeFileSync as gt}from"fs";import{connect as ht}from"net";import{tmpdir as L,userInfo as we}from"os";import{basename as le,delimiter as wt,dirname as B,join as f}from"path";var z=`import { spawn, execFileSync } from "node:child_process";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { readFileSync, readlinkSync, lstatSync, realpathSync, statSync, mkdtempSync, mkdirSync, chmodSync, writeFileSync, readdirSync, rmSync, openSync, readSync, closeSync, renameSync } from "node:fs";
5
5
  import { tmpdir } from "node:os";
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{g}from"./vm-hands-entry-lite-hw26gewc.js";import{zr,Hn,qr,zn}from"./vm-hands-entry-lite-3pnjdh8m.js";import{Jn,Xt,To}from"./vm-hands-entry-lite-yyedjn2a.js";import{C}from"./vm-hands-entry-lite-8j7p91hr.js";import{spawnSync as v}from"child_process";import{createHash as ke,randomUUID as Se}from"crypto";import{chmodSync as we,existsSync as P,mkdirSync as $e,readdirSync as Ve,readFileSync as k,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as p}from"path";import{spawnSync as de}from"child_process";import{readFileSync as me}from"fs";import{userInfo as D}from"os";import{join as fe}from"path";var ge="REASON_SCHEDULED_TASK";function H(r){return fe(r,"AppData","Local","Reason","Tasks")}function w(r){if(/[\0-\x1f\x7f"%]/.test(r))throw Error(`A background task cannot use a value with a double quote, percent sign or control character: ${r}`);return`'${r.replace(/['\u2018\u2019\u201a\u201b]/g,"$&$&")}'`}function M(r){if(!/^[A-Za-z0-9._-]+$/.test(r))throw Error(`Invalid Windows Scheduled Task name: ${r}`);return`$env:${ge}=${w(r)};`}function K(r){let e=Object.entries(r.environment).map(([t,i])=>{if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw Error(`Invalid Windows Scheduled Task environment name: ${t}`);return`$env:${t}=${w(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(w).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${w(r.log)} -Value $_.ToString() -Encoding UTF8 }; $c=$LASTEXITCODE;`;return[M(r.name),...e,"$ErrorActionPreference='Continue';",r.keepAlive?`do { ${n} if ($c) { Start-Sleep -Seconds 10 } } while ($c)`:`${n} exit $c`].join(" ")}function I(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function pe(){let r=process.env.USERDOMAIN?.trim();return r?`${r}\\${D().username}`:D().username}function U(r){let e=I(r.user??pe()),n=r.schedule==="logon",t=r.schedule==="logon"?`<LogonTrigger><Enabled>true</Enabled><UserId>${e}</UserId></LogonTrigger>`:`<TimeTrigger><Repetition><Interval>PT${r.schedule.everyMinutes}M</Interval><StopAtDurationEnd>false</StopAtDurationEnd></Repetition><StartBoundary>2026-01-01T00:00:00</StartBoundary><Enabled>true</Enabled></TimeTrigger>`,i=`-NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -Command "${r.script}"`;return`<?xml version="1.0" encoding="UTF-16"?>
2
+ import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{g}from"./vm-hands-entry-lite-hw26gewc.js";import{zr,Hn,qr,zn}from"./vm-hands-entry-lite-3pnjdh8m.js";import{Jn,Xt,To}from"./vm-hands-entry-lite-zcjwx0jz.js";import{C}from"./vm-hands-entry-lite-8j7p91hr.js";import{spawnSync as v}from"child_process";import{createHash as ke,randomUUID as Se}from"crypto";import{chmodSync as we,existsSync as P,mkdirSync as $e,readdirSync as Ve,readFileSync as k,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as p}from"path";import{spawnSync as de}from"child_process";import{readFileSync as me}from"fs";import{userInfo as D}from"os";import{join as fe}from"path";var ge="REASON_SCHEDULED_TASK";function H(r){return fe(r,"AppData","Local","Reason","Tasks")}function w(r){if(/[\0-\x1f\x7f"%]/.test(r))throw Error(`A background task cannot use a value with a double quote, percent sign or control character: ${r}`);return`'${r.replace(/['\u2018\u2019\u201a\u201b]/g,"$&$&")}'`}function M(r){if(!/^[A-Za-z0-9._-]+$/.test(r))throw Error(`Invalid Windows Scheduled Task name: ${r}`);return`$env:${ge}=${w(r)};`}function K(r){let e=Object.entries(r.environment).map(([t,i])=>{if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw Error(`Invalid Windows Scheduled Task environment name: ${t}`);return`$env:${t}=${w(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(w).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${w(r.log)} -Value $_.ToString() -Encoding UTF8 }; $c=$LASTEXITCODE;`;return[M(r.name),...e,"$ErrorActionPreference='Continue';",r.keepAlive?`do { ${n} if ($c) { Start-Sleep -Seconds 10 } } while ($c)`:`${n} exit $c`].join(" ")}function I(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function pe(){let r=process.env.USERDOMAIN?.trim();return r?`${r}\\${D().username}`:D().username}function U(r){let e=I(r.user??pe()),n=r.schedule==="logon",t=r.schedule==="logon"?`<LogonTrigger><Enabled>true</Enabled><UserId>${e}</UserId></LogonTrigger>`:`<TimeTrigger><Repetition><Interval>PT${r.schedule.everyMinutes}M</Interval><StopAtDurationEnd>false</StopAtDurationEnd></Repetition><StartBoundary>2026-01-01T00:00:00</StartBoundary><Enabled>true</Enabled></TimeTrigger>`,i=`-NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -Command "${r.script}"`;return`<?xml version="1.0" encoding="UTF-16"?>
3
3
  <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
4
4
  <RegistrationInfo>
5
5
  <Description>${I(r.description)}</Description>
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Zr,Xr,Yr,tr}from"./vm-hands-entry-lite-r7zs4ce2.js";import{co,lo,P,Nr,Lr,Dn,lt,Nn,Mr,Ge,ve,Ln,Ke,ne,Je,Se,qt,$r,Br,$n}from"./vm-hands-entry-lite-3vmhs921.js";import{ir}from"./vm-hands-entry-lite-em7mk9tn.js";import{Ht}from"./vm-hands-entry-lite-12rzrd95.js";import{ke}from"./vm-hands-entry-lite-qyp2a4c3.js";var r=["cgroup_membership_read_failed","cgroup_v2_membership_absent","cgroup_scope_invalid","cgroup_root_unavailable","cgroup_directory_unavailable","cgroup_limit_read_failed","cgroup_events_read_failed","cgroup_current_read_failed","cgroup_stat_read_failed","boot_id_read_failed","boot_id_invalid","guest_meminfo_read_failed","guest_vmstat_read_failed","memory_counter_invalid","memory_field_missing","memory_capacity_invalid"];var o=String.raw`(function(fs, path) {
2
+ import{Zr,Xr,Yr,tr}from"./vm-hands-entry-lite-r7zs4ce2.js";import{co,lo,P,Nr,Lr,Dn,lt,Nn,Mr,Ge,ve,Ln,Ke,ne,Je,Se,qt,$r,Br,$n}from"./vm-hands-entry-lite-j4kapgvr.js";import{ir}from"./vm-hands-entry-lite-em7mk9tn.js";import{Ht}from"./vm-hands-entry-lite-12rzrd95.js";import{ke}from"./vm-hands-entry-lite-qyp2a4c3.js";var r=["cgroup_membership_read_failed","cgroup_v2_membership_absent","cgroup_scope_invalid","cgroup_root_unavailable","cgroup_directory_unavailable","cgroup_limit_read_failed","cgroup_events_read_failed","cgroup_current_read_failed","cgroup_stat_read_failed","boot_id_read_failed","boot_id_invalid","guest_meminfo_read_failed","guest_vmstat_read_failed","memory_counter_invalid","memory_field_missing","memory_capacity_invalid"];var o=String.raw`(function(fs, path) {
3
3
  const fail = (message, reasonCode) => { throw Object.assign(Error(message), {reasonCode}); };
4
4
  const read = (p, reasonCode, trim=true) => { try { const text=fs.readFileSync(p, "utf8"); return trim?text.trim():text; }
5
5
  catch { fail("memory_read", reasonCode); } };
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{readdirSync as b,readFileSync as P}from"fs";import{userInfo as k}from"os";var or="--vm-hands-op-runner-kind=person",sr="--vm-hands-op-runner-kind=surface",xt="--vm-hands-surface-uid=",kt="--vm-hands-surface-dir=",Ct=new Set(["automation.call.v1","display.stream.v1","preview.serve.v1"]);function R(t){let c=new Set([t]),l=[];try{l=b("/proc")}catch{}for(let o of l){if(!/^\d+$/.test(o))continue;try{let d=P(`/proc/${o}/stat`,"utf8");if(Number(d.slice(d.lastIndexOf(")")+2).split(" ")[3])===t)c.add(Number(o))}catch{}}for(let o of c)try{process.kill(o,"SIGKILL")}catch{}}var A=(t)=>{let c=globalThis.Bun;if(!c)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");let l=c.spawn({cmd:[t.shell,...t.args],cwd:t.cwd,env:{...t.environment,TERM:"xterm-256color"},terminal:{cols:t.cols,rows:t.rows,data:(i,s)=>t.onData(s)}}),o=l.terminal,d=()=>{R(l.pid);try{o?.close()}catch{}};if(!o)throw d(),new r("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(i)=>o.write(i),resize:(i,s)=>o.resize(i,s),kill:d,exited:l.exited.then((i)=>typeof i==="number"?i:null,()=>null)}};function x(){let t=(()=>{try{return k().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...t?{USER:t,LOGNAME:t}:{}}}async function E(t){let[{localAutomationAvailable:c},{localDisplayReady:l},{localDisplayVideoAvailable:o},{probeWorkerPreview:d},y]=await Promise.all([import("./local-automation-xxw9v90w.js"),import("./local-display-session-z75gxcyv.js"),import("./local-display-video-d1zzmxx0.js"),import("./worker-preview-readiness-kmwcrttt.js"),import("fs")]),i=AbortSignal.timeout(15000),s=null;try{y.mkdirSync(t,{recursive:!0,mode:448}),s=y.mkdtempSync(`${t}/probe-`);let[g,p,m]=await Promise.all([Promise.resolve().then(()=>c()).catch(()=>!1),l().catch(()=>!1),d(s,i).catch(()=>!1)]);return{t:"readiness",display_video:p&&await o().catch(()=>!1),lanes:{"automation.call.v1":g,"display.stream.v1":p,"preview.serve.v1":m,"tunnel.open":m,"tunnel.close":m}}}finally{if(s)y.rmSync(s,{recursive:!0,force:!0})}}async function os(){let[{executeLocalOperation:t,spawnCaptured:c},{runLocalPtySession:l},{configureDesktopAccount:o,desktopAccount:d},{configureWorkerSandbox:y}]=await Promise.all([import("./local-capabilities-7fmb64cw.js"),import("./local-pty-session-7hps89vj.js"),import("./desktop-account-nb7g2ek5.js"),import("./worker-sandbox-epre0fnv.js")]);y();let i=process.argv.includes(or),s=process.argv.includes(sr),g=(a,e,u)=>c(a,e[0]==="-lic"?["-lc",...e.slice(1)]:e,u),p=(process.geteuid?.()??0)!==0;if(s){p=!1;let a=process.argv.find((e)=>e.startsWith(xt))?.slice(xt.length);if((process.geteuid?.()??-1)===0&&a)try{p=o({value:a})!==null&&d()!==null}catch{p=!1}}let m=new Map,v=new Map,f=(a)=>{try{process.send?.(a)}catch{}};if(process.on("message",(a)=>{let e=a;if(e?.t==="cancel"){m.get(e.id)?.abort();return}if(e?.t==="control"){let n=v.get(e.id);if(s&&n&&e.control&&typeof e.control.kind==="string")import("./local-managed-process-cw1axg5g.js").then(({controlManagedDeviceProcess:_})=>_(n,{kind:e.control.kind,payload:e.control.payload??{}})).catch(()=>!1);return}if(e?.t==="retire"){if(s&&typeof e.operation_id==="string"&&typeof e.status==="string")import("./local-managed-process-cw1axg5g.js").then(({retireManagedDeviceProcess:n})=>n(e.operation_id,e.status)).catch(()=>!1);return}if(e?.t!=="op")return;if(!p){f({t:"done",id:e.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let u=e.claim.capability;if(u==="pty.start"&&!i){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}if(Ct.has(u)!==s){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let w=new AbortController;m.set(e.id,w),v.set(e.id,e.claim);let S=u==="pty.start"?{runPtySession:(n)=>l(n,{spawnPty:A,environment:x(),loadProxy:()=>null})}:{worker:e.worker,...u==="exec.full"?{spawnFullControl:g}:{}};t(e.state,e.claim,{...S,signal:w.signal,emit:(n)=>{let{deliverySignal:_,...h}=n;f({t:"event",id:e.id,event:h})}}).then((n)=>f({t:"done",id:e.id,completion:n}),(n)=>f({t:"done",id:e.id,completion:{status:"failed",error_code:n&&typeof n==="object"&&"code"in n&&typeof n.code==="string"?n.code:"vm_hands_op_failed"}})).finally(()=>{m.delete(e.id),v.delete(e.id)})}),process.on("disconnect",()=>process.exit(0)),s){let a=process.argv.find((u)=>u.startsWith(kt))?.slice(kt.length),e={t:"readiness",display_video:!1,lanes:{}};f(p&&a?await E(a).catch(()=>e):e)}await new Promise(()=>{})}
2
+ import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{readdirSync as b,readFileSync as P}from"fs";import{userInfo as k}from"os";var or="--vm-hands-op-runner-kind=person",sr="--vm-hands-op-runner-kind=surface",xt="--vm-hands-surface-uid=",kt="--vm-hands-surface-dir=",Ct=new Set(["automation.call.v1","display.stream.v1","preview.serve.v1"]);function R(t){let c=new Set([t]),l=[];try{l=b("/proc")}catch{}for(let o of l){if(!/^\d+$/.test(o))continue;try{let d=P(`/proc/${o}/stat`,"utf8");if(Number(d.slice(d.lastIndexOf(")")+2).split(" ")[3])===t)c.add(Number(o))}catch{}}for(let o of c)try{process.kill(o,"SIGKILL")}catch{}}var A=(t)=>{let c=globalThis.Bun;if(!c)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");let l=c.spawn({cmd:[t.shell,...t.args],cwd:t.cwd,env:{...t.environment,TERM:"xterm-256color"},terminal:{cols:t.cols,rows:t.rows,data:(i,s)=>t.onData(s)}}),o=l.terminal,d=()=>{R(l.pid);try{o?.close()}catch{}};if(!o)throw d(),new r("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(i)=>o.write(i),resize:(i,s)=>o.resize(i,s),kill:d,exited:l.exited.then((i)=>typeof i==="number"?i:null,()=>null)}};function x(){let t=(()=>{try{return k().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...t?{USER:t,LOGNAME:t}:{}}}async function E(t){let[{localAutomationAvailable:c},{localDisplayReady:l},{localDisplayVideoAvailable:o},{probeWorkerPreview:d},y]=await Promise.all([import("./local-automation-d6m82hz2.js"),import("./local-display-session-12vk21q8.js"),import("./local-display-video-14s59sd2.js"),import("./worker-preview-readiness-kmwcrttt.js"),import("fs")]),i=AbortSignal.timeout(15000),s=null;try{y.mkdirSync(t,{recursive:!0,mode:448}),s=y.mkdtempSync(`${t}/probe-`);let[g,p,m]=await Promise.all([Promise.resolve().then(()=>c()).catch(()=>!1),l().catch(()=>!1),d(s,i).catch(()=>!1)]);return{t:"readiness",display_video:p&&await o().catch(()=>!1),lanes:{"automation.call.v1":g,"display.stream.v1":p,"preview.serve.v1":m,"tunnel.open":m,"tunnel.close":m}}}finally{if(s)y.rmSync(s,{recursive:!0,force:!0})}}async function os(){let[{executeLocalOperation:t,spawnCaptured:c},{runLocalPtySession:l},{configureDesktopAccount:o,desktopAccount:d},{configureWorkerSandbox:y}]=await Promise.all([import("./local-capabilities-knfs3f4m.js"),import("./local-pty-session-gvnfgrxt.js"),import("./desktop-account-nb7g2ek5.js"),import("./worker-sandbox-epre0fnv.js")]);y();let i=process.argv.includes(or),s=process.argv.includes(sr),g=(a,e,u)=>c(a,e[0]==="-lic"?["-lc",...e.slice(1)]:e,u),p=(process.geteuid?.()??0)!==0;if(s){p=!1;let a=process.argv.find((e)=>e.startsWith(xt))?.slice(xt.length);if((process.geteuid?.()??-1)===0&&a)try{p=o({value:a})!==null&&d()!==null}catch{p=!1}}let m=new Map,v=new Map,f=(a)=>{try{process.send?.(a)}catch{}};if(process.on("message",(a)=>{let e=a;if(e?.t==="cancel"){m.get(e.id)?.abort();return}if(e?.t==="control"){let n=v.get(e.id);if(s&&n&&e.control&&typeof e.control.kind==="string")import("./local-managed-process-9k5m126b.js").then(({controlManagedDeviceProcess:_})=>_(n,{kind:e.control.kind,payload:e.control.payload??{}})).catch(()=>!1);return}if(e?.t==="retire"){if(s&&typeof e.operation_id==="string"&&typeof e.status==="string")import("./local-managed-process-9k5m126b.js").then(({retireManagedDeviceProcess:n})=>n(e.operation_id,e.status)).catch(()=>!1);return}if(e?.t!=="op")return;if(!p){f({t:"done",id:e.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let u=e.claim.capability;if(u==="pty.start"&&!i){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}if(Ct.has(u)!==s){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let w=new AbortController;m.set(e.id,w),v.set(e.id,e.claim);let S=u==="pty.start"?{runPtySession:(n)=>l(n,{spawnPty:A,environment:x(),loadProxy:()=>null})}:{worker:e.worker,...u==="exec.full"?{spawnFullControl:g}:{}};t(e.state,e.claim,{...S,signal:w.signal,emit:(n)=>{let{deliverySignal:_,...h}=n;f({t:"event",id:e.id,event:h})}}).then((n)=>f({t:"done",id:e.id,completion:n}),(n)=>f({t:"done",id:e.id,completion:{status:"failed",error_code:n&&typeof n==="object"&&"code"in n&&typeof n.code==="string"?n.code:"vm_hands_op_failed"}})).finally(()=>{m.delete(e.id),v.delete(e.id)})}),process.on("disconnect",()=>process.exit(0)),s){let a=process.argv.find((u)=>u.startsWith(kt))?.slice(kt.length),e={t:"readiness",display_video:!1,lanes:{}};f(p&&a?await E(a).catch(()=>e):e)}await new Promise(()=>{})}
3
3
  export{or,sr,xt,kt,Ct,os};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{H}from"./vm-hands-entry-lite-r7zs4ce2.js";import{lt}from"./vm-hands-entry-lite-3vmhs921.js";import{Ht}from"./vm-hands-entry-lite-12rzrd95.js";import{j}from"./vm-hands-entry-lite-1f2cam25.js";import{ie}from"./vm-hands-entry-lite-9sa1knn7.js";import{$e}from"./vm-hands-entry-lite-mcjca0ez.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{existsSync as D,realpathSync as q,statSync as K}from"fs";import{platform as h}from"os";import{isAbsolute as z,sep as G}from"path";import{existsSync as X}from"fs";import{createRequire as Y}from"module";var k=$e(Ht)(()=>Y(import.meta.url)("bun:ffi"),X);function E(){return process.platform==="win32"&&typeof globalThis.Bun<"u"&&k.available()}function C(e=process.env){return k.defaultShell(e)}function M(e){return k.shellArgs(e)}function N(e){let n=k.spawn({...e,env:e.environment});return n.exited.then(()=>n.close()),{write:(o)=>n.write(o),resize:(o,t)=>n.resize(o,t),kill:()=>n.close(),exited:n.exited}}var Pr=43200000,Bt=lt,Tr=4,Q=/^[A-Za-z0-9._:-]{1,160}$/,V=1000;function I(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function P(e,n){if(typeof e!=="number"||!Number.isFinite(e)||e<=0)return n;return Math.min(V,Math.max(1,Math.floor(e)))}function Z(e,n=Date.now()){let o=["relay_url","session_id","expires_at"],t=new Set([...o,"cols","rows","cwd","workspace"]);if(!I(e)||o.some((b)=>!(b in e))||Object.keys(e).some((b)=>!t.has(b)))throw new r("invalid_pty_request","Reason terminal request is malformed.");let{relay_url:c,session_id:m,expires_at:g}=e;if(typeof c!=="string")throw new r("invalid_pty_request","Reason terminal relay URL is missing.");let d;try{d=new URL(c)}catch{throw new r("invalid_pty_request","Reason terminal relay URL is invalid.")}if(d.protocol!=="wss:"&&d.protocol!=="ws:"||d.username||d.password)throw new r("invalid_pty_request","Reason terminal relay URL is invalid.");if(typeof m!=="string"||!Q.test(m))throw new r("invalid_pty_request","Reason terminal session identity is invalid.");let p=typeof g==="string"?Date.parse(g):Number.NaN;if(!Number.isFinite(p)||p<=n)throw new r("invalid_pty_request","Reason terminal session has already expired.");if(e.cwd!==void 0&&typeof e.cwd!=="string")throw new r("invalid_pty_request","Reason terminal working directory is invalid.");let a=e.workspace===void 0?void 0:H(e.workspace);if(a===null||a&&e.cwd!==void 0)throw new r("invalid_pty_request","Reason terminal workspace is invalid.");return{relay_url:c,session_id:m,expires_at:new Date(Math.min(p,n+Pr)).toISOString(),cols:P(e.cols,80),rows:P(e.rows,24),...e.cwd===void 0?{}:{cwd:e.cwd},...a?{workspace:a}:{}}}function ee(e,n){if(h()==="win32")[e,n]=[e.toLowerCase(),n.toLowerCase()];return n===e||n.startsWith(e+G)}function W(e,n){if(n===void 0)return e;if(!z(n))throw new r("pty_cwd_invalid","Reason terminal working directory must be absolute.");let o;try{o=q(n)}catch{throw new r("pty_cwd_invalid","Reason terminal working directory does not exist.")}if(!ee(e,o))throw new r("pty_cwd_outside_root","Reason terminal working directory escapes the granted root.");if(!K(o).isDirectory())throw new r("pty_cwd_invalid","Reason terminal working directory is not a directory.");return o}function Jo(e=process.env){if(h()==="win32")return C(e);let n=e.SHELL;if(n&&z(n)&&D(n))return n;for(let o of h()==="darwin"?["/bin/zsh","/bin/bash","/bin/sh"]:["/bin/bash","/bin/sh"])if(D(o))return o;return"/bin/sh"}function ne(){let e=globalThis.Bun;if(!e)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");return e.spawn}function On(){if(h()==="win32")return E();return typeof globalThis.Bun<"u"}var re=(e)=>{if(h()==="win32")try{return N({...e,file:e.shell,args:M(e.shell),environment:{...e.environment,TERM:"xterm-256color"}})}catch{throw new r("pty_unavailable","Reason could not allocate a pseudo-terminal.")}let n=ne()({cmd:[e.shell,"-i","-l"],cwd:e.cwd,env:{...e.environment,TERM:"xterm-256color"},terminal:{cols:e.cols,rows:e.rows,data:(t,c)=>{e.onData(c)}}}),o=n.terminal;if(!o){try{n.kill()}catch{}throw new r("pty_unavailable","Reason could not allocate a pseudo-terminal.")}return{write:(t)=>o.write(t),resize:(t,c)=>o.resize(t,c),kill:()=>{try{n.kill()}catch{}},exited:n.exited.then((t)=>typeof t==="number"?t:null,()=>null)}},Rr=(e,n)=>n===void 0?new WebSocket(e):new WebSocket(e,{proxy:n}),v=new Set;function te(e){if(v.size>=Tr||v.has(e))return null;v.add(e);let n=!1;return()=>{if(n)return;n=!0,v.delete(e)}}async function In(e,n={}){let o=n.now??Date.now,t=Z(e.payload,o()),c=te(e.operationId);if(!c)throw new r("pty_slot_busy","This Reason Device already runs the maximum number of terminals.");let m=o(),g,d,p;try{let a=t.workspace?ie(e.root,t.workspace):void 0;g=a?W(D(a.boundary)?q(a.boundary):a.boundary,a.path):W(e.root,t.cwd),d=n.environment??process.env,p=n.shellPath??Jo(d)}catch(a){throw c(),a}return await new Promise((a,b)=>{let w=null,i=null,S=!1,x=!1,y=!1,T=null,U=0,B=0,O=[],R=0,A=null,l=(s)=>{if(y)return;if(y=!0,A)clearTimeout(A);e.signal.removeEventListener("abort",L);try{w?.kill()}catch{}try{i?.close(1000,"pty_session_over")}catch{}if(c(),s.kind==="rejected"){b(s.error);return}let u={reason:s.reason,exit_code:T,output_bytes:U,input_bytes:B,duration_ms:Math.max(0,o()-m)};e.emitEvent("pty.stopped",{...u}).catch(()=>{return}),a({...u})},L=()=>{let s=e.signal.reason;l({kind:"rejected",error:s instanceof r?s:new r("cancelled","Reason closed the terminal session.")})};if(e.signal.aborted){L();return}e.signal.addEventListener("abort",L,{once:!0}),A=setTimeout(()=>l({kind:"resolved",reason:"session_expired"}),Math.max(1,Date.parse(t.expires_at)-o()));let F=(s)=>{if(U+=s.byteLength,!S||!i){if(O.push(s),R+=s.byteLength,R>Bt)l({kind:"resolved",reason:"output_backpressure"});return}try{i.send(s)}catch{l({kind:"resolved",reason:"relay_closed"});return}if(i.bufferedAmount>Bt)l({kind:"resolved",reason:"output_backpressure"})};try{w=(n.spawnPty??re)({shell:p,args:["-i","-l"],cwd:g,cols:t.cols,rows:t.rows,environment:d,onData:(s)=>{if(!y)F(s)}})}catch(s){l({kind:"rejected",error:s instanceof r?s:new r("pty_spawn_failed","Reason could not start the terminal shell.")});return}w.exited.then((s)=>{if(y)return;if(T=s,S&&i)try{i.send(JSON.stringify({t:"exit",code:s}))}catch{}l({kind:"resolved",reason:"shell_exited"})});let J=(n.loadProxy??j)()?.url;try{i=(n.connect??Rr)(t.relay_url,J)}catch{l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")});return}i.binaryType="arraybuffer",i.onopen=()=>{if(y||!i)return;S=!0;try{i.send(JSON.stringify({t:"open",cols:t.cols,rows:t.rows}));for(let s of O.splice(0))i.send(s);R=0}catch{l({kind:"resolved",reason:"relay_closed"});return}x=!0,e.emitEvent("pty.ready",{session_id:t.session_id,cols:t.cols,rows:t.rows}).catch(()=>{return})},i.onmessage=(s)=>{if(y||!w)return;let u=s.data;if(typeof u==="string"){let f;try{f=JSON.parse(u)}catch{return}if(!I(f))return;if(f.t==="resize"){try{w.resize(P(f.cols,t.cols),P(f.rows,t.rows))}catch{}return}if(f.t==="close")l({kind:"resolved",reason:"client_closed"});return}let _=u instanceof ArrayBuffer?new Uint8Array(u):ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):null;if(!_||_.byteLength===0)return;B+=_.byteLength;try{w.write(_)}catch{}},i.onclose=()=>{if(y)return;if(!x){l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")});return}l({kind:"resolved",reason:"relay_closed"})},i.onerror=()=>{if(y||x)return;l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")})}})}
2
+ import{H}from"./vm-hands-entry-lite-r7zs4ce2.js";import{lt}from"./vm-hands-entry-lite-j4kapgvr.js";import{Ht}from"./vm-hands-entry-lite-12rzrd95.js";import{j}from"./vm-hands-entry-lite-1f2cam25.js";import{ie}from"./vm-hands-entry-lite-9sa1knn7.js";import{$e}from"./vm-hands-entry-lite-mcjca0ez.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{existsSync as D,realpathSync as q,statSync as K}from"fs";import{platform as h}from"os";import{isAbsolute as z,sep as G}from"path";import{existsSync as X}from"fs";import{createRequire as Y}from"module";var k=$e(Ht)(()=>Y(import.meta.url)("bun:ffi"),X);function E(){return process.platform==="win32"&&typeof globalThis.Bun<"u"&&k.available()}function C(e=process.env){return k.defaultShell(e)}function M(e){return k.shellArgs(e)}function N(e){let n=k.spawn({...e,env:e.environment});return n.exited.then(()=>n.close()),{write:(o)=>n.write(o),resize:(o,t)=>n.resize(o,t),kill:()=>n.close(),exited:n.exited}}var Pr=43200000,Bt=lt,Tr=4,Q=/^[A-Za-z0-9._:-]{1,160}$/,V=1000;function I(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function P(e,n){if(typeof e!=="number"||!Number.isFinite(e)||e<=0)return n;return Math.min(V,Math.max(1,Math.floor(e)))}function Z(e,n=Date.now()){let o=["relay_url","session_id","expires_at"],t=new Set([...o,"cols","rows","cwd","workspace"]);if(!I(e)||o.some((b)=>!(b in e))||Object.keys(e).some((b)=>!t.has(b)))throw new r("invalid_pty_request","Reason terminal request is malformed.");let{relay_url:c,session_id:m,expires_at:g}=e;if(typeof c!=="string")throw new r("invalid_pty_request","Reason terminal relay URL is missing.");let d;try{d=new URL(c)}catch{throw new r("invalid_pty_request","Reason terminal relay URL is invalid.")}if(d.protocol!=="wss:"&&d.protocol!=="ws:"||d.username||d.password)throw new r("invalid_pty_request","Reason terminal relay URL is invalid.");if(typeof m!=="string"||!Q.test(m))throw new r("invalid_pty_request","Reason terminal session identity is invalid.");let p=typeof g==="string"?Date.parse(g):Number.NaN;if(!Number.isFinite(p)||p<=n)throw new r("invalid_pty_request","Reason terminal session has already expired.");if(e.cwd!==void 0&&typeof e.cwd!=="string")throw new r("invalid_pty_request","Reason terminal working directory is invalid.");let a=e.workspace===void 0?void 0:H(e.workspace);if(a===null||a&&e.cwd!==void 0)throw new r("invalid_pty_request","Reason terminal workspace is invalid.");return{relay_url:c,session_id:m,expires_at:new Date(Math.min(p,n+Pr)).toISOString(),cols:P(e.cols,80),rows:P(e.rows,24),...e.cwd===void 0?{}:{cwd:e.cwd},...a?{workspace:a}:{}}}function ee(e,n){if(h()==="win32")[e,n]=[e.toLowerCase(),n.toLowerCase()];return n===e||n.startsWith(e+G)}function W(e,n){if(n===void 0)return e;if(!z(n))throw new r("pty_cwd_invalid","Reason terminal working directory must be absolute.");let o;try{o=q(n)}catch{throw new r("pty_cwd_invalid","Reason terminal working directory does not exist.")}if(!ee(e,o))throw new r("pty_cwd_outside_root","Reason terminal working directory escapes the granted root.");if(!K(o).isDirectory())throw new r("pty_cwd_invalid","Reason terminal working directory is not a directory.");return o}function Jo(e=process.env){if(h()==="win32")return C(e);let n=e.SHELL;if(n&&z(n)&&D(n))return n;for(let o of h()==="darwin"?["/bin/zsh","/bin/bash","/bin/sh"]:["/bin/bash","/bin/sh"])if(D(o))return o;return"/bin/sh"}function ne(){let e=globalThis.Bun;if(!e)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");return e.spawn}function On(){if(h()==="win32")return E();return typeof globalThis.Bun<"u"}var re=(e)=>{if(h()==="win32")try{return N({...e,file:e.shell,args:M(e.shell),environment:{...e.environment,TERM:"xterm-256color"}})}catch{throw new r("pty_unavailable","Reason could not allocate a pseudo-terminal.")}let n=ne()({cmd:[e.shell,"-i","-l"],cwd:e.cwd,env:{...e.environment,TERM:"xterm-256color"},terminal:{cols:e.cols,rows:e.rows,data:(t,c)=>{e.onData(c)}}}),o=n.terminal;if(!o){try{n.kill()}catch{}throw new r("pty_unavailable","Reason could not allocate a pseudo-terminal.")}return{write:(t)=>o.write(t),resize:(t,c)=>o.resize(t,c),kill:()=>{try{n.kill()}catch{}},exited:n.exited.then((t)=>typeof t==="number"?t:null,()=>null)}},Rr=(e,n)=>n===void 0?new WebSocket(e):new WebSocket(e,{proxy:n}),v=new Set;function te(e){if(v.size>=Tr||v.has(e))return null;v.add(e);let n=!1;return()=>{if(n)return;n=!0,v.delete(e)}}async function In(e,n={}){let o=n.now??Date.now,t=Z(e.payload,o()),c=te(e.operationId);if(!c)throw new r("pty_slot_busy","This Reason Device already runs the maximum number of terminals.");let m=o(),g,d,p;try{let a=t.workspace?ie(e.root,t.workspace):void 0;g=a?W(D(a.boundary)?q(a.boundary):a.boundary,a.path):W(e.root,t.cwd),d=n.environment??process.env,p=n.shellPath??Jo(d)}catch(a){throw c(),a}return await new Promise((a,b)=>{let w=null,i=null,S=!1,x=!1,y=!1,T=null,U=0,B=0,O=[],R=0,A=null,l=(s)=>{if(y)return;if(y=!0,A)clearTimeout(A);e.signal.removeEventListener("abort",L);try{w?.kill()}catch{}try{i?.close(1000,"pty_session_over")}catch{}if(c(),s.kind==="rejected"){b(s.error);return}let u={reason:s.reason,exit_code:T,output_bytes:U,input_bytes:B,duration_ms:Math.max(0,o()-m)};e.emitEvent("pty.stopped",{...u}).catch(()=>{return}),a({...u})},L=()=>{let s=e.signal.reason;l({kind:"rejected",error:s instanceof r?s:new r("cancelled","Reason closed the terminal session.")})};if(e.signal.aborted){L();return}e.signal.addEventListener("abort",L,{once:!0}),A=setTimeout(()=>l({kind:"resolved",reason:"session_expired"}),Math.max(1,Date.parse(t.expires_at)-o()));let F=(s)=>{if(U+=s.byteLength,!S||!i){if(O.push(s),R+=s.byteLength,R>Bt)l({kind:"resolved",reason:"output_backpressure"});return}try{i.send(s)}catch{l({kind:"resolved",reason:"relay_closed"});return}if(i.bufferedAmount>Bt)l({kind:"resolved",reason:"output_backpressure"})};try{w=(n.spawnPty??re)({shell:p,args:["-i","-l"],cwd:g,cols:t.cols,rows:t.rows,environment:d,onData:(s)=>{if(!y)F(s)}})}catch(s){l({kind:"rejected",error:s instanceof r?s:new r("pty_spawn_failed","Reason could not start the terminal shell.")});return}w.exited.then((s)=>{if(y)return;if(T=s,S&&i)try{i.send(JSON.stringify({t:"exit",code:s}))}catch{}l({kind:"resolved",reason:"shell_exited"})});let J=(n.loadProxy??j)()?.url;try{i=(n.connect??Rr)(t.relay_url,J)}catch{l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")});return}i.binaryType="arraybuffer",i.onopen=()=>{if(y||!i)return;S=!0;try{i.send(JSON.stringify({t:"open",cols:t.cols,rows:t.rows}));for(let s of O.splice(0))i.send(s);R=0}catch{l({kind:"resolved",reason:"relay_closed"});return}x=!0,e.emitEvent("pty.ready",{session_id:t.session_id,cols:t.cols,rows:t.rows}).catch(()=>{return})},i.onmessage=(s)=>{if(y||!w)return;let u=s.data;if(typeof u==="string"){let f;try{f=JSON.parse(u)}catch{return}if(!I(f))return;if(f.t==="resize"){try{w.resize(P(f.cols,t.cols),P(f.rows,t.rows))}catch{}return}if(f.t==="close")l({kind:"resolved",reason:"client_closed"});return}let _=u instanceof ArrayBuffer?new Uint8Array(u):ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):null;if(!_||_.byteLength===0)return;B+=_.byteLength;try{w.write(_)}catch{}},i.onclose=()=>{if(y)return;if(!x){l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")});return}l({kind:"resolved",reason:"relay_closed"})},i.onerror=()=>{if(y||x)return;l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")})}})}
3
3
  export{Pr,Bt,Tr,Jo,On,Rr,In};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{S,Gt,Vn,Xe,Gn,Kn}from"./vm-hands-entry-lite-jcf61cb4.js";import{Zn}from"./vm-hands-entry-lite-yyedjn2a.js";import{Fn}from"./vm-hands-entry-lite-d9g1pzzx.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as ys,spawn as Ke}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 In}from"stream/promises";var qe="omljlfpmafedpplnpkkahegadhkimdje",io="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`
2
+ import{S,Gt,Vn,Xe,Gn,Kn}from"./vm-hands-entry-lite-jcf61cb4.js";import{Zn}from"./vm-hands-entry-lite-zcjwx0jz.js";import{Fn}from"./vm-hands-entry-lite-d9g1pzzx.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as ys,spawn as Ke}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 In}from"stream/promises";var qe="omljlfpmafedpplnpkkahegadhkimdje",io="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
3
  $ErrorActionPreference = "Stop"
4
4
  Add-Type -TypeDefinition @"
5
5
  using System;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Yt}from"./vm-hands-entry-lite-1qwwtep5.js";var gt=Yt.version;export{gt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{H}from"./vm-hands-entry-lite-r7zs4ce2.js";var ao=32;var co="__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__",lo=262144;var P=2,Nr=33554432,Lr=200000,Dn=4000000,lt=240000;var Nn=2000;var Mr=16384,Ge=32768,ve=128,Ln=64,Ke=2097152,zt=1,ne=16384,Je=32768,Mn=8388608,Se=1000,qt=2500,$r=2000,Wt=qt+$r,R=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,199}$/,h=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Br={text_only:4430,invalid_json:4431,invalid_cancel_request:4432,invalid_sdk_response:4433,claim_required:4434,invalid_claim:4435,executor_mismatch:4436,stale_generation:4437,fence_conflict:4438,frame_too_large:4439,result_too_large:4440,progress_too_large:4441,terminal_cleanup_started:4442,job_journal_unavailable:4443},I=new Map(Object.entries(Br).map(([t,n])=>[n,t]));var y=["cancelled","command_failed","duplicate_request_id","duplicate_result_evicted","invalid_repl_response","invalid_request","process_group_cleanup_unconfirmed","repl_failed","result_too_large","repl_response_too_large","repl_transport_failed","request_ledger_full","request_journal_unavailable","request_outcome_uncertain","maintenance_held","request_not_found","resume_digest_mismatch","spawn_failed","stale_generation","timeout"],k=new Set(y),$n=16384,w=["maintenance_held","invalid_job_request","jobs_disabled","job_not_found","job_conflict","job_capacity","job_journal_unavailable","job_not_running","job_lease_expired","job_input_sequence","job_input_backpressure","stale_generation","pty_unsupported","job_mode_mismatch"];class r extends Error{code;constructor(t){super(t);this.name="HandsProtocolError",this.code=t}}function m(t){return new TextEncoder().encode(t).byteLength}function a(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}function i(t,n){let e=new Set(n);return Object.keys(t).every((s)=>e.has(s))}function ae(t){return typeof t==="string"&&R.test(t)}function U(t){return Number.isSafeInteger(t)&&Number(t)>=1}function N(t){return typeof t==="string"&&h.test(t)}function ce(t){return typeof t==="string"&&t.startsWith("pty-")&&N(t.slice(4))}function p(t){return[t.cols,t.rows].every((n)=>Number.isSafeInteger(n)&&Number(n)>=1&&Number(n)<=Se)}function _(t){if(typeof t!=="string"||t.length>Math.ceil(ne/3)*4||t.length%4!==0||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return-1;let n=t.endsWith("==")?2:t.endsWith("=")?1:0;if(n&&"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(t[t.length-n-1])&(n===2?15:3))return-1;let s=t.length/4*3-n;return s<=ne?s:-1}function l(t){if(m(t)>Nr)throw new r("frame_too_large");try{return JSON.parse(t)}catch{throw new r("invalid_json")}}function Fr(t){let n=l(t);if(!a(n)||!i(n,["type","version","generation","id","jobId","action","input"])||n.type!=="job"||n.version!==P||!U(n.generation)||!ae(n.id)||!ae(n.jobId)||!a(n.input))throw new r("invalid_job_request");let e=n.input,s=Number.isSafeInteger(e.leaseExpiresAtMs)&&Number(e.leaseExpiresAtMs)>0,d=Number.isSafeInteger(e.sequence)&&Number(e.sequence)>=1;if(!(n.action==="start"?e.mode==="pty"?i(e,["mode","cols","rows","leaseExpiresAtMs"])&&ce(n.jobId)&&p(e)&&s:i(e,["script","leaseExpiresAtMs"])&&typeof e.script==="string"&&e.script.length<=Lr&&s:n.action==="inspect"?i(e,["after"])&&Number.isSafeInteger(e.after)&&Number(e.after)>=0:n.action==="input"?"dataBase64"in e?i(e,["sequence","dataBase64"])&&ce(n.jobId)&&d&&_(e.dataBase64)>0:i(e,["sequence","data","eof"])&&d&&typeof e.data==="string"&&e.data.length<=Mr&&typeof e.eof==="boolean":n.action==="resize"?i(e,["sequence","cols","rows"])&&ce(n.jobId)&&d&&p(e):n.action==="renew"?i(e,["leaseExpiresAtMs"])&&s:n.action==="cancel"&&i(e,[])))throw new r("invalid_job_request");return n}function jr(t){let n=l(t);if(!a(n)||!i(n,["type","version","generation","id","ok","job","error"])||n.type!=="job_result"||n.version!==P||!U(n.generation)||!ae(n.id))throw new r("invalid_job_result");if(n.ok===!1&&n.job===void 0&&typeof n.error==="string"&&w.some((o)=>o===n.error))return n;let e=n.job;if(n.ok!==!0||n.error!==void 0||!a(e)||!i(e,["jobId","state","startedAtMs","finishedAtMs","leaseExpiresAtMs","exitCode","inputSequence","output","firstCursor","nextCursor","truncated","process","environmentRevision","environmentSnapshotId","pty"])||!ae(e.jobId)||!["starting","running","exited","cancelled","expired","uncertain"].includes(String(e.state))||!Number.isSafeInteger(e.startedAtMs)||Number(e.startedAtMs)<1||!Number.isSafeInteger(e.leaseExpiresAtMs)||Number(e.leaseExpiresAtMs)<1||e.finishedAtMs!==null&&(!Number.isSafeInteger(e.finishedAtMs)||Number(e.finishedAtMs)<Number(e.startedAtMs))||e.exitCode!==null&&(!Number.isSafeInteger(e.exitCode)||Number(e.exitCode)<0||Number(e.exitCode)>255)||!Number.isSafeInteger(e.inputSequence)||Number(e.inputSequence)<0||!Number.isSafeInteger(e.firstCursor)||Number(e.firstCursor)<1||!Number.isSafeInteger(e.nextCursor)||Number(e.nextCursor)<Number(e.firstCursor)-1||typeof e.truncated!=="boolean"||!Array.isArray(e.output)||e.output.length>ve)throw new r("invalid_job_result");if(e.environmentRevision===void 0!==(e.environmentSnapshotId===void 0)||e.environmentRevision!==void 0&&(!Number.isSafeInteger(e.environmentRevision)||Number(e.environmentRevision)<1||!N(e.environmentSnapshotId)))throw new r("invalid_job_result");let s=Number(e.firstCursor)-1,d=0;for(let o of e.output){if(!a(o)||!i(o,["cursor","stream","text"])||!Number.isSafeInteger(o.cursor)||Number(o.cursor)<=s||Number(o.cursor)>Number(e.nextCursor)||!["stdout","stderr"].includes(String(o.stream))||typeof o.text!=="string")throw new r("invalid_job_result");d+=o.text.length,s=Number(o.cursor)}if(d>Ge)throw new r("invalid_job_result");let c=e.state==="starting"||e.state==="running";if(c&&(e.finishedAtMs!==null||e.exitCode!==null)||!c&&e.finishedAtMs===null||e.state==="uncertain"&&e.exitCode!==null||e.state==="exited"&&e.exitCode===null||e.state==="cancelled"&&e.exitCode!==130||e.state==="expired"&&e.exitCode!==124)throw new r("invalid_job_result");if(e.process!==void 0){let o=e.process;if(!a(o)||!i(o,["pid","processGroupId","executorLaunchId"])||!Number.isSafeInteger(o.pid)||Number(o.pid)<1||o.processGroupId!==o.pid||!N(o.executorLaunchId)||!["starting","running"].includes(String(e.state)))throw new r("invalid_job_result")}if(e.pty!==void 0){let o=e.pty;if(!a(o)||!i(o,["version","cols","rows","output","cleanup"])||o.version!==zt||!ce(e.jobId)||!p(o)||e.output.length!==0||!Array.isArray(o.output)||o.output.length>ve||(c?o.cleanup!=="pending":e.state==="uncertain"?o.cleanup!=="unconfirmed":o.cleanup!=="confirmed")||e.state==="running"&&(e.process===void 0||e.environmentRevision===void 0))throw new r("invalid_job_result");let g=Number(e.firstCursor)-1,b=0;for(let u of o.output){if(!a(u)||!i(u,["cursor","dataBase64"])||!Number.isSafeInteger(u.cursor)||Number(u.cursor)<=g||Number(u.cursor)>Number(e.nextCursor))throw new r("invalid_job_result");let f=_(u.dataBase64);if(f<=0||(b+=f)>Je)throw new r("invalid_job_result");g=Number(u.cursor)}}return n}function Bn(t){if(m(t)>Ke)throw new r("frame_too_large");let n=l(t);if(!a(n)||!i(n,["version","sessionId","operationId","runId","deviceId","rootId","workspace","binding","targetRevision","rootGrantRevision","generation","fenceId","executorLaunchId","job"])||n.version!==zt||![n.sessionId,n.operationId,n.runId].every(ae)||![n.deviceId,n.rootId,n.fenceId,n.executorLaunchId].every(N)||!U(n.generation)||!Number.isSafeInteger(n.rootGrantRevision)||Number(n.rootGrantRevision)<1||!["workspace_source","mcp_control"].includes(String(n.binding))||!Number.isSafeInteger(n.targetRevision)||Number(n.targetRevision)<0||n.binding==="workspace_source"&&n.targetRevision!==0||!a(n.workspace))throw new r("invalid_pty_receipt");if(!H(n.workspace))throw new r("invalid_pty_receipt");let e=jr(JSON.stringify({type:"job_result",version:P,generation:n.generation,id:n.operationId,ok:!0,job:n.job}));if(!e.ok||!e.job.pty||e.job.pty.output.length!==0||e.job.process&&e.job.process.executorLaunchId!==n.executorLaunchId)throw new r("invalid_pty_receipt");return n}export{ao,co,lo,P,Nr,Lr,Dn,lt,Nn,Mr,Ge,ve,Ln,Ke,zt,ne,Je,Mn,Se,qt,$r,Wt,Br,$n,ae,U,N,ce,Fr,jr,Bn};