@reason-machines/cli-linux-arm64-musl 0.2.367 → 0.2.368

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 (89) hide show
  1. package/bin/ara +1 -1
  2. package/bin/vm-hands/api-credentials-ke2v1y5k.js +2 -0
  3. package/bin/vm-hands/api-ewpnfn05.js +2 -0
  4. package/bin/vm-hands/{ask-relay-99s9r5qx.js → ask-relay-y5v8wyxy.js} +3 -3
  5. package/bin/vm-hands/connect-cli-nm7at96x.js +2 -0
  6. package/bin/vm-hands/{custom-endpoint-device-rzf5q89e.js → custom-endpoint-device-wmcf39x6.js} +1 -1
  7. package/bin/vm-hands/desktop-account-cppm1dhr.js +2 -0
  8. package/bin/vm-hands/{device-workspace-4zmq6vnb.js → device-workspace-05nkwrpp.js} +1 -1
  9. package/bin/vm-hands/{hands-worker-source-s2p9t76m.js → hands-worker-source-5wv1djgv.js} +1 -1
  10. package/bin/vm-hands/{index-s2jxdd91.js → index-kf4q2kw5.js} +1 -1
  11. package/bin/vm-hands/{install-receipt-z3jw7v66.js → install-receipt-vaytv1sf.js} +1 -1
  12. package/bin/vm-hands/local-automation-v5awrbbd.js +2 -0
  13. package/bin/vm-hands/local-capabilities-wxmrcn9w.js +2 -0
  14. package/bin/vm-hands/local-desktop-users-ejwwkfer.js +2 -0
  15. package/bin/vm-hands/local-display-mac-x0eq4rzq.js +2 -0
  16. package/bin/vm-hands/local-display-session-ezjk5ykh.js +2 -0
  17. package/bin/vm-hands/local-pty-session-pzg7bk32.js +2 -0
  18. package/bin/vm-hands/{managed-runtime-8yf32zv3.js → managed-runtime-tp3070ba.js} +1 -1
  19. package/bin/vm-hands/{network-contract-mtrzq59w.js → network-contract-zez17y8t.js} +1 -1
  20. package/bin/vm-hands/package-gxv23nam.js +2 -0
  21. package/bin/vm-hands/permissions-bc9v5k73.js +2 -0
  22. package/bin/vm-hands/{reason-hands-protocol-b8c4s9jx.js → reason-hands-protocol-dase3v7x.js} +1 -1
  23. package/bin/vm-hands/serve-service-ad0yqe2n.js +2 -0
  24. package/bin/vm-hands/{status-gwe4v7q7.js → status-gstpmc50.js} +2 -2
  25. package/bin/vm-hands/version-vn3a7967.js +2 -0
  26. package/bin/vm-hands/{vm-hands-entry-lite-qdb917g9.js → vm-hands-entry-lite-1gk31757.js} +2 -2
  27. package/bin/vm-hands/{vm-hands-entry-lite-0csqb5x1.js → vm-hands-entry-lite-2c88t2at.js} +2 -2
  28. package/bin/vm-hands/{vm-hands-entry-lite-4p6v05yh.js → vm-hands-entry-lite-2fyemnas.js} +2 -2
  29. package/bin/vm-hands/{vm-hands-entry-lite-d12rwjw1.js → vm-hands-entry-lite-2w18ysma.js} +1 -1
  30. package/bin/vm-hands/{vm-hands-entry-lite-1yn5vrs6.js → vm-hands-entry-lite-4nkcn8sy.js} +37 -37
  31. package/bin/vm-hands/{vm-hands-entry-lite-pp4mnye8.js → vm-hands-entry-lite-4s4qrm5m.js} +2 -2
  32. package/bin/vm-hands/{vm-hands-entry-lite-peqmq6j6.js → vm-hands-entry-lite-5zmn6a7p.js} +1 -1
  33. package/bin/vm-hands/{vm-hands-entry-lite-1c1rxx8v.js → vm-hands-entry-lite-7fx4xtf6.js} +1 -1
  34. package/bin/vm-hands/{vm-hands-entry-lite-10sgx6g1.js → vm-hands-entry-lite-8sddhaka.js} +1 -1
  35. package/bin/vm-hands/{vm-hands-entry-lite-0rwpp6hr.js → vm-hands-entry-lite-9fr904x2.js} +2 -2
  36. package/bin/vm-hands/{vm-hands-entry-lite-jmfb6mqq.js → vm-hands-entry-lite-b775ysr4.js} +1 -1
  37. package/bin/vm-hands/{vm-hands-entry-lite-zg9a3kv5.js → vm-hands-entry-lite-bt6esncn.js} +1 -1
  38. package/bin/vm-hands/{vm-hands-entry-lite-0q46m8na.js → vm-hands-entry-lite-d7y6aah1.js} +1 -1
  39. package/bin/vm-hands/{vm-hands-entry-lite-5jbnm3bm.js → vm-hands-entry-lite-db4z7ekz.js} +1 -1
  40. package/bin/vm-hands/{vm-hands-entry-lite-3ydgst12.js → vm-hands-entry-lite-dm52srp5.js} +2 -2
  41. package/bin/vm-hands/{vm-hands-entry-lite-khnx8tzk.js → vm-hands-entry-lite-dq1fdx0j.js} +1 -1
  42. package/bin/vm-hands/{vm-hands-entry-lite-6gtpyxz7.js → vm-hands-entry-lite-e8skq97c.js} +2 -2
  43. package/bin/vm-hands/{vm-hands-entry-lite-21856esq.js → vm-hands-entry-lite-ew42tvvz.js} +2 -2
  44. package/bin/vm-hands/{vm-hands-entry-lite-7cqmn2f8.js → vm-hands-entry-lite-fp51jz5j.js} +2 -2
  45. package/bin/vm-hands/{vm-hands-entry-lite-44f1pr87.js → vm-hands-entry-lite-g576hpce.js} +1 -1
  46. package/bin/vm-hands/{vm-hands-entry-lite-wry37am5.js → vm-hands-entry-lite-g9rvf5qk.js} +1 -1
  47. package/bin/vm-hands/{vm-hands-entry-lite-thskh018.js → vm-hands-entry-lite-gzyps3ev.js} +2 -2
  48. package/bin/vm-hands/{vm-hands-entry-lite-wej1p1ry.js → vm-hands-entry-lite-hh24bq0d.js} +1 -1
  49. package/bin/vm-hands/{vm-hands-entry-lite-cgh7q3ss.js → vm-hands-entry-lite-kxajkxmr.js} +2 -2
  50. package/bin/vm-hands/{vm-hands-entry-lite-gxjxx1r2.js → vm-hands-entry-lite-mcv6pse6.js} +1 -1
  51. package/bin/vm-hands/{vm-hands-entry-lite-59napxaf.js → vm-hands-entry-lite-me398z5a.js} +2 -2
  52. package/bin/vm-hands/{vm-hands-entry-lite-q01t7ykc.js → vm-hands-entry-lite-ngytzkx1.js} +2 -2
  53. package/bin/vm-hands/{vm-hands-entry-lite-je3n2wnb.js → vm-hands-entry-lite-nhfd61cx.js} +1 -1
  54. package/bin/vm-hands/{vm-hands-entry-lite-wmd391jw.js → vm-hands-entry-lite-pasmdmkj.js} +2 -2
  55. package/bin/vm-hands/{vm-hands-entry-lite-xy8xmzjw.js → vm-hands-entry-lite-pt633d84.js} +1 -1
  56. package/bin/vm-hands/vm-hands-entry-lite-q9gjfqev.js +52 -0
  57. package/bin/vm-hands/{vm-hands-entry-lite-f4gvypnx.js → vm-hands-entry-lite-rjwk6sfj.js} +1 -1
  58. package/bin/vm-hands/{vm-hands-entry-lite-5cmafbnh.js → vm-hands-entry-lite-s65swswr.js} +2 -2
  59. package/bin/vm-hands/{vm-hands-entry-lite-smhq7c4x.js → vm-hands-entry-lite-sfsgeynk.js} +1 -1
  60. package/bin/vm-hands/{vm-hands-entry-lite-ht2k3g94.js → vm-hands-entry-lite-vygp7vq8.js} +2 -2
  61. package/bin/vm-hands/{vm-hands-entry-lite-6hcx1k08.js → vm-hands-entry-lite-w4swepp1.js} +2 -2
  62. package/bin/vm-hands/{vm-hands-entry-lite-c4mk1cwv.js → vm-hands-entry-lite-w81kt3sf.js} +1 -1
  63. package/bin/vm-hands/{vm-hands-entry-lite-dyyhxg5m.js → vm-hands-entry-lite-x9pmwqjd.js} +2 -2
  64. package/bin/vm-hands/{vm-hands-entry-lite-d2pbd9ky.js → vm-hands-entry-lite-y3wncwjd.js} +1 -1
  65. package/bin/vm-hands/{vm-hands-entry-lite-mq8bw5c9.js → vm-hands-entry-lite-y9wkxydj.js} +2 -2
  66. package/bin/vm-hands/{vm-hands-entry-lite-p30699xy.js → vm-hands-entry-lite-zmf1terc.js} +2 -2
  67. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  68. package/bin/vm-hands/{vm-hands-executor-frexe1jn.js → vm-hands-executor-n24f7xm4.js} +1 -1
  69. package/bin/vm-hands/vm-hands-op-runner-gep65pf2.js +2 -0
  70. package/bin/vm-hands/{vm-hands-runtime-90my200c.js → vm-hands-runtime-9y7gd6hx.js} +3 -3
  71. package/bin/vm-hands/worker-sandbox-e4kvy715.js +2 -0
  72. package/package.json +1 -1
  73. package/bin/vm-hands/api-credentials-5phwd017.js +0 -2
  74. package/bin/vm-hands/api-v98h8tbt.js +0 -2
  75. package/bin/vm-hands/connect-cli-9ef3cz0p.js +0 -2
  76. package/bin/vm-hands/desktop-account-2dtsbtf1.js +0 -2
  77. package/bin/vm-hands/local-automation-kykn3t5n.js +0 -2
  78. package/bin/vm-hands/local-capabilities-emphypye.js +0 -2
  79. package/bin/vm-hands/local-desktop-users-4nz6kmyw.js +0 -2
  80. package/bin/vm-hands/local-display-mac-v9ev5jg4.js +0 -2
  81. package/bin/vm-hands/local-display-session-bgmnyfdn.js +0 -2
  82. package/bin/vm-hands/local-pty-session-c394saph.js +0 -2
  83. package/bin/vm-hands/package-08dpakav.js +0 -2
  84. package/bin/vm-hands/permissions-b8k7me17.js +0 -2
  85. package/bin/vm-hands/serve-service-mqkz53dh.js +0 -2
  86. package/bin/vm-hands/version-bgxwc0n4.js +0 -2
  87. package/bin/vm-hands/vm-hands-entry-lite-4zg490k6.js +0 -37
  88. package/bin/vm-hands/vm-hands-op-runner-aekwp51s.js +0 -2
  89. package/bin/vm-hands/worker-sandbox-bjwykp0q.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: 98545528 bytes
4
- sha256: 4b34218c8cd24135c7255f34aa5d21791f6403d84e02278e6fe5748aba920019
4
+ sha256: ecd385f13ff6276d9d9173fb924028b8b79fc12701d685f6b5ec95ed79d09b8a
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{v as a,w as b,x as c,y as d,z as e}from"./vm-hands-entry-lite-bt6esncn.js";import"./vm-hands-entry-lite-8sddhaka.js";import"./vm-hands-entry-lite-sfsgeynk.js";import"./vm-hands-entry-lite-g9rvf5qk.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{d as resolveApiCredentials,e as requireApiCredentials,b as explicitApiOrigin,c as environmentApiKey,a as apiOriginFromEnvironment};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{F as a,G as b,H as c,I as d,J as e,K as f}from"./vm-hands-entry-lite-8sddhaka.js";import"./vm-hands-entry-lite-sfsgeynk.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{d as sessionPlace,c as sessionMachine,e as createMachineEnrollmentTicketWithToken,f as ReasonApi,b as REASONING_EFFORTS,a as ApiError};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import{va as u}from"./vm-hands-entry-lite-smhq7c4x.js";import{sj as g}from"./vm-hands-entry-lite-21856esq.js";import"./vm-hands-entry-lite-59napxaf.js";import"./vm-hands-entry-lite-p30699xy.js";import{dk as M}from"./vm-hands-entry-lite-1c1rxx8v.js";import{existsSync as uq,mkdirSync as gq,readFileSync as Nq,writeFileSync as wq}from"fs";import{homedir as Yq}from"os";import{dirname as e,join as hq}from"path";import{spawnSync as G}from"child_process";import{createHash as Qq}from"crypto";import{chmodSync as Bq,closeSync as Kq,existsSync as U,lstatSync as Jq,mkdirSync as c,mkdtempSync as Lq,openSync as Dq,readFileSync as Wq,readSync as Hq,renameSync as p,rmSync as b,statSync as s,symlinkSync as Cq,writeFileSync as a}from"fs";import{connect as Fq}from"net";import{homedir as V}from"os";import{dirname as S,join as J}from"path";class C extends Error{}var F="reason-network",H="0.10.3",Vq={"aarch64-apple-darwin":"1e793a89ea8b53c603cddbc65ac08b0dd83f1dbfc30a1987858e2c52e2ed907c","x86_64-apple-darwin":"ef1f0f8d7d9e8a286de54eeb78f8ff8a53152c1a661c50b6182bfefa8eef8a02","aarch64-unknown-linux-musl":"75fdfd10314225ffb2875acc7ac73c66de23b5678b684d70b4678eb16ba35124","x86_64-unknown-linux-musl":"17111a623396eed0a2d98aa4d3bb03f00da37c25bdc39b6d0ba3ab202dfbe874"},xq="https://reasonmachines.com/cli/engine",P="REASON_AGENT_NETWORK_BIN";function Gq(){let q=process.arch==="arm64"?"aarch64":process.arch==="x64"?"x86_64":null,z=process.platform==="darwin"?"apple-darwin":process.platform==="linux"?"unknown-linux-musl":null;return q&&z?`${q}-${z}`:null}function N(q){let z=G(q,["--version"],{encoding:"utf8",timeout:5000}),[X,Y]=z.status===0?z.stdout.trim().split(/\s+/):[];return X===F?Y??null:null}function _(q,z){let X=q.split(".").map(Number),Y=z.split(".").map(Number);for(let Z=0;Z<3;Z+=1)if((X[Z]??0)!==(Y[Z]??0))return(X[Z]??0)>(Y[Z]??0);return!0}function v(q=V()){return J(q,".reason","bin","reason-network")}var j=`~/.local/bin/${F}`;async function Uq(q=process.env,z=()=>{}){if(q[P])return q[P];let X=v(),Y=t(),Z=Y?.path===X&&f(X)===Y.fingerprint?Y:null,Q=Z?.kept,$=h(q)?null:Mq(Q);if(Z?.version===H&&!$)return X;let B=U(X)?N(X):null;if($){let K=N($.path),L=B&&_(B,H)?B:H;if(!K||!_(L,K)){if(K)z(`Reason Network: ${j} (${K}) is newer than the engine reason network uses (${L}), so it was left as it is.`);Q=$.fingerprint,$=null}}if(Z?.version===H&&!$)return d(X,Q);if(!B||!_(B,H))await jq(X);let D=G(X,["setup",...h(q)?["--no-service"]:[]],{env:await i(q),encoding:"utf8",timeout:60000});if(D.status!==0){let K=O((D.stderr||D.stdout||"").trim().split(`
3
- `).pop()??"");if(Z)return r(V(),{...Z,fingerprint:f(X)??Z.fingerprint,...Q?{kept:Q}:{}}),z($?`Reason Network: couldn't move your agents off ${j}${K?` (${K})`:""}; they keep using it. Run reason network setup to try again.`:`Reason Network: couldn't finish setting up the network engine${K?` (${K})`:""}. Run reason network setup to try again.`),X;throw new C(`Couldn't connect this computer's agents to the network${K?` (${K})`:""}. Run reason network setup to try again.`)}if($)Q=Pq($,X,z);return d(X,Q),G(X,["stop"],{env:q,stdio:"ignore",timeout:15000}),X}function Mq(q){let z=J(V(),".local","bin",F),X;try{X=Jq(z)}catch{return null}let Y=`${X.size}:${X.mtimeMs}:${X.ino}`;if(!X.isFile()||Y===q)return null;try{let Z=s(v());if(Z.ino===X.ino&&Z.dev===X.dev)return null}catch{}try{let Z=Buffer.alloc(2),Q=Dq(z,"r");try{Hq(Q,Z,0,2,0)}finally{Kq(Q)}if(Z.toString("latin1")==="#!")return null}catch{return null}return{path:z,fingerprint:Y}}function Pq(q,z,X){let Y=`${q.path}.reason-${process.pid}`;try{b(Y,{force:!0}),Cq(z,Y),p(Y,q.path),X(`Reason Network: your agents now use the engine reason network keeps up to date; ${j} points to it. Restart a running agent to pick it up.`);return}catch(Z){return b(Y,{force:!0}),X(`Reason Network: your agents now use the engine reason network keeps up to date, but ${j} couldn't be pointed to it (${Z instanceof Error?Z.message:String(Z)}). Remove that copy so it can't take them back.`),q.fingerprint}}async function i(q){if(q[w])return q;try{let{defaultWorkerServiceHost:z,workerServiceLauncher:X}=await import("./serve-service-mqkz53dh.js");return{...q,[w]:X(z(V()),q)}}catch{return q}}var w="REASON_NETWORK_REASON_BIN";function h(q=process.env){return Boolean(q.REASON_NETWORK_NO_SERVICE||q.TINCAN_NO_SERVICE)}var y=(q)=>J(q,".reason","ask-engine.json");function f(q){try{let z=s(q);return`${z.size}:${z.mtimeMs}:${z.ino}`}catch{return null}}function t(q=V()){try{let z=JSON.parse(Wq(y(q),"utf8"));if(typeof z.path!=="string"||typeof z.fingerprint!=="string"||typeof z.version!=="string")return null;return{path:z.path,fingerprint:z.fingerprint,version:z.version,...typeof z.kept==="string"?{kept:z.kept}:{}}}catch{return null}}function r(q,z){c(S(y(q)),{recursive:!0}),a(y(q),JSON.stringify(z))}function d(q,z){let X=f(q);if(X)r(V(),{path:q,fingerprint:X,version:H,...z?{kept:z}:{}});return q}async function jq(q){let z=Gq(),X=z?Vq[z]:void 0;if(!z||!X)throw new C(`Reason Network runs on macOS and Linux (arm64 or x64); this is ${process.platform} ${process.arch}.`);let Y=`${xq}/${H}/${F}-${z}.tar.gz`,Z;try{let B=await fetch(Y,{signal:AbortSignal.timeout(120000)});if(!B.ok)throw Error(`HTTP ${B.status}`);Z=Buffer.from(await B.arrayBuffer())}catch(B){let D=B instanceof Error&&B.name==="TimeoutError"?"no download within 2 minutes":B instanceof Error?B.message.replace(/\.$/,""):String(B);throw new C(`Couldn't download the network engine from ${new URL(Y).host} (${D}). Check the connection and run reason network again.`)}if(Qq("sha256").update(Z).digest("hex")!==X)throw new C("The downloaded network engine didn't match its checksum, so it wasn't installed.");c(S(q),{recursive:!0});let $=Lq(J(S(q),".reason-engine-"));try{if(a(J($,"engine.tar.gz"),Z),G("tar",["-xzf",J($,"engine.tar.gz"),"-C",$]).status!==0||!U(J($,F)))throw new C("Couldn't unpack the network engine.");Bq(J($,F),493),p(J($,F),q)}finally{b($,{recursive:!0,force:!0})}}function fq(q=process.env,z=V()){let X=q.REASON_NETWORK_HOME?.trim()||q.TINCAN_HOME?.trim();if(X)return X;let Y=J(z,".reason","network"),Z=J(z,".tincan");return!k(Y)&&k(Z)?Z:Y}var k=(q)=>U(J(q,"network.db"))||U(J(q,"tincan.db"));function Tq(q){let z=U(J(q,"network.db"))||!U(J(q,"tincan.db")),X=J(q,z?"network.sock":"tincan.sock");if(Buffer.byteLength(X)<100)return X;let Y=0xcbf29ce484222325n;for(let Z of Buffer.from(X))Y=BigInt.asUintN(64,(Y^BigInt(Z))*0x100000001b3n);return J("/tmp",`${z?"reason-network":"tincan"}-${process.getuid?.()??0}`,`${Y.toString(16).padStart(16,"0")}.sock`)}var o=15000,Oq=new Set(["who","team","inbox","unread","held"]),Rq=90000,Iq="the network daemon closed the connection";class T{socket;nextId=1;buffer="";pending=new Map;closed=null;hungUp=!1;constructor(q){this.socket=q;q.setEncoding("utf8"),q.on("data",(X)=>this.read(X));let z=(X)=>{this.closed=X;for(let Y of this.pending.values())Y.reject(X);this.pending.clear()};q.on("error",(X)=>z(X)),q.on("close",()=>z(Error(this.hungUp?"the connection to the network daemon was closed here":Iq)))}static open(q){return new Promise((z,X)=>{let Y=Fq(q);Y.once("connect",()=>z(new T(Y))),Y.once("error",X)})}read(q){this.buffer+=q;let z=this.buffer.indexOf(`
2
+ import{va as u}from"./vm-hands-entry-lite-sfsgeynk.js";import{uj as g}from"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-zmf1terc.js";import{fk as M}from"./vm-hands-entry-lite-7fx4xtf6.js";import{existsSync as uq,mkdirSync as gq,readFileSync as Nq,writeFileSync as wq}from"fs";import{homedir as Yq}from"os";import{dirname as e,join as hq}from"path";import{spawnSync as G}from"child_process";import{createHash as Qq}from"crypto";import{chmodSync as Bq,closeSync as Kq,existsSync as U,lstatSync as Jq,mkdirSync as c,mkdtempSync as Lq,openSync as Dq,readFileSync as Wq,readSync as Hq,renameSync as p,rmSync as b,statSync as s,symlinkSync as Cq,writeFileSync as a}from"fs";import{connect as Fq}from"net";import{homedir as V}from"os";import{dirname as S,join as J}from"path";class C extends Error{}var F="reason-network",H="0.10.3",Vq={"aarch64-apple-darwin":"1e793a89ea8b53c603cddbc65ac08b0dd83f1dbfc30a1987858e2c52e2ed907c","x86_64-apple-darwin":"ef1f0f8d7d9e8a286de54eeb78f8ff8a53152c1a661c50b6182bfefa8eef8a02","aarch64-unknown-linux-musl":"75fdfd10314225ffb2875acc7ac73c66de23b5678b684d70b4678eb16ba35124","x86_64-unknown-linux-musl":"17111a623396eed0a2d98aa4d3bb03f00da37c25bdc39b6d0ba3ab202dfbe874"},xq="https://reasonmachines.com/cli/engine",P="REASON_AGENT_NETWORK_BIN";function Gq(){let q=process.arch==="arm64"?"aarch64":process.arch==="x64"?"x86_64":null,z=process.platform==="darwin"?"apple-darwin":process.platform==="linux"?"unknown-linux-musl":null;return q&&z?`${q}-${z}`:null}function N(q){let z=G(q,["--version"],{encoding:"utf8",timeout:5000}),[X,Y]=z.status===0?z.stdout.trim().split(/\s+/):[];return X===F?Y??null:null}function _(q,z){let X=q.split(".").map(Number),Y=z.split(".").map(Number);for(let Z=0;Z<3;Z+=1)if((X[Z]??0)!==(Y[Z]??0))return(X[Z]??0)>(Y[Z]??0);return!0}function v(q=V()){return J(q,".reason","bin","reason-network")}var j=`~/.local/bin/${F}`;async function Uq(q=process.env,z=()=>{}){if(q[P])return q[P];let X=v(),Y=t(),Z=Y?.path===X&&f(X)===Y.fingerprint?Y:null,Q=Z?.kept,$=h(q)?null:Mq(Q);if(Z?.version===H&&!$)return X;let B=U(X)?N(X):null;if($){let K=N($.path),L=B&&_(B,H)?B:H;if(!K||!_(L,K)){if(K)z(`Reason Network: ${j} (${K}) is newer than the engine reason network uses (${L}), so it was left as it is.`);Q=$.fingerprint,$=null}}if(Z?.version===H&&!$)return d(X,Q);if(!B||!_(B,H))await jq(X);let D=G(X,["setup",...h(q)?["--no-service"]:[]],{env:await i(q),encoding:"utf8",timeout:60000});if(D.status!==0){let K=O((D.stderr||D.stdout||"").trim().split(`
3
+ `).pop()??"");if(Z)return r(V(),{...Z,fingerprint:f(X)??Z.fingerprint,...Q?{kept:Q}:{}}),z($?`Reason Network: couldn't move your agents off ${j}${K?` (${K})`:""}; they keep using it. Run reason network setup to try again.`:`Reason Network: couldn't finish setting up the network engine${K?` (${K})`:""}. Run reason network setup to try again.`),X;throw new C(`Couldn't connect this computer's agents to the network${K?` (${K})`:""}. Run reason network setup to try again.`)}if($)Q=Pq($,X,z);return d(X,Q),G(X,["stop"],{env:q,stdio:"ignore",timeout:15000}),X}function Mq(q){let z=J(V(),".local","bin",F),X;try{X=Jq(z)}catch{return null}let Y=`${X.size}:${X.mtimeMs}:${X.ino}`;if(!X.isFile()||Y===q)return null;try{let Z=s(v());if(Z.ino===X.ino&&Z.dev===X.dev)return null}catch{}try{let Z=Buffer.alloc(2),Q=Dq(z,"r");try{Hq(Q,Z,0,2,0)}finally{Kq(Q)}if(Z.toString("latin1")==="#!")return null}catch{return null}return{path:z,fingerprint:Y}}function Pq(q,z,X){let Y=`${q.path}.reason-${process.pid}`;try{b(Y,{force:!0}),Cq(z,Y),p(Y,q.path),X(`Reason Network: your agents now use the engine reason network keeps up to date; ${j} points to it. Restart a running agent to pick it up.`);return}catch(Z){return b(Y,{force:!0}),X(`Reason Network: your agents now use the engine reason network keeps up to date, but ${j} couldn't be pointed to it (${Z instanceof Error?Z.message:String(Z)}). Remove that copy so it can't take them back.`),q.fingerprint}}async function i(q){if(q[w])return q;try{let{defaultWorkerServiceHost:z,workerServiceLauncher:X}=await import("./serve-service-ad0yqe2n.js");return{...q,[w]:X(z(V()),q)}}catch{return q}}var w="REASON_NETWORK_REASON_BIN";function h(q=process.env){return Boolean(q.REASON_NETWORK_NO_SERVICE||q.TINCAN_NO_SERVICE)}var y=(q)=>J(q,".reason","ask-engine.json");function f(q){try{let z=s(q);return`${z.size}:${z.mtimeMs}:${z.ino}`}catch{return null}}function t(q=V()){try{let z=JSON.parse(Wq(y(q),"utf8"));if(typeof z.path!=="string"||typeof z.fingerprint!=="string"||typeof z.version!=="string")return null;return{path:z.path,fingerprint:z.fingerprint,version:z.version,...typeof z.kept==="string"?{kept:z.kept}:{}}}catch{return null}}function r(q,z){c(S(y(q)),{recursive:!0}),a(y(q),JSON.stringify(z))}function d(q,z){let X=f(q);if(X)r(V(),{path:q,fingerprint:X,version:H,...z?{kept:z}:{}});return q}async function jq(q){let z=Gq(),X=z?Vq[z]:void 0;if(!z||!X)throw new C(`Reason Network runs on macOS and Linux (arm64 or x64); this is ${process.platform} ${process.arch}.`);let Y=`${xq}/${H}/${F}-${z}.tar.gz`,Z;try{let B=await fetch(Y,{signal:AbortSignal.timeout(120000)});if(!B.ok)throw Error(`HTTP ${B.status}`);Z=Buffer.from(await B.arrayBuffer())}catch(B){let D=B instanceof Error&&B.name==="TimeoutError"?"no download within 2 minutes":B instanceof Error?B.message.replace(/\.$/,""):String(B);throw new C(`Couldn't download the network engine from ${new URL(Y).host} (${D}). Check the connection and run reason network again.`)}if(Qq("sha256").update(Z).digest("hex")!==X)throw new C("The downloaded network engine didn't match its checksum, so it wasn't installed.");c(S(q),{recursive:!0});let $=Lq(J(S(q),".reason-engine-"));try{if(a(J($,"engine.tar.gz"),Z),G("tar",["-xzf",J($,"engine.tar.gz"),"-C",$]).status!==0||!U(J($,F)))throw new C("Couldn't unpack the network engine.");Bq(J($,F),493),p(J($,F),q)}finally{b($,{recursive:!0,force:!0})}}function fq(q=process.env,z=V()){let X=q.REASON_NETWORK_HOME?.trim()||q.TINCAN_HOME?.trim();if(X)return X;let Y=J(z,".reason","network"),Z=J(z,".tincan");return!k(Y)&&k(Z)?Z:Y}var k=(q)=>U(J(q,"network.db"))||U(J(q,"tincan.db"));function Tq(q){let z=U(J(q,"network.db"))||!U(J(q,"tincan.db")),X=J(q,z?"network.sock":"tincan.sock");if(Buffer.byteLength(X)<100)return X;let Y=0xcbf29ce484222325n;for(let Z of Buffer.from(X))Y=BigInt.asUintN(64,(Y^BigInt(Z))*0x100000001b3n);return J("/tmp",`${z?"reason-network":"tincan"}-${process.getuid?.()??0}`,`${Y.toString(16).padStart(16,"0")}.sock`)}var o=15000,Oq=new Set(["who","team","inbox","unread","held"]),Rq=90000,Iq="the network daemon closed the connection";class T{socket;nextId=1;buffer="";pending=new Map;closed=null;hungUp=!1;constructor(q){this.socket=q;q.setEncoding("utf8"),q.on("data",(X)=>this.read(X));let z=(X)=>{this.closed=X;for(let Y of this.pending.values())Y.reject(X);this.pending.clear()};q.on("error",(X)=>z(X)),q.on("close",()=>z(Error(this.hungUp?"the connection to the network daemon was closed here":Iq)))}static open(q){return new Promise((z,X)=>{let Y=Fq(q);Y.once("connect",()=>z(new T(Y))),Y.once("error",X)})}read(q){this.buffer+=q;let z=this.buffer.indexOf(`
4
4
  `);while(z>=0){let X=this.buffer.slice(0,z);if(this.buffer=this.buffer.slice(z+1),z=this.buffer.indexOf(`
5
5
  `),!X.trim())continue;let Y;try{Y=JSON.parse(X)}catch{continue}if(typeof Y.id!=="number")continue;let Z=this.pending.get(Y.id);if(!Z)continue;if(this.pending.delete(Y.id),Y.ok)Z.resolve(Y.result);else Z.reject(Error(O(Y.error??"the network daemon refused the request")))}}call(q,z={},X=o){if(this.closed)return Promise.reject(this.closed);let Y=this.nextId++;return this.socket.write(`${JSON.stringify({id:Y,op:q,...z})}
6
6
  `),new Promise((Z,Q)=>{let $=setTimeout(()=>{this.pending.delete(Y),Q(Error(`the network daemon didn't answer ${q} within ${Math.round(X/1000)}s`))},X);this.pending.set(Y,{resolve:(B)=>{clearTimeout($),Z(B)},reject:(B)=>{clearTimeout($),Q(B)}})})}get isClosed(){return this.closed!==null}close(){this.hungUp=!0,this.socket.end()}}var A=/^(Claude Code|Grok|Codex) \u00B7 (.*)$/,_q={"Claude Code":"claude-code",Grok:"grok",Codex:"codex"},Aq=/^ask-[0-9a-f]{6}$/;function l(q){return{id:q.id,from:q.from,fromAgent:q.from_agent,to:q.to,replyTo:q.reply_to,body:q.body,sentAt:q.sent_at}}function m(q){return{person:q.person,machine:q.machine,isMe:q.is_me,online:q.online,link:q.link,rttMs:q.rtt_ms}}class x{engine;env;connection=null;waits=new Set;constructor(q,z){this.engine=q;this.env=z}static async open(q=process.env,z){return new x(await Uq(q,z),q)}static openInstalled(q=process.env){if(q[P])return new x(q[P],q);let z=v(),X=t();return X?.path===z&&f(z)===X.fingerprint?new x(z,q):null}socketPath(){return Tq(fq(this.env))}async open(){try{return await T.open(this.socketPath())}catch{return G(this.engine,["who","--json"],{env:this.env,stdio:"ignore",timeout:15000}),await T.open(this.socketPath())}}async call(q,z={},X){if(!this.connection||this.connection.isClosed)this.connection=await this.open();try{return await this.connection.call(q,z,X)}catch(Y){if(!/closed|ECONNRESET|EPIPE/.test(String(Y)))throw Y;if(this.connection=await this.open(),!Oq.has(q))throw Y;return await this.connection.call(q,z)}}async waitOn(q,z){let X=await this.open();this.waits.add(X);try{return await X.call(q,z,z.wait_secs*1000+o)}finally{this.waits.delete(X),X.close()}}close(){this.connection?.close(),this.connection=null;for(let q of this.waits)q.close();this.waits.clear()}async team(){try{let q=await this.call("team");return{...q,machines:q.machines.map(m)}}catch(q){if(/team/i.test(String(q)))return null;throw q}}async snapshot(q={}){let z=await this.call("who",{all:Boolean(q.all),...q.filter?{filter:q.filter}:{}}),X=new Set(z.sessions.filter((Z)=>A.test(Z.doing??"")).map((Z)=>`${Z.person}/${Z.machine}:${Z.cwd}`)),Y=z.sessions.filter((Z)=>q.all||!Aq.test(Z.name)).filter((Z)=>A.test(Z.doing??"")||!X.has(`${Z.person}/${Z.machine}:${Z.cwd}`)).map((Z)=>{let Q=A.exec(Z.doing??"");return{address:Z.address,name:Z.name,person:Z.person,machine:Z.machine,agent:Q?_q[Q[1]]:Z.agent,cwd:Z.cwd,repo:Z.repo,branch:Z.branch,status:Q?Q[2]==="ready for work"?"idle":Q[2]==="stopped"?"offline":"busy":Z.status,since:Z.since,doing:Q?Q[2]:Z.doing,isMe:Z.is_me,worker:Boolean(Q),tier:Z.tier??null}});return{team:z.team,person:z.person,machine:z.machine,machines:z.machines.map(m),sessions:Y}}async send(q,z,X={}){if(!X.from)await this.call("hook",{agent:"cli",event:"stop",session_id:"terminal",name:"terminal",cwd:process.cwd(),mail:!1});let Y=await this.call("send",{from:X.from??"terminal",to:q,body:z,...X.replyTo?{reply_to:X.replyTo}:{},wake:X.wake??!0,...X.notify?{notify:!0}:{}});return{ids:Y.ids,recipients:Y.recipients.map((Z)=>Z.address),deliveries:Y.recipients.map((Z)=>({address:Z.address,state:Z.state,note:Z.note??""}))}}async session(q,z={}){let X=z.agent??"cli",Y=($,B={})=>this.call("hook",{agent:X,event:$,session_id:q,name:q,cwd:process.cwd(),mail:!1,...B}),Z=await Y("stop"),Q=`${X}:${q}`;return{name:q,address:Z.address??q,next:async($)=>{return(await this.waitOn("inbox",{key:Q,wait_secs:$,peek:!0})).messages.map(l)},ack:async($)=>{if($.length)await this.call("delivered",{key:Q,ids:$})},busy:async($)=>{if(await Y("prompt"),$)await Y("doing",{doing:$})},idle:async($)=>{if(await Y("stop"),$)await Y("doing",{doing:$})},doing:async($)=>{await Y("doing",{doing:$})},send:($,B,D,K)=>this.send($,B,{from:Q,...D?{replyTo:D}:{},...K?.notify?{notify:!0}:{}})}}async inbox(q={}){let X=(await this.waitOn("inbox",{key:"cli:terminal",wait_secs:q.waitSeconds??0,peek:!0}).catch((Y)=>{if(/isn't registered/.test(String(Y)))return{messages:[]};throw Y})).messages.map(l);if(X.length&&!q.peek)await this.call("delivered",{key:"cli:terminal",ids:X.map((Y)=>Y.id)});return X}async link(q={}){return await this.call("link",{new:Boolean(q.new)})}async changeTeam(q,z){try{return await this.call(q,z,Rq)}finally{this.close()}}async changeOntoTeam(q,z){try{await this.changeTeam(q,z)}catch(X){if(!/closed|ECONNRESET|EPIPE/.test(String(X)))throw X;if(await this.team())return;await this.changeTeam(q,z)}}async createTeam(q,z){await this.changeOntoTeam("create_team",{name:q,person:z})}async join(q,z){await this.changeOntoTeam("join",{ticket:q,person:z})}async leave(){return await this.changeTeam("leave",{force:!0})}async remove(q){return await this.call("remove",{who:q})}async setup(q,z={}){return this.passthrough(["setup",...q],z,await i(this.env))}passthrough(q,z={},X=this.env){this.close();let Y=G(this.engine,q,{stdio:["inherit","pipe","pipe"],encoding:"utf8",env:X});if(!z.quiet||Y.status!==0)process.stdout.write(O(Y.stdout??"")),process.stderr.write(O(Y.stderr??""));return Y.status??1}}function O(q){return q.replace(/not in a team yet:[^\n]*/g,"this computer isn't on a team yet: run `reason network setup`").replace(/`tincan (\w+)/g,"`reason network $1").replace(/\btincan (who|send|inbox|invite|join|team|link|setup|doctor|remove|leave|listen)\b/g,"reason network $1").replace(/(?<![\w./-])tincan(?![\w./-])/gi,"Reason Network")}import{existsSync as Jz,mkdirSync as Lz,readFileSync as bq,writeFileSync as Dz}from"fs";import{homedir as Sq,hostname as Hz}from"os";import{dirname as Fz,join as yq}from"path";var vq=(q)=>yq(q,".reason","ask.json");function Eq(q){try{let z=JSON.parse(bq(vq(q),"utf8"));if(typeof z.orgId!=="string"||typeof z.team!=="string")return null;let X=z.pendingRotation;return{orgId:z.orgId,team:z.team,...typeof z.checkedAt==="number"?{checkedAt:z.checkedAt}:{},...X&&typeof X.link==="string"&&typeof X.team==="string"&&typeof X.replaces==="string"?{pendingRotation:X}:{}}}catch{return null}}function n(q=Sq()){let z=Eq(q);return z?{orgId:z.orgId,team:z.team}:null}var qq=86400000,dq=300,R=(q)=>hq(q,".reason","ask-relay.json");function E(q){try{let z=JSON.parse(Nq(R(q),"utf8"));return{sessions:Array.isArray(z.sessions)?z.sessions.filter((X)=>typeof X?.name==="string"&&typeof X.agent==="string"&&typeof X.usedAt==="number"):[]}}catch{return{sessions:[]}}}function kq(q,z){try{if(!uq(e(R(q))))gq(e(R(q)),{recursive:!0});wq(R(q),`${JSON.stringify(z)}
7
7
  `,{mode:384})}catch{}}var W=(q,z)=>new Promise((X)=>{if(z.aborted)return X();let Y=setTimeout(Z,q);Y.unref?.();function Z(){clearTimeout(Y),z.removeEventListener("abort",Z),X()}z.addEventListener("abort",Z,{once:!0})});function zq(q){let z=q?.status;return typeof z==="number"?z:null}var Xq=60000;function lq(q){return{address:q.address.slice(0,300),state:q.state.slice(0,40),note:q.note.slice(0,500)}}function mq(q){let z=Number.isFinite(q.sentAt)&&Math.abs(q.sentAt)<8640000000000000?q.sentAt:Date.now();return{id:q.id.slice(0,100),from:q.from.slice(0,300),from_agent:q.fromAgent?.slice(0,100)??null,to:q.to.slice(0,300),reply_to:q.replyTo?.slice(0,100)??null,sent_at:z,body:q.body.length>Xq?`${q.body.slice(0,Xq)}
8
- [cut: the answer was ${q.body.length} characters]`:q.body}}class Zq{network;api;home;signal;log;team;sessions=new Map;readers=new Set;constructor(q,z,X,Y,Z,Q){this.network=q;this.api=z;this.home=X;this.signal=Y;this.log=Z;this.team=Q}async run(){let q=Date.now()-qq;for(let X of E(this.home).sessions)if(X.usedAt>q)this.read(X);let z=0;while(!this.signal.aborted){let X=await this.network.team().catch(()=>null);if(!X){await W(60000,this.signal);continue}if(X.name!==this.team)return;let Y;try{let Z=await this.api.claimAgentNetworkRelayJob({machine:X.machine,person:X.person,team:X.name,version:g,wait_seconds:u},AbortSignal.any([this.signal,AbortSignal.timeout((u+20)*1000)]));if(z=0,Z.retry_after_seconds)await W(Z.retry_after_seconds*1000,this.signal);Y=Z.job}catch(Z){if(this.signal.aborted)return;let Q=zq(Z);if(Q===403||Q===401){await W(900000,this.signal);continue}if(Q===404||Q===405){await W(120000,this.signal);continue}z+=1,await W(Math.min(60000,1000*2**Math.min(z,6)),this.signal);continue}if(Y)this.carry(Y)}}async carry(q){let z;try{z=q.kind==="who"?{who:await this.who(q)}:{sent:await this.send(q)}}catch(X){z={error:X instanceof Error?X.message:String(X)}}for(let X=1;;X+=1)try{if(await this.api.completeAgentNetworkRelayJob(q.id,z),q.kind==="send")this.log(`relayed a message to ${q.to} from ${"sent"in z?z.sent.from:q.from_name}`,"relayed");return}catch(Y){if(X>=4||this.signal.aborted){this.log(`couldn't report a relayed call: ${Y instanceof Error?Y.message:String(Y)}`);return}await W(X*1000,this.signal)}}async who(q){let z=q.all===!0,X=await this.network.snapshot({all:z});return{all:z,team:X.team,sessions:X.sessions.map((Y)=>({address:Y.address,person:Y.person,machine:Y.machine,agent:Y.agent,repo:Y.repo,branch:Y.branch,status:Y.status,since:Y.since,doing:Y.doing,worker:Y.worker,...Y.tier?{tier:Y.tier.slice(0,10)}:{}})),machines:X.machines.map((Y)=>({person:Y.person,machine:Y.machine,online:Y.online}))}}async send(q){let z={name:q.from_name,agent:q.from_agent},X=await this.session(z),Y=await X.send(q.to,q.body,q.reply_to,{notify:q.notify===!0});return this.remember(z),this.read(z),{ids:Y.ids,recipients:Y.recipients,from:X.address,deliveries:Y.deliveries.slice(0,500).map(lq)}}session(q){let z=`${q.agent}:${q.name}`,X=this.sessions.get(z);if(!X)X=this.network.session(q.name,{agent:q.agent}).then(async(Y)=>{return await Y.idle(`personal agent (${q.agent}), through Reason`).catch(()=>{}),Y}),X.catch(()=>this.sessions.delete(z)),this.sessions.set(z,X);return X}remember(q){let X=E(this.home).sessions.filter((Y)=>Y.name!==q.name||Y.agent!==q.agent);kq(this.home,{sessions:[...X,{...q,usedAt:Date.now()}].slice(-50)})}read(q){let z=`${q.agent}:${q.name}`;if(this.readers.has(z))return;this.readers.add(z),(async()=>{let X=0;try{while(!this.signal.aborted){let Y=E(this.home).sessions.find((Z)=>Z.name===q.name&&Z.agent===q.agent)?.usedAt??0;if(Date.now()-Y>qq)return;try{let Z=await this.session(q),Q=await Z.next(dq);if(Q.length===0)continue;await this.api.recordAgentNetworkRelayReplies(Q.map(mq)).catch(($)=>{let B=zq($);if(B===null||B>=500||B===429||B===401)throw $;this.log(`dropped ${Q.length} answer(s) the server refused (HTTP ${B})`)}),await Z.ack(Q.map(($)=>$.id)),X=0}catch{if(this.signal.aborted)return;this.sessions.delete(z),X+=1,await W(Math.min(60000,1000*2**Math.min(X,6)),this.signal)}}}finally{this.readers.delete(z)}})()}}async function cq(q){await new Zq(q.network,q.api,q.home??Yq(),q.signal,q.log??(()=>{}),q.team).run()}async function pq(q,z=()=>{}){let X="";while(!q.aborted){try{let Y=n(),Z=Y?x.openInstalled():null;if(Y&&Z){let[{requireApiCredentials:Q},{ReasonApi:$}]=await Promise.all([import("./api-credentials-5phwd017.js"),import("./api-v98h8tbt.js")]),B=await Q({});if(B.credentialKind!=="api_key"&&B.orgId.toLowerCase()===Y.orgId.toLowerCase())try{await cq({network:Z,api:new $(B),team:Y.team,signal:q,log:z})}finally{Z.close()}}X=""}catch(Y){let Z=`agent network relay: ${Y instanceof Error?Y.message:String(Y)}`;if(Z!==X)z(Z);X=Z}await W(300000,q)}}var sq=600000,aq=3600000,iq=180000;async function Rz(q,z,X={}){let Y=-1/0,Z="",Q=(L,$q)=>{let I=Date.now();if($q==="relayed"||I-Y<sq||L===Z&&I-Y<aq)return;Y=I,Z=L,z(L)},$=new AbortController,B=()=>$.abort();q.once("end",B),q.once("close",B),q.once("error",B),q.resume();let D=X.installedVersion??(()=>tq()),K=setInterval(()=>{D().then((L)=>{if(L!==null&&L!==g)$.abort()},()=>{})},X.checkMs??iq);K.unref?.();try{await(X.relay??pq)($.signal,Q)}finally{clearInterval(K)}}async function tq(q={}){if(!(q.compiled??Bun.main.startsWith("/$bunfs/")))return null;let z=q.home??Yq(),X=q.env??process.env;if((q.platform??process.platform)==="darwin"){let{currentManagedRuntimeVersion:Q,isManagedRuntimeVersionExecutable:$,legacyManagedRuntimePaths:B,managedRuntimePaths:D}=await import("./managed-runtime-8yf32zv3.js");try{let K=D({platform:"darwin",home:z,environment:X});for(let L of[K,B(K)])if(L&&$(L))return Q(L)}catch{}return null}let{installationReceiptPath:Y,loadInstallationReceipt:Z}=await import("./install-receipt-z3jw7v66.js");return Z(Y(X,z))?.version??null}export{Rz as runDaemonRelay,pq as runBackgroundAskRelay,cq as runAskRelay,tq as installedCliVersion};
8
+ [cut: the answer was ${q.body.length} characters]`:q.body}}class Zq{network;api;home;signal;log;team;sessions=new Map;readers=new Set;constructor(q,z,X,Y,Z,Q){this.network=q;this.api=z;this.home=X;this.signal=Y;this.log=Z;this.team=Q}async run(){let q=Date.now()-qq;for(let X of E(this.home).sessions)if(X.usedAt>q)this.read(X);let z=0;while(!this.signal.aborted){let X=await this.network.team().catch(()=>null);if(!X){await W(60000,this.signal);continue}if(X.name!==this.team)return;let Y;try{let Z=await this.api.claimAgentNetworkRelayJob({machine:X.machine,person:X.person,team:X.name,version:g,wait_seconds:u},AbortSignal.any([this.signal,AbortSignal.timeout((u+20)*1000)]));if(z=0,Z.retry_after_seconds)await W(Z.retry_after_seconds*1000,this.signal);Y=Z.job}catch(Z){if(this.signal.aborted)return;let Q=zq(Z);if(Q===403||Q===401){await W(900000,this.signal);continue}if(Q===404||Q===405){await W(120000,this.signal);continue}z+=1,await W(Math.min(60000,1000*2**Math.min(z,6)),this.signal);continue}if(Y)this.carry(Y)}}async carry(q){let z;try{z=q.kind==="who"?{who:await this.who(q)}:{sent:await this.send(q)}}catch(X){z={error:X instanceof Error?X.message:String(X)}}for(let X=1;;X+=1)try{if(await this.api.completeAgentNetworkRelayJob(q.id,z),q.kind==="send")this.log(`relayed a message to ${q.to} from ${"sent"in z?z.sent.from:q.from_name}`,"relayed");return}catch(Y){if(X>=4||this.signal.aborted){this.log(`couldn't report a relayed call: ${Y instanceof Error?Y.message:String(Y)}`);return}await W(X*1000,this.signal)}}async who(q){let z=q.all===!0,X=await this.network.snapshot({all:z});return{all:z,team:X.team,sessions:X.sessions.map((Y)=>({address:Y.address,person:Y.person,machine:Y.machine,agent:Y.agent,repo:Y.repo,branch:Y.branch,status:Y.status,since:Y.since,doing:Y.doing,worker:Y.worker,...Y.tier?{tier:Y.tier.slice(0,10)}:{}})),machines:X.machines.map((Y)=>({person:Y.person,machine:Y.machine,online:Y.online}))}}async send(q){let z={name:q.from_name,agent:q.from_agent},X=await this.session(z),Y=await X.send(q.to,q.body,q.reply_to,{notify:q.notify===!0});return this.remember(z),this.read(z),{ids:Y.ids,recipients:Y.recipients,from:X.address,deliveries:Y.deliveries.slice(0,500).map(lq)}}session(q){let z=`${q.agent}:${q.name}`,X=this.sessions.get(z);if(!X)X=this.network.session(q.name,{agent:q.agent}).then(async(Y)=>{return await Y.idle(`personal agent (${q.agent}), through Reason`).catch(()=>{}),Y}),X.catch(()=>this.sessions.delete(z)),this.sessions.set(z,X);return X}remember(q){let X=E(this.home).sessions.filter((Y)=>Y.name!==q.name||Y.agent!==q.agent);kq(this.home,{sessions:[...X,{...q,usedAt:Date.now()}].slice(-50)})}read(q){let z=`${q.agent}:${q.name}`;if(this.readers.has(z))return;this.readers.add(z),(async()=>{let X=0;try{while(!this.signal.aborted){let Y=E(this.home).sessions.find((Z)=>Z.name===q.name&&Z.agent===q.agent)?.usedAt??0;if(Date.now()-Y>qq)return;try{let Z=await this.session(q),Q=await Z.next(dq);if(Q.length===0)continue;await this.api.recordAgentNetworkRelayReplies(Q.map(mq)).catch(($)=>{let B=zq($);if(B===null||B>=500||B===429||B===401)throw $;this.log(`dropped ${Q.length} answer(s) the server refused (HTTP ${B})`)}),await Z.ack(Q.map(($)=>$.id)),X=0}catch{if(this.signal.aborted)return;this.sessions.delete(z),X+=1,await W(Math.min(60000,1000*2**Math.min(X,6)),this.signal)}}}finally{this.readers.delete(z)}})()}}async function cq(q){await new Zq(q.network,q.api,q.home??Yq(),q.signal,q.log??(()=>{}),q.team).run()}async function pq(q,z=()=>{}){let X="";while(!q.aborted){try{let Y=n(),Z=Y?x.openInstalled():null;if(Y&&Z){let[{requireApiCredentials:Q},{ReasonApi:$}]=await Promise.all([import("./api-credentials-ke2v1y5k.js"),import("./api-ewpnfn05.js")]),B=await Q({});if(B.credentialKind!=="api_key"&&B.orgId.toLowerCase()===Y.orgId.toLowerCase())try{await cq({network:Z,api:new $(B),team:Y.team,signal:q,log:z})}finally{Z.close()}}X=""}catch(Y){let Z=`agent network relay: ${Y instanceof Error?Y.message:String(Y)}`;if(Z!==X)z(Z);X=Z}await W(300000,q)}}var sq=600000,aq=3600000,iq=180000;async function Rz(q,z,X={}){let Y=-1/0,Z="",Q=(L,$q)=>{let I=Date.now();if($q==="relayed"||I-Y<sq||L===Z&&I-Y<aq)return;Y=I,Z=L,z(L)},$=new AbortController,B=()=>$.abort();q.once("end",B),q.once("close",B),q.once("error",B),q.resume();let D=X.installedVersion??(()=>tq()),K=setInterval(()=>{D().then((L)=>{if(L!==null&&L!==g)$.abort()},()=>{})},X.checkMs??iq);K.unref?.();try{await(X.relay??pq)($.signal,Q)}finally{clearInterval(K)}}async function tq(q={}){if(!(q.compiled??Bun.main.startsWith("/$bunfs/")))return null;let z=q.home??Yq(),X=q.env??process.env;if((q.platform??process.platform)==="darwin"){let{currentManagedRuntimeVersion:Q,isManagedRuntimeVersionExecutable:$,legacyManagedRuntimePaths:B,managedRuntimePaths:D}=await import("./managed-runtime-tp3070ba.js");try{let K=D({platform:"darwin",home:z,environment:X});for(let L of[K,B(K)])if(L&&$(L))return Q(L)}catch{}return null}let{installationReceiptPath:Y,loadInstallationReceipt:Z}=await import("./install-receipt-vaytv1sf.js");return Z(Y(X,z))?.version??null}export{Rz as runDaemonRelay,pq as runBackgroundAskRelay,cq as runAskRelay,tq as installedCliVersion};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m}from"./vm-hands-entry-lite-pasmdmkj.js";import"./vm-hands-entry-lite-d7y6aah1.js";import"./vm-hands-entry-lite-bt6esncn.js";import"./vm-hands-entry-lite-8sddhaka.js";import"./vm-hands-entry-lite-w81kt3sf.js";import"./vm-hands-entry-lite-sfsgeynk.js";import"./vm-hands-entry-lite-4nkcn8sy.js";import"./vm-hands-entry-lite-kxajkxmr.js";import"./vm-hands-entry-lite-b775ysr4.js";import"./vm-hands-entry-lite-mcv6pse6.js";import"./vm-hands-entry-lite-dq1fdx0j.js";import"./vm-hands-entry-lite-g9rvf5qk.js";import"./vm-hands-entry-lite-hh24bq0d.js";import"./vm-hands-entry-lite-2c88t2at.js";import"./vm-hands-entry-lite-1gk31757.js";import"./vm-hands-entry-lite-4s4qrm5m.js";import"./vm-hands-entry-lite-w4swepp1.js";import"./vm-hands-entry-lite-2fyemnas.js";import"./vm-hands-entry-lite-fp51jz5j.js";import"./vm-hands-entry-lite-x9pmwqjd.js";import"./vm-hands-entry-lite-vygp7vq8.js";import"./vm-hands-entry-lite-y9wkxydj.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-g576hpce.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-q9gjfqev.js";import"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-e8skq97c.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-ngytzkx1.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.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{$c as a,ad as b,bd as c,cd as d,dd as e,ed as f,fd as g,gd as h,hd as i,id as j,jd as k,kd as l,ld as m,md as n,nd as o,od as p,pd as q,qd as r,rd as s,sd as t,td as u,ud as v}from"./vm-hands-entry-lite-0csqb5x1.js";import"./vm-hands-entry-lite-p30699xy.js";import"./vm-hands-entry-lite-1c1rxx8v.js";export{q as isCustomEndpointSessionRequiredMessage,v as isCustomEndpointFirewallBlockMessage,u as isCustomEndpointFailureMessage,s as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,t as customEndpointFailureMessage,r as customEndpointDeviceFailureMessage,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,p as CUSTOM_ENDPOINT_DEVICE_SESSION_REQUIRED,g as CUSTOM_ENDPOINT_DEVICE_SAFE_HEADERS,c as CUSTOM_ENDPOINT_DEVICE_MAX_RESPONSE_BYTES,d as CUSTOM_ENDPOINT_DEVICE_MAX_CHUNKS,e as CUSTOM_ENDPOINT_DEVICE_MAX_BODY_BYTES,n as CUSTOM_ENDPOINT_DEVICE_FAILURE_CODES,b as CUSTOM_ENDPOINT_DEVICE_CHUNK_BYTES,a as CUSTOM_ENDPOINT_DEVICE_CAPABILITY};
2
+ import{$c as f,Wc as a,Xc as b,Yc as c,Zc as d,_c as e,ad as g,bd as h,cd as i,dd as j,ed as k,fd as l,gd as m,hd as n,id as o,jd as p,kd as q,ld as r,md as s,nd as t,od as u,pd as v}from"./vm-hands-entry-lite-2c88t2at.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{q as isCustomEndpointSessionRequiredMessage,v as isCustomEndpointFirewallBlockMessage,u as isCustomEndpointFailureMessage,s as isCustomEndpointDeviceFailureMessage,o as isCustomEndpointDeviceFailureCode,h as customEndpointRequestMatchesConfig,t as customEndpointFailureMessage,r as customEndpointDeviceFailureMessage,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,p as CUSTOM_ENDPOINT_DEVICE_SESSION_REQUIRED,g as CUSTOM_ENDPOINT_DEVICE_SAFE_HEADERS,c as CUSTOM_ENDPOINT_DEVICE_MAX_RESPONSE_BYTES,d as CUSTOM_ENDPOINT_DEVICE_MAX_CHUNKS,e as CUSTOM_ENDPOINT_DEVICE_MAX_BODY_BYTES,n as CUSTOM_ENDPOINT_DEVICE_FAILURE_CODES,b as CUSTOM_ENDPOINT_DEVICE_CHUNK_BYTES,a as CUSTOM_ENDPOINT_DEVICE_CAPABILITY};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ag as c,Bg as d,Cg as e,yg as a,zg as b}from"./vm-hands-entry-lite-y9wkxydj.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-7fx4xtf6.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{$i as c,Zi as a,_i as b,aj as d,bj as e,cj as f,dj as g,ej as h,fj as i,gj as j,hj as k,ij as l,jj as m,kj as n,lj as o,mj as p,nj as q,oj as r,pj as s,qj as t,rj as u}from"./vm-hands-entry-lite-5jbnm3bm.js";import"./vm-hands-entry-lite-1c1rxx8v.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{$i as a,aj as b,bj as c,cj as d,dj as e,ej as f,fj as g,gj as h,hj as i,ij as j,jj as k,kj as l,lj as m,mj as n,nj as o,oj as p,pj as q,qj as r,rj as s,sj as t,tj as u}from"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-7fx4xtf6.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{Jc as a,Kc as b,Lc as c,Mc as d,Nc as e,Oc as f,Pc as g,Qc as h,Rc as i}from"./vm-hands-entry-lite-khnx8tzk.js";import"./vm-hands-entry-lite-f4gvypnx.js";import"./vm-hands-entry-lite-3ydgst12.js";import"./vm-hands-entry-lite-5jbnm3bm.js";import"./vm-hands-entry-lite-1c1rxx8v.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{Jc as a,Kc as b,Lc as c,Mc as d,Nc as e,Oc as f,Pc as g,Qc as h,Rc as i}from"./vm-hands-entry-lite-dq1fdx0j.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{e as selectCloudChildPath,a as REASON_HANDS_WORKER_VERSION,h as REASON_HANDS_WORKER_SOURCE,b as REASON_HANDS_WORKER_ENTRYPOINT,i as REASON_HANDS_WORKER_ARTIFACT_SHA256,f as REASON_HANDS_MAC_PTY_MEMBER_SOURCE,g as REASON_HANDS_LINUX_PTY_PROBE_SOURCE,d as REASON_HANDS_CLOUD_CHILD_PATH_MACOS,c as REASON_HANDS_CLOUD_CHILD_PATH_LINUX};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Aa as iJ0}from"./vm-hands-entry-lite-je3n2wnb.js";import{$j as rn,_j as NV0,ak as EJ,ck as an,dk as X0}from"./vm-hands-entry-lite-1c1rxx8v.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{Aa as iJ0}from"./vm-hands-entry-lite-nhfd61cx.js";import{ak as NV0,bk as rn,ck as EJ,ek as an,fk as X0}from"./vm-hands-entry-lite-7fx4xtf6.js";var on={};var $T;var WT=an(()=>{$T=Error("Cannot find module 'fsevents'");$T.code="MODULE_NOT_FOUND";throw $T});var f0=EJ((EU0,X_)=>{var __dirname="/Users/runner/work/monorepo/monorepo/production/node_modules/.bun/playwright-core@1.60.0/node_modules/playwright-core/lib",tn=Object.create,H5=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,Qj=Object.getOwnPropertyNames,en=Object.getPrototypeOf,Qi=Object.prototype.hasOwnProperty,e=(Q,Y)=>function(){return Y||(0,Q[Qj(Q)[0]])((Y={exports:{}}).exports,Y),Y.exports},eQ=(Q,Y)=>{for(var X in Y)H5(Q,X,{get:Y[X],enumerable:!0})},Yj=(Q,Y,X,J)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let G of Qj(Y))if(!Qi.call(Q,G)&&G!==X)H5(Q,G,{get:()=>Y[G],enumerable:!(J=sn(Y,G))||J.enumerable})}return Q},j1=(Q,Y,X)=>(X=Q!=null?tn(en(Q)):{},Yj(Y||!Q||!Q.__esModule?H5(X,"default",{value:Q,enumerable:!0}):X,Q)),Yi=(Q)=>Yj(H5({},"__esModule",{value:!0}),Q),Xi=e({"node_modules/colors/lib/styles.js"(Q,Y){var X={};Y.exports=X;var J={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(J).forEach(function(G){var Z=J[G],$=X[G]=[];$.open="\x1B["+Z[0]+"m",$.close="\x1B["+Z[1]+"m"})}}),Ji=e({"node_modules/colors/lib/system/has-flag.js"(Q,Y){Y.exports=function(X,J){J=J||process.argv;var G=J.indexOf("--"),Z=/^-{1,2}/.test(X)?"":"--",$=J.indexOf(Z+X);return $!==-1&&(G===-1?!0:$<G)}}}),Gi=e({"node_modules/colors/lib/system/supports-colors.js"(Q,Y){var X=X0("os"),J=Ji(),G=process.env,Z=void 0;if(J("no-color")||J("no-colors")||J("color=false"))Z=!1;else if(J("color")||J("colors")||J("color=true")||J("color=always"))Z=!0;if("FORCE_COLOR"in G)Z=G.FORCE_COLOR.length===0||parseInt(G.FORCE_COLOR,10)!==0;function $(H){if(H===0)return!1;return{level:H,hasBasic:!0,has256:H>=2,has16m:H>=3}}function W(H){if(Z===!1)return 0;if(J("color=16m")||J("color=full")||J("color=truecolor"))return 3;if(J("color=256"))return 2;if(H&&!H.isTTY&&Z!==!0)return 0;var B=Z?1:0;if(process.platform==="win32"){var V=X.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(V[0])>=10&&Number(V[2])>=10586)return Number(V[2])>=14931?3:2;return 1}if("CI"in G){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(M){return M in G})||G.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in G){var U=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(G.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM))return 1;if("COLORTERM"in G)return 1;if(G.TERM==="dumb")return B;return B}function K(H){var B=W(H);return $(B)}Y.exports={supportsColor:K,stdout:K(process.stdout),stderr:K(process.stderr)}}}),Zi=e({"node_modules/colors/lib/custom/trap.js"(Q,Y){Y.exports=function(J,G){var Z="";J=J||"Run the trap, drop the bass",J=J.split("");var $={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return J.forEach(function(W){W=W.toLowerCase();var K=$[W]||[" "],H=Math.floor(Math.random()*K.length);if(typeof $[W]<"u")Z+=$[W][H];else Z+=W}),Z}}}),$i=e({"node_modules/colors/lib/custom/zalgo.js"(Q,Y){Y.exports=function(J,G){J=J||" he is here ";var Z={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},$=[].concat(Z.up,Z.down,Z.mid);function W(B){var V=Math.floor(Math.random()*B);return V}function K(B){var V=!1;return $.filter(function(U){V=U===B}),V}function H(B,V){var U="",M,L;V=V||{},V.up=typeof V.up<"u"?V.up:!0,V.mid=typeof V.mid<"u"?V.mid:!0,V.down=typeof V.down<"u"?V.down:!0,V.size=typeof V.size<"u"?V.size:"maxi",B=B.split("");for(L in B){if(K(L))continue;switch(U=U+B[L],M={up:0,down:0,mid:0},V.size){case"mini":M.up=W(8),M.mid=W(2),M.down=W(8);break;case"maxi":M.up=W(16)+3,M.mid=W(4)+1,M.down=W(64)+3;break;default:M.up=W(8)+1,M.mid=W(6)/2,M.down=W(8)+1;break}var F=["up","mid","down"];for(var z in F){var N=F[z];for(var A=0;A<=M[N];A++)if(V[N])U=U+Z[N][W(Z[N].length)]}}return U}return H(J,G)}}}),Wi=e({"node_modules/colors/lib/maps/america.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){if(J===" ")return J;switch(G%3){case 0:return X.red(J);case 1:return X.white(J);case 2:return X.blue(J)}}}}}),Ki=e({"node_modules/colors/lib/maps/zebra.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){return G%2===0?J:X.inverse(J)}}}}),Hi=e({"node_modules/colors/lib/maps/rainbow.js"(Q,Y){Y.exports=function(X){var J=["red","yellow","green","blue","magenta"];return function(G,Z,$){if(G===" ")return G;else return X[J[Z++%J.length]](G)}}}}),Bi=e({"node_modules/colors/lib/maps/random.js"(Q,Y){Y.exports=function(X){var J=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(G,Z,$){return G===" "?G:X[J[Math.round(Math.random()*(J.length-2))]](G)}}}}),Vi=e({"node_modules/colors/lib/colors.js"(Q,Y){var X={};Y.exports=X,X.themes={};var J=X0("util"),G=X.styles=Xi(),Z=Object.defineProperties,$=new RegExp(/[\r\n]+/g);if(X.supportsColor=Gi().supportsColor,typeof X.enabled>"u")X.enabled=X.supportsColor()!==!1;X.enable=function(){X.enabled=!0},X.disable=function(){X.enabled=!1},X.stripColors=X.strip=function(N){return(""+N).replace(/\x1B\[\d+m/g,"")};var W=X.stylize=function(A,R){if(!X.enabled)return A+"";var q=G[R];if(!q&&R in X)return X[R](A);return q.open+A+q.close},K=/[|\\{}()[\]^$+*?.]/g,H=function(N){if(typeof N!=="string")throw TypeError("Expected a string");return N.replace(K,"\\$&")};function B(N){var A=function R(){return M.apply(R,arguments)};return A._styles=N,A.__proto__=U,A}var V=function(){var N={};return G.grey=G.gray,Object.keys(G).forEach(function(A){G[A].closeRe=new RegExp(H(G[A].close),"g"),N[A]={get:function(){return B(this._styles.concat(A))}}}),N}(),U=Z(function(){},V);function M(){var N=Array.prototype.slice.call(arguments),A=N.map(function(D){if(D!=null&&D.constructor===String)return D;else return J.inspect(D)}).join(" ");if(!X.enabled||!A)return A;var R=A.indexOf(`
3
3
  `)!=-1,q=this._styles,O=q.length;while(O--){var E=G[q[O]];if(A=E.open+A.replace(E.closeRe,E.open)+E.close,R)A=A.replace($,function(D){return E.close+D+E.open})}return A}X.setTheme=function(N){if(typeof N==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var A in N)(function(R){X[R]=function(q){if(typeof N[R]==="object"){var O=q;for(var E in N[R])O=X[N[R][E]](O);return O}return X[N[R]](q)}})(A)};function L(){var N={};return Object.keys(V).forEach(function(A){N[A]={get:function(){return B([A])}}}),N}var F=function(A,R){var q=R.split("");return q=q.map(A),q.join("")};X.trap=Zi(),X.zalgo=$i(),X.maps={},X.maps.america=Wi()(X),X.maps.zebra=Ki()(X),X.maps.rainbow=Hi()(X),X.maps.random=Bi()(X);for(z in X.maps)(function(N){X[N]=function(A){return F(X.maps[N],A)}})(z);var z;Z(X,L())}}),Ui=e({"node_modules/colors/safe.js"(Q,Y){var X=Vi();Y.exports=X}}),Mi=e({"node_modules/ms/index.js"(Q,Y){var X=1000,J=X*60,G=J*60,Z=G*24,$=Z*7,W=Z*365.25;Y.exports=function(U,M){M=M||{};var L=typeof U;if(L==="string"&&U.length>0)return K(U);else if(L==="number"&&isFinite(U))return M.long?B(U):H(U);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(U))};function K(U){if(U=String(U),U.length>100)return;var M=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(U);if(!M)return;var L=parseFloat(M[1]),F=(M[2]||"ms").toLowerCase();switch(F){case"years":case"year":case"yrs":case"yr":case"y":return L*W;case"weeks":case"week":case"w":return L*$;case"days":case"day":case"d":return L*Z;case"hours":case"hour":case"hrs":case"hr":case"h":return L*G;case"minutes":case"minute":case"mins":case"min":case"m":return L*J;case"seconds":case"second":case"secs":case"sec":case"s":return L*X;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return L;default:return}}function H(U){var M=Math.abs(U);if(M>=Z)return Math.round(U/Z)+"d";if(M>=G)return Math.round(U/G)+"h";if(M>=J)return Math.round(U/J)+"m";if(M>=X)return Math.round(U/X)+"s";return U+"ms"}function B(U){var M=Math.abs(U);if(M>=Z)return V(U,M,Z,"day");if(M>=G)return V(U,M,G,"hour");if(M>=J)return V(U,M,J,"minute");if(M>=X)return V(U,M,X,"second");return U+" ms"}function V(U,M,L,F){var z=M>=L*1.5;return Math.round(U/L)+" "+F+(z?"s":"")}}}),Xj=e({"node_modules/debug/src/common.js"(Q,Y){function X(J){Z.debug=Z,Z.default=Z,Z.coerce=V,Z.disable=H,Z.enable=W,Z.enabled=B,Z.humanize=Mi(),Z.destroy=U,Object.keys(J).forEach((M)=>{Z[M]=J[M]}),Z.names=[],Z.skips=[],Z.formatters={};function G(M){let L=0;for(let F=0;F<M.length;F++)L=(L<<5)-L+M.charCodeAt(F),L|=0;return Z.colors[Math.abs(L)%Z.colors.length]}Z.selectColor=G;function Z(M){let L,F=null,z,N;function A(...R){if(!A.enabled)return;let q=A,O=Number(new Date),E=O-(L||O);if(q.diff=E,q.prev=L,q.curr=O,L=O,R[0]=Z.coerce(R[0]),typeof R[0]!=="string")R.unshift("%O");let D=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(I,P)=>{if(I==="%%")return"%";D++;let C=Z.formatters[P];if(typeof C==="function"){let b=R[D];I=C.call(q,b),R.splice(D,1),D--}return I}),Z.formatArgs.call(q,R),(q.log||Z.log).apply(q,R)}if(A.namespace=M,A.useColors=Z.useColors(),A.color=Z.selectColor(M),A.extend=$,A.destroy=Z.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(F!==null)return F;if(z!==Z.namespaces)z=Z.namespaces,N=Z.enabled(M);return N},set:(R)=>{F=R}}),typeof Z.init==="function")Z.init(A);return A}function $(M,L){let F=Z(this.namespace+(typeof L>"u"?":":L)+M);return F.log=this.log,F}function W(M){Z.save(M),Z.namespaces=M,Z.names=[],Z.skips=[];let L=(typeof M==="string"?M:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of L)if(F[0]==="-")Z.skips.push(F.slice(1));else Z.names.push(F)}function K(M,L){let F=0,z=0,N=-1,A=0;while(F<M.length)if(z<L.length&&(L[z]===M[F]||L[z]==="*"))if(L[z]==="*")N=z,A=F,z++;else F++,z++;else if(N!==-1)z=N+1,A++,F=A;else return!1;while(z<L.length&&L[z]==="*")z++;return z===L.length}function H(){let M=[...Z.names,...Z.skips.map((L)=>"-"+L)].join(",");return Z.enable(""),M}function B(M){for(let L of Z.skips)if(K(M,L))return!1;for(let L of Z.names)if(K(M,L))return!0;return!1}function V(M){if(M instanceof Error)return M.stack||M.message;return M}function U(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Z.enable(Z.load()),Z}Y.exports=X}}),Li=e({"node_modules/debug/src/browser.js"(Q,Y){Q.formatArgs=J,Q.save=G,Q.load=Z,Q.useColors=X,Q.storage=$(),Q.destroy=(()=>{let K=!1;return()=>{if(!K)K=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})(),Q.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function X(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let K;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(K=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(K[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function J(K){if(K[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+K[0]+(this.useColors?"%c ":" ")+"+"+Y.exports.humanize(this.diff),!this.useColors)return;let H="color: "+this.color;K.splice(1,0,H,"color: inherit");let B=0,V=0;K[0].replace(/%[a-zA-Z%]/g,(U)=>{if(U==="%%")return;if(B++,U==="%c")V=B}),K.splice(V,0,H)}Q.log=console.debug||console.log||(()=>{});function G(K){try{if(K)Q.storage.setItem("debug",K);else Q.storage.removeItem("debug")}catch(H){}}function Z(){let K;try{K=Q.storage.getItem("debug")||Q.storage.getItem("DEBUG")}catch(H){}if(!K&&typeof process<"u"&&"env"in process)K=process.env.DEBUG;return K}function $(){try{return localStorage}catch(K){}}Y.exports=Xj()(Q);var{formatters:W}=Y.exports;W.j=function(K){try{return JSON.stringify(K)}catch(H){return"[UnexpectedJSONParseError]: "+H.message}}}}),Ai=e({"node_modules/has-flag/index.js"(Q,Y){Y.exports=(X,J=process.argv)=>{let G=X.startsWith("-")?"":X.length===1?"-":"--",Z=J.indexOf(G+X),$=J.indexOf("--");return Z!==-1&&($===-1||Z<$)}}}),Ni=e({"node_modules/supports-color/index.js"(Q,Y){var X=X0("os"),J=X0("tty"),G=Ai(),{env:Z}=process,$;if(G("no-color")||G("no-colors")||G("color=false")||G("color=never"))$=0;else if(G("color")||G("colors")||G("color=true")||G("color=always"))$=1;function W(){if("FORCE_COLOR"in Z){if(Z.FORCE_COLOR==="true")return 1;if(Z.FORCE_COLOR==="false")return 0;return Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}}function K(V){if(V===0)return!1;return{level:V,hasBasic:!0,has256:V>=2,has16m:V>=3}}function H(V,{streamIsTTY:U,sniffFlags:M=!0}={}){let L=W();if(L!==void 0)$=L;let F=M?$:L;if(F===0)return 0;if(M){if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2}if(V&&!U&&F===void 0)return 0;let z=F||0;if(Z.TERM==="dumb")return z;if(process.platform==="win32"){let N=X.release().split(".");if(Number(N[0])>=10&&Number(N[2])>=10586)return Number(N[2])>=14931?3:2;return 1}if("CI"in Z){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((N)=>(N in Z))||Z.CI_NAME==="codeship")return 1;return z}if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Z){let N=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return N>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Z.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM))return 1;if("COLORTERM"in Z)return 1;return z}function B(V,U={}){let M=H(V,{streamIsTTY:V&&V.isTTY,...U});return K(M)}Y.exports={supportsColor:B,stdout:B({isTTY:J.isatty(1)}),stderr:B({isTTY:J.isatty(2)})}}}),Fi=e({"node_modules/debug/src/node.js"(Q,Y){var X=X0("tty"),J=X0("util");Q.init=B,Q.log=W,Q.formatArgs=Z,Q.save=K,Q.load=H,Q.useColors=G,Q.destroy=J.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),Q.colors=[6,2,3,4,5,1];try{let U=Ni();if(U&&(U.stderr||U).level>=2)Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(U){}Q.inspectOpts=Object.keys(process.env).filter((U)=>{return/^debug_/i.test(U)}).reduce((U,M)=>{let L=M.substring(6).toLowerCase().replace(/_([a-z])/g,(z,N)=>{return N.toUpperCase()}),F=process.env[M];if(/^(yes|on|true|enabled)$/i.test(F))F=!0;else if(/^(no|off|false|disabled)$/i.test(F))F=!1;else if(F==="null")F=null;else F=Number(F);return U[L]=F,U},{});function G(){return"colors"in Q.inspectOpts?Boolean(Q.inspectOpts.colors):X.isatty(process.stderr.fd)}function Z(U){let{namespace:M,useColors:L}=this;if(L){let F=this.color,z="\x1B[3"+(F<8?F:"8;5;"+F),N=` ${z};1m${M} \x1B[0m`;U[0]=N+U[0].split(`
4
4
  `).join(`
5
5
  `+N),U.push(z+"m+"+Y.exports.humanize(this.diff)+"\x1B[0m")}else U[0]=$()+M+" "+U[0]}function $(){if(Q.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function W(...U){return process.stderr.write(J.formatWithOptions(Q.inspectOpts,...U)+`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$d as b,_d as a,ae as c,be as d,ce as e,de as f,ee as g,fe as h,ge as i,he as j,ie as k,je as l,ke as m,le as n,me as o,ne as p,oe as q,pe as r}from"./vm-hands-entry-lite-6hcx1k08.js";import"./vm-hands-entry-lite-thskh018.js";import"./vm-hands-entry-lite-peqmq6j6.js";import"./vm-hands-entry-lite-0rwpp6hr.js";import"./vm-hands-entry-lite-5jbnm3bm.js";import"./vm-hands-entry-lite-1c1rxx8v.js";export{r as runInstallReceiptCli,q as recordInstallationReceipt,k as pathEntryAddedByInstaller,l as parseInstallationReceipt,m as loadInstallationReceipt,j as installerReasonAlias,h as installationReceiptPath,g as installationConfigHome,i as installationAliasMatchesTarget,n as hasInstallationDeviceConsent,o as authorizeInstallationForFutureDevice,p as authorizeDesktopInstallationForFutureDevice,a as INSTALLATION_RECEIPT_SCHEMA_VERSION,b as INSTALLATION_DEVICE_CONSENT_VERSION,f as INSTALLATION_BACKGROUND_MODES,e as FUTURE_DEVICE_CONSENT_SCOPE,c as DESKTOP_ACCOUNT_ACCESS_VERSION,d as DESKTOP_ACCOUNT_ACCESS_SCOPE};
2
+ import{$d as g,Vd as a,Wd as b,Xd as c,Yd as d,Zd as e,_d as f,ae as h,be as i,ce as j,de as k,ee as l,fe as m,ge as n,he as o,ie as p,je as q,ke as r}from"./vm-hands-entry-lite-w4swepp1.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{r as runInstallReceiptCli,q as recordInstallationReceipt,k as pathEntryAddedByInstaller,l as parseInstallationReceipt,m as loadInstallationReceipt,j as installerReasonAlias,h as installationReceiptPath,g as installationConfigHome,i as installationAliasMatchesTarget,n as hasInstallationDeviceConsent,o as authorizeInstallationForFutureDevice,p as authorizeDesktopInstallationForFutureDevice,a as INSTALLATION_RECEIPT_SCHEMA_VERSION,b as INSTALLATION_DEVICE_CONSENT_VERSION,f as INSTALLATION_BACKGROUND_MODES,e as FUTURE_DEVICE_CONSENT_SCOPE,c as DESKTOP_ACCOUNT_ACCESS_VERSION,d as DESKTOP_ACCOUNT_ACCESS_SCOPE};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ad as j,Bd as k,Cd as l,rd as a,sd as b,td as c,ud as d,vd as e,wd as f,xd as g,yd as h,zd as i}from"./vm-hands-entry-lite-1gk31757.js";import"./vm-hands-entry-lite-4s4qrm5m.js";import"./vm-hands-entry-lite-w4swepp1.js";import"./vm-hands-entry-lite-2fyemnas.js";import"./vm-hands-entry-lite-fp51jz5j.js";import"./vm-hands-entry-lite-x9pmwqjd.js";import"./vm-hands-entry-lite-vygp7vq8.js";import"./vm-hands-entry-lite-y9wkxydj.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-g576hpce.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-q9gjfqev.js";import"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-e8skq97c.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-ngytzkx1.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{d as runRelayed,e as runMacComputerUse,l as runLocalAutomation,k as runAutomationCallLocally,b as parseAutomationPayload,g as localUserChromeProfiles,h as localUserChromeInstance,f as localUserChromeHost,j as localBrowserProfile,c as localAutomationAvailable,i as ensureLocalBrowser,a as AUTOMATION_CHUNK_BYTES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$a as m,Ra as c,Sa as d,Ta as e,Ua as f,Va as g,Wa as h,Xa as i,Ya as j,Za as k,_a as l,ab as n,bb as o,cb as p,db as q,eb as r,fb as s,gb as t}from"./vm-hands-entry-lite-4nkcn8sy.js";import"./vm-hands-entry-lite-kxajkxmr.js";import"./vm-hands-entry-lite-b775ysr4.js";import"./vm-hands-entry-lite-mcv6pse6.js";import"./vm-hands-entry-lite-dq1fdx0j.js";import"./vm-hands-entry-lite-g9rvf5qk.js";import"./vm-hands-entry-lite-hh24bq0d.js";import"./vm-hands-entry-lite-2c88t2at.js";import"./vm-hands-entry-lite-1gk31757.js";import"./vm-hands-entry-lite-4s4qrm5m.js";import"./vm-hands-entry-lite-w4swepp1.js";import"./vm-hands-entry-lite-2fyemnas.js";import"./vm-hands-entry-lite-fp51jz5j.js";import"./vm-hands-entry-lite-x9pmwqjd.js";import"./vm-hands-entry-lite-vygp7vq8.js";import"./vm-hands-entry-lite-y9wkxydj.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-g576hpce.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-q9gjfqev.js";import{Ei as b}from"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-e8skq97c.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-ngytzkx1.js";import{$j as a}from"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{g as spawnCaptured,f as sandboxProfile,e as safeEnvironment,j as runTransferCapability,i as runFileCapability,s as rebindLocalHandsControl,b as isProtectedLocalPath,t as executeLocalOperation,l as enrolledWorkspaceRootFingerprint,p as enrolledRootPaths,o as enrolledHomeContainedRootFingerprints,m as enrolledAccountRootPath,n as enrolledAccountRootFingerprint,r as deliverLocalHandsEnvironment,h as defaultLocalCommandRunner,d as confinedExecutionShell,q as capabilityInventoryForRoots,c as SHORT_REQUEST_CAPABILITIES,a as LocalCapabilityError,k as LOCAL_CAPABILITY_REGISTRY};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Uj as a,Vj as b,Wj as c,Xj as d,Yj as e,Zj as f,_j as g}from"./vm-hands-entry-lite-ngytzkx1.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.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{Mj as a,Nj as b,Oj as c,Pj as d,Qj as e,Rj as f,Sj as g}from"./vm-hands-entry-lite-e8skq97c.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.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{Rf as a,Sf as b,Tf as c,Uf as d,Vf as e,Wf as f,Xf as g,Yf as h}from"./vm-hands-entry-lite-fp51jz5j.js";import"./vm-hands-entry-lite-x9pmwqjd.js";import"./vm-hands-entry-lite-vygp7vq8.js";import"./vm-hands-entry-lite-y9wkxydj.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-g576hpce.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-q9gjfqev.js";import"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-e8skq97c.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-ngytzkx1.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{h as runLocalDisplayStream,f as privateDirectory,c as parseDisplayStreamPayload,e as localDisplayReady,d as localDisplayAvailable,g as ensureLinuxDesktop,a as LOCAL_DISPLAY_MAX_SESSION_MS,b as LINUX_WORKER_DISPLAY};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$f as c,Zf as a,_f as b,ag as d,bg as e,cg as f,dg as g,eg as h,fg as i,gg as j}from"./vm-hands-entry-lite-x9pmwqjd.js";import"./vm-hands-entry-lite-vygp7vq8.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-g576hpce.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{j as runLocalPtySession,e as resolvePtyWorkingDirectory,g as ptyRuntimeSupported,d as parsePtyStartPayload,h as defaultSpawnPty,f as defaultLoginShell,i as defaultConnect,a as LOCAL_PTY_MAX_SESSION_MS,c as LOCAL_PTY_MAX_SESSIONS,b as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$ as D,L as n,M as o,N as p,O as q,P as r,Q as s,R as t,S as u,T as v,U as w,V as x,W as y,X as z,Y as A,Z as B,_ as C,aa as E,ba as F,ca as G,da as H,ea as I,fa as J,ga as K,ha as L,ia as M,ja as N,ka as O,la as P,ma as Q,na as R,oa as S,pa as T,qa as U,ra as V,sa as W,ta as X,ua as Y}from"./vm-hands-entry-lite-c4mk1cwv.js";import"./vm-hands-entry-lite-wej1p1ry.js";import{Lh as a,Mh as b,Nh as c,Oh as d,Ph as e,Qh as f,Rh as g,Sh as h,Uh as i,Vh as j,Xh as k,Yh as l,Zh as m}from"./vm-hands-entry-lite-44f1pr87.js";import"./vm-hands-entry-lite-peqmq6j6.js";import"./vm-hands-entry-lite-5cmafbnh.js";import"./vm-hands-entry-lite-0rwpp6hr.js";import"./vm-hands-entry-lite-5jbnm3bm.js";import"./vm-hands-entry-lite-21856esq.js";import"./vm-hands-entry-lite-59napxaf.js";import"./vm-hands-entry-lite-1c1rxx8v.js";export{E as verifyManagedRuntimeCodeSignatures,m as verifyManagedRuntimeArtifact,H as updateManagedRuntime,l as sha256Hex,Q as rollbackManagedRuntime,R as recoverManagedRuntimeActivation,V as recordManagedRuntimeLifecycle,U as readManagedRuntimeLifecycleEvents,j as parseAndVerifyManagedRuntimeManifest,k as parseAndVerifyLegacyManagedRuntimeManifest,z as managedRuntimeVersionPath,C as managedRuntimeTarget,K as managedRuntimePointerVersion,x as managedRuntimePaths,O as managedRuntimeExecutableVersion,A as managedRuntimeCredentialLibraryPath,h as managedRuntimeCredentialLibraryAssetName,g as managedRuntimeAssetName,y as legacyManagedRuntimePaths,N as isManagedRuntimeVersionExecutable,M as isManagedRuntimeExecutable,J as installManagedRuntimeLauncher,I as installManagedRuntimeArtifact,X as flushManagedRuntimeLifecycleEvents,F as fetchManagedRuntimeBytes,G as defaultManagedRuntimeHealthCheck,L as currentManagedRuntimeVersion,B as compareManagedRuntimeVersions,i as canonicalJson,Y as bootstrapManagedRuntime,D as assertManagedRuntimeSignatureEvidence,P as activateManagedRuntime,T as acquireManagedRuntimeLock,S as acquireManagedRuntimeDirectoryLock,W as acknowledgeManagedRuntimeLifecycleEvents,f as ManagedRuntimeError,v as MANAGED_RUNTIME_UPDATE_HEALTH_TIMEOUT_MS,e as MANAGED_RUNTIME_TARGETS,d as MANAGED_RUNTIME_MAX_MANIFEST_BYTES,p as MANAGED_RUNTIME_MAX_LIFECYCLE_EVENTS,q as MANAGED_RUNTIME_MAX_LIFECYCLE_BYTES,c as MANAGED_RUNTIME_MAX_ARTIFACT_BYTES,b as MANAGED_RUNTIME_MANIFEST_VERSION,r as MANAGED_RUNTIME_MANIFEST_URL,o as MANAGED_RUNTIME_LIFECYCLE_VERSION,w as MANAGED_RUNTIME_LIFECYCLE_EVENTS,n as MANAGED_RUNTIME_LAYOUT_VERSION,u as MANAGED_RUNTIME_HEALTH_TIMEOUT_MS,s as MANAGED_RUNTIME_FETCH_TIMEOUT_MS,t as MANAGED_RUNTIME_ARTIFACT_FETCH_TIMEOUT_MS,a as LEGACY_MANAGED_RUNTIME_MANIFEST_VERSION};
2
+ import{$ as D,L as n,M as o,N as p,O as q,P as r,Q as s,R as t,S as u,T as v,U as w,V as x,W as y,X as z,Y as A,Z as B,_ as C,aa as E,ba as F,ca as G,da as H,ea as I,fa as J,ga as K,ha as L,ia as M,ja as N,ka as O,la as P,ma as Q,na as R,oa as S,pa as T,qa as U,ra as V,sa as W,ta as X,ua as Y}from"./vm-hands-entry-lite-w81kt3sf.js";import"./vm-hands-entry-lite-hh24bq0d.js";import{Gh as a,Hh as b,Ih as c,Jh as d,Kh as e,Lh as f,Mh as g,Nh as h,Ph as i,Qh as j,Sh as k,Th as l,Uh as m}from"./vm-hands-entry-lite-g576hpce.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{E as verifyManagedRuntimeCodeSignatures,m as verifyManagedRuntimeArtifact,H as updateManagedRuntime,l as sha256Hex,Q as rollbackManagedRuntime,R as recoverManagedRuntimeActivation,V as recordManagedRuntimeLifecycle,U as readManagedRuntimeLifecycleEvents,j as parseAndVerifyManagedRuntimeManifest,k as parseAndVerifyLegacyManagedRuntimeManifest,z as managedRuntimeVersionPath,C as managedRuntimeTarget,K as managedRuntimePointerVersion,x as managedRuntimePaths,O as managedRuntimeExecutableVersion,A as managedRuntimeCredentialLibraryPath,h as managedRuntimeCredentialLibraryAssetName,g as managedRuntimeAssetName,y as legacyManagedRuntimePaths,N as isManagedRuntimeVersionExecutable,M as isManagedRuntimeExecutable,J as installManagedRuntimeLauncher,I as installManagedRuntimeArtifact,X as flushManagedRuntimeLifecycleEvents,F as fetchManagedRuntimeBytes,G as defaultManagedRuntimeHealthCheck,L as currentManagedRuntimeVersion,B as compareManagedRuntimeVersions,i as canonicalJson,Y as bootstrapManagedRuntime,D as assertManagedRuntimeSignatureEvidence,P as activateManagedRuntime,T as acquireManagedRuntimeLock,S as acquireManagedRuntimeDirectoryLock,W as acknowledgeManagedRuntimeLifecycleEvents,f as ManagedRuntimeError,v as MANAGED_RUNTIME_UPDATE_HEALTH_TIMEOUT_MS,e as MANAGED_RUNTIME_TARGETS,d as MANAGED_RUNTIME_MAX_MANIFEST_BYTES,p as MANAGED_RUNTIME_MAX_LIFECYCLE_EVENTS,q as MANAGED_RUNTIME_MAX_LIFECYCLE_BYTES,c as MANAGED_RUNTIME_MAX_ARTIFACT_BYTES,b as MANAGED_RUNTIME_MANIFEST_VERSION,r as MANAGED_RUNTIME_MANIFEST_URL,o as MANAGED_RUNTIME_LIFECYCLE_VERSION,w as MANAGED_RUNTIME_LIFECYCLE_EVENTS,n as MANAGED_RUNTIME_LAYOUT_VERSION,u as MANAGED_RUNTIME_HEALTH_TIMEOUT_MS,s as MANAGED_RUNTIME_FETCH_TIMEOUT_MS,t as MANAGED_RUNTIME_ARTIFACT_FETCH_TIMEOUT_MS,a as LEGACY_MANAGED_RUNTIME_MANIFEST_VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$e as B,Ae as a,Af as aa,Be as b,Bf as ba,Ce as c,Cf as ca,De as d,Df as da,Ee as e,Ef as ea,Fe as f,Ff as fa,Ge as g,Gf as ga,He as h,Hf as ha,Ie as i,If as ia,Je as j,Ke as k,Le as l,Me as m,Ne as n,Oe as o,Pe as p,Qe as q,Re as r,Se as s,Te as t,Ue as u,Ve as v,We as w,Xe as x,Ye as y,Ze as z,_e as A,af as C,bf as D,cf as E,df as F,ef as G,ff as H,gf as I,hf as J,if as K,jf as L,kf as M,lf as N,mf as O,nf as P,of as Q,pf as R,qf as S,rf as T,sf as U,tf as V,uf as W,vf as X,wf as Y,xf as Z,yf as _,zf as $}from"./vm-hands-entry-lite-4p6v05yh.js";import"./vm-hands-entry-lite-p30699xy.js";import"./vm-hands-entry-lite-1c1rxx8v.js";export{$ as parseLocalRuntimeRootsSyncResponse,X as parseLocalRuntimeRegistrationResponse,W as parseLocalRuntimeProofChallenge,fa as parseLocalRuntimeOperationHeartbeatResponse,ga as parseLocalRuntimeOperationEventsResponse,ha as parseLocalRuntimeOperationEnvironmentResponse,ia as parseLocalRuntimeOperationCompletionResponse,ea as parseLocalRuntimeOperationClaim,ca as parseLocalRuntimeLocalSubscriptionResponse,da as parseLocalRuntimeLifecycleResponse,aa as parseLocalRuntimeIdentityResponse,Z as parseLocalRuntimeHeartbeatResponse,_ as parseLocalRuntimeFirstHeartbeat,V as parseLocalRuntimeErrorEnvelope,Y as parseLocalRuntimeEnrollmentResponse,ba as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,U as buildLocalRuntimeDeviceProofBytes,P as WORKER_STARTUP_TIMING_STAGES,K as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,Q as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,k as LOCAL_RUNTIME_SESSION_VM_HANDS_REGISTER,h as LOCAL_RUNTIME_SESSION_PRE_AUTH_MAX_BYTES,g as LOCAL_RUNTIME_SESSION_PATH,m as LOCAL_RUNTIME_SESSION_CLOSE,l as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,i as LOCAL_RUNTIME_SESSION_AUTH_DEADLINE_MS,b as LOCAL_RUNTIME_ROUTE_PREFIX,f as LOCAL_RUNTIME_ROUTES,a as LOCAL_RUNTIME_PROTOCOL_VERSION,R as LOCAL_RUNTIME_LIFECYCLE_EVENTS,T as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,S as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,M as JOBS_START_WAIT_KEY,L as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,J as HANDS_SESSION_CAP_NONE,I as HANDS_SESSION_CAP_KEY,s as HANDS_REBIND_KEY,t as HANDS_REBIND_CONTROL,r as HANDS_REBIND,D as HANDS_MODEL_JOBS_EGRESS_KEY,C as HANDS_MODEL_JOBS_EGRESS,z as HANDS_LARGE_ENVIRONMENT_KEY,y as HANDS_LARGE_ENVIRONMENT,F as HANDS_JOBS_USER_KEY,E as HANDS_JOBS_USER,x as HANDS_HEADLESS_BROWSER_KEY,w as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,q as HANDS_ENVIRONMENT_AT_CLAIM_KEY,p as HANDS_ENVIRONMENT_AT_CLAIM,B as HANDS_CONFINEMENT_KEY,A as HANDS_CONFINEMENT,v as HANDS_CLOUD_ACCESS_KEY,u as HANDS_CLOUD_ACCESS,N as AUTOMATION_USER_CHROME,O as AUTOMATION_CLOUD_SESSIONS};
2
+ import{$e as G,Ae as f,Af as fa,Be as g,Bf as ga,Ce as h,Cf as ha,De as i,Df as ia,Ee as j,Fe as k,Ge as l,He as m,Ie as n,Je as o,Ke as p,Le as q,Me as r,Ne as s,Oe as t,Pe as u,Qe as v,Re as w,Se as x,Te as y,Ue as z,Ve as A,We as B,Xe as C,Ye as D,Ze as E,_e as F,af as H,bf as I,cf as J,df as K,ef as L,ff as M,gf as N,hf as O,if as P,jf as Q,kf as R,lf as S,mf as T,nf as U,of as V,pf as W,qf as X,rf as Y,sf as Z,tf as _,uf as $,ve as a,vf as aa,we as b,wf as ba,xe as c,xf as ca,ye as d,yf as da,ze as e,zf as ea}from"./vm-hands-entry-lite-2fyemnas.js";import"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{$ as parseLocalRuntimeRootsSyncResponse,X as parseLocalRuntimeRegistrationResponse,W as parseLocalRuntimeProofChallenge,fa as parseLocalRuntimeOperationHeartbeatResponse,ga as parseLocalRuntimeOperationEventsResponse,ha as parseLocalRuntimeOperationEnvironmentResponse,ia as parseLocalRuntimeOperationCompletionResponse,ea as parseLocalRuntimeOperationClaim,ca as parseLocalRuntimeLocalSubscriptionResponse,da as parseLocalRuntimeLifecycleResponse,aa as parseLocalRuntimeIdentityResponse,Z as parseLocalRuntimeHeartbeatResponse,_ as parseLocalRuntimeFirstHeartbeat,V as parseLocalRuntimeErrorEnvelope,Y as parseLocalRuntimeEnrollmentResponse,ba as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,U as buildLocalRuntimeDeviceProofBytes,P as WORKER_STARTUP_TIMING_STAGES,K as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,Q as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,k as LOCAL_RUNTIME_SESSION_VM_HANDS_REGISTER,h as LOCAL_RUNTIME_SESSION_PRE_AUTH_MAX_BYTES,g as LOCAL_RUNTIME_SESSION_PATH,m as LOCAL_RUNTIME_SESSION_CLOSE,l as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,i as LOCAL_RUNTIME_SESSION_AUTH_DEADLINE_MS,b as LOCAL_RUNTIME_ROUTE_PREFIX,f as LOCAL_RUNTIME_ROUTES,a as LOCAL_RUNTIME_PROTOCOL_VERSION,R as LOCAL_RUNTIME_LIFECYCLE_EVENTS,T as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,S as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,M as JOBS_START_WAIT_KEY,L as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,J as HANDS_SESSION_CAP_NONE,I as HANDS_SESSION_CAP_KEY,s as HANDS_REBIND_KEY,t as HANDS_REBIND_CONTROL,r as HANDS_REBIND,D as HANDS_MODEL_JOBS_EGRESS_KEY,C as HANDS_MODEL_JOBS_EGRESS,z as HANDS_LARGE_ENVIRONMENT_KEY,y as HANDS_LARGE_ENVIRONMENT,F as HANDS_JOBS_USER_KEY,E as HANDS_JOBS_USER,x as HANDS_HEADLESS_BROWSER_KEY,w as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,q as HANDS_ENVIRONMENT_AT_CLAIM_KEY,p as HANDS_ENVIRONMENT_AT_CLAIM,B as HANDS_CONFINEMENT_KEY,A as HANDS_CONFINEMENT,v as HANDS_CLOUD_ACCESS_KEY,u as HANDS_CLOUD_ACCESS,N as AUTOMATION_USER_CHROME,O as AUTOMATION_CLOUD_SESSIONS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Aa as a}from"./vm-hands-entry-lite-nhfd61cx.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export default a();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{qi as a,ri as b,si as c,ti as d,ui as e,vi as f,wi as g,xi as h,yi as i,zi as j}from"./vm-hands-entry-lite-q9gjfqev.js";import"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-e8skq97c.js";import"./vm-hands-entry-lite-y3wncwjd.js";import"./vm-hands-entry-lite-7fx4xtf6.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 q,Ah as R,Bh as S,Ch as T,Dh as U,Eh as V,Fh as W,Gh as X,Hh as Y,Ih as Z,Lg as a,Mg as b,Ng as c,Og as d,Pg as e,Qg as f,Rg as g,Sg as h,Tg as i,Ug as j,Vg as k,Wg as l,Xg as m,Yg as n,Zg as o,_g as p,ah as r,bh as s,ch as t,dh as u,eh as v,fh as w,gh as x,hh as y,ih as z,jh as A,kh as B,lh as C,mh as D,nh as E,oh as F,ph as G,qh as H,rh as I,sh as J,th as K,uh as L,vh as M,wh as N,xh as O,yh as P,zh as Q}from"./vm-hands-entry-lite-3ydgst12.js";import"./vm-hands-entry-lite-5jbnm3bm.js";import"./vm-hands-entry-lite-1c1rxx8v.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 v,Ah as W,Bh as X,Ch as Y,Dh as Z,Gg as a,Hg as b,Ig as c,Jg as d,Kg as e,Lg as f,Mg as g,Ng as h,Og as i,Pg as j,Qg as k,Rg as l,Sg as m,Tg as n,Ug as o,Vg as p,Wg as q,Xg as r,Yg as s,Zg as t,_g as u,ah as w,bh as x,ch as y,dh as z,eh as A,fh as B,gh as C,hh as D,ih as E,jh as F,kh as G,lh as H,mh as I,nh as J,oh as K,ph as L,qh as M,rh as N,sh as O,th as P,uh as Q,vh as R,wh as S,xh as T,yh as U,zh as V}from"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{w as reasonHandsCloseReason,Y as parseReasonHandsSdkResponse,X as parseReasonHandsSdkRequest,J as parseReasonHandsResult,I as parseReasonHandsRequest,P as parseReasonHandsPtyReceipt,K as parseReasonHandsProgress,O as parseReasonHandsJobResult,N as parseReasonHandsJobRequest,M as parseReasonHandsClaimAck,L as parseReasonHandsClaim,Q as parseReasonHandsCancelRequest,R as parseReasonHandsCancelAck,F as isReasonHandsUuid,D as isReasonHandsRequestId,G as isReasonHandsPtyJobId,E as isReasonHandsGeneration,H as isReasonHandsArtifactSha256,Z as encodeReasonHandsSdkResponse,T as encodeReasonHandsResult,S as encodeReasonHandsRequest,U as encodeReasonHandsProgress,W as encodeReasonHandsClaimAck,V as encodeReasonHandsClaim,y as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,A as REASON_HANDS_SDK_MAX_QUERY_CHARS,z as REASON_HANDS_SDK_MAX_NAME_CHARS,n as REASON_HANDS_PTY_PROTOCOL_VERSION,q as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,p as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,o as REASON_HANDS_PTY_MAX_INPUT_BYTES,r as REASON_HANDS_PTY_MAX_DIMENSION,s as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,u as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,t as REASON_HANDS_PTY_ANCHOR_EXIT_MS,a as REASON_HANDS_PROTOCOL_VERSION,f as REASON_HANDS_OUTPUT_TRUNCATED_MARKER,d as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,e as REASON_HANDS_MAX_OUTPUT_CHARS,c as REASON_HANDS_MAX_INPUT_CHARS,b as REASON_HANDS_MAX_FRAME_BYTES,g as REASON_HANDS_MAX_ERROR_CHARS,h as REASON_HANDS_JOB_PROTOCOL_VERSION,l as REASON_HANDS_JOB_MAX_RECORDS,k as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,j as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,i as REASON_HANDS_JOB_MAX_INPUT_CHARS,B as REASON_HANDS_JOB_ERRORS,m as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,x as REASON_HANDS_ERROR_CODES,v as REASON_HANDS_CLOSE_CODES,C as HandsProtocolError};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Dd as a,Ed as b,Fd as c,Gd as d,Hd as e,Id as f,Jd as g,Kd as h,Ld as i,Md as j,Nd as k,Od as l,Pd as m,Qd as n,Rd as o,Sd as p,Td as q,Ud as r}from"./vm-hands-entry-lite-4s4qrm5m.js";import"./vm-hands-entry-lite-w4swepp1.js";import"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-s65swswr.js";import"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{g as workerServiceRetargetPending,f as workerServiceProgram,m as workerServiceProcessRunning,e as workerServiceLauncher,j as workerServiceDefinitions,n as workerServiceDefinitionCurrent,l as retireLegacyWorkerService,q as retargetWorkerServiceLogs,p as restartWorkerService,r as removeWorkerService,i as isConnectServiceLabel,k as installedWorkerService,o as installWorkerService,c as defaultWorkerServiceHost,h as connectServiceLabel,d as WorkerServiceError,a as WORKER_SERVICE_ENV,b as WORKER_IDENTITY_UNAVAILABLE_CODE};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as jq,b as Dq,c as Vq,d as kq,g as Hq,h as zq,m as Aq}from"./vm-hands-entry-lite-wmd391jw.js";import"./vm-hands-entry-lite-0q46m8na.js";import{y as Fq}from"./vm-hands-entry-lite-zg9a3kv5.js";import{A as Wq,K as bq}from"./vm-hands-entry-lite-10sgx6g1.js";import"./vm-hands-entry-lite-c4mk1cwv.js";import"./vm-hands-entry-lite-smhq7c4x.js";import"./vm-hands-entry-lite-1yn5vrs6.js";import"./vm-hands-entry-lite-cgh7q3ss.js";import"./vm-hands-entry-lite-jmfb6mqq.js";import"./vm-hands-entry-lite-gxjxx1r2.js";import"./vm-hands-entry-lite-khnx8tzk.js";import"./vm-hands-entry-lite-f4gvypnx.js";import"./vm-hands-entry-lite-wry37am5.js";import"./vm-hands-entry-lite-wej1p1ry.js";import"./vm-hands-entry-lite-0csqb5x1.js";import"./vm-hands-entry-lite-qdb917g9.js";import"./vm-hands-entry-lite-pp4mnye8.js";import{ke as Kq}from"./vm-hands-entry-lite-6hcx1k08.js";import"./vm-hands-entry-lite-4p6v05yh.js";import"./vm-hands-entry-lite-7cqmn2f8.js";import"./vm-hands-entry-lite-dyyhxg5m.js";import{tg as Qq,yg as Bq}from"./vm-hands-entry-lite-ht2k3g94.js";import"./vm-hands-entry-lite-mq8bw5c9.js";import"./vm-hands-entry-lite-3ydgst12.js";import"./vm-hands-entry-lite-44f1pr87.js";import{ai as z,ci as u,di as s}from"./vm-hands-entry-lite-thskh018.js";import"./vm-hands-entry-lite-peqmq6j6.js";import"./vm-hands-entry-lite-4zg490k6.js";import"./vm-hands-entry-lite-5cmafbnh.js";import{Ui as l}from"./vm-hands-entry-lite-0rwpp6hr.js";import"./vm-hands-entry-lite-5jbnm3bm.js";import{sj as N}from"./vm-hands-entry-lite-21856esq.js";import"./vm-hands-entry-lite-59napxaf.js";import"./vm-hands-entry-lite-6gtpyxz7.js";import{Rj as G}from"./vm-hands-entry-lite-p30699xy.js";import"./vm-hands-entry-lite-q01t7ykc.js";import"./vm-hands-entry-lite-d2pbd9ky.js";import{dk as $q}from"./vm-hands-entry-lite-1c1rxx8v.js";import{createHash as aq,randomBytes as nq}from"crypto";import{readFileSync as eq,realpathSync as Pq,renameSync as q3,unlinkSync as x3,writeFileSync as J3}from"fs";import{dirname as X3,join as yq}from"path";import{spawnSync as wq}from"child_process";import{accessSync as Lq,constants as fq,existsSync as L,mkdirSync as Sq,readFileSync as hq,renameSync as Cq,writeFileSync as gq}from"fs";import{homedir as mq}from"os";import{delimiter as pq,dirname as dq,join as T}from"path";import{existsSync as vq,readFileSync as Eq}from"fs";import{join as Mq}from"path";var _q=`---
2
+ import{a as jq,b as Dq,c as Vq,d as kq,g as Hq,h as zq,m as Aq}from"./vm-hands-entry-lite-pasmdmkj.js";import"./vm-hands-entry-lite-d7y6aah1.js";import{y as Fq}from"./vm-hands-entry-lite-bt6esncn.js";import{A as Wq,K as bq}from"./vm-hands-entry-lite-8sddhaka.js";import"./vm-hands-entry-lite-w81kt3sf.js";import"./vm-hands-entry-lite-sfsgeynk.js";import"./vm-hands-entry-lite-4nkcn8sy.js";import"./vm-hands-entry-lite-kxajkxmr.js";import"./vm-hands-entry-lite-b775ysr4.js";import"./vm-hands-entry-lite-mcv6pse6.js";import"./vm-hands-entry-lite-dq1fdx0j.js";import"./vm-hands-entry-lite-g9rvf5qk.js";import"./vm-hands-entry-lite-hh24bq0d.js";import"./vm-hands-entry-lite-2c88t2at.js";import"./vm-hands-entry-lite-1gk31757.js";import"./vm-hands-entry-lite-4s4qrm5m.js";import{fe as Kq}from"./vm-hands-entry-lite-w4swepp1.js";import"./vm-hands-entry-lite-2fyemnas.js";import"./vm-hands-entry-lite-fp51jz5j.js";import"./vm-hands-entry-lite-x9pmwqjd.js";import{og as Qq,tg as Bq}from"./vm-hands-entry-lite-vygp7vq8.js";import"./vm-hands-entry-lite-y9wkxydj.js";import"./vm-hands-entry-lite-dm52srp5.js";import"./vm-hands-entry-lite-g576hpce.js";import{Xh as z,Zh as u,_h as s}from"./vm-hands-entry-lite-gzyps3ev.js";import"./vm-hands-entry-lite-5zmn6a7p.js";import"./vm-hands-entry-lite-q9gjfqev.js";import"./vm-hands-entry-lite-rjwk6sfj.js";import"./vm-hands-entry-lite-s65swswr.js";import{Wi as l}from"./vm-hands-entry-lite-9fr904x2.js";import"./vm-hands-entry-lite-db4z7ekz.js";import{uj as N}from"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-e8skq97c.js";import{Tj as G}from"./vm-hands-entry-lite-zmf1terc.js";import"./vm-hands-entry-lite-ngytzkx1.js";import"./vm-hands-entry-lite-y3wncwjd.js";import{fk as $q}from"./vm-hands-entry-lite-7fx4xtf6.js";import{createHash as aq,randomBytes as nq}from"crypto";import{readFileSync as eq,realpathSync as Pq,renameSync as q3,unlinkSync as x3,writeFileSync as J3}from"fs";import{dirname as X3,join as yq}from"path";import{spawnSync as wq}from"child_process";import{accessSync as Lq,constants as fq,existsSync as L,mkdirSync as Sq,readFileSync as hq,renameSync as Cq,writeFileSync as gq}from"fs";import{homedir as mq}from"os";import{delimiter as pq,dirname as dq,join as T}from"path";import{existsSync as vq,readFileSync as Eq}from"fs";import{join as Mq}from"path";var _q=`---
3
3
  name: reason
4
4
  description: Integrate software with Reason's public REST API using a scoped API key. Use for API clients, CI, service integrations, or cloud coding-session automation.
5
5
  ---
@@ -79,7 +79,7 @@ This computer
79
79
  `),W.version)x.stdout.write(`Version: ${W.version}${W.version===N?"":` (${N} is installed; \`reason connect\` restarts it on that)`}
80
80
  `);if(x.stdout.write(`Folder: ${W.folder}
81
81
  `),x.stdout.write(`Sessions: ${W.sessions_running===null?"":`${W.sessions_running} running, `}${W.sessions_max===null?"every Session you start":W.sessions_max===1?"one at a time":`up to ${W.sessions_max} at once`}
82
- `),A){let Z=A,H=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Oq,reasonIdentity:Tq}=await import("./permissions-b8k7me17.js"),{macScreenStatus:Uq}=await import("./local-display-mac-v9ev5jg4.js");return Rq(await Oq({identity:()=>Tq(),grants:Uq,worker:async()=>Z}))}))().catch(()=>null);if(H)x.stdout.write(`${H}
82
+ `),A){let Z=A,H=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Oq,reasonIdentity:Tq}=await import("./permissions-bc9v5k73.js"),{macScreenStatus:Uq}=await import("./local-display-mac-x0eq4rzq.js");return Rq(await Oq({identity:()=>Tq(),grants:Uq,worker:async()=>Z}))}))().catch(()=>null);if(H)x.stdout.write(`${H}
83
83
  `);x.stdout.write(`Keep awake: ${A.keep_awake.enabled?"on":"off"}${A.keep_awake.holding?" (holding)":""}
84
84
  `)}if(W.service)x.stdout.write(`Logs: ${W.service.logs}
85
85
  `);for(let Z of W.workspaces??[]){let H=Z.state==="removed"?"removed from that workspace":Z.blocked?"offline (this computer is outside that workspace's allowed networks)":Z.device_id?Gq[Z.state]:"connecting";x.stdout.write(`Also in workspace ${Z.name??Z.organization_id}${Z.account?" (another Reason account's)":""}: ${H}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{uj as a,vj as b,wj as c,xj as d}from"./vm-hands-entry-lite-ew42tvvz.js";import"./vm-hands-entry-lite-me398z5a.js";import"./vm-hands-entry-lite-7fx4xtf6.js";export{c as compareCliVersions,d as cliAndAgentVersion,b as CLI_VERSION_PATTERN,a as CLI_VERSION};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Kd as ie,Md as oe}from"./vm-hands-entry-lite-pp4mnye8.js";import{lf as he}from"./vm-hands-entry-lite-4p6v05yh.js";import{$f as T,Jf as q,Kf as ee,Mf as D,Nf as ye,Qf as W,Rf as z,Sf as v,ag as Fe}from"./vm-hands-entry-lite-7cqmn2f8.js";import{Gg as ge}from"./vm-hands-entry-lite-mq8bw5c9.js";import{si as re}from"./vm-hands-entry-lite-4zg490k6.js";import{Oi as J}from"./vm-hands-entry-lite-5cmafbnh.js";import{Ui as y}from"./vm-hands-entry-lite-0rwpp6hr.js";import{Lj as xe,Mj as te}from"./vm-hands-entry-lite-6gtpyxz7.js";import{Sj as be,Yj as we}from"./vm-hands-entry-lite-q01t7ykc.js";import{Zj as f}from"./vm-hands-entry-lite-d2pbd9ky.js";import{spawn as O}from"child_process";import{randomUUID as Se}from"crypto";import{closeSync as ct,copyFileSync as ce,existsSync as G,fstatSync as lt,mkdirSync as le,openSync as ut,readdirSync as F,readFileSync as Ae,readlinkSync as dt,renameSync as ft,rmSync as mt,statSync as pt}from"fs";import{connect as _t}from"net";import{userInfo as Oe}from"os";import{basename as ue,dirname as U,join as _}from"path";var V=`import { spawn, execFileSync } from "node:child_process";
2
+ import{Fd as ie,Hd as oe}from"./vm-hands-entry-lite-4s4qrm5m.js";import{gf as he}from"./vm-hands-entry-lite-2fyemnas.js";import{Ef as q,Ff as ee,Hf as D,If as ye,Lf as W,Mf as z,Nf as v,Wf as T,Xf as Fe}from"./vm-hands-entry-lite-fp51jz5j.js";import{Bg as ge}from"./vm-hands-entry-lite-y9wkxydj.js";import{pi as re}from"./vm-hands-entry-lite-q9gjfqev.js";import{Qi as J}from"./vm-hands-entry-lite-s65swswr.js";import{Wi as y}from"./vm-hands-entry-lite-9fr904x2.js";import{Nj as xe,Oj as te}from"./vm-hands-entry-lite-e8skq97c.js";import{Uj as be,_j as we}from"./vm-hands-entry-lite-ngytzkx1.js";import{$j as f}from"./vm-hands-entry-lite-y3wncwjd.js";import{spawn as O}from"child_process";import{randomUUID as Se}from"crypto";import{closeSync as ct,copyFileSync as ce,existsSync as G,fstatSync as lt,mkdirSync as le,openSync as ut,readdirSync as F,readFileSync as Ae,readlinkSync as dt,renameSync as ft,rmSync as mt,statSync as pt}from"fs";import{connect as _t}from"net";import{userInfo as Oe}from"os";import{basename as ue,dirname as U,join as _}from"path";var V=`import { spawn, execFileSync } from "node:child_process";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { readFileSync, readlinkSync, lstatSync, realpathSync, statSync, mkdtempSync, mkdirSync, chmodSync, writeFileSync, readdirSync, rmSync, openSync, readSync, closeSync, renameSync } from "node:fs";
5
5
  import { tmpdir } from "node:os";
@@ -698,4 +698,4 @@ if(process.env.REASON_CLOUD_GATEWAY_EXEC === "1") {
698
698
  `),1;if(e.length===1&&e[0]==="doctor"){let s=await(r.grants??xe)(i);if(!s)return t.write(`Reason computer use: Reason's permissions could not be read (computer_use_permission_status_unavailable)
699
699
  `),1;return(r.stdout??process.stdout).write(Nt(s)),0}if(e.length!==1||e[0]!=="mcp")return t.write(`Usage: reason __computer-use mcp|doctor
700
700
  `),2;let[a,...c]=i;return(r.run??Rt)(a,[...c,o.ocu,"mcp"],{...process.env,OPEN_COMPUTER_USE_DISABLE_APP_AGENT_PROXY:"1"})}function Nr(e=v){return e()?.userChrome??{code:"user_chrome_browser_use_missing"}}function Ne(e,r,t,i){return new Promise((o)=>{let a=O(e,r,{env:t,stdio:"ignore"}),c=setTimeout(()=>{a.kill("SIGKILL"),o(-1)},i);a.once("error",()=>{clearTimeout(c),o(-1)}),a.once("exit",(s)=>{clearTimeout(c),o(s??-1)})})}function Tt(e,r,t,i){return new Promise((o)=>{let a=O(e,r,{env:t,stdio:["ignore","pipe","ignore"]}),c="";a.stdout.setEncoding("utf8").on("data",(l)=>{c+=l});let s=setTimeout(()=>{a.kill("SIGKILL"),o(null)},i);a.once("error",()=>{clearTimeout(s),o(null)}),a.once("close",(l)=>{clearTimeout(s),o(l===0?c:null)})})}var Ct="/tmp/open-browser-use",It=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,kt=33554432;function qt(e,r){let t;try{t=e===null?null:JSON.parse(e)}catch{return null}let i=E(t)&&E(t.result)?t.result.metadata:null;if(!E(i)||i.extensionId!==r)return null;return typeof i.extensionInstanceId==="string"&&It.test(i.extensionInstanceId)?i.extensionInstanceId:null}async function Re(e,r,t){let i=t.storages.map((s)=>{try{return F(s).filter((l)=>l.endsWith(".log")||l.endsWith(".ldb")).map((l)=>_(s,l))}catch{return[]}}),o;try{o=i.some((s)=>s.length>0)?F(t.socketDir).filter((s)=>s.endsWith(".sock")):[]}catch{return[]}let a=[];for(let s of o){let l=_(t.socketDir,s),u=qt(await Tt(e,["info","--socket",l,"--timeout","2s"],r,5000),t.extensionId);if(u)a.push({instance:u,socket:l})}let c=[];for(let[s,l]of(a.length>0?i:[]).entries())for(let u of l)try{if(pt(u).size>kt)continue;let n=Ae(u),d=a.find((m)=>n.includes(m.instance));if(d){c.push({storage:t.storages[s],...d});break}}catch{}return c}async function Et(e,r,t){return(await Re(e,r,t))[0]?.instance??null}function Te(e,r,t){return Et(e,r,{socketDir:Ct,extensionId:D,storages:[_(t,"browser-profile","Default","Local Extension Settings",D)]})}var fe=/^(Default|Profile ([0-9]+))$/;async function Bt(e,r,t=y(),i=W){let o=_(t,"Library","Application Support","Google","Chrome"),a=[];try{a=F(o)}catch(n){if(n.code==="EPERM")throw new f("browser_use_chrome_access_denied","macOS blocked Reason from reading Chrome's profiles. Allow Full Disk Access for Reason on this Mac and try again.")}let c=(n)=>Number(fe.exec(n)?.[2]??-1),s=a.filter((n)=>fe.test(n)&&G(_(o,n,"Extensions",q))).sort((n,d)=>c(n)-c(d)),l=(n)=>_(o,n,"Local Extension Settings",q);return(await Re(e,r,{socketDir:i,extensionId:q,storages:s.map(l)})).map(({storage:n,instance:d,socket:m})=>({profile:s.find((p)=>l(p)===n),instance:d,socket:m}))}async function Ft(e,r,t=y(),i=W){let o=(await Bt(e,r,t,i))[0]?.instance;if(!o)throw new f("automation_user_chrome_not_connected","No Chrome profile on this Mac is connected to Reason. Open Chrome with the Reason extension, then try again.");return o}function me(e){return new Promise((r)=>{let t=_t({path:e}),i=(o)=>{t.destroy(),r(o)};t.setTimeout(1000,()=>i(!1)),t.once("error",()=>i(!1)),t.once("connect",()=>i(!0))})}async function Ce(e,r){let t=Date.now()+r;while(Date.now()<t){if(await e())return!0;await new Promise((i)=>setTimeout(i,200))}return!1}var $=new Map;function L(e,r){let t=$.get(e);if(!t)t=r().finally(()=>$.delete(e)),$.set(e,t);return t}async function Pt(e,r){if(await me(e))return;if(mt(e,{force:!0}),await Ne("dbus-daemon",["--session",`--address=unix:path=${e}`,"--fork"],r,1e4)!==0||!await Ce(()=>me(e),5000))throw new f("automation_unavailable","Reason could not start the desktop session bus.")}async function pe(e,r,t){let i=e.platform==="darwin-arm64"?async()=>await Te(e.nativeHost,r,t)!==null:async()=>await Ne(e.nativeHost,["info"],r,5000)===0;if(await i())return;let o=["--profile-directory=Default",`--load-extension=${e.extensionDir}`,"--no-first-run","--no-default-browser-check","--window-size=1280,800","about:blank"],a,c=null,s=0;if(e.platform==="darwin-arm64"){let n=_(t,"browser-profile");T(n);let d=_(n,"NativeMessagingHosts");le(d,{recursive:!0,mode:448});let m=z(e.platform).nativeHostManifests[0];ce(m,_(d,ue(m)));let p=e.browser.slice(0,e.browser.indexOf(".app/")+4),b=o.filter((A)=>A!=="about:blank").concat("--no-startup-window","--use-mock-keychain");a=O("/usr/bin/open",["-g","-n","-a",p,"--args",`--user-data-dir=${n}`,...b],{env:r,stdio:"ignore"})}else{let n=_(r.HOME,".config","google-chrome"),d=_(n,"NativeMessagingHosts");le(d,{recursive:!0,mode:448});let m=z(e.platform).nativeHostManifests[0];ce(m,_(d,ue(m)));let p=process.geteuid?.()===0?["--no-sandbox"]:[];c=_(t,"browser.log");let b=ut(c,"a",384);s=lt(b).size,a=O(e.browser,[`--user-data-dir=${n}`,...o,...p,"--force-renderer-accessibility"],{detached:!0,stdio:["ignore",b,b],env:{...r,ACCESSIBILITY_ENABLED:"1"}}),ct(b)}let l=!1;a.once("error",()=>{l=!0}),a.once("exit",(n)=>{l||=n!==0}),a.unref();let u=!1;if(await Ce(async()=>l||(u=await i()),St),!u){if(c&&Ae(c).subarray(s).toString("utf8").includes("No usable sandbox"))throw new f("automation_browser_sandbox_unavailable","Chromium found no usable sandbox on this machine. Run the worker as a non-root user with unprivileged user namespaces enabled, or in a container with seccomp unconfined.");throw new f("automation_browser_unavailable","Reason could not connect the desktop browser.")}}async function Rr(e){await qe(e,!0)}function Tr(e){return Ie(e,ke(e))}function Ie(e,r){return e.platform==="darwin-arm64"?_(r,"browser-profile"):_(r,"home",".config","google-chrome")}function ke(e){let r=_(e.root,"automation");if(!G(r)||!$t(e.automation))return e.automation;if(!Lt(Ie(e,r)))try{ft(r,e.automation)}catch{}return G(r)?r:e.automation}function $t(e){try{return F(e).length===0}catch(r){return r.code==="ENOENT"}}function Lt(e){let r;try{r=dt(_(e,"SingletonLock"))}catch{return!1}let t=Number(r.slice(r.lastIndexOf("-")+1));if(!Number.isSafeInteger(t)||t<=0)return!0;try{return process.kill(t,0),!0}catch(i){return i.code==="EPERM"}}async function qe(e,r){be({root:e.root,automation:e.automation,extensionDir:e.extensionDir});let t=ke(e);T(t);let i=Oe().username,o={USER:i,LOGNAME:i,REASON_AUTOMATION_OCU:e.ocu,REASON_AUTOMATION_OBU:e.nativeHost};if(e.platform==="darwin-arm64"){let n={...o,HOME:y(),PATH:`${U(e.node)}:/usr/bin:/bin:/usr/sbin:/sbin`,REASON_AUTOMATION_OCU:process.execPath,REASON_AUTOMATION_OCU_SUBCOMMAND:vt};if(!r)return n;await L("browser",()=>pe(e,n,t));let d=await Te(e.nativeHost,n,t);if(!d)throw new f("automation_browser_unavailable","Reason could not connect the desktop browser.");return{...n,REASON_AUTOMATION_OBU_INSTANCE:d,REASON_AUTOMATION_BACKGROUND_TABS:"1"}}let a=await Fe(),c=_(t,"home"),s=_(t,"runtime");T(c),T(s);let l=_(t,"bus"),u={...o,HOME:c,PATH:`${U(e.node)}:/usr/bin:/bin`,DISPLAY:a.display,XAUTHORITY:a.xauthority,XDG_RUNTIME_DIR:s,DBUS_SESSION_BUS_ADDRESS:`unix:path=${l}`,...a.sound?{PULSE_SERVER:ye(a.sound)}:{}};if(await L("bus",()=>Pt(l,u)),r)await L("browser",()=>pe(e,u,t));return u}async function Dt(e,r,t){let i=Oe().username,o={USER:i,LOGNAME:i,HOME:y(),PATH:`${U(e.node)}:/usr/bin:/bin:/usr/sbin:/sbin`,REASON_AUTOMATION_OBU:r,REASON_AUTOMATION_BACKGROUND_TABS:"1"},a=await Ft(r,o);return t.throwIfAborted(),{...o,REASON_AUTOMATION_OBU_INSTANCE:a}}function Ee(e,r,t,i){if(typeof de!=="string")return Promise.reject(new f("automation_unavailable","This Reason build has no automation runtime."));let o=de;return new Promise((a,c)=>{let s=O(e,["--input-type=module","--eval",o],{env:{...r,REASON_CLOUD_GATEWAY_EXEC:"1",REASON_AUTOMATION_INLINE_RESULT:"1"},stdio:["pipe","pipe","pipe"],detached:!0}),l=[],u=0,n="",d=null,m=!1,p=(h)=>{d??=h;try{process.kill(-s.pid,"SIGKILL")}catch{s.kill("SIGKILL")}},b=(h)=>{if(m)return;m=!0,clearTimeout(A),i.removeEventListener("abort",x),h()},A=setTimeout(()=>p(new f("automation_timed_out","Reason automation did not finish in time.")),wt),x=()=>p(new f("cancelled","Reason cancelled the automation call."));if(i.addEventListener("abort",x,{once:!0}),s.stdout.on("data",(h)=>{if(u+=h.byteLength,u>ht)p(new f("automation_output_too_large","Reason automation output is too large."));else l.push(h)}),s.stderr.setEncoding("utf8").on("data",(h)=>{n=(n+h).slice(-gt)}),s.stdin.on("error",()=>{}),s.once("error",()=>b(()=>c(d??new f("automation_unavailable","Reason could not start the automation runtime.")))),s.once("close",(h)=>b(()=>{if(d)c(d);else a({code:h??1,stdout:Buffer.concat(l),stderr:n})})),i.aborted)x();s.stdin.end(t)})}var S=new Map;function Gt(e,r,t){for(let[o,a]of S)if(a.expiresAt<=t)S.delete(o);while(S.size>=yt)S.delete(S.keys().next().value);let i=Se();return S.set(i,{runId:e,bytes:r,expiresAt:t+xt}),i}async function Be(e,r,t,i={}){let o=await(i.environment??qe)(e,r.kind==="browser");return t.throwIfAborted(),await(i.runtime??Ee)(e.node,o,JSON.stringify(r),t)}async function Cr(e,r){let t=ve({call:e});if(!("call"in t))B();let i=v();if(!i?.features.computer||t.call.kind==="browser"&&!i.features.browser)throw new f("automation_unavailable","Run `reason desktop install` on this machine to enable computer and browser use.");return await Be(i,t.call,r)}function _e(e,r,t){let i=e.stdout.byteLength>M?Gt(r,e.stdout,t):void 0;return{code:e.code,stderr:e.stderr,instance_id:Ot,output_bytes:e.stdout.byteLength,chunk:e.stdout.subarray(0,M).toString("base64"),...i?{output_id:i}:{}}}async function Ir(e,r={}){let t=ve(e.payload),i=(r.now??Date.now)();if("output_id"in t){let p=S.get(t.output_id);if(!p||p.runId!==e.runId||p.expiresAt<=i||t.offset>p.bytes.byteLength)throw new f("automation_output_unavailable","Reason automation output expired.");return{chunk:p.bytes.subarray(t.offset,t.offset+M).toString("base64")}}let o=(r.components??v)(),a=(r.platform??process.platform)==="darwin",c=a?(r.macIdentity??J)():[],s=r.macSetup??k,l=!o?.features.computer||t.call.kind==="browser"&&!t.userChrome&&!o.features.browser;if(a&&(l||c.length===0||t.call.kind==="browser"&&t.userChrome&&!e.userChrome))return _e(await se({runId:e.runId,call:t.call,identity:c,desktopMissing:l,signal:e.signal},s),e.runId,i);if(!o?.features.computer)throw new f("automation_unavailable","Run `reason desktop install` on this machine to enable computer and browser use.");let u=t.userChrome?e.userChrome:void 0;if(t.userChrome&&!u)throw new f("automation_user_chrome_unavailable","Your own Chrome is not enabled on this computer: run `reason desktop install` on this Mac (and `reason connect --user-chrome on` if you turned it off).");if(t.call.kind==="browser"&&!u&&!o.features.browser)throw new f("automation_browser_not_installed",o.platform==="darwin-arm64"?"Browser use is unavailable on this machine: re-run `reason desktop install`.":"Browser use is unavailable on this machine: install a non-snap Chromium at /usr/bin/chromium, then re-run `reason desktop install`.");e.signal.throwIfAborted();let n=await we(e.runId,e.signal,r.now),d="account"in r?r.account??null:ge(),m;try{if(u){let p=await(r.userChromeEnvironment??Dt)(o,u,e.signal);e.signal.throwIfAborted(),m=await(r.runtime??Ee)(o.node,p,JSON.stringify(t.call),e.signal)}else if(d)m=await(r.delegate??X)(d,t.call,e.signal);else m=await Be(o,t.call,e.signal,r)}finally{n()}if(a)m=await ne({runId:e.runId,call:t.call,identity:c,output:m,signal:e.signal},s);return _e(m,e.runId,i)}
701
- export{Ke as vd,M as wd,ve as xd,Or as yd,Rt as zd,vr as Ad,Nr as Bd,Bt as Cd,Ft as Dd,Rr as Ed,Tr as Fd,Cr as Gd,Ir as Hd};
701
+ export{Ke as qd,M as rd,ve as sd,Or as td,Rt as ud,vr as vd,Nr as wd,Bt as xd,Ft as yd,Rr as zd,Tr as Ad,Cr as Bd,Ir as Cd};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Rj as w}from"./vm-hands-entry-lite-p30699xy.js";var S="inference.custom.v1",K=32768,P=67108864,Q=16384,T=204800,z=600000,U=["content-type","anthropic-version","user-agent"],L=w.enum(["openai-completions","openai-responses","anthropic-messages"]),V=new Set(U),W=w.record(w.string(),w.string().max(2048)).refine((j)=>Object.keys(j).every((A)=>V.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 X(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 O=A.api==="openai-completions"?"/chat/completions":A.api==="openai-responses"?"/responses":"/v1/messages";return D.pathname===B.pathname.replace(/\/+$/,"")+O}var b=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<=T).optional(),headers:W,credentialOrganizationId:w.string().uuid(),accountKey:w.string().min(1).max(256).optional()}).strict().refine((j)=>L.options.some((A)=>X(j,{baseUrl:j.baseUrl,api:A,execution:"device"})),"Invalid custom endpoint inference URL"),k=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(),y=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(P),chunks:w.number().int().min(0).max(Q)}).strict(),p=w.object({apiKey:w.string().min(1).max(16384).refine((j)=>!/[\r\n\0]/.test(j)),api:L}).strict(),Y=["custom_endpoint_host_not_found","custom_endpoint_connection_failed","custom_endpoint_tls_failed"];function c(j){return typeof j==="string"&&Y.includes(j)}var Z="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. ${Z}`,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."},q="Local custom endpoints require a session on your connected computer. This custom endpoint's Execution location is Your computer, so Reason cloud never calls it. Connect your computer with the Reason desktop app or CLI and run this session there, or set the endpoint's Execution location to Reason cloud with a public https Base URL in Models, or choose another model.";function _(j){return typeof j==="string"&&j.startsWith("Local custom endpoints require a session on your connected computer.")}var $=new Set(Object.values(G));function h(j){return Object.hasOwn(G,j)?G[j]:null}function v(j){return typeof j==="string"&&($.has(j)||_(j))}var N="returned HTTP 403: its firewall blocked Reason cloud",x=/^Your model endpoint \S+ (?:returned HTTP 40[34]|returned HTTP 403: its firewall blocked Reason cloud|was unreachable: it refused the connection)\.$/,C=/Attention Required! \| Cloudflare|Sorry, you have been blocked|cf-error-details/i;function n(j,A,B){if(!/^[a-z0-9.-]+$/i.test(j))return null;if(A==="connection_refused")return`Your model endpoint ${j} was unreachable: it refused the connection.`;if(A===403&&B&&C.test(B))return`Your model endpoint ${j} ${N}.`;return A===403||A===404?`Your model endpoint ${j} returned HTTP ${A}.`:null}function E(j){return typeof j==="string"&&x.test(j)}function d(j){return E(j)&&j.includes(N)}
3
- export{S as $c,K as ad,P as bd,Q as cd,T as dd,z as ed,U as fd,X as gd,b as hd,k as id,y as jd,M as kd,p as ld,Y as md,c as nd,q as od,_ as pd,h as qd,v as rd,n as sd,E as td,d as ud};
2
+ import{Tj as w}from"./vm-hands-entry-lite-zmf1terc.js";var S="inference.custom.v1",K=32768,P=67108864,Q=16384,T=204800,z=600000,U=["content-type","anthropic-version","user-agent"],L=w.enum(["openai-completions","openai-responses","anthropic-messages"]),V=new Set(U),W=w.record(w.string(),w.string().max(2048)).refine((j)=>Object.keys(j).every((A)=>V.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 X(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 O=A.api==="openai-completions"?"/chat/completions":A.api==="openai-responses"?"/responses":"/v1/messages";return D.pathname===B.pathname.replace(/\/+$/,"")+O}var b=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<=T).optional(),headers:W,credentialOrganizationId:w.string().uuid(),accountKey:w.string().min(1).max(256).optional()}).strict().refine((j)=>L.options.some((A)=>X(j,{baseUrl:j.baseUrl,api:A,execution:"device"})),"Invalid custom endpoint inference URL"),k=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(),y=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(P),chunks:w.number().int().min(0).max(Q)}).strict(),p=w.object({apiKey:w.string().min(1).max(16384).refine((j)=>!/[\r\n\0]/.test(j)),api:L}).strict(),Y=["custom_endpoint_host_not_found","custom_endpoint_connection_failed","custom_endpoint_tls_failed"];function c(j){return typeof j==="string"&&Y.includes(j)}var Z="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. ${Z}`,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."},q="Local custom endpoints require a session on your connected computer. This custom endpoint's Execution location is Your computer, so Reason cloud never calls it. Connect your computer with the Reason desktop app or CLI and run this session there, or set the endpoint's Execution location to Reason cloud with a public https Base URL in Models, or choose another model.";function _(j){return typeof j==="string"&&j.startsWith("Local custom endpoints require a session on your connected computer.")}var $=new Set(Object.values(G));function h(j){return Object.hasOwn(G,j)?G[j]:null}function v(j){return typeof j==="string"&&($.has(j)||_(j))}var N="returned HTTP 403: its firewall blocked Reason cloud",x=/^Your model endpoint \S+ (?:returned HTTP 40[34]|returned HTTP 403: its firewall blocked Reason cloud|was unreachable: it refused the connection)\.$/,C=/Attention Required! \| Cloudflare|Sorry, you have been blocked|cf-error-details/i;function n(j,A,B){if(!/^[a-z0-9.-]+$/i.test(j))return null;if(A==="connection_refused")return`Your model endpoint ${j} was unreachable: it refused the connection.`;if(A===403&&B&&C.test(B))return`Your model endpoint ${j} ${N}.`;return A===403||A===404?`Your model endpoint ${j} returned HTTP ${A}.`:null}function E(j){return typeof j==="string"&&x.test(j)}function d(j){return E(j)&&j.includes(N)}
3
+ export{S as Wc,K as Xc,P as Yc,Q as Zc,T as _c,z as $c,U as ad,X as bd,b as cd,k as dd,y as ed,M as fd,p as gd,Y as hd,c as id,q as jd,_ as kd,h as ld,v as md,n as nd,E as od,d as pd};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Rj as W}from"./vm-hands-entry-lite-p30699xy.js";var T=W.string().max(201).regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/).refine((Q)=>Q.split("/").every((Z)=>Z!=="."&&Z!=="..")),G=W.string().min(1).max(255).regex(/^[A-Za-z0-9_][A-Za-z0-9_./-]*$/).refine((Q)=>!Q.includes("..")&&!Q.includes("//")&&!Q.endsWith("/")&&!Q.endsWith(".lock")),M=W.string().regex(/^[a-f0-9]{40}$/),q=W.number().int().positive(),C=W.string().min(1).max(256),A=W.string().max(60000),B={version:W.literal(1),repoFullName:T},J=W.array(W.string().max(1024).regex(/^(?:Co-authored-by: [^<>\r\n\x00]+ <[^<>\s]+@[^<>\s]+>|Reason-Contributor-ID: rc_[a-f0-9]{32})$/)).max(1000),c=W.strictObject({expectedTrailers:J,missingFromHead:J}),y=W.discriminatedUnion("action",[W.strictObject({action:W.literal("edit"),title:C.optional(),body:A.optional(),base:G.optional()}),W.strictObject({action:W.enum(["ready","draft","close"])}),W.strictObject({action:W.literal("metadata"),field:W.enum(["reviewer","assignee","label"]),change:W.enum(["add","remove"]),value:W.string().min(1).max(100).refine((Q)=>!/[\r\n\0]/.test(Q))})]),d=W.discriminatedUnion("kind",[W.strictObject({...B,kind:W.literal("read"),path:W.string().min(1).max(2048),accept:W.enum(["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"]).optional()}),W.strictObject({...B,kind:W.literal("pr_review_context"),number:q,after:W.string().min(1).max(1024).optional()}),W.strictObject({...B,kind:W.literal("prepare"),branch:G,baseSha:M,defaultBranch:G,diagnosticsVersion:W.literal(1).optional()}),W.strictObject({...B,kind:W.literal("publish"),branch:G,defaultBranch:G,baseSha:M,remoteHeadSha:M.nullable(),contributorTrailers:J.optional()}),W.strictObject({...B,kind:W.literal("pr_create"),head:G,base:G,title:C,body:A,draft:W.boolean()}),W.strictObject({...B,kind:W.literal("pr_mutation"),number:q,mutation:y}),W.strictObject({...B,kind:W.literal("pr_merge"),number:q,expectedHeadSha:M,expectedBaseRef:G,method:W.enum(["merge","squash","rebase"]),commitBody:W.string().max(65536).optional()})]),O=["local_device_gh_prepare_setup","local_device_gh_prepare_metadata","local_device_gh_prepare_private_init","local_device_gh_prepare_fetch","local_device_gh_prepare_base_mismatch","local_device_gh_prepare_checkout_validation","local_device_gh_prepare_checkout_init","local_device_gh_prepare_materialization"];function h(Q){return O.some((Z)=>Z===Q)}class R extends Error{code;constructor(Q){super(Q);this.code=Q}}function ZQ(Q,Z,$){let z=d.safeParse(Q);return Z==="failed"&&z.success&&z.data.kind==="prepare"&&z.data.diagnosticsVersion===1&&h($)}var x=245760,$Q=W.discriminatedUnion("kind",[W.strictObject({kind:W.literal("pr_review_context"),body:W.string().max(x)}),W.strictObject({kind:W.literal("prepare"),headSha:M}),W.strictObject({kind:W.literal("read"),status:W.number().int().min(200).max(599),headers:W.record(W.string(),W.string().max(8192)).refine((Q)=>Object.keys(Q).every((Z)=>Z==="link"||Z==="content-type")),body:W.string().max(x)}),W.strictObject({kind:W.literal("publish"),headSha:M,scannedObjectCount:W.number().int().min(0).max(5000),attribution:c.optional()}),W.strictObject({kind:W.literal("pr_create"),url:W.string().max(1024).regex(/^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/[1-9][0-9]*$/)}),W.strictObject({kind:W.literal("pr_mutation"),number:q,applied:W.literal(!0)}),W.strictObject({kind:W.literal("pr_merge"),number:q,merged:W.literal(!0)})]).refine((Q)=>new TextEncoder().encode(JSON.stringify(Q)).byteLength<=x,"local_device_gh_result_too_large"),r=W.strictObject({source:W.enum(["agent","human"]),operationId:W.uuid()}),m=W.strictObject({version:W.literal(1),userId:W.guid(),deviceId:W.guid(),rootId:W.guid(),runId:W.guid(),merge:r.optional(),contributorRefresh:W.guid().optional(),repoFullName:T.nullable(),rootRevision:W.string().regex(/^[1-9][0-9]*$/),readOnly:W.boolean(),generation:W.number().int().positive().nullable(),fenceId:W.guid().nullable()}).refine((Q)=>Q.generation===null===(Q.fenceId===null));function P(Q){return/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(Q)&&Q.split("/").every((Z)=>Z!=="."&&Z!=="..")}function KQ(Q,Z,$={},z="read"){if(P(Q)&&(Z==="/search/issues"||Z.startsWith("/search/issues?")))return p(Q,Z,$);if(!P(Q)||!Z.startsWith(`/repos/${Q}/`)&&Z!==`/repos/${Q}`)throw Error("local_device_gh_repository_mismatch");if(/[\\#\u0000-\u001f]/.test(Z)||/%(?:2e|5c|00)/i.test(Z))throw Error("local_device_gh_path_denied");let V=new URL(Z,"https://api.github.com");if(V.pathname!==Z.split("?")[0]||V.username||V.password)throw Error("local_device_gh_path_denied");let Y;try{Y=decodeURIComponent(V.pathname.slice(`/repos/${Q}`.length))}catch{throw Error("local_device_gh_path_denied")}if(Y.includes("%")||Y.split("/").some((D)=>D==="."||D===".."))throw Error("local_device_gh_path_denied");if(($.method??"GET").toUpperCase()!=="GET"||$.body!=null)throw Error("local_device_gh_mutation_not_admitted");if(![/^$/,/^\/commits$/,/^\/pulls$/,/^\/pulls\/[1-9][0-9]*(?:\/(?:commits|files|reviews|comments))?$/,/^\/issues\/[1-9][0-9]*(?:\/comments)?$/,/^\/issues\/comments\/[1-9][0-9]*\/reactions$/,/^\/commits\/[A-Za-z0-9_./-]+(?:\/(?:check-runs|status))?$/,/^\/check-runs\/[1-9][0-9]*(?:\/annotations)?$/,/^\/branches\/[A-Za-z0-9_./-]+$/,/^\/git\/ref\/heads\/[A-Za-z0-9_./-]+$/,/^\/compare\/[A-Za-z0-9_./-]+\.\.\.[A-Za-z0-9_./-]+$/].some((D)=>D.test(Y)))throw Error("local_device_gh_path_denied");if(V.searchParams.forEach((D,X)=>{if(X==="per_page"&&/^[1-9][0-9]*$/.test(D)&&Number(D)<=100)return;if(X==="page"&&/^[1-9][0-9]*$/.test(D)&&Number(D)<=100)return;if(Y==="/pulls"&&X==="state"&&["open","closed","all"].includes(D))return;if(Y==="/pulls"&&X==="sort"&&D==="updated")return;if(Y==="/pulls"&&X==="direction"&&D==="desc")return;if(Y==="/pulls"&&["head","base"].includes(X)&&/^[A-Za-z0-9_./:-]{1,255}$/.test(D))return;throw Error("local_device_gh_query_denied")}),$.headers)new Headers($.headers).forEach((X,_)=>{if(_!=="accept"||!["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"].includes(X))throw Error("local_device_gh_header_denied")})}function p(Q,Z,$){if(/[\\#\u0000-\u001f]/.test(Z))throw Error("local_device_gh_path_denied");let z=new URL(Z,"https://api.github.com");if(z.pathname!=="/search/issues"||z.username||z.password)throw Error("local_device_gh_path_denied");if(($.method??"GET").toUpperCase()!=="GET"||$.body!=null)throw Error("local_device_gh_mutation_not_admitted");let V=null;z.searchParams.forEach((H,D)=>{if(D==="q"&&V===null){V=H;return}if(D==="per_page"&&/^[1-9][0-9]*$/.test(H)&&Number(H)<=100)return;if(D==="page"&&/^[1-9][0-9]*$/.test(H)&&Number(H)<=100)return;throw Error("local_device_gh_query_denied")});let Y=`repo:${Q.toLowerCase()} `,N=V?.toLowerCase()??"";if(N.length>512||!(N+" ").startsWith(Y)||/(?:^|\s)(?:repo|org|user):/.test(N.slice(Y.length)))throw Error("local_device_gh_query_denied");if($.headers)new Headers($.headers).forEach((H,D)=>{if(D!=="accept"||H!=="application/vnd.github+json")throw Error("local_device_gh_header_denied")})}var DQ=`query PullRequestReviewContext($owner: String!, $repo: String!, $number: Int!, $after: String) {
2
+ import{Tj as W}from"./vm-hands-entry-lite-zmf1terc.js";var T=W.string().max(201).regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/).refine((Q)=>Q.split("/").every((Z)=>Z!=="."&&Z!=="..")),G=W.string().min(1).max(255).regex(/^[A-Za-z0-9_][A-Za-z0-9_./-]*$/).refine((Q)=>!Q.includes("..")&&!Q.includes("//")&&!Q.endsWith("/")&&!Q.endsWith(".lock")),M=W.string().regex(/^[a-f0-9]{40}$/),q=W.number().int().positive(),C=W.string().min(1).max(256),A=W.string().max(60000),B={version:W.literal(1),repoFullName:T},J=W.array(W.string().max(1024).regex(/^(?:Co-authored-by: [^<>\r\n\x00]+ <[^<>\s]+@[^<>\s]+>|Reason-Contributor-ID: rc_[a-f0-9]{32})$/)).max(1000),c=W.strictObject({expectedTrailers:J,missingFromHead:J}),y=W.discriminatedUnion("action",[W.strictObject({action:W.literal("edit"),title:C.optional(),body:A.optional(),base:G.optional()}),W.strictObject({action:W.enum(["ready","draft","close"])}),W.strictObject({action:W.literal("metadata"),field:W.enum(["reviewer","assignee","label"]),change:W.enum(["add","remove"]),value:W.string().min(1).max(100).refine((Q)=>!/[\r\n\0]/.test(Q))})]),d=W.discriminatedUnion("kind",[W.strictObject({...B,kind:W.literal("read"),path:W.string().min(1).max(2048),accept:W.enum(["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"]).optional()}),W.strictObject({...B,kind:W.literal("pr_review_context"),number:q,after:W.string().min(1).max(1024).optional()}),W.strictObject({...B,kind:W.literal("prepare"),branch:G,baseSha:M,defaultBranch:G,diagnosticsVersion:W.literal(1).optional()}),W.strictObject({...B,kind:W.literal("publish"),branch:G,defaultBranch:G,baseSha:M,remoteHeadSha:M.nullable(),contributorTrailers:J.optional()}),W.strictObject({...B,kind:W.literal("pr_create"),head:G,base:G,title:C,body:A,draft:W.boolean()}),W.strictObject({...B,kind:W.literal("pr_mutation"),number:q,mutation:y}),W.strictObject({...B,kind:W.literal("pr_merge"),number:q,expectedHeadSha:M,expectedBaseRef:G,method:W.enum(["merge","squash","rebase"]),commitBody:W.string().max(65536).optional()})]),O=["local_device_gh_prepare_setup","local_device_gh_prepare_metadata","local_device_gh_prepare_private_init","local_device_gh_prepare_fetch","local_device_gh_prepare_base_mismatch","local_device_gh_prepare_checkout_validation","local_device_gh_prepare_checkout_init","local_device_gh_prepare_materialization"];function h(Q){return O.some((Z)=>Z===Q)}class R extends Error{code;constructor(Q){super(Q);this.code=Q}}function ZQ(Q,Z,$){let z=d.safeParse(Q);return Z==="failed"&&z.success&&z.data.kind==="prepare"&&z.data.diagnosticsVersion===1&&h($)}var x=245760,$Q=W.discriminatedUnion("kind",[W.strictObject({kind:W.literal("pr_review_context"),body:W.string().max(x)}),W.strictObject({kind:W.literal("prepare"),headSha:M}),W.strictObject({kind:W.literal("read"),status:W.number().int().min(200).max(599),headers:W.record(W.string(),W.string().max(8192)).refine((Q)=>Object.keys(Q).every((Z)=>Z==="link"||Z==="content-type")),body:W.string().max(x)}),W.strictObject({kind:W.literal("publish"),headSha:M,scannedObjectCount:W.number().int().min(0).max(5000),attribution:c.optional()}),W.strictObject({kind:W.literal("pr_create"),url:W.string().max(1024).regex(/^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/[1-9][0-9]*$/)}),W.strictObject({kind:W.literal("pr_mutation"),number:q,applied:W.literal(!0)}),W.strictObject({kind:W.literal("pr_merge"),number:q,merged:W.literal(!0)})]).refine((Q)=>new TextEncoder().encode(JSON.stringify(Q)).byteLength<=x,"local_device_gh_result_too_large"),r=W.strictObject({source:W.enum(["agent","human"]),operationId:W.uuid()}),m=W.strictObject({version:W.literal(1),userId:W.guid(),deviceId:W.guid(),rootId:W.guid(),runId:W.guid(),merge:r.optional(),contributorRefresh:W.guid().optional(),repoFullName:T.nullable(),rootRevision:W.string().regex(/^[1-9][0-9]*$/),readOnly:W.boolean(),generation:W.number().int().positive().nullable(),fenceId:W.guid().nullable()}).refine((Q)=>Q.generation===null===(Q.fenceId===null));function P(Q){return/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(Q)&&Q.split("/").every((Z)=>Z!=="."&&Z!=="..")}function KQ(Q,Z,$={},z="read"){if(P(Q)&&(Z==="/search/issues"||Z.startsWith("/search/issues?")))return p(Q,Z,$);if(!P(Q)||!Z.startsWith(`/repos/${Q}/`)&&Z!==`/repos/${Q}`)throw Error("local_device_gh_repository_mismatch");if(/[\\#\u0000-\u001f]/.test(Z)||/%(?:2e|5c|00)/i.test(Z))throw Error("local_device_gh_path_denied");let V=new URL(Z,"https://api.github.com");if(V.pathname!==Z.split("?")[0]||V.username||V.password)throw Error("local_device_gh_path_denied");let Y;try{Y=decodeURIComponent(V.pathname.slice(`/repos/${Q}`.length))}catch{throw Error("local_device_gh_path_denied")}if(Y.includes("%")||Y.split("/").some((D)=>D==="."||D===".."))throw Error("local_device_gh_path_denied");if(($.method??"GET").toUpperCase()!=="GET"||$.body!=null)throw Error("local_device_gh_mutation_not_admitted");if(![/^$/,/^\/commits$/,/^\/pulls$/,/^\/pulls\/[1-9][0-9]*(?:\/(?:commits|files|reviews|comments))?$/,/^\/issues\/[1-9][0-9]*(?:\/comments)?$/,/^\/issues\/comments\/[1-9][0-9]*\/reactions$/,/^\/commits\/[A-Za-z0-9_./-]+(?:\/(?:check-runs|status))?$/,/^\/check-runs\/[1-9][0-9]*(?:\/annotations)?$/,/^\/branches\/[A-Za-z0-9_./-]+$/,/^\/git\/ref\/heads\/[A-Za-z0-9_./-]+$/,/^\/compare\/[A-Za-z0-9_./-]+\.\.\.[A-Za-z0-9_./-]+$/].some((D)=>D.test(Y)))throw Error("local_device_gh_path_denied");if(V.searchParams.forEach((D,X)=>{if(X==="per_page"&&/^[1-9][0-9]*$/.test(D)&&Number(D)<=100)return;if(X==="page"&&/^[1-9][0-9]*$/.test(D)&&Number(D)<=100)return;if(Y==="/pulls"&&X==="state"&&["open","closed","all"].includes(D))return;if(Y==="/pulls"&&X==="sort"&&D==="updated")return;if(Y==="/pulls"&&X==="direction"&&D==="desc")return;if(Y==="/pulls"&&["head","base"].includes(X)&&/^[A-Za-z0-9_./:-]{1,255}$/.test(D))return;throw Error("local_device_gh_query_denied")}),$.headers)new Headers($.headers).forEach((X,_)=>{if(_!=="accept"||!["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"].includes(X))throw Error("local_device_gh_header_denied")})}function p(Q,Z,$){if(/[\\#\u0000-\u001f]/.test(Z))throw Error("local_device_gh_path_denied");let z=new URL(Z,"https://api.github.com");if(z.pathname!=="/search/issues"||z.username||z.password)throw Error("local_device_gh_path_denied");if(($.method??"GET").toUpperCase()!=="GET"||$.body!=null)throw Error("local_device_gh_mutation_not_admitted");let V=null;z.searchParams.forEach((H,D)=>{if(D==="q"&&V===null){V=H;return}if(D==="per_page"&&/^[1-9][0-9]*$/.test(H)&&Number(H)<=100)return;if(D==="page"&&/^[1-9][0-9]*$/.test(H)&&Number(H)<=100)return;throw Error("local_device_gh_query_denied")});let Y=`repo:${Q.toLowerCase()} `,N=V?.toLowerCase()??"";if(N.length>512||!(N+" ").startsWith(Y)||/(?:^|\s)(?:repo|org|user):/.test(N.slice(Y.length)))throw Error("local_device_gh_query_denied");if($.headers)new Headers($.headers).forEach((H,D)=>{if(D!=="accept"||H!=="application/vnd.github+json")throw Error("local_device_gh_header_denied")})}var DQ=`query PullRequestReviewContext($owner: String!, $repo: String!, $number: Int!, $after: String) {
3
3
  repository(owner: $owner, name: $repo) {
4
4
  nameWithOwner
5
5
  pullRequest(number: $number) {
@@ -39,4 +39,4 @@ import{Rj as W}from"./vm-hands-entry-lite-p30699xy.js";var T=W.string().max(201)
39
39
  `)||!/^[a-f0-9]{64}$/.test(Q.bodySha256))throw Error("Invalid Reason Device proof input.");return Buffer.from([Z,$,Q.pathAndQuery,Q.timestamp,Q.nonce,Q.challenge,Q.bodySha256].join(`
40
40
  `),"utf8")}function K(Q){return Boolean(Q)&&typeof Q==="object"&&!Array.isArray(Q)}function t(Q,Z){return typeof Q==="string"&&Z.some(($)=>$===Q)}function k(Q){return K(Q)&&typeof Q.id==="string"&&typeof Q.label==="string"&&typeof Q.path_fingerprint==="string"}function v(Q){return K(Q)&&Number.isInteger(Q.seq)&&Number(Q.seq)>=0&&typeof Q.kind==="string"&&/^[A-Za-z0-9._:-]{1,64}$/.test(Q.kind)&&K(Q.payload)}function w(Q){throw Error(Q)}function QW(Q,Z){let $=K(Q)?Q:{},z=typeof $.error==="string"?$.error:`http_${Z}`,V=typeof $.detail==="string"?$.detail:typeof $.message==="string"?$.message:`Reason Device request failed (${Z})`;return{code:z,message:V}}function l(Q){if(!K(Q)||typeof Q.challenge!=="string"||Q.challenge.length<16||Q.challenge.length>1024||Q.challenge.includes(`
41
41
  `)||typeof Q.expires_at!=="string"||!Number.isFinite(Date.parse(Q.expires_at)))w("Reason returned an invalid Device proof challenge.");return{challenge:Q.challenge,expires_at:Q.expires_at}}function L(Q,Z){if(!K(Q)||typeof Q.device_id!=="string"||Q.auth_scheme!=="p256"||Q.organization_id!==void 0&&typeof Q.organization_id!=="string"||Q.protocol_version!==j||!Array.isArray(Q.roots)||!Q.roots.every(k)||Z&&typeof Q.organization_id!=="string"||Q.device_credential!==void 0)w(Z?"Reason returned an invalid Device enrollment.":"Reason returned an invalid Device registration.");return{...{device_id:Q.device_id,...typeof Q.organization_id==="string"?{organization_id:Q.organization_id}:{},protocol_version:j,roots:Q.roots},auth_scheme:"p256"}}function WW(Q){return L(Q,!1)}function ZW(Q){let Z=L(Q,!0);if(typeof Z.organization_id!=="string")return w("Reason returned an invalid Device enrollment.");return{...Z,organization_id:Z.organization_id}}function $W(Q){if(!K(Q)||typeof Q.server_time!=="string"||typeof Q.drain!=="boolean")return w("Reason returned an invalid Device heartbeat.");return{server_time:Q.server_time,drain:Q.drain,...f(Q),...typeof Q.update_policy==="string"||Q.update_policy===null?{update_policy:Q.update_policy}:{},...typeof Q.supported_protocol_version==="number"?{supported_protocol_version:Q.supported_protocol_version}:{},...a(Q.latest_cli_versions),...Q.hands_prespawn===!0?{hands_prespawn:!0}:{}}}var u=["account_root_metadata_supported","workspace_root_metadata_supported","account_root_path_supported","home_contained_roots_supported","root_paths_supported","startup_supported"];function f(Q){return Object.fromEntries(u.filter((Z)=>Q[Z]===!0).map((Z)=>[Z,!0]))}function KW(Q){if(!K(Q))return;try{return{...l(Q),...f(Q)}}catch{return}}function a(Q){if(!K(Q))return{};let Z={};for(let $ of s){let z=Q[$];if(typeof z==="string"&&/^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/.test(z))Z[$]=z}return Object.keys(Z).length>0?{latest_cli_versions:Z}:{}}function DW(Q){if(!K(Q)||!Array.isArray(Q.roots)||!Q.roots.every(k))return w("Reason returned an invalid Device root sync.");return{roots:Q.roots}}function zW(Q){if(!K(Q)||Q.user_id!==void 0&&typeof Q.user_id!=="string"||typeof Q.organization_id!=="string"||typeof Q.organization_name!=="string"||typeof Q.organization_slug!=="string")return w("Reason returned an invalid Device identity.");return{...typeof Q.user_id==="string"?{user_id:Q.user_id}:{},organization_id:Q.organization_id,organization_name:Q.organization_name,organization_slug:Q.organization_slug}}function FW(Q){if(!K(Q)||Q.disconnected!==!0)return w("Reason did not disconnect this Device.");let Z=Q.sessions_moved;return typeof Z==="number"&&Number.isSafeInteger(Z)&&Z>=0?{disconnected:!0,sessions_moved:Z}:{disconnected:!0}}function wW(Q){if(K(Q)&&Q.ok===!0&&typeof Q.expires==="number")return{ok:!0,expires:Q.expires};if(K(Q)&&Q.ok===!1&&typeof Q.error==="string")return{ok:!1,error:Q.error};return w("Reason did not answer the local login hand-over.")}function VW(Q){if(!K(Q)||Q.accepted!==!0)return w("Reason did not accept the Device lifecycle event.");return{accepted:!0}}function e(Q){return Buffer.byteLength(JSON.stringify(Q),"utf8")}function YW(Q,Z=b){if(!K(Q)||typeof Q.operation_id!=="string"||typeof Q.attempt_id!=="string"||typeof Q.attempt_token!=="string"||!/^(?:reason|ara)_attempt_/.test(Q.attempt_token)||typeof Q.lease_until!=="string"||typeof Q.run_id!=="string"||typeof Q.root_id!=="string"||Q.owner!==void 0&&!E(Q.owner)||!t(Q.capability,Z)||!K(Q.payload)||Q.protocol_version!==j||e(Q.payload)>n||Q.authority!==void 0&&!U(Q.authority)||Q.local_github_authority!==void 0&&!m.safeParse(Q.local_github_authority).success||Q.capability==="github.local.v1"&&!m.safeParse(Q.local_github_authority).success||Q.recording_authority!==void 0&&!S(Q.recording_authority)||Q.capability==="browser.recording.v1"&&(!S(Q.recording_authority)||!E(Q.owner))||Q.capability!=="browser.recording.v1"&&Q.recording_authority!==void 0)return w("Reason returned an invalid Device operation claim.");let $={operation_id:Q.operation_id,attempt_id:Q.attempt_id,attempt_token:Q.attempt_token,lease_until:Q.lease_until,run_id:Q.run_id,root_id:Q.root_id,capability:Q.capability,payload:Q.payload,...U(Q.authority)?{authority:Q.authority}:{},...S(Q.recording_authority)?{recording_authority:Object.freeze({...Q.recording_authority})}:{},...Q.local_github_authority!==void 0?{local_github_authority:m.parse(Q.local_github_authority)}:{},...Q.capability==="hands.connect"&&K(Q.environment)&&K(Q.environment.payload)&&U(Q.environment.authority)?{environment:{payload:Q.environment.payload,authority:Q.environment.authority}}:{},protocol_version:j};if(Q.owner!==void 0)$.owner=Object.freeze({...Q.owner});return $}function HW(Q){if(!K(Q)||typeof Q.lease_until!=="string"||!Array.isArray(Q.controls)||!Q.controls.every(v)||!Number.isInteger(Q.next_control_seq)||Number(Q.next_control_seq)<0)return w("Reason returned an invalid Device operation heartbeat.");return{lease_until:Q.lease_until,controls:Q.controls,next_control_seq:Number(Q.next_control_seq)}}function XW(Q){if(!K(Q)||!Number.isInteger(Q.next_event_seq)||Number(Q.next_event_seq)<0||typeof Q.duplicate!=="boolean"||!Number.isInteger(Q.accepted_count)||Number(Q.accepted_count)<0)return w("Reason returned an invalid Device operation event result.");return{next_event_seq:Number(Q.next_event_seq),duplicate:Q.duplicate,accepted_count:Number(Q.accepted_count)}}function GW(Q){if(!K(Q)||!K(Q.payload)||!U(Q.authority))return w("Reason returned an invalid Device environment delivery.");return{payload:Q.payload,authority:Q.authority}}function QQ(Q){return Q==="succeeded"||Q==="failed"||Q==="cancelled"||Q==="expired"}function BW(Q){if(!K(Q)||!QQ(Q.status)||typeof Q.idempotent!=="boolean")return w("Reason returned an invalid Device operation completion.");return{status:Q.status,idempotent:Q.idempotent}}
42
- export{d as qe,R as re,ZQ as se,x as te,$Q as ue,m as ve,KQ as we,DQ as xe,zQ as ye,b as ze,j as Ae,I as Be,n as Ce,HQ as De,XQ as Ee,GQ as Fe,BQ as Ge,MQ as He,gQ as Ie,qQ as Je,NQ as Ke,mQ as Le,UQ as Me,jQ as Ne,xQ as Oe,JQ as Pe,SQ as Qe,IQ as Re,PQ as Se,TQ as Te,CQ as Ue,AQ as Ve,bQ as We,EQ as Xe,kQ as Ye,LQ as Ze,fQ as _e,_Q as $e,cQ as af,yQ as bf,dQ as cf,OQ as df,hQ as ef,RQ as ff,rQ as gf,pQ as hf,nQ as if,oQ as jf,sQ as kf,iQ as lf,tQ as mf,vQ as nf,lQ as of,uQ as pf,i as qf,aQ as rf,eQ as sf,QW as tf,l as uf,WW as vf,ZW as wf,$W as xf,KW as yf,DW as zf,zW as Af,FW as Bf,wW as Cf,VW as Df,YW as Ef,HW as Ff,XW as Gf,GW as Hf,BW as If};
42
+ export{d as le,R as me,ZQ as ne,x as oe,$Q as pe,m as qe,KQ as re,DQ as se,zQ as te,b as ue,j as ve,I as we,n as xe,HQ as ye,XQ as ze,GQ as Ae,BQ as Be,MQ as Ce,gQ as De,qQ as Ee,NQ as Fe,mQ as Ge,UQ as He,jQ as Ie,xQ as Je,JQ as Ke,SQ as Le,IQ as Me,PQ as Ne,TQ as Oe,CQ as Pe,AQ as Qe,bQ as Re,EQ as Se,kQ as Te,LQ as Ue,fQ as Ve,_Q as We,cQ as Xe,yQ as Ye,dQ as Ze,OQ as _e,hQ as $e,RQ as af,rQ as bf,pQ as cf,nQ as df,oQ as ef,sQ as ff,iQ as gf,tQ as hf,vQ as if,lQ as jf,uQ as kf,i as lf,aQ as mf,eQ as nf,QW as of,l as pf,WW as qf,ZW as rf,$W as sf,KW as tf,DW as uf,zW as vf,FW as wf,wW as xf,VW as yf,YW as zf,HW as Af,XW as Bf,GW as Cf,BW as Df};