nextclaw 0.9.12 → 0.9.13

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/dist/cli/index.js CHANGED
@@ -1925,7 +1925,7 @@ var DiagnosticsCommands = class {
1925
1925
  });
1926
1926
  if (opts.json) {
1927
1927
  console.log(JSON.stringify(report, null, 2));
1928
- process.exitCode = report.exitCode;
1928
+ process.exitCode = 0;
1929
1929
  return;
1930
1930
  }
1931
1931
  console.log(`${this.deps.logo} ${APP_NAME} Status`);
@@ -1978,7 +1978,7 @@ var DiagnosticsCommands = class {
1978
1978
  console.log(line);
1979
1979
  }
1980
1980
  }
1981
- process.exitCode = report.exitCode;
1981
+ process.exitCode = 0;
1982
1982
  }
1983
1983
  async doctor(opts = {}) {
1984
1984
  const report = await this.collectRuntimeStatus({
@@ -2148,7 +2148,7 @@ var DiagnosticsCommands = class {
2148
2148
  }
2149
2149
  const logTail = params.verbose ? this.readLogTail(serviceState?.logPath ?? resolveServiceLogPath(), 25) : [];
2150
2150
  const level = running ? managedHealth.state === "ok" ? issues.length > 0 ? "degraded" : "healthy" : "degraded" : "stopped";
2151
- const exitCode = level === "healthy" ? 0 : level === "degraded" ? 1 : 2;
2151
+ const exitCode = 0;
2152
2152
  return {
2153
2153
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
2154
2154
  configPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextclaw",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -8,13 +8,14 @@ This guide covers installation, configuration, channels, tools, automation, and
8
8
 
9
9
  ## AI Self-Management Contract
10
10
 
11
- When NextClaw AI needs to operate the product itself (status/doctor/channels/config/cron), follow these rules:
11
+ When NextClaw AI needs to operate the product itself (version/status/doctor/channels/config/cron), follow these rules:
12
12
 
13
13
  1. **Read this guide first** (`USAGE.md`) before executing management commands.
14
- 2. **Prefer machine-readable output** (`--json`) whenever available.
15
- 3. **Close the loop after changes** with `nextclaw status --json` (and `nextclaw doctor --json` when needed).
16
- 4. **Be explicit about restart semantics** (hot-apply, auto-restart, or manual restart required).
17
- 5. **Never invent commands**; use documented commands or `nextclaw --help` / `nextclaw <subcommand> --help`.
14
+ 2. **Use the exact command for the intent**: use `nextclaw --version` for version lookup; do not infer version from `status`.
15
+ 3. **Prefer machine-readable output** (`--json`) whenever available.
16
+ 4. **Close the loop after changes** with `nextclaw status --json` (and `nextclaw doctor --json` when needed).
17
+ 5. **Be explicit about restart semantics** (hot-apply, auto-restart, or manual restart required).
18
+ 6. **Never invent commands**; use documented commands or `nextclaw --help` / `nextclaw <subcommand> --help`.
18
19
 
19
20
  ---
20
21
 
@@ -421,6 +422,7 @@ Created under the workspace:
421
422
  | `nextclaw ui` | Start UI and gateway in the foreground |
422
423
  | `nextclaw gateway` | Start gateway only (for channels) |
423
424
  | `nextclaw serve` | Run gateway + UI in the foreground (no background) |
425
+ | `nextclaw --version` | Show the installed NextClaw version |
424
426
  | `nextclaw agent -m "message"` | Send a one-off message to the agent |
425
427
  | `nextclaw agent` | Interactive chat in the terminal |
426
428
  | `nextclaw agent --session <id> --model <model>` | Use a session-specific model/provider route (sticky for that session) |
@@ -460,8 +462,9 @@ If service is already running, new UI port flags do not hot-apply; use `nextclaw
460
462
 
461
463
  Status/diagnostics tips:
462
464
 
465
+ - `nextclaw --version` is the only supported way to query the installed CLI version.
463
466
  - `nextclaw status` shows runtime truth (process + health + config summary).
464
- - `nextclaw status --json` outputs machine-readable status and sets exit code (`0` healthy, `1` degraded, `2` stopped).
467
+ - `nextclaw status --json` outputs machine-readable status and exits `0` when the command itself succeeds; use the JSON `level` field (`healthy` / `degraded` / `stopped`) to interpret runtime state.
465
468
  - `nextclaw status --fix` safely clears stale service state if PID is dead.
466
469
  - `nextclaw doctor` runs additional checks (state coherence, health, port availability, provider readiness).
467
470