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
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: grix-group
|
|
3
|
-
description: Use the typed `grix_group` tool for Grix group lifecycle and membership operations. Trigger when users ask to create, inspect, leave, update, or dissolve groups, or when these operations fail with scope or permission errors.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Grix Group Governance
|
|
7
|
-
|
|
8
|
-
Operate group-governance actions through the `grix_group` tool.
|
|
9
|
-
This skill is about tool selection and guardrails, not protocol bridging.
|
|
10
|
-
|
|
11
|
-
## Workflow
|
|
12
|
-
|
|
13
|
-
1. Parse the user request into one action:
|
|
14
|
-
`create`, `detail`, `leave`, `add_members`, `remove_members`, `update_member_role`, `update_all_members_muted`, `update_member_speaking`, or `dissolve`.
|
|
15
|
-
2. Validate required fields before any call.
|
|
16
|
-
3. Call `grix_group` exactly once per business action.
|
|
17
|
-
4. Classify failures by HTTP/BizCode and return exact remediation.
|
|
18
|
-
5. Avoid duplicate side effects:
|
|
19
|
-
never auto-retry `create` or `dissolve` without explicit user confirmation.
|
|
20
|
-
|
|
21
|
-
## Tool Contract
|
|
22
|
-
|
|
23
|
-
For Grix group governance, always call:
|
|
24
|
-
|
|
25
|
-
1. Tool: `grix_group`
|
|
26
|
-
2. `action`: one of `create`, `detail`, `leave`, `add_members`, `remove_members`, `update_member_role`, `update_all_members_muted`, `update_member_speaking`, `dissolve`
|
|
27
|
-
3. `accountId`: always pass `{{AccountId}}` from the current conversation context for every action, including `leave`.
|
|
28
|
-
|
|
29
|
-
Rules:
|
|
30
|
-
|
|
31
|
-
1. Pass business parameters with their exact typed field names.
|
|
32
|
-
2. Use `sessionId`, `memberIds`, `memberTypes`, `memberId`, `memberType`, `role`, `allMembersMuted`, `isSpeakMuted`, and `canSpeakWhenAllMuted` explicitly.
|
|
33
|
-
3. Do not invent aliases or fallback fields.
|
|
34
|
-
4. Keep one tool call per action for audit clarity.
|
|
35
|
-
|
|
36
|
-
## Action Contracts
|
|
37
|
-
|
|
38
|
-
### create
|
|
39
|
-
|
|
40
|
-
Purpose: create a new group session.
|
|
41
|
-
|
|
42
|
-
Required input:
|
|
43
|
-
|
|
44
|
-
1. `name` (non-empty string)
|
|
45
|
-
2. `memberIds` (optional string array; each item numeric text)
|
|
46
|
-
3. `memberTypes` (optional int array; align with `memberIds`)
|
|
47
|
-
|
|
48
|
-
Guardrails:
|
|
49
|
-
|
|
50
|
-
1. Ask for clarification if group name is missing.
|
|
51
|
-
2. Ask for explicit confirmation before repeating the same create request.
|
|
52
|
-
3. Treat this action as non-idempotent.
|
|
53
|
-
|
|
54
|
-
### add_members
|
|
55
|
-
|
|
56
|
-
Purpose: add members into an existing group.
|
|
57
|
-
|
|
58
|
-
Required input:
|
|
59
|
-
|
|
60
|
-
1. `sessionId` (non-empty string)
|
|
61
|
-
2. `memberIds` (non-empty string array; each item numeric text)
|
|
62
|
-
3. `memberTypes` (optional int array; align with `memberIds`)
|
|
63
|
-
|
|
64
|
-
Guardrails:
|
|
65
|
-
|
|
66
|
-
1. Reject empty `sessionId` before calling the tool.
|
|
67
|
-
2. Reject non-numeric `memberIds` before calling the tool.
|
|
68
|
-
3. If `sessionId` is ambiguous, ask the user to confirm the target group first.
|
|
69
|
-
|
|
70
|
-
### leave
|
|
71
|
-
|
|
72
|
-
Purpose: let the current Agent leave a group by itself.
|
|
73
|
-
|
|
74
|
-
Required input:
|
|
75
|
-
|
|
76
|
-
1. `sessionId`
|
|
77
|
-
|
|
78
|
-
Guardrails:
|
|
79
|
-
|
|
80
|
-
1. Only execute this when the requester is clearly the current Agent owner, or an already-established authorized operator in the current context.
|
|
81
|
-
2. If the requester identity is unclear, ask for confirmation first; if it is clearly unauthorized, reject directly and do not call `grix_group`.
|
|
82
|
-
3. This action is only for the current Agent leaving its own group membership.
|
|
83
|
-
4. Never translate a request to remove other members into `leave`; use `remove_members` for that.
|
|
84
|
-
5. Do not send `memberId`, `memberIds`, or `memberTypes` with this action.
|
|
85
|
-
6. This action does not require scope and should not be described as a scope-grant workflow.
|
|
86
|
-
7. Execute `leave` silently: do not send any pre-leave or farewell message to the group before leaving.
|
|
87
|
-
|
|
88
|
-
### remove_members
|
|
89
|
-
|
|
90
|
-
Required input:
|
|
91
|
-
|
|
92
|
-
1. `sessionId`
|
|
93
|
-
2. `memberIds`
|
|
94
|
-
|
|
95
|
-
### update_member_role
|
|
96
|
-
|
|
97
|
-
Required input:
|
|
98
|
-
|
|
99
|
-
1. `sessionId`
|
|
100
|
-
2. `memberId`
|
|
101
|
-
3. `role`
|
|
102
|
-
|
|
103
|
-
Guardrails:
|
|
104
|
-
|
|
105
|
-
1. Only use `memberType=1` for role updates.
|
|
106
|
-
2. Never guess a role value; confirm when unclear.
|
|
107
|
-
|
|
108
|
-
### update_all_members_muted
|
|
109
|
-
|
|
110
|
-
Required input:
|
|
111
|
-
|
|
112
|
-
1. `sessionId`
|
|
113
|
-
2. `allMembersMuted`
|
|
114
|
-
|
|
115
|
-
Guardrails:
|
|
116
|
-
|
|
117
|
-
1. Only use this for group-wide mute state changes.
|
|
118
|
-
2. Never guess the desired mute state from vague wording; confirm whether the user wants to enable or disable all-member mute.
|
|
119
|
-
|
|
120
|
-
### update_member_speaking
|
|
121
|
-
|
|
122
|
-
Required input:
|
|
123
|
-
|
|
124
|
-
1. `sessionId`
|
|
125
|
-
2. `memberId`
|
|
126
|
-
3. At least one of `isSpeakMuted` or `canSpeakWhenAllMuted`
|
|
127
|
-
|
|
128
|
-
Guardrails:
|
|
129
|
-
|
|
130
|
-
1. Only use `memberType=1` or `memberType=2`.
|
|
131
|
-
2. Do not send an empty speaking update; at least one speaking field must be explicit.
|
|
132
|
-
3. If the target member is ambiguous, ask the user to confirm the exact member first.
|
|
133
|
-
|
|
134
|
-
### detail / dissolve
|
|
135
|
-
|
|
136
|
-
Required input:
|
|
137
|
-
|
|
138
|
-
1. `sessionId`
|
|
139
|
-
|
|
140
|
-
## Error Handling Rules
|
|
141
|
-
|
|
142
|
-
1. `403/20011`:
|
|
143
|
-
report missing scope and ask owner to grant the scope in Aibot Agent permission page.
|
|
144
|
-
Do not use this remediation for `leave`, because `leave` is scope-free.
|
|
145
|
-
2. `401/10001`:
|
|
146
|
-
report invalid key/auth and suggest checking agent config or rotating API key.
|
|
147
|
-
3. `403/10002`:
|
|
148
|
-
report agent is not active or invalid provider type.
|
|
149
|
-
4. `400/10003`:
|
|
150
|
-
report invalid/missing parameters and ask user for corrected values.
|
|
151
|
-
5. Other errors:
|
|
152
|
-
return backend `msg` and stop automatic retries.
|
|
153
|
-
|
|
154
|
-
## Response Style
|
|
155
|
-
|
|
156
|
-
1. State action result first.
|
|
157
|
-
2. Include key identifiers (`session_id`, member count, mute state) when successful.
|
|
158
|
-
3. Include exact remediation when failed.
|
|
159
|
-
4. Never hide scope or auth errors behind generic wording.
|
|
160
|
-
5. For `leave`, report result to the requester only; do not post extra messages into the group session.
|
|
161
|
-
|
|
162
|
-
## References
|
|
163
|
-
|
|
164
|
-
1. Load [references/api-contract.md](references/api-contract.md) when you need exact tool mapping, payload examples, and scope matrix.
|
|
1
|
+
---
|
|
2
|
+
name: grix-group
|
|
3
|
+
description: Use the typed `grix_group` tool for Grix group lifecycle and membership operations. Trigger when users ask to create, inspect, leave, update, or dissolve groups, or when these operations fail with scope or permission errors.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Grix Group Governance
|
|
7
|
+
|
|
8
|
+
Operate group-governance actions through the `grix_group` tool.
|
|
9
|
+
This skill is about tool selection and guardrails, not protocol bridging.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
1. Parse the user request into one action:
|
|
14
|
+
`create`, `detail`, `leave`, `add_members`, `remove_members`, `update_member_role`, `update_all_members_muted`, `update_member_speaking`, or `dissolve`.
|
|
15
|
+
2. Validate required fields before any call.
|
|
16
|
+
3. Call `grix_group` exactly once per business action.
|
|
17
|
+
4. Classify failures by HTTP/BizCode and return exact remediation.
|
|
18
|
+
5. Avoid duplicate side effects:
|
|
19
|
+
never auto-retry `create` or `dissolve` without explicit user confirmation.
|
|
20
|
+
|
|
21
|
+
## Tool Contract
|
|
22
|
+
|
|
23
|
+
For Grix group governance, always call:
|
|
24
|
+
|
|
25
|
+
1. Tool: `grix_group`
|
|
26
|
+
2. `action`: one of `create`, `detail`, `leave`, `add_members`, `remove_members`, `update_member_role`, `update_all_members_muted`, `update_member_speaking`, `dissolve`
|
|
27
|
+
3. `accountId`: always pass `{{AccountId}}` from the current conversation context for every action, including `leave`.
|
|
28
|
+
|
|
29
|
+
Rules:
|
|
30
|
+
|
|
31
|
+
1. Pass business parameters with their exact typed field names.
|
|
32
|
+
2. Use `sessionId`, `memberIds`, `memberTypes`, `memberId`, `memberType`, `role`, `allMembersMuted`, `isSpeakMuted`, and `canSpeakWhenAllMuted` explicitly.
|
|
33
|
+
3. Do not invent aliases or fallback fields.
|
|
34
|
+
4. Keep one tool call per action for audit clarity.
|
|
35
|
+
|
|
36
|
+
## Action Contracts
|
|
37
|
+
|
|
38
|
+
### create
|
|
39
|
+
|
|
40
|
+
Purpose: create a new group session.
|
|
41
|
+
|
|
42
|
+
Required input:
|
|
43
|
+
|
|
44
|
+
1. `name` (non-empty string)
|
|
45
|
+
2. `memberIds` (optional string array; each item numeric text)
|
|
46
|
+
3. `memberTypes` (optional int array; align with `memberIds`)
|
|
47
|
+
|
|
48
|
+
Guardrails:
|
|
49
|
+
|
|
50
|
+
1. Ask for clarification if group name is missing.
|
|
51
|
+
2. Ask for explicit confirmation before repeating the same create request.
|
|
52
|
+
3. Treat this action as non-idempotent.
|
|
53
|
+
|
|
54
|
+
### add_members
|
|
55
|
+
|
|
56
|
+
Purpose: add members into an existing group.
|
|
57
|
+
|
|
58
|
+
Required input:
|
|
59
|
+
|
|
60
|
+
1. `sessionId` (non-empty string)
|
|
61
|
+
2. `memberIds` (non-empty string array; each item numeric text)
|
|
62
|
+
3. `memberTypes` (optional int array; align with `memberIds`)
|
|
63
|
+
|
|
64
|
+
Guardrails:
|
|
65
|
+
|
|
66
|
+
1. Reject empty `sessionId` before calling the tool.
|
|
67
|
+
2. Reject non-numeric `memberIds` before calling the tool.
|
|
68
|
+
3. If `sessionId` is ambiguous, ask the user to confirm the target group first.
|
|
69
|
+
|
|
70
|
+
### leave
|
|
71
|
+
|
|
72
|
+
Purpose: let the current Agent leave a group by itself.
|
|
73
|
+
|
|
74
|
+
Required input:
|
|
75
|
+
|
|
76
|
+
1. `sessionId`
|
|
77
|
+
|
|
78
|
+
Guardrails:
|
|
79
|
+
|
|
80
|
+
1. Only execute this when the requester is clearly the current Agent owner, or an already-established authorized operator in the current context.
|
|
81
|
+
2. If the requester identity is unclear, ask for confirmation first; if it is clearly unauthorized, reject directly and do not call `grix_group`.
|
|
82
|
+
3. This action is only for the current Agent leaving its own group membership.
|
|
83
|
+
4. Never translate a request to remove other members into `leave`; use `remove_members` for that.
|
|
84
|
+
5. Do not send `memberId`, `memberIds`, or `memberTypes` with this action.
|
|
85
|
+
6. This action does not require scope and should not be described as a scope-grant workflow.
|
|
86
|
+
7. Execute `leave` silently: do not send any pre-leave or farewell message to the group before leaving.
|
|
87
|
+
|
|
88
|
+
### remove_members
|
|
89
|
+
|
|
90
|
+
Required input:
|
|
91
|
+
|
|
92
|
+
1. `sessionId`
|
|
93
|
+
2. `memberIds`
|
|
94
|
+
|
|
95
|
+
### update_member_role
|
|
96
|
+
|
|
97
|
+
Required input:
|
|
98
|
+
|
|
99
|
+
1. `sessionId`
|
|
100
|
+
2. `memberId`
|
|
101
|
+
3. `role`
|
|
102
|
+
|
|
103
|
+
Guardrails:
|
|
104
|
+
|
|
105
|
+
1. Only use `memberType=1` for role updates.
|
|
106
|
+
2. Never guess a role value; confirm when unclear.
|
|
107
|
+
|
|
108
|
+
### update_all_members_muted
|
|
109
|
+
|
|
110
|
+
Required input:
|
|
111
|
+
|
|
112
|
+
1. `sessionId`
|
|
113
|
+
2. `allMembersMuted`
|
|
114
|
+
|
|
115
|
+
Guardrails:
|
|
116
|
+
|
|
117
|
+
1. Only use this for group-wide mute state changes.
|
|
118
|
+
2. Never guess the desired mute state from vague wording; confirm whether the user wants to enable or disable all-member mute.
|
|
119
|
+
|
|
120
|
+
### update_member_speaking
|
|
121
|
+
|
|
122
|
+
Required input:
|
|
123
|
+
|
|
124
|
+
1. `sessionId`
|
|
125
|
+
2. `memberId`
|
|
126
|
+
3. At least one of `isSpeakMuted` or `canSpeakWhenAllMuted`
|
|
127
|
+
|
|
128
|
+
Guardrails:
|
|
129
|
+
|
|
130
|
+
1. Only use `memberType=1` or `memberType=2`.
|
|
131
|
+
2. Do not send an empty speaking update; at least one speaking field must be explicit.
|
|
132
|
+
3. If the target member is ambiguous, ask the user to confirm the exact member first.
|
|
133
|
+
|
|
134
|
+
### detail / dissolve
|
|
135
|
+
|
|
136
|
+
Required input:
|
|
137
|
+
|
|
138
|
+
1. `sessionId`
|
|
139
|
+
|
|
140
|
+
## Error Handling Rules
|
|
141
|
+
|
|
142
|
+
1. `403/20011`:
|
|
143
|
+
report missing scope and ask owner to grant the scope in Aibot Agent permission page.
|
|
144
|
+
Do not use this remediation for `leave`, because `leave` is scope-free.
|
|
145
|
+
2. `401/10001`:
|
|
146
|
+
report invalid key/auth and suggest checking agent config or rotating API key.
|
|
147
|
+
3. `403/10002`:
|
|
148
|
+
report agent is not active or invalid provider type.
|
|
149
|
+
4. `400/10003`:
|
|
150
|
+
report invalid/missing parameters and ask user for corrected values.
|
|
151
|
+
5. Other errors:
|
|
152
|
+
return backend `msg` and stop automatic retries.
|
|
153
|
+
|
|
154
|
+
## Response Style
|
|
155
|
+
|
|
156
|
+
1. State action result first.
|
|
157
|
+
2. Include key identifiers (`session_id`, member count, mute state) when successful.
|
|
158
|
+
3. Include exact remediation when failed.
|
|
159
|
+
4. Never hide scope or auth errors behind generic wording.
|
|
160
|
+
5. For `leave`, report result to the requester only; do not post extra messages into the group session.
|
|
161
|
+
|
|
162
|
+
## References
|
|
163
|
+
|
|
164
|
+
1. Load [references/api-contract.md](references/api-contract.md) when you need exact tool mapping, payload examples, and scope matrix.
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
# API Contract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Map high-level governance actions to Aibot Agent API HTTP routes.
|
|
6
|
-
|
|
7
|
-
## Base Rules
|
|
8
|
-
|
|
9
|
-
1. Base path: `/v1/agent-api`
|
|
10
|
-
2. Auth: `Authorization: Bearer <agent_api_key>`
|
|
11
|
-
3. Only `provider_type=3` and `status=active` agent can access.
|
|
12
|
-
4. Scope middleware executes before service business checks.
|
|
13
|
-
|
|
14
|
-
## Action Mapping (v1)
|
|
15
|
-
|
|
16
|
-
| Action | Method | Route | Required Scope |
|
|
17
|
-
|---|---|---|---|
|
|
18
|
-
| `group_detail_read` | `GET` | `/sessions/group/detail` | `group.detail.read` |
|
|
19
|
-
| `group_create` | `POST` | `/sessions/create_group` | `group.create` |
|
|
20
|
-
| `group_leave_self` | `POST` | `/sessions/leave` | - |
|
|
21
|
-
| `group_member_add` | `POST` | `/sessions/members/add` | `group.member.add` |
|
|
22
|
-
| `group_member_remove` | `POST` | `/sessions/members/remove` | `group.member.remove` |
|
|
23
|
-
| `group_member_role_update` | `POST` | `/sessions/members/role` | `group.member.role.update` |
|
|
24
|
-
| `group_all_members_muted_update` | `POST` | `/sessions/speaking/all_muted` | `group.speaking.update` |
|
|
25
|
-
| `group_member_speaking_update` | `POST` | `/sessions/members/speaking` | `group.speaking.update` |
|
|
26
|
-
| `group_dissolve` | `POST` | `/sessions/dissolve` | `group.dissolve` |
|
|
27
|
-
|
|
28
|
-
## OpenClaw Tool Mapping
|
|
29
|
-
|
|
30
|
-
Use the native `grix_group` tool with typed fields:
|
|
31
|
-
|
|
32
|
-
| Tool action | HTTP action | Required fields |
|
|
33
|
-
|---|---|---|
|
|
34
|
-
| `create` | `group_create` | `accountId`, `name` |
|
|
35
|
-
| `detail` | `group_detail_read` | `accountId`, `sessionId` |
|
|
36
|
-
| `leave` | `group_leave_self` | `accountId`, `sessionId` |
|
|
37
|
-
| `add_members` | `group_member_add` | `accountId`, `sessionId`, `memberIds` |
|
|
38
|
-
| `remove_members` | `group_member_remove` | `accountId`, `sessionId`, `memberIds` |
|
|
39
|
-
| `update_member_role` | `group_member_role_update` | `accountId`, `sessionId`, `memberId`, `role` |
|
|
40
|
-
| `update_all_members_muted` | `group_all_members_muted_update` | `accountId`, `sessionId`, `allMembersMuted` |
|
|
41
|
-
| `update_member_speaking` | `group_member_speaking_update` | `accountId`, `sessionId`, `memberId`, `isSpeakMuted` or `canSpeakWhenAllMuted` |
|
|
42
|
-
| `dissolve` | `group_dissolve` | `accountId`, `sessionId` |
|
|
43
|
-
|
|
44
|
-
## Payload Templates
|
|
45
|
-
|
|
46
|
-
### create
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"action": "create",
|
|
51
|
-
"accountId": "primary",
|
|
52
|
-
"name": "Project Collaboration Group",
|
|
53
|
-
"memberIds": ["1002", "9991"],
|
|
54
|
-
"memberTypes": [1, 2]
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### add_members
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"action": "add_members",
|
|
63
|
-
"accountId": "primary",
|
|
64
|
-
"sessionId": "task_room_9083",
|
|
65
|
-
"memberIds": ["1003"],
|
|
66
|
-
"memberTypes": [1]
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### leave
|
|
71
|
-
|
|
72
|
-
```json
|
|
73
|
-
{
|
|
74
|
-
"action": "leave",
|
|
75
|
-
"accountId": "primary",
|
|
76
|
-
"sessionId": "task_room_9083"
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Error Matrix
|
|
81
|
-
|
|
82
|
-
| HTTP/BizCode | Meaning | Skill Response |
|
|
83
|
-
|---|---|---|
|
|
84
|
-
| `403/20011` | agent scope forbidden | Tell owner to grant corresponding scope |
|
|
85
|
-
| `400/10003` | invalid request payload | Ask for missing or corrected parameters |
|
|
86
|
-
| `401/10001` | invalid or missing auth | Check api_key and account config |
|
|
87
|
-
| `403/10002` | agent not active / invalid provider | Ask owner to activate the agent |
|
|
88
|
-
|
|
89
|
-
Notes:
|
|
90
|
-
|
|
91
|
-
1. `leave` does not require scope and should not route `403/20011` into scope remediation.
|
|
92
|
-
|
|
93
|
-
## Retry Policy
|
|
94
|
-
|
|
95
|
-
1. Never auto-retry `group_create` unless user confirms.
|
|
96
|
-
2. Allow one retry for transient network failure only.
|
|
97
|
-
3. Do not retry auth/scope/parameter failures automatically.
|
|
1
|
+
# API Contract
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Map high-level governance actions to Aibot Agent API HTTP routes.
|
|
6
|
+
|
|
7
|
+
## Base Rules
|
|
8
|
+
|
|
9
|
+
1. Base path: `/v1/agent-api`
|
|
10
|
+
2. Auth: `Authorization: Bearer <agent_api_key>`
|
|
11
|
+
3. Only `provider_type=3` and `status=active` agent can access.
|
|
12
|
+
4. Scope middleware executes before service business checks.
|
|
13
|
+
|
|
14
|
+
## Action Mapping (v1)
|
|
15
|
+
|
|
16
|
+
| Action | Method | Route | Required Scope |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| `group_detail_read` | `GET` | `/sessions/group/detail` | `group.detail.read` |
|
|
19
|
+
| `group_create` | `POST` | `/sessions/create_group` | `group.create` |
|
|
20
|
+
| `group_leave_self` | `POST` | `/sessions/leave` | - |
|
|
21
|
+
| `group_member_add` | `POST` | `/sessions/members/add` | `group.member.add` |
|
|
22
|
+
| `group_member_remove` | `POST` | `/sessions/members/remove` | `group.member.remove` |
|
|
23
|
+
| `group_member_role_update` | `POST` | `/sessions/members/role` | `group.member.role.update` |
|
|
24
|
+
| `group_all_members_muted_update` | `POST` | `/sessions/speaking/all_muted` | `group.speaking.update` |
|
|
25
|
+
| `group_member_speaking_update` | `POST` | `/sessions/members/speaking` | `group.speaking.update` |
|
|
26
|
+
| `group_dissolve` | `POST` | `/sessions/dissolve` | `group.dissolve` |
|
|
27
|
+
|
|
28
|
+
## OpenClaw Tool Mapping
|
|
29
|
+
|
|
30
|
+
Use the native `grix_group` tool with typed fields:
|
|
31
|
+
|
|
32
|
+
| Tool action | HTTP action | Required fields |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `create` | `group_create` | `accountId`, `name` |
|
|
35
|
+
| `detail` | `group_detail_read` | `accountId`, `sessionId` |
|
|
36
|
+
| `leave` | `group_leave_self` | `accountId`, `sessionId` |
|
|
37
|
+
| `add_members` | `group_member_add` | `accountId`, `sessionId`, `memberIds` |
|
|
38
|
+
| `remove_members` | `group_member_remove` | `accountId`, `sessionId`, `memberIds` |
|
|
39
|
+
| `update_member_role` | `group_member_role_update` | `accountId`, `sessionId`, `memberId`, `role` |
|
|
40
|
+
| `update_all_members_muted` | `group_all_members_muted_update` | `accountId`, `sessionId`, `allMembersMuted` |
|
|
41
|
+
| `update_member_speaking` | `group_member_speaking_update` | `accountId`, `sessionId`, `memberId`, `isSpeakMuted` or `canSpeakWhenAllMuted` |
|
|
42
|
+
| `dissolve` | `group_dissolve` | `accountId`, `sessionId` |
|
|
43
|
+
|
|
44
|
+
## Payload Templates
|
|
45
|
+
|
|
46
|
+
### create
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"action": "create",
|
|
51
|
+
"accountId": "primary",
|
|
52
|
+
"name": "Project Collaboration Group",
|
|
53
|
+
"memberIds": ["1002", "9991"],
|
|
54
|
+
"memberTypes": [1, 2]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### add_members
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"action": "add_members",
|
|
63
|
+
"accountId": "primary",
|
|
64
|
+
"sessionId": "task_room_9083",
|
|
65
|
+
"memberIds": ["1003"],
|
|
66
|
+
"memberTypes": [1]
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### leave
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"action": "leave",
|
|
75
|
+
"accountId": "primary",
|
|
76
|
+
"sessionId": "task_room_9083"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Error Matrix
|
|
81
|
+
|
|
82
|
+
| HTTP/BizCode | Meaning | Skill Response |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `403/20011` | agent scope forbidden | Tell owner to grant corresponding scope |
|
|
85
|
+
| `400/10003` | invalid request payload | Ask for missing or corrected parameters |
|
|
86
|
+
| `401/10001` | invalid or missing auth | Check api_key and account config |
|
|
87
|
+
| `403/10002` | agent not active / invalid provider | Ask owner to activate the agent |
|
|
88
|
+
|
|
89
|
+
Notes:
|
|
90
|
+
|
|
91
|
+
1. `leave` does not require scope and should not route `403/20011` into scope remediation.
|
|
92
|
+
|
|
93
|
+
## Retry Policy
|
|
94
|
+
|
|
95
|
+
1. Never auto-retry `group_create` unless user confirms.
|
|
96
|
+
2. Allow one retry for transient network failure only.
|
|
97
|
+
3. Do not retry auth/scope/parameter failures automatically.
|