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
|
@@ -5,251 +5,57 @@ description: Use the typed `grix_query` tool for Grix contact lookup, keyword se
|
|
|
5
5
|
|
|
6
6
|
# Grix Query
|
|
7
7
|
|
|
8
|
-
Use
|
|
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
|
-
"accountId": "primary",
|
|
63
|
-
"id": "1002"
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
```json
|
|
68
|
-
{
|
|
69
|
-
"action": "session_search",
|
|
70
|
-
"accountId": "primary",
|
|
71
|
-
"id": "task_room_9083"
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Keyword Search
|
|
76
|
-
|
|
77
|
-
When the user provides a fuzzy name, title, username, or other search phrase, pass `keyword`:
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"action": "contact_search",
|
|
82
|
-
"accountId": "primary",
|
|
83
|
-
"keyword": "atlas user"
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"action": "session_search",
|
|
90
|
-
"accountId": "primary",
|
|
91
|
-
"keyword": "taskroom9083"
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### List All (without ID or keyword)
|
|
96
|
-
|
|
97
|
-
When the user asks to list all contacts or sessions, call without `id` and without `keyword`:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"action": "contact_search",
|
|
102
|
-
"accountId": "primary"
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"action": "session_search",
|
|
109
|
-
"accountId": "primary"
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Returns a paginated result with `has_more`, `list`, and default page size of 20.
|
|
114
|
-
Use `limit` and `offset` to paginate through results.
|
|
115
|
-
|
|
116
|
-
If the user asks for all results, keep fetching additional pages until `has_more` is `false`.
|
|
117
|
-
If the user only needs one match or one page is enough to answer, stop after the first sufficient page.
|
|
118
|
-
|
|
119
|
-
```json
|
|
120
|
-
{
|
|
121
|
-
"action": "contact_search",
|
|
122
|
-
"accountId": "primary",
|
|
123
|
-
"limit": 50,
|
|
124
|
-
"offset": 20
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Action Contracts
|
|
129
|
-
|
|
130
|
-
### contact_search
|
|
131
|
-
|
|
132
|
-
Purpose: search the owner's Grix contact directory.
|
|
133
|
-
|
|
134
|
-
**Without `id` and without `keyword`**: returns all contacts (friends + agents) in a paginated list, sorted by `created_at` descending. Default page size 20.
|
|
135
|
-
|
|
136
|
-
**With `id`**: returns the exact matching contact record.
|
|
137
|
-
|
|
138
|
-
**With `keyword`**: searches contact remark name, nickname, username, and numeric ID prefix.
|
|
139
|
-
|
|
140
|
-
Input:
|
|
141
|
-
|
|
142
|
-
1. `id` (contact ID, numeric string) — optional
|
|
143
|
-
2. `keyword` — optional
|
|
144
|
-
3. `limit` — optional, default 20
|
|
145
|
-
4. `offset` — optional, default 0
|
|
146
|
-
|
|
147
|
-
Guardrails:
|
|
148
|
-
|
|
149
|
-
1. Use `id` when the target contact ID is already known and you need the exact entry.
|
|
150
|
-
2. Use `keyword` for fuzzy search; do not use `id` for partial matches.
|
|
151
|
-
3. Without `id` and `keyword`, the result includes both user contacts and agent contacts merged and sorted.
|
|
152
|
-
4. Check `has_more` to determine if additional pages exist.
|
|
153
|
-
5. When paging, keep the same filters and increase `offset` by the number of items already fetched.
|
|
154
|
-
6. If the user asked for all matches, continue until `has_more` is `false`.
|
|
155
|
-
7. Do not jump directly to session history from a vague contact hint; resolve the contact or session first.
|
|
156
|
-
|
|
157
|
-
### session_search
|
|
158
|
-
|
|
159
|
-
Purpose: search the owner's visible sessions.
|
|
160
|
-
|
|
161
|
-
**Without `id` and without `keyword`**: returns all visible sessions in a paginated list, ordered by pinned status and `last_active_at`. Default page size 20.
|
|
162
|
-
|
|
163
|
-
**With `id`**: returns the exact matching session.
|
|
164
|
-
|
|
165
|
-
**With `keyword`**: searches session title and `session_id`.
|
|
166
|
-
|
|
167
|
-
Each result item includes `session_type`: `1` = private chat, `2` = group chat.
|
|
168
|
-
|
|
169
|
-
Input:
|
|
170
|
-
|
|
171
|
-
1. `id` (session ID) — optional
|
|
172
|
-
2. `keyword` — optional
|
|
173
|
-
3. `sessionType` — optional; `1` = private chats only, `2` = group chats only. **Omit to return all sessions regardless of type.**
|
|
174
|
-
4. `limit` — optional, default 20
|
|
175
|
-
5. `offset` — optional, default 0
|
|
176
|
-
|
|
177
|
-
Guardrails:
|
|
178
|
-
|
|
179
|
-
1. Use `id` when the target session ID is already known.
|
|
180
|
-
2. Use `keyword` for fuzzy search by title or session ID text.
|
|
181
|
-
3. Use `sessionType` when the user explicitly wants only private chats or only group chats.
|
|
182
|
-
4. Without `id` and `keyword`, the result shows all sessions the agent can see.
|
|
183
|
-
5. Check `has_more` to determine if additional pages exist.
|
|
184
|
-
6. When paging, keep the same filters and increase `offset` by the number of items already fetched.
|
|
185
|
-
7. If the user asked for all matches, continue until `has_more` is `false`.
|
|
186
|
-
8. If multiple sessions match, present the candidates and let the user choose before reading history.
|
|
187
|
-
|
|
188
|
-
### message_history
|
|
189
|
-
|
|
190
|
-
Purpose: read recent message history from a known session.
|
|
191
|
-
|
|
192
|
-
Required input:
|
|
193
|
-
|
|
194
|
-
1. `sessionId`
|
|
195
|
-
|
|
196
|
-
Optional input:
|
|
197
|
-
|
|
198
|
-
1. `beforeId`
|
|
199
|
-
2. `limit` — defaults to 1
|
|
200
|
-
|
|
201
|
-
Guardrails:
|
|
202
|
-
|
|
203
|
-
1. Only call this after the target session is unambiguous.
|
|
204
|
-
2. Use `beforeId` only for older-page pagination.
|
|
205
|
-
3. For the next page, set `beforeId` to the oldest message ID returned in the previous page.
|
|
206
|
-
4. If the user asked for more history and `has_more` is `true`, keep paging until enough history is collected or no more pages remain.
|
|
207
|
-
5. Do not claim to have full history if only one page was fetched.
|
|
208
|
-
6. History contains plain text and approval-family cards; tool, status, and
|
|
209
|
-
binding process cards are filtered by the service.
|
|
210
|
-
|
|
211
|
-
### message_search
|
|
212
|
-
|
|
213
|
-
Purpose: search messages by keyword inside one known session.
|
|
214
|
-
|
|
215
|
-
Required input:
|
|
216
|
-
|
|
217
|
-
1. `sessionId`
|
|
218
|
-
2. `keyword`
|
|
219
|
-
|
|
220
|
-
Optional input:
|
|
221
|
-
|
|
222
|
-
1. `beforeId`
|
|
223
|
-
2. `limit`
|
|
224
|
-
|
|
225
|
-
Guardrails:
|
|
226
|
-
|
|
227
|
-
1. Only call this after the target session is unambiguous.
|
|
228
|
-
2. `keyword` must be the real search phrase; do not fake an empty keyword just to reuse this action.
|
|
229
|
-
3. For the next page, keep the same `keyword` and `sessionId`, and set `beforeId` to the oldest message ID returned in the previous page.
|
|
230
|
-
4. If the user asked for all matches and `has_more` is `true`, keep paging until enough matches are collected or no more pages remain.
|
|
231
|
-
5. If the user only asked whether a keyword appeared, one sufficient page can stop the search, but state clearly that the result is partial when you did not exhaust all pages.
|
|
232
|
-
|
|
233
|
-
## Error Handling Rules
|
|
234
|
-
|
|
235
|
-
1. `403/20011`:
|
|
236
|
-
report missing scope and ask the owner to grant the required scope in the Aibot Agent permission page.
|
|
237
|
-
2. `401/10001`:
|
|
238
|
-
report invalid key/auth and suggest checking agent config or rotating the API key.
|
|
239
|
-
3. `403/10002`:
|
|
240
|
-
report the agent is not active or has an invalid provider type.
|
|
241
|
-
4. `400/10003`:
|
|
242
|
-
report invalid or missing parameters and ask the user for corrected values.
|
|
243
|
-
5. `404/4004`:
|
|
244
|
-
report the target session does not exist or is not visible.
|
|
245
|
-
6. Other errors:
|
|
246
|
-
return the backend `msg` and stop automatic retries.
|
|
247
|
-
|
|
248
|
-
## Response Style
|
|
249
|
-
|
|
250
|
-
1. State the query result first.
|
|
251
|
-
2. Include key identifiers from successful lookups:
|
|
252
|
-
`peer_id` / `peer_type` for contacts, `session_id` for sessions, and message identifiers for history.
|
|
253
|
-
3. If only part of a paginated result was fetched, state that clearly.
|
|
254
|
-
4. If multiple pages were fetched, summarize that the answer is merged from several pages.
|
|
255
|
-
5. Never hide scope or auth errors behind generic wording.
|
|
8
|
+
Use `grix_query` for read-only Grix lookup. It only queries existing contacts,
|
|
9
|
+
sessions, and raw session messages — it never sends or changes anything. The
|
|
10
|
+
Grix account is resolved from the current agent context; you do not pass it.
|
|
11
|
+
|
|
12
|
+
## Tool contract
|
|
13
|
+
|
|
14
|
+
Call `grix_query` with one `action`:
|
|
15
|
+
|
|
16
|
+
- `contact_search` — the owner's contact directory (friends + agents). Use
|
|
17
|
+
exactly one mode: exact lookup with `id` (numeric contact/agent ID), keyword
|
|
18
|
+
search with `keyword` (matches remark name, nickname, username, ID prefix),
|
|
19
|
+
or list-all with neither (sorted by `created_at` desc).
|
|
20
|
+
- `session_search` — the owner's visible sessions. Same three modes: `id`
|
|
21
|
+
(exact session ID), `keyword` (matches title and session ID), or neither
|
|
22
|
+
(ordered by pinned status and `last_active_at`). Each result carries
|
|
23
|
+
`session_type` (`1` private, `2` group); pass `sessionType` to filter by
|
|
24
|
+
type, omit to get both.
|
|
25
|
+
- `message_history` — recent clean messages of one session. Requires
|
|
26
|
+
`sessionId`; `limit` defaults to 1; page backwards with `beforeId` = the
|
|
27
|
+
oldest message ID from the previous page. History contains plain text and
|
|
28
|
+
approval-family cards; tool/status/binding process cards are filtered out.
|
|
29
|
+
- `message_search` — keyword search inside one session. Requires `sessionId`
|
|
30
|
+
and a real `keyword`; pages like `message_history`.
|
|
31
|
+
|
|
32
|
+
Pagination: `limit` (default 20, max 100) and `offset` for the two search
|
|
33
|
+
actions; `beforeId` for the two message actions. Results include `has_more`.
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
1. Parse the request into exactly one action and validate required fields
|
|
38
|
+
before calling.
|
|
39
|
+
2. If both `id` and `keyword` are given the backend prioritizes `id`; send
|
|
40
|
+
only one unless you explicitly want exact-match behavior.
|
|
41
|
+
3. Never invent a `sessionId`. For message history or in-session search with
|
|
42
|
+
no known session, resolve it via `session_search` first — if several
|
|
43
|
+
sessions match, present the candidates and let the user choose.
|
|
44
|
+
4. One call per page. Keep paging only when the user asked for everything,
|
|
45
|
+
the target is still unresolved, or one page is clearly insufficient; keep
|
|
46
|
+
the same filters while paging. When you stop early, say the result is
|
|
47
|
+
partial.
|
|
48
|
+
5. On errors, report the exact failure and fix; do not retry with guessed
|
|
49
|
+
parameters:
|
|
50
|
+
- `403/20011` — missing scope; ask the owner to grant it in the agent
|
|
51
|
+
permission page.
|
|
52
|
+
- `401/10001` — invalid key/auth; check agent config or rotate the key.
|
|
53
|
+
- `403/10002` — agent not active or invalid provider type.
|
|
54
|
+
- `400/10003` — invalid or missing parameters.
|
|
55
|
+
- `404/4004` — session does not exist or is not visible.
|
|
56
|
+
|
|
57
|
+
## Response style
|
|
58
|
+
|
|
59
|
+
State the result first and include the key identifiers (`peer_id` /
|
|
60
|
+
`peer_type` for contacts, `session_id` for sessions, message IDs for
|
|
61
|
+
history). Never hide scope or auth errors behind generic wording.
|