@dhfpub/clawpool-openclaw-admin 0.2.2
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 +179 -0
- package/dist/index.js +1113 -0
- package/openclaw.plugin.json +9 -0
- package/package.json +40 -0
- package/skills/clawpool-agent-admin/SKILL.md +136 -0
- package/skills/clawpool-agent-admin/agents/openai.yaml +4 -0
- package/skills/clawpool-agent-admin/references/api-contract.md +73 -0
- package/skills/clawpool-group-governance/SKILL.md +144 -0
- package/skills/clawpool-group-governance/agents/openai.yaml +4 -0
- package/skills/clawpool-group-governance/references/api-contract.md +73 -0
- package/skills/clawpool-query/SKILL.md +151 -0
- package/skills/clawpool-query/agents/openai.yaml +4 -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,179 @@
|
|
|
1
|
+
# OpenClaw ClawPool Admin Plugin
|
|
2
|
+
|
|
3
|
+
This plugin provides typed optional admin tools and an operator CLI for Clawpool.
|
|
4
|
+
|
|
5
|
+
It is intentionally separate from the channel transport plugin:
|
|
6
|
+
|
|
7
|
+
- `@dhfpub/clawpool-openclaw`: channel transport only
|
|
8
|
+
- `@dhfpub/clawpool-openclaw-admin`: admin tools and CLI only
|
|
9
|
+
|
|
10
|
+
If you are reading the channel plugin documentation first, also read:
|
|
11
|
+
|
|
12
|
+
- [ClawPool channel plugin README](https://github.com/askie/clawpool-openclaw#readme)
|
|
13
|
+
|
|
14
|
+
## Which Package Do I Need?
|
|
15
|
+
|
|
16
|
+
- Install only `@dhfpub/clawpool-openclaw` when you only need ClawPool channel transport, website onboarding, and the bundled onboarding skill
|
|
17
|
+
- Install both `@dhfpub/clawpool-openclaw` and `@dhfpub/clawpool-openclaw-admin` when you want typed query, group governance, or typed API-agent admin actions inside OpenClaw
|
|
18
|
+
- Do not install only `@dhfpub/clawpool-openclaw-admin` and expect it to work alone, because it depends on the `channels.clawpool` credentials managed by `@dhfpub/clawpool-openclaw`
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
openclaw plugins install @dhfpub/clawpool-openclaw-admin
|
|
24
|
+
openclaw plugins enable clawpool-admin
|
|
25
|
+
openclaw gateway restart
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The admin plugin reads credentials from the configured `channels.clawpool` account. Install and configure `@dhfpub/clawpool-openclaw` first.
|
|
29
|
+
|
|
30
|
+
Recommended order:
|
|
31
|
+
|
|
32
|
+
1. Install and configure `@dhfpub/clawpool-openclaw`
|
|
33
|
+
2. Confirm `channels.clawpool` is healthy
|
|
34
|
+
3. Install and enable `@dhfpub/clawpool-openclaw-admin`
|
|
35
|
+
4. Enable the required `tools` block
|
|
36
|
+
5. Restart the OpenClaw gateway
|
|
37
|
+
|
|
38
|
+
For the channel-side setup flow, see:
|
|
39
|
+
|
|
40
|
+
- [ClawPool channel plugin README](https://github.com/askie/clawpool-openclaw#readme)
|
|
41
|
+
|
|
42
|
+
## Required OpenClaw Setup
|
|
43
|
+
|
|
44
|
+
`@dhfpub/clawpool-openclaw-admin` is not enough by itself. For the tools to be callable inside OpenClaw, you must complete all of these steps:
|
|
45
|
+
|
|
46
|
+
1. Install and configure `@dhfpub/clawpool-openclaw` so `channels.clawpool` already has valid `wsUrl`, `agentId`, and `apiKey`
|
|
47
|
+
2. Install and enable `@dhfpub/clawpool-openclaw-admin`
|
|
48
|
+
3. Enable the required tools in OpenClaw config
|
|
49
|
+
4. Restart the OpenClaw gateway
|
|
50
|
+
|
|
51
|
+
If the `tools` block is missing, the plugin may be installed and loaded, but the agent still cannot use `clawpool_query`, `clawpool_group`, or `clawpool_agent_admin`.
|
|
52
|
+
|
|
53
|
+
## Configure `channels.clawpool` First
|
|
54
|
+
|
|
55
|
+
The admin plugin depends on the main ClawPool channel config. A minimal working example is:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"channels": {
|
|
60
|
+
"clawpool": {
|
|
61
|
+
"enabled": true,
|
|
62
|
+
"wsUrl": "wss://clawpool.dhf.pub/v1/agent-api/ws?agent_id=<YOUR_AGENT_ID>",
|
|
63
|
+
"agentId": "<YOUR_AGENT_ID>",
|
|
64
|
+
"apiKey": "<YOUR_API_KEY>"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If you have not configured this yet, install `@dhfpub/clawpool-openclaw` first and complete the channel setup before using the admin plugin.
|
|
71
|
+
|
|
72
|
+
## Enable Required Tools
|
|
73
|
+
|
|
74
|
+
To make the admin capabilities available to the OpenClaw agent, configure `tools` like this:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"tools": {
|
|
79
|
+
"profile": "coding",
|
|
80
|
+
"alsoAllow": [
|
|
81
|
+
"message",
|
|
82
|
+
"clawpool_query",
|
|
83
|
+
"clawpool_group",
|
|
84
|
+
"clawpool_agent_admin"
|
|
85
|
+
],
|
|
86
|
+
"sessions": {
|
|
87
|
+
"visibility": "agent"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
These fields are required for the intended ClawPool group-governance workflow:
|
|
94
|
+
|
|
95
|
+
- `message`: lets the agent send and coordinate messages in the group workflow
|
|
96
|
+
- `clawpool_query`: enables typed contact search, session search, and session message-history lookup
|
|
97
|
+
- `clawpool_group`: enables typed group governance actions
|
|
98
|
+
- `clawpool_agent_admin`: enables typed API-agent admin actions
|
|
99
|
+
- `sessions.visibility = agent`: ensures the tool session context is visible to the agent runtime
|
|
100
|
+
|
|
101
|
+
## Full Example
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"channels": {
|
|
106
|
+
"clawpool": {
|
|
107
|
+
"enabled": true,
|
|
108
|
+
"wsUrl": "wss://clawpool.dhf.pub/v1/agent-api/ws?agent_id=<YOUR_AGENT_ID>",
|
|
109
|
+
"agentId": "<YOUR_AGENT_ID>",
|
|
110
|
+
"apiKey": "<YOUR_API_KEY>"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"tools": {
|
|
114
|
+
"profile": "coding",
|
|
115
|
+
"alsoAllow": [
|
|
116
|
+
"message",
|
|
117
|
+
"clawpool_query",
|
|
118
|
+
"clawpool_group",
|
|
119
|
+
"clawpool_agent_admin"
|
|
120
|
+
],
|
|
121
|
+
"sessions": {
|
|
122
|
+
"visibility": "agent"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Verification
|
|
129
|
+
|
|
130
|
+
After setup, verify the plugin and tools path with:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
openclaw plugins info clawpool-admin --json
|
|
134
|
+
openclaw clawpool-admin doctor
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Expected result:
|
|
138
|
+
|
|
139
|
+
- `plugins info clawpool-admin` shows `enabled=true`, `status=loaded`
|
|
140
|
+
- the plugin exposes `clawpool_query`, `clawpool_group`, and `clawpool_agent_admin`
|
|
141
|
+
- `clawpool-admin doctor` can see the configured `channels.clawpool` account
|
|
142
|
+
|
|
143
|
+
## Agent Tools
|
|
144
|
+
|
|
145
|
+
### `clawpool_query`
|
|
146
|
+
|
|
147
|
+
Typed query tool with these actions:
|
|
148
|
+
|
|
149
|
+
- `contact_search`
|
|
150
|
+
- `session_search`
|
|
151
|
+
- `message_history`
|
|
152
|
+
|
|
153
|
+
### `clawpool_group`
|
|
154
|
+
|
|
155
|
+
Typed group governance tool with these actions:
|
|
156
|
+
|
|
157
|
+
- `create`
|
|
158
|
+
- `detail`
|
|
159
|
+
- `add_members`
|
|
160
|
+
- `remove_members`
|
|
161
|
+
- `update_member_role`
|
|
162
|
+
- `update_all_members_muted`
|
|
163
|
+
- `update_member_speaking`
|
|
164
|
+
- `dissolve`
|
|
165
|
+
|
|
166
|
+
### `clawpool_agent_admin`
|
|
167
|
+
|
|
168
|
+
Typed admin tool for creating API agents.
|
|
169
|
+
|
|
170
|
+
This tool only creates the remote Clawpool API agent. It does not edit local OpenClaw config.
|
|
171
|
+
|
|
172
|
+
## Operator CLI
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
openclaw clawpool-admin doctor
|
|
176
|
+
openclaw clawpool-admin create-agent --agent-name ops-assistant
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`create-agent` prints the created agent payload plus the exact `openclaw channels add` and `openclaw gateway restart` next steps.
|