volclaw 0.3.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 (80) hide show
  1. package/CONTRIBUTING.md +105 -0
  2. package/LICENSE +21 -0
  3. package/README.aiclaw.md +22 -0
  4. package/README.aliclaw.md +22 -0
  5. package/README.autoopenclaw.md +22 -0
  6. package/README.claw-open.md +22 -0
  7. package/README.clawjs.md +22 -0
  8. package/README.fastclaw.md +22 -0
  9. package/README.md +22 -0
  10. package/README.md.bak +242 -0
  11. package/README.megaclaw.md +22 -0
  12. package/README.open-claw.md +22 -0
  13. package/README.openclaw-cli.md +239 -0
  14. package/README.openclaw-daemon.md +239 -0
  15. package/README.openclaw-gateway.md +239 -0
  16. package/README.openclaw-health.md +239 -0
  17. package/README.openclaw-helper.md +239 -0
  18. package/README.openclaw-install.md +239 -0
  19. package/README.openclaw-manage.md +239 -0
  20. package/README.openclaw-monitor.md +239 -0
  21. package/README.openclaw-run.md +239 -0
  22. package/README.openclaw-service.md +239 -0
  23. package/README.openclaw-setup.md +239 -0
  24. package/README.openclaw-start.md +239 -0
  25. package/README.openclaw-tools.md +239 -0
  26. package/README.openclaw-upgrade.md +13 -0
  27. package/README.openclaw-utils.md +239 -0
  28. package/README.openclaw-watch.md +239 -0
  29. package/README.qclaw-cli.md +22 -0
  30. package/README.qclaw.md +22 -0
  31. package/README.smartclaw.md +22 -0
  32. package/README.volclaw.md +22 -0
  33. package/README.zh-CN.md +213 -0
  34. package/app-dist/main.js +300 -0
  35. package/app-dist/package.json +3 -0
  36. package/app-dist/server-process.js +95 -0
  37. package/assets/demo.gif +0 -0
  38. package/assets/welcome.png +0 -0
  39. package/demo.tape +28 -0
  40. package/dist/chunk-LIZ6XXW3.js +1149 -0
  41. package/dist/index.d.ts +2 -0
  42. package/dist/index.js +582 -0
  43. package/dist/server-ZYSNFLSO.js +7 -0
  44. package/homebrew/README.md +37 -0
  45. package/homebrew/openclaw-cli.rb +22 -0
  46. package/homebrew/openclaw-doctor.rb +26 -0
  47. package/package.aiclaw.json +25 -0
  48. package/package.aliclaw.json +25 -0
  49. package/package.autoopenclaw.json +25 -0
  50. package/package.claw-open.json +25 -0
  51. package/package.clawjs.json +25 -0
  52. package/package.fastclaw.json +25 -0
  53. package/package.json +25 -0
  54. package/package.json.bak +51 -0
  55. package/package.megaclaw.json +25 -0
  56. package/package.open-claw.json +25 -0
  57. package/package.openclaw-cli.json +51 -0
  58. package/package.openclaw-daemon.json +51 -0
  59. package/package.openclaw-gateway.json +51 -0
  60. package/package.openclaw-health.json +51 -0
  61. package/package.openclaw-helper.json +51 -0
  62. package/package.openclaw-install.json +51 -0
  63. package/package.openclaw-manage.json +51 -0
  64. package/package.openclaw-monitor.json +51 -0
  65. package/package.openclaw-run.json +51 -0
  66. package/package.openclaw-service.json +51 -0
  67. package/package.openclaw-setup.json +51 -0
  68. package/package.openclaw-start.json +51 -0
  69. package/package.openclaw-tools.json +51 -0
  70. package/package.openclaw-upgrade.json +50 -0
  71. package/package.openclaw-utils.json +51 -0
  72. package/package.openclaw-watch.json +51 -0
  73. package/package.qclaw-cli.json +25 -0
  74. package/package.qclaw.json +25 -0
  75. package/package.smartclaw.json +25 -0
  76. package/package.volclaw.json +25 -0
  77. package/scripts/post-app-compile.cjs +3 -0
  78. package/scripts/post-app-compile.js +7 -0
  79. package/scripts/publish.sh +120 -0
  80. package/scripts/publish.sh.bak +63 -0
@@ -0,0 +1,239 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/Sobranier/openclaw-doctor/main/assets/welcome.png" alt="OpenClaw setup" width="400" />
3
+ </p>
4
+
5
+ <h1 align="center">OpenClaw setup</h1>
6
+
7
+ <p align="center">
8
+ Keep your OpenClaw service alive. Automatically.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="./README.zh-CN.md">中文文档</a>
13
+ </p>
14
+
15
+ ## Get Started
16
+
17
+ ```bash
18
+ npm install -g openclaw-setup
19
+ openclaw-setup watch -d
20
+ ```
21
+
22
+ That's it. Doctor monitors your OpenClaw gateway in the background, restarts it when it goes down, and tells you what happened. Zero configuration needed -- it reads everything from your existing OpenClaw setup.
23
+
24
+ ## Core Commands
25
+
26
+ ```bash
27
+ openclaw-setup watch # Start monitoring (foreground)
28
+ openclaw-setup watch -d # Start monitoring (background)
29
+ openclaw-setup unwatch # Stop monitoring
30
+
31
+ openclaw-setup status # Quick health check
32
+ ```
33
+
34
+ These four commands cover 90% of daily use.
35
+
36
+ ## Gateway Management
37
+
38
+ ```bash
39
+ openclaw-setup gateway start # Start the OpenClaw gateway
40
+ openclaw-setup gateway stop # Stop the gateway
41
+ openclaw-setup gateway restart # Restart the gateway
42
+ ```
43
+
44
+ ## Diagnostics & Logs
45
+
46
+ ```bash
47
+ openclaw-setup doctor # Full diagnostics (binary, gateway, channels)
48
+ openclaw-setup logs # View gateway logs
49
+ openclaw-setup logs --error # View error logs only
50
+ openclaw-setup logs --doctor # View Doctor's own event logs
51
+ openclaw-setup dashboard # Web management UI (http://localhost:9090)
52
+ ```
53
+
54
+ ## Install
55
+
56
+ ```bash
57
+ # npm (recommended)
58
+ npm install -g openclaw-setup
59
+
60
+ # or run without installing
61
+ npx openclaw-setup status
62
+ ```
63
+
64
+ Requires Node >= 22 (same as OpenClaw).
65
+
66
+ ## How It Works
67
+
68
+ Doctor auto-detects your OpenClaw installation:
69
+
70
+ - Reads `~/.openclaw/openclaw.json` for gateway port, channels, agents
71
+ - Finds the launchd service from `~/Library/LaunchAgents/`
72
+ - Checks health via `openclaw health --json` (real gateway RPC, not HTTP)
73
+ - Restarts via `launchctl kickstart` when needed
74
+
75
+ **You don't configure OpenClaw details.** Doctor figures them out.
76
+
77
+ ## All Commands
78
+
79
+ | Command | Description |
80
+ |---------|-------------|
81
+ | **Monitoring** | |
82
+ | `watch` | Start health monitoring (foreground) |
83
+ | `watch -d` | Start health monitoring (background) |
84
+ | `watch -d --dashboard` | Background monitoring + web dashboard |
85
+ | `unwatch` | Stop monitoring |
86
+ | **Gateway** | |
87
+ | `gateway start` | Start the OpenClaw gateway |
88
+ | `gateway stop` | Stop the gateway |
89
+ | `gateway restart` | Restart the gateway |
90
+ | **Info** | |
91
+ | `status` | Show gateway and channel health |
92
+ | `status --json` | Machine-readable JSON output |
93
+ | `doctor` | Run full diagnostics |
94
+ | `dashboard` | Start web management UI |
95
+ | `logs` | Show gateway logs |
96
+ | `logs --error` | Show error logs only |
97
+ | `logs --doctor` | Show Doctor event logs |
98
+
99
+ ## Configuration
100
+
101
+ Config is stored at `~/.openclaw-doctor/config.json`. Created automatically on first run. Only Doctor's own preferences -- no OpenClaw settings needed.
102
+
103
+ ```json
104
+ {
105
+ "checkInterval": 30,
106
+ "failThreshold": 3,
107
+ "dashboardPort": 9090,
108
+ "maxRestartsPerHour": 5,
109
+ "openclawProfile": "default",
110
+ "notify": {
111
+ "webhook": {
112
+ "enabled": false,
113
+ "url": "",
114
+ "bodyTemplate": "{\"msgtype\":\"text\",\"text\":{\"content\":\"{{message}}\"}}"
115
+ },
116
+ "system": {
117
+ "enabled": true
118
+ }
119
+ }
120
+ }
121
+ ```
122
+
123
+ | Field | Description | Default |
124
+ |-------|-------------|---------|
125
+ | `checkInterval` | Seconds between health checks | `30` |
126
+ | `failThreshold` | Consecutive failures before restart | `3` |
127
+ | `dashboardPort` | Web dashboard port | `9090` |
128
+ | `maxRestartsPerHour` | Restart throttle | `5` |
129
+ | `openclawProfile` | OpenClaw profile to monitor (`default`, `dev`, ...) | `default` |
130
+ | `notify.webhook.url` | Webhook for notifications | -- |
131
+ | `notify.system.enabled` | macOS native notifications | `true` |
132
+
133
+ ## Notifications
134
+
135
+ Doctor notifies you across the full lifecycle:
136
+
137
+ | Event | Example |
138
+ |-------|---------|
139
+ | Monitoring started | "Doctor is watching your OpenClaw service" |
140
+ | Health degraded | "Service unhealthy (attempt 2/3)" |
141
+ | Restarting | "Restarting gateway..." |
142
+ | Restart succeeded | "Gateway back online" |
143
+ | Restart failed | "Restart failed: [error]" |
144
+ | Throttled | "Too many restarts, manual intervention needed" |
145
+ | Recovered | "Service recovered on its own" |
146
+ | Monitoring stopped | "Doctor stopped" |
147
+
148
+ Channels: **Webhook** (DingTalk, Feishu, Slack, etc.) + **macOS system notifications**.
149
+
150
+ ## Skills Integration
151
+
152
+ Doctor runs as a standalone daemon, callable by OpenClaw or other tools:
153
+
154
+ ```bash
155
+ openclaw-setup status --json # Machine-readable output
156
+ openclaw-setup watch -d # Idempotent -- safe to call repeatedly
157
+ ```
158
+
159
+ If the caller crashes, Doctor keeps running.
160
+
161
+ ## Architecture
162
+
163
+ ```
164
+ +-----------------+
165
+ | Notification |
166
+ | (Webhook/OS) |
167
+ +--------^--------+
168
+ |
169
+ +-------------+ CLI +--------+--------+ RPC +-----------+
170
+ | OpenClaw | --------> | | ---------> | OpenClaw |
171
+ | / Scripts | | openclaw-doctor | | Gateway |
172
+ | / Skills | <-------- | (daemon) | <--------- | :18789 |
173
+ +-------------+ stdout +--------+--------+ health +-----------+
174
+ |
175
+ +--------v--------+
176
+ | ~/.openclaw/logs |
177
+ | (read & analyze) |
178
+ +-----------------+
179
+ ```
180
+
181
+ ## Development
182
+
183
+ ```bash
184
+ git clone https://github.com/openclaw/openclaw-doctor.git
185
+ cd openclaw-doctor
186
+ npm install
187
+
188
+ npm run dev -- status # Quick test
189
+ npm run dev -- watch # Foreground monitoring
190
+ npm run dev -- watch -d # Background daemon
191
+ npm run dev -- unwatch # Stop daemon
192
+
193
+ npm run build # Build for distribution
194
+ ```
195
+
196
+ ## Roadmap
197
+
198
+ - [x] Health check via `openclaw health --json` + auto-restart with throttling
199
+ - [x] Auto-detect OpenClaw config (gateway port, channels, agents, launchd)
200
+ - [x] Background daemon mode (`watch -d` / `unwatch`)
201
+ - [x] Gateway management (`gateway start/stop/restart`)
202
+ - [x] Read and display OpenClaw gateway logs
203
+ - [x] Web status dashboard
204
+ - [x] `--json` output for status
205
+ - [ ] Notification system (Webhook + macOS)
206
+ - [ ] `logs --tail` (real-time follow)
207
+ - [ ] `config` command (get/set)
208
+ - [ ] Multiple service monitoring
209
+ - [ ] Linux systemd support
210
+
211
+ ## License
212
+
213
+ [MIT](./LICENSE)
214
+
215
+ ## Publishing
216
+
217
+ This repo publishes two npm packages from the same codebase:
218
+
219
+ - **`openclaw-setup`** — the main package (`package.json`)
220
+ - **`openclaw-setup`** — alias package (`package.openclaw-setup.json`)
221
+
222
+ Both packages share the same version number and dist output.
223
+
224
+ ### Release a new version
225
+
226
+ ```bash
227
+ # 1. Bump version (patch / minor / major)
228
+ npm version patch
229
+
230
+ # 2. Build + publish both packages
231
+ npm run release
232
+ ```
233
+
234
+ `npm run release` calls `scripts/publish.sh`, which:
235
+ 1. Builds once (`npm run build`)
236
+ 2. Publishes `openclaw-setup` with the default `package.json`
237
+ 3. Temporarily swaps in `package.openclaw-setup.json`, publishes `openclaw-setup`, then restores
238
+
239
+ To update the `openclaw-setup` package metadata (description, keywords, bin name, etc.), edit `package.openclaw-setup.json`. Keep `version` in sync — it's automatically picked up from whichever `package.json` is active during publish.
@@ -0,0 +1,239 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/Sobranier/openclaw-doctor/main/assets/welcome.png" alt="OpenClaw start" width="400" />
3
+ </p>
4
+
5
+ <h1 align="center">OpenClaw start</h1>
6
+
7
+ <p align="center">
8
+ Keep your OpenClaw service alive. Automatically.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="./README.zh-CN.md">中文文档</a>
13
+ </p>
14
+
15
+ ## Get Started
16
+
17
+ ```bash
18
+ npm install -g openclaw-start
19
+ openclaw-start watch -d
20
+ ```
21
+
22
+ That's it. Doctor monitors your OpenClaw gateway in the background, restarts it when it goes down, and tells you what happened. Zero configuration needed -- it reads everything from your existing OpenClaw setup.
23
+
24
+ ## Core Commands
25
+
26
+ ```bash
27
+ openclaw-start watch # Start monitoring (foreground)
28
+ openclaw-start watch -d # Start monitoring (background)
29
+ openclaw-start unwatch # Stop monitoring
30
+
31
+ openclaw-start status # Quick health check
32
+ ```
33
+
34
+ These four commands cover 90% of daily use.
35
+
36
+ ## Gateway Management
37
+
38
+ ```bash
39
+ openclaw-start gateway start # Start the OpenClaw gateway
40
+ openclaw-start gateway stop # Stop the gateway
41
+ openclaw-start gateway restart # Restart the gateway
42
+ ```
43
+
44
+ ## Diagnostics & Logs
45
+
46
+ ```bash
47
+ openclaw-start doctor # Full diagnostics (binary, gateway, channels)
48
+ openclaw-start logs # View gateway logs
49
+ openclaw-start logs --error # View error logs only
50
+ openclaw-start logs --doctor # View Doctor's own event logs
51
+ openclaw-start dashboard # Web management UI (http://localhost:9090)
52
+ ```
53
+
54
+ ## Install
55
+
56
+ ```bash
57
+ # npm (recommended)
58
+ npm install -g openclaw-start
59
+
60
+ # or run without installing
61
+ npx openclaw-start status
62
+ ```
63
+
64
+ Requires Node >= 22 (same as OpenClaw).
65
+
66
+ ## How It Works
67
+
68
+ Doctor auto-detects your OpenClaw installation:
69
+
70
+ - Reads `~/.openclaw/openclaw.json` for gateway port, channels, agents
71
+ - Finds the launchd service from `~/Library/LaunchAgents/`
72
+ - Checks health via `openclaw health --json` (real gateway RPC, not HTTP)
73
+ - Restarts via `launchctl kickstart` when needed
74
+
75
+ **You don't configure OpenClaw details.** Doctor figures them out.
76
+
77
+ ## All Commands
78
+
79
+ | Command | Description |
80
+ |---------|-------------|
81
+ | **Monitoring** | |
82
+ | `watch` | Start health monitoring (foreground) |
83
+ | `watch -d` | Start health monitoring (background) |
84
+ | `watch -d --dashboard` | Background monitoring + web dashboard |
85
+ | `unwatch` | Stop monitoring |
86
+ | **Gateway** | |
87
+ | `gateway start` | Start the OpenClaw gateway |
88
+ | `gateway stop` | Stop the gateway |
89
+ | `gateway restart` | Restart the gateway |
90
+ | **Info** | |
91
+ | `status` | Show gateway and channel health |
92
+ | `status --json` | Machine-readable JSON output |
93
+ | `doctor` | Run full diagnostics |
94
+ | `dashboard` | Start web management UI |
95
+ | `logs` | Show gateway logs |
96
+ | `logs --error` | Show error logs only |
97
+ | `logs --doctor` | Show Doctor event logs |
98
+
99
+ ## Configuration
100
+
101
+ Config is stored at `~/.openclaw-doctor/config.json`. Created automatically on first run. Only Doctor's own preferences -- no OpenClaw settings needed.
102
+
103
+ ```json
104
+ {
105
+ "checkInterval": 30,
106
+ "failThreshold": 3,
107
+ "dashboardPort": 9090,
108
+ "maxRestartsPerHour": 5,
109
+ "openclawProfile": "default",
110
+ "notify": {
111
+ "webhook": {
112
+ "enabled": false,
113
+ "url": "",
114
+ "bodyTemplate": "{\"msgtype\":\"text\",\"text\":{\"content\":\"{{message}}\"}}"
115
+ },
116
+ "system": {
117
+ "enabled": true
118
+ }
119
+ }
120
+ }
121
+ ```
122
+
123
+ | Field | Description | Default |
124
+ |-------|-------------|---------|
125
+ | `checkInterval` | Seconds between health checks | `30` |
126
+ | `failThreshold` | Consecutive failures before restart | `3` |
127
+ | `dashboardPort` | Web dashboard port | `9090` |
128
+ | `maxRestartsPerHour` | Restart throttle | `5` |
129
+ | `openclawProfile` | OpenClaw profile to monitor (`default`, `dev`, ...) | `default` |
130
+ | `notify.webhook.url` | Webhook for notifications | -- |
131
+ | `notify.system.enabled` | macOS native notifications | `true` |
132
+
133
+ ## Notifications
134
+
135
+ Doctor notifies you across the full lifecycle:
136
+
137
+ | Event | Example |
138
+ |-------|---------|
139
+ | Monitoring started | "Doctor is watching your OpenClaw service" |
140
+ | Health degraded | "Service unhealthy (attempt 2/3)" |
141
+ | Restarting | "Restarting gateway..." |
142
+ | Restart succeeded | "Gateway back online" |
143
+ | Restart failed | "Restart failed: [error]" |
144
+ | Throttled | "Too many restarts, manual intervention needed" |
145
+ | Recovered | "Service recovered on its own" |
146
+ | Monitoring stopped | "Doctor stopped" |
147
+
148
+ Channels: **Webhook** (DingTalk, Feishu, Slack, etc.) + **macOS system notifications**.
149
+
150
+ ## Skills Integration
151
+
152
+ Doctor runs as a standalone daemon, callable by OpenClaw or other tools:
153
+
154
+ ```bash
155
+ openclaw-start status --json # Machine-readable output
156
+ openclaw-start watch -d # Idempotent -- safe to call repeatedly
157
+ ```
158
+
159
+ If the caller crashes, Doctor keeps running.
160
+
161
+ ## Architecture
162
+
163
+ ```
164
+ +-----------------+
165
+ | Notification |
166
+ | (Webhook/OS) |
167
+ +--------^--------+
168
+ |
169
+ +-------------+ CLI +--------+--------+ RPC +-----------+
170
+ | OpenClaw | --------> | | ---------> | OpenClaw |
171
+ | / Scripts | | openclaw-doctor | | Gateway |
172
+ | / Skills | <-------- | (daemon) | <--------- | :18789 |
173
+ +-------------+ stdout +--------+--------+ health +-----------+
174
+ |
175
+ +--------v--------+
176
+ | ~/.openclaw/logs |
177
+ | (read & analyze) |
178
+ +-----------------+
179
+ ```
180
+
181
+ ## Development
182
+
183
+ ```bash
184
+ git clone https://github.com/openclaw/openclaw-doctor.git
185
+ cd openclaw-doctor
186
+ npm install
187
+
188
+ npm run dev -- status # Quick test
189
+ npm run dev -- watch # Foreground monitoring
190
+ npm run dev -- watch -d # Background daemon
191
+ npm run dev -- unwatch # Stop daemon
192
+
193
+ npm run build # Build for distribution
194
+ ```
195
+
196
+ ## Roadmap
197
+
198
+ - [x] Health check via `openclaw health --json` + auto-restart with throttling
199
+ - [x] Auto-detect OpenClaw config (gateway port, channels, agents, launchd)
200
+ - [x] Background daemon mode (`watch -d` / `unwatch`)
201
+ - [x] Gateway management (`gateway start/stop/restart`)
202
+ - [x] Read and display OpenClaw gateway logs
203
+ - [x] Web status dashboard
204
+ - [x] `--json` output for status
205
+ - [ ] Notification system (Webhook + macOS)
206
+ - [ ] `logs --tail` (real-time follow)
207
+ - [ ] `config` command (get/set)
208
+ - [ ] Multiple service monitoring
209
+ - [ ] Linux systemd support
210
+
211
+ ## License
212
+
213
+ [MIT](./LICENSE)
214
+
215
+ ## Publishing
216
+
217
+ This repo publishes two npm packages from the same codebase:
218
+
219
+ - **`openclaw-start`** — the main package (`package.json`)
220
+ - **`openclaw-start`** — alias package (`package.openclaw-start.json`)
221
+
222
+ Both packages share the same version number and dist output.
223
+
224
+ ### Release a new version
225
+
226
+ ```bash
227
+ # 1. Bump version (patch / minor / major)
228
+ npm version patch
229
+
230
+ # 2. Build + publish both packages
231
+ npm run release
232
+ ```
233
+
234
+ `npm run release` calls `scripts/publish.sh`, which:
235
+ 1. Builds once (`npm run build`)
236
+ 2. Publishes `openclaw-start` with the default `package.json`
237
+ 3. Temporarily swaps in `package.openclaw-start.json`, publishes `openclaw-start`, then restores
238
+
239
+ To update the `openclaw-start` package metadata (description, keywords, bin name, etc.), edit `package.openclaw-start.json`. Keep `version` in sync — it's automatically picked up from whichever `package.json` is active during publish.