@desklink/host 0.1.1 → 0.2.0

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/README.md CHANGED
@@ -27,6 +27,12 @@ a source build with a static VP9 library.
27
27
  re-codes a still desktop once at a fine quantizer so it reads sharp.
28
28
  - **Transport** with WebRTC — ICE, DTLS, SRTP, RTP — and one data channel for the
29
29
  session's pointer/keyboard/clipboard.
30
+ - **Carry** video the consumer encoded itself, on an `encoded` source: Annex-B
31
+ H.264 access units arrive as they are produced, and the session's pointer,
32
+ keyboard and wheel messages come back to the consumer as events instead of
33
+ being applied. This is for a stream whose encoder lives elsewhere — a phone
34
+ mirror from a device helper — so the helper keeps its own hardware encoder and
35
+ the engine keeps the WebRTC path. See `docs/PROTOCOL.md`.
30
36
  - **Input** through [inputtino](https://github.com/games-on-whales/inputtino)
31
37
  (MIT) over `uinput`/`libevdev` for portal capture, XTest for an X display, or
32
38
  Quartz events on macOS. Held input is released when the session ends.
@@ -74,12 +80,28 @@ The macOS engine shares protocol v3's WebRTC session path: selected-display
74
80
  ScreenCaptureKit capture, VP9 encoding, Quartz pointer/keyboard events, and
75
81
  plain-text NSPasteboard operations. `capabilities` is non-prompting; `session.open`
76
82
  requests Screen Recording and, for control, Accessibility consent when needed.
77
- TCC belongs to the app responsible for launching the unsigned CLI: typically
78
- Terminal, iTerm, or a Node.js host. Grant that app in **System Settings → Privacy
79
- & Security → Screen & System Audio Recording** and **Accessibility**; the CLI does
80
- not install a separate DesklinkHost.app or pre-seed/bypass TCC. macOS currently
81
- uses a US ANSI virtual-key map for character chords (the current input layout is
82
- diagnostic); free-form text uses Unicode key events.
83
+ For persistent grants, install the signed `DesklinkHost.app` at one fixed path.
84
+ Build the engine on the Mac, then run
85
+ `release/install-mac-app.sh <engine> <absolute path to DesklinkHost.app> [existing signing PEM]`
86
+ from this package. It prefers a usable Developer ID Application or Apple
87
+ Development identity in the login keychain; otherwise it imports the supplied
88
+ existing certificate/key (to preserve existing grants), or creates one local
89
+ certificate/key in `~/Library/Application Support/Desklink/signing.pem`, and
90
+ trusts it in the login keychain. Unlock the login keychain in the Mac GUI if
91
+ import or trust asks; never supply a person's password to automation. Do not
92
+ regenerate that identity, move the app, or replace and re-sign its executable
93
+ per run. Rebuild, install once at the **same path** with the same identity, and
94
+ verify `codesign -dv --verbose=4 <app>` and `codesign -dr - <app>`; the designated
95
+ requirement must be certificate-based, not a cdhash requirement. Signatures
96
+ made from the same certificate have a stable designated requirement even when
97
+ the binary hash changes. The app does not pre-seed or bypass TCC. Launch it
98
+ from the logged-in Mac session, grant **Screen & System Audio Recording** and
99
+ **Accessibility** to DesklinkHost once in System Settings, then launch twice
100
+ and check `log show --last 5m --predicate 'process == "tccd"'` for new denials.
101
+ TCC belongs to the responsible app: launching the unsigned CLI or a Node
102
+ bridge from SSH/Terminal can instead request grants for Node or Terminal.
103
+ macOS currently uses a US ANSI virtual-key map for character chords (the
104
+ current input layout is diagnostic); free-form text uses Unicode key events.
83
105
 
84
106
  The published engine is an **unsigned macOS arm64 CLI** in the optional
85
107
  `@desklink/host-darwin-arm64` platform package; no Developer ID identity or
@@ -87,7 +109,7 @@ notarization is required. The macOS engine remains opt-in (`DESKLINK_MACOS=1`).
87
109
  To build and pack it, build on an Apple Silicon Mac with Rust 1.97+ and static
88
110
  Homebrew libvpx, then run `release/build-engine-macos-arm64.sh` and
89
111
  `node release/pack.mjs --engine dist-desklink/engine-darwin-arm64 --platform darwin-arm64`.
90
- The app-bundled signed harness is only for local TCC qualification, not npm
112
+ The app-bundled signed harness is for local TCC qualification, not npm
91
113
  installation. See the [macOS protocol](docs/PROTOCOL.md#macos).
92
114
 
93
115
  Point `MUXR_DESKLINK_ENGINE` at a binary built elsewhere if you have one. The
@@ -25,7 +25,7 @@ USAGE:
25
25
  desklink-host bridge [--listen H:P] [--token T] [--source portal|x11|display] [--display :0] [--display-id ID]
26
26
  re-serve the engine's protocol over a WebSocket and
27
27
  print the URL to open; no signaling of your own needed
28
- desklink-host <engine command> ... run the engine directly (serve, capture-probe, setup-input, version)
28
+ desklink-host <engine command> ... run the engine directly (serve, keep, capture-probe, setup-input, version)
29
29
 
30
30
  Set MUXR_DESKLINK_ENGINE to use an engine built somewhere else.`);
31
31
  return 0;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  export * from './protocol.js';
9
9
  export { EngineClient, type EngineClientOptions } from './engineProcess.js';
10
+ export { startDisplayKeeper, parseKeeperLine, type DisplayKeeper, type DisplayKeeperOptions, type KeeperWindow } from './keeper.js';
10
11
  export { resolveEngine, explainMissingEngine, enginePackageRoot, type ResolvedEngine } from './resolveEngine.js';
11
12
  export { Bridge, BRIDGE_PATH, type BridgeOptions } from './bridge.js';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  export * from './protocol.js';
9
9
  export { EngineClient } from './engineProcess.js';
10
+ export { startDisplayKeeper, parseKeeperLine } from './keeper.js';
10
11
  export { resolveEngine, explainMissingEngine, enginePackageRoot } from './resolveEngine.js';
11
12
  export { Bridge, BRIDGE_PATH } from './bridge.js';
12
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAA4B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAuB,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAA4B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAoE,MAAM,aAAa,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAuB,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,52 @@
1
+ /** One top-level window on the kept screen, stacking order, newest last. */
2
+ export interface KeeperWindow {
3
+ id: number;
4
+ title: string | null;
5
+ class: string | null;
6
+ pid: number | null;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ export interface DisplayKeeperOptions {
11
+ /** The X display to keep, for example ':42'. Auth comes from `XAUTHORITY` in `env`. */
12
+ display: string;
13
+ /**
14
+ * The engine to run. Defaults to this package's resolved engine; an
15
+ * embedder that owns its engine names it.
16
+ */
17
+ engine?: {
18
+ command: string;
19
+ args: string[];
20
+ };
21
+ /** The keeper's environment; `XAUTHORITY` must carry the display's cookie. */
22
+ env?: NodeJS.ProcessEnv;
23
+ onWindows?: (windows: KeeperWindow[]) => void;
24
+ /** The keeper died; `error` is why it refused to run, when it said. */
25
+ onExit?: (detail: {
26
+ code: number | null;
27
+ signal: NodeJS.Signals | null;
28
+ error?: string;
29
+ }) => void;
30
+ onDiagnostic?: (line: string) => void;
31
+ }
32
+ /**
33
+ * Parse one keeper stdout line: a window report, a fatal refusal, or nothing
34
+ * (not JSON and not the keeper's business, which goes to diagnostics).
35
+ */
36
+ export declare function parseKeeperLine(line: string): {
37
+ windows?: KeeperWindow[];
38
+ error?: string;
39
+ } | null;
40
+ /** A running keeper of one X screen. It exits by itself when the display goes. */
41
+ export interface DisplayKeeper {
42
+ /** Stop the keeper and wait for it to be gone. */
43
+ stop(): Promise<void>;
44
+ }
45
+ /**
46
+ * Run the engine as the kiosk keeper of one private X screen: it fills the
47
+ * screen with each normal window, parks tiny helper windows off-screen, keeps
48
+ * focus on the newest window, and reports the screen's windows on every change.
49
+ * Nothing arrives when no window is open — which is the point.
50
+ */
51
+ export declare function startDisplayKeeper(options: DisplayKeeperOptions): DisplayKeeper;
52
+ //# sourceMappingURL=keeper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keeper.d.ts","sourceRoot":"","sources":["../src/keeper.ts"],"names":[],"mappings":"AAKA,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACjC,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC7C,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC9C,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAClG,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA2BjG;AAED,kFAAkF;AAClF,MAAM,WAAW,aAAa;IAC1B,kDAAkD;IAClD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAgD/E"}
package/dist/keeper.js ADDED
@@ -0,0 +1,101 @@
1
+ import { spawn } from 'node:child_process';
2
+ import { createInterface } from 'node:readline';
3
+ import { resolveEngine } from './resolveEngine.js';
4
+ /**
5
+ * Parse one keeper stdout line: a window report, a fatal refusal, or nothing
6
+ * (not JSON and not the keeper's business, which goes to diagnostics).
7
+ */
8
+ export function parseKeeperLine(line) {
9
+ const trimmed = line.trim();
10
+ if (trimmed === '')
11
+ return null;
12
+ let parsed;
13
+ try {
14
+ parsed = JSON.parse(trimmed);
15
+ }
16
+ catch {
17
+ return null;
18
+ }
19
+ if (typeof parsed.error === 'string')
20
+ return { error: parsed.error };
21
+ const list = parsed.windows;
22
+ if (!Array.isArray(list))
23
+ return null;
24
+ const windows = [];
25
+ for (const entry of list) {
26
+ if (typeof entry !== 'object' || entry === null)
27
+ continue;
28
+ const window = entry;
29
+ if (typeof window.id !== 'number' || typeof window.width !== 'number' || typeof window.height !== 'number')
30
+ continue;
31
+ windows.push({
32
+ id: window.id,
33
+ title: typeof window.title === 'string' ? window.title : null,
34
+ class: typeof window.class === 'string' ? window.class : null,
35
+ pid: typeof window.pid === 'number' ? window.pid : null,
36
+ width: window.width,
37
+ height: window.height,
38
+ });
39
+ }
40
+ return { windows };
41
+ }
42
+ /**
43
+ * Run the engine as the kiosk keeper of one private X screen: it fills the
44
+ * screen with each normal window, parks tiny helper windows off-screen, keeps
45
+ * focus on the newest window, and reports the screen's windows on every change.
46
+ * Nothing arrives when no window is open — which is the point.
47
+ */
48
+ export function startDisplayKeeper(options) {
49
+ const engine = options.engine ?? resolveEngine();
50
+ if (!engine)
51
+ throw new Error('no desktop engine to keep the display with; see resolveEngine');
52
+ const child = spawn(engine.command, [...engine.args.filter((arg) => arg !== 'serve'), 'keep', '--display', options.display], {
53
+ env: options.env ?? process.env,
54
+ stdio: ['ignore', 'pipe', 'pipe'],
55
+ });
56
+ let refusal;
57
+ const stdout = createInterface({ input: child.stdout });
58
+ stdout.on('line', (line) => {
59
+ const parsed = parseKeeperLine(line);
60
+ if (parsed === null) {
61
+ options.onDiagnostic?.(line.trim());
62
+ }
63
+ else if (parsed.error !== undefined) {
64
+ refusal = parsed.error;
65
+ options.onDiagnostic?.(`display keeper refused: ${parsed.error}`);
66
+ }
67
+ else if (parsed.windows !== undefined) {
68
+ options.onWindows?.(parsed.windows);
69
+ }
70
+ });
71
+ const stderr = createInterface({ input: child.stderr });
72
+ stderr.on('line', (line) => options.onDiagnostic?.(line));
73
+ child.on('error', (error) => {
74
+ options.onDiagnostic?.(`display keeper process error: ${error.message}`);
75
+ // A process that never spawned emits no 'exit'; this is its only death.
76
+ if (child.pid === undefined)
77
+ options.onExit?.({ code: null, signal: null, error: error.message });
78
+ });
79
+ // 'close', not 'exit': the death detail may carry a refusal parsed from
80
+ // stdout, which has fully drained by the time 'close' fires.
81
+ child.on('close', () => {
82
+ if (child.pid !== undefined)
83
+ options.onExit?.({
84
+ code: child.exitCode,
85
+ signal: child.signalCode,
86
+ ...(refusal === undefined ? {} : { error: refusal }),
87
+ });
88
+ });
89
+ return {
90
+ stop: () => new Promise((resolve) => {
91
+ if (child.exitCode !== null || child.signalCode !== null)
92
+ return resolve();
93
+ // 'close', not 'exit': every report line must have been read
94
+ // before the consumer can be sure what the last state was.
95
+ child.once('close', () => resolve());
96
+ child.kill('SIGTERM');
97
+ setTimeout(() => child.kill('SIGKILL'), 3000).unref();
98
+ }),
99
+ };
100
+ }
101
+ //# sourceMappingURL=keeper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keeper.js","sourceRoot":"","sources":["../src/keeper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA4BnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,MAA+B,CAAC;IACpC,IAAI,CAAC;QACD,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAA4B,CAAC;IAC5D,CAAC;IAAC,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,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YACrC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtB,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1D,CAAC,CAAC;KACT,CAAC;AACN,CAAC"}
@@ -26,10 +26,10 @@ export declare function enginePackageRoot(): string;
26
26
  * because npm's own `libc` selector is not honoured by every client.
27
27
  */
28
28
  export declare function platformTag(platform?: string, arch?: string, glibc?: boolean | undefined): string;
29
- export declare function resolveEngine(configured?: string | undefined): ResolvedEngine | null;
29
+ export declare function resolveEngine(configured?: string | undefined, root?: string): ResolvedEngine | null;
30
30
  /**
31
31
  * Why the engine is missing, in words fit to show a user. `null` means it is
32
32
  * there.
33
33
  */
34
- export declare function explainMissingEngine(configured?: string | undefined): string | null;
34
+ export declare function explainMissingEngine(configured?: string | undefined, root?: string): string | null;
35
35
  //# sourceMappingURL=resolveEngine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveEngine.d.ts","sourceRoot":"","sources":["../src/resolveEngine.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;CACjD;AAKD,wBAAgB,kBAAkB,CAAC,QAAQ,kBAAmB,EAAE,IAAI,qBAA6B,GAAG,OAAO,CAE1G;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACvB,QAAQ,GAAE,MAAyB,EACnC,IAAI,GAAE,MAAqB,EAC3B,KAAK,GAAE,OAAO,GAAG,SAAsB,GACxC,MAAM,CAGR;AAiCD,wBAAgB,aAAa,CAAC,UAAU,qBAAmC,GAAG,cAAc,GAAG,IAAI,CAgBlG;AAWD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,qBAAmC,GAAG,MAAM,GAAG,IAAI,CA2BjG"}
1
+ {"version":3,"file":"resolveEngine.d.ts","sourceRoot":"","sources":["../src/resolveEngine.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;CACjD;AAKD,wBAAgB,kBAAkB,CAAC,QAAQ,kBAAmB,EAAE,IAAI,qBAA6B,GAAG,OAAO,CAE1G;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACvB,QAAQ,GAAE,MAAyB,EACnC,IAAI,GAAE,MAAqB,EAC3B,KAAK,GAAE,OAAO,GAAG,SAAsB,GACxC,MAAM,CAGR;AAiCD,wBAAgB,aAAa,CAAC,UAAU,qBAAmC,EAAE,IAAI,SAAsB,GAAG,cAAc,GAAG,IAAI,CAgB9H;AAWD;;;GAGG;AACH,wBAAgB,oBAAoB,CAChC,UAAU,qBAAmC,EAC7C,IAAI,SAAsB,GAC3B,MAAM,GAAG,IAAI,CA2Bf"}
@@ -53,7 +53,7 @@ function buildCandidates(root) {
53
53
  join(root, 'bin', 'desklink-host'),
54
54
  ];
55
55
  }
56
- export function resolveEngine(configured = process.env.MUXR_DESKLINK_ENGINE) {
56
+ export function resolveEngine(configured = process.env.MUXR_DESKLINK_ENGINE, root = enginePackageRoot()) {
57
57
  if (!macosEngineEnabled())
58
58
  return null;
59
59
  if (configured !== undefined && configured.trim() !== '') {
@@ -65,7 +65,7 @@ export function resolveEngine(configured = process.env.MUXR_DESKLINK_ENGINE) {
65
65
  if (prebuilt !== null && isExecutable(prebuilt)) {
66
66
  return { command: prebuilt, args: ['serve'], origin: 'prebuilt' };
67
67
  }
68
- for (const candidate of buildCandidates(enginePackageRoot())) {
68
+ for (const candidate of buildCandidates(root)) {
69
69
  if (isExecutable(candidate)) {
70
70
  return { command: candidate, args: ['serve'], origin: 'package' };
71
71
  }
@@ -86,11 +86,11 @@ function isExecutable(path) {
86
86
  * Why the engine is missing, in words fit to show a user. `null` means it is
87
87
  * there.
88
88
  */
89
- export function explainMissingEngine(configured = process.env.MUXR_DESKLINK_ENGINE) {
89
+ export function explainMissingEngine(configured = process.env.MUXR_DESKLINK_ENGINE, root = enginePackageRoot()) {
90
90
  if (!macosEngineEnabled()) {
91
91
  return 'The macOS desktop engine is experimental and off; set DESKLINK_MACOS=1 to try it.';
92
92
  }
93
- const resolved = resolveEngine(configured);
93
+ const resolved = resolveEngine(configured, root);
94
94
  if (resolved !== null)
95
95
  return null;
96
96
  if (configured !== undefined && configured.trim() !== '') {
@@ -1 +1 @@
1
- {"version":3,"file":"resolveEngine.js","sourceRoot":"","sources":["../src/resolveEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAsBzC,mDAAmD;AACnD,MAAM,kBAAkB,GAAG,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AAE7D,MAAM,UAAU,kBAAkB,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc;IAC7F,OAAO,QAAQ,KAAK,QAAQ,IAAI,IAAI,KAAK,GAAG,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC7B,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAA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,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,OAAO,mCAAmC,GAAG,qEAAqE,GAAG,mHAAmH,CAAC;IAC7O,CAAC;IACD,OAAO,2CAA2C,GAAG,sGAAsG,CAAC;AAChK,CAAC"}
package/docs/BOUNDARY.md CHANGED
@@ -18,9 +18,13 @@ mean the phone pins a native host build, or the host pins a mobile runtime.
18
18
  apply authenticated input to the same desktop".
19
19
 
20
20
  - In: `session.open`, SDP/ICE, scoped WebRTC control-channel input, explicit
21
- clipboard read/write, close. See `docs/PROTOCOL.md`.
22
- - Out: one VP9 video track and session notifications. Metrics are a request, not
23
- an event; the wire contract is in `docs/PROTOCOL.md`.
21
+ clipboard read/write, close — and `session.feed`, which supplies the access
22
+ units of a consumer-encoded `encoded` source. See `docs/PROTOCOL.md`.
23
+ - Out: one video track — VP9 the engine encodes from a captured desktop, or
24
+ H.264 it only packetizes for a consumer-fed `encoded` source, whose control
25
+ messages are forwarded to the consumer instead of applied — and session
26
+ notifications. Metrics are a request, not an event; the wire contract is in
27
+ `docs/PROTOCOL.md`.
24
28
  - Process shape: per-user, on-demand, spawned by a consumer that already owns
25
29
  the session, spoken to over an inherited private channel. No listener, no
26
30
  daemon, no autostart, no root.