@reason-machines/cli-linux-arm64-musl 0.2.387 → 0.2.388
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ara +1 -1
- package/bin/vm-hands/api-9jsc2wk3.js +2 -0
- package/bin/vm-hands/api-credentials-jhaxk9e6.js +2 -0
- package/bin/vm-hands/{ask-relay-xa9bffq4.js → ask-relay-rpekz0vc.js} +3 -3
- package/bin/vm-hands/connect-cli-xk4wx40j.js +2 -0
- package/bin/vm-hands/{custom-endpoint-device-bm94e9r0.js → custom-endpoint-device-baqm3872.js} +1 -1
- package/bin/vm-hands/{desktop-account-3tnm4z5w.js → desktop-account-374pyd2h.js} +1 -1
- package/bin/vm-hands/{device-workspace-0xsj5ykf.js → device-workspace-0kk5ef85.js} +1 -1
- package/bin/vm-hands/{hands-worker-source-azdrrhsz.js → hands-worker-source-mshf7c6v.js} +1 -1
- package/bin/vm-hands/{index-7f2kwwen.js → index-cvnymkkb.js} +1 -1
- package/bin/vm-hands/{install-receipt-3xyx3rdd.js → install-receipt-352cy8vj.js} +1 -1
- package/bin/vm-hands/local-automation-fqf1yxn8.js +2 -0
- package/bin/vm-hands/local-capabilities-0xqv6w37.js +2 -0
- package/bin/vm-hands/local-desktop-users-39d8h875.js +2 -0
- package/bin/vm-hands/{local-display-mac-9h6btvvq.js → local-display-mac-yt4tpb96.js} +1 -1
- package/bin/vm-hands/local-display-session-12q3s3p1.js +2 -0
- package/bin/vm-hands/local-pty-session-142rrpf9.js +2 -0
- package/bin/vm-hands/managed-runtime-wzk0q157.js +2 -0
- package/bin/vm-hands/{network-contract-dsw79qkc.js → network-contract-m55ndrgk.js} +1 -1
- package/bin/vm-hands/package-k4xz7vcr.js +2 -0
- package/bin/vm-hands/{permissions-qrfwt9ez.js → permissions-zajmtjzs.js} +1 -1
- package/bin/vm-hands/{reason-hands-protocol-7d7xj1h3.js → reason-hands-protocol-z95pxxbh.js} +1 -1
- package/bin/vm-hands/serve-service-d2q1pdxh.js +2 -0
- package/bin/vm-hands/{status-qm9cztrx.js → status-x8g58cxm.js} +2 -2
- package/bin/vm-hands/{version-gyns0vgm.js → version-55234k7v.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-289qftes.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-f02906k8.js → vm-hands-entry-lite-30rnhzfj.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-f7f1zb7s.js → vm-hands-entry-lite-3vb4he21.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-6wsa0qrb.js → vm-hands-entry-lite-6shgavn0.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-wc6skbhf.js → vm-hands-entry-lite-6tv7j3ej.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-j8q0pdsq.js → vm-hands-entry-lite-9fc26f9c.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-vj9h1knv.js → vm-hands-entry-lite-axe84b1n.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-9cmfthkq.js → vm-hands-entry-lite-b1ygrkbq.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-ew076kpd.js → vm-hands-entry-lite-d7cvwy3k.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-zjfr0zh8.js → vm-hands-entry-lite-e05sgnwe.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-f89wk20p.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-51hmj6am.js → vm-hands-entry-lite-fw5ztpwn.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-2t0vcvd8.js → vm-hands-entry-lite-grjkhbf2.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-7a01dgje.js → vm-hands-entry-lite-jjgqsan6.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-xrthfx3q.js → vm-hands-entry-lite-jx3w1z5q.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-ejm5er3h.js → vm-hands-entry-lite-kb981w39.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-hnsm5t36.js → vm-hands-entry-lite-mbs7d7ye.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-mn64e4pt.js → vm-hands-entry-lite-n25efwqt.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-d00dg3ys.js → vm-hands-entry-lite-nf0avf46.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-9w5vs9zv.js → vm-hands-entry-lite-nr1narzb.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-1gxktkpe.js → vm-hands-entry-lite-p6g561rq.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-2j141pnw.js → vm-hands-entry-lite-r7czqrtj.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-qef2ndkd.js → vm-hands-entry-lite-s7k376cz.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-rd0ak4ye.js → vm-hands-entry-lite-sb7n76g7.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-rpn0frzb.js → vm-hands-entry-lite-spccx392.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-f5230h6t.js → vm-hands-entry-lite-stbfyev7.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-4g9dqrgy.js → vm-hands-entry-lite-sv8bb7jq.js} +34 -34
- package/bin/vm-hands/vm-hands-entry-lite-te0p47ak.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-5n4vsm6b.js → vm-hands-entry-lite-v2ptg6br.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-e0gdt6r5.js → vm-hands-entry-lite-wzqzjd6f.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-h8dbw0c7.js → vm-hands-entry-lite-y55f8dyw.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-xq8bkqrd.js → vm-hands-entry-lite-yzaz1e8r.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-8fj07njx.js → vm-hands-entry-lite-zr8gf6nd.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-w7havvz8.js → vm-hands-entry-lite-zs3jsffv.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-d8wkv51n.js → vm-hands-executor-j4q5snaz.js} +1 -1
- package/bin/vm-hands/vm-hands-op-runner-btwvjt4p.js +2 -0
- package/bin/vm-hands/{vm-hands-runtime-6ajffhfb.js → vm-hands-runtime-gw2wdm13.js} +3 -3
- package/bin/vm-hands/worker-sandbox-r41yz175.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-credentials-xppmbg0m.js +0 -2
- package/bin/vm-hands/api-xmpbsm6b.js +0 -2
- package/bin/vm-hands/connect-cli-c1ex48w5.js +0 -2
- package/bin/vm-hands/local-automation-06tkbypc.js +0 -2
- package/bin/vm-hands/local-capabilities-cktbbszh.js +0 -2
- package/bin/vm-hands/local-desktop-users-ajb81vjm.js +0 -2
- package/bin/vm-hands/local-display-session-9d20yat4.js +0 -2
- package/bin/vm-hands/local-pty-session-cjas515w.js +0 -2
- package/bin/vm-hands/managed-runtime-pjemjmd9.js +0 -2
- package/bin/vm-hands/package-smk3nqjs.js +0 -2
- package/bin/vm-hands/serve-service-403dqjk9.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-dh5gwmyf.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-r8qg3wp1.js +0 -3
- package/bin/vm-hands/vm-hands-op-runner-4m334z7c.js +0 -2
- package/bin/vm-hands/worker-sandbox-tgqbmy6b.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Tg as H}from"./vm-hands-entry-lite-2e18tm6w.js";import{$g as Q,Vg as m,Wg as q,Xg as L,Yg as B,Zg as W,_g as F,bh as j,dh as k,eh as z,fh as Z,gh as J,hh as K,jh as $,kh as G,mh as M,nh as s,oh as X,qh as _,th as S}from"./vm-hands-entry-lite-ammr3xbc.js";import{Ri as y}from"./vm-hands-entry-lite-sex82vb1.js";import{Cj as p,Dj as x,Ej as b,Fj as w}from"./vm-hands-entry-lite-pk3q774c.js";import{
|
|
2
|
+
import{Tg as H}from"./vm-hands-entry-lite-2e18tm6w.js";import{$g as Q,Vg as m,Wg as q,Xg as L,Yg as B,Zg as W,_g as F,bh as j,dh as k,eh as z,fh as Z,gh as J,hh as K,jh as $,kh as G,mh as M,nh as s,oh as X,qh as _,th as S}from"./vm-hands-entry-lite-ammr3xbc.js";import{Ri as y}from"./vm-hands-entry-lite-sex82vb1.js";import{Cj as p,Dj as x,Ej as b,Fj as w}from"./vm-hands-entry-lite-pk3q774c.js";import{Ek as Y}from"./vm-hands-entry-lite-stbfyev7.js";var o=["cgroup_membership_read_failed","cgroup_v2_membership_absent","cgroup_scope_invalid","cgroup_root_unavailable","cgroup_directory_unavailable","cgroup_limit_read_failed","cgroup_events_read_failed","cgroup_current_read_failed","cgroup_stat_read_failed","boot_id_read_failed","boot_id_invalid","guest_meminfo_read_failed","guest_vmstat_read_failed","memory_counter_invalid","memory_field_missing","memory_capacity_invalid"];var c=String.raw`(function(fs, path) {
|
|
3
3
|
const fail = (message, reasonCode) => { throw Object.assign(Error(message), {reasonCode}); };
|
|
4
4
|
const read = (p, reasonCode, trim=true) => { try { const text=fs.readFileSync(p, "utf8"); return trim?text.trim():text; }
|
|
5
5
|
catch { fail("memory_read", reasonCode); } };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Sd as ae,Ud as ne}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Sd as ae,Ud as ne}from"./vm-hands-entry-lite-6shgavn0.js";import{vf as be}from"./vm-hands-entry-lite-v2ptg6br.js";import{$f as z,Tf as C,Uf as ie,Wf as M,Xf as Oe,_f as Y,ag as v,jg as O,kg as Be}from"./vm-hands-entry-lite-axe84b1n.js";import{Rg as Se}from"./vm-hands-entry-lite-fb5dzy9x.js";import{Gi as se}from"./vm-hands-entry-lite-jjgqsan6.js";import{fj as J}from"./vm-hands-entry-lite-6tv7j3ej.js";import{lj as x}from"./vm-hands-entry-lite-fyvgav60.js";import{ck as Ne,dk as oe}from"./vm-hands-entry-lite-p6g561rq.js";import{jk as ye,pk as Ie}from"./vm-hands-entry-lite-sb7n76g7.js";import{wk as xe}from"./vm-hands-entry-lite-te0p47ak.js";import{Fk as p}from"./vm-hands-entry-lite-fw5ztpwn.js";import{spawn as S,spawnSync as pt}from"child_process";import{createHash as ft,randomUUID as Te}from"crypto";import{closeSync as mt,copyFileSync as de,existsSync as q,fstatSync as _t,mkdirSync as pe,openSync as ht,readdirSync as D,readFileSync as j,readlinkSync as wt,renameSync as ve,rmSync as gt,statSync as bt,writeFileSync as xt}from"fs";import{connect as St}from"net";import{tmpdir as F,userInfo as Re}from"os";import{basename as fe,delimiter as yt,dirname as B,join as f}from"path";var Z=`import { spawn, execFileSync } from "node:child_process";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import { readFileSync, readlinkSync, lstatSync, realpathSync, statSync, mkdtempSync, mkdirSync, chmodSync, writeFileSync, readdirSync, rmSync, openSync, readSync, closeSync, renameSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ik as e}from"./vm-hands-entry-lite-grjkhbf2.js";var i=e((o,t)=>{t.exports={name:"playwright-core",version:"1.60.0",description:"A high-level API to automate web browsers",repository:{type:"git",url:"git+https://github.com/microsoft/playwright.git"},homepage:"https://playwright.dev",engines:{node:">=18"},author:{name:"Microsoft Corporation"},license:"Apache-2.0",exports:{".":{types:"./index.d.ts",import:"./index.mjs",require:"./index.js",default:"./index.js"},"./package.json":"./package.json","./lib/bootstrap":"./lib/bootstrap.js","./lib/coreBundle":"./lib/coreBundle.js","./lib/utilsBundle":"./lib/utilsBundle.js","./lib/tools/cli-client/program":"./lib/tools/cli-client/program.js"},bin:{"playwright-core":"cli.js"},types:"types/types.d.ts"}});
|
|
3
3
|
export{i as Aa};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Fk as l}from"./vm-hands-entry-lite-fw5ztpwn.js";import{execFile as zj,spawn as I}from"child_process";var Cj="h264_ws_v1",kj="video",h=["smooth","sharp","data_saver","balanced"];var Yj="video_presets";var V=8388608,Y=65536,Lj="control",Aj="v1",d=200;function s(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q,J=(Q)=>typeof Q==="string"&&Q.length>0&&Q.length<=d;if(Object.keys(j).length!==2||!J(j.user_id)||!J(j.name))return null;return{user_id:j.user_id,name:j.name}}var xj="windows",Mj="v1",A=200,o=(q)=>typeof q==="string"&&h.includes(q);function fj(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q;if(Object.keys(j).length!==2||j.format!=="h264_ws_v1"||!o(j.preset))return null;return{format:"h264_ws_v1",preset:j.preset}}var $={hello:1,frame:2,stats:3,pong:4,serverClipboard:5,error:6,audioHello:7,audio:8,control:9,windows:10,pointer:16,key:17,config:18,ping:19,clientClipboard:20,keyframeRequest:21,ack:22,audioEnable:23};class U extends Error{constructor(q){super(q);this.name="DisplayVideoProtocolError"}}var e=new TextEncoder,jj=new TextDecoder("utf-8",{fatal:!0});function H(q,j){if(j.byteLength+1>V)throw new U("message_too_large");let J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,j.byteLength+1),Q.setUint8(4,q),J.set(j,5),J}function R(q){let j=e.encode(q);if(j.byteLength>Y)throw new U("text_too_large");return j}function f(q,j){if(!Number.isInteger(q)||q<0||q>65535)throw new U(`invalid_${j}`);return q}function qj(q){if(!Number.isFinite(q))throw new U("invalid_window");return Math.max(-2147483648,Math.min(2147483647,Math.round(q)))}function hj(q){switch(q.type){case"hello":{let j=R(q.codec),J=new Uint8Array(6+j.byteLength),Q=new DataView(J.buffer);return Q.setUint16(0,f(q.width,"width")),Q.setUint16(2,f(q.height,"height")),Q.setUint8(4,Math.max(1,Math.min(240,Math.round(q.fps)))),Q.setUint8(5,h.indexOf(q.preset)),J.set(j,6),H($.hello,J)}case"frame":{let j=new Uint8Array(13+q.data.byteLength),J=new DataView(j.buffer);return J.setUint8(0,q.key?1:0),J.setUint32(1,q.seq>>>0),J.setBigUint64(5,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,13),H($.frame,j)}case"stats":return H($.stats,R(JSON.stringify(q.stats)));case"pong":case"ping":{let j=new Uint8Array(8);return new DataView(j.buffer).setFloat64(0,q.token),H(q.type==="ping"?$.ping:$.pong,j)}case"serverClipboard":return H($.serverClipboard,R(q.text));case"clientClipboard":return H($.clientClipboard,R(q.text));case"error":return H($.error,R(q.code));case"pointer":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint16(0,f(q.x,"x")),J.setUint16(2,f(q.y,"y")),J.setUint8(4,q.buttons&255),H($.pointer,j)}case"key":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint8(0,q.down?1:0),J.setUint32(1,q.keysym>>>0),H($.key,j)}case"config":return H($.config,Uint8Array.of(h.indexOf(q.preset)));case"keyframeRequest":return H($.keyframeRequest,new Uint8Array(0));case"audioHello":{let j=R(q.codec),J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,q.sampleRate>>>0),Q.setUint8(4,q.channels&255),J.set(j,5),H($.audioHello,J)}case"audio":{let j=new Uint8Array(8+q.data.byteLength);return new DataView(j.buffer).setBigUint64(0,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,8),H($.audio,j)}case"control":return H($.control,R(JSON.stringify(q.control)));case"windows":{let j=q.bounds.slice(0,A),J=new Uint8Array(j.length*16),Q=new DataView(J.buffer);return j.forEach((Z,z)=>{[Z.x,Z.y,Z.width,Z.height].forEach((G,F)=>Q.setInt32(z*16+F*4,qj(G)))}),H($.windows,J)}case"audioEnable":return H($.audioEnable,Uint8Array.of(q.on?1:0));case"ack":{let j=new Uint8Array(4);return new DataView(j.buffer).setUint32(0,q.seq>>>0),H($.ack,j)}}}function T(q){let j=h[q];if(!j)throw new U("invalid_preset");return j}function C(q,j){if(q.byteLength!==j)throw new U("invalid_length")}function k(q){if(q.byteLength>Y)throw new U("text_too_large");try{return jj.decode(q)}catch{throw new U("invalid_text")}}function Jj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_stats")}let J=j;if(!J||typeof J!=="object"||["fps","kbps","dropped","restarts","queued_bytes"].some((Z)=>typeof J[Z]!=="number"||!Number.isFinite(J[Z])))throw new U("invalid_stats");return{fps:J.fps,kbps:J.kbps,dropped:J.dropped,restarts:J.restarts,queued_bytes:J.queued_bytes}}function Qj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_control")}let J=j;if(!J||typeof J!=="object"||typeof J.you!=="boolean"||typeof J.same_user!=="boolean")throw new U("invalid_control");let Q=J.holder===null?null:s(J.holder);if(Q===null&&J.holder!==null)throw new U("invalid_control");return{holder:Q,you:J.you,same_user:J.same_user}}function Zj(q,j){let J=new DataView(j.buffer,j.byteOffset,j.byteLength);switch(q){case $.hello:if(j.byteLength<6)throw new U("invalid_length");return{type:"hello",width:J.getUint16(0),height:J.getUint16(2),fps:J.getUint8(4),preset:T(J.getUint8(5)),codec:k(j.subarray(6))};case $.frame:if(j.byteLength<14)throw new U("invalid_length");if(J.getUint8(0)>1)throw new U("invalid_frame_flags");return{type:"frame",key:J.getUint8(0)===1,seq:J.getUint32(1),captureMicros:Number(J.getBigUint64(5)),data:j.subarray(13)};case $.stats:return{type:"stats",stats:Jj(j)};case $.ping:case $.pong:return C(j,8),{type:q===$.ping?"ping":"pong",token:J.getFloat64(0)};case $.serverClipboard:return{type:"serverClipboard",text:k(j)};case $.clientClipboard:return{type:"clientClipboard",text:k(j)};case $.error:return{type:"error",code:k(j)};case $.pointer:return C(j,5),{type:"pointer",x:J.getUint16(0),y:J.getUint16(2),buttons:J.getUint8(4)};case $.key:if(C(j,5),J.getUint8(0)>1)throw new U("invalid_key_flags");return{type:"key",down:J.getUint8(0)===1,keysym:J.getUint32(1)};case $.config:return C(j,1),{type:"config",preset:T(J.getUint8(0))};case $.keyframeRequest:return C(j,0),{type:"keyframeRequest"};case $.audioHello:if(j.byteLength<5)throw new U("invalid_length");return{type:"audioHello",sampleRate:J.getUint32(0),channels:J.getUint8(4),codec:k(j.subarray(5))};case $.audio:if(j.byteLength<9)throw new U("invalid_length");return{type:"audio",captureMicros:Number(J.getBigUint64(0)),data:j.subarray(8)};case $.audioEnable:if(C(j,1),J.getUint8(0)>1)throw new U("invalid_audio_flags");return{type:"audioEnable",on:J.getUint8(0)===1};case $.control:return{type:"control",control:Qj(j)};case $.windows:{if(j.byteLength%16!==0||j.byteLength>A*16)throw new U("invalid_length");let Q=[];for(let Z=0;Z<j.byteLength;Z+=16)Q.push({x:J.getInt32(Z),y:J.getInt32(Z+4),width:J.getInt32(Z+8),height:J.getInt32(Z+12)});return{type:"windows",bounds:Q}}case $.ack:return C(j,4),{type:"ack",seq:J.getUint32(0)};default:return null}}class $j{buffer=new Uint8Array(0);push(q){let j=new Uint8Array(this.buffer.byteLength+q.byteLength);j.set(this.buffer),j.set(q,this.buffer.byteLength);let J=[],Q=0;while(j.byteLength-Q>=4){let Z=new DataView(j.buffer,j.byteOffset+Q,4).getUint32(0);if(Z<1||Z>V)throw new U("invalid_message_length");if(j.byteLength-Q-4<Z)break;let z=j[Q+4],G=j.slice(Q+5,Q+4+Z),F=Zj(z,G);if(F)J.push(F);Q+=4+Z}return this.buffer=j.slice(Q),J}}var t="/usr/bin/osascript",Gj=5000,Kj=1048576,Uj=String.raw`
|
|
3
3
|
ObjC.import("CoreGraphics");
|
|
4
4
|
ObjC.import("ApplicationServices");
|
|
5
5
|
ObjC.import("AppKit");
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pj as $}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Pj as $}from"./vm-hands-entry-lite-d7cvwy3k.js";var O=$.version,Z=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function S(B,D){if(!Z.test(B)||!Z.test(D))throw Error("cannot compare invalid CLI versions");let J=(q)=>{let y=q.indexOf("-");return y===-1?[q,void 0]:[q.slice(0,y),q.slice(y+1)]},[j,F]=J(B),[w,G]=J(D),K=j.split(".").map(BigInt),M=w.split(".").map(BigInt);for(let q=0;q<3;q+=1){if(K[q]===M[q])continue;return K[q]<M[q]?-1:1}if(F===void 0||G===void 0){if(F===G)return 0;return F===void 0?1:-1}let Q=F.split("."),U=G.split("."),A=Math.max(Q.length,U.length);for(let q=0;q<A;q+=1){let y=Q[q],z=U[q];if(y===void 0||z===void 0){if(y===z)return 0;return y===void 0?-1:1}if(y===z)continue;let H=/^\d+$/.test(y),W=/^\d+$/.test(z);if(H&&W){let X=BigInt(y),Y=BigInt(z);if(X===Y)continue;return X<Y?-1:1}if(H!==W)return H?-1:1;return y<z?-1:1}return 0}function k(B,D){return D?`cli ${B} \xB7 agent ${D}`:`cli ${B}`}
|
|
3
3
|
export{O as Lj,Z as Mj,S as Nj,k as Oj};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Vi as I}from"./vm-hands-entry-lite-sex82vb1.js";import{Ak as g,sk as R,vk as U,yk as C,zk as O}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Vi as I}from"./vm-hands-entry-lite-sex82vb1.js";import{Ak as g,sk as R,vk as U,yk as C,zk as O}from"./vm-hands-entry-lite-te0p47ak.js";import{spawn as S}from"child_process";import{existsSync as x,mkdirSync as T,readFileSync as w,writeFileSync as E}from"fs";import{homedir as H}from"os";import{basename as L,delimiter as D,join as G,win32 as $}from"path";var N=process.platform==="win32"?U("win32"):"/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",b=N.split(D),_=5000,j=65536,k=new Set(["zsh","bash"]),f=[[".local","bin"],[".bun","bin"],[".cargo","bin"],["go","bin"]],P=(z,J)=>new Promise((B,Q)=>{let K;try{K=S(z,[...J],{...C(),stdio:["ignore","pipe","ignore"]}),O(K)}catch(X){Q(X);return}let W=[],V=0,Z=null,q=(X)=>{Z??=Error(X);try{if(K.pid!==void 0)g(K.pid,"SIGKILL")}catch{}},F=setTimeout(()=>q("login_shell_timeout"),_);K.stdout?.on("data",(X)=>{if(V+=X.length,V>j)q("login_shell_output_too_large");else W.push(X)}),K.once("error",(X)=>{clearTimeout(F),Q(X)}),K.once("close",(X)=>{if(clearTimeout(F),Z)Q(Z);else if(X!==0)Q(Error("login_shell_exit_nonzero"));else B(Buffer.concat(W).toString("utf8"))})});function v(z){return typeof z==="string"&&z.startsWith("/")&&!z.includes("\x00")&&k.has(L(z))}function M(z){let J=new Set,B=[];for(let Q of z){if(J.has(Q))continue;J.add(Q),B.push(Q)}return B}function A(z,J=process.platform){let B=J==="win32",Q=z.split(`
|
|
3
3
|
`).at(-1)??"",K=[];for(let W of Q.split(B?";":":")){let V=W.trim();if(B?!$.isAbsolute(V):!V.startsWith("/"))continue;if(V.includes("\x00"))continue;if(I(V))continue;K.push(V)}return M(K)}function y(z){let J=z?.home??H(),B=z?.directoryExists??x,Q=f.map((K)=>G(J,...K)).filter((K)=>{try{return B(K)}catch{return!1}});return M([...Q,...process.platform==="win32"?A(process.env.PATH??process.env.Path??""):[],...b]).join(D)}async function d(z){let J=z?.shell??process.env.SHELL,B=()=>({path:y({home:z?.home,directoryExists:z?.directoryExists}),source:"fallback"});if(process.platform==="win32"||!v(J))return B();let Q;try{Q=await(z?.runLoginShell??P)(J,["-lic",'printf %s "$PATH"'])}catch{return B()}if(Buffer.byteLength(Q,"utf8")>j)return B();let K=A(Q);if(K.length===0)return B();return{path:M([...K,...b]).join(":"),source:"login_shell"}}function n(z){let J=null;return()=>{return J??=d(z),J}}function Y(z){if(z===void 0||z.includes("\x00")||Buffer.byteLength(z,"utf8")>32768)return;return z}function r(z){let J=z.source??process.env,B={HOME:z.home,PATH:z.path??N,TMPDIR:z.temporaryDirectory,SHELL:Y(J.SHELL)??"/bin/zsh",LANG:Y(J.LANG)??"C.UTF-8",LC_ALL:Y(J.LC_ALL)??Y(J.LANG)??"C.UTF-8"},Q=Y(J.LC_CTYPE),K=Y(J.TERM),W=Y(J.COLORTERM);if(Q)B.LC_CTYPE=Q;if(K)B.TERM=K;if(W)B.COLORTERM=W;if(process.platform==="win32"){for(let V of h){let Z=Y(J[V]);if(Z)B[V]=Z}B.TEMP=B.TMP=z.temporaryDirectory,B.SHELL=R()??B.SHELL,B.PATH=m(B.PATH)}return B}function m(z,J=G(H(),".reason","python3")){let B=(W)=>z.split($.delimiter).filter((V)=>V&&!/[\\/]WindowsApps[\\/]?$/i.test(V)).map((V)=>$.join(V,W)).find((V)=>x(V)),Q=B("python.exe");if(B("python3.exe")||!Q)return z;let K=`#!/bin/sh
|
|
4
4
|
exec "${Q.replaceAll("\\","/")}" "$@"
|
|
5
5
|
`;try{let W=G(J,"python3");if(!x(W)||w(W,"utf8")!==K)T(J,{recursive:!0}),E(W,K)}catch{return z}return[J,z].join($.delimiter)}var h=["SystemRoot","SystemDrive","windir","ComSpec","PATHEXT","USERPROFILE","USERNAME","USERDOMAIN","APPDATA","LOCALAPPDATA","ProgramData","ProgramFiles","ProgramFiles(x86)","ProgramW6432","CommonProgramFiles","NUMBER_OF_PROCESSORS","PROCESSOR_ARCHITECTURE","OS"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{wk as b}from"./vm-hands-entry-lite-
|
|
2
|
+
import{wk as b}from"./vm-hands-entry-lite-te0p47ak.js";import{Fk as W}from"./vm-hands-entry-lite-fw5ztpwn.js";import{execFileSync as C}from"child_process";import{mkdirSync as f,readdirSync as K,readFileSync as k,rmSync as G,statSync as A,writeFileSync as F}from"fs";import{join as $,sep as R}from"path";import{setTimeout as L}from"timers/promises";var O=3000,Y=null;function x(z){return $(z,"users")}function I(z){if(Y?.root===z.root)return;let H=x(z.root);f(H,{recursive:!0,mode:448}),F($(H,String(process.pid)),"",{mode:384}),Y=z}function w(){if(!Y)return;G($(x(Y.root),String(process.pid)),{force:!0}),Y=null}function B(z){try{return process.kill(z,0),!0}catch(H){return H instanceof Error&&"code"in H&&H.code==="EPERM"}}function j(){let z=process.getuid?.();if(process.platform==="linux")return K("/proc").flatMap((N)=>{if(!/^\d+$/.test(N))return[];try{if(A(`/proc/${N}`).uid!==z)return[];let Q=k(`/proc/${N}/cmdline`).toString("utf8").split("\x00").join(" ").trim();return Q?[{pid:Number(N),command:Q}]:[]}catch{return[]}});if(process.platform==="win32")return C(b("powershell.exe"),["-NoLogo","-NoProfile","-NonInteractive","-Command",'Get-CimInstance Win32_Process | ForEach-Object { "$($_.ProcessId) $($_.CommandLine)" }'],{encoding:"utf8",maxBuffer:16777216,windowsHide:!0}).split(/\r?\n/).flatMap((Q)=>{let V=/^(\d+) (.+)$/.exec(Q.trim());return V?[{pid:Number(V[1]),command:V[2]}]:[]});return C("/bin/ps",["-axww","-o","pid=,uid=,command="],{encoding:"utf8",maxBuffer:16777216}).split(`
|
|
3
3
|
`).flatMap((N)=>{let Q=/^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(N);return Q&&Number(Q[2])===z?[{pid:Number(Q[1]),command:Q[3]}]:[]})}async function h(){let z=Y;if(!z)return{released:"unused",stopped:0};let H=x(z.root);G($(H,String(process.pid)),{force:!0}),Y=null;let N=!1;for(let J of K(H)){let U=Number(J);if(Number.isSafeInteger(U)&&U>0&&B(U))N=!0;else G($(H,J),{force:!0})}if(N)return{released:"shared",stopped:0};let Q=j().filter((J)=>J.pid!==process.pid&&(J.command.includes(`${z.root}${R}`)||J.command.includes(`${z.automation}${R}`)||J.command.includes(z.extensionDir))),V=(J,U)=>{try{process.kill(J,U)}catch{}};for(let J of Q)V(J.pid,"SIGTERM");for(let J=Date.now()+O;Date.now()<J&&Q.some((U)=>B(U.pid));)await new Promise((U)=>setTimeout(U,100));for(let J of Q)if(B(J.pid))V(J.pid,"SIGKILL");return{released:"stopped",stopped:Q.length}}var v=20000,M=30000,P=100,Z=new Map,X=null,q=[];function y(z){Z.set(z,(Z.get(z)??0)+1);let H=!1;return()=>{if(H)return;H=!0;let N=(Z.get(z)??1)-1;if(N>0){Z.set(z,N);return}if(Z.delete(z),X?.run===z)X.idleUntil=0}}function D(){return new W("automation_desktop_busy","Another Session, or another agent of this Session, is using this worker's desktop. Retry after it finishes.")}function E(z,H){return X!==null&&X.run!==z&&(X.calls>0||H<X.idleUntil)}async function u(z,H,N=Date.now){let Q=Symbol(z);q.push(Q);try{let U=N()+M;for(;;){if(!E(z,N())&&(X?.run===z||q[0]===Q))break;if(N()>=U)throw D();await L(P,void 0,{signal:H}).catch(()=>H.throwIfAborted())}}finally{q.splice(q.indexOf(Q),1)}if(X?.run!==z)X={run:z,calls:0,idleUntil:0};let V=X;V.calls+=1;let J=!1;return()=>{if(J)return;J=!0,V.calls-=1,V.idleUntil=N()+v}}
|
|
4
4
|
export{I as jk,w as kk,h as lk,v as mk,M as nk,y as ok,u as pk};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ik as w}from"./vm-hands-entry-lite-
|
|
2
|
+
import{ik as w}from"./vm-hands-entry-lite-e05sgnwe.js";var S="inference.custom.v1",K=32768,P=67108864,Q=16384,T=204800,z=600000,U=["content-type","anthropic-version","user-agent"],L=w.enum(["openai-completions","openai-responses","anthropic-messages"]),V=new Set(U),W=w.record(w.string(),w.string().max(2048)).refine((j)=>Object.keys(j).every((A)=>V.has(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)),"Only non-secret custom endpoint request headers are permitted");function F(j){try{let A=new URL(j);return["http:","https:"].includes(A.protocol)&&!A.username&&!A.password&&!A.search&&!A.hash?A:null}catch{return null}}function X(j,A){let B=F(j.baseUrl),H=F(A.baseUrl),D=F(j.url);if(!B||!H||!D||j.method!=="POST"||A.execution!=="device")return!1;let I=(J)=>J.origin+J.pathname.replace(/\/+$/,"");if(I(B)!==I(H)||D.origin!==B.origin)return!1;let O=A.api==="openai-completions"?"/chat/completions":A.api==="openai-responses"?"/responses":"/v1/messages";return D.pathname===B.pathname.replace(/\/+$/,"")+O}var b=w.object({baseUrl:w.string().max(2048),url:w.string().max(4096),method:w.literal("POST"),body:w.string().refine((j)=>new TextEncoder().encode(j).byteLength<=T).optional(),headers:W,credentialOrganizationId:w.string().uuid(),accountKey:w.string().min(1).max(256).optional()}).strict().refine((j)=>L.options.some((A)=>X(j,{baseUrl:j.baseUrl,api:A,execution:"device"})),"Invalid custom endpoint inference URL"),k=w.object({status:w.number().int().min(200).max(599),statusText:w.string().max(256).refine((j)=>!/[\r\n\0]/.test(j)),headers:w.record(w.string(),w.string().max(4096)).refine((j)=>Object.keys(j).every((A)=>["content-type","retry-after","x-request-id","request-id"].includes(A))&&Object.values(j).every((A)=>!/[\r\n\0]/.test(A)))}).strict(),y=w.union([w.object({eof:w.literal(!0)}).strict(),w.object({eof:w.literal(!1),data:w.string().max(Math.ceil(K/3)*4).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/).refine((j)=>j.length>0&&j.length*3/4-(j.endsWith("==")?2:j.endsWith("=")?1:0)<=K)}).strict()]),M=w.object({bytes:w.number().int().min(0).max(P),chunks:w.number().int().min(0).max(Q)}).strict(),p=w.object({apiKey:w.string().min(1).max(16384).refine((j)=>!/[\r\n\0]/.test(j)),api:L}).strict(),Y=["custom_endpoint_host_not_found","custom_endpoint_connection_failed","custom_endpoint_tls_failed"];function c(j){return typeof j==="string"&&Y.includes(j)}var Z="Ollama listens only on 127.0.0.1 unless it is started with OLLAMA_HOST=0.0.0.0.",G={custom_endpoint_host_not_found:"Your computer couldn't resolve your model server's hostname. Check the hostname in the Base URL, and that this computer is on the network or tailnet that resolves it.",custom_endpoint_connection_failed:`Your computer's connection to your model server was refused or timed out. Check that the server is running and listening on the Base URL's address and port. ${Z}`,custom_endpoint_tls_failed:"Your computer couldn't make a secure (TLS) connection to your model server. Check the server's https certificate, or use an http:// Base URL for a server on your computer or private network.",401:"Your model server refused the request (HTTP 401). Check the API key saved for it in Models.",403:"Your model server refused the request (HTTP 403). Ollama refuses requests addressed to a hostname other than localhost, such as a *.ts.net name from tailscale serve or funnel: restart it with OLLAMA_HOST=0.0.0.0, or use http://localhost:11434/v1 when it runs on the session's computer. For another server, check the API key and its access rules.",404:"Your model server answered HTTP 404 (not found). Check that the Base URL is the API root (for Ollama, http://localhost:11434/v1) and that each model ID is one the server lists."},q="Local custom endpoints require a session on your connected computer. This custom endpoint's Execution location is Your computer, so Reason cloud never calls it. Connect your computer with the Reason desktop app or CLI and run this session there, or set the endpoint's Execution location to Reason cloud with a public https Base URL in Models, or choose another model.";function _(j){return typeof j==="string"&&j.startsWith("Local custom endpoints require a session on your connected computer.")}var $=new Set(Object.values(G));function h(j){return Object.hasOwn(G,j)?G[j]:null}function v(j){return typeof j==="string"&&($.has(j)||_(j))}var N="returned HTTP 403: its firewall blocked Reason cloud",x=/^Your model endpoint \S+ (?:returned HTTP 40[34]|returned HTTP 403: its firewall blocked Reason cloud|was unreachable: it refused the connection)\.$/,C=/Attention Required! \| Cloudflare|Sorry, you have been blocked|cf-error-details/i;function n(j,A,B){if(!/^[a-z0-9.-]+$/i.test(j))return null;if(A==="connection_refused")return`Your model endpoint ${j} was unreachable: it refused the connection.`;if(A===403&&B&&C.test(B))return`Your model endpoint ${j} ${N}.`;return A===403||A===404?`Your model endpoint ${j} returned HTTP ${A}.`:null}function E(j){return typeof j==="string"&&x.test(j)}function d(j){return E(j)&&j.includes(N)}
|
|
3
3
|
export{S as gd,K as hd,P as id,Q as jd,T as kd,z as ld,U as md,X as nd,b as od,k as pd,y as qd,M as rd,p as sd,Y as td,c as ud,q as vd,_ as wd,h as xd,v as yd,n as zd,E as Ad,d as Bd};
|