@reason-machines/cli-linux-x64 0.2.559 → 0.2.561
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/bin/reason +2 -2
- package/bin/vm-hands/agent-network-kk36zca7.js +2 -0
- package/bin/vm-hands/api-credentials-mtfdk175.js +2 -0
- package/bin/vm-hands/api-w6w7vfp3.js +2 -0
- package/bin/vm-hands/ask-relay-xx0rzpch.js +5 -0
- package/bin/vm-hands/connect-cli-dmwph620.js +2 -0
- package/bin/vm-hands/credentials-s7ps7y6s.js +2 -0
- package/bin/vm-hands/custom-endpoint-device-3xnrp33e.js +2 -0
- package/bin/vm-hands/desktop-account-eg8thn79.js +2 -0
- package/bin/vm-hands/device-workspace-h5rsecq8.js +2 -0
- package/bin/vm-hands/{fsevents-fev1pxw2.js → fsevents-vxv56sp5.js} +1 -1
- package/bin/vm-hands/hands-worker-source-vk664w8p.js +2 -0
- package/bin/vm-hands/{index-j6wffzfd.js → index-03p9c17x.js} +106 -106
- package/bin/vm-hands/install-receipt-j04hdw1k.js +2 -0
- package/bin/vm-hands/local-automation-vvt9d9xb.js +2 -0
- package/bin/vm-hands/local-capabilities-pwv76ns5.js +2 -0
- package/bin/vm-hands/local-desktop-users-sq4trh07.js +2 -0
- package/bin/vm-hands/local-display-mac-yxcxvg2z.js +2 -0
- package/bin/vm-hands/local-display-session-axh9mfdk.js +2 -0
- package/bin/vm-hands/local-display-video-pxhztqk7.js +2 -0
- package/bin/vm-hands/local-managed-process-4mgqn7tg.js +2 -0
- package/bin/vm-hands/local-pty-session-edd8ttf9.js +2 -0
- package/bin/vm-hands/managed-runtime-pcagtyfz.js +2 -0
- package/bin/vm-hands/network-auto-update-wkzb91qz.js +3 -0
- package/bin/vm-hands/network-contract-8mxtma3w.js +2 -0
- package/bin/vm-hands/network-sign-in-61gmpmaa.js +3 -0
- package/bin/vm-hands/package-vwvzjtn0.js +2 -0
- package/bin/vm-hands/permissions-348prrcx.js +2 -0
- package/bin/vm-hands/reason-hands-protocol-1nkpw1v3.js +2 -0
- package/bin/vm-hands/serve-service-3dkyznay.js +2 -0
- package/bin/vm-hands/status-khqk4cjw.js +96 -0
- package/bin/vm-hands/version-c1hen0wn.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-0wb1n769.js +9 -0
- package/bin/vm-hands/{vm-hands-entry-lite-506b6pcz.js → vm-hands-entry-lite-2dak7e1h.js} +5 -5
- package/bin/vm-hands/{vm-hands-entry-lite-a3p6xz53.js → vm-hands-entry-lite-2rgf8866.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-52qz0n30.js +7 -0
- package/bin/vm-hands/vm-hands-entry-lite-57ajjwmh.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-5y4phfv1.js +4 -0
- package/bin/vm-hands/vm-hands-entry-lite-6jxshhps.js +9 -0
- package/bin/vm-hands/vm-hands-entry-lite-71ebge0c.js +42 -0
- package/bin/vm-hands/vm-hands-entry-lite-7pfhwxn5.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-84mc1f7h.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-8xv6c0rm.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-9g52kxyj.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-8rmbdm6c.js → vm-hands-entry-lite-9yfmkd1f.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-a6ss0ges.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-a7bf7xr7.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-ab1pq3xg.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-bj3w2ven.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-q1yvw4xz.js → vm-hands-entry-lite-e3fn8ys2.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-gxpw14jv.js +11 -0
- package/bin/vm-hands/vm-hands-entry-lite-h7nk2848.js +539 -0
- package/bin/vm-hands/vm-hands-entry-lite-hjjbjpd7.js +4 -0
- package/bin/vm-hands/vm-hands-entry-lite-hn9pq7zj.js +127 -0
- package/bin/vm-hands/vm-hands-entry-lite-hs6sdn60.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-ht6hzkgj.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-hxfxs7r9.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-2v4zh9ze.js → vm-hands-entry-lite-j10cw3d9.js} +9 -9
- package/bin/vm-hands/vm-hands-entry-lite-jgk5z8zc.js +10 -0
- package/bin/vm-hands/vm-hands-entry-lite-jpvmkce5.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-k5ytpgzz.js +65 -0
- package/bin/vm-hands/{vm-hands-entry-lite-s85p7tqp.js → vm-hands-entry-lite-krpqqx12.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-m1we91g4.js +105 -0
- package/bin/vm-hands/{vm-hands-entry-lite-q2h781jg.js → vm-hands-entry-lite-ms99mzp0.js} +3 -3
- package/bin/vm-hands/vm-hands-entry-lite-nn6zcvmp.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-46pwqvpf.js → vm-hands-entry-lite-ptycjmkc.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-pxtycfdv.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-q9djb28r.js +4 -0
- package/bin/vm-hands/vm-hands-entry-lite-q9s1e2y1.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-pzj5s203.js → vm-hands-entry-lite-qf990rxw.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-sy7dcccg.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-tcmye5ny.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-1yv5qqew.js → vm-hands-entry-lite-v4hr9x9h.js} +45 -45
- package/bin/vm-hands/vm-hands-entry-lite-vdv4nm5f.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-vkhacd00.js +452 -0
- package/bin/vm-hands/vm-hands-entry-lite-wcgm41jq.js +52 -0
- package/bin/vm-hands/vm-hands-entry-lite-weqam12f.js +6 -0
- package/bin/vm-hands/{vm-hands-entry-lite-jrce7v4r.js → vm-hands-entry-lite-xvccy3z4.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-y3nz20wb.js +345 -0
- package/bin/vm-hands/vm-hands-entry-lite-yvws5zpx.js +4 -0
- package/bin/vm-hands/{vm-hands-entry-lite-qd46yhvz.js → vm-hands-entry-lite-z0ht62s4.js} +3 -3
- package/bin/vm-hands/vm-hands-entry-lite-z213y4pj.js +150 -0
- package/bin/vm-hands/vm-hands-entry-lite-zawytz09.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-h2rq71rj.js → vm-hands-entry-lite-zh6ncdjn.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite.js +2 -2
- package/bin/vm-hands/{vm-hands-executor-p2jvbq5w.js → vm-hands-executor-csdtg7kj.js} +8 -8
- package/bin/vm-hands/vm-hands-op-runner-z7tsd84c.js +2 -0
- package/bin/vm-hands/{vm-hands-runtime-889hfy4p.js → vm-hands-runtime-1qxf96z7.js} +3 -3
- package/bin/vm-hands/worker-preview-readiness-06tygyjs.js +2 -0
- package/bin/vm-hands/worker-sandbox-e1cpkzfz.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-credentials-x30e4ezb.js +0 -2
- package/bin/vm-hands/api-y6v8wdsq.js +0 -2
- package/bin/vm-hands/connect-cli-32wrv6sw.js +0 -2
- package/bin/vm-hands/credentials-sbza33ac.js +0 -2
- package/bin/vm-hands/custom-endpoint-device-mydksbg8.js +0 -2
- package/bin/vm-hands/desktop-account-t0afsge2.js +0 -2
- package/bin/vm-hands/device-workspace-b534qy2c.js +0 -2
- package/bin/vm-hands/hands-worker-source-qj7s9dk5.js +0 -2
- package/bin/vm-hands/install-receipt-zv1bjbgh.js +0 -2
- package/bin/vm-hands/local-automation-pwwqrnt7.js +0 -2
- package/bin/vm-hands/local-capabilities-scnpxe96.js +0 -2
- package/bin/vm-hands/local-desktop-users-5scb9930.js +0 -2
- package/bin/vm-hands/local-display-mac-pft73te9.js +0 -2
- package/bin/vm-hands/local-display-session-9362hqsn.js +0 -2
- package/bin/vm-hands/local-display-video-dndhr5v1.js +0 -2
- package/bin/vm-hands/local-managed-process-zm639p1g.js +0 -2
- package/bin/vm-hands/local-pty-session-njd0tprg.js +0 -2
- package/bin/vm-hands/managed-runtime-cqkw2mtn.js +0 -2
- package/bin/vm-hands/network-contract-kx0hz3wt.js +0 -2
- package/bin/vm-hands/package-way7qesn.js +0 -2
- package/bin/vm-hands/permissions-jxycbgay.js +0 -2
- package/bin/vm-hands/reason-hands-protocol-g54rtrhd.js +0 -2
- package/bin/vm-hands/serve-service-byvya1ym.js +0 -2
- package/bin/vm-hands/status-f1k1qmck.js +0 -10
- package/bin/vm-hands/version-czwf27v3.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-04x5xjt6.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-07apxfh8.js +0 -42
- package/bin/vm-hands/vm-hands-entry-lite-0wsr8edk.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-1tgxze8w.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-2twtpxmp.js +0 -9
- package/bin/vm-hands/vm-hands-entry-lite-3gbf905c.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-48rphbjm.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-4anjdcth.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-73f4cgkf.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-8dfw96ym.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-ak0hd94p.js +0 -7
- package/bin/vm-hands/vm-hands-entry-lite-bpamn7ny.js +0 -9
- package/bin/vm-hands/vm-hands-entry-lite-dgfx0rbn.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-ecz6fzds.js +0 -126
- package/bin/vm-hands/vm-hands-entry-lite-frd7e74y.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-fxzadxz4.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-gje7xvy9.js +0 -6
- package/bin/vm-hands/vm-hands-entry-lite-h1qjggz0.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-j3fw7x65.js +0 -14
- package/bin/vm-hands/vm-hands-entry-lite-jydpev8e.js +0 -452
- package/bin/vm-hands/vm-hands-entry-lite-k84zsash.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-kf2jgke1.js +0 -150
- package/bin/vm-hands/vm-hands-entry-lite-m0gsez4t.js +0 -539
- package/bin/vm-hands/vm-hands-entry-lite-n7bd44rm.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-p5ny1pw4.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-qcktp8d9.js +0 -52
- package/bin/vm-hands/vm-hands-entry-lite-ravxhygk.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-s0rx4fm8.js +0 -105
- package/bin/vm-hands/vm-hands-entry-lite-tyem93c1.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-vj7xzb3y.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-wghmyfba.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-wzv13c8k.js +0 -65
- package/bin/vm-hands/vm-hands-entry-lite-yptpy066.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-yretc2th.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-zf0h0qjy.js +0 -2
- package/bin/vm-hands/vm-hands-op-runner-2bfbyj4e.js +0 -2
- package/bin/vm-hands/worker-preview-readiness-gy36ejp9.js +0 -2
- package/bin/vm-hands/worker-sandbox-f1tfb3y0.js +0 -2
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Xt,Er}from"./vm-hands-entry-lite-j10cw3d9.js";import{g}from"./vm-hands-entry-lite-bj3w2ven.js";import{Ic,ot,Yt,kr,In}from"./vm-hands-entry-lite-6jxshhps.js";import{L}from"./vm-hands-entry-lite-ptycjmkc.js";import{s,St}from"./vm-hands-entry-lite-zawytz09.js";import{spawnSync as se}from"child_process";import{dirname as S}from"path";import{spawn as U}from"child_process";import{accessSync as H,constants as J}from"fs";import{basename as q,join as B}from"path";var d=null;function R(e){if(d===e)d=null;if(e.exitCode===null&&e.signalCode===null)e.kill("SIGTERM")}var Li=(e,t)=>{if(d)R(d);let r=B(e,Ic);try{H(r,J.X_OK)}catch{return()=>{}}let n;try{n=U(r,["--app",e,"--name",q(e,".app"),"--permission",t==="screen"?"screen_recording":"accessibility"],{detached:!0,stdio:"ignore"})}catch{return()=>{}}return n.on("error",()=>{if(d===n)d=null}),n.once("exit",()=>{if(d===n)d=null}),n.unref(),d=n,()=>R(n)};import{chmodSync as K,existsSync as I,mkdirSync as V,readFileSync as Y,realpathSync as A,renameSync as X,statSync as _,writeFileSync as z}from"fs";import{dirname as v,isAbsolute as Q,join as Z,resolve as C,sep as w}from"path";function k(e=s()){return Z(St(e),"reason","protected-path-grants.json")}var p=null;function ee(e){let t=JSON.parse(e);if(!Array.isArray(t?.grants))return[];return t.grants.flatMap((r)=>{let n=r;return n&&typeof n.path==="string"&&Q(n.path)&&(n.kind==="file"||n.kind==="folder")&&typeof n.grantedAt==="number"?[{path:n.path,kind:n.kind,grantedAt:n.grantedAt}]:[]})}function m(e=k()){try{let{mtimeMs:t}=_(e);if(p&&p.file===e&&p.mtimeMs===t)return p.grants;let r=ee(Y(e,"utf8"));return p={file:e,mtimeMs:t,grants:r},r}catch{return[]}}function te(e,t){return e.kind==="file"?t===e.path:t===e.path||t.startsWith(`${e.path}${w}`)}function ne(e,t){let r=C(e);return m(t).some((n)=>te(n,r))}function yc(e,t){return L(e)&&!ne(e,t)}function O(e,t){V(v(t),{recursive:!0,mode:448});let r=`${t}.${process.pid}.tmp`;z(r,`${JSON.stringify({version:1,grants:e},null,2)}
|
|
3
|
+
`,{mode:384}),K(r,384),X(r,t),p=null}function D(e,t=k(),r=Date.now()){if(!I(e))throw Error(`No file or folder at ${e}.`);let n=A(e),i=v(t);if(i===n||i.startsWith(`${n}${w}`)||n.startsWith(`${i}${w}`))throw Error("Reason's own configuration folder cannot be allowed.");let o={path:n,kind:_(n).isDirectory()?"folder":"file",grantedAt:r},a=m(t).filter((l)=>l.path!==n);return O([...a,o],t),o}function j(e,t=k()){let r=I(e)?A(e):C(e),n=m(t),i=n.filter((o)=>o.path!==r);if(i.length===n.length)return!1;return O(i,t),!0}function wc(e,t,r){let n=t?"file-read* file-write*":"file-read*";return m(r).filter((i)=>i.path===e||i.path.startsWith(`${e}${w}`)).map((i)=>`(allow ${n} (${i.kind==="file"?"literal":"subpath"} ${JSON.stringify(i.path)}))`)}var G=`Reason permissions
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
reason permissions [--json]
|
|
7
|
+
reason permissions allow [screen|accessibility|disk]
|
|
8
|
+
reason permissions protected [list|allow <path>|revoke <path>] [--json]
|
|
9
|
+
|
|
10
|
+
The macOS privacy permissions of this computer's Reason worker:
|
|
11
|
+
screen Screen & System Audio Recording: desktop video, computer-use screenshots
|
|
12
|
+
accessibility Accessibility: computer-use clicks and typing, desktop input
|
|
13
|
+
disk Full Disk Access (recommended): Sessions in Desktop, Documents,
|
|
14
|
+
Downloads, iCloud Drive and Mail
|
|
15
|
+
|
|
16
|
+
protected lists, allows or revokes files and folders on Reason's credential
|
|
17
|
+
denylist (shell startup files, ~/.ssh, .env and similar) that every Session on
|
|
18
|
+
this Mac may open. Only you can change this list; Sessions cannot.
|
|
19
|
+
|
|
20
|
+
allow asks for each missing one, or the one named. macOS cannot ask for Full
|
|
21
|
+
Disk Access: allow disk opens its pane, shows the file to add in Finder and
|
|
22
|
+
waits until the worker has it.
|
|
23
|
+
`,b="x-apple.systempreferences:com.apple.preference.security",re="curl -fsSL https://reasonmachines.com/install.sh | bash",ie=180000,oe=2000,M=["screen","accessibility","disk"],x={screen:{label:"Screen & System Audio Recording",purpose:"desktop video, computer-use screenshots",level:"required",pane:`${b}?Privacy_ScreenCapture`},accessibility:{label:"Accessibility",purpose:"computer-use clicks and typing, desktop input",level:"required",pane:`${b}?Privacy_Accessibility`},disk:{label:"Full Disk Access",purpose:"Sessions in Desktop, Documents, Downloads, iCloud Drive and Mail",level:"recommended",pane:`${b}?Privacy_AllFiles`}};function F(e){return e.executable}function ae(e,t){if(e==="computer_use_identity_missing")return`Reason's background identity is not installed (${e}); reinstall Reason: ${re}`;if(e==="computer_use_identity_outdated")return`Reason's background identity is outdated (${Yt(t)??"unknown"}; this CLI is ${g}) (${e}); \`reason update\` installs this release's`;return`Reason's background identity cannot run computer use for this CLI (${e}); run the installed \`reason\``}function Qc(e=s()){let t=kr(e);if(t.length>0)return{state:"ready",path:S(S(S(t[0]))),prefix:t};let r=In(t,e)??"computer_use_identity_unavailable";return{state:r,path:ot(e),detail:ae(r,e)}}function E(){return{identity:()=>Qc(),grants:(e)=>Xt(e),request:(e,t)=>Er(e,t),worker:async()=>(await import("./status-khqk4cjw.js")).connectionMacState(),open:(e)=>{se("/usr/bin/open",e,{stdio:"ignore",timeout:1e4})},tile:Li,restartConnection:async()=>(await import("./connect-cli-dmwph620.js")).restartConnection(),sleep:(e)=>new Promise((t)=>setTimeout(t,e)),now:()=>Date.now()}}function N(e,t,r){if(e.state!=="ready"||!t)return"unknown";return t[r]?"granted":"missing"}async function bc(e){let t=e.identity(),r=t.state==="ready"?await e.grants(t.prefix):null,n=await e.worker(),i=n?F(n):null,o=!i||n?.full_disk_access==="unknown"?"unknown":n?.full_disk_access==="granted"?"granted":"missing",a=(l,u,c)=>{let{label:f,purpose:y,level:h}=x[l];return{id:l,label:f,purpose:y,level:h,state:u,holder:c}};return{identity:{state:t.state,path:t.path,detail:t.state==="ready"?null:t.detail},worker_detail:i?null:"Full Disk Access is read from this computer's running worker; `reason connect` starts it.",permissions:[a("screen",N(t,r,"screen"),t.path),a("accessibility",N(t,r,"accessibility"),t.path),a("disk",o,i)]}}function vl(e){let t=e.identity.state==="ready"?null:e.identity.state,r=e.permissions.filter((o)=>o.state==="granted").length,n=[...t?[t]:[],...e.permissions.filter((o)=>o.state!=="granted"&&!(t&&o.id!=="disk")).map((o)=>`${o.label} ${o.state}`)],i=!t&&e.permissions.some((o)=>o.state==="missing");return`Permissions: ${r} of ${e.permissions.length}${n.length>0?` (${n.join(", ")})`:""}`+(i?" \u2014 reason permissions allow":n.length>0?" \u2014 reason permissions":"")}function ce(e){let t=[];if(e.identity.detail)t.push(e.identity.detail);t.push(`Reason: ${e.identity.path}`);let r=e.permissions.find((n)=>n.id==="disk");t.push(r?.holder?`Worker: ${r.holder}`:`Worker: ${e.worker_detail}`),t.push("");for(let n of e.permissions){let i=`${n.label}${n.level==="recommended"?" (recommended)":""}`;t.push(` ${n.id.padEnd(13)} ${n.state.padEnd(7)} ${i}: ${n.purpose}`)}if(e.permissions.some((n)=>n.state==="missing"))t.push("","Allow the missing ones: reason permissions allow");return`${t.join(`
|
|
24
|
+
`)}
|
|
25
|
+
`}async function T(e,t){let r=t.now()+ie;for(;;){if(await e())return!0;if(t.now()>=r)return!1;await t.sleep(oe)}}async function el(e,t){let r=t.host??E(),{io:n}=t,i=await bc(r),o=i.permissions.filter((c)=>e.includes(c.id)&&c.state!=="granted");if(o.length===0)return n.stdout.write(`Reason permissions: ${e.map((c)=>x[c].label).join(", ")} already allowed.
|
|
26
|
+
`),0;let a=!1,l=!1,u=r.identity();for(let c of o){let{label:f,pane:y}=x[c.id];if(c.id!=="disk"){if(u.state!=="ready"){if(!a)n.stderr.write(`Reason permissions: ${u.detail}
|
|
27
|
+
`);a=!0;continue}let P=c.id;await r.request(u.prefix,P),r.open([y]);let W=r.tile(u.path,P);if(n.stdout.write(`Allow Reason in System Settings > Privacy & Security > ${f}.
|
|
28
|
+
`),!t.wait)continue;if(n.stdout.write(`Waiting for it (Ctrl-C to stop)\u2026
|
|
29
|
+
`),await T(async()=>(await r.grants(u.prefix))?.[P]===!0,r).finally(W))n.stdout.write(`${f}: granted.
|
|
30
|
+
`),l=!0;else n.stderr.write(`${f} is not allowed yet; turn on Reason there, then run \`reason permissions\`.
|
|
31
|
+
`),a=!0;continue}let h=F(await r.worker()??{executable:null});if(!h){n.stderr.write(`Reason permissions: ${i.worker_detail} Then run \`reason permissions allow disk\`.
|
|
32
|
+
`),a=!0;continue}if(r.open([y]),r.open(["-R",h]),n.stdout.write(`Full Disk Access: click + and choose ${h} (shown in Finder), or drag it into the list.
|
|
33
|
+
`),!t.wait)continue;if(n.stdout.write(`Waiting for the worker to report it (Ctrl-C to stop)\u2026
|
|
34
|
+
`),await T(async()=>(await r.worker())?.full_disk_access==="granted",r))n.stdout.write(`Full Disk Access: granted.
|
|
35
|
+
`);else n.stderr.write("Full Disk Access is not reported yet. If you allowed it, `reason connect` restarts the worker with it.\n"),a=!0}if(l)try{if(await r.restartConnection())n.stdout.write(`This computer's Reason connection restarted to use them.
|
|
36
|
+
`)}catch(c){n.stderr.write(`This computer's Reason connection uses them after it restarts (\`reason connect\`): ${c instanceof Error?c.message:String(c)}
|
|
37
|
+
`)}return a?1:0}function le(e){if(e.some((n)=>["--help","-h","help"].includes(n)))return{command:"help"};let[t,...r]=e;if(t==="protected"){let n=r.includes("--json"),[i="list",o,a]=r.filter((l)=>l!=="--json");if(i==="list"&&o===void 0)return{command:"protected",action:i,json:n};if((i==="allow"||i==="revoke")&&o&&a===void 0)return{command:"protected",action:i,path:o,json:n};return{error:"protected expects list, allow <path> or revoke <path>."}}if(t===void 0||t==="--json")return e.length<=1?{command:"list",json:t==="--json"}:{error:`Unknown option: ${e[1]}`};if(t!=="allow")return{error:`Unknown permissions command: ${t}`};if(r.length>1)return{error:`Unknown option: ${r[1]}`};if(r.length===0)return{command:"allow",ids:[...M]};if(!M.includes(r[0]))return{error:`allow expects ${M.join(", ")}.`};return{command:"allow",ids:[r[0]]}}async function Sl(e,t={}){let r=t.io??{stdout:process.stdout,stderr:process.stderr},n=le(e);if("error"in n)return r.stderr.write(`${n.error}
|
|
38
|
+
|
|
39
|
+
${G}`),1;if(n.command==="help")return r.stdout.write(G),0;if(n.command==="protected")return de(n,r);let i=t.platform??process.platform;if(i!=="darwin")return r.stdout.write(n.command==="list"&&n.json?`${JSON.stringify({platform:i,applicable:!1})}
|
|
40
|
+
`:`Reason permissions: macOS privacy permissions do not apply on this computer.
|
|
41
|
+
`),0;let o=t.host??E();if(n.command==="allow")return el(n.ids,{io:r,wait:!0,host:o});let a=await bc(o);return r.stdout.write(n.json?`${JSON.stringify({platform:i,applicable:!0,...a},null,2)}
|
|
42
|
+
`:ce(a)),0}function de(e,t){try{if(e.action==="allow"){let n=D(e.path);return t.stdout.write(e.json?`${JSON.stringify({grant:n})}
|
|
43
|
+
`:`Sessions on this computer may now open ${n.path}.
|
|
44
|
+
`),0}if(e.action==="revoke"){let n=j(e.path);return t.stdout.write(e.json?`${JSON.stringify({revoked:n})}
|
|
45
|
+
`:n?`Revoked ${e.path}.
|
|
46
|
+
`:`No grant for ${e.path}.
|
|
47
|
+
`),0}let r=m();return t.stdout.write(e.json?`${JSON.stringify({grants:r})}
|
|
48
|
+
`:r.length?r.map((n)=>`${n.kind} ${n.path}
|
|
49
|
+
`).join(""):`No protected paths are allowed on this computer.
|
|
50
|
+
`),0}catch(r){return t.stderr.write(`${r instanceof Error?r.message:String(r)}
|
|
51
|
+
`),1}}
|
|
52
|
+
export{Li,yc,wc,Qc,bc,vl,el,Sl};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{L}from"./vm-hands-entry-lite-ptycjmkc.js";import{Y,Rt,Me,It,Be}from"./vm-hands-entry-lite-8xv6c0rm.js";import{spawn as y}from"child_process";import{existsSync as p,mkdirSync as T,readFileSync as _,writeFileSync as A}from"fs";import{homedir as g}from"os";import{basename as H,delimiter as E,join as f,win32 as u}from"path";var Bt=process.platform==="win32"?Rt("win32"):"/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",P=Bt.split(E),R=5000,S=65536,O=new Set(["zsh","bash"]),b=[[".local","bin"],[".bun","bin"],[".cargo","bin"],["go","bin"]],x=(t,e)=>new Promise((n,r)=>{let o;try{o=y(t,[...e],{...Me(),stdio:["ignore","pipe","ignore"]}),It(o)}catch(c){r(c);return}let i=[],s=0,a=null,d=(c)=>{a??=Error(c);try{if(o.pid!==void 0)Be(o.pid,"SIGKILL")}catch{}},m=setTimeout(()=>d("login_shell_timeout"),R);o.stdout?.on("data",(c)=>{if(s+=c.length,s>S)d("login_shell_output_too_large");else i.push(c)}),o.once("error",(c)=>{clearTimeout(m),r(c)}),o.once("close",(c)=>{if(clearTimeout(m),a)r(a);else if(c!==0)r(Error("login_shell_exit_nonzero"));else n(Buffer.concat(i).toString("utf8"))})});function w(t){return typeof t==="string"&&t.startsWith("/")&&!t.includes("\x00")&&O.has(H(t))}function h(t){let e=new Set,n=[];for(let r of t){if(e.has(r))continue;e.add(r),n.push(r)}return n}function pi(t,e=process.platform){let n=e==="win32",r=t.split(`
|
|
3
|
+
`).at(-1)??"",o=[];for(let i of r.split(n?";":":")){let s=i.trim();if(n?!u.isAbsolute(s):!s.startsWith("/"))continue;if(s.includes("\x00"))continue;if(L(s))continue;o.push(s)}return h(o)}function Ao(t){let e=t?.home??g(),n=t?.directoryExists??p,r=b.map((o)=>f(e,...o)).filter((o)=>{try{return n(o)}catch{return!1}});return h([...r,...process.platform==="win32"?pi(process.env.PATH??process.env.Path??""):[],...P]).join(E)}async function C(t){let e=t?.shell??process.env.SHELL,n=()=>({path:Ao({home:t?.home,directoryExists:t?.directoryExists}),source:"fallback"});if(process.platform==="win32"||!w(e))return n();let r;try{r=await(t?.runLoginShell??x)(e,["-lic",'printf %s "$PATH"'])}catch{return n()}if(Buffer.byteLength(r,"utf8")>S)return n();let o=pi(r);if(o.length===0)return n();return{path:h([...o,...P]).join(":"),source:"login_shell"}}function tc(t){let e=null;return()=>(e??=C(t),e)}function l(t){if(t===void 0||t.includes("\x00")||Buffer.byteLength(t,"utf8")>32768)return;return t}function je(t){let e=t.source??process.env,n={HOME:t.home,PATH:t.path??Bt,TMPDIR:t.temporaryDirectory,SHELL:l(e.SHELL)??"/bin/zsh",LANG:l(e.LANG)??"C.UTF-8",LC_ALL:l(e.LC_ALL)??l(e.LANG)??"C.UTF-8"},r=l(e.LC_CTYPE),o=l(e.TERM),i=l(e.COLORTERM);if(r)n.LC_CTYPE=r;if(o)n.TERM=o;if(i)n.COLORTERM=i;if(process.platform==="win32"){for(let s of I){let a=l(e[s]);if(a)n[s]=a}n.TEMP=n.TMP=t.temporaryDirectory,n.SHELL=Y()??n.SHELL,n.PATH=Po(n.PATH)}return n}function Po(t,e=f(g(),".reason","python3")){let n=(i)=>t.split(u.delimiter).filter((s)=>s&&!/[\\/]WindowsApps[\\/]?$/i.test(s)).map((s)=>u.join(s,i)).find((s)=>p(s)),r=n("python.exe");if(n("python3.exe")||!r)return t;let o=`#!/bin/sh
|
|
4
|
+
exec "${r.replaceAll("\\","/")}" "$@"
|
|
5
|
+
`;try{let i=f(e,"python3");if(!p(i)||_(i,"utf8")!==o)T(e,{recursive:!0}),A(i,o)}catch{return t}return[e,t].join(u.delimiter)}var I=["SystemRoot","SystemDrive","windir","ComSpec","PATHEXT","USERPROFILE","USERNAME","USERDOMAIN","APPDATA","LOCALAPPDATA","ProgramData","ProgramFiles","ProgramFiles(x86)","ProgramW6432","CommonProgramFiles","NUMBER_OF_PROCESSORS","PROCESSOR_ARCHITECTURE","OS"];
|
|
6
|
+
export{Bt,pi,Ao,tc,je,Po};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
3
|
-
export{
|
|
2
|
+
var On={name:"github-native-engineer-device-worker-production",version:"0.2.561",private:!0,type:"module",engines:{node:">=22",bun:">=1.3.0"},workspaces:["../../packages/runtime-distribution"],dependencies:{"@agentclientprotocol/sdk":"1.9.0","@anthropic-ai/sandbox-runtime":"^0.0.80","@earendil-works/pi-tui":"1.0.0","@reason/runtime-distribution":"workspace:*",diff:"8.0.4","open-browser-use-sdk":"0.1.42","playwright-core":"1.60.0",toml:"5.0.1",zod:"^4.4.3"},overrides:{"@hono/node-server":"^1.19.15","@earendil-works/pi-agent-core":"1.0.0","@earendil-works/pi-ai":"1.0.0","@earendil-works/pi-coding-agent":"1.0.0","@earendil-works/chord":"1.0.0","@earendil-works/pi-codemode":"1.0.0","@earendil-works/pi-mcp":"1.0.0","@earendil-works/pi-telemetry":"1.0.0","@earendil-works/pi-tui":"1.0.0","brace-expansion":"2.1.7",axios:"^1.20.0","basic-ftp":"^6.2.1","@grpc/grpc-js":"^1.14.5",browserslist:"^4.28.8","engine.io":"^6.6.7","fast-uri":"^3.1.8",hono:"^4.13.7","ip-address":"^10.7.4",nanoid:"^3.3.18",dompurify:"^3.4.17",postcss:"^8.5.23",qs:"^6.16.0","shell-quote":"^1.11.0","socket.io-parser":"^4.2.7",tmp:"^0.2.7",toml:"^5.0.1",undici:"^8.10.2",ws:"^8.21.0","js-yaml":"^4.3.2","@modelcontextprotocol/sdk":"^1.31.0","proxy-addr":"^2.0.8","source-map-js":"^1.2.2"}};
|
|
3
|
+
export{On};
|