clawfix 0.2.0 → 0.2.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/bin/clawfix.js +8 -2
  2. package/package.json +1 -1
package/bin/clawfix.js CHANGED
@@ -190,7 +190,10 @@ Examples:
190
190
  const gatewayPort = config?.gateway?.port || 18789;
191
191
  const gatewayPid = run('pgrep -f "openclaw.*gateway"') || '';
192
192
 
193
- console.log(` Status: ${gatewayStatus.split('\n')[0]}`);
193
+ // Extract the actual status line, not config warnings
194
+ const statusLine = gatewayStatus.split('\n').find(l => /runtime:|listening|running|stopped|not running/i.test(l))
195
+ || gatewayStatus.split('\n')[0];
196
+ console.log(` Status: ${statusLine.trim()}`);
194
197
  if (gatewayPid) console.log(` PID: ${gatewayPid}`);
195
198
  console.log(` Port: ${gatewayPort}`);
196
199
 
@@ -296,7 +299,10 @@ Examples:
296
299
 
297
300
  const issues = [];
298
301
 
299
- if (/error|not running|failed/i.test(gatewayStatus)) {
302
+ // Check actual gateway status — ignore config warnings in output
303
+ const gatewayRunning = /running.*pid|state active|listening/i.test(gatewayStatus);
304
+ const gatewayFailed = /not running|failed to start|stopped|inactive/i.test(gatewayStatus);
305
+ if (gatewayFailed || (!gatewayRunning && !/warning/i.test(gatewayStatus))) {
300
306
  issues.push({ severity: 'critical', text: 'Gateway is not running' });
301
307
  }
302
308
  if (/EADDRINUSE/i.test(errorLogs)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawfix",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "AI-powered diagnostic and repair for OpenClaw installations",
5
5
  "bin": {
6
6
  "clawfix": "./bin/clawfix.js"