@dhf-openclaw/grix 0.4.7 → 0.4.8

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 CHANGED
@@ -91,7 +91,7 @@ If you need the detailed admin-side requirements, see the companion Grix admin p
91
91
 
92
92
  After install, OpenClaw can surface these bundled skills from this plugin:
93
93
 
94
- - `grix-auth-access`: inspect current readiness, guide website registration/login, create or reuse `provider_type=3` API agents, install or enable `@dhf-openclaw/grix-admin`, and configure the main `channels.grix` path plus required tools
94
+ - `grix-auth-access`: inspect current readiness, follow the protocol-based main-agent path, create or reuse `provider_type=3` API agents when an access token is already available, install or enable `@dhf-openclaw/grix-admin`, and configure the main `channels.grix` path plus required tools
95
95
  - `egg-install`: handle Shrimp Pond egg install chats, confirm targets with the user in the current private conversation, execute persona.zip or skill.zip installation with正规步骤, and report progress or failures in normal dialogue
96
96
  - `message-send`: send current-session or cross-session Grix messages
97
97
  - `message-unsend`: unsend previously sent Grix messages
@@ -302,7 +302,7 @@ Grix fully adapts the OpenClaw communication protocol, so OpenClaw interaction a
302
302
 
303
303
  1. inspect whether the local OpenClaw main agent is already configured
304
304
  2. if the main channel is already configured, tell the user they can log in to [https://grix.dhf.pub/](https://grix.dhf.pub/) immediately
305
- 3. otherwise guide registration or login
305
+ 3. otherwise continue with the protocol-based agent setup path
306
306
  4. create or reuse a `provider_type=3` API agent
307
307
  5. install or enable `@dhf-openclaw/grix-admin` when group-governance capability is requested
308
308
  6. configure the OpenClaw main `channels.grix` entry and required tools block
package/dist/index.js CHANGED
@@ -1934,6 +1934,9 @@ function deleteAccountFromConfigSection(params) {
1934
1934
  // src/actions.ts
1935
1935
  var WS_ACTIONS = /* @__PURE__ */ new Set(["unsend", "delete"]);
1936
1936
  var DISCOVERABLE_ACTIONS = ["unsend", "delete"];
1937
+ function hasConfiguredEnabledAccount(cfg) {
1938
+ return listAibotAccountIds(cfg).map((accountId) => resolveAibotAccount({ cfg, accountId })).some((account) => account.enabled && account.configured);
1939
+ }
1937
1940
  function toSnakeCaseKey(key) {
1938
1941
  return key.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
1939
1942
  }
@@ -1950,12 +1953,11 @@ function readStringishParam(params, key) {
1950
1953
  return void 0;
1951
1954
  }
1952
1955
  var aibotMessageActions = {
1953
- listActions: ({ cfg }) => {
1954
- const hasConfiguredAccount = listAibotAccountIds(cfg).map((accountId) => resolveAibotAccount({ cfg, accountId })).some((account) => account.enabled && account.configured);
1955
- if (!hasConfiguredAccount) {
1956
- return [];
1956
+ describeMessageTool: ({ cfg }) => {
1957
+ if (!hasConfiguredEnabledAccount(cfg)) {
1958
+ return null;
1957
1959
  }
1958
- return DISCOVERABLE_ACTIONS;
1960
+ return { actions: DISCOVERABLE_ACTIONS };
1959
1961
  },
1960
1962
  supportsAction: ({ action }) => {
1961
1963
  const normalizedAction = String(action ?? "").trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhf-openclaw/grix",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Connect OpenClaw to grix.dhf.pub for OpenClaw website management with mobile PWA support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: grix-auth-access
3
- description: 用 Grix 网站公开鉴权 API 完成邮箱验证码发送、邮箱注册、邮箱或账号密码登录拿 token、创建 `provider_type=3` 的 Agent API 类型 agent,并按 `@dhf-openclaw/grix` 与 `@dhf-openclaw/grix-admin` 说明为 OpenClaw 主 agent 配置 grix 渠道和群管理能力;插件接入目标是让用户在 `https://grix.dhf.pub/` 管理 OpenClaw,并支持移动端 PWA 页面。
3
+ description: 用 Grix 协议创建或复用 `provider_type=3` 的 Agent API 类型 agent,并按 `@dhf-openclaw/grix` 与 `@dhf-openclaw/grix-admin` 说明为 OpenClaw 主 agent 配置 grix 渠道和群管理能力。插件接入目标是让用户在 `https://grix.dhf.pub/` 管理 OpenClaw,并支持移动端 PWA 页面。
4
4
  ---
5
5
 
6
6
  # Grix Auth Access
@@ -9,15 +9,10 @@ Use the bundled scripts and local OpenClaw CLI to bootstrap Grix channel access
9
9
 
10
10
  ## Business Capabilities
11
11
 
12
- 1. `send-email-code`
13
- 2. `register`
14
- 3. `login`
15
- 4. `create-api-agent`
16
- 5. `inspect@dhf-openclaw`
17
- 6. `configure@dhf-openclaw`
18
- 7. `bootstrap@dhf-openclaw`
19
-
20
- `fetch-captcha` is only a helper step for `reset` and `change_password` email-code sends.
12
+ 1. `create-api-agent`
13
+ 2. `inspect@dhf-openclaw`
14
+ 3. `configure@dhf-openclaw`
15
+ 4. `bootstrap@dhf-openclaw`
21
16
 
22
17
  ## Explain Grix
23
18
 
@@ -34,52 +29,21 @@ When the user asks what Grix is, what they gain after setup, or whether it is wo
34
29
 
35
30
  If the user wants the main OpenClaw agent to gain Grix channel ability quickly:
36
31
 
37
- 1. If the request is first to verify whether the local machine is already ready, run `inspect@dhf-openclaw` before any remote login or local mutation.
32
+ 1. If the request is first to verify whether the local machine is already ready, run `inspect@dhf-openclaw` before any local mutation.
38
33
  2. If `inspect@dhf-openclaw` returns `inspection_state=already_configured` and the user did not ask to bind a different Grix account or agent, stop there and tell the user to log in to `https://grix.dhf.pub/` directly.
39
34
  3. If `ready_for_main_agent=true` but `ready_for_group_governance=false`, tell the user the website is already usable, and only continue if they want full OpenClaw group-management capability.
40
35
  4. Otherwise prefer `bootstrap@dhf-openclaw`.
41
- 5. If the user already has `access_token`, use it directly.
42
- 6. Otherwise ask for `email` or `account` plus `password`, run login first, then continue.
43
- 7. Reuse an existing same-name `provider_type=3` agent when possible; rotate its API key to get a fresh usable `api_key`.
44
- 8. If no matching API agent exists, create one.
45
- 9. Inspect local OpenClaw plugin state, main `channels.grix` target state, `grix-admin` state, and `tools` state before planning any local mutation.
46
- 10. Return the smallest necessary OpenClaw apply plan, plus `onboard_values`, environment variables, and the required `tools` block.
47
- 11. Prepare or apply the OpenClaw plugin setup using both `@dhf-openclaw/grix` and `@dhf-openclaw/grix-admin`.
36
+ 5. Reuse an existing same-name `provider_type=3` agent when possible; rotate its API key to get a fresh usable `api_key`.
37
+ 6. If no matching API agent exists, create one.
38
+ 7. Inspect local OpenClaw plugin state, main `channels.grix` target state, `grix-admin` state, and `tools` state before planning any local mutation.
39
+ 8. Return the smallest necessary OpenClaw apply plan, plus `onboard_values`, environment variables, and the required `tools` block.
40
+ 9. Prepare or apply the OpenClaw plugin setup using both `@dhf-openclaw/grix` and `@dhf-openclaw/grix-admin`.
48
41
 
49
42
  ## Workflow
50
43
 
51
- ### A. Send registration email code
52
-
53
- 1. Ask for `email`.
54
- 2. Run `scripts/grix_auth.py send-email-code --email ... --scene register`.
55
-
56
- ### A2. Send reset or change-password email code
57
-
58
- 1. Ask for `email`.
59
- 2. Run `scripts/grix_auth.py fetch-captcha`.
60
- 3. Show `captcha_image_path` to the user if present.
61
- 4. Ask the user to read the captcha text.
62
- 5. Run `scripts/grix_auth.py send-email-code --email ... --scene reset --captcha-id ... --captcha-value ...`.
63
-
64
- ### B. Register
65
-
66
- 1. Ask for `email`, `password`, and `email verification code`.
67
- 2. Run `scripts/grix_auth.py register --email ... --password ... --email-code ...`.
68
- 3. Return top-level `access_token`, `refresh_token`, `expires_in`, and `user_id`.
69
-
70
- ### C. Login and get token
71
-
72
- 1. Ask for `email` or `account` plus `password`.
73
- 2. Prefer email login when the user gives an email address:
74
- - `scripts/grix_auth.py login --email ... --password ...`
75
- 3. If the user gives a username instead:
76
- - `scripts/grix_auth.py login --account ... --password ...`
77
- 4. Return top-level `access_token`, `refresh_token`, `expires_in`, and `user_id`.
78
- 5. Tell the user they can also log in to `https://grix.dhf.pub/` directly to start using it.
79
-
80
- ### D. Create provider_type=3 agent
44
+ ### A. Create provider_type=3 agent
81
45
 
82
- 1. Require `access_token`.
46
+ 1. Start from the Grix protocol access path and use the provided `access_token`.
83
47
  2. Ask for `agent_name`.
84
48
  3. By default, prefer reusing an existing same-name `provider_type=3` agent:
85
49
  - list existing agents
@@ -88,7 +52,7 @@ If the user wants the main OpenClaw agent to gain Grix channel ability quickly:
88
52
  4. Run `scripts/grix_auth.py create-api-agent --access-token ... --agent-name ...`.
89
53
  5. Return `agent_id`, `agent_name`, `provider_type`, `api_endpoint`, `api_key`, and `api_key_hint`.
90
54
 
91
- ### E. Configure OpenClaw grix channel
55
+ ### B. Configure OpenClaw grix channel
92
56
 
93
57
  1. Require `agent_id`, `api_endpoint`, and `api_key`.
94
58
  2. Default channel name: `grix-main`.
@@ -133,7 +97,7 @@ If the user wants the main OpenClaw agent to gain Grix channel ability quickly:
133
97
 
134
98
  - `openclaw gateway restart`
135
99
 
136
- ### F. Inspect local OpenClaw readiness
100
+ ### C. Inspect local OpenClaw readiness
137
101
 
138
102
  Use:
139
103
 
@@ -149,9 +113,9 @@ This action:
149
113
  4. checks whether `tools.profile`, `tools.alsoAllow`, and `tools.sessions.visibility` match the required group-governance settings
150
114
  5. returns `inspection_state`, `ready_for_main_agent`, `ready_for_group_governance`, and `recommended_next_steps`
151
115
  6. if the main channel is already ready, return `portal_url`, `portal_ready=true`, and a direct "login to the website and try it" hint, even when local group governance is still pending
152
- 7. never logs in, creates agents, or mutates local OpenClaw state
116
+ 7. never mutates local OpenClaw state
153
117
 
154
- ### G. One-shot bootstrap
118
+ ### D. One-shot bootstrap
155
119
 
156
120
  Use:
157
121
 
@@ -161,7 +125,7 @@ scripts/grix_auth.py bootstrap@dhf-openclaw ...
161
125
 
162
126
  This action can:
163
127
 
164
- 1. login when needed
128
+ 1. use a provided `access_token`
165
129
  2. reuse-or-create the API agent
166
130
  3. generate OpenClaw setup preview for both plugins and the required tools config
167
131
  4. apply OpenClaw setup when `--apply` is present
@@ -169,36 +133,16 @@ This action can:
169
133
 
170
134
  ## Guardrails
171
135
 
172
- 1. Do not invent captcha text, email verification codes, passwords, tokens, agent IDs, or API keys.
173
- 2. Do not call `send-email-code` for `reset` or `change_password` before obtaining a fresh `captcha_id`.
174
- 3. Treat `register`, `create-api-agent`, key rotation on reused agents, and `configure@dhf-openclaw --apply` as side-effecting operations.
175
- 4. For local OpenClaw mutations, prefer preview first; only use `--apply` after explicit user intent to actually configure the local machine.
176
- 5. Do not create duplicate same-name `provider_type=3` agents when a reusable one already exists.
177
- 6. Keep token and API key output exact when the user asks for them.
178
- 7. `provider_type` for created or reused Grix agent must be `3`.
179
- 8. When configuring the main agent, prefer updating base `channels.grix` over inventing extra accounts.
180
- 9. Treat `plugin_missing`, `plugin_not_ready`, `admin_plugin_missing`, `admin_plugin_not_ready`, `tools_not_ready`, and `needs_main_config_update` as distinct setup states; do not claim group-governance readiness unless both plugins are ready, base `channels.grix` matches the target, and the required tools block is active.
181
- 10. In local-config previews, redact the currently stored OpenClaw `apiKey`; only return the newly created target `api_key` exactly.
182
- 11. If `inspect@dhf-openclaw` says the main agent is already configured and the user did not ask for a different account or agent target, stop instead of continuing into login or local mutation.
183
- 12. When the result says `portal_ready=true`, explicitly tell the user they can log in to `https://grix.dhf.pub/` directly to experience Grix.
184
- 13. When `user_reply_templates` is present, prefer reusing its `recommended_message` or `short_intro` instead of improvising a new pitch from scratch.
185
-
186
- ## Error Handling
187
-
188
- 1. `图形验证码错误或已过期`:
189
- for `reset` or `change_password`, fetch a new captcha and retry send-email-code.
190
- 2. `该邮箱已被注册`:
191
- stop registration and switch to login if the user wants.
192
- 3. `邮箱验证码错误或已过期`:
193
- ask the user for a new email verification code.
194
- 4. `用户不存在或密码错误`:
195
- ask the user to re-check the login identity and password.
196
- 5. `openclaw` command failure:
197
- return the failed command, stderr, and advise whether to retry with adjusted flags.
198
- 6. Existing same-name agent found but no usable `api_key`:
199
- rotate the key unless the user explicitly asked not to.
200
- 7. Missing `api_endpoint` or `api_key` after agent creation:
201
- stop and report that agent bootstrap data is incomplete.
136
+ 1. Do not invent tokens, agent IDs, or API keys.
137
+ 2. Treat `create-api-agent`, key rotation on reused agents, and `configure@dhf-openclaw --apply` as side-effecting operations.
138
+ 3. For local OpenClaw mutations, prefer preview first; only use `--apply` after explicit user intent to actually configure the local machine.
139
+ 4. Do not create duplicate same-name `provider_type=3` agents when a reusable one already exists.
140
+ 5. Keep API key output exact when the user asks for it.
141
+ 6. `provider_type` for created or reused Grix agent must be `3`.
142
+ 7. When configuring the main agent, prefer updating base `channels.grix` over inventing extra accounts.
143
+ 8. Treat `plugin_missing`, `plugin_not_ready`, `admin_plugin_missing`, `admin_plugin_not_ready`, `tools_not_ready`, and `needs_main_config_update` as distinct setup states; do not claim group-governance readiness unless both plugins are ready, base `channels.grix` matches the target, and the required tools block is active.
144
+ 9. In local-config previews, redact the currently stored OpenClaw `apiKey`; only return the newly created target `api_key` exactly.
145
+ 10. If `inspect@dhf-openclaw` says the main agent is already configured and the user did not ask for a different agent target, stop instead of continuing into setup mutation.
202
146
 
203
147
  ## Script Contract
204
148
 
@@ -206,29 +150,24 @@ Script: `scripts/grix_auth.py`
206
150
 
207
151
  Actions:
208
152
 
209
- 1. `fetch-captcha`
210
- 2. `send-email-code`
211
- 3. `register`
212
- 4. `login`
213
- 5. `create-api-agent`
214
- 6. `inspect@dhf-openclaw`
215
- 7. `configure@dhf-openclaw`
216
- 8. `bootstrap@dhf-openclaw`
153
+ 1. `create-api-agent`
154
+ 2. `inspect@dhf-openclaw`
155
+ 3. `configure@dhf-openclaw`
156
+ 4. `bootstrap@dhf-openclaw`
217
157
 
218
158
  Success shape highlights:
219
159
 
220
- 1. `register` and `login` return top-level `access_token`, `refresh_token`, `expires_in`, `user_id`
221
- 2. `register`, `login`, `inspect@dhf-openclaw`, `configure@dhf-openclaw`, and `bootstrap@dhf-openclaw` can return `portal_url`, `portal_ready`, and `portal_hint`
160
+ 1. `create-api-agent` returns top-level `agent_id`, `api_endpoint`, `api_key`, `api_key_hint`, and whether the agent was reused or newly created
161
+ 2. `inspect@dhf-openclaw`, `configure@dhf-openclaw`, and `bootstrap@dhf-openclaw` can return `portal_url`, `portal_ready`, and `portal_hint`
222
162
  3. `inspect@dhf-openclaw`, `configure@dhf-openclaw`, and `bootstrap@dhf-openclaw` also return `grix_intro`, `grix_highlights`, and `user_reply_templates` so the agent can explain the concept to the user consistently
223
- 4. `register` and `login` also return `user_reply_templates` for the "账号可直接登录网站体验" scenario
224
- 5. `create-api-agent` returns top-level `agent_id`, `api_endpoint`, `api_key`, `api_key_hint`, and whether the agent was reused or newly created
225
- 6. `inspect@dhf-openclaw` returns `inspection_state`, `plugin_status`, `admin_plugin_status`, redacted current main grix config, current tools config, channel consistency checks, tools checks, readiness booleans, and `recommended_next_steps`
226
- 7. `configure@dhf-openclaw` returns `setup_state`, `plugin_status`, `admin_plugin_status`, current and next main grix config, current and next tools config, minimal plugin commands, `onboard_values`, environment variables, required tools config, and `command_results` when `--apply` is used
227
- 8. `bootstrap@dhf-openclaw` returns nested `login`, `created_agent`, `openclaw_setup`, top-level `channel_credentials`, and `bootstrap_state`
163
+ 4. `create-api-agent` returns the `provider_type=3` agent data
164
+ 5. `inspect@dhf-openclaw` returns `inspection_state`, `plugin_status`, `admin_plugin_status`, redacted current main grix config, current tools config, channel consistency checks, tools checks, readiness booleans, and `recommended_next_steps`
165
+ 6. `configure@dhf-openclaw` returns `setup_state`, `plugin_status`, `admin_plugin_status`, current and next main grix config, current and next tools config, minimal plugin commands, `onboard_values`, environment variables, required tools config, and `command_results` when `--apply` is used
166
+ 7. `bootstrap@dhf-openclaw` returns nested `created_agent`, `openclaw_setup`, top-level `channel_credentials`, and `bootstrap_state`
228
167
 
229
168
  ## References
230
169
 
231
- 1. Read [references/api-contract.md](references/api-contract.md) for auth and API-agent creation routes.
170
+ 1. Read [references/api-contract.md](references/api-contract.md) for API-agent creation routes.
232
171
  2. Read [references/openclaw-setup.md](references/openclaw-setup.md) for the `@dhf-openclaw/grix` + `@dhf-openclaw/grix-admin` setup flow.
233
172
  3. Read [references/grix-concepts.md](references/grix-concepts.md) when the user needs a clear product/concept explanation.
234
173
  4. Read [references/user-replies.md](references/user-replies.md) when the user needs short, direct pitch or status replies.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Grix Auth Access"
3
3
  short_description: "Inspect, explain, or bootstrap Grix for OpenClaw."
4
- default_prompt: "Use $grix-auth-access to explain what Grix is, inspect whether the local OpenClaw main agent already has a healthy grix channel plus the required grix-admin and tools setup, reuse the returned user_reply_templates when replying to the user, stop if everything is already configured and tell the user to log in to https://grix.dhf.pub/ directly, or otherwise log in, reuse-or-create a provider_type=3 API agent, install or enable @dhf-openclaw/grix-admin, and return the minimal main-agent setup path including tools.alsoAllow for message, grix_group, and grix_agent_admin."
4
+ default_prompt: "Use $grix-auth-access to explain what Grix is, inspect whether the local OpenClaw main agent already has a healthy grix channel plus the required grix-admin and tools setup, reuse the returned user_reply_templates when replying to the user, stop if everything is already configured and tell the user to log in to https://grix.dhf.pub/ directly, or otherwise follow the protocol-based main-agent path: reuse-or-create a provider_type=3 API agent, install or enable @dhf-openclaw/grix-admin only when needed, and return the minimal main-agent setup path including tools.alsoAllow for message, grix_group, and grix_agent_admin."
@@ -3,24 +3,10 @@
3
3
  ## Base
4
4
 
5
5
  1. Website: `https://grix.dhf.pub/`
6
- 2. Public auth API base: `https://grix.dhf.pub/v1`
6
+ 2. Public Grix API base: `https://grix.dhf.pub/v1`
7
7
 
8
8
  ## Route Mapping
9
9
 
10
- ### Auth business actions
11
-
12
- | Action | Method | Route |
13
- |---|---|---|
14
- | `send-email-code` | `POST` | `/auth/send-code` |
15
- | `register` | `POST` | `/auth/register` |
16
- | `login` | `POST` | `/auth/login` |
17
-
18
- Helper prerequisite:
19
-
20
- | Helper Action | Method | Route | Purpose |
21
- |---|---|---|---|
22
- | `fetch-captcha` | `GET` | `/auth/captcha` | Fetch a fresh captcha before `send-email-code` for `reset` or `change_password` |
23
-
24
10
  ### Agent bootstrap action
25
11
 
26
12
  | Action | Method | Route | Auth |
@@ -31,54 +17,6 @@ Helper prerequisite:
31
17
 
32
18
  ## Payloads
33
19
 
34
- ### `send-email-code`
35
-
36
- ```json
37
- {
38
- "email": "user@example.com",
39
- "scene": "register"
40
- }
41
- ```
42
-
43
- For `reset` and `change_password`, `captcha_id` and `captcha_value` are still required:
44
-
45
- ```json
46
- {
47
- "email": "user@example.com",
48
- "scene": "reset",
49
- "captcha_id": "captcha-id",
50
- "captcha_value": "ab12"
51
- }
52
- ```
53
-
54
- ### `register`
55
-
56
- ```json
57
- {
58
- "email": "user@example.com",
59
- "password": "secret123",
60
- "email_code": "123456",
61
- "device_id": "web_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
62
- "platform": "web"
63
- }
64
- ```
65
-
66
- ### `login`
67
-
68
- ```json
69
- {
70
- "account": "user@example.com",
71
- "password": "secret123",
72
- "device_id": "web_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
73
- "platform": "web"
74
- }
75
- ```
76
-
77
- `account` can be either:
78
-
79
- 1. email
80
- 2. username
81
-
82
20
  ### `create-api-agent`
83
21
 
84
22
  ```json
@@ -90,7 +28,7 @@ For `reset` and `change_password`, `captcha_id` and `captcha_value` are still re
90
28
 
91
29
  `provider_type=3` means Agent API type.
92
30
 
93
- ### Reuse flow
31
+ ## Reuse flow
94
32
 
95
33
  When the same-name `provider_type=3` agent already exists, the skill should:
96
34
 
@@ -101,19 +39,6 @@ When the same-name `provider_type=3` agent already exists, the skill should:
101
39
 
102
40
  ## Success Highlights
103
41
 
104
- ### Captcha helper
105
-
106
- `fetch-captcha` returns `captcha_id` and `b64s`. The bundled script also returns `captcha_image_path` when image decoding succeeds. This helper is only needed for `reset` and `change_password` email-code sends.
107
-
108
- ### `register` / `login`
109
-
110
- The bundled script lifts these fields to the top level:
111
-
112
- 1. `access_token`
113
- 2. `refresh_token`
114
- 3. `expires_in`
115
- 4. `user_id`
116
-
117
42
  ### `create-api-agent`
118
43
 
119
44
  The bundled script lifts these fields to the top level:
@@ -128,8 +53,4 @@ The bundled script lifts these fields to the top level:
128
53
 
129
54
  ## Common Errors
130
55
 
131
- 1. `图形验证码错误或已过期` for `reset` or `change_password`
132
- 2. `邮箱验证码错误或已过期`
133
- 3. `该邮箱已被注册`
134
- 4. `用户不存在或密码错误`
135
- 5. create-agent or rotate-key returns missing `api_endpoint` or `api_key`
56
+ 1. create-agent or rotate-key returns missing `api_endpoint` or `api_key`
@@ -21,10 +21,10 @@
21
21
 
22
22
  ### Short paragraph
23
23
 
24
- 这个插件把 OpenClaw 的渠道交互和 agent 通信直接接到 Grix,核心目标是让你在 `https://grix.dhf.pub/` 管理 OpenClaw,并在手机上通过 PWA 页面使用。除此之外,它也支持多 agent 建群互聊、agent 私聊和 agent 间互通。配置上尽量做到了简单,只要把这个技能交给 OpenClaw、Claude 或 Codex,就可以先检查现状,已经配置好就直接停下,否则自动继续完成配置;如果用户还要在 OpenClaw 里直接做群管理,还会继续补齐 `@dhf-openclaw/grix-admin` 和 required tools 配置。
24
+ 这个插件把 OpenClaw 的渠道交互和 agent 通信直接接到 Grix,核心目标是让你在 `https://grix.dhf.pub/` 管理 OpenClaw,并在手机上通过 PWA 页面使用。除此之外,它也支持多 agent 建群互聊、agent 私聊和 agent 间互通。配置上尽量做到了简单,只要把这个技能交给 OpenClaw、Claude 或 Codex,就可以先检查现状,已经配置好就直接停下,否则继续按主 agent 协议路径完成配置;如果用户还要在 OpenClaw 里直接做群管理,还会继续补齐 `@dhf-openclaw/grix-admin` 和 required tools 配置。
25
25
 
26
26
  ## After Setup
27
27
 
28
28
  1. If the result says `portal_ready=true`, tell the user to log in to `https://grix.dhf.pub/` directly to try it.
29
- 2. If the local main agent is already configured, do not continue into redundant login, install, enable, or restart steps unless the user explicitly wants a different Grix account or agent target.
29
+ 2. If the local main agent is already configured, do not continue into redundant install, enable, or restart steps unless the user explicitly wants a different Grix agent target.
30
30
  3. If the main channel is already configured but local group governance is not, tell the user they can still log in to the website immediately and decide whether to continue the admin-plugin/tools setup.
@@ -23,7 +23,3 @@
23
23
  ## Needs Setup Reply
24
24
 
25
25
  这个插件接入是为了在 `https://grix.dhf.pub/` 管理 OpenClaw,并支持移动端 PWA 页面。当前还没有完全配置好,我可以继续帮你完成检查和配置。
26
-
27
- ## Account Ready Reply
28
-
29
- 这个插件接入是为了在 `https://grix.dhf.pub/` 管理 OpenClaw,并支持移动端 PWA 页面。账号已经可用,你可以直接登录 `https://grix.dhf.pub/` 体验;如果需要,我也可以继续帮你把 OpenClaw 主通道配好。
@@ -141,7 +141,7 @@ def build_auth_result(action: str, result: dict):
141
141
  payload.update(
142
142
  build_portal_guidance(
143
143
  True,
144
- f"账号已可用,可直接登录 {DEFAULT_PORTAL_URL} 体验。",
144
+ f"Grix 访问已可用,可直接登录 {DEFAULT_PORTAL_URL} 体验。",
145
145
  )
146
146
  )
147
147
  payload.update(build_user_reply_templates("login_ready"))
@@ -625,7 +625,7 @@ def build_user_reply_templates(scenario: str):
625
625
  "并补齐 message、grix_group、grix_agent_admin 这三个工具权限。"
626
626
  ),
627
627
  "needs_setup": f"{one_liner}当前还没有完全配置好,我可以继续帮你完成检查和配置。",
628
- "login_ready": f"{one_liner}账号已经可用,你可以直接登录 {DEFAULT_PORTAL_URL} 体验;如果需要,我也可以继续帮你把 OpenClaw 主通道配好。",
628
+ "login_ready": f"{one_liner}Grix 访问已经可用,你可以直接登录 {DEFAULT_PORTAL_URL} 体验;如果需要,我也可以继续帮你把 OpenClaw 主通道配好。",
629
629
  }
630
630
  normalized_scenario = str(scenario or "").strip() or "needs_setup"
631
631
  return {
@@ -1335,25 +1335,8 @@ def handle_configure_openclaw(args):
1335
1335
 
1336
1336
  def handle_bootstrap_openclaw(args):
1337
1337
  access_token = (args.access_token or "").strip()
1338
- login_result = None
1339
1338
  if not access_token:
1340
- account = (args.email or args.account or "").strip()
1341
- if not account:
1342
- raise GrixAuthError("bootstrap@dhf-openclaw requires --access-token or login identity")
1343
- if not (args.password or "").strip():
1344
- raise GrixAuthError("bootstrap@dhf-openclaw requires --password when access token is not provided")
1345
- platform = (args.platform or "").strip() or "web"
1346
- device_id = (args.device_id or "").strip() or default_device_id(platform)
1347
- login_result = login_with_credentials(
1348
- args.base_url,
1349
- account,
1350
- args.password.strip(),
1351
- device_id,
1352
- platform,
1353
- )
1354
- access_token = str(login_result.get("access_token", "")).strip()
1355
- if not access_token:
1356
- raise GrixAuthError("login did not return access_token")
1339
+ raise GrixAuthError("bootstrap@dhf-openclaw requires --access-token")
1357
1340
 
1358
1341
  create_result = create_or_reuse_api_agent(
1359
1342
  args.base_url,
@@ -1373,8 +1356,7 @@ def handle_bootstrap_openclaw(args):
1373
1356
  payload = {
1374
1357
  "ok": True,
1375
1358
  "action": "bootstrap@dhf-openclaw",
1376
- "used_access_token_source": "provided" if (args.access_token or "").strip() else "login",
1377
- "login": login_result,
1359
+ "used_access_token_source": "provided",
1378
1360
  "created_agent": create_result,
1379
1361
  "openclaw_setup": None,
1380
1362
  "channel_credentials": build_onboard_values(agent_id, api_endpoint, api_key),
@@ -1490,13 +1472,7 @@ def build_parser():
1490
1472
  "bootstrap@dhf-openclaw",
1491
1473
  help="Login if needed, create provider_type=3 agent, then prepare or apply OpenClaw setup",
1492
1474
  )
1493
- bootstrap_openclaw.add_argument("--access-token", default="")
1494
- bootstrap_identity = bootstrap_openclaw.add_mutually_exclusive_group(required=False)
1495
- bootstrap_identity.add_argument("--account")
1496
- bootstrap_identity.add_argument("--email")
1497
- bootstrap_openclaw.add_argument("--password", default="")
1498
- bootstrap_openclaw.add_argument("--device-id", default="")
1499
- bootstrap_openclaw.add_argument("--platform", default="web")
1475
+ bootstrap_openclaw.add_argument("--access-token", required=True)
1500
1476
  bootstrap_openclaw.add_argument("--agent-name", required=True)
1501
1477
  bootstrap_openclaw.add_argument("--avatar-url", default="")
1502
1478
  bootstrap_openclaw.add_argument("--channel-name", default="grix-main")