@reason-machines/cli-linux-x64 0.2.545 → 0.2.547

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 (40) hide show
  1. package/THIRD_PARTY_NOTICES.txt +2 -2
  2. package/bin/reason +1 -1
  3. package/bin/vm-hands/{api-credentials-ka0tgvfr.js → api-credentials-a67s65s1.js} +1 -1
  4. package/bin/vm-hands/{api-vct1jx91.js → api-qhsfyayr.js} +1 -1
  5. package/bin/vm-hands/{connect-cli-6pa06bp4.js → connect-cli-2jv8444d.js} +1 -1
  6. package/bin/vm-hands/{index-gmsadq51.js → index-j6wffzfd.js} +1 -1
  7. package/bin/vm-hands/{local-automation-nfmdd0bj.js → local-automation-gygsvq1s.js} +1 -1
  8. package/bin/vm-hands/{local-capabilities-9qs476nx.js → local-capabilities-npdrmmdc.js} +1 -1
  9. package/bin/vm-hands/{local-display-session-v6se296d.js → local-display-session-wtx6hhye.js} +1 -1
  10. package/bin/vm-hands/local-display-video-z0k1wtes.js +2 -0
  11. package/bin/vm-hands/{local-managed-process-j6dxwzsg.js → local-managed-process-fp93w0p7.js} +1 -1
  12. package/bin/vm-hands/{managed-runtime-g5ypgdzd.js → managed-runtime-2t9hvdz0.js} +1 -1
  13. package/bin/vm-hands/{permissions-nes7hvyb.js → permissions-ex4dv8fx.js} +1 -1
  14. package/bin/vm-hands/{serve-service-kr5ggkqy.js → serve-service-y73w7z0m.js} +1 -1
  15. package/bin/vm-hands/{status-gkdk2phq.js → status-yscg3sd0.js} +1 -1
  16. package/bin/vm-hands/version-0f9960eq.js +2 -0
  17. package/bin/vm-hands/{vm-hands-entry-lite-kng982rg.js → vm-hands-entry-lite-5tdbk4pq.js} +1 -1
  18. package/bin/vm-hands/{vm-hands-entry-lite-tpjqd8qx.js → vm-hands-entry-lite-63r581qe.js} +1 -1
  19. package/bin/vm-hands/{vm-hands-entry-lite-pfqj73fy.js → vm-hands-entry-lite-6bf97ret.js} +1 -1
  20. package/bin/vm-hands/{vm-hands-entry-lite-gz65ybc2.js → vm-hands-entry-lite-d2kj2jj0.js} +2 -2
  21. package/bin/vm-hands/vm-hands-entry-lite-d3rz0tgb.js +2 -0
  22. package/bin/vm-hands/{vm-hands-entry-lite-wb4fppse.js → vm-hands-entry-lite-d4n0wg5b.js} +1 -1
  23. package/bin/vm-hands/{vm-hands-entry-lite-ax1rvy38.js → vm-hands-entry-lite-dbae6y48.js} +1 -1
  24. package/bin/vm-hands/{vm-hands-entry-lite-sxs29kff.js → vm-hands-entry-lite-e71jtjxa.js} +1 -1
  25. package/bin/vm-hands/{vm-hands-entry-lite-eragp1xm.js → vm-hands-entry-lite-fw4y4xxg.js} +1 -1
  26. package/bin/vm-hands/{vm-hands-entry-lite-mbv4mqha.js → vm-hands-entry-lite-g89cjfan.js} +1 -1
  27. package/bin/vm-hands/{vm-hands-entry-lite-x7w4n87s.js → vm-hands-entry-lite-j7e86nvy.js} +1 -1
  28. package/bin/vm-hands/{vm-hands-entry-lite-1b3x8f9z.js → vm-hands-entry-lite-vn6zr7gp.js} +1 -1
  29. package/bin/vm-hands/{vm-hands-entry-lite-8x8940ky.js → vm-hands-entry-lite-x3tgdvcf.js} +1 -1
  30. package/bin/vm-hands/{vm-hands-entry-lite-8jcb5jqm.js → vm-hands-entry-lite-x7ks944h.js} +2 -2
  31. package/bin/vm-hands/{vm-hands-entry-lite-p4z0dgch.js → vm-hands-entry-lite-zbwsn5rk.js} +1 -1
  32. package/bin/vm-hands/{vm-hands-entry-lite-9r9tfka9.js → vm-hands-entry-lite-zjgrdarj.js} +1 -1
  33. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  34. package/bin/vm-hands/{vm-hands-executor-x1dympcw.js → vm-hands-executor-af6mwegq.js} +1 -1
  35. package/bin/vm-hands/{vm-hands-op-runner-az83nsye.js → vm-hands-op-runner-wj99gtgs.js} +1 -1
  36. package/bin/vm-hands/{vm-hands-runtime-wfp8q87s.js → vm-hands-runtime-a81sts1s.js} +3 -3
  37. package/package.json +1 -1
  38. package/bin/vm-hands/local-display-video-s2447446.js +0 -2
  39. package/bin/vm-hands/version-qtakrr9g.js +0 -2
  40. package/bin/vm-hands/vm-hands-entry-lite-r34f55z4.js +0 -2
@@ -542,7 +542,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
542
542
 
543
543
  ----------------------------------------
544
544
 
545
- electron@44.9.0
545
+ electron@44.9.1
546
546
  LICENSE
547
547
  Copyright (c) Electron contributors
548
548
  Copyright (c) 2013-2020 GitHub Inc.
@@ -1240,7 +1240,7 @@ SOFTWARE.
1240
1240
 
1241
1241
  ----------------------------------------
1242
1242
 
1243
- toml@4.2.0
1243
+ toml@5.0.1
1244
1244
  LICENSE
1245
1245
  Copyright (c) 2012 Michelle Tilley
1246
1246
 
package/bin/reason CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/reason
3
3
  size: 90289632 bytes
4
- sha256: 9d119d0abd1de8bb1103be6e9a9097f2b127c5f85c599e8722db617eb877f0a2
4
+ sha256: 11c5f958359e9755b63017a202d3f42b986147a09ec9c263e1690ab9cab27a0a
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{zi,es,ts,As}from"./vm-hands-entry-lite-tpjqd8qx.js";import"./vm-hands-entry-lite-sxs29kff.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{zi as apiOriginFromEnvironment,ts as environmentApiKey,es as explicitApiOrigin,As as resolveApiCredentials};
2
+ import{zi,es,ts,As}from"./vm-hands-entry-lite-63r581qe.js";import"./vm-hands-entry-lite-e71jtjxa.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{zi as apiOriginFromEnvironment,ts as environmentApiKey,es as explicitApiOrigin,As as resolveApiCredentials};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{D,Ps,rs}from"./vm-hands-entry-lite-sxs29kff.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{D as ApiError,rs as ReasonApi,Ps as createMachineEnrollmentTicketWithToken};
2
+ import{D,Ps,rs}from"./vm-hands-entry-lite-e71jtjxa.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{D as ApiError,rs as ReasonApi,Ps as createMachineEnrollmentTicketWithToken};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{it,Ss,Es,xs}from"./vm-hands-entry-lite-eragp1xm.js";import"./vm-hands-entry-lite-y5hv1gjv.js";import"./vm-hands-entry-lite-13s0mfpr.js";import"./vm-hands-entry-lite-tpjqd8qx.js";import"./vm-hands-entry-lite-sxs29kff.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-pfqj73fy.js";import"./vm-hands-entry-lite-p4z0dgch.js";import"./vm-hands-entry-lite-9azmqs47.js";import"./vm-hands-entry-lite-8x8940ky.js";import"./vm-hands-entry-lite-8jcb5jqm.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-x7w4n87s.js";import"./vm-hands-entry-lite-mbv4mqha.js";import"./vm-hands-entry-lite-gz65ybc2.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-1b3x8f9z.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-ax1rvy38.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Ss as computerDisconnected,it as connectionDirectory,Es as connectionReport,xs as restartConnection};
2
+ import{it,Ss,Es,xs}from"./vm-hands-entry-lite-fw4y4xxg.js";import"./vm-hands-entry-lite-y5hv1gjv.js";import"./vm-hands-entry-lite-13s0mfpr.js";import"./vm-hands-entry-lite-63r581qe.js";import"./vm-hands-entry-lite-e71jtjxa.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-6bf97ret.js";import"./vm-hands-entry-lite-zbwsn5rk.js";import"./vm-hands-entry-lite-9azmqs47.js";import"./vm-hands-entry-lite-x3tgdvcf.js";import"./vm-hands-entry-lite-x7ks944h.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-j7e86nvy.js";import"./vm-hands-entry-lite-g89cjfan.js";import"./vm-hands-entry-lite-d2kj2jj0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-dbae6y48.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Ss as computerDisconnected,it as connectionDirectory,Es as connectionReport,xs as restartConnection};
@@ -406,7 +406,7 @@ content-type/index.js:
406
406
  * Copyright(c) 2015 Douglas Christopher Wilson
407
407
  * MIT Licensed
408
408
  *)
409
- */});var cy=he(function(CB,gI){gI.exports={comment:"Do not edit this file, use utils/roll_browser.js",browsers:[{name:"chromium",revision:"1223",installByDefault:!0,browserVersion:"148.0.7778.96",title:"Chrome for Testing"},{name:"chromium-headless-shell",revision:"1223",installByDefault:!0,browserVersion:"148.0.7778.96",title:"Chrome Headless Shell"},{name:"chromium-tip-of-tree",revision:"1427",installByDefault:!1,browserVersion:"149.0.7827.0",title:"Chrome Canary for Testing"},{name:"chromium-tip-of-tree-headless-shell",revision:"1427",installByDefault:!1,browserVersion:"149.0.7827.0",title:"Chrome Canary Headless Shell"},{name:"firefox",revision:"1522",installByDefault:!0,browserVersion:"150.0.2",title:"Firefox"},{name:"firefox-beta",revision:"1512",installByDefault:!1,browserVersion:"151.0b5",title:"Firefox Beta"},{name:"webkit",revision:"2287",installByDefault:!0,revisionOverrides:{mac14:"2251","mac14-arm64":"2251","debian11-x64":"2105","debian11-arm64":"2105","ubuntu20.04-x64":"2092","ubuntu20.04-arm64":"2092"},browserVersion:"26.4",title:"WebKit"},{name:"ffmpeg",revision:"1011",installByDefault:!0,revisionOverrides:{mac12:"1010","mac12-arm64":"1010"}},{name:"winldd",revision:"1007",installByDefault:!1},{name:"android",revision:"1001",installByDefault:!1}]}});var dy=he(function(kB,uy){uy.exports={}});var py=he(function(TB,hy){hy.exports={}});var gy=he(function(AB,my){var __dirname="/Users/runner/work/monorepo/monorepo/production/node_modules/.bun/electron@44.9.0/node_modules/electron",{spawnSync:_I}=e("child_process"),Pl=e("fs"),Ls=e("path"),Xh=Ls.join(__dirname,"path.txt");function fy(){if(console.log("Downloading Electron binary..."),_I(process.execPath,[Ls.join(__dirname,"install.js")],{stdio:"inherit"}).status!==0)throw Error('Electron failed to install correctly. Please delete `node_modules/electron` and run "npx install-electron --no" manually.')}function vI(){let t;if(Pl.existsSync(Xh))t=Pl.readFileSync(Xh,"utf-8");if(process.env.ELECTRON_OVERRIDE_DIST_PATH)return Ls.join(process.env.ELECTRON_OVERRIDE_DIST_PATH,t||"electron");if(t){let r=Ls.join(__dirname,"dist",t);if(!Pl.existsSync(r))fy();return r}else{try{fy()}catch{throw Error('Electron failed to install correctly. Please delete `node_modules/electron` and run "npx install-electron --no" manually.')}return t=Pl.readFileSync(Xh,"utf-8"),Ls.join(__dirname,"dist",t)}}my.exports=vI()});var _y=he(function(exports,module){var{create:__create,defineProperty:__defProp,getOwnPropertyDescriptor:__getOwnPropDesc,getOwnPropertyNames:__getOwnPropNames,getPrototypeOf:__getProtoOf}=Object,__hasOwnProp=Object.prototype.hasOwnProperty,__esm=(t,r)=>function(){return t&&(r=(0,t[__getOwnPropNames(t)[0]])(t=0)),r},__commonJS=(t,r)=>function(){return r||(0,t[__getOwnPropNames(t)[0]])((r={exports:{}}).exports,r),r.exports},__export=(t,r)=>{for(var n in r)__defProp(t,n,{get:r[n],enumerable:!0})},__copyProps=(t,r,n,i)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let s of __getOwnPropNames(r))if(!__hasOwnProp.call(t,s)&&s!==n)__defProp(t,s,{get:()=>r[s],enumerable:!(i=__getOwnPropDesc(r,s))||i.enumerable})}return t},__toESM=(t,r,n)=>(n=t!=null?__create(__getProtoOf(t)):{},__copyProps(r||!t||!t.__esModule?__defProp(n,"default",{value:t,enumerable:!0}):n,t)),__toCommonJS=(t)=>__copyProps(__defProp({},"__esModule",{value:!0}),t);function ariaNodesEqual(t,r){if(t.role!==r.role||t.name!==r.name)return!1;if(!ariaPropsEqual(t,r)||hasPointerCursor(t)!==hasPointerCursor(r))return!1;let n=Object.keys(t.props),i=Object.keys(r.props);return n.length===i.length&&n.every((s)=>t.props[s]===r.props[s])}function hasPointerCursor(t){return t.box.cursor==="pointer"}function ariaPropsEqual(t,r){return t.active===r.active&&t.checked===r.checked&&t.disabled===r.disabled&&t.expanded===r.expanded&&t.selected===r.selected&&t.level===r.level&&t.pressed===r.pressed}function parseAriaSnapshotUnsafe(t,r,n={}){let i=parseAriaSnapshot(t,r,n);if(i.errors.length)throw Error(i.errors[0].message);return i.fragment}function parseAriaSnapshot(t,r,n={}){let i=new t.LineCounter,s={keepSourceTokens:!0,lineCounter:i,...n},o=t.parseDocument(r,s),a=[],l=(p)=>[i.linePos(p[0]),i.linePos(p[1])],c=(p)=>{a.push({message:p.message,range:[i.linePos(p.pos[0]),i.linePos(p.pos[1])]})},u=(p,f)=>{for(let m of f.items){if(m instanceof t.Scalar&&typeof m.value==="string"){let _=KeyParser.parse(m,s,a);if(_)p.children=p.children||[],p.children.push(_);continue}if(m instanceof t.YAMLMap){d(p,m);continue}a.push({message:"Sequence items should be strings or maps",range:l(m.range||f.range)})}},d=(p,f)=>{for(let m of f.items){if(p.children=p.children||[],!(m.key instanceof t.Scalar&&typeof m.key.value==="string")){a.push({message:"Only string keys are supported",range:l(m.key.range||f.range)});continue}let{key:w,value:_}=m;if(w.value==="text"){if(!(_ instanceof t.Scalar&&typeof _.value==="string")){a.push({message:"Text value should be a string",range:l(m.value.range||f.range)});continue}p.children.push({kind:"text",text:textValue(_.value)});continue}if(w.value==="/children"){if(!(_ instanceof t.Scalar&&typeof _.value==="string")||_.value!=="contain"&&_.value!=="equal"&&_.value!=="deep-equal"){a.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:l(m.value.range||f.range)});continue}p.containerMode=_.value;continue}if(w.value.startsWith("/")){if(!(_ instanceof t.Scalar&&typeof _.value==="string")){a.push({message:"Property value should be a string",range:l(m.value.range||f.range)});continue}p.props=p.props??{},p.props[w.value.slice(1)]=textValue(_.value);continue}let g=KeyParser.parse(w,s,a);if(!g)continue;if(_ instanceof t.Scalar){let E=typeof _.value;if(E!=="string"&&E!=="number"&&E!=="boolean"){a.push({message:"Node value should be a string or a sequence",range:l(m.value.range||f.range)});continue}p.children.push({...g,children:[{kind:"text",text:textValue(String(_.value))}]});continue}if(_ instanceof t.YAMLSeq){p.children.push(g),u(g,_);continue}a.push({message:"Map values should be strings or sequences",range:l(m.value.range||f.range)})}},h={kind:"role",role:"fragment"};if(o.errors.forEach(c),a.length)return{errors:a,fragment:h};if(!(o.contents instanceof t.YAMLSeq))a.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?l(o.contents.range):[{line:0,col:0},{line:0,col:0}]});if(a.length)return{errors:a,fragment:h};if(u(h,o.contents),a.length)return{errors:a,fragment:emptyFragment};if(h.children?.length===1&&(!h.containerMode||h.containerMode==="contain"))return{fragment:h.children[0],errors:[]};return{fragment:h,errors:[]}}function normalizeWhitespace(t){return t.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function textValue(t){return{raw:t,normalized:normalizeWhitespace(t)}}function findNewNode(t,r){function n(a,l,c){let u=1,d=c+u;for(let h of a.children||[])if(typeof h==="string")u++,d++;else u+=n(h,l,d),d+=u;if(!["none","presentation","fragment","iframe","generic"].includes(a.role)&&a.name){let h=l.get(a.role);if(!h)h=new Map,l.set(a.role,h);let p=h.get(a.name),f=u*100-c;if(!p||p.sizeAndPosition<f)h.set(a.name,{node:a,sizeAndPosition:f})}return u}let i=new Map;if(t)n(t,i,0);let s=new Map;n(r,s,0);let o=[];for(let[a,l]of s)for(let[c,u]of l)if(!i.get(a)?.get(c))o.push(u);return o.sort((a,l)=>l.sizeAndPosition-a.sizeAndPosition),o[0]?.node}var emptyFragment,KeyParser,ParserError,init_ariaSnapshot=__esm({"packages/isomorphic/ariaSnapshot.ts"(){emptyFragment={kind:"role",role:"fragment"},KeyParser=class t{static parse(r,n,i){try{return new t(r.value)._parse()}catch(s){if(s instanceof ParserError){let o=n.prettyErrors===!1?s.message:s.message+`:
409
+ */});var cy=he(function(CB,gI){gI.exports={comment:"Do not edit this file, use utils/roll_browser.js",browsers:[{name:"chromium",revision:"1223",installByDefault:!0,browserVersion:"148.0.7778.96",title:"Chrome for Testing"},{name:"chromium-headless-shell",revision:"1223",installByDefault:!0,browserVersion:"148.0.7778.96",title:"Chrome Headless Shell"},{name:"chromium-tip-of-tree",revision:"1427",installByDefault:!1,browserVersion:"149.0.7827.0",title:"Chrome Canary for Testing"},{name:"chromium-tip-of-tree-headless-shell",revision:"1427",installByDefault:!1,browserVersion:"149.0.7827.0",title:"Chrome Canary Headless Shell"},{name:"firefox",revision:"1522",installByDefault:!0,browserVersion:"150.0.2",title:"Firefox"},{name:"firefox-beta",revision:"1512",installByDefault:!1,browserVersion:"151.0b5",title:"Firefox Beta"},{name:"webkit",revision:"2287",installByDefault:!0,revisionOverrides:{mac14:"2251","mac14-arm64":"2251","debian11-x64":"2105","debian11-arm64":"2105","ubuntu20.04-x64":"2092","ubuntu20.04-arm64":"2092"},browserVersion:"26.4",title:"WebKit"},{name:"ffmpeg",revision:"1011",installByDefault:!0,revisionOverrides:{mac12:"1010","mac12-arm64":"1010"}},{name:"winldd",revision:"1007",installByDefault:!1},{name:"android",revision:"1001",installByDefault:!1}]}});var dy=he(function(kB,uy){uy.exports={}});var py=he(function(TB,hy){hy.exports={}});var gy=he(function(AB,my){var __dirname="/Users/runner/work/monorepo/monorepo/production/node_modules/.bun/electron@44.9.1/node_modules/electron",{spawnSync:_I}=e("child_process"),Pl=e("fs"),Ls=e("path"),Xh=Ls.join(__dirname,"path.txt");function fy(){if(console.log("Downloading Electron binary..."),_I(process.execPath,[Ls.join(__dirname,"install.js")],{stdio:"inherit"}).status!==0)throw Error('Electron failed to install correctly. Please delete `node_modules/electron` and run "npx install-electron --no" manually.')}function vI(){let t;if(Pl.existsSync(Xh))t=Pl.readFileSync(Xh,"utf-8");if(process.env.ELECTRON_OVERRIDE_DIST_PATH)return Ls.join(process.env.ELECTRON_OVERRIDE_DIST_PATH,t||"electron");if(t){let r=Ls.join(__dirname,"dist",t);if(!Pl.existsSync(r))fy();return r}else{try{fy()}catch{throw Error('Electron failed to install correctly. Please delete `node_modules/electron` and run "npx install-electron --no" manually.')}return t=Pl.readFileSync(Xh,"utf-8"),Ls.join(__dirname,"dist",t)}}my.exports=vI()});var _y=he(function(exports,module){var{create:__create,defineProperty:__defProp,getOwnPropertyDescriptor:__getOwnPropDesc,getOwnPropertyNames:__getOwnPropNames,getPrototypeOf:__getProtoOf}=Object,__hasOwnProp=Object.prototype.hasOwnProperty,__esm=(t,r)=>function(){return t&&(r=(0,t[__getOwnPropNames(t)[0]])(t=0)),r},__commonJS=(t,r)=>function(){return r||(0,t[__getOwnPropNames(t)[0]])((r={exports:{}}).exports,r),r.exports},__export=(t,r)=>{for(var n in r)__defProp(t,n,{get:r[n],enumerable:!0})},__copyProps=(t,r,n,i)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let s of __getOwnPropNames(r))if(!__hasOwnProp.call(t,s)&&s!==n)__defProp(t,s,{get:()=>r[s],enumerable:!(i=__getOwnPropDesc(r,s))||i.enumerable})}return t},__toESM=(t,r,n)=>(n=t!=null?__create(__getProtoOf(t)):{},__copyProps(r||!t||!t.__esModule?__defProp(n,"default",{value:t,enumerable:!0}):n,t)),__toCommonJS=(t)=>__copyProps(__defProp({},"__esModule",{value:!0}),t);function ariaNodesEqual(t,r){if(t.role!==r.role||t.name!==r.name)return!1;if(!ariaPropsEqual(t,r)||hasPointerCursor(t)!==hasPointerCursor(r))return!1;let n=Object.keys(t.props),i=Object.keys(r.props);return n.length===i.length&&n.every((s)=>t.props[s]===r.props[s])}function hasPointerCursor(t){return t.box.cursor==="pointer"}function ariaPropsEqual(t,r){return t.active===r.active&&t.checked===r.checked&&t.disabled===r.disabled&&t.expanded===r.expanded&&t.selected===r.selected&&t.level===r.level&&t.pressed===r.pressed}function parseAriaSnapshotUnsafe(t,r,n={}){let i=parseAriaSnapshot(t,r,n);if(i.errors.length)throw Error(i.errors[0].message);return i.fragment}function parseAriaSnapshot(t,r,n={}){let i=new t.LineCounter,s={keepSourceTokens:!0,lineCounter:i,...n},o=t.parseDocument(r,s),a=[],l=(p)=>[i.linePos(p[0]),i.linePos(p[1])],c=(p)=>{a.push({message:p.message,range:[i.linePos(p.pos[0]),i.linePos(p.pos[1])]})},u=(p,f)=>{for(let m of f.items){if(m instanceof t.Scalar&&typeof m.value==="string"){let _=KeyParser.parse(m,s,a);if(_)p.children=p.children||[],p.children.push(_);continue}if(m instanceof t.YAMLMap){d(p,m);continue}a.push({message:"Sequence items should be strings or maps",range:l(m.range||f.range)})}},d=(p,f)=>{for(let m of f.items){if(p.children=p.children||[],!(m.key instanceof t.Scalar&&typeof m.key.value==="string")){a.push({message:"Only string keys are supported",range:l(m.key.range||f.range)});continue}let{key:w,value:_}=m;if(w.value==="text"){if(!(_ instanceof t.Scalar&&typeof _.value==="string")){a.push({message:"Text value should be a string",range:l(m.value.range||f.range)});continue}p.children.push({kind:"text",text:textValue(_.value)});continue}if(w.value==="/children"){if(!(_ instanceof t.Scalar&&typeof _.value==="string")||_.value!=="contain"&&_.value!=="equal"&&_.value!=="deep-equal"){a.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:l(m.value.range||f.range)});continue}p.containerMode=_.value;continue}if(w.value.startsWith("/")){if(!(_ instanceof t.Scalar&&typeof _.value==="string")){a.push({message:"Property value should be a string",range:l(m.value.range||f.range)});continue}p.props=p.props??{},p.props[w.value.slice(1)]=textValue(_.value);continue}let g=KeyParser.parse(w,s,a);if(!g)continue;if(_ instanceof t.Scalar){let E=typeof _.value;if(E!=="string"&&E!=="number"&&E!=="boolean"){a.push({message:"Node value should be a string or a sequence",range:l(m.value.range||f.range)});continue}p.children.push({...g,children:[{kind:"text",text:textValue(String(_.value))}]});continue}if(_ instanceof t.YAMLSeq){p.children.push(g),u(g,_);continue}a.push({message:"Map values should be strings or sequences",range:l(m.value.range||f.range)})}},h={kind:"role",role:"fragment"};if(o.errors.forEach(c),a.length)return{errors:a,fragment:h};if(!(o.contents instanceof t.YAMLSeq))a.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?l(o.contents.range):[{line:0,col:0},{line:0,col:0}]});if(a.length)return{errors:a,fragment:h};if(u(h,o.contents),a.length)return{errors:a,fragment:emptyFragment};if(h.children?.length===1&&(!h.containerMode||h.containerMode==="contain"))return{fragment:h.children[0],errors:[]};return{fragment:h,errors:[]}}function normalizeWhitespace(t){return t.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function textValue(t){return{raw:t,normalized:normalizeWhitespace(t)}}function findNewNode(t,r){function n(a,l,c){let u=1,d=c+u;for(let h of a.children||[])if(typeof h==="string")u++,d++;else u+=n(h,l,d),d+=u;if(!["none","presentation","fragment","iframe","generic"].includes(a.role)&&a.name){let h=l.get(a.role);if(!h)h=new Map,l.set(a.role,h);let p=h.get(a.name),f=u*100-c;if(!p||p.sizeAndPosition<f)h.set(a.name,{node:a,sizeAndPosition:f})}return u}let i=new Map;if(t)n(t,i,0);let s=new Map;n(r,s,0);let o=[];for(let[a,l]of s)for(let[c,u]of l)if(!i.get(a)?.get(c))o.push(u);return o.sort((a,l)=>l.sizeAndPosition-a.sizeAndPosition),o[0]?.node}var emptyFragment,KeyParser,ParserError,init_ariaSnapshot=__esm({"packages/isomorphic/ariaSnapshot.ts"(){emptyFragment={kind:"role",role:"fragment"},KeyParser=class t{static parse(r,n,i){try{return new t(r.value)._parse()}catch(s){if(s instanceof ParserError){let o=n.prettyErrors===!1?s.message:s.message+`:
410
410
 
411
411
  `+r.value+`
412
412
  `+" ".repeat(s.pos)+`^
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Pn,Us,zs,qs,Ws,Rn}from"./vm-hands-entry-lite-x7w4n87s.js";import"./vm-hands-entry-lite-mbv4mqha.js";import"./vm-hands-entry-lite-gz65ybc2.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-1b3x8f9z.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-ax1rvy38.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{zs as ensureLocalBrowser,Pn as localAutomationAvailable,qs as localBrowserProfile,Us as localUserChromeHost,Ws as runAutomationCallLocally,Rn as runLocalAutomation};
2
+ import{Pn,Us,zs,qs,Ws,Rn}from"./vm-hands-entry-lite-j7e86nvy.js";import"./vm-hands-entry-lite-g89cjfan.js";import"./vm-hands-entry-lite-d2kj2jj0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-dbae6y48.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{zs as ensureLocalBrowser,Pn as localAutomationAvailable,qs as localBrowserProfile,Us as localUserChromeHost,Ws as runAutomationCallLocally,Rn as runLocalAutomation};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ns,Vi,mn,is,os,ss,as,$s,Ms,Bs,Fs}from"./vm-hands-entry-lite-p4z0dgch.js";import"./vm-hands-entry-lite-9azmqs47.js";import"./vm-hands-entry-lite-8x8940ky.js";import"./vm-hands-entry-lite-8jcb5jqm.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-x7w4n87s.js";import"./vm-hands-entry-lite-mbv4mqha.js";import"./vm-hands-entry-lite-gz65ybc2.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-1b3x8f9z.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-ax1rvy38.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{r as LocalCapabilityError,ns as SHORT_REQUEST_CAPABILITIES,$s as capabilityInventoryForRoots,Vi as confinedExecutionShell,is as defaultLocalCommandRunner,Ms as deliverLocalHandsEnvironment,as as enrolledRootPaths,Fs as executeLocalOperation,Bs as rebindLocalHandsControl,os as runFileCapability,ss as runTransferCapability,mn as spawnCaptured};
2
+ import{ns,Vi,mn,is,os,ss,as,$s,Ms,Bs,Fs}from"./vm-hands-entry-lite-zbwsn5rk.js";import"./vm-hands-entry-lite-9azmqs47.js";import"./vm-hands-entry-lite-x3tgdvcf.js";import"./vm-hands-entry-lite-x7ks944h.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-j7e86nvy.js";import"./vm-hands-entry-lite-g89cjfan.js";import"./vm-hands-entry-lite-d2kj2jj0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-dbae6y48.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{r as LocalCapabilityError,ns as SHORT_REQUEST_CAPABILITIES,$s as capabilityInventoryForRoots,Vi as confinedExecutionShell,is as defaultLocalCommandRunner,Ms as deliverLocalHandsEnvironment,as as enrolledRootPaths,Fs as executeLocalOperation,Bs as rebindLocalHandsControl,os as runFileCapability,ss as runTransferCapability,mn as spawnCaptured};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ft,Vs,G,qe,jt}from"./vm-hands-entry-lite-mbv4mqha.js";import"./vm-hands-entry-lite-gz65ybc2.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-1b3x8f9z.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{qe as ensureLinuxDesktop,Ft as localDisplayAvailable,Vs as localDisplayReady,G as privateDirectory,jt as runLocalDisplayStream};
2
+ import{Ft,Vs,G,qe,jt}from"./vm-hands-entry-lite-g89cjfan.js";import"./vm-hands-entry-lite-d2kj2jj0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{qe as ensureLinuxDesktop,Ft as localDisplayAvailable,Vs as localDisplayReady,G as privateDirectory,jt as runLocalDisplayStream};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{In,Dn,On,Nn,Rr}from"./vm-hands-entry-lite-d2kj2jj0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";export{In as MAC_SCREEN,Dn as WINDOWS_SCREEN,On as createDisplayVideoLane,Rr as localDisplayVideoAvailable,Nn as simulatorVideoFfmpeg};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{st,fr,js,Hs}from"./vm-hands-entry-lite-8x8940ky.js";import"./vm-hands-entry-lite-8jcb5jqm.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{st as ManagedProcessStoppedError,js as controlManagedDeviceProcess,Hs as retireManagedDeviceProcess,fr as runManagedDeviceProcess};
2
+ import{st,fr,js,Hs}from"./vm-hands-entry-lite-x3tgdvcf.js";import"./vm-hands-entry-lite-x7ks944h.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-vj0gm694.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{st as ManagedProcessStoppedError,js as controlManagedDeviceProcess,Hs as retireManagedDeviceProcess,fr as runManagedDeviceProcess};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Rs,Ts,Is,Ds,Os,Ns,Ls}from"./vm-hands-entry-lite-pfqj73fy.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Os as acquireManagedRuntimeDirectoryLock,Is as currentManagedRuntimeVersion,Ls as flushManagedRuntimeLifecycleEvents,Ds as isManagedRuntimeVersionExecutable,Ts as legacyManagedRuntimePaths,Rs as managedRuntimePaths,Ns as recordManagedRuntimeLifecycle};
2
+ import{Rs,Ts,Is,Ds,Os,Ns,Ls}from"./vm-hands-entry-lite-6bf97ret.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Os as acquireManagedRuntimeDirectoryLock,Is as currentManagedRuntimeVersion,Ls as flushManagedRuntimeLifecycleEvents,Ds as isManagedRuntimeVersionExecutable,Ts as legacyManagedRuntimePaths,Rs as managedRuntimePaths,Ns as recordManagedRuntimeLifecycle};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ls,us,Ks,Js}from"./vm-hands-entry-lite-1b3x8f9z.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";export{Js as allowMacPermissions,Ks as permissionsSummary,us as readMacPermissions,ls as reasonIdentity};
2
+ import{ls,us,Ks,Js}from"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";export{Js as allowMacPermissions,Ks as permissionsSummary,us as readMacPermissions,ls as reasonIdentity};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Wr,xe,J,Jn,Xs,No,Ys,Ze,ps,Xn,Zs,Qs,Vr,ea,ta}from"./vm-hands-entry-lite-ax1rvy38.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Wr as WORKER_SERVICE_ENV,J as WorkerServiceError,No as connectServiceLabel,xe as defaultWorkerServiceHost,Qs as installWorkerService,Ze as installedWorkerService,Ys as isConnectServiceLabel,ta as removeWorkerService,Vr as restartWorkerService,ea as retargetWorkerServiceLogs,ps as retireLegacyWorkerService,Zs as workerServiceDefinitionCurrent,Jn as workerServiceLauncher,Xn as workerServiceProcessRunning,Xs as workerServiceRetargetPending};
2
+ import{Wr,xe,J,Jn,Xs,No,Ys,Ze,ps,Xn,Zs,Qs,Vr,ea,ta}from"./vm-hands-entry-lite-dbae6y48.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a3p6xz53.js";import"./vm-hands-entry-lite-jvszqt0z.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-b6gsggvp.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Wr as WORKER_SERVICE_ENV,J as WorkerServiceError,No as connectServiceLabel,xe as defaultWorkerServiceHost,Qs as installWorkerService,Ze as installedWorkerService,Ys as isConnectServiceLabel,ta as removeWorkerService,Vr as restartWorkerService,ea as retargetWorkerServiceLogs,ps as retireLegacyWorkerService,Zs as workerServiceDefinitionCurrent,Jn as workerServiceLauncher,Xn as workerServiceProcessRunning,Xs as workerServiceRetargetPending};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./vm-hands-entry-lite-sxs29kff.js";import"./vm-hands-entry-lite-a3p6xz53.js";import{_}from"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-s85p7tqp.js";import"./vm-hands-entry-lite-r34f55z4.js";import"./vm-hands-entry-lite-tpjqd8qx.js";import{Kt,ht}from"./vm-hands-entry-lite-vj0gm694.js";import{w,M,pr,Be,it}from"./vm-hands-entry-lite-eragp1xm.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-p4z0dgch.js";import"./vm-hands-entry-lite-8jcb5jqm.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-9azmqs47.js";import"./vm-hands-entry-lite-y5hv1gjv.js";import"./vm-hands-entry-lite-gz65ybc2.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-kng982rg.js";import"./vm-hands-entry-lite-1b3x8f9z.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-pfqj73fy.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-ax1rvy38.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-8x8940ky.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-mbv4mqha.js";import"./vm-hands-entry-lite-x7w4n87s.js";import"./vm-hands-entry-lite-13s0mfpr.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import{a}from"./vm-hands-entry-lite-jvszqt0z.js";import{t,o,u,n,s,i}from"./vm-hands-entry-lite-dszmx6yf.js";import"./vm-hands-entry-lite-b6gsggvp.js";import{readFileSync as me,realpathSync as k,renameSync as ge,unlinkSync as fe,writeFileSync as he}from"fs";import{dirname as ye,join as I}from"path";function f(e){return`claude mcp add --transport http reason ${e}`}function h(e){return`codex mcp add reason --url ${e}
2
+ import"./vm-hands-entry-lite-e71jtjxa.js";import"./vm-hands-entry-lite-a3p6xz53.js";import{_}from"./vm-hands-entry-lite-4anjdcth.js";import"./vm-hands-entry-lite-a0g6c3wr.js";import"./vm-hands-entry-lite-04x5xjt6.js";import"./vm-hands-entry-lite-s85p7tqp.js";import"./vm-hands-entry-lite-d3rz0tgb.js";import"./vm-hands-entry-lite-63r581qe.js";import{Kt,ht}from"./vm-hands-entry-lite-vj0gm694.js";import{w,M,pr,Be,it}from"./vm-hands-entry-lite-fw4y4xxg.js";import"./vm-hands-entry-lite-nxd394w3.js";import"./vm-hands-entry-lite-xv7tgef8.js";import"./vm-hands-entry-lite-zbwsn5rk.js";import"./vm-hands-entry-lite-x7ks944h.js";import"./vm-hands-entry-lite-5tnma5qb.js";import"./vm-hands-entry-lite-9azmqs47.js";import"./vm-hands-entry-lite-y5hv1gjv.js";import"./vm-hands-entry-lite-d2kj2jj0.js";import"./vm-hands-entry-lite-k9vk84wa.js";import"./vm-hands-entry-lite-5tdbk4pq.js";import"./vm-hands-entry-lite-vn6zr7gp.js";import"./vm-hands-entry-lite-ct4mtq1m.js";import"./vm-hands-entry-lite-6bf97ret.js";import"./vm-hands-entry-lite-vj7xzb3y.js";import"./vm-hands-entry-lite-dbae6y48.js";import"./vm-hands-entry-lite-hv3dxd5k.js";import"./vm-hands-entry-lite-4r1yn35v.js";import"./vm-hands-entry-lite-y9jarm7q.js";import"./vm-hands-entry-lite-x3tgdvcf.js";import"./vm-hands-entry-lite-xe0benev.js";import"./vm-hands-entry-lite-hhk4h552.js";import"./vm-hands-entry-lite-g89cjfan.js";import"./vm-hands-entry-lite-j7e86nvy.js";import"./vm-hands-entry-lite-13s0mfpr.js";import"./vm-hands-entry-lite-2hfrcr50.js";import"./vm-hands-entry-lite-hfx1q0b0.js";import{a}from"./vm-hands-entry-lite-jvszqt0z.js";import{t,o,u,n,s,i}from"./vm-hands-entry-lite-dszmx6yf.js";import"./vm-hands-entry-lite-b6gsggvp.js";import{readFileSync as me,realpathSync as k,renameSync as ge,unlinkSync as fe,writeFileSync as he}from"fs";import{dirname as ye,join as I}from"path";function f(e){return`claude mcp add --transport http reason ${e}`}function h(e){return`codex mcp add reason --url ${e}
3
3
  codex mcp login reason`}var F=f("https://mcp.reasonmachines.com/mcp"),z=h("https://mcp.reasonmachines.com/mcp"),B=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,H=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var b="https://github.com/reason-machines/reason-plugins",X=`Connect a coding agent to Reason over MCP
4
4
 
5
5
  Usage:
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qe,Qn}from"./vm-hands-entry-lite-d3rz0tgb.js";export{Qn as CLI_USER_AGENT,Qe as CLI_VERSION};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Qe}from"./vm-hands-entry-lite-r34f55z4.js";import{a}from"./vm-hands-entry-lite-jvszqt0z.js";import{randomUUID as L}from"crypto";import{spawnSync as b}from"child_process";import{chmodSync as ee,cpSync as te,existsSync as x,lstatSync as A,mkdirSync as Y,readdirSync as ne,readFileSync as w,readlinkSync as re,realpathSync as T,renameSync as E,rmdirSync as ie,rmSync as g,symlinkSync as M,writeFileSync as oe}from"fs";import{dirname as I,join as u,relative as se,resolve as ce}from"path";var Yn="so.ara.cli",k=[Yn,"com.reasonmachines.cli"],F="5LJFSBRY2F";function Gr(e){return`(${e.map((t)=>`identifier "${t}"`).join(" or ")}) and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU] = "${F}"`}var G="ReasonBackgroundIdentity",$o="Contents/Helpers/ReasonPermissionTile",ae="so.ara.cli.permission-tile",Ne=Gr([ae,"com.reasonmachines.cli.permission-tile"]),v="AraBackgroundIdentity",ue="Reason",Ce=Gr(k),de=`anchor apple generic and (${k.map((e)=>`identifier "${e}"`).join(" or ")}) and certificate leaf[subject.OU] = "${F}"`;class h extends Error{code;constructor(e,t){super(t);this.code=e;this.name="MacOSBackgroundIdentityError"}}var R="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister";function le(e=a()){return u(e,"Library","Application Support","Reason","Background","Reason.app")}function O(e=a()){return u(e,"Library","Application Support","Ara","Background","Ara.app")}function fe(e){try{return A(e).isFile()}catch{return!1}}function D(e){return[G,v].map((t)=>u(e,"Contents","MacOS",t)).find(fe)??null}function d(e){try{if(!A(e).isDirectory())return!1;let t=w(u(e,"Contents","Info.plist"),"utf8");return k.some((n)=>t.includes(`<string>${n}</string>`))&&(t.includes(`<string>${ue}</string>`)||t.includes("<string>Ara</string>"))&&D(e)!==null}catch{return!1}}function Kr(e=a()){let t=le(e);if(!d(t))return null;try{let n=w(u(t,"Contents","Info.plist"),"utf8");return/<key>CFBundleVersion<\/key>\s*<string>(\d+\.\d+\.\d+)<\/string>/.exec(n)?.[1]??null}catch{return null}}function pe(e,t=a()){let n=Kr(t);return n===null||j(N(n.split(".")),N(e.split(/[.-]/).slice(0,3)))}var ge=1e4;function K(e,t){return b(e,[...t],{stdio:"ignore",timeout:ge}).status??1}var W=new Set;function H(e){if(process.env.REASON_TEST_REFUSE_REAL_IDENTITY!=="1")return;let t=(n)=>{try{return T(n)}catch{return ce(n)}};if(e!==void 0&&t(e)!==t(a()))return;throw Error("A test tried to change this computer's real Reason background identity; pass a temporary home. Refused by scripts/test-env.ts.")}var V=/\/(?:runtime|CLI)\/versions\/(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$|\/\.(?:ara|reason)(?:-staging)?-worker-(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$/,J=new Set(["ara","ara.exe","reason","reason.exe"]);function N(e){return e.map((t)=>Number(t))}function j(e,t){for(let n=0;n<3;n+=1)if(e[n]!==t[n])return e[n]<t[n];return!1}var ye=[0,2,161];function me(e){if(e===null)return!0;let t=ye,n=null;try{n=T(process.execPath)}catch{}return e.some((r)=>{let i=V.exec(r);if(i){let f=i[1]===void 0?i.slice(4,7):i.slice(1,4);return j(N(f),t)}let o=r.slice(r.lastIndexOf("/")+1);return J.has(o)&&r!==n&&r!==process.execPath})}function Ee(){let e=b("/bin/ps",["-xo","pid=,comm="],{encoding:"utf8",timeout:5000});if(e.status!==0)return null;let t=[];for(let n of e.stdout.split(`
2
+ import{Qe}from"./vm-hands-entry-lite-d3rz0tgb.js";import{a}from"./vm-hands-entry-lite-jvszqt0z.js";import{randomUUID as L}from"crypto";import{spawnSync as b}from"child_process";import{chmodSync as ee,cpSync as te,existsSync as x,lstatSync as A,mkdirSync as Y,readdirSync as ne,readFileSync as w,readlinkSync as re,realpathSync as T,renameSync as E,rmdirSync as ie,rmSync as g,symlinkSync as M,writeFileSync as oe}from"fs";import{dirname as I,join as u,relative as se,resolve as ce}from"path";var Yn="so.ara.cli",k=[Yn,"com.reasonmachines.cli"],F="5LJFSBRY2F";function Gr(e){return`(${e.map((t)=>`identifier "${t}"`).join(" or ")}) and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU] = "${F}"`}var G="ReasonBackgroundIdentity",$o="Contents/Helpers/ReasonPermissionTile",ae="so.ara.cli.permission-tile",Ne=Gr([ae,"com.reasonmachines.cli.permission-tile"]),v="AraBackgroundIdentity",ue="Reason",Ce=Gr(k),de=`anchor apple generic and (${k.map((e)=>`identifier "${e}"`).join(" or ")}) and certificate leaf[subject.OU] = "${F}"`;class h extends Error{code;constructor(e,t){super(t);this.code=e;this.name="MacOSBackgroundIdentityError"}}var R="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister";function le(e=a()){return u(e,"Library","Application Support","Reason","Background","Reason.app")}function O(e=a()){return u(e,"Library","Application Support","Ara","Background","Ara.app")}function fe(e){try{return A(e).isFile()}catch{return!1}}function D(e){return[G,v].map((t)=>u(e,"Contents","MacOS",t)).find(fe)??null}function d(e){try{if(!A(e).isDirectory())return!1;let t=w(u(e,"Contents","Info.plist"),"utf8");return k.some((n)=>t.includes(`<string>${n}</string>`))&&(t.includes(`<string>${ue}</string>`)||t.includes("<string>Ara</string>"))&&D(e)!==null}catch{return!1}}function Kr(e=a()){let t=le(e);if(!d(t))return null;try{let n=w(u(t,"Contents","Info.plist"),"utf8");return/<key>CFBundleVersion<\/key>\s*<string>(\d+\.\d+\.\d+)<\/string>/.exec(n)?.[1]??null}catch{return null}}function pe(e,t=a()){let n=Kr(t);return n===null||j(N(n.split(".")),N(e.split(/[.-]/).slice(0,3)))}var ge=1e4;function K(e,t){return b(e,[...t],{stdio:"ignore",timeout:ge}).status??1}var W=new Set;function H(e){if(process.env.REASON_TEST_REFUSE_REAL_IDENTITY!=="1")return;let t=(n)=>{try{return T(n)}catch{return ce(n)}};if(e!==void 0&&t(e)!==t(a()))return;throw Error("A test tried to change this computer's real Reason background identity; pass a temporary home. Refused by scripts/test-env.ts.")}var V=/\/(?:runtime|CLI)\/versions\/(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$|\/\.(?:ara|reason)(?:-staging)?-worker-(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$/,J=new Set(["ara","ara.exe","reason","reason.exe"]);function N(e){return e.map((t)=>Number(t))}function j(e,t){for(let n=0;n<3;n+=1)if(e[n]!==t[n])return e[n]<t[n];return!1}var ye=[0,2,161];function me(e){if(e===null)return!0;let t=ye,n=null;try{n=T(process.execPath)}catch{}return e.some((r)=>{let i=V.exec(r);if(i){let f=i[1]===void 0?i.slice(4,7):i.slice(1,4);return j(N(f),t)}let o=r.slice(r.lastIndexOf("/")+1);return J.has(o)&&r!==n&&r!==process.execPath})}function Ee(){let e=b("/bin/ps",["-xo","pid=,comm="],{encoding:"utf8",timeout:5000});if(e.status!==0)return null;let t=[];for(let n of e.stdout.split(`
3
3
  `)){let r=/^\s*(\d+)\s+(\S.*)$/.exec(n);if(!r||Number(r[1])===process.pid)continue;let i=r[2].trimEnd(),o=i.slice(i.lastIndexOf("/")+1);if(!V.test(i)&&J.has(o)){let c=b("/usr/sbin/lsof",["-a","-p",r[1],"-d","txt","-Fn"],{encoding:"utf8",timeout:5000}).stdout?.split(`
4
4
  `).find((l)=>l.startsWith("n/"));if(c)i=c.slice(1)}t.push(i)}return t}function _e(e){if(H(e.home),!d(e.sourceApp))throw new h("identity_invalid","The packaged Reason background identity is missing or invalid.");let t=e.command??K,n=le(e.home),r=I(n);Y(r,{recursive:!0,mode:448}),ee(r,448);let i=T(e.sourceApp),o=null;try{o=T(n)}catch{}if(i!==o){let f=`${process.pid}.${L()}`,c=u(r,`.Reason.app.${f}.tmp`),l=u(r,`.Reason.app.${f}.old`),y=!1;try{if(te(i,c,{recursive:!0,errorOnExist:!0,preserveTimestamps:!0}),!d(c))throw new h("identity_invalid","The copied Reason background identity is invalid.");let _=e.releaseSigned?["--test-requirement",`=${de}`]:[];if(t("/usr/bin/codesign",["--verify","--strict",..._,c])!==0)throw new h("identity_invalid_signature","The installed Reason background identity has an invalid signature.");let S=!1;for(let p=0;p<4;p+=1){let m=!1;try{E(n,l),m=!0,y=!0}catch(s){if(s.code!=="ENOENT")throw s}if(p===0)e.beforePublish?.();try{E(c,n),S=!0}catch(s){let Z=s.code;if(!["EEXIST","ENOTEMPTY"].includes(Z??""))throw s;if(m)g(l,{recursive:!0,force:!0}),y=!1;if(p===3)throw s;continue}if(m)g(l,{recursive:!0,force:!0}),y=!1;break}if(!S)throw Error("Could not publish Reason's background identity.")}catch(_){if(y&&!x(n)&&x(l))E(l,n);throw _}finally{g(c,{recursive:!0,force:!0}),g(l,{recursive:!0,force:!0})}}return z(n,e,{verified:i!==o}),n}function X(e){return u(I(e),".Reason.app.registered")}function q(e){try{let t=A(e);return t.isDirectory()?`${t.ino}:${t.birthtimeMs}`:null}catch{return null}}function C(e){let t=q(e);try{return t!==null&&w(X(e),"utf8")===t}catch{return!1}}function Q(e){if(d(e))return"bundle";try{if(A(u(e,"Contents","Info.plist"),{throwIfNoEntry:!1}))return null;return A(u(e,"Contents","MacOS",v)).isSymbolicLink()?"retired":null}catch{return null}}function z(e,t,n={}){let r=t.command??K;if(!n.verified&&r("/usr/bin/codesign",["--verify","--strict",e])!==0)throw new h("identity_invalid_signature","The installed Reason background identity has an invalid signature.");if(r(R,["-f",e])!==0)throw new h("identity_register_failed","Could not register Reason's macOS background identity.");let i=q(e);try{if(i)oe(X(e),i,{mode:384})}catch{}try{Se(e,t.home,r,t.runningExecutables??Ee)}catch(o){let f=o.code??"unknown";process.stderr.write(`Reason background identity: legacy_identity_retire_failed (${f})
5
5
  `)}}function Se(e,t,n,r){let i=D(e);if(!i)return;let o=O(t),f=I(o),c=(s)=>u(s,"Contents","MacOS",v),l=se(I(c(o)),i),y=`${process.pid}.${L()}`,_=Q(o);if(_===null)return;let S=_==="bundle";if(S)n(R,["-u",o]);let p=u(f,`.Ara.app.${y}.old`);if(!W.has(o)&&!me(r())){if(!S)n(R,["-u",o]);try{E(o,p)}catch(s){if(s.code==="ENOENT")return;throw s}g(p,{recursive:!0,force:!0}),Ie(f);return}if(!S){if(re(c(o))===l)return;let s=`${c(o)}.${y}`;M(l,s);try{E(s,c(o))}finally{g(s,{force:!0})}return}let m=u(f,`.Ara.app.${y}.shim`);Y(I(c(m)),{recursive:!0}),M(l,c(m));try{try{E(o,p)}catch(s){if(s.code==="ENOENT")return;throw s}try{E(m,o)}catch(s){if(x(o))return;throw E(p,o),s}}finally{g(m,{recursive:!0,force:!0}),g(p,{recursive:!0,force:!0})}}function Ie(e){try{if(ne(e).some((n)=>n!==".DS_Store"))return;g(u(e,".DS_Store"),{force:!0}),ie(e)}catch{}}var B=new Map;function Zn(e=a()){let t=B.get(e);if(t)return t;if(process.platform!=="darwin")return[];let n=U(e);if(n===null&&x(I(le(e))))Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,100),n=U(e);if(n===null)return[];return B.set(e,n),n}function U(e){let t=le(e),n=O(e);if(!d(t)||!C(t))try{he({home:e,skipWhenSettled:!0})}catch{}let r=d(t)&&(C(t)||!d(n))?t:d(n)?n:null,i=r?D(r):null;if(!i)return null;if(r===n)W.add(n);let o=b(i,["--can-spawn"],{env:{},timeout:2000,encoding:"utf8"});return o.status===0&&o.stdout===`spawn
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ot,D}from"./vm-hands-entry-lite-sxs29kff.js";import{R}from"./vm-hands-entry-lite-a3p6xz53.js";import{_,rr}from"./vm-hands-entry-lite-4anjdcth.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";function zi(e,i){let t=R(e,"REASON_API_URL")?.trim();if(!t)return rr(i);let n=new URL(t);if(n.protocol!=="https:"&&!(n.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(n.hostname)))throw Error("REASON_API_URL must use HTTPS (HTTP is allowed only for loopback development).");return n.origin}function es(e){return R(e,"REASON_API_URL")?.trim()?zi(e,"production"):void 0}function ts(e){return R(e,"REASON_API_KEY")?.trim()||void 0}async function As(e,i){let t=e.env??process.env,n=ts(t);if(!n)return(e.getCredentials??ot)({apiOrigin:es(t),signal:i});let a=zi(t,e.channel??_({env:t})),o=await(e.fetchImpl??fetch)(a+"/v3/self",{redirect:"error",headers:{authorization:"Bearer "+n,accept:"application/json"},signal:i}),p=await o.json().catch(()=>({})),r=be(p)?p:{};if(!o.ok){let s=typeof r.detail==="string"?r.detail:typeof r.message==="string"?r.message:"API key authentication failed ("+o.status+")";throw new D(o.status,typeof r.error==="string"?r.error:"api_key_auth_failed",s)}if(typeof r.org_id!=="string"||!r.org_id)throw Error("The API key in the environment did not resolve to a Workspace.");let l=Array.isArray(r.scopes)?r.scopes.filter((s)=>typeof s==="string"):[];return{credentialKind:"api_key",apiOrigin:a,accessToken:n,orgId:r.org_id,clientId:"api-key",refreshToken:"",expiresAt:"",scopes:l}}export{zi,es,ts,As};
2
+ import{ot,D}from"./vm-hands-entry-lite-e71jtjxa.js";import{R}from"./vm-hands-entry-lite-a3p6xz53.js";import{_,rr}from"./vm-hands-entry-lite-4anjdcth.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";function zi(e,i){let t=R(e,"REASON_API_URL")?.trim();if(!t)return rr(i);let n=new URL(t);if(n.protocol!=="https:"&&!(n.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(n.hostname)))throw Error("REASON_API_URL must use HTTPS (HTTP is allowed only for loopback development).");return n.origin}function es(e){return R(e,"REASON_API_URL")?.trim()?zi(e,"production"):void 0}function ts(e){return R(e,"REASON_API_KEY")?.trim()||void 0}async function As(e,i){let t=e.env??process.env,n=ts(t);if(!n)return(e.getCredentials??ot)({apiOrigin:es(t),signal:i});let a=zi(t,e.channel??_({env:t})),o=await(e.fetchImpl??fetch)(a+"/v3/self",{redirect:"error",headers:{authorization:"Bearer "+n,accept:"application/json"},signal:i}),p=await o.json().catch(()=>({})),r=be(p)?p:{};if(!o.ok){let s=typeof r.detail==="string"?r.detail:typeof r.message==="string"?r.message:"API key authentication failed ("+o.status+")";throw new D(o.status,typeof r.error==="string"?r.error:"api_key_auth_failed",s)}if(typeof r.org_id!=="string"||!r.org_id)throw Error("The API key in the environment did not resolve to a Workspace.");let l=Array.isArray(r.scopes)?r.scopes.filter((s)=>typeof s==="string"):[];return{credentialKind:"api_key",apiOrigin:a,accessToken:n,orgId:r.org_id,clientId:"api-key",refreshToken:"",expiresAt:"",scopes:l}}export{zi,es,ts,As};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{R}from"./vm-hands-entry-lite-a3p6xz53.js";import{Gr}from"./vm-hands-entry-lite-kng982rg.js";import{mt}from"./vm-hands-entry-lite-73f4cgkf.js";import{a}from"./vm-hands-entry-lite-jvszqt0z.js";import{A}from"./vm-hands-entry-lite-b6gsggvp.js";import{randomUUID as f}from"crypto";import{chmodSync as U,closeSync as h,constants as g,existsSync as me,fstatSync as F,lstatSync as p,mkdirSync as B,openSync as G,readFileSync as Y,readdirSync as z,readlinkSync as J,realpathSync as P,renameSync as _,rmSync as L,statSync as K,symlinkSync as _t,unlinkSync as M,writeFileSync as N}from"fs";import{basename as vt,dirname as k,isAbsolute as fe,join as c,relative as ge,resolve as b,sep as _e}from"path";import{createRequire as H}from"module";var q=1,j=1,ye=128,ve=65536;var he=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;var D=/^[a-z0-9_.-]{1,80}$/,be=64,Ee="so.ara.device-broker",Me=[Ee,"com.reasonmachines.device-broker"],Pt=Gr(Me);var we=["service.install_started","service.install_completed","service.install_failed","service.launcher_adopted","service.launcher_conflict","service.started","service.reconnecting","service.reconnected","service.idle_sleep_held","service.idle_sleep_released","service.idle_sleep_failed","service.start_failed","service.stopped","service.exit_failed","service.singleton_rejected","credential.migration_started","credential.migration_completed","credential.migration_failed","credential.store_started","credential.store_completed","credential.store_failed","credential.delete_started","credential.delete_completed","credential.delete_failed","update.check_started","update.not_available","update.download_started","update.downloaded","update.verified","update.activated","update.rollback","update.failed","executor.update.check_started","executor.update.not_available","executor.update.download_started","executor.update.downloaded","executor.update.verified","executor.update.activated","executor.update.rollback","executor.update.failed","identity.refresh_completed","identity.refresh_failed","update.device_moved","update.components_installed","update.deferred","update.deferral_expired","worker.previous_exit","worker.capabilities_withheld","identity.computer_use_unavailable"];function W(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function X(e,t,n=[]){let r=new Set([...t,...n]);return t.every((i)=>(i in e))&&Object.keys(e).every((i)=>r.has(i))}function E(e){return typeof e==="string"&&he.test(e)}function Z(e){return typeof e==="string"&&!Number.isNaN(Date.parse(e))&&new Date(e).toISOString()===e}function I(e){B(e,{recursive:!0,mode:448}),U(e,448)}function Re(e,t){I(k(e));let n=`${e}.${process.pid}.${f()}.tmp`;try{N(n,t,{mode:384,flag:"wx"}),U(n,384),_(n,e)}finally{if(me(n))M(n)}}function Rs(e={}){if((e.platform??process.platform)!=="darwin")throw new mt("unsupported_platform","The managed Reason runtime is currently available only on macOS.");let n=e.environment??process.env,r=R(n,"REASON_CLI_CHANNEL")==="staging",i=r?R(n,"REASON_MANAGED_RUNTIME_ROOT")?.trim():void 0,o=e.root!==void 0||Boolean(i&&fe(i))?null:c(e.home??a(),"Library","Application Support"),d=e.root??(o?c(o,r?"Reason Staging":"Reason","CLI"):i);return{executableName:"reason",root:d,...o?{legacyRoot:c(o,"Ara",...r?["staging","runtime"]:["runtime"])}:{},versions:c(d,"versions"),current:c(d,"current"),previous:c(d,"previous"),brokerLock:c(d,"broker.lock"),transitionLock:c(d,"transition.lock"),lifecycleEvents:c(d,"lifecycle-events")}}function Ts(e){let t=e.legacyRoot;if(!t)return null;return{root:t,versions:c(t,"versions"),current:c(t,"current"),previous:c(t,"previous"),brokerLock:c(t,"broker.lock"),transitionLock:c(t,"transition.lock"),lifecycleEvents:c(t,"lifecycle-events")}}function pe(e,t){let n;try{if(!p(e).isSymbolicLink())return null;n=J(e)}catch{return null}let r=n.match(/^versions\/(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)\/(ara|Reason|reason)$/);return r&&(r[2]==="ara"||r[2]===t)?r[1]:null}function Is(e){return pe(e.current,e.executableName)}function O(e,t,n){let i=ge(t,e).split(_e);return i.length===2&&E(i[0])&&(i[1]==="ara"||n!==void 0&&i[1]===n)?i[0]:null}function Le(e,t){try{return p(t).isSymbolicLink()&&b(k(t),J(t))===b(e.current)}catch{return!1}}function Ds(e,t=process.execPath){try{return O(P(t),P(e.versions),e.executableName)!==null}catch{let n=b(t);return n===b(e.current)||Le(e,n)||O(n,b(e.versions),e.executableName)!==null}}function Ae(e){return W(e)&&X(e,["schema_version","pid","nonce","started_at","runtime_version"])&&e.schema_version===q&&typeof e.pid==="number"&&Number.isSafeInteger(e.pid)&&e.pid>0&&typeof e.nonce==="string"&&/^[0-9a-f-]{36}$/.test(e.nonce)&&Z(e.started_at)&&E(e.runtime_version)}function Q(e,t){try{let n=p(e);if(!n.isDirectory()||!A(n))return null;let r=G(c(e,t),g.O_RDONLY|g.O_NOFOLLOW|g.O_NONBLOCK);try{let i=F(r);if(!i.isFile()||i.nlink!==1||!A(i)||i.size>4096)return null;return Y(r,"utf8")}finally{h(r)}}catch{return null}}function S(e){try{let t=JSON.parse(Q(e,"owner.json")??"null");return Ae(t)?t:null}catch{return null}}function ee(e){try{return process.kill(e,0),!0}catch(t){return!(t instanceof Error&&("code"in t)&&t.code==="ESRCH")}}var C="lease",Ne=2,Se=4,y;function ke(){if(y!==void 0)return y;if(y=null,process.platform!=="linux"&&process.platform!=="darwin")return null;let e;try{e=H(import.meta.url)("bun:ffi")}catch{return null}let t=process.platform==="darwin"?"__error":"__errno_location",n=process.platform==="darwin"?["/usr/lib/libSystem.B.dylib"]:["libc.so.6",`libc.musl-${process.arch==="arm64"?"aarch64":"x86_64"}.so.1`];for(let r of n)try{let i=e.dlopen(r,{flock:{args:[e.FFIType.i32,e.FFIType.i32],returns:e.FFIType.i32},[t]:{args:[],returns:e.FFIType.ptr}}),s=i.symbols[t]();if(s===null)continue;return y={flock:(o,d)=>i.symbols.flock(o,d),errno:()=>e.read.i32(s),wouldBlock:process.platform==="darwin"?35:11},y}catch{}return null}var v,Ie=3221225472,Te=4,xe=128,Pe=32;function De(e){if(v===void 0){v=null;try{let s=H(import.meta.url)("bun:ffi"),{FFIType:o}=s;v={kernel:s.dlopen("kernel32.dll",{CreateFileW:{args:[o.ptr,o.u32,o.u32,o.ptr,o.u32,o.u32,o.ptr],returns:o.i64_fast},CloseHandle:{args:[o.i64_fast],returns:o.i32},GetLastError:{args:[],returns:o.u32}}).symbols,ptr:(l)=>s.ptr(l)}}catch{return null}}if(!v)return null;let{kernel:t,ptr:n}=v,r=Buffer.from(`${e}\x00`,"utf16le"),i=t.CreateFileW(n(r),Ie,0,null,Te,xe,null);if(Number(i)===-1)return t.GetLastError()===Pe?"busy":null;return{release:()=>{t.CloseHandle(i)}}}function Oe(e){if(process.platform==="win32")return De(`${e}.lease`);let t=ke();if(!t)return null;let n=G(`${e}.lease`,g.O_RDWR|g.O_CREAT|g.O_NOFOLLOW,384);try{let r=F(n);if(!r.isFile()||r.nlink!==1||!A(r))return h(n),"busy";if(t.flock(n,Ne|Se)===0)return{release:()=>h(n)};let i=t.errno();return h(n),i===t.wouldBlock?"busy":null}catch(r){throw h(n),r}}function Os(e){I(k(e.path));let t=Oe(e.path);if(t==="busy")return{acquired:!1,owner:S(e.path),recoveredStaleOwner:!1};let n=t!==null;try{let r=Ce(e,t);if(r.acquired)n=!1;return r}finally{if(n)t.release()}}function Ce(e,t){let n=e.alive??ee,r=!1;for(let i=0;i<4;i+=1){let s={schema_version:q,pid:e.pid??process.pid,nonce:e.nonce?.()??f(),started_at:(e.now?.()??new Date).toISOString(),runtime_version:e.runtimeVersion},o=`${e.path}.init-${process.pid}-${f()}`,d=!1;try{if(B(o,{mode:448}),N(c(o,"owner.json"),`${JSON.stringify(s)}
2
+ import{R}from"./vm-hands-entry-lite-a3p6xz53.js";import{Gr}from"./vm-hands-entry-lite-5tdbk4pq.js";import{mt}from"./vm-hands-entry-lite-73f4cgkf.js";import{a}from"./vm-hands-entry-lite-jvszqt0z.js";import{A}from"./vm-hands-entry-lite-b6gsggvp.js";import{randomUUID as f}from"crypto";import{chmodSync as U,closeSync as h,constants as g,existsSync as me,fstatSync as F,lstatSync as p,mkdirSync as B,openSync as G,readFileSync as Y,readdirSync as z,readlinkSync as J,realpathSync as P,renameSync as _,rmSync as L,statSync as K,symlinkSync as _t,unlinkSync as M,writeFileSync as N}from"fs";import{basename as vt,dirname as k,isAbsolute as fe,join as c,relative as ge,resolve as b,sep as _e}from"path";import{createRequire as H}from"module";var q=1,j=1,ye=128,ve=65536;var he=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;var D=/^[a-z0-9_.-]{1,80}$/,be=64,Ee="so.ara.device-broker",Me=[Ee,"com.reasonmachines.device-broker"],Pt=Gr(Me);var we=["service.install_started","service.install_completed","service.install_failed","service.launcher_adopted","service.launcher_conflict","service.started","service.reconnecting","service.reconnected","service.idle_sleep_held","service.idle_sleep_released","service.idle_sleep_failed","service.start_failed","service.stopped","service.exit_failed","service.singleton_rejected","credential.migration_started","credential.migration_completed","credential.migration_failed","credential.store_started","credential.store_completed","credential.store_failed","credential.delete_started","credential.delete_completed","credential.delete_failed","update.check_started","update.not_available","update.download_started","update.downloaded","update.verified","update.activated","update.rollback","update.failed","executor.update.check_started","executor.update.not_available","executor.update.download_started","executor.update.downloaded","executor.update.verified","executor.update.activated","executor.update.rollback","executor.update.failed","identity.refresh_completed","identity.refresh_failed","update.device_moved","update.components_installed","update.deferred","update.deferral_expired","worker.previous_exit","worker.capabilities_withheld","identity.computer_use_unavailable"];function W(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function X(e,t,n=[]){let r=new Set([...t,...n]);return t.every((i)=>(i in e))&&Object.keys(e).every((i)=>r.has(i))}function E(e){return typeof e==="string"&&he.test(e)}function Z(e){return typeof e==="string"&&!Number.isNaN(Date.parse(e))&&new Date(e).toISOString()===e}function I(e){B(e,{recursive:!0,mode:448}),U(e,448)}function Re(e,t){I(k(e));let n=`${e}.${process.pid}.${f()}.tmp`;try{N(n,t,{mode:384,flag:"wx"}),U(n,384),_(n,e)}finally{if(me(n))M(n)}}function Rs(e={}){if((e.platform??process.platform)!=="darwin")throw new mt("unsupported_platform","The managed Reason runtime is currently available only on macOS.");let n=e.environment??process.env,r=R(n,"REASON_CLI_CHANNEL")==="staging",i=r?R(n,"REASON_MANAGED_RUNTIME_ROOT")?.trim():void 0,o=e.root!==void 0||Boolean(i&&fe(i))?null:c(e.home??a(),"Library","Application Support"),d=e.root??(o?c(o,r?"Reason Staging":"Reason","CLI"):i);return{executableName:"reason",root:d,...o?{legacyRoot:c(o,"Ara",...r?["staging","runtime"]:["runtime"])}:{},versions:c(d,"versions"),current:c(d,"current"),previous:c(d,"previous"),brokerLock:c(d,"broker.lock"),transitionLock:c(d,"transition.lock"),lifecycleEvents:c(d,"lifecycle-events")}}function Ts(e){let t=e.legacyRoot;if(!t)return null;return{root:t,versions:c(t,"versions"),current:c(t,"current"),previous:c(t,"previous"),brokerLock:c(t,"broker.lock"),transitionLock:c(t,"transition.lock"),lifecycleEvents:c(t,"lifecycle-events")}}function pe(e,t){let n;try{if(!p(e).isSymbolicLink())return null;n=J(e)}catch{return null}let r=n.match(/^versions\/(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)\/(ara|Reason|reason)$/);return r&&(r[2]==="ara"||r[2]===t)?r[1]:null}function Is(e){return pe(e.current,e.executableName)}function O(e,t,n){let i=ge(t,e).split(_e);return i.length===2&&E(i[0])&&(i[1]==="ara"||n!==void 0&&i[1]===n)?i[0]:null}function Le(e,t){try{return p(t).isSymbolicLink()&&b(k(t),J(t))===b(e.current)}catch{return!1}}function Ds(e,t=process.execPath){try{return O(P(t),P(e.versions),e.executableName)!==null}catch{let n=b(t);return n===b(e.current)||Le(e,n)||O(n,b(e.versions),e.executableName)!==null}}function Ae(e){return W(e)&&X(e,["schema_version","pid","nonce","started_at","runtime_version"])&&e.schema_version===q&&typeof e.pid==="number"&&Number.isSafeInteger(e.pid)&&e.pid>0&&typeof e.nonce==="string"&&/^[0-9a-f-]{36}$/.test(e.nonce)&&Z(e.started_at)&&E(e.runtime_version)}function Q(e,t){try{let n=p(e);if(!n.isDirectory()||!A(n))return null;let r=G(c(e,t),g.O_RDONLY|g.O_NOFOLLOW|g.O_NONBLOCK);try{let i=F(r);if(!i.isFile()||i.nlink!==1||!A(i)||i.size>4096)return null;return Y(r,"utf8")}finally{h(r)}}catch{return null}}function S(e){try{let t=JSON.parse(Q(e,"owner.json")??"null");return Ae(t)?t:null}catch{return null}}function ee(e){try{return process.kill(e,0),!0}catch(t){return!(t instanceof Error&&("code"in t)&&t.code==="ESRCH")}}var C="lease",Ne=2,Se=4,y;function ke(){if(y!==void 0)return y;if(y=null,process.platform!=="linux"&&process.platform!=="darwin")return null;let e;try{e=H(import.meta.url)("bun:ffi")}catch{return null}let t=process.platform==="darwin"?"__error":"__errno_location",n=process.platform==="darwin"?["/usr/lib/libSystem.B.dylib"]:["libc.so.6",`libc.musl-${process.arch==="arm64"?"aarch64":"x86_64"}.so.1`];for(let r of n)try{let i=e.dlopen(r,{flock:{args:[e.FFIType.i32,e.FFIType.i32],returns:e.FFIType.i32},[t]:{args:[],returns:e.FFIType.ptr}}),s=i.symbols[t]();if(s===null)continue;return y={flock:(o,d)=>i.symbols.flock(o,d),errno:()=>e.read.i32(s),wouldBlock:process.platform==="darwin"?35:11},y}catch{}return null}var v,Ie=3221225472,Te=4,xe=128,Pe=32;function De(e){if(v===void 0){v=null;try{let s=H(import.meta.url)("bun:ffi"),{FFIType:o}=s;v={kernel:s.dlopen("kernel32.dll",{CreateFileW:{args:[o.ptr,o.u32,o.u32,o.ptr,o.u32,o.u32,o.ptr],returns:o.i64_fast},CloseHandle:{args:[o.i64_fast],returns:o.i32},GetLastError:{args:[],returns:o.u32}}).symbols,ptr:(l)=>s.ptr(l)}}catch{return null}}if(!v)return null;let{kernel:t,ptr:n}=v,r=Buffer.from(`${e}\x00`,"utf16le"),i=t.CreateFileW(n(r),Ie,0,null,Te,xe,null);if(Number(i)===-1)return t.GetLastError()===Pe?"busy":null;return{release:()=>{t.CloseHandle(i)}}}function Oe(e){if(process.platform==="win32")return De(`${e}.lease`);let t=ke();if(!t)return null;let n=G(`${e}.lease`,g.O_RDWR|g.O_CREAT|g.O_NOFOLLOW,384);try{let r=F(n);if(!r.isFile()||r.nlink!==1||!A(r))return h(n),"busy";if(t.flock(n,Ne|Se)===0)return{release:()=>h(n)};let i=t.errno();return h(n),i===t.wouldBlock?"busy":null}catch(r){throw h(n),r}}function Os(e){I(k(e.path));let t=Oe(e.path);if(t==="busy")return{acquired:!1,owner:S(e.path),recoveredStaleOwner:!1};let n=t!==null;try{let r=Ce(e,t);if(r.acquired)n=!1;return r}finally{if(n)t.release()}}function Ce(e,t){let n=e.alive??ee,r=!1;for(let i=0;i<4;i+=1){let s={schema_version:q,pid:e.pid??process.pid,nonce:e.nonce?.()??f(),started_at:(e.now?.()??new Date).toISOString(),runtime_version:e.runtimeVersion},o=`${e.path}.init-${process.pid}-${f()}`,d=!1;try{if(B(o,{mode:448}),N(c(o,"owner.json"),`${JSON.stringify(s)}
3
3
  `,{mode:384,flag:"wx"}),t!==null)N(c(o,C),`flock
4
4
  `,{mode:384,flag:"wx"});e.beforePublish?.();try{throw p(e.path),Object.assign(Error("Managed runtime lock exists."),{code:"EEXIST"})}catch(m){if(m.code!=="ENOENT")throw m}_(o,e.path),d=!0;let l=!1;return{acquired:!0,owner:s,recoveredStaleOwner:r,release(){if(l)return;if(l=!0,S(e.path)?.nonce===s.nonce)L(e.path,{recursive:!0,force:!0});t?.release()}}}catch(l){let m=l.code;if(!["EEXIST","ENOTEMPTY"].includes(m??""))throw l;let u=S(e.path),re=(e.now?.()??new Date).getTime(),ie=u&&e.staleAfterMs!==void 0?re-Date.parse(u.started_at)<e.staleAfterMs:!1,ae=u!==null&&!(t!==null&&Q(e.path,C)!==null)&&n(u.pid);if(!u||ae||ie)return{acquired:!1,owner:u,recoveredStaleOwner:!1};let T=`${e.path}.stale-${process.pid}-${f()}`;try{_(e.path,T),L(T,{recursive:!0,force:!0}),r=!0}catch(x){let oe=x.code;if(!["ENOENT","EEXIST"].includes(oe??""))throw x}}finally{if(!d)L(o,{recursive:!0,force:!0})}}throw new mt("lock_unavailable","Could not acquire the managed Reason runtime lock.")}function te(e){return W(e)&&X(e,["schema_version","event_id","occurred_at","event","runtime_version"],["from_version","to_version","reason_code","duration_ms","attempt_count","retry_in_ms","capabilities"])&&e.schema_version===j&&typeof e.event_id==="string"&&/^[0-9a-f-]{36}$/.test(e.event_id)&&Z(e.occurred_at)&&typeof e.event==="string"&&we.includes(e.event)&&E(e.runtime_version)&&(e.from_version===void 0||E(e.from_version))&&(e.to_version===void 0||E(e.to_version))&&(e.reason_code===void 0||typeof e.reason_code==="string"&&D.test(e.reason_code))&&(e.duration_ms===void 0||typeof e.duration_ms==="number"&&Number.isSafeInteger(e.duration_ms)&&e.duration_ms>=0&&e.duration_ms<=86400000)&&(e.attempt_count===void 0||typeof e.attempt_count==="number"&&Number.isSafeInteger(e.attempt_count)&&e.attempt_count>=1&&e.attempt_count<=1e5)&&(e.retry_in_ms===void 0||typeof e.retry_in_ms==="number"&&Number.isSafeInteger(e.retry_in_ms)&&e.retry_in_ms>=0&&e.retry_in_ms<=30000)&&(e.capabilities===void 0||Array.isArray(e.capabilities)&&e.capabilities.length<=be&&e.capabilities.every((t)=>typeof t==="string"&&D.test(t)))}var Ve=/^(\d{22}-[0-9a-f-]{36}\.json)$/,Ue=/^(\d{22}-[0-9a-f-]{36}\.json)\.sending-(\d+)-[0-9a-f-]{36}$/,Fe=300000,w=0n;function Be(e){let t=BigInt(new Date(e.occurred_at).getTime())*1000000n;return w=t>w?t:w+1n,`${String(w).padStart(22,"0")}-${e.event_id}.json`}function ne(e){try{return z(e.lifecycleEvents).filter((t)=>Ve.test(t)).sort()}catch{return[]}}function V(e){try{let t=JSON.parse(Y(e,"utf8"));return te(t)?t:null}catch{return null}}function $e(e,t=ee,n=Date.now()){let r;try{r=z(e.lifecycleEvents)}catch{return}for(let i of r){let s=i.match(Ue);if(!s)continue;let o=c(e.lifecycleEvents,i),d=c(e.lifecycleEvents,s[1]),l=!t(Number(s[2]));if(!l)try{l=n-K(o).mtimeMs>=Fe}catch{continue}if(!l)continue;try{_(o,d)}catch(m){let u=m.code;if(u==="EEXIST")M(o);else if(u!=="ENOENT")throw m}}}function Ge(e){let n=ne(e).flatMap((i)=>{try{return[{name:i,size:K(c(e.lifecycleEvents,i)).size}]}catch{return[]}}),r=n.reduce((i,s)=>i+s.size,0);while(n.length>ye||r>ve){let i=n.shift();if(!i)break;try{M(c(e.lifecycleEvents,i.name)),r-=i.size}catch(s){if(s.code!=="ENOENT")throw s}}}function Ns(e,t,n={}){let r={schema_version:j,event_id:n.eventId?.()??f(),occurred_at:(n.now?.()??new Date).toISOString(),...t};if(!te(r))throw new mt("invalid_lifecycle_event","Managed runtime lifecycle event is invalid.");return I(e.lifecycleEvents),Re(c(e.lifecycleEvents,Be(r)),`${JSON.stringify(r)}
5
5
  `),Ge(e),r}async function Ls(e,t,n){$e(e);let r=0;for(let i of ne(e)){let s=c(e.lifecycleEvents,i);if(n){let l=V(s);if(!l||!n(l))continue}let o=`${s}.sending-${process.pid}-${f()}`;try{_(s,o)}catch(l){if(l.code==="ENOENT")continue;throw l}let d=V(o);if(!d){M(o);continue}try{await t(d),M(o),r+=1}catch{try{_(o,s)}catch(l){if(l.code!=="ENOENT")throw l}break}}return r}export{Rs,Ts,Is,Ds,Os,Ns,Ls};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{S,Wt,Bn,Ge,Fn,jn}from"./vm-hands-entry-lite-k9vk84wa.js";import{Zn}from"./vm-hands-entry-lite-kng982rg.js";import{Ln}from"./vm-hands-entry-lite-ct4mtq1m.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as ys,spawn as qe}from"child_process";import{existsSync as ws}from"fs";import{connect as xs}from"net";function pn(){let e=new Set,t=null,n=(s)=>({holder:t?.viewer??null,you:t===s,same_user:Boolean(t?.viewer&&s.viewer&&t.viewer.user_id===s.viewer.user_id)}),o=()=>{for(let s of e)s.notify(n(s))};return{join(s){return e.add(s),s.notify(n(s)),()=>{if(!e.delete(s))return;if(t!==s)return;t=null,o()}},claim(s){if(t===s||!e.has(s))return;t=s,o()}}}var ut=pn();import{createHash as St}from"crypto";import{once as Sn}from"events";import{createWriteStream as vn,existsSync as mr,mkdirSync as gr,mkdtempSync as hr,readFileSync as le,readdirSync as br,renameSync as yr,realpathSync as En,rmSync as Pn,statSync as Ne,writeFileSync as wr}from"fs";import{delimiter as _r,dirname as vt,join as b}from"path";import{finished as Cn}from"stream/promises";var We="omljlfpmafedpplnpkkahegadhkimdje",go="https://chromewebstore.google.com/detail/reason/omljlfpmafedpplnpkkahegadhkimdje";var O={ocu:{repository:"https://github.com/iFurySt/open-codex-computer-use.git",revision:"386a260d1ab8b690adbbb27f7471595cf0c2b752",version:"0.3.5"},obu:{repository:"https://github.com/iFurySt/open-browser-use.git",revision:"ac015846df75928fbcf0f3a0f3ba3a210ce1a507",version:"0.1.42"}},H={version:"155.0.8059.84",macArm64Sha256:"13b9e98ce56f5ce18e100a009f455c9285f399e7c9dc8a76fdf2f3a9755bb5f2",linux64Sha256:"cf0f049892dea22e6a6db26d47ed0d7776b7158edcbec4634086633df8bafcbc",win64Sha256:"507f2a031441d10c62b5e3d4e863f09ac1198a571c1419976cbd8387f639afde"};var J={ocu:{url:`https://registry.npmjs.org/open-computer-use/-/open-computer-use-${O.ocu.version}.tgz`,sha256:"7c16a87c8cd357787b02c0ebd040dd5f93880c1fb51c1901caa2e0c05d063130",size_bytes:5844280},obu:{url:`https://registry.npmjs.org/open-browser-use/-/open-browser-use-${O.obu.version}.tgz`,sha256:"9386d8ce0a147b3f55e1807b68edf736836378807541c457c9b5f6ca2cabaa4e",size_bytes:21372018},extension:{url:`https://github.com/iFurySt/open-browser-use/releases/download/v${O.obu.version}/open-browser-use-chrome-extension-${O.obu.version}.zip`,sha256:"c9c07bec1175e12ea6985b0e7784a5ef01fd03f014b958224a1e17dcd838a241",size_bytes:31070}},F="pnbmoicbkopffjjgfgfglopechaiemkp";import{spawn as Me}from"child_process";import{createRequire as fn}from"module";import{join as mn}from"path";var gn=30000,hn=1048576;function Te(){return process.env.SystemRoot??"C:\\Windows"}function bn(){return mn(Te(),"System32","WindowsPowerShell","v1.0","powershell.exe")}var yn=String.raw`
2
+ import{S,Wt,Bn,Ge,Fn,jn}from"./vm-hands-entry-lite-k9vk84wa.js";import{Zn}from"./vm-hands-entry-lite-5tdbk4pq.js";import{Ln}from"./vm-hands-entry-lite-ct4mtq1m.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as ys,spawn as qe}from"child_process";import{existsSync as ws}from"fs";import{connect as xs}from"net";function pn(){let e=new Set,t=null,n=(s)=>({holder:t?.viewer??null,you:t===s,same_user:Boolean(t?.viewer&&s.viewer&&t.viewer.user_id===s.viewer.user_id)}),o=()=>{for(let s of e)s.notify(n(s))};return{join(s){return e.add(s),s.notify(n(s)),()=>{if(!e.delete(s))return;if(t!==s)return;t=null,o()}},claim(s){if(t===s||!e.has(s))return;t=s,o()}}}var ut=pn();import{createHash as St}from"crypto";import{once as Sn}from"events";import{createWriteStream as vn,existsSync as mr,mkdirSync as gr,mkdtempSync as hr,readFileSync as le,readdirSync as br,renameSync as yr,realpathSync as En,rmSync as Pn,statSync as Ne,writeFileSync as wr}from"fs";import{delimiter as _r,dirname as vt,join as b}from"path";import{finished as Cn}from"stream/promises";var We="omljlfpmafedpplnpkkahegadhkimdje",go="https://chromewebstore.google.com/detail/reason/omljlfpmafedpplnpkkahegadhkimdje";var O={ocu:{repository:"https://github.com/iFurySt/open-codex-computer-use.git",revision:"386a260d1ab8b690adbbb27f7471595cf0c2b752",version:"0.3.5"},obu:{repository:"https://github.com/iFurySt/open-browser-use.git",revision:"ac015846df75928fbcf0f3a0f3ba3a210ce1a507",version:"0.1.42"}},H={version:"155.0.8059.84",macArm64Sha256:"13b9e98ce56f5ce18e100a009f455c9285f399e7c9dc8a76fdf2f3a9755bb5f2",linux64Sha256:"cf0f049892dea22e6a6db26d47ed0d7776b7158edcbec4634086633df8bafcbc",win64Sha256:"507f2a031441d10c62b5e3d4e863f09ac1198a571c1419976cbd8387f639afde"};var J={ocu:{url:`https://registry.npmjs.org/open-computer-use/-/open-computer-use-${O.ocu.version}.tgz`,sha256:"7c16a87c8cd357787b02c0ebd040dd5f93880c1fb51c1901caa2e0c05d063130",size_bytes:5844280},obu:{url:`https://registry.npmjs.org/open-browser-use/-/open-browser-use-${O.obu.version}.tgz`,sha256:"9386d8ce0a147b3f55e1807b68edf736836378807541c457c9b5f6ca2cabaa4e",size_bytes:21372018},extension:{url:`https://github.com/iFurySt/open-browser-use/releases/download/v${O.obu.version}/open-browser-use-chrome-extension-${O.obu.version}.zip`,sha256:"c9c07bec1175e12ea6985b0e7784a5ef01fd03f014b958224a1e17dcd838a241",size_bytes:31070}},F="pnbmoicbkopffjjgfgfglopechaiemkp";import{spawn as Me}from"child_process";import{createRequire as fn}from"module";import{join as mn}from"path";var gn=30000,hn=1048576;function Te(){return process.env.SystemRoot??"C:\\Windows"}function bn(){return mn(Te(),"System32","WindowsPowerShell","v1.0","powershell.exe")}var yn=String.raw`
3
3
  $ErrorActionPreference = "Stop"
4
4
  Add-Type -TypeDefinition @"
5
5
  using System;
@@ -69,7 +69,7 @@ while ($null -ne ($line = [Console]::In.ReadLine())) {
69
69
  `).join("")),t.stdin.writableLength>hn)d({reason:"input_backpressure"})},g=()=>{i=Me(...Oe("clipboard"),{env:Ae(),stdio:["ignore","pipe","ignore"],windowsHide:!0});let p="";i.stdout?.on("data",(w)=>{if(s)return;p+=w.toString("ascii");for(let f=p.indexOf(`
70
70
  `);f>=0;f=p.indexOf(`
71
71
  `)){let M=p.slice(0,f).replace(/\r$/,"");if(p=p.slice(f+1),!M.startsWith("c "))continue;let E=M.slice(2);if(E.length>Math.ceil(S/3)*4||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(E)){d({reason:"display_protocol"});return}let c=Buffer.from(E,"base64");if(c.byteLength<=S)e.clipboard(c.toString("utf8"));if(s)return}if(p.length>Math.ceil(S/3)*4+4)d({reason:"display_protocol"})}),i.once("error",()=>y("Reason could not watch this computer's desktop clipboard.")),i.once("exit",()=>{if(!s)y("Reason could not watch this computer's desktop clipboard.")})};return t.stdout.on("data",(p)=>{if(s||o===null)return;o+=p.toString("utf8");let w=o.indexOf(`
72
- `);if(w<0){if(o.length>4096)d({reason:"display_protocol"});return}let f=ht(o.slice(0,w).trim());if(o=null,!f)d({reason:"display_protocol"});else if(f.session===0)y("This Windows worker runs as a service, which has no desktop: run it in the signed-in desktop session.");else g(),e.ready({width:f.width,height:f.height})}),t.stdin.on("error",()=>{return}),t.once("error",()=>y("Reason could not start this computer's desktop input.")),t.once("exit",()=>{if(o!==null)y("Reason could not start this computer's desktop input.");else d({reason:"display_closed"})}),{pointer:(p,w,f)=>h(n.pointer(p,w,f)),key:(p,w)=>h(n.key(p,w)),clipboard:(p)=>h([`c ${Buffer.from(p,"utf8").toString("base64")}`]),close(){s=!0,a()}}}var Rn=["none","standard","all"],ue="22.23.3",Mn={"linux-x64":"1084aa36196bba4c3a5e69a1ee388a6e4ff729dad09445fbcd434b28fe3c24af","linux-arm64":"5ced2d48d1d7198739b7f86804de0171aefb6823b684b12341d3321afc3cb0b2","darwin-arm64":"23b25245dcfb9af7262f8ff142e9e2e0af025368117329e7a7458a51e5922f53","win32-x64":"2b0ff57b049cda1bbcea2240eec20467018713c1efe1f7360c2681859b90ed71","win32-arm64":"33dad22e4cef5ee8f9fbb1b0d037fdacd0e56d12a4580f0d63f68b894deab535"},$e={"linux-x64":{ocu:"dist/linux/amd64/open-computer-use",obu:"native/linux-amd64/open-browser-use"},"linux-arm64":{ocu:"dist/linux/arm64/open-computer-use",obu:"native/linux-arm64/open-browser-use"},"darwin-arm64":{ocu:"dist/Open Computer Use.app/Contents/MacOS/OpenComputerUse",obu:"native/darwin-arm64/open-browser-use"},"win32-x64":{ocu:"dist/windows/amd64/open-computer-use.exe",obu:"native/windows-amd64/open-browser-use.exe"},"win32-arm64":{ocu:"dist/windows/arm64/open-computer-use.exe",obu:"native/windows-arm64/open-browser-use.exe"}},Et="chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",Dt="chrome-win64/chrome.exe",W={version:"9.0.2",url:"https://ffmpeg.martin-riedl.de/download/macos/arm64/1789931890_9.0.2/ffmpeg.zip",sha256:"c8ed4c4e6978a03c485edbfe4e0a5dc2380f8a30bba5150531b31b094492d924"},An={version:W.version,url:"https://ffmpeg.martin-riedl.de/download/macos/arm64/1789931890_9.0.2/ffprobe.zip",sha256:"fcbe839537485eaee7a7a8bc5cbc0f90d53617e80943e8a5b2e31cb851197ea6"},Le={version:W.version,url:`https://github.com/GyanD/codexffmpeg/releases/download/${W.version}/ffmpeg-${W.version}-essentials_build.zip`,sha256:"60f467265b1e312373dbcd92200c2618a74850f98d3d078e94296bb3fa2047ba"},_t=`ffmpeg-${Le.version}-essentials_build/bin`,z="com.ifuryst.open_browser_use.extension",It="com.reasonmachines.browser_use.extension",Ht="/tmp/reason-browser-use",Ue=["tint2","picom","xterm","pcmanfm"],Pt=["fonts-droid-fallback"],Ct=["pulseaudio"],Rt=["tigervnc-standalone-server"],$n=["xvfb","openbox","x11vnc","x11-utils","x11-xserver-utils","xdotool","dbus-x11","at-spi2-core","python3","python3-gi","gir1.2-atspi-2.0","gir1.2-gtk-3.0","fonts-dejavu-core",...Pt,"galculator","chromium","ffmpeg","tmux",...Ct,...Rt,...Ue],Un=new Set([...Ue,...Pt,...Ct,...Rt]),kt=$n.filter((e)=>e!=="chromium"&&!Un.has(e)),Hn=["Xvfb","openbox","x11vnc","xdotool","dbus-launch","python3","ffmpeg","tmux"],ce="/usr/bin/chromium",zn=["/usr/local/bin","/usr/bin","/bin","/opt/homebrew/bin"];function Gn(e=process.platform,t=process.arch){let n=`${e}-${t}`;return n==="linux-x64"||n==="linux-arm64"||n==="darwin-arm64"||n==="win32-x64"||n==="win32-arm64"?n:null}function K(e){return e==="win32-x64"||e==="win32-arm64"}function Be(e){return K(e)?`node-v${ue}-${e.replace("win32","win")}`:`node-v${ue}-${e}`}function de(e){return{node:{version:ue,url:`https://nodejs.org/dist/v${ue}/${Be(e)}${K(e)?".zip":".tar.gz"}`,sha256:Mn[e]},open_computer_use:{version:O.ocu.version,url:J.ocu.url,sha256:J.ocu.sha256},open_browser_use:{version:O.obu.version,url:J.obu.url,sha256:J.obu.sha256},...e==="darwin-arm64"?{chrome_for_testing:{version:H.version,url:`https://storage.googleapis.com/chrome-for-testing-public/${H.version}/mac-arm64/chrome-mac-arm64.zip`,sha256:H.macArm64Sha256}}:K(e)?{chrome_for_testing:{version:H.version,url:`https://storage.googleapis.com/chrome-for-testing-public/${H.version}/win64/chrome-win64.zip`,sha256:H.win64Sha256}}:{}}}function Vn(e){let t={extension:F};for(let[n,o]of Object.entries(de(e)))t[n]=`${o.version}@${o.sha256}`;return t}function Mt(e){return b(e,".local","share","reason","desktop")}function Tr(e,t=Ln()){let n=Mt(t),o=(p)=>b(n,p,de(e)[p]?.version??""),s=o("open_computer_use"),i=o("open_browser_use"),a=e==="darwin-arm64",d=K(e),y=b(t,"Library","Application Support"),h=b(process.platform==="win32"&&process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:b(t,"AppData","Local"),"OpenBrowserUse"),g=a?b(y,"Google","Chrome","NativeMessagingHosts",`${z}.json`):d?b(h,"NativeMessagingHosts",`${z}.json`):b(t,".config","google-chrome","NativeMessagingHosts",`${z}.json`);return{root:n,automation:b(vt(n),"automation"),receipt:b(n,"receipt.json"),minimal:is(t),node:d?b(o("node"),Be(e),"node.exe"):b(o("node"),"bin","node"),ocuDir:s,ocu:b(s,$e[e].ocu),ocuApp:a?b(s,"dist","Open Computer Use.app"):null,obuDir:i,obu:b(i,"cli","open-browser-use.js"),nativeHost:b(i,$e[e].obu),extensionDir:a?b(y,"OpenBrowserUse","chrome-extension","release"):d?b(h,"chrome-extension","release"):b(t,".local","share","open-browser-use","chrome-extension","release"),setupNativeHostManifest:g,nativeHostManifests:a?[g,b(y,"Google","ChromeForTesting","NativeMessagingHosts",`${z}.json`)]:d?[g]:[b(t,".config","chromium","NativeMessagingHosts",`${z}.json`),b(t,".config","google-chrome-for-testing","NativeMessagingHosts",`${z}.json`)],browser:a?b(o("chrome_for_testing"),Et):d?b(o("chrome_for_testing"),Dt):ce,userChromeHost:a?b(n,"user-chrome","reason-browser-use"):null,userChromeRegistration:a?b(y,"Google","Chrome","NativeMessagingHosts",`${It}.json`):null,ffmpegDir:b(n,"ffmpeg"),ffmpeg:a?b(n,"ffmpeg",W.version,"ffmpeg"):d?b(n,"ffmpeg",Le.version,_t,"ffmpeg.exe"):null,ffprobe:a?b(n,"ffprobe",An.version,"ffprobe"):d?b(n,"ffmpeg",Le.version,_t,"ffprobe.exe"):null}}function Wn(e){try{let t=JSON.parse(le(e,"utf8"));if(typeof t!=="object"||t===null)return null;let n=t,o=n.pins;if(n.schema_version!==1||typeof n.platform!=="string"||typeof o!=="object"||o===null||!Object.values(o).every((s)=>typeof s==="string")||!Rn.includes(n.permissions)||!Array.isArray(n.missing_system_packages)||!n.missing_system_packages.every((s)=>typeof s==="string")||typeof n.updated_at!=="string")return null;return{schema_version:1,platform:n.platform,pins:o,permissions:n.permissions,missing_system_packages:n.missing_system_packages,updated_at:n.updated_at}}catch{return null}}function A(e){try{return Ne(e).isFile()}catch{return!1}}function Tt(e){try{let t=Ne(e);return t.isFile()&&(t.mode&73)!==0}catch{return!1}}function Kn(e){try{return le(e,"utf8")}catch{return null}}function U(e){for(let t of zn){let n=b(t,e);try{let o=Ne(n);if(o.isFile()&&(o.mode&73)!==0)return n}catch{}}return null}function Xn(e){try{let t=JSON.parse(le(b(e,"package.json"),"utf8"));return typeof t==="object"&&t!==null&&typeof t.version==="string"?t.version:null}catch{return null}}function qn(e,t,n){let o=de(n)[e];if(!o)return!1;let s=K(n);if(e==="node")return A(s?b(t,Be(n),"node.exe"):b(t,"bin","node"));if(e==="chrome_for_testing")return A(b(t,s?Dt:Et));let i=$e[n][e==="open_computer_use"?"ocu":"obu"];return Xn(t)===o.version&&A(b(t,i))&&(e==="open_computer_use"||A(b(t,"cli","open-browser-use.js")))}function Yn(e){return St("sha256").update(Buffer.from(e,"base64")).digest("hex").slice(0,32).replace(/./g,(t)=>String.fromCharCode(97+Number.parseInt(t,16)))}function He(e){try{let t=JSON.parse(le(e,"utf8"));return typeof t==="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function Jn(e){let t=He(b(e.extensionDir,"manifest.json"));return t!==null&&t.version===O.obu.version&&typeof t.key==="string"&&Yn(t.key)===F}function Qn(e,t){let n=e?.allowed_origins;return e!==null&&e.name===z&&Array.isArray(n)&&n.length===1&&n[0]===`chrome-extension://${F}/`&&(t===void 0||e.path===t)}function es(e){return Jn(e)&&A(e.nativeHost)&&e.nativeHostManifests.every((t)=>Qn(He(t),e.nativeHost))}function ts(e){return`#!/bin/sh
72
+ `);if(w<0){if(o.length>4096)d({reason:"display_protocol"});return}let f=ht(o.slice(0,w).trim());if(o=null,!f)d({reason:"display_protocol"});else if(f.session===0)y("This Windows worker runs as a service, which has no desktop: run it in the signed-in desktop session.");else g(),e.ready({width:f.width,height:f.height})}),t.stdin.on("error",()=>{return}),t.once("error",()=>y("Reason could not start this computer's desktop input.")),t.once("exit",()=>{if(o!==null)y("Reason could not start this computer's desktop input.");else d({reason:"display_closed"})}),{pointer:(p,w,f)=>h(n.pointer(p,w,f)),key:(p,w)=>h(n.key(p,w)),clipboard:(p)=>h([`c ${Buffer.from(p,"utf8").toString("base64")}`]),close(){s=!0,a()}}}var Rn=["none","standard","all"],ue="22.23.4",Mn={"linux-x64":"b8492284c76a54baf58d61668dd0e41ee0fc98adabf9503d30f05d08f55b4406","linux-arm64":"f7a1e486dbc8b286847815b477d4fb5e9fb963ed4489c3e1588853d685f589f9","darwin-arm64":"c9e1dbc748b33ed2d14f42445191ecaf14c56259c7a9a26d0042c49ec2b66428","win32-x64":"cbc74b5e0982c9dbb41525fd8fb5dcd32fbee237863f7829072f4639a1ce5f20","win32-arm64":"a8b8cd79cbbb3062435f449591d98dd63730bbbf30ce2d7cc3a6376c236cb111"},$e={"linux-x64":{ocu:"dist/linux/amd64/open-computer-use",obu:"native/linux-amd64/open-browser-use"},"linux-arm64":{ocu:"dist/linux/arm64/open-computer-use",obu:"native/linux-arm64/open-browser-use"},"darwin-arm64":{ocu:"dist/Open Computer Use.app/Contents/MacOS/OpenComputerUse",obu:"native/darwin-arm64/open-browser-use"},"win32-x64":{ocu:"dist/windows/amd64/open-computer-use.exe",obu:"native/windows-amd64/open-browser-use.exe"},"win32-arm64":{ocu:"dist/windows/arm64/open-computer-use.exe",obu:"native/windows-arm64/open-browser-use.exe"}},Et="chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",Dt="chrome-win64/chrome.exe",W={version:"9.0.2",url:"https://ffmpeg.martin-riedl.de/download/macos/arm64/1789931890_9.0.2/ffmpeg.zip",sha256:"c8ed4c4e6978a03c485edbfe4e0a5dc2380f8a30bba5150531b31b094492d924"},An={version:W.version,url:"https://ffmpeg.martin-riedl.de/download/macos/arm64/1789931890_9.0.2/ffprobe.zip",sha256:"fcbe839537485eaee7a7a8bc5cbc0f90d53617e80943e8a5b2e31cb851197ea6"},Le={version:W.version,url:`https://github.com/GyanD/codexffmpeg/releases/download/${W.version}/ffmpeg-${W.version}-essentials_build.zip`,sha256:"60f467265b1e312373dbcd92200c2618a74850f98d3d078e94296bb3fa2047ba"},_t=`ffmpeg-${Le.version}-essentials_build/bin`,z="com.ifuryst.open_browser_use.extension",It="com.reasonmachines.browser_use.extension",Ht="/tmp/reason-browser-use",Ue=["tint2","picom","xterm","pcmanfm"],Pt=["fonts-droid-fallback"],Ct=["pulseaudio"],Rt=["tigervnc-standalone-server"],$n=["xvfb","openbox","x11vnc","x11-utils","x11-xserver-utils","xdotool","dbus-x11","at-spi2-core","python3","python3-gi","gir1.2-atspi-2.0","gir1.2-gtk-3.0","fonts-dejavu-core",...Pt,"galculator","chromium","ffmpeg","tmux",...Ct,...Rt,...Ue],Un=new Set([...Ue,...Pt,...Ct,...Rt]),kt=$n.filter((e)=>e!=="chromium"&&!Un.has(e)),Hn=["Xvfb","openbox","x11vnc","xdotool","dbus-launch","python3","ffmpeg","tmux"],ce="/usr/bin/chromium",zn=["/usr/local/bin","/usr/bin","/bin","/opt/homebrew/bin"];function Gn(e=process.platform,t=process.arch){let n=`${e}-${t}`;return n==="linux-x64"||n==="linux-arm64"||n==="darwin-arm64"||n==="win32-x64"||n==="win32-arm64"?n:null}function K(e){return e==="win32-x64"||e==="win32-arm64"}function Be(e){return K(e)?`node-v${ue}-${e.replace("win32","win")}`:`node-v${ue}-${e}`}function de(e){return{node:{version:ue,url:`https://nodejs.org/dist/v${ue}/${Be(e)}${K(e)?".zip":".tar.gz"}`,sha256:Mn[e]},open_computer_use:{version:O.ocu.version,url:J.ocu.url,sha256:J.ocu.sha256},open_browser_use:{version:O.obu.version,url:J.obu.url,sha256:J.obu.sha256},...e==="darwin-arm64"?{chrome_for_testing:{version:H.version,url:`https://storage.googleapis.com/chrome-for-testing-public/${H.version}/mac-arm64/chrome-mac-arm64.zip`,sha256:H.macArm64Sha256}}:K(e)?{chrome_for_testing:{version:H.version,url:`https://storage.googleapis.com/chrome-for-testing-public/${H.version}/win64/chrome-win64.zip`,sha256:H.win64Sha256}}:{}}}function Vn(e){let t={extension:F};for(let[n,o]of Object.entries(de(e)))t[n]=`${o.version}@${o.sha256}`;return t}function Mt(e){return b(e,".local","share","reason","desktop")}function Tr(e,t=Ln()){let n=Mt(t),o=(p)=>b(n,p,de(e)[p]?.version??""),s=o("open_computer_use"),i=o("open_browser_use"),a=e==="darwin-arm64",d=K(e),y=b(t,"Library","Application Support"),h=b(process.platform==="win32"&&process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:b(t,"AppData","Local"),"OpenBrowserUse"),g=a?b(y,"Google","Chrome","NativeMessagingHosts",`${z}.json`):d?b(h,"NativeMessagingHosts",`${z}.json`):b(t,".config","google-chrome","NativeMessagingHosts",`${z}.json`);return{root:n,automation:b(vt(n),"automation"),receipt:b(n,"receipt.json"),minimal:is(t),node:d?b(o("node"),Be(e),"node.exe"):b(o("node"),"bin","node"),ocuDir:s,ocu:b(s,$e[e].ocu),ocuApp:a?b(s,"dist","Open Computer Use.app"):null,obuDir:i,obu:b(i,"cli","open-browser-use.js"),nativeHost:b(i,$e[e].obu),extensionDir:a?b(y,"OpenBrowserUse","chrome-extension","release"):d?b(h,"chrome-extension","release"):b(t,".local","share","open-browser-use","chrome-extension","release"),setupNativeHostManifest:g,nativeHostManifests:a?[g,b(y,"Google","ChromeForTesting","NativeMessagingHosts",`${z}.json`)]:d?[g]:[b(t,".config","chromium","NativeMessagingHosts",`${z}.json`),b(t,".config","google-chrome-for-testing","NativeMessagingHosts",`${z}.json`)],browser:a?b(o("chrome_for_testing"),Et):d?b(o("chrome_for_testing"),Dt):ce,userChromeHost:a?b(n,"user-chrome","reason-browser-use"):null,userChromeRegistration:a?b(y,"Google","Chrome","NativeMessagingHosts",`${It}.json`):null,ffmpegDir:b(n,"ffmpeg"),ffmpeg:a?b(n,"ffmpeg",W.version,"ffmpeg"):d?b(n,"ffmpeg",Le.version,_t,"ffmpeg.exe"):null,ffprobe:a?b(n,"ffprobe",An.version,"ffprobe"):d?b(n,"ffmpeg",Le.version,_t,"ffprobe.exe"):null}}function Wn(e){try{let t=JSON.parse(le(e,"utf8"));if(typeof t!=="object"||t===null)return null;let n=t,o=n.pins;if(n.schema_version!==1||typeof n.platform!=="string"||typeof o!=="object"||o===null||!Object.values(o).every((s)=>typeof s==="string")||!Rn.includes(n.permissions)||!Array.isArray(n.missing_system_packages)||!n.missing_system_packages.every((s)=>typeof s==="string")||typeof n.updated_at!=="string")return null;return{schema_version:1,platform:n.platform,pins:o,permissions:n.permissions,missing_system_packages:n.missing_system_packages,updated_at:n.updated_at}}catch{return null}}function A(e){try{return Ne(e).isFile()}catch{return!1}}function Tt(e){try{let t=Ne(e);return t.isFile()&&(t.mode&73)!==0}catch{return!1}}function Kn(e){try{return le(e,"utf8")}catch{return null}}function U(e){for(let t of zn){let n=b(t,e);try{let o=Ne(n);if(o.isFile()&&(o.mode&73)!==0)return n}catch{}}return null}function Xn(e){try{let t=JSON.parse(le(b(e,"package.json"),"utf8"));return typeof t==="object"&&t!==null&&typeof t.version==="string"?t.version:null}catch{return null}}function qn(e,t,n){let o=de(n)[e];if(!o)return!1;let s=K(n);if(e==="node")return A(s?b(t,Be(n),"node.exe"):b(t,"bin","node"));if(e==="chrome_for_testing")return A(b(t,s?Dt:Et));let i=$e[n][e==="open_computer_use"?"ocu":"obu"];return Xn(t)===o.version&&A(b(t,i))&&(e==="open_computer_use"||A(b(t,"cli","open-browser-use.js")))}function Yn(e){return St("sha256").update(Buffer.from(e,"base64")).digest("hex").slice(0,32).replace(/./g,(t)=>String.fromCharCode(97+Number.parseInt(t,16)))}function He(e){try{let t=JSON.parse(le(e,"utf8"));return typeof t==="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function Jn(e){let t=He(b(e.extensionDir,"manifest.json"));return t!==null&&t.version===O.obu.version&&typeof t.key==="string"&&Yn(t.key)===F}function Qn(e,t){let n=e?.allowed_origins;return e!==null&&e.name===z&&Array.isArray(n)&&n.length===1&&n[0]===`chrome-extension://${F}/`&&(t===void 0||e.path===t)}function es(e){return Jn(e)&&A(e.nativeHost)&&e.nativeHostManifests.every((t)=>Qn(He(t),e.nativeHost))}function ts(e){return`#!/bin/sh
73
73
  # Reason's Chrome extension host (reason desktop install): Open Browser Use on Reason's socket directory.
74
74
  obu=${`'${e.replaceAll("'","'\\''")}'`}
75
75
  case "$1" in
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{tr}from"./vm-hands-entry-lite-zjgrdarj.js";var Qe=tr.version,Qn=`reason-cli/${Qe}`;export{Qe,Qn};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{readdirSync as b,readFileSync as P}from"fs";import{userInfo as k}from"os";var ur="--vm-hands-op-runner-kind=person",dr="--vm-hands-op-runner-kind=surface",Rt="--vm-hands-surface-uid=",Tt="--vm-hands-surface-dir=",It=new Set(["automation.call.v1","display.stream.v1","preview.serve.v1"]);function R(t){let c=new Set([t]),l=[];try{l=b("/proc")}catch{}for(let o of l){if(!/^\d+$/.test(o))continue;try{let d=P(`/proc/${o}/stat`,"utf8");if(Number(d.slice(d.lastIndexOf(")")+2).split(" ")[3])===t)c.add(Number(o))}catch{}}for(let o of c)try{process.kill(o,"SIGKILL")}catch{}}var A=(t)=>{let c=globalThis.Bun;if(!c)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");let l=c.spawn({cmd:[t.shell,...t.args],cwd:t.cwd,env:{...t.environment,TERM:"xterm-256color"},terminal:{cols:t.cols,rows:t.rows,data:(i,s)=>t.onData(s)}}),o=l.terminal,d=()=>{R(l.pid);try{o?.close()}catch{}};if(!o)throw d(),new r("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(i)=>o.write(i),resize:(i,s)=>o.resize(i,s),kill:d,exited:l.exited.then((i)=>typeof i==="number"?i:null,()=>null)}};function x(){let t=(()=>{try{return k().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...t?{USER:t,LOGNAME:t}:{}}}async function E(t){let[{localAutomationAvailable:c},{localDisplayReady:l},{localDisplayVideoAvailable:o},{probeWorkerPreview:d},y]=await Promise.all([import("./local-automation-nfmdd0bj.js"),import("./local-display-session-v6se296d.js"),import("./local-display-video-s2447446.js"),import("./worker-preview-readiness-84stxabw.js"),import("fs")]),i=AbortSignal.timeout(15000),s=null;try{y.mkdirSync(t,{recursive:!0,mode:448}),s=y.mkdtempSync(`${t}/probe-`);let[g,p,m]=await Promise.all([Promise.resolve().then(()=>c()).catch(()=>!1),l().catch(()=>!1),d(s,i).catch(()=>!1)]);return{t:"readiness",display_video:p&&await o().catch(()=>!1),lanes:{"automation.call.v1":g,"display.stream.v1":p,"preview.serve.v1":m,"tunnel.open":m,"tunnel.close":m}}}finally{if(s)y.rmSync(s,{recursive:!0,force:!0})}}async function vs(){let[{executeLocalOperation:t,spawnCaptured:c},{runLocalPtySession:l},{configureDesktopAccount:o,desktopAccount:d},{configureWorkerSandbox:y}]=await Promise.all([import("./local-capabilities-9qs476nx.js"),import("./local-pty-session-92d5hy1c.js"),import("./desktop-account-jdqya1ff.js"),import("./worker-sandbox-563c5g2f.js")]);y();let i=process.argv.includes(ur),s=process.argv.includes(dr),g=(a,e,u)=>c(a,e[0]==="-lic"?["-lc",...e.slice(1)]:e,u),p=(process.geteuid?.()??0)!==0;if(s){p=!1;let a=process.argv.find((e)=>e.startsWith(Rt))?.slice(Rt.length);if((process.geteuid?.()??-1)===0&&a)try{p=o({value:a})!==null&&d()!==null}catch{p=!1}}let m=new Map,v=new Map,f=(a)=>{try{process.send?.(a)}catch{}};if(process.on("message",(a)=>{let e=a;if(e?.t==="cancel"){m.get(e.id)?.abort();return}if(e?.t==="control"){let n=v.get(e.id);if(s&&n&&e.control&&typeof e.control.kind==="string")import("./local-managed-process-j6dxwzsg.js").then(({controlManagedDeviceProcess:_})=>_(n,{kind:e.control.kind,payload:e.control.payload??{}})).catch(()=>!1);return}if(e?.t==="retire"){if(s&&typeof e.operation_id==="string"&&typeof e.status==="string")import("./local-managed-process-j6dxwzsg.js").then(({retireManagedDeviceProcess:n})=>n(e.operation_id,e.status)).catch(()=>!1);return}if(e?.t!=="op")return;if(!p){f({t:"done",id:e.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let u=e.claim.capability;if(u==="pty.start"&&!i){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}if(It.has(u)!==s){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let w=new AbortController;m.set(e.id,w),v.set(e.id,e.claim);let S=u==="pty.start"?{runPtySession:(n)=>l(n,{spawnPty:A,environment:x(),loadProxy:()=>null})}:{worker:e.worker,...u==="exec.full"?{spawnFullControl:g}:{}};t(e.state,e.claim,{...S,signal:w.signal,emit:(n)=>{let{deliverySignal:_,...h}=n;f({t:"event",id:e.id,event:h})}}).then((n)=>f({t:"done",id:e.id,completion:n}),(n)=>f({t:"done",id:e.id,completion:{status:"failed",error_code:n&&typeof n==="object"&&"code"in n&&typeof n.code==="string"?n.code:"vm_hands_op_failed"}})).finally(()=>{m.delete(e.id),v.delete(e.id)})}),process.on("disconnect",()=>process.exit(0)),s){let a=process.argv.find((u)=>u.startsWith(Tt))?.slice(Tt.length),e={t:"readiness",display_video:!1,lanes:{}};f(p&&a?await E(a).catch(()=>e):e)}await new Promise(()=>{})}
2
+ import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{readdirSync as b,readFileSync as P}from"fs";import{userInfo as k}from"os";var ur="--vm-hands-op-runner-kind=person",dr="--vm-hands-op-runner-kind=surface",Rt="--vm-hands-surface-uid=",Tt="--vm-hands-surface-dir=",It=new Set(["automation.call.v1","display.stream.v1","preview.serve.v1"]);function R(t){let c=new Set([t]),l=[];try{l=b("/proc")}catch{}for(let o of l){if(!/^\d+$/.test(o))continue;try{let d=P(`/proc/${o}/stat`,"utf8");if(Number(d.slice(d.lastIndexOf(")")+2).split(" ")[3])===t)c.add(Number(o))}catch{}}for(let o of c)try{process.kill(o,"SIGKILL")}catch{}}var A=(t)=>{let c=globalThis.Bun;if(!c)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");let l=c.spawn({cmd:[t.shell,...t.args],cwd:t.cwd,env:{...t.environment,TERM:"xterm-256color"},terminal:{cols:t.cols,rows:t.rows,data:(i,s)=>t.onData(s)}}),o=l.terminal,d=()=>{R(l.pid);try{o?.close()}catch{}};if(!o)throw d(),new r("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(i)=>o.write(i),resize:(i,s)=>o.resize(i,s),kill:d,exited:l.exited.then((i)=>typeof i==="number"?i:null,()=>null)}};function x(){let t=(()=>{try{return k().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...t?{USER:t,LOGNAME:t}:{}}}async function E(t){let[{localAutomationAvailable:c},{localDisplayReady:l},{localDisplayVideoAvailable:o},{probeWorkerPreview:d},y]=await Promise.all([import("./local-automation-gygsvq1s.js"),import("./local-display-session-wtx6hhye.js"),import("./local-display-video-z0k1wtes.js"),import("./worker-preview-readiness-84stxabw.js"),import("fs")]),i=AbortSignal.timeout(15000),s=null;try{y.mkdirSync(t,{recursive:!0,mode:448}),s=y.mkdtempSync(`${t}/probe-`);let[g,p,m]=await Promise.all([Promise.resolve().then(()=>c()).catch(()=>!1),l().catch(()=>!1),d(s,i).catch(()=>!1)]);return{t:"readiness",display_video:p&&await o().catch(()=>!1),lanes:{"automation.call.v1":g,"display.stream.v1":p,"preview.serve.v1":m,"tunnel.open":m,"tunnel.close":m}}}finally{if(s)y.rmSync(s,{recursive:!0,force:!0})}}async function vs(){let[{executeLocalOperation:t,spawnCaptured:c},{runLocalPtySession:l},{configureDesktopAccount:o,desktopAccount:d},{configureWorkerSandbox:y}]=await Promise.all([import("./local-capabilities-npdrmmdc.js"),import("./local-pty-session-92d5hy1c.js"),import("./desktop-account-jdqya1ff.js"),import("./worker-sandbox-563c5g2f.js")]);y();let i=process.argv.includes(ur),s=process.argv.includes(dr),g=(a,e,u)=>c(a,e[0]==="-lic"?["-lc",...e.slice(1)]:e,u),p=(process.geteuid?.()??0)!==0;if(s){p=!1;let a=process.argv.find((e)=>e.startsWith(Rt))?.slice(Rt.length);if((process.geteuid?.()??-1)===0&&a)try{p=o({value:a})!==null&&d()!==null}catch{p=!1}}let m=new Map,v=new Map,f=(a)=>{try{process.send?.(a)}catch{}};if(process.on("message",(a)=>{let e=a;if(e?.t==="cancel"){m.get(e.id)?.abort();return}if(e?.t==="control"){let n=v.get(e.id);if(s&&n&&e.control&&typeof e.control.kind==="string")import("./local-managed-process-fp93w0p7.js").then(({controlManagedDeviceProcess:_})=>_(n,{kind:e.control.kind,payload:e.control.payload??{}})).catch(()=>!1);return}if(e?.t==="retire"){if(s&&typeof e.operation_id==="string"&&typeof e.status==="string")import("./local-managed-process-fp93w0p7.js").then(({retireManagedDeviceProcess:n})=>n(e.operation_id,e.status)).catch(()=>!1);return}if(e?.t!=="op")return;if(!p){f({t:"done",id:e.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let u=e.claim.capability;if(u==="pty.start"&&!i){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}if(It.has(u)!==s){f({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let w=new AbortController;m.set(e.id,w),v.set(e.id,e.claim);let S=u==="pty.start"?{runPtySession:(n)=>l(n,{spawnPty:A,environment:x(),loadProxy:()=>null})}:{worker:e.worker,...u==="exec.full"?{spawnFullControl:g}:{}};t(e.state,e.claim,{...S,signal:w.signal,emit:(n)=>{let{deliverySignal:_,...h}=n;f({t:"event",id:e.id,event:h})}}).then((n)=>f({t:"done",id:e.id,completion:n}),(n)=>f({t:"done",id:e.id,completion:{status:"failed",error_code:n&&typeof n==="object"&&"code"in n&&typeof n.code==="string"?n.code:"vm_hands_op_failed"}})).finally(()=>{m.delete(e.id),v.delete(e.id)})}),process.on("disconnect",()=>process.exit(0)),s){let a=process.argv.find((u)=>u.startsWith(Tt))?.slice(Tt.length),e={t:"readiness",display_video:!1,lanes:{}};f(p&&a?await E(a).catch(()=>e):e)}await new Promise(()=>{})}
3
3
  export{ur,dr,Rt,Tt,It,vs};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{R}from"./vm-hands-entry-lite-a3p6xz53.js";import{_}from"./vm-hands-entry-lite-4anjdcth.js";import{Jr,ei,Xr,ti}from"./vm-hands-entry-lite-vj7xzb3y.js";import{Yn,er,Fo}from"./vm-hands-entry-lite-kng982rg.js";import{C}from"./vm-hands-entry-lite-b6gsggvp.js";import{spawnSync as y}from"child_process";import{createHash as ke,randomUUID as Se}from"crypto";import{chmodSync as we,existsSync as T,mkdirSync as $e,readdirSync as Ve,readFileSync as p,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as g}from"path";import{spawnSync as de}from"child_process";import{readFileSync as me}from"fs";import{userInfo as D}from"os";import{join as fe}from"path";var ge="REASON_SCHEDULED_TASK";function H(r){return fe(r,"AppData","Local","Reason","Tasks")}function S(r){if(/[\0-\x1f\x7f"%]/.test(r))throw Error(`A background task cannot use a value with a double quote, percent sign or control character: ${r}`);return`'${r.replace(/['\u2018\u2019\u201a\u201b]/g,"$&$&")}'`}function M(r){if(!/^[A-Za-z0-9._-]+$/.test(r))throw Error(`Invalid Windows Scheduled Task name: ${r}`);return`$env:${ge}=${S(r)};`}function K(r){let e=Object.entries(r.environment).map(([t,i])=>{if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw Error(`Invalid Windows Scheduled Task environment name: ${t}`);return`$env:${t}=${S(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(S).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${S(r.log)} -Value $_.ToString() -Encoding UTF8 }; $c=$LASTEXITCODE;`;return[M(r.name),...e,"$ErrorActionPreference='Continue';",r.keepAlive?`do { ${n} if ($c) { Start-Sleep -Seconds 10 } } while ($c)`:`${n} exit $c`].join(" ")}function A(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function pe(){let r=process.env.USERDOMAIN?.trim();return r?`${r}\\${D().username}`:D().username}function U(r){let e=A(r.user??pe()),n=r.schedule==="logon",t=r.schedule==="logon"?`<LogonTrigger><Enabled>true</Enabled><UserId>${e}</UserId></LogonTrigger>`:`<TimeTrigger><Repetition><Interval>PT${r.schedule.everyMinutes}M</Interval><StopAtDurationEnd>false</StopAtDurationEnd></Repetition><StartBoundary>2026-01-01T00:00:00</StartBoundary><Enabled>true</Enabled></TimeTrigger>`,i=`-NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -Command "${r.script}"`;return`<?xml version="1.0" encoding="UTF-16"?>
2
+ import{R}from"./vm-hands-entry-lite-a3p6xz53.js";import{_}from"./vm-hands-entry-lite-4anjdcth.js";import{Jr,ei,Xr,ti}from"./vm-hands-entry-lite-vj7xzb3y.js";import{Yn,er,Fo}from"./vm-hands-entry-lite-5tdbk4pq.js";import{C}from"./vm-hands-entry-lite-b6gsggvp.js";import{spawnSync as y}from"child_process";import{createHash as ke,randomUUID as Se}from"crypto";import{chmodSync as we,existsSync as T,mkdirSync as $e,readdirSync as Ve,readFileSync as p,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as g}from"path";import{spawnSync as de}from"child_process";import{readFileSync as me}from"fs";import{userInfo as D}from"os";import{join as fe}from"path";var ge="REASON_SCHEDULED_TASK";function H(r){return fe(r,"AppData","Local","Reason","Tasks")}function S(r){if(/[\0-\x1f\x7f"%]/.test(r))throw Error(`A background task cannot use a value with a double quote, percent sign or control character: ${r}`);return`'${r.replace(/['\u2018\u2019\u201a\u201b]/g,"$&$&")}'`}function M(r){if(!/^[A-Za-z0-9._-]+$/.test(r))throw Error(`Invalid Windows Scheduled Task name: ${r}`);return`$env:${ge}=${S(r)};`}function K(r){let e=Object.entries(r.environment).map(([t,i])=>{if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw Error(`Invalid Windows Scheduled Task environment name: ${t}`);return`$env:${t}=${S(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(S).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${S(r.log)} -Value $_.ToString() -Encoding UTF8 }; $c=$LASTEXITCODE;`;return[M(r.name),...e,"$ErrorActionPreference='Continue';",r.keepAlive?`do { ${n} if ($c) { Start-Sleep -Seconds 10 } } while ($c)`:`${n} exit $c`].join(" ")}function A(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function pe(){let r=process.env.USERDOMAIN?.trim();return r?`${r}\\${D().username}`:D().username}function U(r){let e=A(r.user??pe()),n=r.schedule==="logon",t=r.schedule==="logon"?`<LogonTrigger><Enabled>true</Enabled><UserId>${e}</UserId></LogonTrigger>`:`<TimeTrigger><Repetition><Interval>PT${r.schedule.everyMinutes}M</Interval><StopAtDurationEnd>false</StopAtDurationEnd></Repetition><StartBoundary>2026-01-01T00:00:00</StartBoundary><Enabled>true</Enabled></TimeTrigger>`,i=`-NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -Command "${r.script}"`;return`<?xml version="1.0" encoding="UTF-16"?>
3
3
  <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
4
4
  <RegistrationInfo>
5
5
  <Description>${A(r.description)}</Description>