clawtool 0.1.0 → 0.1.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.
- package/dist/rules.js +24 -0
- package/package.json +1 -1
package/dist/rules.js
CHANGED
|
@@ -4,6 +4,12 @@ exports.runRules = runRules;
|
|
|
4
4
|
function runRules(obs) {
|
|
5
5
|
const findings = [];
|
|
6
6
|
const gw = (obs.gatewayStatus || '').toLowerCase();
|
|
7
|
+
const combined = [
|
|
8
|
+
obs.openclawStatus || '',
|
|
9
|
+
obs.gatewayStatus || '',
|
|
10
|
+
obs.officialDoctorOutput || '',
|
|
11
|
+
obs.recentLogs || '',
|
|
12
|
+
].join('\n').toLowerCase();
|
|
7
13
|
if (gw.includes('not running')) {
|
|
8
14
|
findings.push({
|
|
9
15
|
id: 'gateway-not-running',
|
|
@@ -40,5 +46,23 @@ function runRules(obs) {
|
|
|
40
46
|
fix: 'openclaw doctor --yes',
|
|
41
47
|
});
|
|
42
48
|
}
|
|
49
|
+
if (/service not installed|service unit not found|could not find service "ai\.openclaw\.gateway"|launchagent \(not loaded\)/i.test(combined)) {
|
|
50
|
+
findings.push({
|
|
51
|
+
id: 'gateway-service-not-installed',
|
|
52
|
+
severity: 'critical',
|
|
53
|
+
title: 'OpenClaw gateway service is not installed or not loaded',
|
|
54
|
+
description: 'LaunchAgent service is missing/unloaded, so gateway cannot stay up.',
|
|
55
|
+
fix: 'openclaw gateway install && openclaw gateway start',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (/rpc probe:\s*failed|gateway closed \(1006|abnormal closure|runtime:\s*unknown/i.test(combined)) {
|
|
59
|
+
findings.push({
|
|
60
|
+
id: 'gateway-probe-failed',
|
|
61
|
+
severity: 'critical',
|
|
62
|
+
title: 'Gateway RPC probe is failing',
|
|
63
|
+
description: 'Gateway endpoint is not accepting stable RPC connections.',
|
|
64
|
+
fix: 'openclaw gateway restart',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
43
67
|
return findings;
|
|
44
68
|
}
|