@desklink/host 0.2.0 → 0.3.1

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 (82) hide show
  1. package/NOTICE +26 -0
  2. package/README.md +134 -56
  3. package/bin/desklink-host.mjs +13 -5
  4. package/dist/bridge.d.ts +1 -0
  5. package/dist/bridge.d.ts.map +1 -1
  6. package/dist/bridge.js +12 -4
  7. package/dist/bridge.js.map +1 -1
  8. package/dist/engineProcess.d.ts +6 -1
  9. package/dist/engineProcess.d.ts.map +1 -1
  10. package/dist/engineProcess.js +35 -4
  11. package/dist/engineProcess.js.map +1 -1
  12. package/dist/protocol.d.ts +58 -0
  13. package/dist/protocol.d.ts.map +1 -1
  14. package/dist/protocol.js.map +1 -1
  15. package/dist/resolveEngine.d.ts +7 -1
  16. package/dist/resolveEngine.d.ts.map +1 -1
  17. package/dist/resolveEngine.js +66 -14
  18. package/dist/resolveEngine.js.map +1 -1
  19. package/docs/BOUNDARY.md +15 -7
  20. package/docs/PROTOCOL.md +267 -27
  21. package/engine/Cargo.lock +47 -2
  22. package/engine/Cargo.toml +18 -13
  23. package/engine/build.rs +86 -4
  24. package/engine/native/agent_overlay_mac.m +51 -4
  25. package/engine/native/agent_overlay_wayland.c +145 -12
  26. package/engine/native/agent_overlay_x11.c +72 -0
  27. package/engine/native/nvenc_shim.c +453 -0
  28. package/engine/native/vaapi_shim.c +727 -0
  29. package/engine/native/vpx_shim.c +54 -4
  30. package/engine/native/vt_shim.c +448 -0
  31. package/engine/src/capture.rs +167 -58
  32. package/engine/src/capture_mac.rs +24 -14
  33. package/engine/src/capture_win.rs +23 -0
  34. package/engine/src/clipboard_win.rs +8 -0
  35. package/engine/src/convert.rs +286 -61
  36. package/engine/src/cursor.rs +118 -0
  37. package/engine/src/encoder.rs +122 -13
  38. package/engine/src/h264.rs +188 -0
  39. package/engine/src/h264_nvenc.rs +308 -0
  40. package/engine/src/h264_openh264.rs +735 -0
  41. package/engine/src/h264_vaapi.rs +263 -0
  42. package/engine/src/h264_vt.rs +368 -0
  43. package/engine/src/indicator.rs +104 -3
  44. package/engine/src/input_win.rs +91 -0
  45. package/engine/src/keymap_win.rs +39 -0
  46. package/engine/src/mac.rs +34 -9
  47. package/engine/src/main.rs +186 -26
  48. package/engine/src/peer.rs +466 -28
  49. package/engine/src/portal.rs +42 -4
  50. package/engine/src/portal_win.rs +37 -0
  51. package/engine/src/protocol.rs +64 -2
  52. package/engine/src/session.rs +1252 -105
  53. package/engine/src/win.rs +110 -0
  54. package/engine/src/x11.rs +225 -9
  55. package/engine/src/x11_mac.rs +12 -0
  56. package/engine/vendor/libva/COPYING +19 -0
  57. package/engine/vendor/libva/va/va.h +5450 -0
  58. package/engine/vendor/libva/va/va_dec_av1.h +695 -0
  59. package/engine/vendor/libva/va/va_dec_hevc.h +616 -0
  60. package/engine/vendor/libva/va/va_dec_jpeg.h +157 -0
  61. package/engine/vendor/libva/va/va_dec_vp8.h +249 -0
  62. package/engine/vendor/libva/va/va_dec_vp9.h +312 -0
  63. package/engine/vendor/libva/va/va_dec_vvc.h +688 -0
  64. package/engine/vendor/libva/va/va_drm.h +61 -0
  65. package/engine/vendor/libva/va/va_enc_av1.h +1010 -0
  66. package/engine/vendor/libva/va/va_enc_h264.h +659 -0
  67. package/engine/vendor/libva/va/va_enc_hevc.h +958 -0
  68. package/engine/vendor/libva/va/va_enc_jpeg.h +162 -0
  69. package/engine/vendor/libva/va/va_enc_mpeg2.h +308 -0
  70. package/engine/vendor/libva/va/va_enc_vp8.h +350 -0
  71. package/engine/vendor/libva/va/va_enc_vp9.h +639 -0
  72. package/engine/vendor/libva/va/va_fei.h +170 -0
  73. package/engine/vendor/libva/va/va_fei_h264.h +505 -0
  74. package/engine/vendor/libva/va/va_fei_hevc.h +254 -0
  75. package/engine/vendor/libva/va/va_prot.h +525 -0
  76. package/engine/vendor/libva/va/va_version.h +87 -0
  77. package/engine/vendor/libva/va/va_vpp.h +1590 -0
  78. package/engine/vendor/nv-codec-headers/LICENSE +24 -0
  79. package/engine/vendor/nv-codec-headers/README +7 -0
  80. package/engine/vendor/nv-codec-headers/include/ffnvcodec/nvEncodeAPI.h +3825 -0
  81. package/examples/reference-client.html +1 -1
  82. package/package.json +4 -3
package/NOTICE CHANGED
@@ -9,6 +9,9 @@ licences.
9
9
  VP9 encoding. A source build links the host system's libvpx; the prebuilt
10
10
  engine (@desklink/host-linux-x64-gnu) links libvpx v1.16.0 statically and
11
11
  carries its licence and patent grant in THIRD_PARTY_LICENSES.txt.
12
+ Windows source builds use libvpx 1.16.0 statically with MSVC /MT. The
13
+ Windows build script retains its BSD licence, WebM patent grant and the
14
+ x86inc assembly macros' ISC notice in THIRD_PARTY_LICENSES.txt.
12
15
  https://chromium.googlesource.com/webm/libvpx/+/refs/heads/main/LICENSE
13
16
 
14
17
  inputtino MIT
@@ -17,6 +20,29 @@ licences.
17
20
  f4ce2b0df536ef309e9ff318f75b460f7097d7c1; its LICENSE file is retained
18
21
  alongside its source.
19
22
 
23
+ NVENC API header MIT (Copyright NVIDIA Corporation)
24
+ nvEncodeAPI.h from nv-codec-headers n10.0.26.2 (commit
25
+ 43adb856807855d7742da53181b181e4ef25344a), vendored unmodified under
26
+ engine/vendor/nv-codec-headers with its licence. Declarations only; the
27
+ NVIDIA driver's NVENC and CUDA libraries are loaded at run time when
28
+ present and are neither linked nor shipped.
29
+
30
+ libva public headers MIT (Copyright Intel Corporation)
31
+ From libva 2.24.0, vendored under engine/vendor/libva with its COPYING.
32
+ Declarations only; the system libva and its driver are loaded at run time
33
+ when present and are neither linked nor shipped.
34
+
35
+ VideoToolbox Apple system framework (macOS)
36
+ H.264 encoding on macOS, linked as an operating-system framework.
37
+
38
+ openh264 BSD-2-Clause (NOT built, NOT shipped)
39
+ OpenH264 Video Codec provided by Cisco Systems, Inc. On a Linux machine
40
+ without a hardware H.264 encoder the engine downloads Cisco's own prebuilt
41
+ library from Cisco at run time, checks it against Cisco's published
42
+ SHA-256, and loads it; Cisco's patent licence covers only that binary.
43
+ No openh264 source is built or distributed by this package. The
44
+ openh264-sys2 crate (BSD-2-Clause) supplies the loader.
45
+
20
46
  libevdev MIT (with a Linux-header GPL notice retained
21
47
  upstream; no GPL code is linked from it)
22
48
  Used by inputtino to open and manage uinput devices.
package/README.md CHANGED
@@ -1,8 +1,16 @@
1
- # @desklink/host
1
+ <h1 align="center">@desklink/host</h1>
2
2
 
3
- A per-user, on-demand desktop engine: capture the user's own screen, encode it,
4
- carry it over WebRTC, and apply that session's pointer, keyboard and clipboard
5
- actions back to the same desktop.
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/@desklink/host"><img alt="npm" src="https://img.shields.io/npm/v/@desklink/host?style=flat&label=npm" /></a>
5
+ <a href="https://github.com/umeranjum17/desklink/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/umeranjum17/desklink/ci.yml?style=flat&branch=main" /></a>
6
+ <a href="LICENSE"><img alt="Apache 2.0" src="https://img.shields.io/badge/license-Apache--2.0-666?style=flat" /></a>
7
+ <img alt="Linux and macOS (preview)" src="https://img.shields.io/badge/Linux%20%7C%20macOS%20%28preview%29-111?style=flat" />
8
+ </p>
9
+
10
+ <p align="center">
11
+ <strong>The desktop engine behind desklink, as a process you start and stop.</strong><br/>
12
+ A per-user, on-demand desktop engine: capture the user's own screen, encode it, carry it over WebRTC, and apply that session's pointer, keyboard and clipboard actions back to the same desktop.
13
+ </p>
6
14
 
7
15
  It is a **process with a documented local protocol**, not a service. A consumer
8
16
  starts it, owns its stdin/stdout, carries the SDP/ICE over its own authenticated
@@ -11,8 +19,7 @@ particular application.
11
19
 
12
20
  ## What it does
13
21
 
14
- The engine supports Linux and macOS desktop sessions; macOS currently requires
15
- a source build with a static VP9 library.
22
+ The engine supports Linux desktop sessions, and macOS (preview) desktop sessions.
16
23
 
17
24
  - **Capture** through the XDG Desktop Portal (`ScreenCast`) and PipeWire, with
18
25
  compositor consent, from an explicitly selected X display's root window, or
@@ -23,8 +30,21 @@ a source build with a static VP9 library.
23
30
  in, one packet out. Software by default, because a hardware encoder would put a
24
31
  vendor driver dependency on every machine class. Tuned for a desktop: the
25
32
  desktop's own pixels up to 4K (a phone zooms in, and text has to survive it),
26
- screen-content mode, key frames only on request, and a refinement pass that
27
- re-codes a still desktop once at a fine quantizer so it reads sharp.
33
+ screen-content mode, key frames on request and when the coded size changes,
34
+ and a refinement pass that
35
+ re-codes a still desktop once at a fine quantizer so it reads sharp. Motion
36
+ the CPU cannot code at the frame rate is coded at half size until it stops
37
+ or shrinks enough to keep up; the refinement pass is always full size.
38
+ - **Encode H.264 as well**, for a receiver that asks for it. The engine offers
39
+ VP9 first and H.264 beside it, and codes whichever the receiver's answer puts
40
+ first, so VP9 stays the default; the iOS receiver asks for H.264 because iOS
41
+ decodes it in hardware and VP9 in software. H.264 comes from the platform's
42
+ encoder, loaded at runtime — VideoToolbox on macOS, NVENC or VA-API on Linux —
43
+ and otherwise from Cisco's prebuilt openh264, which the engine downloads from
44
+ Cisco on first need and checks against Cisco's published hash. openh264 is
45
+ never built from source or shipped in this package (OpenH264 Video Codec
46
+ provided by Cisco Systems, Inc.). See `docs/PROTOCOL.md` (*Capabilities*,
47
+ *Codecs*).
28
48
  - **Transport** with WebRTC — ICE, DTLS, SRTP, RTP — and one data channel for the
29
49
  session's pointer/keyboard/clipboard.
30
50
  - **Carry** video the consumer encoded itself, on an `encoded` source: Annex-B
@@ -51,6 +71,11 @@ a source build with a static VP9 library.
51
71
 
52
72
  ## Install and run
53
73
 
74
+ The npm badge tracks the registry version. npm installs the matching optional
75
+ engine package: `@desklink/host-linux-x64-gnu` or `@desklink/host-darwin-arm64`.
76
+ Supported platforms: Linux x64 with glibc 2.36 or newer and macOS arm64 (preview).
77
+ See the [changelog](../../CHANGELOG.md) for release changes.
78
+
54
79
  ```sh
55
80
  npm install @desklink/host
56
81
  npx desklink-host path # the engine this install will run
@@ -63,21 +88,52 @@ platform package `@desklink/host-linux-x64-gnu`, which carries the prebuilt
63
88
  engine, and `resolveEngine()` finds it there. No Rust toolchain, compiler or
64
89
  install script is involved, so `--ignore-scripts` installs work. The engine
65
90
  requires the system's `libpipewire-0.3.so.0`, `libxkbcommon.so.0`,
66
- `libevdev.so.2`, `libstdc++.so.6`, `libXcursor.so.1`, `libX11.so.6`, and
67
- `libwayland-client.so.0` (normally supplied by a modern Linux desktop). If one is missing, the host reports `missing system library: <name>`
91
+ `libevdev.so.2`, `libstdc++.so.6`, `libXcursor.so.1`, `libX11.so.6`,
92
+ `libXext.so.6`, `libwayland-client.so.0`, `libfontconfig.so.1`, and `libfreetype.so.6`
93
+ (normally supplied by a modern Linux desktop). If one is missing, the host reports `missing system library: <name>`
68
94
  with code `missing-system-library` rather than failing silently; it does not
69
95
  bundle these system libraries. libvpx and inputtino are linked into the engine.
96
+ Wayland point labels use Fontconfig (MIT) and FreeType (FTL) from the system;
97
+ this software is based in part on the work of the FreeType Team.
70
98
 
71
99
  The one step no install does for you is [kernel input access](#kernel-input-access),
72
100
  and only the portal backend needs it.
73
101
 
74
- There is no prebuilt engine for any other platform. Another Linux (arm64, musl)
75
- can [build it from source](#building-from-source). Windows remains unsupported.
76
-
77
- ### macOS
102
+ macOS arm64 (preview) also has a prebuilt engine. There is no prebuilt engine for other platforms. Another Linux (arm64, musl)
103
+ can [build it from source](#building-from-source). Windows has a source-built transport preview for
104
+ `x86_64-pc-windows-msvc`: static libvpx enables `serve` and consumer-fed H.264
105
+ encoded sources. Native capture, input, clipboard and the agent indicator are
106
+ unavailable. Native Windows desktop capture sessions are not supported yet. Node resolution
107
+ is an opt-in preview for Windows 11 22H2+ x64: set `DESKLINK_WINDOWS=1` and
108
+ point `DESKLINK_ENGINE` at a built `desklink-host.exe`. Windows platform packages
109
+ are not published yet. Without static libvpx, the executable's `capabilities`
110
+ command remains available, but CLI `capabilities` and `bridge` require `serve`.
111
+ The Windows bridge defaults to `--source display` and handles Ctrl+Break;
112
+ consumer-fed video requires `--source encoded`.
113
+ A startup exit `0xC0000135` is reported as `missing-system-library` (a required
114
+ DLL could not load); spawn failures are reported as `engine-spawn-failed` with
115
+ the underlying error. Elevated windows and the secure desktop remain outside
116
+ Windows control support.
117
+
118
+ On Windows with Visual Studio Build Tools and PowerShell 7, build libvpx with
119
+ `release/build-libvpx-win.ps1 -OutDir <new-build-directory>`, set
120
+ `DESKLINK_VPX_STATIC_DIR` to its `prefix` directory and
121
+ `RUSTFLAGS=-Ctarget-feature=+crt-static`, then run `cargo build --locked --target
122
+ x86_64-pc-windows-msvc --manifest-path engine/Cargo.toml`. The build retains
123
+ libvpx's licence and patent grant in `prefix/THIRD_PARTY_LICENSES.txt`.
124
+ Without that prefix the compile seam still builds and refuses `serve`.
125
+ Hosted Windows CI resolves the opt-in engine through the published Node API
126
+ and completes a `serve` hello/capabilities handshake with clean shutdown; it
127
+ also checks indicator refusal, Chrome decode and input relay, and DLL
128
+ dependencies. Dedicated Windows rig qualification of
129
+ capture, input, mixed DPI, GPU encoding and elevation is pending; signing and
130
+ packaging are later lanes.
131
+
132
+ ### macOS (preview)
78
133
 
79
134
  The macOS engine shares protocol v3's WebRTC session path: selected-display
80
- ScreenCaptureKit capture, VP9 encoding, Quartz pointer/keyboard events, and
135
+ ScreenCaptureKit capture, VP9 encoding (H.264 through VideoToolbox for a receiver
136
+ that asks), Quartz pointer/keyboard events, and
81
137
  plain-text NSPasteboard operations. `capabilities` is non-prompting; `session.open`
82
138
  requests Screen Recording and, for control, Accessibility consent when needed.
83
139
  For persistent grants, install the signed `DesklinkHost.app` at one fixed path.
@@ -105,14 +161,16 @@ current input layout is diagnostic); free-form text uses Unicode key events.
105
161
 
106
162
  The published engine is an **unsigned macOS arm64 CLI** in the optional
107
163
  `@desklink/host-darwin-arm64` platform package; no Developer ID identity or
108
- notarization is required. The macOS engine remains opt-in (`DESKLINK_MACOS=1`).
109
- To build and pack it, build on an Apple Silicon Mac with Rust 1.97+ and static
110
- Homebrew libvpx, then run `release/build-engine-macos-arm64.sh` and
111
- `node release/pack.mjs --engine dist-desklink/engine-darwin-arm64 --platform darwin-arm64`.
164
+ notarization is required. The macOS (preview) engine is enabled by default; `DESKLINK_MACOS=0` explicitly disables it.
165
+ To build and pack it, build on an Apple Silicon Mac with Rust 1.97.1+ and static
166
+ Homebrew libvpx, then follow
167
+ [Building and packing a release](#building-and-packing-a-release).
168
+ For a source build, `DESKLINK_VPX_STATIC_DIR` is the libvpx install prefix
169
+ (containing `include/` and `lib/libvpx.a`), not its `lib/` directory.
112
170
  The app-bundled signed harness is for local TCC qualification, not npm
113
171
  installation. See the [macOS protocol](docs/PROTOCOL.md#macos).
114
172
 
115
- Point `MUXR_DESKLINK_ENGINE` at a binary built elsewhere if you have one. The
173
+ Point `DESKLINK_ENGINE` at a binary built elsewhere if you have one. (`MUXR_DESKLINK_ENGINE` still works as a deprecated fallback and will be removed in a later release.) The
116
174
  package never searches `PATH` for a same-named program: "a binary called
117
175
  desklink-host" is not evidence of which program is about to be given control of
118
176
  someone's desktop.
@@ -126,8 +184,7 @@ cargo build --release --manifest-path engine/Cargo.toml
126
184
  ./bin/desklink-host.mjs capabilities
127
185
  ```
128
186
 
129
- On macOS, prefix the launcher commands with `DESKLINK_MACOS=1` to resolve the
130
- local candidate. The app-bundled dev harness is not the npm package; a source
187
+ On macOS, the launcher resolves the local candidate by default. The app-bundled dev harness is not the npm package; a source
131
188
  build is an unsigned CLI and its TCC permissions are attributed to the
132
189
  responsible launching app.
133
190
 
@@ -144,10 +201,13 @@ install:
144
201
  | libvpx (`vpx.pc`) | `libvpx-dev` | `libvpx-devel` | `libvpx` |
145
202
  | PipeWire 0.3.65+ (`libpipewire-0.3`) | `libpipewire-0.3-dev` | `pipewire-devel` | `pipewire` |
146
203
  | xkbcommon | `libxkbcommon-dev` | `libxkbcommon-devel` | `libxkbcommon` |
204
+ | FreeType (FTL; dynamically linked) | `libfreetype6-dev` | `freetype-devel` | `freetype2` |
205
+ | Fontconfig (MIT; dynamically linked) | `libfontconfig1-dev` | `fontconfig-devel` | `fontconfig` |
147
206
  | Wayland (`wayland-client`) | `libwayland-dev` | `wayland-devel` | `wayland` |
148
207
  | libevdev | `libevdev-dev` | `libevdev-devel` | `libevdev` |
149
208
  | libxcb (source/container builds only) | `libxcb1-dev` | `libxcb-devel` | `libxcb` |
150
209
  | Xcursor | `libxcursor-dev` | `libXcursor-devel` | `libxcursor` |
210
+ | Xext | `libxext-dev` | `libXext-devel` | `libxext` |
151
211
 
152
212
  These are build prerequisites, not additional runtime requirements for the
153
213
  prebuilt package; in particular, libxcb is not a prebuilt runtime requirement.
@@ -189,8 +249,8 @@ linked crate's, in its package's `THIRD_PARTY_LICENSES.txt`, with the Rust
189
249
  standard library's own notices in `COPYRIGHT-rust-library.html`. Its build
190
250
  refuses any crate whose licence is not permissive.
191
251
 
192
- No GPL/AGPL remote-desktop code is copied, linked or derived; Sunshine,
193
- Moonlight, Apollo and RustDesk were read as architecture references only.
252
+ No GPL/AGPL remote-desktop code is copied, linked or derived; other
253
+ remote-desktop projects were read as architecture references only.
194
254
 
195
255
  ## Connecting an application to it
196
256
 
@@ -213,9 +273,21 @@ await client.acceptAnswer(session.sessionId, session.generation, answerSdp);
213
273
  await client.addCandidate(session.sessionId, session.generation, candidate, sdpMid, sdpMLineIndex);
214
274
  ```
215
275
 
276
+ For cursor-free recordings, open with `cursor: 'hidden'` and inspect
277
+ `session.cursor`: Linux portals require Metadata for hidden capture;
278
+ `positions` is true for accepted hidden sessions. Subscribe to
279
+ `session.cursor` events for source-coordinate `x`, `y`, `visible`, and monotonic
280
+ `timestamp_us` (the same clock as local frame metadata). Hidden-only portals
281
+ return `cursor_positions_unavailable`. X11 reports positions even on still
282
+ frames and already captures root pixels without a cursor. macOS, Windows, and consumer-encoded
283
+ sources return `cursor-unavailable` for hidden requests. Omitting the option
284
+ preserves existing behavior. See [the cursor protocol](docs/PROTOCOL.md#cursor-free-capture).
285
+
216
286
  `myChannel` is the application's own authenticated connection, whatever that is.
217
287
  There is no second identity system, no pairing ceremony and no account: the
218
288
  engine trusts the consumer's decision and enforces the scope it was given.
289
+ For the application's pairing, identity and signaling transport, see the
290
+ [BYOKit integration guidance](../../README.md#why-desklink-exists).
219
291
 
220
292
  ### If you have no channel of your own
221
293
 
@@ -244,19 +316,13 @@ authorisation for that socket, so treat it as a credential.
244
316
 
245
317
  The engine is a native executable, so the package ships a small JavaScript
246
318
  launcher and depends on one platform package per supported target, which npm
247
- installs only where its `os`, `cpu` and `libc` match:
248
-
249
- ```text
250
- @desklink/host
251
- optionalDependencies:
252
- @desklink/host-linux-x64-gnu # the executable, THIRD_PARTY_LICENSES.txt, provenance.json
253
- ```
319
+ installs only where its `os`, `cpu` and, where specified, `libc` match.
254
320
 
255
- The optional dependency is written into the published manifest by
256
- `release/pack.mjs`, pinned to the same version, and is deliberately absent from
257
- the source `package.json`: an optional dependency the registry does not have
258
- yet makes a workspace's `yarn install --frozen-lockfile` fail outright rather
259
- than skip it.
321
+ The platform inventory is defined in `release/pack.mjs`. It writes both optional
322
+ dependencies into the published manifest, pinned to the host version. The pins
323
+ are deliberately absent from the source `package.json`: before publication,
324
+ the registry cannot supply the entries needed for a complete frozen workspace
325
+ install.
260
326
 
261
327
  `resolveEngine` looks for the platform package first and falls back to a source
262
328
  build, and it never searches `PATH`: a program that happens to be called
@@ -264,23 +330,28 @@ build, and it never searches `PATH`: a program that happens to be called
264
330
  a desktop.
265
331
 
266
332
  The platform packages must be usable **without lifecycle scripts**, because
267
- muxr's documented install uses `npm install --global --ignore-scripts`. Nothing
333
+ a global install with `npm install --global --ignore-scripts` must work. Nothing
268
334
  here downloads or chmods anything at install time; the executable arrives with
269
335
  the executable bit already set in the tarball.
270
336
 
271
337
  `platformTag()` includes the libc (`-gnu` or `-musl`) because a glibc binary on a
272
338
  musl system fails in ways that read as "broken install" rather than "unsupported
273
- platform". Only variants that have passed their own qualification are published:
274
- `linux-x64-gnu` now, `linux-arm64-gnu` when a real machine has run a real
275
- journey on it. macOS and Windows are separate backends, not separate builds.
339
+ platform". Linux variants are published only after their own qualification; macOS arm64
340
+ is published as a default-enabled preview, not as qualified desktop support.
341
+ See [Install and run](#install-and-run) for current support. Another variant,
342
+ such as Linux arm64, needs a real machine to run a real journey first. macOS
343
+ and Windows are separate backends, not separate builds.
276
344
 
277
345
  ### Building and packing a release
278
346
 
279
- Needs Docker and Node, nothing else: no Rust toolchain or system libraries.
347
+ The Linux engine build needs Docker and Node, with no local Rust toolchain or
348
+ system libraries. The macOS engine build needs the Apple Silicon prerequisites
349
+ in [macOS (preview)](#macos-preview). Run the following from the repository root after installing
350
+ workspace dependencies:
280
351
 
281
352
  ```sh
282
353
  packages/desktop-host/release/build-engine.sh # -> dist-desklink/engine-linux-x64-gnu/
283
- npx tsc --build packages/desktop-host
354
+ npm run build
284
355
  node packages/desktop-host/release/pack.mjs --engine dist-desklink/engine-linux-x64-gnu
285
356
  packages/desktop-host/release/check-install.sh # fresh install in a clean container
286
357
  ```
@@ -295,24 +366,31 @@ glibc newer than 2.36, or if any crate's licence is not permissive
295
366
  `provenance.json` records the source commit, the pinned inputs and the
296
367
  executable's SHA-256.
297
368
 
298
- The scripts use only the repository's `dist-desklink/` paths shown above; none
299
- accepts an alternate output or tarball directory. `pack.mjs` requires the
300
- verified engine output and replaces older desklink tarballs with the current
301
- `desklink-host-<version>.tgz` and `desklink-host-linux-x64-gnu-<version>.tgz`.
302
- It cannot pack a host-only release and publishes nothing.
369
+ `npm run build` compiles both the host and AXI CLI; packing rejects missing
370
+ compiled output before producing tarballs. Run `pack.mjs` once for each platform,
371
+ building and packing the Mac output from the repository root on Apple Silicon:
372
+
373
+ ```sh
374
+ packages/desktop-host/release/build-engine-macos-arm64.sh
375
+ npm run build
376
+ node packages/desktop-host/release/pack.mjs --engine dist-desklink/engine-darwin-arm64 --platform darwin-arm64
377
+ packages/desktop-host/release/check-install.sh
378
+ ```
379
+
380
+ The Mac release build copies libvpx headers and its archive into an
381
+ archive-only prefix and rejects an executable that still links a libvpx dylib.
382
+
383
+ Each call keeps the other platform tarball and also packs the host,
384
+ React Native receiver and AXI CLI. All package versions must match before
385
+ publication. Packing publishes nothing.
303
386
  The package smoke instead uses `npm pack` on this checkout's host package as a
304
387
  registry stand-in, without Docker or a native build. `check-install.sh` installs
305
- only the current version's two tarballs into an empty project in a container
306
- with no Rust toolchain, no display and no `/dev/uinput`, and checks both
307
- installed versions. It checks the typed
308
- missing-library error before installing the system runtime libraries, then has
309
- the host package resolve the prebuilt engine, start it and answer the protocol
310
- handshake and a capabilities probe.
388
+ the current platform's host and engine tarballs into an empty project and checks both installed versions. On Linux it uses a clean container with no Rust toolchain, display or `/dev/uinput`, and checks the typed missing-library error before installing runtime libraries. On macOS it uses a temporary project. Both checks resolve the prebuilt engine, perform the protocol handshake and probe capabilities without opening a capture session.
311
389
 
312
390
  Publishing is by hand, from an `npm login` with publish rights on the scope.
313
- `release/publish.mjs` publishes the platform package first and waits until the
314
- registry serves it before publishing `@desklink/host`, so the host never points
315
- at an engine npm does not have. A version already on npm with the same bytes is
391
+ `release/publish.mjs` verifies the complete tarball set, publishes both platform packages first and waits until the
392
+ registry serves each before publishing `@desklink/host`, so the host never points
393
+ at an engine npm does not have. It then publishes the React Native receiver and AXI CLI. A version already on npm with the same bytes is
316
394
  skipped; with different bytes it is refused. `--dry-run` does everything but the
317
395
  upload:
318
396
 
@@ -10,7 +10,7 @@
10
10
  import { spawn } from 'node:child_process';
11
11
  import { randomBytes } from 'node:crypto';
12
12
  import { Bridge } from '../dist/bridge.js';
13
- import { EngineClient } from '../dist/engineProcess.js';
13
+ import { EngineClient, windowsEngineStartupError } from '../dist/engineProcess.js';
14
14
  import { explainMissingEngine, resolveEngine } from '../dist/resolveEngine.js';
15
15
 
16
16
  const [command, ...rest] = process.argv.slice(2);
@@ -27,7 +27,7 @@ USAGE:
27
27
  print the URL to open; no signaling of your own needed
28
28
  desklink-host <engine command> ... run the engine directly (serve, keep, capture-probe, setup-input, version)
29
29
 
30
- Set MUXR_DESKLINK_ENGINE to use an engine built somewhere else.`);
30
+ Set DESKLINK_ENGINE to use an engine built somewhere else (MUXR_DESKLINK_ENGINE still works as a deprecated fallback).`);
31
31
  return 0;
32
32
  }
33
33
  if (command === 'path') {
@@ -52,7 +52,7 @@ Set MUXR_DESKLINK_ENGINE to use an engine built somewhere else.`);
52
52
  const listen = flag('listen', '127.0.0.1:19400');
53
53
  const token = flag('token', randomBytes(24).toString('base64url'));
54
54
  if (typeof token !== 'string' || token.trim() === '') throw new Error('the bridge token must not be blank');
55
- const sourceKind = flag('source', process.env.MUXR_DESKTOP_SOURCE ?? 'portal');
55
+ const sourceKind = flag('source', process.env.MUXR_DESKTOP_SOURCE ?? (process.platform === 'win32' ? 'display' : 'portal'));
56
56
  const display = flag('display', process.env.MUXR_DESKTOP_X11_DISPLAY);
57
57
  const displayId = flag('display-id', process.env.MUXR_DESKTOP_DISPLAY_ID);
58
58
  if (!['portal', 'x11', 'display'].includes(sourceKind)) {
@@ -90,6 +90,7 @@ Set MUXR_DESKLINK_ENGINE to use an engine built somewhere else.`);
90
90
  const stop = async () => { await bridge.close(); process.exit(0); };
91
91
  process.on('SIGINT', () => void stop());
92
92
  process.on('SIGTERM', () => void stop());
93
+ if (process.platform === 'win32') process.on('SIGBREAK', () => void stop());
93
94
  return await new Promise(() => undefined);
94
95
  }
95
96
  if (command === 'capabilities') {
@@ -111,8 +112,15 @@ Set MUXR_DESKLINK_ENGINE to use an engine built somewhere else.`);
111
112
  console.error(explainMissingEngine());
112
113
  return 1;
113
114
  }
114
- const child = spawn(resolved.command, [command, ...rest], { stdio: 'inherit' });
115
- return await new Promise((resolve) => child.on('exit', (code) => resolve(code ?? 0)));
115
+ const child = spawn(resolved.command, [command, ...rest], { stdio: 'inherit', windowsHide: true });
116
+ return await new Promise((resolve, reject) => {
117
+ child.on('error', (error) => reject(windowsEngineStartupError(null, error) ?? error));
118
+ child.on('exit', (code) => {
119
+ const startupError = windowsEngineStartupError(code);
120
+ if (startupError !== null) reject(startupError);
121
+ else resolve(code ?? 0);
122
+ });
123
+ });
116
124
  }
117
125
 
118
126
  main().then(
package/dist/bridge.d.ts CHANGED
@@ -42,6 +42,7 @@ export declare class Bridge {
42
42
  private readonly sockets;
43
43
  private readonly engine;
44
44
  private readonly defaultSource;
45
+ private readonly localFrames;
45
46
  private closing;
46
47
  /** The session the engine holds, so a consumer that vanishes can release it. */
47
48
  private session;
@@ -1 +1 @@
1
- {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC1B,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,sFAAsF;IACtF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,yDAAyD;AACzD,eAAO,MAAM,WAAW,aAAa,CAAC;AAYtC,qBAAa,MAAM;IAMX,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IARlC,OAAO,CAAC,OAAO,CAAS;IACxB,gFAAgF;IAChF,OAAO,CAAC,OAAO,CAAyD;IAExE,OAAO;WAOM,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAqD3D,6EAA6E;IAC7E,IAAI,IAAI,IAAI,MAAM,CAGjB;IAED,OAAO,CAAC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;CAQ/B"}
package/dist/bridge.js CHANGED
@@ -33,14 +33,16 @@ export class Bridge {
33
33
  sockets;
34
34
  engine;
35
35
  defaultSource;
36
+ localFrames;
36
37
  closing = false;
37
38
  /** The session the engine holds, so a consumer that vanishes can release it. */
38
39
  session;
39
- constructor(server, sockets, engine, defaultSource) {
40
+ constructor(server, sockets, engine, defaultSource, localFrames) {
40
41
  this.server = server;
41
42
  this.sockets = sockets;
42
43
  this.engine = engine;
43
44
  this.defaultSource = defaultSource;
45
+ this.localFrames = localFrames;
44
46
  }
45
47
  static async start(options) {
46
48
  if (options.token.trim() === '')
@@ -85,7 +87,7 @@ export class Bridge {
85
87
  }
86
88
  },
87
89
  });
88
- const bridge = new Bridge(server, sockets, engine, options.source);
90
+ const bridge = new Bridge(server, sockets, engine, options.source, options.engineOptions?.onEvent !== undefined);
89
91
  sockets.on('connection', (socket) => bridge.attach(socket));
90
92
  const address = splitAddress(options.listen);
91
93
  await new Promise((resolve, reject) => {
@@ -124,8 +126,14 @@ export class Bridge {
124
126
  socket.send(JSON.stringify({ id: request.id, error: { code: 'source', message: 'the client cannot choose the desktop source' } }));
125
127
  return;
126
128
  }
127
- const params = method === 'session.open' && this.defaultSource !== undefined
128
- ? { ...(request.params ?? {}), source: this.defaultSource }
129
+ // Nothing past the socket can read local frames, so the engine keeps
130
+ // them only for a host that listens to its events.
131
+ const params = method === 'session.open'
132
+ ? {
133
+ ...(request.params ?? {}),
134
+ ...(this.defaultSource !== undefined ? { source: this.defaultSource } : {}),
135
+ local_frames: this.localFrames,
136
+ }
129
137
  : request.params;
130
138
  void this.engine
131
139
  .request(method, params)
@@ -1 +1 @@
1
- {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,OAAO,E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,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACJ;AAED,SAAS,YAAY,CAAC,MAAc;IAChC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;IACxE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AACxF,CAAC"}
@@ -1,4 +1,5 @@
1
- import { type EngineCapabilities, type EngineEvent, type OpenedSession, type OpenSessionRequest, type SessionMetrics } from './protocol.js';
1
+ import { EngineRefused, type EngineCapabilities, type EngineEvent, type OpenedSession, type PointRequest, type OpenSessionRequest, type SessionMetrics } from './protocol.js';
2
+ export declare function windowsEngineStartupError(code: number | null, error?: Error): EngineRefused | null;
2
3
  export interface EngineClientOptions {
3
4
  /**
4
5
  * Request timeout: an engine that does not answer in time is killed, not
@@ -62,6 +63,10 @@ export declare class EngineClient {
62
63
  writeClipboard(sessionId: string, text: string): Promise<{
63
64
  written: boolean;
64
65
  }>;
66
+ /** Show or clear a transient cue on the host, without moving its pointer. */
67
+ point(sessionId: string, request: PointRequest): Promise<{
68
+ shown: boolean;
69
+ }>;
65
70
  closeSession(sessionId: string): Promise<{
66
71
  closed: boolean;
67
72
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"engineProcess.d.ts","sourceRoot":"","sources":["../src/engineProcess.ts"],"names":[],"mappings":"AAIA,OAAO,EAGH,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aA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