@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
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ reason login
|
|
|
12
12
|
|
|
13
13
|
Requires Node.js 18 or newer for npm installation. Both reason and the compatibility alias ara are installed.
|
|
14
14
|
|
|
15
|
-
Platforms: macOS Apple Silicon and Intel; Linux ARM64 and x64 with glibc or musl
|
|
15
|
+
Platforms: macOS Apple Silicon and Intel; Linux ARM64 and x64 with glibc or musl; Windows ARM64 and x64.
|
|
16
16
|
|
|
17
17
|
The package runs an install script that places the native binary for your platform. If your package manager skips
|
|
18
18
|
optional dependencies, the script downloads the same archive from reasonmachines.com and checks its SHA-256.
|
|
@@ -20,6 +20,8 @@ With Bun, trust the script: bun install -g --trust @reason-machines/cli
|
|
|
20
20
|
|
|
21
21
|
Without Node.js: curl -fsSL https://reasonmachines.com/install.sh | bash
|
|
22
22
|
|
|
23
|
+
On Windows without Node.js, in PowerShell: irm https://reasonmachines.com/install.ps1 | iex
|
|
24
|
+
|
|
23
25
|
## Use
|
|
24
26
|
|
|
25
27
|
~~~sh
|
package/bin/ara
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/ara
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 98611064 bytes
|
|
4
|
+
sha256: b91da1ea1ae0c66ab2b6ca31fd1c5c7bec7eeb9e21ef989779204c9e0c0014d9
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{v as a,w as b,x as c,y as d,z as e}from"./vm-hands-entry-lite-hnsm5t36.js";import"./vm-hands-entry-lite-f02906k8.js";import"./vm-hands-entry-lite-9cmfthkq.js";import"./vm-hands-entry-lite-rtt2w6c6.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{d as resolveApiCredentials,e as requireApiCredentials,b as explicitApiOrigin,c as environmentApiKey,a as apiOriginFromEnvironment};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{F as a,G as b,H as c,I as d,J as e,K as f}from"./vm-hands-entry-lite-f02906k8.js";import"./vm-hands-entry-lite-9cmfthkq.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{d as sessionPlace,c as sessionMachine,e as createMachineEnrollmentTicketWithToken,f as ReasonApi,b as REASONING_EFFORTS,a as ApiError};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{va as u}from"./vm-hands-entry-lite-
|
|
3
|
-
`).pop()??"");if(Z)return r(V(),{...Z,fingerprint:f(X)??Z.fingerprint,...Q?{kept:Q}:{}}),z($?`Reason Network: couldn't move your agents off ${j}${K?` (${K})`:""}; they keep using it. Run reason network setup to try again.`:`Reason Network: couldn't finish setting up the network engine${K?` (${K})`:""}. Run reason network setup to try again.`),X;throw new C(`Couldn't connect this computer's agents to the network${K?` (${K})`:""}. Run reason network setup to try again.`)}if($)Q=Pq($,X,z);return d(X,Q),G(X,["stop"],{env:q,stdio:"ignore",timeout:15000}),X}function Mq(q){let z=J(V(),".local","bin",F),X;try{X=Jq(z)}catch{return null}let Y=`${X.size}:${X.mtimeMs}:${X.ino}`;if(!X.isFile()||Y===q)return null;try{let Z=s(v());if(Z.ino===X.ino&&Z.dev===X.dev)return null}catch{}try{let Z=Buffer.alloc(2),Q=Dq(z,"r");try{Hq(Q,Z,0,2,0)}finally{Kq(Q)}if(Z.toString("latin1")==="#!")return null}catch{return null}return{path:z,fingerprint:Y}}function Pq(q,z,X){let Y=`${q.path}.reason-${process.pid}`;try{b(Y,{force:!0}),Cq(z,Y),p(Y,q.path),X(`Reason Network: your agents now use the engine reason network keeps up to date; ${j} points to it. Restart a running agent to pick it up.`);return}catch(Z){return b(Y,{force:!0}),X(`Reason Network: your agents now use the engine reason network keeps up to date, but ${j} couldn't be pointed to it (${Z instanceof Error?Z.message:String(Z)}). Remove that copy so it can't take them back.`),q.fingerprint}}async function i(q){if(q[w])return q;try{let{defaultWorkerServiceHost:z,workerServiceLauncher:X}=await import("./serve-service-
|
|
2
|
+
import{va as u}from"./vm-hands-entry-lite-9cmfthkq.js";import{Lj as g}from"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import{Kk as M}from"./vm-hands-entry-lite-2t0vcvd8.js";import{existsSync as uq,mkdirSync as gq,readFileSync as Nq,writeFileSync as wq}from"fs";import{homedir as Yq}from"os";import{dirname as e,join as hq}from"path";import{spawnSync as G}from"child_process";import{createHash as Qq}from"crypto";import{chmodSync as Bq,closeSync as Kq,existsSync as U,lstatSync as Jq,mkdirSync as c,mkdtempSync as Lq,openSync as Dq,readFileSync as Wq,readSync as Hq,renameSync as p,rmSync as b,statSync as s,symlinkSync as Cq,writeFileSync as a}from"fs";import{connect as Fq}from"net";import{homedir as V}from"os";import{dirname as S,join as J}from"path";class C extends Error{}var F="reason-network",H="0.10.3",Vq={"aarch64-apple-darwin":"1e793a89ea8b53c603cddbc65ac08b0dd83f1dbfc30a1987858e2c52e2ed907c","x86_64-apple-darwin":"ef1f0f8d7d9e8a286de54eeb78f8ff8a53152c1a661c50b6182bfefa8eef8a02","aarch64-unknown-linux-musl":"75fdfd10314225ffb2875acc7ac73c66de23b5678b684d70b4678eb16ba35124","x86_64-unknown-linux-musl":"17111a623396eed0a2d98aa4d3bb03f00da37c25bdc39b6d0ba3ab202dfbe874"},xq="https://reasonmachines.com/cli/engine",P="REASON_AGENT_NETWORK_BIN";function Gq(){let q=process.arch==="arm64"?"aarch64":process.arch==="x64"?"x86_64":null,z=process.platform==="darwin"?"apple-darwin":process.platform==="linux"?"unknown-linux-musl":null;return q&&z?`${q}-${z}`:null}function N(q){let z=G(q,["--version"],{encoding:"utf8",timeout:5000}),[X,Y]=z.status===0?z.stdout.trim().split(/\s+/):[];return X===F?Y??null:null}function _(q,z){let X=q.split(".").map(Number),Y=z.split(".").map(Number);for(let Z=0;Z<3;Z+=1)if((X[Z]??0)!==(Y[Z]??0))return(X[Z]??0)>(Y[Z]??0);return!0}function v(q=V()){return J(q,".reason","bin","reason-network")}var j=`~/.local/bin/${F}`;async function Uq(q=process.env,z=()=>{}){if(q[P])return q[P];let X=v(),Y=t(),Z=Y?.path===X&&f(X)===Y.fingerprint?Y:null,Q=Z?.kept,$=h(q)?null:Mq(Q);if(Z?.version===H&&!$)return X;let B=U(X)?N(X):null;if($){let K=N($.path),L=B&&_(B,H)?B:H;if(!K||!_(L,K)){if(K)z(`Reason Network: ${j} (${K}) is newer than the engine reason network uses (${L}), so it was left as it is.`);Q=$.fingerprint,$=null}}if(Z?.version===H&&!$)return d(X,Q);if(!B||!_(B,H))await jq(X);let D=G(X,["setup",...h(q)?["--no-service"]:[]],{env:await i(q),encoding:"utf8",timeout:60000});if(D.status!==0){let K=O((D.stderr||D.stdout||"").trim().split(`
|
|
3
|
+
`).pop()??"");if(Z)return r(V(),{...Z,fingerprint:f(X)??Z.fingerprint,...Q?{kept:Q}:{}}),z($?`Reason Network: couldn't move your agents off ${j}${K?` (${K})`:""}; they keep using it. Run reason network setup to try again.`:`Reason Network: couldn't finish setting up the network engine${K?` (${K})`:""}. Run reason network setup to try again.`),X;throw new C(`Couldn't connect this computer's agents to the network${K?` (${K})`:""}. Run reason network setup to try again.`)}if($)Q=Pq($,X,z);return d(X,Q),G(X,["stop"],{env:q,stdio:"ignore",timeout:15000}),X}function Mq(q){let z=J(V(),".local","bin",F),X;try{X=Jq(z)}catch{return null}let Y=`${X.size}:${X.mtimeMs}:${X.ino}`;if(!X.isFile()||Y===q)return null;try{let Z=s(v());if(Z.ino===X.ino&&Z.dev===X.dev)return null}catch{}try{let Z=Buffer.alloc(2),Q=Dq(z,"r");try{Hq(Q,Z,0,2,0)}finally{Kq(Q)}if(Z.toString("latin1")==="#!")return null}catch{return null}return{path:z,fingerprint:Y}}function Pq(q,z,X){let Y=`${q.path}.reason-${process.pid}`;try{b(Y,{force:!0}),Cq(z,Y),p(Y,q.path),X(`Reason Network: your agents now use the engine reason network keeps up to date; ${j} points to it. Restart a running agent to pick it up.`);return}catch(Z){return b(Y,{force:!0}),X(`Reason Network: your agents now use the engine reason network keeps up to date, but ${j} couldn't be pointed to it (${Z instanceof Error?Z.message:String(Z)}). Remove that copy so it can't take them back.`),q.fingerprint}}async function i(q){if(q[w])return q;try{let{defaultWorkerServiceHost:z,workerServiceLauncher:X}=await import("./serve-service-txzqn5kj.js");return{...q,[w]:X(z(V()),q)}}catch{return q}}var w="REASON_NETWORK_REASON_BIN";function h(q=process.env){return Boolean(q.REASON_NETWORK_NO_SERVICE||q.TINCAN_NO_SERVICE)}var y=(q)=>J(q,".reason","ask-engine.json");function f(q){try{let z=s(q);return`${z.size}:${z.mtimeMs}:${z.ino}`}catch{return null}}function t(q=V()){try{let z=JSON.parse(Wq(y(q),"utf8"));if(typeof z.path!=="string"||typeof z.fingerprint!=="string"||typeof z.version!=="string")return null;return{path:z.path,fingerprint:z.fingerprint,version:z.version,...typeof z.kept==="string"?{kept:z.kept}:{}}}catch{return null}}function r(q,z){c(S(y(q)),{recursive:!0}),a(y(q),JSON.stringify(z))}function d(q,z){let X=f(q);if(X)r(V(),{path:q,fingerprint:X,version:H,...z?{kept:z}:{}});return q}async function jq(q){let z=Gq(),X=z?Vq[z]:void 0;if(!z||!X)throw new C(`Reason Network runs on macOS and Linux (arm64 or x64); this is ${process.platform} ${process.arch}.`);let Y=`${xq}/${H}/${F}-${z}.tar.gz`,Z;try{let B=await fetch(Y,{signal:AbortSignal.timeout(120000)});if(!B.ok)throw Error(`HTTP ${B.status}`);Z=Buffer.from(await B.arrayBuffer())}catch(B){let D=B instanceof Error&&B.name==="TimeoutError"?"no download within 2 minutes":B instanceof Error?B.message.replace(/\.$/,""):String(B);throw new C(`Couldn't download the network engine from ${new URL(Y).host} (${D}). Check the connection and run reason network again.`)}if(Qq("sha256").update(Z).digest("hex")!==X)throw new C("The downloaded network engine didn't match its checksum, so it wasn't installed.");c(S(q),{recursive:!0});let $=Lq(J(S(q),".reason-engine-"));try{if(a(J($,"engine.tar.gz"),Z),G("tar",["-xzf",J($,"engine.tar.gz"),"-C",$]).status!==0||!U(J($,F)))throw new C("Couldn't unpack the network engine.");Bq(J($,F),493),p(J($,F),q)}finally{b($,{recursive:!0,force:!0})}}function fq(q=process.env,z=V()){let X=q.REASON_NETWORK_HOME?.trim()||q.TINCAN_HOME?.trim();if(X)return X;let Y=J(z,".reason","network"),Z=J(z,".tincan");return!k(Y)&&k(Z)?Z:Y}var k=(q)=>U(J(q,"network.db"))||U(J(q,"tincan.db"));function Tq(q){let z=U(J(q,"network.db"))||!U(J(q,"tincan.db")),X=J(q,z?"network.sock":"tincan.sock");if(Buffer.byteLength(X)<100)return X;let Y=0xcbf29ce484222325n;for(let Z of Buffer.from(X))Y=BigInt.asUintN(64,(Y^BigInt(Z))*0x100000001b3n);return J("/tmp",`${z?"reason-network":"tincan"}-${process.getuid?.()??0}`,`${Y.toString(16).padStart(16,"0")}.sock`)}var o=15000,Oq=new Set(["who","team","inbox","unread","held"]),Rq=90000,Iq="the network daemon closed the connection";class T{socket;nextId=1;buffer="";pending=new Map;closed=null;hungUp=!1;constructor(q){this.socket=q;q.setEncoding("utf8"),q.on("data",(X)=>this.read(X));let z=(X)=>{this.closed=X;for(let Y of this.pending.values())Y.reject(X);this.pending.clear()};q.on("error",(X)=>z(X)),q.on("close",()=>z(Error(this.hungUp?"the connection to the network daemon was closed here":Iq)))}static open(q){return new Promise((z,X)=>{let Y=Fq(q);Y.once("connect",()=>z(new T(Y))),Y.once("error",X)})}read(q){this.buffer+=q;let z=this.buffer.indexOf(`
|
|
4
4
|
`);while(z>=0){let X=this.buffer.slice(0,z);if(this.buffer=this.buffer.slice(z+1),z=this.buffer.indexOf(`
|
|
5
5
|
`),!X.trim())continue;let Y;try{Y=JSON.parse(X)}catch{continue}if(typeof Y.id!=="number")continue;let Z=this.pending.get(Y.id);if(!Z)continue;if(this.pending.delete(Y.id),Y.ok)Z.resolve(Y.result);else Z.reject(Error(O(Y.error??"the network daemon refused the request")))}}call(q,z={},X=o){if(this.closed)return Promise.reject(this.closed);let Y=this.nextId++;return this.socket.write(`${JSON.stringify({id:Y,op:q,...z})}
|
|
6
6
|
`),new Promise((Z,Q)=>{let $=setTimeout(()=>{this.pending.delete(Y),Q(Error(`the network daemon didn't answer ${q} within ${Math.round(X/1000)}s`))},X);this.pending.set(Y,{resolve:(B)=>{clearTimeout($),Z(B)},reject:(B)=>{clearTimeout($),Q(B)}})})}get isClosed(){return this.closed!==null}close(){this.hungUp=!0,this.socket.end()}}var A=/^(Claude Code|Grok|Codex) \u00B7 (.*)$/,_q={"Claude Code":"claude-code",Grok:"grok",Codex:"codex"},Aq=/^ask-[0-9a-f]{6}$/;function l(q){return{id:q.id,from:q.from,fromAgent:q.from_agent,to:q.to,replyTo:q.reply_to,body:q.body,sentAt:q.sent_at}}function m(q){return{person:q.person,machine:q.machine,isMe:q.is_me,online:q.online,link:q.link,rttMs:q.rtt_ms}}class x{engine;env;connection=null;waits=new Set;constructor(q,z){this.engine=q;this.env=z}static async open(q=process.env,z){return new x(await Uq(q,z),q)}static openInstalled(q=process.env){if(q[P])return new x(q[P],q);let z=v(),X=t();return X?.path===z&&f(z)===X.fingerprint?new x(z,q):null}socketPath(){return Tq(fq(this.env))}async open(){try{return await T.open(this.socketPath())}catch{return G(this.engine,["who","--json"],{env:this.env,stdio:"ignore",timeout:15000}),await T.open(this.socketPath())}}async call(q,z={},X){if(!this.connection||this.connection.isClosed)this.connection=await this.open();try{return await this.connection.call(q,z,X)}catch(Y){if(!/closed|ECONNRESET|EPIPE/.test(String(Y)))throw Y;if(this.connection=await this.open(),!Oq.has(q))throw Y;return await this.connection.call(q,z)}}async waitOn(q,z){let X=await this.open();this.waits.add(X);try{return await X.call(q,z,z.wait_secs*1000+o)}finally{this.waits.delete(X),X.close()}}close(){this.connection?.close(),this.connection=null;for(let q of this.waits)q.close();this.waits.clear()}async team(){try{let q=await this.call("team");return{...q,machines:q.machines.map(m)}}catch(q){if(/team/i.test(String(q)))return null;throw q}}async snapshot(q={}){let z=await this.call("who",{all:Boolean(q.all),...q.filter?{filter:q.filter}:{}}),X=new Set(z.sessions.filter((Z)=>A.test(Z.doing??"")).map((Z)=>`${Z.person}/${Z.machine}:${Z.cwd}`)),Y=z.sessions.filter((Z)=>q.all||!Aq.test(Z.name)).filter((Z)=>A.test(Z.doing??"")||!X.has(`${Z.person}/${Z.machine}:${Z.cwd}`)).map((Z)=>{let Q=A.exec(Z.doing??"");return{address:Z.address,name:Z.name,person:Z.person,machine:Z.machine,agent:Q?_q[Q[1]]:Z.agent,cwd:Z.cwd,repo:Z.repo,branch:Z.branch,status:Q?Q[2]==="ready for work"?"idle":Q[2]==="stopped"?"offline":"busy":Z.status,since:Z.since,doing:Q?Q[2]:Z.doing,isMe:Z.is_me,worker:Boolean(Q),tier:Z.tier??null}});return{team:z.team,person:z.person,machine:z.machine,machines:z.machines.map(m),sessions:Y}}async send(q,z,X={}){if(!X.from)await this.call("hook",{agent:"cli",event:"stop",session_id:"terminal",name:"terminal",cwd:process.cwd(),mail:!1});let Y=await this.call("send",{from:X.from??"terminal",to:q,body:z,...X.replyTo?{reply_to:X.replyTo}:{},wake:X.wake??!0,...X.notify?{notify:!0}:{}});return{ids:Y.ids,recipients:Y.recipients.map((Z)=>Z.address),deliveries:Y.recipients.map((Z)=>({address:Z.address,state:Z.state,note:Z.note??""}))}}async session(q,z={}){let X=z.agent??"cli",Y=($,B={})=>this.call("hook",{agent:X,event:$,session_id:q,name:q,cwd:process.cwd(),mail:!1,...B}),Z=await Y("stop"),Q=`${X}:${q}`;return{name:q,address:Z.address??q,next:async($)=>{return(await this.waitOn("inbox",{key:Q,wait_secs:$,peek:!0})).messages.map(l)},ack:async($)=>{if($.length)await this.call("delivered",{key:Q,ids:$})},busy:async($)=>{if(await Y("prompt"),$)await Y("doing",{doing:$})},idle:async($)=>{if(await Y("stop"),$)await Y("doing",{doing:$})},doing:async($)=>{await Y("doing",{doing:$})},send:($,B,D,K)=>this.send($,B,{from:Q,...D?{replyTo:D}:{},...K?.notify?{notify:!0}:{}})}}async inbox(q={}){let X=(await this.waitOn("inbox",{key:"cli:terminal",wait_secs:q.waitSeconds??0,peek:!0}).catch((Y)=>{if(/isn't registered/.test(String(Y)))return{messages:[]};throw Y})).messages.map(l);if(X.length&&!q.peek)await this.call("delivered",{key:"cli:terminal",ids:X.map((Y)=>Y.id)});return X}async link(q={}){return await this.call("link",{new:Boolean(q.new)})}async changeTeam(q,z){try{return await this.call(q,z,Rq)}finally{this.close()}}async changeOntoTeam(q,z){try{await this.changeTeam(q,z)}catch(X){if(!/closed|ECONNRESET|EPIPE/.test(String(X)))throw X;if(await this.team())return;await this.changeTeam(q,z)}}async createTeam(q,z){await this.changeOntoTeam("create_team",{name:q,person:z})}async join(q,z){await this.changeOntoTeam("join",{ticket:q,person:z})}async leave(){return await this.changeTeam("leave",{force:!0})}async remove(q){return await this.call("remove",{who:q})}async setup(q,z={}){return this.passthrough(["setup",...q],z,await i(this.env))}passthrough(q,z={},X=this.env){this.close();let Y=G(this.engine,q,{stdio:["inherit","pipe","pipe"],encoding:"utf8",env:X});if(!z.quiet||Y.status!==0)process.stdout.write(O(Y.stdout??"")),process.stderr.write(O(Y.stderr??""));return Y.status??1}}function O(q){return q.replace(/not in a team yet:[^\n]*/g,"this computer isn't on a team yet: run `reason network setup`").replace(/`tincan (\w+)/g,"`reason network $1").replace(/\btincan (who|send|inbox|invite|join|team|link|setup|doctor|remove|leave|listen)\b/g,"reason network $1").replace(/(?<![\w./-])tincan(?![\w./-])/gi,"Reason Network")}import{existsSync as Jz,mkdirSync as Lz,readFileSync as bq,writeFileSync as Dz}from"fs";import{homedir as Sq,hostname as Hz}from"os";import{dirname as Fz,join as yq}from"path";var vq=(q)=>yq(q,".reason","ask.json");function Eq(q){try{let z=JSON.parse(bq(vq(q),"utf8"));if(typeof z.orgId!=="string"||typeof z.team!=="string")return null;let X=z.pendingRotation;return{orgId:z.orgId,team:z.team,...typeof z.checkedAt==="number"?{checkedAt:z.checkedAt}:{},...X&&typeof X.link==="string"&&typeof X.team==="string"&&typeof X.replaces==="string"?{pendingRotation:X}:{}}}catch{return null}}function n(q=Sq()){let z=Eq(q);return z?{orgId:z.orgId,team:z.team}:null}var qq=86400000,dq=300,R=(q)=>hq(q,".reason","ask-relay.json");function E(q){try{let z=JSON.parse(Nq(R(q),"utf8"));return{sessions:Array.isArray(z.sessions)?z.sessions.filter((X)=>typeof X?.name==="string"&&typeof X.agent==="string"&&typeof X.usedAt==="number"):[]}}catch{return{sessions:[]}}}function kq(q,z){try{if(!uq(e(R(q))))gq(e(R(q)),{recursive:!0});wq(R(q),`${JSON.stringify(z)}
|
|
7
7
|
`,{mode:384})}catch{}}var W=(q,z)=>new Promise((X)=>{if(z.aborted)return X();let Y=setTimeout(Z,q);Y.unref?.();function Z(){clearTimeout(Y),z.removeEventListener("abort",Z),X()}z.addEventListener("abort",Z,{once:!0})});function zq(q){let z=q?.status;return typeof z==="number"?z:null}var Xq=60000;function lq(q){return{address:q.address.slice(0,300),state:q.state.slice(0,40),note:q.note.slice(0,500)}}function mq(q){let z=Number.isFinite(q.sentAt)&&Math.abs(q.sentAt)<8640000000000000?q.sentAt:Date.now();return{id:q.id.slice(0,100),from:q.from.slice(0,300),from_agent:q.fromAgent?.slice(0,100)??null,to:q.to.slice(0,300),reply_to:q.replyTo?.slice(0,100)??null,sent_at:z,body:q.body.length>Xq?`${q.body.slice(0,Xq)}
|
|
8
|
-
[cut: the answer was ${q.body.length} characters]`:q.body}}class Zq{network;api;home;signal;log;team;sessions=new Map;readers=new Set;constructor(q,z,X,Y,Z,Q){this.network=q;this.api=z;this.home=X;this.signal=Y;this.log=Z;this.team=Q}async run(){let q=Date.now()-qq;for(let X of E(this.home).sessions)if(X.usedAt>q)this.read(X);let z=0;while(!this.signal.aborted){let X=await this.network.team().catch(()=>null);if(!X){await W(60000,this.signal);continue}if(X.name!==this.team)return;let Y;try{let Z=await this.api.claimAgentNetworkRelayJob({machine:X.machine,person:X.person,team:X.name,version:g,wait_seconds:u},AbortSignal.any([this.signal,AbortSignal.timeout((u+20)*1000)]));if(z=0,Z.retry_after_seconds)await W(Z.retry_after_seconds*1000,this.signal);Y=Z.job}catch(Z){if(this.signal.aborted)return;let Q=zq(Z);if(Q===403||Q===401){await W(900000,this.signal);continue}if(Q===404||Q===405){await W(120000,this.signal);continue}z+=1,await W(Math.min(60000,1000*2**Math.min(z,6)),this.signal);continue}if(Y)this.carry(Y)}}async carry(q){let z;try{z=q.kind==="who"?{who:await this.who(q)}:{sent:await this.send(q)}}catch(X){z={error:X instanceof Error?X.message:String(X)}}for(let X=1;;X+=1)try{if(await this.api.completeAgentNetworkRelayJob(q.id,z),q.kind==="send")this.log(`relayed a message to ${q.to} from ${"sent"in z?z.sent.from:q.from_name}`,"relayed");return}catch(Y){if(X>=4||this.signal.aborted){this.log(`couldn't report a relayed call: ${Y instanceof Error?Y.message:String(Y)}`);return}await W(X*1000,this.signal)}}async who(q){let z=q.all===!0,X=await this.network.snapshot({all:z});return{all:z,team:X.team,sessions:X.sessions.map((Y)=>({address:Y.address,person:Y.person,machine:Y.machine,agent:Y.agent,repo:Y.repo,branch:Y.branch,status:Y.status,since:Y.since,doing:Y.doing,worker:Y.worker,...Y.tier?{tier:Y.tier.slice(0,10)}:{}})),machines:X.machines.map((Y)=>({person:Y.person,machine:Y.machine,online:Y.online}))}}async send(q){let z={name:q.from_name,agent:q.from_agent},X=await this.session(z),Y=await X.send(q.to,q.body,q.reply_to,{notify:q.notify===!0});return this.remember(z),this.read(z),{ids:Y.ids,recipients:Y.recipients,from:X.address,deliveries:Y.deliveries.slice(0,500).map(lq)}}session(q){let z=`${q.agent}:${q.name}`,X=this.sessions.get(z);if(!X)X=this.network.session(q.name,{agent:q.agent}).then(async(Y)=>{return await Y.idle(`personal agent (${q.agent}), through Reason`).catch(()=>{}),Y}),X.catch(()=>this.sessions.delete(z)),this.sessions.set(z,X);return X}remember(q){let X=E(this.home).sessions.filter((Y)=>Y.name!==q.name||Y.agent!==q.agent);kq(this.home,{sessions:[...X,{...q,usedAt:Date.now()}].slice(-50)})}read(q){let z=`${q.agent}:${q.name}`;if(this.readers.has(z))return;this.readers.add(z),(async()=>{let X=0;try{while(!this.signal.aborted){let Y=E(this.home).sessions.find((Z)=>Z.name===q.name&&Z.agent===q.agent)?.usedAt??0;if(Date.now()-Y>qq)return;try{let Z=await this.session(q),Q=await Z.next(dq);if(Q.length===0)continue;await this.api.recordAgentNetworkRelayReplies(Q.map(mq)).catch(($)=>{let B=zq($);if(B===null||B>=500||B===429||B===401)throw $;this.log(`dropped ${Q.length} answer(s) the server refused (HTTP ${B})`)}),await Z.ack(Q.map(($)=>$.id)),X=0}catch{if(this.signal.aborted)return;this.sessions.delete(z),X+=1,await W(Math.min(60000,1000*2**Math.min(X,6)),this.signal)}}}finally{this.readers.delete(z)}})()}}async function cq(q){await new Zq(q.network,q.api,q.home??Yq(),q.signal,q.log??(()=>{}),q.team).run()}async function pq(q,z=()=>{}){let X="";while(!q.aborted){try{let Y=n(),Z=Y?x.openInstalled():null;if(Y&&Z){let[{requireApiCredentials:Q},{ReasonApi:$}]=await Promise.all([import("./api-credentials-
|
|
8
|
+
[cut: the answer was ${q.body.length} characters]`:q.body}}class Zq{network;api;home;signal;log;team;sessions=new Map;readers=new Set;constructor(q,z,X,Y,Z,Q){this.network=q;this.api=z;this.home=X;this.signal=Y;this.log=Z;this.team=Q}async run(){let q=Date.now()-qq;for(let X of E(this.home).sessions)if(X.usedAt>q)this.read(X);let z=0;while(!this.signal.aborted){let X=await this.network.team().catch(()=>null);if(!X){await W(60000,this.signal);continue}if(X.name!==this.team)return;let Y;try{let Z=await this.api.claimAgentNetworkRelayJob({machine:X.machine,person:X.person,team:X.name,version:g,wait_seconds:u},AbortSignal.any([this.signal,AbortSignal.timeout((u+20)*1000)]));if(z=0,Z.retry_after_seconds)await W(Z.retry_after_seconds*1000,this.signal);Y=Z.job}catch(Z){if(this.signal.aborted)return;let Q=zq(Z);if(Q===403||Q===401){await W(900000,this.signal);continue}if(Q===404||Q===405){await W(120000,this.signal);continue}z+=1,await W(Math.min(60000,1000*2**Math.min(z,6)),this.signal);continue}if(Y)this.carry(Y)}}async carry(q){let z;try{z=q.kind==="who"?{who:await this.who(q)}:{sent:await this.send(q)}}catch(X){z={error:X instanceof Error?X.message:String(X)}}for(let X=1;;X+=1)try{if(await this.api.completeAgentNetworkRelayJob(q.id,z),q.kind==="send")this.log(`relayed a message to ${q.to} from ${"sent"in z?z.sent.from:q.from_name}`,"relayed");return}catch(Y){if(X>=4||this.signal.aborted){this.log(`couldn't report a relayed call: ${Y instanceof Error?Y.message:String(Y)}`);return}await W(X*1000,this.signal)}}async who(q){let z=q.all===!0,X=await this.network.snapshot({all:z});return{all:z,team:X.team,sessions:X.sessions.map((Y)=>({address:Y.address,person:Y.person,machine:Y.machine,agent:Y.agent,repo:Y.repo,branch:Y.branch,status:Y.status,since:Y.since,doing:Y.doing,worker:Y.worker,...Y.tier?{tier:Y.tier.slice(0,10)}:{}})),machines:X.machines.map((Y)=>({person:Y.person,machine:Y.machine,online:Y.online}))}}async send(q){let z={name:q.from_name,agent:q.from_agent},X=await this.session(z),Y=await X.send(q.to,q.body,q.reply_to,{notify:q.notify===!0});return this.remember(z),this.read(z),{ids:Y.ids,recipients:Y.recipients,from:X.address,deliveries:Y.deliveries.slice(0,500).map(lq)}}session(q){let z=`${q.agent}:${q.name}`,X=this.sessions.get(z);if(!X)X=this.network.session(q.name,{agent:q.agent}).then(async(Y)=>{return await Y.idle(`personal agent (${q.agent}), through Reason`).catch(()=>{}),Y}),X.catch(()=>this.sessions.delete(z)),this.sessions.set(z,X);return X}remember(q){let X=E(this.home).sessions.filter((Y)=>Y.name!==q.name||Y.agent!==q.agent);kq(this.home,{sessions:[...X,{...q,usedAt:Date.now()}].slice(-50)})}read(q){let z=`${q.agent}:${q.name}`;if(this.readers.has(z))return;this.readers.add(z),(async()=>{let X=0;try{while(!this.signal.aborted){let Y=E(this.home).sessions.find((Z)=>Z.name===q.name&&Z.agent===q.agent)?.usedAt??0;if(Date.now()-Y>qq)return;try{let Z=await this.session(q),Q=await Z.next(dq);if(Q.length===0)continue;await this.api.recordAgentNetworkRelayReplies(Q.map(mq)).catch(($)=>{let B=zq($);if(B===null||B>=500||B===429||B===401)throw $;this.log(`dropped ${Q.length} answer(s) the server refused (HTTP ${B})`)}),await Z.ack(Q.map(($)=>$.id)),X=0}catch{if(this.signal.aborted)return;this.sessions.delete(z),X+=1,await W(Math.min(60000,1000*2**Math.min(X,6)),this.signal)}}}finally{this.readers.delete(z)}})()}}async function cq(q){await new Zq(q.network,q.api,q.home??Yq(),q.signal,q.log??(()=>{}),q.team).run()}async function pq(q,z=()=>{}){let X="";while(!q.aborted){try{let Y=n(),Z=Y?x.openInstalled():null;if(Y&&Z){let[{requireApiCredentials:Q},{ReasonApi:$}]=await Promise.all([import("./api-credentials-xppmbg0m.js"),import("./api-xmpbsm6b.js")]),B=await Q({});if(B.credentialKind!=="api_key"&&B.orgId.toLowerCase()===Y.orgId.toLowerCase())try{await cq({network:Z,api:new $(B),team:Y.team,signal:q,log:z})}finally{Z.close()}}X=""}catch(Y){let Z=`agent network relay: ${Y instanceof Error?Y.message:String(Y)}`;if(Z!==X)z(Z);X=Z}await W(300000,q)}}var sq=600000,aq=3600000,iq=180000;async function Rz(q,z,X={}){let Y=-1/0,Z="",Q=(L,$q)=>{let I=Date.now();if($q==="relayed"||I-Y<sq||L===Z&&I-Y<aq)return;Y=I,Z=L,z(L)},$=new AbortController,B=()=>$.abort();q.once("end",B),q.once("close",B),q.once("error",B),q.resume();let D=X.installedVersion??(()=>tq()),K=setInterval(()=>{D().then((L)=>{if(L!==null&&L!==g)$.abort()},()=>{})},X.checkMs??iq);K.unref?.();try{await(X.relay??pq)($.signal,Q)}finally{clearInterval(K)}}async function tq(q={}){if(!(q.compiled??Bun.main.startsWith("/$bunfs/")))return null;let z=q.home??Yq(),X=q.env??process.env;if((q.platform??process.platform)==="darwin"){let{currentManagedRuntimeVersion:Q,isManagedRuntimeVersionExecutable:$,legacyManagedRuntimePaths:B,managedRuntimePaths:D}=await import("./managed-runtime-s414h5nm.js");try{let K=D({platform:"darwin",home:z,environment:X});for(let L of[K,B(K)])if(L&&$(L))return Q(L)}catch{}return null}let{installationReceiptPath:Y,loadInstallationReceipt:Z}=await import("./install-receipt-3xyx3rdd.js");return Z(Y(X,z))?.version??null}export{Rz as runDaemonRelay,pq as runBackgroundAskRelay,cq as runAskRelay,tq as installedCliVersion};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m}from"./vm-hands-entry-lite-vcwgh8tr.js";import"./vm-hands-entry-lite-8fj07njx.js";import"./vm-hands-entry-lite-hnsm5t36.js";import"./vm-hands-entry-lite-f02906k8.js";import"./vm-hands-entry-lite-3dc4v5bd.js";import"./vm-hands-entry-lite-9cmfthkq.js";import"./vm-hands-entry-lite-g5grabna.js";import"./vm-hands-entry-lite-h1rxv02g.js";import"./vm-hands-entry-lite-ejm5er3h.js";import"./vm-hands-entry-lite-qef2ndkd.js";import"./vm-hands-entry-lite-mn64e4pt.js";import"./vm-hands-entry-lite-rtt2w6c6.js";import"./vm-hands-entry-lite-h8dbw0c7.js";import"./vm-hands-entry-lite-g7h6wjqy.js";import"./vm-hands-entry-lite-rpn0frzb.js";import"./vm-hands-entry-lite-g8pj1jxa.js";import"./vm-hands-entry-lite-eqhsewc0.js";import"./vm-hands-entry-lite-qnnfvm5r.js";import"./vm-hands-entry-lite-5n4vsm6b.js";import"./vm-hands-entry-lite-a0yfp7s2.js";import"./vm-hands-entry-lite-dh5gwmyf.js";import"./vm-hands-entry-lite-xrthfx3q.js";import"./vm-hands-entry-lite-fb5dzy9x.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-y2s2w174.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-jzcc9h71.js";import"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-1gxktkpe.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-rd0ak4ye.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.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};
|
package/bin/vm-hands/{custom-endpoint-device-zhpake9f.js → custom-endpoint-device-bm94e9r0.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ad as u,Bd as v,gd as a,hd as b,id as c,jd as d,kd as e,ld as f,md as g,nd as h,od as i,pd as j,qd as k,rd as l,sd as m,td as n,ud as o,vd as p,wd as q,xd as r,yd as s,zd as t}from"./vm-hands-entry-lite-rpn0frzb.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{q as isCustomEndpointSessionRequiredMessage,v as isCustomEndpointFirewallBlockMessage,u as isCustomEndpointFailureMessage,s as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,t as customEndpointFailureMessage,r as customEndpointDeviceFailureMessage,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,p as CUSTOM_ENDPOINT_DEVICE_SESSION_REQUIRED,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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Og as a,Pg as b,Qg as c,Rg as d,Sg as e}from"./vm-hands-entry-lite-fb5dzy9x.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{b as passwdAccount,e as desktopHome,d as desktopAccount,c as configureDesktopAccount,a as DESKTOP_USER_ENV};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Aj as k,Bj as l,Cj as m,Dj as n,Ej as o,Fj as p,Gj as q,Hj as r,Ij as s,Jj as t,Kj as u,qj as a,rj as b,sj as c,tj as d,uj as e,vj as f,wj as g,xj as h,yj as i,zj as j}from"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{j as parseDeviceWorkspace,g as isSessionWorktreePath,h as isDeviceWorkspacePath,i as deviceWorkspaceRootRelative,t as computeWorkerWorkspace,s as cloudSessionRootLayout,u as cloudSessionLayoutOfRoot,r as cloudSessionLayout,n as SIDECHAT_WORKSPACE_ID,f as SESSION_WORKTREE_ID,e as SESSION_WORKTREES,c as SESSION_WORKSPACE_LAYOUT,a as REASON_WORKSPACE_BASE,d as HANDS_WORKSPACE_LAYOUT_KEY,b as HANDS_WORKSPACE_BASE_KEY,q as CLOUD_SESSION_ROOT_SHELL_PATTERNS,p as CLOUD_SESSION_ROOT,m as CLOUD_SESSION_CONTROL_BASE,o as CLOUD_REPOSITORY_WORKSPACE_ID,l as CLOUD_PAYLOAD_UID,k as CLOUD_PAYLOAD_HOME};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Rc as a,Sc as b,Tc as c,Uc as d,Vc as e,Wc as f,Xc as g,Yc as h,Zc as i}from"./vm-hands-entry-lite-mn64e4pt.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{e as selectCloudChildPath,a as REASON_HANDS_WORKER_VERSION,h as REASON_HANDS_WORKER_SOURCE,b as REASON_HANDS_WORKER_ENTRYPOINT,i as REASON_HANDS_WORKER_ARTIFACT_SHA256,f as REASON_HANDS_MAC_PTY_MEMBER_SOURCE,g as REASON_HANDS_LINUX_PTY_PROBE_SOURCE,d as REASON_HANDS_CLOUD_CHILD_PATH_MACOS,c as REASON_HANDS_CLOUD_CHILD_PATH_LINUX};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Aa as iJ0}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Aa as iJ0}from"./vm-hands-entry-lite-9w5vs9zv.js";import{Fk as NV0,Gk as rn,Hk as EJ,Jk as an,Kk as X0}from"./vm-hands-entry-lite-2t0vcvd8.js";var on={};var $T;var WT=an(()=>{$T=Error("Cannot find module 'fsevents'");$T.code="MODULE_NOT_FOUND";throw $T});var f0=EJ((EU0,X_)=>{var __dirname="/Users/runner/work/monorepo/monorepo/production/node_modules/.bun/playwright-core@1.60.0/node_modules/playwright-core/lib",tn=Object.create,H5=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,Qj=Object.getOwnPropertyNames,en=Object.getPrototypeOf,Qi=Object.prototype.hasOwnProperty,e=(Q,Y)=>function(){return Y||(0,Q[Qj(Q)[0]])((Y={exports:{}}).exports,Y),Y.exports},eQ=(Q,Y)=>{for(var X in Y)H5(Q,X,{get:Y[X],enumerable:!0})},Yj=(Q,Y,X,J)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let G of Qj(Y))if(!Qi.call(Q,G)&&G!==X)H5(Q,G,{get:()=>Y[G],enumerable:!(J=sn(Y,G))||J.enumerable})}return Q},j1=(Q,Y,X)=>(X=Q!=null?tn(en(Q)):{},Yj(Y||!Q||!Q.__esModule?H5(X,"default",{value:Q,enumerable:!0}):X,Q)),Yi=(Q)=>Yj(H5({},"__esModule",{value:!0}),Q),Xi=e({"node_modules/colors/lib/styles.js"(Q,Y){var X={};Y.exports=X;var J={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(J).forEach(function(G){var Z=J[G],$=X[G]=[];$.open="\x1B["+Z[0]+"m",$.close="\x1B["+Z[1]+"m"})}}),Ji=e({"node_modules/colors/lib/system/has-flag.js"(Q,Y){Y.exports=function(X,J){J=J||process.argv;var G=J.indexOf("--"),Z=/^-{1,2}/.test(X)?"":"--",$=J.indexOf(Z+X);return $!==-1&&(G===-1?!0:$<G)}}}),Gi=e({"node_modules/colors/lib/system/supports-colors.js"(Q,Y){var X=X0("os"),J=Ji(),G=process.env,Z=void 0;if(J("no-color")||J("no-colors")||J("color=false"))Z=!1;else if(J("color")||J("colors")||J("color=true")||J("color=always"))Z=!0;if("FORCE_COLOR"in G)Z=G.FORCE_COLOR.length===0||parseInt(G.FORCE_COLOR,10)!==0;function $(H){if(H===0)return!1;return{level:H,hasBasic:!0,has256:H>=2,has16m:H>=3}}function W(H){if(Z===!1)return 0;if(J("color=16m")||J("color=full")||J("color=truecolor"))return 3;if(J("color=256"))return 2;if(H&&!H.isTTY&&Z!==!0)return 0;var B=Z?1:0;if(process.platform==="win32"){var V=X.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(V[0])>=10&&Number(V[2])>=10586)return Number(V[2])>=14931?3:2;return 1}if("CI"in G){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(M){return M in G})||G.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in G){var U=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(G.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM))return 1;if("COLORTERM"in G)return 1;if(G.TERM==="dumb")return B;return B}function K(H){var B=W(H);return $(B)}Y.exports={supportsColor:K,stdout:K(process.stdout),stderr:K(process.stderr)}}}),Zi=e({"node_modules/colors/lib/custom/trap.js"(Q,Y){Y.exports=function(J,G){var Z="";J=J||"Run the trap, drop the bass",J=J.split("");var $={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return J.forEach(function(W){W=W.toLowerCase();var K=$[W]||[" "],H=Math.floor(Math.random()*K.length);if(typeof $[W]<"u")Z+=$[W][H];else Z+=W}),Z}}}),$i=e({"node_modules/colors/lib/custom/zalgo.js"(Q,Y){Y.exports=function(J,G){J=J||" he is here ";var Z={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},$=[].concat(Z.up,Z.down,Z.mid);function W(B){var V=Math.floor(Math.random()*B);return V}function K(B){var V=!1;return $.filter(function(U){V=U===B}),V}function H(B,V){var U="",M,L;V=V||{},V.up=typeof V.up<"u"?V.up:!0,V.mid=typeof V.mid<"u"?V.mid:!0,V.down=typeof V.down<"u"?V.down:!0,V.size=typeof V.size<"u"?V.size:"maxi",B=B.split("");for(L in B){if(K(L))continue;switch(U=U+B[L],M={up:0,down:0,mid:0},V.size){case"mini":M.up=W(8),M.mid=W(2),M.down=W(8);break;case"maxi":M.up=W(16)+3,M.mid=W(4)+1,M.down=W(64)+3;break;default:M.up=W(8)+1,M.mid=W(6)/2,M.down=W(8)+1;break}var F=["up","mid","down"];for(var z in F){var N=F[z];for(var A=0;A<=M[N];A++)if(V[N])U=U+Z[N][W(Z[N].length)]}}return U}return H(J,G)}}}),Wi=e({"node_modules/colors/lib/maps/america.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){if(J===" ")return J;switch(G%3){case 0:return X.red(J);case 1:return X.white(J);case 2:return X.blue(J)}}}}}),Ki=e({"node_modules/colors/lib/maps/zebra.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){return G%2===0?J:X.inverse(J)}}}}),Hi=e({"node_modules/colors/lib/maps/rainbow.js"(Q,Y){Y.exports=function(X){var J=["red","yellow","green","blue","magenta"];return function(G,Z,$){if(G===" ")return G;else return X[J[Z++%J.length]](G)}}}}),Bi=e({"node_modules/colors/lib/maps/random.js"(Q,Y){Y.exports=function(X){var J=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(G,Z,$){return G===" "?G:X[J[Math.round(Math.random()*(J.length-2))]](G)}}}}),Vi=e({"node_modules/colors/lib/colors.js"(Q,Y){var X={};Y.exports=X,X.themes={};var J=X0("util"),G=X.styles=Xi(),Z=Object.defineProperties,$=new RegExp(/[\r\n]+/g);if(X.supportsColor=Gi().supportsColor,typeof X.enabled>"u")X.enabled=X.supportsColor()!==!1;X.enable=function(){X.enabled=!0},X.disable=function(){X.enabled=!1},X.stripColors=X.strip=function(N){return(""+N).replace(/\x1B\[\d+m/g,"")};var W=X.stylize=function(A,R){if(!X.enabled)return A+"";var q=G[R];if(!q&&R in X)return X[R](A);return q.open+A+q.close},K=/[|\\{}()[\]^$+*?.]/g,H=function(N){if(typeof N!=="string")throw TypeError("Expected a string");return N.replace(K,"\\$&")};function B(N){var A=function R(){return M.apply(R,arguments)};return A._styles=N,A.__proto__=U,A}var V=function(){var N={};return G.grey=G.gray,Object.keys(G).forEach(function(A){G[A].closeRe=new RegExp(H(G[A].close),"g"),N[A]={get:function(){return B(this._styles.concat(A))}}}),N}(),U=Z(function(){},V);function M(){var N=Array.prototype.slice.call(arguments),A=N.map(function(D){if(D!=null&&D.constructor===String)return D;else return J.inspect(D)}).join(" ");if(!X.enabled||!A)return A;var R=A.indexOf(`
|
|
3
3
|
`)!=-1,q=this._styles,O=q.length;while(O--){var E=G[q[O]];if(A=E.open+A.replace(E.closeRe,E.open)+E.close,R)A=A.replace($,function(D){return E.close+D+E.open})}return A}X.setTheme=function(N){if(typeof N==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var A in N)(function(R){X[R]=function(q){if(typeof N[R]==="object"){var O=q;for(var E in N[R])O=X[N[R][E]](O);return O}return X[N[R]](q)}})(A)};function L(){var N={};return Object.keys(V).forEach(function(A){N[A]={get:function(){return B([A])}}}),N}var F=function(A,R){var q=R.split("");return q=q.map(A),q.join("")};X.trap=Zi(),X.zalgo=$i(),X.maps={},X.maps.america=Wi()(X),X.maps.zebra=Ki()(X),X.maps.rainbow=Hi()(X),X.maps.random=Bi()(X);for(z in X.maps)(function(N){X[N]=function(A){return F(X.maps[N],A)}})(z);var z;Z(X,L())}}),Ui=e({"node_modules/colors/safe.js"(Q,Y){var X=Vi();Y.exports=X}}),Mi=e({"node_modules/ms/index.js"(Q,Y){var X=1000,J=X*60,G=J*60,Z=G*24,$=Z*7,W=Z*365.25;Y.exports=function(U,M){M=M||{};var L=typeof U;if(L==="string"&&U.length>0)return K(U);else if(L==="number"&&isFinite(U))return M.long?B(U):H(U);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(U))};function K(U){if(U=String(U),U.length>100)return;var M=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(U);if(!M)return;var L=parseFloat(M[1]),F=(M[2]||"ms").toLowerCase();switch(F){case"years":case"year":case"yrs":case"yr":case"y":return L*W;case"weeks":case"week":case"w":return L*$;case"days":case"day":case"d":return L*Z;case"hours":case"hour":case"hrs":case"hr":case"h":return L*G;case"minutes":case"minute":case"mins":case"min":case"m":return L*J;case"seconds":case"second":case"secs":case"sec":case"s":return L*X;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return L;default:return}}function H(U){var M=Math.abs(U);if(M>=Z)return Math.round(U/Z)+"d";if(M>=G)return Math.round(U/G)+"h";if(M>=J)return Math.round(U/J)+"m";if(M>=X)return Math.round(U/X)+"s";return U+"ms"}function B(U){var M=Math.abs(U);if(M>=Z)return V(U,M,Z,"day");if(M>=G)return V(U,M,G,"hour");if(M>=J)return V(U,M,J,"minute");if(M>=X)return V(U,M,X,"second");return U+" ms"}function V(U,M,L,F){var z=M>=L*1.5;return Math.round(U/L)+" "+F+(z?"s":"")}}}),Xj=e({"node_modules/debug/src/common.js"(Q,Y){function X(J){Z.debug=Z,Z.default=Z,Z.coerce=V,Z.disable=H,Z.enable=W,Z.enabled=B,Z.humanize=Mi(),Z.destroy=U,Object.keys(J).forEach((M)=>{Z[M]=J[M]}),Z.names=[],Z.skips=[],Z.formatters={};function G(M){let L=0;for(let F=0;F<M.length;F++)L=(L<<5)-L+M.charCodeAt(F),L|=0;return Z.colors[Math.abs(L)%Z.colors.length]}Z.selectColor=G;function Z(M){let L,F=null,z,N;function A(...R){if(!A.enabled)return;let q=A,O=Number(new Date),E=O-(L||O);if(q.diff=E,q.prev=L,q.curr=O,L=O,R[0]=Z.coerce(R[0]),typeof R[0]!=="string")R.unshift("%O");let D=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(I,P)=>{if(I==="%%")return"%";D++;let C=Z.formatters[P];if(typeof C==="function"){let b=R[D];I=C.call(q,b),R.splice(D,1),D--}return I}),Z.formatArgs.call(q,R),(q.log||Z.log).apply(q,R)}if(A.namespace=M,A.useColors=Z.useColors(),A.color=Z.selectColor(M),A.extend=$,A.destroy=Z.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(F!==null)return F;if(z!==Z.namespaces)z=Z.namespaces,N=Z.enabled(M);return N},set:(R)=>{F=R}}),typeof Z.init==="function")Z.init(A);return A}function $(M,L){let F=Z(this.namespace+(typeof L>"u"?":":L)+M);return F.log=this.log,F}function W(M){Z.save(M),Z.namespaces=M,Z.names=[],Z.skips=[];let L=(typeof M==="string"?M:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of L)if(F[0]==="-")Z.skips.push(F.slice(1));else Z.names.push(F)}function K(M,L){let F=0,z=0,N=-1,A=0;while(F<M.length)if(z<L.length&&(L[z]===M[F]||L[z]==="*"))if(L[z]==="*")N=z,A=F,z++;else F++,z++;else if(N!==-1)z=N+1,A++,F=A;else return!1;while(z<L.length&&L[z]==="*")z++;return z===L.length}function H(){let M=[...Z.names,...Z.skips.map((L)=>"-"+L)].join(",");return Z.enable(""),M}function B(M){for(let L of Z.skips)if(K(M,L))return!1;for(let L of Z.names)if(K(M,L))return!0;return!1}function V(M){if(M instanceof Error)return M.stack||M.message;return M}function U(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Z.enable(Z.load()),Z}Y.exports=X}}),Li=e({"node_modules/debug/src/browser.js"(Q,Y){Q.formatArgs=J,Q.save=G,Q.load=Z,Q.useColors=X,Q.storage=$(),Q.destroy=(()=>{let K=!1;return()=>{if(!K)K=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})(),Q.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function X(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let K;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(K=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(K[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function J(K){if(K[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+K[0]+(this.useColors?"%c ":" ")+"+"+Y.exports.humanize(this.diff),!this.useColors)return;let H="color: "+this.color;K.splice(1,0,H,"color: inherit");let B=0,V=0;K[0].replace(/%[a-zA-Z%]/g,(U)=>{if(U==="%%")return;if(B++,U==="%c")V=B}),K.splice(V,0,H)}Q.log=console.debug||console.log||(()=>{});function G(K){try{if(K)Q.storage.setItem("debug",K);else Q.storage.removeItem("debug")}catch(H){}}function Z(){let K;try{K=Q.storage.getItem("debug")||Q.storage.getItem("DEBUG")}catch(H){}if(!K&&typeof process<"u"&&"env"in process)K=process.env.DEBUG;return K}function $(){try{return localStorage}catch(K){}}Y.exports=Xj()(Q);var{formatters:W}=Y.exports;W.j=function(K){try{return JSON.stringify(K)}catch(H){return"[UnexpectedJSONParseError]: "+H.message}}}}),Ai=e({"node_modules/has-flag/index.js"(Q,Y){Y.exports=(X,J=process.argv)=>{let G=X.startsWith("-")?"":X.length===1?"-":"--",Z=J.indexOf(G+X),$=J.indexOf("--");return Z!==-1&&($===-1||Z<$)}}}),Ni=e({"node_modules/supports-color/index.js"(Q,Y){var X=X0("os"),J=X0("tty"),G=Ai(),{env:Z}=process,$;if(G("no-color")||G("no-colors")||G("color=false")||G("color=never"))$=0;else if(G("color")||G("colors")||G("color=true")||G("color=always"))$=1;function W(){if("FORCE_COLOR"in Z){if(Z.FORCE_COLOR==="true")return 1;if(Z.FORCE_COLOR==="false")return 0;return Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}}function K(V){if(V===0)return!1;return{level:V,hasBasic:!0,has256:V>=2,has16m:V>=3}}function H(V,{streamIsTTY:U,sniffFlags:M=!0}={}){let L=W();if(L!==void 0)$=L;let F=M?$:L;if(F===0)return 0;if(M){if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2}if(V&&!U&&F===void 0)return 0;let z=F||0;if(Z.TERM==="dumb")return z;if(process.platform==="win32"){let N=X.release().split(".");if(Number(N[0])>=10&&Number(N[2])>=10586)return Number(N[2])>=14931?3:2;return 1}if("CI"in Z){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((N)=>(N in Z))||Z.CI_NAME==="codeship")return 1;return z}if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Z){let N=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return N>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Z.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM))return 1;if("COLORTERM"in Z)return 1;return z}function B(V,U={}){let M=H(V,{streamIsTTY:V&&V.isTTY,...U});return K(M)}Y.exports={supportsColor:B,stdout:B({isTTY:J.isatty(1)}),stderr:B({isTTY:J.isatty(2)})}}}),Fi=e({"node_modules/debug/src/node.js"(Q,Y){var X=X0("tty"),J=X0("util");Q.init=B,Q.log=W,Q.formatArgs=Z,Q.save=K,Q.load=H,Q.useColors=G,Q.destroy=J.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),Q.colors=[6,2,3,4,5,1];try{let U=Ni();if(U&&(U.stderr||U).level>=2)Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(U){}Q.inspectOpts=Object.keys(process.env).filter((U)=>{return/^debug_/i.test(U)}).reduce((U,M)=>{let L=M.substring(6).toLowerCase().replace(/_([a-z])/g,(z,N)=>{return N.toUpperCase()}),F=process.env[M];if(/^(yes|on|true|enabled)$/i.test(F))F=!0;else if(/^(no|off|false|disabled)$/i.test(F))F=!1;else if(F==="null")F=null;else F=Number(F);return U[L]=F,U},{});function G(){return"colors"in Q.inspectOpts?Boolean(Q.inspectOpts.colors):X.isatty(process.stderr.fd)}function Z(U){let{namespace:M,useColors:L}=this;if(L){let F=this.color,z="\x1B[3"+(F<8?F:"8;5;"+F),N=` ${z};1m${M} \x1B[0m`;U[0]=N+U[0].split(`
|
|
4
4
|
`).join(`
|
|
5
5
|
`+N),U.push(z+"m+"+Y.exports.humanize(this.diff)+"\x1B[0m")}else U[0]=$()+M+" "+U[0]}function $(){if(Q.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function W(...U){return process.stderr.write(J.formatWithOptions(Q.inspectOpts,...U)+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ge as a,he as b,ie as c,je as d,ke as e,le as f,me as g,ne as h,oe as i,pe as j,qe as k,re as l,se as m,te as n,ue as o,ve as p,we as q,xe as r}from"./vm-hands-entry-lite-qnnfvm5r.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{r as runInstallReceiptCli,q as recordInstallationReceipt,k as pathEntryAddedByInstaller,l as parseInstallationReceipt,m as loadInstallationReceipt,j as installerReasonAlias,h as installationReceiptPath,g as installationConfigHome,i as installationAliasMatchesTarget,n as hasInstallationDeviceConsent,o as authorizeInstallationForFutureDevice,p as authorizeDesktopInstallationForFutureDevice,a as INSTALLATION_RECEIPT_SCHEMA_VERSION,b as INSTALLATION_DEVICE_CONSENT_VERSION,f as INSTALLATION_BACKGROUND_MODES,e as FUTURE_DEVICE_CONSENT_SCOPE,c as DESKTOP_ACCOUNT_ACCESS_VERSION,d as DESKTOP_ACCOUNT_ACCESS_SCOPE};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Dd as a,Ed as b,Fd as c,Gd as d,Hd as e,Id as f,Jd as g,Kd as h,Ld as i,Md as j,Nd as k,Od as l}from"./vm-hands-entry-lite-g8pj1jxa.js";import"./vm-hands-entry-lite-eqhsewc0.js";import"./vm-hands-entry-lite-qnnfvm5r.js";import"./vm-hands-entry-lite-5n4vsm6b.js";import"./vm-hands-entry-lite-a0yfp7s2.js";import"./vm-hands-entry-lite-dh5gwmyf.js";import"./vm-hands-entry-lite-xrthfx3q.js";import"./vm-hands-entry-lite-fb5dzy9x.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-y2s2w174.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-jzcc9h71.js";import"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-1gxktkpe.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-rd0ak4ye.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$a as m,Ra as c,Sa as d,Ta as e,Ua as f,Va as g,Wa as h,Xa as i,Ya as j,Za as k,_a as l,ab as n,bb as o,cb as p,db as q,eb as r,fb as s,gb as t,hb as u}from"./vm-hands-entry-lite-g5grabna.js";import"./vm-hands-entry-lite-h1rxv02g.js";import"./vm-hands-entry-lite-ejm5er3h.js";import"./vm-hands-entry-lite-qef2ndkd.js";import"./vm-hands-entry-lite-mn64e4pt.js";import"./vm-hands-entry-lite-rtt2w6c6.js";import"./vm-hands-entry-lite-h8dbw0c7.js";import"./vm-hands-entry-lite-g7h6wjqy.js";import"./vm-hands-entry-lite-rpn0frzb.js";import"./vm-hands-entry-lite-g8pj1jxa.js";import"./vm-hands-entry-lite-eqhsewc0.js";import"./vm-hands-entry-lite-qnnfvm5r.js";import"./vm-hands-entry-lite-5n4vsm6b.js";import"./vm-hands-entry-lite-a0yfp7s2.js";import"./vm-hands-entry-lite-dh5gwmyf.js";import"./vm-hands-entry-lite-xrthfx3q.js";import"./vm-hands-entry-lite-fb5dzy9x.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-y2s2w174.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-jzcc9h71.js";import{Vi as b}from"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-1gxktkpe.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-rd0ak4ye.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import{Ek as a}from"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{j as writeOpenFlags,g as spawnCaptured,f as sandboxProfile,e as safeEnvironment,k as runTransferCapability,i as runFileCapability,t as rebindLocalHandsControl,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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{jk as a,kk as b,lk as c,mk as d,nk as e,ok as f,pk as g}from"./vm-hands-entry-lite-rd0ak4ye.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{bk as a,ck as b,dk as c,ek as d,fk as e,gk as f,hk as g}from"./vm-hands-entry-lite-1gxktkpe.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{c as requestMacScreenAccess,d as parseMacWindowBounds,a as parseMacScreenStatus,e as openMacWindowBounds,g as openMacInput,b as macScreenStatus,f as MacInputTranslator};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{eg as a,fg as b,gg as c,hg as d,ig as e,jg as f,kg as g,lg as h}from"./vm-hands-entry-lite-a0yfp7s2.js";import"./vm-hands-entry-lite-dh5gwmyf.js";import"./vm-hands-entry-lite-xrthfx3q.js";import"./vm-hands-entry-lite-fb5dzy9x.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-y2s2w174.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-jzcc9h71.js";import"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-1gxktkpe.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-rd0ak4ye.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ng as a,og as b,pg as c,qg as d,rg as e,sg as f,tg as g,ug as h,vg as i,wg as j}from"./vm-hands-entry-lite-dh5gwmyf.js";import"./vm-hands-entry-lite-xrthfx3q.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-y2s2w174.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$ as D,L as n,M as o,N as p,O as q,P as r,Q as s,R as t,S as u,T as v,U as w,V as x,W as y,X as z,Y as A,Z as B,_ as C,aa as E,ba as F,ca as G,da as H,ea as I,fa as J,ga as K,ha as L,ia as M,ja as N,ka as O,la as P,ma as Q,na as R,oa as S,pa as T,qa as U,ra as V,sa as W,ta as X,ua as Y}from"./vm-hands-entry-lite-3dc4v5bd.js";import"./vm-hands-entry-lite-h8dbw0c7.js";import"./vm-hands-entry-lite-g7h6wjqy.js";import{$h as e,Xh as a,Yh as b,Zh as c,_h as d,ai as f,bi as g,ci as h,ei as i,fi as j,hi as k,ii as l,ji as m}from"./vm-hands-entry-lite-y2s2w174.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{E as verifyManagedRuntimeCodeSignatures,m as verifyManagedRuntimeArtifact,H as updateManagedRuntime,l as sha256Hex,Q as rollbackManagedRuntime,R as recoverManagedRuntimeActivation,V as recordManagedRuntimeLifecycle,U as readManagedRuntimeLifecycleEvents,j as parseAndVerifyManagedRuntimeManifest,k as parseAndVerifyLegacyManagedRuntimeManifest,z as managedRuntimeVersionPath,C as managedRuntimeTarget,K as managedRuntimePointerVersion,x as managedRuntimePaths,O as managedRuntimeExecutableVersion,A as managedRuntimeCredentialLibraryPath,h as managedRuntimeCredentialLibraryAssetName,g as managedRuntimeAssetName,y as legacyManagedRuntimePaths,N as isManagedRuntimeVersionExecutable,M as isManagedRuntimeExecutable,J as installManagedRuntimeLauncher,I as installManagedRuntimeArtifact,X as flushManagedRuntimeLifecycleEvents,F as fetchManagedRuntimeBytes,G as defaultManagedRuntimeHealthCheck,L as currentManagedRuntimeVersion,B as compareManagedRuntimeVersions,i as canonicalJson,Y as bootstrapManagedRuntime,D as assertManagedRuntimeSignatureEvidence,P as activateManagedRuntime,T as acquireManagedRuntimeLock,S as acquireManagedRuntimeDirectoryLock,W as acknowledgeManagedRuntimeLifecycleEvents,f as ManagedRuntimeError,v as MANAGED_RUNTIME_UPDATE_HEALTH_TIMEOUT_MS,e as MANAGED_RUNTIME_TARGETS,d as MANAGED_RUNTIME_MAX_MANIFEST_BYTES,p as MANAGED_RUNTIME_MAX_LIFECYCLE_EVENTS,q as MANAGED_RUNTIME_MAX_LIFECYCLE_BYTES,c as MANAGED_RUNTIME_MAX_ARTIFACT_BYTES,b as MANAGED_RUNTIME_MANIFEST_VERSION,r as MANAGED_RUNTIME_MANIFEST_URL,o as MANAGED_RUNTIME_LIFECYCLE_VERSION,w as MANAGED_RUNTIME_LIFECYCLE_EVENTS,n as MANAGED_RUNTIME_LAYOUT_VERSION,u as MANAGED_RUNTIME_HEALTH_TIMEOUT_MS,s as MANAGED_RUNTIME_FETCH_TIMEOUT_MS,t as MANAGED_RUNTIME_ARTIFACT_FETCH_TIMEOUT_MS,a as LEGACY_MANAGED_RUNTIME_MANIFEST_VERSION};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as
|
|
2
|
+
import{$e as t,Af as U,Bf as V,Cf as W,Df as X,Ef as Y,Ff as Z,Gf as _,Hf as $,Ie as a,If as aa,Je as b,Jf as ba,Ke as c,Kf as ca,Le as d,Lf as da,Me as e,Mf as ea,Ne as f,Nf as fa,Oe as g,Of as ga,Pe as h,Pf as ha,Qe as i,Qf as ia,Re as j,Rf as ja,Se as k,Sf as ka,Te as l,Ue as m,Ve as n,We as o,Xe as p,Ye as q,Ze as r,_e as s,af as u,bf as v,cf as w,df as x,ef as y,ff as z,gf as A,hf as B,if as C,jf as D,kf as E,lf as F,mf as G,nf as H,of as I,pf as J,qf as K,rf as L,sf as M,tf as N,uf as O,vf as P,wf as Q,xf as R,yf as S,zf as T}from"./vm-hands-entry-lite-5n4vsm6b.js";import"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{ba as parseLocalRuntimeRootsSyncResponse,Z as parseLocalRuntimeRegistrationResponse,Y as parseLocalRuntimeProofChallenge,ha as parseLocalRuntimeOperationHeartbeatResponse,ia as parseLocalRuntimeOperationEventsResponse,ja as parseLocalRuntimeOperationEnvironmentResponse,ka as parseLocalRuntimeOperationCompletionResponse,ga as parseLocalRuntimeOperationClaim,ea as parseLocalRuntimeLocalSubscriptionResponse,fa as parseLocalRuntimeLifecycleResponse,ca as parseLocalRuntimeIdentityResponse,$ as parseLocalRuntimeHeartbeatResponse,aa as parseLocalRuntimeFirstHeartbeat,X as parseLocalRuntimeErrorEnvelope,_ as parseLocalRuntimeEnrollmentResponse,da as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,W as buildLocalRuntimeDeviceProofBytes,R as WORKER_STARTUP_TIMING_STAGES,M as WORKER_PREVIEW_CARRIED_JOBS,q as VM_HANDS_WORKSPACE_GRANT_CONTROL,p as VM_HANDS_WORKSPACE_DEFERRED_KEY,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,S 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,T as LOCAL_RUNTIME_LIFECYCLE_EVENTS,V as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,U as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,O as JOBS_START_WAIT_KEY,N as JOBS_START_WAIT,J as HANDS_SESSION_GROUP_KEY,I as HANDS_SESSION_GROUP,L as HANDS_SESSION_CAP_NONE,K as HANDS_SESSION_CAP_KEY,u as HANDS_REBIND_KEY,v as HANDS_REBIND_CONTROL,t as HANDS_REBIND,F as HANDS_MODEL_JOBS_EGRESS_KEY,E as HANDS_MODEL_JOBS_EGRESS,B as HANDS_LARGE_ENVIRONMENT_KEY,A as HANDS_LARGE_ENVIRONMENT,H as HANDS_JOBS_USER_KEY,G as HANDS_JOBS_USER,z as HANDS_HEADLESS_BROWSER_KEY,y as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,s as HANDS_ENVIRONMENT_AT_CLAIM_KEY,r as HANDS_ENVIRONMENT_AT_CLAIM,D as HANDS_CONFINEMENT_KEY,C as HANDS_CONFINEMENT,x as HANDS_CLOUD_ACCESS_KEY,w as HANDS_CLOUD_ACCESS,P as AUTOMATION_USER_CHROME,Q as AUTOMATION_CLOUD_SESSIONS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Hi as a,Ii as b,Ji as c,Ki as d,Li as e,Mi as f,Ni as g,Oi as h,Pi as i,Qi as j}from"./vm-hands-entry-lite-jzcc9h71.js";import"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-1gxktkpe.js";import"./vm-hands-entry-lite-51hmj6am.js";import"./vm-hands-entry-lite-2t0vcvd8.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};
|
package/bin/vm-hands/{reason-hands-protocol-8fxjynte.js → reason-hands-protocol-7d7xj1h3.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$g as
|
|
2
|
+
import{$g as e,Ah as F,Bh as G,Ch as H,Dh as I,Eh as J,Fh as K,Gh as L,Hh as M,Ih as N,Jh as O,Kh as P,Lh as Q,Mh as R,Nh as S,Oh as T,Ph as U,Qh as V,Rh as W,Sh as X,Th as Y,Uh as Z,Xg as a,Yg as b,Zg as c,_g as d,ah as f,bh as g,ch as h,dh as i,eh as j,fh as k,gh as l,hh as m,ih as n,jh as o,kh as p,lh as q,mh as r,nh as s,oh as t,ph as u,qh as v,rh as w,sh as x,th as y,uh as z,vh as A,wh as B,xh as C,yh as D,zh as E}from"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{w as reasonHandsCloseReason,Y as parseReasonHandsSdkResponse,X as parseReasonHandsSdkRequest,J as parseReasonHandsResult,I as parseReasonHandsRequest,P as parseReasonHandsPtyReceipt,K as parseReasonHandsProgress,O as parseReasonHandsJobResult,N as parseReasonHandsJobRequest,M as parseReasonHandsClaimAck,L as parseReasonHandsClaim,Q as parseReasonHandsCancelRequest,R as parseReasonHandsCancelAck,F as isReasonHandsUuid,D as isReasonHandsRequestId,G as isReasonHandsPtyJobId,E as isReasonHandsGeneration,H as isReasonHandsArtifactSha256,Z as encodeReasonHandsSdkResponse,T as encodeReasonHandsResult,S as encodeReasonHandsRequest,U as encodeReasonHandsProgress,W as encodeReasonHandsClaimAck,V as encodeReasonHandsClaim,y as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,A as REASON_HANDS_SDK_MAX_QUERY_CHARS,z as REASON_HANDS_SDK_MAX_NAME_CHARS,n as REASON_HANDS_PTY_PROTOCOL_VERSION,q as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,p as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,o as REASON_HANDS_PTY_MAX_INPUT_BYTES,r as REASON_HANDS_PTY_MAX_DIMENSION,s as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,u as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,t as REASON_HANDS_PTY_ANCHOR_EXIT_MS,a as REASON_HANDS_PROTOCOL_VERSION,f as REASON_HANDS_OUTPUT_TRUNCATED_MARKER,d as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,e as REASON_HANDS_MAX_OUTPUT_CHARS,c as REASON_HANDS_MAX_INPUT_CHARS,b as REASON_HANDS_MAX_FRAME_BYTES,g as REASON_HANDS_MAX_ERROR_CHARS,h as REASON_HANDS_JOB_PROTOCOL_VERSION,l as REASON_HANDS_JOB_MAX_RECORDS,k as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,j as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,i as REASON_HANDS_JOB_MAX_INPUT_CHARS,B as REASON_HANDS_JOB_ERRORS,m as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,x as REASON_HANDS_ERROR_CODES,v as REASON_HANDS_CLOSE_CODES,C as HandsProtocolError};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$d as l,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}from"./vm-hands-entry-lite-eqhsewc0.js";import"./vm-hands-entry-lite-qnnfvm5r.js";import"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-2t0vcvd8.js";export{g as workerServiceRetargetPending,f as workerServiceProgram,m as workerServiceProcessRunning,e as workerServiceLauncher,j as workerServiceDefinitions,n as workerServiceDefinitionCurrent,l as retireLegacyWorkerService,q as retargetWorkerServiceLogs,p as restartWorkerService,r as removeWorkerService,i as isConnectServiceLabel,k as installedWorkerService,o as installWorkerService,c as defaultWorkerServiceHost,h as connectServiceLabel,d as WorkerServiceError,a as WORKER_SERVICE_ENV,b as WORKER_IDENTITY_UNAVAILABLE_CODE};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{a as jq,b as Dq,c as Vq,d as kq,g as Hq,h as zq,m as Aq}from"./vm-hands-entry-lite-vcwgh8tr.js";import"./vm-hands-entry-lite-8fj07njx.js";import{y as Fq}from"./vm-hands-entry-lite-hnsm5t36.js";import{A as Wq,K as bq}from"./vm-hands-entry-lite-f02906k8.js";import"./vm-hands-entry-lite-3dc4v5bd.js";import"./vm-hands-entry-lite-9cmfthkq.js";import"./vm-hands-entry-lite-g5grabna.js";import"./vm-hands-entry-lite-h1rxv02g.js";import"./vm-hands-entry-lite-ejm5er3h.js";import"./vm-hands-entry-lite-qef2ndkd.js";import"./vm-hands-entry-lite-mn64e4pt.js";import"./vm-hands-entry-lite-rtt2w6c6.js";import"./vm-hands-entry-lite-h8dbw0c7.js";import"./vm-hands-entry-lite-g7h6wjqy.js";import"./vm-hands-entry-lite-rpn0frzb.js";import"./vm-hands-entry-lite-g8pj1jxa.js";import"./vm-hands-entry-lite-eqhsewc0.js";import{se as Kq}from"./vm-hands-entry-lite-qnnfvm5r.js";import"./vm-hands-entry-lite-5n4vsm6b.js";import"./vm-hands-entry-lite-a0yfp7s2.js";import"./vm-hands-entry-lite-dh5gwmyf.js";import{Eg as xq,Jg as Bq}from"./vm-hands-entry-lite-xrthfx3q.js";import"./vm-hands-entry-lite-fb5dzy9x.js";import"./vm-hands-entry-lite-2e18tm6w.js";import"./vm-hands-entry-lite-ammr3xbc.js";import"./vm-hands-entry-lite-y2s2w174.js";import{mi as z,oi as u,pi as s}from"./vm-hands-entry-lite-e2mjbqmr.js";import"./vm-hands-entry-lite-ma001vzh.js";import"./vm-hands-entry-lite-jzcc9h71.js";import"./vm-hands-entry-lite-sex82vb1.js";import"./vm-hands-entry-lite-9r5tz2dx.js";import{lj as l}from"./vm-hands-entry-lite-fyvgav60.js";import"./vm-hands-entry-lite-pk3q774c.js";import{Lj as N}from"./vm-hands-entry-lite-7xbgw4m0.js";import"./vm-hands-entry-lite-41nygv3p.js";import"./vm-hands-entry-lite-1gxktkpe.js";import{ik as Q}from"./vm-hands-entry-lite-zjfr0zh8.js";import"./vm-hands-entry-lite-rd0ak4ye.js";import"./vm-hands-entry-lite-r8qg3wp1.js";import"./vm-hands-entry-lite-f5230h6t.js";import"./vm-hands-entry-lite-51hmj6am.js";import{Kk as Gq}from"./vm-hands-entry-lite-2t0vcvd8.js";import{createHash as aq,randomBytes as nq}from"crypto";import{readFileSync as eq,realpathSync as Pq,renameSync as q3,unlinkSync as J3,writeFileSync as X3}from"fs";import{dirname as Y3,join as yq}from"path";import{spawnSync as wq}from"child_process";import{accessSync as Lq,constants as fq,existsSync as L,mkdirSync as Sq,readFileSync as hq,renameSync as Cq,writeFileSync as gq}from"fs";import{homedir as mq}from"os";import{delimiter as pq,dirname as dq,join as T}from"path";import{existsSync as Eq,readFileSync as Mq}from"fs";import{join as _q}from"path";var vq=`---
|
|
3
|
+
name: reason
|
|
4
|
+
description: Integrate software with Reason's public REST API using a scoped API key. Use for API clients, CI, service integrations, or cloud coding-session automation.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Reason API
|
|
8
|
+
|
|
9
|
+
Reason integrations use the public REST API. Public customer MCP is retired.
|
|
10
|
+
|
|
11
|
+
Base URL: \`https://api.reasonmachines.com/v3\`
|
|
12
|
+
|
|
13
|
+
- API quickstart: \`https://docs.reasonmachines.com/api-quickstart\`
|
|
14
|
+
- Endpoint reference: \`https://docs.reasonmachines.com/api-reference\`
|
|
15
|
+
|
|
16
|
+
## Authentication and scope
|
|
17
|
+
|
|
18
|
+
1. Create a least-privilege \`ara_\` key in Reason Settings \u2192 Developers (the Code
|
|
19
|
+
/ API keys picker) and keep it only in the calling service or CI secret
|
|
20
|
+
manager. Never
|
|
21
|
+
put it in source, prompts, logs, generated files, or a repository
|
|
22
|
+
environment file. A new key from that picker includes the ordinary public
|
|
23
|
+
scopes for session, skill, repo, and org reads.
|
|
24
|
+
2. Send it as \`Authorization: Bearer <api-key>\`. Call \`GET /v3/self\` first
|
|
25
|
+
to resolve the key's organization before reading or mutating resources.
|
|
26
|
+
3. Request only the scopes needed by the integration. Treat secret values as
|
|
27
|
+
write-only and never expose them in API responses or diagnostics.
|
|
28
|
+
4. Use the endpoint reference as the source of truth for request/response
|
|
29
|
+
shapes, pagination, and error handling. Do not recreate an old MCP client,
|
|
30
|
+
route, OAuth flow, or plugin configuration. Do not connect to the retired
|
|
31
|
+
public MCP transport.
|
|
32
|
+
|
|
33
|
+
## Session automation
|
|
34
|
+
|
|
35
|
+
- Create and monitor sessions through the documented \`/v3/organizations/:orgId/
|
|
36
|
+
sessions\` endpoints. Return the session URL or identifier to the caller, then
|
|
37
|
+
poll or stream only as the API reference specifies.
|
|
38
|
+
- Omit \`hands_mode\` for adaptive lazy Hands, or set it to \`brain_only\` when
|
|
39
|
+
physical execution must remain permanently disabled for that Conversation.
|
|
40
|
+
- Keep API work idempotent where the endpoint supports it, and surface failed
|
|
41
|
+
mutations rather than retrying destructive operations blindly.
|
|
42
|
+
- Scope every request to the intended organization and repository. Do not infer
|
|
43
|
+
authority from a repository name or an untrusted task payload.
|
|
44
|
+
`;function m(q){return _q(q,".agents","skills","ara","SKILL.md")}function i(q){let X=m(q);return Eq(X)&&Mq(X,"utf8")===vq}var p=["codex","claude","cursor"],r={codex:"Codex",claude:"Claude Code",cursor:"Cursor"};function uq(q,X=process.env){let J=X.PATH??"",Z=process.platform==="win32"?(X.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";"):[""];for(let Y of J.split(pq)){if(!Y)continue;for(let G of Z)try{return Lq(T(Y,`${q}${G}`),fq.X_OK),!0}catch{}}return!1}function lq(){return{exists:uq,run(q,X,J={}){let Z=J.interactive===!0,Y=wq(q,X,{encoding:"utf8",env:process.env,stdio:Z?"inherit":"pipe"});return{status:Y.status??1,stdout:Z?"":Y.stdout??"",stderr:Z?Y.error?.message??"":`${Y.stderr??""}${Y.error?`${Y.error.message}
|
|
45
|
+
`:""}`}}}}function O(q){return`${q.stdout}
|
|
46
|
+
${q.stderr}`}function k(q){return q.status===0}function R(q,X,J,Z={}){let Y=q.run(X,J,Z);if(k(Y))return Y;let G=O(Y).trim();throw Error(`${X} ${J.join(" ")} failed${G?`: ${G}`:` with exit code ${Y.status}`}`)}function cq(q=process.env){return s(z({env:q}))}function d(q,X){return q.split(/\s+/).some((J)=>a(J,X))}function w(q){return T(q,".cursor","mcp.json")}function t(q){if(!L(q))return{};try{let X=JSON.parse(hq(q,"utf8"));if(!X||typeof X!=="object"||Array.isArray(X))throw Error("top-level value must be an object");return X}catch(X){let J=X instanceof Error?X.message:String(X);throw Error(`Cursor MCP config at ${q} is invalid; refusing to overwrite it (${J})`)}}function oq(q,X){Sq(dq(q),{recursive:!0,mode:448});let J=`${q}.ara-${process.pid}.tmp`;gq(J,`${JSON.stringify(X,null,2)}
|
|
47
|
+
`,{mode:384}),Cq(J,q)}function a(q,X){if(typeof q!=="string")return!1;if(q===X)return!0;try{let J=new URL(q);return["https://api.ara.so","https://api-staging.ara.so","https://api.reasonmachines.ai","https://staging-api.reasonmachines.ai","https://api.reasonmachines.com","https://staging-api.reasonmachines.com"].includes(J.origin)&&!J.username&&!J.password&&J.pathname==="/mcp/ara"&&!J.search&&!J.hash}catch{return!1}}function iq(q,X){let J=q.mcpServers?.ara;return Boolean(J&&typeof J==="object"&&!Array.isArray(J)&&a(J.url,X))}class f{runner;home;mcpUrl;constructor(q=lq(),X=mq(),J=cq()){this.runner=q;this.home=X;this.mcpUrl=J}isAvailable(q){if(q==="codex")return this.runner.exists("codex");if(q==="claude")return this.runner.exists("claude");return this.runner.exists("cursor")||L("/Applications/Cursor.app")||L(T(this.home,"Applications","Cursor.app"))||L(w(this.home))}availableClients(){return p.filter((q)=>this.isAvailable(q))}installationPath(q){if(q==="cursor")return w(this.home);if(q==="codex")return T(this.home,".codex","plugins","cache","ara");return T(this.home,".claude","plugins","cache","ara")}sharedSkillStatus(){return{installed:i(this.home),path:m(this.home)}}status(q){let X=r[q];if(!this.isAvailable(q))return{id:q,label:X,available:!1,installed:!1,connection:null,detail:"Client not detected",legacyInstallations:[]};if(q==="cursor"){let B=w(this.home),V=iq(t(B),this.mcpUrl);return{id:q,label:X,available:!0,installed:V,connection:V?"configured":null,detail:V?`Retired Reason MCP configuration in ${B}`:`No retired Reason MCP configuration in ${B}`,legacyInstallations:[]}}if(q==="codex"){let B=this.runner.run("codex",["plugin","list"]);if(!(k(B)&&O(B).includes("ara@ara")))return{id:q,label:X,available:!0,installed:!1,connection:null,detail:"No retired Reason plugin installed",legacyInstallations:[]};let P=this.runner.run("codex",["mcp","list"]),x=O(P).split(/\r?\n/).find((M)=>M.trimStart().startsWith("ara ")&&d(M,this.mcpUrl)),h=k(P)&&Boolean(x),E=!k(P)?"error":x?.includes("Not logged in")?"not_logged_in":x?.includes("OAuth")?"oauth":x?"configured":"unknown";return{id:q,label:X,available:!0,installed:h,connection:E,detail:x?.trim()||"The retired Reason plugin is installed but has no verified retired MCP registration",legacyInstallations:[]}}let J=this.runner.run("claude",["plugin","list"]),Z=O(J),Y=k(J)&&Z.includes("ara@ara"),G=k(J)&&Z.includes("ara-handoff@ara");if(!Y&&!G)return{id:q,label:X,available:!0,installed:!1,connection:null,detail:"No retired Reason plugin installed",legacyInstallations:[]};let b=this.runner.run("claude",["mcp","list"]),j=O(b),F=j.split(/\r?\n/).find((B)=>B.includes("plugin:ara:ara")&&d(B,this.mcpUrl)),K=j.split(/\r?\n/).find((B)=>B.includes("plugin:ara-handoff:ara")&&d(B,this.mcpUrl)),U=k(b)&&Boolean(F),D=k(b)&&K?["ara-handoff@ara"]:[],S=!k(b)?"error":F?.includes("Connected")?"connected":F?.includes("Failed")?"error":F?"configured":"unknown";return{id:q,label:X,available:!0,installed:U,connection:S,detail:F?.trim()||"The retired Reason plugin is installed but has no verified retired MCP registration",legacyInstallations:D}}statuses(){return p.map((q)=>this.status(q))}logout(q){let X=this.status(q);if(!X.available||!X.installed)return`${X.label}: not connected`;if(q==="cursor")return this.uninstall("cursor").replace("removed retired Reason","signed out and removed retired Reason");if(q==="codex")return R(this.runner,"codex",["mcp","logout","ara"]),"Codex: signed out of Reason";return R(this.runner,"claude",["mcp","logout","plugin:ara:ara"]),"Claude Code: signed out of Reason"}uninstall(q){let X=this.status(q);if(!X.available||!X.installed)return`${X.label}: Reason is not installed`;if(q==="cursor"){let J=w(this.home),Z=t(J),Y={...Z.mcpServers??{}};return delete Y.ara,Z.mcpServers=Y,oq(J,Z),`Cursor: removed retired Reason MCP from ${J}`}if(q==="codex")return R(this.runner,"codex",["plugin","remove","ara@ara"]),"Codex: removed retired ara@ara";return R(this.runner,"claude",["plugin","uninstall","ara@ara","--scope","user"]),"Claude Code: removed retired ara@ara"}removeLegacyClaudePlugin(){if(!this.runner.exists("claude"))return"Claude Code: not installed";if(!this.status("claude").legacyInstallations.includes("ara-handoff@ara"))return"Claude Code: no legacy Reason plugin found";return R(this.runner,"claude",["plugin","uninstall","ara-handoff@ara","--scope","user"]),"Claude Code: removed obsolete ara-handoff@ara"}removeRetiredInstallations(){let q=[],X=[];for(let J of p){let Z;try{Z=this.status(J)}catch(Y){X.push(`${r[J]}: ${Y instanceof Error?Y.message:String(Y)}`);continue}if(Z.installed){if(J!=="cursor")try{q.push(this.logout(J))}catch(Y){X.push(`${Z.label}: ${Y instanceof Error?Y.message:String(Y)}`)}try{q.push(this.uninstall(J))}catch(Y){X.push(`${Z.label}: ${Y instanceof Error?Y.message:String(Y)}`)}}if(J==="claude"&&Z.legacyInstallations.includes("ara-handoff@ara"))try{q.push(this.removeLegacyClaudePlugin())}catch(Y){X.push(`${Z.label}: ${Y instanceof Error?Y.message:String(Y)}`)}}if(q.length===0&&X.length===0)q.push("No retired Reason MCP configuration found.");return{messages:q,failures:X}}}function n(q){return`claude mcp add --transport http reason ${q}`}function e(q){return`codex mcp add reason --url ${q}
|
|
48
|
+
codex mcp login reason`}var N3=n("https://mcp.reasonmachines.com/mcp"),I3=e("https://mcp.reasonmachines.com/mcp"),R3=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,O3=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var rq="https://github.com/reason-machines/reason-plugins",v3=`Connect a coding agent to Reason over MCP
|
|
49
|
+
|
|
50
|
+
Usage:
|
|
51
|
+
reason mcp Show how to connect Claude Code, Codex, or another MCP client
|
|
52
|
+
reason mcp uninstall Remove only this machine's registrations of the earlier, retired server
|
|
53
|
+
|
|
54
|
+
Plugins for Claude Code and Codex: ${rq}
|
|
55
|
+
`;function qq(q){if(!q.available)return"not detected";if(q.installed||q.legacyInstallations.length>0)return"retired configuration";return"not installed"}function tq(q,X){let J=X.toLowerCase();if(q==="codex")return J.includes("codex");if(q==="claude")return J.includes("claude");return J.includes("cursor")}function Jq(q,X){return(X.mcp_connections??[]).filter((Z)=>tq(q.id,Z.client_name)).flatMap((Z)=>Z.last_used_at?[Z.last_used_at]:[]).sort().at(-1)??null}function Xq(q,X=new Date){if(!q)return"never";let J=Date.parse(q);if(!Number.isFinite(J))return"never";let Z=Math.max(0,Math.floor((X.getTime()-J)/1000));if(Z<45)return"just now";let Y=Math.floor(Z/60);if(Y<60)return`${Y} ${Y===1?"minute":"minutes"} ago`;let G=Math.floor(Y/60);if(G<24)return`${G} ${G===1?"hour":"hours"} ago`;let b=Math.floor(G/24);return`${b} ${b===1?"day":"days"} ago`}function Yq(q){let X=q.name?.trim(),J=q.email?.trim();if(X&&J)return`${X} (${J})`;return X||J||q.id||"Reason user"}function Zq(q){let X=q.name?.trim(),J=q.slug?.trim();if(X&&J)return`${X} (${J})`;return X||J||q.id}var sq=Q.enum(["granted","not_granted","unknown"]),$q=Q.object({status:sq,checkedAt:Q.number().finite(),executablePath:Q.string().min(1)});var Z3=`Reason status
|
|
56
|
+
|
|
57
|
+
Usage:
|
|
58
|
+
reason status [--json]
|
|
59
|
+
|
|
60
|
+
Show the installed version, signed-in account and organization, this
|
|
61
|
+
computer's connection (\`reason connect\`) and the workspaces it serves, any
|
|
62
|
+
retired MCP configuration that can be cleaned up, and automatic updates.
|
|
63
|
+
`,$3=5000,G3=300000,Q3=Q.object({version:Q.literal(1),key:Q.string(),at:Q.number(),self:Q.object({principal_type:Q.string(),user_id:Q.string().optional(),user_name:Q.string().nullish(),email:Q.string().nullish(),org_id:Q.string(),organization_name:Q.string().nullish(),organization_slug:Q.string().nullish(),mcp_connections:Q.array(Q.object({client_id:Q.string(),client_name:Q.string(),last_used_at:Q.string().nullable()})).optional()})}),Nq=(q)=>`${q.apiOrigin}
|
|
64
|
+
${aq("sha256").update(q.accessToken).digest("hex")}`;function x3(q,X,J){try{let Z=Q3.safeParse(JSON.parse(eq(q,"utf8")));if(!Z.success||Z.data.key!==Nq(X))return null;let Y=J-Z.data.at;return Y>=0&&Y<G3?Z.data.self:null}catch{return null}}function B3(q,X,J,Z){let Y=`${q}.${process.pid}.${nq(6).toString("hex")}.tmp`;try{let G={version:1,key:Nq(X),at:Z,self:J};X3(Y,`${JSON.stringify(G)}
|
|
65
|
+
`,{mode:384,flag:"wx"}),q3(Y,q)}catch{try{J3(Y)}catch{}}}var W3=30000;function b3(q,X=Date.now(),J=null){let Z=Bq(q),Y=(()=>{if(Z?.state!=="connected"&&Z?.state!=="starting")return!1;try{return process.kill(Z.pid,0),!0}catch{return!1}})(),G=Y&&Z?.state==="connected",b=(K)=>G&&X-K>=0&&X-K<W3,j=$q.safeParse(Z?.fullDiskAccess),F=xq(Z,J,X);return{...F?{permission_recovery:F}:{},full_disk_access:j.success&&b(j.data.checkedAt)?j.data.status:"unknown",keep_awake:{enabled:Vq(q)==="battery_and_ac",holding:Z?.idleSleepHold===!0&&b(Date.parse(Z.lastHeartbeatAt??""))},executable:Y&&j.success?j.data.executablePath:null}}function F3(q=z()){if(process.platform!=="darwin")return null;let X=kq(yq(Hq(Pq(l()),q),"worker.json"));return X?b3(jq(X).daemon,Date.now(),Dq(X)):null}var Qq={connected:"connected",starting:"starting",reconnecting:"reconnecting",stopping:"stopping",not_running:"not running",removed:"removed from Reason (run `reason connect` to connect it again)"};async function Y1(q,X={}){let J=X.io??{stdout:process.stdout,stderr:process.stderr};if(q.includes("--help")||q.includes("-h"))return J.stdout.write(Z3),0;if(q.some((G)=>G!=="--json"))return J.stderr.write(`Usage: reason status [--json]
|
|
66
|
+
`),1;let Z=new AbortController,Y=setTimeout(()=>Z.abort(Error("timed out reading the account")),$3);try{let G=X.now?.()??new Date,b=performance.now(),j=b,F=()=>{let $=performance.now(),H=Math.round($-j);return j=$,H},K=null,U=($)=>{return K=$ instanceof Error?$.message:String($),null},D=await Fq(X,Z.signal).catch(U),S=F(),B=D?.credentialKind==="api_key",V=D&&!B?yq(Y3(Wq(X.env??process.env)),"status-account.json"):null,P=D&&V&&q.includes("--json")?x3(V,D,G.getTime()):null,x=P??(D?await(X.getSelf??(($,H)=>new bq($).self(H)))(D,Z.signal).catch(U):null);if(D&&x&&!P&&V)B3(V,D,x,G.getTime());let h=F(),E=X.manager??new f,M=q.includes("--json")?[]:E.statuses(),_=(X.loadReceipt??Kq)(),v=await(X.readConnection??(()=>Aq({channel:X.channel})))().catch(()=>null),A=null;try{if(v)A=(X.readConnectionMacState??(()=>F3(X.channel??z())))()}catch{}let W=v&&A?{...v,...A}:v,C=(()=>{try{return(X.readDisconnected??(()=>zq(Pq(l()),X.channel??z())))()}catch{return!1}})(),Iq=F(),c=x?{id:x.org_id,name:x.organization_name??null,slug:x.organization_slug??null}:null,I=x?{id:x.user_id??null,name:(B?x.service_user_name:x.user_name)??null,email:x.email??null,credential:B?"api_key":"login"}:null,g=X.channel??z(),y={version:N,channel:g,api_origin:D?.apiOrigin??u(g),account:I,account_error:K,organization:c,mcp:M.map(($)=>({client:$.id,label:$.label,status:qq($),installed_at:$.installed?E.installationPath($.id):null,last_used_at:x?Jq($,x):null})),connection:W,disconnected:C,installation:_?{background_mode:_.background_mode,automatic_updates:_.background_mode!=="cli_only",future_device_consent:_.device_consent?.decision??"disabled"}:null,timings_ms:{process:Math.round(b),credentials:S,account:h,local:Iq,total:Math.round(performance.now()-b)}};if(q.includes("--json"))return J.stdout.write(`${JSON.stringify(y,null,2)}
|
|
67
|
+
`),0;if(g==="staging")J.stdout.write(`Reason ${N} \xB7 channel: STAGING
|
|
68
|
+
`),J.stdout.write(`API: ${y.api_origin}
|
|
69
|
+
`);else J.stdout.write(`Reason ${N}
|
|
70
|
+
`);if(I)J.stdout.write(B?`Account: API key (REASON_API_KEY)${I.name?`: ${I.name}`:""}
|
|
71
|
+
`:`Account: ${Yq(I)}
|
|
72
|
+
`),J.stdout.write(`Organization: ${Zq(c)}
|
|
73
|
+
`);else if(K)J.stdout.write(`Account: unavailable (${K})
|
|
74
|
+
`);else J.stdout.write(`Account: signed out
|
|
75
|
+
`),J.stdout.write(`Organization: none
|
|
76
|
+
`);if(J.stdout.write(`
|
|
77
|
+
This computer
|
|
78
|
+
`),!W)J.stdout.write(C?"Disconnected. Run `reason connect` to connect it again.\n":"Not connected. Run `reason connect` to run your Sessions here.\n");else{if(J.stdout.write(`Connection: ${Qq[W.state]} (${W.name})${C?", disconnected (run `reason connect` to connect it again)":""}
|
|
79
|
+
`),W.version)J.stdout.write(`Version: ${W.version}${W.version===N?"":` (${N} is installed; \`reason connect\` restarts it on that)`}
|
|
80
|
+
`);if(J.stdout.write(`Folder: ${W.folder}
|
|
81
|
+
`),J.stdout.write(`Sessions: ${W.sessions_running===null?"":`${W.sessions_running} running, `}${W.sessions_max===null?"every Session you start":W.sessions_max===1?"one at a time":`up to ${W.sessions_max} at once`}
|
|
82
|
+
`),A){let $=A,H=await(X.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Oq,reasonIdentity:Tq}=await import("./permissions-3mkk9mfw.js"),{macScreenStatus:Uq}=await import("./local-display-mac-9h6btvvq.js");return Rq(await Oq({identity:()=>Tq(),grants:Uq,worker:async()=>$}))}))().catch(()=>null);if(H)J.stdout.write(`${H}
|
|
83
|
+
`);J.stdout.write(`Keep awake: ${A.keep_awake.enabled?"on":"off"}${A.keep_awake.holding?" (holding)":""}
|
|
84
|
+
`)}if(W.service)J.stdout.write(`Logs: ${W.service.logs}
|
|
85
|
+
`);for(let $ of W.workspaces??[]){let H=$.state==="removed"?"removed from that workspace":$.blocked?"offline (this computer is outside that workspace's allowed networks)":$.device_id?Qq[$.state]:"connecting";J.stdout.write(`Also in workspace ${$.name??$.organization_id}${$.account?" (another Reason account's)":""}: ${H}
|
|
86
|
+
`)}if(W.workspaces_off==="sign_in")J.stdout.write("Other workspaces: off. This computer's sign-in is not one the Reason app or the setup command\n Reason shows you made for it (or that sign-in ended, or it is in use on another computer), so it is\n connected in one workspace only. Run the setup command from Reason here (it ends in --pair CODE);\n if this computer was connected before that, run `reason disconnect` and `reason connect` once.\n")}let o=y.mcp.filter(($)=>$.installed_at||$.status!=="not installed");if(o.length>0)J.stdout.write(`
|
|
87
|
+
Retired MCP configuration
|
|
88
|
+
`);for(let $ of o)if(J.stdout.write(`${$.label}: ${$.status}
|
|
89
|
+
`),$.installed_at)J.stdout.write(` Installed: ${$.installed_at}
|
|
90
|
+
`),J.stdout.write(` Last used: ${Xq($.last_used_at,G)}
|
|
91
|
+
`);if(y.mcp.some(($)=>$.status==="retired configuration"))J.stdout.write("Run `reason mcp uninstall` to remove only the retired Reason MCP registrations.\n");if(J.stdout.write(`
|
|
92
|
+
Background access
|
|
93
|
+
`),!y.installation)J.stdout.write(`Not managed by the Reason installer
|
|
94
|
+
`);else J.stdout.write(`Automatic updates: ${y.installation.automatic_updates?"enabled":"disabled"}
|
|
95
|
+
`);return 0}catch(G){return J.stderr.write(`Reason status: ${G instanceof Error?G.message:String(G)}
|
|
96
|
+
`),1}finally{clearTimeout(Y)}}export{b3 as workerMacState,Y1 as runStatusCli,F3 as connectionMacState,Z3 as STATUS_HELP};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ek as l}from"./vm-hands-entry-lite-51hmj6am.js";import{execFile as zj,spawn as I}from"child_process";var Cj="h264_ws_v1",kj="video",h=["smooth","sharp","data_saver","balanced"];var Yj="video_presets";var V=8388608,Y=65536,Lj="control",Aj="v1",d=200;function s(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q,J=(Q)=>typeof Q==="string"&&Q.length>0&&Q.length<=d;if(Object.keys(j).length!==2||!J(j.user_id)||!J(j.name))return null;return{user_id:j.user_id,name:j.name}}var xj="windows",Mj="v1",A=200,o=(q)=>typeof q==="string"&&h.includes(q);function fj(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q;if(Object.keys(j).length!==2||j.format!=="h264_ws_v1"||!o(j.preset))return null;return{format:"h264_ws_v1",preset:j.preset}}var $={hello:1,frame:2,stats:3,pong:4,serverClipboard:5,error:6,audioHello:7,audio:8,control:9,windows:10,pointer:16,key:17,config:18,ping:19,clientClipboard:20,keyframeRequest:21,ack:22,audioEnable:23};class U extends Error{constructor(q){super(q);this.name="DisplayVideoProtocolError"}}var e=new TextEncoder,jj=new TextDecoder("utf-8",{fatal:!0});function H(q,j){if(j.byteLength+1>V)throw new U("message_too_large");let J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,j.byteLength+1),Q.setUint8(4,q),J.set(j,5),J}function R(q){let j=e.encode(q);if(j.byteLength>Y)throw new U("text_too_large");return j}function f(q,j){if(!Number.isInteger(q)||q<0||q>65535)throw new U(`invalid_${j}`);return q}function qj(q){if(!Number.isFinite(q))throw new U("invalid_window");return Math.max(-2147483648,Math.min(2147483647,Math.round(q)))}function hj(q){switch(q.type){case"hello":{let j=R(q.codec),J=new Uint8Array(6+j.byteLength),Q=new DataView(J.buffer);return Q.setUint16(0,f(q.width,"width")),Q.setUint16(2,f(q.height,"height")),Q.setUint8(4,Math.max(1,Math.min(240,Math.round(q.fps)))),Q.setUint8(5,h.indexOf(q.preset)),J.set(j,6),H($.hello,J)}case"frame":{let j=new Uint8Array(13+q.data.byteLength),J=new DataView(j.buffer);return J.setUint8(0,q.key?1:0),J.setUint32(1,q.seq>>>0),J.setBigUint64(5,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,13),H($.frame,j)}case"stats":return H($.stats,R(JSON.stringify(q.stats)));case"pong":case"ping":{let j=new Uint8Array(8);return new DataView(j.buffer).setFloat64(0,q.token),H(q.type==="ping"?$.ping:$.pong,j)}case"serverClipboard":return H($.serverClipboard,R(q.text));case"clientClipboard":return H($.clientClipboard,R(q.text));case"error":return H($.error,R(q.code));case"pointer":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint16(0,f(q.x,"x")),J.setUint16(2,f(q.y,"y")),J.setUint8(4,q.buttons&255),H($.pointer,j)}case"key":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint8(0,q.down?1:0),J.setUint32(1,q.keysym>>>0),H($.key,j)}case"config":return H($.config,Uint8Array.of(h.indexOf(q.preset)));case"keyframeRequest":return H($.keyframeRequest,new Uint8Array(0));case"audioHello":{let j=R(q.codec),J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,q.sampleRate>>>0),Q.setUint8(4,q.channels&255),J.set(j,5),H($.audioHello,J)}case"audio":{let j=new Uint8Array(8+q.data.byteLength);return new DataView(j.buffer).setBigUint64(0,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,8),H($.audio,j)}case"control":return H($.control,R(JSON.stringify(q.control)));case"windows":{let j=q.bounds.slice(0,A),J=new Uint8Array(j.length*16),Q=new DataView(J.buffer);return j.forEach((Z,z)=>{[Z.x,Z.y,Z.width,Z.height].forEach((G,F)=>Q.setInt32(z*16+F*4,qj(G)))}),H($.windows,J)}case"audioEnable":return H($.audioEnable,Uint8Array.of(q.on?1:0));case"ack":{let j=new Uint8Array(4);return new DataView(j.buffer).setUint32(0,q.seq>>>0),H($.ack,j)}}}function T(q){let j=h[q];if(!j)throw new U("invalid_preset");return j}function C(q,j){if(q.byteLength!==j)throw new U("invalid_length")}function k(q){if(q.byteLength>Y)throw new U("text_too_large");try{return jj.decode(q)}catch{throw new U("invalid_text")}}function Jj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_stats")}let J=j;if(!J||typeof J!=="object"||["fps","kbps","dropped","restarts","queued_bytes"].some((Z)=>typeof J[Z]!=="number"||!Number.isFinite(J[Z])))throw new U("invalid_stats");return{fps:J.fps,kbps:J.kbps,dropped:J.dropped,restarts:J.restarts,queued_bytes:J.queued_bytes}}function Qj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_control")}let J=j;if(!J||typeof J!=="object"||typeof J.you!=="boolean"||typeof J.same_user!=="boolean")throw new U("invalid_control");let Q=J.holder===null?null:s(J.holder);if(Q===null&&J.holder!==null)throw new U("invalid_control");return{holder:Q,you:J.you,same_user:J.same_user}}function Zj(q,j){let J=new DataView(j.buffer,j.byteOffset,j.byteLength);switch(q){case $.hello:if(j.byteLength<6)throw new U("invalid_length");return{type:"hello",width:J.getUint16(0),height:J.getUint16(2),fps:J.getUint8(4),preset:T(J.getUint8(5)),codec:k(j.subarray(6))};case $.frame:if(j.byteLength<14)throw new U("invalid_length");if(J.getUint8(0)>1)throw new U("invalid_frame_flags");return{type:"frame",key:J.getUint8(0)===1,seq:J.getUint32(1),captureMicros:Number(J.getBigUint64(5)),data:j.subarray(13)};case $.stats:return{type:"stats",stats:Jj(j)};case $.ping:case $.pong:return C(j,8),{type:q===$.ping?"ping":"pong",token:J.getFloat64(0)};case $.serverClipboard:return{type:"serverClipboard",text:k(j)};case $.clientClipboard:return{type:"clientClipboard",text:k(j)};case $.error:return{type:"error",code:k(j)};case $.pointer:return C(j,5),{type:"pointer",x:J.getUint16(0),y:J.getUint16(2),buttons:J.getUint8(4)};case $.key:if(C(j,5),J.getUint8(0)>1)throw new U("invalid_key_flags");return{type:"key",down:J.getUint8(0)===1,keysym:J.getUint32(1)};case $.config:return C(j,1),{type:"config",preset:T(J.getUint8(0))};case $.keyframeRequest:return C(j,0),{type:"keyframeRequest"};case $.audioHello:if(j.byteLength<5)throw new U("invalid_length");return{type:"audioHello",sampleRate:J.getUint32(0),channels:J.getUint8(4),codec:k(j.subarray(5))};case $.audio:if(j.byteLength<9)throw new U("invalid_length");return{type:"audio",captureMicros:Number(J.getBigUint64(0)),data:j.subarray(8)};case $.audioEnable:if(C(j,1),J.getUint8(0)>1)throw new U("invalid_audio_flags");return{type:"audioEnable",on:J.getUint8(0)===1};case $.control:return{type:"control",control:Qj(j)};case $.windows:{if(j.byteLength%16!==0||j.byteLength>A*16)throw new U("invalid_length");let Q=[];for(let Z=0;Z<j.byteLength;Z+=16)Q.push({x:J.getInt32(Z),y:J.getInt32(Z+4),width:J.getInt32(Z+8),height:J.getInt32(Z+12)});return{type:"windows",bounds:Q}}case $.ack:return C(j,4),{type:"ack",seq:J.getUint32(0)};default:return null}}class $j{buffer=new Uint8Array(0);push(q){let j=new Uint8Array(this.buffer.byteLength+q.byteLength);j.set(this.buffer),j.set(q,this.buffer.byteLength);let J=[],Q=0;while(j.byteLength-Q>=4){let Z=new DataView(j.buffer,j.byteOffset+Q,4).getUint32(0);if(Z<1||Z>V)throw new U("invalid_message_length");if(j.byteLength-Q-4<Z)break;let z=j[Q+4],G=j.slice(Q+5,Q+4+Z),F=Zj(z,G);if(F)J.push(F);Q+=4+Z}return this.buffer=j.slice(Q),J}}var t="/usr/bin/osascript",Gj=5000,Kj=1048576,Uj=String.raw`
|
|
3
3
|
ObjC.import("CoreGraphics");
|
|
4
4
|
ObjC.import("ApplicationServices");
|
|
5
5
|
ObjC.import("AppKit");
|
|
@@ -109,4 +109,4 @@ function run() {
|
|
|
109
109
|
`);X>=0;X=B.indexOf(`
|
|
110
110
|
`)){let S=B.slice(0,X);if(B=B.slice(X+1),!S.startsWith("c "))continue;let O=S.slice(2);if(O.length>Math.ceil(Y/3)*4||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(O)){K({reason:"display_protocol"});return}let _=Buffer.from(O,"base64");if(_.byteLength<=Y)q.clipboard(_.toString("utf8"));if(z)return}if(B.length>Math.ceil(Y/3)*4+2)K({reason:"display_protocol"})}),G.once("error",()=>W("Reason could not watch this Mac's desktop clipboard.")),G.once("exit",()=>{if(!z)W("Reason could not watch this Mac's desktop clipboard.")})};return J.stdout.on("data",(B)=>{if(z||Z===null)return;Z+=B.toString("utf8");let N=Z.indexOf(`
|
|
111
111
|
`);if(N<0){if(Z.length>4096)K({reason:"display_protocol"});return}let X=y(Z.slice(0,N));if(Z=null,!X)K({reason:"display_protocol"});else if(!X.screen||!X.accessibility)W(j.length>0?"Reason's background worker needs Screen Recording and Accessibility on this Mac (its own Reason entry in System Settings > Privacy & Security, not the Reason app's): run `reason permissions allow` on this Mac.":"Allow Screen Recording and Accessibility for this Mac's Reason worker, then restart it.");else i(),q.ready({width:X.width,height:X.height})}),J.stdin.on("error",()=>{return}),J.once("error",()=>W("Reason could not start this Mac's desktop input.")),J.once("exit",()=>{if(Z!==null)W("Reason could not start this Mac's desktop input.");else K({reason:"display_closed"})}),{pointer:(B,N,X)=>L(Q.pointer(B,N,X)),key:(B,N)=>L(Q.key(B,N)),clipboard:(B)=>L([`c ${Buffer.from(B,"utf8").toString("base64")}`]),close(){z=!0,F()}}}
|
|
112
|
-
export{Cj as
|
|
112
|
+
export{Cj as Qj,kj as Rj,h as Sj,Yj as Tj,Y as Uj,Lj as Vj,Aj as Wj,s as Xj,xj as Yj,Mj as Zj,fj as _j,hj as $j,$j as ak,y as bk,Sj as ck,_j as dk,Hj as ek,Tj as fk,a as gk,Vj as hk};
|