fix(gateway): show connect vs RPC status

This commit is contained in:
Peter Steinberger
2026-01-11 03:54:58 +01:00
parent 054a6d301c
commit 11f897b7df
4 changed files with 17 additions and 3 deletions

View File

@@ -13,6 +13,11 @@
### Fixes
- CLI/Status: replace the footer with a 3-line “Next steps” recommendation (share/debug/probe), and gate probes behind gateway reachability.
## 2026.1.11-8
### Fixes
- CLI/Gateway: clarify that `clawdbot gateway status` reports RPC health (connect + RPC) and shows RPC failures separately from connect failures.
## 2026.1.11-5
### New Features and Changes

View File

@@ -1,6 +1,6 @@
{
"name": "clawdbot",
"version": "2026.1.11-7",
"version": "2026.1.11-8",
"description": "WhatsApp gateway CLI (Baileys web) with Pi RPC agent",
"type": "module",
"main": "dist/index.js",

View File

@@ -324,9 +324,18 @@ function renderProbeSummaryLine(probe: GatewayProbeResult, rich: boolean) {
typeof probe.connectLatencyMs === "number"
? `${probe.connectLatencyMs}ms`
: "unknown";
return `${colorize(rich, theme.success, "Connect: ok")} (${latency})`;
return `${colorize(rich, theme.success, "Connect: ok")} (${latency}) · ${colorize(rich, theme.success, "RPC: ok")}`;
}
const detail = probe.error ? ` - ${probe.error}` : "";
if (probe.connectLatencyMs != null) {
const latency =
typeof probe.connectLatencyMs === "number"
? `${probe.connectLatencyMs}ms`
: "unknown";
return `${colorize(rich, theme.success, "Connect: ok")} (${latency}) · ${colorize(rich, theme.error, "RPC: failed")}${detail}`;
}
return `${colorize(rich, theme.error, "Connect: failed")}${detail}`;
}

View File

@@ -1,5 +1,5 @@
import { spawnSync } from "node:child_process";
import { readFile, writeFile, mkdir, mkdtemp } from "node:fs/promises";
import { mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join, resolve } from "node:path";
import { fileURLToPath } from "node:url";