@reason-machines/cli-linux-x64 0.2.505 → 0.2.507

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 (167) hide show
  1. package/THIRD_PARTY_NOTICES.txt +8 -7
  2. package/bin/reason +2 -2
  3. package/bin/runtime/srt/sandbox-runtime.mjs +52 -52
  4. package/bin/vm-hands/api-credentials-q302458a.js +2 -0
  5. package/bin/vm-hands/api-e589y9e0.js +2 -0
  6. package/bin/vm-hands/connect-cli-zeqyjj5t.js +2 -0
  7. package/bin/vm-hands/credentials-drj5ktpt.js +2 -0
  8. package/bin/vm-hands/custom-endpoint-device-j1x988g0.js +2 -0
  9. package/bin/vm-hands/desktop-account-4525j7h3.js +2 -0
  10. package/bin/vm-hands/device-workspace-pt07525s.js +2 -0
  11. package/bin/vm-hands/fsevents-8zxmv89w.js +2 -0
  12. package/bin/vm-hands/hands-worker-source-atg5dc7b.js +2 -0
  13. package/bin/vm-hands/index-ttmxy9nd.js +12818 -0
  14. package/bin/vm-hands/install-receipt-6v65enmf.js +2 -0
  15. package/bin/vm-hands/local-automation-43ry1qn6.js +2 -0
  16. package/bin/vm-hands/local-capabilities-e43ra579.js +2 -0
  17. package/bin/vm-hands/local-desktop-users-9dqayaej.js +2 -0
  18. package/bin/vm-hands/local-display-mac-fnp3317m.js +2 -0
  19. package/bin/vm-hands/local-display-session-9pm9ed2m.js +2 -0
  20. package/bin/vm-hands/local-display-video-xtjezayy.js +2 -0
  21. package/bin/vm-hands/local-managed-process-d179a1aq.js +2 -0
  22. package/bin/vm-hands/local-pty-session-5yh2a63r.js +2 -0
  23. package/bin/vm-hands/managed-runtime-mydc95fa.js +2 -0
  24. package/bin/vm-hands/network-contract-rzw769gw.js +2 -0
  25. package/bin/vm-hands/package-r7sgmw4t.js +2 -0
  26. package/bin/vm-hands/permissions-g919jepr.js +2 -0
  27. package/bin/vm-hands/reason-hands-protocol-8fgk2s53.js +2 -0
  28. package/bin/vm-hands/serve-service-5twngyyg.js +2 -0
  29. package/bin/vm-hands/status-4da3v86c.js +10 -0
  30. package/bin/vm-hands/version-r5qbf8y9.js +2 -0
  31. package/bin/vm-hands/vm-hands-entry-lite-2cf33ark.js +5 -0
  32. package/bin/vm-hands/{vm-hands-entry-lite-s8ty42st.js → vm-hands-entry-lite-2mskbtsd.js} +5 -9
  33. package/bin/vm-hands/vm-hands-entry-lite-38g65s5x.js +3 -0
  34. package/bin/vm-hands/vm-hands-entry-lite-3ahrysca.js +3 -0
  35. package/bin/vm-hands/vm-hands-entry-lite-3sjkzhf6.js +3 -0
  36. package/bin/vm-hands/vm-hands-entry-lite-5gevvgec.js +2 -0
  37. package/bin/vm-hands/vm-hands-entry-lite-5tbntcyq.js +42 -0
  38. package/bin/vm-hands/vm-hands-entry-lite-6a96d80a.js +14 -0
  39. package/bin/vm-hands/vm-hands-entry-lite-6x1an7es.js +7 -0
  40. package/bin/vm-hands/vm-hands-entry-lite-7651j949.js +52 -0
  41. package/bin/vm-hands/vm-hands-entry-lite-7777m86y.js +3 -0
  42. package/bin/vm-hands/{vm-hands-entry-lite-b7wy89y0.js → vm-hands-entry-lite-77j164ps.js} +54 -54
  43. package/bin/vm-hands/vm-hands-entry-lite-7v1rd0sk.js +4 -0
  44. package/bin/vm-hands/vm-hands-entry-lite-87vmbt38.js +3 -0
  45. package/bin/vm-hands/vm-hands-entry-lite-8wcyveeh.js +2 -0
  46. package/bin/vm-hands/vm-hands-entry-lite-b4q5e57n.js +105 -0
  47. package/bin/vm-hands/vm-hands-entry-lite-bnxh4ax9.js +452 -0
  48. package/bin/vm-hands/vm-hands-entry-lite-eabever7.js +112 -0
  49. package/bin/vm-hands/vm-hands-entry-lite-ewr54tpc.js +3 -0
  50. package/bin/vm-hands/vm-hands-entry-lite-f62fvme8.js +5 -0
  51. package/bin/vm-hands/vm-hands-entry-lite-f69t48dj.js +4 -0
  52. package/bin/vm-hands/{vm-hands-entry-lite-8p8hz0j1.js → vm-hands-entry-lite-fcvf8md1.js} +2 -2
  53. package/bin/vm-hands/vm-hands-entry-lite-gvjffc5t.js +65 -0
  54. package/bin/vm-hands/vm-hands-entry-lite-hmaazqdr.js +2 -0
  55. package/bin/vm-hands/vm-hands-entry-lite-mcjca0ez.js +3 -0
  56. package/bin/vm-hands/vm-hands-entry-lite-mk5ayds8.js +3 -0
  57. package/bin/vm-hands/vm-hands-entry-lite-ncbzy69k.js +4 -0
  58. package/bin/vm-hands/vm-hands-entry-lite-np07qyeq.js +3 -0
  59. package/bin/vm-hands/vm-hands-entry-lite-nqdstx24.js +3 -0
  60. package/bin/vm-hands/vm-hands-entry-lite-psywfz8m.js +9 -0
  61. package/bin/vm-hands/vm-hands-entry-lite-qpdpzg8g.js +3 -0
  62. package/bin/vm-hands/vm-hands-entry-lite-qxq147a5.js +2 -0
  63. package/bin/vm-hands/vm-hands-entry-lite-qy9xg6em.js +3 -0
  64. package/bin/vm-hands/vm-hands-entry-lite-ra8c0ytm.js +128 -0
  65. package/bin/vm-hands/{vm-hands-entry-lite-xd2dn3n8.js → vm-hands-entry-lite-rfz60hb3.js} +2 -2
  66. package/bin/vm-hands/vm-hands-entry-lite-rn2rhavz.js +3 -0
  67. package/bin/vm-hands/vm-hands-entry-lite-rzr2ncf5.js +5 -0
  68. package/bin/vm-hands/vm-hands-entry-lite-swrymqj9.js +3 -0
  69. package/bin/vm-hands/vm-hands-entry-lite-tebh7dcm.js +6 -0
  70. package/bin/vm-hands/vm-hands-entry-lite-txd50spx.js +3 -0
  71. package/bin/vm-hands/vm-hands-entry-lite-v6yygjyx.js +126 -0
  72. package/bin/vm-hands/vm-hands-entry-lite-v9engyp5.js +539 -0
  73. package/bin/vm-hands/vm-hands-entry-lite-v9qq2cgv.js +4 -0
  74. package/bin/vm-hands/vm-hands-entry-lite-vrenpefs.js +3 -0
  75. package/bin/vm-hands/vm-hands-entry-lite-vtc8mjpc.js +9 -0
  76. package/bin/vm-hands/{vm-hands-entry-lite-c8bf82tx.js → vm-hands-entry-lite-wrvz9jxy.js} +2 -2
  77. package/bin/vm-hands/vm-hands-entry-lite-x39tmj7j.js +5 -0
  78. package/bin/vm-hands/vm-hands-entry-lite-yretc2th.js +3 -0
  79. package/bin/vm-hands/vm-hands-entry-lite-znd9c7x0.js +2 -0
  80. package/bin/vm-hands/vm-hands-entry-lite.js +3 -1
  81. package/bin/vm-hands/vm-hands-executor-68r7m0z1.js +12 -0
  82. package/bin/vm-hands/vm-hands-op-runner-gppbedw9.js +2 -0
  83. package/bin/vm-hands/vm-hands-runtime-w2fb9gsk.js +4 -0
  84. package/bin/vm-hands/worker-preview-readiness-7xtgxsar.js +2 -0
  85. package/bin/vm-hands/worker-sandbox-s9pyac8p.js +2 -0
  86. package/package.json +1 -1
  87. package/bin/vm-hands/api-credentials-23k36ayh.js +0 -2
  88. package/bin/vm-hands/api-jd29p2kc.js +0 -2
  89. package/bin/vm-hands/ask-relay-zpp0rkhg.js +0 -4
  90. package/bin/vm-hands/connect-cli-xyxgcg6z.js +0 -2
  91. package/bin/vm-hands/credentials-byna24dv.js +0 -2
  92. package/bin/vm-hands/custom-endpoint-device-p2agcsk0.js +0 -2
  93. package/bin/vm-hands/desktop-account-z16mmkxg.js +0 -2
  94. package/bin/vm-hands/device-workspace-y0tk3ne8.js +0 -2
  95. package/bin/vm-hands/hands-worker-source-0qa16xzj.js +0 -2
  96. package/bin/vm-hands/index-h6xkz48h.js +0 -12818
  97. package/bin/vm-hands/install-receipt-nnragt7p.js +0 -2
  98. package/bin/vm-hands/local-automation-xbpca0f3.js +0 -2
  99. package/bin/vm-hands/local-capabilities-30m8pzpv.js +0 -2
  100. package/bin/vm-hands/local-desktop-users-gxfywsan.js +0 -2
  101. package/bin/vm-hands/local-display-mac-n236gkpe.js +0 -2
  102. package/bin/vm-hands/local-display-session-ddafdm8k.js +0 -2
  103. package/bin/vm-hands/local-display-video-gha54xwa.js +0 -2
  104. package/bin/vm-hands/local-managed-process-0zwxyqxd.js +0 -2
  105. package/bin/vm-hands/local-pty-session-w1yrmjm0.js +0 -2
  106. package/bin/vm-hands/managed-runtime-8y90twae.js +0 -2
  107. package/bin/vm-hands/network-contract-v0fkg94d.js +0 -2
  108. package/bin/vm-hands/network-sign-in-3dkdkh3a.js +0 -34
  109. package/bin/vm-hands/package-z2dk6xva.js +0 -2
  110. package/bin/vm-hands/permissions-ga1ax8wd.js +0 -2
  111. package/bin/vm-hands/reason-hands-protocol-vzgxd159.js +0 -2
  112. package/bin/vm-hands/serve-service-42nqanvr.js +0 -2
  113. package/bin/vm-hands/status-m0g7k47a.js +0 -96
  114. package/bin/vm-hands/version-ye6800p2.js +0 -2
  115. package/bin/vm-hands/vm-hands-entry-lite-00y3kn86.js +0 -7
  116. package/bin/vm-hands/vm-hands-entry-lite-0572m6cr.js +0 -344
  117. package/bin/vm-hands/vm-hands-entry-lite-07q2xvk1.js +0 -5
  118. package/bin/vm-hands/vm-hands-entry-lite-0a4cy8gw.js +0 -5
  119. package/bin/vm-hands/vm-hands-entry-lite-1nj03gbj.js +0 -4
  120. package/bin/vm-hands/vm-hands-entry-lite-26xb026c.js +0 -3
  121. package/bin/vm-hands/vm-hands-entry-lite-33h8294z.js +0 -3
  122. package/bin/vm-hands/vm-hands-entry-lite-3882raa5.js +0 -3
  123. package/bin/vm-hands/vm-hands-entry-lite-3rg3znp8.js +0 -3
  124. package/bin/vm-hands/vm-hands-entry-lite-4swa18qz.js +0 -10
  125. package/bin/vm-hands/vm-hands-entry-lite-56v9haps.js +0 -3
  126. package/bin/vm-hands/vm-hands-entry-lite-6x5pj2y0.js +0 -4
  127. package/bin/vm-hands/vm-hands-entry-lite-8twscwtw.js +0 -112
  128. package/bin/vm-hands/vm-hands-entry-lite-8xe0wzp9.js +0 -3
  129. package/bin/vm-hands/vm-hands-entry-lite-ah2ep922.js +0 -4
  130. package/bin/vm-hands/vm-hands-entry-lite-b0p8f295.js +0 -52
  131. package/bin/vm-hands/vm-hands-entry-lite-c5gt0086.js +0 -3
  132. package/bin/vm-hands/vm-hands-entry-lite-dgmap6z4.js +0 -5
  133. package/bin/vm-hands/vm-hands-entry-lite-dhqmbqsh.js +0 -9
  134. package/bin/vm-hands/vm-hands-entry-lite-e1xjfj57.js +0 -3
  135. package/bin/vm-hands/vm-hands-entry-lite-e4hwb89r.js +0 -66
  136. package/bin/vm-hands/vm-hands-entry-lite-g6r5xrk0.js +0 -105
  137. package/bin/vm-hands/vm-hands-entry-lite-ghhpgt3v.js +0 -3
  138. package/bin/vm-hands/vm-hands-entry-lite-h5smacqn.js +0 -3
  139. package/bin/vm-hands/vm-hands-entry-lite-jd31as70.js +0 -3
  140. package/bin/vm-hands/vm-hands-entry-lite-k9n1pk42.js +0 -4
  141. package/bin/vm-hands/vm-hands-entry-lite-kqbats5n.js +0 -3
  142. package/bin/vm-hands/vm-hands-entry-lite-p9fwt68c.js +0 -42
  143. package/bin/vm-hands/vm-hands-entry-lite-pkk555dx.js +0 -3
  144. package/bin/vm-hands/vm-hands-entry-lite-pmw3ycgc.js +0 -5
  145. package/bin/vm-hands/vm-hands-entry-lite-q9g11dbj.js +0 -3
  146. package/bin/vm-hands/vm-hands-entry-lite-r374pchj.js +0 -9
  147. package/bin/vm-hands/vm-hands-entry-lite-r665z809.js +0 -4
  148. package/bin/vm-hands/vm-hands-entry-lite-rck5h8fr.js +0 -3
  149. package/bin/vm-hands/vm-hands-entry-lite-rj8yq6gp.js +0 -3
  150. package/bin/vm-hands/vm-hands-entry-lite-s8zfzv0k.js +0 -6
  151. package/bin/vm-hands/vm-hands-entry-lite-tafgty5k.js +0 -4
  152. package/bin/vm-hands/vm-hands-entry-lite-tbdcmq09.js +0 -3
  153. package/bin/vm-hands/vm-hands-entry-lite-td309c1y.js +0 -5
  154. package/bin/vm-hands/vm-hands-entry-lite-v0bp1v66.js +0 -128
  155. package/bin/vm-hands/vm-hands-entry-lite-v0k8b768.js +0 -452
  156. package/bin/vm-hands/vm-hands-entry-lite-v4r1fggm.js +0 -3
  157. package/bin/vm-hands/vm-hands-entry-lite-vqr3zrqr.js +0 -539
  158. package/bin/vm-hands/vm-hands-entry-lite-wbfmc0xn.js +0 -3
  159. package/bin/vm-hands/vm-hands-entry-lite-x3pbyg92.js +0 -3
  160. package/bin/vm-hands/vm-hands-entry-lite-yqn8h1p0.js +0 -3
  161. package/bin/vm-hands/vm-hands-entry-lite-zj3hb5jk.js +0 -127
  162. package/bin/vm-hands/vm-hands-entry-lite-zz8tr0bm.js +0 -12
  163. package/bin/vm-hands/vm-hands-executor-6tncheya.js +0 -12
  164. package/bin/vm-hands/vm-hands-op-runner-s1ghsym7.js +0 -2
  165. package/bin/vm-hands/vm-hands-runtime-k6egwk2t.js +0 -4
  166. package/bin/vm-hands/worker-preview-readiness-wh0yg1dz.js +0 -2
  167. package/bin/vm-hands/worker-sandbox-s054x4zw.js +0 -2
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$e as l,Qe as a,Re as b,Se as c,Te as d,Ue as e,Ve as f,We as g,Xe as h,Ye as i,Ze as j,_e as k,af as m,bf as n,cf as o,df as p,ef as q,ff as r,gf as s,hf as t,if as u,jf as v}from"./vm-hands-entry-lite-dgmap6z4.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-pkk555dx.js";export{v as runInstallReceiptCli,u as recordInstallationReceipt,o as pathEntryAddedByInstaller,p as parseInstallationReceipt,q as loadInstallationReceipt,l as installerReceiptLauncher,n as installerReasonAlias,i as installerLauncherNames,h as installationReceiptPath,g as installationConfigHome,m as installationAliasMatchesTarget,r as hasInstallationDeviceConsent,s as authorizeInstallationForFutureDevice,t as authorizeDesktopInstallationForFutureDevice,k as INSTALLER_WORKER_EXECUTABLES,j as INSTALLER_WORKER_DIRECTORY,a as INSTALLATION_RECEIPT_SCHEMA_VERSION,b as INSTALLATION_DEVICE_CONSENT_VERSION,f as INSTALLATION_BACKGROUND_MODES,e as FUTURE_DEVICE_CONSENT_SCOPE,c as DESKTOP_ACCOUNT_ACCESS_VERSION,d as DESKTOP_ACCOUNT_ACCESS_SCOPE};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{le as a,me as b,ne as c,oe as d,pe as e,qe as f,re as g,se as h,te as i,ue as j,ve as k,we as l}from"./vm-hands-entry-lite-s8ty42st.js";import"./vm-hands-entry-lite-g6r5xrk0.js";import"./vm-hands-entry-lite-dgmap6z4.js";import"./vm-hands-entry-lite-p9fwt68c.js";import"./vm-hands-entry-lite-v0bp1v66.js";import"./vm-hands-entry-lite-zj3hb5jk.js";import"./vm-hands-entry-lite-b0p8f295.js";import"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-rj8yq6gp.js";import"./vm-hands-entry-lite-td309c1y.js";import"./vm-hands-entry-lite-c8bf82tx.js";import"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-k9n1pk42.js";import"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-r665z809.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{d as runRelayed,e as runMacComputerUse,l as runLocalAutomation,k as runAutomationCallLocally,b as parseAutomationPayload,g as localUserChromeProfiles,h as localUserChromeInstance,f as localUserChromeHost,j as localBrowserProfile,c as localAutomationAvailable,i as ensureLocalBrowser,a as AUTOMATION_CHUNK_BYTES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{gb as c,hb as d,ib as e,jb as f,kb as g,lb as h,mb as i,nb as j,ob as k,pb as l,qb as m,rb as n,sb as o,tb as p,ub as q,vb as r,wb as s,xb as t,yb as u}from"./vm-hands-entry-lite-vqr3zrqr.js";import"./vm-hands-entry-lite-00y3kn86.js";import"./vm-hands-entry-lite-ah2ep922.js";import"./vm-hands-entry-lite-v0k8b768.js";import"./vm-hands-entry-lite-s8zfzv0k.js";import"./vm-hands-entry-lite-b7wy89y0.js";import"./vm-hands-entry-lite-dhqmbqsh.js";import"./vm-hands-entry-lite-3882raa5.js";import"./vm-hands-entry-lite-tbdcmq09.js";import"./vm-hands-entry-lite-tafgty5k.js";import"./vm-hands-entry-lite-8xe0wzp9.js";import"./vm-hands-entry-lite-s8ty42st.js";import"./vm-hands-entry-lite-g6r5xrk0.js";import"./vm-hands-entry-lite-dgmap6z4.js";import"./vm-hands-entry-lite-p9fwt68c.js";import"./vm-hands-entry-lite-v0bp1v66.js";import"./vm-hands-entry-lite-zj3hb5jk.js";import"./vm-hands-entry-lite-b0p8f295.js";import{Ah as b}from"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-rj8yq6gp.js";import"./vm-hands-entry-lite-td309c1y.js";import"./vm-hands-entry-lite-c8bf82tx.js";import"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-k9n1pk42.js";import"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-r665z809.js";import{ll as a}from"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{j as writeOpenFlags,g as spawnCaptured,f as sandboxProfile,e as safeEnvironment,k as runTransferCapability,i as runFileCapability,t as rebindLocalHandsControl,b as isProtectedLocalPath,u as executeLocalOperation,m as enrolledWorkspaceRootFingerprint,q as enrolledRootPaths,p as enrolledHomeContainedRootFingerprints,n as enrolledAccountRootPath,o as enrolledAccountRootFingerprint,s as deliverLocalHandsEnvironment,h as defaultLocalCommandRunner,d as confinedExecutionShell,r as capabilityInventoryForRoots,c as SHORT_REQUEST_CAPABILITIES,a as LocalCapabilityError,l as LOCAL_CAPABILITY_REGISTRY};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{el as a,fl as b,gl as c,hl as d,il as e,jl as f,kl as g}from"./vm-hands-entry-lite-r665z809.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{f as trackDesktopRun,c as releaseLocalDesktop,a as noteLocalDesktopUse,g as holdLocalDesktop,b as forgetLocalDesktopUse,e as DESKTOP_WAIT_MS,d as DESKTOP_IDLE_MS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oh as a,Ph as b,Qh as c,Rh as d,Sh as e,Th as f,Uh as g}from"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-pkk555dx.js";export{c as requestMacScreenAccess,d as parseMacWindowBounds,a as parseMacScreenStatus,e as openMacWindowBounds,g as openMacInput,b as macScreenStatus,f as MacInputTranslator};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kg as a,Lg as b,Mg as c,Ng as d,Og as e,Pg as f,Qg as g,Rg as h,Sg as i}from"./vm-hands-entry-lite-v0bp1v66.js";import"./vm-hands-entry-lite-zj3hb5jk.js";import"./vm-hands-entry-lite-b0p8f295.js";import"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-rj8yq6gp.js";import"./vm-hands-entry-lite-td309c1y.js";import"./vm-hands-entry-lite-c8bf82tx.js";import"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-k9n1pk42.js";import"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-r665z809.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{i as runLocalDisplayStream,h as resizeLinuxDesktop,f as privateDirectory,c as parseDisplayStreamPayload,e as localDisplayReady,d as localDisplayAvailable,g as ensureLinuxDesktop,a as LOCAL_DISPLAY_MAX_SESSION_MS,b as LINUX_WORKER_DISPLAY};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$g as b,_g as a,ah as c,bh as d,ch as e}from"./vm-hands-entry-lite-zj3hb5jk.js";import"./vm-hands-entry-lite-b0p8f295.js";import"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-k9n1pk42.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-pkk555dx.js";export{d as simulatorVideoFfmpeg,e as localDisplayVideoAvailable,c as createDisplayVideoLane,b as WINDOWS_SCREEN,a as MAC_SCREEN};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Sb as a,Tb as b,Ub as c,Vb as d,Wb as e,Xb as f}from"./vm-hands-entry-lite-ah2ep922.js";import"./vm-hands-entry-lite-v0k8b768.js";import"./vm-hands-entry-lite-s8zfzv0k.js";import"./vm-hands-entry-lite-b7wy89y0.js";import"./vm-hands-entry-lite-dhqmbqsh.js";import"./vm-hands-entry-lite-tafgty5k.js";import"./vm-hands-entry-lite-p9fwt68c.js";import"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-td309c1y.js";import"./vm-hands-entry-lite-c8bf82tx.js";import"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-k9n1pk42.js";import"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-r665z809.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{d as runManagedDeviceProcess,f as retireManagedDeviceProcess,c as managedProcessJournalLocations,e as controlManagedDeviceProcess,a as ManagedProcessStoppedError,b as DIRECT_PROCESS_MAX_JOURNALS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$h as f,Wh as a,Xh as b,Yh as c,Zh as d,_h as e,ai as g,bi as h,ci as i,di as j}from"./vm-hands-entry-lite-rj8yq6gp.js";import"./vm-hands-entry-lite-td309c1y.js";import"./vm-hands-entry-lite-c8bf82tx.js";import"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{j as runLocalPtySession,e as resolvePtyWorkingDirectory,g as ptyRuntimeSupported,d as parsePtyStartPayload,h as defaultSpawnPty,f as defaultLoginShell,i as defaultConnect,a as LOCAL_PTY_MAX_SESSION_MS,c as LOCAL_PTY_MAX_SESSIONS,b as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$ as s,Aa as T,Ba as U,Ca as V,Da as W,Ea as X,Fa as Y,Ga as Z,Ha as _,W as n,X as o,Y as p,Z as q,_ as r,aa as t,ba as u,ca as v,da as w,ea as x,fa as y,ga as z,ha as A,ia as B,ja as C,ka as D,la as E,ma as F,na as G,oa as H,pa as I,qa as J,ra as K,sa as L,ta as M,ua as N,va as O,wa as P,xa as Q,ya as R,za as S}from"./vm-hands-entry-lite-zz8tr0bm.js";import"./vm-hands-entry-lite-tbdcmq09.js";import"./vm-hands-entry-lite-tafgty5k.js";import{Aj as b,Bj as c,Cj as d,Dj as e,Ej as f,Fj as g,Gj as h,Ij as i,Jj as j,Lj as k,Mj as l,Nj as m,zj as a}from"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{G as verifyManagedRuntimeCodeSignatures,m as verifyManagedRuntimeArtifact,J as updateManagedRuntime,l as sha256Hex,S as rollbackManagedRuntime,T as recoverManagedRuntimeActivation,X as recordManagedRuntimeLifecycle,W as readManagedRuntimeLifecycleEvents,j as parseAndVerifyManagedRuntimeManifest,k as parseAndVerifyLegacyManagedRuntimeManifest,B as managedRuntimeVersionPath,E as managedRuntimeTarget,M as managedRuntimePointerVersion,z as managedRuntimePaths,Q as managedRuntimeExecutableVersion,C as managedRuntimeCredentialLibraryPath,h as managedRuntimeCredentialLibraryAssetName,g as managedRuntimeAssetName,A as legacyManagedRuntimePaths,P as isManagedRuntimeVersionExecutable,O as isManagedRuntimeExecutable,L as installManagedRuntimeLauncher,K as installManagedRuntimeArtifact,Z as flushManagedRuntimeLifecycleEvents,H as fetchManagedRuntimeBytes,I as defaultManagedRuntimeHealthCheck,N as currentManagedRuntimeVersion,D as compareManagedRuntimeVersions,i as canonicalJson,_ as bootstrapManagedRuntime,F as assertManagedRuntimeSignatureEvidence,R as activateManagedRuntime,V as acquireManagedRuntimeLock,U as acquireManagedRuntimeDirectoryLock,Y as acknowledgeManagedRuntimeLifecycleEvents,f as ManagedRuntimeError,v as MANAGED_RUNTIME_UPDATE_HEALTH_TIMEOUT_MS,e as MANAGED_RUNTIME_TARGETS,d as MANAGED_RUNTIME_MAX_MANIFEST_BYTES,p as MANAGED_RUNTIME_MAX_LIFECYCLE_EVENTS,q as MANAGED_RUNTIME_MAX_LIFECYCLE_BYTES,c as MANAGED_RUNTIME_MAX_ARTIFACT_BYTES,b as MANAGED_RUNTIME_MANIFEST_VERSION,r as MANAGED_RUNTIME_MANIFEST_URL,o as MANAGED_RUNTIME_LIFECYCLE_VERSION,y as MANAGED_RUNTIME_LIFECYCLE_EVENTS,n as MANAGED_RUNTIME_LAYOUT_VERSION,u as MANAGED_RUNTIME_HEALTH_TIMEOUT_MS,s as MANAGED_RUNTIME_FETCH_TIMEOUT_MS,t as MANAGED_RUNTIME_ARTIFACT_FETCH_TIMEOUT_MS,a as LEGACY_MANAGED_RUNTIME_MANIFEST_VERSION,w as DEVICE_BROKER_SIGNING_IDENTIFIER,x as DEVICE_BROKER_DESIGNATED_REQUIREMENT};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$f as H,Af as g,Ag as ga,Bf as h,Bg as ha,Cf as i,Cg as ia,Df as j,Dg as ja,Ef as k,Eg as ka,Ff as l,Fg as la,Gf as m,Gg as ma,Hf as n,Hg as na,If as o,Ig as oa,Jf as p,Jg as pa,Kf as q,Lf as r,Mf as s,Nf as t,Of as u,Pf as v,Qf as w,Rf as x,Sf as y,Tf as z,Uf as A,Vf as B,Wf as C,Xf as D,Yf as E,Zf as F,_f as G,ag as I,bg as J,cg as K,dg as L,eg as M,fg as N,gg as O,hg as P,ig as Q,jg as R,kg as S,lg as T,mg as U,ng as V,og as W,pg as X,qg as Y,rg as Z,sg as _,tg as $,uf as a,ug as aa,vf as b,vg as ba,wf as c,wg as ca,xf as d,xg as da,yf as e,yg as ea,zf as f,zg as fa}from"./vm-hands-entry-lite-p9fwt68c.js";import"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-pkk555dx.js";export{ga as parseLocalRuntimeRootsSyncResponse,ca as parseLocalRuntimeRegistrationResponse,ba as parseLocalRuntimeProofChallenge,ma as parseLocalRuntimeOperationHeartbeatResponse,na as parseLocalRuntimeOperationEventsResponse,oa as parseLocalRuntimeOperationEnvironmentResponse,pa as parseLocalRuntimeOperationCompletionResponse,la as parseLocalRuntimeOperationClaim,ja as parseLocalRuntimeLocalSubscriptionResponse,ka as parseLocalRuntimeLifecycleResponse,ha as parseLocalRuntimeIdentityResponse,ea as parseLocalRuntimeHeartbeatResponse,fa as parseLocalRuntimeFirstHeartbeat,aa as parseLocalRuntimeErrorEnvelope,da as parseLocalRuntimeEnrollmentResponse,ia as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,$ as buildLocalRuntimeDeviceProofBytes,W as WORKER_STARTUP_TIMING_STAGES,R as WORKER_PREVIEW_CARRIED_JOBS,q as VM_HANDS_WORKSPACE_GRANT_CONTROL,p as VM_HANDS_WORKSPACE_DEFERRED_KEY,r as VM_HANDS_UNBIND_UNVERIFIED_EVENT,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,X as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,k as LOCAL_RUNTIME_SESSION_VM_HANDS_REGISTER,h as LOCAL_RUNTIME_SESSION_PRE_AUTH_MAX_BYTES,g as LOCAL_RUNTIME_SESSION_PATH,m as LOCAL_RUNTIME_SESSION_CLOSE,l as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,i as LOCAL_RUNTIME_SESSION_AUTH_DEADLINE_MS,b as LOCAL_RUNTIME_ROUTE_PREFIX,f as LOCAL_RUNTIME_ROUTES,a as LOCAL_RUNTIME_PROTOCOL_VERSION,Y as LOCAL_RUNTIME_LIFECYCLE_EVENTS,_ as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,Z as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,T as JOBS_START_WAIT_KEY,S as JOBS_START_WAIT,v as HANDS_WORKSPACE_CHECK_KEY,u as HANDS_WORKSPACE_CHECK,M as HANDS_SESSION_GROUP_KEY,L as HANDS_SESSION_GROUP,Q as HANDS_SESSION_CAP_NONE,P as HANDS_SESSION_CAP_KEY,O as HANDS_SESSION_ACCOUNT_KEY,N as HANDS_SESSION_ACCOUNT,x as HANDS_REBIND_KEY,y as HANDS_REBIND_CONTROL,w as HANDS_REBIND,I as HANDS_MODEL_JOBS_EGRESS_KEY,H as HANDS_MODEL_JOBS_EGRESS,E as HANDS_LARGE_ENVIRONMENT_KEY,D as HANDS_LARGE_ENVIRONMENT,K as HANDS_JOBS_USER_KEY,J as HANDS_JOBS_USER,C as HANDS_HEADLESS_BROWSER_KEY,B as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,t as HANDS_ENVIRONMENT_AT_CLAIM_KEY,s as HANDS_ENVIRONMENT_AT_CLAIM,G as HANDS_CONFINEMENT_KEY,F as HANDS_CONFINEMENT,A as HANDS_CLOUD_ACCESS_KEY,z as HANDS_CLOUD_ACCESS,U as AUTOMATION_USER_CHROME,V as AUTOMATION_CLOUD_SESSIONS};
@@ -1,34 +0,0 @@
1
- // @bun
2
- import{A as PJ,B as IJ}from"./vm-hands-entry-lite-rck5h8fr.js";import{F as HJ,G as I,H as s,J as QJ,L as XJ}from"./vm-hands-entry-lite-6x5pj2y0.js";import{S as VJ,T as p,U as k}from"./vm-hands-entry-lite-0a4cy8gw.js";import{Ia as H,Ja as kJ,Ka as mJ,La as ZJ,Ma as $J,Na as E,Pa as R}from"./vm-hands-entry-lite-4swa18qz.js";import"./vm-hands-entry-lite-33h8294z.js";import"./vm-hands-entry-lite-3882raa5.js";import{ef as wJ}from"./vm-hands-entry-lite-dgmap6z4.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import{Mk as fJ,Nk as SJ}from"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import{Tk as w,Vk as jJ,Xk as EJ}from"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-e4hwb89r.js";import{sl as DJ}from"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import{Gl as AQ}from"./vm-hands-entry-lite-pkk555dx.js";import{createHash as FQ}from"crypto";import{chmodSync as RQ,mkdirSync as TQ,readFileSync as CQ,rmSync as m,writeFileSync as _Q}from"fs";import{homedir as LQ,hostname as bQ}from"os";import{dirname as NQ,join as OQ}from"path";import{createInterface as fQ}from"readline";import{spawn as oJ,spawnSync as UJ}from"child_process";import{chmodSync as tJ,closeSync as iJ,existsSync as aQ,mkdirSync as xJ,openSync as nJ,readFileSync as d,rmSync as YJ,statSync as AJ,writeFileSync as FJ}from"fs";import{homedir as RJ}from"os";import{basename as GJ,dirname as TJ,join as eJ,resolve as tQ}from"path";async function JQ(J,Q,Z=3){let $;for(let q=0;q<Z;q+=1){try{let z=await J();if(z.status<500&&z.status!==429)return z;$=Error(`http_${z.status}`)}catch(z){$=z}if(q+1<Z)await Q(400*2**q)}throw new I(`Reason pairing could not be reached: ${$ instanceof Error?$.message:String($)}`)}async function QQ(J){let{apiOrigin:Q,body:Z,fetchImpl:$}=J;if(typeof Z.access_token!=="string"||typeof Z.refresh_token!=="string"||typeof Z.expires_in!=="number")throw new I("Reason returned an incomplete paired login.");let q={apiOrigin:Q,clientId:J.clientId,orgId:"",accessToken:Z.access_token,refreshToken:Z.refresh_token,expiresAt:new Date(J.now()+Z.expires_in*1000).toISOString(),scopes:typeof Z.scope==="string"?Z.scope.split(/\s+/).filter(Boolean):[...HJ]},z=await JQ(()=>$(`${Q}/v3/self`,{redirect:"error",headers:{authorization:`Bearer ${q.accessToken}`}}),J.sleep),j=await z.json().catch(()=>({}));if(!z.ok||typeof j.org_id!=="string")throw new I(`Could not resolve your Reason workspace (${z.status})`);if(q.orgId=j.org_id,J.expectedOrganizationId&&q.orgId!==J.expectedOrganizationId)throw new I("Reason pairing workspace changed.");return q}async function CJ(J){return await QQ({apiOrigin:s(J.apiOrigin),clientId:J.clientId,body:J.token,fetchImpl:J.fetchImpl??fetch,sleep:(Q)=>new Promise((Z)=>setTimeout(Z,Q)),now:Date.now})}function ZQ(J=RJ(),Q=w()){return eJ(J,".reason",Q==="production"?"sign-in.json":`sign-in.${Q}.json`)}function F(J){let Q=J.replace(/\.json$/,"");return{lock:`${Q}.lock`,log:`${Q}.log`}}function $Q(J){try{let Q=JSON.parse(d(J,"utf8"));return[Q.apiOrigin,Q.clientId,Q.deviceCode,Q.pairingId,Q.verifier,Q.verificationUrl].every(($)=>typeof $==="string")&&typeof Q.expiresAt==="number"?Q:null}catch{return null}}function qQ(J,Q){xJ(TJ(J),{recursive:!0,mode:448}),FJ(J,`${JSON.stringify(Q)}
3
- `,{mode:384}),tJ(J,384)}var zQ="The last link expired before it was used.";var zJ="REASON_SIGN_IN_FINISHER",jQ=!1;function _J(J){try{return process.kill(J,0),!0}catch(Q){return Q.code==="EPERM"}}function a(J){try{let{pid:Q,until:Z,signedIn:$}=JSON.parse(d(J,"utf8"));return typeof Q==="number"&&typeof Z==="number"?{pid:Q,until:Z,...$===!0?{signedIn:$}:{}}:null}catch{return null}}function VQ(J){try{if(process.platform==="linux"){let Q=Number(d(`/proc/${J}/stat`,"utf8").split(") ")[1]?.split(" ")[19]),Z=Number(/^btime (\d+)$/m.exec(d("/proc/stat","utf8"))?.[1]);return Number.isFinite(Q)&&Number.isFinite(Z)?(Z+Q/100)*1000:null}if(process.platform==="darwin"){let Q=UJ("/bin/ps",["-o","lstart=","-p",String(J)],{encoding:"utf8",env:{LC_ALL:"C",TZ:"UTC"},timeout:2000}),Z=Date.parse(`${Q.stdout.trim()} UTC`);return Number.isFinite(Z)?Z:null}if(process.platform==="win32"){let Q=UJ(DJ("powershell.exe"),["-NoProfile","-NonInteractive","-Command",`(Get-Process -Id ${J} -ErrorAction Stop).StartTime.ToUniversalTime().ToString('o')`],{encoding:"utf8",windowsHide:!0,timeout:1e4}),Z=Q.status===0?Date.parse(Q.stdout.trim()):NaN;return Number.isFinite(Z)?Z:null}}catch{}return null}function O(J,Q){let Z=a(J);if(!Z||Q()>=Z.until||!_J(Z.pid))return null;let $=AJ(J,{throwIfNoEntry:!1})?.mtimeMs,q=VQ(Z.pid);return $!==void 0&&q!==null&&q>$+2000?null:Z}function f(J,Q,Z="w"){FJ(J,`${JSON.stringify(Q)}
4
- `,{flag:Z,mode:384})}function r(J,Q,Z){xJ(TJ(J),{recursive:!0,mode:448});for(let $=0;$<2;$+=1){try{return f(J,{pid:process.pid,until:Q},"wx"),!0}catch(q){if(q.code!=="EEXIST")throw q}if(O(J,Z))return!1;YJ(J,{force:!0})}return!1}function o(J){if(a(J)?.pid===process.pid)YJ(J,{force:!0})}function LJ(J,Q,Z){let $=a(J);if($?.pid===process.pid||$&&$.pid===process.ppid)f(J,{pid:process.pid,until:Q});else if(!r(J,Q,Z))return!1;return process.once("exit",()=>o(J)),!0}var XQ=262144;function bJ(J,Q,Z){if(process.platform!=="darwin"&&process.platform!=="linux"&&process.platform!=="win32")return null;let $=GJ(process.execPath).startsWith("bun");if($&&(process.argv[1]!==Bun.main||GJ(Bun.main)!=="reason"))return null;let q=$?[...process.execArgv,Bun.main]:[],z=F(Q).log,j;try{let X=(AJ(z,{throwIfNoEntry:!1})?.size??0)>XQ;j=nJ(z,X?"w":"a",384);let V=oJ(process.execPath,[...q,...J],{cwd:RJ(),detached:!0,windowsHide:!0,stdio:["ignore",j,j],env:{...process.env,[zJ]:String(Z)}});return V.on("error",()=>{return}),V.unref(),V.pid??null}catch{return null}finally{if(j!==void 0)iJ(j)}}function NJ(J=process.env){let Q=Number(J[zJ]);if(delete J[zJ],!(Q>0))return!1;return jQ=!0,setTimeout(()=>{let Z=ZQ();if(($Q(Z)?.expiresAt??1/0)<=Date.now()+1000)qQ(Z,{ended:zQ,at:Date.now()});process.exit(0)},Math.max(0,Q-Date.now())).unref(),process.once("SIGTERM",()=>process.exit(143)),!0}async function t(J,Q={}){let Z=O(J,Date.now);if(!Z)return!0;if(Q.unlessSignedIn&&Z.signedIn)return!1;if(Z.pid!==process.pid)try{process.kill(Z.pid,"SIGTERM")}catch{}for(let $=Date.now()+5000;Date.now()<$&&O(J,Date.now)?.pid===Z.pid;)await new Promise((q)=>setTimeout(q,100));if(a(J)?.pid===Z.pid&&!_J(Z.pid))YJ(J,{force:!0});return!0}var OJ=`If this looks like a bug in Reason, report it (agents: with your user's OK): reason feedback "<what you ran and what happened>" \xB7 ${"https://docs.reasonmachines.com/api-reference/feedback/report-agent-feedback"}`;import{randomUUID as YQ}from"crypto";import{arch as BQ,platform as WQ}from"os";var KQ=1,MQ=/^[0-9A-Za-z.+-]{1,64}$/,UQ=/^config_rename_unavailable:[A-Za-z0-9_]{1,32}$/;function GQ(J){let Q=J.config_folder_problem;return Q===void 0||UQ.test(Q)?J:{...J,config_folder_problem:"config_rename_unavailable:other"}}function DQ(J){return J==="darwin"||J==="linux"||J==="win32"?J:null}function HQ(J){if(J==="arm64"||J==="x64")return J;return"other"}function xQ(J){let Q=J.receipt.installation_id,Z=DQ(J.currentPlatform??WQ());if(!Q||!Z)return null;return{schema_version:KQ,event_id:J.eventId??YQ(),event:J.event.kind,installation_id:Q,channel:J.receipt.channel,cli_version:J.currentVersion??fJ,installed_version:J.installedVersion??J.receipt.version,platform:Z,architecture:HQ(J.currentArchitecture??BQ()),install_method:J.receipt.install_method,background_mode:J.receipt.background_mode,legacy_device_state:J.legacyDeviceState??!1,...J.event.kind==="update_checked"?{update_outcome:J.event.outcome,from_version:J.event.fromVersion,...J.event.errorCode?{error_code:J.event.errorCode}:{},...J.legacyDeviceMove?{legacy_device_move:J.legacyDeviceMove}:{},...J.legacy?{legacy:GQ(J.legacy)}:{}}:{},...J.event.kind==="network_finished"?{network_command:J.event.command,network_outcome:J.event.outcome,...J.event.stage?{network_stage:J.event.stage}:{},...J.event.engineVersion&&MQ.test(J.event.engineVersion)?{engine_version:J.event.engineVersion}:{},duration_ms:Math.max(0,Math.min(86400000,Math.round(J.event.durationMs)))}:{}}}async function vJ(J,Q,Z={}){let $=xQ({receipt:J,event:Q,...Z.currentPlatform?{currentPlatform:Z.currentPlatform}:{},...Z.currentArchitecture?{currentArchitecture:Z.currentArchitecture}:{},...Z.currentVersion?{currentVersion:Z.currentVersion}:{},...Z.installedVersion?{installedVersion:Z.installedVersion}:{},...Z.legacyDeviceState===void 0?{}:{legacyDeviceState:Z.legacyDeviceState},...Z.legacyDeviceMove?{legacyDeviceMove:Z.legacyDeviceMove}:{},...Z.legacy?{legacy:Z.legacy}:{},...Z.eventId?{eventId:Z.eventId}:{}});if(!$)return!1;let q=new AbortController,z=setTimeout(()=>q.abort(),Z.timeoutMs??2500);try{return(await(Z.fetchImpl??fetch)(EJ(J.channel),{method:"POST",headers:{accept:"application/json","content-type":"application/json","user-agent":`reason-cli/${$.cli_version}`},body:JSON.stringify({events:[$]}),signal:q.signal})).ok}catch{return!1}finally{clearTimeout(z)}}var y={start:"/network/auth/start",poll:"/network/auth/poll",key:"/network/auth/key",teams:"/v3/network/teams",leave:"/v3/network/teams/leave",proof:"/v3/network/proof"},EQ=1e5,vQ=60000,yQ=20,h=600000,uJ=/^rnk-[A-Z0-9]{4}-[A-Z0-9]{4}$/i,yJ=/^[a-z0-9-]{1,40}$/;function SQ(J=process.env,Q=process.platform){if(J.SSH_CONNECTION||J.SSH_TTY)return!1;if(Q==="darwin"||Q==="win32")return!0;return Q==="linux"&&Boolean(J.DISPLAY||J.WAYLAND_DISPLAY)}function hJ(J){let Q=J&&typeof J==="object"?J:{},Z=Q.token&&typeof Q.token==="object"?Q.token:null,$=Q.account?.email;if(Q.action!=="create"&&Q.action!=="join"||typeof Q.team_name!=="string"||typeof Q.name!=="string"||typeof Q.proof!=="string"||!Z||typeof Z.client_id!=="string")throw Error("Reason's answer to the sign-in was incomplete. Run reason network again.");return{action:Q.action,teamName:Q.team_name,link:typeof Q.link==="string"?Q.link:null,name:Q.name,proof:Q.proof,email:typeof $==="string"?$:null,token:{...Z,client_id:Z.client_id}}}class _ extends Error{}class BJ extends Error{}function D(J=LQ(),Q=w()){return OQ(J,".reason",Q==="production"?"network-sign-in.json":`network-sign-in.${Q}.json`)}function gJ(J){try{return JSON.parse(CQ(J,"utf8"))}catch{return{}}}function u(J){let Q=gJ(J);return typeof Q.apiOrigin==="string"&&typeof Q.pollToken==="string"&&typeof Q.url==="string"&&typeof Q.code==="string"&&typeof Q.expiresAt==="number"&&typeof Q.endpoint==="string"?Q:null}function n(J,Q){TQ(NQ(J),{recursive:!0,mode:448}),_Q(J,`${JSON.stringify(Q)}
5
- `,{mode:384}),RQ(J,384)}var e=(J)=>u(D())?.pollToken===J.pollToken;function PQ(J){let{ended:Q,at:Z}=gJ(J);if(typeof Q!=="string")return null;return m(J,{force:!0}),typeof Z==="number"&&Date.now()-Z<86400000?Q:null}async function NZ(J=D()){m(J,{force:!0}),await t(F(J).lock)}async function S(J,Q,Z={}){let $=AbortSignal.timeout(Z.timeoutMs??30000),q=await fetch(J,{method:"POST",redirect:"error",signal:Z.signal?AbortSignal.any([Z.signal,$]):$,headers:{"content-type":"application/json","user-agent":SJ,...Z.token?{authorization:`Bearer ${Z.token}`}:{}},body:JSON.stringify(Q)}),z=await q.json().catch(()=>({}));return{status:q.status,body:z&&typeof z==="object"?z:{}}}async function cJ(J,Q,Z){let $=await S(`${J.apiOrigin}${y.poll}`,{poll_token:J.pollToken,wait_seconds:Q},{timeoutMs:(Q+15)*1000,...Z?{signal:Z}:{}}).catch(()=>null);if(!$||$.status>=500||$.status===429)return"pending";if($.body.status==="expired")throw Error("The sign-in link expired before it was used. Run reason network again.");if($.status===404)throw Error("Reason has no record of this sign-in any more. Run reason network again.");if($.status>=400)throw Error(`Reason refused the sign-in (HTTP ${$.status}). Run reason network again.`);return $.body.status==="ready"?hJ($.body.result):"pending"}var lJ="That isn't a key from the sign-in page: it looks like rnk-XXXX-XXXX.";async function dJ(J,Q){let Z=await S(`${J.apiOrigin}${y.key}`,{key:`rnk-${Q.trim().slice(4).toUpperCase()}`,poll_token:J.pollToken});if(Z.status>=400||Z.body.status!=="ready")throw Error(Z.status>=500?`Reason is busy right now (HTTP ${Z.status}); try the key again in a minute.`:"That key didn't work: each one works once, for 10 minutes after the page shows it.");return hJ(Z.body.result)}async function pJ(J,Q){let Z={},$=!1,q=()=>{},z=()=>{$=!0,q()},j=null,X=Q.stdin?fQ({input:Q.stdin}):null;X?.on("line",(Y)=>{let B=Y.trim();if(!B||Z.result||Z.keying)return;if(!uJ.test(B)){Q.io.stderr.write(`${lJ}
6
- `);return}j?.abort(),Z.keying=dJ(J,B).then((W)=>{Z.result=W},(W)=>{Q.io.stderr.write(`${H(W instanceof Error?W.message:String(W))}
7
- `)}).finally(()=>{Z.keying=void 0,z()})});let V=(Y)=>$?Promise.resolve():new Promise((B)=>{let W=setTimeout(B,Math.max(0,Y));q=()=>{clearTimeout(W),B()}});try{while(Date.now()<Q.deadline){if(Z.keying)await Z.keying;if(Z.result)return Z.result;if(!e(J))return"gone";$=!1;let Y=Date.now();j=new AbortController;let B=await cJ(J,Math.max(0,Math.min(yQ,Math.floor((Q.deadline-Y)/1000))),j.signal);if(j=null,B!=="pending"&&!Z.keying&&!Z.result)return B;if(Date.now()-Y<1000)await V(1000)}if(Z.keying)await Z.keying;return Z.result??null}finally{X?.close(),Q.stdin?.pause()}}function IQ(J,Q){let Z=(Q?.split("@")[0]??"").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),$=Z.length>1?Z[Z.length-1][0]:void 0,q=(z)=>`${J.slice(0,40-z.length-1).replace(/-+$/,"")}-${z}`;return[...$?[q($)]:[],...Array.from({length:8},(z,j)=>q(String(j+2)))]}var v=(J)=>FQ("sha256").update(J).digest("hex");async function sJ(J,Q,Z,$){let q=await S(`${J}${y.teams}`,{team_id:Z.teamId,team_name:Z.teamName,link:$},{token:Q}).catch(()=>null);return q!==null&&q.status>=200&&q.status<300}async function aJ(J,Q,Z,$,q={}){let z=R(Z);if(!z||!q.always&&Q.registered===v(z.secret))return!0;let j=ZJ(q.home),X=k(j)?await QJ({path:j}).catch(()=>null):null,V=(await J.team())?.name??Q.team;if(X&&await sJ(X.apiOrigin,X.accessToken,{teamId:z.teamId,teamName:V},Z)){if(Q.registered!==v(z.secret))E({...Q,registered:v(z.secret)},q.home);return!0}return $?.stderr.write(KJ(`Your Reason account still lists ${H(V)}'s old link; signing in for this network refreshes it: reason network join '${Z}'`)+`
8
- `),!1}async function OZ(J,Q,Z){let $=$J(Z);if(!$)return Q;let{url:q}=await J.link(),z=R(q);if(!z||v(z.secret)===Q)return Q;return await aJ(J,$,q,null,{always:!0,...Z?{home:Z}:{}})?v(z.secret):Q}async function wQ(J,Q){if(!$J())return null;let Z=Q?.team??await J.team().catch(()=>null),$=Q?.link??(Z?await J.link().then((V)=>V.url,()=>null):null),q=$?R($):null,z=ZJ(),j=Z&&q&&k(z)?await QJ({path:z}).catch(()=>null):null;if(!Z||!$||!q||!j)return null;let X=Z.machines.every((V)=>V.isMe);return async()=>{await S(`${j.apiOrigin}${y.leave}`,{team_id:q.teamId,link:$,last:X},{token:j.accessToken,timeoutMs:5000}).catch(()=>null)}}async function kQ(J){let Q=J??await QJ().catch(()=>null);if(!Q)return;let{ReasonApi:Z}=await import("./api-jd29p2kc.js");return await new Z(Q).self(AbortSignal.timeout(30000)).then(($)=>$.email?.toLowerCase()??null,()=>{return})}var WJ=`Signed in; this computer is still joining your network. Run reason network again in a moment to see where it stands.
9
- `;async function JJ(J,Q,Z,$,q=!1){let z=F(D()).lock;f(z,{pid:process.pid,until:Z.expiresAt+h,signedIn:!0});let j=Z.link??Q.link;if(!yJ.test(Q.name))throw Error("Reason's answer named you in a way Reason Network can't use. Run reason network again.");if(Q.action==="join"&&!(j&&R(j)))throw Error("Reason's answer had no network link to join. Run reason network again.");let X=await CJ({apiOrigin:Z.apiOrigin,clientId:Q.token.client_id,token:Q.token}),V=Q.action==="create"?{create:Q.teamName}:{join:j},Y=await J.team(),B=Y?{team:Y.name,person:Y.person,link:(await J.link()).url}:null,W=Y&&B?await wQ(J,{team:Y,link:B.link}):null;if(Y)await J.leave();let{name:L,proof:b}=Q,g=IQ(Q.name,Q.email),M,N=(K,G)=>J.enterTeam(V,K,G).catch((U)=>{throw new BJ(U instanceof Error?U.message:String(U))});try{M=await N(L,b);while(M.state!=="entered"){if(M.state==="needs_owner")throw new _(`Turn on one of your other computers on ${Q.teamName} and run reason network again.`);let K=g.shift();if(!K)throw Error(`Every name tried for you is taken on ${Q.teamName}. Ask a teammate to free one, then run reason network again.`);let G=await S(`${Z.apiOrigin}${y.proof}`,{endpoint:Z.endpoint,name:K},{token:X.accessToken}),U=typeof G.body.name==="string"?G.body.name:K;if(G.status>=400||typeof G.body.proof!=="string"||!yJ.test(U))throw Error(`Reason couldn't give this computer a proof for ${K} (HTTP ${G.status}).`);b=G.body.proof,L=U,M=await N(L,b)}}catch(K){if(!(K instanceof _)&&!q&&e(Z))m(D(),{force:!0});if(!B){if(!(Q.action==="join"&&K instanceof BJ))throw K;throw Error(`This computer couldn't join ${Q.teamName}: ${K.message.replace(/\.$/,"")}. Once a computer on ${Q.teamName} is online, run reason network again; or ask someone on it for its invite line.`)}if(await J.enterTeam({join:B.link},B.person).then((c)=>c.state==="entered",()=>!1))throw K;if(await W?.(),K instanceof _)throw new _(`This computer left ${B.team}; turn on one of your other computers on ${Q.teamName} and run reason network again.`);let U=K instanceof Error?K.message:String(K);throw Error(`${U.replace(/\.$/,"")}. This computer left ${B.team} and couldn't go back to it: run reason network to join a network.`)}await W?.();let x={team:M.teamName,setupDone:!1,registered:null,account:Q.email?.toLowerCase()??null};if(E(x),!e(Z))throw Error("This computer was signed out meanwhile, so the sign-in wasn't kept. Run reason network to sign in again.");p(X,ZJ());let T=await kQ();if(T===void 0)p(X,VJ());else if(T!==(Q.email?.toLowerCase()??null))$.stdout.write(`This computer's Reason CLI is signed in as ${T??"another account"}; Reason Network signed in as ${Q.email??"you"}.
10
- `);let C=await J.link(),A=R(C.url);if(A&&await sJ(Z.apiOrigin,X.accessToken,{teamId:M.teamId||A.teamId,teamName:M.teamName},C.url))x={...x,registered:v(A.secret)},E(x);else $.stderr.write(H(`Couldn't add ${M.teamName} to your Reason account yet; the network works all the same, and reason network tries again.
11
- `));let P=await J.setupAgents();return E({...x,setupDone:!0}),m(D(),{force:!0}),$.stdout.write(H([Q.action==="create"?`You're on ${M.teamName} as ${M.person}.`:`You joined ${M.teamName} as ${M.person}.`,`This computer: ${M.machine} \xB7 Set up for: ${P.join(", ")||"no coding agents found"}`,"This session doesn't have the Reason Network tools yet: restart it (and other open agent sessions) to load them.",'Until then, use the CLI: `reason network who` to see the network, `reason network <person/session> "<message>"` to ask an agent.',"","Invite people with this line:",`Join the Reason Network: ${C.url}`,""].join(`
12
- `))),0}function mQ(){let J=w();if(IJ(process.env))return PJ(process.env,J);return k()?.apiOrigin??jJ(J)}var KJ=(J)=>process.stdout.isTTY?`\x1B[2m${J}\x1B[22m`:J,MJ=(J)=>`Sign in on any device to finish: ${J.url} (code ${J.code})
13
- `,rJ=`This computer finishes setup by itself. Check with: reason network
14
- `;function i(J,Q,Z,$=!1){let q=D();n(q,J);let z=J.expiresAt+h,j=(Z.startFinisher??bJ)(["network","__finish"],q,z);if(j!==null)f(F(q).lock,{pid:j,until:z});return Q.stdout.write(`${$?"":MJ(J)}${j!==null?rJ:`Then run reason network again.
15
- `}`),j!==null}async function uQ(J,Q,Z,$,q,z,j=!1){let X=D(),V=F(X).lock,Y=O(V,Date.now);if(Y?.signedIn)return $.stdout.write(WJ),0;if(Y&&!Q){let W=u(X);return $.stdout.write(W?`Not signed in yet. ${MJ(W)}${rJ}`:`A sign-in is starting on this computer. Run reason network again in a moment.
16
- `),0}if(Y)await t(V);if(!r(V,Date.now()+60000,Date.now))return $.stdout.write(`A sign-in is starting on this computer. Run reason network again in a moment.
17
- `),0;let B=!1;try{let W=u(X);if(W&&W.expiresAt>Date.now()&&!Q){let l=await cJ(W,0).catch(()=>null);if(l&&l!=="pending")return await JJ(J,l,W,$);if(l==="pending")return B=i(W,$,z),0;m(X,{force:!0})}let L=PQ(X);if(L)$.stdout.write(`${H(L)}
18
- `);let b=s(z.apiOrigin??mQ()),g=J.endpoint(),M=Q?R(Q):null,N=Q||j?await J.team():null,x=N?R((await J.link()).url)?.teamId:void 0,T=!Z&&SQ(),C=await S(`${b}${y.start}`,{endpoint:g,machine:bQ().split(".")[0]||"computer",os:process.platform,...M?{invite:{team_id:M.teamId,team_name:M.teamName}}:{},...N&&x?{current_team:{team_id:x,team_name:N.name}}:{}}),{url:A,code:P,poll_token:K,expires_in:G}=C.body;if(C.status>=400||typeof A!=="string"||typeof P!=="string"||typeof K!=="string"||typeof G!=="number")throw Error(`Couldn't start signing in to Reason (HTTP ${C.status}). Run reason network again in a minute.`);let U={apiOrigin:b,pollToken:K,url:A,code:P,expiresAt:Date.now()+G*1000,endpoint:g,...Q?{link:Q}:{}};if(n(X,U),f(V,{pid:process.pid,until:U.expiresAt+h}),!T&&!q)return B=i(U,$,z),0;if(T)$.stdout.write(`Opening your browser to sign in to Reason Network\u2026 (code ${P})
19
- ${KJ(A)}
20
- `),await XJ(A).catch(()=>{return});else $.stdout.write(MJ(U));if(q)$.stdout.write(KJ(`If the page shows a key, paste it here.
21
- `));let c=z.waitMs??EQ,qJ=await pJ(U,{deadline:Date.now()+(q?c:Math.min(c,z.lateMs??vQ)),io:$,...q&&$.stdin?{stdin:$.stdin}:{}});if(qJ==="gone")return 1;if(qJ)return await JJ(J,qJ,U,$);return B=i(U,$,z,!T),0}finally{if(!B)o(V)}}async function hQ(J,Q,Z,$){if(!uJ.test(Q.trim()))return Z.stderr.write(`Reason: ${lJ}
22
- `),2;let q=D(),z=u(q);if(!z||z.expiresAt<=Date.now())return Z.stderr.write(`No sign-in is waiting on this computer. Run reason network to start one.
23
- `),1;let j=F(q).lock;if(O(j,Date.now)?.signedIn)return Z.stdout.write(WJ),0;if(!await t(j,{unlessSignedIn:!0}))return Z.stdout.write(WJ),0;if(!r(j,z.expiresAt+h,Date.now))return Z.stdout.write(`A sign-in is starting on this computer. Run reason network again in a moment.
24
- `),0;let X=!1;try{let V;try{V=await dJ(z,Q)}catch(Y){throw X=i(z,{...Z,stdout:{write:()=>!0}},$),Y}return await JJ(J,V,z,Z)}finally{if(!X)o(j)}}async function gQ(J,Q){if(!NJ())return Q.stderr.write(`Reason: unknown network command __finish
25
- `),2;let Z=D(),$=u(Z);if(!$||!LJ(F(Z).lock,$.expiresAt+h,Date.now))return 0;Q.stderr.write(`${new Date().toISOString()} Finishing the sign-in once it is done, until ${new Date($.expiresAt).toISOString()}.
26
- `);try{let q=await pJ($,{deadline:$.expiresAt,io:Q});if(q==="gone")return 0;if(q)return await JJ(J,q,$,Q,!0);return n(Z,{ended:"The last sign-in link expired before it was used.",at:Date.now()}),1}catch(q){if(!(q instanceof _)&&e($)){let z=q instanceof Error?q.message:String(q);n(Z,{ended:`Finishing the last sign-in failed: ${z.replace(/\.$/,"")}.`,at:Date.now()})}throw q}}async function cQ(J,Q,Z){let $=$J();if($&&!$.setupDone)await J.setupAgents(),E({...$,setupDone:!0});let{url:q}=await J.link();if($)await aJ(J,{...$,setupDone:!0},q,Q);Q.stdout.write(H(`${Z?`You're on ${Z.name} as ${Z.person}.
27
-
28
- `:""}Invite people with this line:
29
- Join the Reason Network: ${q}
30
- `))}async function fZ(J,Q,Z,$={}){let q=null,z=Date.now(),j="open_engine",X=!1,V=1;try{if(q=await mJ.open(process.env,(B)=>Q.stderr.write(`${B}
31
- `)),j=J.kind==="finish"?"finish":J.kind==="key"?"sign_in":"check_team",J.kind==="key")return V=await hQ(q,J.key,Q,$);if(J.kind==="finish")return V=await gQ(q,Q);let Y=J.link||J.switching?null:await q.team();if(Y)return X=!0,await cQ(q,Q,Y),V=0;return j="sign_in",V=await uQ(q,J.link,J.noBrowser,Q,Z,$,J.switching??!1)}catch(Y){if(Y instanceof _)return Q.stdout.write(`${H(Y.message)}
32
- `),1;return Q.stderr.write(`Reason: ${H(Y instanceof Error?Y.message:String(Y))}
33
- ${OJ}
34
- `),1}finally{q?.close(),await lQ({command:J.kind==="sign_in"?J.switching?"switch":J.link?"join":"sign_in":J.kind,outcome:V!==0?"failed":X?"on_network":"signed_in",...V!==0?{stage:j}:{},engineVersion:kJ(),durationMs:Date.now()-z})}}async function lQ(J){let Q=wJ();if(Q)await vJ(Q,{kind:"network_finished",...J},{timeoutMs:1500})}export{cQ as showTeam,OZ as sendTeamLink,fZ as runReasonTeamCommand,wQ as leaveReport,NZ as forgetNetworkSignIn,SQ as browserAvailable};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wa as a}from"./vm-hands-entry-lite-h5smacqn.js";import"./vm-hands-entry-lite-pkk555dx.js";export default a();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{mh as a,nh as b,oh as c,ph as d,qh as e,rh as f,sh as g,th as h,uh as i,vh as j}from"./vm-hands-entry-lite-b0p8f295.js";import"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-pkk555dx.js";export{j as runPermissionsCli,d as reasonIdentity,e as readMacPermissions,f as permissionsSummary,i as parsePermissionsArgs,c as fullDiskAccessTarget,g as formatMacPermissions,h as allowMacPermissions,a as PERMISSIONS_HELP,b as MAC_PERMISSION_IDS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$i as C,Ai as b,Bi as c,Ci as d,Di as e,Ei as f,Fi as g,Gi as h,Hi as i,Ii as j,Ji as k,Ki as l,Li as m,Mi as n,Ni as o,Oi as p,Pi as q,Qi as r,Ri as s,Si as t,Ti as u,Ui as v,Vi as w,Wi as x,Xi as y,Yi as z,Zi as A,_i as B,aj as D,bj as E,cj as F,dj as G,ej as H,fj as I,gj as J,hj as K,ij as L,jj as M,kj as N,lj as O,mj as P,nj as Q,oj as R,pj as S,qj as T,rj as U,zi as a}from"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-pkk555dx.js";export{w as reasonHandsCloseReason,H as parseReasonHandsResult,G as parseReasonHandsRequest,N as parseReasonHandsPtyReceipt,I as parseReasonHandsProgress,M as parseReasonHandsJobResult,L as parseReasonHandsJobRequest,K as parseReasonHandsClaimAck,J as parseReasonHandsClaim,O as parseReasonHandsCancelRequest,P as parseReasonHandsCancelAck,D as isReasonHandsUuid,B as isReasonHandsRequestId,E as isReasonHandsPtyJobId,C as isReasonHandsGeneration,F as isReasonHandsArtifactSha256,R as encodeReasonHandsResult,Q as encodeReasonHandsRequest,S as encodeReasonHandsProgress,U as encodeReasonHandsClaimAck,T as encodeReasonHandsClaim,y as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,n as REASON_HANDS_PTY_PROTOCOL_VERSION,q as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,p as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,o as REASON_HANDS_PTY_MAX_INPUT_BYTES,r as REASON_HANDS_PTY_MAX_DIMENSION,s as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,u as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,t as REASON_HANDS_PTY_ANCHOR_EXIT_MS,a as REASON_HANDS_PROTOCOL_VERSION,f as REASON_HANDS_OUTPUT_TRUNCATED_MARKER,d as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,e as REASON_HANDS_MAX_OUTPUT_CHARS,c as REASON_HANDS_MAX_INPUT_CHARS,b as REASON_HANDS_MAX_FRAME_BYTES,g as REASON_HANDS_MAX_ERROR_CHARS,h as REASON_HANDS_JOB_PROTOCOL_VERSION,l as REASON_HANDS_JOB_MAX_RECORDS,k as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,j as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,i as REASON_HANDS_JOB_MAX_INPUT_CHARS,z as REASON_HANDS_JOB_ERRORS,m as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,x as REASON_HANDS_ERROR_CODES,v as REASON_HANDS_CLOSE_CODES,A as HandsProtocolError};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ae as c,Be as d,Ce as e,De as f,Ee as g,Fe as h,Ge as i,He as j,Ie as k,Je as l,Ke as m,Le as n,Me as o,Ne as p,Oe as q,Pe as r,ye as a,ze as b}from"./vm-hands-entry-lite-g6r5xrk0.js";import"./vm-hands-entry-lite-dgmap6z4.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-3rg3znp8.js";import"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import"./vm-hands-entry-lite-pkk555dx.js";export{g as workerServiceRetargetPending,f as workerServiceProgram,m as workerServiceProcessRunning,e as workerServiceLauncher,j as workerServiceDefinitions,n as workerServiceDefinitionCurrent,l as retireLegacyWorkerService,q as retargetWorkerServiceLogs,p as restartWorkerService,r as removeWorkerService,i as isConnectServiceLabel,k as installedWorkerService,o as installWorkerService,c as defaultWorkerServiceHost,h as connectServiceLabel,d as WorkerServiceError,a as WORKER_SERVICE_ENV,b as WORKER_IDENTITY_UNAVAILABLE_CODE};
@@ -1,96 +0,0 @@
1
- // @bun
2
- import{h as jq,i as Dq,j as Vq,k as kq,n as Hq,o as zq,t as Aq}from"./vm-hands-entry-lite-0572m6cr.js";import"./vm-hands-entry-lite-x3pbyg92.js";import"./vm-hands-entry-lite-pmw3ycgc.js";import{D as Wq}from"./vm-hands-entry-lite-rck5h8fr.js";import{R as Bq}from"./vm-hands-entry-lite-6x5pj2y0.js";import{S as xq}from"./vm-hands-entry-lite-0a4cy8gw.js";import"./vm-hands-entry-lite-zz8tr0bm.js";import"./vm-hands-entry-lite-33h8294z.js";import"./vm-hands-entry-lite-vqr3zrqr.js";import"./vm-hands-entry-lite-00y3kn86.js";import"./vm-hands-entry-lite-ah2ep922.js";import"./vm-hands-entry-lite-v0k8b768.js";import"./vm-hands-entry-lite-s8zfzv0k.js";import"./vm-hands-entry-lite-b7wy89y0.js";import"./vm-hands-entry-lite-dhqmbqsh.js";import"./vm-hands-entry-lite-3882raa5.js";import"./vm-hands-entry-lite-tbdcmq09.js";import"./vm-hands-entry-lite-tafgty5k.js";import"./vm-hands-entry-lite-8xe0wzp9.js";import"./vm-hands-entry-lite-s8ty42st.js";import"./vm-hands-entry-lite-g6r5xrk0.js";import{ef as Kq}from"./vm-hands-entry-lite-dgmap6z4.js";import"./vm-hands-entry-lite-p9fwt68c.js";import"./vm-hands-entry-lite-v0bp1v66.js";import"./vm-hands-entry-lite-zj3hb5jk.js";import"./vm-hands-entry-lite-b0p8f295.js";import"./vm-hands-entry-lite-26xb026c.js";import"./vm-hands-entry-lite-8twscwtw.js";import"./vm-hands-entry-lite-rj8yq6gp.js";import{li as bq,qi as Fq}from"./vm-hands-entry-lite-td309c1y.js";import"./vm-hands-entry-lite-c8bf82tx.js";import"./vm-hands-entry-lite-1nj03gbj.js";import"./vm-hands-entry-lite-k9n1pk42.js";import"./vm-hands-entry-lite-wbfmc0xn.js";import"./vm-hands-entry-lite-r374pchj.js";import"./vm-hands-entry-lite-3rg3znp8.js";import{mk as l}from"./vm-hands-entry-lite-56v9haps.js";import"./vm-hands-entry-lite-jd31as70.js";import{Mk as N}from"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import{Tk as z,Vk as u,Wk as s}from"./vm-hands-entry-lite-e1xjfj57.js";import"./vm-hands-entry-lite-8p8hz0j1.js";import{dl as Q}from"./vm-hands-entry-lite-e4hwb89r.js";import"./vm-hands-entry-lite-r665z809.js";import"./vm-hands-entry-lite-v4r1fggm.js";import"./vm-hands-entry-lite-kqbats5n.js";import"./vm-hands-entry-lite-xd2dn3n8.js";import"./vm-hands-entry-lite-ghhpgt3v.js";import{Gl as Gq}from"./vm-hands-entry-lite-pkk555dx.js";import{createHash as aq,randomBytes as nq}from"crypto";import{readFileSync as eq,realpathSync as Pq,renameSync as q3,unlinkSync as J3,writeFileSync as X3}from"fs";import{dirname as Y3,join as yq}from"path";import{spawnSync as wq}from"child_process";import{accessSync as Lq,constants as fq,existsSync as L,mkdirSync as Sq,readFileSync as hq,renameSync as Cq,writeFileSync as gq}from"fs";import{homedir as mq}from"os";import{delimiter as pq,dirname as dq,join as T}from"path";import{existsSync as Eq,readFileSync as Mq}from"fs";import{join as _q}from"path";var vq=`---
3
- name: reason
4
- description: Integrate software with Reason's public REST API using a scoped API key. Use for API clients, CI, service integrations, or cloud coding-session automation.
5
- ---
6
-
7
- # Reason API
8
-
9
- Reason integrations use the public REST API. Public customer MCP is retired.
10
-
11
- Base URL: \`https://api.reasonmachines.com/v3\`
12
-
13
- - API quickstart: \`https://docs.reasonmachines.com/api-quickstart\`
14
- - Endpoint reference: \`https://docs.reasonmachines.com/api-reference\`
15
-
16
- ## Authentication and scope
17
-
18
- 1. Create a least-privilege \`ara_\` key in Reason Settings \u2192 Developers (the Code
19
- / API keys picker) and keep it only in the calling service or CI secret
20
- manager. Never
21
- put it in source, prompts, logs, generated files, or a repository
22
- environment file. A new key from that picker includes the ordinary public
23
- scopes for session, skill, repo, and org reads.
24
- 2. Send it as \`Authorization: Bearer <api-key>\`. Call \`GET /v3/self\` first
25
- to resolve the key's organization before reading or mutating resources.
26
- 3. Request only the scopes needed by the integration. Treat secret values as
27
- write-only and never expose them in API responses or diagnostics.
28
- 4. Use the endpoint reference as the source of truth for request/response
29
- shapes, pagination, and error handling. Do not recreate an old MCP client,
30
- route, OAuth flow, or plugin configuration. Do not connect to the retired
31
- public MCP transport.
32
-
33
- ## Session automation
34
-
35
- - Create and monitor sessions through the documented \`/v3/organizations/:orgId/
36
- sessions\` endpoints. Return the session URL or identifier to the caller, then
37
- poll or stream only as the API reference specifies.
38
- - Omit \`hands_mode\` for adaptive lazy Hands, or set it to \`brain_only\` when
39
- physical execution must remain permanently disabled for that Conversation.
40
- - Keep API work idempotent where the endpoint supports it, and surface failed
41
- mutations rather than retrying destructive operations blindly.
42
- - Scope every request to the intended organization and repository. Do not infer
43
- authority from a repository name or an untrusted task payload.
44
- `;function m(q){return _q(q,".agents","skills","ara","SKILL.md")}function i(q){let X=m(q);return Eq(X)&&Mq(X,"utf8")===vq}var p=["codex","claude","cursor"],r={codex:"Codex",claude:"Claude Code",cursor:"Cursor"};function uq(q,X=process.env){let J=X.PATH??"",Z=process.platform==="win32"?(X.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";"):[""];for(let Y of J.split(pq)){if(!Y)continue;for(let G of Z)try{return Lq(T(Y,`${q}${G}`),fq.X_OK),!0}catch{}}return!1}function lq(){return{exists:uq,run(q,X,J={}){let Z=J.interactive===!0,Y=wq(q,X,{encoding:"utf8",env:process.env,stdio:Z?"inherit":"pipe"});return{status:Y.status??1,stdout:Z?"":Y.stdout??"",stderr:Z?Y.error?.message??"":`${Y.stderr??""}${Y.error?`${Y.error.message}
45
- `:""}`}}}}function O(q){return`${q.stdout}
46
- ${q.stderr}`}function k(q){return q.status===0}function R(q,X,J,Z={}){let Y=q.run(X,J,Z);if(k(Y))return Y;let G=O(Y).trim();throw Error(`${X} ${J.join(" ")} failed${G?`: ${G}`:` with exit code ${Y.status}`}`)}function cq(q=process.env){return s(z({env:q}))}function d(q,X){return q.split(/\s+/).some((J)=>a(J,X))}function w(q){return T(q,".cursor","mcp.json")}function t(q){if(!L(q))return{};try{let X=JSON.parse(hq(q,"utf8"));if(!X||typeof X!=="object"||Array.isArray(X))throw Error("top-level value must be an object");return X}catch(X){let J=X instanceof Error?X.message:String(X);throw Error(`Cursor MCP config at ${q} is invalid; refusing to overwrite it (${J})`)}}function oq(q,X){Sq(dq(q),{recursive:!0,mode:448});let J=`${q}.ara-${process.pid}.tmp`;gq(J,`${JSON.stringify(X,null,2)}
47
- `,{mode:384}),Cq(J,q)}function a(q,X){if(typeof q!=="string")return!1;if(q===X)return!0;try{let J=new URL(q);return["https://api.ara.so","https://api-staging.ara.so","https://api.reasonmachines.ai","https://staging-api.reasonmachines.ai","https://api.reasonmachines.com","https://staging-api.reasonmachines.com"].includes(J.origin)&&!J.username&&!J.password&&J.pathname==="/mcp/ara"&&!J.search&&!J.hash}catch{return!1}}function iq(q,X){let J=q.mcpServers?.ara;return Boolean(J&&typeof J==="object"&&!Array.isArray(J)&&a(J.url,X))}class f{runner;home;mcpUrl;constructor(q=lq(),X=mq(),J=cq()){this.runner=q;this.home=X;this.mcpUrl=J}isAvailable(q){if(q==="codex")return this.runner.exists("codex");if(q==="claude")return this.runner.exists("claude");return this.runner.exists("cursor")||L("/Applications/Cursor.app")||L(T(this.home,"Applications","Cursor.app"))||L(w(this.home))}availableClients(){return p.filter((q)=>this.isAvailable(q))}installationPath(q){if(q==="cursor")return w(this.home);if(q==="codex")return T(this.home,".codex","plugins","cache","ara");return T(this.home,".claude","plugins","cache","ara")}sharedSkillStatus(){return{installed:i(this.home),path:m(this.home)}}status(q){let X=r[q];if(!this.isAvailable(q))return{id:q,label:X,available:!1,installed:!1,connection:null,detail:"Client not detected",legacyInstallations:[]};if(q==="cursor"){let B=w(this.home),V=iq(t(B),this.mcpUrl);return{id:q,label:X,available:!0,installed:V,connection:V?"configured":null,detail:V?`Retired Reason MCP configuration in ${B}`:`No retired Reason MCP configuration in ${B}`,legacyInstallations:[]}}if(q==="codex"){let B=this.runner.run("codex",["plugin","list"]);if(!(k(B)&&O(B).includes("ara@ara")))return{id:q,label:X,available:!0,installed:!1,connection:null,detail:"No retired Reason plugin installed",legacyInstallations:[]};let P=this.runner.run("codex",["mcp","list"]),x=O(P).split(/\r?\n/).find((M)=>M.trimStart().startsWith("ara ")&&d(M,this.mcpUrl)),h=k(P)&&Boolean(x),E=!k(P)?"error":x?.includes("Not logged in")?"not_logged_in":x?.includes("OAuth")?"oauth":x?"configured":"unknown";return{id:q,label:X,available:!0,installed:h,connection:E,detail:x?.trim()||"The retired Reason plugin is installed but has no verified retired MCP registration",legacyInstallations:[]}}let J=this.runner.run("claude",["plugin","list"]),Z=O(J),Y=k(J)&&Z.includes("ara@ara"),G=k(J)&&Z.includes("ara-handoff@ara");if(!Y&&!G)return{id:q,label:X,available:!0,installed:!1,connection:null,detail:"No retired Reason plugin installed",legacyInstallations:[]};let b=this.runner.run("claude",["mcp","list"]),j=O(b),F=j.split(/\r?\n/).find((B)=>B.includes("plugin:ara:ara")&&d(B,this.mcpUrl)),K=j.split(/\r?\n/).find((B)=>B.includes("plugin:ara-handoff:ara")&&d(B,this.mcpUrl)),U=k(b)&&Boolean(F),D=k(b)&&K?["ara-handoff@ara"]:[],S=!k(b)?"error":F?.includes("Connected")?"connected":F?.includes("Failed")?"error":F?"configured":"unknown";return{id:q,label:X,available:!0,installed:U,connection:S,detail:F?.trim()||"The retired Reason plugin is installed but has no verified retired MCP registration",legacyInstallations:D}}statuses(){return p.map((q)=>this.status(q))}logout(q){let X=this.status(q);if(!X.available||!X.installed)return`${X.label}: not connected`;if(q==="cursor")return this.uninstall("cursor").replace("removed retired Reason","signed out and removed retired Reason");if(q==="codex")return R(this.runner,"codex",["mcp","logout","ara"]),"Codex: signed out of Reason";return R(this.runner,"claude",["mcp","logout","plugin:ara:ara"]),"Claude Code: signed out of Reason"}uninstall(q){let X=this.status(q);if(!X.available||!X.installed)return`${X.label}: Reason is not installed`;if(q==="cursor"){let J=w(this.home),Z=t(J),Y={...Z.mcpServers??{}};return delete Y.ara,Z.mcpServers=Y,oq(J,Z),`Cursor: removed retired Reason MCP from ${J}`}if(q==="codex")return R(this.runner,"codex",["plugin","remove","ara@ara"]),"Codex: removed retired ara@ara";return R(this.runner,"claude",["plugin","uninstall","ara@ara","--scope","user"]),"Claude Code: removed retired ara@ara"}removeLegacyClaudePlugin(){if(!this.runner.exists("claude"))return"Claude Code: not installed";if(!this.status("claude").legacyInstallations.includes("ara-handoff@ara"))return"Claude Code: no legacy Reason plugin found";return R(this.runner,"claude",["plugin","uninstall","ara-handoff@ara","--scope","user"]),"Claude Code: removed obsolete ara-handoff@ara"}removeRetiredInstallations(){let q=[],X=[];for(let J of p){let Z;try{Z=this.status(J)}catch(Y){X.push(`${r[J]}: ${Y instanceof Error?Y.message:String(Y)}`);continue}if(Z.installed){if(J!=="cursor")try{q.push(this.logout(J))}catch(Y){X.push(`${Z.label}: ${Y instanceof Error?Y.message:String(Y)}`)}try{q.push(this.uninstall(J))}catch(Y){X.push(`${Z.label}: ${Y instanceof Error?Y.message:String(Y)}`)}}if(J==="claude"&&Z.legacyInstallations.includes("ara-handoff@ara"))try{q.push(this.removeLegacyClaudePlugin())}catch(Y){X.push(`${Z.label}: ${Y instanceof Error?Y.message:String(Y)}`)}}if(q.length===0&&X.length===0)q.push("No retired Reason MCP configuration found.");return{messages:q,failures:X}}}function n(q){return`claude mcp add --transport http reason ${q}`}function e(q){return`codex mcp add reason --url ${q}
48
- codex mcp login reason`}var N3=n("https://mcp.reasonmachines.com/mcp"),I3=e("https://mcp.reasonmachines.com/mcp"),R3=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,O3=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var rq="https://github.com/reason-machines/reason-plugins",v3=`Connect a coding agent to Reason over MCP
49
-
50
- Usage:
51
- reason mcp Show how to connect Claude Code, Codex, or another MCP client
52
- reason mcp uninstall Remove only this machine's registrations of the earlier, retired server
53
-
54
- Plugins for Claude Code and Codex: ${rq}
55
- `;function qq(q){if(!q.available)return"not detected";if(q.installed||q.legacyInstallations.length>0)return"retired configuration";return"not installed"}function tq(q,X){let J=X.toLowerCase();if(q==="codex")return J.includes("codex");if(q==="claude")return J.includes("claude");return J.includes("cursor")}function Jq(q,X){return(X.mcp_connections??[]).filter((Z)=>tq(q.id,Z.client_name)).flatMap((Z)=>Z.last_used_at?[Z.last_used_at]:[]).sort().at(-1)??null}function Xq(q,X=new Date){if(!q)return"never";let J=Date.parse(q);if(!Number.isFinite(J))return"never";let Z=Math.max(0,Math.floor((X.getTime()-J)/1000));if(Z<45)return"just now";let Y=Math.floor(Z/60);if(Y<60)return`${Y} ${Y===1?"minute":"minutes"} ago`;let G=Math.floor(Y/60);if(G<24)return`${G} ${G===1?"hour":"hours"} ago`;let b=Math.floor(G/24);return`${b} ${b===1?"day":"days"} ago`}function Yq(q){let X=q.name?.trim(),J=q.email?.trim();if(X&&J)return`${X} (${J})`;return X||J||q.id||"Reason user"}function Zq(q){let X=q.name?.trim(),J=q.slug?.trim();if(X&&J)return`${X} (${J})`;return X||J||q.id}var sq=Q.enum(["granted","not_granted","unknown"]),$q=Q.object({status:sq,checkedAt:Q.number().finite(),executablePath:Q.string().min(1)});var Z3=`Reason status
56
-
57
- Usage:
58
- reason status [--json]
59
-
60
- Show the installed version, signed-in account and organization, this
61
- computer's connection (\`reason connect\`) and the workspaces it serves, any
62
- retired MCP configuration that can be cleaned up, and automatic updates.
63
- `,$3=5000,G3=300000,Q3=Q.object({version:Q.literal(1),key:Q.string(),at:Q.number(),self:Q.object({principal_type:Q.string(),user_id:Q.string().optional(),user_name:Q.string().nullish(),email:Q.string().nullish(),org_id:Q.string(),organization_name:Q.string().nullish(),organization_slug:Q.string().nullish(),mcp_connections:Q.array(Q.object({client_id:Q.string(),client_name:Q.string(),last_used_at:Q.string().nullable()})).optional()})}),Nq=(q)=>`${q.apiOrigin}
64
- ${aq("sha256").update(q.accessToken).digest("hex")}`;function x3(q,X,J){try{let Z=Q3.safeParse(JSON.parse(eq(q,"utf8")));if(!Z.success||Z.data.key!==Nq(X))return null;let Y=J-Z.data.at;return Y>=0&&Y<G3?Z.data.self:null}catch{return null}}function B3(q,X,J,Z){let Y=`${q}.${process.pid}.${nq(6).toString("hex")}.tmp`;try{let G={version:1,key:Nq(X),at:Z,self:J};X3(Y,`${JSON.stringify(G)}
65
- `,{mode:384,flag:"wx"}),q3(Y,q)}catch{try{J3(Y)}catch{}}}var W3=30000;function b3(q,X=Date.now(),J=null){let Z=Fq(q),Y=(()=>{if(Z?.state!=="connected"&&Z?.state!=="starting")return!1;try{return process.kill(Z.pid,0),!0}catch{return!1}})(),G=Y&&Z?.state==="connected",b=(K)=>G&&X-K>=0&&X-K<W3,j=$q.safeParse(Z?.fullDiskAccess),F=bq(Z,J,X);return{...F?{permission_recovery:F}:{},full_disk_access:j.success&&b(j.data.checkedAt)?j.data.status:"unknown",keep_awake:{enabled:Vq(q)==="battery_and_ac",holding:Z?.idleSleepHold===!0&&b(Date.parse(Z.lastHeartbeatAt??""))},executable:Y&&j.success?j.data.executablePath:null}}function F3(q=z()){if(process.platform!=="darwin")return null;let X=kq(yq(Hq(Pq(l()),q),"worker.json"));return X?b3(jq(X).daemon,Date.now(),Dq(X)):null}var Qq={connected:"connected",starting:"starting",reconnecting:"reconnecting",stopping:"stopping",not_running:"not running",removed:"removed from Reason (run `reason connect` to connect it again)"};async function Y1(q,X={}){let J=X.io??{stdout:process.stdout,stderr:process.stderr};if(q.includes("--help")||q.includes("-h"))return J.stdout.write(Z3),0;if(q.some((G)=>G!=="--json"))return J.stderr.write(`Usage: reason status [--json]
66
- `),1;let Z=new AbortController,Y=setTimeout(()=>Z.abort(Error("timed out reading the account")),$3);try{let G=X.now?.()??new Date,b=performance.now(),j=b,F=()=>{let $=performance.now(),H=Math.round($-j);return j=$,H},K=null,U=($)=>{return K=$ instanceof Error?$.message:String($),null},D=await Wq(X,Z.signal).catch(U),S=F(),B=D?.credentialKind==="api_key",V=D&&!B?yq(Y3(xq(X.env??process.env)),"status-account.json"):null,P=D&&V&&q.includes("--json")?x3(V,D,G.getTime()):null,x=P??(D?await(X.getSelf??(($,H)=>new Bq($).self(H)))(D,Z.signal).catch(U):null);if(D&&x&&!P&&V)B3(V,D,x,G.getTime());let h=F(),E=X.manager??new f,M=q.includes("--json")?[]:E.statuses(),_=(X.loadReceipt??Kq)(),v=await(X.readConnection??(()=>Aq({channel:X.channel})))().catch(()=>null),A=null;try{if(v)A=(X.readConnectionMacState??(()=>F3(X.channel??z())))()}catch{}let W=v&&A?{...v,...A}:v,C=(()=>{try{return(X.readDisconnected??(()=>zq(Pq(l()),X.channel??z())))()}catch{return!1}})(),Iq=F(),c=x?{id:x.org_id,name:x.organization_name??null,slug:x.organization_slug??null}:null,I=x?{id:x.user_id??null,name:(B?x.service_user_name:x.user_name)??null,email:x.email??null,credential:B?"api_key":"login"}:null,g=X.channel??z(),y={version:N,channel:g,api_origin:D?.apiOrigin??u(g),account:I,account_error:K,organization:c,mcp:M.map(($)=>({client:$.id,label:$.label,status:qq($),installed_at:$.installed?E.installationPath($.id):null,last_used_at:x?Jq($,x):null})),connection:W,disconnected:C,installation:_?{background_mode:_.background_mode,automatic_updates:_.background_mode!=="cli_only",future_device_consent:_.device_consent?.decision??"disabled"}:null,timings_ms:{process:Math.round(b),credentials:S,account:h,local:Iq,total:Math.round(performance.now()-b)}};if(q.includes("--json"))return J.stdout.write(`${JSON.stringify(y,null,2)}
67
- `),0;if(g==="staging")J.stdout.write(`Reason ${N} \xB7 channel: STAGING
68
- `),J.stdout.write(`API: ${y.api_origin}
69
- `);else J.stdout.write(`Reason ${N}
70
- `);if(I)J.stdout.write(B?`Account: API key (REASON_API_KEY)${I.name?`: ${I.name}`:""}
71
- `:`Account: ${Yq(I)}
72
- `),J.stdout.write(`Organization: ${Zq(c)}
73
- `);else if(K)J.stdout.write(`Account: unavailable (${K})
74
- `);else J.stdout.write(`Account: signed out
75
- `),J.stdout.write(`Organization: none
76
- `);if(J.stdout.write(`
77
- This computer
78
- `),!W)J.stdout.write(C?"Disconnected. Run `reason connect` to connect it again.\n":"Not connected. Run `reason connect` to run your Sessions here.\n");else{if(J.stdout.write(`Connection: ${Qq[W.state]} (${W.name})${C?", disconnected (run `reason connect` to connect it again)":""}
79
- `),W.version)J.stdout.write(`Version: ${W.version}${W.version===N?"":` (${N} is installed; \`reason connect\` restarts it on that)`}
80
- `);if(J.stdout.write(`Folder: ${W.folder}
81
- `),J.stdout.write(`Sessions: ${W.sessions_running===null?"":`${W.sessions_running} running, `}${W.sessions_max===null?"every Session you start":W.sessions_max===1?"one at a time":`up to ${W.sessions_max} at once`}
82
- `),A){let $=A,H=await(X.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Oq,reasonIdentity:Tq}=await import("./permissions-ga1ax8wd.js"),{macScreenStatus:Uq}=await import("./local-display-mac-n236gkpe.js");return Rq(await Oq({identity:()=>Tq(),grants:Uq,worker:async()=>$}))}))().catch(()=>null);if(H)J.stdout.write(`${H}
83
- `);J.stdout.write(`Keep awake: ${A.keep_awake.enabled?"on":"off"}${A.keep_awake.holding?" (holding)":""}
84
- `)}if(W.service)J.stdout.write(`Logs: ${W.service.logs}
85
- `);for(let $ of W.workspaces??[]){let H=$.state==="removed"?"removed from that workspace":$.blocked?"offline (this computer is outside that workspace's allowed networks)":$.device_id?Qq[$.state]:"connecting";J.stdout.write(`Also in workspace ${$.name??$.organization_id}${$.account?" (another Reason account's)":""}: ${H}
86
- `)}if(W.workspaces_off==="sign_in")J.stdout.write("Other workspaces: off. This computer's sign-in is not one the Reason app or the setup command\n Reason shows you made for it (or that sign-in ended, or it is in use on another computer), so it is\n connected in one workspace only. Run the setup command from Reason here (it ends in --pair CODE);\n if this computer was connected before that, run `reason disconnect` and `reason connect` once.\n")}let o=y.mcp.filter(($)=>$.installed_at||$.status!=="not installed");if(o.length>0)J.stdout.write(`
87
- Retired MCP configuration
88
- `);for(let $ of o)if(J.stdout.write(`${$.label}: ${$.status}
89
- `),$.installed_at)J.stdout.write(` Installed: ${$.installed_at}
90
- `),J.stdout.write(` Last used: ${Xq($.last_used_at,G)}
91
- `);if(y.mcp.some(($)=>$.status==="retired configuration"))J.stdout.write("Run `reason mcp uninstall` to remove only the retired Reason MCP registrations.\n");if(J.stdout.write(`
92
- Background access
93
- `),!y.installation)J.stdout.write(`Not managed by the Reason installer
94
- `);else J.stdout.write(`Automatic updates: ${y.installation.automatic_updates?"enabled":"disabled"}
95
- `);return 0}catch(G){return J.stderr.write(`Reason status: ${G instanceof Error?G.message:String(G)}
96
- `),1}finally{clearTimeout(Y)}}export{b3 as workerMacState,Y1 as runStatusCli,F3 as connectionMacState,Z3 as STATUS_HELP};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mk as a,Nk as b,Ok as c,Pk as d,Qk as e}from"./vm-hands-entry-lite-q9g11dbj.js";import"./vm-hands-entry-lite-c5gt0086.js";import"./vm-hands-entry-lite-pkk555dx.js";export{d as compareCliVersions,e as cliAndAgentVersion,c as CLI_VERSION_PATTERN,a as CLI_VERSION,b as CLI_USER_AGENT};
@@ -1,7 +0,0 @@
1
- // @bun
2
- import{ad as r}from"./vm-hands-entry-lite-s8zfzv0k.js";import{Id as n}from"./vm-hands-entry-lite-tbdcmq09.js";import{ll as B}from"./vm-hands-entry-lite-v4r1fggm.js";import{ol as a,pl as s,sl as i}from"./vm-hands-entry-lite-kqbats5n.js";import{spawn as f,spawnSync as v}from"child_process";import{existsSync as I,mkdtempSync as o,readFileSync as t,readdirSync as _j,realpathSync as Sj,rmSync as e,statSync as jj}from"fs";import{platform as h,tmpdir as qj}from"os";import{dirname as E,join as H,win32 as T}from"path";import{fileURLToPath as Mj,pathToFileURL as y}from"url";var kj=["bwrap","socat","rg"],Fj=2000,g=20000,Pj=3,w=4000,Ej=new Set([".git",".hg",".svn","node_modules"]),Rj=["runAsHostUid","sysrq-trigger"],zj=H(E(E(Mj(import.meta.url))),"packages","sandbox-runtime"),Dj=H(zj,"src","index.ts"),Gj=!1;function oj(){Gj=!0}function Jj(){return Gj?H(E(Sj(process.execPath)),"runtime","srt"):void 0}function Y(){let j=H(Jj()??zj,"vendor","srt-win");return H(j,process.arch,"srt-win.exe")}var tj="confined commands need the Windows sandbox: run `reason connect` and approve the Windows prompt.";function ej(j=Y()){let q=v(j,["status"],{encoding:"utf8",timeout:15000,windowsHide:!0});try{let G=JSON.parse(q.stdout??"");return q.status===0&&G.user?.user?.exists===!0&&G.user.cred_present===!0}catch{return!1}}function jq(j=Y()){let q=v(j,["install"],{stdio:["ignore","ignore","ignore"],timeout:120000,windowsHide:!0});return q.status===0?"installed":q.status===10?"cancelled":"failed"}async function Kj(){let j=Jj();if(j&&process.platform==="linux"&&!I(H(j,"vendor","seccomp",process.arch,"apply-seccomp")))throw Error("packaged_sandbox_runtime_vendor_missing");if(j&&process.platform==="win32"&&!I(Y()))throw Error("packaged_sandbox_runtime_vendor_missing");if(j){let J=t(H(j,"sandbox-runtime.mjs"),"utf8");for(let K of Rj)if(!J.includes(K))throw Error(`packaged_sandbox_runtime_fork_missing:${K}`)}let z=(await import(j?y(H(j,"sandbox-runtime.mjs")).href:y(Dj).href)).SandboxManager;if(!z||typeof z.initialize!=="function"||typeof z.wrapWithSandboxArgv!=="function")throw Error("sandbox-runtime does not expose the expected SandboxManager API.");return{SandboxManager:z}}function Wj(j={}){if((j.platformName??h())!=="linux")return!1;let G=j.fileExists??I,z=j.readFile??((J)=>t(J,"utf8"));for(let J of["/.dockerenv","/run/.containerenv"])try{if(G(J))return!0}catch{}try{return/docker|containerd|kubepods|lxc|libpod/.test(z("/proc/1/cgroup"))}catch{return!1}}function Qj(j){return["/bin/true","/usr/bin/true"].find((q)=>j(q))??null}function xj(j,q){return j==="strict"?["--ro-bind","/","/","--unshare-pid","--unshare-user","--cap-drop","ALL","--proc","/proc","--",q]:["--ro-bind","/","/","--unshare-pid","--unshare-user","--bind","/proc","/proc","--",q]}function Oj(j,q){try{let G=v("bwrap",xj(j,q),{stdio:"ignore",timeout:Fj});return!G.error&&G.status===0}catch{return!1}}function fj(j){let q=j.platformName??h(),G=j.fileExists??I;if(q==="win32")return(j.bash??a)()&&G(Y())?U??"strict":null;if(q!=="linux")return null;let z=j.hasExecutable??n;if(!kj.every((V)=>z(V)))return null;let J=Qj(G);if(!J)return null;let K=U??(j.containerized??Wj({platformName:q})?"weak":"strict");return(j.probeNamespaces??((V)=>Oj(V,J)))(K)?K:null}var _=null,R=!1,X=null,c=null,u=null,U=null,S=null,P=null,M=null,D=[],N=new Map;function W(){throw C("sandbox_mode_conflict"),new B("sandbox_unavailable","Sandbox process policy conflicts with an existing probe or session. Restart the worker.")}function qq(j){if(U!==null&&U!==j||R&&_!==null&&_!==j||S!==null&&S!==j)W();U=j}function C(j){if(!X)process.stderr.write(`Reason worker: confined commands are off (${j})
3
- `);X=j}function Vj(j){if(X)return!1;if(!R){if(_=fj(j??{}),R=!0,_&&!j)Yj()}return _!==null}function vj(){return Vj()?_:null}var k=null,A=0;function x(j,q){if(X)throw new B("sandbox_unavailable","Confined execution is unavailable in this worker process.");if(U&&j.sandboxMode&&U!==j.sandboxMode)W();let G=U??j.sandboxMode??vj();if(!G)throw new B("sandbox_unavailable","Confined command execution is unavailable on this operating system.");if(S&&S!==G)W();return S=G,k??=(async()=>{let{SandboxManager:z}=await(j.loadSandboxRuntime??Kj)();return await z.initialize(uj(G,q)),z})().catch((z)=>{if(k=null,q)P=null,process.stderr.write(`Reason worker: the Windows sandbox did not start for this folder (${String(z).slice(0,500)})
4
- `);else C(`initialize_failed: ${String(z)}`);throw z instanceof B?z:new B("sandbox_unavailable","The confined execution sandbox failed to start.")}),k.then((z)=>{if(X)throw new B("sandbox_unavailable","Confined execution became unavailable during sandbox initialization.");return z})}function O(){if(A-=1,A===0)for(let j of D.splice(0))j()}async function Zj(j,q=!0,G,z){let J=z===void 0?1/0:Date.now()+z;await Bj();let K=bj();if(q)await K;let Q=JSON.stringify(j),V=!1,$=()=>{if(!V)return;V=!1;let Z=(N.get(Q)??1)-1;if(Z>0)N.set(Q,Z);else N.delete(Q)};try{for(;;){if(G?.aborted)throw new B("cancelled","Operation was cancelled.");if(Date.now()>=J)return!1;if(M){await M;continue}let Z=N.keys().next().value;if(P??=Z??Q,P===Q&&(Z===void 0||Z===Q))break;if(!V){V=!0,N.set(Q,(N.get(Q)??0)+1);continue}if(A===0&&Z===Q){$j();continue}await new Promise((L)=>{if(D.push(L),G?.addEventListener("abort",()=>L(),{once:!0}),J!==1/0)setTimeout(L,Math.max(0,J-Date.now())).unref?.()})}return A+=1,!0}finally{if(V&&A===0)for(let Z of D.splice(0))Z();$()}}function $j(){return M??=Xj().finally(()=>{M=null}),M}function Hj(j,q,G=process.env){let z=G.USERPROFILE?T.resolve(G.USERPROFILE).toLowerCase():null,J=T.resolve(j).toLowerCase(),K=z!==null&&J.startsWith(`${z}\\`),Q=q?Lj(G).filter((V)=>V.toLowerCase()===J||V.toLowerCase().startsWith(`${J}\\`)):[];return{denyRead:[],allowRead:[j],allowWrite:q?[j]:[],denyWrite:q?Q:K?[]:[j]}}function Lj(j,q=process.execPath){let G=new Map;for(let z of[...(j.PATH??j.Path??"").split(";"),T.dirname(q)]){if(!z||!T.isAbsolute(z))continue;let J=T.resolve(z);if(!G.has(J.toLowerCase()))G.set(J.toLowerCase(),J)}return[...G.values()]}function hj(j=process.env,q=process.execPath){let G=[j.SystemRoot,j.ProgramFiles,j["ProgramFiles(x86)"],j.ProgramW6432,j.ProgramData,j.USERPROFILE].filter((z)=>!!z).map((z)=>T.resolve(z).toLowerCase());return Lj(j,q).filter((z)=>{let J=z.toLowerCase();return!G.some((K)=>J===K||J.startsWith(`${K}\\`))})}var l=null,m=null;function Bj(j=Y()){return m??=(async()=>{let q;try{q=JSON.parse((await Uj(j,["status"])).stdout).user?.user?.sid}catch{return null}if(typeof q!=="string"||!/^S-1-[0-9-]+$/.test(q))return null;if(!await new Promise((z)=>{let J=f(i("icacls"),[j,"/grant",`*${q}:(RX)`],{stdio:"ignore",windowsHide:!0,timeout:30000});J.on("error",()=>z(!1)),J.on("close",(K)=>z(K===0))}))process.stderr.write(`Reason worker: could not let the Windows sandbox user run srt-win.exe
5
- `);return q})(),m}function Uj(j,q,G){return new Promise((z)=>{let J=f(j,q,{stdio:["pipe","pipe","ignore"],windowsHide:!0,timeout:120000}),K="";J.stdout?.setEncoding("utf8").on("data",(Q)=>{K+=Q}),J.on("error",()=>z({status:null,stdout:K})),J.on("close",(Q)=>z({status:Q,stdout:K})),J.stdin?.end(G??"")})}function bj(j=Y()){return l??=(async()=>{let q=hj();if(q.length===0)return;let G=await Bj(j),z=G?await Uj(j,["acl","stamp","--holder-pid",String(process.ppid),"--sandbox-user-sid",G],JSON.stringify({denyRead:[],denyWrite:q})):null;if(!z||z.status!==0&&z.status!==2)C(`program_folder_deny_failed: ${z?`exit ${z.status}`:"no sandbox user"}`),process.stderr.write(`Reason worker: could not deny the Windows sandbox writes to PATH folders (${z?`exit ${z.status}`:"no sandbox user"}); confined commands are off
6
- `)})(),l}var yj=`h=$(mktemp -d) || exit 125; trap 'rm -rf "$h"' EXIT; mkdir -p "$h/AppData/Roaming" "$h/AppData/Local"; w=$(cygpath -w "$h"); export HOME="$h" USERPROFILE="$w" APPDATA="$w\\AppData\\Roaming" LOCALAPPDATA="$w\\AppData\\Local" TEMP="$w" TMP="$w"; `;async function Xj(){let j=k;if(k=null,P=null,!j)return;try{await(await j).reset()}catch{}}async function Yj(j={}){if(X)return!1;if(j.loadSandboxRuntime)return d(j.loadSandboxRuntime);if(!Vj())return!1;return c??=d(Kj),c}async function d(j){try{let{SandboxManager:q}=await j();if(process.platform==="win32"){if(!I(Y()))C("dependencies_missing: srt-win.exe");return!X}let G=q.checkDependencies().errors;if(G.length>0)return C(`dependencies_missing: ${G.join(", ")}`),!1;return!X}catch(q){return C(`load_failed: ${String(q)}`),!1}}async function zq(j={}){if(!j.loadSandboxRuntime&&!j.sandboxMode){if(!await Yj())return!1;return u??=p({}),u}return p(j)}async function p(j){let q=process.platform==="win32",G=o(H(qj(),"reason-device-probe-"));try{let z=q?Hj(G,!1):void 0;if(z)await Zj(z,!1);let J;try{J=await gj(await x(j,z),G)}catch{return!1}finally{if(q)O()}if(!J)C("confined_command_failed");if(A===0)await(q?$j():Xj());return J}finally{e(G,{recursive:!0,force:!0})}}async function gj(j,q){let G=process.platform==="win32",z=G?"true":Qj(I);if(!z)return!1;try{let{argv:J,env:K}=await j.wrapWithSandboxArgv(Aj([z]),Cj(),{filesystem:G?Nj([],q):Ij({root:q,allowWrite:!1,temporaryDirectory:q,protectedPaths:[]})},void 0,q),[Q,...V]=J;if(!Q)return!1;return await wj(Q,V,q,G?{env:K}:{})}catch{return!1}finally{try{j.cleanupAfterCommand()}catch{}}}function wj(j,q,G,z={}){return new Promise((J)=>{let K=!1,Q,V=(L)=>{if(K)return;K=!0,clearTimeout(Q),J(L)},$;try{$=(z.spawnChild??f)(j,q,{cwd:G,env:z.env??{PATH:r,HOME:G,TMPDIR:G},stdio:"ignore",windowsHide:!0})}catch{V(!1);return}$.once("error",()=>V(!1));let Z=(L,F)=>V(L===0&&F===null);if($.once("exit",Z),$.once("close",Z),$.exitCode!==null||$.signalCode!==null)Z($.exitCode,$.signalCode);if(K)return;Q=setTimeout(()=>{V(!1);try{$.kill("SIGKILL")}catch{}},Math.min(z.timeoutMs??g,g))})}function Cj(j=I,q=h()){if(q==="win32")return s("win32");return["/bin/bash","/bin/sh"].find((G)=>j(G))??"/bin/sh"}function Aj(j){return j.map((q)=>`'${q.replaceAll("'","'\\''")}'`).join(" ")}function cj(j,q,G=(z)=>_j(z,{withFileTypes:!0}).filter((J)=>J.isDirectory()||J.isFile()).map((J)=>J.name)){let z=[],J=[{path:j,depth:0}],K=0;while(J.length>0&&K<w){let Q=J.pop(),V;try{V=G(Q.path)}catch{continue}for(let $ of V){if(K+=1,K>w)break;let Z=H(Q.path,$);if(q(Z)){z.push(Z);continue}if(Q.depth+1<Pj&&!Ej.has($))J.push({path:Z,depth:Q.depth+1})}}return z}function Ij(j){let q=H(j.root,".git"),G=[];try{if(jj(q).isDirectory())G=[H(q,"config"),H(q,"hooks")]}catch{}return{denyRead:["/home","/root","/tmp","/tmp/.X11-unix",...j.protectedPaths],allowRead:[j.root,j.temporaryDirectory],allowWrite:[...j.allowWrite?[j.root]:[],j.temporaryDirectory],denyWrite:[...j.protectedPaths,...G]}}function Nj(j,q){let G=H(q,".git"),z=[];try{if(jj(G).isDirectory())z=[H(G,"config"),H(G,"hooks")]}catch{}return{denyRead:[...j],allowRead:[],allowWrite:[],denyWrite:[...j,...z]}}function uj(j,q){if(q)return{network:{allowedDomains:[],deniedDomains:[]},filesystem:q,windows:{srtWin:{path:Y()}}};return{network:{allowedDomains:[],deniedDomains:[]},filesystem:{denyRead:[],allowRead:[],allowWrite:[],denyWrite:[]},...j==="weak"?{enableWeakerNestedSandbox:!0}:{}}}function Gq(j){let q=j.createTemporaryDirectory??(()=>o(H(qj(),"reason-device-"))),G=j.removeTemporaryDirectory??((z)=>e(z,{recursive:!0,force:!0}));return async(z,J,K)=>{let Q=process.platform==="win32",V;if(Q){let Z=Hj(K.root,K.allowWrite);if(!await Zj(Z,!K.workerProbe,K.signal,K.timeoutMs))return{exitCode:null,signal:null,stdout:"",stderr:"",timedOut:!0,truncated:!1};try{V=await x(j,Z)}catch(L){throw O(),L}}else V=await x(j),A+=1;let $;try{$=q();let Z=cj(K.root,j.isProtectedPath),L;try{L=await V.wrapWithSandboxArgv((Q?yj:"")+Aj([z,...J]),j.shell??Cj(),{filesystem:Q?Nj(Z,K.root):Ij({root:K.root,allowWrite:K.allowWrite,temporaryDirectory:$,protectedPaths:Z})},K.signal,K.cwd)}catch(b){throw b instanceof B?b:new B("sandbox_unavailable","The confined execution sandbox could not wrap the command.")}let[F,...Tj]=L.argv;if(!F)throw new B("sandbox_unavailable","The confined execution sandbox produced no command.");return await j.spawnCaptured(F,Tj,{cwd:K.cwd,timeoutMs:K.timeoutMs,signal:K.signal,env:Q?L.env:j.scrubEnvironment(K.root,$)})}finally{O();try{V.cleanupAfterCommand()}catch{}if($!==void 0)G($)}}}
7
- export{oj as zb,Y as Ab,tj as Bb,ej as Cb,jq as Db,qq as Eb,Vj as Fb,zq as Gb,Cj as Hb,Gq as Ib};