cc-claw 0.19.0 → 0.19.1

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/dist/cli.js +25 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -33,7 +33,7 @@ var VERSION;
33
33
  var init_version = __esm({
34
34
  "src/version.ts"() {
35
35
  "use strict";
36
- VERSION = true ? "0.19.0" : (() => {
36
+ VERSION = true ? "0.19.1" : (() => {
37
37
  try {
38
38
  return JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
39
39
  } catch {
@@ -27405,19 +27405,20 @@ async function doctorCommand(globalOpts, localOpts) {
27405
27405
  else if (/spawn timeout|timeout after \d+s/i.test(line)) spawnTimeout++;
27406
27406
  else other++;
27407
27407
  }
27408
+ const logFix = "cc-claw doctor --fix to clear stale errors";
27408
27409
  if (rate429 > 10) {
27409
- checks.push({ name: "Telegram rate limits", status: "error", message: `${rate429} rate-limit (429) errors in last 24h \u2014 message delivery blocked`, fix: "cc-claw logs --error" });
27410
+ checks.push({ name: "Telegram rate limits", status: "error", message: `${rate429} rate-limit (429) errors in last 24h \u2014 message delivery blocked`, fix: logFix });
27410
27411
  } else if (rate429 > 0) {
27411
- checks.push({ name: "Telegram rate limits", status: "warning", message: `${rate429} rate-limit (429) errors in last 24h`, fix: "cc-claw logs --error" });
27412
+ checks.push({ name: "Telegram rate limits", status: "warning", message: `${rate429} rate-limit (429) errors in last 24h`, fix: logFix });
27412
27413
  }
27413
27414
  if (contentSilence > 0) {
27414
- checks.push({ name: "Content silence", status: "warning", message: `${contentSilence} agent silence timeout(s) in last 24h \u2014 API went unresponsive`, fix: "cc-claw logs --error" });
27415
+ checks.push({ name: "Content silence", status: "warning", message: `${contentSilence} agent silence timeout(s) in last 24h \u2014 API went unresponsive`, fix: logFix });
27415
27416
  }
27416
27417
  if (spawnTimeout > 0) {
27417
- checks.push({ name: "Spawn timeouts", status: "warning", message: `${spawnTimeout} backend timeout(s) in last 24h`, fix: "cc-claw logs --error" });
27418
+ checks.push({ name: "Spawn timeouts", status: "warning", message: `${spawnTimeout} backend timeout(s) in last 24h`, fix: logFix });
27418
27419
  }
27419
27420
  if (other > 0) {
27420
- checks.push({ name: "Other errors", status: "warning", message: `${other} other error(s) in last 24h`, fix: "cc-claw logs --error" });
27421
+ checks.push({ name: "Other errors", status: "warning", message: `${other} other error(s) in last 24h`, fix: logFix });
27421
27422
  }
27422
27423
  if (rate429 === 0 && contentSilence === 0 && spawnTimeout === 0 && other === 0) {
27423
27424
  checks.push({ name: "Recent errors", status: "ok", message: "none in last 24h" });
@@ -27508,6 +27509,21 @@ async function doctorCommand(globalOpts, localOpts) {
27508
27509
  }
27509
27510
  }
27510
27511
  }
27512
+ const errorChecks = checks.filter(
27513
+ (c) => ["Telegram rate limits", "Content silence", "Spawn timeouts", "Other errors"].includes(c.name) && c.status !== "ok"
27514
+ );
27515
+ if (errorChecks.length > 0 && existsSync30(ERROR_LOG_PATH)) {
27516
+ try {
27517
+ const { writeFileSync: writeFileSync13 } = await import("fs");
27518
+ writeFileSync13(ERROR_LOG_PATH, "");
27519
+ for (const c of errorChecks) {
27520
+ c.status = "ok";
27521
+ c.message = "cleared (log truncated)";
27522
+ delete c.fix;
27523
+ }
27524
+ } catch {
27525
+ }
27526
+ }
27511
27527
  }
27512
27528
  const errors = checks.filter((c) => c.status === "error").length;
27513
27529
  const warnings = checks.filter((c) => c.status === "warning").length;
@@ -27533,8 +27549,9 @@ async function doctorCommand(globalOpts, localOpts) {
27533
27549
  lines.push(` ${parts.join(", ")}`);
27534
27550
  const fixable = r.checks.filter((c) => c.fix);
27535
27551
  if (fixable.length > 0 && !localOpts.fix) {
27536
- for (const f of fixable) {
27537
- lines.push(muted(` Fix: ${f.fix}`));
27552
+ const uniqueFixes = [...new Set(fixable.map((f) => f.fix))];
27553
+ for (const fix of uniqueFixes) {
27554
+ lines.push(muted(` Fix: ${fix}`));
27538
27555
  }
27539
27556
  }
27540
27557
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-claw",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "CC-Claw: Personal AI assistant on Telegram — multi-backend (Claude, Gemini, Codex, Cursor), sub-agent orchestration, MCP management",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",