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.
Files changed (40) hide show
  1. package/dist/adapter/claude/claude-adapter.js +18 -17
  2. package/dist/adapter/claude/claude-bridge-server.js +1 -1
  3. package/dist/adapter/claude/claude-tools.js +1 -1
  4. package/dist/adapter/claude/claude-worker-client.js +1 -1
  5. package/dist/adapter/claude/mcp-http-launcher.js +2 -2
  6. package/dist/adapter/claude/result-timeout.js +1 -1
  7. package/dist/assets/dsh-bridge/{grix-dsh-bridge-4.2.3.tgz → grix-dsh-bridge-4.2.4.tgz} +0 -0
  8. package/dist/assets/dsh-bridge/manifest.json +4 -4
  9. package/dist/core/access/allowlist-store.js +1 -1
  10. package/dist/core/file-ops/list-files.js +1 -1
  11. package/dist/default-skills/grix-access-control/SKILL.md +1 -1
  12. package/dist/default-skills/grix-admin/SKILL.md +110 -155
  13. package/dist/default-skills/grix-admin/references/api-contract.md +23 -12
  14. package/dist/default-skills/grix-agent-dispatch/SKILL.md +152 -188
  15. package/dist/default-skills/grix-audit-data/SKILL.md +1 -1
  16. package/dist/default-skills/grix-chat-state/SKILL.md +26 -43
  17. package/dist/default-skills/grix-egg/SKILL.md +1 -1
  18. package/dist/default-skills/grix-group/SKILL.md +1 -1
  19. package/dist/default-skills/grix-owner-relay/SKILL.md +30 -64
  20. package/dist/default-skills/grix-query/SKILL.md +1 -1
  21. package/dist/default-skills/grix-skill-library/SKILL.md +52 -0
  22. package/dist/default-skills/grix-widget-visitor-ban/SKILL.md +1 -1
  23. package/dist/default-skills/message-send/SKILL.md +1 -1
  24. package/dist/default-skills/message-unsend/SKILL.md +1 -1
  25. package/dist/default-skills/tailnet-file-share/SKILL.md +38 -72
  26. package/dist/default-skills/tailnet-file-share/references/certificate-trust.md +64 -0
  27. package/dist/log.js +2 -2
  28. package/dist/mcp/stream-http/config.js +1 -1
  29. package/dist/mcp/stream-http/connection-binding.js +1 -1
  30. package/dist/mcp/stream-http/security.js +1 -1
  31. package/dist/mcp/stream-http/tool-executor.js +1 -1
  32. package/dist/mcp/stream-http/tool-registry.js +1 -1
  33. package/dist/mcp/stream-http/tool-schemas.js +1 -1
  34. package/openclaw-plugin/skills/grix-admin/SKILL.md +122 -156
  35. package/openclaw-plugin/skills/grix-group/SKILL.md +52 -159
  36. package/openclaw-plugin/skills/grix-query/SKILL.md +54 -248
  37. package/openclaw-plugin/skills/grix-update/SKILL.md +70 -304
  38. package/openclaw-plugin/skills/message-send/SKILL.md +41 -172
  39. package/openclaw-plugin/skills/message-unsend/SKILL.md +29 -170
  40. 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 the `grix_query` tool for read-only Grix lookup actions.
9
- This skill is only for querying existing contacts, sessions, and raw session messages.
10
-
11
- ## Workflow
12
-
13
- 1. Parse the user request into one action:
14
- `contact_search`, `session_search`, `message_history`, or `message_search`.
15
- 2. Validate required fields before any tool call.
16
- 3. Start with one `grix_query` call for the first page.
17
- 4. If the result is paginated and `has_more` is `true`, continue paging when the user asked for all results, when the target is still unresolved, or when one page is clearly insufficient.
18
- 5. If the user wants message history or in-session keyword search but no `sessionId` is known, locate the target session first through `session_search` or ask the user for a precise target.
19
- 6. Return exact remediation for scope, auth, and parameter failures.
20
-
21
- ## Tool Contract
22
-
23
- For Grix query actions, always call:
24
-
25
- 1. Tool: `grix_query`
26
- 2. `action`: one of `contact_search`, `session_search`, `message_history`, or `message_search`
27
- 3. `accountId`: required; pass the exact current Grix account ID
28
-
29
- Rules:
30
-
31
- 1. Pass query parameters with their exact typed field names.
32
- 2. For `contact_search` and `session_search`, use exactly one of these modes:
33
- exact lookup with `id`, keyword search with `keyword`, or list-all with neither.
34
- 3. If both `id` and `keyword` are present, the backend will prioritize `id`; avoid sending both unless you explicitly want exact-match behavior.
35
- 4. Use `sessionId`, `beforeId`, and `limit` explicitly for message reads; `message_search` also requires `keyword`.
36
- 5. Never invent a `sessionId`. Resolve it from context, from a previous tool result, or ask the user.
37
- 6. Use one tool call per page. Repeated calls are allowed only for pagination or for resolving an ambiguous target.
38
- 7. When paging `contact_search` or `session_search`, keep the same filter and advance `offset`.
39
- 8. `message_history` defaults to the newest one clean message. When paging it or
40
- `message_search`, reuse the same `sessionId` and set `beforeId` to the oldest
41
- message ID from the previous page.
42
-
43
- ## Lookup Usage
44
-
45
- ### Single Lookup (with ID)
46
-
47
- When the user provides one exact ID, pass it for a precise match:
48
-
49
- 1. Single contact lookup: `action: "contact_search"` + `id`
50
- 2. Single session lookup: `action: "session_search"` + `id`
51
-
52
- ID meaning:
53
-
54
- 1. `contact_search.id`: contact or Agent numeric ID, e.g. `1002`
55
- 2. `session_search.id`: exact session ID string, e.g. `task_room_9083`
56
-
57
- Examples:
58
-
59
- ```json
60
- {
61
- "action": "contact_search",
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.