@reason-machines/cli-linux-x64 0.2.415 → 0.2.418

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 (117) hide show
  1. package/bin/reason +1 -1
  2. package/bin/runtime/srt/sandbox-runtime.mjs +38 -38
  3. package/bin/vm-hands/api-18d75dfn.js +2 -0
  4. package/bin/vm-hands/api-credentials-3vhge1ap.js +2 -0
  5. package/bin/vm-hands/connect-cli-pn1h0b08.js +2 -0
  6. package/bin/vm-hands/custom-endpoint-device-17t4efc4.js +2 -0
  7. package/bin/vm-hands/desktop-account-6sjrxy69.js +2 -0
  8. package/bin/vm-hands/device-workspace-s50q53sz.js +2 -0
  9. package/bin/vm-hands/{fsevents-ekt70rcc.js → fsevents-p3d8kd0p.js} +1 -1
  10. package/bin/vm-hands/hands-worker-source-kddz4y15.js +2 -0
  11. package/bin/vm-hands/{index-k8kcz8a3.js → index-wrw65904.js} +35 -35
  12. package/bin/vm-hands/install-receipt-ysa70fvh.js +2 -0
  13. package/bin/vm-hands/local-automation-7nc6cgjp.js +2 -0
  14. package/bin/vm-hands/local-capabilities-5f36fr9x.js +2 -0
  15. package/bin/vm-hands/local-desktop-users-cppjjr81.js +2 -0
  16. package/bin/vm-hands/local-display-mac-0qz3b627.js +2 -0
  17. package/bin/vm-hands/local-display-session-zg4dpnf1.js +2 -0
  18. package/bin/vm-hands/local-display-video-remg1c30.js +2 -0
  19. package/bin/vm-hands/local-managed-process-gjc8gvgb.js +2 -0
  20. package/bin/vm-hands/local-pty-session-rpk05ap5.js +2 -0
  21. package/bin/vm-hands/managed-runtime-f85h6h7f.js +2 -0
  22. package/bin/vm-hands/network-contract-trkxqc0w.js +2 -0
  23. package/bin/vm-hands/package-xqbhdf15.js +2 -0
  24. package/bin/vm-hands/permissions-bhbnb1bp.js +2 -0
  25. package/bin/vm-hands/reason-hands-protocol-xn3ddz70.js +2 -0
  26. package/bin/vm-hands/serve-service-58ea9cwx.js +2 -0
  27. package/bin/vm-hands/status-z9r8nq3y.js +10 -0
  28. package/bin/vm-hands/version-p0g28erd.js +2 -0
  29. package/bin/vm-hands/{vm-hands-entry-lite-bdhjpv7g.js → vm-hands-entry-lite-21qpxvt8.js} +2 -2
  30. package/bin/vm-hands/vm-hands-entry-lite-2nkj0dpx.js +539 -0
  31. package/bin/vm-hands/vm-hands-entry-lite-2wzsnnsp.js +3 -0
  32. package/bin/vm-hands/{vm-hands-entry-lite-8t9xssf9.js → vm-hands-entry-lite-3krzmhkk.js} +2 -2
  33. package/bin/vm-hands/{vm-hands-entry-lite-k278g9kj.js → vm-hands-entry-lite-4vks5phw.js} +5 -5
  34. package/bin/vm-hands/{vm-hands-entry-lite-1cwqa4jr.js → vm-hands-entry-lite-50zbqwkv.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-1rrb66r9.js → vm-hands-entry-lite-5dtfehjv.js} +2 -2
  36. package/bin/vm-hands/{vm-hands-entry-lite-6aeea05q.js → vm-hands-entry-lite-60pg3wxj.js} +2 -2
  37. package/bin/vm-hands/{vm-hands-entry-lite-9ay6f56v.js → vm-hands-entry-lite-6c67a3jc.js} +2 -2
  38. package/bin/vm-hands/{vm-hands-entry-lite-txn44020.js → vm-hands-entry-lite-6wt5ja1k.js} +2 -2
  39. package/bin/vm-hands/{vm-hands-entry-lite-zg36myyf.js → vm-hands-entry-lite-8r31b0ps.js} +4 -4
  40. package/bin/vm-hands/vm-hands-entry-lite-ah6fwqxp.js +128 -0
  41. package/bin/vm-hands/{vm-hands-entry-lite-ckv17tn8.js → vm-hands-entry-lite-aj139v8j.js} +2 -2
  42. package/bin/vm-hands/{vm-hands-entry-lite-907pa7f9.js → vm-hands-entry-lite-avc65bd7.js} +6 -6
  43. package/bin/vm-hands/{vm-hands-entry-lite-9c95p6n9.js → vm-hands-entry-lite-beyyy1gz.js} +37 -37
  44. package/bin/vm-hands/{vm-hands-entry-lite-ab2m9erf.js → vm-hands-entry-lite-bx5zy5bd.js} +1 -1
  45. package/bin/vm-hands/{vm-hands-entry-lite-pgb514h0.js → vm-hands-entry-lite-dk79tnax.js} +2 -2
  46. package/bin/vm-hands/vm-hands-entry-lite-ec9jemny.js +5 -0
  47. package/bin/vm-hands/{vm-hands-entry-lite-gvwdy3rf.js → vm-hands-entry-lite-fbhqfzbq.js} +3 -3
  48. package/bin/vm-hands/{vm-hands-entry-lite-t7an5zg2.js → vm-hands-entry-lite-fcvf8md1.js} +2 -2
  49. package/bin/vm-hands/{vm-hands-entry-lite-qysyf65v.js → vm-hands-entry-lite-g4zd2d5n.js} +1 -1
  50. package/bin/vm-hands/{vm-hands-entry-lite-0xrsph3r.js → vm-hands-entry-lite-hbs3tpdg.js} +2 -2
  51. package/bin/vm-hands/{vm-hands-entry-lite-f5e3dbgk.js → vm-hands-entry-lite-hk6trmwa.js} +3 -3
  52. package/bin/vm-hands/{vm-hands-entry-lite-2hvbgp1n.js → vm-hands-entry-lite-hn76pcgk.js} +5 -5
  53. package/bin/vm-hands/vm-hands-entry-lite-j43nqe8y.js +452 -0
  54. package/bin/vm-hands/{vm-hands-entry-lite-89z488gz.js → vm-hands-entry-lite-jev771b3.js} +2 -2
  55. package/bin/vm-hands/{vm-hands-entry-lite-eqgj4acy.js → vm-hands-entry-lite-jzz73e3f.js} +10 -10
  56. package/bin/vm-hands/vm-hands-entry-lite-m8nqnd9j.js +126 -0
  57. package/bin/vm-hands/vm-hands-entry-lite-mmdwr0mf.js +2 -0
  58. package/bin/vm-hands/{vm-hands-entry-lite-2wgdvb15.js → vm-hands-entry-lite-nefcet81.js} +2 -2
  59. package/bin/vm-hands/{vm-hands-entry-lite-hj8n59y9.js → vm-hands-entry-lite-np07qyeq.js} +2 -2
  60. package/bin/vm-hands/{vm-hands-entry-lite-1rtkf2xm.js → vm-hands-entry-lite-nzmkyezg.js} +2 -2
  61. package/bin/vm-hands/{vm-hands-entry-lite-q0k6kx6d.js → vm-hands-entry-lite-pf5qtbj5.js} +4 -4
  62. package/bin/vm-hands/{vm-hands-entry-lite-qxchbbew.js → vm-hands-entry-lite-ppmvge7n.js} +5 -5
  63. package/bin/vm-hands/{vm-hands-entry-lite-m11j0f9q.js → vm-hands-entry-lite-rfz60hb3.js} +2 -2
  64. package/bin/vm-hands/vm-hands-entry-lite-s3cg1dsk.js +52 -0
  65. package/bin/vm-hands/vm-hands-entry-lite-s4bharcb.js +9 -0
  66. package/bin/vm-hands/{vm-hands-entry-lite-88swf2qr.js → vm-hands-entry-lite-s5qkb1fk.js} +3 -3
  67. package/bin/vm-hands/{vm-hands-entry-lite-cc2tgsqp.js → vm-hands-entry-lite-stmbekq0.js} +16 -16
  68. package/bin/vm-hands/{vm-hands-entry-lite-kq0qmsw8.js → vm-hands-entry-lite-svvysppj.js} +4 -4
  69. package/bin/vm-hands/{vm-hands-entry-lite-22kfyvnk.js → vm-hands-entry-lite-tdgtpx8e.js} +1 -1
  70. package/bin/vm-hands/{vm-hands-entry-lite-b885gwfh.js → vm-hands-entry-lite-vpz54vwj.js} +6 -6
  71. package/bin/vm-hands/vm-hands-entry-lite-w8w451gj.js +4 -0
  72. package/bin/vm-hands/{vm-hands-entry-lite-09m2cdkw.js → vm-hands-entry-lite-wx4ax7wg.js} +3 -3
  73. package/bin/vm-hands/vm-hands-entry-lite-yretc2th.js +3 -0
  74. package/bin/vm-hands/vm-hands-entry-lite-z76nfb19.js +3 -0
  75. package/bin/vm-hands/vm-hands-entry-lite-zp6naptr.js +3 -0
  76. package/bin/vm-hands/vm-hands-entry-lite.js +2 -2
  77. package/bin/vm-hands/vm-hands-executor-73b49jkg.js +11 -0
  78. package/bin/vm-hands/vm-hands-op-runner-ef9ts9c6.js +2 -0
  79. package/bin/vm-hands/vm-hands-runtime-8z6rx1fj.js +4 -0
  80. package/bin/vm-hands/worker-preview-readiness-w62n91kr.js +2 -0
  81. package/bin/vm-hands/worker-sandbox-2r5nseff.js +2 -0
  82. package/package.json +1 -1
  83. package/bin/vm-hands/api-cjv8m2zy.js +0 -2
  84. package/bin/vm-hands/api-credentials-m5akr9fv.js +0 -2
  85. package/bin/vm-hands/connect-cli-d60gmgnx.js +0 -2
  86. package/bin/vm-hands/custom-endpoint-device-dkqb4rqy.js +0 -2
  87. package/bin/vm-hands/desktop-account-5v7x0ajx.js +0 -2
  88. package/bin/vm-hands/device-workspace-p9q9dckg.js +0 -2
  89. package/bin/vm-hands/hands-worker-source-cgrpm21b.js +0 -2
  90. package/bin/vm-hands/install-receipt-7vt2y2vh.js +0 -2
  91. package/bin/vm-hands/local-automation-4htjhv65.js +0 -2
  92. package/bin/vm-hands/local-capabilities-c04tbapa.js +0 -2
  93. package/bin/vm-hands/local-desktop-users-q886k0mm.js +0 -2
  94. package/bin/vm-hands/local-display-mac-w85956f1.js +0 -2
  95. package/bin/vm-hands/local-display-session-pkz7a5q9.js +0 -2
  96. package/bin/vm-hands/local-pty-session-5f50sqq0.js +0 -2
  97. package/bin/vm-hands/managed-runtime-ppypxbh9.js +0 -2
  98. package/bin/vm-hands/network-contract-9x9kc5vv.js +0 -2
  99. package/bin/vm-hands/package-78fkast4.js +0 -2
  100. package/bin/vm-hands/permissions-xt02c6dh.js +0 -2
  101. package/bin/vm-hands/reason-hands-protocol-2tnghj3b.js +0 -2
  102. package/bin/vm-hands/serve-service-wanptaqv.js +0 -2
  103. package/bin/vm-hands/status-gt7c4ke0.js +0 -10
  104. package/bin/vm-hands/version-bq5j7cqg.js +0 -2
  105. package/bin/vm-hands/vm-hands-entry-lite-2wvsyggd.js +0 -540
  106. package/bin/vm-hands/vm-hands-entry-lite-463m6ejk.js +0 -458
  107. package/bin/vm-hands/vm-hands-entry-lite-8ns59paz.js +0 -3
  108. package/bin/vm-hands/vm-hands-entry-lite-ewwx4fr3.js +0 -250
  109. package/bin/vm-hands/vm-hands-entry-lite-grtycq6y.js +0 -52
  110. package/bin/vm-hands/vm-hands-entry-lite-pmcz7j7t.js +0 -3
  111. package/bin/vm-hands/vm-hands-entry-lite-qq9w7wq6.js +0 -3
  112. package/bin/vm-hands/vm-hands-entry-lite-rwxbhwky.js +0 -2
  113. package/bin/vm-hands/vm-hands-entry-lite-vrqzr15t.js +0 -3
  114. package/bin/vm-hands/vm-hands-executor-7k9z9988.js +0 -11
  115. package/bin/vm-hands/vm-hands-op-runner-n8p81rwm.js +0 -2
  116. package/bin/vm-hands/vm-hands-runtime-bqsz7h0h.js +0 -4
  117. package/bin/vm-hands/worker-sandbox-smqj3mbe.js +0 -2
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{Ge}from"./vm-hands-entry-lite-k278g9kj.js";import{wi,Xr,bi}from"./vm-hands-entry-lite.js";import{spawn as G}from"child_process";import{createHash as z}from"crypto";import{lstatSync as E,mkdirSync as K,readFileSync as W,statSync as X,writeFileSync as F}from"fs";var v="/run/reason-vm-hands",D="/run/reason-vm-hands/env",A="/home/runner/.reason/workspace",J=/^https:\/\/[a-z0-9.-]+(?::\d{1,5})?$/,V="/sys/fs/cgroup/reason-srt",q=["/usr/local/bin/reason-srt-exec","/usr/local/bin/ara-srt-exec"],Q=65536,Z=21600000;function ee(r,e="/run/ara-srt"){try{if((process.getuid?.()??-1)!==0)return;K(e,{recursive:!0,mode:448});let n=E(e);if(!n.isDirectory()||n.uid!==0||(n.mode&63)!==0){r("srt_base_keyed_skipped",{reason:"socket_dir_unsafe"});return}F(`${e}/base-keyed`,`1
3
- `,{mode:420}),r("srt_base_keyed",{})}catch{r("srt_base_keyed_skipped",{reason:"error"})}}function C(r,e){let n=(c)=>(e("srt_warm_skipped",{reason:c}),Promise.resolve());if(typeof r.srt_base_settings!=="string")return n("no_settings");let o=Buffer.from(r.srt_base_settings,"base64");if(o.length===0||o.length>Q||o.toString("base64")!==r.srt_base_settings)return n("settings_invalid");let a;try{let c=E(V);if(!c.isDirectory()||c.uid!==0||(c.mode&18)!==0)return n("cgroup_unsafe");let p=q.find((f)=>E(f,{throwIfNoEntry:!1})!==void 0);if(!p)return n("cgroup_or_exec_missing");a=p;for(let[f,w]of[[a,!1],["/usr/local/bin",!0]]){let u=E(f);if((w?!u.isDirectory():!u.isFile())||u.uid!==0||(u.mode&18)!==0)return n("srt_exec_unsafe")}}catch{return n("cgroup_or_exec_missing")}if((process.getuid?.()??-1)!==0)return n("not_root");let i=performance.now(),R=z("sha256").update(o).digest("hex"),S=`${v}/srt-base-settings.json`;try{F(S,o,{mode:384,flag:"w"})}catch{return n("settings_write")}let g=G("/bin/sh",["-c",`echo $$ > ${V}/cgroup.procs || exit 125; exec "$@"`,"vm-hands-srt",a,"--settings",S,"--idle-ms",String(Z),"--","/bin/true"],{cwd:"/",env:{PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},stdio:"ignore"});return new Promise((c)=>{g.once("error",()=>{e("srt_warm_failed",{reason:"spawn"}),c()}),g.once("close",(p)=>{e(p===0?"srt_warm_done":"srt_warm_failed",{exit_code:p,warm_ms:Math.round(performance.now()-i),settings_sha256:R}),c()})})}var M=3000;function pe(r){if(!r||typeof r!=="object"||Array.isArray(r))return null;let e=r,{layout:n,device_key:o,credential:a}=e;return typeof e.workspace_id==="string"&&Number.isSafeInteger(e.instance_generation)&&typeof e.api_origin==="string"&&J.test(e.api_origin)&&typeof e.manifest_digest==="string"&&!!a&&typeof a.key_id==="string"&&Number.isSafeInteger(a.expires_at_ms)&&typeof a.signature==="string"&&!!n&&typeof n.session_root==="string"&&typeof n.alias==="string"&&Number.isSafeInteger(n.payload_uid)&&typeof n.kind==="string"&&!!o&&typeof o.pkcs8==="string"&&typeof o.spki==="string"?e:null}function L(r){K(r,{recursive:!0,mode:448});let e=X(r);if(!e.isDirectory()||(e.mode&63)!==0||e.uid!==(process.getuid?.()??-1))throw Error(`vm_hands_runtime_directory_unsafe: ${r}`)}async function ne(r){let[{CLI_VERSION:e},n,o,a]=await Promise.all([import("./version-bq5j7cqg.js"),import("./hands-worker-source-cgrpm21b.js"),import("./network-contract-9x9kc5vv.js"),import("./device-workspace-p9q9dckg.js")]),{REASON_HANDS_PROTOCOL_VERSION:i}=await import("./reason-hands-protocol-2tnghj3b.js");return{reason_runtime_version:e,bridge_version:e,protocol_version:Ge,execution_eligible:!0,instance_generation:r.instance_generation,capabilities:{supported_operations:["hands.connect"],hands_worker_artifact_sha256:n.REASON_HANDS_WORKER_ARTIFACT_SHA256,hands_worker_entrypoint:n.REASON_HANDS_WORKER_ENTRYPOINT,hands_slots:1,max_payload_bytes:o.LOCAL_OPERATION_MAX_BYTES,max_result_bytes:o.LOCAL_OPERATION_MAX_BYTES,operation_constraints:{"hands.connect":{ready:!0,execution_mode:"host",transport:"wss_relay",worker:"ara_hands",slots:1,session_group:o.HANDS_SESSION_GROUP,worker_version:n.REASON_HANDS_WORKER_VERSION,protocol_version:i,worker_artifact_sha256:n.REASON_HANDS_WORKER_ARTIFACT_SHA256,worker_entrypoint:n.REASON_HANDS_WORKER_ENTRYPOINT,policy_mode:"full_access",policy_version:1,workspace_base:a.REASON_WORKSPACE_BASE,workspace_layout:a.SESSION_WORKSPACE_LAYOUT,browser_state:"optional_headless",desktop:!1,max_session_ms:43200000,environment_delivery:o.HANDS_ENVIRONMENT_DELIVERY,[o.HANDS_ENVIRONMENT_AT_CLAIM_KEY]:o.HANDS_ENVIRONMENT_AT_CLAIM,[o.HANDS_CLOUD_ACCESS_KEY]:o.HANDS_CLOUD_ACCESS,[o.HANDS_LARGE_ENVIRONMENT_KEY]:o.HANDS_LARGE_ENVIRONMENT,[o.HANDS_CONFINEMENT_KEY]:o.HANDS_CONFINEMENT,[o.HANDS_JOBS_USER_KEY]:o.HANDS_JOBS_USER,vm_hands:"v1"}}}}}var k=["fs.read","fs.write","fs.export","fs.import","exec.run","exec.full","process.list","ports.list","pty.start","jobs.control"],te=new Set(["pty.start","jobs.control"]);function re(r,e){let n=e([{id:"vm-hands",label:"workspace",path:A,pathFingerprint:"0".repeat(64),permissions:{read:!0,write:!0,execute:!0,discover_environment:!0,expose_mcp:!1}}],{worker:{executionMode:"unsandboxed",readiness:Object.fromEntries(k.map((i)=>[i,!0]))}}),o=r.capabilities,a={...o.operation_constraints};for(let i of k)a[i]={...n.operation_constraints?.[i]??{},ready:!0,execution_mode:n.operation_constraints?.[i]?.execution_mode??"host"};return{...r,capabilities:{...o,supported_operations:["hands.connect",...k],operation_constraints:a}}}function oe(r){for(let e of W("/etc/passwd","utf8").split(`
4
- `)){let n=e.split(":");if(n.length>=4&&Number(n[2])===r&&/^\d+$/.test(n[3]??"")&&Number(n[3])>0)return Number(n[3])}throw Error("vm_hands_payload_account_unavailable")}function se(r,e){let n=e.owner;if(!n||typeof n.organization_id!=="string"||typeof n.device_id!=="string"||typeof e.root_id!=="string")return null;return{version:4,apiOrigin:r.api_origin,orgId:n.organization_id,deviceId:n.device_id,devicePublicKey:"",displayName:"vm-hands",registeredAt:new Date(0).toISOString(),handsSlots:1,roots:[{id:e.root_id,label:"workspace",path:A,pathFingerprint:"0".repeat(64),permissions:{read:!0,write:!0,execute:!0,discover_environment:!0,expose_mcp:!1}}]}}function ae(r=process.platform,e="/proc/self/oom_score_adj"){if(r!=="linux")return null;let n;try{n=W(e,"utf8").trim()}catch{return{value:"unreadable"}}if(!/^-?\d+$/.test(n))return{value:"unreadable"};let o=Number(n);return o<0?{value:o}:null}async function fe(r,e){let n=ae();if(n)e("vm_hands.oom_protected",{code:"vm_hands_oom_protected",value:n.value}),await new Promise(()=>{setInterval(()=>{return},1073741824)});L(v),L(D),ee(e);let o=C(r,e),a=!1,i=async()=>{if(!await Promise.race([o.then(()=>!0),new Promise((s)=>setTimeout(()=>s(!1),M).unref?.())]))a=!0,e("srt_warm_late",{wait_ms:M})},[{configureDesktopAccount:R},{configureWorkerSandbox:S}]=await Promise.all([import("./desktop-account-5v7x0ajx.js"),import("./worker-sandbox-smqj3mbe.js")]);S();try{R({value:String(r.layout.payload_uid)})}catch{e("payload_account_unavailable"),await new Promise(()=>{setInterval(()=>{return},1073741824)})}let g=new AbortController;for(let t of["SIGTERM","SIGINT"])process.on(t,()=>g.abort());let c=new Map,p,f=new Promise((t)=>{p=t}),w=f.then(()=>import("./vm-hands-executor-7k9z9988.js")).then(({createVmHandsExecutor:t})=>{let s=t({init:r,root:A,runtimeDirectory:v,apiOrigin:r.api_origin,prespawn:!0,onSrtReset:()=>{a=!1,o=C(r,e)},srtWarmLate:()=>a,forward:(_,d,y)=>c.get(_)?.(d,y)??Promise.reject(Error("vm_hands_not_bound")),log:(_,d)=>e(_,d)});return e("executor_loaded"),s}),u=(t)=>async(...s)=>(await w)[t](...s),h=null;w.then((t)=>{h=(s)=>t.executorExited(s)});let m={startExecutor:async(...t)=>(await i(),u("startExecutor")(...t)),killAndVerifyPayload:u("killAndVerifyPayload"),killProbe:u("killProbe"),runProbe:async(...t)=>(await i(),u("runProbe")(...t)),restatLayout:()=>{throw Error("replaced below")},verifyMounts:()=>{throw Error("replaced below")},installEnvironment:()=>{throw Error("replaced below")},executorExited:(t)=>h?h(t):new Promise(()=>{}),takeSrtFallbacks:()=>null};w.then((t)=>{m.restatLayout=()=>t.restatLayout(),m.verifyMounts=()=>t.verifyMounts(),m.installEnvironment=(s,_)=>t.installEnvironment(s,_),m.freezeBind=(s)=>t.freezeBind(s),m.takeSrtFallbacks=()=>t.takeSrtFallbacks?.()??null});let B=await wi(r),Y=new Xr(r,B,m,{envRoot:D}),x=ne(r),I=null,U=Promise.all([x,import("./local-capabilities-c04tbapa.js")]).then(([t,s])=>{I=re(t,s.capabilityInventoryForRoots),e("device_ops_loaded")}).catch((t)=>e("device_ops_unavailable",{error:t instanceof Error?t.name:"error"})),N=f.then(()=>import("./vm-hands-executor-7k9z9988.js")).then(({createVmHandsOpRunners:t,vmHandsBindCgroup:s,VM_HANDS_PAYLOAD_CGROUP:_})=>t({payloadUid:r.layout.payload_uid,payloadGid:oe(r.layout.payload_uid),bindCgroup:(d)=>s(_,d),log:(d,y)=>e(d,y)})).catch(()=>null);N.then((t)=>t?.warm("person")),e("agent_ready"),await bi({apiOrigin:r.api_origin,agent:Y,signal:g.signal,heartbeat:async()=>I??await x,executeOp:async({kind:t,claim:s,bindId:_,signal:d,emit:y})=>{let O=se(r,s);if(!O)return{status:"failed",error_code:"vm_hands_bind_invalid"};let H={executionMode:"unsandboxed",runtimeDirectory:v,readiness:Object.fromEntries(k.map((l)=>[l,!0]))},P=(l)=>{let b=typeof l.kind==="string"?l.kind:"";if(b)y({kind:b,...l.data&&typeof l.data==="object"?{data:l.data}:{}})};if(s.capability==="exec.full"&&t!=="person")return{status:"failed",error_code:"capability_not_granted"};if(s.capability==="automation.call.v1"&&t!=="model")return{status:"failed",error_code:"capability_not_granted"};let j=s.capability==="pty.start"&&t==="person"&&!s.authority;if(te.has(String(s.capability))&&!j){let{executeLocalOperation:l}=await import("./local-capabilities-c04tbapa.js");return l(O,s,{worker:H,signal:d,emit:(b)=>P(b)})}let T=await N;if(!T)return{status:"failed",error_code:"vm_hands_payload_account_unavailable"};return T.run(t,{id:String(s.attempt_id),claim:s,state:O,worker:H},P,d,_)},readyData:({launchId:t})=>({executor_launch_id:t}),log:(t,s)=>{if(t==="vm_hands.registered"||t==="vm_hands.reconnected")p();e(t,s)},onTurn:(t,s)=>{if(s)c.set(t,s);else c.delete(t)}}),await(await w).stop(),(await N)?.stop()}export{pe as parseVmHandsInit,fe as runVmHands};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{qo}from"./vm-hands-entry-lite-vrqzr15t.js";import"./vm-hands-entry-lite-b885gwfh.js";import"./vm-hands-entry-lite-88swf2qr.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";export{qo as configureWorkerSandbox};