livedesk 0.1.432 → 0.1.434
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/client/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livedesk/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.191",
|
|
4
4
|
"description": "LiveDesk local remote client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"ws": "^8.18.3"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@livedesk/fast-linux-x64": "0.1.
|
|
45
|
-
"@livedesk/fast-osx-arm64": "0.1.
|
|
46
|
-
"@livedesk/fast-osx-x64": "0.1.
|
|
47
|
-
"@livedesk/fast-win-x64": "0.1.
|
|
44
|
+
"@livedesk/fast-linux-x64": "0.1.398",
|
|
45
|
+
"@livedesk/fast-osx-arm64": "0.1.398",
|
|
46
|
+
"@livedesk/fast-osx-x64": "0.1.398",
|
|
47
|
+
"@livedesk/fast-win-x64": "0.1.398"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
package/hub/src/remote-hub.js
CHANGED
|
@@ -3334,6 +3334,20 @@ export function createRemoteHub(options = {}) {
|
|
|
3334
3334
|
return {
|
|
3335
3335
|
deviceId: device.deviceId,
|
|
3336
3336
|
commandId: safeString(message.commandId || message.CommandId || pending?.commandId, 128),
|
|
3337
|
+
hubConnectionId: safeString(
|
|
3338
|
+
message.hubConnectionId
|
|
3339
|
+
|| message.HubConnectionId
|
|
3340
|
+
|| result.hubConnectionId
|
|
3341
|
+
|| result.HubConnectionId
|
|
3342
|
+
|| pending?.hubConnectionId,
|
|
3343
|
+
128),
|
|
3344
|
+
inputEventId: safeString(
|
|
3345
|
+
message.inputEventId
|
|
3346
|
+
|| message.InputEventId
|
|
3347
|
+
|| result.inputEventId
|
|
3348
|
+
|| result.InputEventId
|
|
3349
|
+
|| pending?.inputEventId,
|
|
3350
|
+
128),
|
|
3337
3351
|
inputSeq,
|
|
3338
3352
|
inputType: safeString(
|
|
3339
3353
|
message.inputType
|
|
@@ -4536,23 +4550,12 @@ export function createRemoteHub(options = {}) {
|
|
|
4536
4550
|
|
|
4537
4551
|
if (state.inputOnly) {
|
|
4538
4552
|
device.inputLastSeenAt = new Date().toISOString();
|
|
4539
|
-
if (message.type === 'input.applied') {
|
|
4553
|
+
if (message.type === 'input.applied' || message.type === 'input.error') {
|
|
4540
4554
|
handleRemoteInputOutcome(device, {
|
|
4541
4555
|
...message,
|
|
4542
4556
|
agentApplyMs: Number(message.agentApplyMs || 0) || 0
|
|
4543
4557
|
}, 'input');
|
|
4544
4558
|
}
|
|
4545
|
-
if (message.type === 'input.error') {
|
|
4546
|
-
const pending = takePendingInputFallback(
|
|
4547
|
-
device,
|
|
4548
|
-
message.commandId || message.CommandId,
|
|
4549
|
-
message.inputSeq ?? message.InputSeq);
|
|
4550
|
-
emitEvent('RemoteInputError', {
|
|
4551
|
-
...buildRemoteInputOutcome(device, message, pending),
|
|
4552
|
-
error: safeString(message.error || message.Error, 600) || 'remote-input-failed',
|
|
4553
|
-
failedAtEpochMs: Number(message.failedAtEpochMs ?? message.FailedAtEpochMs ?? 0) || 0
|
|
4554
|
-
});
|
|
4555
|
-
}
|
|
4556
4559
|
return;
|
|
4557
4560
|
}
|
|
4558
4561
|
if (state.frameOnly) {
|
|
@@ -5386,6 +5389,8 @@ export function createRemoteHub(options = {}) {
|
|
|
5386
5389
|
inputSeq: normalized.inputSeq,
|
|
5387
5390
|
inputType: normalized.type,
|
|
5388
5391
|
monitorIndex: normalized.monitorIndex,
|
|
5392
|
+
hubConnectionId: normalized.hubConnectionId,
|
|
5393
|
+
inputEventId: normalized.inputEventId,
|
|
5389
5394
|
issuedAtEpochMs: normalized.issuedAtEpochMs,
|
|
5390
5395
|
hubReceivedAtEpochMs: normalized.hubReceivedAtEpochMs,
|
|
5391
5396
|
hubForwardedAtEpochMs,
|
package/hub/src/server.js
CHANGED
|
@@ -170,19 +170,27 @@ function readPositiveIntegerEnv(name, fallback) {
|
|
|
170
170
|
function handleRemoteHubEvent(type, event) {
|
|
171
171
|
liveDeskUpdateManager?.handleRemoteEvent(type, event);
|
|
172
172
|
hubTransferJobs?.handleRemoteEvent(type, event);
|
|
173
|
-
if (type === 'RemoteInputApplied') {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
if (type === 'RemoteInputApplied') {
|
|
174
|
+
const targetConnectionId = String(event?.hubConnectionId || '').trim();
|
|
175
|
+
for (const ws of inputClients) {
|
|
176
|
+
if (targetConnectionId && ws.liveDeskInputClientId !== targetConnectionId) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
sendJson(ws, {
|
|
180
|
+
type: 'RemoteInputApplied',
|
|
181
|
+
...event
|
|
178
182
|
});
|
|
179
183
|
}
|
|
180
184
|
return;
|
|
181
|
-
}
|
|
185
|
+
}
|
|
182
186
|
if (type === 'RemoteInputError') {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
const targetConnectionId = String(event?.hubConnectionId || '').trim();
|
|
188
|
+
for (const ws of inputClients) {
|
|
189
|
+
if (targetConnectionId && ws.liveDeskInputClientId !== targetConnectionId) {
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
sendJson(ws, {
|
|
193
|
+
type: 'RemoteInputError',
|
|
186
194
|
...event
|
|
187
195
|
});
|
|
188
196
|
}
|
|
@@ -4212,7 +4220,12 @@ inputWss.on('connection', ws => {
|
|
|
4212
4220
|
return;
|
|
4213
4221
|
}
|
|
4214
4222
|
const deviceId = String(payload?.deviceId || '').trim();
|
|
4215
|
-
const inputEventId = String(
|
|
4223
|
+
const inputEventId = String(
|
|
4224
|
+
payload?.input?.inputEventId
|
|
4225
|
+
|| payload?.inputEventId
|
|
4226
|
+
|| payload?.requestId
|
|
4227
|
+
|| ''
|
|
4228
|
+
).trim() || crypto.randomUUID();
|
|
4216
4229
|
const input = payload?.input && typeof payload.input === 'object'
|
|
4217
4230
|
? { ...payload.input, inputEventId, hubConnectionId: ws.liveDeskInputClientId, hubReceivedAtEpochMs: Date.now() }
|
|
4218
4231
|
: { ...payload, inputEventId, hubConnectionId: ws.liveDeskInputClientId, hubReceivedAtEpochMs: Date.now() };
|
|
@@ -4224,11 +4237,14 @@ inputWss.on('connection', ws => {
|
|
|
4224
4237
|
if (fireAndForget && result?.ok) {
|
|
4225
4238
|
return;
|
|
4226
4239
|
}
|
|
4227
|
-
sendJson(ws, {
|
|
4228
|
-
type: result?.ok ? 'RemoteInputQueued' : 'RemoteInputError',
|
|
4229
|
-
requestId: payload?.requestId || '',
|
|
4230
|
-
deviceId,
|
|
4231
|
-
|
|
4240
|
+
sendJson(ws, {
|
|
4241
|
+
type: result?.ok ? 'RemoteInputQueued' : 'RemoteInputError',
|
|
4242
|
+
requestId: payload?.requestId || '',
|
|
4243
|
+
deviceId,
|
|
4244
|
+
inputSeq: Number(input?.inputSeq || 0) || 0,
|
|
4245
|
+
inputEventId: String(input?.inputEventId || ''),
|
|
4246
|
+
hubConnectionId: ws.liveDeskInputClientId,
|
|
4247
|
+
result,
|
|
4232
4248
|
timestamp: new Date().toISOString()
|
|
4233
4249
|
});
|
|
4234
4250
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "livedesk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"livedeskClientVersion": "0.1.
|
|
3
|
+
"version": "0.1.434",
|
|
4
|
+
"livedeskClientVersion": "0.1.191",
|
|
5
5
|
"buildFlavor": "production",
|
|
6
6
|
"description": "LiveDesk Hub and client launcher",
|
|
7
7
|
"type": "module",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"ws": "^8.18.3"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"@livedesk/fast-linux-x64": "0.1.
|
|
54
|
-
"@livedesk/fast-osx-arm64": "0.1.
|
|
55
|
-
"@livedesk/fast-osx-x64": "0.1.
|
|
56
|
-
"@livedesk/fast-win-x64": "0.1.
|
|
53
|
+
"@livedesk/fast-linux-x64": "0.1.398",
|
|
54
|
+
"@livedesk/fast-osx-arm64": "0.1.398",
|
|
55
|
+
"@livedesk/fast-osx-x64": "0.1.398",
|
|
56
|
+
"@livedesk/fast-win-x64": "0.1.398"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|