@reason-machines/cli-linux-x64 0.2.509 → 0.2.512

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 (114) hide show
  1. package/THIRD_PARTY_NOTICES.txt +0 -50
  2. package/bin/reason +2 -2
  3. package/bin/vm-hands/api-credentials-tsbx6cpa.js +2 -0
  4. package/bin/vm-hands/api-nwnptsbc.js +2 -0
  5. package/bin/vm-hands/connect-cli-ymqe88y2.js +2 -0
  6. package/bin/vm-hands/credentials-pgsb4v9j.js +2 -0
  7. package/bin/vm-hands/custom-endpoint-device-57hkdy1z.js +2 -0
  8. package/bin/vm-hands/desktop-account-j6fjngt1.js +2 -0
  9. package/bin/vm-hands/device-workspace-qjyzphga.js +2 -0
  10. package/bin/vm-hands/{fsevents-x66t2ncp.js → fsevents-sw63c1nr.js} +1 -1
  11. package/bin/vm-hands/hands-worker-source-xjbrgfar.js +2 -0
  12. package/bin/vm-hands/{index-rdm4a3y7.js → index-j4gb3cze.js} +10 -10
  13. package/bin/vm-hands/install-receipt-y7exc4wh.js +2 -0
  14. package/bin/vm-hands/local-automation-ta2k7hz3.js +2 -0
  15. package/bin/vm-hands/local-capabilities-8xm0j4yv.js +2 -0
  16. package/bin/vm-hands/local-desktop-users-q0391ha1.js +2 -0
  17. package/bin/vm-hands/local-display-mac-7pg0n3zs.js +2 -0
  18. package/bin/vm-hands/local-display-session-36ypnvvr.js +2 -0
  19. package/bin/vm-hands/local-display-video-xaxjazsp.js +2 -0
  20. package/bin/vm-hands/local-managed-process-c1pd7k4g.js +2 -0
  21. package/bin/vm-hands/local-pty-session-q06ff8yk.js +2 -0
  22. package/bin/vm-hands/managed-runtime-cf3m8ygn.js +2 -0
  23. package/bin/vm-hands/network-contract-6mkf58vs.js +2 -0
  24. package/bin/vm-hands/package-sng72tm1.js +2 -0
  25. package/bin/vm-hands/permissions-mtp3nv7w.js +2 -0
  26. package/bin/vm-hands/reason-hands-protocol-zf7bpqwe.js +2 -0
  27. package/bin/vm-hands/serve-service-612sfna9.js +2 -0
  28. package/bin/vm-hands/status-vc1z4d4q.js +10 -0
  29. package/bin/vm-hands/version-3fc9wwez.js +2 -0
  30. package/bin/vm-hands/{vm-hands-entry-lite-kkfefpq6.js → vm-hands-entry-lite-024t90qh.js} +3 -3
  31. package/bin/vm-hands/{vm-hands-entry-lite-12r5xwkb.js → vm-hands-entry-lite-08fnapbd.js} +10 -10
  32. package/bin/vm-hands/{vm-hands-entry-lite-7777m86y.js → vm-hands-entry-lite-0gj3p9tg.js} +2 -2
  33. package/bin/vm-hands/{vm-hands-entry-lite-y2khvb5c.js → vm-hands-entry-lite-0sh835na.js} +2 -2
  34. package/bin/vm-hands/{vm-hands-entry-lite-5gevvgec.js → vm-hands-entry-lite-1ek3r3w9.js} +1 -1
  35. package/bin/vm-hands/{vm-hands-entry-lite-c67nmnex.js → vm-hands-entry-lite-1zd088yv.js} +25 -25
  36. package/bin/vm-hands/{vm-hands-entry-lite-bw9g69x1.js → vm-hands-entry-lite-21pw3ra3.js} +5 -5
  37. package/bin/vm-hands/{vm-hands-entry-lite-38g65s5x.js → vm-hands-entry-lite-39qv4sqt.js} +2 -2
  38. package/bin/vm-hands/{vm-hands-entry-lite-8pgdcdsm.js → vm-hands-entry-lite-3p7zk3yt.js} +4 -4
  39. package/bin/vm-hands/vm-hands-entry-lite-42117xc5.js +2 -0
  40. package/bin/vm-hands/{vm-hands-entry-lite-yg9zb1nr.js → vm-hands-entry-lite-55mpsgz3.js} +5 -5
  41. package/bin/vm-hands/{vm-hands-entry-lite-4kp6abst.js → vm-hands-entry-lite-58yq5qb3.js} +2 -2
  42. package/bin/vm-hands/{vm-hands-entry-lite-w1958mev.js → vm-hands-entry-lite-5np5k3wb.js} +4 -4
  43. package/bin/vm-hands/vm-hands-entry-lite-60pnam39.js +3 -0
  44. package/bin/vm-hands/vm-hands-entry-lite-64b6nx6h.js +2 -0
  45. package/bin/vm-hands/{vm-hands-entry-lite-txd50spx.js → vm-hands-entry-lite-70hq7mrs.js} +2 -2
  46. package/bin/vm-hands/{vm-hands-entry-lite-fzbqk2qx.js → vm-hands-entry-lite-7p4qsm5s.js} +2 -2
  47. package/bin/vm-hands/{vm-hands-entry-lite-4483nna7.js → vm-hands-entry-lite-8z4k86tg.js} +4 -4
  48. package/bin/vm-hands/{vm-hands-entry-lite-t8c42p62.js → vm-hands-entry-lite-ac708gr9.js} +2 -2
  49. package/bin/vm-hands/vm-hands-entry-lite-bqqfmgaz.js +3 -0
  50. package/bin/vm-hands/{vm-hands-entry-lite-np07qyeq.js → vm-hands-entry-lite-ckezse0f.js} +2 -2
  51. package/bin/vm-hands/{vm-hands-entry-lite-hqm76r37.js → vm-hands-entry-lite-dcrz19xf.js} +3 -3
  52. package/bin/vm-hands/{vm-hands-entry-lite-3c5n0wm3.js → vm-hands-entry-lite-fa71c1fj.js} +1 -1
  53. package/bin/vm-hands/{vm-hands-entry-lite-t6f1f51j.js → vm-hands-entry-lite-fqas8pts.js} +9 -9
  54. package/bin/vm-hands/{vm-hands-entry-lite-1kkqgavp.js → vm-hands-entry-lite-h2j0q0en.js} +20 -20
  55. package/bin/vm-hands/{vm-hands-entry-lite-eabever7.js → vm-hands-entry-lite-k1wghndy.js} +4 -4
  56. package/bin/vm-hands/{vm-hands-entry-lite-18cpkdc1.js → vm-hands-entry-lite-kjznqmwj.js} +39 -39
  57. package/bin/vm-hands/{vm-hands-entry-lite-cswyn85b.js → vm-hands-entry-lite-m7pkmatv.js} +2 -2
  58. package/bin/vm-hands/{vm-hands-entry-lite-rzpg99eh.js → vm-hands-entry-lite-pn8e1xf9.js} +4 -4
  59. package/bin/vm-hands/{vm-hands-entry-lite-hyv23rd9.js → vm-hands-entry-lite-psjcmgj8.js} +4 -4
  60. package/bin/vm-hands/{vm-hands-entry-lite-f62fvme8.js → vm-hands-entry-lite-pwmvq53c.js} +4 -4
  61. package/bin/vm-hands/{vm-hands-entry-lite-vph99v9r.js → vm-hands-entry-lite-qz74j563.js} +2 -2
  62. package/bin/vm-hands/{vm-hands-entry-lite-w2n56kvf.js → vm-hands-entry-lite-qzcac2mf.js} +4 -4
  63. package/bin/vm-hands/{vm-hands-entry-lite-p62aaxk9.js → vm-hands-entry-lite-s3tt2trs.js} +3 -3
  64. package/bin/vm-hands/{vm-hands-entry-lite-rfz60hb3.js → vm-hands-entry-lite-s85p7tqp.js} +2 -2
  65. package/bin/vm-hands/{vm-hands-entry-lite-pdn0nt11.js → vm-hands-entry-lite-svd5v9dr.js} +2 -2
  66. package/bin/vm-hands/{vm-hands-entry-lite-as5c1hre.js → vm-hands-entry-lite-tarerak1.js} +3 -3
  67. package/bin/vm-hands/{vm-hands-entry-lite-wrvz9jxy.js → vm-hands-entry-lite-td73npv3.js} +2 -2
  68. package/bin/vm-hands/{vm-hands-entry-lite-3zeavsfr.js → vm-hands-entry-lite-vs47bs09.js} +1 -1
  69. package/bin/vm-hands/vm-hands-entry-lite-vwxg4fhe.js +42 -0
  70. package/bin/vm-hands/{vm-hands-entry-lite-nqdstx24.js → vm-hands-entry-lite-wp0d65yx.js} +2 -2
  71. package/bin/vm-hands/{vm-hands-entry-lite-tvgb94jk.js → vm-hands-entry-lite-wx1fmrbs.js} +3 -3
  72. package/bin/vm-hands/{vm-hands-entry-lite-51y3fyms.js → vm-hands-entry-lite-xynhzesa.js} +2 -2
  73. package/bin/vm-hands/{vm-hands-entry-lite-x1b0sm48.js → vm-hands-entry-lite-ymqb2927.js} +2 -2
  74. package/bin/vm-hands/{vm-hands-entry-lite-f5501hn3.js → vm-hands-entry-lite-zc8fsn2e.js} +2 -2
  75. package/bin/vm-hands/vm-hands-entry-lite.js +2 -2
  76. package/bin/vm-hands/{vm-hands-executor-6ex6edrw.js → vm-hands-executor-yk90fyff.js} +3 -3
  77. package/bin/vm-hands/vm-hands-op-runner-545vwzvp.js +2 -0
  78. package/bin/vm-hands/{vm-hands-runtime-c68t42yc.js → vm-hands-runtime-wr0m4gny.js} +3 -3
  79. package/bin/vm-hands/worker-preview-readiness-6kk98y4k.js +2 -0
  80. package/bin/vm-hands/worker-sandbox-j6cmex8e.js +2 -0
  81. package/package.json +1 -1
  82. package/bin/vm-hands/api-credentials-87hn92f0.js +0 -2
  83. package/bin/vm-hands/api-yg04rftf.js +0 -2
  84. package/bin/vm-hands/connect-cli-f1hg3trw.js +0 -2
  85. package/bin/vm-hands/credentials-zsgek373.js +0 -2
  86. package/bin/vm-hands/custom-endpoint-device-0a5wjyh6.js +0 -2
  87. package/bin/vm-hands/desktop-account-ythxv2x5.js +0 -2
  88. package/bin/vm-hands/device-workspace-pt07525s.js +0 -2
  89. package/bin/vm-hands/hands-worker-source-5sk272dx.js +0 -2
  90. package/bin/vm-hands/install-receipt-d5489knb.js +0 -2
  91. package/bin/vm-hands/local-automation-627gg3ya.js +0 -2
  92. package/bin/vm-hands/local-capabilities-1tap81zp.js +0 -2
  93. package/bin/vm-hands/local-desktop-users-gham2z3k.js +0 -2
  94. package/bin/vm-hands/local-display-mac-fnp3317m.js +0 -2
  95. package/bin/vm-hands/local-display-session-q2vbnpr2.js +0 -2
  96. package/bin/vm-hands/local-display-video-4kcndnqg.js +0 -2
  97. package/bin/vm-hands/local-managed-process-nzpq335j.js +0 -2
  98. package/bin/vm-hands/local-pty-session-7yr8cm6d.js +0 -2
  99. package/bin/vm-hands/managed-runtime-ptn52m9d.js +0 -2
  100. package/bin/vm-hands/network-contract-cvqgd243.js +0 -2
  101. package/bin/vm-hands/package-datdmd5r.js +0 -2
  102. package/bin/vm-hands/permissions-xp4389xm.js +0 -2
  103. package/bin/vm-hands/reason-hands-protocol-8fgk2s53.js +0 -2
  104. package/bin/vm-hands/serve-service-5q4prte5.js +0 -2
  105. package/bin/vm-hands/status-dqabww8t.js +0 -10
  106. package/bin/vm-hands/version-q9df1yye.js +0 -2
  107. package/bin/vm-hands/vm-hands-entry-lite-439wxzv9.js +0 -2
  108. package/bin/vm-hands/vm-hands-entry-lite-h3r57pgb.js +0 -2
  109. package/bin/vm-hands/vm-hands-entry-lite-js4cr7bc.js +0 -3
  110. package/bin/vm-hands/vm-hands-entry-lite-t5r1sy9z.js +0 -3
  111. package/bin/vm-hands/vm-hands-entry-lite-vx0ht58w.js +0 -42
  112. package/bin/vm-hands/vm-hands-op-runner-p3h06gcq.js +0 -2
  113. package/bin/vm-hands/worker-preview-readiness-5myda114.js +0 -2
  114. package/bin/vm-hands/worker-sandbox-phfz1pj5.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{us,Jr,Qn,Zr,ei}from"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{us as FUTURE_DEVICE_CONSENT_SCOPE,Jr as installationReceiptPath,Zr as installerReasonAlias,Qn as installerReceiptLauncher,ei as loadInstallationReceipt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Pn,Fs,js,Us,Hs,Tn}from"./vm-hands-entry-lite-8z4k86tg.js";import"./vm-hands-entry-lite-pn8e1xf9.js";import"./vm-hands-entry-lite-fqas8pts.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-xynhzesa.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-08fnapbd.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{js as ensureLocalBrowser,Pn as localAutomationAvailable,Us as localBrowserProfile,Fs as localUserChromeHost,Hs as runAutomationCallLocally,Tn as runLocalAutomation};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{es,qi,mn,ts,rs,ns,is,Ds,Ns,Ls,Ms}from"./vm-hands-entry-lite-kjznqmwj.js";import"./vm-hands-entry-lite-5np5k3wb.js";import"./vm-hands-entry-lite-s3tt2trs.js";import"./vm-hands-entry-lite-h2j0q0en.js";import"./vm-hands-entry-lite-dcrz19xf.js";import"./vm-hands-entry-lite-1zd088yv.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-ymqb2927.js";import"./vm-hands-entry-lite-8z4k86tg.js";import"./vm-hands-entry-lite-pn8e1xf9.js";import"./vm-hands-entry-lite-fqas8pts.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-xynhzesa.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-08fnapbd.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{r as LocalCapabilityError,es as SHORT_REQUEST_CAPABILITIES,Ds as capabilityInventoryForRoots,qi as confinedExecutionShell,ts as defaultLocalCommandRunner,Ns as deliverLocalHandsEnvironment,is as enrolledRootPaths,Ms as executeLocalOperation,Ls as rebindLocalHandsControl,rs as runFileCapability,ns as runTransferCapability,mn as spawnCaptured};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{At,wa,ba,Fi,ji}from"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{wa as forgetLocalDesktopUse,ji as holdLocalDesktop,At as noteLocalDesktopUse,ba as releaseLocalDesktop,Fi as trackDesktopRun};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ge,dt,Bn,Fn}from"./vm-hands-entry-lite-k1wghndy.js";export{Ge as macScreenStatus,Fn as openMacInput,Bn as openMacWindowBounds,dt as requestMacScreenAccess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ft,zs,G,qe,jt}from"./vm-hands-entry-lite-pn8e1xf9.js";import"./vm-hands-entry-lite-fqas8pts.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-xynhzesa.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{qe as ensureLinuxDesktop,Ft as localDisplayAvailable,zs as localDisplayReady,G as privateDirectory,jt as runLocalDisplayStream};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{On,In,Dn,Nn,Tr}from"./vm-hands-entry-lite-fqas8pts.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-xynhzesa.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{On as MAC_SCREEN,In as WINDOWS_SCREEN,Dn as createDisplayVideoLane,Tr as localDisplayVideoAvailable,Nn as simulatorVideoFfmpeg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ot,fr,$s,Bs}from"./vm-hands-entry-lite-s3tt2trs.js";import"./vm-hands-entry-lite-h2j0q0en.js";import"./vm-hands-entry-lite-dcrz19xf.js";import"./vm-hands-entry-lite-1zd088yv.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-ymqb2927.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{ot as ManagedProcessStoppedError,$s as controlManagedDeviceProcess,Bs as retireManagedDeviceProcess,fr as runManagedDeviceProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ir,Vt,Dr,cs,jn,Nr,Un}from"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{Vt as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES,Dr as LOCAL_PTY_MAX_SESSIONS,Ir as LOCAL_PTY_MAX_SESSION_MS,Nr as defaultConnect,cs as defaultLoginShell,jn as ptyRuntimeSupported,Un as runLocalPtySession};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cs,As,Ps,Ts,Rs,Os,Is}from"./vm-hands-entry-lite-tarerak1.js";import"./vm-hands-entry-lite-ymqb2927.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Rs as acquireManagedRuntimeDirectoryLock,Ps as currentManagedRuntimeVersion,Is as flushManagedRuntimeLifecycleEvents,Ts as isManagedRuntimeVersionExecutable,As as legacyManagedRuntimePaths,Cs as managedRuntimePaths,Os as recordManagedRuntimeLifecycle};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{rt,Te,Qs,ea,ta,ni,ra,nn,ii,bt,oi,si,ai,ci,li,ui,di,pi,hi,fi,mi,gi,_i,yi,wi,bi,pe,Y,Re,q,vi,Si,Ei,Q,xi,ki,Ci,Ai,Pi,vt,Ti,na,ar,Ri,ia,ds,oa,sa,aa,ca,la,ua,da,pa,ha,fa,ma,ga,_a,ya}from"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";export{Ti as AUTOMATION_CLOUD_SESSIONS,vt as AUTOMATION_USER_CHROME,mi as HANDS_CLOUD_ACCESS,gi as HANDS_CLOUD_ACCESS_KEY,pe as HANDS_CONFINEMENT,Y as HANDS_CONFINEMENT_KEY,ci as HANDS_ENVIRONMENT_AT_CLAIM,li as HANDS_ENVIRONMENT_AT_CLAIM_KEY,ii as HANDS_ENVIRONMENT_DELIVERY,bt as HANDS_ENVIRONMENT_DELIVER_CONTROL,_i as HANDS_HEADLESS_BROWSER,yi as HANDS_HEADLESS_BROWSER_KEY,vi as HANDS_JOBS_USER,Si as HANDS_JOBS_USER_KEY,wi as HANDS_LARGE_ENVIRONMENT,bi as HANDS_LARGE_ENVIRONMENT_KEY,Re as HANDS_MODEL_JOBS_EGRESS,q as HANDS_MODEL_JOBS_EGRESS_KEY,pi as HANDS_REBIND,fi as HANDS_REBIND_CONTROL,hi as HANDS_REBIND_KEY,xi as HANDS_SESSION_CAP_KEY,ki as HANDS_SESSION_CAP_NONE,Ei as HANDS_SESSION_GROUP,Q as HANDS_SESSION_GROUP_KEY,ui as HANDS_WORKSPACE_CHECK,di as HANDS_WORKSPACE_CHECK_KEY,Ai as JOBS_START_WAIT,Pi as JOBS_START_WAIT_KEY,Te as LOCAL_OPERATION_MAX_BYTES,rt as LOCAL_RUNTIME_PROTOCOL_VERSION,ta as LOCAL_RUNTIME_ROUTES,nn as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,ni as LOCAL_RUNTIME_SESSION_PATH,ar as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,Qs as RELAY_HOST_ALIAS_HEADER,ea as RELAY_HOST_ALIAS_VERSION,ai as VM_HANDS_UNBIND_UNVERIFIED_EVENT,oi as VM_HANDS_WORKSPACE_DEFERRED_KEY,si as VM_HANDS_WORKSPACE_GRANT_CONTROL,Ci as WORKER_PREVIEW_CARRIED_JOBS,na as WORKER_STARTUP_TIMING_STAGES,Ri as buildLocalRuntimeDeviceProofBytes,ra as localRuntimeSessionRoutable,da as parseLocalRuntimeDisconnectResponse,sa as parseLocalRuntimeEnrollmentResponse,ia as parseLocalRuntimeErrorEnvelope,ca as parseLocalRuntimeFirstHeartbeat,aa as parseLocalRuntimeHeartbeatResponse,ua as parseLocalRuntimeIdentityResponse,ha as parseLocalRuntimeLifecycleResponse,pa as parseLocalRuntimeLocalSubscriptionResponse,fa as parseLocalRuntimeOperationClaim,ya as parseLocalRuntimeOperationCompletionResponse,_a as parseLocalRuntimeOperationEnvironmentResponse,ga as parseLocalRuntimeOperationEventsResponse,ma as parseLocalRuntimeOperationHeartbeatResponse,ds as parseLocalRuntimeProofChallenge,oa as parseLocalRuntimeRegistrationResponse,la as parseLocalRuntimeRootsSyncResponse};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hn}from"./vm-hands-entry-lite-svd5v9dr.js";export default hn();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ss,as,Ws,Vs}from"./vm-hands-entry-lite-xynhzesa.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{Vs as allowMacPermissions,Ws as permissionsSummary,as as readMacPermissions,ss as reasonIdentity};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{P,Br,Fr,Hn,ht,zn,jr,Je,Se,qn,Ze,Xt,ne,Xe,Wn,Ee,Yt,Ur,Qt,Hr,Vn,ae,U,N,ce,zr,qr,Gn}from"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{Hr as REASON_HANDS_CLOSE_CODES,Ze as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,jr as REASON_HANDS_JOB_MAX_INPUT_CHARS,Je as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,Se as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,qn as REASON_HANDS_JOB_MAX_RECORDS,zn as REASON_HANDS_MAX_ERROR_CHARS,Br as REASON_HANDS_MAX_FRAME_BYTES,Fr as REASON_HANDS_MAX_INPUT_CHARS,ht as REASON_HANDS_MAX_OUTPUT_CHARS,Hn as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,P as REASON_HANDS_PROTOCOL_VERSION,Ur as REASON_HANDS_PTY_ANCHOR_EXIT_MS,Qt as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,Yt as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,Ee as REASON_HANDS_PTY_MAX_DIMENSION,ne as REASON_HANDS_PTY_MAX_INPUT_BYTES,Xe as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,Wn as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,Xt as REASON_HANDS_PTY_PROTOCOL_VERSION,Vn as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,U as isReasonHandsGeneration,ce as isReasonHandsPtyJobId,ae as isReasonHandsRequestId,N as isReasonHandsUuid,zr as parseReasonHandsJobRequest,qr as parseReasonHandsJobResult,Gn as parseReasonHandsPtyReceipt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wr,xe,J,Kn,Gs,Ro,Ks,Ye,ls,Jn,Js,Zs,Vr,Xs,Ys}from"./vm-hands-entry-lite-08fnapbd.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Wr as WORKER_SERVICE_ENV,J as WorkerServiceError,Ro as connectServiceLabel,xe as defaultWorkerServiceHost,Zs as installWorkerService,Ye as installedWorkerService,Ks as isConnectServiceLabel,Ys as removeWorkerService,Vr as restartWorkerService,Xs as retargetWorkerServiceLogs,ls as retireLegacyWorkerService,Js as workerServiceDefinitionCurrent,Kn as workerServiceLauncher,Jn as workerServiceProcessRunning,Gs as workerServiceRetargetPending};
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import"./vm-hands-entry-lite-bqqfmgaz.js";import"./vm-hands-entry-lite-fcvf8md1.js";import{_}from"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-pwmvq53c.js";import"./vm-hands-entry-lite-s85p7tqp.js";import"./vm-hands-entry-lite-42117xc5.js";import"./vm-hands-entry-lite-fa71c1fj.js";import{Kt,pt}from"./vm-hands-entry-lite-3p7zk3yt.js";import{w,M,pr,Be,it}from"./vm-hands-entry-lite-21pw3ra3.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-kjznqmwj.js";import"./vm-hands-entry-lite-h2j0q0en.js";import"./vm-hands-entry-lite-dcrz19xf.js";import"./vm-hands-entry-lite-5np5k3wb.js";import"./vm-hands-entry-lite-60pnam39.js";import"./vm-hands-entry-lite-fqas8pts.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-55mpsgz3.js";import"./vm-hands-entry-lite-xynhzesa.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-tarerak1.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-08fnapbd.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-1zd088yv.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-s3tt2trs.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-pn8e1xf9.js";import"./vm-hands-entry-lite-8z4k86tg.js";import"./vm-hands-entry-lite-7p4qsm5s.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-ymqb2927.js";import{a}from"./vm-hands-entry-lite-0sh835na.js";import{t,o,u,i,s,n}from"./vm-hands-entry-lite-qzcac2mf.js";import"./vm-hands-entry-lite-qz74j563.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 f(e){return`claude mcp add --transport http reason ${e}`}function h(e){return`codex mcp add reason --url ${e}
3
+ codex mcp login reason`}var F=f("https://mcp.reasonmachines.com/mcp"),z=h("https://mcp.reasonmachines.com/mcp"),B=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,H=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var b="https://github.com/reason-machines/reason-plugins",X=`Connect a coding agent to Reason over MCP
4
+
5
+ Usage:
6
+ reason mcp Show how to connect Claude Code, Codex, or another MCP client
7
+ reason mcp uninstall Remove only this machine's registrations of the earlier, retired server
8
+
9
+ Plugins for Claude Code and Codex: ${b}
10
+ `;var P=s(["granted","not_granted","unknown"]),C=i({status:P,checkedAt:o().finite(),executablePath:t().min(1)});var Oe=i({version:n(1),key:t(),at:o(),self:i({principal_type:t(),user_id:t().optional(),user_name:t().nullish(),email:t().nullish(),org_id:t(),organization_name:t().nullish(),organization_slug:t().nullish(),mcp_connections:u(i({client_id:t(),client_name:t(),last_used_at:t().nullable()})).optional()})});var x=30000;function L(e,c=Date.now(),y=null){let r=pt(e),d=(()=>{if(r?.state!=="connected"&&r?.state!=="starting")return!1;try{return process.kill(r.pid,0),!0}catch{return!1}})(),R=d&&r?.state==="connected",p=(g)=>R&&c-g>=0&&c-g<x,l=C.safeParse(r?.fullDiskAccess),m=Kt(r,y,c);return{...m?{permission_recovery:m}:{},full_disk_access:l.success&&p(l.data.checkedAt)?l.data.status:"unknown",keep_awake:{enabled:pr(e)==="battery_and_ac",holding:r?.idleSleepHold===!0&&p(Date.parse(r.lastHeartbeatAt??""))},executable:d&&l.success?l.data.executablePath:null}}function De(e=_()){if(process.platform!=="darwin")return null;let c=Be(I(it(k(a()),e),"worker.json"));return c?L(w(c).daemon,Date.now(),M(c)):null}export{De as connectionMacState};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qe,Yn}from"./vm-hands-entry-lite-42117xc5.js";export{Yn as CLI_USER_AGENT,Qe as CLI_VERSION};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{C}from"./vm-hands-entry-lite-vph99v9r.js";import{execFileSync as h}from"child_process";import{mkdirSync as k,readdirSync as D,readFileSync as w,rmSync as g,statSync as x,writeFileSync as L}from"fs";import{join as p,sep as y}from"path";import{setTimeout as _}from"timers/promises";var P=3000,u=null;function S(e){return p(e,"users")}function xt(e){if(u?.root===e.root)return;let o=S(e.root);k(o,{recursive:!0,mode:448}),L(p(o,String(process.pid)),"",{mode:384}),u=e}function ga(){if(!u)return;g(p(S(u.root),String(process.pid)),{force:!0}),u=null}function m(e){try{return process.kill(e,0),!0}catch(o){return o instanceof Error&&"code"in o&&o.code==="EPERM"}}function E(){let e=process.getuid?.();if(process.platform==="linux")return D("/proc").flatMap((n)=>{if(!/^\d+$/.test(n))return[];try{if(x(`/proc/${n}`).uid!==e)return[];let s=w(`/proc/${n}/cmdline`).toString("utf8").split("\x00").join(" ").trim();return s?[{pid:Number(n),command:s}]:[]}catch{return[]}});if(process.platform==="win32")return h(C("powershell.exe"),["-NoLogo","-NoProfile","-NonInteractive","-Command",'Get-CimInstance Win32_Process | ForEach-Object { "$($_.ProcessId) $($_.CommandLine)" }'],{encoding:"utf8",maxBuffer:16777216,windowsHide:!0}).split(/\r?\n/).flatMap((s)=>{let l=/^(\d+) (.+)$/.exec(s.trim());return l?[{pid:Number(l[1]),command:l[2]}]:[]});return h("/bin/ps",["-axww","-o","pid=,uid=,command="],{encoding:"utf8",maxBuffer:16777216}).split(`
3
- `).flatMap((n)=>{let s=/^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(n);return s&&Number(s[2])===e?[{pid:Number(s[1]),command:s[3]}]:[]})}async function _a(){let e=u;if(!e)return{released:"unused",stopped:0};let o=S(e.root);g(p(o,String(process.pid)),{force:!0}),u=null;let n=!1;for(let t of D(o)){let c=Number(t);if(Number.isSafeInteger(c)&&c>0&&m(c))n=!0;else g(p(o,t),{force:!0})}if(n)return{released:"shared",stopped:0};let s=E().filter((t)=>t.pid!==process.pid&&(t.command.includes(`${e.root}${y}`)||t.command.includes(`${e.automation}${y}`)||t.command.includes(e.extensionDir))),l=(t,c)=>{try{process.kill(t,c)}catch{}};for(let t of s)l(t.pid,"SIGTERM");for(let t=Date.now()+P;Date.now()<t&&s.some((c)=>m(c.pid));)await new Promise((c)=>setTimeout(c,100));for(let t of s)if(m(t.pid))l(t.pid,"SIGKILL");return{released:"stopped",stopped:s.length}}var M=20000,N=30000,O=100,a=new Map,i=null,b=0,f=[];function Mi(e){a.set(e,(a.get(e)??0)+1);let o=!1;return()=>{if(o)return;o=!0;let n=(a.get(e)??1)-1;if(n>0){a.set(e,n);return}if(a.delete(e),i?.run===e)i.idleUntil=0}}function T(){return new r("automation_desktop_busy","Another Session, or another agent of this Session, is using this worker's desktop. Retry after it finishes.")}function U(e,o){return i!==null&&i.run!==e&&(i.calls>0||o<i.idleUntil)}async function $i(e,o,n=Date.now,s="run"){let l=Symbol(e);f.push(l);try{let d=n()+N;for(;;){if(b===0&&!U(e,n())&&(i?.run===e||f[0]===l))break;if(n()>=d)throw T();await _(O,void 0,{signal:o}).catch(()=>o.throwIfAborted())}}finally{f.splice(f.indexOf(l),1)}if(s==="call"&&!(i?.run===e&&(i.calls>0||n()<i.idleUntil))){b+=1;let d=!1;return()=>{if(d)return;d=!0,b-=1}}if(i?.run!==e)i={run:e,calls:0,idleUntil:0};let t=i;t.calls+=1;let c=!1;return()=>{if(c)return;c=!0,t.calls-=1,t.idleUntil=n()+M}}
4
- export{xt,ga,_a,Mi,$i};
2
+ import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{C}from"./vm-hands-entry-lite-qz74j563.js";import{execFileSync as h}from"child_process";import{mkdirSync as k,readdirSync as D,readFileSync as w,rmSync as g,statSync as x,writeFileSync as L}from"fs";import{join as p,sep as y}from"path";import{setTimeout as _}from"timers/promises";var P=3000,u=null;function S(e){return p(e,"users")}function At(e){if(u?.root===e.root)return;let o=S(e.root);k(o,{recursive:!0,mode:448}),L(p(o,String(process.pid)),"",{mode:384}),u=e}function wa(){if(!u)return;g(p(S(u.root),String(process.pid)),{force:!0}),u=null}function m(e){try{return process.kill(e,0),!0}catch(o){return o instanceof Error&&"code"in o&&o.code==="EPERM"}}function E(){let e=process.getuid?.();if(process.platform==="linux")return D("/proc").flatMap((n)=>{if(!/^\d+$/.test(n))return[];try{if(x(`/proc/${n}`).uid!==e)return[];let s=w(`/proc/${n}/cmdline`).toString("utf8").split("\x00").join(" ").trim();return s?[{pid:Number(n),command:s}]:[]}catch{return[]}});if(process.platform==="win32")return h(C("powershell.exe"),["-NoLogo","-NoProfile","-NonInteractive","-Command",'Get-CimInstance Win32_Process | ForEach-Object { "$($_.ProcessId) $($_.CommandLine)" }'],{encoding:"utf8",maxBuffer:16777216,windowsHide:!0}).split(/\r?\n/).flatMap((s)=>{let l=/^(\d+) (.+)$/.exec(s.trim());return l?[{pid:Number(l[1]),command:l[2]}]:[]});return h("/bin/ps",["-axww","-o","pid=,uid=,command="],{encoding:"utf8",maxBuffer:16777216}).split(`
3
+ `).flatMap((n)=>{let s=/^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(n);return s&&Number(s[2])===e?[{pid:Number(s[1]),command:s[3]}]:[]})}async function ba(){let e=u;if(!e)return{released:"unused",stopped:0};let o=S(e.root);g(p(o,String(process.pid)),{force:!0}),u=null;let n=!1;for(let t of D(o)){let c=Number(t);if(Number.isSafeInteger(c)&&c>0&&m(c))n=!0;else g(p(o,t),{force:!0})}if(n)return{released:"shared",stopped:0};let s=E().filter((t)=>t.pid!==process.pid&&(t.command.includes(`${e.root}${y}`)||t.command.includes(`${e.automation}${y}`)||t.command.includes(e.extensionDir))),l=(t,c)=>{try{process.kill(t,c)}catch{}};for(let t of s)l(t.pid,"SIGTERM");for(let t=Date.now()+P;Date.now()<t&&s.some((c)=>m(c.pid));)await new Promise((c)=>setTimeout(c,100));for(let t of s)if(m(t.pid))l(t.pid,"SIGKILL");return{released:"stopped",stopped:s.length}}var M=20000,N=30000,O=100,a=new Map,i=null,b=0,f=[];function Fi(e){a.set(e,(a.get(e)??0)+1);let o=!1;return()=>{if(o)return;o=!0;let n=(a.get(e)??1)-1;if(n>0){a.set(e,n);return}if(a.delete(e),i?.run===e)i.idleUntil=0}}function T(){return new r("automation_desktop_busy","Another Session, or another agent of this Session, is using this worker's desktop. Retry after it finishes.")}function U(e,o){return i!==null&&i.run!==e&&(i.calls>0||o<i.idleUntil)}async function ji(e,o,n=Date.now,s="run"){let l=Symbol(e);f.push(l);try{let d=n()+N;for(;;){if(b===0&&!U(e,n())&&(i?.run===e||f[0]===l))break;if(n()>=d)throw T();await _(O,void 0,{signal:o}).catch(()=>o.throwIfAborted())}}finally{f.splice(f.indexOf(l),1)}if(s==="call"&&!(i?.run===e&&(i.calls>0||n()<i.idleUntil))){b+=1;let d=!1;return()=>{if(d)return;d=!0,b-=1}}if(i?.run!==e)i={run:e,calls:0,idleUntil:0};let t=i;t.calls+=1;let c=!1;return()=>{if(c)return;c=!0,t.calls-=1,t.idleUntil=n()+M}}
4
+ export{At,wa,ba,Fi,ji};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{_}from"./vm-hands-entry-lite-nqdstx24.js";import{Kr,ei,Jr,ti}from"./vm-hands-entry-lite-3zeavsfr.js";import{Xn,Yt,Io}from"./vm-hands-entry-lite-yg9zb1nr.js";import{C}from"./vm-hands-entry-lite-vph99v9r.js";import{spawnSync as y}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 p,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as g}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 S(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}=${S(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}=${S(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(S).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${S(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 A(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=A(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{_}from"./vm-hands-entry-lite-wp0d65yx.js";import{Jr,Qn,Zr,ei}from"./vm-hands-entry-lite-vs47bs09.js";import{Zn,er,Lo}from"./vm-hands-entry-lite-55mpsgz3.js";import{C}from"./vm-hands-entry-lite-qz74j563.js";import{spawnSync as y}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 p,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as g}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 S(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}=${S(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}=${S(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(S).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${S(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 A(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=A(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>${A(r.description)}</Description>
@@ -42,12 +42,12 @@ import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{_}from"./vm-hands-entry-
42
42
  `)}function j(r,e){return["/Create","/TN",r,"/XML",e,"/F"]}function I(r){return["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",Buffer.from(r,"utf16le").toString("base64")]}function x(r){return`'*${M(r).replaceAll("'","''")}*'`}function E(r,e){return I(["$all = @(Get-CimInstance Win32_Process)",`$wrappers = @($all | ? { $_.ProcessId -ne $PID -and $_.CommandLine -like ${x(r)} })`,...e.keepWrapper?[]:["foreach ($w in $wrappers) { Stop-Process -Id $w.ProcessId -Force -ErrorAction SilentlyContinue }"],`foreach ($w in $wrappers) { $all | ? { $_.ParentProcessId -eq $w.ProcessId } | % { taskkill.exe /F ${e.tree?"/T ":""}/PID $_.ProcessId | Out-Null } }`].join(`
43
43
  `))}function F(r){return I(["$all = @(Get-CimInstance Win32_Process)",`$wrappers = @($all | ? { $_.ProcessId -ne $PID -and $_.CommandLine -like ${x(r)} })`,"foreach ($w in $wrappers) { if ($all | ? { $_.ParentProcessId -eq $w.ProcessId -and $_.Name -ne 'conhost.exe' }) { 'running'; exit 0 } }","exit 1"].join(`
44
44
  `))}function X(r,e=process.pid){let n=de(C("powershell.exe"),I(["$all = @{}; Get-CimInstance Win32_Process | % { $all[[int]$_.ProcessId] = $_ }",`$p = $all[${Math.trunc(e)}]`,"for ($i = 0; $p -and $i -lt 64; $i++) {",` if ($p.CommandLine -like ${x(r)}) { exit 10 }`," $n = $all[[int]$p.ParentProcessId]"," if (-not $n -or $n.ProcessId -eq $p.ProcessId -or $n.CreationDate -gt $p.CreationDate) { exit 11 }"," $p = $n","}","exit 11"].join(`
45
- `)),{stdio:"ignore",timeout:15000,windowsHide:!0});return n.status===10?!0:n.status===11?!1:null}var qr="REASON_WORKER_SERVICE",Ae="worker_identity_unavailable";function xe(r){return{platform:process.platform,home:r,uid:process.getuid?.(),command:(e,n)=>y(C(e),[...n],{stdio:"ignore"}).status??1,read:(e,n)=>{let t=y(C(e),[...n],{stdio:["ignore","pipe","ignore"],encoding:"utf8",timeout:1e4});return t.status===0?t.stdout:null},sleep:(e)=>Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e),workerIdentity:(e)=>Io(r,e),insideService:(e,n)=>Ie(e,process.platform,process.getuid?.(),n)}}function Ie(r,e,n,t=!0){if(process.env[qr]===r||process.env.XPC_SERVICE_NAME===r)return!0;if(e==="linux")try{return p("/proc/self/cgroup","utf8").includes(`/${r}.service`)}catch{return!0}if(e==="win32")return X(r)??t;if(e!=="darwin")return!1;if(typeof n!=="number")return!0;let i=y("/bin/launchctl",["print",`gui/${n}/${r}`],{encoding:"utf8",timeout:5000});if(i.status===Ee)return!1;if(i.error||i.status!==0)return!0;let s=Number(/^\s*pid = (\d+)$/m.exec(i.stdout??"")?.[1]??0);if(!s)return!1;let a=process.pid;for(let o=0;o<64&&a>1;o+=1){if(a===s)return!0;let l=y("/bin/ps",["-o","ppid=","-p",String(a)],{encoding:"utf8",timeout:5000}),c=Number(l.stdout?.trim());if(l.error||l.status!==0||!Number.isSafeInteger(c)||c<=0)return!0;if(c===a)return!1;a=c}return a>1}var Ee=113;class J extends Error{code;constructor(r,e){super(r);this.code=e}}function Jn(r,e){if(!re(r.home,r.platform))throw new J(ee);if(r.platform==="darwin")k(r);let n=ti(Kr(e,r.home)),t=_({env:e})==="staging",i=t?"ara-staging":"ara",s=[n?ei(n):null,T(e,"REASON_CLI_LAUNCHER_PATH")?.trim(),r.platform==="win32"?g(r.home,"AppData","Local","Reason",...t?["staging"]:[],"bin",t?"reason-staging.exe":"reason.exe"):g(r.home,".local","bin",i)];for(let a of s)try{if(a&&q(a)&&ve(a).isFile())return Jr(a)}catch{}throw new J(`A background service runs the installed Reason launcher, which was not found. Install Reason with: ${r.platform==="win32"?"irm https://reasonmachines.com/install.ps1 | iex":"curl -fsSL https://reasonmachines.com/install | sh"}`,"worker_launcher_missing")}var R=/(<key>ProgramArguments<\/key>\s*<array>\n)((?:\s*<string>[^<]*<\/string>\n)*)(\s*<\/array>)/,w=new RegExp(`(\\n\\s*<key>${Yt}</key>\\s*<string>)[^<]*(</string>)`),_e=/(<key>EnvironmentVariables<\/key>\s*<dict>[\s\S]*?)(\n\s*<\/dict>)/;function Te(r){return r.replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&apos;","'").replaceAll("&amp;","&")}function Y(r){let e=[...(R.exec(r)?.[2]??"").matchAll(/<string>([^<]*)<\/string>/g)].map((t)=>Te(t[1])),n=e[1]==="--run-worker"?e.slice(2):e;return n[0]?{launcher:n[0],args:n.slice(1)}:null}function z(r,e,n){let t=n.workerIdentity?.(r)??null;return{program:t?[t.executable,"--run-worker",r,...e]:[r,...e],identity:t}}function h(r){return r.map((e)=>` <string>${d(e)}</string>`).join(`
46
- `)}function Z(r,e){let n;try{n=p(r,"utf8")}catch{return null}let t=Y(n);if(!t)return null;let i=q(t.launcher)?Jr(t.launcher):t.launcher,{program:s,identity:a}=z(i,t.args,e),o=n.replace(R,(l,c,m,O)=>`${c}${h(s)}
45
+ `)),{stdio:"ignore",timeout:15000,windowsHide:!0});return n.status===10?!0:n.status===11?!1:null}var Wr="REASON_WORKER_SERVICE",Ae="worker_identity_unavailable";function xe(r){return{platform:process.platform,home:r,uid:process.getuid?.(),command:(e,n)=>y(C(e),[...n],{stdio:"ignore"}).status??1,read:(e,n)=>{let t=y(C(e),[...n],{stdio:["ignore","pipe","ignore"],encoding:"utf8",timeout:1e4});return t.status===0?t.stdout:null},sleep:(e)=>Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e),workerIdentity:(e)=>Lo(r,e),insideService:(e,n)=>Ie(e,process.platform,process.getuid?.(),n)}}function Ie(r,e,n,t=!0){if(process.env[Wr]===r||process.env.XPC_SERVICE_NAME===r)return!0;if(e==="linux")try{return p("/proc/self/cgroup","utf8").includes(`/${r}.service`)}catch{return!0}if(e==="win32")return X(r)??t;if(e!=="darwin")return!1;if(typeof n!=="number")return!0;let i=y("/bin/launchctl",["print",`gui/${n}/${r}`],{encoding:"utf8",timeout:5000});if(i.status===Ee)return!1;if(i.error||i.status!==0)return!0;let s=Number(/^\s*pid = (\d+)$/m.exec(i.stdout??"")?.[1]??0);if(!s)return!1;let a=process.pid;for(let o=0;o<64&&a>1;o+=1){if(a===s)return!0;let l=y("/bin/ps",["-o","ppid=","-p",String(a)],{encoding:"utf8",timeout:5000}),c=Number(l.stdout?.trim());if(l.error||l.status!==0||!Number.isSafeInteger(c)||c<=0)return!0;if(c===a)return!1;a=c}return a>1}var Ee=113;class J extends Error{code;constructor(r,e){super(r);this.code=e}}function Kn(r,e){if(!re(r.home,r.platform))throw new J(ee);if(r.platform==="darwin")k(r);let n=ei(Jr(e,r.home)),t=_({env:e})==="staging",i=t?"ara-staging":"ara",s=[n?Qn(n):null,T(e,"REASON_CLI_LAUNCHER_PATH")?.trim(),r.platform==="win32"?g(r.home,"AppData","Local","Reason",...t?["staging"]:[],"bin",t?"reason-staging.exe":"reason.exe"):g(r.home,".local","bin",i)];for(let a of s)try{if(a&&q(a)&&ve(a).isFile())return Zr(a)}catch{}throw new J(`A background service runs the installed Reason launcher, which was not found. Install Reason with: ${r.platform==="win32"?"irm https://reasonmachines.com/install.ps1 | iex":"curl -fsSL https://reasonmachines.com/install | sh"}`,"worker_launcher_missing")}var R=/(<key>ProgramArguments<\/key>\s*<array>\n)((?:\s*<string>[^<]*<\/string>\n)*)(\s*<\/array>)/,w=new RegExp(`(\\n\\s*<key>${er}</key>\\s*<string>)[^<]*(</string>)`),_e=/(<key>EnvironmentVariables<\/key>\s*<dict>[\s\S]*?)(\n\s*<\/dict>)/;function Te(r){return r.replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&apos;","'").replaceAll("&amp;","&")}function Y(r){let e=[...(R.exec(r)?.[2]??"").matchAll(/<string>([^<]*)<\/string>/g)].map((t)=>Te(t[1])),n=e[1]==="--run-worker"?e.slice(2):e;return n[0]?{launcher:n[0],args:n.slice(1)}:null}function z(r,e,n){let t=n.workerIdentity?.(r)??null;return{program:t?[t.executable,"--run-worker",r,...e]:[r,...e],identity:t}}function h(r){return r.map((e)=>` <string>${d(e)}</string>`).join(`
46
+ `)}function Z(r,e){let n;try{n=p(r,"utf8")}catch{return null}let t=Y(n);if(!t)return null;let i=q(t.launcher)?Zr(t.launcher):t.launcher,{program:s,identity:a}=z(i,t.args,e),o=n.replace(R,(l,c,m,O)=>`${c}${h(s)}
47
47
  ${O}`);if(!a)o=o.replace(w,"");else if(w.test(o))o=o.replace(w,(l,c,m)=>`${c}${d(a.app)}${m}`);else o=o.replace(_e,(l,c,m)=>`${c}
48
- <key>${Yt}</key>
49
- <string>${d(a.app)}</string>${m}`);return o===n?null:o}function Pe(r,e){let n=Z(r,e);if(n!==null)W(r,n)}function qs(r,e,n){if(e.platform!=="darwin")return!1;let t=Ye(r,e,n);return t!==null&&Z(t.definition,e)!==null}var b="com.reasonmachines.worker.",N="so.reason.worker.",Q=[b,N];function Ao(r,e=b){return`${e}connect${r==="production"?"":`.${r}`}`}function Ws(r,e){return Q.some((n)=>r===Ao(e,n))}function Re(r,e,n){if(e==="connect")return Ao(r.channel,n);let t=ke("sha256").update(r.workspaceRoot).digest("hex").slice(0,8);return`${n}${r.name.toLowerCase()}.${t}`}var ee="A background service needs macOS (launchd), Linux (systemd --user) or Windows (Task Scheduler).";function re(r,e){if(e==="darwin")return{directory:g(r,"Library","LaunchAgents"),suffix:".plist"};if(e==="linux")return{directory:g(r,".config","systemd","user"),suffix:".service"};if(e==="win32")return{directory:H(r),suffix:".xml"};return null}function f(r,e,n,t=b){let i=Re(r,n,t),s=re(e.home,e.platform);if(!s)return null;return{label:i,definition:g(s.directory,`${i}${s.suffix}`),logs:e.platform==="linux"?`journalctl --user -u ${i}.service`:g(r.stateDirectory,"service.log")}}function Ye(r,e,n="serve"){return ne(r,e,n)[0]??null}function ne(r,e,n){return Q.map((t)=>f(r,e,n,t)).filter((t)=>t!==null&&P(t.definition))}function te(r,e,n){let t=f(r,e,n,N);return t&&P(t.definition)?t:null}function ss(r,e,n){let t=f(r,e,n),i=te(r,e,n);if(!t||!i||!P(t.definition)||e.insideService?.(i.label))return null;if(!Ce(t,e))return"current_not_running";if(e.platform==="darwin"){if(typeof e.uid==="number"&&e.uid>0)e.command("/bin/launchctl",["bootout",`gui/${e.uid}/${i.label}`]);return u(i.definition,{force:!0}),"retired"}if(e.platform==="win32")return v(i,e,!0),"retired";return e.command("systemctl",["--user","disable","--now",`${i.label}.service`]),u(i.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"]),"retired"}function Ce(r,e){if(e.platform==="darwin")return typeof e.uid==="number"&&e.uid>0&&e.command("/bin/launchctl",["print",`gui/${e.uid}/${r.label}`])===0;if(e.platform==="win32")return e.command("schtasks",["/Query","/TN",r.label])===0;let n=`${r.label}.service`;return e.command("systemctl",["--user","is-enabled","--quiet",n])===0&&he.has(e.read("systemctl",["--user","show","--property=ActiveState","--value",n])?.trim()??"")}var he=new Set(["active","activating","reloading"]);function Zn(r,e){if(e.platform==="darwin"){if(typeof e.uid!=="number"||e.uid<=0)return!1;let n=e.read("/bin/launchctl",["print",`gui/${e.uid}/${r.label}`]);return Number(/^\s*pid = (\d+)$/m.exec(n??"")?.[1]??0)>0}if(e.platform==="win32")return e.read("powershell.exe",F(r.label))?.trim()==="running";return Number(e.read("systemctl",["--user","show","--property=MainPID","--value",`${r.label}.service`])?.trim()??0)>0}function Vs(r){let{config:e,launcher:n,host:t,kind:i}=r,s=f(e,t,i);if(!s)return!1;let a;try{a=t.platform==="win32"?V(s.definition):p(s.definition,"utf8")}catch{return!1}if(t.platform==="win32")return a===se(e,i,s,n);if(t.platform!=="darwin")return a===oe(e,i,s,n,t.home,r.path);let o=Y(a);return a.replace(w,"").replace(R,(c,m,O,ue)=>`${m}${o?`${h([o.launcher,...o.args])}
50
- `:""}${ue}`)===ie(e,i,s,n,{...t,workerIdentity:()=>null},r.path).plist}function L(r,e){if(e==="connect")return{args:["connect"],environment:{REASON_CLI_CHANNEL:r.channel},description:"Reason connection of this computer"};return{args:["serve",r.name,"--dir",r.workspaceRoot,...r.executionMode==="confined"?["--sandbox"]:[]],environment:{},description:`Reason machine ${r.name} worker`}}function d(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function G(r,e=!1){if(/[\0-\x1f\x7f]/.test(r))throw new J("A background service cannot use a path with control characters.");let n=r.replaceAll("\\","\\\\").replaceAll('"',"\\\"").replaceAll("%","%%");return`"${e?n.replaceAll("$","$$$$"):n}"`}function ie(r,e,n,t,i,s){let a=L(r,e),o=z(t,a.args,i),l={HOME:i.home,PATH:s,[qr]:n.label,...a.environment,...o.identity?{[Yt]:o.identity.app}:{}};return{identity:o.identity,plist:`<?xml version="1.0" encoding="UTF-8"?>
48
+ <key>${er}</key>
49
+ <string>${d(a.app)}</string>${m}`);return o===n?null:o}function Pe(r,e){let n=Z(r,e);if(n!==null)W(r,n)}function Gs(r,e,n){if(e.platform!=="darwin")return!1;let t=Ye(r,e,n);return t!==null&&Z(t.definition,e)!==null}var b="com.reasonmachines.worker.",N="so.reason.worker.",Q=[b,N];function Ro(r,e=b){return`${e}connect${r==="production"?"":`.${r}`}`}function Ks(r,e){return Q.some((n)=>r===Ro(e,n))}function Re(r,e,n){if(e==="connect")return Ro(r.channel,n);let t=ke("sha256").update(r.workspaceRoot).digest("hex").slice(0,8);return`${n}${r.name.toLowerCase()}.${t}`}var ee="A background service needs macOS (launchd), Linux (systemd --user) or Windows (Task Scheduler).";function re(r,e){if(e==="darwin")return{directory:g(r,"Library","LaunchAgents"),suffix:".plist"};if(e==="linux")return{directory:g(r,".config","systemd","user"),suffix:".service"};if(e==="win32")return{directory:H(r),suffix:".xml"};return null}function f(r,e,n,t=b){let i=Re(r,n,t),s=re(e.home,e.platform);if(!s)return null;return{label:i,definition:g(s.directory,`${i}${s.suffix}`),logs:e.platform==="linux"?`journalctl --user -u ${i}.service`:g(r.stateDirectory,"service.log")}}function Ye(r,e,n="serve"){return ne(r,e,n)[0]??null}function ne(r,e,n){return Q.map((t)=>f(r,e,n,t)).filter((t)=>t!==null&&P(t.definition))}function te(r,e,n){let t=f(r,e,n,N);return t&&P(t.definition)?t:null}function ls(r,e,n){let t=f(r,e,n),i=te(r,e,n);if(!t||!i||!P(t.definition)||e.insideService?.(i.label))return null;if(!Ce(t,e))return"current_not_running";if(e.platform==="darwin"){if(typeof e.uid==="number"&&e.uid>0)e.command("/bin/launchctl",["bootout",`gui/${e.uid}/${i.label}`]);return u(i.definition,{force:!0}),"retired"}if(e.platform==="win32")return v(i,e,!0),"retired";return e.command("systemctl",["--user","disable","--now",`${i.label}.service`]),u(i.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"]),"retired"}function Ce(r,e){if(e.platform==="darwin")return typeof e.uid==="number"&&e.uid>0&&e.command("/bin/launchctl",["print",`gui/${e.uid}/${r.label}`])===0;if(e.platform==="win32")return e.command("schtasks",["/Query","/TN",r.label])===0;let n=`${r.label}.service`;return e.command("systemctl",["--user","is-enabled","--quiet",n])===0&&he.has(e.read("systemctl",["--user","show","--property=ActiveState","--value",n])?.trim()??"")}var he=new Set(["active","activating","reloading"]);function Jn(r,e){if(e.platform==="darwin"){if(typeof e.uid!=="number"||e.uid<=0)return!1;let n=e.read("/bin/launchctl",["print",`gui/${e.uid}/${r.label}`]);return Number(/^\s*pid = (\d+)$/m.exec(n??"")?.[1]??0)>0}if(e.platform==="win32")return e.read("powershell.exe",F(r.label))?.trim()==="running";return Number(e.read("systemctl",["--user","show","--property=MainPID","--value",`${r.label}.service`])?.trim()??0)>0}function Js(r){let{config:e,launcher:n,host:t,kind:i}=r,s=f(e,t,i);if(!s)return!1;let a;try{a=t.platform==="win32"?V(s.definition):p(s.definition,"utf8")}catch{return!1}if(t.platform==="win32")return a===se(e,i,s,n);if(t.platform!=="darwin")return a===oe(e,i,s,n,t.home,r.path);let o=Y(a);return a.replace(w,"").replace(R,(c,m,O,ue)=>`${m}${o?`${h([o.launcher,...o.args])}
50
+ `:""}${ue}`)===ie(e,i,s,n,{...t,workerIdentity:()=>null},r.path).plist}function L(r,e){if(e==="connect")return{args:["connect"],environment:{REASON_CLI_CHANNEL:r.channel},description:"Reason connection of this computer"};return{args:["serve",r.name,"--dir",r.workspaceRoot,...r.executionMode==="confined"?["--sandbox"]:[]],environment:{},description:`Reason machine ${r.name} worker`}}function d(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function G(r,e=!1){if(/[\0-\x1f\x7f]/.test(r))throw new J("A background service cannot use a path with control characters.");let n=r.replaceAll("\\","\\\\").replaceAll('"',"\\\"").replaceAll("%","%%");return`"${e?n.replaceAll("$","$$$$"):n}"`}function ie(r,e,n,t,i,s){let a=L(r,e),o=z(t,a.args,i),l={HOME:i.home,PATH:s,[Wr]:n.label,...a.environment,...o.identity?{[er]:o.identity.app}:{}};return{identity:o.identity,plist:`<?xml version="1.0" encoding="UTF-8"?>
51
51
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
52
52
  <plist version="1.0">
53
53
  <dict>
@@ -55,7 +55,7 @@ ${O}`);if(!a)o=o.replace(w,"");else if(w.test(o))o=o.replace(w,(l,c,m)=>`${c}${d
55
55
  <string>${d(n.label)}</string>
56
56
  <key>AssociatedBundleIdentifiers</key>
57
57
  <array>
58
- <string>${Xn}</string>
58
+ <string>${Zn}</string>
59
59
  </array>
60
60
  <key>ProgramArguments</key>
61
61
  <array>
@@ -93,7 +93,7 @@ Description=${a.description}
93
93
 
94
94
  [Service]
95
95
  ExecStart=${[t,...a.args].map((o)=>G(o,!0)).join(" ")}
96
- Environment=${[`HOME=${i}`,`PATH=${s}`,`${qr}=${n.label}`,...Object.entries(a.environment).map(([o,l])=>`${o}=${l}`)].map((o)=>G(o)).join(" ")}
96
+ Environment=${[`HOME=${i}`,`PATH=${s}`,`${Wr}=${n.label}`,...Object.entries(a.environment).map(([o,l])=>`${o}=${l}`)].map((o)=>G(o)).join(" ")}
97
97
  Restart=on-failure
98
98
  RestartSec=10
99
99
  TimeoutStopSec=${Math.ceil(r.shutdownGraceMs/1000)+10}
@@ -101,5 +101,5 @@ UMask=0077
101
101
 
102
102
  [Install]
103
103
  WantedBy=default.target
104
- `}function se(r,e,n,t){let i=L(r,e);return U({description:i.description,schedule:"logon",script:K({name:n.label,program:t,args:i.args,environment:{[qr]:n.label,...i.environment},log:n.logs,keepAlive:!0})})}function ae(r,e,n){e.command("powershell.exe",E(r.label,{tree:n,keepWrapper:!n}))}function v(r,e,n){e.command("schtasks",["/Delete","/F","/TN",r.label]),e.command("powershell.exe",E(r.label,{tree:n,keepWrapper:!1})),u(r.definition,{force:!0})}function W(r,e){$e(We(r),{recursive:!0,mode:448});let n=`${r}.${Se()}.tmp`;try{be(n,e,{mode:384,flag:"wx"}),we(n,384),ye(n,r)}finally{u(n,{force:!0})}}function k(r){if(typeof r.uid!=="number"||!Number.isSafeInteger(r.uid)||r.uid<=0)throw new J("Set up a background service as your own user, not with sudo.","worker_service_root_user");return`gui/${r.uid}`}function Gs(r){let{config:e,launcher:n,host:t}=r,i=r.kind??"serve",s=te(e,t,i),a=s!==null&&t.insideService?.(s.label)===!0,o=f(e,t,i,a?N:b);if(!o)throw new J(ee);if(t.platform==="darwin")k(t);if(t.platform==="linux"&&t.command("systemctl",["--user","show-environment"])!==0)throw new J("No background service here: this computer has no systemd user session.","worker_service_manager_missing");let l=t.platform==="darwin"?ie(e,i,o,n,t,r.path):null;if(W(o.definition,l?l.plist:t.platform==="win32"?B(se(e,i,o,n)):oe(e,i,o,n,t.home,r.path)),le(e,t,o,a?null:s),l)return l.identity?o:{...o,identityProblem:Ae};if(t.platform==="win32")return o;return{...o,lingering:t.command("loginctl",["enable-linger"])===0}}function le(r,e,n,t){if(e.platform==="darwin"){let a=k(e);if(t)e.command("/bin/launchctl",["bootout",`${a}/${t.label}`]);if(ce(r,n,e)){if(t)u(t.definition,{force:!0});return}if(u(n.definition,{force:!0}),t)e.command("/bin/launchctl",["bootstrap",a,t.definition]);throw new J("Could not start the background service (launchctl bootstrap failed).","worker_service_start_failed")}if(e.platform==="win32"){if(t)v(t,e,!0);if(e.command("schtasks",j(n.label,n.definition))===0){if(ae(n,e,e.insideService?.(n.label)!==!0),e.command("schtasks",["/Run","/TN",n.label])===0)return}throw v(n,e,!0),new J("Could not start the background service (schtasks failed).")}let i=`${n.label}.service`,s=t?`${t.label}.service`:null;if(e.command("systemctl",["--user","daemon-reload"])!==0||s!==null&&e.command("systemctl",["--user","disable","--now",s])!==0||e.command("systemctl",["--user","enable",i])!==0||e.command("systemctl",["--user","restart",i])!==0){if(e.command("systemctl",["--user","disable",i]),u(n.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"]),s)e.command("systemctl",["--user","enable","--now",s]);throw new J("Could not start the background service (systemctl --user failed).","worker_service_start_failed")}if(t)u(t.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"])}function ce(r,e,n){let t=k(n);n.command("/bin/launchctl",["bootout",`${t}/${e.label}`]);let i=(Math.ceil(r.shutdownGraceMs/1000)+10)*1000;for(let s=0,a=100;;a=Math.min(a*2,2000)){if(n.command("/bin/launchctl",["bootstrap",t,e.definition])===0)return!0;if(s>=i)return!1;n.sleep(a),s+=a}}function Wr(r,e,n){let t=Ye(r,e,n);if(!t)return null;let i=e.insideService?.(t.label)===!0;if(e.platform==="darwin"&&!i)Pe(t.definition,e);let s=f(r,e,n);if(s&&t.label!==s.label&&!i)return W(s.definition,p(t.definition,"utf8").replaceAll(t.label,s.label)),le(r,e,s,t),s;let a=e.platform==="darwin"&&i,o;if(e.platform==="win32")ae(t,e,!i),o=e.command("schtasks",["/Run","/TN",t.label])===0;else if(a)o=e.command("/bin/launchctl",["kickstart","-k",`${k(e)}/${t.label}`])===0;else if(e.platform==="darwin")o=ce(r,t,e);else e.command("systemctl",["--user","enable",`${t.label}.service`]),o=e.command("systemctl",["--user","restart",`${t.label}.service`])===0;if(!o)throw new J(`Could not restart the background service ${t.label}.`,"worker_service_restart_failed");if(s&&t.label===s.label)ss(r,e,n);return t}function Ks(r,e,n,t){let i=Ye(r,n,t),s=f(e,n,t);if(n.platform!=="darwin"||!i||!s)return;let a=`<string>${d(i.logs)}</string>`,o=p(i.definition,"utf8");if(o.includes(a))W(i.definition,o.replaceAll(a,`<string>${d(s.logs)}</string>`))}function Js(r,e,n="serve"){let t=ne(r,e,n);for(let i of t){if(e.platform==="win32"){v(i,e,e.insideService?.(i.label,!1)!==!0);continue}if(e.platform==="darwin"){if(typeof e.uid==="number"&&e.uid>0)e.command("/bin/launchctl",["bootout",`gui/${e.uid}/${i.label}`]);u(i.definition,{force:!0});continue}e.command("systemctl",["--user","disable","--now",`${i.label}.service`]),u(i.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"])}return t[0]??null}
105
- export{qr,xe,J,Jn,qs,Ao,Ws,Ye,ss,Zn,Vs,Gs,Wr,Ks,Js};
104
+ `}function se(r,e,n,t){let i=L(r,e);return U({description:i.description,schedule:"logon",script:K({name:n.label,program:t,args:i.args,environment:{[Wr]:n.label,...i.environment},log:n.logs,keepAlive:!0})})}function ae(r,e,n){e.command("powershell.exe",E(r.label,{tree:n,keepWrapper:!n}))}function v(r,e,n){e.command("schtasks",["/Delete","/F","/TN",r.label]),e.command("powershell.exe",E(r.label,{tree:n,keepWrapper:!1})),u(r.definition,{force:!0})}function W(r,e){$e(We(r),{recursive:!0,mode:448});let n=`${r}.${Se()}.tmp`;try{be(n,e,{mode:384,flag:"wx"}),we(n,384),ye(n,r)}finally{u(n,{force:!0})}}function k(r){if(typeof r.uid!=="number"||!Number.isSafeInteger(r.uid)||r.uid<=0)throw new J("Set up a background service as your own user, not with sudo.","worker_service_root_user");return`gui/${r.uid}`}function Zs(r){let{config:e,launcher:n,host:t}=r,i=r.kind??"serve",s=te(e,t,i),a=s!==null&&t.insideService?.(s.label)===!0,o=f(e,t,i,a?N:b);if(!o)throw new J(ee);if(t.platform==="darwin")k(t);if(t.platform==="linux"&&t.command("systemctl",["--user","show-environment"])!==0)throw new J("No background service here: this computer has no systemd user session.","worker_service_manager_missing");let l=t.platform==="darwin"?ie(e,i,o,n,t,r.path):null;if(W(o.definition,l?l.plist:t.platform==="win32"?B(se(e,i,o,n)):oe(e,i,o,n,t.home,r.path)),le(e,t,o,a?null:s),l)return l.identity?o:{...o,identityProblem:Ae};if(t.platform==="win32")return o;return{...o,lingering:t.command("loginctl",["enable-linger"])===0}}function le(r,e,n,t){if(e.platform==="darwin"){let a=k(e);if(t)e.command("/bin/launchctl",["bootout",`${a}/${t.label}`]);if(ce(r,n,e)){if(t)u(t.definition,{force:!0});return}if(u(n.definition,{force:!0}),t)e.command("/bin/launchctl",["bootstrap",a,t.definition]);throw new J("Could not start the background service (launchctl bootstrap failed).","worker_service_start_failed")}if(e.platform==="win32"){if(t)v(t,e,!0);if(e.command("schtasks",j(n.label,n.definition))===0){if(ae(n,e,e.insideService?.(n.label)!==!0),e.command("schtasks",["/Run","/TN",n.label])===0)return}throw v(n,e,!0),new J("Could not start the background service (schtasks failed).")}let i=`${n.label}.service`,s=t?`${t.label}.service`:null;if(e.command("systemctl",["--user","daemon-reload"])!==0||s!==null&&e.command("systemctl",["--user","disable","--now",s])!==0||e.command("systemctl",["--user","enable",i])!==0||e.command("systemctl",["--user","restart",i])!==0){if(e.command("systemctl",["--user","disable",i]),u(n.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"]),s)e.command("systemctl",["--user","enable","--now",s]);throw new J("Could not start the background service (systemctl --user failed).","worker_service_start_failed")}if(t)u(t.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"])}function ce(r,e,n){let t=k(n);n.command("/bin/launchctl",["bootout",`${t}/${e.label}`]);let i=(Math.ceil(r.shutdownGraceMs/1000)+10)*1000;for(let s=0,a=100;;a=Math.min(a*2,2000)){if(n.command("/bin/launchctl",["bootstrap",t,e.definition])===0)return!0;if(s>=i)return!1;n.sleep(a),s+=a}}function Vr(r,e,n){let t=Ye(r,e,n);if(!t)return null;let i=e.insideService?.(t.label)===!0;if(e.platform==="darwin"&&!i)Pe(t.definition,e);let s=f(r,e,n);if(s&&t.label!==s.label&&!i)return W(s.definition,p(t.definition,"utf8").replaceAll(t.label,s.label)),le(r,e,s,t),s;let a=e.platform==="darwin"&&i,o;if(e.platform==="win32")ae(t,e,!i),o=e.command("schtasks",["/Run","/TN",t.label])===0;else if(a)o=e.command("/bin/launchctl",["kickstart","-k",`${k(e)}/${t.label}`])===0;else if(e.platform==="darwin")o=ce(r,t,e);else e.command("systemctl",["--user","enable",`${t.label}.service`]),o=e.command("systemctl",["--user","restart",`${t.label}.service`])===0;if(!o)throw new J(`Could not restart the background service ${t.label}.`,"worker_service_restart_failed");if(s&&t.label===s.label)ls(r,e,n);return t}function Xs(r,e,n,t){let i=Ye(r,n,t),s=f(e,n,t);if(n.platform!=="darwin"||!i||!s)return;let a=`<string>${d(i.logs)}</string>`,o=p(i.definition,"utf8");if(o.includes(a))W(i.definition,o.replaceAll(a,`<string>${d(s.logs)}</string>`))}function Ys(r,e,n="serve"){let t=ne(r,e,n);for(let i of t){if(e.platform==="win32"){v(i,e,e.insideService?.(i.label,!1)!==!0);continue}if(e.platform==="darwin"){if(typeof e.uid==="number"&&e.uid>0)e.command("/bin/launchctl",["bootout",`gui/${e.uid}/${i.label}`]);u(i.definition,{force:!0});continue}e.command("systemctl",["--user","disable","--now",`${i.label}.service`]),u(i.definition,{force:!0}),e.command("systemctl",["--user","daemon-reload"])}return t[0]??null}
105
+ export{Wr,xe,J,Kn,Gs,Ro,Ks,Ye,ls,Jn,Js,Zs,Vr,Xs,Ys};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var i="libara_device_keychain.dylib",e="libreason_device_keychain.dylib";class ft extends Error{code;constructor(n,t){super(t);this.code=n;this.name="ManagedRuntimeError"}}import{existsSync as s}from"fs";import{join as a}from"path";function Po(n){let t=a(n,e);return s(t)?t:a(n,i)}
3
- export{ft,Po};
2
+ var i="libara_device_keychain.dylib",e="libreason_device_keychain.dylib";class ft extends Error{code;constructor(n,t){super(t);this.code=n;this.name="ManagedRuntimeError"}}import{existsSync as s}from"fs";import{join as a}from"path";function Oo(n){let t=a(n,e);return s(t)?t:a(n,i)}
3
+ export{ft,Oo};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{de,et,O}from"./vm-hands-entry-lite-38g65s5x.js";import{execFileSync as l}from"child_process";import{existsSync as c,realpathSync as s}from"fs";import{userInfo as f}from"os";import{isAbsolute as u,join as t,normalize as d,parse as p}from"path";function a(){let r=d(f().homedir);if(!u(r)||r===p(r).root)throw Error("Could not resolve the canonical user home.");return r}function Mo(r){return p(r).root===r}var $o=(r)=>`Reason can't work in ${r}, the top of a drive: use a folder inside it, such as a project folder`;function ie(r,n,e=a()){let i=O(n);if(n.kind==="managed"&&n.base){let o=s(e);return{anchor:o,boundary:t(o,n.base),path:t(o,i)}}if(n.kind==="root"&&et(n.path)){let o=s(e);return{anchor:o,boundary:t(o,de),path:t(o,i)}}return{anchor:r,boundary:r,path:t(r,i)}}function tr(r=a()){return t(r,".config")}function Bo(){if(process.platform!=="darwin")return null;try{let r=l("/usr/bin/getconf",["DARWIN_USER_DIR"],{encoding:"utf8",timeout:5000}).trim();return u(r)?s(r):null}catch{return null}}function Fo(r=a()){let n=t(r,"Library","Application Support","Ara"),e=t(r,"Library","Application Support","Reason");return c(n)&&!c(e)?n:e}
3
- export{a,Mo,$o,ie,tr,Bo,Fo};
2
+ import{de,et,O}from"./vm-hands-entry-lite-39qv4sqt.js";import{execFileSync as l}from"child_process";import{existsSync as c,realpathSync as s}from"fs";import{userInfo as f}from"os";import{isAbsolute as u,join as t,normalize as d,parse as p}from"path";function a(){let r=d(f().homedir);if(!u(r)||r===p(r).root)throw Error("Could not resolve the canonical user home.");return r}function Fo(r){return p(r).root===r}var jo=(r)=>`Reason can't work in ${r}, the top of a drive: use a folder inside it, such as a project folder`;function ie(r,n,e=a()){let i=O(n);if(n.kind==="managed"&&n.base){let o=s(e);return{anchor:o,boundary:t(o,n.base),path:t(o,i)}}if(n.kind==="root"&&et(n.path)){let o=s(e);return{anchor:o,boundary:t(o,de),path:t(o,i)}}return{anchor:r,boundary:r,path:t(r,i)}}function nr(r=a()){return t(r,".config")}function Uo(){if(process.platform!=="darwin")return null;try{let r=l("/usr/bin/getconf",["DARWIN_USER_DIR"],{encoding:"utf8",timeout:5000}).trim();return u(r)?s(r):null}catch{return null}}function Ho(r=a()){let n=t(r,"Library","Application Support","Ara"),e=t(r,"Library","Application Support","Reason");return c(n)&&!c(e)?n:e}
3
+ export{a,Fo,jo,ie,nr,Uo,Ho};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{H}from"./vm-hands-entry-lite-38g65s5x.js";var xo=32;var ko="__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__",Co=262144;var P=2,$r=33554432,Br=200000,zn=4000000,ht=240000;var qn=2000;var Fr=16384,Je=32768,Se=128,Wn=64,Ze=2097152,Jt=1,ne=16384,Xe=32768,Vn=8388608,Ee=1000,Zt=2500,jr=2000,Xt=Zt+jr,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,Ur={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(Ur).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),Gn=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)<=Ee)}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)>$r)throw new r("frame_too_large");try{return JSON.parse(t)}catch{throw new r("invalid_json")}}function Hr(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<=Br&&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<=Fr&&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 zr(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>Se)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>Je)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!==Jt||!ce(e.jobId)||!p(o)||e.output.length!==0||!Array.isArray(o.output)||o.output.length>Se||(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)>Xe)throw new r("invalid_job_result");g=Number(u.cursor)}}return n}function Kn(t){if(m(t)>Ze)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!==Jt||![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=zr(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{xo,ko,Co,P,$r,Br,zn,ht,qn,Fr,Je,Se,Wn,Ze,Jt,ne,Xe,Vn,Ee,Zt,jr,Xt,Ur,Gn,ae,U,N,ce,Hr,zr,Kn};
2
+ import{H}from"./vm-hands-entry-lite-39qv4sqt.js";var Ao=32;var Po="__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__",To=262144;var P=2,Br=33554432,Fr=200000,Hn=4000000,ht=240000;var zn=2000;var jr=16384,Je=32768,Se=128,qn=64,Ze=2097152,Xt=1,ne=16384,Xe=32768,Wn=8388608,Ee=1000,Yt=2500,Ur=2000,Qt=Yt+Ur,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,Hr={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(Hr).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),Vn=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)<=Ee)}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)>Br)throw new r("frame_too_large");try{return JSON.parse(t)}catch{throw new r("invalid_json")}}function zr(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<=Fr&&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<=jr&&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 qr(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>Se)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>Je)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!==Xt||!ce(e.jobId)||!p(o)||e.output.length!==0||!Array.isArray(o.output)||o.output.length>Se||(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)>Xe)throw new r("invalid_job_result");g=Number(u.cursor)}}return n}function Gn(t){if(m(t)>Ze)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!==Xt||![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=qr(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,Po,To,P,Br,Fr,Hn,ht,zn,jr,Je,Se,qn,Ze,Xt,ne,Xe,Wn,Ee,Yt,Ur,Qt,Hr,Vn,ae,U,N,ce,zr,qr,Gn};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Yr,Qr,en,nr}from"./vm-hands-entry-lite-38g65s5x.js";import{ko,Co,P,$r,Br,zn,ht,qn,Fr,Je,Se,Wn,Ze,ne,Xe,Ee,Zt,jr,Ur,Gn}from"./vm-hands-entry-lite-5gevvgec.js";import{sr}from"./vm-hands-entry-lite-rfz60hb3.js";import{Kt}from"./vm-hands-entry-lite-wrvz9jxy.js";import{ve}from"./vm-hands-entry-lite-txd50spx.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{Qr,en,tn,or}from"./vm-hands-entry-lite-39qv4sqt.js";import{Po,To,P,Br,Fr,Hn,ht,zn,jr,Je,Se,qn,Ze,ne,Xe,Ee,Yt,Ur,Hr,Vn}from"./vm-hands-entry-lite-1ek3r3w9.js";import{lr}from"./vm-hands-entry-lite-s85p7tqp.js";import{Zt}from"./vm-hands-entry-lite-td73npv3.js";import{ve}from"./vm-hands-entry-lite-70hq7mrs.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); } };
@@ -309,7 +309,7 @@ function fileOperation(request) {
309
309
  });
310
310
  return { promise, cancel() {} };
311
311
  }
312
- `;var s="a3e39eb55160acfc116fa9871ccc594c68be7a642d2331b24baa707c8f601ec0";import{createHash as I}from"crypto";var H=Object.freeze({"api.ara.so":"api.reasonmachines.com","api.reasonmachines.ai":"api.reasonmachines.com","api-staging.ara.so":"staging-api.reasonmachines.com","staging-api.reasonmachines.ai":"staging-api.reasonmachines.com"});var a=Object.freeze({trailingSlashPattern:/\/+$/.source,keyPrefix:"http.",keySuffix:"/.extraheader",valuePrefix:"Authorization: Bearer "});var l=Object.freeze({tokenEnv:"ARA_GIT_BROKER_TOKEN",reasonTokenEnv:"REASON_GIT_BROKER_TOKEN",urlEnv:"ARA_GIT_BROKER_URL",keyPrefix:"credential.",keySuffix:"/.helper",value:'!f(){ printf "username=%s\\npassword=%s\\n" "ara-run" "${REASON_GIT_BROKER_TOKEN:-$ARA_GIT_BROKER_TOKEN}"; };f'});var It=/^[A-Za-z_][A-Za-z0-9_]*$/;var h=new Set(["ARA_INFERENCE_TOKEN","AI_GATEWAY_API_KEY","CLOUD_AGENT_AI_GATEWAY_API_KEY","INFERENCE_V2_GATEWAY_API_KEY","VERCEL_AI_GATEWAY_API_KEY","INFERENCE_V2_CONCENTRATE_API_KEY","INFERENCE_V2_OPENAI_API_KEY","INFERENCE_V2_ANTHROPIC_API_KEY","INFERENCE_V2_FINGERPRINT_SECRET","OPENAI_API_KEY","OPENROUTER_API_KEY","ANTHROPIC_API_KEY","CODEX_ACCESS_TOKEN","GITHUB_COPILOT_API_KEY","AZURE_OPENAI_API_KEY","AZURE_OPENAI_CLIENT_SECRET"]),m=new Set(["ARA_OPERATOR_KEY","BL_API_KEY","BLAXEL_API_KEY","NSC_TOKEN","NSC_TOKEN_FILE","NAMESPACE_API_KEY","NAMESPACE_ACCESS_TOKEN","NAMESPACE_TOKEN","NAMESPACE_TOKEN_JSON","NAMESPACE_SANDBOX_TOKEN_JSON","ARA_LOCAL_QA_NAMESPACE_WORKLOAD_TOKEN_FILE","NAMESPACE_SANDBOX_USE_LOCAL_USER_TOKEN","COMPUTE_SERVICE_TOKEN"]),g=["INFISICAL_","NSC_"],_=new Set(["ARA_JOB_ENV","ARA_DELIVERY_BASE_SHA","WORK_ROOT","REPO_DIR","ARA_CONTROL_DIR","ARA_PRESERVE_WORKSPACE","ARA_PINNED_CHECKOUT_REUSE","FOLLOWUP_BRANCH","REPO_URL","TOKENLESS_URL","REPOSITORY_IDENTITY_URL","DEFAULT_BRANCH","BRANCH","BRANCH_GENERATED","BASE_REF","REPO_EMPTY","REPO_WRITABLE","ARA_DELIVERY_BASE_BRANCH","ARA_SERVER_GIT_PUBLICATION","ARA_EMPTY_REPOSITORY_COMMIT","REASON_MODEL","REASON_DELIVERY_BASE_BRANCH","REASON_DELIVERY_BASE_SHA","REASON_EMPTY_REPOSITORY_COMMIT","REASON_SCRATCH_SESSION_ID","REASON_SERVER_GIT_PUBLICATION","REASON_ALLOW_INSTALL_SCRIPTS","SCM_TOKEN","SCM_TOKEN_USER","REASON_OIDC_TOKEN_URL","REASON_OIDC_REQUEST_TOKEN","AWS_CONTAINER_CREDENTIALS_FULL_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN","AWS_CONTAINER_CREDENTIALS_RELATIVE_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE","BASH_ENV","ENV","BASHOPTS","SHELLOPTS","PS4","IFS","CDPATH","GLOBIGNORE","PROMPT_COMMAND","PATH","HOME","TMPDIR","TMP","TEMP","XDG_CONFIG_HOME","GIT_DIR","GIT_WORK_TREE","GIT_INDEX_FILE","GIT_OBJECT_DIRECTORY","GIT_COMMON_DIR","GIT_NAMESPACE","GIT_CEILING_DIRECTORIES","GIT_DISCOVERY_ACROSS_FILESYSTEM","GIT_SHALLOW_FILE","GIT_ALLOW_PROTOCOL","GIT_PROTOCOL_FROM_USER","GIT_REPLACE_REF_BASE","NODE_OPTIONS","NODE_PATH","NODE_REPL_EXTERNAL_MODULES","CLASSPATH","PYTHONPATH","PYTHONSTARTUP","PYTHONHOME","RUBYOPT","RUBYLIB","PERL5LIB","PERL5OPT","JAVA_TOOL_OPTIONS","_JAVA_OPTIONS","JDK_JAVA_OPTIONS","GEM_PATH","GEM_HOME","GIT_SSH","GIT_SSH_COMMAND","GIT_EXEC_PATH","GIT_TEMPLATE_DIR","GIT_ALTERNATE_OBJECT_DIRECTORIES","GIT_PROXY_COMMAND","GIT_EXTERNAL_DIFF","GIT_PAGER","GIT_EDITOR","GIT_ASKPASS","SSH_ASKPASS","PAGER","EDITOR","TAR_OPTIONS","CURL_HOME","WGETRC","APT_CONFIG","PERLLIB","GIT_GRAFT_FILE","POSIXLY_CORRECT"]),y=["GIT_TRACE","CONTEXT_REPO_","ARA_CHECKPOINT_BOOTSTRAP_","_","ARA_HANDS_","ARA_DEVICE_","ARA_GIT_BROKER_","REASON_HANDS_","REASON_DEVICE_","REASON_GIT_BROKER_","LD_","DYLD_","GIT_CONFIG","BASH_FUNC_"];var t="^(?!(?:"+[...h,...m,..._].join("|")+")$)(?!(?:"+[...g,...y].join("|")+"))"+It.source.slice(1),W=new RegExp(t);var v=["HOME","PWD","OLDPWD","TMPDIR","TMP","TEMP","SHELL","USER","LOGNAME","SCM_TOKEN","SCM_TOKEN_USER","GH_TOKEN","GITHUB_TOKEN","GH_ENTERPRISE_TOKEN","GITHUB_ENTERPRISE_TOKEN","GITLAB_TOKEN"],E=["ARA_HANDS_","ARA_DEVICE_","ARA_GIT_BROKER_","REASON_HANDS_","REASON_DEVICE_","REASON_GIT_BROKER_","BUN_"],S="^(?!(?:"+v.join("|")+")$)(?!(?:"+E.join("|")+"))"+t.slice(1),w="ARA_DELIVERY_BASE_SHA|WORK_ROOT|FOLLOWUP_BRANCH|ARA_PRESERVE_WORKSPACE|ARA_PINNED_CHECKOUT_REUSE|CONTEXT_REPO_[A-Z0-9_]+|REPO_URL|TOKENLESS_URL|REPOSITORY_IDENTITY_URL|DEFAULT_BRANCH|BRANCH|BRANCH_GENERATED|BASE_REF|REPO_EMPTY|REPO_WRITABLE|ARA_DELIVERY_BASE_BRANCH|ARA_SERVER_GIT_PUBLICATION|ARA_EMPTY_REPOSITORY_COMMIT|REASON_MODEL|REASON_DELIVERY_BASE_BRANCH|REASON_DELIVERY_BASE_SHA|REASON_EMPTY_REPOSITORY_COMMIT|REASON_SCRATCH_SESSION_ID|REASON_SERVER_GIT_PUBLICATION|REASON_ALLOW_INSTALL_SCRIPTS",n="^(?:"+w+"|"+S.slice(1,-1)+")$",O=new RegExp(n);function kr(u){return O.test(u)}var at=Object.freeze({tokenPath:"/identity/token",awsPath:"/identity/aws",tokenPattern:/^[A-Za-z0-9_.~-]+$/.source}),V=Object.freeze({variables:256,valueBytes:130816,snapshotBytes:1048576}),Z=Object.freeze({valueChars:16384,snapshotBytes:65536});var c=["set -g history-limit 50000","set -g status off","set -g window-size smallest","set -gq fill-character ' '","set -g escape-time 10","set -g prefix None","set -g prefix2 None","set -g terminal-overrides ',*:smcup@:rmcup@'"];var D=2,R="ara-hands-worker.cjs",d=["/usr/local/go/bin","/opt/node/bin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/local/cargo/bin"],A=d.join(":"),T=["/opt/homebrew/bin",...d].join(":"),k='(platform, linuxPath, macosPath) => platform === "darwin" ? macosPath : linuxPath';var N=String.raw`(function(anchor, pid, native) {
312
+ `;var s="a3e39eb55160acfc116fa9871ccc594c68be7a642d2331b24baa707c8f601ec0";import{createHash as I}from"crypto";var H=Object.freeze({"api.ara.so":"api.reasonmachines.com","api.reasonmachines.ai":"api.reasonmachines.com","api-staging.ara.so":"staging-api.reasonmachines.com","staging-api.reasonmachines.ai":"staging-api.reasonmachines.com"});var a=Object.freeze({trailingSlashPattern:/\/+$/.source,keyPrefix:"http.",keySuffix:"/.extraheader",valuePrefix:"Authorization: Bearer "});var l=Object.freeze({tokenEnv:"ARA_GIT_BROKER_TOKEN",reasonTokenEnv:"REASON_GIT_BROKER_TOKEN",urlEnv:"ARA_GIT_BROKER_URL",keyPrefix:"credential.",keySuffix:"/.helper",value:'!f(){ printf "username=%s\\npassword=%s\\n" "ara-run" "${REASON_GIT_BROKER_TOKEN:-$ARA_GIT_BROKER_TOKEN}"; };f'});var Lt=/^[A-Za-z_][A-Za-z0-9_]*$/;var h=new Set(["ARA_INFERENCE_TOKEN","AI_GATEWAY_API_KEY","CLOUD_AGENT_AI_GATEWAY_API_KEY","INFERENCE_V2_GATEWAY_API_KEY","VERCEL_AI_GATEWAY_API_KEY","INFERENCE_V2_CONCENTRATE_API_KEY","INFERENCE_V2_OPENAI_API_KEY","INFERENCE_V2_ANTHROPIC_API_KEY","INFERENCE_V2_FINGERPRINT_SECRET","OPENAI_API_KEY","OPENROUTER_API_KEY","ANTHROPIC_API_KEY","CODEX_ACCESS_TOKEN","GITHUB_COPILOT_API_KEY","AZURE_OPENAI_API_KEY","AZURE_OPENAI_CLIENT_SECRET"]),m=new Set(["ARA_OPERATOR_KEY","BL_API_KEY","BLAXEL_API_KEY","NSC_TOKEN","NSC_TOKEN_FILE","NAMESPACE_API_KEY","NAMESPACE_ACCESS_TOKEN","NAMESPACE_TOKEN","NAMESPACE_TOKEN_JSON","NAMESPACE_SANDBOX_TOKEN_JSON","ARA_LOCAL_QA_NAMESPACE_WORKLOAD_TOKEN_FILE","NAMESPACE_SANDBOX_USE_LOCAL_USER_TOKEN","COMPUTE_SERVICE_TOKEN"]),g=["INFISICAL_","NSC_"],_=new Set(["ARA_JOB_ENV","ARA_DELIVERY_BASE_SHA","WORK_ROOT","REPO_DIR","ARA_CONTROL_DIR","ARA_PRESERVE_WORKSPACE","ARA_PINNED_CHECKOUT_REUSE","FOLLOWUP_BRANCH","REPO_URL","TOKENLESS_URL","REPOSITORY_IDENTITY_URL","DEFAULT_BRANCH","BRANCH","BRANCH_GENERATED","BASE_REF","REPO_EMPTY","REPO_WRITABLE","ARA_DELIVERY_BASE_BRANCH","ARA_SERVER_GIT_PUBLICATION","ARA_EMPTY_REPOSITORY_COMMIT","REASON_MODEL","REASON_DELIVERY_BASE_BRANCH","REASON_DELIVERY_BASE_SHA","REASON_EMPTY_REPOSITORY_COMMIT","REASON_SCRATCH_SESSION_ID","REASON_SERVER_GIT_PUBLICATION","REASON_ALLOW_INSTALL_SCRIPTS","SCM_TOKEN","SCM_TOKEN_USER","REASON_OIDC_TOKEN_URL","REASON_OIDC_REQUEST_TOKEN","AWS_CONTAINER_CREDENTIALS_FULL_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN","AWS_CONTAINER_CREDENTIALS_RELATIVE_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE","BASH_ENV","ENV","BASHOPTS","SHELLOPTS","PS4","IFS","CDPATH","GLOBIGNORE","PROMPT_COMMAND","PATH","HOME","TMPDIR","TMP","TEMP","XDG_CONFIG_HOME","GIT_DIR","GIT_WORK_TREE","GIT_INDEX_FILE","GIT_OBJECT_DIRECTORY","GIT_COMMON_DIR","GIT_NAMESPACE","GIT_CEILING_DIRECTORIES","GIT_DISCOVERY_ACROSS_FILESYSTEM","GIT_SHALLOW_FILE","GIT_ALLOW_PROTOCOL","GIT_PROTOCOL_FROM_USER","GIT_REPLACE_REF_BASE","NODE_OPTIONS","NODE_PATH","NODE_REPL_EXTERNAL_MODULES","CLASSPATH","PYTHONPATH","PYTHONSTARTUP","PYTHONHOME","RUBYOPT","RUBYLIB","PERL5LIB","PERL5OPT","JAVA_TOOL_OPTIONS","_JAVA_OPTIONS","JDK_JAVA_OPTIONS","GEM_PATH","GEM_HOME","GIT_SSH","GIT_SSH_COMMAND","GIT_EXEC_PATH","GIT_TEMPLATE_DIR","GIT_ALTERNATE_OBJECT_DIRECTORIES","GIT_PROXY_COMMAND","GIT_EXTERNAL_DIFF","GIT_PAGER","GIT_EDITOR","GIT_ASKPASS","SSH_ASKPASS","PAGER","EDITOR","TAR_OPTIONS","CURL_HOME","WGETRC","APT_CONFIG","PERLLIB","GIT_GRAFT_FILE","POSIXLY_CORRECT"]),y=["GIT_TRACE","CONTEXT_REPO_","ARA_CHECKPOINT_BOOTSTRAP_","_","ARA_HANDS_","ARA_DEVICE_","ARA_GIT_BROKER_","REASON_HANDS_","REASON_DEVICE_","REASON_GIT_BROKER_","LD_","DYLD_","GIT_CONFIG","BASH_FUNC_"];var t="^(?!(?:"+[...h,...m,..._].join("|")+")$)(?!(?:"+[...g,...y].join("|")+"))"+Lt.source.slice(1),W=new RegExp(t);var v=["HOME","PWD","OLDPWD","TMPDIR","TMP","TEMP","SHELL","USER","LOGNAME","SCM_TOKEN","SCM_TOKEN_USER","GH_TOKEN","GITHUB_TOKEN","GH_ENTERPRISE_TOKEN","GITHUB_ENTERPRISE_TOKEN","GITLAB_TOKEN"],E=["ARA_HANDS_","ARA_DEVICE_","ARA_GIT_BROKER_","REASON_HANDS_","REASON_DEVICE_","REASON_GIT_BROKER_","BUN_"],S="^(?!(?:"+v.join("|")+")$)(?!(?:"+E.join("|")+"))"+t.slice(1),w="ARA_DELIVERY_BASE_SHA|WORK_ROOT|FOLLOWUP_BRANCH|ARA_PRESERVE_WORKSPACE|ARA_PINNED_CHECKOUT_REUSE|CONTEXT_REPO_[A-Z0-9_]+|REPO_URL|TOKENLESS_URL|REPOSITORY_IDENTITY_URL|DEFAULT_BRANCH|BRANCH|BRANCH_GENERATED|BASE_REF|REPO_EMPTY|REPO_WRITABLE|ARA_DELIVERY_BASE_BRANCH|ARA_SERVER_GIT_PUBLICATION|ARA_EMPTY_REPOSITORY_COMMIT|REASON_MODEL|REASON_DELIVERY_BASE_BRANCH|REASON_DELIVERY_BASE_SHA|REASON_EMPTY_REPOSITORY_COMMIT|REASON_SCRATCH_SESSION_ID|REASON_SERVER_GIT_PUBLICATION|REASON_ALLOW_INSTALL_SCRIPTS",n="^(?:"+w+"|"+S.slice(1,-1)+")$",O=new RegExp(n);function Pr(u){return O.test(u)}var ct=Object.freeze({tokenPath:"/identity/token",awsPath:"/identity/aws",tokenPattern:/^[A-Za-z0-9_.~-]+$/.source}),V=Object.freeze({variables:256,valueBytes:130816,snapshotBytes:1048576}),Z=Object.freeze({valueChars:16384,snapshotBytes:65536});var c=["set -g history-limit 50000","set -g status off","set -g window-size smallest","set -gq fill-character ' '","set -g escape-time 10","set -g prefix None","set -g prefix2 None","set -g terminal-overrides ',*:smcup@:rmcup@'"];var D=2,R="ara-hands-worker.cjs",d=["/usr/local/go/bin","/opt/node/bin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/local/cargo/bin"],A=d.join(":"),T=["/opt/homebrew/bin",...d].join(":"),k='(platform, linuxPath, macosPath) => platform === "darwin" ? macosPath : linuxPath';var N=String.raw`(function(anchor, pid, native) {
313
313
  const token = native.identity(pid);
314
314
  const session = native.session(pid);
315
315
  if (!native.same(anchor)) throw new Error("pty_session_identity_lost");
@@ -348,7 +348,7 @@ function fileOperation(request) {
348
348
  require("node:fs").writeSync(3, "subreaper\n");
349
349
  api.execve(ptr(args[0]), ptr(argv), ptr(envp));
350
350
  throw new Error("pty_exec_failed");
351
- })`,rs=String.raw`
351
+ })`,os=String.raw`
352
352
  "use strict";
353
353
  const crypto = require("node:crypto");
354
354
  const fs = require("node:fs");
@@ -359,7 +359,7 @@ const { StringDecoder } = require("node:string_decoder");
359
359
  const GIT_BROKER_HTTP_HEADER_POLICY = ${JSON.stringify(a)};
360
360
  const GIT_BROKER_CREDENTIAL_HELPER_POLICY = ${JSON.stringify(l)};
361
361
  const DEVICE_ENVIRONMENT_NAME_RE = new RegExp(${JSON.stringify(n)});
362
- const DEVICE_CLOUD_ACCESS_POLICY = ${JSON.stringify(at)};
362
+ const DEVICE_CLOUD_ACCESS_POLICY = ${JSON.stringify(ct)};
363
363
  const DEVICE_ENVIRONMENT_LIMITS = ${JSON.stringify(V)};
364
364
 
365
365
  const VERSION = ${P};
@@ -369,22 +369,22 @@ const GUEST_MEMORY_UNAVAILABLE_REASONS = ${JSON.stringify(r)};
369
369
  const sampleGuestMemory = ${o};
370
370
  const inspectMacPtyMember = ${N};
371
371
  const probeLinuxPtyLibrary = ${C};
372
- const windowsPtyApi = ${Kt};
372
+ const windowsPtyApi = ${Zt};
373
373
  const LINUX_PTY_EXEC_SOURCE = ${JSON.stringify(x)};
374
- const CLOSE_CODES = ${JSON.stringify(Ur)};
374
+ const CLOSE_CODES = ${JSON.stringify(Hr)};
375
375
  const SHA256_RE = /^[0-9a-f]{64}$/;
376
- const MAX_FRAME_BYTES = ${$r};
377
- const MAX_INPUT_CHARS = ${Br};
378
- const MAX_STRUCTURED_INPUT_CHARS = ${zn};
376
+ const MAX_FRAME_BYTES = ${Br};
377
+ const MAX_INPUT_CHARS = ${Fr};
378
+ const MAX_STRUCTURED_INPUT_CHARS = ${Hn};
379
379
  const MAX_OUTPUT_CHARS = ${ht};
380
- const WORKSPACE_BEFORE_MAX_OUTPUT_CHARS = ${Gn};
381
- const MAX_ERROR_CHARS = ${qn};
380
+ const WORKSPACE_BEFORE_MAX_OUTPUT_CHARS = ${Vn};
381
+ const MAX_ERROR_CHARS = ${zn};
382
382
  const MAX_LEDGER_IDS = 16384;
383
383
  const MAX_CACHED_RESULTS = 256;
384
- const MAX_JOB_INPUT_CHARS = ${Fr};
384
+ const MAX_JOB_INPUT_CHARS = ${jr};
385
385
  const MAX_JOB_OUTPUT_CHARS = ${Je};
386
386
  const MAX_JOB_OUTPUT_CHUNKS = ${Se};
387
- const MAX_JOBS = ${Wn};
387
+ const MAX_JOBS = ${qn};
388
388
  const MAX_JOB_RECORD_BYTES = 262144;
389
389
  const MAX_JOB_JOURNAL_BYTES = MAX_JOBS * MAX_JOB_RECORD_BYTES;
390
390
  const MAX_JOB_CONTROL_FRAME_BYTES = ${Ze};
@@ -395,7 +395,7 @@ const ID_RE = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,199}$/;
395
395
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
396
396
  const WINDOWS = process.platform === "win32";
397
397
  // Each Bash leader's tree on Windows, children that outlive it included (shared/windows-job-object.ts).
398
- const windowsJobs = WINDOWS ? ${sr}(require) : null;
398
+ const windowsJobs = WINDOWS ? ${lr}(require) : null;
399
399
  /** Windows has no POSIX owner or mode bits: the user's own profile folders are
400
400
  * private by their ACLs, and the worker runs as that ordinary user. */
401
401
  function ownedPrivately(stat, mask = 0o077) {
@@ -577,12 +577,12 @@ function validJobEnvSourcePath() {
577
577
  if (config.jobEnvSourcePath === undefined || config.jobEnvSourcePath === path.join(config.workRoot, "job.env")) return true;
578
578
  // A cloud workspace's job.env is in its Session's root-only control
579
579
  // directory (shared/device-workspace.ts), derived from the root alone.
580
- const cloud = new RegExp(${JSON.stringify(nr.source)}).exec(config.workRoot);
580
+ const cloud = new RegExp(${JSON.stringify(or.source)}).exec(config.workRoot);
581
581
  if (process.platform === "linux" && cloud) {
582
582
  const workspaceId = cloud[3];
583
- const owner = (new RegExp(${JSON.stringify(Qr.source)}).exec(workspaceId) || [])[1]
584
- ?? (new RegExp(${JSON.stringify(en.source)}).exec(workspaceId) || [])[1] ?? workspaceId;
585
- return config.jobEnvSourcePath === ${JSON.stringify(Yr)} + "/" + owner + "/job.env";
583
+ const owner = (new RegExp(${JSON.stringify(en.source)}).exec(workspaceId) || [])[1]
584
+ ?? (new RegExp(${JSON.stringify(tn.source)}).exec(workspaceId) || [])[1] ?? workspaceId;
585
+ return config.jobEnvSourcePath === ${JSON.stringify(Qr)} + "/" + owner + "/job.env";
586
586
  }
587
587
  // Personal Cloud controls are root-owned and outside the writable grant.
588
588
  // Admit only the same canonical session, never a caller-selected private path.
@@ -2347,7 +2347,7 @@ function windowsPtyOperation(request, managed) {
2347
2347
  try {
2348
2348
  if (pty.activeProcesses() > 0) pty.terminate();
2349
2349
  for (const startedAt = Date.now(); pty.activeProcesses() > 0;) {
2350
- if (Date.now() - startedAt > ${Zt}) throw new Error("pty_cleanup_timeout");
2350
+ if (Date.now() - startedAt > ${Yt}) throw new Error("pty_cleanup_timeout");
2351
2351
  await new Promise((resolve) => setTimeout(resolve, 20));
2352
2352
  }
2353
2353
  pty.close();
@@ -2795,7 +2795,7 @@ function ptyOperation(request, managed, program = TERMINAL_SHELL) {
2795
2795
  const { members, empty } = native.session(anchor, device);
2796
2796
  try {
2797
2797
  if (empty && exitCode !== null && subreaper) break;
2798
- if (Date.now() - startedAt > ${Zt}) throw new Error("pty_cleanup_timeout");
2798
+ if (Date.now() - startedAt > ${Yt}) throw new Error("pty_cleanup_timeout");
2799
2799
  for (const token of members) {
2800
2800
  if (!native.same(anchor)) throw new Error("pty_session_identity_lost");
2801
2801
  const id = native.identityKey(token);
@@ -2811,7 +2811,7 @@ function ptyOperation(request, managed, program = TERMINAL_SHELL) {
2811
2811
  controlReleased = true;
2812
2812
  let exitTimer;
2813
2813
  try { await Promise.race([child.exited, new Promise((_, reject) => {
2814
- exitTimer = setTimeout(() => reject(new Error("pty_anchor_exit_unconfirmed")), ${jr});
2814
+ exitTimer = setTimeout(() => reject(new Error("pty_anchor_exit_unconfirmed")), ${Ur});
2815
2815
  })]); } finally { clearTimeout(exitTimer); }
2816
2816
  if (timedOut) finish("timeout", 124);
2817
2817
  else if (cancelled) finish("cancelled", 130);
@@ -3362,10 +3362,10 @@ const PI_EXIT_STDIO_GRACE_MS = 100;
3362
3362
  // the token once under quoteDepth layers of single quoting, so the confined
3363
3363
  // script is byte-identical to what the Brain's confineBashPayload gives the
3364
3364
  // bash tool: srt/bwrap, the payload uid, the network allowlist and allowWrite.
3365
- const PI_TOOL_CONFINEMENT_TOKEN = "${ko}";
3365
+ const PI_TOOL_CONFINEMENT_TOKEN = "${Po}";
3366
3366
  function validPiToolConfinement(value) {
3367
3367
  return hasOnlyKeys(value, ["template", "quoteDepth"]) && typeof value.template === "string"
3368
- && value.template.length <= ${Co} && !value.template.includes("\0")
3368
+ && value.template.length <= ${To} && !value.template.includes("\0")
3369
3369
  && value.template.split(PI_TOOL_CONFINEMENT_TOKEN).length === 2 && [1, 2, 3].includes(value.quoteDepth);
3370
3370
  }
3371
3371
  // The script T when this command is exactly this policy's confineBashPayload(T)
@@ -4176,5 +4176,5 @@ void startJobControl().then(() => {
4176
4176
  try { loadJobs(); prepareRequestJournal(); } catch { process.exit(44); }
4177
4177
  if (validPrivateJob) markReady(); else connect();
4178
4178
  }, () => process.exit(45));
4179
- `.trimStart();var b=I("sha256").update(rs,"utf8").digest("hex"),En={42:"worker_config_invalid",43:"workspace_alias_failed",44:"job_journal_unavailable",45:"job_control_failed",46:"job_journal_owned"};
4180
- export{It,kr,at,V,D,R,rs,b,En};
4179
+ `.trimStart();var b=I("sha256").update(os,"utf8").digest("hex"),Cn={42:"worker_config_invalid",43:"workspace_alias_failed",44:"job_journal_unavailable",45:"job_control_failed",46:"job_journal_owned"};
4180
+ export{Lt,Pr,ct,V,D,R,os,b,Cn};