grix-connector 3.1.13 → 3.1.14
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 +241 -241
- package/dist/default-skills/grix-access-control/SKILL.md +31 -31
- package/dist/default-skills/grix-admin/SKILL.md +35 -35
- package/dist/default-skills/grix-agent-dispatch/SKILL.md +89 -89
- package/dist/default-skills/grix-chat-state/SKILL.md +56 -56
- package/dist/default-skills/grix-egg/SKILL.md +90 -90
- package/dist/default-skills/grix-group/SKILL.md +35 -35
- package/dist/default-skills/grix-owner-relay/SKILL.md +66 -66
- package/dist/default-skills/grix-query/SKILL.md +38 -38
- package/dist/default-skills/message-send/SKILL.md +36 -36
- package/dist/default-skills/message-unsend/SKILL.md +27 -27
- package/dist/default-skills/tailnet-file-share/SKILL.md +65 -65
- package/dist/grix.js +0 -0
- package/dist/service/platform-adapter.js +59 -16
- package/openclaw-plugin/skills/grix-admin/SKILL.md +202 -202
- package/openclaw-plugin/skills/grix-admin/references/api-contract.md +210 -210
- package/openclaw-plugin/skills/grix-egg/SKILL.md +81 -81
- package/openclaw-plugin/skills/grix-egg/references/api-contract.md +40 -40
- package/openclaw-plugin/skills/grix-group/SKILL.md +164 -164
- package/openclaw-plugin/skills/grix-group/references/api-contract.md +97 -97
- package/openclaw-plugin/skills/grix-query/SKILL.md +247 -247
- package/openclaw-plugin/skills/grix-register/SKILL.md +86 -86
- package/openclaw-plugin/skills/grix-register/references/api-contract.md +76 -76
- package/openclaw-plugin/skills/grix-register/references/grix-concepts.md +26 -26
- package/openclaw-plugin/skills/grix-register/references/handoff-contract.md +24 -24
- package/openclaw-plugin/skills/grix-register/references/openclaw-setup.md +6 -6
- package/openclaw-plugin/skills/grix-register/references/user-replies.md +25 -25
- package/openclaw-plugin/skills/grix-update/SKILL.md +310 -310
- package/openclaw-plugin/skills/grix-update/references/cron-setup.md +56 -56
- package/openclaw-plugin/skills/grix-update/references/update-contract.md +149 -149
- package/openclaw-plugin/skills/message-send/SKILL.md +197 -197
- package/openclaw-plugin/skills/message-unsend/SKILL.md +186 -186
- package/openclaw-plugin/skills/message-unsend/flowchart.mermaid +27 -27
- package/openclaw-plugin/skills/openclaw-memory-setup/SKILL.md +282 -282
- package/openclaw-plugin/skills/openclaw-memory-setup/references/case-study-macpro.md +52 -52
- package/openclaw-plugin/skills/openclaw-memory-setup/references/host-readiness.md +147 -147
- package/openclaw.plugin.json +24 -24
- package/package.json +121 -121
- package/scripts/install-guardian.mjs +27 -27
- package/scripts/install-guardian.sh +25 -25
- package/scripts/upgrade-guardian.sh +104 -104
- package/dist/adapter/claude/claude-bridge-server.js +0 -1
- package/dist/adapter/claude/claude-tools.js +0 -1
- package/dist/adapter/claude/claude-worker-client.js +0 -1
- package/dist/adapter/claude/mcp-http-launcher.js +0 -2
- package/dist/adapter/claude/result-timeout.js +0 -1
- package/dist/adapter/deepseek/deepseek-adapter.js +0 -6
- package/dist/adapter/deepseek/index.js +0 -1
- package/dist/adapter/qwen/index.js +0 -1
- package/dist/adapter/qwen/qwen-adapter.js +0 -4
- package/dist/aibot/client.js +0 -1
- package/dist/aibot/index.js +0 -1
- package/dist/aibot/types.js +0 -0
- package/dist/core/file-ops/handler.js +0 -1
- package/dist/core/file-ops/list-files.js +0 -1
- package/dist/core/file-ops/types.js +0 -0
- package/dist/default-skills/grix-task-status/SKILL.md +0 -36
- package/dist/log.js +0 -3
- package/dist/main.js +0 -31
- package/dist/mcp/stream-http/config.js +0 -1
- package/dist/mcp/stream-http/connection-binding.js +0 -1
- package/dist/mcp/stream-http/event-tool-executor.js +0 -1
- package/dist/mcp/stream-http/gateway.js +0 -1
- package/dist/mcp/stream-http/index.js +0 -1
- package/dist/mcp/stream-http/security.js +0 -1
- package/dist/mcp/stream-http/session-manager.js +0 -1
- package/dist/mcp/stream-http/tool-executor.js +0 -1
- package/dist/mcp/stream-http/tool-registry.js +0 -1
- package/dist/mcp/stream-http/tool-schemas.js +0 -1
- package/dist/session/index.js +0 -1
- package/dist/session/manager.js +0 -1
- package/dist/transport/index.js +0 -1
- package/dist/transport/json-rpc.js +0 -3
package/README.md
CHANGED
|
@@ -1,241 +1,241 @@
|
|
|
1
|
-
# grix-connector
|
|
2
|
-
|
|
3
|
-
A command-line daemon that connects your local AI coding agents to the [Grix](https://grix.im) platform.
|
|
4
|
-
|
|
5
|
-
## What is Grix?
|
|
6
|
-
|
|
7
|
-
Grix is an AI Agent scheduling platform. It lets you manage and interact with multiple AI coding agents through a unified chat interface. Register at [grix.im](https://grix.im) to get started.
|
|
8
|
-
|
|
9
|
-
## Get the Client
|
|
10
|
-
|
|
11
|
-
After installing grix-connector, download the Grix client from [grix.im](https://grix.im) to chat with your agents. Clients are available for iOS, Android, macOS, Windows, and Linux.
|
|
12
|
-
|
|
13
|
-
## Supported Agents
|
|
14
|
-
|
|
15
|
-
Set `client_type` in your config to one of the values below. Each `client_type` maps to a built-in adapter and CLI command — you only need the corresponding CLI installed locally.
|
|
16
|
-
|
|
17
|
-
| `client_type` | Agent | Adapter | Required CLI |
|
|
18
|
-
|---|---|---|---|
|
|
19
|
-
| `claude` | Claude Code (Anthropic) | claude | `claude` |
|
|
20
|
-
| `codex` | Codex (OpenAI) | codex | `codex` |
|
|
21
|
-
| `gemini` | Gemini (Google) | acp | `gemini` |
|
|
22
|
-
| `qwen` | Qwen (Alibaba) | acp | `qwen` |
|
|
23
|
-
| `copilot` | GitHub Copilot | acp | `copilot` or `gh` |
|
|
24
|
-
| `kiro` | Kiro | acp | `kiro-cli` |
|
|
25
|
-
| `reasonix` | Reasonix | acp | `reasonix` |
|
|
26
|
-
| `cursor` | Cursor Agent | cursor | `agent` |
|
|
27
|
-
| `codewhale` | CodeWhale | codewhale | `codewhale` |
|
|
28
|
-
| `opencode` | OpenCode | opencode | `opencode` |
|
|
29
|
-
| `pi` | Pi | pi | `pi` |
|
|
30
|
-
| `openhuman` | OpenHuman | openhuman | `openhuman-core` |
|
|
31
|
-
| `agy` | Agy (Antigravity) | agy | `agy` |
|
|
32
|
-
| `hermes` | [Hermes](https://github.com/askie/grix-hermes-python) | external | `hermes` |
|
|
33
|
-
|
|
34
|
-
The ACP adapter (Agent Client Protocol over JSON-RPC) backs Gemini, Qwen, Copilot, Kiro and Reasonix. Hermes is an external agent maintained in a separate project — see [grix-hermes-python](https://github.com/askie/grix-hermes-python) for setup.
|
|
35
|
-
|
|
36
|
-
You need to have the corresponding CLI tool installed locally before connecting an agent.
|
|
37
|
-
|
|
38
|
-
## Install
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm install -g grix-connector
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Requires Node.js >= 18.
|
|
45
|
-
|
|
46
|
-
On Windows, `grix-connector` uses the built-in Task Scheduler with a hidden WScript launcher (no extra dependency required).
|
|
47
|
-
|
|
48
|
-
## Quick Start
|
|
49
|
-
|
|
50
|
-
### 1. Register a Grix account
|
|
51
|
-
|
|
52
|
-
Go to [grix.im](https://grix.im), sign up and get your API key.
|
|
53
|
-
|
|
54
|
-
### 2. Create agent config
|
|
55
|
-
|
|
56
|
-
Create `~/.grix/config/agents.json`. Choose the `ws_url` for your region — the two regions use different WebSocket domains:
|
|
57
|
-
|
|
58
|
-
- China mainland: `wss://grix.dhf.pub/v1/agent-api/ws`
|
|
59
|
-
- Global: `wss://ws.grix.im/v1/agent-api/ws`
|
|
60
|
-
|
|
61
|
-
China mainland example:
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"agents": [
|
|
66
|
-
{
|
|
67
|
-
"name": "my-agent",
|
|
68
|
-
"ws_url": "wss://grix.dhf.pub/v1/agent-api/ws",
|
|
69
|
-
"agent_id": "your-agent-id",
|
|
70
|
-
"api_key": "your-grix-api-key",
|
|
71
|
-
"client_type": "claude"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Global example:
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"agents": [
|
|
82
|
-
{
|
|
83
|
-
"name": "my-agent",
|
|
84
|
-
"ws_url": "wss://ws.grix.im/v1/agent-api/ws",
|
|
85
|
-
"agent_id": "your-agent-id",
|
|
86
|
-
"api_key": "your-grix-api-key",
|
|
87
|
-
"client_type": "claude"
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Change `client_type` to match the agent you want to connect (see table above). You can define multiple agents in one file, or use separate files under `~/.grix/config/`.
|
|
94
|
-
|
|
95
|
-
### Config Reference
|
|
96
|
-
|
|
97
|
-
Each agent entry uses one flat structure:
|
|
98
|
-
|
|
99
|
-
| Field | Required | Description |
|
|
100
|
-
|---|---|---|
|
|
101
|
-
| `name` | yes | Display name for this agent |
|
|
102
|
-
| `ws_url` | yes | WebSocket endpoint URL (region-specific). China mainland: `wss://grix.dhf.pub/v1/agent-api/ws`; Global: `wss://ws.grix.im/v1/agent-api/ws` |
|
|
103
|
-
| `agent_id` | yes | Agent ID from Grix platform |
|
|
104
|
-
| `api_key` | yes | API key for authentication |
|
|
105
|
-
| `client_type` | yes | See Supported Agents table above |
|
|
106
|
-
| `prompt_timeout_ms` | no | Prompt execution timeout (ms) |
|
|
107
|
-
| `pool.maxSize` | no | Max adapter pool size (default 20) |
|
|
108
|
-
| `pool.idleTimeoutMs` | no | Idle adapter eviction timeout (default 300000 = 5 min) |
|
|
109
|
-
|
|
110
|
-
Adapter command/args/options are built in and resolved from `client_type`. To connect a different agent, simply change `client_type` — no other config changes needed.
|
|
111
|
-
|
|
112
|
-
### Multi-agent Example
|
|
113
|
-
|
|
114
|
-
China mainland region (swap the `ws_url` domain to `ws.grix.im` for the global region):
|
|
115
|
-
|
|
116
|
-
```json
|
|
117
|
-
{
|
|
118
|
-
"agents": [
|
|
119
|
-
{
|
|
120
|
-
"name": "my-claude",
|
|
121
|
-
"ws_url": "wss://grix.dhf.pub/v1/agent-api/ws",
|
|
122
|
-
"agent_id": "your-agent-id",
|
|
123
|
-
"api_key": "your-grix-api-key",
|
|
124
|
-
"client_type": "claude"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "my-gemini",
|
|
128
|
-
"ws_url": "wss://grix.dhf.pub/v1/agent-api/ws",
|
|
129
|
-
"agent_id": "another-agent-id",
|
|
130
|
-
"api_key": "your-grix-api-key",
|
|
131
|
-
"client_type": "gemini"
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### 3. Start the daemon
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
grix-connector start
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
The daemon connects to Grix via WebSocket and starts routing chat messages to your agents.
|
|
144
|
-
|
|
145
|
-
### Commands
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
grix-connector start # Start as system service (auto-installs on first run)
|
|
149
|
-
grix-connector stop # Stop the service
|
|
150
|
-
grix-connector restart # Restart the service
|
|
151
|
-
grix-connector reload # Hot-reload agent configs without restarting the daemon
|
|
152
|
-
grix-connector status # Check service status
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Reloading config (`reload`)
|
|
156
|
-
|
|
157
|
-
`reload` applies changes to your config files **without restarting the daemon**. It re-reads `~/.grix/config/*.json`, diffs against what's currently running, and acts per agent:
|
|
158
|
-
|
|
159
|
-
| Change in config | What happens |
|
|
160
|
-
|---|---|
|
|
161
|
-
| Agent added | Started and connected |
|
|
162
|
-
| Agent removed | Stopped and disconnected |
|
|
163
|
-
| Agent config changed | That agent restarts (stop old, start new) |
|
|
164
|
-
| Agent unchanged | **Left running untouched** — its sessions are not interrupted |
|
|
165
|
-
|
|
166
|
-
**When to use it.** You run a multi-agent setup and want to add, remove, or re-key one agent — or tweak one agent's settings — without dropping the live sessions of the *other* agents. A full `restart` would reconnect every agent and interrupt all in-flight conversations; `reload` only touches the agents whose config actually changed.
|
|
167
|
-
|
|
168
|
-
**Safety.** If any config file fails to parse (e.g. you're mid-edit and the JSON is broken), or no valid agent config is found, the reload aborts and the running agents are left exactly as they are — nothing is torn down on a bad config.
|
|
169
|
-
|
|
170
|
-
Three equivalent ways to trigger it:
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
grix-connector reload # CLI (sends SIGHUP to the daemon)
|
|
174
|
-
kill -HUP "$(cat ~/.grix/grix-acp.pid)" # raw signal (Unix)
|
|
175
|
-
curl -XPOST http://127.0.0.1:19580/api/reload # Admin API — returns the per-agent result as JSON
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
The CLI/signal form is fire-and-forget; the per-agent result is written to the daemon log. The Admin API form returns the result (added/removed/restarted/unchanged/failed) synchronously.
|
|
179
|
-
|
|
180
|
-
### Ports
|
|
181
|
-
|
|
182
|
-
The daemon binds two local loopback ports (127.0.0.1 only):
|
|
183
|
-
|
|
184
|
-
| Purpose | Default | Override (env) | Override (CLI) |
|
|
185
|
-
|---|---|---|---|
|
|
186
|
-
| Health check (`/healthz`) | `19579` | `GRIX_HEALTH_PORT` | `--health-port <port>` |
|
|
187
|
-
| Admin API (used by the local CLI) | `19580` | `GRIX_ADMIN_PORT` | `--admin-port <port>` |
|
|
188
|
-
|
|
189
|
-
If a port is already in use, the daemon refuses to start and writes a clear message to `~/.grix/service/daemon.err.log` and the main log, and marks `~/.grix/daemon-status.json` as `state: "failed"` with a `reason` like `port_bind_in_use:health:19579`.
|
|
190
|
-
|
|
191
|
-
To pick different ports:
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
# via environment
|
|
195
|
-
GRIX_HEALTH_PORT=29579 GRIX_ADMIN_PORT=29580 grix-connector restart
|
|
196
|
-
|
|
197
|
-
# or via CLI flags (when running the daemon directly)
|
|
198
|
-
grix-connector --health-port 29579 --admin-port 29580
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
To find what is occupying a port:
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
# macOS / Linux
|
|
205
|
-
lsof -nP -iTCP:19579 -sTCP:LISTEN
|
|
206
|
-
|
|
207
|
-
# Windows (PowerShell or cmd)
|
|
208
|
-
netstat -ano | findstr :19579
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## OpenClaw Plugin
|
|
212
|
-
|
|
213
|
-
grix-connector can also be installed as an [OpenClaw](https://openclaw.io) plugin, providing a Grix channel transport with admin tools and operator CLI.
|
|
214
|
-
|
|
215
|
-
### Install
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
openclaw plugin install grix-connector
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Or manually add to your OpenClaw project:
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
npm install grix-connector
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Plugin Features
|
|
228
|
-
|
|
229
|
-
- **Channel**: Grix chat transport — routes messages between OpenClaw and your Grix deployment
|
|
230
|
-
- **Tools**: `grix_query`, `grix_group`, `grix_admin`, `grix_egg`, `grix_register`, `grix_update`, `grix_message_send`, `grix_message_unsend`, `openclaw_memory_setup`
|
|
231
|
-
- **CLI**: `openclaw grix` — agent management and admin commands
|
|
232
|
-
- **Skills**: 9 bundled skills for admin, group, query, registration, update, messaging, memory setup, and egg orchestration
|
|
233
|
-
|
|
234
|
-
### Requirements
|
|
235
|
-
|
|
236
|
-
- OpenClaw >= 2026.4.8
|
|
237
|
-
- A Grix account with agent ID and API key
|
|
238
|
-
|
|
239
|
-
## License
|
|
240
|
-
|
|
241
|
-
MIT
|
|
1
|
+
# grix-connector
|
|
2
|
+
|
|
3
|
+
A command-line daemon that connects your local AI coding agents to the [Grix](https://grix.im) platform.
|
|
4
|
+
|
|
5
|
+
## What is Grix?
|
|
6
|
+
|
|
7
|
+
Grix is an AI Agent scheduling platform. It lets you manage and interact with multiple AI coding agents through a unified chat interface. Register at [grix.im](https://grix.im) to get started.
|
|
8
|
+
|
|
9
|
+
## Get the Client
|
|
10
|
+
|
|
11
|
+
After installing grix-connector, download the Grix client from [grix.im](https://grix.im) to chat with your agents. Clients are available for iOS, Android, macOS, Windows, and Linux.
|
|
12
|
+
|
|
13
|
+
## Supported Agents
|
|
14
|
+
|
|
15
|
+
Set `client_type` in your config to one of the values below. Each `client_type` maps to a built-in adapter and CLI command — you only need the corresponding CLI installed locally.
|
|
16
|
+
|
|
17
|
+
| `client_type` | Agent | Adapter | Required CLI |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `claude` | Claude Code (Anthropic) | claude | `claude` |
|
|
20
|
+
| `codex` | Codex (OpenAI) | codex | `codex` |
|
|
21
|
+
| `gemini` | Gemini (Google) | acp | `gemini` |
|
|
22
|
+
| `qwen` | Qwen (Alibaba) | acp | `qwen` |
|
|
23
|
+
| `copilot` | GitHub Copilot | acp | `copilot` or `gh` |
|
|
24
|
+
| `kiro` | Kiro | acp | `kiro-cli` |
|
|
25
|
+
| `reasonix` | Reasonix | acp | `reasonix` |
|
|
26
|
+
| `cursor` | Cursor Agent | cursor | `agent` |
|
|
27
|
+
| `codewhale` | CodeWhale | codewhale | `codewhale` |
|
|
28
|
+
| `opencode` | OpenCode | opencode | `opencode` |
|
|
29
|
+
| `pi` | Pi | pi | `pi` |
|
|
30
|
+
| `openhuman` | OpenHuman | openhuman | `openhuman-core` |
|
|
31
|
+
| `agy` | Agy (Antigravity) | agy | `agy` |
|
|
32
|
+
| `hermes` | [Hermes](https://github.com/askie/grix-hermes-python) | external | `hermes` |
|
|
33
|
+
|
|
34
|
+
The ACP adapter (Agent Client Protocol over JSON-RPC) backs Gemini, Qwen, Copilot, Kiro and Reasonix. Hermes is an external agent maintained in a separate project — see [grix-hermes-python](https://github.com/askie/grix-hermes-python) for setup.
|
|
35
|
+
|
|
36
|
+
You need to have the corresponding CLI tool installed locally before connecting an agent.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g grix-connector
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Requires Node.js >= 18.
|
|
45
|
+
|
|
46
|
+
On Windows, `grix-connector` uses the built-in Task Scheduler with a hidden WScript launcher (no extra dependency required).
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
### 1. Register a Grix account
|
|
51
|
+
|
|
52
|
+
Go to [grix.im](https://grix.im), sign up and get your API key.
|
|
53
|
+
|
|
54
|
+
### 2. Create agent config
|
|
55
|
+
|
|
56
|
+
Create `~/.grix/config/agents.json`. Choose the `ws_url` for your region — the two regions use different WebSocket domains:
|
|
57
|
+
|
|
58
|
+
- China mainland: `wss://grix.dhf.pub/v1/agent-api/ws`
|
|
59
|
+
- Global: `wss://ws.grix.im/v1/agent-api/ws`
|
|
60
|
+
|
|
61
|
+
China mainland example:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"agents": [
|
|
66
|
+
{
|
|
67
|
+
"name": "my-agent",
|
|
68
|
+
"ws_url": "wss://grix.dhf.pub/v1/agent-api/ws",
|
|
69
|
+
"agent_id": "your-agent-id",
|
|
70
|
+
"api_key": "your-grix-api-key",
|
|
71
|
+
"client_type": "claude"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Global example:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"agents": [
|
|
82
|
+
{
|
|
83
|
+
"name": "my-agent",
|
|
84
|
+
"ws_url": "wss://ws.grix.im/v1/agent-api/ws",
|
|
85
|
+
"agent_id": "your-agent-id",
|
|
86
|
+
"api_key": "your-grix-api-key",
|
|
87
|
+
"client_type": "claude"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Change `client_type` to match the agent you want to connect (see table above). You can define multiple agents in one file, or use separate files under `~/.grix/config/`.
|
|
94
|
+
|
|
95
|
+
### Config Reference
|
|
96
|
+
|
|
97
|
+
Each agent entry uses one flat structure:
|
|
98
|
+
|
|
99
|
+
| Field | Required | Description |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `name` | yes | Display name for this agent |
|
|
102
|
+
| `ws_url` | yes | WebSocket endpoint URL (region-specific). China mainland: `wss://grix.dhf.pub/v1/agent-api/ws`; Global: `wss://ws.grix.im/v1/agent-api/ws` |
|
|
103
|
+
| `agent_id` | yes | Agent ID from Grix platform |
|
|
104
|
+
| `api_key` | yes | API key for authentication |
|
|
105
|
+
| `client_type` | yes | See Supported Agents table above |
|
|
106
|
+
| `prompt_timeout_ms` | no | Prompt execution timeout (ms) |
|
|
107
|
+
| `pool.maxSize` | no | Max adapter pool size (default 20) |
|
|
108
|
+
| `pool.idleTimeoutMs` | no | Idle adapter eviction timeout (default 300000 = 5 min) |
|
|
109
|
+
|
|
110
|
+
Adapter command/args/options are built in and resolved from `client_type`. To connect a different agent, simply change `client_type` — no other config changes needed.
|
|
111
|
+
|
|
112
|
+
### Multi-agent Example
|
|
113
|
+
|
|
114
|
+
China mainland region (swap the `ws_url` domain to `ws.grix.im` for the global region):
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"agents": [
|
|
119
|
+
{
|
|
120
|
+
"name": "my-claude",
|
|
121
|
+
"ws_url": "wss://grix.dhf.pub/v1/agent-api/ws",
|
|
122
|
+
"agent_id": "your-agent-id",
|
|
123
|
+
"api_key": "your-grix-api-key",
|
|
124
|
+
"client_type": "claude"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "my-gemini",
|
|
128
|
+
"ws_url": "wss://grix.dhf.pub/v1/agent-api/ws",
|
|
129
|
+
"agent_id": "another-agent-id",
|
|
130
|
+
"api_key": "your-grix-api-key",
|
|
131
|
+
"client_type": "gemini"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 3. Start the daemon
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
grix-connector start
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The daemon connects to Grix via WebSocket and starts routing chat messages to your agents.
|
|
144
|
+
|
|
145
|
+
### Commands
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
grix-connector start # Start as system service (auto-installs on first run)
|
|
149
|
+
grix-connector stop # Stop the service
|
|
150
|
+
grix-connector restart # Restart the service
|
|
151
|
+
grix-connector reload # Hot-reload agent configs without restarting the daemon
|
|
152
|
+
grix-connector status # Check service status
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Reloading config (`reload`)
|
|
156
|
+
|
|
157
|
+
`reload` applies changes to your config files **without restarting the daemon**. It re-reads `~/.grix/config/*.json`, diffs against what's currently running, and acts per agent:
|
|
158
|
+
|
|
159
|
+
| Change in config | What happens |
|
|
160
|
+
|---|---|
|
|
161
|
+
| Agent added | Started and connected |
|
|
162
|
+
| Agent removed | Stopped and disconnected |
|
|
163
|
+
| Agent config changed | That agent restarts (stop old, start new) |
|
|
164
|
+
| Agent unchanged | **Left running untouched** — its sessions are not interrupted |
|
|
165
|
+
|
|
166
|
+
**When to use it.** You run a multi-agent setup and want to add, remove, or re-key one agent — or tweak one agent's settings — without dropping the live sessions of the *other* agents. A full `restart` would reconnect every agent and interrupt all in-flight conversations; `reload` only touches the agents whose config actually changed.
|
|
167
|
+
|
|
168
|
+
**Safety.** If any config file fails to parse (e.g. you're mid-edit and the JSON is broken), or no valid agent config is found, the reload aborts and the running agents are left exactly as they are — nothing is torn down on a bad config.
|
|
169
|
+
|
|
170
|
+
Three equivalent ways to trigger it:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
grix-connector reload # CLI (sends SIGHUP to the daemon)
|
|
174
|
+
kill -HUP "$(cat ~/.grix/grix-acp.pid)" # raw signal (Unix)
|
|
175
|
+
curl -XPOST http://127.0.0.1:19580/api/reload # Admin API — returns the per-agent result as JSON
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The CLI/signal form is fire-and-forget; the per-agent result is written to the daemon log. The Admin API form returns the result (added/removed/restarted/unchanged/failed) synchronously.
|
|
179
|
+
|
|
180
|
+
### Ports
|
|
181
|
+
|
|
182
|
+
The daemon binds two local loopback ports (127.0.0.1 only):
|
|
183
|
+
|
|
184
|
+
| Purpose | Default | Override (env) | Override (CLI) |
|
|
185
|
+
|---|---|---|---|
|
|
186
|
+
| Health check (`/healthz`) | `19579` | `GRIX_HEALTH_PORT` | `--health-port <port>` |
|
|
187
|
+
| Admin API (used by the local CLI) | `19580` | `GRIX_ADMIN_PORT` | `--admin-port <port>` |
|
|
188
|
+
|
|
189
|
+
If a port is already in use, the daemon refuses to start and writes a clear message to `~/.grix/service/daemon.err.log` and the main log, and marks `~/.grix/daemon-status.json` as `state: "failed"` with a `reason` like `port_bind_in_use:health:19579`.
|
|
190
|
+
|
|
191
|
+
To pick different ports:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# via environment
|
|
195
|
+
GRIX_HEALTH_PORT=29579 GRIX_ADMIN_PORT=29580 grix-connector restart
|
|
196
|
+
|
|
197
|
+
# or via CLI flags (when running the daemon directly)
|
|
198
|
+
grix-connector --health-port 29579 --admin-port 29580
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
To find what is occupying a port:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# macOS / Linux
|
|
205
|
+
lsof -nP -iTCP:19579 -sTCP:LISTEN
|
|
206
|
+
|
|
207
|
+
# Windows (PowerShell or cmd)
|
|
208
|
+
netstat -ano | findstr :19579
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## OpenClaw Plugin
|
|
212
|
+
|
|
213
|
+
grix-connector can also be installed as an [OpenClaw](https://openclaw.io) plugin, providing a Grix channel transport with admin tools and operator CLI.
|
|
214
|
+
|
|
215
|
+
### Install
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
openclaw plugin install grix-connector
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Or manually add to your OpenClaw project:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
npm install grix-connector
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Plugin Features
|
|
228
|
+
|
|
229
|
+
- **Channel**: Grix chat transport — routes messages between OpenClaw and your Grix deployment
|
|
230
|
+
- **Tools**: `grix_query`, `grix_group`, `grix_admin`, `grix_egg`, `grix_register`, `grix_update`, `grix_message_send`, `grix_message_unsend`, `openclaw_memory_setup`
|
|
231
|
+
- **CLI**: `openclaw grix` — agent management and admin commands
|
|
232
|
+
- **Skills**: 9 bundled skills for admin, group, query, registration, update, messaging, memory setup, and egg orchestration
|
|
233
|
+
|
|
234
|
+
### Requirements
|
|
235
|
+
|
|
236
|
+
- OpenClaw >= 2026.4.8
|
|
237
|
+
- A Grix account with agent ID and API key
|
|
238
|
+
|
|
239
|
+
## License
|
|
240
|
+
|
|
241
|
+
MIT
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: grix-access-control
|
|
3
|
-
description: Manage sender access control with the typed `grix_access_control` tool — approve/deny a pairing code, allow/remove a sender, or set the access policy. Trigger when the user asks to approve a pairing request, allowlist or block a sender, or change who is allowed to message the agent.
|
|
4
|
-
trigger: 当用户要批准/拒绝配对码、允许或移除某个发送者、或调整谁可以给 Agent 发消息的访问策略时
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Grix Access Control
|
|
8
|
-
|
|
9
|
-
Use the `grix_access_control` tool to manage who may message this agent.
|
|
10
|
-
|
|
11
|
-
## Tool contract
|
|
12
|
-
|
|
13
|
-
Call `grix_access_control` with one `action`:
|
|
14
|
-
|
|
15
|
-
- `pair_approve` / `pair_deny` — approve or deny a pairing request. Requires the
|
|
16
|
-
`code` from the pairing request.
|
|
17
|
-
- `allow_sender` — add a sender to the allowlist. Requires `sender_id`.
|
|
18
|
-
- `remove_sender` — remove a sender. Requires `sender_id`.
|
|
19
|
-
- `set_policy` — set the access policy. Requires `policy`, one of:
|
|
20
|
-
- `allowlist` — only allowlisted senders may message
|
|
21
|
-
- `open` — anyone may message
|
|
22
|
-
- `disabled` — access control off
|
|
23
|
-
|
|
24
|
-
## Rules
|
|
25
|
-
|
|
26
|
-
1. Pick exactly one `action` and supply only the field it needs (`code` for
|
|
27
|
-
pairing, `sender_id` for allow/remove, `policy` for set_policy).
|
|
28
|
-
2. These actions change who can reach the agent — confirm with the user before
|
|
29
|
-
approving an unknown pairing code or switching the policy to `open`.
|
|
30
|
-
3. On failure, report the exact reason (e.g. expired/invalid code) instead of
|
|
31
|
-
retrying with a guessed value.
|
|
1
|
+
---
|
|
2
|
+
name: grix-access-control
|
|
3
|
+
description: Manage sender access control with the typed `grix_access_control` tool — approve/deny a pairing code, allow/remove a sender, or set the access policy. Trigger when the user asks to approve a pairing request, allowlist or block a sender, or change who is allowed to message the agent.
|
|
4
|
+
trigger: 当用户要批准/拒绝配对码、允许或移除某个发送者、或调整谁可以给 Agent 发消息的访问策略时
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Grix Access Control
|
|
8
|
+
|
|
9
|
+
Use the `grix_access_control` tool to manage who may message this agent.
|
|
10
|
+
|
|
11
|
+
## Tool contract
|
|
12
|
+
|
|
13
|
+
Call `grix_access_control` with one `action`:
|
|
14
|
+
|
|
15
|
+
- `pair_approve` / `pair_deny` — approve or deny a pairing request. Requires the
|
|
16
|
+
`code` from the pairing request.
|
|
17
|
+
- `allow_sender` — add a sender to the allowlist. Requires `sender_id`.
|
|
18
|
+
- `remove_sender` — remove a sender. Requires `sender_id`.
|
|
19
|
+
- `set_policy` — set the access policy. Requires `policy`, one of:
|
|
20
|
+
- `allowlist` — only allowlisted senders may message
|
|
21
|
+
- `open` — anyone may message
|
|
22
|
+
- `disabled` — access control off
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
1. Pick exactly one `action` and supply only the field it needs (`code` for
|
|
27
|
+
pairing, `sender_id` for allow/remove, `policy` for set_policy).
|
|
28
|
+
2. These actions change who can reach the agent — confirm with the user before
|
|
29
|
+
approving an unknown pairing code or switching the policy to `open`.
|
|
30
|
+
3. On failure, report the exact reason (e.g. expired/invalid code) instead of
|
|
31
|
+
retrying with a guessed value.
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: grix-admin
|
|
3
|
-
description: Use the typed `grix_admin` tool to manage agents and categories on the Grix platform — create agents, list/create/update categories, assign an agent to a category, and rotate an agent's API key. Trigger when the user asks to create a new agent, organize agents into categories, or rotate an agent key.
|
|
4
|
-
trigger: 当用户要在 Grix 平台创建 Agent、管理分类、给 Agent 分配分类、或轮换 Agent 的 API key 时
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Grix Admin
|
|
8
|
-
|
|
9
|
-
Use the `grix_admin` tool for agent and category management on the Grix
|
|
10
|
-
platform. This skill covers only platform-side management — it does not touch
|
|
11
|
-
any local connector configuration or binding.
|
|
12
|
-
|
|
13
|
-
## Tool contract
|
|
14
|
-
|
|
15
|
-
Call `grix_admin` with one `action`:
|
|
16
|
-
|
|
17
|
-
- `create_agent` — create an agent. Requires `agentName`; optional
|
|
18
|
-
`introduction`, `isMain`, `categoryId`.
|
|
19
|
-
- `list_categories` — list all categories. No extra fields.
|
|
20
|
-
- `create_category` — requires `name`; optional `parentId`, `sortOrder`.
|
|
21
|
-
- `update_category` — requires `categoryId`; optional `name`, `parentId`,
|
|
22
|
-
`sortOrder`.
|
|
23
|
-
- `assign_category` — assign an agent to a category. Requires `agentId` and
|
|
24
|
-
`categoryId`.
|
|
25
|
-
- `rotate_api_key` — rotate an agent's API key. Requires `agentId`.
|
|
26
|
-
|
|
27
|
-
## Rules
|
|
28
|
-
|
|
29
|
-
1. Pick exactly one `action` per call and supply only the fields that action
|
|
30
|
-
needs.
|
|
31
|
-
2. For `assign_category` / `rotate_api_key` you need the target `agentId`; for
|
|
32
|
-
category edits you need the `categoryId`. Resolve unknown IDs first
|
|
33
|
-
(`list_categories`, or `grix_query` for agents) rather than guessing.
|
|
34
|
-
3. `rotate_api_key` invalidates the old key. Confirm the target agent with the
|
|
35
|
-
user before rotating, and report the new key handling per platform policy.
|
|
1
|
+
---
|
|
2
|
+
name: grix-admin
|
|
3
|
+
description: Use the typed `grix_admin` tool to manage agents and categories on the Grix platform — create agents, list/create/update categories, assign an agent to a category, and rotate an agent's API key. Trigger when the user asks to create a new agent, organize agents into categories, or rotate an agent key.
|
|
4
|
+
trigger: 当用户要在 Grix 平台创建 Agent、管理分类、给 Agent 分配分类、或轮换 Agent 的 API key 时
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Grix Admin
|
|
8
|
+
|
|
9
|
+
Use the `grix_admin` tool for agent and category management on the Grix
|
|
10
|
+
platform. This skill covers only platform-side management — it does not touch
|
|
11
|
+
any local connector configuration or binding.
|
|
12
|
+
|
|
13
|
+
## Tool contract
|
|
14
|
+
|
|
15
|
+
Call `grix_admin` with one `action`:
|
|
16
|
+
|
|
17
|
+
- `create_agent` — create an agent. Requires `agentName`; optional
|
|
18
|
+
`introduction`, `isMain`, `categoryId`.
|
|
19
|
+
- `list_categories` — list all categories. No extra fields.
|
|
20
|
+
- `create_category` — requires `name`; optional `parentId`, `sortOrder`.
|
|
21
|
+
- `update_category` — requires `categoryId`; optional `name`, `parentId`,
|
|
22
|
+
`sortOrder`.
|
|
23
|
+
- `assign_category` — assign an agent to a category. Requires `agentId` and
|
|
24
|
+
`categoryId`.
|
|
25
|
+
- `rotate_api_key` — rotate an agent's API key. Requires `agentId`.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
1. Pick exactly one `action` per call and supply only the fields that action
|
|
30
|
+
needs.
|
|
31
|
+
2. For `assign_category` / `rotate_api_key` you need the target `agentId`; for
|
|
32
|
+
category edits you need the `categoryId`. Resolve unknown IDs first
|
|
33
|
+
(`list_categories`, or `grix_query` for agents) rather than guessing.
|
|
34
|
+
3. `rotate_api_key` invalidates the old key. Confirm the target agent with the
|
|
35
|
+
user before rotating, and report the new key handling per platform policy.
|