livedesk 0.1.271 → 0.1.272

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.
@@ -1,6 +1,7 @@
1
1
  import { randomUUID } from 'node:crypto';
2
2
 
3
3
  export const LIVE_DESK_UPDATE_COMMAND = 'livedesk.client-update';
4
+ export const LIVE_DESK_DEDICATED_CLIENT_UPDATE_MIN_VERSION = '0.1.138';
4
5
  export const LIVE_DESK_UPDATE_TIMEOUT_MS = 120_000;
5
6
  export const LIVE_DESK_UPDATE_CHECK_INTERVAL_MS = 60_000;
6
7
 
@@ -284,7 +285,8 @@ export function createLiveDeskUpdateManager({
284
285
 
285
286
  const dispatchTarget = (target, credentials) => {
286
287
  const device = target.device;
287
- const supportsDedicated = device.capabilities?.clientUpdate === true;
288
+ const supportsDedicated = device.capabilities?.clientUpdate === true
289
+ && isVersionAtLeast(device.agentVersion, LIVE_DESK_DEDICATED_CLIENT_UPDATE_MIN_VERSION);
288
290
  const payload = {
289
291
  targetVersion: run.latestClientVersion,
290
292
  managerVersion: run.latestManagerVersion,
@@ -391,13 +393,15 @@ export function createLiveDeskUpdateManager({
391
393
  const deviceId = String(event?.device?.deviceId || '');
392
394
  const commandId = String(event?.commandId || '');
393
395
  const target = run.targets.find(item => item.deviceId === deviceId && item.commandId === commandId);
394
- if (!target || target.method !== 'dedicated') return;
396
+ if (!target || !['dedicated', 'legacy-command-run'].includes(target.method)) return;
395
397
  const result = event?.result;
396
398
  if (event?.error || result?.ok === false || result?.status === 'failed' || result?.status === 'rejected') {
397
399
  target.state = 'failed';
398
400
  target.error = String(event.error || result?.error || result?.message || 'client-update-command-failed').slice(0, 500);
399
401
  touch();
400
- failRun(`Client ${target.deviceName || target.deviceId} rejected the update request: ${target.error}`);
402
+ failRun(target.method === 'dedicated'
403
+ ? `Client ${target.deviceName || target.deviceId} rejected the update request: ${target.error}`
404
+ : `Client ${target.deviceName || target.deviceId} failed the update command: ${target.error}`);
401
405
  }
402
406
  };
403
407
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livedesk",
3
- "version": "0.1.271",
3
+ "version": "0.1.272",
4
4
  "description": "LiveDesk Hub and client launcher",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@ffmpeg-installer/ffmpeg": "^1.1.0",
34
- "@livedesk/client": "0.1.137",
34
+ "@livedesk/client": "0.1.138",
35
35
  "@openai/codex-sdk": "0.144.5",
36
36
  "cors": "^2.8.5",
37
37
  "express": "^4.21.2",