@commonlyai/cli 0.1.206 → 0.1.207

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.206",
3
+ "version": "0.1.207",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -3713,6 +3713,7 @@ Docs:
3713
3713
  agentName: opts.name,
3714
3714
  instanceId: opts.instanceId,
3715
3715
  intervalMs: parseInt(opts.interval, 10),
3716
+ loginInstance: opts.instance,
3716
3717
  onEvent: async (event) => {
3717
3718
  const ts = new Date().toTimeString().slice(0, 8);
3718
3719
  process.stdout.write(`[${ts}] ${event.type.padEnd(18)}`);
package/src/lib/poller.js CHANGED
@@ -36,6 +36,7 @@ export const startPoller = ({
36
36
  agentName,
37
37
  instanceId = 'default',
38
38
  intervalMs = 5000,
39
+ loginInstance, // the --instance the connect ran with, so the login hint names it
39
40
  onEvent, // async (event) => { outcome, content? }
40
41
  onError, // (err) => void
41
42
  }) => {
@@ -139,7 +140,9 @@ export const startPoller = ({
139
140
  if (consecutiveAuthErrors >= MAX_AUTH_ERRORS) {
140
141
  onError?.(new Error(
141
142
  `Runtime token rejected ${consecutiveAuthErrors} times in a row — stopping poller. `
142
- + `The token is likely revoked.`,
143
+ + `This connection takes its key from --token, then COMMONLY_TOKEN, then your saved login. `
144
+ + `If the key was rotated or revoked, re-run with the new key in --token or COMMONLY_TOKEN; `
145
+ + `with neither set, run commonly login${loginInstance ? ` --instance ${loginInstance}` : ''}.`,
143
146
  ));
144
147
  running = false;
145
148
  return;