@livedesk/client 0.1.21 → 0.1.23

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/README.md CHANGED
@@ -7,14 +7,14 @@ npx @livedesk/client
7
7
  npx @livedesk/client 3
8
8
  ```
9
9
 
10
- The default flow opens Google sign-in, waits for the active LiveDesk manager
11
- published by the same account, and connects locally. If the manager is not
10
+ The default flow opens Google sign-in, waits for the active LiveDesk Hub
11
+ published by the same account, and connects locally. If the Hub is not
12
12
  ready yet, the client keeps checking every 5 seconds instead of exiting. Omit the
13
13
  number for first-available placement, or pass `1` to `999` to pin this machine
14
14
  to a screen wall slot.
15
15
 
16
- On the manager computer, open the LiveDesk dashboard and sign in first. The
17
- dashboard keeps its local hub address and private pair token refreshed in the
16
+ On the Hub computer, open the LiveDesk dashboard and sign in first. The
17
+ dashboard keeps its local Hub address and private pair token refreshed in the
18
18
  LiveDesk Supabase registry for the signed-in account.
19
19
 
20
20
  Supabase Auth must allow the CLI callback URL:
@@ -27,11 +27,11 @@ If you use a custom port, run `npx @livedesk/client --auth-port 5200` and add
27
27
  the matching callback URL to Supabase Auth redirect URLs.
28
28
 
29
29
  The client registers the device, sends status heartbeats, can return
30
- manager-requested thumbnails, can stream a focused view-only live screen, and
30
+ Hub-requested thumbnails, can stream a focused view-only live screen, and
31
31
  can receive safe task-only instructions. The C# RemoteFast engine also supports
32
32
  keyboard/mouse control, file transfer, and Windows system-audio loopback
33
- playback. When file transfer is enabled by the manager, received files are saved
34
- to `Desktop/LiveDeskFiles` unless the manager sets another destination folder.
33
+ playback. When file transfer is enabled by the Hub, received files are saved
34
+ to `Desktop/LiveDeskFiles` unless the Hub sets another destination folder.
35
35
 
36
36
  By default, the launcher uses the packaged C# RemoteFast engine when supported.
37
37
  It falls back to the Node engine for AI assist or when a compatible RemoteFast
@@ -6,7 +6,7 @@ import path from 'path';
6
6
  import crypto from 'crypto';
7
7
  import { promises as fs, statfsSync } from 'fs';
8
8
 
9
- const AGENT_VERSION = '0.1.21-livedesk.1';
9
+ const AGENT_VERSION = '0.1.23-livedesk.1';
10
10
  const DEFAULT_MANAGER = '127.0.0.1:5197';
11
11
  const DEFAULT_HEARTBEAT_MS = 5000;
12
12
  const DEFAULT_RECONNECT_MS = 5000;
@@ -27,8 +27,8 @@ Usage:
27
27
  npx @livedesk/client connect --manager 127.0.0.1:5197 --pair <token>
28
28
 
29
29
  Options:
30
- --manager <host:port> RemoteHub address. Default: ${DEFAULT_MANAGER}
31
- --pair <token> RemoteHub pairing token. Can also use LIVEDESK_CLIENT_PAIR_TOKEN.
30
+ --manager <host:port> LiveDesk Hub address. Default: ${DEFAULT_MANAGER}
31
+ --pair <token> LiveDesk Hub pairing token. Can also use LIVEDESK_CLIENT_PAIR_TOKEN.
32
32
  --slot <number> Screen wall slot number for this computer.
33
33
  --name <name> Friendly device name. Default: OS hostname.
34
34
  --heartbeat <ms> Status heartbeat interval. Default: ${DEFAULT_HEARTBEAT_MS}
@@ -45,8 +45,8 @@ Options:
45
45
  --ai-model <model> OpenAI model for AI assist. Default: ${DEFAULT_AI_MODEL}
46
46
  --fake-ai Use deterministic AI assist responses for smoke tests.
47
47
  --fake-thumbnail Use generated thumbnail frames for smoke tests.
48
- --exit-on-disconnect Exit after manager disconnect. Useful for tests.
49
- --exit-on-invalid-pair Exit when the manager rejects the pair token.
48
+ --exit-on-disconnect Exit after Hub disconnect. Useful for tests.
49
+ --exit-on-invalid-pair Exit when the Hub rejects the pair token.
50
50
  --once Connect, send one status packet, and exit after welcome.
51
51
  --version Show the agent version.
52
52
  --help Show this help.
@@ -587,14 +587,14 @@ function buildAiPrompt(options, payload, instruction) {
587
587
  const title = String(payload?.title || 'Remote AI task').trim();
588
588
  return [
589
589
  'You are the LiveDesk client AI assistant running on a controlled remote computer.',
590
- 'Complete the manager task as a text-only assistant.',
590
+ 'Complete the LiveDesk Hub task as a text-only assistant.',
591
591
  'Do not claim you used shell commands, file writes, browser automation, keyboard input, or mouse input.',
592
592
  'If the task requires external side effects, explain what would be needed and stop.',
593
593
  '',
594
594
  `Device: ${options.name} (${os.hostname()}, ${os.platform()} ${os.release()}, ${os.arch()})`,
595
595
  `Task title: ${title}`,
596
596
  '',
597
- 'Manager instruction:',
597
+ 'Hub instruction:',
598
598
  instruction
599
599
  ].join('\n');
600
600
  }
@@ -1082,7 +1082,7 @@ function connectOnce(options, deviceId) {
1082
1082
 
1083
1083
  const message = JSON.parse(line);
1084
1084
  if (message.type === 'welcome') {
1085
- console.log(`Connected to RemoteHub as ${options.name} (${deviceId})`);
1085
+ console.log(`Connected to LiveDesk Hub as ${options.name} (${deviceId})`);
1086
1086
  writeJsonLine(socket, {
1087
1087
  type: 'status',
1088
1088
  status: getStatus(options)
@@ -1113,7 +1113,7 @@ function connectOnce(options, deviceId) {
1113
1113
  finish();
1114
1114
  return;
1115
1115
  } else if (message.type === 'error') {
1116
- const remoteError = new Error(message.error || 'RemoteHub rejected the connection.');
1116
+ const remoteError = new Error(message.error || 'LiveDesk Hub rejected the connection.');
1117
1117
  if (message.error === 'invalid-pair-token' && options.exitOnInvalidPair) {
1118
1118
  remoteError.exitCode = EXIT_INVALID_PAIR_TOKEN;
1119
1119
  }
@@ -1130,7 +1130,7 @@ function connectOnce(options, deviceId) {
1130
1130
 
1131
1131
  async function connectWithRetry(options) {
1132
1132
  if (!options.pair) {
1133
- throw new Error('Missing --pair token. Get it from the manager RemoteHub status.');
1133
+ throw new Error('Missing --pair token. Sign in with Google or get it from LiveDesk Hub status.');
1134
1134
  }
1135
1135
 
1136
1136
  const deviceId = await getDeviceId(options.deviceId);
@@ -1158,7 +1158,7 @@ async function connectWithRetry(options) {
1158
1158
  throw err;
1159
1159
  }
1160
1160
  const delayMs = DEFAULT_RECONNECT_MS;
1161
- console.error(`RemoteHub connection failed: ${err?.message || err}. Retrying in ${delayMs}ms.`);
1161
+ console.error(`LiveDesk Hub connection failed: ${err?.message || err}. Retrying in ${delayMs}ms.`);
1162
1162
  await wait(delayMs);
1163
1163
  }
1164
1164
  }
@@ -32,9 +32,9 @@ Usage:
32
32
  npx @livedesk/client 3
33
33
 
34
34
  Default flow:
35
- Opens Google sign-in, waits for the signed-in manager, and connects locally.
35
+ Opens Google sign-in, waits for the signed-in LiveDesk Hub, and connects locally.
36
36
  Omit the number for first-available placement, or pass 1-999 to pin a slot.
37
- If no manager is active yet, the client keeps checking every 5 seconds.
37
+ If no LiveDesk Hub is active yet, the client keeps checking every 5 seconds.
38
38
 
39
39
  Options:
40
40
  --slot <number> Screen wall slot number for this computer.
@@ -53,7 +53,7 @@ Options:
53
53
  --files-dir <path> Default folder for received files.
54
54
  --tasks Enable safe remote task inbox.
55
55
  --no-tasks Disable remote task dispatch capability.
56
- --login Sign in with Google and auto-discover manager.
56
+ --login Sign in with Google and auto-discover the Hub.
57
57
  --logout Forget saved Google session before connecting.
58
58
  --auth-port <port> Google sign-in callback port. Default: 5198.
59
59
  --version Show the agent version.
@@ -542,21 +542,21 @@ async function resolveManagerFromSupabase(supabase, options = {}) {
542
542
  throw error;
543
543
  }
544
544
  if (!data?.active) {
545
- throw new Error('No active LiveDesk manager was found for this Google account. Start LiveDesk on the manager computer and sign in there first.');
545
+ throw new Error('No active LiveDesk Hub was found for this Google account. Start LiveDesk Hub on the screen wall computer and sign in there first.');
546
546
  }
547
547
  if (data.expires_at && Date.parse(data.expires_at) <= Date.now()) {
548
- throw new Error('The LiveDesk manager record is expired. Open the manager screen again while signed in.');
548
+ throw new Error('The LiveDesk Hub record is expired. Open the Hub screen again while signed in.');
549
549
  }
550
550
  if (!data.pair_token) {
551
- throw new Error('The LiveDesk manager record is missing its private connection token.');
551
+ throw new Error('The LiveDesk Hub record is missing its private connection token.');
552
552
  }
553
553
  const endpointCandidates = normalizeEndpointCandidates(data);
554
554
  if (endpointCandidates.length === 0) {
555
- throw new Error('The LiveDesk manager record does not contain a reachable local address.');
555
+ throw new Error('The LiveDesk Hub record does not contain a reachable local address.');
556
556
  }
557
557
  const manager = await chooseReachableEndpoint(endpointCandidates, { requireReachable: options.requireReachable === true });
558
558
  if (!manager) {
559
- throw new Error(`No reachable LiveDesk manager endpoint yet. Checked ${endpointCandidates.join(', ')}.`);
559
+ throw new Error(`No reachable LiveDesk Hub endpoint yet. Checked ${endpointCandidates.join(', ')}.`);
560
560
  }
561
561
  return {
562
562
  manager,
@@ -570,7 +570,7 @@ async function waitForManagerFromSupabase(supabase, options = {}) {
570
570
  const intervalSeconds = Math.max(1, Math.round(intervalMs / 1000));
571
571
  let attempts = 0;
572
572
  let lastMessage = '';
573
- console.log(`Waiting for a LiveDesk manager. This client will keep trying every ${intervalSeconds}s.`);
573
+ console.log(`Waiting for a LiveDesk Hub. This client will keep trying every ${intervalSeconds}s.`);
574
574
  while (true) {
575
575
  attempts += 1;
576
576
  try {
@@ -579,7 +579,7 @@ async function waitForManagerFromSupabase(supabase, options = {}) {
579
579
  const message = err instanceof Error ? err.message : String(err);
580
580
  if (message !== lastMessage || attempts === 1 || attempts % 6 === 0) {
581
581
  const suffix = attempts === 1 ? '' : ` attempt ${attempts}`;
582
- console.log(`Still waiting for LiveDesk manager${suffix}: ${message}`);
582
+ console.log(`Still waiting for LiveDesk Hub${suffix}: ${message}`);
583
583
  lastMessage = message;
584
584
  }
585
585
  await sleep(intervalMs);
@@ -607,7 +607,7 @@ async function prepareLoginConnection(parsed) {
607
607
  const resolved = await waitForManagerFromSupabase(supabase);
608
608
  manager = resolved.manager;
609
609
  pair = resolved.pair;
610
- console.log(`Found LiveDesk manager at ${manager}.`);
610
+ console.log(`Found LiveDesk Hub at ${manager}.`);
611
611
  }
612
612
 
613
613
  const slot = normalizeSlotNumber(parsed.slot);
@@ -876,7 +876,7 @@ async function main() {
876
876
  return;
877
877
  }
878
878
  if (prepared.rediscoverOnInvalidPair && result?.code === EXIT_INVALID_PAIR_TOKEN) {
879
- console.error(`LiveDesk manager pair token changed. Refreshing manager discovery in ${DISCOVERY_RETRY_MS}ms.`);
879
+ console.error(`LiveDesk Hub pair token changed. Refreshing Hub discovery in ${DISCOVERY_RETRY_MS}ms.`);
880
880
  await sleep(DISCOVERY_RETRY_MS);
881
881
  continue;
882
882
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livedesk/client",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "LiveDesk local remote client",
5
5
  "type": "module",
6
6
  "bin": {