@dhf-openclaw/grix 0.4.9 → 0.4.10
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/README.md +128 -143
- package/dist/index.js +1279 -1
- package/package.json +4 -6
- package/skills/egg-install/SKILL.md +170 -0
- package/skills/egg-install/references/api-contract.md +38 -0
- package/skills/grix-agent-admin/SKILL.md +85 -0
- package/skills/grix-agent-admin/agents/openai.yaml +4 -0
- package/skills/grix-agent-admin/references/api-contract.md +87 -0
- package/skills/grix-agent-admin/scripts/grix_agent_bind.py +587 -0
- package/skills/grix-group-governance/SKILL.md +144 -0
- package/skills/grix-group-governance/agents/openai.yaml +4 -0
- package/skills/grix-group-governance/references/api-contract.md +73 -0
- package/skills/grix-query/SKILL.md +151 -0
- package/skills/grix-query/agents/openai.yaml +4 -0
package/README.md
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
# OpenClaw Grix
|
|
1
|
+
# OpenClaw Grix Unified Plugin
|
|
2
2
|
|
|
3
|
-
This plugin connects OpenClaw to [https://grix.dhf.pub/](https://grix.dhf.pub/)
|
|
3
|
+
This plugin connects OpenClaw to [https://grix.dhf.pub/](https://grix.dhf.pub/) and provides a single, unified integration for:
|
|
4
|
+
|
|
5
|
+
- Grix channel transport (WebSocket Agent API)
|
|
6
|
+
- native message actions (`unsend` / `delete`)
|
|
7
|
+
- typed Grix admin tools
|
|
8
|
+
- operator CLI commands
|
|
9
|
+
- bundled Grix workflow skills
|
|
4
10
|
|
|
5
11
|
Compatibility:
|
|
6
12
|
|
|
7
13
|
- Requires `OpenClaw >= 2026.3.13`
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
15
|
+
## Included Capability
|
|
16
|
+
|
|
17
|
+
After installation, one plugin covers all major Grix workflows:
|
|
18
|
+
|
|
19
|
+
- Channel runtime:
|
|
20
|
+
- inbound message receive
|
|
21
|
+
- outbound reply / media / streaming chunk send
|
|
22
|
+
- native channel actions (`unsend`, `delete`)
|
|
23
|
+
- Typed admin tools:
|
|
24
|
+
- `grix_query`
|
|
25
|
+
- `grix_group`
|
|
26
|
+
- `grix_agent_admin`
|
|
27
|
+
- Operator CLI:
|
|
28
|
+
- `openclaw grix doctor`
|
|
29
|
+
- `openclaw grix create-agent ...`
|
|
30
|
+
- Bundled skills:
|
|
31
|
+
- `message-send`
|
|
32
|
+
- `message-unsend`
|
|
33
|
+
- `egg-install`
|
|
34
|
+
- `grix-query`
|
|
35
|
+
- `grix-group-governance`
|
|
36
|
+
- `grix-agent-admin`
|
|
29
37
|
|
|
30
38
|
## Install
|
|
31
39
|
|
|
32
|
-
Before install, confirm your local OpenClaw version is greater than or equal to `2026.3.13`.
|
|
33
|
-
|
|
34
|
-
### Base Channel Transport
|
|
35
|
-
|
|
36
40
|
```bash
|
|
37
41
|
openclaw plugins install @dhf-openclaw/grix
|
|
38
42
|
openclaw plugins enable grix
|
|
@@ -41,37 +45,31 @@ openclaw gateway restart
|
|
|
41
45
|
|
|
42
46
|
### Local Source Checkout
|
|
43
47
|
|
|
44
|
-
If you load
|
|
48
|
+
If you load from a local checkout:
|
|
45
49
|
|
|
46
50
|
```bash
|
|
47
51
|
npm install
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Then point OpenClaw at the tracked local entry file:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
52
|
openclaw plugins install ./grix.ts
|
|
54
53
|
```
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
## Required OpenClaw Config
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
### Channel Config (`channels.grix`)
|
|
59
58
|
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"channels": {
|
|
62
|
+
"grix": {
|
|
63
|
+
"enabled": true,
|
|
64
|
+
"wsUrl": "wss://grix.dhf.pub/v1/agent-api/ws?agent_id=<YOUR_AGENT_ID>",
|
|
65
|
+
"agentId": "<YOUR_AGENT_ID>",
|
|
66
|
+
"apiKey": "<YOUR_API_KEY>"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
64
70
|
```
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
1. Install and configure `@dhf-openclaw/grix`
|
|
69
|
-
2. Confirm `channels.grix` is healthy
|
|
70
|
-
3. Install and enable `@dhf-openclaw/grix-admin`
|
|
71
|
-
4. Enable the required `tools` block
|
|
72
|
-
5. Restart the OpenClaw gateway
|
|
73
|
-
|
|
74
|
-
If you need the detailed admin-side requirements, see the companion Grix admin plugin README.
|
|
72
|
+
### Tool Exposure Config
|
|
75
73
|
|
|
76
74
|
```json
|
|
77
75
|
{
|
|
@@ -79,6 +77,7 @@ If you need the detailed admin-side requirements, see the companion Grix admin p
|
|
|
79
77
|
"profile": "coding",
|
|
80
78
|
"alsoAllow": [
|
|
81
79
|
"message",
|
|
80
|
+
"grix_query",
|
|
82
81
|
"grix_group",
|
|
83
82
|
"grix_agent_admin"
|
|
84
83
|
],
|
|
@@ -89,41 +88,7 @@ If you need the detailed admin-side requirements, see the companion Grix admin p
|
|
|
89
88
|
}
|
|
90
89
|
```
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- `message-send`: send current-session or cross-session Grix messages
|
|
95
|
-
- `message-unsend`: unsend previously sent Grix messages
|
|
96
|
-
|
|
97
|
-
`egg-install` is bundled in `@dhf-openclaw/grix-admin` so install the admin plugin when you need Shrimp Pond install workflow.
|
|
98
|
-
|
|
99
|
-
You can confirm the bundled skill is visible with:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
openclaw skills list
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Configure
|
|
106
|
-
|
|
107
|
-
### `openclaw onboard`
|
|
108
|
-
|
|
109
|
-
Choose `Grix` in channel setup and enter:
|
|
110
|
-
|
|
111
|
-
- `wsUrl`
|
|
112
|
-
- `agentId`
|
|
113
|
-
- `apiKey`
|
|
114
|
-
|
|
115
|
-
### `openclaw channels add`
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
openclaw channels add \
|
|
119
|
-
--channel grix \
|
|
120
|
-
--name grix-main \
|
|
121
|
-
--http-url 'wss://grix.dhf.pub/v1/agent-api/ws?agent_id=<YOUR_AGENT_ID>' \
|
|
122
|
-
--user-id '<YOUR_AGENT_ID>' \
|
|
123
|
-
--token '<YOUR_API_KEY>'
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Direct config
|
|
91
|
+
Full example:
|
|
127
92
|
|
|
128
93
|
```json
|
|
129
94
|
{
|
|
@@ -139,6 +104,7 @@ openclaw channels add \
|
|
|
139
104
|
"profile": "coding",
|
|
140
105
|
"alsoAllow": [
|
|
141
106
|
"message",
|
|
107
|
+
"grix_query",
|
|
142
108
|
"grix_group",
|
|
143
109
|
"grix_agent_admin"
|
|
144
110
|
],
|
|
@@ -149,18 +115,71 @@ openclaw channels add \
|
|
|
149
115
|
}
|
|
150
116
|
```
|
|
151
117
|
|
|
152
|
-
|
|
118
|
+
After any config change:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
openclaw gateway restart
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Typed Tools
|
|
125
|
+
|
|
126
|
+
### `grix_query`
|
|
127
|
+
|
|
128
|
+
Supported actions:
|
|
129
|
+
|
|
130
|
+
- `contact_search`
|
|
131
|
+
- `session_search`
|
|
132
|
+
- `message_history`
|
|
133
|
+
|
|
134
|
+
### `grix_group`
|
|
135
|
+
|
|
136
|
+
Supported actions:
|
|
137
|
+
|
|
138
|
+
- `create`
|
|
139
|
+
- `detail`
|
|
140
|
+
- `add_members`
|
|
141
|
+
- `remove_members`
|
|
142
|
+
- `update_member_role`
|
|
143
|
+
- `update_all_members_muted`
|
|
144
|
+
- `update_member_speaking`
|
|
145
|
+
- `dissolve`
|
|
146
|
+
|
|
147
|
+
### `grix_agent_admin`
|
|
148
|
+
|
|
149
|
+
Creates `provider_type=3` API agents with typed parameters.
|
|
150
|
+
|
|
151
|
+
This tool creates the remote Grix API agent only. It does not directly mutate local OpenClaw channel config.
|
|
152
|
+
|
|
153
|
+
## Operator CLI
|
|
154
|
+
|
|
155
|
+
### Inspect Grix accounts
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
openclaw grix doctor
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Create API agent
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
openclaw grix create-agent \
|
|
165
|
+
--agent-name ops-assistant \
|
|
166
|
+
--describe-message-tool '{"actions":["unsend","delete"]}'
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
`create-agent` prints:
|
|
170
|
+
|
|
171
|
+
- created agent payload
|
|
172
|
+
- one-time API key in result payload
|
|
173
|
+
- safe next-step channel binding command template
|
|
174
|
+
|
|
175
|
+
`--describe-message-tool` is required and must follow OpenClaw `describeMessageTool` discovery structure.
|
|
153
176
|
|
|
154
177
|
## Exec Approvals
|
|
155
178
|
|
|
156
179
|
Grix can approve OpenClaw host `exec` requests in chat.
|
|
157
180
|
|
|
158
|
-
`exec` approvals only require `@dhf-openclaw/grix`. They do not require `@dhf-openclaw/grix-admin`.
|
|
159
|
-
|
|
160
181
|
### 1. Configure Grix approvers
|
|
161
182
|
|
|
162
|
-
Add the Grix sender ids that are allowed to approve:
|
|
163
|
-
|
|
164
183
|
```json
|
|
165
184
|
{
|
|
166
185
|
"channels": {
|
|
@@ -174,14 +193,14 @@ Add the Grix sender ids that are allowed to approve:
|
|
|
174
193
|
}
|
|
175
194
|
```
|
|
176
195
|
|
|
177
|
-
If
|
|
196
|
+
If using named accounts:
|
|
178
197
|
|
|
179
198
|
```json
|
|
180
199
|
{
|
|
181
200
|
"channels": {
|
|
182
201
|
"grix": {
|
|
183
202
|
"accounts": {
|
|
184
|
-
"
|
|
203
|
+
"ops": {
|
|
185
204
|
"execApprovals": {
|
|
186
205
|
"enabled": true,
|
|
187
206
|
"approvers": ["<GRIX_SENDER_ID>"]
|
|
@@ -195,8 +214,6 @@ If you use a named Grix account, configure approvers under that account:
|
|
|
195
214
|
|
|
196
215
|
### 2. Enable OpenClaw exec approvals
|
|
197
216
|
|
|
198
|
-
Minimal OpenClaw config:
|
|
199
|
-
|
|
200
217
|
```json
|
|
201
218
|
{
|
|
202
219
|
"tools": {
|
|
@@ -223,17 +240,13 @@ Minimal OpenClaw config:
|
|
|
223
240
|
}
|
|
224
241
|
```
|
|
225
242
|
|
|
226
|
-
Mode
|
|
227
|
-
|
|
228
|
-
- `session`: send the approval prompt back to the current Grix chat
|
|
229
|
-
- `targets`: send the approval prompt to the explicit targets configured in `approvals.exec.targets`
|
|
230
|
-
- `both`: send to the current chat and to explicit targets
|
|
243
|
+
Mode choices:
|
|
231
244
|
|
|
232
|
-
|
|
245
|
+
- `session`: send approval prompt to current Grix chat
|
|
246
|
+
- `targets`: send approval prompt to configured `approvals.exec.targets`
|
|
247
|
+
- `both`: send to both
|
|
233
248
|
|
|
234
|
-
### 3. Restart
|
|
235
|
-
|
|
236
|
-
After changing any approval-related config:
|
|
249
|
+
### 3. Restart
|
|
237
250
|
|
|
238
251
|
```bash
|
|
239
252
|
openclaw gateway restart
|
|
@@ -241,60 +254,32 @@ openclaw gateway restart
|
|
|
241
254
|
|
|
242
255
|
### 4. Approve in chat
|
|
243
256
|
|
|
244
|
-
|
|
257
|
+
Flow:
|
|
245
258
|
|
|
246
|
-
1. Ask OpenClaw to run an `exec` command that
|
|
247
|
-
2. OpenClaw sends
|
|
259
|
+
1. Ask OpenClaw to run an `exec` command that needs approval.
|
|
260
|
+
2. OpenClaw sends approval prompt to Grix.
|
|
248
261
|
3. An allowed approver can:
|
|
249
262
|
- click `Allow Once`, `Allow Always`, or `Deny`
|
|
250
263
|
- or send `/approve <id> allow-once|allow-always|deny`
|
|
251
|
-
4. OpenClaw continues or denies
|
|
264
|
+
4. OpenClaw continues or denies execution.
|
|
252
265
|
|
|
253
266
|
Notes:
|
|
254
267
|
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
- approval requests and
|
|
258
|
-
- some OpenClaw lifecycle notices may still appear as normal text
|
|
268
|
+
- approvers must be Grix sender IDs, not OpenClaw agent IDs
|
|
269
|
+
- configure approvers under the serving account
|
|
270
|
+
- approval requests and results are posted in chat
|
|
259
271
|
|
|
260
|
-
|
|
272
|
+
## Verification
|
|
261
273
|
|
|
262
274
|
```bash
|
|
263
275
|
openclaw plugins info grix --json
|
|
264
|
-
openclaw
|
|
265
|
-
openclaw
|
|
276
|
+
openclaw skills list
|
|
277
|
+
openclaw grix doctor
|
|
266
278
|
```
|
|
267
279
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
- `plugins info grix` reports `status = "loaded"`
|
|
271
|
-
- `approvals.exec.enabled = true`
|
|
272
|
-
- `approvals.exec.mode` matches your intended delivery path
|
|
273
|
-
- the active Grix account has `execApprovals.enabled = true`
|
|
274
|
-
- the active Grix account has at least one sender id in `execApprovals.approvers`
|
|
275
|
-
|
|
276
|
-
Troubleshooting:
|
|
277
|
-
|
|
278
|
-
- if no approval card appears in the current chat, first confirm `tools.exec.ask = "always"` and `approvals.exec.mode = "session"`
|
|
279
|
-
- if you are forwarding to explicit Grix targets, confirm `approvals.exec.targets` points to the correct `channel = "grix"` target
|
|
280
|
-
- if the chat shows approval text but approvers cannot operate it, check that `approvers` contains the human Grix sender id
|
|
281
|
-
- if `openclaw gateway restart` fails config validation, remove invalid keys under `approvals.exec` and keep approver ids only under `channels.grix.*.execApprovals`
|
|
282
|
-
|
|
283
|
-
For an end-to-end verification checklist, see:
|
|
284
|
-
|
|
285
|
-
- [docs/openclaw_exec_approval_e2e.md](../../docs/openclaw_exec_approval_e2e.md)
|
|
286
|
-
|
|
287
|
-
For multi-account setups, put `execApprovals` under `channels.grix.accounts.<accountId>`.
|
|
288
|
-
|
|
289
|
-
## Native Channel Actions
|
|
290
|
-
|
|
291
|
-
The channel plugin exposes only channel-native message actions:
|
|
292
|
-
|
|
293
|
-
- `unsend`
|
|
294
|
-
- `delete`
|
|
295
|
-
|
|
296
|
-
## Environment Variables
|
|
280
|
+
Expected:
|
|
297
281
|
|
|
298
|
-
- `
|
|
299
|
-
- `
|
|
300
|
-
-
|
|
282
|
+
- plugin `grix` is enabled and loaded
|
|
283
|
+
- typed tools are callable when `tools.alsoAllow` is configured
|
|
284
|
+
- bundled skills are visible in skills list
|
|
285
|
+
- `openclaw grix doctor` can read configured `channels.grix` accounts
|