@reason-machines/cli-linux-arm64-musl 0.2.335 → 0.2.337

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/bin/ara +1 -1
  2. package/bin/vm-hands/api-credentials-etg0qnwq.js +2 -0
  3. package/bin/vm-hands/api-j19tqbqn.js +2 -0
  4. package/bin/vm-hands/ask-relay-1vtqq978.js +8 -0
  5. package/bin/vm-hands/connect-cli-d0zvjmkf.js +2 -0
  6. package/bin/vm-hands/{custom-endpoint-device-dt74zv7m.js → custom-endpoint-device-km6xxtg0.js} +1 -1
  7. package/bin/vm-hands/desktop-account-cjwaktbe.js +2 -0
  8. package/bin/vm-hands/{device-workspace-nqxczwd3.js → device-workspace-5xp75zxs.js} +1 -1
  9. package/bin/vm-hands/{hands-worker-source-tc1snvve.js → hands-worker-source-45asfw2g.js} +1 -1
  10. package/bin/vm-hands/{index-g4t2q0ep.js → index-rf7w928b.js} +1 -1
  11. package/bin/vm-hands/local-automation-jkq9qqyt.js +2 -0
  12. package/bin/vm-hands/local-capabilities-0v47dkgd.js +2 -0
  13. package/bin/vm-hands/local-desktop-users-t01f06c6.js +2 -0
  14. package/bin/vm-hands/local-display-mac-ykh2dzvh.js +2 -0
  15. package/bin/vm-hands/local-display-session-dczh64rd.js +2 -0
  16. package/bin/vm-hands/local-pty-session-kxj5vhby.js +2 -0
  17. package/bin/vm-hands/network-contract-4f9xfjwz.js +2 -0
  18. package/bin/vm-hands/package-9cdhcvkp.js +2 -0
  19. package/bin/vm-hands/permissions-cyjxf3as.js +2 -0
  20. package/bin/vm-hands/{reason-hands-protocol-n14gyf7k.js → reason-hands-protocol-t8676r1f.js} +1 -1
  21. package/bin/vm-hands/{status-4cjtwybf.js → status-p03d7jan.js} +2 -2
  22. package/bin/vm-hands/version-474ad9ns.js +2 -0
  23. package/bin/vm-hands/{vm-hands-entry-lite-zgs6j8wj.js → vm-hands-entry-lite-02t1tfe7.js} +1 -1
  24. package/bin/vm-hands/{vm-hands-entry-lite-4b8f37q4.js → vm-hands-entry-lite-1hpmjd5x.js} +1 -1
  25. package/bin/vm-hands/{vm-hands-entry-lite-feaxcj0x.js → vm-hands-entry-lite-2wa0aq74.js} +1 -1
  26. package/bin/vm-hands/{vm-hands-entry-lite-c64behya.js → vm-hands-entry-lite-3dh55nnz.js} +1 -1
  27. package/bin/vm-hands/{vm-hands-entry-lite-dea36bpb.js → vm-hands-entry-lite-3fddeh8v.js} +2 -2
  28. package/bin/vm-hands/{vm-hands-entry-lite-hzqdhpr9.js → vm-hands-entry-lite-4kwqp4rz.js} +2 -2
  29. package/bin/vm-hands/{vm-hands-entry-lite-m0epceqg.js → vm-hands-entry-lite-547nmvs3.js} +2 -2
  30. package/bin/vm-hands/{vm-hands-entry-lite-9rr6gh58.js → vm-hands-entry-lite-6j29vkh5.js} +1 -1
  31. package/bin/vm-hands/{vm-hands-entry-lite-3dx1yqhd.js → vm-hands-entry-lite-8ga7m5ph.js} +1 -1
  32. package/bin/vm-hands/{vm-hands-entry-lite-px64jhhn.js → vm-hands-entry-lite-ah89nzd4.js} +1 -1
  33. package/bin/vm-hands/{vm-hands-entry-lite-5q96en2m.js → vm-hands-entry-lite-bpvxdk3g.js} +2 -2
  34. package/bin/vm-hands/{vm-hands-entry-lite-xa9mfp55.js → vm-hands-entry-lite-cavgmkjf.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-tf5mepq5.js → vm-hands-entry-lite-d8myh0nx.js} +2 -2
  36. package/bin/vm-hands/{vm-hands-entry-lite-qbr9m7zh.js → vm-hands-entry-lite-ewpfck9v.js} +1 -1
  37. package/bin/vm-hands/{vm-hands-entry-lite-cnmd8nft.js → vm-hands-entry-lite-h12jx2e8.js} +2 -2
  38. package/bin/vm-hands/{vm-hands-entry-lite-zykqwmp1.js → vm-hands-entry-lite-hkw64faw.js} +3 -3
  39. package/bin/vm-hands/{vm-hands-entry-lite-dtcpbbkc.js → vm-hands-entry-lite-hmva2yc7.js} +1 -1
  40. package/bin/vm-hands/{vm-hands-entry-lite-qx8702e7.js → vm-hands-entry-lite-hybhzkvj.js} +75 -75
  41. package/bin/vm-hands/{vm-hands-entry-lite-9k57wmkv.js → vm-hands-entry-lite-jgjvs1tq.js} +5 -5
  42. package/bin/vm-hands/{vm-hands-entry-lite-dhzcvvt2.js → vm-hands-entry-lite-kh7w4cpj.js} +2 -2
  43. package/bin/vm-hands/{vm-hands-entry-lite-983czfdb.js → vm-hands-entry-lite-rwp6km63.js} +2 -2
  44. package/bin/vm-hands/{vm-hands-entry-lite-070nd0vy.js → vm-hands-entry-lite-sjfdhffh.js} +1 -1
  45. package/bin/vm-hands/{vm-hands-entry-lite-s64raarx.js → vm-hands-entry-lite-tcewjhvf.js} +2 -2
  46. package/bin/vm-hands/{vm-hands-entry-lite-jzms4xs2.js → vm-hands-entry-lite-tmc063vj.js} +2 -2
  47. package/bin/vm-hands/{vm-hands-entry-lite-mm72ht4e.js → vm-hands-entry-lite-vx5y8jc7.js} +1 -1
  48. package/bin/vm-hands/{vm-hands-entry-lite-h0vcj8z0.js → vm-hands-entry-lite-wfr5mnge.js} +1 -1
  49. package/bin/vm-hands/{vm-hands-entry-lite-awwev9zg.js → vm-hands-entry-lite-xd9vwd5k.js} +2 -2
  50. package/bin/vm-hands/{vm-hands-entry-lite-mtp2h66e.js → vm-hands-entry-lite-y06rgq4n.js} +2 -2
  51. package/bin/vm-hands/{vm-hands-entry-lite-5n6vc7je.js → vm-hands-entry-lite-y9rzr1a3.js} +1 -1
  52. package/bin/vm-hands/{vm-hands-entry-lite-hj6jjk24.js → vm-hands-entry-lite-ytwa3p73.js} +1 -1
  53. package/bin/vm-hands/{vm-hands-entry-lite-7kzy7rxj.js → vm-hands-entry-lite-z55phtry.js} +1 -1
  54. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  55. package/bin/vm-hands/{vm-hands-executor-5k6sf08v.js → vm-hands-executor-682amrtn.js} +1 -1
  56. package/bin/vm-hands/vm-hands-op-runner-zhndrtp2.js +2 -0
  57. package/bin/vm-hands/{vm-hands-runtime-3yefd59g.js → vm-hands-runtime-kdtdv05m.js} +3 -3
  58. package/bin/vm-hands/worker-sandbox-dhw5qf92.js +2 -0
  59. package/package.json +1 -1
  60. package/bin/vm-hands/api-36ywgdp3.js +0 -2
  61. package/bin/vm-hands/api-credentials-41xjt55r.js +0 -2
  62. package/bin/vm-hands/ask-relay-9p6w86km.js +0 -8
  63. package/bin/vm-hands/connect-cli-08yfjvjr.js +0 -2
  64. package/bin/vm-hands/desktop-account-a16gh9sj.js +0 -2
  65. package/bin/vm-hands/local-automation-y1qmkezf.js +0 -2
  66. package/bin/vm-hands/local-capabilities-fsyc3jn0.js +0 -2
  67. package/bin/vm-hands/local-desktop-users-qej2mfhx.js +0 -2
  68. package/bin/vm-hands/local-display-mac-4pddah9q.js +0 -2
  69. package/bin/vm-hands/local-display-session-6ra0rewx.js +0 -2
  70. package/bin/vm-hands/local-pty-session-kq8bd4pm.js +0 -2
  71. package/bin/vm-hands/network-contract-qxn4pg15.js +0 -2
  72. package/bin/vm-hands/package-s8sef5wh.js +0 -2
  73. package/bin/vm-hands/permissions-83qxqzvy.js +0 -2
  74. package/bin/vm-hands/version-103dg9h8.js +0 -2
  75. package/bin/vm-hands/vm-hands-op-runner-zc5pddhs.js +0 -2
  76. package/bin/vm-hands/worker-sandbox-1m0s1vnq.js +0 -2
package/bin/ara CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/ara
3
3
  size: 98479992 bytes
4
- sha256: bc2a195160a2e1616d2cadd94ef311885e18424bd89b444455b8aa0edc98cb18
4
+ sha256: 4b7a9c979841d45ecd10a05493cca9b0cfba3a660aa8f177f22e583351be9f63
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{u as a,v as b,w as c,x as d,y as e}from"./vm-hands-entry-lite-hmva2yc7.js";import"./vm-hands-entry-lite-2wa0aq74.js";import"./vm-hands-entry-lite-02t1tfe7.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-ah89nzd4.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{E as a,F as b,G as c,H as d,I as e,J as f}from"./vm-hands-entry-lite-2wa0aq74.js";import"./vm-hands-entry-lite-02t1tfe7.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-ah89nzd4.js";export{d as sessionPlace,c as sessionMachine,e as createMachineEnrollmentTicketWithToken,f as ReasonApi,b as REASONING_EFFORTS,a as ApiError};
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import{K as _}from"./vm-hands-entry-lite-02t1tfe7.js";import"./vm-hands-entry-lite-y06rgq4n.js";import{qf as c}from"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import{ri as g}from"./vm-hands-entry-lite-ah89nzd4.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
+ `).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
+ `);while(X>=0){let Z=this.buffer.slice(0,X);if(this.buffer=this.buffer.slice(X+1),X=this.buffer.indexOf(`
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
+ `),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
+ `,{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-etg0qnwq.js"),import("./api-j19tqbqn.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{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l,s as m}from"./vm-hands-entry-lite-hybhzkvj.js";import"./vm-hands-entry-lite-ytwa3p73.js";import"./vm-hands-entry-lite-hmva2yc7.js";import"./vm-hands-entry-lite-2wa0aq74.js";import"./vm-hands-entry-lite-02t1tfe7.js";import"./vm-hands-entry-lite-3fddeh8v.js";import"./vm-hands-entry-lite-bpvxdk3g.js";import"./vm-hands-entry-lite-z55phtry.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-y9rzr1a3.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-1hpmjd5x.js";import"./vm-hands-entry-lite-ewpfck9v.js";import"./vm-hands-entry-lite-jgjvs1tq.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-4kwqp4rz.js";import"./vm-hands-entry-lite-d8myh0nx.js";import"./vm-hands-entry-lite-hkw64faw.js";import"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-xd9vwd5k.js";import"./vm-hands-entry-lite-kh7w4cpj.js";import"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-rwp6km63.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ac as k,Bc as l,Cc as m,Dc as n,Ec as o,Fc as p,Gc as q,qc as a,rc as b,sc as c,tc as d,uc as e,vc as f,wc as g,xc as h,yc as i,zc as j}from"./vm-hands-entry-lite-4b8f37q4.js";import"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-px64jhhn.js";export{q as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,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};
2
+ import{Ac as k,Bc as l,Cc as m,Dc as n,Ec as o,Fc as p,Gc as q,qc as a,rc as b,sc as c,tc as d,uc as e,vc as f,wc as g,xc as h,yc as i,zc as j}from"./vm-hands-entry-lite-1hpmjd5x.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-ah89nzd4.js";export{q as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,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{Te as a,Ue as b,Ve as c,We as d,Xe as e}from"./vm-hands-entry-lite-d8myh0nx.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-ah89nzd4.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 r,Kh as a,Lh as b,Mh as c,Nh as d,Oh as e,Ph as f,Qh as g,Rh as h,Sh as i,Th as j,Uh as k,Vh as l,Wh as m,Xh as n,Yh as o,Zh as p,_h as q,ai as s,bi as t,ci as u}from"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-px64jhhn.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};
2
+ import{$h as q,Lh as a,Mh as b,Nh as c,Oh as d,Ph as e,Qh as f,Rh as g,Sh as h,Th as i,Uh as j,Vh as k,Wh as l,Xh as m,Yh as n,Zh as o,_h as p,ai as r,bi as s,ci as t,di as u}from"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-ah89nzd4.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{bc as a,cc as b,dc as c,ec as d,fc as e,gc as f,hc as g,ic as h,jc as i}from"./vm-hands-entry-lite-5n6vc7je.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-px64jhhn.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};
2
+ import{bc as a,cc as b,dc as c,ec as d,fc as e,gc as f,hc as g,ic as h,jc as i}from"./vm-hands-entry-lite-y9rzr1a3.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-ah89nzd4.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{P as iJ0}from"./vm-hands-entry-lite-c64behya.js";import{li as NV0,mi as rn,ni as EJ,pi as an,qi as X0}from"./vm-hands-entry-lite-px64jhhn.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(`
2
+ import{P as iJ0}from"./vm-hands-entry-lite-3dh55nnz.js";import{mi as NV0,ni as rn,oi as EJ,qi as an,ri as X0}from"./vm-hands-entry-lite-ah89nzd4.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 d,Yc as a,Zc as b,_c as c,ad as e,bd as f,cd as g,dd as h,ed as i,fd as j,gd as k,hd as l}from"./vm-hands-entry-lite-ewpfck9v.js";import"./vm-hands-entry-lite-jgjvs1tq.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-4kwqp4rz.js";import"./vm-hands-entry-lite-d8myh0nx.js";import"./vm-hands-entry-lite-hkw64faw.js";import"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-xd9vwd5k.js";import"./vm-hands-entry-lite-kh7w4cpj.js";import"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-rwp6km63.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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{ea as c,fa as d,ga as e,ha as f,ia as g,ja as h,ka as i,la as j,ma as k,na as l,oa as m,pa as n,qa as o,ra as p,sa as q,ta as r,ua as s,va as t,wa as u}from"./vm-hands-entry-lite-3fddeh8v.js";import"./vm-hands-entry-lite-bpvxdk3g.js";import"./vm-hands-entry-lite-z55phtry.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-y9rzr1a3.js";import{oc as b}from"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-1hpmjd5x.js";import"./vm-hands-entry-lite-ewpfck9v.js";import"./vm-hands-entry-lite-jgjvs1tq.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-4kwqp4rz.js";import"./vm-hands-entry-lite-d8myh0nx.js";import"./vm-hands-entry-lite-hkw64faw.js";import"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-xd9vwd5k.js";import"./vm-hands-entry-lite-kh7w4cpj.js";import"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-rwp6km63.js";import{li as a}from"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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{ei as a,fi as b,gi as c,hi as d,ii as e,ji as f,ki as g}from"./vm-hands-entry-lite-rwp6km63.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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{If as a,Jf as b,Kf as c,Lf as d,Mf as e,Nf as f,Of as g}from"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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{Le as a,Me as b,Ne as c,Oe as d,Pe as e,Qe as f,Re as g,Se as h}from"./vm-hands-entry-lite-4kwqp4rz.js";import"./vm-hands-entry-lite-d8myh0nx.js";import"./vm-hands-entry-lite-hkw64faw.js";import"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-xd9vwd5k.js";import"./vm-hands-entry-lite-kh7w4cpj.js";import"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-rwp6km63.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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{Pf as a,Qf as b,Rf as c,Sf as d,Tf as e,Uf as f,Vf as g,Wf as h,Xf as i,Yf as j}from"./vm-hands-entry-lite-xd9vwd5k.js";import"./vm-hands-entry-lite-kh7w4cpj.js";import"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-vx5y8jc7.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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{$d as L,Ad as k,Bd as l,Cd as m,Dd as n,Ed as o,Fd as p,Gd as q,Hd as r,Id as s,Jd as t,Kd as u,Ld as v,Md as w,Nd as x,Od as y,Pd as z,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,ge as S,he as T,ie as U,je as V,ke as W,le as X,me as Y,ne as Z,oe as _,pe as $,qd as a,qe as aa,rd as b,re as ba,sd as c,se as ca,td as d,te as da,ud as e,ue as ea,vd as f,ve as fa,wd as g,we as ga,xd as h,yd as i,zd as j}from"./vm-hands-entry-lite-jgjvs1tq.js";import"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-ah89nzd4.js";export{Z as parseLocalRuntimeRootsSyncResponse,V as parseLocalRuntimeRegistrationResponse,U as parseLocalRuntimeProofChallenge,da as parseLocalRuntimeOperationHeartbeatResponse,ea as parseLocalRuntimeOperationEventsResponse,fa as parseLocalRuntimeOperationEnvironmentResponse,ga as parseLocalRuntimeOperationCompletionResponse,ca as parseLocalRuntimeOperationClaim,aa as parseLocalRuntimeLocalSubscriptionResponse,ba as parseLocalRuntimeLifecycleResponse,_ as parseLocalRuntimeIdentityResponse,X as parseLocalRuntimeHeartbeatResponse,Y as parseLocalRuntimeFirstHeartbeat,T as parseLocalRuntimeErrorEnvelope,W as parseLocalRuntimeEnrollmentResponse,$ as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,S as buildLocalRuntimeDeviceProofBytes,N as WORKER_STARTUP_TIMING_STAGES,I as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,O 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,P as LOCAL_RUNTIME_LIFECYCLE_EVENTS,R as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,Q as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,K as JOBS_START_WAIT_KEY,J as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,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,L as AUTOMATION_USER_CHROME,M as AUTOMATION_CLOUD_SESSIONS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{P as a}from"./vm-hands-entry-lite-3dh55nnz.js";import"./vm-hands-entry-lite-ah89nzd4.js";export default a();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{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}from"./vm-hands-entry-lite-hkw64faw.js";import"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-sjfdhffh.js";import"./vm-hands-entry-lite-ah89nzd4.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};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$g as M,Ag as l,Bg as m,Cg as n,Dg as o,Eg as p,Fg as q,Gg as r,Hg as s,Ig as t,Jg as u,Kg as v,Lg as w,Mg as x,Ng as y,Og as z,Pg as A,Qg as B,Rg as C,Sg as D,Tg as E,Ug as F,Vg as G,Wg as H,Xg as I,Yg as J,Zg as K,_g as L,ah as N,bh as O,ch as P,dh as Q,eh as R,fh as S,gh as T,hh as U,ih as V,jh as W,kh as X,lh as Y,mh as Z,pg as a,qg as b,rg as c,sg as d,tg as e,ug as f,vg as g,wg as h,xg as i,yg as j,zg as k}from"./vm-hands-entry-lite-cnmd8nft.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-px64jhhn.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};
2
+ import{$g as L,Ag as k,Bg as l,Cg as m,Dg as n,Eg as o,Fg as p,Gg as q,Hg as r,Ig as s,Jg as t,Kg as u,Lg as v,Mg as w,Ng as x,Og as y,Pg as z,Qg as A,Rg as B,Sg as C,Tg as D,Ug as E,Vg as F,Wg as G,Xg as H,Yg as I,Zg as J,_g as K,ah as M,bh as N,ch as O,dh as P,eh as Q,fh as R,gh as S,hh as T,ih as U,jh as V,kh as W,lh as X,mh as Y,nh as Z,qg as a,rg as b,sg as c,tg as d,ug as e,vg as f,wg as g,xg as h,yg as i,zg as j}from"./vm-hands-entry-lite-h12jx2e8.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-ah89nzd4.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 Fq,e as Dq,f as kq,i as Kq,j as Vq,o as Hq}from"./vm-hands-entry-lite-qx8702e7.js";import"./vm-hands-entry-lite-hj6jjk24.js";import{x as bq}from"./vm-hands-entry-lite-dtcpbbkc.js";import{J as Bq,z as Wq}from"./vm-hands-entry-lite-feaxcj0x.js";import"./vm-hands-entry-lite-zgs6j8wj.js";import"./vm-hands-entry-lite-dea36bpb.js";import"./vm-hands-entry-lite-5q96en2m.js";import"./vm-hands-entry-lite-7kzy7rxj.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-5n6vc7je.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-4b8f37q4.js";import{Hc as jq}from"./vm-hands-entry-lite-qbr9m7zh.js";import"./vm-hands-entry-lite-9k57wmkv.js";import{we as G}from"./vm-hands-entry-lite-mtp2h66e.js";import"./vm-hands-entry-lite-hzqdhpr9.js";import"./vm-hands-entry-lite-tf5mepq5.js";import"./vm-hands-entry-lite-zykqwmp1.js";import{pf as R}from"./vm-hands-entry-lite-m0epceqg.js";import"./vm-hands-entry-lite-xa9mfp55.js";import"./vm-hands-entry-lite-jzms4xs2.js";import"./vm-hands-entry-lite-awwev9zg.js";import{hg as Qq}from"./vm-hands-entry-lite-dhzcvvt2.js";import"./vm-hands-entry-lite-cnmd8nft.js";import{qh as H,rh as u,sh as s}from"./vm-hands-entry-lite-mm72ht4e.js";import{Fh as l}from"./vm-hands-entry-lite-s64raarx.js";import"./vm-hands-entry-lite-9rr6gh58.js";import"./vm-hands-entry-lite-983czfdb.js";import"./vm-hands-entry-lite-070nd0vy.js";import{qi as $q}from"./vm-hands-entry-lite-px64jhhn.js";import{createHash as tq,randomBytes as sq}from"crypto";import{readFileSync as eq,realpathSync as zq,renameSync as nq,unlinkSync as aq,writeFileSync as q3}from"fs";import{dirname as x3,join as Aq}from"path";import{spawnSync as Mq}from"child_process";import{accessSync as _q,constants as wq,existsSync as L,mkdirSync as Lq,readFileSync as fq,renameSync as Sq,writeFileSync as hq}from"fs";import{homedir as Cq}from"os";import{delimiter as gq,dirname as mq,join as T}from"path";import{existsSync as Tq,readFileSync as Uq}from"fs";import{join as vq}from"path";var Eq=`---
2
+ import{d as Fq,e as Dq,f as kq,i as Kq,j as Vq,o as Hq}from"./vm-hands-entry-lite-hybhzkvj.js";import"./vm-hands-entry-lite-ytwa3p73.js";import{x as bq}from"./vm-hands-entry-lite-hmva2yc7.js";import{J as Bq,z as Wq}from"./vm-hands-entry-lite-2wa0aq74.js";import"./vm-hands-entry-lite-02t1tfe7.js";import"./vm-hands-entry-lite-3fddeh8v.js";import"./vm-hands-entry-lite-bpvxdk3g.js";import"./vm-hands-entry-lite-z55phtry.js";import"./vm-hands-entry-lite-h01d2fbm.js";import"./vm-hands-entry-lite-y9rzr1a3.js";import"./vm-hands-entry-lite-t5h3g60g.js";import"./vm-hands-entry-lite-ffgjezmx.js";import"./vm-hands-entry-lite-1hpmjd5x.js";import{Hc as jq}from"./vm-hands-entry-lite-ewpfck9v.js";import"./vm-hands-entry-lite-jgjvs1tq.js";import{xe as G}from"./vm-hands-entry-lite-y06rgq4n.js";import"./vm-hands-entry-lite-4kwqp4rz.js";import"./vm-hands-entry-lite-d8myh0nx.js";import"./vm-hands-entry-lite-hkw64faw.js";import{qf as R}from"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-tmc063vj.js";import"./vm-hands-entry-lite-xd9vwd5k.js";import{ig as Qq}from"./vm-hands-entry-lite-kh7w4cpj.js";import"./vm-hands-entry-lite-h12jx2e8.js";import{rh as H,sh as u,th as s}from"./vm-hands-entry-lite-vx5y8jc7.js";import{Gh as l}from"./vm-hands-entry-lite-tcewjhvf.js";import"./vm-hands-entry-lite-6j29vkh5.js";import"./vm-hands-entry-lite-rwp6km63.js";import"./vm-hands-entry-lite-sjfdhffh.js";import{ri as $q}from"./vm-hands-entry-lite-ah89nzd4.js";import{createHash as tq,randomBytes as sq}from"crypto";import{readFileSync as eq,realpathSync as zq,renameSync as nq,unlinkSync as aq,writeFileSync as q3}from"fs";import{dirname as x3,join as Aq}from"path";import{spawnSync as Mq}from"child_process";import{accessSync as _q,constants as wq,existsSync as L,mkdirSync as Lq,readFileSync as fq,renameSync as Sq,writeFileSync as hq}from"fs";import{homedir as Cq}from"os";import{delimiter as gq,dirname as mq,join as T}from"path";import{existsSync as Tq,readFileSync as Uq}from"fs";import{join as vq}from"path";var Eq=`---
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
  `),b.version)x.stdout.write(`Version: ${b.version}${b.version===R?"":` (${R} is installed; \`reason connect\` restarts it on that)`}
80
80
  `);if(x.stdout.write(`Folder: ${b.folder}
81
81
  `),x.stdout.write(`Sessions: ${b.sessions_running===null?"":`${b.sessions_running} running, `}${b.sessions_max===1?"one at a time":`up to ${b.sessions_max} at once`}
82
- `),z){let Z=z,V=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Nq,reasonIdentity:Iq}=await import("./permissions-83qxqzvy.js"),{macScreenStatus:Oq}=await import("./local-display-mac-4pddah9q.js");return Rq(await Nq({identity:()=>Iq(),grants:Oq,worker:async()=>Z}))}))().catch(()=>null);if(V)x.stdout.write(`${V}
82
+ `),z){let Z=z,V=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Nq,reasonIdentity:Iq}=await import("./permissions-cyjxf3as.js"),{macScreenStatus:Oq}=await import("./local-display-mac-ykh2dzvh.js");return Rq(await Nq({identity:()=>Iq(),grants:Oq,worker:async()=>Z}))}))().catch(()=>null);if(V)x.stdout.write(`${V}
83
83
  `);x.stdout.write(`Keep awake: ${z.keep_awake.enabled?"on":"off"}${z.keep_awake.holding?" (holding)":""}
84
84
  `)}if(b.service)x.stdout.write(`Logs: ${b.service.logs}
85
85
  `);for(let Z of b.workspaces??[]){let V=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)":""}: ${V}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{qf as a,rf as b,sf as c,tf as d}from"./vm-hands-entry-lite-547nmvs3.js";import"./vm-hands-entry-lite-cavgmkjf.js";import"./vm-hands-entry-lite-ah89nzd4.js";export{c as compareCliVersions,d as cliAndAgentVersion,b as CLI_VERSION_PATTERN,a as CLI_VERSION};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{we as j}from"./vm-hands-entry-lite-mtp2h66e.js";var q=25,K=j.object({machine:j.string().min(1).max(200),person:j.string().min(1).max(200),team:j.string().min(1).max(200),version:j.string().max(64).optional(),wait_seconds:j.number().int().min(0).max(q).optional()}),v=j.discriminatedUnion("kind",[j.object({id:j.string(),kind:j.literal("who")}),j.object({id:j.string(),kind:j.literal("send"),to:j.string(),body:j.string(),from_name:j.string(),from_agent:j.string(),wake:j.boolean()})]),P=j.object({job:v.nullable(),retry_after_seconds:j.number().optional()}),x=j.object({address:j.string(),person:j.string(),machine:j.string(),agent:j.string(),repo:j.string().nullable(),branch:j.string().nullable(),status:j.string(),since:j.number().nullable(),doing:j.string().nullable(),worker:j.boolean()}),B=j.object({person:j.string(),machine:j.string(),online:j.boolean()}),F=j.object({team:j.string().nullable(),sessions:j.array(x).max(2000),machines:j.array(B).max(500)}),Q=j.union([j.object({who:F}),j.object({sent:j.object({ids:j.array(j.string().max(100)).max(500),recipients:j.array(j.string().max(300)).max(500),from:j.string().max(300)})}),j.object({error:j.string().min(1).max(2000)})]),G=j.object({id:j.string().max(100),from:j.string().max(300),from_agent:j.string().max(100).nullable(),to:j.string().max(300),reply_to:j.string().max(100).nullable(),body:j.string().max(64000),sent_at:j.number()}),U=j.object({messages:j.array(G).max(100)});
2
+ import{xe as j}from"./vm-hands-entry-lite-y06rgq4n.js";var q=25,K=j.object({machine:j.string().min(1).max(200),person:j.string().min(1).max(200),team:j.string().min(1).max(200),version:j.string().max(64).optional(),wait_seconds:j.number().int().min(0).max(q).optional()}),v=j.discriminatedUnion("kind",[j.object({id:j.string(),kind:j.literal("who")}),j.object({id:j.string(),kind:j.literal("send"),to:j.string(),body:j.string(),from_name:j.string(),from_agent:j.string(),wake:j.boolean()})]),P=j.object({job:v.nullable(),retry_after_seconds:j.number().optional()}),x=j.object({address:j.string(),person:j.string(),machine:j.string(),agent:j.string(),repo:j.string().nullable(),branch:j.string().nullable(),status:j.string(),since:j.number().nullable(),doing:j.string().nullable(),worker:j.boolean()}),B=j.object({person:j.string(),machine:j.string(),online:j.boolean()}),F=j.object({team:j.string().nullable(),sessions:j.array(x).max(2000),machines:j.array(B).max(500)}),Q=j.union([j.object({who:F}),j.object({sent:j.object({ids:j.array(j.string().max(100)).max(500),recipients:j.array(j.string().max(300)).max(500),from:j.string().max(300)})}),j.object({error:j.string().min(1).max(2000)})]),G=j.object({id:j.string().max(100),from:j.string().max(300),from_agent:j.string().max(100).nullable(),to:j.string().max(300),reply_to:j.string().max(100).nullable(),body:j.string().max(64000),sent_at:j.number()}),U=j.object({messages:j.array(G).max(100)});
3
3
  export{q as K,P as L};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{we as w}from"./vm-hands-entry-lite-mtp2h66e.js";var _="inference.custom.v1",K=32768,O=67108864,P=16384,Q=204800,$=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 x=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"),C=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(),E=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()]),M=w.object({bytes:w.number().int().min(0).max(O),chunks:w.number().int().min(0).max(P)}).strict(),R=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 z(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 p(j){return Object.hasOwn(G,j)?G[j]:null}function b(j){return typeof j==="string"&&Y.has(j)}
2
+ import{xe as w}from"./vm-hands-entry-lite-y06rgq4n.js";var _="inference.custom.v1",K=32768,O=67108864,P=16384,Q=204800,$=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 x=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"),C=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(),E=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()]),M=w.object({bytes:w.number().int().min(0).max(O),chunks:w.number().int().min(0).max(P)}).strict(),R=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 z(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 p(j){return Object.hasOwn(G,j)?G[j]:null}function b(j){return typeof j==="string"&&Y.has(j)}
3
3
  export{_ as qc,K as rc,O as sc,P as tc,Q as uc,$ as vc,S as wc,V as xc,x as yc,C as zc,E as Ac,M as Bc,R as Cc,W as Dc,z as Ec,p as Fc,b as Gc};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{L as f}from"./vm-hands-entry-lite-zgs6j8wj.js";import{we as $}from"./vm-hands-entry-lite-mtp2h66e.js";import{Ah as T,nh as v,qh as K,th as U,uh as y}from"./vm-hands-entry-lite-mm72ht4e.js";var c=/^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/;function _(x){let w=typeof x==="string"?c.exec(x):null;return w?{major:Number(w[1]),minor:Number(w[2])}:null}import{createHash as s,randomBytes as j}from"crypto";import{createInterface as o}from"readline";import{randomBytes as d}from"crypto";import{chmodSync as q,existsSync as C,lstatSync as l,mkdirSync as a,readFileSync as b,renameSync as p,unlinkSync as O,writeFileSync as L}from"fs";import{homedir as t}from"os";import{dirname as i,join as F}from"path";function B(x=process.env,w=t()){let H=x.XDG_CONFIG_HOME?.trim()||F(w,".config"),J=K({env:x})==="staging"?["staging"]:[];return F(T(H,...J),"credentials.json")}function A(x,w=B()){return a(i(w),{recursive:!0,mode:448}),L(w,`${JSON.stringify(x,null,2)}
2
+ import{L as f}from"./vm-hands-entry-lite-02t1tfe7.js";import{xe as $}from"./vm-hands-entry-lite-y06rgq4n.js";import{Bh as T,oh as v,rh as K,uh as U,vh as y}from"./vm-hands-entry-lite-vx5y8jc7.js";var c=/^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/;function _(x){let w=typeof x==="string"?c.exec(x):null;return w?{major:Number(w[1]),minor:Number(w[2])}:null}import{createHash as s,randomBytes as j}from"crypto";import{createInterface as o}from"readline";import{randomBytes as d}from"crypto";import{chmodSync as q,existsSync as C,lstatSync as l,mkdirSync as a,readFileSync as b,renameSync as p,unlinkSync as O,writeFileSync as L}from"fs";import{homedir as t}from"os";import{dirname as i,join as F}from"path";function B(x=process.env,w=t()){let H=x.XDG_CONFIG_HOME?.trim()||F(w,".config"),J=K({env:x})==="staging"?["staging"]:[];return F(T(H,...J),"credentials.json")}function A(x,w=B()){return a(i(w),{recursive:!0,mode:448}),L(w,`${JSON.stringify(x,null,2)}
3
3
  `,{mode:384}),q(w,384),w}function M(x=B()){if(!C(x))return null;try{let w=b(x,"utf8"),H=JSON.parse(w);if(typeof H.apiOrigin!=="string"||typeof H.clientId!=="string"||typeof H.accessToken!=="string"||typeof H.refreshToken!=="string"||typeof H.expiresAt!=="string"||typeof H.orgId!=="string"||!Array.isArray(H.scopes))return null;let G=new URL(H.apiOrigin).origin,J=U(G);if(J!==G)n(x,w,J);return{apiOrigin:J,clientId:H.clientId,accessToken:H.accessToken,refreshToken:H.refreshToken,expiresAt:H.expiresAt,scopes:H.scopes.filter((Q)=>typeof Q==="string"),orgId:H.orgId}}catch{return null}}function n(x,w,H){let G=`${x}.${process.pid}.${d(6).toString("hex")}.tmp`;try{let J=l(x);if(!J.isFile()||J.uid!==process.geteuid?.())return;let Q=JSON.parse(w);if(L(G,`${JSON.stringify({...Q,apiOrigin:H},null,2)}
4
4
  `,{mode:384,flag:"wx"}),q(G,384),b(x,"utf8")!==w)throw Error("credentials_changed");p(G,x)}catch{try{O(G)}catch{}}}function R(x=B()){if(!C(x))return!1;return O(x),!0}var S=["run","mcp:read","mcp:write","secrets:read","secrets:write","sessions:read","sessions:debug","devices:read","devices:write","devices:use","ssh:write","knowledge:read","memory:read","memory:write","skills:read","skills:write","repos:read","repos:write","reviews:read","reviews:write","deployment:read","analytics:read","org:read","org:write","attachments:read","attachments:write","guardrails:read","guardrails:write","network:read","network:write","automations:read","automations:write","agent_auth:read"];var n0=S.filter((x)=>x!=="network:read"&&x!=="network:write");class D extends Error{oauthCode;constructor(x,w=null){super(x);this.oauthCode=w;this.name="LoginError"}}function s0(){let x=j(48).toString("base64url"),w=s("sha256").update(x).digest("base64url");return{verifier:x,challenge:w,state:j(32).toString("base64url")}}function r(x,w){let H=typeof x.error==="string"?x.error:null,G=typeof x.error_description==="string"?x.error_description:H?H:w;return new D(G,H)}async function e(x,w,H,G){let J=await H(`${x}/mcp/oauth/token`,{method:"POST",redirect:"error",headers:{"content-type":"application/x-www-form-urlencoded"},body:w,signal:G}),Q=await J.json().catch(()=>({}));if(!J.ok)throw r(Q,`OAuth token request failed (${J.status})`);return Q}var x0=1e4;async function w0(x,w={}){let H=w.fetchImpl??fetch,G=await e(x.apiOrigin,new URLSearchParams({grant_type:"refresh_token",client_id:x.clientId,refresh_token:x.refreshToken}),H,AbortSignal.timeout(x0)).catch((Q)=>{if(Q instanceof Error&&Q.name==="TimeoutError")throw new D("Reason did not answer the login refresh in time. Check the network and retry.");throw Q});if(typeof G.access_token!=="string"||typeof G.refresh_token!=="string"||typeof G.expires_in!=="number")throw new D("Reason returned an incomplete refreshed login.");let J={...x,accessToken:G.access_token,refreshToken:G.refresh_token,expiresAt:new Date(Date.now()+G.expires_in*1000).toISOString(),scopes:typeof G.scope==="string"?G.scope.split(/\s+/).filter(Boolean):x.scopes};return A(J,w.path??B()),J}var z=new Map;function k(x,w){if(!w)return x;if(w.aborted)return Promise.reject(w.reason);return new Promise((H,G)=>{let J=()=>G(w.reason);w.addEventListener("abort",J,{once:!0}),x.then(H,G).finally(()=>w.removeEventListener("abort",J))})}async function P(x={}){let w=x.path??B(),H=M(w);if(!H)return null;let G=x.apiOrigin??v(process.env,"REASON_API_URL")?.trim();if(G&&!y(H.apiOrigin,new URL(G).origin))return null;let J=Date.parse(H.expiresAt)<=Date.now()+60000;if(!x.forceRefresh&&!J)return H;let Q=[w,H.apiOrigin,H.clientId,H.refreshToken].join("\x00"),V=z.get(Q);if(V)return k(V,x.signal);let Z;return Z=w0(H,{fetchImpl:x.fetchImpl,path:w}).catch(async(Y)=>{if(!(Y instanceof D)||Y.oauthCode!=="invalid_grant"&&Y.oauthCode!=="invalid_client")throw Y;let N=M(w),u=Y.oauthCode==="invalid_client"?N?.clientId!==H.clientId:N?.refreshToken!==H.refreshToken;if(N&&u)return P({fetchImpl:x.fetchImpl,path:w});return R(w),null}).finally(()=>{if(z.get(Q)===Z)z.delete(Q)}),z.set(Q,Z),k(Z,x.signal)}function o0(x,w){return new Promise((H)=>{let G=o({input:x}),J=!1,Q=(Z)=>{if(J)return;J=!0,w.removeEventListener("abort",V),G.close(),x.pause(),H(Z)},V=()=>Q(null);w.addEventListener("abort",V,{once:!0}),G.once("line",(Z)=>Q(Z)),G.once("close",()=>Q(null))})}var $0=$.object({label:$.string(),used_percent:$.number().min(0).max(100).nullable(),resets_at:$.string().nullable(),exhausted:$.boolean().nullable()}),H0=$.object({groups:$.array($.object({selectable:$.boolean().optional(),accounts:$.array($.object({source_id:$.string().min(1),model_ids:$.array($.string().min(1)).optional()}))}))});function G0(x){let w=H0.safeParse(x);if(!w.success)return;return w.data.groups.some((H)=>H.selectable!==!1&&H.accounts.some((G)=>G.model_ids===void 0||G.model_ids.length>0))}class X extends Error{status;code;suggestedModel;retryAfterMs;resolutionReason;constructor(x,w,H,G,J,Q){super(H);this.status=x;this.code=w;this.suggestedModel=G;this.retryAfterMs=J;this.resolutionReason=Q;this.name="ApiError"}static rateLimitDelayMs(x,w){if(!(x instanceof X)||x.status!==429)return null;return Math.min(60000,Math.max(w,x.retryAfterMs??0))}}var J0=["minimal","low","medium","high","xhigh","max"],Q0=$.object({id:$.string().min(1),kind:$.string(),name:$.string(),custom_name:$.string().nullish(),status:$.string(),online:$.boolean(),compatible:$.boolean().optional(),compatibility_reason:$.string().nullish(),folder_lane_of:$.string().nullish(),roots:$.array($.object({id:$.string().min(1),label:$.string()}))}),W0=$.object({devices:$.array(Q0),end_cursor:$.string().nullish(),has_next_page:$.boolean().optional()}),Z0=$.object({id:$.string().min(1),name:$.string()}),V0=$.object({items:$.array(Z0)}),X0=$.object({id:$.string().min(1),name:$.string(),main:$.boolean(),mine:$.boolean(),session_id:$.string().nullish(),appearance:$.object({color:$.string().nullish()}).nullish().catch(null)}),Y0=$.object({items:$.array(X0)}),B0=$.object({skill_id:$.string().min(1),name:$.string(),description:$.string().nullish(),activation_keywords:$.array($.string()).default([]),is_enabled:$.boolean().default(!0)}),D0=$.object({items:$.array(B0).default([])}),z0=$.object({id:$.string().min(1),kind:$.string(),enabled:$.boolean(),schedule:$.object({expression:$.string().nullish(),every_seconds:$.number().nullish(),next_run_at:$.string().nullish()}).nullish(),github:$.object({event:$.string().nullish(),action:$.string().nullish(),repo:$.string().nullish()}).nullish(),last_fired_at:$.string().nullish()}),I=$.object({id:$.string().min(1),name:$.string().nullish(),instructions:$.string().nullish(),enabled:$.boolean(),triggers:$.array(z0).default([])}),N0=$.object({items:$.array(I).default([]),end_cursor:$.string().nullish(),has_next_page:$.boolean().optional()}),K0=$.object({id:$.string().min(1),slug:$.string().nullish(),name:$.string(),description:$.string().nullish(),transport:$.string().nullish(),url:$.string().nullish(),enabled:$.boolean()}),M0=$.object({items:$.array(K0).default([])}),P0=$.object({status:$.string(),summary:$.string().nullish(),category:$.string().nullish(),outcome:$.string().nullish(),message_count:$.number().nullish(),pr_url:$.string().nullish(),cost_usd:$.number().nullish(),generated_at:$.string().nullish()}),E=$.object({tags:$.array($.string()).default([])}),_0=$.enum(["linux","macos"]),h=$.object({id:$.string().min(1),name:$.string().min(1),platform:_0.nullable(),workers:$.object({total:$.number().int(),online:$.number().int(),busy:$.number().int(),idle:$.number().int()}),sessions:$.object({queued:$.number().int(),running:$.number().int()})}),F0=$.object({machines:$.array(h)}),U0=$.object({machine:h}),T0=$.object({deleted:$.literal(!0),revoked_workers:$.number().int(),revoked_tokens:$.number().int()}),q0=$.object({token:$.object({id:$.string().min(1),machine_id:$.string().min(1),token_prefix:$.string()}),secret:$.string().startsWith("rmt_")}),g=$.looseObject({machine_id:$.string().min(1),machine_name:$.string().min(1)}),C0=g.extend({organization_id:$.string().min(1)}),b0=$.object({id:$.string().min(1),name:$.string().min(1),state:$.enum(["waiting","placed"]),queue_position:$.number().int().nullable()});function H1(x){let w=b0.safeParse(x.machine);return w.success?w.data:null}var O0=$.union([$.object({kind:$.literal("cloud")}),$.object({kind:$.enum(["mac","headless"]),device_id:$.string().min(1),root_id:$.string().min(1)})]);function G1(x){let w=O0.safeParse(x.runs_on);return w.success?w.data:null}function W(x,w,H){let G=x.safeParse(w);if(!G.success)throw new X(502,H,"Reason returned an unexpected response.");return G.data}var L0=$.object({error:$.object({type:$.string(),message:$.string()})});function m(x,w,H){let G=L0.safeParse(w),J=typeof w.error==="string"?w.error:G.success?G.data.error.type:`http_${x}`,Q=typeof w.detail==="string"?w.detail:typeof w.message==="string"?w.message:G.success?G.data.error.message:`Reason request failed (${x}${typeof w.error==="string"?` ${w.error}`:""})`,V=J==="github_connection_required"&&typeof w.connect_url==="string"&&/^https?:\/\//.test(w.connect_url)?` Connect it at ${w.connect_url}`:"",Z=H===null||H.trim()===""?NaN:Number(H);return new X(x,J,`${Q}${V}`,typeof w.suggested_model==="string"?w.suggested_model:void 0,Number.isFinite(Z)&&Z>=0?Z*1000:void 0,typeof w.resolution_reason==="string"?w.resolution_reason:void 0)}async function J1(x){let w=await(x.fetchImpl??fetch)(`${x.apiOrigin}/v3/machines/enrollment-tickets`,{method:"POST",headers:{authorization:`Bearer ${x.token}`,accept:"application/json","content-type":"application/json"},body:JSON.stringify(x.body),signal:AbortSignal.timeout(30000),redirect:"error"}),H=await w.json().catch(()=>({}));if(!w.ok)throw m(w.status,H,w.headers.get("retry-after"));return W(C0,H,"invalid_machine_ticket")}class A0{options;credentials;constructor(x,w={}){this.options=w;this.credentials=x}trackEvent(x,w={}){}async request(x,w={},H=!1){let G=this.options.fetchImpl??fetch,J=await G(`${this.credentials.apiOrigin}/v3${x}`,{method:w.method??"GET",headers:{authorization:`Bearer ${this.credentials.accessToken}`,accept:"application/json","user-agent":"reason-cli","x-reason-agent":"Reason CLI",...w.raw?{"content-type":w.raw.contentType}:w.body===void 0?{}:{"content-type":"application/json"},...w.headers},body:w.raw?w.raw.bytes:w.body===void 0?void 0:JSON.stringify(w.body),signal:w.signal,redirect:"error"}),Q=await J.json().catch(()=>({}));if(J.status===401&&!H&&w.retryUnauthorized!==!1&&this.credentials.credentialKind!=="api_key"){let V=await P({fetchImpl:G,path:this.options.credentialsPath,forceRefresh:!0,signal:w.signal});if(V)return this.credentials=V,this.request(x,w,!0)}if(!J.ok)throw m(J.status,Q,J.headers.get("retry-after"));return Q}createHeadlessDeviceEnrollmentTicket(x){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/enrollment-tickets`,{method:"POST",body:x,signal:AbortSignal.timeout(30000),retryUnauthorized:!1})}async enrollHeadlessDevice(x){try{return await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/enrollments`,{method:"POST",body:x,signal:AbortSignal.timeout(30000),retryUnauthorized:!1})}catch(w){if(w instanceof X&&(w.status===404||w.status===405||w.status===403&&w.code==="endpoint_not_available"))return null;throw w}}addDeviceRoot(x,w){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/${encodeURIComponent(x)}/roots`,{method:"POST",body:w,signal:AbortSignal.timeout(30000)})}removeDeviceRoot(x,w){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/${encodeURIComponent(x)}/roots/${encodeURIComponent(w)}`,{method:"DELETE",signal:AbortSignal.timeout(30000)})}machinePath(x,w=""){let H=`/organizations/${encodeURIComponent(this.credentials.orgId)}/machines`;return x===void 0?H:`${H}/${encodeURIComponent(x)}${w}`}async listMachines(){return W(F0,await this.request(this.machinePath()),"invalid_machine_list").machines}async createMachine(x){let w=await this.request(this.machinePath(),{method:"POST",body:{name:x.name,...x.platform?{platform:x.platform}:{}}});return W(U0,w,"invalid_machine").machine}async deleteMachine(x){let w=await this.request(this.machinePath(x),{method:"DELETE"});return W(T0,w,"invalid_machine_deletion")}async createMachineToken(x){let w=await this.request(this.machinePath(x,"/tokens"),{method:"POST",body:{}});return W(q0,w,"invalid_machine_token")}async createMachineEnrollmentTicket(x,w){let H=await this.request(this.machinePath(x,"/enrollment-tickets"),{method:"POST",body:w,signal:AbortSignal.timeout(30000),retryUnauthorized:!1});return W(g,H,"invalid_machine_ticket")}self(x){return this.request("/self",{signal:x})}agentNetwork(){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network`,{signal:AbortSignal.timeout(30000)})}startAgentNetwork(x){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network`,{method:"POST",body:x,signal:AbortSignal.timeout(30000)})}rotateAgentNetwork(x){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network`,{method:"PUT",body:x,signal:AbortSignal.timeout(30000)})}async claimAgentNetworkRelayJob(x,w){let H=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network/relay/claim`,{method:"POST",body:x,signal:w});return W(f,H,"invalid_agent_network_job")}async completeAgentNetworkRelayJob(x,w){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network/relay/jobs/${encodeURIComponent(x)}`,{method:"POST",body:w,signal:AbortSignal.timeout(30000)})}async recordAgentNetworkRelayReplies(x){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network/relay/replies`,{method:"POST",body:{messages:x},signal:AbortSignal.timeout(30000)})}async workspaceMembers(){return((await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/members/users`,{signal:AbortSignal.timeout(30000)})).items??[]).flatMap((w)=>typeof w.email==="string"?[{email:w.email,role:typeof w.role==="string"?w.role:"member"}]:[])}claimExistingCliPairing(x){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/onboarding/import/pairing/claim-existing`,{method:"POST",body:{pairing_code:x}})}connectAnthropicProvider(x,w,H={}){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/provider-credentials/anthropic`,{method:"POST",retryUnauthorized:H.retryUnauthorized,signal:H.signal,body:{access_token:x.access,refresh_token:x.refresh,expires_at:new Date(x.expires).toISOString(),...w?{account_key:w}:{}}})}async listRepositories(){return((await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/repositories`)).items??[]).flatMap((w)=>{let H=typeof w.full_name==="string"?w.full_name:typeof w.repo_full_name==="string"?w.repo_full_name:null;if(!H)return[];return[{repo_id:typeof w.repo_id==="string"?w.repo_id:void 0,full_name:H,provider:w.provider==="gitlab"?"gitlab":"github",default_branch:typeof w.default_branch==="string"?w.default_branch:null,private:typeof w.private==="boolean"?w.private:void 0}]})}async listProjects(){let x=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/projects`),w=V0.safeParse(x);if(!w.success)throw new X(502,"invalid_project_list","Reason returned an unexpected project list.");return w.data.items}async listReasons(){let x=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/reasons`);return W(Y0,x,"invalid_reason_list").items}async openReasonConversation(x){let w=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/reasons/${encodeURIComponent(x)}/conversation`,{method:"POST"});return W($.object({session_id:$.string().min(1)}),w,"invalid_reason_conversation").session_id}async listSkills(){try{let x=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/skills`);return W(D0,x,"invalid_skill_list").items}catch(x){if(x instanceof X&&(x.status===403||x.status===404))return[];throw x}}async listDevices(){let x=[],w=null;for(let H=0;H<50;H+=1){let G=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices${w?`?after=${encodeURIComponent(w)}`:""}`),J=W0.safeParse(G);if(!J.success)throw new X(502,"invalid_device_list","Reason returned an unexpected machine list.");if(x.push(...J.data.devices),w=J.data.has_next_page?J.data.end_cursor??null:null,!w)break}return x}async listModels(){try{let w=((await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-auth/models`)).models??[]).filter((J)=>J.hidden!==!0),H=w.filter((J)=>J.available!==!1).map(({reasoning_efforts:J,hidden:Q,available:V,...Z})=>({...Z,...Array.isArray(J)?{reasoning_efforts:J0.filter((Y)=>J.includes(Y))}:{}})),G=new Set(H.map((J)=>J.detail));return{models:H.length>1&&G.size===1?H.map(({detail:J,...Q})=>Q):H,runnable:H.length>0||w.length===0}}catch(x){if(x instanceof X&&(x.status===403||x.status===404))return{models:[],runnable:!0};throw x}}async getAgentVersion(x){try{let w=await this.request("/deployment",{signal:x,retryUnauthorized:!1});return _(w.reason_version)?w.reason_version:null}catch{return null}}async getUsageQuota(){try{let x=$0.safeParse(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/usage/quota`));if(!x.success)return null;let w;try{w=G0(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-auth/models`))}catch{}return{...x.data,own_inference:w}}catch(x){if(x instanceof X&&(x.status===403||x.status===404))return null;throw x}}async listSessions(x=50,w,H={}){let G=new URLSearchParams({first:String(Math.min(Math.max(x,1),200)),status:H.status??"active"});if(w)G.set("project_id",w);if(H.origin)G.set("origin",H.origin);return(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions?${G.toString()}`)).items??[]}getSession(x,w){let H=w?.fields.length?`?fields=${encodeURIComponent(w.fields.join(","))}`:"";return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}${H}`)}async prestartSession(x){let w=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/prestart`,{method:"POST",body:{client_session_id:x}});return w?.status==="starting"||w?.status==="ready"}async createSession(x){let w=x.mode==="ephemeral"||x.workspaceOwnership==="externally-managed";if(x.attachments?.length)await this.requireSessionAttachments();if(w||x.runtimeProfile){let J=await this.request("/deployment");if(w&&(!Array.isArray(J.session_modes)||!J.session_modes.includes(x.mode??"standard")||!Array.isArray(J.workspace_ownerships)||!J.workspace_ownerships.includes(x.workspaceOwnership??"managed")))throw Error("Deployment does not support the requested Session policy; refusing to create a Session.");if(x.runtimeProfile&&(!Array.isArray(J.experimental_runtime_profiles)||!J.experimental_runtime_profiles.includes(x.runtimeProfile)))throw Error("Deployment does not support the requested runtime profile; refusing to create a Session.")}let H=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions`,{method:"POST",body:{prompt:x.prompt,...x.attachments?.length?{attachments:x.attachments}:{},...x.mode?{mode:x.mode}:{},...x.workspaceOwnership?{workspace_ownership:x.workspaceOwnership}:{},...x.target?{target:x.target}:{},...x.repo?{repo:x.repo}:{},...x.provider?{provider:x.provider}:{},...x.model?{model:x.model}:{},...x.reasoningEffort?{reasoning_effort:x.reasoningEffort}:{},...x.runtimeProfile?{experimental_runtime_profile:x.runtimeProfile}:{},...x.ref?{ref:x.ref}:{},...x.branch?{branch:x.branch}:{},...x.completionMode?{completion_mode:x.completionMode}:{},...x.env&&Object.keys(x.env).length>0?{env:x.env}:{},...x.clientSessionId?{client_session_id:x.clientSessionId}:{},...x.longRunning?{long_running:{enabled:!0}}:{},...x.spendLimitRcu?{spend_limit_rcu:x.spendLimitRcu}:{},idempotency_key:`cli-${crypto.randomUUID()}`}}),G=await this.getSession(H.session_id);if(w){let J=G.session_policy,Q=["memoryRead","memoryWrite","skills","inheritedInstructions","integrations","secretInjection"];if(!J||J.version!==1||J.mode!==(x.mode??"standard")||J.workspaceOwnership!==(x.workspaceOwnership??"managed")||!J.components||Q.some((V)=>J.components[V]!==!0))throw await this.cancelSession(H.session_id),Error("Server did not attest the requested Session policy; cancellation requested.")}if(x.runtimeProfile&&G.experimental_runtime_profile!==x.runtimeProfile)throw await this.cancelSession(H.session_id),Error("Server did not attest the requested runtime profile; cancellation requested.");return G}async getEvents(x,w=-1,H={}){try{return await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/events?after_seq=${w}&limit=500${H.waitMs?`&wait_ms=${H.waitMs}`:""}`,H.signal?{signal:H.signal}:{})}catch(G){if(!(G instanceof X)||G.status!==403&&G.status!==404)throw G;return{session:await this.getSession(x),items:[],next_seq:w}}}async getMessages(x,w){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/messages?first=500${w===void 0?"":`&after_seq=${w}`}`)}async getAttachments(x,w){try{return(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/attachments${w?`?view=${w}`:""}`)).items??[]}catch(H){if(H instanceof X&&(H.status===403||H.status===404))return[];throw H}}async requireSessionAttachments(){let x=await this.request("/deployment",{headers:{"cache-control":"no-cache"}});if(x.session_attachments!==!0){let w=typeof x.reason_version==="string"&&/^\d+\.\d+(?:\.\d+)?$/.test(x.reason_version)?`Agent ${x.reason_version}`:null,H=typeof x.commit_sha==="string"&&/^[a-f0-9]{40,64}$/i.test(x.commit_sha)?`server ${x.commit_sha.slice(0,12)}`:null,G=[w,H].filter(Boolean).join(", ");throw Error(`This server does not support Session image attachments: ${new URL(this.credentials.apiOrigin).host}${G?` (${G})`:""}. The API server needs an attachment-capable deployment; updating the Agent version alone is not enough. Your image was not sent; retry after the server update.`)}}async sendMessage(x,w,H={}){if(H.attachments?.length)await this.requireSessionAttachments();return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/messages`,{method:"POST",body:{message:w,...H.attachments?.length?{attachments:H.attachments}:{},...H.model?{model:H.model}:{},...H.reasoningEffort?{reasoning_effort:H.reasoningEffort}:{},...H.target?{target:H.target}:{},...H.delivery?{delivery:H.delivery}:{}}})}async steerQueuedMessage(x,w){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/messages/${encodeURIComponent(w)}/steer`,{method:"POST",body:{}})}async withdrawQueuedMessage(x,w){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/messages/${encodeURIComponent(w)}/queued`,{method:"DELETE"})}async getConversation(x){let w=[],H=null;for(let G=0;G<50;G+=1){let J=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/conversation${H?`?after=${encodeURIComponent(H)}`:""}`);if(w.push(...J.items??[]),!J.has_next_page||!J.end_cursor)break;H=J.end_cursor}return w}createSharedLink(x,w){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/shared-links`,{method:"POST",body:{url:w.url,...w.label?{label:w.label}:{},...w.expiresInSeconds!==void 0?{expires_in_seconds:w.expiresInSeconds}:{}}})}sessionAction(x,w,H={}){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/${w}`,{method:"POST",body:H})}renameSession(x,w){return this.sessionAction(x,"rename",{title:w||null})}moveSessionToProject(x,w){return this.sessionAction(x,"project",{project_id:w})}compactSession(x){return this.sessionAction(x,"compact")}retrySession(x){return this.sessionAction(x,"retry")}rewindSession(x,w){return this.sessionAction(x,"rewind",{message_id:w.messageId,content:w.content,request_id:w.requestId})}forkSession(x,w){return this.sessionAction(x,"fork",{...w.message?{message:w.message}:{},client_session_id:w.clientSessionId})}cancelSession(x,w={}){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}/cancel`,{method:"POST",body:w.mode==="hard"?{mode:"hard"}:{}})}sessionPath(x,w=""){return`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(x)}${w}`}async archiveSession(x){await this.request(this.sessionPath(x,"/archive"),{method:"POST",body:{}})}async unarchiveSession(x){await this.request(this.sessionPath(x,"/unarchive"),{method:"POST",body:{}})}async deleteSession(x){await this.request(this.sessionPath(x),{method:"DELETE"})}async listSessionTags(x){return W(E,await this.request(this.sessionPath(x,"/tags")),"invalid_session_tags").tags}async appendSessionTags(x,w){let H=await this.request(this.sessionPath(x,"/tags"),{method:"POST",body:{tags:w}});return W(E,H,"invalid_session_tags").tags}async sessionInsight(x,w=!1){let H=await this.request(this.sessionPath(x,w?"/insights/generate":"/insights"),w?{method:"POST",body:{}}:{});return W(P0,H,"invalid_session_insight")}async listAutomations(){let x=[],w=null;for(let H=0;H<20;H+=1){let G=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations?first=100${w?`&after=${encodeURIComponent(w)}`:""}`),J=W(N0,G,"invalid_automation_list");if(x.push(...J.items),w=J.has_next_page?J.end_cursor??null:null,!w)break}return x}async createScheduledAutomation(x,w){let H=`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations`,G=W(I,await this.request(H,{method:"POST",body:{name:x.name,instructions:x.instructions,...x.repo?{repo:x.repo.full_name,provider:x.repo.provider}:{}}}),"invalid_automation");try{await this.request(`${H}/${encodeURIComponent(G.id)}/triggers`,{method:"POST",body:w})}catch(J){throw await this.deleteAutomation(G.id).catch(()=>{return}),J}return G}async setAutomationEnabled(x,w){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations/${encodeURIComponent(x)}`,{method:"PATCH",body:{enabled:w}})}async deleteAutomation(x){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations/${encodeURIComponent(x)}`,{method:"DELETE"})}async transcribe(x,w){let H=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/transcribe`,{method:"POST",raw:{bytes:x,contentType:w}});return W($.object({transcript:$.string()}),H,"invalid_transcript").transcript}async listMcpServers(){let x=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/mcp-servers`);return W(M0,x,"invalid_mcp_server_list").items}async setSkillEnabled(x,w){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/skills/${encodeURIComponent(x)}`,{method:"PUT",body:{is_enabled:w}})}}
5
5
  export{B as z,M as A,s0 as B,P as C,o0 as D,X as E,J0 as F,H1 as G,G1 as H,J1 as I,A0 as J};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{ni as e}from"./vm-hands-entry-lite-px64jhhn.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"}});
2
+ import{oi as e}from"./vm-hands-entry-lite-ah89nzd4.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 P};