@reason-machines/cli-linux-x64 0.2.392 → 0.2.395

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 (96) hide show
  1. package/README.md +1 -1
  2. package/bin/reason +4 -0
  3. package/bin/vm-hands/api-credentials-200ret9z.js +2 -0
  4. package/bin/vm-hands/api-jcccjxss.js +2 -0
  5. package/bin/vm-hands/{ask-relay-n25b0bc7.js → ask-relay-e424fxe1.js} +3 -3
  6. package/bin/vm-hands/connect-cli-t2cf1fhv.js +2 -0
  7. package/bin/vm-hands/{custom-endpoint-device-3g0rc3wp.js → custom-endpoint-device-qd3zcysz.js} +1 -1
  8. package/bin/vm-hands/desktop-account-r5fsgx43.js +2 -0
  9. package/bin/vm-hands/{device-workspace-35hjc1ff.js → device-workspace-ntckpym4.js} +1 -1
  10. package/bin/vm-hands/{hands-worker-source-msdkfx9x.js → hands-worker-source-p6530nj7.js} +1 -1
  11. package/bin/vm-hands/{index-m32pjcjr.js → index-z6q2j1e0.js} +1 -1
  12. package/bin/vm-hands/install-receipt-kqayxfsn.js +2 -0
  13. package/bin/vm-hands/local-automation-3msswz1s.js +2 -0
  14. package/bin/vm-hands/local-capabilities-jp7mfe90.js +2 -0
  15. package/bin/vm-hands/local-desktop-users-7kbrnvba.js +2 -0
  16. package/bin/vm-hands/local-display-mac-0k5twcjj.js +2 -0
  17. package/bin/vm-hands/local-display-session-4nz3ps1j.js +2 -0
  18. package/bin/vm-hands/local-pty-session-a0fz1f9t.js +2 -0
  19. package/bin/vm-hands/{managed-runtime-gq3w0s2m.js → managed-runtime-jpkvdh9q.js} +1 -1
  20. package/bin/vm-hands/{network-contract-3h853c6e.js → network-contract-xgbrevt2.js} +1 -1
  21. package/bin/vm-hands/package-x8ct3epg.js +2 -0
  22. package/bin/vm-hands/permissions-nhtd0qmb.js +2 -0
  23. package/bin/vm-hands/{reason-hands-protocol-mw7ba8vz.js → reason-hands-protocol-90kpyg4s.js} +1 -1
  24. package/bin/vm-hands/{serve-service-t7w6zjvy.js → serve-service-sdep4jmp.js} +1 -1
  25. package/bin/vm-hands/{status-pn9s61mk.js → status-r1k521hh.js} +2 -2
  26. package/bin/vm-hands/version-svxh3eka.js +2 -0
  27. package/bin/vm-hands/{vm-hands-entry-lite-180h5amj.js → vm-hands-entry-lite-0nd56w02.js} +1 -1
  28. package/bin/vm-hands/{vm-hands-entry-lite-a1yy1yp3.js → vm-hands-entry-lite-1cs1jy20.js} +2 -2
  29. package/bin/vm-hands/{vm-hands-entry-lite-3nr9q3nf.js → vm-hands-entry-lite-29f3m7x2.js} +1 -1
  30. package/bin/vm-hands/{vm-hands-entry-lite-5x04hakp.js → vm-hands-entry-lite-2sx1a43v.js} +2 -2
  31. package/bin/vm-hands/{vm-hands-entry-lite-3ptq7p60.js → vm-hands-entry-lite-34h6rv5c.js} +1 -1
  32. package/bin/vm-hands/{vm-hands-entry-lite-szhgkxe9.js → vm-hands-entry-lite-3ypjvw3e.js} +2 -2
  33. package/bin/vm-hands/{vm-hands-entry-lite-kkgqknmg.js → vm-hands-entry-lite-42chrtkc.js} +2 -2
  34. package/bin/vm-hands/{vm-hands-entry-lite-v679rfw4.js → vm-hands-entry-lite-4d0szmz0.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-f78n4wqt.js → vm-hands-entry-lite-5d31qv44.js} +1 -1
  36. package/bin/vm-hands/{vm-hands-entry-lite-2sw5neq5.js → vm-hands-entry-lite-6256d8j5.js} +3 -3
  37. package/bin/vm-hands/{vm-hands-entry-lite-g87z5eb6.js → vm-hands-entry-lite-69n9q5f1.js} +1 -1
  38. package/bin/vm-hands/{vm-hands-entry-lite-ezahexcb.js → vm-hands-entry-lite-6nj2ejfh.js} +1 -1
  39. package/bin/vm-hands/{vm-hands-entry-lite-4ze6psry.js → vm-hands-entry-lite-90r926q9.js} +2 -2
  40. package/bin/vm-hands/{vm-hands-entry-lite-8e932j3c.js → vm-hands-entry-lite-bgs4zjkf.js} +1 -1
  41. package/bin/vm-hands/{vm-hands-entry-lite-trm3dn8c.js → vm-hands-entry-lite-cfwke54v.js} +1 -1
  42. package/bin/vm-hands/{vm-hands-entry-lite-88h9vwrv.js → vm-hands-entry-lite-e1cbqqqw.js} +1 -1
  43. package/bin/vm-hands/{vm-hands-entry-lite-r166b92s.js → vm-hands-entry-lite-e4kdpq0t.js} +1 -1
  44. package/bin/vm-hands/{vm-hands-entry-lite-h0keewxv.js → vm-hands-entry-lite-e99ftdr6.js} +1 -1
  45. package/bin/vm-hands/{vm-hands-entry-lite-ksz1k1dh.js → vm-hands-entry-lite-eatqxe5y.js} +1 -1
  46. package/bin/vm-hands/{vm-hands-entry-lite-fb02h1zm.js → vm-hands-entry-lite-ek5r435m.js} +2 -2
  47. package/bin/vm-hands/{vm-hands-entry-lite-40eg3600.js → vm-hands-entry-lite-ep2n8nxv.js} +51 -51
  48. package/bin/vm-hands/{vm-hands-entry-lite-e5whbbf1.js → vm-hands-entry-lite-errnnc9y.js} +1 -1
  49. package/bin/vm-hands/{vm-hands-entry-lite-atg4z1vg.js → vm-hands-entry-lite-f50vcbjg.js} +1 -1
  50. package/bin/vm-hands/{vm-hands-entry-lite-8pgggvbb.js → vm-hands-entry-lite-f9akybcm.js} +2 -2
  51. package/bin/vm-hands/{vm-hands-entry-lite-csecgmaa.js → vm-hands-entry-lite-gk3y60ap.js} +2 -2
  52. package/bin/vm-hands/{vm-hands-entry-lite-ebgackey.js → vm-hands-entry-lite-hx4w3r63.js} +2 -2
  53. package/bin/vm-hands/vm-hands-entry-lite-k4erfh5k.js +3 -0
  54. package/bin/vm-hands/vm-hands-entry-lite-kbjh8x26.js +5 -0
  55. package/bin/vm-hands/{vm-hands-entry-lite-jngk09n6.js → vm-hands-entry-lite-kjjhcjp9.js} +2 -2
  56. package/bin/vm-hands/{vm-hands-entry-lite-bfz54fcx.js → vm-hands-entry-lite-nnggcccf.js} +1 -1
  57. package/bin/vm-hands/{vm-hands-entry-lite-s70v7hej.js → vm-hands-entry-lite-p3d5j70y.js} +7 -7
  58. package/bin/vm-hands/{vm-hands-entry-lite-00800vjk.js → vm-hands-entry-lite-ps9gjbs5.js} +2 -2
  59. package/bin/vm-hands/{vm-hands-entry-lite-hfv2tsm9.js → vm-hands-entry-lite-q5h859gg.js} +2 -2
  60. package/bin/vm-hands/{vm-hands-entry-lite-y99g8x7f.js → vm-hands-entry-lite-q62fwa20.js} +1 -1
  61. package/bin/vm-hands/{vm-hands-entry-lite-02zaqpgh.js → vm-hands-entry-lite-qvj5560v.js} +2 -2
  62. package/bin/vm-hands/{vm-hands-entry-lite-mft9ke08.js → vm-hands-entry-lite-sbn9bmf7.js} +1 -1
  63. package/bin/vm-hands/{vm-hands-entry-lite-p1s0xyc2.js → vm-hands-entry-lite-sjn5yjvx.js} +2 -2
  64. package/bin/vm-hands/{vm-hands-entry-lite-e73s63fb.js → vm-hands-entry-lite-smrymax6.js} +1 -1
  65. package/bin/vm-hands/{vm-hands-entry-lite-adpzn7fe.js → vm-hands-entry-lite-t839nkd2.js} +2 -2
  66. package/bin/vm-hands/{vm-hands-entry-lite-mc3pkj0q.js → vm-hands-entry-lite-v0kpksbf.js} +1 -1
  67. package/bin/vm-hands/{vm-hands-entry-lite-wpcagqfw.js → vm-hands-entry-lite-vqfpryez.js} +1 -1
  68. package/bin/vm-hands/{vm-hands-entry-lite-ejm7666a.js → vm-hands-entry-lite-vys6qap2.js} +2 -2
  69. package/bin/vm-hands/{vm-hands-entry-lite-0seprnh3.js → vm-hands-entry-lite-xhbjkkk5.js} +1 -1
  70. package/bin/vm-hands/vm-hands-entry-lite-y7yr8pjm.js +105 -0
  71. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  72. package/bin/vm-hands/{vm-hands-executor-pvxwbp9f.js → vm-hands-executor-pm8ns2zs.js} +1 -1
  73. package/bin/vm-hands/vm-hands-op-runner-7r51q98t.js +2 -0
  74. package/bin/vm-hands/{vm-hands-runtime-jfpsg002.js → vm-hands-runtime-h5s04mj9.js} +3 -3
  75. package/bin/vm-hands/worker-sandbox-ecjj14h5.js +2 -0
  76. package/package.json +1 -1
  77. package/bin/ara +0 -4
  78. package/bin/vm-hands/api-2edgrjpe.js +0 -2
  79. package/bin/vm-hands/api-credentials-1bfy2pqp.js +0 -2
  80. package/bin/vm-hands/connect-cli-3a577w3r.js +0 -2
  81. package/bin/vm-hands/desktop-account-8yf4aqgb.js +0 -2
  82. package/bin/vm-hands/install-receipt-7qanbz38.js +0 -2
  83. package/bin/vm-hands/local-automation-v37jep3t.js +0 -2
  84. package/bin/vm-hands/local-capabilities-dn2qbnyg.js +0 -2
  85. package/bin/vm-hands/local-desktop-users-p6n48895.js +0 -2
  86. package/bin/vm-hands/local-display-mac-7havkbhd.js +0 -2
  87. package/bin/vm-hands/local-display-session-q9bc8kvc.js +0 -2
  88. package/bin/vm-hands/local-pty-session-8ny1n2fv.js +0 -2
  89. package/bin/vm-hands/package-04cf0m62.js +0 -2
  90. package/bin/vm-hands/permissions-w6qgf9wr.js +0 -2
  91. package/bin/vm-hands/version-vzx5cveg.js +0 -2
  92. package/bin/vm-hands/vm-hands-entry-lite-0z73amf7.js +0 -5
  93. package/bin/vm-hands/vm-hands-entry-lite-1m7dd8d1.js +0 -105
  94. package/bin/vm-hands/vm-hands-entry-lite-bwpay74g.js +0 -3
  95. package/bin/vm-hands/vm-hands-op-runner-teazy42f.js +0 -2
  96. package/bin/vm-hands/worker-sandbox-nnk7fq89.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Gk as M}from"./vm-hands-entry-lite-g87z5eb6.js";import{Mk as G}from"./vm-hands-entry-lite-f78n4wqt.js";import{readdirSync as D,readFileSync as I}from"fs";import{userInfo as A}from"os";var O="--vm-hands-op-runner-kind=person";function x(q){let Q=new Set([q]),K=[];try{K=D("/proc")}catch{}for(let z of K){if(!/^\d+$/.test(z))continue;try{let X=I(`/proc/${z}/stat`,"utf8");if(Number(X.slice(X.lastIndexOf(")")+2).split(" ")[3])===q)Q.add(Number(z))}catch{}}for(let z of Q)try{process.kill(z,"SIGKILL")}catch{}}var C=(q)=>{let Q=globalThis.Bun;if(!Q)throw new M("pty_unavailable","Reason terminals require the Bun runtime.");let K=Q.spawn({cmd:[q.shell,...q.args],cwd:q.cwd,env:{...q.environment,TERM:"xterm-256color"},terminal:{cols:q.cols,rows:q.rows,data:(J,Y)=>q.onData(Y)}}),z=K.terminal,X=()=>{x(K.pid);try{z?.close()}catch{}};if(!z)throw X(),new M("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(J)=>z.write(J),resize:(J,Y)=>z.resize(J,Y),kill:X,exited:K.exited.then((J)=>typeof J==="number"?J:null,()=>null)}};function L(){let q=(()=>{try{return A().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...q?{USER:q,LOGNAME:q}:{}}}async function P(){let[{executeLocalOperation:q,spawnCaptured:Q},{runLocalPtySession:K},{configureDesktopAccount:z},{configureWorkerSandbox:X}]=await Promise.all([import("./local-capabilities-dn2qbnyg.js"),import("./local-pty-session-8ny1n2fv.js"),import("./desktop-account-8yf4aqgb.js"),import("./worker-sandbox-nnk7fq89.js")]);X();let T=process.argv.includes(O),J=($,j,F)=>Q($,j[0]==="-lic"?["-lc",...j.slice(1)]:j,F),Y=(process.geteuid?.()??0)!==0,H=new Map,Z=($)=>{try{process.send?.($)}catch{}};process.on("message",($)=>{let j=$;if(j?.t==="cancel"){H.get(j.id)?.abort();return}if(j?.t!=="op")return;if(!Y){Z({t:"done",id:j.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let F=j.claim.capability;if(F==="pty.start"&&!T){Z({t:"done",id:j.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let U=new AbortController;H.set(j.id,U);let V=F==="pty.start"?{runPtySession:(B)=>K(B,{spawnPty:C,environment:L(),loadProxy:()=>null})}:{worker:j.worker,...F==="exec.full"?{spawnFullControl:J}:{}};q(j.state,j.claim,{...V,signal:U.signal,emit:(B)=>{let{deliverySignal:N,...W}=B;Z({t:"event",id:j.id,event:W})}}).then((B)=>Z({t:"done",id:j.id,completion:B}),(B)=>Z({t:"done",id:j.id,completion:{status:"failed",error_code:B&&typeof B==="object"&&"code"in B&&typeof B.code==="string"?B.code:"vm_hands_op_failed"}})).finally(()=>H.delete(j.id))}),process.on("disconnect",()=>process.exit(0)),await new Promise(()=>{})}
2
+ import{Kk as M}from"./vm-hands-entry-lite-69n9q5f1.js";import{Qk as G}from"./vm-hands-entry-lite-5d31qv44.js";import{readdirSync as D,readFileSync as I}from"fs";import{userInfo as A}from"os";var O="--vm-hands-op-runner-kind=person";function x(q){let Q=new Set([q]),K=[];try{K=D("/proc")}catch{}for(let z of K){if(!/^\d+$/.test(z))continue;try{let X=I(`/proc/${z}/stat`,"utf8");if(Number(X.slice(X.lastIndexOf(")")+2).split(" ")[3])===q)Q.add(Number(z))}catch{}}for(let z of Q)try{process.kill(z,"SIGKILL")}catch{}}var C=(q)=>{let Q=globalThis.Bun;if(!Q)throw new M("pty_unavailable","Reason terminals require the Bun runtime.");let K=Q.spawn({cmd:[q.shell,...q.args],cwd:q.cwd,env:{...q.environment,TERM:"xterm-256color"},terminal:{cols:q.cols,rows:q.rows,data:(J,Y)=>q.onData(Y)}}),z=K.terminal,X=()=>{x(K.pid);try{z?.close()}catch{}};if(!z)throw X(),new M("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(J)=>z.write(J),resize:(J,Y)=>z.resize(J,Y),kill:X,exited:K.exited.then((J)=>typeof J==="number"?J:null,()=>null)}};function L(){let q=(()=>{try{return A().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...q?{USER:q,LOGNAME:q}:{}}}async function P(){let[{executeLocalOperation:q,spawnCaptured:Q},{runLocalPtySession:K},{configureDesktopAccount:z},{configureWorkerSandbox:X}]=await Promise.all([import("./local-capabilities-jp7mfe90.js"),import("./local-pty-session-a0fz1f9t.js"),import("./desktop-account-r5fsgx43.js"),import("./worker-sandbox-ecjj14h5.js")]);X();let T=process.argv.includes(O),J=($,j,F)=>Q($,j[0]==="-lic"?["-lc",...j.slice(1)]:j,F),Y=(process.geteuid?.()??0)!==0,H=new Map,Z=($)=>{try{process.send?.($)}catch{}};process.on("message",($)=>{let j=$;if(j?.t==="cancel"){H.get(j.id)?.abort();return}if(j?.t!=="op")return;if(!Y){Z({t:"done",id:j.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let F=j.claim.capability;if(F==="pty.start"&&!T){Z({t:"done",id:j.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let U=new AbortController;H.set(j.id,U);let V=F==="pty.start"?{runPtySession:(B)=>K(B,{spawnPty:C,environment:L(),loadProxy:()=>null})}:{worker:j.worker,...F==="exec.full"?{spawnFullControl:J}:{}};q(j.state,j.claim,{...V,signal:U.signal,emit:(B)=>{let{deliverySignal:N,...W}=B;Z({t:"event",id:j.id,event:W})}}).then((B)=>Z({t:"done",id:j.id,completion:B}),(B)=>Z({t:"done",id:j.id,completion:{status:"failed",error_code:B&&typeof B==="object"&&"code"in B&&typeof B.code==="string"?B.code:"vm_hands_op_failed"}})).finally(()=>H.delete(j.id))}),process.on("disconnect",()=>process.exit(0)),await new Promise(()=>{})}
3
3
  export{O as s,C as t,P as u};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{D as T,F as U}from"./vm-hands-entry-lite-trm3dn8c.js";import{_c as V}from"./vm-hands-entry-lite-rtt2w6c6.js";import{ni as M,pi as Q}from"./vm-hands-entry-lite-csecgmaa.js";import{Di as G}from"./vm-hands-entry-lite-ksz1k1dh.js";function W(j,B){let k=G(j,"REASON_API_URL")?.trim();if(!k)return Q(B);let z=new URL(k);if(z.protocol!=="https:"&&!(z.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(z.hostname)))throw Error("REASON_API_URL must use HTTPS (HTTP is allowed only for loopback development).");return z.origin}function X(j){return G(j,"REASON_API_URL")?.trim()?W(j,"production"):void 0}function $(j){return G(j,"REASON_API_KEY")?.trim()||void 0}async function N(j,B){let k=j.env??process.env,z=$(k);if(!z)return(j.getCredentials??T)({apiOrigin:X(k),signal:B});let J=W(k,j.channel??M({env:k})),D=await(j.fetchImpl??fetch)(J+"/v3/self",{redirect:"error",headers:{authorization:"Bearer "+z,accept:"application/json"},signal:B}),L=await D.json().catch(()=>({})),w=V(L)?L:{};if(!D.ok){let H=typeof w.detail==="string"?w.detail:typeof w.message==="string"?w.message:"API key authentication failed ("+D.status+")";throw new U(D.status,typeof w.error==="string"?w.error:"api_key_auth_failed",H)}if(typeof w.org_id!=="string"||!w.org_id)throw Error("The API key in the environment did not resolve to a Workspace.");let Z=Array.isArray(w.scopes)?w.scopes.filter((H)=>typeof H==="string"):[];return{credentialKind:"api_key",apiOrigin:J,accessToken:z,orgId:w.org_id,clientId:"api-key",refreshToken:"",expiresAt:"",scopes:Z}}async function P(j){let B=await N(j),k=X(j.env??process.env);if(!B)throw Error(k?`Not signed in to ${k}. Set REASON_API_KEY, or run \`reason login --api-url ${k}\`.`:"Not signed in. Run `reason login`, or set REASON_API_KEY.");return B}
2
+ import{D as T,F as U}from"./vm-hands-entry-lite-cfwke54v.js";import{_c as V}from"./vm-hands-entry-lite-rtt2w6c6.js";import{ri as M,ti as Q}from"./vm-hands-entry-lite-gk3y60ap.js";import{Hi as G}from"./vm-hands-entry-lite-eatqxe5y.js";function W(j,B){let k=G(j,"REASON_API_URL")?.trim();if(!k)return Q(B);let z=new URL(k);if(z.protocol!=="https:"&&!(z.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(z.hostname)))throw Error("REASON_API_URL must use HTTPS (HTTP is allowed only for loopback development).");return z.origin}function X(j){return G(j,"REASON_API_URL")?.trim()?W(j,"production"):void 0}function $(j){return G(j,"REASON_API_KEY")?.trim()||void 0}async function N(j,B){let k=j.env??process.env,z=$(k);if(!z)return(j.getCredentials??T)({apiOrigin:X(k),signal:B});let J=W(k,j.channel??M({env:k})),D=await(j.fetchImpl??fetch)(J+"/v3/self",{redirect:"error",headers:{authorization:"Bearer "+z,accept:"application/json"},signal:B}),L=await D.json().catch(()=>({})),w=V(L)?L:{};if(!D.ok){let H=typeof w.detail==="string"?w.detail:typeof w.message==="string"?w.message:"API key authentication failed ("+D.status+")";throw new U(D.status,typeof w.error==="string"?w.error:"api_key_auth_failed",H)}if(typeof w.org_id!=="string"||!w.org_id)throw Error("The API key in the environment did not resolve to a Workspace.");let Z=Array.isArray(w.scopes)?w.scopes.filter((H)=>typeof H==="string"):[];return{credentialKind:"api_key",apiOrigin:J,accessToken:z,orgId:w.org_id,clientId:"api-key",refreshToken:"",expiresAt:"",scopes:Z}}async function P(j){let B=await N(j),k=X(j.env??process.env);if(!B)throw Error(k?`Not signed in to ${k}. Set REASON_API_KEY, or run \`reason login --api-url ${k}\`.`:"Not signed in. Run `reason login`, or set REASON_API_KEY.");return B}
3
3
  export{W as v,X as w,$ as x,N as y,P as z};