@reason-machines/cli-linux-arm64-musl 0.2.343 → 0.2.344
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ara +1 -1
- package/bin/vm-hands/api-credentials-d34gw13p.js +2 -0
- package/bin/vm-hands/api-t5zxz49k.js +2 -0
- package/bin/vm-hands/{ask-relay-d96qx4ez.js → ask-relay-mxa9m9t7.js} +2 -2
- package/bin/vm-hands/connect-cli-2y57w3qz.js +2 -0
- package/bin/vm-hands/{custom-endpoint-device-whc0qjdv.js → custom-endpoint-device-syw4d5k4.js} +1 -1
- package/bin/vm-hands/desktop-account-pm3zxjjt.js +2 -0
- package/bin/vm-hands/{device-workspace-1abchg0z.js → device-workspace-s49yhsk7.js} +1 -1
- package/bin/vm-hands/{hands-worker-source-9mq68whc.js → hands-worker-source-0ca76sbd.js} +1 -1
- package/bin/vm-hands/{index-5a4yhzf8.js → index-t1h1wd8g.js} +1 -1
- package/bin/vm-hands/local-automation-6jtf5yd8.js +2 -0
- package/bin/vm-hands/local-capabilities-d0j8q80s.js +2 -0
- package/bin/vm-hands/local-desktop-users-zxw8xxw9.js +2 -0
- package/bin/vm-hands/local-display-mac-jdgx19jw.js +2 -0
- package/bin/vm-hands/local-display-session-ete43m8f.js +2 -0
- package/bin/vm-hands/local-pty-session-frp7k8fz.js +2 -0
- package/bin/vm-hands/{network-contract-7y9z06qs.js → network-contract-q68zd3xf.js} +1 -1
- package/bin/vm-hands/package-vj1s3sye.js +2 -0
- package/bin/vm-hands/permissions-wxr58rza.js +2 -0
- package/bin/vm-hands/{reason-hands-protocol-mm6kwqk8.js → reason-hands-protocol-k12eme4q.js} +1 -1
- package/bin/vm-hands/{status-2mbhthe2.js → status-re8wbb15.js} +2 -2
- package/bin/vm-hands/version-bp278twg.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-0zr461f9.js → vm-hands-entry-lite-0jar357h.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-pn6vyghh.js → vm-hands-entry-lite-0wyjnvjz.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-va7g1e1f.js → vm-hands-entry-lite-1jhry648.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-70d6f5r9.js → vm-hands-entry-lite-1xjtcxpn.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-3s5fdvat.js → vm-hands-entry-lite-289bc9v7.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-6z2g0td2.js → vm-hands-entry-lite-2xh7sjs0.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-xazz63m6.js → vm-hands-entry-lite-51rabw4s.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-p7x3vnz5.js → vm-hands-entry-lite-7ba3nhgv.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-8zencenv.js → vm-hands-entry-lite-84cwhsqh.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-p9eyqdq7.js → vm-hands-entry-lite-9dx3at21.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-bjc5fdv3.js +42 -0
- package/bin/vm-hands/{vm-hands-entry-lite-ckehp0dy.js → vm-hands-entry-lite-c1p0mz65.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-xv868vfm.js → vm-hands-entry-lite-f7g390b5.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-jjq3xq9z.js → vm-hands-entry-lite-f8ss5hkt.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-3c4qwk4d.js → vm-hands-entry-lite-fnefqcw4.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-ypcqvygf.js → vm-hands-entry-lite-gt5pkv4h.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-dqqjy7kj.js → vm-hands-entry-lite-k1qw05mt.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-3gf1yegq.js → vm-hands-entry-lite-k2cvr710.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-bfh3cnh2.js → vm-hands-entry-lite-k2e3q5qj.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-2mhzfg6b.js → vm-hands-entry-lite-knfh7w3j.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-vn0r1e8c.js → vm-hands-entry-lite-kt418g2w.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-tt4zgt64.js → vm-hands-entry-lite-m16qf0yy.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-45cnnd8e.js → vm-hands-entry-lite-mhsv58hw.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-60t59y3n.js → vm-hands-entry-lite-mw2vtxm3.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-2c8m8m7v.js → vm-hands-entry-lite-pa111vpq.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-5qe562gn.js → vm-hands-entry-lite-pnkfgnqz.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-rkmkv423.js +529 -0
- package/bin/vm-hands/{vm-hands-entry-lite-21sg3fyz.js → vm-hands-entry-lite-tfpebnar.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-q1ekx7k0.js → vm-hands-entry-lite-x5az8qvp.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-qezqtm4g.js → vm-hands-entry-lite-x6jqyxkx.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-bs1mbk81.js → vm-hands-entry-lite-yeahy7rk.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-wqn9mnsj.js → vm-hands-executor-evkgp60b.js} +1 -1
- package/bin/vm-hands/vm-hands-op-runner-brfr12s6.js +2 -0
- package/bin/vm-hands/{vm-hands-runtime-bwvpt55d.js → vm-hands-runtime-8c2ycaph.js} +3 -3
- package/bin/vm-hands/worker-sandbox-1kpm6af4.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-credentials-7wdzy9by.js +0 -2
- package/bin/vm-hands/api-jq1fd10n.js +0 -2
- package/bin/vm-hands/connect-cli-cp0zh5f8.js +0 -2
- package/bin/vm-hands/desktop-account-j9pxgjn0.js +0 -2
- package/bin/vm-hands/local-automation-v0r1k6v9.js +0 -2
- package/bin/vm-hands/local-capabilities-9y6jj12c.js +0 -2
- package/bin/vm-hands/local-desktop-users-gxkmx7rv.js +0 -2
- package/bin/vm-hands/local-display-mac-6ktqrbas.js +0 -2
- package/bin/vm-hands/local-display-session-ab79qr64.js +0 -2
- package/bin/vm-hands/local-pty-session-3592ene9.js +0 -2
- package/bin/vm-hands/package-ffnz28tt.js +0 -2
- package/bin/vm-hands/permissions-ddm9as7j.js +0 -2
- package/bin/vm-hands/version-xdgmrx9d.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-1sq7jgg0.js +0 -529
- package/bin/vm-hands/vm-hands-entry-lite-bbc5r4y1.js +0 -42
- package/bin/vm-hands/vm-hands-op-runner-8nw0g7v3.js +0 -2
- package/bin/vm-hands/worker-sandbox-4mraqzsg.js +0 -2
package/bin/ara
CHANGED
|
@@ -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-m16qf0yy.js";import"./vm-hands-entry-lite-pnkfgnqz.js";import"./vm-hands-entry-lite-tfpebnar.js";import"./vm-hands-entry-lite-8ynztq9j.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-mhsv58hw.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-pnkfgnqz.js";import"./vm-hands-entry-lite-tfpebnar.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-mhsv58hw.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{L as _}from"./vm-hands-entry-lite-
|
|
2
|
+
import{L as _}from"./vm-hands-entry-lite-tfpebnar.js";import{wf as c}from"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import{Ai as g}from"./vm-hands-entry-lite-mhsv58hw.js";import{existsSync as Pz,mkdirSync as Uz,readFileSync as Cz,writeFileSync as Mz}from"fs";import{homedir as Oz}from"os";import{dirname as w,join as fz}from"path";import{spawnSync as W}from"child_process";import{createHash as p}from"crypto";import{chmodSync as m,existsSync as K,mkdirSync as b,mkdtempSync as a,readFileSync as i,renameSync as t,rmSync as r,statSync as s,writeFileSync as S}from"fs";import{connect as n}from"net";import{homedir as R}from"os";import{dirname as O,join as H}from"path";class V extends Error{}var D="reason-network",U="0.10.3",o={"aarch64-apple-darwin":"1e793a89ea8b53c603cddbc65ac08b0dd83f1dbfc30a1987858e2c52e2ed907c","x86_64-apple-darwin":"ef1f0f8d7d9e8a286de54eeb78f8ff8a53152c1a661c50b6182bfefa8eef8a02","aarch64-unknown-linux-musl":"75fdfd10314225ffb2875acc7ac73c66de23b5678b684d70b4678eb16ba35124","x86_64-unknown-linux-musl":"17111a623396eed0a2d98aa4d3bb03f00da37c25bdc39b6d0ba3ab202dfbe874"},e="https://reasonmachines.com/cli/engine",G="REASON_AGENT_NETWORK_BIN";function zz(){let z=process.arch==="arm64"?"aarch64":process.arch==="x64"?"x86_64":null,X=process.platform==="darwin"?"apple-darwin":process.platform==="linux"?"unknown-linux-musl":null;return z&&X?`${z}-${X}`:null}function Xz(z){let X=W(z,["--version"],{encoding:"utf8",timeout:5000}),[Z,$]=X.status===0?X.stdout.trim().split(/\s+/):[];return Z===D?$??null:null}function Zz(z,X){let Z=z.split(".").map(Number),$=X.split(".").map(Number);for(let q=0;q<3;q+=1)if((Z[q]??0)!==($[q]??0))return(Z[q]??0)>($[q]??0);return!0}function E(){return H(R(),".reason","bin","reason-network")}async function $z(z=process.env){if(z[G])return z[G];let X=E(),Z=v();if(Z?.path===X&&T(X)===Z.fingerprint)return X;let $=K(X)?Xz(X):null;if(!$||!Zz($,U))await Qz(X);let q=W(X,["setup",...qz(z)?["--no-service"]:[]],{env:z,encoding:"utf8",timeout:60000});if(q.status!==0){let Q=P((q.stderr||q.stdout||"").trim().split(`
|
|
3
3
|
`).pop()??"");throw new V(`Couldn't connect this computer's agents to the network${Q?` (${Q})`:""}. Run reason network setup to try again.`)}return W(X,["stop"],{env:z,stdio:"ignore",timeout:15000}),Bz(X)}function qz(z=process.env){return Boolean(z.REASON_NETWORK_NO_SERVICE||z.TINCAN_NO_SERVICE)}var f=()=>H(R(),".reason","ask-engine.json");function T(z){try{let X=s(z);return`${X.size}:${X.mtimeMs}:${X.ino}`}catch{return null}}function v(){try{let z=JSON.parse(i(f(),"utf8"));return typeof z.path==="string"&&typeof z.fingerprint==="string"&&z.version===U?{path:z.path,fingerprint:z.fingerprint}:null}catch{return null}}function Bz(z){let X=T(z);if(!X)return z;let Z=O(f());if(!K(Z))b(Z,{recursive:!0});return S(f(),JSON.stringify({path:z,fingerprint:X,version:U})),z}async function Qz(z){let X=zz(),Z=X?o[X]:void 0;if(!X||!Z)throw new V(`Reason Network runs on macOS and Linux (arm64 or x64); this is ${process.platform} ${process.arch}.`);let $=`${e}/${U}/${D}-${X}.tar.gz`,q;try{let Y=await fetch($,{signal:AbortSignal.timeout(120000)});if(!Y.ok)throw Error(`HTTP ${Y.status}`);q=Buffer.from(await Y.arrayBuffer())}catch(Y){let F=Y instanceof Error&&Y.name==="TimeoutError"?"no download within 2 minutes":Y instanceof Error?Y.message.replace(/\.$/,""):String(Y);throw new V(`Couldn't download the network engine from ${new URL($).host} (${F}). Check the connection and run reason network again.`)}if(p("sha256").update(q).digest("hex")!==Z)throw new V("The downloaded network engine didn't match its checksum, so it wasn't installed.");b(O(z),{recursive:!0});let B=a(H(O(z),".reason-engine-"));try{if(S(H(B,"engine.tar.gz"),q),W("tar",["-xzf",H(B,"engine.tar.gz"),"-C",B]).status!==0||!K(H(B,D)))throw new V("Couldn't unpack the network engine.");m(H(B,D),493),t(H(B,D),z)}finally{r(B,{recursive:!0,force:!0})}}function Yz(z=process.env,X=R()){let Z=z.REASON_NETWORK_HOME?.trim()||z.TINCAN_HOME?.trim();if(Z)return Z;let $=H(X,".reason","network"),q=H(X,".tincan");return!A($)&&A(q)?q:$}var A=(z)=>K(H(z,"network.db"))||K(H(z,"tincan.db"));function Hz(z){let X=K(H(z,"network.db"))||!K(H(z,"tincan.db")),Z=H(z,X?"network.sock":"tincan.sock");if(Buffer.byteLength(Z)<100)return Z;let $=0xcbf29ce484222325n;for(let q of Buffer.from(Z))$=BigInt.asUintN(64,($^BigInt(q))*0x100000001b3n);return H("/tmp",`${X?"reason-network":"tincan"}-${process.getuid?.()??0}`,`${$.toString(16).padStart(16,"0")}.sock`)}var u=15000,Jz=new Set(["who","team","inbox","unread","held"]),Kz=90000;class x{socket;nextId=1;buffer="";pending=new Map;closed=null;constructor(z){this.socket=z;z.setEncoding("utf8"),z.on("data",(Z)=>this.read(Z));let X=(Z)=>{this.closed=Z;for(let $ of this.pending.values())$.reject(Z);this.pending.clear()};z.on("error",(Z)=>X(Z)),z.on("close",()=>X(Error("the network daemon closed the connection")))}static open(z){return new Promise((X,Z)=>{let $=n(z);$.once("connect",()=>X(new x($))),$.once("error",Z)})}read(z){this.buffer+=z;let X=this.buffer.indexOf(`
|
|
4
4
|
`);while(X>=0){let Z=this.buffer.slice(0,X);if(this.buffer=this.buffer.slice(X+1),X=this.buffer.indexOf(`
|
|
5
5
|
`),!Z.trim())continue;let $;try{$=JSON.parse(Z)}catch{continue}if(typeof $.id!=="number")continue;let q=this.pending.get($.id);if(!q)continue;if(this.pending.delete($.id),$.ok)q.resolve($.result);else q.reject(Error(P($.error??"the network daemon refused the request")))}}call(z,X={},Z=u){if(this.closed)return Promise.reject(this.closed);let $=this.nextId++;return this.socket.write(`${JSON.stringify({id:$,op:z,...X})}
|
|
6
6
|
`),new Promise((q,Q)=>{let B=setTimeout(()=>{this.pending.delete($),Q(Error(`the network daemon didn't answer ${z} within ${Math.round(Z/1000)}s`))},Z);this.pending.set($,{resolve:(Y)=>{clearTimeout(B),q(Y)},reject:(Y)=>{clearTimeout(B),Q(Y)}})})}get isClosed(){return this.closed!==null}close(){this.socket.end()}}var M=/^(Claude Code|Grok|Codex) \u00B7 (.*)$/,Vz={"Claude Code":"claude-code",Grok:"grok",Codex:"codex"},Lz=/^ask-[0-9a-f]{6}$/;function j(z){return{id:z.id,from:z.from,fromAgent:z.from_agent,to:z.to,replyTo:z.reply_to,body:z.body,sentAt:z.sent_at}}function N(z){return{person:z.person,machine:z.machine,isMe:z.is_me,online:z.online,link:z.link,rttMs:z.rtt_ms}}class L{engine;env;connection=null;waits=new Set;constructor(z,X){this.engine=z;this.env=X}static async open(z=process.env){return new L(await $z(z),z)}static openInstalled(z=process.env){if(z[G])return new L(z[G],z);let X=E(),Z=v();return Z?.path===X&&T(X)===Z.fingerprint?new L(X,z):null}socketPath(){return Hz(Yz(this.env))}async open(){try{return await x.open(this.socketPath())}catch{return W(this.engine,["who","--json"],{env:this.env,stdio:"ignore",timeout:15000}),await x.open(this.socketPath())}}async call(z,X={},Z){if(!this.connection||this.connection.isClosed)this.connection=await this.open();try{return await this.connection.call(z,X,Z)}catch($){if(!/closed|ECONNRESET|EPIPE/.test(String($)))throw $;if(this.connection=await this.open(),!Jz.has(z))throw $;return await this.connection.call(z,X)}}async waitOn(z,X){let Z=await this.open();this.waits.add(Z);try{return await Z.call(z,X,X.wait_secs*1000+u)}finally{this.waits.delete(Z),Z.close()}}close(){this.connection?.close(),this.connection=null;for(let z of this.waits)z.close();this.waits.clear()}async team(){try{let z=await this.call("team");return{...z,machines:z.machines.map(N)}}catch(z){if(/team/i.test(String(z)))return null;throw z}}async snapshot(z={}){let X=await this.call("who",{all:Boolean(z.all),...z.filter?{filter:z.filter}:{}}),Z=new Set(X.sessions.filter((q)=>M.test(q.doing??"")).map((q)=>`${q.person}/${q.machine}:${q.cwd}`)),$=X.sessions.filter((q)=>z.all||!Lz.test(q.name)).filter((q)=>M.test(q.doing??"")||!Z.has(`${q.person}/${q.machine}:${q.cwd}`)).map((q)=>{let Q=M.exec(q.doing??"");return{address:q.address,name:q.name,person:q.person,machine:q.machine,agent:Q?Vz[Q[1]]:q.agent,cwd:q.cwd,repo:q.repo,branch:q.branch,status:Q?Q[2]==="ready for work"?"idle":Q[2]==="stopped"?"offline":"busy":q.status,since:q.since,doing:Q?Q[2]:q.doing,isMe:q.is_me,worker:Boolean(Q)}});return{team:X.team,person:X.person,machine:X.machine,machines:X.machines.map(N),sessions:$}}async send(z,X,Z={}){if(!Z.from)await this.call("hook",{agent:"cli",event:"stop",session_id:"terminal",name:"terminal",cwd:process.cwd(),mail:!1});let $=await this.call("send",{from:Z.from??"terminal",to:z,body:X,...Z.replyTo?{reply_to:Z.replyTo}:{},wake:Z.wake??!0});return{ids:$.ids,recipients:$.recipients.map((q)=>q.address)}}async session(z,X={}){let Z=X.agent??"cli",$=(B,Y={})=>this.call("hook",{agent:Z,event:B,session_id:z,name:z,cwd:process.cwd(),mail:!1,...Y}),q=await $("stop"),Q=`${Z}:${z}`;return{name:z,address:q.address??z,next:async(B)=>{return(await this.waitOn("inbox",{key:Q,wait_secs:B,peek:!0})).messages.map(j)},ack:async(B)=>{if(B.length)await this.call("delivered",{key:Q,ids:B})},busy:async(B)=>{if(await $("prompt"),B)await $("doing",{doing:B})},idle:async(B)=>{if(await $("stop"),B)await $("doing",{doing:B})},doing:async(B)=>{await $("doing",{doing:B})},send:(B,Y,F)=>this.send(B,Y,{from:Q,...F?{replyTo:F}:{}})}}async inbox(z={}){let Z=(await this.waitOn("inbox",{key:"cli:terminal",wait_secs:z.waitSeconds??0,peek:!0}).catch(($)=>{if(/isn't registered/.test(String($)))return{messages:[]};throw $})).messages.map(j);if(Z.length&&!z.peek)await this.call("delivered",{key:"cli:terminal",ids:Z.map(($)=>$.id)});return Z}async link(z={}){return await this.call("link",{new:Boolean(z.new)})}async changeTeam(z,X){try{return await this.call(z,X,Kz)}finally{this.close()}}async changeOntoTeam(z,X){try{await this.changeTeam(z,X)}catch(Z){if(!/closed|ECONNRESET|EPIPE/.test(String(Z)))throw Z;if(await this.team())return;await this.changeTeam(z,X)}}async createTeam(z,X){await this.changeOntoTeam("create_team",{name:z,person:X})}async join(z,X){await this.changeOntoTeam("join",{ticket:z,person:X})}async leave(){return await this.changeTeam("leave",{force:!0})}async remove(z){return await this.call("remove",{who:z})}passthrough(z,X={}){this.close();let Z=W(this.engine,z,{stdio:["inherit","pipe","pipe"],encoding:"utf8",env:this.env});if(!X.quiet||Z.status!==0)process.stdout.write(P(Z.stdout??"")),process.stderr.write(P(Z.stderr??""));return Z.status??1}}function P(z){return z.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 kz,mkdirSync as cz,readFileSync as Wz,writeFileSync as lz}from"fs";import{homedir as Dz,hostname as mz}from"os";import{dirname as iz,join as Fz}from"path";var Gz=(z)=>Fz(z,".reason","ask.json");function xz(z){try{let X=JSON.parse(Wz(Gz(z),"utf8"));if(typeof X.orgId!=="string"||typeof X.team!=="string")return null;let Z=X.pendingRotation;return{orgId:X.orgId,team:X.team,...typeof X.checkedAt==="number"?{checkedAt:X.checkedAt}:{},...Z&&typeof Z.link==="string"&&typeof Z.team==="string"&&typeof Z.replaces==="string"?{pendingRotation:Z}:{}}}catch{return null}}function y(z=Dz()){let X=xz(z);return X?{orgId:X.orgId,team:X.team}:null}var d=86400000,Rz=300,C=(z)=>fz(z,".reason","ask-relay.json");function I(z){try{let X=JSON.parse(Cz(C(z),"utf8"));return{sessions:Array.isArray(X.sessions)?X.sessions.filter((Z)=>typeof Z?.name==="string"&&typeof Z.agent==="string"&&typeof Z.usedAt==="number"):[]}}catch{return{sessions:[]}}}function Tz(z,X){try{if(!Pz(w(C(z))))Uz(w(C(z)),{recursive:!0});Mz(C(z),`${JSON.stringify(X)}
|
|
7
7
|
`,{mode:384})}catch{}}var J=(z,X)=>new Promise((Z)=>{if(X.aborted)return Z();let $=setTimeout(q,z);$.unref?.();function q(){clearTimeout($),X.removeEventListener("abort",q),Z()}X.addEventListener("abort",q,{once:!0})});function h(z){let X=z?.status;return typeof X==="number"?X:null}var k=60000;function Iz(z){let X=Number.isFinite(z.sentAt)&&Math.abs(z.sentAt)<8640000000000000?z.sentAt:Date.now();return{id:z.id.slice(0,100),from:z.from.slice(0,300),from_agent:z.fromAgent?.slice(0,100)??null,to:z.to.slice(0,300),reply_to:z.replyTo?.slice(0,100)??null,sent_at:X,body:z.body.length>k?`${z.body.slice(0,k)}
|
|
8
|
-
[cut: the answer was ${z.body.length} characters]`:z.body}}class l{network;api;home;signal;log;team;sessions=new Map;readers=new Set;constructor(z,X,Z,$,q,Q){this.network=z;this.api=X;this.home=Z;this.signal=$;this.log=q;this.team=Q}async run(){let z=Date.now()-d;for(let Z of I(this.home).sessions)if(Z.usedAt>z)this.read(Z);let X=0;while(!this.signal.aborted){let Z=await this.network.team().catch(()=>null);if(!Z){await J(60000,this.signal);continue}if(Z.name!==this.team)return;let $;try{let q=await this.api.claimAgentNetworkRelayJob({machine:Z.machine,person:Z.person,team:Z.name,version:c,wait_seconds:_},AbortSignal.any([this.signal,AbortSignal.timeout((_+20)*1000)]));if(X=0,q.retry_after_seconds)await J(q.retry_after_seconds*1000,this.signal);$=q.job}catch(q){if(this.signal.aborted)return;let Q=h(q);if(Q===403||Q===401){await J(900000,this.signal);continue}if(Q===404||Q===405){await J(120000,this.signal);continue}X+=1,await J(Math.min(60000,1000*2**Math.min(X,6)),this.signal);continue}if($)this.carry($)}}async carry(z){let X;try{X=z.kind==="who"?{who:await this.who()}:{sent:await this.send(z)}}catch(Z){X={error:Z instanceof Error?Z.message:String(Z)}}for(let Z=1;;Z+=1)try{if(await this.api.completeAgentNetworkRelayJob(z.id,X),z.kind==="send")this.log(`relayed a message to ${z.to} from ${"sent"in X?X.sent.from:z.from_name}`);return}catch($){if(Z>=4||this.signal.aborted){this.log(`couldn't report a relayed call: ${$ instanceof Error?$.message:String($)}`);return}await J(Z*1000,this.signal)}}async who(){let z=await this.network.snapshot();return{team:z.team,sessions:z.sessions.map((X)=>({address:X.address,person:X.person,machine:X.machine,agent:X.agent,repo:X.repo,branch:X.branch,status:X.status,since:X.since,doing:X.doing,worker:X.worker})),machines:z.machines.map((X)=>({person:X.person,machine:X.machine,online:X.online}))}}async send(z){let X={name:z.from_name,agent:z.from_agent},Z=await this.session(X),$=await Z.send(z.to,z.body);return this.remember(X),this.read(X),{ids:$.ids,recipients:$.recipients,from:Z.address}}session(z){let X=`${z.agent}:${z.name}`,Z=this.sessions.get(X);if(!Z)Z=this.network.session(z.name,{agent:z.agent}).then(async($)=>{return await $.idle(`personal agent (${z.agent}), through Reason`).catch(()=>{}),$}),Z.catch(()=>this.sessions.delete(X)),this.sessions.set(X,Z);return Z}remember(z){let Z=I(this.home).sessions.filter(($)=>$.name!==z.name||$.agent!==z.agent);Tz(this.home,{sessions:[...Z,{...z,usedAt:Date.now()}].slice(-50)})}read(z){let X=`${z.agent}:${z.name}`;if(this.readers.has(X))return;this.readers.add(X),(async()=>{let Z=0;try{while(!this.signal.aborted){let $=I(this.home).sessions.find((q)=>q.name===z.name&&q.agent===z.agent)?.usedAt??0;if(Date.now()-$>d)return;try{let q=await this.session(z),Q=await q.next(Rz);if(Q.length===0)continue;await this.api.recordAgentNetworkRelayReplies(Q.map(Iz)).catch((B)=>{let Y=h(B);if(Y===null||Y>=500||Y===429||Y===401)throw B;this.log(`dropped ${Q.length} answer(s) the server refused (HTTP ${Y})`)}),await q.ack(Q.map((B)=>B.id)),Z=0}catch{if(this.signal.aborted)return;this.sessions.delete(X),Z+=1,await J(Math.min(60000,1000*2**Math.min(Z,6)),this.signal)}}}finally{this.readers.delete(X)}})()}}async function _z(z){await new l(z.network,z.api,z.home??Oz(),z.signal,z.log??(()=>{}),z.team).run()}async function $X(z,X=()=>{}){while(!z.aborted){try{let Z=y(),$=Z?L.openInstalled():null;if(Z&&$){let[{requireApiCredentials:q},{ReasonApi:Q}]=await Promise.all([import("./api-credentials-
|
|
8
|
+
[cut: the answer was ${z.body.length} characters]`:z.body}}class l{network;api;home;signal;log;team;sessions=new Map;readers=new Set;constructor(z,X,Z,$,q,Q){this.network=z;this.api=X;this.home=Z;this.signal=$;this.log=q;this.team=Q}async run(){let z=Date.now()-d;for(let Z of I(this.home).sessions)if(Z.usedAt>z)this.read(Z);let X=0;while(!this.signal.aborted){let Z=await this.network.team().catch(()=>null);if(!Z){await J(60000,this.signal);continue}if(Z.name!==this.team)return;let $;try{let q=await this.api.claimAgentNetworkRelayJob({machine:Z.machine,person:Z.person,team:Z.name,version:c,wait_seconds:_},AbortSignal.any([this.signal,AbortSignal.timeout((_+20)*1000)]));if(X=0,q.retry_after_seconds)await J(q.retry_after_seconds*1000,this.signal);$=q.job}catch(q){if(this.signal.aborted)return;let Q=h(q);if(Q===403||Q===401){await J(900000,this.signal);continue}if(Q===404||Q===405){await J(120000,this.signal);continue}X+=1,await J(Math.min(60000,1000*2**Math.min(X,6)),this.signal);continue}if($)this.carry($)}}async carry(z){let X;try{X=z.kind==="who"?{who:await this.who()}:{sent:await this.send(z)}}catch(Z){X={error:Z instanceof Error?Z.message:String(Z)}}for(let Z=1;;Z+=1)try{if(await this.api.completeAgentNetworkRelayJob(z.id,X),z.kind==="send")this.log(`relayed a message to ${z.to} from ${"sent"in X?X.sent.from:z.from_name}`);return}catch($){if(Z>=4||this.signal.aborted){this.log(`couldn't report a relayed call: ${$ instanceof Error?$.message:String($)}`);return}await J(Z*1000,this.signal)}}async who(){let z=await this.network.snapshot();return{team:z.team,sessions:z.sessions.map((X)=>({address:X.address,person:X.person,machine:X.machine,agent:X.agent,repo:X.repo,branch:X.branch,status:X.status,since:X.since,doing:X.doing,worker:X.worker})),machines:z.machines.map((X)=>({person:X.person,machine:X.machine,online:X.online}))}}async send(z){let X={name:z.from_name,agent:z.from_agent},Z=await this.session(X),$=await Z.send(z.to,z.body);return this.remember(X),this.read(X),{ids:$.ids,recipients:$.recipients,from:Z.address}}session(z){let X=`${z.agent}:${z.name}`,Z=this.sessions.get(X);if(!Z)Z=this.network.session(z.name,{agent:z.agent}).then(async($)=>{return await $.idle(`personal agent (${z.agent}), through Reason`).catch(()=>{}),$}),Z.catch(()=>this.sessions.delete(X)),this.sessions.set(X,Z);return Z}remember(z){let Z=I(this.home).sessions.filter(($)=>$.name!==z.name||$.agent!==z.agent);Tz(this.home,{sessions:[...Z,{...z,usedAt:Date.now()}].slice(-50)})}read(z){let X=`${z.agent}:${z.name}`;if(this.readers.has(X))return;this.readers.add(X),(async()=>{let Z=0;try{while(!this.signal.aborted){let $=I(this.home).sessions.find((q)=>q.name===z.name&&q.agent===z.agent)?.usedAt??0;if(Date.now()-$>d)return;try{let q=await this.session(z),Q=await q.next(Rz);if(Q.length===0)continue;await this.api.recordAgentNetworkRelayReplies(Q.map(Iz)).catch((B)=>{let Y=h(B);if(Y===null||Y>=500||Y===429||Y===401)throw B;this.log(`dropped ${Q.length} answer(s) the server refused (HTTP ${Y})`)}),await q.ack(Q.map((B)=>B.id)),Z=0}catch{if(this.signal.aborted)return;this.sessions.delete(X),Z+=1,await J(Math.min(60000,1000*2**Math.min(Z,6)),this.signal)}}}finally{this.readers.delete(X)}})()}}async function _z(z){await new l(z.network,z.api,z.home??Oz(),z.signal,z.log??(()=>{}),z.team).run()}async function $X(z,X=()=>{}){while(!z.aborted){try{let Z=y(),$=Z?L.openInstalled():null;if(Z&&$){let[{requireApiCredentials:q},{ReasonApi:Q}]=await Promise.all([import("./api-credentials-d34gw13p.js"),import("./api-t5zxz49k.js")]),B=await q({});if(B.credentialKind!=="api_key"&&B.orgId.toLowerCase()===Z.orgId.toLowerCase())try{await _z({network:$,api:new Q(B),team:Z.team,signal:z,log:X})}finally{$.close()}}}catch(Z){X(`agent network relay: ${Z instanceof Error?Z.message:String(Z)}`)}await J(300000,z)}}export{$X as runBackgroundAskRelay,_z as runAskRelay};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{h as a,i as b,j as c,k as d,l as e,m as f,n as g,o as h,p as i,q as j,r as k,s as l,t as m}from"./vm-hands-entry-lite-k1qw05mt.js";import"./vm-hands-entry-lite-k2e3q5qj.js";import"./vm-hands-entry-lite-m16qf0yy.js";import"./vm-hands-entry-lite-pnkfgnqz.js";import"./vm-hands-entry-lite-tfpebnar.js";import"./vm-hands-entry-lite-rkmkv423.js";import"./vm-hands-entry-lite-f7g390b5.js";import"./vm-hands-entry-lite-7ba3nhgv.js";import"./vm-hands-entry-lite-wmxksawm.js";import"./vm-hands-entry-lite-k2cvr710.js";import"./vm-hands-entry-lite-k469tezz.js";import"./vm-hands-entry-lite-8ynztq9j.js";import"./vm-hands-entry-lite-0wyjnvjz.js";import"./vm-hands-entry-lite-fnefqcw4.js";import"./vm-hands-entry-lite-bjc5fdv3.js";import"./vm-hands-entry-lite-x5az8qvp.js";import"./vm-hands-entry-lite-pa111vpq.js";import"./vm-hands-entry-lite-c1p0mz65.js";import"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-x6jqyxkx.js";import"./vm-hands-entry-lite-kt418g2w.js";import"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-0jar357h.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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-whc0qjdv.js → custom-endpoint-device-syw4d5k4.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ac as j,Bc as k,Cc as l,Dc as m,Ec as n,Fc as o,Gc as p,Hc as q,Ic as r,Jc as s,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-
|
|
2
|
+
import{Ac as j,Bc as k,Cc as l,Dc as m,Ec as n,Fc as o,Gc as p,Hc as q,Ic as r,Jc as s,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-0wyjnvjz.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-mhsv58hw.js";export{s as isCustomEndpointFailureMessage,q as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,r as customEndpointFailureMessage,p as customEndpointDeviceFailureMessage,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,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{$e as c,Ze as a,_e as b,af as d,bf as e}from"./vm-hands-entry-lite-pa111vpq.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-mhsv58hw.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{$h as
|
|
2
|
+
import{$h as i,Th as a,Uh as b,Vh as c,Wh as d,Xh as e,Yh as f,Zh as g,_h as h,ai as j,bi as k,ci as l,di as m,ei as n,fi as o,gi as p,hi as q,ii as r,ji as s,ki as t,li as u}from"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-mhsv58hw.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{cc as a,dc as b,ec as c,fc as d,gc as e,hc as f,ic as g,jc as h,kc as i}from"./vm-hands-entry-lite-
|
|
2
|
+
import{cc as a,dc as b,ec as c,fc as d,gc as e,hc as f,ic as g,jc as h,kc as i}from"./vm-hands-entry-lite-k2cvr710.js";import"./vm-hands-entry-lite-k469tezz.js";import"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-mhsv58hw.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{Q as iJ0}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Q as iJ0}from"./vm-hands-entry-lite-1jhry648.js";import{Ai as X0,vi as NV0,wi as rn,xi as EJ,zi as an}from"./vm-hands-entry-lite-mhsv58hw.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)+`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$c as a,ad as b,bd as c,cd as d,dd as e,ed as f,fd as g,gd as h,hd as i,id as j,jd as k,kd as l}from"./vm-hands-entry-lite-fnefqcw4.js";import"./vm-hands-entry-lite-bjc5fdv3.js";import"./vm-hands-entry-lite-x5az8qvp.js";import"./vm-hands-entry-lite-pa111vpq.js";import"./vm-hands-entry-lite-c1p0mz65.js";import"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-x6jqyxkx.js";import"./vm-hands-entry-lite-kt418g2w.js";import"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-0jar357h.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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{fa as c,ga as d,ha as e,ia as f,ja as g,ka as h,la as i,ma as j,na as k,oa as l,pa as m,qa as n,ra as o,sa as p,ta as q,ua as r,va as s,wa as t,xa as u}from"./vm-hands-entry-lite-rkmkv423.js";import"./vm-hands-entry-lite-f7g390b5.js";import"./vm-hands-entry-lite-7ba3nhgv.js";import"./vm-hands-entry-lite-wmxksawm.js";import"./vm-hands-entry-lite-k2cvr710.js";import{pc as b}from"./vm-hands-entry-lite-k469tezz.js";import"./vm-hands-entry-lite-8ynztq9j.js";import"./vm-hands-entry-lite-0wyjnvjz.js";import"./vm-hands-entry-lite-fnefqcw4.js";import"./vm-hands-entry-lite-bjc5fdv3.js";import"./vm-hands-entry-lite-x5az8qvp.js";import"./vm-hands-entry-lite-pa111vpq.js";import"./vm-hands-entry-lite-c1p0mz65.js";import"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-x6jqyxkx.js";import"./vm-hands-entry-lite-kt418g2w.js";import"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-0jar357h.js";import{ui as a}from"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.js";export{g as spawnCaptured,f as sandboxProfile,e as safeEnvironment,k as runTransferCapability,i as runFileCapability,t as rebindLocalHandsControl,j as localGithubPreviewServerLaunch,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{ni as a,oi as b,pi as c,qi as d,ri as e,si as f,ti as g}from"./vm-hands-entry-lite-0jar357h.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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{Of as a,Pf as b,Qf as c,Rf as d,Sf as e,Tf as f,Uf as g}from"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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{Re as a,Se as b,Te as c,Ue as d,Ve as e,We as f,Xe as g,Ye as h}from"./vm-hands-entry-lite-x5az8qvp.js";import"./vm-hands-entry-lite-pa111vpq.js";import"./vm-hands-entry-lite-c1p0mz65.js";import"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-x6jqyxkx.js";import"./vm-hands-entry-lite-kt418g2w.js";import"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-0jar357h.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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{$f as g,Vf as a,Wf as b,Xf as c,Yf as d,Zf as e,_f as f,ag as h,bg as i,cg as j}from"./vm-hands-entry-lite-x6jqyxkx.js";import"./vm-hands-entry-lite-kt418g2w.js";import"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-1xjtcxpn.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$d as
|
|
2
|
+
import{$d as G,Ad as f,Ae as fa,Bd as g,Be as ga,Cd as h,Ce as ha,Dd as i,De as ia,Ed as j,Fd as k,Gd as l,Hd as m,Id as n,Jd as o,Kd as p,Ld as q,Md as r,Nd as s,Od as t,Pd as u,Qd as v,Rd as w,Sd as x,Td as y,Ud as z,Vd as A,Wd as B,Xd as C,Yd as D,Zd as E,_d as F,ae as H,be as I,ce as J,de as K,ee as L,fe as M,ge as N,he as O,ie as P,je as Q,ke as R,le as S,me as T,ne as U,oe as V,pe as W,qe as X,re as Y,se as Z,te as _,ue as $,vd as a,ve as aa,wd as b,we as ba,xd as c,xe as ca,yd as d,ye as da,zd as e,ze as ea}from"./vm-hands-entry-lite-bjc5fdv3.js";import"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-mhsv58hw.js";export{$ as parseLocalRuntimeRootsSyncResponse,X as parseLocalRuntimeRegistrationResponse,W as parseLocalRuntimeProofChallenge,fa as parseLocalRuntimeOperationHeartbeatResponse,ga as parseLocalRuntimeOperationEventsResponse,ha as parseLocalRuntimeOperationEnvironmentResponse,ia as parseLocalRuntimeOperationCompletionResponse,ea as parseLocalRuntimeOperationClaim,ca as parseLocalRuntimeLocalSubscriptionResponse,da as parseLocalRuntimeLifecycleResponse,aa as parseLocalRuntimeIdentityResponse,Z as parseLocalRuntimeHeartbeatResponse,_ as parseLocalRuntimeFirstHeartbeat,V as parseLocalRuntimeErrorEnvelope,Y as parseLocalRuntimeEnrollmentResponse,ba as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,U as buildLocalRuntimeDeviceProofBytes,P as WORKER_STARTUP_TIMING_STAGES,K as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,Q 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,R as LOCAL_RUNTIME_LIFECYCLE_EVENTS,T as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,S as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,M as JOBS_START_WAIT_KEY,L as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,J as HANDS_SESSION_CAP_NONE,I as HANDS_SESSION_CAP_KEY,s as HANDS_REBIND_KEY,t as HANDS_REBIND_CONTROL,r as HANDS_REBIND,D as HANDS_MODEL_JOBS_EGRESS_KEY,C as HANDS_MODEL_JOBS_EGRESS,z as HANDS_LARGE_ENVIRONMENT_KEY,y as HANDS_LARGE_ENVIRONMENT,F as HANDS_JOBS_USER_KEY,E as HANDS_JOBS_USER,x as HANDS_HEADLESS_BROWSER_KEY,w as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,q as HANDS_ENVIRONMENT_AT_CLAIM_KEY,p as HANDS_ENVIRONMENT_AT_CLAIM,B as HANDS_CONFINEMENT_KEY,A as HANDS_CONFINEMENT,v as HANDS_CLOUD_ACCESS_KEY,u as HANDS_CLOUD_ACCESS,N as AUTOMATION_USER_CHROME,O as AUTOMATION_CLOUD_SESSIONS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{mf as a,nf as b,of as c,pf as d,qf as e,rf as f,sf as g,tf as h,uf as i,vf as j}from"./vm-hands-entry-lite-c1p0mz65.js";import"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import"./vm-hands-entry-lite-mhsv58hw.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-mm6kwqk8.js → reason-hands-protocol-k12eme4q.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$g as
|
|
2
|
+
import{$g as D,Ag as c,Bg as d,Cg as e,Dg as f,Eg as g,Fg as h,Gg as i,Hg as j,Ig as k,Jg as l,Kg as m,Lg as n,Mg as o,Ng as p,Og as q,Pg as r,Qg as s,Rg as t,Sg as u,Tg as v,Ug as w,Vg as x,Wg as y,Xg as z,Yg as A,Zg as B,_g as C,ah as E,bh as F,ch as G,dh as H,eh as I,fh as J,gh as K,hh as L,ih as M,jh as N,kh as O,lh as P,mh as Q,nh as R,oh as S,ph as T,qh as U,rh as V,sh as W,th as X,uh as Y,vh as Z,yg as a,zg as b}from"./vm-hands-entry-lite-knfh7w3j.js";import"./vm-hands-entry-lite-289bc9v7.js";import"./vm-hands-entry-lite-mhsv58hw.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{d as jq,e as Dq,f as Vq,g as kq,j as Hq,k as zq,p as Aq}from"./vm-hands-entry-lite-
|
|
2
|
+
import{d as jq,e as Dq,f as Vq,g as kq,j as Hq,k as zq,p as Aq}from"./vm-hands-entry-lite-k1qw05mt.js";import"./vm-hands-entry-lite-k2e3q5qj.js";import{y as Fq}from"./vm-hands-entry-lite-m16qf0yy.js";import{A as Wq,K as bq}from"./vm-hands-entry-lite-pnkfgnqz.js";import"./vm-hands-entry-lite-tfpebnar.js";import"./vm-hands-entry-lite-rkmkv423.js";import"./vm-hands-entry-lite-f7g390b5.js";import"./vm-hands-entry-lite-7ba3nhgv.js";import"./vm-hands-entry-lite-wmxksawm.js";import"./vm-hands-entry-lite-k2cvr710.js";import"./vm-hands-entry-lite-k469tezz.js";import"./vm-hands-entry-lite-8ynztq9j.js";import"./vm-hands-entry-lite-0wyjnvjz.js";import{Kc as Kq}from"./vm-hands-entry-lite-fnefqcw4.js";import"./vm-hands-entry-lite-bjc5fdv3.js";import"./vm-hands-entry-lite-x5az8qvp.js";import"./vm-hands-entry-lite-pa111vpq.js";import"./vm-hands-entry-lite-c1p0mz65.js";import{wf as N}from"./vm-hands-entry-lite-f8ss5hkt.js";import"./vm-hands-entry-lite-51rabw4s.js";import"./vm-hands-entry-lite-yeahy7rk.js";import"./vm-hands-entry-lite-x6jqyxkx.js";import{lg as Qq,qg as Bq}from"./vm-hands-entry-lite-kt418g2w.js";import"./vm-hands-entry-lite-knfh7w3j.js";import{Ah as u,Bh as s,zh as z}from"./vm-hands-entry-lite-1xjtcxpn.js";import{Oh as l}from"./vm-hands-entry-lite-9dx3at21.js";import"./vm-hands-entry-lite-289bc9v7.js";import{mi as G}from"./vm-hands-entry-lite-2xh7sjs0.js";import"./vm-hands-entry-lite-0jar357h.js";import"./vm-hands-entry-lite-gt5pkv4h.js";import{Ai as $q}from"./vm-hands-entry-lite-mhsv58hw.js";import{createHash as aq,randomBytes as nq}from"crypto";import{readFileSync as eq,realpathSync as Pq,renameSync as q3,unlinkSync as x3,writeFileSync as J3}from"fs";import{dirname as X3,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 vq,readFileSync as Eq}from"fs";import{join as Mq}from"path";var _q=`---
|
|
3
3
|
name: reason
|
|
4
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
5
|
---
|
|
@@ -79,7 +79,7 @@ This computer
|
|
|
79
79
|
`),W.version)x.stdout.write(`Version: ${W.version}${W.version===N?"":` (${N} is installed; \`reason connect\` restarts it on that)`}
|
|
80
80
|
`);if(x.stdout.write(`Folder: ${W.folder}
|
|
81
81
|
`),x.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 Z=A,H=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Oq,reasonIdentity:Tq}=await import("./permissions-
|
|
82
|
+
`),A){let Z=A,H=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Oq,reasonIdentity:Tq}=await import("./permissions-wxr58rza.js"),{macScreenStatus:Uq}=await import("./local-display-mac-jdgx19jw.js");return Rq(await Oq({identity:()=>Tq(),grants:Uq,worker:async()=>Z}))}))().catch(()=>null);if(H)x.stdout.write(`${H}
|
|
83
83
|
`);x.stdout.write(`Keep awake: ${A.keep_awake.enabled?"on":"off"}${A.keep_awake.holding?" (holding)":""}
|
|
84
84
|
`)}if(W.service)x.stdout.write(`Logs: ${W.service.logs}
|
|
85
85
|
`);for(let Z of W.workspaces??[]){let H=Z.state==="removed"?"removed from that workspace":Z.blocked?"offline (this computer is outside that workspace's allowed networks)":Z.device_id?Gq[Z.state]:"connecting";x.stdout.write(`Also in workspace ${Z.name??Z.organization_id}${Z.account?" (another Reason account's)":""}: ${H}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ui as C}from"./vm-hands-entry-lite-gt5pkv4h.js";import{execFileSync as W}from"child_process";import{mkdirSync as b,readdirSync as R,readFileSync as F,rmSync as B,statSync as K,writeFileSync as f}from"fs";import{join as $}from"path";import{setTimeout as k}from"timers/promises";var A=3000,X=null;function G(z){return $(z,"users")}function m(z){if(X?.root===z.root)return;let H=G(z.root);b(H,{recursive:!0,mode:448}),f($(H,String(process.pid)),"",{mode:384}),X=z}function S(){if(!X)return;B($(G(X.root),String(process.pid)),{force:!0}),X=null}function x(z){try{return process.kill(z,0),!0}catch(H){return H instanceof Error&&"code"in H&&H.code==="EPERM"}}function L(){let z=process.getuid?.();if(process.platform==="linux")return R("/proc").flatMap((N)=>{if(!/^\d+$/.test(N))return[];try{if(K(`/proc/${N}`).uid!==z)return[];let Q=F(`/proc/${N}/cmdline`).toString("utf8").split("\x00").join(" ").trim();return Q?[{pid:Number(N),command:Q}]:[]}catch{return[]}});return W("/bin/ps",["-axww","-o","pid=,uid=,command="],{encoding:"utf8",maxBuffer:16777216}).split(`
|
|
3
3
|
`).flatMap((N)=>{let Q=/^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(N);return Q&&Number(Q[2])===z?[{pid:Number(Q[1]),command:Q[3]}]:[]})}async function p(){let z=X;if(!z)return{released:"unused",stopped:0};let H=G(z.root);B($(H,String(process.pid)),{force:!0}),X=null;let N=!1;for(let J of R(H)){let U=Number(J);if(Number.isSafeInteger(U)&&U>0&&x(U))N=!0;else B($(H,J),{force:!0})}if(N)return{released:"shared",stopped:0};let Q=L().filter((J)=>J.pid!==process.pid&&(J.command.includes(`${z.root}/`)||J.command.includes(`${z.automation}/`)||J.command.includes(z.extensionDir))),Y=(J,U)=>{try{process.kill(J,U)}catch{}};for(let J of Q)Y(J.pid,"SIGTERM");for(let J=Date.now()+A;Date.now()<J&&Q.some((U)=>x(U.pid));)await new Promise((U)=>setTimeout(U,100));for(let J of Q)if(x(J.pid))Y(J.pid,"SIGKILL");return{released:"stopped",stopped:Q.length}}var O=20000,j=30000,v=100,Z=new Map,V=null,q=[];function h(z){Z.set(z,(Z.get(z)??0)+1);let H=!1;return()=>{if(H)return;H=!0;let N=(Z.get(z)??1)-1;if(N>0){Z.set(z,N);return}if(Z.delete(z),V?.run===z)V.idleUntil=0}}function M(){return new C("automation_desktop_busy","Another Session, or another agent of this Session, is using this worker's desktop. Retry after it finishes.")}function P(z,H){return V!==null&&V.run!==z&&(V.calls>0||H<V.idleUntil)}async function I(z,H,N=Date.now){let Q=Symbol(z);q.push(Q);try{let U=N()+j;for(;;){if(!P(z,N())&&(V?.run===z||q[0]===Q))break;if(N()>=U)throw M();await k(v,void 0,{signal:H}).catch(()=>H.throwIfAborted())}}finally{q.splice(q.indexOf(Q),1)}if(V?.run!==z)V={run:z,calls:0,idleUntil:0};let Y=V;Y.calls+=1;let J=!1;return()=>{if(J)return;J=!0,Y.calls-=1,Y.idleUntil=N()+O}}
|
|
4
|
-
export{m as
|
|
4
|
+
export{m as ni,S as oi,p as pi,O as qi,j as ri,h as si,I as ti};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{mi as w}from"./vm-hands-entry-lite-2xh7sjs0.js";var $="inference.custom.v1",K=32768,O=67108864,P=16384,Q=204800,x=600000,S=["content-type","anthropic-version","user-agent"],L=w.enum(["openai-completions","openai-responses","anthropic-messages"]),T=new Set(S),U=w.record(w.string(),w.string().max(2048)).refine((j)=>Object.keys(j).every((A)=>T.has(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)),"Only non-secret custom endpoint request headers are permitted");function F(j){try{let A=new URL(j);return["http:","https:"].includes(A.protocol)&&!A.username&&!A.password&&!A.search&&!A.hash?A:null}catch{return null}}function V(j,A){let B=F(j.baseUrl),H=F(A.baseUrl),D=F(j.url);if(!B||!H||!D||j.method!=="POST"||A.execution!=="device")return!1;let I=(J)=>J.origin+J.pathname.replace(/\/+$/,"");if(I(B)!==I(H)||D.origin!==B.origin)return!1;let N=A.api==="openai-completions"?"/chat/completions":A.api==="openai-responses"?"/responses":"/v1/messages";return D.pathname===B.pathname.replace(/\/+$/,"")+N}var C=w.object({baseUrl:w.string().max(2048),url:w.string().max(4096),method:w.literal("POST"),body:w.string().refine((j)=>new TextEncoder().encode(j).byteLength<=Q).optional(),headers:U,credentialOrganizationId:w.string().uuid(),accountKey:w.string().min(1).max(256).optional()}).strict().refine((j)=>L.options.some((A)=>V(j,{baseUrl:j.baseUrl,api:A,execution:"device"})),"Invalid custom endpoint inference URL"),E=w.object({status:w.number().int().min(200).max(599),statusText:w.string().max(256).refine((j)=>!/[\r\n\0]/.test(j)),headers:w.record(w.string(),w.string().max(4096)).refine((j)=>Object.keys(j).every((A)=>["content-type","retry-after","x-request-id","request-id"].includes(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)))}).strict(),M=w.union([w.object({eof:w.literal(!0)}).strict(),w.object({eof:w.literal(!1),data:w.string().max(Math.ceil(K/3)*4).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/).refine((j)=>j.length>0&&j.length*3/4-(j.endsWith("==")?2:j.endsWith("=")?1:0)<=K)}).strict()]),R=w.object({bytes:w.number().int().min(0).max(O),chunks:w.number().int().min(0).max(P)}).strict(),z=w.object({apiKey:w.string().min(1).max(16384).refine((j)=>!/[\r\n\0]/.test(j)),api:L}).strict(),W=["custom_endpoint_host_not_found","custom_endpoint_connection_failed","custom_endpoint_tls_failed"];function p(j){return typeof j==="string"&&W.includes(j)}var X="Ollama listens only on 127.0.0.1 unless it is started with OLLAMA_HOST=0.0.0.0.",G={custom_endpoint_host_not_found:"Your computer couldn't resolve your model server's hostname. Check the hostname in the Base URL, and that this computer is on the network or tailnet that resolves it.",custom_endpoint_connection_failed:`Your computer's connection to your model server was refused or timed out. Check that the server is running and listening on the Base URL's address and port. ${X}`,custom_endpoint_tls_failed:"Your computer couldn't make a secure (TLS) connection to your model server. Check the server's https certificate, or use an http:// Base URL for a server on your computer or private network.",401:"Your model server refused the request (HTTP 401). Check the API key saved for it in Models.",403:"Your model server refused the request (HTTP 403). Ollama refuses requests addressed to a hostname other than localhost, such as a *.ts.net name from tailscale serve or funnel: restart it with OLLAMA_HOST=0.0.0.0, or use http://localhost:11434/v1 when it runs on the session's computer. For another server, check the API key and its access rules.",404:"Your model server answered HTTP 404 (not found). Check that the Base URL is the API root (for Ollama, http://localhost:11434/v1) and that each model ID is one the server lists."},Y=new Set(Object.values(G));function b(j){return Object.hasOwn(G,j)?G[j]:null}function k(j){return typeof j==="string"&&Y.has(j)}var Z=/^Your model endpoint \S+ (?:returned HTTP 40[34]|was unreachable: it refused the connection)\.$/;function y(j,A){if(!/^[a-z0-9.-]+$/i.test(j))return null;if(A==="connection_refused")return`Your model endpoint ${j} was unreachable: it refused the connection.`;return A===403||A===404?`Your model endpoint ${j} returned HTTP ${A}.`:null}function q(j){return typeof j==="string"&&Z.test(j)}
|
|
3
3
|
export{$ as rc,K as sc,O as tc,P as uc,Q as vc,x as wc,S as xc,V as yc,C as zc,E as Ac,M as Bc,R as Cc,z as Dc,W as Ec,p as Fc,b as Gc,k as Hc,y as Ic,q as Jc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{xi as e}from"./vm-hands-entry-lite-mhsv58hw.js";var i=e((o,t)=>{t.exports={name:"playwright-core",version:"1.60.0",description:"A high-level API to automate web browsers",repository:{type:"git",url:"git+https://github.com/microsoft/playwright.git"},homepage:"https://playwright.dev",engines:{node:">=18"},author:{name:"Microsoft Corporation"},license:"Apache-2.0",exports:{".":{types:"./index.d.ts",import:"./index.mjs",require:"./index.js",default:"./index.js"},"./package.json":"./package.json","./lib/bootstrap":"./lib/bootstrap.js","./lib/coreBundle":"./lib/coreBundle.js","./lib/utilsBundle":"./lib/utilsBundle.js","./lib/tools/cli-client/program":"./lib/tools/cli-client/program.js"},bin:{"playwright-core":"cli.js"},types:"types/types.d.ts"}});
|
|
3
3
|
export{i as Q};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var j={REASON_API_KEY:"ARA_API_KEY",REASON_API_URL:"ARA_API_URL",REASON_CLI_CHANNEL:"ARA_CLI_CHANNEL",REASON_CLI_LAUNCHER_PATH:"ARA_CLI_LAUNCHER_PATH",REASON_MANAGED_RUNTIME_ROOT:"ARA_MANAGED_RUNTIME_ROOT",REASON_INSTALL_ALIAS_PATH:"ARA_INSTALL_ALIAS_PATH",REASON_INSTALL_DIR:"ARA_INSTALL_DIR",REASON_INSTALL_METHOD:"ARA_INSTALL_METHOD",REASON_INSTALL_PINNED_VERSION:"ARA_INSTALL_PINNED_VERSION",REASON_INSTALL_UPGRADE:"ARA_INSTALL_UPGRADE"},mJ=Object.values(j),UJ=new Set;function m(J,Q){let V=J[Q];if(V?.trim())return V;let Z=J[j[Q]];if(Z?.trim())UJ.add(j[Q]);return Z}function DJ(J,Q){return{[J]:Q,[j[J]]:Q}}import{basename as PJ}from"path";var x=["production","staging"],GJ="https://api.reasonmachines.com",HJ="https://staging-api.reasonmachines.com";var f={production:{api:"https://api.reasonmachines.ai",app:"https://reasonmachines.ai"},staging:{api:"https://staging-api.reasonmachines.ai",app:"https://staging.reasonmachines.ai"}},RJ=new Set(["ara-staging","reason-staging"]);function lJ(J={}){let Q=m(J.env??process.env,"REASON_CLI_CHANNEL")?.trim().toLowerCase();if(Q){if(x.includes(Q))return Q;throw Error(`Unknown Reason CLI channel: ${Q}`)}let V=PJ(J.executablePath??process.execPath).toLowerCase();return RJ.has(V)?"staging":"production"}function I(J){return J==="staging"?HJ:GJ}function iJ(J){return`${I(J)}/mcp/ara`}var s={production:["https://api.ara.so",f.production.api],staging:["https://api-staging.ara.so",f.staging.api]};function y(J){let Q;try{Q=new URL(J).origin}catch{return J}let V=x.find((Z)=>s[Z].includes(Q));return V?I(V):Q}function rJ(J,Q){return J===Q||y(J)===y(Q)}function oJ(J,Q){return x.some((V)=>s[V].includes(J)&&Q===I(V))}function aJ(J,Q){try{let V=new URL(Q);return!V.username&&!V.password&&(V.origin===I(J)||V.origin===f[J].api)}catch{return!1}}function tJ(J){try{let Q=new URL(J).hostname.replace(/^\[|\]$/g,"").toLowerCase();return Q==="localhost"||Q==="127.0.0.1"||Q==="::1"}catch{return!1}}import{randomBytes as VJ}from"crypto";import{chmodSync as ZJ,closeSync as a,constants as FJ,linkSync as $J,lstatSync as A,mkdirSync as XJ,openSync as CJ,readdirSync as H,readFileSync as t,readlinkSync as E,renameSync as _,rmdirSync as KJ,symlinkSync as k,unlinkSync as U}from"fs";import{createRequire as OJ}from"module";import{constants as bJ}from"os";import{basename as O,join as K,sep as jJ}from"path";import{existsSync as N,lstatSync as l,readdirSync as EJ,readFileSync as TJ,readlinkSync as kJ,realpathSync as _J}from"fs";import{join as L,sep as AJ}from"path";function i(J,...Q){let V=L(J,"ara"),Z=L(J,"reason");if(!r(V))return L(Z,...Q);if(!N(Z))return L(V,...Q);return N(L(V,...Q))&&!N(L(Z,...Q))?L(V,...Q):L(Z,...Q)}function r(J){try{let Q=l(J);if(!Q.isSymbolicLink())return Q.isDirectory();return kJ(J)!=="reason"&&N(J)}catch{return!1}}function o(J,Q=[]){if(!r(J))return!1;let V;try{V=[J,...EJ(J,{withFileTypes:!0}).filter((Z)=>Z.isDirectory()).map((Z)=>L(J,Z.name))]}catch{return!1}return V.some((Z)=>["connect","connect-once"].filter(($)=>!Q.includes(L(Z,$))).some(($)=>{let z=L(Z,$,"worker.json");try{l(z)}catch{return!1}try{let q=JSON.parse(TJ(z,"utf8"))?.stateDirectory;if(typeof q!=="string")return!0;let M=(X,B)=>X===B||X.startsWith(B+AJ);return M(q,J)||M(c(q),c(J))}catch{return!0}}))}function c(J){try{return _J(J)}catch{return J}}var v=new Set(["credentials.json","local-device.json","local-device.revoked.json","local-device.auth-migration.json","local-device.json.registration-pending.json","local-daemon.json","local-daemon.json.workspaces.json","local-root-fingerprint-key.json","instances","workspaces"]),g=new Set(["local-device.proxy.json"]),IJ=new Set(["local-device.key","local-device.binding"]),n=new Map;function NJ(J,Q,V){let Z=K(J,"ara");if(/[/\\]\.reason-ssh[/\\][^/\\]+[/\\]installer-home[/\\]\.config$/.test(J))return{state:W(Z)?.isDirectory()?"kept":"absent"};return qJ(Z,K(J,"reason"),{linkAlways:!0,kept:($)=>o($,V??[]),native:Q===void 0?LJ:()=>Q},V!==void 0)}function YQ(J,...Q){return NJ(J),i(J,...Q)}function wQ(J,Q=process.platform){let V=K(J,"Library","Logs");if(Q==="darwin")for(let Z of[""," Staging"," Development"])qJ(K(V,`Ara${Z}`),K(V,`Reason${Z}`),{linkAlways:!1,kept:()=>!1,native:LJ});return K(V,"Reason")}var zJ="config_rename_unavailable:busy";function qJ(J,Q,V,Z=!1){let $=Z?void 0:n.get(J);if($)return $;let z;try{z=SJ(J,Q,V)}catch(q){let M=`config_rename_unavailable:${G(q)??"failed"}`;try{return{state:W(J)?.isDirectory()?"kept":"absent",problem:M}}catch{return{state:"kept",problem:M}}}if(!(z.state==="absent"&&V.linkAlways)&&z.problem!==zJ&&!(z.state==="kept"&&!z.problem))n.set(J,z);return z}function SJ(J,Q,V){vJ(Q,V.native);let Z=!1;for(let $=0;$<8;$+=1){let z=W(J);if(z?.isSymbolicLink())return E(J)===O(Q)?{state:Z?"renamed":"linked"}:{state:"kept"};if(!z){if(u(Q))Y(()=>U(Q),"ENOENT");if(!(Z||V.linkAlways)||!T(Q))return{state:"absent"};let X=C(Q,"link");k(O(Q),X);try{Y(()=>_(X,J),"EISDIR","ENOTEMPTY","EEXIST","ENOTDIR")}finally{Y(()=>U(X),"ENOENT")}continue}if(!z.isDirectory())return{state:"absent"};if(V.kept(J))return e(Q),{state:"kept"};let q=V.native();if(!q)return e(Q),{state:"kept",problem:"config_rename_unavailable:no_native"};let M=fJ(q,J);if(!M)return{state:"kept",problem:zJ};try{if(A(J).isSymbolicLink())continue;let X=uJ(q,J,Q);if(X)return{state:"kept",problem:X};Z=!0}finally{M()}}throw Object.assign(Error("legacy directory rename did not settle"),{code:"unsettled"})}function uJ(J,Q,V){let Z=W(V);if(!Z||u(V)){if(!Z)k(O(V),V);try{J.exchange(Q,V)}catch(X){if(u(V))Y(()=>U(V),"ENOENT");return`config_rename_unavailable:${G(X)??"exchange_failed"}`}return null}if(!Z.isDirectory())return"config_rename_unavailable:ENOTDIR";if(Z.dev!==A(Q).dev)return"config_rename_unavailable:EXDEV";let $=[C(V,"probe"),C(V,"probe")];try{k("a",$[0]),k("b",$[1]),J.exchange($[0],$[1])}catch(X){return`config_rename_unavailable:${G(X)??"exchange_failed"}`}finally{for(let X of $)Y(()=>U(X),"ENOENT")}let z=wJ(V);for(let X of IJ){let B=W(K(V,X)),w=W(K(Q,X));if(B&&w&&B.ino!==w.ino)XJ(`${z}-replaced`,{mode:448,recursive:!0}),_(K(V,X),K(`${z}-replaced`,X))}let q={linked:new Map,unitsKept:new Set};MJ(Q,V,"",q);let M=C(V,"rename");k(O(V),M);try{J.exchange(Q,M)}catch(X){return Y(()=>U(M),"ENOENT"),`config_rename_unavailable:${G(X)??"exchange_failed"}`}return BJ(M,V,q,z),null}function h(J){return J===""||!J.includes(jJ)}function MJ(J,Q,V,Z){let $=h(V)&&S(K(Q,V),K(J,V));if($)Z.unitsKept.add(V);for(let z of H(K(J,V))){if($&&(v.has(z)||g.has(z)))continue;let q=K(V,z),M=K(J,q),X=K(Q,q),B=W(M);if(!B)continue;let w=W(X);if(B.isDirectory()){if(!w)Y(()=>XJ(X,{mode:B.mode&4095}),"EEXIST"),ZJ(X,B.mode&4095);if(T(X))MJ(J,Q,q,Z)}else if(!w){if(B.isSymbolicLink())Y(()=>k(E(M),X),"EEXIST");else if(Y(()=>$J(M,X),"EEXIST","ENOENT"))Z.linked.set(q,B.ino)}}}function vJ(J,Q){let V;try{if(!T(J))return;V=H(J)}catch{return}for(let Z of V){let $=/^\.(rename|link|probe|claim)-(\d+)-[0-9a-f]+$/.exec(Z);if(!$)continue;let z=K(J,Z),q=W(z);if(!q)continue;if(!q.isDirectory()){if(!JJ(Number($[2])))Y(()=>U(z),"ENOENT");continue}let M=Q(),X=null;if(M){try{X=M.lock(z)}catch{continue}if(!X)continue}else if(JJ(Number($[2])))continue;try{let B=C(J,"claim");if(Y(()=>_(z,B),"ENOENT"))BJ(B,J,null,wJ(J))}finally{X?.()}}}function BJ(J,Q,V,Z){for(let[$,z]of V?.linked??[])if(!W(K(J,$))&&W(K(Q,$))?.ino===z)Y(()=>U(K(Q,$)),"ENOENT");if(WJ(J,Q,"",V),Y(()=>KJ(J),"ENOTEMPTY","EEXIST"))return;_(J,Z),ZJ(Z,448)}function WJ(J,Q,V,Z){let $=h(V)&&(Z?Z.unitsKept.has(V):S(K(Q,V),K(J,V)));for(let z of H(K(J,V))){let q=K(V,z),M=K(J,q),X=K(Q,q),B=A(M),w=W(X);if(w&&B.ino===w.ino&&B.dev===w.dev){U(M);continue}if(B.isFile()&&w?.isFile()&&Z?.linked.get(q)===w.ino){_(M,X);continue}if($&&(v.has(z)||g.has(z)))continue;if(!w){if(B.isFile()){if(Y(()=>$J(M,X),"EEXIST"))U(M)}else Y(()=>_(M,X),"EEXIST","ENOTEMPTY");continue}if(B.isDirectory()&&w.isDirectory())WJ(J,Q,q,Z),Y(()=>KJ(M),"ENOTEMPTY","EEXIST")}}function LQ(J){let Q=K(J,"ara"),V=K(J,"reason");if(!T(Q)||!T(V))return null;let Z=["",...H(Q,{withFileTypes:!0}).filter(($)=>$.isDirectory()&&!$.name.startsWith(".")).map(($)=>$.name)];for(let $ of Z){let z=K(Q,$),q=K(V,$);if(!S(z,q)||!S(q,z))continue;if([...v,...g].some((X)=>d(K(z,X),K(q,X))===!1))return $}return null}function UQ(J){let Q=K(J,"ara"),V=K(J,"reason");if(!T(Q)||!T(V))return null;let Z=($)=>{for(let z of H(K(Q,$))){let q=K($,z);if(h($)&&(z==="connect"||z==="connect-once"))continue;let M=A(K(Q,q)),X=W(K(V,q));if(!X||M.ino===X.ino&&M.dev===X.dev)continue;if(M.isDirectory()&&X.isDirectory()&&!X.isSymbolicLink()){let B=Z(q);if(B!==null)return B}else if(M.isSymbolicLink()||X.isSymbolicLink()){if(!(M.isSymbolicLink()&&X.isSymbolicLink()&&E(K(Q,q))===E(K(V,q))))return q}else if(d(K(Q,q),K(V,q))!==!0)return q}return null};return Z("")}function d(J,Q){let V=W(J),Z=W(Q);if(!V&&!Z)return null;if(!V||!Z||V.isDirectory()!==Z.isDirectory())return!1;if(V.ino===Z.ino&&V.dev===Z.dev)return!0;if(V.isDirectory())return[...new Set([...H(J),...H(Q)])].every((z)=>d(K(J,z),K(Q,z))===!0);try{return t(J).equals(t(Q))}catch{return!1}}function S(J,Q){for(let V of v)if(YJ(K(J,V),K(Q,V)))return!0;return!1}function YJ(J,Q){let V=W(J);if(!V)return!1;let Z=W(Q);if(!Z)return!0;if(V.isDirectory()){if(!Z.isDirectory())return!0;return H(J).some(($)=>YJ(K(J,$),K(Q,$)))}if(V.isSymbolicLink())return!Z.isSymbolicLink()||E(J)!==E(Q);return V.ino!==Z.ino||V.dev!==Z.dev}function e(J){if(u(J))Y(()=>U(J),"ENOENT")}function wJ(J){return K(J,`.pre-rename-${new Date().toISOString().replace(/[:.]/g,"-")}-${VJ(3).toString("hex")}`)}function u(J){try{return A(J).isSymbolicLink()&&E(J)===O(J)}catch{return!1}}function T(J){let Q=W(J);return Q!==null&&Q.isDirectory()}function fJ(J,Q){for(let V=0;V<40;V+=1){let Z=J.lock(Q);if(Z)return Z;Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,50)}return null}function C(J,Q){return K(J,`.${Q}-${process.pid}-${VJ(6).toString("hex")}`)}function JJ(J){if(J===process.pid)return!1;try{return process.kill(J,0),!0}catch(Q){return G(Q)==="EPERM"}}function W(J){try{return A(J)}catch(Q){if(G(Q)==="ENOENT"||G(Q)==="ENOTDIR")return null;throw Q}}function Y(J,...Q){try{return J(),!0}catch(V){if(Q.includes(G(V)??""))return!1;throw V}}function G(J){return J instanceof Error&&"code"in J&&typeof J.code==="string"?J.code:void 0}var F,xJ=2,gJ=4,hJ=2,dJ=2,QJ=-100;function LJ(){if(F!==void 0)return F;if(F=null,process.platform!=="linux"&&process.platform!=="darwin")return null;let J;try{J=OJ(import.meta.url)("bun:ffi")}catch{return null}let Q=process.platform==="darwin",V=Q?"__error":"__errno_location",Z=Q?["/usr/lib/libSystem.B.dylib"]:["libc.so.6",`libc.musl-${process.arch==="arm64"?"aarch64":"x86_64"}.so.1`],{FFIType:$}=J;for(let z of Z)try{let q=Q?"renamex_np":"renameat2",X=J.dlopen(z,{flock:{args:[$.i32,$.i32],returns:$.i32},[V]:{args:[],returns:$.ptr},[q]:Q?{args:[$.ptr,$.ptr,$.u32],returns:$.i32}:{args:[$.i32,$.ptr,$.i32,$.ptr,$.u32],returns:$.i32}}).symbols,B=X[V]();if(B===null)continue;let w=(R)=>{let P=J.read.i32(B),D=Object.entries(bJ.errno).find(([,b])=>b===P)?.[0]??`errno_${P}`;return Object.assign(Error(`${R} failed: ${D}`),{code:D})},p=(R)=>Buffer.from(`${R}\x00`,"utf8");return F={exchange(R,P){let D=p(R),b=p(P);if((Q?X[q](J.ptr(D),J.ptr(b),hJ):X[q](QJ,J.ptr(D),QJ,J.ptr(b),dJ))!==0)throw w("exchange")},lock(R){let P=CJ(R,FJ.O_RDONLY);if(X.flock(P,xJ|gJ)===0)return()=>a(P);let D=w("lock");if(a(P),D.code==="EWOULDBLOCK"||D.code==="EAGAIN")return null;throw D}},F}catch{}return null}
|
|
3
|
-
export{m as
|
|
3
|
+
export{m as wh,DJ as xh,x as yh,lJ as zh,I as Ah,iJ as Bh,y as Ch,rJ as Dh,oJ as Eh,aJ as Fh,tJ as Gh,r as Hh,NJ as Ih,YQ as Jh,wQ as Kh,LQ as Lh,UQ as Mh,LJ as Nh};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var U=".reason/workspace",T="workspace_base",y="sessions",W="workspace_layout",g=".reason/workspace/sessions",B=/^[0-9a-f]{8}$/;function C(j){if(!J(j))return!1;let q=".reason/workspace/sessions/";if(!j.startsWith(q))return!1;let z=j.slice(q.length).split("/");return z.length===2&&B.test(z[0])}var G=4096,X="workspaces/pi";function J(j){if(typeof j!=="string"||!j||j.length>G)return!1;if(j.startsWith("/")||j.includes("\x00")||j.includes("\\"))return!1;return j.split("/").every((q)=>q!==""&&q!=="."&&q!=="..")}function Z(j){if(j.kind==="root"){if(j.path===void 0)return".";if(!J(j.path))throw Error("invalid_device_workspace_identity");return j.path}if(!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/.test(j.workspaceId)||j.workspaceId==="."||j.workspaceId==="..")throw Error("invalid_device_workspace_identity");let q=j.layout==="sessions"?"sessions":X;return`${j.base?`${j.base}/`:""}${q}/${j.workspaceId}/repo`}function L(j){if(!j||typeof j!=="object"||Array.isArray(j))return null;let q=j;if(q.kind==="root"&&Object.keys(q).length===1)return{kind:"root"};if(q.kind==="root"&&Object.keys(q).length===2&&J(q.path))return{kind:"root",path:q.path};if(q.kind!=="managed"||typeof q.workspaceId!=="string"||Object.keys(q).length!==2+(q.base===void 0?0:1)+(q.layout===void 0?0:1)||q.base!==void 0&&q.base!==".reason/workspace"||q.layout!==void 0&&q.layout!=="sessions")return null;let z={kind:"managed",workspaceId:q.workspaceId,...q.base===".reason/workspace"?{base:".reason/workspace"}:{},...q.layout==="sessions"?{layout:"sessions"}:{}};try{return Z(z),z}catch{return null}}var b="/home/runner",P=10001,x="/run/reason/sessions",f=/^(?:\/[A-Za-z0-9._-]+)+$/,M=/-sidechat-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,H=/^(.+)-repository-[a-z0-9][a-z0-9._-]*-[0-9a-f]{12}$/;function K(j){return M.exec(j)?.[1]??H.exec(j)?.[1]??j}var $=/^((?:\/[A-Za-z0-9._-]+)+)\/\.reason\/workspace\/(workspaces\/pi|sessions)\/([^/]+)$/,A="*/.reason/workspace/workspaces/pi/*|*/.reason/workspace/sessions/*";function N(j,q=b,z="sessions"){if(!f.test(q)||q.split("/").some((V)=>V==="."||V===".."))throw Error("invalid_cloud_payload_home");let Q=`${q}/${Z({kind:"managed",workspaceId:j,base:".reason/workspace",...z?{layout:z}:{}})}`,F=`${x}/${K(j)}`;return{home:q,root:Q.slice(0,-5),checkout:Q,control:F,jobEnv:`${F}/job.env`,cloudAccess:`${F}/cloud-access`,logs:`${F}/logs`,pin:`${F}/ws`}}function Y(j){return $.exec(j.replace(/\/+$/,""))?.[2]==="sessions"?"sessions":null}function D(j){return{kind:"managed",workspaceId:j,layout:"sessions"}}function R(j){let q=$.exec(j.replace(/\/+$/,""));if(!q)return null;try{let z=N(q[3],q[1],Y(j));return z.root===j.replace(/\/+$/,"")?z:null}catch{return null}}
|
|
3
|
-
export{U as
|
|
3
|
+
export{U as Th,T as Uh,y as Vh,W as Wh,g as Xh,B as Yh,C as Zh,J as _h,Z as $h,L as ai,b as bi,P as ci,x as di,M as ei,H as fi,$ as gi,A as hi,N as ii,Y as ji,D as ki,R as li};
|