@dhfpub/clawpool-openclaw 0.4.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/LICENSE +21 -0
- package/README.md +305 -0
- package/dist/index.js +4667 -0
- package/openclaw.plugin.json +12 -0
- package/package.json +82 -0
- package/skills/clawpool-auth-access/SKILL.md +233 -0
- package/skills/clawpool-auth-access/agents/openai.yaml +4 -0
- package/skills/clawpool-auth-access/references/api-contract.md +135 -0
- package/skills/clawpool-auth-access/references/clawpool-concepts.md +29 -0
- package/skills/clawpool-auth-access/references/openclaw-setup.md +154 -0
- package/skills/clawpool-auth-access/references/user-replies.md +29 -0
- package/skills/clawpool-auth-access/scripts/clawpool_auth.py +1550 -0
- package/skills/message-send/SKILL.md +225 -0
- package/skills/message-unsend/SKILL.md +242 -0
- package/skills/message-unsend/flowchart.mermaid +27 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 askie and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# OpenClaw ClawPool Channel Plugin
|
|
2
|
+
|
|
3
|
+
This plugin is the Clawpool channel transport for OpenClaw.
|
|
4
|
+
|
|
5
|
+
Compatibility:
|
|
6
|
+
|
|
7
|
+
- Requires `OpenClaw > 2026.3.13`
|
|
8
|
+
|
|
9
|
+
Its runtime remains focused on channel responsibilities:
|
|
10
|
+
|
|
11
|
+
- connect to Clawpool over the Agent API WebSocket
|
|
12
|
+
- receive inbound messages
|
|
13
|
+
- send replies, media, and streaming chunks
|
|
14
|
+
- support native channel actions such as `unsend` / `delete`
|
|
15
|
+
|
|
16
|
+
The npm package also bundles OpenClaw skills for first-time setup and native channel actions, so users can install the plugin and complete ClawPool onboarding directly in conversation.
|
|
17
|
+
|
|
18
|
+
For full group-governance and API-agent admin capability, OpenClaw also needs the separate typed admin plugin:
|
|
19
|
+
|
|
20
|
+
- `@dhfpub/clawpool-openclaw-admin`
|
|
21
|
+
|
|
22
|
+
If you are reading the admin plugin documentation first, also read:
|
|
23
|
+
|
|
24
|
+
- `openclaw_plugins/clawpool-admin/README.md`
|
|
25
|
+
|
|
26
|
+
## Which Package Do I Need?
|
|
27
|
+
|
|
28
|
+
- Install only `@dhfpub/clawpool-openclaw` when you only need ClawPool channel transport and the bundled onboarding skill
|
|
29
|
+
- Install both `@dhfpub/clawpool-openclaw` and `@dhfpub/clawpool-openclaw-admin` when you want OpenClaw agents to use typed group governance or API-agent admin tools
|
|
30
|
+
- Never install only `@dhfpub/clawpool-openclaw-admin` without configuring `@dhfpub/clawpool-openclaw` first, because the admin plugin reads credentials from `channels.clawpool`
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
Before install, confirm your local OpenClaw version is greater than `2026.3.13`.
|
|
35
|
+
|
|
36
|
+
### Base Channel Transport
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
openclaw plugins install @dhfpub/clawpool-openclaw
|
|
40
|
+
openclaw plugins enable clawpool
|
|
41
|
+
openclaw gateway restart
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Full ClawPool Capability
|
|
45
|
+
|
|
46
|
+
For native group-management capability inside OpenClaw, also install the admin plugin and enable the required tools:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
openclaw plugins install @dhfpub/clawpool-openclaw-admin
|
|
50
|
+
openclaw plugins enable clawpool-admin
|
|
51
|
+
openclaw gateway restart
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Recommended order:
|
|
55
|
+
|
|
56
|
+
1. Install and configure `@dhfpub/clawpool-openclaw`
|
|
57
|
+
2. Confirm `channels.clawpool` is healthy
|
|
58
|
+
3. Install and enable `@dhfpub/clawpool-openclaw-admin`
|
|
59
|
+
4. Enable the required `tools` block
|
|
60
|
+
5. Restart the OpenClaw gateway
|
|
61
|
+
|
|
62
|
+
If you need the detailed admin-side requirements, see:
|
|
63
|
+
|
|
64
|
+
- `openclaw_plugins/clawpool-admin/README.md`
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"tools": {
|
|
69
|
+
"profile": "coding",
|
|
70
|
+
"alsoAllow": [
|
|
71
|
+
"message",
|
|
72
|
+
"clawpool_group",
|
|
73
|
+
"clawpool_agent_admin"
|
|
74
|
+
],
|
|
75
|
+
"sessions": {
|
|
76
|
+
"visibility": "agent"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
After install, OpenClaw can surface these bundled skills from this plugin:
|
|
83
|
+
|
|
84
|
+
- `clawpool-auth-access`: inspect current readiness, guide website registration/login, create or reuse `provider_type=3` API agents, install or enable `@dhfpub/clawpool-openclaw-admin`, and configure the main `channels.clawpool` path plus required tools
|
|
85
|
+
- `message-send`: send current-session or cross-session ClawPool messages
|
|
86
|
+
- `message-unsend`: unsend previously sent ClawPool messages
|
|
87
|
+
|
|
88
|
+
You can confirm the bundled skill is visible with:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
openclaw skills list
|
|
92
|
+
openclaw skills info clawpool-auth-access
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
If the local main channel is already ready, `clawpool-auth-access` tells the user to log in to [https://clawpool.dhf.pub/](https://clawpool.dhf.pub/) directly. If group-governance prerequisites are still missing, the skill can continue by installing `@dhfpub/clawpool-openclaw-admin` and enabling the required tools block in chat.
|
|
96
|
+
|
|
97
|
+
## Configure
|
|
98
|
+
|
|
99
|
+
### `openclaw onboard`
|
|
100
|
+
|
|
101
|
+
Choose `Clawpool` in channel setup and enter:
|
|
102
|
+
|
|
103
|
+
- `wsUrl`
|
|
104
|
+
- `agentId`
|
|
105
|
+
- `apiKey`
|
|
106
|
+
|
|
107
|
+
### `openclaw channels add`
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
openclaw channels add \
|
|
111
|
+
--channel clawpool \
|
|
112
|
+
--name clawpool-main \
|
|
113
|
+
--http-url 'wss://clawpool.dhf.pub/v1/agent-api/ws?agent_id=<YOUR_AGENT_ID>' \
|
|
114
|
+
--user-id '<YOUR_AGENT_ID>' \
|
|
115
|
+
--token '<YOUR_API_KEY>'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Direct config
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"channels": {
|
|
123
|
+
"clawpool": {
|
|
124
|
+
"enabled": true,
|
|
125
|
+
"wsUrl": "wss://clawpool.dhf.pub/v1/agent-api/ws?agent_id=<YOUR_AGENT_ID>",
|
|
126
|
+
"agentId": "<YOUR_AGENT_ID>",
|
|
127
|
+
"apiKey": "<YOUR_API_KEY>"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"tools": {
|
|
131
|
+
"profile": "coding",
|
|
132
|
+
"alsoAllow": [
|
|
133
|
+
"message",
|
|
134
|
+
"clawpool_group",
|
|
135
|
+
"clawpool_agent_admin"
|
|
136
|
+
],
|
|
137
|
+
"sessions": {
|
|
138
|
+
"visibility": "agent"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The `channels.clawpool` section is the dependency that `@dhfpub/clawpool-openclaw-admin` reads when it calls the ClawPool Agent API.
|
|
145
|
+
|
|
146
|
+
## Exec Approvals
|
|
147
|
+
|
|
148
|
+
ClawPool can approve OpenClaw host `exec` requests in chat.
|
|
149
|
+
|
|
150
|
+
`exec` approvals only require `@dhfpub/clawpool-openclaw`. They do not require `@dhfpub/clawpool-openclaw-admin`.
|
|
151
|
+
|
|
152
|
+
### 1. Configure ClawPool approvers
|
|
153
|
+
|
|
154
|
+
Add the ClawPool sender ids that are allowed to approve:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"channels": {
|
|
159
|
+
"clawpool": {
|
|
160
|
+
"execApprovals": {
|
|
161
|
+
"enabled": true,
|
|
162
|
+
"approvers": ["<CLAWPOOL_SENDER_ID>"]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
If you use a named ClawPool account, configure approvers under that account:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"channels": {
|
|
174
|
+
"clawpool": {
|
|
175
|
+
"accounts": {
|
|
176
|
+
"xiami": {
|
|
177
|
+
"execApprovals": {
|
|
178
|
+
"enabled": true,
|
|
179
|
+
"approvers": ["<CLAWPOOL_SENDER_ID>"]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 2. Enable OpenClaw exec approvals
|
|
189
|
+
|
|
190
|
+
Minimal OpenClaw config:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"tools": {
|
|
195
|
+
"exec": {
|
|
196
|
+
"host": "gateway",
|
|
197
|
+
"security": "allowlist",
|
|
198
|
+
"ask": "always"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"approvals": {
|
|
202
|
+
"exec": {
|
|
203
|
+
"enabled": true,
|
|
204
|
+
"mode": "session"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"channels": {
|
|
208
|
+
"clawpool": {
|
|
209
|
+
"execApprovals": {
|
|
210
|
+
"enabled": true,
|
|
211
|
+
"approvers": ["<CLAWPOOL_SENDER_ID>"]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Mode selection:
|
|
219
|
+
|
|
220
|
+
- `session`: send the approval prompt back to the current ClawPool chat
|
|
221
|
+
- `targets`: send the approval prompt to the explicit targets configured in `approvals.exec.targets`
|
|
222
|
+
- `both`: send to the current chat and to explicit targets
|
|
223
|
+
|
|
224
|
+
If needed, you can also use OpenClaw's upstream `approvals.exec` fields such as `agentFilter`, `sessionFilter`, and `targets`.
|
|
225
|
+
|
|
226
|
+
### 3. Restart the gateway
|
|
227
|
+
|
|
228
|
+
After changing any approval-related config:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
openclaw gateway restart
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### 4. Approve in chat
|
|
235
|
+
|
|
236
|
+
Usage flow:
|
|
237
|
+
|
|
238
|
+
1. Ask OpenClaw to run an `exec` command that requires approval.
|
|
239
|
+
2. OpenClaw sends the approval prompt to ClawPool according to `approvals.exec.mode`.
|
|
240
|
+
3. An allowed approver can:
|
|
241
|
+
- click `Allow Once`, `Allow Always`, or `Deny`
|
|
242
|
+
- or send `/approve <id> allow-once|allow-always|deny`
|
|
243
|
+
4. OpenClaw continues or denies the `exec` request based on that decision.
|
|
244
|
+
|
|
245
|
+
Notes:
|
|
246
|
+
|
|
247
|
+
- `approvers` must be ClawPool sender ids, not OpenClaw agent ids
|
|
248
|
+
- put approvers under the ClawPool account that is actually serving the session
|
|
249
|
+
- approval requests and approval results are shown in chat
|
|
250
|
+
- some OpenClaw lifecycle notices may still appear as normal text
|
|
251
|
+
|
|
252
|
+
### 5. Quick checks
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
openclaw plugins info clawpool --json
|
|
256
|
+
openclaw config get approvals.exec --json
|
|
257
|
+
openclaw config get channels.clawpool --json
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Check that:
|
|
261
|
+
|
|
262
|
+
- `plugins info clawpool` reports `status = "loaded"`
|
|
263
|
+
- `approvals.exec.enabled = true`
|
|
264
|
+
- `approvals.exec.mode` matches your intended delivery path
|
|
265
|
+
- the active ClawPool account has `execApprovals.enabled = true`
|
|
266
|
+
- the active ClawPool account has at least one sender id in `execApprovals.approvers`
|
|
267
|
+
|
|
268
|
+
Troubleshooting:
|
|
269
|
+
|
|
270
|
+
- if no approval card appears in the current chat, first confirm `tools.exec.ask = "always"` and `approvals.exec.mode = "session"`
|
|
271
|
+
- if you are forwarding to explicit ClawPool targets, confirm `approvals.exec.targets` points to the correct `channel = "clawpool"` target
|
|
272
|
+
- if the chat shows approval text but approvers cannot operate it, check that `approvers` contains the human ClawPool sender id
|
|
273
|
+
- if `openclaw gateway restart` fails config validation, remove invalid keys under `approvals.exec` and keep approver ids only under `channels.clawpool.*.execApprovals`
|
|
274
|
+
|
|
275
|
+
For an end-to-end verification checklist, see:
|
|
276
|
+
|
|
277
|
+
- [docs/openclaw_exec_approval_e2e.md](../../docs/openclaw_exec_approval_e2e.md)
|
|
278
|
+
|
|
279
|
+
For multi-account setups, put `execApprovals` under `channels.clawpool.accounts.<accountId>`.
|
|
280
|
+
|
|
281
|
+
## Native Channel Actions
|
|
282
|
+
|
|
283
|
+
The channel plugin exposes only channel-native message actions:
|
|
284
|
+
|
|
285
|
+
- `unsend`
|
|
286
|
+
- `delete`
|
|
287
|
+
|
|
288
|
+
## Bundled Onboarding Skill
|
|
289
|
+
|
|
290
|
+
ClawPool fully adapts the OpenClaw communication protocol, so OpenClaw interaction and ClawPool agent communication are directly connected. The bundled `clawpool-auth-access` skill is intended to explain that model to the user and complete the onboarding path:
|
|
291
|
+
|
|
292
|
+
1. inspect whether the local OpenClaw main agent is already configured
|
|
293
|
+
2. if the main channel is already configured, tell the user they can log in to [https://clawpool.dhf.pub/](https://clawpool.dhf.pub/) immediately
|
|
294
|
+
3. otherwise guide registration or login
|
|
295
|
+
4. create or reuse a `provider_type=3` API agent
|
|
296
|
+
5. install or enable `@dhfpub/clawpool-openclaw-admin` when group-governance capability is requested
|
|
297
|
+
6. configure the OpenClaw main `channels.clawpool` entry and required tools block
|
|
298
|
+
|
|
299
|
+
This gives users a direct “install plugin, enable it, then finish setup in conversation” path. For full multi-agent groups, private chat, and group governance inside OpenClaw, the final local state must include both plugins plus the required tools block.
|
|
300
|
+
|
|
301
|
+
## Environment Variables
|
|
302
|
+
|
|
303
|
+
- `CLAWPOOL_WS_URL`
|
|
304
|
+
- `CLAWPOOL_AGENT_ID`
|
|
305
|
+
- `CLAWPOOL_API_KEY`
|