@reason-machines/cli-linux-arm64-musl 0.2.381 → 0.2.383
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.
- package/README.md +3 -1
- package/bin/ara +2 -2
- package/bin/vm-hands/api-credentials-xppmbg0m.js +2 -0
- package/bin/vm-hands/api-xmpbsm6b.js +2 -0
- package/bin/vm-hands/{ask-relay-fc0jc3t5.js → ask-relay-h8f5dmfh.js} +3 -3
- package/bin/vm-hands/connect-cli-qvfxpk5t.js +2 -0
- package/bin/vm-hands/{custom-endpoint-device-zhpake9f.js → custom-endpoint-device-bm94e9r0.js} +1 -1
- package/bin/vm-hands/desktop-account-3tnm4z5w.js +2 -0
- package/bin/vm-hands/{device-workspace-vbcry9d6.js → device-workspace-0xsj5ykf.js} +1 -1
- package/bin/vm-hands/hands-worker-source-azdrrhsz.js +2 -0
- package/bin/vm-hands/{index-bbk6a9sk.js → index-7f2kwwen.js} +1 -1
- package/bin/vm-hands/{install-receipt-7x81ek76.js → install-receipt-3xyx3rdd.js} +1 -1
- package/bin/vm-hands/local-automation-pvy9revm.js +2 -0
- package/bin/vm-hands/local-capabilities-zfzyknay.js +2 -0
- package/bin/vm-hands/local-desktop-users-ajb81vjm.js +2 -0
- package/bin/vm-hands/local-display-mac-9h6btvvq.js +2 -0
- package/bin/vm-hands/local-display-session-xqncvp30.js +2 -0
- package/bin/vm-hands/local-pty-session-cjas515w.js +2 -0
- package/bin/vm-hands/managed-runtime-s414h5nm.js +2 -0
- package/bin/vm-hands/{network-contract-zqvt1v0t.js → network-contract-dsw79qkc.js} +1 -1
- package/bin/vm-hands/package-smk3nqjs.js +2 -0
- package/bin/vm-hands/permissions-3mkk9mfw.js +2 -0
- package/bin/vm-hands/{reason-hands-protocol-8fxjynte.js → reason-hands-protocol-7d7xj1h3.js} +1 -1
- package/bin/vm-hands/serve-service-txzqn5kj.js +2 -0
- package/bin/vm-hands/status-23eqx9t3.js +96 -0
- package/bin/vm-hands/version-3gj9bqhc.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-7shpbsw8.js → vm-hands-entry-lite-1gxktkpe.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-2e18tm6w.js +245 -0
- package/bin/vm-hands/{vm-hands-entry-lite-g036gtem.js → vm-hands-entry-lite-2t0vcvd8.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-3dc4v5bd.js +11 -0
- package/bin/vm-hands/{vm-hands-entry-lite-hgkf1svv.js → vm-hands-entry-lite-41nygv3p.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-j2q1k9vb.js → vm-hands-entry-lite-51hmj6am.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-zfwg7ehq.js → vm-hands-entry-lite-5n4vsm6b.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-k7wwza46.js → vm-hands-entry-lite-7xbgw4m0.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-8fj07njx.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-3hbe4em3.js → vm-hands-entry-lite-9cmfthkq.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-4q8tsaqv.js → vm-hands-entry-lite-9r5tz2dx.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-45j8qwsf.js → vm-hands-entry-lite-9w5vs9zv.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-a0yfp7s2.js +251 -0
- package/bin/vm-hands/{vm-hands-entry-lite-za55dtte.js → vm-hands-entry-lite-ammr3xbc.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-dh5gwmyf.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-5pm6bhb8.js → vm-hands-entry-lite-e0gdt6r5.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-5kgvss4p.js → vm-hands-entry-lite-e2mjbqmr.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-ejm5er3h.js +7 -0
- package/bin/vm-hands/vm-hands-entry-lite-eqhsewc0.js +105 -0
- package/bin/vm-hands/{vm-hands-entry-lite-mh0xecf3.js → vm-hands-entry-lite-f02906k8.js} +4 -4
- package/bin/vm-hands/vm-hands-entry-lite-f5230h6t.js +67 -0
- package/bin/vm-hands/{vm-hands-entry-lite-zh8p7ndn.js → vm-hands-entry-lite-fb5dzy9x.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-yjn6sk08.js → vm-hands-entry-lite-fcrqyxz0.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-fyvgav60.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-g5grabna.js +540 -0
- package/bin/vm-hands/vm-hands-entry-lite-g7h6wjqy.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-34e71nbe.js → vm-hands-entry-lite-g8pj1jxa.js} +174 -16
- package/bin/vm-hands/vm-hands-entry-lite-h1rxv02g.js +458 -0
- package/bin/vm-hands/vm-hands-entry-lite-h8dbw0c7.js +4 -0
- package/bin/vm-hands/{vm-hands-entry-lite-nhtb458c.js → vm-hands-entry-lite-hnsm5t36.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-0asdf4pm.js → vm-hands-entry-lite-jzcc9h71.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-r6pap1kh.js → vm-hands-entry-lite-ma001vzh.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-anmv8hp7.js → vm-hands-entry-lite-mn64e4pt.js} +286 -104
- package/bin/vm-hands/{vm-hands-entry-lite-9cgm6g8t.js → vm-hands-entry-lite-pk3q774c.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-qef2ndkd.js +6 -0
- package/bin/vm-hands/vm-hands-entry-lite-qnnfvm5r.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-r8qg3wp1.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-rd0ak4ye.js +4 -0
- package/bin/vm-hands/{vm-hands-entry-lite-00qsbphw.js → vm-hands-entry-lite-rpn0frzb.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-g9rvf5qk.js → vm-hands-entry-lite-rtt2w6c6.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-sex82vb1.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-vcwgh8tr.js +346 -0
- package/bin/vm-hands/{vm-hands-entry-lite-dgxxsdwb.js → vm-hands-entry-lite-xrthfx3q.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-kxdw4myj.js → vm-hands-entry-lite-y2s2w174.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-hc3p6r9p.js → vm-hands-entry-lite-zjfr0zh8.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-qssgfea1.js → vm-hands-executor-9p92j0mv.js} +1 -1
- package/bin/vm-hands/vm-hands-op-runner-ers4cefp.js +2 -0
- package/bin/vm-hands/{vm-hands-runtime-5me6cpmn.js → vm-hands-runtime-en4gj0t0.js} +3 -3
- package/bin/vm-hands/worker-sandbox-tgqbmy6b.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-af9g18n7.js +0 -2
- package/bin/vm-hands/api-credentials-65mrr3tn.js +0 -2
- package/bin/vm-hands/connect-cli-j478km3s.js +0 -2
- package/bin/vm-hands/desktop-account-5zvgspyw.js +0 -2
- package/bin/vm-hands/hands-worker-source-h0b1j53p.js +0 -2
- package/bin/vm-hands/local-automation-c86tjeft.js +0 -2
- package/bin/vm-hands/local-capabilities-1h99gkt6.js +0 -2
- package/bin/vm-hands/local-desktop-users-0hadyvx1.js +0 -2
- package/bin/vm-hands/local-display-mac-v1pc7177.js +0 -2
- package/bin/vm-hands/local-display-session-tzq0hne8.js +0 -2
- package/bin/vm-hands/local-pty-session-hs7rq03x.js +0 -2
- package/bin/vm-hands/managed-runtime-5dqaaw1x.js +0 -2
- package/bin/vm-hands/package-3cd7cfyv.js +0 -2
- package/bin/vm-hands/permissions-vbyqjbyb.js +0 -2
- package/bin/vm-hands/serve-service-be739c9s.js +0 -2
- package/bin/vm-hands/status-s8ny6men.js +0 -96
- package/bin/vm-hands/version-8s4syrp2.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-1085xsma.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-4m40gwkf.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-62wmnm7g.js +0 -540
- package/bin/vm-hands/vm-hands-entry-lite-98076n5g.js +0 -62
- package/bin/vm-hands/vm-hands-entry-lite-bvbfcp1k.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-c01eyep6.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-dcynw6t2.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-hh24bq0d.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-jb2sr2r7.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-kt5aj2ax.js +0 -11
- package/bin/vm-hands/vm-hands-entry-lite-n9nnb482.js +0 -459
- package/bin/vm-hands/vm-hands-entry-lite-sb9a1jcn.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-xg3d0a2y.js +0 -340
- package/bin/vm-hands/vm-hands-entry-lite-zamt8xp7.js +0 -181
- package/bin/vm-hands/vm-hands-entry-lite-ze9msfq1.js +0 -3
- package/bin/vm-hands/vm-hands-op-runner-b76rjaps.js +0 -2
- package/bin/vm-hands/worker-sandbox-wpzkvwer.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Bk as N}from"./vm-hands-entry-lite-r8qg3wp1.js";import{randomUUID as K}from"crypto";import{closeSync as L,constants as V,fstatSync as M,lstatSync as Z,mkdirSync as $,openSync as O,readFileSync as T,realpathSync as b,renameSync as U,unlinkSync as X,writeFileSync as Y}from"fs";import{dirname as g,resolve as z}from"path";var A=65536;function J(j){try{return Z(j),!0}catch(q){if(q instanceof Error&&"code"in q&&q.code==="ENOENT")return!1;throw q}}function I(j,q=!1){if(!J(j)){if(!q)throw Error("worker_state_missing");D(j),$(j,{mode:448})}let C=Z(j);if(!C.isDirectory()||C.isSymbolicLink()||!N(C)||b(j)!==z(j))throw Error("worker_state_directory_not_private_or_canonical")}function D(j){let q=g(j);if(!J(q))D(q),$(q,{mode:448});if(b(q)!==z(q))throw Error("worker_parent_not_canonical")}function u(j,q=A){let C=O(j,V.O_RDONLY|V.O_NOFOLLOW);try{let G=M(C);if(!G.isFile()||G.nlink!==1||!N(G)||G.size>q)throw Error("worker_file_not_private");return T(C,"utf8")}finally{L(C)}}function f(j,q,C=A){let G=JSON.stringify(q);if(G===void 0)throw Error("worker_file_invalid");let Q=G+`
|
|
3
|
+
`;if(Buffer.byteLength(Q,"utf8")>C)throw Error("worker_file_too_large");if(I(g(j)),J(j))u(j,C);let H=`${j}.${K()}`;try{Y(H,Q,{mode:384,flag:"wx"}),U(H,j)}finally{if(J(H))X(H)}}
|
|
4
|
+
export{J as $c,I as ad,u as bd,f as cd};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{D as T,F as U}from"./vm-hands-entry-lite-
|
|
2
|
+
import{D as T,F as U}from"./vm-hands-entry-lite-f02906k8.js";import{_c as V}from"./vm-hands-entry-lite-rtt2w6c6.js";import{mi as M,oi as Q}from"./vm-hands-entry-lite-e2mjbqmr.js";import{Ci as G}from"./vm-hands-entry-lite-ma001vzh.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Vi as F}from"./vm-hands-entry-lite-sex82vb1.js";import{$i as d,Yi as T,bj as p,fj as n,gj as a}from"./vm-hands-entry-lite-9r5tz2dx.js";import{lj as j,nj as v}from"./vm-hands-entry-lite-fyvgav60.js";import{Lj as l}from"./vm-hands-entry-lite-7xbgw4m0.js";import{ck as m,dk as h}from"./vm-hands-entry-lite-1gxktkpe.js";import{Kk as y}from"./vm-hands-entry-lite-2t0vcvd8.js";import{spawnSync as Eq}from"child_process";import{dirname as I}from"path";import{spawn as r}from"child_process";import{accessSync as e,constants as qq}from"fs";import{basename as zq,join as Jq}from"path";var V=null;function O(q){if(V===q)V=null;if(q.exitCode===null&&q.signalCode===null)q.kill("SIGTERM")}var _=(q,z)=>{if(V)O(V);let Q=Jq(q,T);try{e(Q,qq.X_OK)}catch{return()=>{}}let J;try{J=r(Q,["--app",q,"--name",zq(q,".app"),"--permission",z==="screen"?"screen_recording":"accessibility"],{detached:!0,stdio:"ignore"})}catch{return()=>{}}return J.on("error",()=>{if(V===J)V=null}),J.once("exit",()=>{if(V===J)V=null}),J.unref(),V=J,()=>O(J)};import{chmodSync as Qq,existsSync as x,mkdirSync as Xq,readFileSync as Zq,realpathSync as k,renameSync as $q,statSync as G,writeFileSync as Kq}from"fs";import{dirname as P,isAbsolute as Rq,join as Vq,resolve as S,sep as W}from"path";function U(q=j()){return Vq(v(q),"reason","protected-path-grants.json")}var B=null;function Yq(q){let z=JSON.parse(q);if(!Array.isArray(z?.grants))return[];return z.grants.flatMap((Q)=>{let J=Q;return J&&typeof J.path==="string"&&Rq(J.path)&&(J.kind==="file"||J.kind==="folder")&&typeof J.grantedAt==="number"?[{path:J.path,kind:J.kind,grantedAt:J.grantedAt}]:[]})}function D(q=U()){try{let{mtimeMs:z}=G(q);if(B&&B.file===q&&B.mtimeMs===z)return B.grants;let Q=Yq(Zq(q,"utf8"));return B={file:q,mtimeMs:z,grants:Q},Q}catch{return[]}}function Bq(q,z){return q.kind==="file"?z===q.path:z===q.path||z.startsWith(`${q.path}${W}`)}function Dq(q,z){let Q=S(q);return D(z).some((J)=>Bq(J,Q))}function Sq(q,z){return F(q)&&!Dq(q,z)}function w(q,z){Xq(P(z),{recursive:!0,mode:448});let Q=`${z}.${process.pid}.tmp`;Kq(Q,`${JSON.stringify({version:1,grants:q},null,2)}
|
|
3
3
|
`,{mode:384}),Qq(Q,384),$q(Q,z),B=null}function b(q,z=U(),Q=Date.now()){if(!x(q))throw Error(`No file or folder at ${q}.`);let J=k(q),X=P(z);if(X===J||X.startsWith(`${J}${W}`)||J.startsWith(`${X}${W}`))throw Error("Reason's own configuration folder cannot be allowed.");let Z={path:J,kind:G(J).isDirectory()?"folder":"file",grantedAt:Q},$=D(z).filter((R)=>R.path!==J);return w([...$,Z],z),Z}function u(q,z=U()){let Q=x(q)?k(q):S(q),J=D(z),X=J.filter((Z)=>Z.path!==Q);if(X.length===J.length)return!1;return w(X,z),!0}function wq(q,z,Q){let J=z?"file-read* file-write*":"file-read*";return D(Q).filter((X)=>X.path===q||X.path.startsWith(`${q}${W}`)).map((X)=>`(allow ${J} (${X.kind==="file"?"literal":"subpath"} ${JSON.stringify(X.path)}))`)}var f=`Reason permissions
|
|
4
4
|
|
|
5
5
|
Usage:
|
|
@@ -20,7 +20,7 @@ this Mac may open. Only you can change this list; Sessions cannot.
|
|
|
20
20
|
allow asks for each missing one, or the one named. macOS cannot ask for Full
|
|
21
21
|
Disk Access: allow disk opens its pane, shows the file to add in Finder and
|
|
22
22
|
waits until the worker has it.
|
|
23
|
-
`,M="x-apple.systempreferences:com.apple.preference.security",Nq="curl -fsSL https://reasonmachines.com/install.sh | bash",Hq=180000,Wq=2000,A=["screen","accessibility","disk"],L={screen:{label:"Screen & System Audio Recording",purpose:"desktop video, computer-use screenshots",level:"required",pane:`${M}?Privacy_ScreenCapture`},accessibility:{label:"Accessibility",purpose:"computer-use clicks and typing, desktop input",level:"required",pane:`${M}?Privacy_Accessibility`},disk:{label:"Full Disk Access",purpose:"Sessions in Desktop, Documents, Downloads, iCloud Drive and Mail",level:"recommended",pane:`${M}?Privacy_AllFiles`}};function s(q){return q.executable}function jq(q,z){if(q==="computer_use_identity_missing")return`Reason's background identity is not installed (${q}); reinstall Reason: ${Nq}`;if(q==="computer_use_identity_outdated")return`Reason's background identity is outdated (${p(z)??"unknown"}; this CLI is ${l}) (${q}); \`reason update\` installs this release's`;return`Reason's background identity cannot run computer use for this CLI (${q}); run the installed \`reason\``}function Cq(q=j()){let z=n(q);if(z.length>0)return{state:"ready",path:I(I(I(z[0]))),prefix:z};let Q=a(z,q)??"computer_use_identity_unavailable";return{state:Q,path:d(q),detail:jq(Q,q)}}function o(){return{identity:()=>Cq(),grants:(q)=>m(q),request:(q,z)=>h(q,z),worker:async()=>(await import("./status-
|
|
23
|
+
`,M="x-apple.systempreferences:com.apple.preference.security",Nq="curl -fsSL https://reasonmachines.com/install.sh | bash",Hq=180000,Wq=2000,A=["screen","accessibility","disk"],L={screen:{label:"Screen & System Audio Recording",purpose:"desktop video, computer-use screenshots",level:"required",pane:`${M}?Privacy_ScreenCapture`},accessibility:{label:"Accessibility",purpose:"computer-use clicks and typing, desktop input",level:"required",pane:`${M}?Privacy_Accessibility`},disk:{label:"Full Disk Access",purpose:"Sessions in Desktop, Documents, Downloads, iCloud Drive and Mail",level:"recommended",pane:`${M}?Privacy_AllFiles`}};function s(q){return q.executable}function jq(q,z){if(q==="computer_use_identity_missing")return`Reason's background identity is not installed (${q}); reinstall Reason: ${Nq}`;if(q==="computer_use_identity_outdated")return`Reason's background identity is outdated (${p(z)??"unknown"}; this CLI is ${l}) (${q}); \`reason update\` installs this release's`;return`Reason's background identity cannot run computer use for this CLI (${q}); run the installed \`reason\``}function Cq(q=j()){let z=n(q);if(z.length>0)return{state:"ready",path:I(I(I(z[0]))),prefix:z};let Q=a(z,q)??"computer_use_identity_unavailable";return{state:Q,path:d(q),detail:jq(Q,q)}}function o(){return{identity:()=>Cq(),grants:(q)=>m(q),request:(q,z)=>h(q,z),worker:async()=>(await import("./status-23eqx9t3.js")).connectionMacState(),open:(q)=>{Eq("/usr/bin/open",q,{stdio:"ignore",timeout:1e4})},tile:_,restartConnection:async()=>(await import("./connect-cli-qvfxpk5t.js")).restartConnection(),sleep:(q)=>new Promise((z)=>setTimeout(z,q)),now:()=>Date.now()}}function c(q,z,Q){if(q.state!=="ready"||!z)return"unknown";return z[Q]?"granted":"missing"}async function i(q){let z=q.identity(),Q=z.state==="ready"?await q.grants(z.prefix):null,J=await q.worker(),X=J?s(J):null,Z=!X||J?.full_disk_access==="unknown"?"unknown":J?.full_disk_access==="granted"?"granted":"missing",$=(R,Y,K)=>{let{label:E,purpose:H,level:N}=L[R];return{id:R,label:E,purpose:H,level:N,state:Y,holder:K}};return{identity:{state:z.state,path:z.path,detail:z.state==="ready"?null:z.detail},worker_detail:X?null:"Full Disk Access is read from this computer's running worker; `reason connect` starts it.",permissions:[$("screen",c(z,Q,"screen"),z.path),$("accessibility",c(z,Q,"accessibility"),z.path),$("disk",Z,X)]}}function dq(q){let z=q.identity.state==="ready"?null:q.identity.state,Q=q.permissions.filter((Z)=>Z.state==="granted").length,J=[...z?[z]:[],...q.permissions.filter((Z)=>Z.state!=="granted"&&!(z&&Z.id!=="disk")).map((Z)=>`${Z.label} ${Z.state}`)],X=!z&&q.permissions.some((Z)=>Z.state==="missing");return`Permissions: ${Q} of ${q.permissions.length}${J.length>0?` (${J.join(", ")})`:""}`+(X?" \u2014 reason permissions allow":J.length>0?" \u2014 reason permissions":"")}function Uq(q){let z=[];if(q.identity.detail)z.push(q.identity.detail);z.push(`Reason: ${q.identity.path}`);let Q=q.permissions.find((J)=>J.id==="disk");z.push(Q?.holder?`Worker: ${Q.holder}`:`Worker: ${q.worker_detail}`),z.push("");for(let J of q.permissions){let X=`${J.label}${J.level==="recommended"?" (recommended)":""}`;z.push(` ${J.id.padEnd(13)} ${J.state.padEnd(7)} ${X}: ${J.purpose}`)}if(q.permissions.some((J)=>J.state==="missing"))z.push("","Allow the missing ones: reason permissions allow");return`${z.join(`
|
|
24
24
|
`)}
|
|
25
25
|
`}async function g(q,z){let Q=z.now()+Hq;for(;;){if(await q())return!0;if(z.now()>=Q)return!1;await z.sleep(Wq)}}async function Iq(q,z){let Q=z.host??o(),{io:J}=z,X=await i(Q),Z=X.permissions.filter((K)=>q.includes(K.id)&&K.state!=="granted");if(Z.length===0)return J.stdout.write(`Reason permissions: ${q.map((K)=>L[K].label).join(", ")} already allowed.
|
|
26
26
|
`),0;let $=!1,R=!1,Y=Q.identity();for(let K of Z){let{label:E,pane:H}=L[K.id];if(K.id!=="disk"){if(Y.state!=="ready"){if(!$)J.stderr.write(`Reason permissions: ${Y.detail}
|
|
@@ -49,4 +49,4 @@ ${f}`),1;if(J.command==="help")return Q.stdout.write(f),0;if(J.command==="protec
|
|
|
49
49
|
`).join(""):`No protected paths are allowed on this computer.
|
|
50
50
|
`),0}catch(Q){return z.stderr.write(`${Q instanceof Error?Q.message:String(Q)}
|
|
51
51
|
`),1}}
|
|
52
|
-
export{Sq as
|
|
52
|
+
export{Sq as Ei,wq as Fi,_ as Gi,f as Hi,A as Ii,s as Ji,Cq as Ki,i as Li,dq as Mi,Uq as Ni,Iq as Oi,Mq as Pi,pq as Qi};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var p={REASON_API_KEY:"ARA_API_KEY",REASON_API_URL:"ARA_API_URL",REASON_CLI_CHANNEL:"ARA_CLI_CHANNEL",REASON_CLI_LAUNCHER_PATH:"ARA_CLI_LAUNCHER_PATH",REASON_MANAGED_RUNTIME_ROOT:"ARA_MANAGED_RUNTIME_ROOT",REASON_INSTALL_ALIAS_PATH:"ARA_INSTALL_ALIAS_PATH",REASON_INSTALL_DIR:"ARA_INSTALL_DIR",REASON_INSTALL_METHOD:"ARA_INSTALL_METHOD",REASON_INSTALL_PINNED_VERSION:"ARA_INSTALL_PINNED_VERSION",REASON_INSTALL_UPGRADE:"ARA_INSTALL_UPGRADE"},z=Object.values(p),x=new Set;function B(k,j){let q=k[j];if(q?.trim())return q;let w=k[p[j]];if(w?.trim())x.add(p[j]);return w}function D(k,j){return{[k]:j,[p[k]]:j}}
|
|
3
|
-
export{B as
|
|
3
|
+
export{B as Ci,D as Di};
|