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.
Files changed (73) hide show
  1. package/README.md +241 -241
  2. package/dist/default-skills/grix-access-control/SKILL.md +31 -31
  3. package/dist/default-skills/grix-admin/SKILL.md +35 -35
  4. package/dist/default-skills/grix-agent-dispatch/SKILL.md +89 -89
  5. package/dist/default-skills/grix-chat-state/SKILL.md +56 -56
  6. package/dist/default-skills/grix-egg/SKILL.md +90 -90
  7. package/dist/default-skills/grix-group/SKILL.md +35 -35
  8. package/dist/default-skills/grix-owner-relay/SKILL.md +66 -66
  9. package/dist/default-skills/grix-query/SKILL.md +38 -38
  10. package/dist/default-skills/message-send/SKILL.md +36 -36
  11. package/dist/default-skills/message-unsend/SKILL.md +27 -27
  12. package/dist/default-skills/tailnet-file-share/SKILL.md +65 -65
  13. package/dist/grix.js +0 -0
  14. package/dist/service/platform-adapter.js +59 -16
  15. package/openclaw-plugin/skills/grix-admin/SKILL.md +202 -202
  16. package/openclaw-plugin/skills/grix-admin/references/api-contract.md +210 -210
  17. package/openclaw-plugin/skills/grix-egg/SKILL.md +81 -81
  18. package/openclaw-plugin/skills/grix-egg/references/api-contract.md +40 -40
  19. package/openclaw-plugin/skills/grix-group/SKILL.md +164 -164
  20. package/openclaw-plugin/skills/grix-group/references/api-contract.md +97 -97
  21. package/openclaw-plugin/skills/grix-query/SKILL.md +247 -247
  22. package/openclaw-plugin/skills/grix-register/SKILL.md +86 -86
  23. package/openclaw-plugin/skills/grix-register/references/api-contract.md +76 -76
  24. package/openclaw-plugin/skills/grix-register/references/grix-concepts.md +26 -26
  25. package/openclaw-plugin/skills/grix-register/references/handoff-contract.md +24 -24
  26. package/openclaw-plugin/skills/grix-register/references/openclaw-setup.md +6 -6
  27. package/openclaw-plugin/skills/grix-register/references/user-replies.md +25 -25
  28. package/openclaw-plugin/skills/grix-update/SKILL.md +310 -310
  29. package/openclaw-plugin/skills/grix-update/references/cron-setup.md +56 -56
  30. package/openclaw-plugin/skills/grix-update/references/update-contract.md +149 -149
  31. package/openclaw-plugin/skills/message-send/SKILL.md +197 -197
  32. package/openclaw-plugin/skills/message-unsend/SKILL.md +186 -186
  33. package/openclaw-plugin/skills/message-unsend/flowchart.mermaid +27 -27
  34. package/openclaw-plugin/skills/openclaw-memory-setup/SKILL.md +282 -282
  35. package/openclaw-plugin/skills/openclaw-memory-setup/references/case-study-macpro.md +52 -52
  36. package/openclaw-plugin/skills/openclaw-memory-setup/references/host-readiness.md +147 -147
  37. package/openclaw.plugin.json +24 -24
  38. package/package.json +121 -121
  39. package/scripts/install-guardian.mjs +27 -27
  40. package/scripts/install-guardian.sh +25 -25
  41. package/scripts/upgrade-guardian.sh +104 -104
  42. package/dist/adapter/claude/claude-bridge-server.js +0 -1
  43. package/dist/adapter/claude/claude-tools.js +0 -1
  44. package/dist/adapter/claude/claude-worker-client.js +0 -1
  45. package/dist/adapter/claude/mcp-http-launcher.js +0 -2
  46. package/dist/adapter/claude/result-timeout.js +0 -1
  47. package/dist/adapter/deepseek/deepseek-adapter.js +0 -6
  48. package/dist/adapter/deepseek/index.js +0 -1
  49. package/dist/adapter/qwen/index.js +0 -1
  50. package/dist/adapter/qwen/qwen-adapter.js +0 -4
  51. package/dist/aibot/client.js +0 -1
  52. package/dist/aibot/index.js +0 -1
  53. package/dist/aibot/types.js +0 -0
  54. package/dist/core/file-ops/handler.js +0 -1
  55. package/dist/core/file-ops/list-files.js +0 -1
  56. package/dist/core/file-ops/types.js +0 -0
  57. package/dist/default-skills/grix-task-status/SKILL.md +0 -36
  58. package/dist/log.js +0 -3
  59. package/dist/main.js +0 -31
  60. package/dist/mcp/stream-http/config.js +0 -1
  61. package/dist/mcp/stream-http/connection-binding.js +0 -1
  62. package/dist/mcp/stream-http/event-tool-executor.js +0 -1
  63. package/dist/mcp/stream-http/gateway.js +0 -1
  64. package/dist/mcp/stream-http/index.js +0 -1
  65. package/dist/mcp/stream-http/security.js +0 -1
  66. package/dist/mcp/stream-http/session-manager.js +0 -1
  67. package/dist/mcp/stream-http/tool-executor.js +0 -1
  68. package/dist/mcp/stream-http/tool-registry.js +0 -1
  69. package/dist/mcp/stream-http/tool-schemas.js +0 -1
  70. package/dist/session/index.js +0 -1
  71. package/dist/session/manager.js +0 -1
  72. package/dist/transport/index.js +0 -1
  73. package/dist/transport/json-rpc.js +0 -3
@@ -1,210 +1,210 @@
1
- # API Contract
2
-
3
- ## Purpose
4
-
5
- `grix-admin` is responsible for local binding and runtime convergence, and when the current agent has the corresponding scope, supports completing the following through `grix_admin` via WS:
6
-
7
- 1. Create new remote API agents
8
- 2. Query agent categories under the current account
9
- 3. Create categories
10
- 4. Modify categories
11
- 5. Assign or clear categories for specified agents
12
-
13
- ## Base Rules
14
-
15
- 1. Do not ask users to provide website account/password for this flow.
16
- 2. All remote creation and category actions must go through `grix_admin` via the current account's authenticated WS channel.
17
- 3. If `agent_name` / `agent_id` / `api_endpoint` / `api_key` are incomplete, and the current account cannot create remotely, stop first and require backend admin to complete them.
18
- 4. The current agent must first have the corresponding scope enabled on the frontend permissions page; without scope, WS will fail directly.
19
- 5. For `bind-local` / `create-and-bind`, "config written successfully" does not equal completion; if this invocation already has real routing verification conditions, real verification passing must also be counted as part of the success criteria; otherwise explicitly hand the subsequent verification responsibility back to the upper-level flow.
20
-
21
- ## Direct `grix_admin` Contract
22
-
23
- ### 1. Create Remote Agent
24
-
25
- ```json
26
- {
27
- "action": "create_agent",
28
- "agentName": "ops helper",
29
- "introduction": "Handles deployment and on-call collaboration",
30
- "isMain": false,
31
- "categoryName": "Project Assistant",
32
- "parentCategoryId": "0",
33
- "categorySortOrder": 10
34
- }
35
- ```
36
-
37
- Key fields to read from the return:
38
-
39
- 1. `createdAgent.id`
40
- 2. `createdAgent.agent_name`
41
- 3. `createdAgent.api_endpoint`
42
- 4. `createdAgent.api_key`
43
-
44
- Required scope:
45
-
46
- 1. `agent.api.create`
47
- 2. If `categoryName` is included, may additionally need `agent.category.list`, `agent.category.create`, `agent.category.assign`
48
- 3. If `categoryId` is included, additionally needs `agent.category.assign`
49
-
50
- ### 2. List Categories
51
-
52
- ```json
53
- {
54
- "action": "list_categories"
55
- }
56
- ```
57
-
58
- Required scope:
59
-
60
- 1. `agent.category.list`
61
-
62
- ### 3. Create Category
63
-
64
- ```json
65
- {
66
- "action": "create_category",
67
- "name": "Project Assistant",
68
- "parentId": "0",
69
- "sortOrder": 10
70
- }
71
- ```
72
-
73
- Required scope:
74
-
75
- 1. `agent.category.create`
76
-
77
- ### 4. Update Category
78
-
79
- ```json
80
- {
81
- "action": "update_category",
82
- "categoryId": "20001",
83
- "name": "On-call Assistant",
84
- "parentId": "0",
85
- "sortOrder": 20
86
- }
87
- ```
88
-
89
- Required scope:
90
-
91
- 1. `agent.category.update`
92
-
93
- ### 5. Assign or Clear Category
94
-
95
- ```json
96
- {
97
- "action": "assign_category",
98
- "agentId": "10001",
99
- "categoryId": "20001"
100
- }
101
- ```
102
-
103
- Clear category:
104
-
105
- ```json
106
- {
107
- "action": "assign_category",
108
- "agentId": "10001",
109
- "categoryId": "0"
110
- }
111
- ```
112
-
113
- Required scope:
114
-
115
- 1. `agent.category.assign`
116
-
117
- ## Local Bind Steps
118
-
119
- After remote agent parameters are complete, continue with local binding through the official OpenClaw CLI:
120
-
121
- 1. Prepare local directories:
122
- - `workspace=~/.openclaw/workspace-<agent_name>`
123
- - `agentDir=~/.openclaw/agents/<agent_name>/agent`
124
- - Add minimal `IDENTITY.md`, `SOUL.md`, `AGENTS.md` when required persona files are missing
125
- 2. Resolve `model` in this order:
126
- - The existing `model` from that local agent's entry
127
- - `agents.defaults.model.primary`
128
- - If still unavailable, clearly report error and stop
129
- 3. Read current config and merge:
130
- - `channels.grix.accounts`
131
- - `agents.list`
132
- - `tools.profile`
133
- - `tools.alsoAllow`
134
- - `tools.sessions.visibility`
135
- 4. Write back using official CLI:
136
- - `channels.grix.accounts.<agent_name>`
137
- - `agents.list`
138
- - `openclaw agents bind --agent <agent_name> --bind grix:<agent_name>`
139
- - `tools.profile`
140
- - `tools.alsoAllow`
141
- - `tools.sessions.visibility`
142
- - If needed, restore `channels.grix.enabled=true`
143
- 5. After writing, perform static validation first:
144
- - `openclaw config validate`
145
- - `openclaw config get --json channels.grix.accounts.<agent_name>`
146
- - `openclaw config get --json agents.list`
147
- - `openclaw agents bindings --agent <agent_name> --json`
148
- 6. If this invocation already has real verification conditions, must immediately perform a real routing verification; reuse the current install/acceptance context, do not invent additional probes. Reply falling to the main agent, default assistant, old persona, or old config are all considered failures.
149
- 7. Only when step 5 static validation passes and this invocation itself handles step 6 real verification but verification fails, is one `openclaw gateway restart` allowed; after restart, must redo the same round of real routing verification.
150
- 8. If this invocation cannot perform real verification, can only state "config has been written, runtime not yet tested, needs subsequent flow to continue verification"; do not write it as "already fully taken effect".
151
-
152
- ## `bind-local` Input Contract
153
-
154
- ```json
155
- {
156
- "task": "bind-local\nagent_name=grix-main\nagent_id=2029786829095440384\napi_endpoint=wss://grix.dhf.pub/v1/agent-api/ws?agent_id=2029786829095440384\napi_key=ak_xxx\ndo_not_create_remote_agent=true"
157
- }
158
- ```
159
-
160
- This mode prioritizes local binding; if this invocation has real verification conditions, must also complete real routing verification before it counts as full convergence; otherwise only complete static binding and explicitly hand subsequent verification responsibility to the upper-level flow.
161
-
162
- ## `create-and-bind` Input Contract
163
-
164
- When the main agent already has an available account and `agent.api.create` scope, can enter the creation flow through `grix_admin.task`:
165
-
166
- ```json
167
- {
168
- "task": "create-and-bind\nagentName=ops helper\nintroduction=Handles deployment and on-call collaboration\nisMain=false\ncategoryName=Project Assistant\nparentCategoryId=0\ncategorySortOrder=10"
169
- }
170
- ```
171
-
172
- This mode requires steps in order:
173
-
174
- 1. First make one direct call with `action=create_agent`, passing optional `categoryId` / `categoryName` / `parentCategoryId` / `categorySortOrder` together
175
- 2. If the return already includes the category assignment result, continue directly
176
- 3. If the caller used a legacy path, or the return does not include the category assignment result, supplement with:
177
- - `categoryId` -> `action=assign_category`
178
- - `categoryName` -> `action=list_categories`
179
- - Not found -> `action=create_category`
180
- - After obtaining category ID -> `action=assign_category`
181
- 4. Finally follow the same local binding and runtime convergence flow as `bind-local`
182
-
183
- Notes:
184
-
185
- 1. `categoryId` and `categoryName` cannot be provided simultaneously
186
- 2. When matching `categoryName`, must also consider `parentCategoryId`
187
- 3. If the remote return indicates missing `agent.api.create` or any `agent.category.*` scope, clearly state which specific scope is missing
188
-
189
- ## `category-manage` Input Contract
190
-
191
- When only doing subsequent category management, enter through `grix_admin.task`:
192
-
193
- ```json
194
- {
195
- "task": "category-manage\noperation=assign\nagentId=10001\ncategoryId=0"
196
- }
197
- ```
198
-
199
- Mapping:
200
-
201
- 1. `operation=list` -> `action=list_categories`
202
- 2. `operation=create` -> `action=create_category`
203
- 3. `operation=update` -> `action=update_category`
204
- 4. `operation=assign` -> `action=assign_category`
205
-
206
- Notes:
207
-
208
- 1. For `operation=assign`, `categoryId=0` means clear the category
209
- 2. No step can be executed cross-account
210
- 3. Do not hand-write HTTP or fall back to legacy scripts
1
+ # API Contract
2
+
3
+ ## Purpose
4
+
5
+ `grix-admin` is responsible for local binding and runtime convergence, and when the current agent has the corresponding scope, supports completing the following through `grix_admin` via WS:
6
+
7
+ 1. Create new remote API agents
8
+ 2. Query agent categories under the current account
9
+ 3. Create categories
10
+ 4. Modify categories
11
+ 5. Assign or clear categories for specified agents
12
+
13
+ ## Base Rules
14
+
15
+ 1. Do not ask users to provide website account/password for this flow.
16
+ 2. All remote creation and category actions must go through `grix_admin` via the current account's authenticated WS channel.
17
+ 3. If `agent_name` / `agent_id` / `api_endpoint` / `api_key` are incomplete, and the current account cannot create remotely, stop first and require backend admin to complete them.
18
+ 4. The current agent must first have the corresponding scope enabled on the frontend permissions page; without scope, WS will fail directly.
19
+ 5. For `bind-local` / `create-and-bind`, "config written successfully" does not equal completion; if this invocation already has real routing verification conditions, real verification passing must also be counted as part of the success criteria; otherwise explicitly hand the subsequent verification responsibility back to the upper-level flow.
20
+
21
+ ## Direct `grix_admin` Contract
22
+
23
+ ### 1. Create Remote Agent
24
+
25
+ ```json
26
+ {
27
+ "action": "create_agent",
28
+ "agentName": "ops helper",
29
+ "introduction": "Handles deployment and on-call collaboration",
30
+ "isMain": false,
31
+ "categoryName": "Project Assistant",
32
+ "parentCategoryId": "0",
33
+ "categorySortOrder": 10
34
+ }
35
+ ```
36
+
37
+ Key fields to read from the return:
38
+
39
+ 1. `createdAgent.id`
40
+ 2. `createdAgent.agent_name`
41
+ 3. `createdAgent.api_endpoint`
42
+ 4. `createdAgent.api_key`
43
+
44
+ Required scope:
45
+
46
+ 1. `agent.api.create`
47
+ 2. If `categoryName` is included, may additionally need `agent.category.list`, `agent.category.create`, `agent.category.assign`
48
+ 3. If `categoryId` is included, additionally needs `agent.category.assign`
49
+
50
+ ### 2. List Categories
51
+
52
+ ```json
53
+ {
54
+ "action": "list_categories"
55
+ }
56
+ ```
57
+
58
+ Required scope:
59
+
60
+ 1. `agent.category.list`
61
+
62
+ ### 3. Create Category
63
+
64
+ ```json
65
+ {
66
+ "action": "create_category",
67
+ "name": "Project Assistant",
68
+ "parentId": "0",
69
+ "sortOrder": 10
70
+ }
71
+ ```
72
+
73
+ Required scope:
74
+
75
+ 1. `agent.category.create`
76
+
77
+ ### 4. Update Category
78
+
79
+ ```json
80
+ {
81
+ "action": "update_category",
82
+ "categoryId": "20001",
83
+ "name": "On-call Assistant",
84
+ "parentId": "0",
85
+ "sortOrder": 20
86
+ }
87
+ ```
88
+
89
+ Required scope:
90
+
91
+ 1. `agent.category.update`
92
+
93
+ ### 5. Assign or Clear Category
94
+
95
+ ```json
96
+ {
97
+ "action": "assign_category",
98
+ "agentId": "10001",
99
+ "categoryId": "20001"
100
+ }
101
+ ```
102
+
103
+ Clear category:
104
+
105
+ ```json
106
+ {
107
+ "action": "assign_category",
108
+ "agentId": "10001",
109
+ "categoryId": "0"
110
+ }
111
+ ```
112
+
113
+ Required scope:
114
+
115
+ 1. `agent.category.assign`
116
+
117
+ ## Local Bind Steps
118
+
119
+ After remote agent parameters are complete, continue with local binding through the official OpenClaw CLI:
120
+
121
+ 1. Prepare local directories:
122
+ - `workspace=~/.openclaw/workspace-<agent_name>`
123
+ - `agentDir=~/.openclaw/agents/<agent_name>/agent`
124
+ - Add minimal `IDENTITY.md`, `SOUL.md`, `AGENTS.md` when required persona files are missing
125
+ 2. Resolve `model` in this order:
126
+ - The existing `model` from that local agent's entry
127
+ - `agents.defaults.model.primary`
128
+ - If still unavailable, clearly report error and stop
129
+ 3. Read current config and merge:
130
+ - `channels.grix.accounts`
131
+ - `agents.list`
132
+ - `tools.profile`
133
+ - `tools.alsoAllow`
134
+ - `tools.sessions.visibility`
135
+ 4. Write back using official CLI:
136
+ - `channels.grix.accounts.<agent_name>`
137
+ - `agents.list`
138
+ - `openclaw agents bind --agent <agent_name> --bind grix:<agent_name>`
139
+ - `tools.profile`
140
+ - `tools.alsoAllow`
141
+ - `tools.sessions.visibility`
142
+ - If needed, restore `channels.grix.enabled=true`
143
+ 5. After writing, perform static validation first:
144
+ - `openclaw config validate`
145
+ - `openclaw config get --json channels.grix.accounts.<agent_name>`
146
+ - `openclaw config get --json agents.list`
147
+ - `openclaw agents bindings --agent <agent_name> --json`
148
+ 6. If this invocation already has real verification conditions, must immediately perform a real routing verification; reuse the current install/acceptance context, do not invent additional probes. Reply falling to the main agent, default assistant, old persona, or old config are all considered failures.
149
+ 7. Only when step 5 static validation passes and this invocation itself handles step 6 real verification but verification fails, is one `openclaw gateway restart` allowed; after restart, must redo the same round of real routing verification.
150
+ 8. If this invocation cannot perform real verification, can only state "config has been written, runtime not yet tested, needs subsequent flow to continue verification"; do not write it as "already fully taken effect".
151
+
152
+ ## `bind-local` Input Contract
153
+
154
+ ```json
155
+ {
156
+ "task": "bind-local\nagent_name=grix-main\nagent_id=2029786829095440384\napi_endpoint=wss://grix.dhf.pub/v1/agent-api/ws?agent_id=2029786829095440384\napi_key=ak_xxx\ndo_not_create_remote_agent=true"
157
+ }
158
+ ```
159
+
160
+ This mode prioritizes local binding; if this invocation has real verification conditions, must also complete real routing verification before it counts as full convergence; otherwise only complete static binding and explicitly hand subsequent verification responsibility to the upper-level flow.
161
+
162
+ ## `create-and-bind` Input Contract
163
+
164
+ When the main agent already has an available account and `agent.api.create` scope, can enter the creation flow through `grix_admin.task`:
165
+
166
+ ```json
167
+ {
168
+ "task": "create-and-bind\nagentName=ops helper\nintroduction=Handles deployment and on-call collaboration\nisMain=false\ncategoryName=Project Assistant\nparentCategoryId=0\ncategorySortOrder=10"
169
+ }
170
+ ```
171
+
172
+ This mode requires steps in order:
173
+
174
+ 1. First make one direct call with `action=create_agent`, passing optional `categoryId` / `categoryName` / `parentCategoryId` / `categorySortOrder` together
175
+ 2. If the return already includes the category assignment result, continue directly
176
+ 3. If the caller used a legacy path, or the return does not include the category assignment result, supplement with:
177
+ - `categoryId` -> `action=assign_category`
178
+ - `categoryName` -> `action=list_categories`
179
+ - Not found -> `action=create_category`
180
+ - After obtaining category ID -> `action=assign_category`
181
+ 4. Finally follow the same local binding and runtime convergence flow as `bind-local`
182
+
183
+ Notes:
184
+
185
+ 1. `categoryId` and `categoryName` cannot be provided simultaneously
186
+ 2. When matching `categoryName`, must also consider `parentCategoryId`
187
+ 3. If the remote return indicates missing `agent.api.create` or any `agent.category.*` scope, clearly state which specific scope is missing
188
+
189
+ ## `category-manage` Input Contract
190
+
191
+ When only doing subsequent category management, enter through `grix_admin.task`:
192
+
193
+ ```json
194
+ {
195
+ "task": "category-manage\noperation=assign\nagentId=10001\ncategoryId=0"
196
+ }
197
+ ```
198
+
199
+ Mapping:
200
+
201
+ 1. `operation=list` -> `action=list_categories`
202
+ 2. `operation=create` -> `action=create_category`
203
+ 3. `operation=update` -> `action=update_category`
204
+ 4. `operation=assign` -> `action=assign_category`
205
+
206
+ Notes:
207
+
208
+ 1. For `operation=assign`, `categoryId=0` means clear the category
209
+ 2. No step can be executed cross-account
210
+ 3. Do not hand-write HTTP or fall back to legacy scripts
@@ -1,81 +1,81 @@
1
- ---
2
- name: grix-egg
3
- description: Program-driven hatching: AI only organizes parameters and calls `grix_egg`; the program handles creation, installation, binding, acceptance, and status reporting.
4
- ---
5
-
6
- # Grix Egg
7
-
8
- `grix-egg` follows a "program-first, AI-assists" approach.
9
- AI no longer manually relays create/bind/accept.
10
-
11
- ## 1. AI Role Boundary
12
-
13
- You only do three things:
14
-
15
- 1. Organize user input into standard parameters
16
- 2. Call `grix_egg`
17
- 3. Report results / request supplementary parameters based on the returned JSON
18
-
19
- Do not manually execute these actions:
20
-
21
- 1. Remote agent creation
22
- 2. Local bind
23
- 3. Gateway operations
24
- 4. Test group acceptance
25
-
26
- ## 2. Standard Call Entry
27
-
28
- Prefer passing the raw install card:
29
-
30
- ```json
31
- { "installContext": "<raw json>" }
32
- ```
33
-
34
- If there is no install card, pass structured parameters:
35
-
36
- 1. `route`: `create_new` | `existing` | `existing_claude`
37
- 2. `agentName`
38
- 3. `agentIdSlug` or `localAgentName`
39
- 4. `downloadUrl`
40
- 5. `existingCredentials` (required for `existing`)
41
- 6. Optional: `packageHash`, `soulContent`, `soulFile`, `categoryId`, `categoryName`, `isMain`, `expectedSubstring`, `statusTarget`, `resume`, `installId`
42
-
43
- ## 3. Route Behavior
44
-
45
- 1. `create_new`: program automatically completes creation, installation, binding, acceptance, and status reporting
46
- 2. `existing`: program automatically completes existing credential installation and acceptance
47
- 3. `existing_claude`: program returns `unsupported_route`, handled by a standalone Claude installer
48
-
49
- ## 4. Acceptance Rules
50
-
51
- Program has fixed acceptance logic:
52
-
53
- 1. Test group members must include: main agent, trigger user, target agent
54
- 2. Probe uses `@<target_agent_id>` mention
55
- 3. Only the first non-empty reply after the probe from the target agent is accepted
56
- 4. `expectedSubstring` is only an optional enhancement condition
57
-
58
- ## 5. Result Reporting
59
-
60
- When `ok=true`:
61
-
62
- 1. Report `install_id`, `route`, target agent, acceptance result
63
- 2. If `acceptance.reply_content` and `testGroup` are present, include them for the user
64
- 3. If `interaction_status=degraded`, explain that the main flow succeeded but status reporting partially failed
65
-
66
- When `ok=false`:
67
-
68
- 1. Use `reason` and `suggestion` directly to explain the failure
69
- 2. Only supplement external inputs that the program explicitly identifies as missing
70
- 3. Use `resume=true` + `installId` when continuation is needed
71
-
72
- ## 6. Prohibited Actions
73
-
74
- 1. Do not use `curl`/`fetch`/`axios` to directly connect to `/v1/agent-api`
75
- 2. Do not manually modify `openclaw.json`
76
- 3. Remote actions must only go through typed tools: `grix_admin`, `grix_group`, `grix_query`
77
- 4. Do not claim installation success before acceptance is complete
78
-
79
- ## References
80
-
81
- 1. [references/api-contract.md](references/api-contract.md)
1
+ ---
2
+ name: grix-egg
3
+ description: Program-driven hatching: AI only organizes parameters and calls `grix_egg`; the program handles creation, installation, binding, acceptance, and status reporting.
4
+ ---
5
+
6
+ # Grix Egg
7
+
8
+ `grix-egg` follows a "program-first, AI-assists" approach.
9
+ AI no longer manually relays create/bind/accept.
10
+
11
+ ## 1. AI Role Boundary
12
+
13
+ You only do three things:
14
+
15
+ 1. Organize user input into standard parameters
16
+ 2. Call `grix_egg`
17
+ 3. Report results / request supplementary parameters based on the returned JSON
18
+
19
+ Do not manually execute these actions:
20
+
21
+ 1. Remote agent creation
22
+ 2. Local bind
23
+ 3. Gateway operations
24
+ 4. Test group acceptance
25
+
26
+ ## 2. Standard Call Entry
27
+
28
+ Prefer passing the raw install card:
29
+
30
+ ```json
31
+ { "installContext": "<raw json>" }
32
+ ```
33
+
34
+ If there is no install card, pass structured parameters:
35
+
36
+ 1. `route`: `create_new` | `existing` | `existing_claude`
37
+ 2. `agentName`
38
+ 3. `agentIdSlug` or `localAgentName`
39
+ 4. `downloadUrl`
40
+ 5. `existingCredentials` (required for `existing`)
41
+ 6. Optional: `packageHash`, `soulContent`, `soulFile`, `categoryId`, `categoryName`, `isMain`, `expectedSubstring`, `statusTarget`, `resume`, `installId`
42
+
43
+ ## 3. Route Behavior
44
+
45
+ 1. `create_new`: program automatically completes creation, installation, binding, acceptance, and status reporting
46
+ 2. `existing`: program automatically completes existing credential installation and acceptance
47
+ 3. `existing_claude`: program returns `unsupported_route`, handled by a standalone Claude installer
48
+
49
+ ## 4. Acceptance Rules
50
+
51
+ Program has fixed acceptance logic:
52
+
53
+ 1. Test group members must include: main agent, trigger user, target agent
54
+ 2. Probe uses `@<target_agent_id>` mention
55
+ 3. Only the first non-empty reply after the probe from the target agent is accepted
56
+ 4. `expectedSubstring` is only an optional enhancement condition
57
+
58
+ ## 5. Result Reporting
59
+
60
+ When `ok=true`:
61
+
62
+ 1. Report `install_id`, `route`, target agent, acceptance result
63
+ 2. If `acceptance.reply_content` and `testGroup` are present, include them for the user
64
+ 3. If `interaction_status=degraded`, explain that the main flow succeeded but status reporting partially failed
65
+
66
+ When `ok=false`:
67
+
68
+ 1. Use `reason` and `suggestion` directly to explain the failure
69
+ 2. Only supplement external inputs that the program explicitly identifies as missing
70
+ 3. Use `resume=true` + `installId` when continuation is needed
71
+
72
+ ## 6. Prohibited Actions
73
+
74
+ 1. Do not use `curl`/`fetch`/`axios` to directly connect to `/v1/agent-api`
75
+ 2. Do not manually modify `openclaw.json`
76
+ 3. Remote actions must only go through typed tools: `grix_admin`, `grix_group`, `grix_query`
77
+ 4. Do not claim installation success before acceptance is complete
78
+
79
+ ## References
80
+
81
+ 1. [references/api-contract.md](references/api-contract.md)
@@ -1,40 +1,40 @@
1
- # API Contract
2
-
3
- ## Purpose
4
-
5
- Keep `grix-egg` deterministic and tool-bounded:
6
- AI only provides params, program executes.
7
-
8
- ## Required Paths
9
-
10
- 1. Remote create/category actions: `grix_admin`
11
- 2. Group lifecycle and membership actions: `grix_group`
12
- 3. Message/session query actions: `grix_query`
13
- 4. Local bind/update actions: official `openclaw` CLI (`config set`, `agents bind`, `config validate`)
14
-
15
- ## Prohibited Paths
16
-
17
- 1. Do not call `/v1/agent-api` using `curl`, `fetch`, `axios`, or ad hoc scripts.
18
- 2. Do not hand-edit `openclaw.json`.
19
- 3. Do not bypass typed tools with hidden protocol payloads.
20
-
21
- ## Delivery Rules
22
-
23
- Program should emit these links on the install private chat:
24
-
25
- 1. Running/failed/success status card:
26
- `grix://card/egg_install_status`
27
- 2. Acceptance group entry card:
28
- `grix://card/conversation`
29
- 3. Final profile card on success:
30
- `grix://card/user_profile`
31
-
32
- If delivery fails, mark `interaction_status=degraded` but keep the main installation result unchanged.
33
-
34
- ## Acceptance Rules
35
-
36
- 1. Acceptance group must include:
37
- main agent, trigger user, target agent.
38
- 2. Probe uses `@<target_agent_id>` mention.
39
- 3. Only the first non-empty reply after probe is valid.
40
- 4. `expectedSubstring` is an optional additional condition.
1
+ # API Contract
2
+
3
+ ## Purpose
4
+
5
+ Keep `grix-egg` deterministic and tool-bounded:
6
+ AI only provides params, program executes.
7
+
8
+ ## Required Paths
9
+
10
+ 1. Remote create/category actions: `grix_admin`
11
+ 2. Group lifecycle and membership actions: `grix_group`
12
+ 3. Message/session query actions: `grix_query`
13
+ 4. Local bind/update actions: official `openclaw` CLI (`config set`, `agents bind`, `config validate`)
14
+
15
+ ## Prohibited Paths
16
+
17
+ 1. Do not call `/v1/agent-api` using `curl`, `fetch`, `axios`, or ad hoc scripts.
18
+ 2. Do not hand-edit `openclaw.json`.
19
+ 3. Do not bypass typed tools with hidden protocol payloads.
20
+
21
+ ## Delivery Rules
22
+
23
+ Program should emit these links on the install private chat:
24
+
25
+ 1. Running/failed/success status card:
26
+ `grix://card/egg_install_status`
27
+ 2. Acceptance group entry card:
28
+ `grix://card/conversation`
29
+ 3. Final profile card on success:
30
+ `grix://card/user_profile`
31
+
32
+ If delivery fails, mark `interaction_status=degraded` but keep the main installation result unchanged.
33
+
34
+ ## Acceptance Rules
35
+
36
+ 1. Acceptance group must include:
37
+ main agent, trigger user, target agent.
38
+ 2. Probe uses `@<target_agent_id>` mention.
39
+ 3. Only the first non-empty reply after probe is valid.
40
+ 4. `expectedSubstring` is an optional additional condition.