livedesk 0.1.229 → 0.1.230

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.
@@ -4565,8 +4565,6 @@ export function createRemoteHub(options = {}) {
4565
4565
 
4566
4566
  function requestAgentTask(deviceId, options = {}) {
4567
4567
  const device = devices.get(String(deviceId || ''));
4568
- const denied = policyError(device, 'allowAgent');
4569
- if (denied) return { ok: false, error: denied };
4570
4568
  const requestedOperation = safeString(options.operation, 80);
4571
4569
  const operation = normalizeAgentOperation(requestedOperation);
4572
4570
  if (requestedOperation && !operation) {
@@ -4575,6 +4573,8 @@ export function createRemoteHub(options = {}) {
4575
4573
  if (!device) {
4576
4574
  return { ok: false, error: 'device-not-found' };
4577
4575
  }
4576
+ const denied = policyError(device, 'allowAgent');
4577
+ if (denied) return { ok: false, error: denied };
4578
4578
 
4579
4579
  if (device?.synthetic === true && device.connected) {
4580
4580
  const instruction = safeText(options.instruction, MAX_AGENT_TASK_CHARS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livedesk",
3
- "version": "0.1.229",
3
+ "version": "0.1.230",
4
4
  "description": "LiveDesk Hub and client launcher",
5
5
  "type": "module",
6
6
  "bin": {