@reason-machines/cli-linux-x64 0.2.505 → 0.2.507
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/THIRD_PARTY_NOTICES.txt +8 -7
- package/bin/reason +2 -2
- package/bin/runtime/srt/sandbox-runtime.mjs +52 -52
- package/bin/vm-hands/api-credentials-q302458a.js +2 -0
- package/bin/vm-hands/api-e589y9e0.js +2 -0
- package/bin/vm-hands/connect-cli-zeqyjj5t.js +2 -0
- package/bin/vm-hands/credentials-drj5ktpt.js +2 -0
- package/bin/vm-hands/custom-endpoint-device-j1x988g0.js +2 -0
- package/bin/vm-hands/desktop-account-4525j7h3.js +2 -0
- package/bin/vm-hands/device-workspace-pt07525s.js +2 -0
- package/bin/vm-hands/fsevents-8zxmv89w.js +2 -0
- package/bin/vm-hands/hands-worker-source-atg5dc7b.js +2 -0
- package/bin/vm-hands/index-ttmxy9nd.js +12818 -0
- package/bin/vm-hands/install-receipt-6v65enmf.js +2 -0
- package/bin/vm-hands/local-automation-43ry1qn6.js +2 -0
- package/bin/vm-hands/local-capabilities-e43ra579.js +2 -0
- package/bin/vm-hands/local-desktop-users-9dqayaej.js +2 -0
- package/bin/vm-hands/local-display-mac-fnp3317m.js +2 -0
- package/bin/vm-hands/local-display-session-9pm9ed2m.js +2 -0
- package/bin/vm-hands/local-display-video-xtjezayy.js +2 -0
- package/bin/vm-hands/local-managed-process-d179a1aq.js +2 -0
- package/bin/vm-hands/local-pty-session-5yh2a63r.js +2 -0
- package/bin/vm-hands/managed-runtime-mydc95fa.js +2 -0
- package/bin/vm-hands/network-contract-rzw769gw.js +2 -0
- package/bin/vm-hands/package-r7sgmw4t.js +2 -0
- package/bin/vm-hands/permissions-g919jepr.js +2 -0
- package/bin/vm-hands/reason-hands-protocol-8fgk2s53.js +2 -0
- package/bin/vm-hands/serve-service-5twngyyg.js +2 -0
- package/bin/vm-hands/status-4da3v86c.js +10 -0
- package/bin/vm-hands/version-r5qbf8y9.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-2cf33ark.js +5 -0
- package/bin/vm-hands/{vm-hands-entry-lite-s8ty42st.js → vm-hands-entry-lite-2mskbtsd.js} +5 -9
- package/bin/vm-hands/vm-hands-entry-lite-38g65s5x.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-3ahrysca.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-3sjkzhf6.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-5gevvgec.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-5tbntcyq.js +42 -0
- package/bin/vm-hands/vm-hands-entry-lite-6a96d80a.js +14 -0
- package/bin/vm-hands/vm-hands-entry-lite-6x1an7es.js +7 -0
- package/bin/vm-hands/vm-hands-entry-lite-7651j949.js +52 -0
- package/bin/vm-hands/vm-hands-entry-lite-7777m86y.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-b7wy89y0.js → vm-hands-entry-lite-77j164ps.js} +54 -54
- package/bin/vm-hands/vm-hands-entry-lite-7v1rd0sk.js +4 -0
- package/bin/vm-hands/vm-hands-entry-lite-87vmbt38.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-8wcyveeh.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-b4q5e57n.js +105 -0
- package/bin/vm-hands/vm-hands-entry-lite-bnxh4ax9.js +452 -0
- package/bin/vm-hands/vm-hands-entry-lite-eabever7.js +112 -0
- package/bin/vm-hands/vm-hands-entry-lite-ewr54tpc.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-f62fvme8.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-f69t48dj.js +4 -0
- package/bin/vm-hands/{vm-hands-entry-lite-8p8hz0j1.js → vm-hands-entry-lite-fcvf8md1.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-gvjffc5t.js +65 -0
- package/bin/vm-hands/vm-hands-entry-lite-hmaazqdr.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-mcjca0ez.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-mk5ayds8.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-ncbzy69k.js +4 -0
- package/bin/vm-hands/vm-hands-entry-lite-np07qyeq.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-nqdstx24.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-psywfz8m.js +9 -0
- package/bin/vm-hands/vm-hands-entry-lite-qpdpzg8g.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-qxq147a5.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite-qy9xg6em.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-ra8c0ytm.js +128 -0
- package/bin/vm-hands/{vm-hands-entry-lite-xd2dn3n8.js → vm-hands-entry-lite-rfz60hb3.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-rn2rhavz.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-rzr2ncf5.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-swrymqj9.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-tebh7dcm.js +6 -0
- package/bin/vm-hands/vm-hands-entry-lite-txd50spx.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-v6yygjyx.js +126 -0
- package/bin/vm-hands/vm-hands-entry-lite-v9engyp5.js +539 -0
- package/bin/vm-hands/vm-hands-entry-lite-v9qq2cgv.js +4 -0
- package/bin/vm-hands/vm-hands-entry-lite-vrenpefs.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-vtc8mjpc.js +9 -0
- package/bin/vm-hands/{vm-hands-entry-lite-c8bf82tx.js → vm-hands-entry-lite-wrvz9jxy.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-x39tmj7j.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-yretc2th.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite-znd9c7x0.js +2 -0
- package/bin/vm-hands/vm-hands-entry-lite.js +3 -1
- package/bin/vm-hands/vm-hands-executor-68r7m0z1.js +12 -0
- package/bin/vm-hands/vm-hands-op-runner-gppbedw9.js +2 -0
- package/bin/vm-hands/vm-hands-runtime-w2fb9gsk.js +4 -0
- package/bin/vm-hands/worker-preview-readiness-7xtgxsar.js +2 -0
- package/bin/vm-hands/worker-sandbox-s9pyac8p.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-credentials-23k36ayh.js +0 -2
- package/bin/vm-hands/api-jd29p2kc.js +0 -2
- package/bin/vm-hands/ask-relay-zpp0rkhg.js +0 -4
- package/bin/vm-hands/connect-cli-xyxgcg6z.js +0 -2
- package/bin/vm-hands/credentials-byna24dv.js +0 -2
- package/bin/vm-hands/custom-endpoint-device-p2agcsk0.js +0 -2
- package/bin/vm-hands/desktop-account-z16mmkxg.js +0 -2
- package/bin/vm-hands/device-workspace-y0tk3ne8.js +0 -2
- package/bin/vm-hands/hands-worker-source-0qa16xzj.js +0 -2
- package/bin/vm-hands/index-h6xkz48h.js +0 -12818
- package/bin/vm-hands/install-receipt-nnragt7p.js +0 -2
- package/bin/vm-hands/local-automation-xbpca0f3.js +0 -2
- package/bin/vm-hands/local-capabilities-30m8pzpv.js +0 -2
- package/bin/vm-hands/local-desktop-users-gxfywsan.js +0 -2
- package/bin/vm-hands/local-display-mac-n236gkpe.js +0 -2
- package/bin/vm-hands/local-display-session-ddafdm8k.js +0 -2
- package/bin/vm-hands/local-display-video-gha54xwa.js +0 -2
- package/bin/vm-hands/local-managed-process-0zwxyqxd.js +0 -2
- package/bin/vm-hands/local-pty-session-w1yrmjm0.js +0 -2
- package/bin/vm-hands/managed-runtime-8y90twae.js +0 -2
- package/bin/vm-hands/network-contract-v0fkg94d.js +0 -2
- package/bin/vm-hands/network-sign-in-3dkdkh3a.js +0 -34
- package/bin/vm-hands/package-z2dk6xva.js +0 -2
- package/bin/vm-hands/permissions-ga1ax8wd.js +0 -2
- package/bin/vm-hands/reason-hands-protocol-vzgxd159.js +0 -2
- package/bin/vm-hands/serve-service-42nqanvr.js +0 -2
- package/bin/vm-hands/status-m0g7k47a.js +0 -96
- package/bin/vm-hands/version-ye6800p2.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-00y3kn86.js +0 -7
- package/bin/vm-hands/vm-hands-entry-lite-0572m6cr.js +0 -344
- package/bin/vm-hands/vm-hands-entry-lite-07q2xvk1.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-0a4cy8gw.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-1nj03gbj.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-26xb026c.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-33h8294z.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-3882raa5.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-3rg3znp8.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-4swa18qz.js +0 -10
- package/bin/vm-hands/vm-hands-entry-lite-56v9haps.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-6x5pj2y0.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-8twscwtw.js +0 -112
- package/bin/vm-hands/vm-hands-entry-lite-8xe0wzp9.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-ah2ep922.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-b0p8f295.js +0 -52
- package/bin/vm-hands/vm-hands-entry-lite-c5gt0086.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-dgmap6z4.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-dhqmbqsh.js +0 -9
- package/bin/vm-hands/vm-hands-entry-lite-e1xjfj57.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-e4hwb89r.js +0 -66
- package/bin/vm-hands/vm-hands-entry-lite-g6r5xrk0.js +0 -105
- package/bin/vm-hands/vm-hands-entry-lite-ghhpgt3v.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-h5smacqn.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-jd31as70.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-k9n1pk42.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-kqbats5n.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-p9fwt68c.js +0 -42
- package/bin/vm-hands/vm-hands-entry-lite-pkk555dx.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-pmw3ycgc.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-q9g11dbj.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-r374pchj.js +0 -9
- package/bin/vm-hands/vm-hands-entry-lite-r665z809.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-rck5h8fr.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-rj8yq6gp.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-s8zfzv0k.js +0 -6
- package/bin/vm-hands/vm-hands-entry-lite-tafgty5k.js +0 -4
- package/bin/vm-hands/vm-hands-entry-lite-tbdcmq09.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-td309c1y.js +0 -5
- package/bin/vm-hands/vm-hands-entry-lite-v0bp1v66.js +0 -128
- package/bin/vm-hands/vm-hands-entry-lite-v0k8b768.js +0 -452
- package/bin/vm-hands/vm-hands-entry-lite-v4r1fggm.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-vqr3zrqr.js +0 -539
- package/bin/vm-hands/vm-hands-entry-lite-wbfmc0xn.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-x3pbyg92.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-yqn8h1p0.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-zj3hb5jk.js +0 -127
- package/bin/vm-hands/vm-hands-entry-lite-zz8tr0bm.js +0 -12
- package/bin/vm-hands/vm-hands-executor-6tncheya.js +0 -12
- package/bin/vm-hands/vm-hands-op-runner-s1ghsym7.js +0 -2
- package/bin/vm-hands/vm-hands-runtime-k6egwk2t.js +0 -4
- package/bin/vm-hands/worker-preview-readiness-wh0yg1dz.js +0 -2
- package/bin/vm-hands/worker-sandbox-s054x4zw.js +0 -2
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$g as y8,Xg as p8,Yg as P8,Zg as X8,_g as Q8,ah as S8,ch as s,fh as w}from"./vm-hands-entry-lite-zj3hb5jk.js";import{Ih as e,Lh as d,Mh as o}from"./vm-hands-entry-lite-8twscwtw.js";import{ci as b8}from"./vm-hands-entry-lite-rj8yq6gp.js";import{ti as x8}from"./vm-hands-entry-lite-td309c1y.js";import{mk as g}from"./vm-hands-entry-lite-56v9haps.js";import{el as q8}from"./vm-hands-entry-lite-r665z809.js";import{ll as N}from"./vm-hands-entry-lite-v4r1fggm.js";import{execFile as J8,spawn as T8}from"child_process";import{randomBytes as u8}from"crypto";import{chmodSync as V8,existsSync as N8,lstatSync as s8,mkdirSync as K8,readFileSync as a8,rmSync as r8,writeFileSync as K}from"fs";import{connect as g8}from"net";import{join as J}from"path";var R=32,f=76;var $="./desktop-wallpaper-0pjhgyfk.jpg";var H="./dock-browser-afp005mt.png";var l="./dock-files-rywdm96b.png";var k="./dock-terminal-s41cj1jp.png";var v=`# Sets the X root window background and _XROOTPMAP_ID, as feh --bg-fill does.
|
|
3
|
-
# The native Blaxel image ships no feh, hsetroot or compositor, but it does ship
|
|
4
|
-
# python3-gi and libX11. tint2 reads _XROOTPMAP_ID to draw its transparent panel.
|
|
5
|
-
# Usage: DISPLAY=:99 python3 set-root-wallpaper.py IMAGE
|
|
6
|
-
import ctypes, sys
|
|
7
|
-
import gi
|
|
8
|
-
gi.require_version("GdkPixbuf", "2.0")
|
|
9
|
-
from gi.repository import GdkPixbuf
|
|
10
|
-
x = ctypes.cdll.LoadLibrary("libX11.so.6")
|
|
11
|
-
x.XOpenDisplay.restype = ctypes.c_void_p
|
|
12
|
-
x.XOpenDisplay.argtypes = [ctypes.c_char_p]
|
|
13
|
-
d = x.XOpenDisplay(None)
|
|
14
|
-
if not d: sys.exit("no display")
|
|
15
|
-
for name, res, args in [
|
|
16
|
-
("XDefaultScreen", ctypes.c_int, [ctypes.c_void_p]),
|
|
17
|
-
("XRootWindow", ctypes.c_ulong, [ctypes.c_void_p, ctypes.c_int]),
|
|
18
|
-
("XDisplayWidth", ctypes.c_int, [ctypes.c_void_p, ctypes.c_int]),
|
|
19
|
-
("XDisplayHeight", ctypes.c_int, [ctypes.c_void_p, ctypes.c_int]),
|
|
20
|
-
("XDefaultDepth", ctypes.c_int, [ctypes.c_void_p, ctypes.c_int]),
|
|
21
|
-
("XDefaultVisual", ctypes.c_void_p, [ctypes.c_void_p, ctypes.c_int]),
|
|
22
|
-
("XDefaultGC", ctypes.c_void_p, [ctypes.c_void_p, ctypes.c_int]),
|
|
23
|
-
("XCreatePixmap", ctypes.c_ulong, [ctypes.c_void_p, ctypes.c_ulong, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint]),
|
|
24
|
-
("XCreateImage", ctypes.c_void_p, [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_int, ctypes.c_int, ctypes.c_char_p, ctypes.c_uint, ctypes.c_uint, ctypes.c_int, ctypes.c_int]),
|
|
25
|
-
("XPutImage", ctypes.c_int, [ctypes.c_void_p, ctypes.c_ulong, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_uint, ctypes.c_uint]),
|
|
26
|
-
("XInternAtom", ctypes.c_ulong, [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int]),
|
|
27
|
-
("XChangeProperty", ctypes.c_int, [ctypes.c_void_p, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_int, ctypes.c_int, ctypes.c_void_p, ctypes.c_int]),
|
|
28
|
-
("XSetWindowBackgroundPixmap", ctypes.c_int, [ctypes.c_void_p, ctypes.c_ulong, ctypes.c_ulong]),
|
|
29
|
-
("XClearWindow", ctypes.c_int, [ctypes.c_void_p, ctypes.c_ulong]),
|
|
30
|
-
("XSetCloseDownMode", ctypes.c_int, [ctypes.c_void_p, ctypes.c_int]),
|
|
31
|
-
("XCloseDisplay", ctypes.c_int, [ctypes.c_void_p]),
|
|
32
|
-
]:
|
|
33
|
-
f = getattr(x, name); f.restype = res; f.argtypes = args
|
|
34
|
-
s = x.XDefaultScreen(d); root = x.XRootWindow(d, s)
|
|
35
|
-
w, h = x.XDisplayWidth(d, s), x.XDisplayHeight(d, s)
|
|
36
|
-
if x.XDefaultDepth(d, s) != 24: sys.exit("unsupported depth")
|
|
37
|
-
# Scale to cover the screen, then crop the centre.
|
|
38
|
-
src = GdkPixbuf.Pixbuf.new_from_file(sys.argv[1])
|
|
39
|
-
k = max(w / src.get_width(), h / src.get_height())
|
|
40
|
-
sw, sh = max(w, round(src.get_width() * k)), max(h, round(src.get_height() * k))
|
|
41
|
-
pb = src.scale_simple(sw, sh, GdkPixbuf.InterpType.BILINEAR).new_subpixbuf((sw - w) // 2, (sh - h) // 2, w, h).copy()
|
|
42
|
-
if pb.get_has_alpha(): pb = pb.composite_color_simple(w, h, GdkPixbuf.InterpType.NEAREST, 255, 1, 0, 0)
|
|
43
|
-
rgb, stride = pb.get_pixels(), pb.get_rowstride()
|
|
44
|
-
bgrx = bytearray(w * h * 4)
|
|
45
|
-
for y in range(h):
|
|
46
|
-
row = rgb[y * stride:y * stride + w * 3]; o = y * w * 4
|
|
47
|
-
bgrx[o:o + w * 4:4] = row[2::3]; bgrx[o + 1:o + w * 4:4] = row[1::3]; bgrx[o + 2:o + w * 4:4] = row[0::3]
|
|
48
|
-
buf = ctypes.create_string_buffer(bytes(bgrx), len(bgrx))
|
|
49
|
-
pix = x.XCreatePixmap(d, root, w, h, 24)
|
|
50
|
-
img = x.XCreateImage(d, x.XDefaultVisual(d, s), 24, 2, 0, buf, w, h, 32, 0) # ZPixmap
|
|
51
|
-
x.XPutImage(d, pix, x.XDefaultGC(d, s), img, 0, 0, 0, 0, w, h)
|
|
52
|
-
ref = ctypes.c_ulong(pix)
|
|
53
|
-
for atom in (b"_XROOTPMAP_ID", b"ESETROOT_PMAP_ID"):
|
|
54
|
-
x.XChangeProperty(d, root, x.XInternAtom(d, atom, 0), 20, 32, 0, ctypes.byref(ref), 1) # XA_PIXMAP, PropModeReplace
|
|
55
|
-
x.XSetWindowBackgroundPixmap(d, root, pix)
|
|
56
|
-
x.XClearWindow(d, root)
|
|
57
|
-
x.XSetCloseDownMode(d, 1) # RetainPermanent: the pixmap outlives this process
|
|
58
|
-
x.XCloseDisplay(d)
|
|
59
|
-
`;function E8(x){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
60
|
-
<openbox_config xmlns="http://openbox.org/3.4/rc">
|
|
61
|
-
<theme><keepBorder>no</keepBorder></theme>
|
|
62
|
-
<applications>
|
|
63
|
-
<!-- Debian Chromium is "Chromium"; Chrome for Testing is "Chromium-browser". -->
|
|
64
|
-
<application class="Chromium*">
|
|
65
|
-
<decor>no</decor>
|
|
66
|
-
<position force="yes"><x>${R}</x><y>${R}</y></position>
|
|
67
|
-
<size><width>${x.width-R*2}</width><height>${x.height-R-f}</height></size>
|
|
68
|
-
</application>
|
|
69
|
-
</applications>
|
|
70
|
-
</openbox_config>`}var h8=`# Remote sandbox dock \u2014 launcher icons only, centred, no panel fill
|
|
71
|
-
panel_items = L
|
|
72
|
-
panel_size = 100% 46
|
|
73
|
-
panel_margin = 0 10
|
|
74
|
-
panel_padding = 0 0 10
|
|
75
|
-
panel_position = bottom center horizontal
|
|
76
|
-
panel_shrink = 1
|
|
77
|
-
panel_background_id = 0
|
|
78
|
-
panel_layer = top
|
|
79
|
-
mouse_effects = 1
|
|
80
|
-
mouse_hover_icon_asb = 100 0 12
|
|
81
|
-
mouse_pressed_icon_asb = 100 0 -12
|
|
82
|
-
|
|
83
|
-
launcher_icon_size = 46
|
|
84
|
-
launcher_padding = 0 0 10
|
|
85
|
-
launcher_background_id = 0
|
|
86
|
-
launcher_tooltip = 1
|
|
87
|
-
|
|
88
|
-
launcher_item_app = /tmp/ara-chromium.desktop
|
|
89
|
-
launcher_item_app = /tmp/ara-terminal.desktop
|
|
90
|
-
launcher_item_app = /tmp/ara-files.desktop
|
|
91
|
-
`,M8=`corner-radius = 12;
|
|
92
|
-
rounded-corners-exclude = [
|
|
93
|
-
"class_g = 'tint2'",
|
|
94
|
-
"window_type = 'dock'",
|
|
95
|
-
"window_type = 'desktop'"
|
|
96
|
-
];
|
|
97
|
-
backend = "xrender";
|
|
98
|
-
shadow = false;
|
|
99
|
-
fading = false;
|
|
100
|
-
vsync = false;
|
|
101
|
-
inactive-opacity = 1.0;
|
|
102
|
-
active-opacity = 1.0;
|
|
103
|
-
`,w8="/tmp/ara-dock-browser.png",F8=`[Desktop Entry]
|
|
104
|
-
Name=Chrome
|
|
105
|
-
Exec=chromium --no-sandbox %U
|
|
106
|
-
Icon=${w8}
|
|
107
|
-
Type=Application
|
|
108
|
-
Categories=Network;WebBrowser;
|
|
109
|
-
`,G8=`[Desktop Entry]
|
|
110
|
-
Name=Terminal
|
|
111
|
-
Exec=bash -c "DISPLAY=:99 xterm -fa DejaVuSansMono -fs 11 -bg black -fg white"
|
|
112
|
-
Icon=/tmp/ara-dock-terminal.png
|
|
113
|
-
Type=Application
|
|
114
|
-
Categories=System;TerminalEmulator;
|
|
115
|
-
`,c8=`[Desktop Entry]
|
|
116
|
-
Name=Files
|
|
117
|
-
Exec=bash -c "DISPLAY=:99 pcmanfm --no-desktop"
|
|
118
|
-
Icon=/tmp/ara-dock-files.png
|
|
119
|
-
Type=Application
|
|
120
|
-
Categories=System;FileManager;
|
|
121
|
-
`;var n={"wallpaper.jpg":$,"dock-browser.png":H,"dock-terminal.png":k,"dock-files.png":l},Z8=v,O8='set_wallpaper() { if command -v feh >/dev/null 2>&1; then feh --bg-fill "$1"; else python3 "$2" "$1"; fi; }';function i(x){let q=(Q)=>Q.replaceAll("DISPLAY=:99",`DISPLAY=${x.display}`).replaceAll("/tmp/ara-",`${x.root}/ara-`),P=new Set(x.absent??[]),p=h8.split(`
|
|
122
|
-
`).filter((Q)=>!(P.has("terminal")&&Q.endsWith("/ara-terminal.desktop"))&&!(P.has("files")&&Q.endsWith("/ara-files.desktop"))).join(`
|
|
123
|
-
`),b={"openbox/rc.xml":E8(x.screen),"tint2/tint2rc":q(p),"picom/picom.conf":M8,...P.has("terminal")?{}:{"ara-terminal.desktop":q(G8)},...P.has("files")?{}:{"ara-files.desktop":q(c8)},"ara-chromium.desktop":q(F8).replace("chromium --no-sandbox %U",x.browserExec),"ara-set-root-wallpaper.py":Z8},X=[...E.slice(0,3),O8,'[ ! -f "$ROOT/ara-wallpaper.jpg" ] || set_wallpaper "$ROOT/ara-wallpaper.jpg" "$ROOT/ara-set-root-wallpaper.py" || true',...E.slice(3)];return{files:b,start:X}}var E=['ticks() { line=$(cat "/proc/$1/stat" 2>/dev/null) || return 1; rest=${line##*) }; case $rest in Z*|X*) return 1;; esac; printf "%s" "$rest" | cut -d " " -f20; }','alive() { [ -f "$ROOT/$1.pid" ] || return 1; read -r pid start <"$ROOT/$1.pid"; current=$(ticks "$pid") || return 1; [ "$current" = "$start" ] && kill -0 "$pid" 2>/dev/null; }','launch() { name=$1; shift; "$@" 9>&- >"$ROOT/$name.log" 2>&1 & pid=$!; start=$(ticks "$pid"); printf "%s %s\\n" "$pid" "$start" >"$ROOT/$name.pid"; }','if [ -f "$ROOT/tint2/tint2rc" ] && ! alive tint2 && command -v tint2 >/dev/null 2>&1; then launch tint2 tint2 -c "$ROOT/tint2/tint2rc"; fi','if [ -f "$ROOT/picom/picom.conf" ] && ! alive picom && command -v picom >/dev/null 2>&1; then launch picom picom --config "$ROOT/picom/picom.conf"; fi'];var Y8=43200000,D=":99",z8=60000,_=15000,u={width:1280,height:800},$8=/^[A-Za-z0-9._:-]{1,160}$/;function H8(x){return Boolean(x)&&typeof x==="object"&&!Array.isArray(x)}var l8=["video","viewer","viewer_same_network","viewer_network"];function k8(x,q=Date.now()){let P=["relay_url","session_id","expires_at"];if(!H8(x)||P.some((y)=>!(y in x))||Object.keys(x).some((y)=>!P.includes(y)&&!l8.includes(y)))throw new N("invalid_display_request","Reason desktop request is malformed.");let p="video"in x?d(x.video):void 0,b="viewer"in x?e(x.viewer):null;if(p===null)throw new N("invalid_display_request","Reason desktop video request is invalid.");let X=null;try{X=typeof x.relay_url==="string"?new URL(x.relay_url):null}catch{}if(!X||X.protocol!=="wss:"&&X.protocol!=="ws:"||X.username||X.password)throw new N("invalid_display_request","Reason desktop relay URL is invalid.");if(typeof x.session_id!=="string"||!$8.test(x.session_id))throw new N("invalid_display_request","Reason desktop session identity is invalid.");let Q=typeof x.expires_at==="string"?Date.parse(x.expires_at):Number.NaN;if(!Number.isFinite(Q)||Q<=q)throw new N("invalid_display_request","Reason desktop session has already expired.");return{relay_url:x.relay_url,session_id:x.session_id,expires_at:new Date(Math.min(Q,q+Y8)).toISOString(),...p?{video:p}:{},...b?{viewer:b}:{},...p&&x.viewer_same_network===!0?{viewer_same_network:!0}:{}}}function I(x=process.platform){return(x==="linux"||x==="darwin"||x==="win32")&&w()?.features.display===!0}async function sx(){if(process.platform==="win32")return I()&&await s();if(process.platform!=="darwin")return I();return await s()}function h(x){K8(x,{recursive:!0,mode:448});let q=s8(x);if(!q.isDirectory()||q.isSymbolicLink()||process.getuid&&q.uid!==process.getuid())throw new N("display_unavailable","Reason desktop state directory is not private.");V8(x,448)}function v8(x,q){let P=(b)=>{let X=Buffer.alloc(2);return X.writeUInt16BE(b.length),Buffer.concat([X,b])},p=Buffer.from([255,255]);return Buffer.concat([p,P(Buffer.alloc(0)),P(Buffer.from(x)),P(Buffer.from("MIT-MAGIC-COOKIE-1")),P(q)])}function B(x,q,P=2000){return new Promise((p)=>{let b=g8(x),X="",Q=(y)=>{b.destroy(),p(y)};b.setTimeout(P,()=>Q(!1)),b.once("error",()=>Q(!1)),b.once("close",()=>Q(!1)),b.once("connect",()=>{if(!q)Q(!0)}),b.on("data",(y)=>{if(X+=y.toString("latin1"),X.length>=4)Q(X.startsWith("RFB "))})})}async function a(x,q){let P=Date.now()+q;while(Date.now()<P){if(await x())return!0;await new Promise((p)=>setTimeout(p,100))}return!1}function M(x,q,P){return new Promise((p)=>{let b=T8(x,q,{detached:!0,stdio:"ignore",env:P});b.once("error",()=>p(-1)),b.once("exit",(X)=>p(X)),b.unref(),setTimeout(()=>p(null),_).unref()})}var V=null;function n8(x=g()){return V??=i8(x).finally(()=>{V=null}),V}async function i8(x){let q=w({home:x});if(!q?.xvfb||!q.x11vnc||!q.openbox)throw new N("display_unavailable","Run `reason desktop install` on this machine to enable its desktop.");q8({root:q.root,automation:q.automation,extensionDir:q.extensionDir});let P=J(q.root,"display");h(P);let p=await m8(x,P,q.x11vnc);if(p)return p;let b={display:D,xauthority:J(P,"Xauthority"),rfbSocket:J(P,"rfb.sock")},X=J(P,"pulse"),Q=(async()=>{try{h(X)}catch{return null}return await X8(X,q.pulseaudio)})();h(J(P,"home"));let y=A8(P,b,q.pulseaudio),W=async()=>({...b,sound:await Q});if(await B({path:b.rfbSocket},!0))return C8(J(P,"theme"),E,y),await W();if(!N8(b.xauthority))K(b.xauthority,v8(D.slice(1),u8(16)),{mode:384,flag:"wx"});let T=R8(J(P,"theme"),b.display,u),A={path:`/tmp/.X11-unix/X${D.slice(1)}`};if(!await B(A,!1)){let r=`${u.width}x${u.height}`;if(q.xvnc)r8(b.rfbSocket,{force:!0}),M(q.xvnc,[b.display,"-geometry",r,"-depth","24","-nolisten","tcp","-auth",b.xauthority,"-rfbport","-1","-rfbunixpath",b.rfbSocket,"-SecurityTypes","None","-UseBlacklist=0","-AlwaysShared","-desktop","Reason"],y);else M(q.xvfb,[b.display,"-screen","0",`${r}x24`,"-nolisten","tcp","-auth",b.xauthority],y);if(!await a(()=>B(A,!1),_)||q.xvnc&&!await a(()=>B({path:b.rfbSocket},!0),_))throw new N("display_unavailable","Reason could not start the virtual display.");M(q.openbox,["--config-file",T.openboxConfig],y)}if(await L8(T,y),!await U8(q.x11vnc,b,P,"x11vnc.log",y))throw new N("display_unavailable","Reason could not start the desktop server.");return await W()}function A8(x,q,P){let p={HOME:J(x,"home"),PATH:"/usr/local/bin:/usr/bin:/bin",DISPLAY:q.display,XAUTHORITY:q.xauthority};if(P)p.PULSE_SERVER=P8(p8(J(x,"pulse")));return p}async function U8(x,q,P,p,b){if(await B({path:q.rfbSocket},!0))return!0;r8(q.rfbSocket,{force:!0});let X=await M(x,["-display",q.display,"-auth",q.xauthority,"-rfbport","0","-rfbportv6","-1","-unixsock",q.rfbSocket,"-nopw","-forever","-shared","-noxdamage","-sb","0","-rfbversion","3.7","-quiet","-bg","-o",J(P,p)],b);if(X!==null&&X!==0)return!1;return await a(()=>B({path:q.rfbSocket},!0),_)}async function I8(){let x=["DISPLAY","XAUTHORITY","WAYLAND_DISPLAY","XDG_SESSION_TYPE"],q=(P)=>Object.fromEntries(x.flatMap((p)=>P[p]?[[p,P[p]]]:[]));if(process.env.DISPLAY)return q(process.env);try{let P=await new Promise((p,b)=>J8("systemctl",["--user","show-environment"],{encoding:"utf8",timeout:2000},(X,Q)=>X?b(X):p(Q)));return q(Object.fromEntries(P.split(`
|
|
124
|
-
`).flatMap((p)=>{let b=p.indexOf("=");return b>0?[[p.slice(0,b),p.slice(b+1)]]:[]})))}catch{return{}}}var m=new Set;async function m8(x,q,P){let p=await I8(),b=/^:(\d+)(?:\.\d+)?$/.exec(p.DISPLAY??"")?.[1];if(!b||`:${b}`===D||p.WAYLAND_DISPLAY||p.XDG_SESSION_TYPE==="wayland")return null;let X={display:`:${b}`,xauthority:p.XAUTHORITY??J(x,".Xauthority"),rfbSocket:J(q,`rfb-${b}.sock`)},Q=`${X.display} ${X.xauthority}`;if(m.has(Q)||!await B({path:`/tmp/.X11-unix/X${b}`},!1))return null;let y={HOME:x,PATH:"/usr/local/bin:/usr/bin:/bin",DISPLAY:X.display,XAUTHORITY:X.xauthority};if(await U8(P,X,q,`x11vnc-${b}.log`,y))return{...X,sound:null};return m.add(Q),process.stderr.write(`Reason worker: your screen ${X.display} could not be served; using the virtual desktop
|
|
125
|
-
`),null}function R8(x,q,P){let p=`chromium --no-first-run --no-default-browser-check${process.geteuid?.()===0?" --no-sandbox":""} %U`,b=[["terminal","xterm"],["files","pcmanfm"]].filter(([,Q])=>!N8(`/usr/bin/${Q}`)).map(([Q])=>Q),X=i({root:x,display:q,screen:P,browserExec:p,absent:b});for(let Q of["","openbox","tint2","picom"])h(J(x,Q));for(let[Q,y]of Object.entries(X.files))K(J(x,Q),y,{mode:384});for(let[Q,y]of Object.entries(n))K(J(x,`ara-${Q}`),a8(y),{mode:384});return{root:x,openboxConfig:J(x,"openbox","rc.xml"),start:X.start}}function L8(x,q){return C8(x.root,[...x.start,"openbox --reconfigure >/dev/null 2>&1 || true"],q)}function C8(x,q,P){let p=[`ROOT=${JSON.stringify(x)}`,...q].join(`
|
|
126
|
-
`);return new Promise((b)=>{let X=T8("/bin/sh",["-c",p],{stdio:"ignore",env:{...P,PATH:"/usr/bin:/bin"}}),Q=setTimeout(()=>{X.kill(),b()},_);X.once("error",()=>{clearTimeout(Q),b()}),X.once("exit",()=>{clearTimeout(Q),b()})})}var t8=2073600,e8=320;function d8(x,q){let P=Math.min(1,Math.sqrt(t8/(x.width*x.height))),p=(b,X)=>Math.min(Math.floor(X/8)*8,Math.max(e8,Math.round(b*P/8)*8));return{width:p(x.width,q.width),height:p(x.height,q.height)}}function B8(x,q,P){return new Promise((p)=>J8(x,q,{env:P,encoding:"utf8",timeout:5000},(b,X)=>p(b?null:X)))}function o8(x){let q=/current (\d+) x (\d+), maximum (\d+) x (\d+)/.exec(x),P=x.split(`
|
|
127
|
-
`),p=P.findIndex((X)=>/^\S+ connected/.test(X));if(!q||p<0)return null;let b=[];for(let X of P.slice(p+1)){let Q=/^\s+(\d+x\d+)\s/.exec(X);if(!Q)break;b.push(Q[1])}return{current:{width:Number(q[1]),height:Number(q[2])},maximum:{width:Number(q[3]),height:Number(q[4])},output:P[p].split(" ")[0],modes:b}}async function xx(x,q,P){if(x.display!==D)return null;let p={PATH:"/usr/bin:/bin",DISPLAY:x.display,XAUTHORITY:x.xauthority},b=(W)=>B8("xrandr",W,p),X=o8(await b(["--query"])??"");if(!X||X.maximum.width<=X.current.width&&X.maximum.height<=X.current.height)return null;let Q=d8(q,X.maximum);if(Q.width===X.current.width&&Q.height===X.current.height)return{size:Q,changed:!1};let y=`${Q.width}x${Q.height}`;if(!X.modes.includes(y)){if(await b(["--newmode",y,"60",...[Q.width,Q.width,Q.width,Q.width,Q.height,Q.height,Q.height,Q.height].map(String)]),await b(["--addmode",X.output,y])===null)return null}return P(),await b(["--output",X.output,"--mode",y])===null?null:{size:Q,changed:!0}}async function qx(x,q){let P=w({home:g()});if(!P)return;let p=J(P.root,"display"),b=A8(p,x,P.pulseaudio);await L8(R8(J(p,"theme"),x.display,q),b);let X=q.width-R*2,Q=q.height-R-f;await B8("xdotool",["search","--onlyvisible","--class","Chromium","windowsize","%@",String(X),String(Q),"windowmove","%@",String(R),String(R)],{...b,PATH:"/usr/bin:/bin"})}var t=Promise.resolve();function bx(x,q,P=()=>{}){let p=t.then(()=>xx(x,q,P));return t=p.then((b)=>b?.changed?qx(x,b.size):void 0).catch(()=>{}),p.then((b)=>b?.size??null,()=>null)}async function Kx(x,q={}){let P=q.now??Date.now,p=k8(x.payload,P());if(x.signal.throwIfAborted(),!p.video)throw new N("display_video_required","Reason desktops stream as video now; this request came without it.");let b=q.platform??process.platform;if(b!=="linux"&&b!=="darwin"&&b!=="win32")throw new N("display_video_unsupported","This machine does not serve desktop video.");let X=p.video,Q=(q.video?.desktop??(b==="darwin"?async()=>Q8:b==="win32"?async()=>y8:n8))();return await px(x.signal,p,q,P,(y)=>S8(y,{request:X,desktop:Q,...p.viewer?{viewer:p.viewer}:{},viewerSameNetwork:p.viewer_same_network===!0},{resizeDesktop:bx,...q.video}),(y)=>o({type:"error",code:y}))}function px(x,q,P,p,b,X){let Q=p();return new Promise((y,W)=>{let T=null,A=!1,r=!1,Y,F,j,G=!1,U=null,L=(S)=>{if(r)return;if(U)S=U.outcome;r=!0,clearTimeout(Y),clearTimeout(F),x.removeEventListener("abort",Z),j?.close();try{T?.close(1000,"display_session_over")}catch{}if("error"in S){W(S.error);return}y({reason:S.reason,...j?.summary(),duration_ms:Math.max(0,p()-Q)})},c=()=>L({error:new N("display_relay_unavailable","Reason could not reach the desktop relay.")}),Z=()=>{let S=x.reason;L({error:S instanceof N?S:new N("cancelled","Reason closed the desktop session.")})},z=()=>{if(!U||!T)return;let{outcome:S}=U,C=!("error"in S)?S.reason:S.error instanceof N?S.error.code:"display_unavailable";if(!U.told)try{T.send(X(C))}catch{}L(S)};if(j=b({get done(){return r||U!==null},get open(){return A&&!r&&U===null},get bufferedAmount(){return T?.bufferedAmount??0},send(S){if(r||U||!A||!T)return;try{T.send(S)}catch{L({reason:"relay_closed"})}},end:(S)=>{if(r||U)return;if(!("error"in S)&&G&&A){L(S);return}if(U={outcome:S,told:!("error"in S)&&A},G&&A)z()}}),r){j.close();return}if(x.aborted){Z();return}x.addEventListener("abort",Z,{once:!0}),Y=setTimeout(()=>L({reason:"session_expired"}),Math.max(1,Date.parse(q.expires_at)-p())),F=setTimeout(()=>L({reason:"viewer_absent"}),P.viewerWaitMs??z8);try{T=(P.connect??b8)(q.relay_url,(P.loadProxy??x8)()?.url)}catch{c();return}T.binaryType="arraybuffer",T.onopen=()=>{if(r||!T)return;A=!0,j?.opened()},T.onmessage=(S)=>{if(r)return;let C=S.data,O=C instanceof ArrayBuffer?new Uint8Array(C):ArrayBuffer.isView(C)?new Uint8Array(C.buffer,C.byteOffset,C.byteLength):null;if(!O||O.byteLength===0)return;if(clearTimeout(F),G=!0,U){z();return}j?.received(O)},T.onclose=()=>{if(r)return;if(!A){c();return}L({reason:"relay_closed"})},T.onerror=()=>{if(r||A)return;c()}})}
|
|
128
|
-
export{Y8 as Kg,D as Lg,k8 as Mg,I as Ng,sx as Og,h as Pg,n8 as Qg,bx as Rg,Kx as Sg};
|