@mindexec/cli 0.2.441 → 0.2.443

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 (45) hide show
  1. package/package.json +1 -1
  2. package/remote-fast/osx-arm64/MacScreenCaptureKitH264.swift +339 -0
  3. package/remote-fast/osx-arm64/MacSystemAudioCapture.swift +214 -0
  4. package/remote-fast/osx-arm64/UnixRawCaptureHelper.mjs +80 -0
  5. package/remote-fast/osx-arm64/livedesk-raw-capture-resampler.mjs +73 -0
  6. package/remote-fast/osx-arm64/mindexec-remote-fast.dll +0 -0
  7. package/remote-fast/osx-x64/MacScreenCaptureKitH264.swift +339 -0
  8. package/remote-fast/osx-x64/MacSystemAudioCapture.swift +214 -0
  9. package/remote-fast/osx-x64/UnixRawCaptureHelper.mjs +80 -0
  10. package/remote-fast/osx-x64/livedesk-raw-capture-resampler.mjs +73 -0
  11. package/remote-fast/osx-x64/mindexec-remote-fast.dll +0 -0
  12. package/remote-fast/win-x64/NAudio.Asio.dll +0 -0
  13. package/remote-fast/win-x64/NAudio.Core.dll +0 -0
  14. package/remote-fast/win-x64/NAudio.Midi.dll +0 -0
  15. package/remote-fast/win-x64/NAudio.Wasapi.dll +0 -0
  16. package/remote-fast/win-x64/NAudio.WinForms.dll +0 -0
  17. package/remote-fast/win-x64/NAudio.WinMM.dll +0 -0
  18. package/remote-fast/win-x64/NAudio.dll +0 -0
  19. package/remote-fast/win-x64/SharpGen.Runtime.COM.dll +0 -0
  20. package/remote-fast/win-x64/SharpGen.Runtime.dll +0 -0
  21. package/remote-fast/win-x64/Vortice.DXGI.dll +0 -0
  22. package/remote-fast/win-x64/Vortice.Direct3D11.dll +0 -0
  23. package/remote-fast/win-x64/Vortice.DirectX.dll +0 -0
  24. package/remote-fast/win-x64/Vortice.Mathematics.dll +0 -0
  25. package/remote-fast/win-x64/mindexec-remote-fast.deps.json +238 -0
  26. package/remote-fast/win-x64/mindexec-remote-fast.dll +0 -0
  27. package/remote-fast/win-x64/mindexec-remote-fast.exe +0 -0
  28. package/remote-hub.js +75 -5
  29. package/server.js +32 -7
  30. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +55 -9
  31. package/wwwroot/_content/MindExecution.Shared/js/mind-map-remote-codecs.js +199 -0
  32. package/wwwroot/_framework/{MindExecution.Core.808jj176e1.dll → MindExecution.Core.4moacskf64.dll} +0 -0
  33. package/wwwroot/_framework/{MindExecution.Kernel.75hxk08tt0.dll → MindExecution.Kernel.pa251cfsz4.dll} +0 -0
  34. package/wwwroot/_framework/{MindExecution.Plugins.Admin.0zkmk8wahq.dll → MindExecution.Plugins.Admin.dxyuwmxv1s.dll} +0 -0
  35. package/wwwroot/_framework/{MindExecution.Plugins.Business.vyw3769hrw.dll → MindExecution.Plugins.Business.7uj5erqhhn.dll} +0 -0
  36. package/wwwroot/_framework/{MindExecution.Plugins.Concept.cvmglrxsjb.dll → MindExecution.Plugins.Concept.108rmsxc96.dll} +0 -0
  37. package/wwwroot/_framework/{MindExecution.Plugins.Directory.jtw9q1dm9n.dll → MindExecution.Plugins.Directory.ccsy3g0fe5.dll} +0 -0
  38. package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.8hmc6ps1ux.dll → MindExecution.Plugins.PlanMaster.1vjpuoe9ff.dll} +0 -0
  39. package/wwwroot/_framework/{MindExecution.Plugins.YouTube.xb9sou9ox0.dll → MindExecution.Plugins.YouTube.q8ml98phj9.dll} +0 -0
  40. package/wwwroot/_framework/{MindExecution.Shared.pqab76cjb6.dll → MindExecution.Shared.2pywq19zjy.dll} +0 -0
  41. package/wwwroot/_framework/{MindExecution.Web.mc24u4bzol.dll → MindExecution.Web.qucbls1wfr.dll} +0 -0
  42. package/wwwroot/_framework/blazor.boot.json +21 -21
  43. package/wwwroot/index.html +2 -1
  44. package/wwwroot/service-worker-assets.js +28 -24
  45. package/wwwroot/service-worker.js +1 -1
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+
3
+ import readline from 'node:readline';
4
+ import { convertRgbaToRgb565 } from './livedesk-raw-capture-resampler.mjs';
5
+
6
+ const screenshotModule = await import('node-screenshots');
7
+ const Monitor = screenshotModule.Monitor || screenshotModule.default?.Monitor;
8
+ if (!Monitor?.all) {
9
+ throw new Error('node-screenshots Monitor API is unavailable.');
10
+ }
11
+
12
+ function clampInteger(value, min, max, fallback) {
13
+ const number = Number(value);
14
+ if (!Number.isFinite(number)) return fallback;
15
+ return Math.max(min, Math.min(max, Math.round(number)));
16
+ }
17
+
18
+ function pickMonitor(index) {
19
+ const monitors = Monitor.all();
20
+ if (!monitors.length) {
21
+ throw new Error('No capturable desktop monitor was found.');
22
+ }
23
+ const selectedIndex = clampInteger(index, 0, monitors.length - 1, 0);
24
+ const monitor = monitors[selectedIndex]
25
+ || monitors.find(item => item?.isPrimary?.() === true)
26
+ || monitors[0];
27
+ return { monitor, selectedIndex, monitorCount: monitors.length };
28
+ }
29
+
30
+ function writeResponse(metadata, payload = Buffer.alloc(0)) {
31
+ const header = Buffer.from(JSON.stringify(metadata), 'utf8');
32
+ const prefix = Buffer.allocUnsafe(8);
33
+ prefix.writeUInt32BE(header.length, 0);
34
+ prefix.writeUInt32BE(payload.length, 4);
35
+ process.stdout.write(prefix);
36
+ process.stdout.write(header);
37
+ if (payload.length > 0) process.stdout.write(payload);
38
+ }
39
+
40
+ const input = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
41
+ for await (const line of input) {
42
+ if (!line.trim()) continue;
43
+ let request;
44
+ try {
45
+ request = JSON.parse(line);
46
+ const id = Number.isSafeInteger(Number(request.id)) ? Number(request.id) : 0;
47
+ const maxWidth = clampInteger(request.maxWidth, 1, 480, 320);
48
+ const maxHeight = clampInteger(request.maxHeight, 1, 270, 180);
49
+ const { monitor, selectedIndex, monitorCount } = pickMonitor(request.monitorIndex);
50
+ const captureStartedAt = performance.now();
51
+ const image = await monitor.captureImage();
52
+ const raw = await image.toRaw(false);
53
+ const captureMs = Math.max(0, performance.now() - captureStartedAt);
54
+ const sourceWidth = Number(image.width || monitor.width?.() || 0);
55
+ const sourceHeight = Number(image.height || monitor.height?.() || 0);
56
+ const convertStartedAt = performance.now();
57
+ const converted = convertRgbaToRgb565(raw, sourceWidth, sourceHeight, maxWidth, maxHeight);
58
+ const convertMs = Math.max(0, performance.now() - convertStartedAt);
59
+ writeResponse({
60
+ ok: true,
61
+ id,
62
+ width: converted.width,
63
+ height: converted.height,
64
+ sourceWidth,
65
+ sourceHeight,
66
+ monitorIndex: selectedIndex,
67
+ monitorCount,
68
+ captureMs: Math.round(captureMs),
69
+ convertMs: Math.round(convertMs),
70
+ resizeFilter: converted.filter
71
+ }, converted.output);
72
+ } catch (error) {
73
+ writeResponse({
74
+ ok: false,
75
+ id: Number.isSafeInteger(Number(request?.id)) ? Number(request.id) : 0,
76
+ error: String(error?.message || error || 'capture failed').slice(0, 1000)
77
+ });
78
+ }
79
+ }
80
+
@@ -0,0 +1,73 @@
1
+ function clampInteger(value, min, max, fallback) {
2
+ const number = Number(value);
3
+ if (!Number.isFinite(number)) return fallback;
4
+ return Math.max(min, Math.min(max, Math.round(number)));
5
+ }
6
+
7
+ function writeRgb565(output, target, red, green, blue) {
8
+ const pixel = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
9
+ output[target] = pixel & 0xff;
10
+ output[target + 1] = pixel >> 8;
11
+ }
12
+
13
+ export function convertRgbaToRgb565(raw, sourceWidthValue, sourceHeightValue, maxWidthValue, maxHeightValue) {
14
+ const sourceWidth = clampInteger(sourceWidthValue, 1, 32_768, 1);
15
+ const sourceHeight = clampInteger(sourceHeightValue, 1, 32_768, 1);
16
+ const maxWidth = clampInteger(maxWidthValue, 1, sourceWidth, sourceWidth);
17
+ const maxHeight = clampInteger(maxHeightValue, 1, sourceHeight, sourceHeight);
18
+ if (raw.length < sourceWidth * sourceHeight * 4) {
19
+ throw new Error(`Raw capture is incomplete: ${raw.length} bytes for ${sourceWidth}x${sourceHeight}.`);
20
+ }
21
+
22
+ const scale = Math.min(1, maxWidth / sourceWidth, maxHeight / sourceHeight);
23
+ const width = Math.max(1, Math.round(sourceWidth * scale));
24
+ const height = Math.max(1, Math.round(sourceHeight * scale));
25
+ const output = Buffer.allocUnsafe(width * height * 2);
26
+
27
+ if (width === sourceWidth && height === sourceHeight) {
28
+ for (let source = 0, target = 0; target < output.length; source += 4, target += 2) {
29
+ writeRgb565(output, target, raw[source], raw[source + 1], raw[source + 2]);
30
+ }
31
+ return { output, width, height, filter: 'none' };
32
+ }
33
+
34
+ const xStarts = new Int32Array(width);
35
+ const xEnds = new Int32Array(width);
36
+ for (let x = 0; x < width; x += 1) {
37
+ xStarts[x] = Math.min(sourceWidth - 1, Math.floor(x * sourceWidth / width));
38
+ xEnds[x] = Math.max(xStarts[x] + 1, Math.min(sourceWidth, Math.floor((x + 1) * sourceWidth / width)));
39
+ }
40
+
41
+ let target = 0;
42
+ for (let y = 0; y < height; y += 1) {
43
+ const sourceY0 = Math.min(sourceHeight - 1, Math.floor(y * sourceHeight / height));
44
+ const sourceY1 = Math.max(sourceY0 + 1, Math.min(sourceHeight, Math.floor((y + 1) * sourceHeight / height)));
45
+ for (let x = 0; x < width; x += 1) {
46
+ let red = 0;
47
+ let green = 0;
48
+ let blue = 0;
49
+ let samples = 0;
50
+ for (let sourceY = sourceY0; sourceY < sourceY1; sourceY += 1) {
51
+ let source = (sourceY * sourceWidth + xStarts[x]) * 4;
52
+ for (let sourceX = xStarts[x]; sourceX < xEnds[x]; sourceX += 1) {
53
+ red += raw[source];
54
+ green += raw[source + 1];
55
+ blue += raw[source + 2];
56
+ samples += 1;
57
+ source += 4;
58
+ }
59
+ }
60
+ writeRgb565(
61
+ output,
62
+ target,
63
+ Math.round(red / samples),
64
+ Math.round(green / samples),
65
+ Math.round(blue / samples)
66
+ );
67
+ target += 2;
68
+ }
69
+ }
70
+
71
+ return { output, width, height, filter: 'box' };
72
+ }
73
+
Binary file
@@ -8,9 +8,156 @@
8
8
  ".NETCoreApp,Version=v9.0": {},
9
9
  ".NETCoreApp,Version=v9.0/win-x64": {
10
10
  "mindexec-remote-fast/1.0.0": {
11
+ "dependencies": {
12
+ "NAudio": "2.2.1",
13
+ "Vortice.Direct3D11": "3.8.3"
14
+ },
11
15
  "runtime": {
12
16
  "mindexec-remote-fast.dll": {}
13
17
  }
18
+ },
19
+ "NAudio/2.2.1": {
20
+ "dependencies": {
21
+ "NAudio.Asio": "2.2.1",
22
+ "NAudio.Core": "2.2.1",
23
+ "NAudio.Midi": "2.2.1",
24
+ "NAudio.Wasapi": "2.2.1",
25
+ "NAudio.WinForms": "2.2.1",
26
+ "NAudio.WinMM": "2.2.1"
27
+ },
28
+ "runtime": {
29
+ "lib/net6.0-windows7.0/NAudio.dll": {
30
+ "assemblyVersion": "2.2.1.0",
31
+ "fileVersion": "2.2.1.0"
32
+ }
33
+ }
34
+ },
35
+ "NAudio.Asio/2.2.1": {
36
+ "dependencies": {
37
+ "NAudio.Core": "2.2.1"
38
+ },
39
+ "runtime": {
40
+ "lib/netstandard2.0/NAudio.Asio.dll": {
41
+ "assemblyVersion": "2.2.1.0",
42
+ "fileVersion": "2.2.1.0"
43
+ }
44
+ }
45
+ },
46
+ "NAudio.Core/2.2.1": {
47
+ "runtime": {
48
+ "lib/netstandard2.0/NAudio.Core.dll": {
49
+ "assemblyVersion": "2.2.1.0",
50
+ "fileVersion": "2.2.1.0"
51
+ }
52
+ }
53
+ },
54
+ "NAudio.Midi/2.2.1": {
55
+ "dependencies": {
56
+ "NAudio.Core": "2.2.1"
57
+ },
58
+ "runtime": {
59
+ "lib/netstandard2.0/NAudio.Midi.dll": {
60
+ "assemblyVersion": "2.2.1.0",
61
+ "fileVersion": "2.2.1.0"
62
+ }
63
+ }
64
+ },
65
+ "NAudio.Wasapi/2.2.1": {
66
+ "dependencies": {
67
+ "NAudio.Core": "2.2.1"
68
+ },
69
+ "runtime": {
70
+ "lib/netstandard2.0/NAudio.Wasapi.dll": {
71
+ "assemblyVersion": "2.2.1.0",
72
+ "fileVersion": "2.2.1.0"
73
+ }
74
+ }
75
+ },
76
+ "NAudio.WinForms/2.2.1": {
77
+ "dependencies": {
78
+ "NAudio.WinMM": "2.2.1"
79
+ },
80
+ "runtime": {
81
+ "lib/netcoreapp3.1/NAudio.WinForms.dll": {
82
+ "assemblyVersion": "2.2.1.0",
83
+ "fileVersion": "2.2.1.0"
84
+ }
85
+ }
86
+ },
87
+ "NAudio.WinMM/2.2.1": {
88
+ "dependencies": {
89
+ "NAudio.Core": "2.2.1"
90
+ },
91
+ "runtime": {
92
+ "lib/netstandard2.0/NAudio.WinMM.dll": {
93
+ "assemblyVersion": "2.2.1.0",
94
+ "fileVersion": "2.2.1.0"
95
+ }
96
+ }
97
+ },
98
+ "SharpGen.Runtime/2.4.2-beta": {
99
+ "runtime": {
100
+ "lib/net9.0/SharpGen.Runtime.dll": {
101
+ "assemblyVersion": "2.4.2.0",
102
+ "fileVersion": "2.4.2.0"
103
+ }
104
+ }
105
+ },
106
+ "SharpGen.Runtime.COM/2.4.2-beta": {
107
+ "dependencies": {
108
+ "SharpGen.Runtime": "2.4.2-beta"
109
+ },
110
+ "runtime": {
111
+ "lib/net9.0/SharpGen.Runtime.COM.dll": {
112
+ "assemblyVersion": "2.4.2.0",
113
+ "fileVersion": "2.4.2.0"
114
+ }
115
+ }
116
+ },
117
+ "Vortice.Direct3D11/3.8.3": {
118
+ "dependencies": {
119
+ "SharpGen.Runtime": "2.4.2-beta",
120
+ "Vortice.DXGI": "3.8.3"
121
+ },
122
+ "runtime": {
123
+ "lib/net9.0/Vortice.Direct3D11.dll": {
124
+ "assemblyVersion": "3.8.3.0",
125
+ "fileVersion": "3.8.3.0"
126
+ }
127
+ }
128
+ },
129
+ "Vortice.DirectX/3.8.3": {
130
+ "dependencies": {
131
+ "SharpGen.Runtime": "2.4.2-beta",
132
+ "SharpGen.Runtime.COM": "2.4.2-beta",
133
+ "Vortice.Mathematics": "2.1.0"
134
+ },
135
+ "runtime": {
136
+ "lib/net9.0/Vortice.DirectX.dll": {
137
+ "assemblyVersion": "3.8.3.0",
138
+ "fileVersion": "3.8.3.0"
139
+ }
140
+ }
141
+ },
142
+ "Vortice.DXGI/3.8.3": {
143
+ "dependencies": {
144
+ "SharpGen.Runtime": "2.4.2-beta",
145
+ "Vortice.DirectX": "3.8.3"
146
+ },
147
+ "runtime": {
148
+ "lib/net9.0/Vortice.DXGI.dll": {
149
+ "assemblyVersion": "3.8.3.0",
150
+ "fileVersion": "3.8.3.0"
151
+ }
152
+ }
153
+ },
154
+ "Vortice.Mathematics/2.1.0": {
155
+ "runtime": {
156
+ "lib/net9.0/Vortice.Mathematics.dll": {
157
+ "assemblyVersion": "2.1.0.0",
158
+ "fileVersion": "2.1.0.0"
159
+ }
160
+ }
14
161
  }
15
162
  }
16
163
  },
@@ -19,6 +166,97 @@
19
166
  "type": "project",
20
167
  "serviceable": false,
21
168
  "sha512": ""
169
+ },
170
+ "NAudio/2.2.1": {
171
+ "type": "package",
172
+ "serviceable": true,
173
+ "sha512": "sha512-c0DzwiyyklM0TP39Y7RObwO3QkWecgM6H60ikiEnsV/aEAJPbj5MFCLaD8BSfKuZe0HGuh9GRGWWlJmSxDc9MA==",
174
+ "path": "naudio/2.2.1",
175
+ "hashPath": "naudio.2.2.1.nupkg.sha512"
176
+ },
177
+ "NAudio.Asio/2.2.1": {
178
+ "type": "package",
179
+ "serviceable": true,
180
+ "sha512": "sha512-hQglyOT5iT3XuGpBP8ZG0+aoqwRfidHjTNehpoWwX0g6KJEgtH2VaqM2nuJ2mheKZa/IBqB4YQTZVvrIapzfOA==",
181
+ "path": "naudio.asio/2.2.1",
182
+ "hashPath": "naudio.asio.2.2.1.nupkg.sha512"
183
+ },
184
+ "NAudio.Core/2.2.1": {
185
+ "type": "package",
186
+ "serviceable": true,
187
+ "sha512": "sha512-GgkdP6K/7FqXFo7uHvoqGZTJvW4z8g2IffhOO4JHaLzKCdDOUEzVKtveoZkCuUX8eV2HAINqi7VFqlFndrnz/g==",
188
+ "path": "naudio.core/2.2.1",
189
+ "hashPath": "naudio.core.2.2.1.nupkg.sha512"
190
+ },
191
+ "NAudio.Midi/2.2.1": {
192
+ "type": "package",
193
+ "serviceable": true,
194
+ "sha512": "sha512-6r23ylGo5aeP02WFXsPquz0T0hFJWyh+7t++tz19tc3Kr38NHm+Z9j+FiAv+xkH8tZqXJqus9Q8p6u7bidIgbw==",
195
+ "path": "naudio.midi/2.2.1",
196
+ "hashPath": "naudio.midi.2.2.1.nupkg.sha512"
197
+ },
198
+ "NAudio.Wasapi/2.2.1": {
199
+ "type": "package",
200
+ "serviceable": true,
201
+ "sha512": "sha512-lFfXoqacZZe0WqNChJgGYI+XV/n/61LzPHT3C1CJp4khoxeo2sziyX5wzNYWeCMNbsWxFvT3b3iXeY1UYjBhZw==",
202
+ "path": "naudio.wasapi/2.2.1",
203
+ "hashPath": "naudio.wasapi.2.2.1.nupkg.sha512"
204
+ },
205
+ "NAudio.WinForms/2.2.1": {
206
+ "type": "package",
207
+ "serviceable": true,
208
+ "sha512": "sha512-DlDkewY1myY0A+3NrYRJD+MZhZV0yy1mNF6dckB27IQ9XCs/My5Ip8BZcoSHOsaPSe2GAjvoaDnk6N9w8xTv7w==",
209
+ "path": "naudio.winforms/2.2.1",
210
+ "hashPath": "naudio.winforms.2.2.1.nupkg.sha512"
211
+ },
212
+ "NAudio.WinMM/2.2.1": {
213
+ "type": "package",
214
+ "serviceable": true,
215
+ "sha512": "sha512-xFHRFwH4x6aq3IxRbewvO33ugJRvZFEOfO62i7uQJRUNW2cnu6BeBTHUS0JD5KBucZbHZaYqxQG8dwZ47ezQuQ==",
216
+ "path": "naudio.winmm/2.2.1",
217
+ "hashPath": "naudio.winmm.2.2.1.nupkg.sha512"
218
+ },
219
+ "SharpGen.Runtime/2.4.2-beta": {
220
+ "type": "package",
221
+ "serviceable": true,
222
+ "sha512": "sha512-niTtWAUov1F7wZGAlVeEvW+Tnqvg5yTmhI7rxmYu2Utoyu2TbC9tWWpUpMs0PQg5lu5svoYpCAztNjxCqMFP/w==",
223
+ "path": "sharpgen.runtime/2.4.2-beta",
224
+ "hashPath": "sharpgen.runtime.2.4.2-beta.nupkg.sha512"
225
+ },
226
+ "SharpGen.Runtime.COM/2.4.2-beta": {
227
+ "type": "package",
228
+ "serviceable": true,
229
+ "sha512": "sha512-9lxDFMiepqo3lJQzMSjECCIONeCc2f3Drokgj6HtrTLZcJSftNgcLbD6/iXYj2iphkwgrZb1oLsDOZxoFZkawQ==",
230
+ "path": "sharpgen.runtime.com/2.4.2-beta",
231
+ "hashPath": "sharpgen.runtime.com.2.4.2-beta.nupkg.sha512"
232
+ },
233
+ "Vortice.Direct3D11/3.8.3": {
234
+ "type": "package",
235
+ "serviceable": true,
236
+ "sha512": "sha512-JgFUswu2mgrSwcd0KRF2AnfeE5VbMEgcicmxPD1g2yXyomPIHbnX3wldBNHPOzzD0URC1WJ/pO1ymfi3imZwvg==",
237
+ "path": "vortice.direct3d11/3.8.3",
238
+ "hashPath": "vortice.direct3d11.3.8.3.nupkg.sha512"
239
+ },
240
+ "Vortice.DirectX/3.8.3": {
241
+ "type": "package",
242
+ "serviceable": true,
243
+ "sha512": "sha512-nKwSavv0w5rDF7prSefqAVPDcTyqrfZxKFMVfttiXPfm62VdA/1d+b3PhCZpW4xO7jXczXDwjQdWgD1zGsvM8w==",
244
+ "path": "vortice.directx/3.8.3",
245
+ "hashPath": "vortice.directx.3.8.3.nupkg.sha512"
246
+ },
247
+ "Vortice.DXGI/3.8.3": {
248
+ "type": "package",
249
+ "serviceable": true,
250
+ "sha512": "sha512-MbAUnTeQ6WD99ctAdrj5CQO2I7oaax0Kt2eVdWSUj0bYP9Ed0726+s7dIHe4+tqhpmINW/dcPt0mNtc72o+E0w==",
251
+ "path": "vortice.dxgi/3.8.3",
252
+ "hashPath": "vortice.dxgi.3.8.3.nupkg.sha512"
253
+ },
254
+ "Vortice.Mathematics/2.1.0": {
255
+ "type": "package",
256
+ "serviceable": true,
257
+ "sha512": "sha512-KK+SjNSuKdP+zbavekubi+vaeb1Jo4k87ZF6CMkVWjr6RjJwc8peVtmgzXXDIMy4ZC3ZISyk3llY3q65ISOkBQ==",
258
+ "path": "vortice.mathematics/2.1.0",
259
+ "hashPath": "vortice.mathematics.2.1.0.nupkg.sha512"
22
260
  }
23
261
  }
24
262
  }
package/remote-hub.js CHANGED
@@ -60,6 +60,39 @@ const REMOTE_FRAME_MODE_PROFILES = Object.freeze({
60
60
  modeVersion: 1,
61
61
  implemented: true
62
62
  }),
63
+ 'mode2-lzo': Object.freeze({
64
+ mode: 'mode2-lzo',
65
+ label: 'Mode 2 RGB565 LZO Wall',
66
+ transport: 'ws-binary',
67
+ encoding: 'image-raw',
68
+ codec: 'rgb565',
69
+ compression: 'lzo1x',
70
+ profile: 'mode2-lzo-rgb565-v1',
71
+ modeVersion: 2,
72
+ implemented: true
73
+ }),
74
+ 'mode3-h264-hw': Object.freeze({
75
+ mode: 'mode3-h264-hw',
76
+ label: 'Mode 3 H.264 Control',
77
+ transport: 'ws-binary',
78
+ encoding: 'video',
79
+ codec: 'h264',
80
+ compression: 'video/h264',
81
+ profile: 'mode3-h264-hardware-v1',
82
+ modeVersion: 3,
83
+ implemented: true
84
+ }),
85
+ 'mode4-h264-atlas': Object.freeze({
86
+ mode: 'mode4-h264-atlas',
87
+ label: 'Mode 4 H.264 Atlas Wall',
88
+ transport: 'ws-binary',
89
+ encoding: 'video',
90
+ codec: 'h264',
91
+ compression: 'video/h264',
92
+ profile: 'mode4-h264-atlas-v1',
93
+ modeVersion: 4,
94
+ implemented: true
95
+ }),
63
96
  'video-codec': Object.freeze({
64
97
  mode: 'video-codec',
65
98
  label: 'Video Codec Stream',
@@ -81,6 +114,19 @@ const REMOTE_FRAME_MODE_ALIASES = new Map([
81
114
  ['remotequality', 'remote-quality'],
82
115
  ['remote_quality', 'remote-quality'],
83
116
  ['remote-quality', 'remote-quality'],
117
+ ['2', 'mode2-lzo'],
118
+ ['mode2', 'mode2-lzo'],
119
+ ['mode-2', 'mode2-lzo'],
120
+ ['mode2-lzo', 'mode2-lzo'],
121
+ ['lzo', 'mode2-lzo'],
122
+ ['lzo1x', 'mode2-lzo'],
123
+ ['rgb565', 'mode2-lzo'],
124
+ ['mode3-h264', 'mode3-h264-hw'],
125
+ ['mode3-h264-hw', 'mode3-h264-hw'],
126
+ ['h264', 'mode3-h264-hw'],
127
+ ['mode4', 'mode4-h264-atlas'],
128
+ ['mode4-h264-atlas', 'mode4-h264-atlas'],
129
+ ['atlas', 'mode4-h264-atlas'],
84
130
  ['thumb', 'thumbnail'],
85
131
  ['thumbnail', 'thumbnail'],
86
132
  ['video', 'video-codec'],
@@ -443,6 +489,9 @@ function normalizeRemoteInputEvent(value = {}) {
443
489
  code: safeString(input.code || input.Code, 80),
444
490
  text: safeText(input.text || input.Text, 256),
445
491
  repeat: input.repeat === true || input.Repeat === true,
492
+ inputSeq: Number.isFinite(Number(input.inputSeq ?? input.InputSeq)) ? Math.max(0, Math.floor(Number(input.inputSeq ?? input.InputSeq))) : 0,
493
+ requestAck: input.requestAck === true || input.RequestAck === true,
494
+ fireAndForget: input.fireAndForget === true || input.FireAndForget === true,
446
495
  controlLeaseId: safeString(input.controlLeaseId || input.ControlLeaseId, 128),
447
496
  issuedAt: safeString(input.issuedAt || input.IssuedAt, 80)
448
497
  };
@@ -1399,7 +1448,7 @@ export function createRemoteHub(options = {}) {
1399
1448
  transferProtocol: descriptor.transferProtocol,
1400
1449
  transferProtocolVersion: descriptor.transferProtocolVersion,
1401
1450
  handshake: descriptor.handshake,
1402
- fps: clampNumber(options.fps, 1, 24, mode === 'remote-fast' ? 20 : 1),
1451
+ fps: clampNumber(options.fps, 1, 30, mode === 'remote-fast' ? 20 : 1),
1403
1452
  capturedAt: now,
1404
1453
  receivedAt: now,
1405
1454
  byteLength: 68,
@@ -2416,6 +2465,20 @@ export function createRemoteHub(options = {}) {
2416
2465
  transferProtocolVersion: transfer.transferProtocolVersion,
2417
2466
  handshake: transfer.handshake,
2418
2467
  fps: Number.isFinite(Number(message.fps)) ? Number(message.fps) : device.activeLiveStream.fps,
2468
+ streamPurpose: safeString(message.streamPurpose, 32),
2469
+ monitorIndex: Number.isFinite(Number(message.monitorIndex)) ? Number(message.monitorIndex) : 0,
2470
+ monitorCount: Number.isFinite(Number(message.monitorCount)) ? Number(message.monitorCount) : 0,
2471
+ pixelFormat: safeString(message.pixelFormat, 24),
2472
+ bytesPerPixel: Number.isFinite(Number(message.bytesPerPixel)) ? Number(message.bytesPerPixel) : 0,
2473
+ uncompressedByteLength: Number.isFinite(Number(message.uncompressedByteLength)) ? Number(message.uncompressedByteLength) : 0,
2474
+ sourceWidth: Number.isFinite(Number(message.sourceWidth)) ? Number(message.sourceWidth) : 0,
2475
+ sourceHeight: Number.isFinite(Number(message.sourceHeight)) ? Number(message.sourceHeight) : 0,
2476
+ h264Format: safeString(message.h264Format, 24),
2477
+ isKeyFrame: message.isKeyFrame === true,
2478
+ chunkType: safeString(message.chunkType, 24),
2479
+ timestampUs: Number.isFinite(Number(message.timestampUs)) ? Number(message.timestampUs) : 0,
2480
+ durationUs: Number.isFinite(Number(message.durationUs)) ? Number(message.durationUs) : 0,
2481
+ streamFrameSeq: Number.isFinite(Number(message.streamFrameSeq)) ? Number(message.streamFrameSeq) : frameSeq,
2419
2482
  capturedAt,
2420
2483
  receivedAt: device.lastSeenAt,
2421
2484
  byteLength,
@@ -3221,9 +3284,11 @@ export function createRemoteHub(options = {}) {
3221
3284
 
3222
3285
  const now = new Date().toISOString();
3223
3286
  const streamId = safeString(options.streamId, 128) || `live-${Date.now()}`;
3224
- const fps = clampNumber(options.fps, 1, 24, 20);
3287
+ const streamPurpose = safeString(options.streamPurpose, 32).toLowerCase();
3288
+ const requestedMode = options.mode || (streamPurpose === 'control' ? 'mode3-h264-hw' : 'mode2-lzo');
3289
+ const fps = clampNumber(options.fps, 1, 30, streamPurpose === 'control' ? 30 : 20);
3225
3290
  const commandId = safeString(options.commandId, 128) || crypto.randomUUID();
3226
- const transfer = buildRemoteFrameTransferDescriptor(options.mode || DEFAULT_REMOTE_FRAME_MODE);
3291
+ const transfer = buildRemoteFrameTransferDescriptor(requestedMode, streamPurpose === 'control' ? 'mode3-h264-hw' : 'mode2-lzo');
3227
3292
  device.counters.commandsSent += 1;
3228
3293
  device.activeLiveStream = {
3229
3294
  streamId,
@@ -3242,6 +3307,7 @@ export function createRemoteHub(options = {}) {
3242
3307
  transferProtocolVersion: transfer.transferProtocolVersion,
3243
3308
  handshake: transfer.handshake,
3244
3309
  fps,
3310
+ streamPurpose,
3245
3311
  startedAt: now,
3246
3312
  stoppedAt: '',
3247
3313
  stopReason: '',
@@ -3275,9 +3341,11 @@ export function createRemoteHub(options = {}) {
3275
3341
 
3276
3342
  const now = new Date().toISOString();
3277
3343
  const streamId = safeString(options.streamId, 128) || `live-${Date.now()}`;
3278
- const fps = clampNumber(options.fps, 1, 24, 12);
3344
+ const streamPurpose = safeString(options.streamPurpose, 32).toLowerCase();
3345
+ const requestedMode = options.mode || (streamPurpose === 'control' ? 'mode3-h264-hw' : 'mode2-lzo');
3346
+ const fps = clampNumber(options.fps, 1, 30, streamPurpose === 'control' ? 30 : 20);
3279
3347
  const commandId = safeString(options.commandId, 128) || crypto.randomUUID();
3280
- const transfer = buildRemoteFrameTransferDescriptor(options.mode || DEFAULT_REMOTE_FRAME_MODE);
3348
+ const transfer = buildRemoteFrameTransferDescriptor(requestedMode, streamPurpose === 'control' ? 'mode3-h264-hw' : 'mode2-lzo');
3281
3349
  const result = sendCommand(deviceId, {
3282
3350
  command: 'stream.start',
3283
3351
  commandId,
@@ -3292,6 +3360,7 @@ export function createRemoteHub(options = {}) {
3292
3360
  transferProtocol: transfer.transferProtocol,
3293
3361
  transferProtocolVersion: transfer.transferProtocolVersion,
3294
3362
  handshake: transfer.handshake,
3363
+ streamPurpose,
3295
3364
  fps,
3296
3365
  maxWidth: clampNumber(options.maxWidth, 320, 2560, 960),
3297
3366
  maxHeight: clampNumber(options.maxHeight, 180, 1440, 540),
@@ -3321,6 +3390,7 @@ export function createRemoteHub(options = {}) {
3321
3390
  transferProtocolVersion: transfer.transferProtocolVersion,
3322
3391
  handshake: transfer.handshake,
3323
3392
  fps,
3393
+ streamPurpose,
3324
3394
  startedAt: now,
3325
3395
  stoppedAt: '',
3326
3396
  stopReason: '',