grix-connector 4.2.3 → 4.2.4
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/dist/adapter/claude/claude-adapter.js +18 -17
- package/dist/adapter/claude/claude-bridge-server.js +1 -1
- package/dist/adapter/claude/claude-tools.js +1 -1
- package/dist/adapter/claude/claude-worker-client.js +1 -1
- package/dist/adapter/claude/mcp-http-launcher.js +2 -2
- package/dist/adapter/claude/result-timeout.js +1 -1
- package/dist/assets/dsh-bridge/{grix-dsh-bridge-4.2.3.tgz → grix-dsh-bridge-4.2.4.tgz} +0 -0
- package/dist/assets/dsh-bridge/manifest.json +4 -4
- package/dist/core/access/allowlist-store.js +1 -1
- package/dist/core/file-ops/list-files.js +1 -1
- package/dist/default-skills/grix-access-control/SKILL.md +1 -1
- package/dist/default-skills/grix-admin/SKILL.md +110 -155
- package/dist/default-skills/grix-admin/references/api-contract.md +23 -12
- package/dist/default-skills/grix-agent-dispatch/SKILL.md +152 -188
- package/dist/default-skills/grix-audit-data/SKILL.md +1 -1
- package/dist/default-skills/grix-chat-state/SKILL.md +26 -43
- package/dist/default-skills/grix-egg/SKILL.md +1 -1
- package/dist/default-skills/grix-group/SKILL.md +1 -1
- package/dist/default-skills/grix-owner-relay/SKILL.md +30 -64
- package/dist/default-skills/grix-query/SKILL.md +1 -1
- package/dist/default-skills/grix-skill-library/SKILL.md +52 -0
- package/dist/default-skills/grix-widget-visitor-ban/SKILL.md +1 -1
- package/dist/default-skills/message-send/SKILL.md +1 -1
- package/dist/default-skills/message-unsend/SKILL.md +1 -1
- package/dist/default-skills/tailnet-file-share/SKILL.md +38 -72
- package/dist/default-skills/tailnet-file-share/references/certificate-trust.md +64 -0
- package/dist/log.js +2 -2
- package/dist/mcp/stream-http/config.js +1 -1
- package/dist/mcp/stream-http/connection-binding.js +1 -1
- package/dist/mcp/stream-http/security.js +1 -1
- package/dist/mcp/stream-http/tool-executor.js +1 -1
- package/dist/mcp/stream-http/tool-registry.js +1 -1
- package/dist/mcp/stream-http/tool-schemas.js +1 -1
- package/openclaw-plugin/skills/grix-admin/SKILL.md +122 -156
- package/openclaw-plugin/skills/grix-group/SKILL.md +52 -159
- package/openclaw-plugin/skills/grix-query/SKILL.md +54 -248
- package/openclaw-plugin/skills/grix-update/SKILL.md +70 -304
- package/openclaw-plugin/skills/message-send/SKILL.md +41 -172
- package/openclaw-plugin/skills/message-unsend/SKILL.md +29 -170
- package/package.json +1 -1
|
@@ -1,164 +1,130 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grix-admin
|
|
3
|
-
description:
|
|
3
|
+
description: Grix agent administration for OpenClaw — create remote API agents, manage agent categories, and rotate API keys through `grix_admin`, and bind an agent's remote parameters into the local OpenClaw configuration with validation and routing verification. Trigger when the user asks to create a new agent, bind an agent into this OpenClaw host, or manage agent categories.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Grix Agent Admin
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
6
|
+
# Grix Agent Admin (OpenClaw)
|
|
7
|
+
|
|
8
|
+
Three workflows:
|
|
9
|
+
|
|
10
|
+
| Workflow | What it does |
|
|
11
|
+
|---|---|
|
|
12
|
+
| [`bind-local`](#workflow-a--bind-local) | Bind an existing remote agent's parameters into local OpenClaw, validate, verify routing |
|
|
13
|
+
| [`create-and-bind`](#workflow-b--create-and-bind) | Create a remote agent via `grix_admin`, then run `bind-local` |
|
|
14
|
+
| [`category-manage`](#workflow-c--category-manage) | List / create / update / assign categories via `grix_admin` |
|
|
15
|
+
|
|
16
|
+
## Two ways `grix_admin` is called
|
|
17
|
+
|
|
18
|
+
1. **Delegated workflow** — the caller passes only `task`, whose first line
|
|
19
|
+
names the workflow (`bind-local`, `create-and-bind`, `category-manage`)
|
|
20
|
+
followed by `key=value` lines. `grix-register` hands off this way. You then
|
|
21
|
+
run the workflow described below.
|
|
22
|
+
2. **Direct action** — pass `action` plus its fields (table below). Use this
|
|
23
|
+
for every remote call *inside* a workflow. `task` and `action` cannot be
|
|
24
|
+
combined in one call.
|
|
25
|
+
|
|
26
|
+
All remote operations go through `grix_admin` on the current account's WS
|
|
27
|
+
channel — never hand-written HTTP or scripts, never across accounts, and
|
|
28
|
+
never ask the user for a website account or password.
|
|
29
|
+
|
|
30
|
+
## `grix_admin` direct actions
|
|
31
|
+
|
|
32
|
+
| `action` | Required | Optional |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `create_agent` | `agentName`, `introduction` | `isMain`, `categoryId`, `categoryName`, `parentCategoryId`, `categorySortOrder` |
|
|
35
|
+
| `list_categories` | — | — |
|
|
36
|
+
| `create_category` | `name`, `parentId` | `sortOrder` |
|
|
37
|
+
| `update_category` | `categoryId`, `name`, `parentId` | `sortOrder` |
|
|
38
|
+
| `assign_category` | `agentId`, `categoryId` (`0` clears) | — |
|
|
39
|
+
| `rotate_api_key` | `agentId` | — |
|
|
40
|
+
|
|
41
|
+
Notes:
|
|
42
|
+
|
|
43
|
+
- `categoryId` and `categoryName` are mutually exclusive — report the conflict
|
|
44
|
+
and stop if both are given.
|
|
45
|
+
- With `categoryName`, the backend looks for an exact match under
|
|
46
|
+
`parentCategoryId`, creating it if absent. If several exact matches exist,
|
|
47
|
+
stop and ask the owner for an explicit `categoryId`.
|
|
48
|
+
- `isMain=true` only when actually creating a new main API agent.
|
|
49
|
+
- `code=4003` means a missing scope — report the exact `agent.api.create` or
|
|
50
|
+
`agent.category.*` scope.
|
|
51
|
+
|
|
52
|
+
## Agent creation intake (before any `create_agent`)
|
|
53
|
+
|
|
54
|
+
1. `agentName` and `introduction` must both be present and specific. Never
|
|
55
|
+
create an agent with an empty, generic, or placeholder introduction.
|
|
56
|
+
2. If either is missing or vague, ask one concise question in the user's
|
|
57
|
+
language: what does this agent mainly do — core responsibilities, whom it
|
|
58
|
+
serves, and its boundaries?
|
|
59
|
+
3. Turn the answer into a concise professional `agentName` and an
|
|
60
|
+
`introduction` that states purpose, core responsibilities, intended users or
|
|
61
|
+
scenarios, operating expectations, and boundaries. Treat `introduction` as
|
|
62
|
+
the agent's behavioral specification, not marketing copy.
|
|
63
|
+
4. Preserve the user's facts and intent; do not invent permissions, authority,
|
|
64
|
+
or expertise they did not grant.
|
|
65
|
+
|
|
66
|
+
## Workflow A — `bind-local`
|
|
67
|
+
|
|
68
|
+
Inputs: `agent_name`, `agent_id`, `api_endpoint`, `api_key` (all required).
|
|
69
|
+
Missing field → say which and stop. Do not create anything remotely, and do
|
|
70
|
+
not call back to `grix-register`.
|
|
71
|
+
|
|
72
|
+
1. Prepare local directories: `workspace=~/.openclaw/workspace-<agent_name>`
|
|
73
|
+
and `agentDir=~/.openclaw/agents/<agent_name>/agent`. Persona files live
|
|
74
|
+
only in the workspace root; add minimal `IDENTITY.md`, `SOUL.md`, and
|
|
75
|
+
`AGENTS.md` if missing.
|
|
76
|
+
2. Read the current account, agent, tool profile, tool allowlist, session
|
|
77
|
+
visibility, and binding configuration.
|
|
78
|
+
3. Resolve `model`: reuse the existing agent model, else
|
|
79
|
+
`agents.defaults.model.primary`; if neither exists, report the missing
|
|
80
|
+
model and stop.
|
|
81
|
+
4. Merge the account and agent entries, bind the agent to
|
|
82
|
+
`grix:<agent_name>`, set the coding tool profile and required Grix tools,
|
|
83
|
+
and restore `channels.grix.enabled=true` only if it was explicitly
|
|
84
|
+
disabled. Apply each change with the official OpenClaw CLI item by item —
|
|
85
|
+
never overwrite or hand-edit `openclaw.json`.
|
|
86
|
+
5. Static validation:
|
|
80
87
|
- `openclaw config validate`
|
|
81
88
|
- `openclaw config get --json channels.grix.accounts.<agent_name>`
|
|
82
89
|
- `openclaw config get --json agents.list`
|
|
83
90
|
- `openclaw agents bindings --agent <agent_name> --json`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
3.
|
|
106
|
-
4.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
##
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Execution rules:
|
|
126
|
-
|
|
127
|
-
1. Strictly bind all operations to the current session account; cross-account execution is prohibited.
|
|
128
|
-
2. Complete all remote steps through `grix_admin` direct actions; do not hand-write HTTP or temporary scripts.
|
|
129
|
-
3. Map operations directly: `list_categories`, `create_category`, `update_category`, or `assign_category`.
|
|
130
|
-
4. If the task also creates a new agent, use `create-and-bind` instead.
|
|
131
|
-
|
|
132
|
-
## Remote Creation Fallback
|
|
133
|
-
|
|
134
|
-
If the task has neither existing agent parameters nor an online main channel with `agent.api.create`, stop and ask the owner to create the remote agent through the backend admin path. After obtaining the parameters, proceed with `bind-local`.
|
|
135
|
-
|
|
136
|
-
## Guardrails
|
|
137
|
-
|
|
138
|
-
1. Never ask for a website account or password.
|
|
139
|
-
2. `bind-local` must not call back to `grix-register`.
|
|
140
|
-
3. All remote creation and category actions must go through `grix_admin` direct actions via the current account's WS channel.
|
|
141
|
-
4. Never repeatedly echo the complete `api_key` in plaintext.
|
|
142
|
-
5. Do not manually modify `openclaw.json`; use official OpenClaw CLI commands.
|
|
143
|
-
6. Do not claim full convergence until static validation and any available real routing verification pass.
|
|
144
|
-
7. Use at most one targeted gateway restart, only under the failure conditions defined by `bind-local`.
|
|
145
|
-
|
|
146
|
-
## Error Handling
|
|
147
|
-
|
|
148
|
-
1. For missing fields, clearly state which field is missing and stop.
|
|
149
|
-
2. If `agentName` or a usable `introduction` is missing, ask for the Agent's purpose, responsibilities, intended users, and boundaries before remote creation.
|
|
150
|
-
3. If both `categoryId` and `categoryName` are supplied, report the conflict and stop.
|
|
151
|
-
4. For `code=4003`, report the exact missing `agent.api.create` or `agent.category.*` scope.
|
|
152
|
-
5. Report the exact failed OpenClaw CLI command and validation result.
|
|
153
|
-
6. If one permitted restart and retest still fail, report the flow as failed or partially complete.
|
|
154
|
-
|
|
155
|
-
## Response Style
|
|
156
|
-
|
|
157
|
-
1. Clearly state whether the execution is `bind-local`, `create-and-bind`, or `category-manage`.
|
|
158
|
-
2. Report remote creation, category handling, local config writing, and validation as separate phases when applicable.
|
|
159
|
-
3. Clearly distinguish static configuration success from verified runtime convergence.
|
|
160
|
-
4. If a later phase fails after remote creation, report the overall result as partially complete.
|
|
161
|
-
|
|
162
|
-
## References
|
|
163
|
-
|
|
164
|
-
1. [references/api-contract.md](references/api-contract.md)
|
|
91
|
+
6. If real routing verification is available, run it now. Falling back to the
|
|
92
|
+
main agent, default assistant behavior, an old persona, or an ID mismatch
|
|
93
|
+
means the runtime has not switched.
|
|
94
|
+
7. Only when static validation passes but routing verification fails, run
|
|
95
|
+
**one** `openclaw gateway restart` and repeat the verification once.
|
|
96
|
+
|
|
97
|
+
Reporting: distinguish "config written and statically valid" from "runtime
|
|
98
|
+
verified". If verification cannot be run, say "config has been written,
|
|
99
|
+
runtime not yet tested, needs the upper-level flow to continue verification".
|
|
100
|
+
Never echo the full `api_key` in plaintext.
|
|
101
|
+
|
|
102
|
+
## Workflow B — `create-and-bind`
|
|
103
|
+
|
|
104
|
+
Inputs: `agentName`, `introduction` (required; run the intake above);
|
|
105
|
+
`isMain`, `categoryId` | `categoryName`, `parentCategoryId` (default `0`),
|
|
106
|
+
`categorySortOrder` (optional).
|
|
107
|
+
|
|
108
|
+
1. Call `grix_admin` once with `action=create_agent` and the supplied fields.
|
|
109
|
+
2. Read `createdAgent.id`, `agent_name`, `api_endpoint`, `api_key` from the
|
|
110
|
+
result. If a requested category was not applied, finish it with the
|
|
111
|
+
category actions.
|
|
112
|
+
3. Continue immediately with Workflow A using those values.
|
|
113
|
+
4. Report remote creation and local binding as separate phases; if binding
|
|
114
|
+
fails after creation succeeded, report the overall result as partial.
|
|
115
|
+
|
|
116
|
+
Fallback: if no agent parameters exist and the current account lacks
|
|
117
|
+
`agent.api.create`, stop and ask the owner to create the agent in the backend
|
|
118
|
+
admin, then run Workflow A with the parameters they provide.
|
|
119
|
+
|
|
120
|
+
## Workflow C — `category-manage`
|
|
121
|
+
|
|
122
|
+
Inputs: `operation` (`list` | `create` | `update` | `assign`) plus the fields
|
|
123
|
+
required by the matching action above. Map directly to `list_categories`,
|
|
124
|
+
`create_category`, `update_category`, `assign_category`. If the request also
|
|
125
|
+
creates an agent, use Workflow B instead.
|
|
126
|
+
|
|
127
|
+
## Reference
|
|
128
|
+
|
|
129
|
+
[references/api-contract.md](references/api-contract.md) — request/response
|
|
130
|
+
shapes for each action and the local binding checklist.
|
|
@@ -3,162 +3,55 @@ name: grix-group
|
|
|
3
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
4
|
---
|
|
5
5
|
|
|
6
|
-
# Grix Group
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
3.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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.
|
|
6
|
+
# Grix Group
|
|
7
|
+
|
|
8
|
+
Use `grix_group` for group lifecycle and membership management. The Grix
|
|
9
|
+
account is resolved from the current agent context; you do not pass it.
|
|
10
|
+
|
|
11
|
+
## Tool contract
|
|
12
|
+
|
|
13
|
+
Call `grix_group` with one `action`; use the exact typed field names below.
|
|
14
|
+
|
|
15
|
+
| `action` | Required | Optional |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `create` | `name` | `memberIds` (numeric strings) + `memberTypes` (1=user, 2=agent), aligned by index |
|
|
18
|
+
| `detail` | `sessionId` | — |
|
|
19
|
+
| `leave` | `sessionId` | — (never send member fields) |
|
|
20
|
+
| `dissolve` | `sessionId` | — |
|
|
21
|
+
| `add_members` / `remove_members` | `sessionId`, `memberIds` | `memberTypes`, aligned by index |
|
|
22
|
+
| `update_member_role` | `sessionId`, `memberId`, `role` (1=admin, 2=member) | — (`memberType` is always 1) |
|
|
23
|
+
| `update_all_members_muted` | `sessionId`, `allMembersMuted` | — |
|
|
24
|
+
| `update_member_speaking` | `sessionId`, `memberId`, at least one of `isSpeakMuted` / `canSpeakWhenAllMuted` | `memberType` (1 or 2) |
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
1. Validate required fields before calling; reject non-numeric `memberIds`
|
|
29
|
+
and empty `sessionId` yourself. Resolve an unknown or ambiguous group with
|
|
30
|
+
`grix_query` (`session_search`) and confirm with the user first.
|
|
31
|
+
2. One call per business action. `create` and `dissolve` are not idempotent —
|
|
32
|
+
never auto-retry them; ask for explicit confirmation before repeating.
|
|
33
|
+
3. Never guess a role or mute state from vague wording; confirm whether the
|
|
34
|
+
user wants it enabled or disabled.
|
|
35
|
+
4. `leave` removes only the current agent from the group. Execute it only
|
|
36
|
+
for the owner or an already-established authorized operator; if identity
|
|
37
|
+
is unclear, confirm first. Leave silently — no farewell message — and
|
|
38
|
+
report the result only to the requester. To remove someone else use
|
|
39
|
+
`remove_members`. `leave` needs no scope, so never answer a `leave`
|
|
40
|
+
failure with scope-grant guidance.
|
|
41
|
+
5. On errors, report the exact failure and fix; do not retry blindly:
|
|
42
|
+
- `403/20011` — missing scope (usually not an admin of that group); ask the
|
|
43
|
+
owner to grant it in the agent permission page.
|
|
44
|
+
- `401/10001` — invalid key/auth; check agent config or rotate the key.
|
|
45
|
+
- `403/10002` — agent not active or invalid provider type.
|
|
46
|
+
- `400/10003` — invalid or missing parameters.
|
|
47
|
+
|
|
48
|
+
## Response style
|
|
49
|
+
|
|
50
|
+
State the result first with key identifiers (`session_id`, member count,
|
|
51
|
+
mute state); on failure give the exact remediation and never hide scope or
|
|
52
|
+
auth errors behind generic wording.
|
|
53
|
+
|
|
54
|
+
## Reference
|
|
55
|
+
|
|
56
|
+
[references/api-contract.md](references/api-contract.md) — exact tool
|
|
57
|
+
mapping, payload examples, and scope matrix.
|