@reason-machines/cli-linux-arm64-musl 0.2.336 → 0.2.338

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 (76) hide show
  1. package/bin/ara +1 -1
  2. package/bin/vm-hands/api-cb63vj4j.js +2 -0
  3. package/bin/vm-hands/api-credentials-r3gava82.js +2 -0
  4. package/bin/vm-hands/{ask-relay-62f753v8.js → ask-relay-ak0qxs4j.js} +2 -2
  5. package/bin/vm-hands/connect-cli-7h9nkgqd.js +2 -0
  6. package/bin/vm-hands/custom-endpoint-device-zhkesj7w.js +2 -0
  7. package/bin/vm-hands/desktop-account-a0tc6tgz.js +2 -0
  8. package/bin/vm-hands/{device-workspace-nqxczwd3.js → device-workspace-kmdera1y.js} +1 -1
  9. package/bin/vm-hands/{hands-worker-source-tc1snvve.js → hands-worker-source-gffxw6cf.js} +1 -1
  10. package/bin/vm-hands/{index-g4t2q0ep.js → index-n922jg9n.js} +1 -1
  11. package/bin/vm-hands/local-automation-bqazvms0.js +2 -0
  12. package/bin/vm-hands/local-capabilities-4v5p6yp3.js +2 -0
  13. package/bin/vm-hands/local-desktop-users-xwcgrstv.js +2 -0
  14. package/bin/vm-hands/local-display-mac-6hn25df7.js +2 -0
  15. package/bin/vm-hands/local-display-session-9bb5x27r.js +2 -0
  16. package/bin/vm-hands/local-pty-session-2r99e4z9.js +2 -0
  17. package/bin/vm-hands/network-contract-cg7j1pz9.js +2 -0
  18. package/bin/vm-hands/package-65d4a80w.js +2 -0
  19. package/bin/vm-hands/permissions-snk9a206.js +2 -0
  20. package/bin/vm-hands/{reason-hands-protocol-n14gyf7k.js → reason-hands-protocol-08mbrn5k.js} +1 -1
  21. package/bin/vm-hands/{status-9y1eqg06.js → status-1ahcrm8s.js} +2 -2
  22. package/bin/vm-hands/version-4cwn2qqp.js +2 -0
  23. package/bin/vm-hands/{vm-hands-entry-lite-ghav09mm.js → vm-hands-entry-lite-08tz9p24.js} +2 -2
  24. package/bin/vm-hands/{vm-hands-entry-lite-s64raarx.js → vm-hands-entry-lite-0nb9zkz1.js} +2 -2
  25. package/bin/vm-hands/{vm-hands-entry-lite-dtcpbbkc.js → vm-hands-entry-lite-4b8ypyym.js} +1 -1
  26. package/bin/vm-hands/{vm-hands-entry-lite-t36vzcw7.js → vm-hands-entry-lite-4ge4ez6h.js} +2 -2
  27. package/bin/vm-hands/{vm-hands-entry-lite-9enw55fp.js → vm-hands-entry-lite-622rzyfg.js} +2 -2
  28. package/bin/vm-hands/{vm-hands-entry-lite-5n6vc7je.js → vm-hands-entry-lite-6cj7s7rc.js} +1 -1
  29. package/bin/vm-hands/{vm-hands-entry-lite-9k57wmkv.js → vm-hands-entry-lite-723q0mmr.js} +5 -5
  30. package/bin/vm-hands/{vm-hands-entry-lite-px64jhhn.js → vm-hands-entry-lite-9n6m4qgf.js} +1 -1
  31. package/bin/vm-hands/{vm-hands-entry-lite-cnmd8nft.js → vm-hands-entry-lite-bbezym6j.js} +2 -2
  32. package/bin/vm-hands/{vm-hands-entry-lite-983czfdb.js → vm-hands-entry-lite-cag8nazq.js} +2 -2
  33. package/bin/vm-hands/{vm-hands-entry-lite-dhzcvvt2.js → vm-hands-entry-lite-d17bx1yc.js} +2 -2
  34. package/bin/vm-hands/{vm-hands-entry-lite-jzms4xs2.js → vm-hands-entry-lite-dnx92ytp.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-4fcs46fz.js → vm-hands-entry-lite-efvwgjhe.js} +2 -2
  36. package/bin/vm-hands/{vm-hands-entry-lite-yr493k0q.js → vm-hands-entry-lite-f2bcqmvr.js} +75 -75
  37. package/bin/vm-hands/{vm-hands-entry-lite-3dx1yqhd.js → vm-hands-entry-lite-gbekj59z.js} +1 -1
  38. package/bin/vm-hands/{vm-hands-entry-lite-thtd61xk.js → vm-hands-entry-lite-h9jdthmf.js} +1 -1
  39. package/bin/vm-hands/{vm-hands-entry-lite-zgs6j8wj.js → vm-hands-entry-lite-hh0002ye.js} +1 -1
  40. package/bin/vm-hands/{vm-hands-entry-lite-fpb440k0.js → vm-hands-entry-lite-hj1gnypx.js} +2 -2
  41. package/bin/vm-hands/{vm-hands-entry-lite-feaxcj0x.js → vm-hands-entry-lite-k9sm5kaf.js} +1 -1
  42. package/bin/vm-hands/{vm-hands-entry-lite-awwev9zg.js → vm-hands-entry-lite-kf5eeggb.js} +2 -2
  43. package/bin/vm-hands/{vm-hands-entry-lite-n0j2t2eb.js → vm-hands-entry-lite-me8b4f14.js} +2 -2
  44. package/bin/vm-hands/{vm-hands-entry-lite-mm72ht4e.js → vm-hands-entry-lite-png3h0cm.js} +1 -1
  45. package/bin/vm-hands/{vm-hands-entry-lite-hj6jjk24.js → vm-hands-entry-lite-pqama7tv.js} +1 -1
  46. package/bin/vm-hands/{vm-hands-entry-lite-k3cq8g9w.js → vm-hands-entry-lite-rasqv4xz.js} +3 -3
  47. package/bin/vm-hands/{vm-hands-entry-lite-c64behya.js → vm-hands-entry-lite-rhpmp59p.js} +1 -1
  48. package/bin/vm-hands/{vm-hands-entry-lite-mtp2h66e.js → vm-hands-entry-lite-samn6qm5.js} +2 -2
  49. package/bin/vm-hands/{vm-hands-entry-lite-7kzy7rxj.js → vm-hands-entry-lite-t2q10vjr.js} +1 -1
  50. package/bin/vm-hands/{vm-hands-entry-lite-4b8f37q4.js → vm-hands-entry-lite-w2yb86jm.js} +2 -2
  51. package/bin/vm-hands/{vm-hands-entry-lite-070nd0vy.js → vm-hands-entry-lite-y4nntb2w.js} +1 -1
  52. package/bin/vm-hands/{vm-hands-entry-lite-9rr6gh58.js → vm-hands-entry-lite-ytmcecfr.js} +1 -1
  53. package/bin/vm-hands/{vm-hands-entry-lite-tf5mepq5.js → vm-hands-entry-lite-z59ar4qz.js} +2 -2
  54. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  55. package/bin/vm-hands/{vm-hands-executor-bk5c02sn.js → vm-hands-executor-wz80d281.js} +1 -1
  56. package/bin/vm-hands/vm-hands-op-runner-430cgtn6.js +2 -0
  57. package/bin/vm-hands/{vm-hands-runtime-8eq6jwht.js → vm-hands-runtime-4tb05b3m.js} +3 -3
  58. package/bin/vm-hands/worker-sandbox-g70ryvcd.js +2 -0
  59. package/package.json +1 -1
  60. package/bin/vm-hands/api-36ywgdp3.js +0 -2
  61. package/bin/vm-hands/api-credentials-41xjt55r.js +0 -2
  62. package/bin/vm-hands/connect-cli-1defgnfc.js +0 -2
  63. package/bin/vm-hands/custom-endpoint-device-dt74zv7m.js +0 -2
  64. package/bin/vm-hands/desktop-account-a16gh9sj.js +0 -2
  65. package/bin/vm-hands/local-automation-h75bcz8g.js +0 -2
  66. package/bin/vm-hands/local-capabilities-95a5rydg.js +0 -2
  67. package/bin/vm-hands/local-desktop-users-qej2mfhx.js +0 -2
  68. package/bin/vm-hands/local-display-mac-4pddah9q.js +0 -2
  69. package/bin/vm-hands/local-display-session-fpdqc03v.js +0 -2
  70. package/bin/vm-hands/local-pty-session-kq8bd4pm.js +0 -2
  71. package/bin/vm-hands/network-contract-qxn4pg15.js +0 -2
  72. package/bin/vm-hands/package-s8sef5wh.js +0 -2
  73. package/bin/vm-hands/permissions-ecneehn3.js +0 -2
  74. package/bin/vm-hands/version-zrj419tq.js +0 -2
  75. package/bin/vm-hands/vm-hands-op-runner-cxytfman.js +0 -2
  76. package/bin/vm-hands/worker-sandbox-1m0s1vnq.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Rb as D}from"./vm-hands-entry-lite-h01d2fbm.js";import{ki as j}from"./vm-hands-entry-lite-070nd0vy.js";import{statSync as i}from"fs";import{delimiter as n,join as t}from"path";function _(q,z=process.env.PATH??""){if(!q||q.includes("/")||q.includes("\x00"))return!1;return z.split(n).some((G)=>{if(!G)return!1;try{let Q=i(t(G,q));return Q.isFile()&&(Q.mode&73)!==0}catch{return!1}})}import{spawn as r,spawnSync as e}from"child_process";import{existsSync as k,mkdtempSync as E,readFileSync as O,readdirSync as o,realpathSync as qq,rmSync as b,statSync as zq}from"fs";import{platform as y,tmpdir as g}from"os";import{dirname as A,join as Z}from"path";import{fileURLToPath as Gq,pathToFileURL as T}from"url";var Hq=["bwrap","socat","rg"],Jq=2000,v=20000,Qq=3,P=4000,Vq=new Set([".git",".hg",".svn","node_modules"]),Wq=["runAsHostUid","sysrq-trigger"],Yq=Z(A(A(Gq(import.meta.url))),"packages/sandbox-runtime/src/index.ts"),h=!1;function fq(){h=!0}async function u(){let z=h?Z(A(qq(process.execPath)),"runtime","srt"):void 0;if(z&&process.platform==="linux"&&!k(Z(z,"vendor","seccomp",process.arch,"apply-seccomp")))throw Error("packaged_sandbox_runtime_vendor_missing");if(z){let J=O(Z(z,"sandbox-runtime.mjs"),"utf8");for(let Y of Wq)if(!J.includes(Y))throw Error(`packaged_sandbox_runtime_fork_missing:${Y}`)}let H=(await import(z?T(Z(z,"sandbox-runtime.mjs")).href:T(Yq).href)).SandboxManager;if(!H||typeof H.initialize!=="function"||typeof H.wrapWithSandboxArgv!=="function")throw Error("sandbox-runtime does not expose the expected SandboxManager API.");return{SandboxManager:H}}function Zq(q={}){if((q.platformName??y())!=="linux")return!1;let G=q.fileExists??k,Q=q.readFile??((H)=>O(H,"utf8"));for(let H of["/.dockerenv","/run/.containerenv"])try{if(G(H))return!0}catch{}try{return/docker|containerd|kubepods|lxc|libpod/.test(Q("/proc/1/cgroup"))}catch{return!1}}function l(q){return["/bin/true","/usr/bin/true"].find((z)=>q(z))??null}function $q(q,z){return q==="strict"?["--ro-bind","/","/","--unshare-pid","--unshare-user","--cap-drop","ALL","--proc","/proc","--",z]:["--ro-bind","/","/","--unshare-pid","--unshare-user","--bind","/proc","/proc","--",z]}function jq(q,z){try{let G=e("bwrap",$q(q,z),{stdio:"ignore",timeout:Jq});return!G.error&&G.status===0}catch{return!1}}function Bq(q){let z=q.platformName??y();if(z!=="linux")return null;let G=q.hasExecutable??_;if(!Hq.every((V)=>G(V)))return null;let Q=q.fileExists??k,H=l(Q);if(!H)return null;let J=B??(q.containerized??Zq({platformName:z})?"weak":"strict");return(q.probeNamespaces??((V)=>jq(V,H)))(J)?J:null}var L=null,C=!1,K=null,S=null,f=null,B=null,F=null;function M(){throw I("sandbox_mode_conflict"),new j("sandbox_unavailable","Sandbox process policy conflicts with an existing probe or session. Restart the worker.")}function xq(q){if(B!==null&&B!==q||C&&L!==null&&L!==q||F!==null&&F!==q)M();B=q}function I(q){K=q}function c(q){if(K)return!1;if(!C){if(L=Bq(q??{}),C=!0,L&&!q)d()}return L!==null}function Lq(){return c()?L:null}var U=null,w=0;function m(q){if(K)throw new j("sandbox_unavailable","Confined execution is unavailable in this worker process.");if(B&&q.sandboxMode&&B!==q.sandboxMode)M();let z=B??q.sandboxMode??Lq();if(!z)throw new j("sandbox_unavailable","Confined command execution is unavailable on this operating system.");if(F&&F!==z)M();return F=z,U??=(async()=>{let{SandboxManager:G}=await(q.loadSandboxRuntime??u)();return await G.initialize(Iq(z)),G})().catch((G)=>{throw U=null,I(`initialize_failed: ${String(G)}`),G instanceof j?G:new j("sandbox_unavailable","The confined execution sandbox failed to start.")}),U.then((G)=>{if(K)throw new j("sandbox_unavailable","Confined execution became unavailable during sandbox initialization.");return G})}async function Kq(){let q=U;if(U=null,!q)return;try{await(await q).reset()}catch{}}async function d(q={}){if(K)return!1;if(q.loadSandboxRuntime)return x(q.loadSandboxRuntime);if(!c())return!1;return S??=x(u),S}async function x(q){try{let{SandboxManager:z}=await q(),G=z.checkDependencies().errors;if(G.length>0)return I(`dependencies_missing: ${G.join(", ")}`),!1;return!K}catch(z){return I(`load_failed: ${String(z)}`),!1}}async function Rq(q={}){if(!q.loadSandboxRuntime&&!q.sandboxMode){if(!await d())return!1;return f??=R({}),f}return R(q)}async function R(q){let z;try{z=await m(q)}catch{return!1}let G=await Xq(z);if(!G)I("confined_command_failed");if(w===0)await Kq();return G}async function Xq(q){let z=l(k);if(!z)return!1;let G=E(Z(g(),"reason-device-probe-"));try{let{argv:Q}=await q.wrapWithSandboxArgv(a([z]),p(),{filesystem:s({root:G,allowWrite:!1,temporaryDirectory:G,protectedPaths:[]})},void 0,G),[H,...J]=Q;if(!H)return!1;return await Fq(H,J,G)}catch{return!1}finally{try{q.cleanupAfterCommand()}catch{}b(G,{recursive:!0,force:!0})}}function Fq(q,z,G,Q={}){return new Promise((H)=>{let J=!1,Y,V=(X)=>{if(J)return;J=!0,clearTimeout(Y),H(X)},W;try{W=(Q.spawnChild??r)(q,z,{cwd:G,env:{PATH:D,HOME:G,TMPDIR:G},stdio:"ignore"})}catch{V(!1);return}W.once("error",()=>V(!1));let $=(X,N)=>V(X===0&&N===null);if(W.once("exit",$),W.once("close",$),W.exitCode!==null||W.signalCode!==null)$(W.exitCode,W.signalCode);if(J)return;Y=setTimeout(()=>{V(!1);try{W.kill("SIGKILL")}catch{}},Math.min(Q.timeoutMs??v,v))})}function p(q=k){return["/bin/bash","/bin/sh"].find((z)=>q(z))??"/bin/sh"}function a(q){return q.map((z)=>`'${z.replaceAll("'","'\\''")}'`).join(" ")}function Uq(q,z,G=(Q)=>o(Q,{withFileTypes:!0}).filter((H)=>H.isDirectory()||H.isFile()).map((H)=>H.name)){let Q=[],H=[{path:q,depth:0}],J=0;while(H.length>0&&J<P){let Y=H.pop(),V;try{V=G(Y.path)}catch{continue}for(let W of V){if(J+=1,J>P)break;let $=Z(Y.path,W);if(z($)){Q.push($);continue}if(Y.depth+1<Qq&&!Vq.has(W))H.push({path:$,depth:Y.depth+1})}}return Q}function s(q){let z=Z(q.root,".git"),G=[];try{if(zq(z).isDirectory())G=[Z(z,"config"),Z(z,"hooks")]}catch{}return{denyRead:["/home","/root","/tmp","/tmp/.X11-unix",...q.protectedPaths],allowRead:[q.root,q.temporaryDirectory],allowWrite:[...q.allowWrite?[q.root]:[],q.temporaryDirectory],denyWrite:[...q.protectedPaths,...G]}}function Iq(q){return{network:{allowedDomains:[],deniedDomains:[]},filesystem:{denyRead:[],allowRead:[],allowWrite:[],denyWrite:[]},...q==="weak"?{enableWeakerNestedSandbox:!0}:{}}}function Dq(q){let z=q.createTemporaryDirectory??(()=>E(Z(g(),"reason-device-"))),G=q.removeTemporaryDirectory??((Q)=>b(Q,{recursive:!0,force:!0}));return async(Q,H,J)=>{let Y=await m(q),V=z();w+=1;try{let W;try{W=await Y.wrapWithSandboxArgv(a([Q,...H]),q.shell??p(),{filesystem:s({root:J.root,allowWrite:J.allowWrite,temporaryDirectory:V,protectedPaths:Uq(J.root,q.isProtectedPath)})},J.signal,J.cwd)}catch(N){throw N instanceof j?N:new j("sandbox_unavailable","The confined execution sandbox could not wrap the command.")}let[$,...X]=W.argv;if(!$)throw new j("sandbox_unavailable","The confined execution sandbox produced no command.");return await q.spawnCaptured($,X,{cwd:J.cwd,timeoutMs:J.timeoutMs,signal:J.signal,env:q.scrubEnvironment(J.root,V)})}finally{w-=1;try{Y.cleanupAfterCommand()}catch{}G(V)}}}
2
+ import{Rb as D}from"./vm-hands-entry-lite-h01d2fbm.js";import{ni as j}from"./vm-hands-entry-lite-y4nntb2w.js";import{statSync as i}from"fs";import{delimiter as n,join as t}from"path";function _(q,z=process.env.PATH??""){if(!q||q.includes("/")||q.includes("\x00"))return!1;return z.split(n).some((G)=>{if(!G)return!1;try{let Q=i(t(G,q));return Q.isFile()&&(Q.mode&73)!==0}catch{return!1}})}import{spawn as r,spawnSync as e}from"child_process";import{existsSync as k,mkdtempSync as E,readFileSync as O,readdirSync as o,realpathSync as qq,rmSync as b,statSync as zq}from"fs";import{platform as y,tmpdir as g}from"os";import{dirname as A,join as Z}from"path";import{fileURLToPath as Gq,pathToFileURL as T}from"url";var Hq=["bwrap","socat","rg"],Jq=2000,v=20000,Qq=3,P=4000,Vq=new Set([".git",".hg",".svn","node_modules"]),Wq=["runAsHostUid","sysrq-trigger"],Yq=Z(A(A(Gq(import.meta.url))),"packages/sandbox-runtime/src/index.ts"),h=!1;function fq(){h=!0}async function u(){let z=h?Z(A(qq(process.execPath)),"runtime","srt"):void 0;if(z&&process.platform==="linux"&&!k(Z(z,"vendor","seccomp",process.arch,"apply-seccomp")))throw Error("packaged_sandbox_runtime_vendor_missing");if(z){let J=O(Z(z,"sandbox-runtime.mjs"),"utf8");for(let Y of Wq)if(!J.includes(Y))throw Error(`packaged_sandbox_runtime_fork_missing:${Y}`)}let H=(await import(z?T(Z(z,"sandbox-runtime.mjs")).href:T(Yq).href)).SandboxManager;if(!H||typeof H.initialize!=="function"||typeof H.wrapWithSandboxArgv!=="function")throw Error("sandbox-runtime does not expose the expected SandboxManager API.");return{SandboxManager:H}}function Zq(q={}){if((q.platformName??y())!=="linux")return!1;let G=q.fileExists??k,Q=q.readFile??((H)=>O(H,"utf8"));for(let H of["/.dockerenv","/run/.containerenv"])try{if(G(H))return!0}catch{}try{return/docker|containerd|kubepods|lxc|libpod/.test(Q("/proc/1/cgroup"))}catch{return!1}}function l(q){return["/bin/true","/usr/bin/true"].find((z)=>q(z))??null}function $q(q,z){return q==="strict"?["--ro-bind","/","/","--unshare-pid","--unshare-user","--cap-drop","ALL","--proc","/proc","--",z]:["--ro-bind","/","/","--unshare-pid","--unshare-user","--bind","/proc","/proc","--",z]}function jq(q,z){try{let G=e("bwrap",$q(q,z),{stdio:"ignore",timeout:Jq});return!G.error&&G.status===0}catch{return!1}}function Bq(q){let z=q.platformName??y();if(z!=="linux")return null;let G=q.hasExecutable??_;if(!Hq.every((V)=>G(V)))return null;let Q=q.fileExists??k,H=l(Q);if(!H)return null;let J=B??(q.containerized??Zq({platformName:z})?"weak":"strict");return(q.probeNamespaces??((V)=>jq(V,H)))(J)?J:null}var L=null,C=!1,K=null,S=null,f=null,B=null,F=null;function M(){throw I("sandbox_mode_conflict"),new j("sandbox_unavailable","Sandbox process policy conflicts with an existing probe or session. Restart the worker.")}function xq(q){if(B!==null&&B!==q||C&&L!==null&&L!==q||F!==null&&F!==q)M();B=q}function I(q){K=q}function c(q){if(K)return!1;if(!C){if(L=Bq(q??{}),C=!0,L&&!q)d()}return L!==null}function Lq(){return c()?L:null}var U=null,w=0;function m(q){if(K)throw new j("sandbox_unavailable","Confined execution is unavailable in this worker process.");if(B&&q.sandboxMode&&B!==q.sandboxMode)M();let z=B??q.sandboxMode??Lq();if(!z)throw new j("sandbox_unavailable","Confined command execution is unavailable on this operating system.");if(F&&F!==z)M();return F=z,U??=(async()=>{let{SandboxManager:G}=await(q.loadSandboxRuntime??u)();return await G.initialize(Iq(z)),G})().catch((G)=>{throw U=null,I(`initialize_failed: ${String(G)}`),G instanceof j?G:new j("sandbox_unavailable","The confined execution sandbox failed to start.")}),U.then((G)=>{if(K)throw new j("sandbox_unavailable","Confined execution became unavailable during sandbox initialization.");return G})}async function Kq(){let q=U;if(U=null,!q)return;try{await(await q).reset()}catch{}}async function d(q={}){if(K)return!1;if(q.loadSandboxRuntime)return x(q.loadSandboxRuntime);if(!c())return!1;return S??=x(u),S}async function x(q){try{let{SandboxManager:z}=await q(),G=z.checkDependencies().errors;if(G.length>0)return I(`dependencies_missing: ${G.join(", ")}`),!1;return!K}catch(z){return I(`load_failed: ${String(z)}`),!1}}async function Rq(q={}){if(!q.loadSandboxRuntime&&!q.sandboxMode){if(!await d())return!1;return f??=R({}),f}return R(q)}async function R(q){let z;try{z=await m(q)}catch{return!1}let G=await Xq(z);if(!G)I("confined_command_failed");if(w===0)await Kq();return G}async function Xq(q){let z=l(k);if(!z)return!1;let G=E(Z(g(),"reason-device-probe-"));try{let{argv:Q}=await q.wrapWithSandboxArgv(a([z]),p(),{filesystem:s({root:G,allowWrite:!1,temporaryDirectory:G,protectedPaths:[]})},void 0,G),[H,...J]=Q;if(!H)return!1;return await Fq(H,J,G)}catch{return!1}finally{try{q.cleanupAfterCommand()}catch{}b(G,{recursive:!0,force:!0})}}function Fq(q,z,G,Q={}){return new Promise((H)=>{let J=!1,Y,V=(X)=>{if(J)return;J=!0,clearTimeout(Y),H(X)},W;try{W=(Q.spawnChild??r)(q,z,{cwd:G,env:{PATH:D,HOME:G,TMPDIR:G},stdio:"ignore"})}catch{V(!1);return}W.once("error",()=>V(!1));let $=(X,N)=>V(X===0&&N===null);if(W.once("exit",$),W.once("close",$),W.exitCode!==null||W.signalCode!==null)$(W.exitCode,W.signalCode);if(J)return;Y=setTimeout(()=>{V(!1);try{W.kill("SIGKILL")}catch{}},Math.min(Q.timeoutMs??v,v))})}function p(q=k){return["/bin/bash","/bin/sh"].find((z)=>q(z))??"/bin/sh"}function a(q){return q.map((z)=>`'${z.replaceAll("'","'\\''")}'`).join(" ")}function Uq(q,z,G=(Q)=>o(Q,{withFileTypes:!0}).filter((H)=>H.isDirectory()||H.isFile()).map((H)=>H.name)){let Q=[],H=[{path:q,depth:0}],J=0;while(H.length>0&&J<P){let Y=H.pop(),V;try{V=G(Y.path)}catch{continue}for(let W of V){if(J+=1,J>P)break;let $=Z(Y.path,W);if(z($)){Q.push($);continue}if(Y.depth+1<Qq&&!Vq.has(W))H.push({path:$,depth:Y.depth+1})}}return Q}function s(q){let z=Z(q.root,".git"),G=[];try{if(zq(z).isDirectory())G=[Z(z,"config"),Z(z,"hooks")]}catch{}return{denyRead:["/home","/root","/tmp","/tmp/.X11-unix",...q.protectedPaths],allowRead:[q.root,q.temporaryDirectory],allowWrite:[...q.allowWrite?[q.root]:[],q.temporaryDirectory],denyWrite:[...q.protectedPaths,...G]}}function Iq(q){return{network:{allowedDomains:[],deniedDomains:[]},filesystem:{denyRead:[],allowRead:[],allowWrite:[],denyWrite:[]},...q==="weak"?{enableWeakerNestedSandbox:!0}:{}}}function Dq(q){let z=q.createTemporaryDirectory??(()=>E(Z(g(),"reason-device-"))),G=q.removeTemporaryDirectory??((Q)=>b(Q,{recursive:!0,force:!0}));return async(Q,H,J)=>{let Y=await m(q),V=z();w+=1;try{let W;try{W=await Y.wrapWithSandboxArgv(a([Q,...H]),q.shell??p(),{filesystem:s({root:J.root,allowWrite:J.allowWrite,temporaryDirectory:V,protectedPaths:Uq(J.root,q.isProtectedPath)})},J.signal,J.cwd)}catch(N){throw N instanceof j?N:new j("sandbox_unavailable","The confined execution sandbox could not wrap the command.")}let[$,...X]=W.argv;if(!$)throw new j("sandbox_unavailable","The confined execution sandbox produced no command.");return await q.spawnCaptured($,X,{cwd:J.cwd,timeoutMs:J.timeoutMs,signal:J.signal,env:q.scrubEnvironment(J.root,V)})}finally{w-=1;try{Y.cleanupAfterCommand()}catch{}G(V)}}}
3
3
  export{_ as Kb,fq as Lb,xq as Mb,c as Nb,Rq as Ob,p as Pb,Dq as Qb};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{we as w}from"./vm-hands-entry-lite-mtp2h66e.js";var _="inference.custom.v1",K=32768,O=67108864,P=16384,Q=204800,$=600000,S=["content-type","anthropic-version","user-agent"],L=w.enum(["openai-completions","openai-responses","anthropic-messages"]),T=new Set(S),U=w.record(w.string(),w.string().max(2048)).refine((j)=>Object.keys(j).every((A)=>T.has(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)),"Only non-secret custom endpoint request headers are permitted");function F(j){try{let A=new URL(j);return["http:","https:"].includes(A.protocol)&&!A.username&&!A.password&&!A.search&&!A.hash?A:null}catch{return null}}function V(j,A){let B=F(j.baseUrl),H=F(A.baseUrl),D=F(j.url);if(!B||!H||!D||j.method!=="POST"||A.execution!=="device")return!1;let I=(J)=>J.origin+J.pathname.replace(/\/+$/,"");if(I(B)!==I(H)||D.origin!==B.origin)return!1;let N=A.api==="openai-completions"?"/chat/completions":A.api==="openai-responses"?"/responses":"/v1/messages";return D.pathname===B.pathname.replace(/\/+$/,"")+N}var x=w.object({baseUrl:w.string().max(2048),url:w.string().max(4096),method:w.literal("POST"),body:w.string().refine((j)=>new TextEncoder().encode(j).byteLength<=Q).optional(),headers:U,credentialOrganizationId:w.string().uuid(),accountKey:w.string().min(1).max(256).optional()}).strict().refine((j)=>L.options.some((A)=>V(j,{baseUrl:j.baseUrl,api:A,execution:"device"})),"Invalid custom endpoint inference URL"),C=w.object({status:w.number().int().min(200).max(599),statusText:w.string().max(256).refine((j)=>!/[\r\n\0]/.test(j)),headers:w.record(w.string(),w.string().max(4096)).refine((j)=>Object.keys(j).every((A)=>["content-type","retry-after","x-request-id","request-id"].includes(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)))}).strict(),E=w.union([w.object({eof:w.literal(!0)}).strict(),w.object({eof:w.literal(!1),data:w.string().max(Math.ceil(K/3)*4).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/).refine((j)=>j.length>0&&j.length*3/4-(j.endsWith("==")?2:j.endsWith("=")?1:0)<=K)}).strict()]),M=w.object({bytes:w.number().int().min(0).max(O),chunks:w.number().int().min(0).max(P)}).strict(),R=w.object({apiKey:w.string().min(1).max(16384).refine((j)=>!/[\r\n\0]/.test(j)),api:L}).strict(),W=["custom_endpoint_host_not_found","custom_endpoint_connection_failed","custom_endpoint_tls_failed"];function z(j){return typeof j==="string"&&W.includes(j)}var X="Ollama listens only on 127.0.0.1 unless it is started with OLLAMA_HOST=0.0.0.0.",G={custom_endpoint_host_not_found:"Your computer couldn't resolve your model server's hostname. Check the hostname in the Base URL, and that this computer is on the network or tailnet that resolves it.",custom_endpoint_connection_failed:`Your computer's connection to your model server was refused or timed out. Check that the server is running and listening on the Base URL's address and port. ${X}`,custom_endpoint_tls_failed:"Your computer couldn't make a secure (TLS) connection to your model server. Check the server's https certificate, or use an http:// Base URL for a server on your computer or private network.",401:"Your model server refused the request (HTTP 401). Check the API key saved for it in Models.",403:"Your model server refused the request (HTTP 403). Ollama refuses requests addressed to a hostname other than localhost, such as a *.ts.net name from tailscale serve or funnel: restart it with OLLAMA_HOST=0.0.0.0, or use http://localhost:11434/v1 when it runs on the session's computer. For another server, check the API key and its access rules.",404:"Your model server answered HTTP 404 (not found). Check that the Base URL is the API root (for Ollama, http://localhost:11434/v1) and that each model ID is one the server lists."},Y=new Set(Object.values(G));function p(j){return Object.hasOwn(G,j)?G[j]:null}function b(j){return typeof j==="string"&&Y.has(j)}
3
- export{_ as qc,K as rc,O as sc,P as tc,Q as uc,$ as vc,S as wc,V as xc,x as yc,C as zc,E as Ac,M as Bc,R as Cc,W as Dc,z as Ec,p as Fc,b as Gc};
2
+ import{ze as w}from"./vm-hands-entry-lite-samn6qm5.js";var $="inference.custom.v1",K=32768,O=67108864,P=16384,Q=204800,x=600000,S=["content-type","anthropic-version","user-agent"],L=w.enum(["openai-completions","openai-responses","anthropic-messages"]),T=new Set(S),U=w.record(w.string(),w.string().max(2048)).refine((j)=>Object.keys(j).every((A)=>T.has(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)),"Only non-secret custom endpoint request headers are permitted");function F(j){try{let A=new URL(j);return["http:","https:"].includes(A.protocol)&&!A.username&&!A.password&&!A.search&&!A.hash?A:null}catch{return null}}function V(j,A){let B=F(j.baseUrl),H=F(A.baseUrl),D=F(j.url);if(!B||!H||!D||j.method!=="POST"||A.execution!=="device")return!1;let I=(J)=>J.origin+J.pathname.replace(/\/+$/,"");if(I(B)!==I(H)||D.origin!==B.origin)return!1;let N=A.api==="openai-completions"?"/chat/completions":A.api==="openai-responses"?"/responses":"/v1/messages";return D.pathname===B.pathname.replace(/\/+$/,"")+N}var C=w.object({baseUrl:w.string().max(2048),url:w.string().max(4096),method:w.literal("POST"),body:w.string().refine((j)=>new TextEncoder().encode(j).byteLength<=Q).optional(),headers:U,credentialOrganizationId:w.string().uuid(),accountKey:w.string().min(1).max(256).optional()}).strict().refine((j)=>L.options.some((A)=>V(j,{baseUrl:j.baseUrl,api:A,execution:"device"})),"Invalid custom endpoint inference URL"),E=w.object({status:w.number().int().min(200).max(599),statusText:w.string().max(256).refine((j)=>!/[\r\n\0]/.test(j)),headers:w.record(w.string(),w.string().max(4096)).refine((j)=>Object.keys(j).every((A)=>["content-type","retry-after","x-request-id","request-id"].includes(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)))}).strict(),M=w.union([w.object({eof:w.literal(!0)}).strict(),w.object({eof:w.literal(!1),data:w.string().max(Math.ceil(K/3)*4).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/).refine((j)=>j.length>0&&j.length*3/4-(j.endsWith("==")?2:j.endsWith("=")?1:0)<=K)}).strict()]),R=w.object({bytes:w.number().int().min(0).max(O),chunks:w.number().int().min(0).max(P)}).strict(),z=w.object({apiKey:w.string().min(1).max(16384).refine((j)=>!/[\r\n\0]/.test(j)),api:L}).strict(),W=["custom_endpoint_host_not_found","custom_endpoint_connection_failed","custom_endpoint_tls_failed"];function p(j){return typeof j==="string"&&W.includes(j)}var X="Ollama listens only on 127.0.0.1 unless it is started with OLLAMA_HOST=0.0.0.0.",G={custom_endpoint_host_not_found:"Your computer couldn't resolve your model server's hostname. Check the hostname in the Base URL, and that this computer is on the network or tailnet that resolves it.",custom_endpoint_connection_failed:`Your computer's connection to your model server was refused or timed out. Check that the server is running and listening on the Base URL's address and port. ${X}`,custom_endpoint_tls_failed:"Your computer couldn't make a secure (TLS) connection to your model server. Check the server's https certificate, or use an http:// Base URL for a server on your computer or private network.",401:"Your model server refused the request (HTTP 401). Check the API key saved for it in Models.",403:"Your model server refused the request (HTTP 403). Ollama refuses requests addressed to a hostname other than localhost, such as a *.ts.net name from tailscale serve or funnel: restart it with OLLAMA_HOST=0.0.0.0, or use http://localhost:11434/v1 when it runs on the session's computer. For another server, check the API key and its access rules.",404:"Your model server answered HTTP 404 (not found). Check that the Base URL is the API root (for Ollama, http://localhost:11434/v1) and that each model ID is one the server lists."},Y=new Set(Object.values(G));function b(j){return Object.hasOwn(G,j)?G[j]:null}function k(j){return typeof j==="string"&&Y.has(j)}var Z=/^Your model endpoint \S+ (?:returned HTTP 40[34]|was unreachable: it refused the connection)\.$/;function y(j,A){if(!/^[a-z0-9.-]+$/i.test(j))return null;if(A==="connection_refused")return`Your model endpoint ${j} was unreachable: it refused the connection.`;return A===403||A===404?`Your model endpoint ${j} returned HTTP ${A}.`:null}function q(j){return typeof j==="string"&&Z.test(j)}
3
+ export{$ as qc,K as rc,O as sc,P as tc,Q as uc,x as vc,S as wc,V as xc,C as yc,E as zc,M as Ac,R as Bc,z as Cc,W as Dc,p as Ec,b as Fc,k as Gc,y as Hc,q as Ic};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  class o extends Error{code;constructor(a,r){super(r);this.code=a;this.name="LocalCapabilityError"}}
3
- export{o as ki};
3
+ export{o as ni};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var U=".reason/workspace",T="workspace_base",y="sessions",W="workspace_layout",g=".reason/workspace/sessions",B=/^[0-9a-f]{8}$/;function C(j){if(!J(j))return!1;let q=".reason/workspace/sessions/";if(!j.startsWith(q))return!1;let z=j.slice(q.length).split("/");return z.length===2&&B.test(z[0])}var G=4096,X="workspaces/pi";function J(j){if(typeof j!=="string"||!j||j.length>G)return!1;if(j.startsWith("/")||j.includes("\x00")||j.includes("\\"))return!1;return j.split("/").every((q)=>q!==""&&q!=="."&&q!=="..")}function Z(j){if(j.kind==="root"){if(j.path===void 0)return".";if(!J(j.path))throw Error("invalid_device_workspace_identity");return j.path}if(!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/.test(j.workspaceId)||j.workspaceId==="."||j.workspaceId==="..")throw Error("invalid_device_workspace_identity");let q=j.layout==="sessions"?"sessions":X;return`${j.base?`${j.base}/`:""}${q}/${j.workspaceId}/repo`}function L(j){if(!j||typeof j!=="object"||Array.isArray(j))return null;let q=j;if(q.kind==="root"&&Object.keys(q).length===1)return{kind:"root"};if(q.kind==="root"&&Object.keys(q).length===2&&J(q.path))return{kind:"root",path:q.path};if(q.kind!=="managed"||typeof q.workspaceId!=="string"||Object.keys(q).length!==2+(q.base===void 0?0:1)+(q.layout===void 0?0:1)||q.base!==void 0&&q.base!==".reason/workspace"||q.layout!==void 0&&q.layout!=="sessions")return null;let z={kind:"managed",workspaceId:q.workspaceId,...q.base===".reason/workspace"?{base:".reason/workspace"}:{},...q.layout==="sessions"?{layout:"sessions"}:{}};try{return Z(z),z}catch{return null}}var b="/home/runner",P=10001,x="/run/reason/sessions",f=/^(?:\/[A-Za-z0-9._-]+)+$/,M=/-sidechat-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,H=/^(.+)-repository-[a-z0-9][a-z0-9._-]*-[0-9a-f]{12}$/;function K(j){return M.exec(j)?.[1]??H.exec(j)?.[1]??j}var $=/^((?:\/[A-Za-z0-9._-]+)+)\/\.reason\/workspace\/(workspaces\/pi|sessions)\/([^/]+)$/,A="*/.reason/workspace/workspaces/pi/*|*/.reason/workspace/sessions/*";function N(j,q=b,z="sessions"){if(!f.test(q)||q.split("/").some((V)=>V==="."||V===".."))throw Error("invalid_cloud_payload_home");let Q=`${q}/${Z({kind:"managed",workspaceId:j,base:".reason/workspace",...z?{layout:z}:{}})}`,F=`${x}/${K(j)}`;return{home:q,root:Q.slice(0,-5),checkout:Q,control:F,jobEnv:`${F}/job.env`,cloudAccess:`${F}/cloud-access`,logs:`${F}/logs`,pin:`${F}/ws`}}function Y(j){return $.exec(j.replace(/\/+$/,""))?.[2]==="sessions"?"sessions":null}function D(j){return{kind:"managed",workspaceId:j,layout:"sessions"}}function R(j){let q=$.exec(j.replace(/\/+$/,""));if(!q)return null;try{let z=N(q[3],q[1],Y(j));return z.root===j.replace(/\/+$/,"")?z:null}catch{return null}}
3
- export{U as Kh,T as Lh,y as Mh,W as Nh,g as Oh,B as Ph,C as Qh,J as Rh,Z as Sh,L as Th,b as Uh,P as Vh,x as Wh,M as Xh,H as Yh,$ as Zh,A as _h,N as $h,Y as ai,D as bi,R as ci};
3
+ export{U as Nh,T as Oh,y as Ph,W as Qh,g as Rh,B as Sh,C as Th,J as Uh,Z as Vh,L as Wh,b as Xh,P as Yh,x as Zh,M as _h,H as $h,$ as ai,A as bi,N as ci,Y as di,D as ei,R as fi};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Fh as J}from"./vm-hands-entry-lite-s64raarx.js";import{readFileSync as L}from"fs";import{isAbsolute as M,normalize as Q}from"path";var W="REASON_WORKER_DESKTOP_USER",G=null;function X(q,B){for(let I of B.split(`
2
+ import{Ih as J}from"./vm-hands-entry-lite-0nb9zkz1.js";import{readFileSync as L}from"fs";import{isAbsolute as M,normalize as Q}from"path";var W="REASON_WORKER_DESKTOP_USER",G=null;function X(q,B){for(let I of B.split(`
3
3
  `)){let j=I.split(":");if(j.length<7||Number(j[2])!==q||!/^\d+$/.test(j[2])||!/^\d+$/.test(j[3]))continue;let x=j[5];if(!/^[a-z_][a-z0-9_-]*$/i.test(j[0])||!M(x)||Q(x)!==x||x==="/")return null;return{username:j[0],uid:q,gid:Number(j[3]),home:x}}return null}function b(q={}){let B="value"in q?q.value:process.env[W];if(G=null,B===void 0||B==="")return null;let I=q.platform??process.platform,j="euid"in q?q.euid:process.geteuid?.(),x=/^[1-9]\d{0,9}$/.test(B)?Number(B):NaN,C=I==="linux"&&j===0&&Number.isSafeInteger(x)?X(x,(q.passwd??(()=>L("/etc/passwd","utf8")))()):null;if(!C||C.gid===0)throw Error("worker_desktop_user_invalid");return G=C,C}function k(){return G}function y(){return G?.home??J()}
4
- export{W as Se,X as Te,b as Ue,k as Ve,y as We};
4
+ export{W as Ve,X as We,b as Xe,k as Ye,y as Ze};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./vm-hands-entry-lite-3dx1yqhd.js";import"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import{qi as A}from"./vm-hands-entry-lite-px64jhhn.js";import{readFileSync as J}from"fs";var G=performance.now();delete process.env.BUN_BE_BUN;var q=(j,b={})=>console.log(JSON.stringify({stage:j,ms:Math.round(performance.now()),...b}));async function K(){if(process.argv.includes("--vm-hands-op-runner")){let{runVmHandsOpRunner:D}=await import("./vm-hands-op-runner-cxytfman.js");await D();return}q("parsed",{t0:Math.round(G)});let j="";try{j=J(3,"utf8")}catch{}q("fd3_read",{bytes:j.length});let b=null;if(j.trim())try{b=JSON.parse(j)}catch{b=null}if(!b||typeof b!=="object"||Array.isArray(b))q(j.trim()?"identity_invalid":"identity_free"),await new Promise(()=>{setInterval(()=>{return},1073741824)});let{parseVmHandsInit:B,runVmHands:C}=await import("./vm-hands-runtime-8eq6jwht.js"),z=B(b);if(!z)q("identity_invalid"),await new Promise(()=>{setInterval(()=>{return},1073741824)});await C(z,q),process.exit(0)}K();
2
+ import"./vm-hands-entry-lite-gbekj59z.js";import"./vm-hands-entry-lite-723q0mmr.js";import"./vm-hands-entry-lite-samn6qm5.js";import{ti as A}from"./vm-hands-entry-lite-9n6m4qgf.js";import{readFileSync as J}from"fs";var G=performance.now();delete process.env.BUN_BE_BUN;var q=(j,b={})=>console.log(JSON.stringify({stage:j,ms:Math.round(performance.now()),...b}));async function K(){if(process.argv.includes("--vm-hands-op-runner")){let{runVmHandsOpRunner:D}=await import("./vm-hands-op-runner-430cgtn6.js");await D();return}q("parsed",{t0:Math.round(G)});let j="";try{j=J(3,"utf8")}catch{}q("fd3_read",{bytes:j.length});let b=null;if(j.trim())try{b=JSON.parse(j)}catch{b=null}if(!b||typeof b!=="object"||Array.isArray(b))q(j.trim()?"identity_invalid":"identity_free"),await new Promise(()=>{setInterval(()=>{return},1073741824)});let{parseVmHandsInit:B,runVmHands:C}=await import("./vm-hands-runtime-4tb05b3m.js"),z=B(b);if(!z)q("identity_invalid"),await new Promise(()=>{setInterval(()=>{return},1073741824)});await C(z,q),process.exit(0)}K();
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as Tq}from"./vm-hands-entry-lite-thtd61xk.js";import{$a as Lq,Fb as Uq,Ha as Bq,Jb as Fq}from"./vm-hands-entry-lite-n0j2t2eb.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-5n6vc7je.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-983czfdb.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.js";import{spawn as Cq}from"child_process";import{chmodSync as Iq,chownSync as vq,existsSync as c,lstatSync as i,mkdirSync as o,mkdtempSync as Oq,readdirSync as s,readFileSync as P,realpathSync as bq,rmdirSync as e,rmSync as hq,writeFileSync as m}from"fs";import{join as F}from"path";var Mq="/sys/fs/cgroup/reason-payload",H="vm-hands",xq="/run/ara-srt/fallbacks.jsonl",E="/reason-person",r=5000,Vq=1e4,Qq="__VM_HANDS_PROOF_DIR__",_q="__VM_HANDS_PROBE_NONCE__";class M extends Error{code;constructor(q,Q){super(Q);this.code=q}}function Hq(q,Q){if(!/^[0-9a-f-]{36}$/i.test(Q))throw new M("vm_hands_bind_invalid","bad bind id");return F(q,H,`b-${Q.toLowerCase()}`)}var gq=5000,wq=(q)=>`'${q.replaceAll("'","'\\''")}'`;function dq(q){let Q=q.cgroup??Mq,J=q.init.layout.payload_uid,X=q.log??(()=>{}),G=new Map,z=new Map,K=0,C=()=>{try{let Z=P("/run/ara-srt/starts.jsonl","utf8"),$=Z.slice(K>Z.length?0:K).split(`
2
+ import{a as Tq}from"./vm-hands-entry-lite-h9jdthmf.js";import{$a as Lq,Fb as Uq,Ha as Bq,Jb as Fq}from"./vm-hands-entry-lite-me8b4f14.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-6cj7s7rc.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-723q0mmr.js";import"./vm-hands-entry-lite-samn6qm5.js";import"./vm-hands-entry-lite-z59ar4qz.js";import"./vm-hands-entry-lite-efvwgjhe.js";import"./vm-hands-entry-lite-d17bx1yc.js";import"./vm-hands-entry-lite-bbezym6j.js";import"./vm-hands-entry-lite-png3h0cm.js";import"./vm-hands-entry-lite-0nb9zkz1.js";import"./vm-hands-entry-lite-ytmcecfr.js";import"./vm-hands-entry-lite-cag8nazq.js";import"./vm-hands-entry-lite-y4nntb2w.js";import"./vm-hands-entry-lite-9n6m4qgf.js";import{spawn as Cq}from"child_process";import{chmodSync as Iq,chownSync as vq,existsSync as c,lstatSync as i,mkdirSync as o,mkdtempSync as Oq,readdirSync as s,readFileSync as P,realpathSync as bq,rmdirSync as e,rmSync as hq,writeFileSync as m}from"fs";import{join as F}from"path";var Mq="/sys/fs/cgroup/reason-payload",H="vm-hands",xq="/run/ara-srt/fallbacks.jsonl",E="/reason-person",r=5000,Vq=1e4,Qq="__VM_HANDS_PROOF_DIR__",_q="__VM_HANDS_PROBE_NONCE__";class M extends Error{code;constructor(q,Q){super(Q);this.code=q}}function Hq(q,Q){if(!/^[0-9a-f-]{36}$/i.test(Q))throw new M("vm_hands_bind_invalid","bad bind id");return F(q,H,`b-${Q.toLowerCase()}`)}var gq=5000,wq=(q)=>`'${q.replaceAll("'","'\\''")}'`;function dq(q){let Q=q.cgroup??Mq,J=q.init.layout.payload_uid,X=q.log??(()=>{}),G=new Map,z=new Map,K=0,C=()=>{try{let Z=P("/run/ara-srt/starts.jsonl","utf8"),$=Z.slice(K>Z.length?0:K).split(`
3
3
  `).filter(Boolean);K=Z.length;let W=$.map((T)=>{try{return Number(JSON.parse(T).elapsed_ms)||0}catch{return 0}});if(W.length)X("vm_hands.srt_server_starts",{count:W.length,elapsed_ms:W.slice(0,8)})}catch{}},j=null,g=!1,h=q.srtCgroup??"/sys/fs/cgroup/reason-srt",I=()=>{j??=Wq()},x=0,V=()=>{try{let Z=P(xq,"utf8"),$=Z.slice(x>Z.length?0:x);x=Z.length;let W=$.split(`
4
4
  `).filter(Boolean).slice(0,1000);if(!W.length)return null;let T={},L=0;for(let w of W)try{let R=JSON.parse(w),B=typeof R.code==="string"&&/^[a-z_]{1,40}$/.test(R.code)?R.code:"other";if(T[B]=(T[B]??0)+1,typeof R.elapsed_ms==="number")L=Math.max(L,R.elapsed_ms)}catch{T.unparsed=(T.unparsed??0)+1}return X("vm_hands.srt_fallbacks",{count:W.length,codes:T,max_elapsed_ms:L}),{count:W.length,codes:T,max_elapsed_ms:L}}catch{return null}},f=!1,u=(Z,$,W)=>{if(f)throw Error("vm_hands_pool_held");return jq(Z,$,W)},d=(Z)=>($,W,T)=>Cq("/bin/sh",["-c",`echo $$ > ${wq(F(Z,"cgroup.procs"))} || exit 125; exec "$@"`,"vm-hands-join",$,...W],T),jq=d(F(Q,H)),l=F(Q,H,"probe"),S=(Z)=>Hq(Q,Z),Nq=(Z)=>{let $=S(Z);try{o($,{mode:493})}catch(W){if(!(W&&typeof W==="object"&&("code"in W)&&W.code==="EEXIST"))throw new M("vm_hands_bind_failed","bind cgroup")}return $},Aq=(Z)=>{try{e(S(Z))}catch{}},_=q.prespawn?Lq({spawnProcess:u,...q.relayDependencies?.sourceEntrypoint?{sourceEntrypoint:q.relayDependencies.sourceEntrypoint}:{},log:(Z,$)=>X(Z,$??{})}):null;_?.arm();let n=_?setInterval(()=>{_.arm()},gq):null;n?.unref?.();async function a(Z){let $=G.get(Z);if(G.delete(Z),!$)return;$.abort.abort(),await $.done}return{bindCgroup:S,async startExecutor(Z){if(I(),z.set(Z.bindId,Wq()),g=!0,!Z.claim)throw new M("vm_hands_bind_invalid","an executor needs the claim it serves");await a(Z.bindId);let{claim:$,bindId:W}=Z,T=Nq(W),L=$.owner;if(!L||typeof L.device_id!=="string"||typeof $.root_id!=="string")throw new M("vm_hands_bind_invalid","claim without its owner Device or root");let w=new AbortController,R,B,N=new Promise((Y,A)=>{R=Y,B=A}),v,D=new Promise((Y)=>{v=Y}),O=Fq({headless:!0,hostExecution:!0,runtimeDirectory:q.runtimeDirectory,deviceIdentity:{deviceId:L.device_id,rootId:$.root_id,apiOrigin:q.apiOrigin},claimOwner:$.owner,root:q.root,runId:$.run_id,operationId:$.operation_id,attemptId:$.attempt_id,payload:Object.fromEntries(Object.entries($.payload).filter(([Y])=>!Y.startsWith("vm_hands_"))),signal:w.signal,emitEvent:async(Y,A)=>{if(Y==="hands.ready"){R(A);return}if(Y==="hands.started"||Y==="hands.stopped"||Y==="hands.failed")return;await q.forward(W,Y,A)}},{...q.relayDependencies,spawnWorker:(Y)=>d(T)(Y.command,Y.args,Y.options),..._?{takePrespawnedWorker:(Y)=>{let A=_.take(Y);if(!A?.pid)return A;try{return m(F(T,"cgroup.procs"),String(A.pid)),A}catch{try{A.kill("SIGKILL")}catch{}return null}},adoptSpawnedWorker:_.adopt}:{}}).then(()=>{v("executor_stopped")},(Y)=>{let A=Y&&typeof Y==="object"&&"code"in Y?String(Y.code):"executor_failed";B(new M(A,Y instanceof Error?Y.message:String(Y))),v(A)}).finally(()=>B(new M("vm_hands_executor_exited","executor ended before it was ready")));G.set(W,{abort:w,done:O,exited:D,operationId:$.operation_id,runId:$.run_id,expiresAtMs:Date.parse(String($.payload.expires_at??""))||0});let y=await N,U=y.executor_launch_id;if(typeof U!=="string")throw new M("vm_hands_bind_failed","executor ready without a launch id");return{launchId:U,readyData:y,applied:{hands_confinement:typeof $.payload.hands_confinement==="string"?$.payload.hands_confinement:null,browser_egress:$.payload.browser_egress??null}}},takeSrtFallbacks:V,executorExited(Z){return G.get(Z)?.exited??new Promise(()=>{})},freezeBind(Z){let $=S(Z);if(c(F($,"cgroup.freeze")))m(F($,"cgroup.freeze"),"1")},async killAndVerifyPayload(Z){let $=new Set(Z?.keep??[]);if($.size)return Pq(Z?.bindId??null,$);f=!0;let W=Jq();try{await Kq();let T=Promise.all([...G.keys()].map((B)=>a(B).catch(()=>{return})));C();let L=Date.now()+r;await p(Q,L,"payload"),await T;let w=(g||q.srtWarmLate?.()===!0)&&c(F(h,"cgroup.events"));if(w)await p(h,L,"srt");let R=Xq(J).filter((B)=>!b(B,E));if(j!==null){let B=qq(j).filter((N)=>N!==process.pid&&!b(N,E));if(B.length)throw X("vm_hands.kill_strays",{strays:B.slice(0,16).map((N)=>{let v="?",D="?";try{v=P(`/proc/${N}/comm`,"utf8").trim().slice(0,32)}catch{}try{D=(P(`/proc/${N}/cgroup`,"utf8").split(`
5
5
  `).find((O)=>O.startsWith("0::"))??"").slice(3,80)}catch{}return{pid:N,comm:v,cgroup:D}})}),new M("vm_hands_kill_unverified",`${B.length} process(es) the run started survived it`);j=null}if(g=!1,w)q.onSrtReset?.();if(R.length)throw X("vm_hands.kill_survivors",{pids:R.slice(0,16)}),new M("vm_hands_kill_unverified",`${R.length} payload-uid process(es) outside the payload cgroup`);z.clear();for(let B of $q())try{e(F(Q,H,B))}catch{}}finally{f=!1,W()}if(_)setTimeout(()=>{if(!G.size)_.arm()},100).unref?.()},async killProbe(){let Z=Date.now()+r;if(c(F(l,"cgroup.events"))){await p(l,Z,"probe");try{e(l)}catch{}}let $=Zq(process.pid);if($===null)throw new M("vm_hands_kill_unverified","agent start time unreadable");await Sq(Q,$,Z);let W=(L)=>{let w=Zq(L);return w!==null&&w<=$},T=Xq(J).filter((L)=>W(L)&&!b(L,E));if(T.length)throw X("vm_hands.kill_survivors",{pids:T.slice(0,16),at:"attest"}),new M("vm_hands_kill_unverified",`${T.length} payload-uid process(es) from before this agent`);if(j!==null){let L=[Q,F(Q,H)].map((B)=>B.replace(/^\/sys\/fs\/cgroup/,"")),w=h.replace(/^\/sys\/fs\/cgroup/,""),R=qq(j).filter((B)=>B!==process.pid&&!b(B,E)&&!b(B,"/reason-vm-hands")&&!b(B,w)&&!L.some((N)=>zq(B,N)));if(R.length)throw X("vm_hands.kill_strays",{strays:R.slice(0,16).map((B)=>({pid:B})),at:"attest"}),new M("vm_hands_kill_unverified",`${R.length} process(es) the probe started survived it`);j=null}},async runProbe({nonce:Z,script:$}){if(I(),!$.includes(Qq))throw new M("vm_hands_probe_failed","probe names no proof directory");let W=q.proofParent??"/tmp/reason-vm-hands-proof";o(W,{mode:457,recursive:!0});let T=i(W);if(T.isSymbolicLink()||!T.isDirectory()||T.uid!==(process.getuid?.()??-1)||(T.mode&4095)!==457)throw new M("vm_hands_probe_failed","proof parent is not root's 0711 directory");let L=Oq(F(W,"p-")),w=!1;try{if(!/^[A-Za-z0-9/._-]+$/.test(L)||!/^[A-Za-z0-9_-]{1,128}$/.test(Z))throw new M("vm_hands_probe_failed","proof directory path or nonce");vq(L,J,J),Iq(L,448);let R=i(L).ino;try{o(l,{mode:493})}catch(D){if(!(D&&typeof D==="object"&&("code"in D)&&D.code==="EEXIST"))throw new M("vm_hands_probe_failed","probe cgroup")}let B=d(l)("/bin/bash",["-c",$.replaceAll(Qq,L).replaceAll(_q,Z)],{cwd:"/",env:{PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},stdio:["ignore","pipe","ignore"]}),N="";B.stdout?.on("data",(D)=>{if(N.length<16384)N+=D.toString("utf8").slice(0,16384-N.length)});let v=await new Promise((D)=>{let O=setTimeout(()=>{w=!0,B.kill("SIGKILL"),D(124)},Vq);B.once("error",()=>{clearTimeout(O),D(127)}),B.once("close",(y)=>{clearTimeout(O),D(y??1)})});return X("vm_hands.probe",{nonce_len:Z.length,exit_code:v}),{exitCode:v,markers:N,proofDirInode:R}}finally{if(!w)hq(L,{recursive:!0,force:!0})}},restatLayout(){let{session_root:Z,alias:$}=q.init.layout,W="invalid";try{Uq(Z),W="0:0:755"}catch{}let T=!1,L=-1;try{let w=i($);L=w.uid,T=W==="0:0:755"&&$===F(Z,"repo")&&!w.isSymbolicLink()&&w.isDirectory()&&bq($)===$&&w.uid===J}catch{}return{root_mode:W,alias_ok:T,owner_uid:L}},installEnvironment(Z,$){let W=G.get(Z);if(!W)throw new M("environment_unavailable","no executor owns an environment");return Bq({root:q.root,operationId:W.operationId,payload:$}).installed_revision},async stop(){if(n)clearInterval(n);_?.close(),await Promise.all([...G.keys()].map((Z)=>a(Z)))}};function $q(){try{return s(F(Q,H),{withFileTypes:!0}).filter((Z)=>Z.isDirectory()&&/^b-[0-9a-f-]{36}$/.test(Z.name)).map((Z)=>Z.name)}catch{return[]}}async function Pq(Z,$){let W=new Set([...$].map((L)=>L.toLowerCase())),T=Jq();try{await Kq();let L=Date.now()+r,w=new Set($q().filter((U)=>!W.has(U.slice(2))).map((U)=>U.slice(2)));if(Z)w.add(Z.toLowerCase());let R=null;for(let U of w){let Y=a(U).catch(()=>{return}),A=z.get(U);if(A!==void 0)R=R===null?A:Math.min(R,A);if(c(F(S(U),"cgroup.events")))await p(S(U),L,"bind");await Y}let B=[...W].map((U)=>S(U).replace(/^\/sys\/fs\/cgroup/,"")),N=[Q,F(Q,H)].map((U)=>U.replace(/^\/sys\/fs\/cgroup/,"")),v=h.replace(/^\/sys\/fs\/cgroup/,""),D=(U)=>b(U,E)||B.some((Y)=>b(U,Y)),O=Xq(J).filter((U)=>!D(U));if(O.length)throw X("vm_hands.kill_survivors",{pids:O.slice(0,16),beside:W.size}),new M("vm_hands_kill_unverified",`${O.length} payload-uid process(es) outside a live bind`);let y=(U)=>!D(U)&&!b(U,"/reason-vm-hands")&&!b(U,v)&&!N.some((Y)=>zq(U,Y));if(R!==null){let U=qq(R).filter((Y)=>Y!==process.pid&&y(Y));if(U.length)throw X("vm_hands.kill_strays",{strays:U.slice(0,16).map((Y)=>({pid:Y})),beside:W.size}),new M("vm_hands_kill_unverified",`${U.length} process(es) the run started survived it`)}for(let U of w)z.delete(U),Aq(U)}finally{T()}}}function Zq(q,Q="/proc"){try{let J=P(F(Q,String(q),"stat"),"utf8"),X=Number(J.slice(J.lastIndexOf(")")+2).split(" ")[19]);return Number.isFinite(X)?X:null}catch{return null}}function kq(q,Q="/proc"){try{let J=P(F(Q,String(q),"stat"),"utf8"),X=Number(J.slice(J.lastIndexOf(")")+2).split(" ")[1]);return Number.isFinite(X)?X:null}catch{return null}}async function Sq(q,Q,J){try{m(F(q,"cgroup.freeze"),"1")}catch(X){throw new M("vm_hands_kill_unverified",`payload cgroup.freeze: ${X instanceof Error?X.message:String(X)}`)}try{for(;;){let X=fq(q).filter((z)=>Rq(z,q)),G=new Set(X.filter((z)=>{let K=Zq(z);return K!==null&&K<=Q}));for(let z=!0;z;){z=!1;for(let K of X){if(G.has(K))continue;let C=kq(K);if(C!==null&&G.has(C))G.add(K),z=!0}}if(G.size===0)return;if(Date.now()>J)throw new M("vm_hands_kill_unverified",`${G.size} previous-boot process(es) survived`);for(let z of G)try{process.kill(z,"SIGKILL")}catch{}await new Promise((z)=>setTimeout(z,10))}}finally{try{m(F(q,"cgroup.freeze"),"0")}catch{}}}function zq(q,Q,J="/proc"){try{return P(F(J,String(q),"cgroup"),"utf8").split(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{a,b,c}from"./vm-hands-entry-lite-h9jdthmf.js";import"./vm-hands-entry-lite-y4nntb2w.js";import"./vm-hands-entry-lite-9n6m4qgf.js";export{b as spawnSessionPty,c as runVmHandsOpRunner,a as VM_HANDS_OP_RUNNER_PERSON_ARG};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{M as k,N as m,O as l}from"./vm-hands-entry-lite-3dx1yqhd.js";import{qd as v}from"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import{qi as G}from"./vm-hands-entry-lite-px64jhhn.js";import{spawn as a}from"child_process";import{createHash as t}from"crypto";import{lstatSync as w,mkdirSync as s,readFileSync as i,statSync as e,writeFileSync as d}from"fs";var P="/run/reason-vm-hands",O="/run/reason-vm-hands/env",T="/home/runner/.reason/workspace",jj=/^https:\/\/[a-z0-9.-]+(?::\d{1,5})?$/,S="/sys/fs/cgroup/reason-srt",p="/usr/local/bin/ara-srt-exec",qj=65536,Jj=21600000;function Qj(Q,j="/run/ara-srt"){try{if((process.getuid?.()??-1)!==0)return;s(j,{recursive:!0,mode:448});let J=w(j);if(!J.isDirectory()||J.uid!==0||(J.mode&63)!==0){Q("srt_base_keyed_skipped",{reason:"socket_dir_unsafe"});return}d(`${j}/base-keyed`,`1
3
- `,{mode:420}),Q("srt_base_keyed",{})}catch{Q("srt_base_keyed_skipped",{reason:"error"})}}function R(Q,j){let J=(F)=>{return j("srt_warm_skipped",{reason:F}),Promise.resolve()};if(typeof Q.srt_base_settings!=="string")return J("no_settings");let Z=Buffer.from(Q.srt_base_settings,"base64");if(Z.length===0||Z.length>qj||Z.toString("base64")!==Q.srt_base_settings)return J("settings_invalid");try{let F=w(S);if(!F.isDirectory()||F.uid!==0||(F.mode&18)!==0)return J("cgroup_unsafe");for(let[H,g]of[[p,!1],["/usr/local/bin",!0]]){let Y=w(H);if((g?!Y.isDirectory():!Y.isFile())||Y.uid!==0||(Y.mode&18)!==0)return J("srt_exec_unsafe")}}catch{return J("cgroup_or_exec_missing")}if((process.getuid?.()??-1)!==0)return J("not_root");let X=performance.now(),z=t("sha256").update(Z).digest("hex"),W=`${P}/srt-base-settings.json`;try{d(W,Z,{mode:384,flag:"w"})}catch{return J("settings_write")}let L=a("/bin/sh",["-c",`echo $$ > ${S}/cgroup.procs || exit 125; exec "$@"`,"vm-hands-srt",p,"--settings",W,"--idle-ms",String(Jj),"--","/bin/true"],{cwd:"/",env:{PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},stdio:"ignore"});return new Promise((F)=>{L.once("error",()=>{j("srt_warm_failed",{reason:"spawn"}),F()}),L.once("close",(H)=>{j(H===0?"srt_warm_done":"srt_warm_failed",{exit_code:H,warm_ms:Math.round(performance.now()-X),settings_sha256:z}),F()})})}var u=3000;function Lj(Q){if(!Q||typeof Q!=="object"||Array.isArray(Q))return null;let j=Q,J=j.layout,Z=j.device_key,X=j.credential;return typeof j.workspace_id==="string"&&Number.isSafeInteger(j.instance_generation)&&typeof j.api_origin==="string"&&jj.test(j.api_origin)&&typeof j.manifest_digest==="string"&&!!X&&typeof X.key_id==="string"&&Number.isSafeInteger(X.expires_at_ms)&&typeof X.signature==="string"&&!!J&&typeof J.session_root==="string"&&typeof J.alias==="string"&&Number.isSafeInteger(J.payload_uid)&&typeof J.kind==="string"&&!!Z&&typeof Z.pkcs8==="string"&&typeof Z.spki==="string"?j:null}function y(Q){s(Q,{recursive:!0,mode:448});let j=e(Q);if(!j.isDirectory()||(j.mode&63)!==0||j.uid!==(process.getuid?.()??-1))throw Error(`vm_hands_runtime_directory_unsafe: ${Q}`)}async function Zj(Q){let[{CLI_VERSION:j},J,Z,X]=await Promise.all([import("./version-zrj419tq.js"),import("./hands-worker-source-tc1snvve.js"),import("./network-contract-qxn4pg15.js"),import("./device-workspace-nqxczwd3.js")]),{REASON_HANDS_PROTOCOL_VERSION:z}=await import("./reason-hands-protocol-n14gyf7k.js");return{reason_runtime_version:j,bridge_version:j,protocol_version:v,execution_eligible:!0,instance_generation:Q.instance_generation,capabilities:{supported_operations:["hands.connect"],hands_worker_artifact_sha256:J.REASON_HANDS_WORKER_ARTIFACT_SHA256,hands_worker_entrypoint:J.REASON_HANDS_WORKER_ENTRYPOINT,hands_slots:1,max_payload_bytes:Z.LOCAL_OPERATION_MAX_BYTES,max_result_bytes:Z.LOCAL_OPERATION_MAX_BYTES,operation_constraints:{"hands.connect":{ready:!0,execution_mode:"host",transport:"wss_relay",worker:"ara_hands",slots:1,session_group:Z.HANDS_SESSION_GROUP,worker_version:J.REASON_HANDS_WORKER_VERSION,protocol_version:z,worker_artifact_sha256:J.REASON_HANDS_WORKER_ARTIFACT_SHA256,worker_entrypoint:J.REASON_HANDS_WORKER_ENTRYPOINT,policy_mode:"full_access",policy_version:1,workspace_base:X.REASON_WORKSPACE_BASE,workspace_layout:X.SESSION_WORKSPACE_LAYOUT,browser_state:"optional_headless",desktop:!1,max_session_ms:43200000,environment_delivery:Z.HANDS_ENVIRONMENT_DELIVERY,[Z.HANDS_ENVIRONMENT_AT_CLAIM_KEY]:Z.HANDS_ENVIRONMENT_AT_CLAIM,[Z.HANDS_CLOUD_ACCESS_KEY]:Z.HANDS_CLOUD_ACCESS,[Z.HANDS_LARGE_ENVIRONMENT_KEY]:Z.HANDS_LARGE_ENVIRONMENT,[Z.HANDS_CONFINEMENT_KEY]:Z.HANDS_CONFINEMENT,[Z.HANDS_JOBS_USER_KEY]:Z.HANDS_JOBS_USER,vm_hands:"v1"}}}}}var V=["fs.read","fs.write","fs.export","fs.import","exec.run","exec.full","process.list","ports.list","pty.start","jobs.control","automation.call.v1"],$j=new Set(["pty.start","jobs.control"]);function Xj(Q,j){let J=j([{id:"vm-hands",label:"workspace",path:T,pathFingerprint:"0".repeat(64),permissions:{read:!0,write:!0,execute:!0,discover_environment:!0,expose_mcp:!1}}],{worker:{executionMode:"unsandboxed",readiness:Object.fromEntries(V.map((z)=>[z,!0]))}}),Z=Q.capabilities,X={...Z.operation_constraints};for(let z of V)X[z]={...J.operation_constraints?.[z]??{},ready:!0,execution_mode:J.operation_constraints?.[z]?.execution_mode??"host"};return{...Q,capabilities:{...Z,supported_operations:["hands.connect",...V],operation_constraints:X}}}function zj(Q){for(let j of i("/etc/passwd","utf8").split(`
4
- `)){let J=j.split(":");if(J.length>=4&&Number(J[2])===Q&&/^\d+$/.test(J[3]??"")&&Number(J[3])>0)return Number(J[3])}throw Error("vm_hands_payload_account_unavailable")}function Fj(Q,j){let J=j.owner;if(!J||typeof J.organization_id!=="string"||typeof J.device_id!=="string"||typeof j.root_id!=="string")return null;return{version:4,apiOrigin:Q.api_origin,orgId:J.organization_id,deviceId:J.device_id,devicePublicKey:"",displayName:"vm-hands",registeredAt:new Date(0).toISOString(),handsSlots:1,roots:[{id:j.root_id,label:"workspace",path:T,pathFingerprint:"0".repeat(64),permissions:{read:!0,write:!0,execute:!0,discover_environment:!0,expose_mcp:!1}}]}}async function Mj(Q,j){y(P),y(O),Qj(j);let J=R(Q,j),Z=!1,X=async()=>{if(!await Promise.race([J.then(()=>!0),new Promise(($)=>setTimeout(()=>$(!1),u).unref?.())]))Z=!0,j("srt_warm_late",{wait_ms:u})},[{configureDesktopAccount:z},{configureWorkerSandbox:W}]=await Promise.all([import("./desktop-account-a16gh9sj.js"),import("./worker-sandbox-1m0s1vnq.js")]);W();try{z({value:String(Q.layout.payload_uid)})}catch{j("payload_account_unavailable"),await new Promise(()=>{setInterval(()=>{return},1073741824)})}let L=new AbortController;for(let q of["SIGTERM","SIGINT"])process.on(q,()=>L.abort());let F=new Map,H,g=new Promise((q)=>{H=q}),Y=g.then(()=>import("./vm-hands-executor-bk5c02sn.js")).then(({createVmHandsExecutor:q})=>{let $=q({init:Q,root:T,runtimeDirectory:P,apiOrigin:Q.api_origin,prespawn:!0,onSrtReset:()=>{Z=!1,J=R(Q,j)},srtWarmLate:()=>Z,forward:(B,K,N)=>F.get(B)?.(K,N)??Promise.reject(Error("vm_hands_not_bound")),log:(B,K)=>j(B,K)});return j("executor_loaded"),$}),A=(q)=>async(...$)=>(await Y)[q](...$),C=null;Y.then((q)=>{C=($)=>q.executorExited($)});let M={startExecutor:async(...q)=>{return await X(),A("startExecutor")(...q)},killAndVerifyPayload:A("killAndVerifyPayload"),killProbe:A("killProbe"),runProbe:async(...q)=>{return await X(),A("runProbe")(...q)},restatLayout:()=>{throw Error("replaced below")},installEnvironment:()=>{throw Error("replaced below")},executorExited:(q)=>C?C(q):new Promise(()=>{}),takeSrtFallbacks:()=>null};Y.then((q)=>{M.restatLayout=()=>q.restatLayout(),M.installEnvironment=($,B)=>q.installEnvironment($,B),M.freezeBind=($)=>q.freezeBind($),M.takeSrtFallbacks=()=>q.takeSrtFallbacks?.()??null});let c=await k(Q),o=new m(Q,c,M,{envRoot:O}),h=Zj(Q),b=null,n=Promise.all([h,import("./local-capabilities-95a5rydg.js")]).then(([q,$])=>{b=Xj(q,$.capabilityInventoryForRoots),j("device_ops_loaded")}).catch((q)=>j("device_ops_unavailable",{error:q instanceof Error?q.name:"error"})),f=g.then(()=>import("./vm-hands-executor-bk5c02sn.js")).then(({createVmHandsOpRunners:q,vmHandsBindCgroup:$,VM_HANDS_PAYLOAD_CGROUP:B})=>q({payloadUid:Q.layout.payload_uid,payloadGid:zj(Q.layout.payload_uid),bindCgroup:(K)=>$(B,K),log:(K,N)=>j(K,N)})).catch(()=>null);f.then((q)=>q?.warm("person")),j("agent_ready"),await l({apiOrigin:Q.api_origin,agent:o,signal:L.signal,heartbeat:async()=>b??await h,executeOp:async({kind:q,claim:$,bindId:B,signal:K,emit:N})=>{let x=Fj(Q,$);if(!x)return{status:"failed",error_code:"vm_hands_bind_invalid"};let E={executionMode:"unsandboxed",runtimeDirectory:P,readiness:Object.fromEntries(V.map((U)=>[U,!0]))},_=(U)=>{let D=typeof U.kind==="string"?U.kind:"";if(D)N({kind:D,...U.data&&typeof U.data==="object"?{data:U.data}:{}})};if($.capability==="exec.full"&&q!=="person")return{status:"failed",error_code:"capability_not_granted"};if($.capability==="automation.call.v1"&&q!=="model")return{status:"failed",error_code:"capability_not_granted"};let r=$.capability==="pty.start"&&q==="person"&&!$.authority;if($j.has(String($.capability))&&!r){let{executeLocalOperation:U}=await import("./local-capabilities-95a5rydg.js");return U(x,$,{worker:E,signal:K,emit:(D)=>_(D)})}let I=await f;if(!I)return{status:"failed",error_code:"vm_hands_payload_account_unavailable"};return I.run(q,{id:String($.attempt_id),claim:$,state:x,worker:E},_,K,B)},readyData:({launchId:q})=>({executor_launch_id:q}),log:(q,$)=>{if(q==="vm_hands.registered"||q==="vm_hands.reconnected")H();j(q,$)},onTurn:(q,$)=>{if($)F.set(q,$);else F.delete(q)}}),await(await Y).stop(),(await f)?.stop()}export{R as startBaseSrtServer,Mj as runVmHands,Lj as parseVmHandsInit,Zj as heartbeatBody,Qj as enableBaseKeyedSrt};
2
+ import{M as k,N as m,O as l}from"./vm-hands-entry-lite-gbekj59z.js";import{sd as v}from"./vm-hands-entry-lite-723q0mmr.js";import"./vm-hands-entry-lite-samn6qm5.js";import{ti as G}from"./vm-hands-entry-lite-9n6m4qgf.js";import{spawn as a}from"child_process";import{createHash as t}from"crypto";import{lstatSync as w,mkdirSync as s,readFileSync as i,statSync as e,writeFileSync as d}from"fs";var P="/run/reason-vm-hands",O="/run/reason-vm-hands/env",T="/home/runner/.reason/workspace",jj=/^https:\/\/[a-z0-9.-]+(?::\d{1,5})?$/,S="/sys/fs/cgroup/reason-srt",p="/usr/local/bin/ara-srt-exec",qj=65536,Jj=21600000;function Qj(Q,j="/run/ara-srt"){try{if((process.getuid?.()??-1)!==0)return;s(j,{recursive:!0,mode:448});let J=w(j);if(!J.isDirectory()||J.uid!==0||(J.mode&63)!==0){Q("srt_base_keyed_skipped",{reason:"socket_dir_unsafe"});return}d(`${j}/base-keyed`,`1
3
+ `,{mode:420}),Q("srt_base_keyed",{})}catch{Q("srt_base_keyed_skipped",{reason:"error"})}}function R(Q,j){let J=(F)=>{return j("srt_warm_skipped",{reason:F}),Promise.resolve()};if(typeof Q.srt_base_settings!=="string")return J("no_settings");let Z=Buffer.from(Q.srt_base_settings,"base64");if(Z.length===0||Z.length>qj||Z.toString("base64")!==Q.srt_base_settings)return J("settings_invalid");try{let F=w(S);if(!F.isDirectory()||F.uid!==0||(F.mode&18)!==0)return J("cgroup_unsafe");for(let[H,g]of[[p,!1],["/usr/local/bin",!0]]){let Y=w(H);if((g?!Y.isDirectory():!Y.isFile())||Y.uid!==0||(Y.mode&18)!==0)return J("srt_exec_unsafe")}}catch{return J("cgroup_or_exec_missing")}if((process.getuid?.()??-1)!==0)return J("not_root");let X=performance.now(),z=t("sha256").update(Z).digest("hex"),W=`${P}/srt-base-settings.json`;try{d(W,Z,{mode:384,flag:"w"})}catch{return J("settings_write")}let L=a("/bin/sh",["-c",`echo $$ > ${S}/cgroup.procs || exit 125; exec "$@"`,"vm-hands-srt",p,"--settings",W,"--idle-ms",String(Jj),"--","/bin/true"],{cwd:"/",env:{PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},stdio:"ignore"});return new Promise((F)=>{L.once("error",()=>{j("srt_warm_failed",{reason:"spawn"}),F()}),L.once("close",(H)=>{j(H===0?"srt_warm_done":"srt_warm_failed",{exit_code:H,warm_ms:Math.round(performance.now()-X),settings_sha256:z}),F()})})}var u=3000;function Lj(Q){if(!Q||typeof Q!=="object"||Array.isArray(Q))return null;let j=Q,J=j.layout,Z=j.device_key,X=j.credential;return typeof j.workspace_id==="string"&&Number.isSafeInteger(j.instance_generation)&&typeof j.api_origin==="string"&&jj.test(j.api_origin)&&typeof j.manifest_digest==="string"&&!!X&&typeof X.key_id==="string"&&Number.isSafeInteger(X.expires_at_ms)&&typeof X.signature==="string"&&!!J&&typeof J.session_root==="string"&&typeof J.alias==="string"&&Number.isSafeInteger(J.payload_uid)&&typeof J.kind==="string"&&!!Z&&typeof Z.pkcs8==="string"&&typeof Z.spki==="string"?j:null}function y(Q){s(Q,{recursive:!0,mode:448});let j=e(Q);if(!j.isDirectory()||(j.mode&63)!==0||j.uid!==(process.getuid?.()??-1))throw Error(`vm_hands_runtime_directory_unsafe: ${Q}`)}async function Zj(Q){let[{CLI_VERSION:j},J,Z,X]=await Promise.all([import("./version-4cwn2qqp.js"),import("./hands-worker-source-gffxw6cf.js"),import("./network-contract-cg7j1pz9.js"),import("./device-workspace-kmdera1y.js")]),{REASON_HANDS_PROTOCOL_VERSION:z}=await import("./reason-hands-protocol-08mbrn5k.js");return{reason_runtime_version:j,bridge_version:j,protocol_version:v,execution_eligible:!0,instance_generation:Q.instance_generation,capabilities:{supported_operations:["hands.connect"],hands_worker_artifact_sha256:J.REASON_HANDS_WORKER_ARTIFACT_SHA256,hands_worker_entrypoint:J.REASON_HANDS_WORKER_ENTRYPOINT,hands_slots:1,max_payload_bytes:Z.LOCAL_OPERATION_MAX_BYTES,max_result_bytes:Z.LOCAL_OPERATION_MAX_BYTES,operation_constraints:{"hands.connect":{ready:!0,execution_mode:"host",transport:"wss_relay",worker:"ara_hands",slots:1,session_group:Z.HANDS_SESSION_GROUP,worker_version:J.REASON_HANDS_WORKER_VERSION,protocol_version:z,worker_artifact_sha256:J.REASON_HANDS_WORKER_ARTIFACT_SHA256,worker_entrypoint:J.REASON_HANDS_WORKER_ENTRYPOINT,policy_mode:"full_access",policy_version:1,workspace_base:X.REASON_WORKSPACE_BASE,workspace_layout:X.SESSION_WORKSPACE_LAYOUT,browser_state:"optional_headless",desktop:!1,max_session_ms:43200000,environment_delivery:Z.HANDS_ENVIRONMENT_DELIVERY,[Z.HANDS_ENVIRONMENT_AT_CLAIM_KEY]:Z.HANDS_ENVIRONMENT_AT_CLAIM,[Z.HANDS_CLOUD_ACCESS_KEY]:Z.HANDS_CLOUD_ACCESS,[Z.HANDS_LARGE_ENVIRONMENT_KEY]:Z.HANDS_LARGE_ENVIRONMENT,[Z.HANDS_CONFINEMENT_KEY]:Z.HANDS_CONFINEMENT,[Z.HANDS_JOBS_USER_KEY]:Z.HANDS_JOBS_USER,vm_hands:"v1"}}}}}var V=["fs.read","fs.write","fs.export","fs.import","exec.run","exec.full","process.list","ports.list","pty.start","jobs.control","automation.call.v1"],$j=new Set(["pty.start","jobs.control"]);function Xj(Q,j){let J=j([{id:"vm-hands",label:"workspace",path:T,pathFingerprint:"0".repeat(64),permissions:{read:!0,write:!0,execute:!0,discover_environment:!0,expose_mcp:!1}}],{worker:{executionMode:"unsandboxed",readiness:Object.fromEntries(V.map((z)=>[z,!0]))}}),Z=Q.capabilities,X={...Z.operation_constraints};for(let z of V)X[z]={...J.operation_constraints?.[z]??{},ready:!0,execution_mode:J.operation_constraints?.[z]?.execution_mode??"host"};return{...Q,capabilities:{...Z,supported_operations:["hands.connect",...V],operation_constraints:X}}}function zj(Q){for(let j of i("/etc/passwd","utf8").split(`
4
+ `)){let J=j.split(":");if(J.length>=4&&Number(J[2])===Q&&/^\d+$/.test(J[3]??"")&&Number(J[3])>0)return Number(J[3])}throw Error("vm_hands_payload_account_unavailable")}function Fj(Q,j){let J=j.owner;if(!J||typeof J.organization_id!=="string"||typeof J.device_id!=="string"||typeof j.root_id!=="string")return null;return{version:4,apiOrigin:Q.api_origin,orgId:J.organization_id,deviceId:J.device_id,devicePublicKey:"",displayName:"vm-hands",registeredAt:new Date(0).toISOString(),handsSlots:1,roots:[{id:j.root_id,label:"workspace",path:T,pathFingerprint:"0".repeat(64),permissions:{read:!0,write:!0,execute:!0,discover_environment:!0,expose_mcp:!1}}]}}async function Mj(Q,j){y(P),y(O),Qj(j);let J=R(Q,j),Z=!1,X=async()=>{if(!await Promise.race([J.then(()=>!0),new Promise(($)=>setTimeout(()=>$(!1),u).unref?.())]))Z=!0,j("srt_warm_late",{wait_ms:u})},[{configureDesktopAccount:z},{configureWorkerSandbox:W}]=await Promise.all([import("./desktop-account-a0tc6tgz.js"),import("./worker-sandbox-g70ryvcd.js")]);W();try{z({value:String(Q.layout.payload_uid)})}catch{j("payload_account_unavailable"),await new Promise(()=>{setInterval(()=>{return},1073741824)})}let L=new AbortController;for(let q of["SIGTERM","SIGINT"])process.on(q,()=>L.abort());let F=new Map,H,g=new Promise((q)=>{H=q}),Y=g.then(()=>import("./vm-hands-executor-wz80d281.js")).then(({createVmHandsExecutor:q})=>{let $=q({init:Q,root:T,runtimeDirectory:P,apiOrigin:Q.api_origin,prespawn:!0,onSrtReset:()=>{Z=!1,J=R(Q,j)},srtWarmLate:()=>Z,forward:(B,K,N)=>F.get(B)?.(K,N)??Promise.reject(Error("vm_hands_not_bound")),log:(B,K)=>j(B,K)});return j("executor_loaded"),$}),A=(q)=>async(...$)=>(await Y)[q](...$),C=null;Y.then((q)=>{C=($)=>q.executorExited($)});let M={startExecutor:async(...q)=>{return await X(),A("startExecutor")(...q)},killAndVerifyPayload:A("killAndVerifyPayload"),killProbe:A("killProbe"),runProbe:async(...q)=>{return await X(),A("runProbe")(...q)},restatLayout:()=>{throw Error("replaced below")},installEnvironment:()=>{throw Error("replaced below")},executorExited:(q)=>C?C(q):new Promise(()=>{}),takeSrtFallbacks:()=>null};Y.then((q)=>{M.restatLayout=()=>q.restatLayout(),M.installEnvironment=($,B)=>q.installEnvironment($,B),M.freezeBind=($)=>q.freezeBind($),M.takeSrtFallbacks=()=>q.takeSrtFallbacks?.()??null});let c=await k(Q),o=new m(Q,c,M,{envRoot:O}),h=Zj(Q),b=null,n=Promise.all([h,import("./local-capabilities-4v5p6yp3.js")]).then(([q,$])=>{b=Xj(q,$.capabilityInventoryForRoots),j("device_ops_loaded")}).catch((q)=>j("device_ops_unavailable",{error:q instanceof Error?q.name:"error"})),f=g.then(()=>import("./vm-hands-executor-wz80d281.js")).then(({createVmHandsOpRunners:q,vmHandsBindCgroup:$,VM_HANDS_PAYLOAD_CGROUP:B})=>q({payloadUid:Q.layout.payload_uid,payloadGid:zj(Q.layout.payload_uid),bindCgroup:(K)=>$(B,K),log:(K,N)=>j(K,N)})).catch(()=>null);f.then((q)=>q?.warm("person")),j("agent_ready"),await l({apiOrigin:Q.api_origin,agent:o,signal:L.signal,heartbeat:async()=>b??await h,executeOp:async({kind:q,claim:$,bindId:B,signal:K,emit:N})=>{let x=Fj(Q,$);if(!x)return{status:"failed",error_code:"vm_hands_bind_invalid"};let E={executionMode:"unsandboxed",runtimeDirectory:P,readiness:Object.fromEntries(V.map((U)=>[U,!0]))},_=(U)=>{let D=typeof U.kind==="string"?U.kind:"";if(D)N({kind:D,...U.data&&typeof U.data==="object"?{data:U.data}:{}})};if($.capability==="exec.full"&&q!=="person")return{status:"failed",error_code:"capability_not_granted"};if($.capability==="automation.call.v1"&&q!=="model")return{status:"failed",error_code:"capability_not_granted"};let r=$.capability==="pty.start"&&q==="person"&&!$.authority;if($j.has(String($.capability))&&!r){let{executeLocalOperation:U}=await import("./local-capabilities-4v5p6yp3.js");return U(x,$,{worker:E,signal:K,emit:(D)=>_(D)})}let I=await f;if(!I)return{status:"failed",error_code:"vm_hands_payload_account_unavailable"};return I.run(q,{id:String($.attempt_id),claim:$,state:x,worker:E},_,K,B)},readyData:({launchId:q})=>({executor_launch_id:q}),log:(q,$)=>{if(q==="vm_hands.registered"||q==="vm_hands.reconnected")H();j(q,$)},onTurn:(q,$)=>{if($)F.set(q,$);else F.delete(q)}}),await(await Y).stop(),(await f)?.stop()}export{R as startBaseSrtServer,Mj as runVmHands,Lj as parseVmHandsInit,Zj as heartbeatBody,Qj as enableBaseKeyedSrt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{t as a}from"./vm-hands-entry-lite-pqama7tv.js";import"./vm-hands-entry-lite-t2q10vjr.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-y4nntb2w.js";import"./vm-hands-entry-lite-9n6m4qgf.js";export{a as configureWorkerSandbox};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reason-machines/cli-linux-arm64-musl",
3
- "version": "0.2.336",
3
+ "version": "0.2.338",
4
4
  "description": "Reason CLI native binary for linux-arm64-musl",
5
5
  "os": [
6
6
  "linux"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{E as a,F as b,G as c,H as d,I as e,J as f}from"./vm-hands-entry-lite-feaxcj0x.js";import"./vm-hands-entry-lite-zgs6j8wj.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-px64jhhn.js";export{d as sessionPlace,c as sessionMachine,e as createMachineEnrollmentTicketWithToken,f as ReasonApi,b as REASONING_EFFORTS,a as ApiError};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{u as a,v as b,w as c,x as d,y as e}from"./vm-hands-entry-lite-dtcpbbkc.js";import"./vm-hands-entry-lite-feaxcj0x.js";import"./vm-hands-entry-lite-zgs6j8wj.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-px64jhhn.js";export{d as resolveApiCredentials,e as requireApiCredentials,b as explicitApiOrigin,c as environmentApiKey,a as apiOriginFromEnvironment};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l,s as m}from"./vm-hands-entry-lite-yr493k0q.js";import"./vm-hands-entry-lite-hj6jjk24.js";import"./vm-hands-entry-lite-dtcpbbkc.js";import"./vm-hands-entry-lite-feaxcj0x.js";import"./vm-hands-entry-lite-zgs6j8wj.js";import"./vm-hands-entry-lite-t36vzcw7.js";import"./vm-hands-entry-lite-n0j2t2eb.js";import"./vm-hands-entry-lite-7kzy7rxj.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-5n6vc7je.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-4b8f37q4.js";import"./vm-hands-entry-lite-9enw55fp.js";import"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-fpb440k0.js";import"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-k3cq8g9w.js";import"./vm-hands-entry-lite-ghav09mm.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-awwev9zg.js";import"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-983czfdb.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.js";export{g as runDisconnectCli,f as runConnectCli,m as restartConnectionWhenIdle,l as restartConnection,h as logoutConnection,k as connectionUsesUserChrome,i as connectionReport,j as connectionForBrowserExtension,c as connectionDirectory,d as computerDisconnected,e as addConnectionFolder,b as DISCONNECT_HELP,a as CONNECT_HELP};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ac as k,Bc as l,Cc as m,Dc as n,Ec as o,Fc as p,Gc as q,qc as a,rc as b,sc as c,tc as d,uc as e,vc as f,wc as g,xc as h,yc as i,zc as j}from"./vm-hands-entry-lite-4b8f37q4.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-px64jhhn.js";export{q as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,p as customEndpointDeviceFailureMessage,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,g as CUSTOM_ENDPOINT_DEVICE_SAFE_HEADERS,c as CUSTOM_ENDPOINT_DEVICE_MAX_RESPONSE_BYTES,d as CUSTOM_ENDPOINT_DEVICE_MAX_CHUNKS,e as CUSTOM_ENDPOINT_DEVICE_MAX_BODY_BYTES,n as CUSTOM_ENDPOINT_DEVICE_FAILURE_CODES,b as CUSTOM_ENDPOINT_DEVICE_CHUNK_BYTES,a as CUSTOM_ENDPOINT_DEVICE_CAPABILITY};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Se as a,Te as b,Ue as c,Ve as d,We as e}from"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-px64jhhn.js";export{b as passwdAccount,e as desktopHome,d as desktopAccount,c as configureDesktopAccount,a as DESKTOP_USER_ENV};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$c as d,Yc as a,Zc as b,_c as c,ad as e,bd as f,cd as g,dd as h,ed as i,fd as j,gd as k,hd as l}from"./vm-hands-entry-lite-9enw55fp.js";import"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-fpb440k0.js";import"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-k3cq8g9w.js";import"./vm-hands-entry-lite-ghav09mm.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-awwev9zg.js";import"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-983czfdb.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.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{ea as c,fa as d,ga as e,ha as f,ia as g,ja as h,ka as i,la as j,ma as k,na as l,oa as m,pa as n,qa as o,ra as p,sa as q,ta as r,ua as s,va as t,wa as u}from"./vm-hands-entry-lite-t36vzcw7.js";import"./vm-hands-entry-lite-n0j2t2eb.js";import"./vm-hands-entry-lite-7kzy7rxj.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-5n6vc7je.js";import{oc as b}from"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-4b8f37q4.js";import"./vm-hands-entry-lite-9enw55fp.js";import"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-fpb440k0.js";import"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-k3cq8g9w.js";import"./vm-hands-entry-lite-ghav09mm.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-awwev9zg.js";import"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-983czfdb.js";import{ki as a}from"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.js";export{g as spawnCaptured,f as sandboxProfile,e as safeEnvironment,k as runTransferCapability,i as runFileCapability,t as rebindLocalHandsControl,j as localGithubPreviewServerLaunch,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{di as a,ei as b,fi as c,gi as d,hi as e,ii as f,ji as g}from"./vm-hands-entry-lite-983czfdb.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.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{Hf as a,If as b,Jf as c,Kf as d,Lf as e,Mf as f,Nf as g}from"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.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{Ke as a,Le as b,Me as c,Ne as d,Oe as e,Pe as f,Qe as g,Re as h}from"./vm-hands-entry-lite-fpb440k0.js";import"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-k3cq8g9w.js";import"./vm-hands-entry-lite-ghav09mm.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-awwev9zg.js";import"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-983czfdb.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.js";export{h as runLocalDisplayStream,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{Of as a,Pf as b,Qf as c,Rf as d,Sf as e,Tf as f,Uf as g,Vf as h,Wf as i,Xf as j}from"./vm-hands-entry-lite-awwev9zg.js";import"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-mm72ht4e.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.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{$d as L,Ad as k,Bd as l,Cd as m,Dd as n,Ed as o,Fd as p,Gd as q,Hd as r,Id as s,Jd as t,Kd as u,Ld as v,Md as w,Nd as x,Od as y,Pd as z,Qd as A,Rd as B,Sd as C,Td as D,Ud as E,Vd as F,Wd as G,Xd as H,Yd as I,Zd as J,_d as K,ae as M,be as N,ce as O,de as P,ee as Q,fe as R,ge as S,he as T,ie as U,je as V,ke as W,le as X,me as Y,ne as Z,oe as _,pe as $,qd as a,qe as aa,rd as b,re as ba,sd as c,se as ca,td as d,te as da,ud as e,ue as ea,vd as f,ve as fa,wd as g,xd as h,yd as i,zd as j}from"./vm-hands-entry-lite-9k57wmkv.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-px64jhhn.js";export{Y as parseLocalRuntimeRootsSyncResponse,U as parseLocalRuntimeRegistrationResponse,T as parseLocalRuntimeProofChallenge,ca as parseLocalRuntimeOperationHeartbeatResponse,da as parseLocalRuntimeOperationEventsResponse,ea as parseLocalRuntimeOperationEnvironmentResponse,fa as parseLocalRuntimeOperationCompletionResponse,ba as parseLocalRuntimeOperationClaim,$ as parseLocalRuntimeLocalSubscriptionResponse,aa as parseLocalRuntimeLifecycleResponse,Z as parseLocalRuntimeIdentityResponse,W as parseLocalRuntimeHeartbeatResponse,X as parseLocalRuntimeFirstHeartbeat,S as parseLocalRuntimeErrorEnvelope,V as parseLocalRuntimeEnrollmentResponse,_ as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,R as buildLocalRuntimeDeviceProofBytes,I as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,N 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,O as LOCAL_RUNTIME_LIFECYCLE_EVENTS,Q as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,P as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,K as JOBS_START_WAIT_KEY,J as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,s as HANDS_REBIND_KEY,t as HANDS_REBIND_CONTROL,r as HANDS_REBIND,D as HANDS_MODEL_JOBS_EGRESS_KEY,C as HANDS_MODEL_JOBS_EGRESS,z as HANDS_LARGE_ENVIRONMENT_KEY,y as HANDS_LARGE_ENVIRONMENT,F as HANDS_JOBS_USER_KEY,E as HANDS_JOBS_USER,x as HANDS_HEADLESS_BROWSER_KEY,w as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,q as HANDS_ENVIRONMENT_AT_CLAIM_KEY,p as HANDS_ENVIRONMENT_AT_CLAIM,B as HANDS_CONFINEMENT_KEY,A as HANDS_CONFINEMENT,v as HANDS_CLOUD_ACCESS_KEY,u as HANDS_CLOUD_ACCESS,L as AUTOMATION_USER_CHROME,M as AUTOMATION_CLOUD_SESSIONS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{P as a}from"./vm-hands-entry-lite-c64behya.js";import"./vm-hands-entry-lite-px64jhhn.js";export default a();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ff as a,gf as b,hf as c,if as d,jf as e,kf as f,lf as g,mf as h,nf as i,of as j}from"./vm-hands-entry-lite-k3cq8g9w.js";import"./vm-hands-entry-lite-ghav09mm.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.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{pf as a,qf as b,rf as c,sf as d}from"./vm-hands-entry-lite-ghav09mm.js";import"./vm-hands-entry-lite-4fcs46fz.js";import"./vm-hands-entry-lite-px64jhhn.js";export{c as compareCliVersions,d as cliAndAgentVersion,b as CLI_VERSION_PATTERN,a as CLI_VERSION};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{a,b,c}from"./vm-hands-entry-lite-thtd61xk.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.js";export{b as spawnSessionPty,c as runVmHandsOpRunner,a as VM_HANDS_OP_RUNNER_PERSON_ARG};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{t as a}from"./vm-hands-entry-lite-hj6jjk24.js";import"./vm-hands-entry-lite-7kzy7rxj.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-070nd0vy.js";import"./vm-hands-entry-lite-px64jhhn.js";export{a as configureWorkerSandbox};