@onklave/agent-cli 0.1.44 → 0.1.45

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.
Files changed (2) hide show
  1. package/main.js +16 -2
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -285,6 +285,20 @@ async function loginCommand(args) {
285
285
  process.exitCode = 1;
286
286
  return;
287
287
  }
288
+ const linkingTokenPrefixes = ["ok_link_", "ok_worker_", "ok_device_"];
289
+ if (linkingTokenPrefixes.some((prefix) => token.startsWith(prefix))) {
290
+ console.error(
291
+ "That looks like a worker/device linking token, not a login credential.\n"
292
+ );
293
+ console.error(
294
+ "Linking tokens register a machine \u2014 use: onklave register --token <token>"
295
+ );
296
+ console.error(
297
+ "To log in, generate a CLI token in the Portal under Settings > API Tokens."
298
+ );
299
+ process.exitCode = 1;
300
+ return;
301
+ }
288
302
  const metadata = {};
289
303
  if (typeof platformUrl === "string") {
290
304
  metadata.platformUrl = platformUrl;
@@ -2891,8 +2905,8 @@ async function registerCommand(args) {
2891
2905
  console.log(" onklave register --refresh # re-detect capabilities");
2892
2906
  console.log("\nTo obtain a linking token:");
2893
2907
  console.log(" 1. Log in to the Onklave Portal");
2894
- console.log(" 2. Navigate to Settings > Machines");
2895
- console.log(' 3. Click "Register Machine" to generate a linking token');
2908
+ console.log(" 2. Navigate to Worker Nodes");
2909
+ console.log(' 3. Click "Add Worker Node" to generate a linking token');
2896
2910
  process.exitCode = 1;
2897
2911
  return;
2898
2912
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onklave/agent-cli",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "Onklave Agent CLI — local agent runner with cloud orchestration",
5
5
  "bin": {
6
6
  "onklave": "./main.js"