@livedesk/client 0.1.208 → 0.1.210

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.
@@ -1432,9 +1432,11 @@ function remotePolicyAllows(options, command) {
1432
1432
  const policy = options.effectivePolicy;
1433
1433
  if (!policy || typeof policy !== 'object') return { ok: true };
1434
1434
  if (policy.accessMode === 'block-remote-access') return { ok: false, error: 'remote-access-blocked-by-settings' };
1435
- const required = command === 'input.control'
1436
- ? ['allowControl']
1437
- : command.startsWith('file.transfer')
1435
+ const required = command === 'input.control'
1436
+ ? ['allowControl']
1437
+ : command === 'system.power'
1438
+ ? ['allowPowerActions']
1439
+ : command.startsWith('file.transfer')
1438
1440
  ? ['allowFileTransfer']
1439
1441
  : command === 'audio.start'
1440
1442
  ? ['allowRemoteAudio']
@@ -2044,8 +2046,8 @@ function connectOnce(options, deviceId) {
2044
2046
 
2045
2047
  const message = JSON.parse(line);
2046
2048
  if (message.type === 'welcome') {
2047
- options.effectivePolicy = message.effectivePolicy && typeof message.effectivePolicy === 'object'
2048
- ? message.effectivePolicy
2049
+ options.effectivePolicy = message.effectivePolicy && typeof message.effectivePolicy === 'object'
2050
+ ? message.effectivePolicy
2049
2051
  : null;
2050
2052
  console.log(`Connected to LiveDesk Hub as ${options.name} (${deviceId})`);
2051
2053
  markClientUpdateConnected();
@@ -2058,13 +2060,17 @@ function connectOnce(options, deviceId) {
2058
2060
  return;
2059
2061
  }
2060
2062
 
2061
- heartbeatTimer = setInterval(() => {
2062
- writeJsonLine(socket, {
2063
- type: 'status',
2064
- status: getStatus(options)
2065
- });
2066
- }, options.heartbeatMs);
2067
- } else if (message.type === 'command') {
2063
+ heartbeatTimer = setInterval(() => {
2064
+ writeJsonLine(socket, {
2065
+ type: 'status',
2066
+ status: getStatus(options)
2067
+ });
2068
+ }, options.heartbeatMs);
2069
+ } else if (message.type === 'policy.update') {
2070
+ options.effectivePolicy = message.effectivePolicy && typeof message.effectivePolicy === 'object'
2071
+ ? message.effectivePolicy
2072
+ : options.effectivePolicy;
2073
+ } else if (message.type === 'command') {
2068
2074
  handleRemoteCommand(socket, options, message, () => {
2069
2075
  frameSeq += 1;
2070
2076
  return frameSeq;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livedesk/client",
3
- "version": "0.1.208",
3
+ "version": "0.1.210",
4
4
  "description": "LiveDesk local remote client",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,10 +40,10 @@
40
40
  "ws": "^8.18.3"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@livedesk/fast-linux-x64": "0.1.413",
44
- "@livedesk/fast-osx-arm64": "0.1.413",
45
- "@livedesk/fast-osx-x64": "0.1.413",
46
- "@livedesk/fast-win-x64": "0.1.413"
43
+ "@livedesk/fast-linux-x64": "0.1.415",
44
+ "@livedesk/fast-osx-arm64": "0.1.415",
45
+ "@livedesk/fast-osx-x64": "0.1.415",
46
+ "@livedesk/fast-win-x64": "0.1.415"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"