grix-connector 3.32.0 → 3.33.0

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.
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: grix-audit-data
3
+ description: Use the typed `grix_audit_data` tool to read conversation audit replay data. Trigger when the user asks to inspect an audit by audit ID, fetch audit manifest/structure, list audit spans/timeline, or read audit text/content chunks.
4
+ trigger: 当用户要求按 audit_id 查看对话审计、读取审计总体结构、调用时间线或正文分块时
5
+ ---
6
+
7
+ # Grix Audit Data
8
+
9
+ Use `grix_audit_data` only for read-only conversation audit replay. The owner must grant this Agent the `conversation.audit.read` scope; without it, the tool returns a scope error.
10
+
11
+ ## Workflow
12
+
13
+ 1. Start from an `auditId` supplied by the user or by audited-turn metadata.
14
+ 2. Call `grix_audit_data` with `action: "get_manifest"` and `auditId`.
15
+ 3. Read the returned `result`:
16
+ - `content_refs` tells you which text bodies can be fetched. Each item includes byte/char counts, capture level, and an estimated token count.
17
+ - `has_spans` tells you whether a span/timeline page is available.
18
+ - `revision` should be reused in later calls when present.
19
+ - `quality.raw_requests_status` distinguishes `not_requested`, `unavailable`, `partial`, and `complete` raw provider body capture. Prefer it over treating the legacy boolean `raw_requests_complete` as proof that raw model requests were stored.
20
+ - `statistics.input_token_attribution` compares provider-reported input tokens with captured input content refs. A large `unattributed_provider_input_tokens` value usually means runtime context such as system/developer instructions, tool schemas, or adapter-added context was included in the model request but was not captured as replay content.
21
+ 4. Only fetch what is needed:
22
+ - For timeline/structure details, call `action: "list_spans"` with the same `auditId`, optional `revision`, and pagination `cursor`.
23
+ - For a specific text body, call `action: "get_content_chunk"` with `auditId`, `contentId`, optional `revision`, and pagination `cursor` until `eof` is true.
24
+
25
+ ## Actions
26
+
27
+ ### `get_manifest`
28
+
29
+ Required:
30
+ - `auditId`
31
+
32
+ Optional:
33
+ - `revision`
34
+
35
+ Returns the audit overview/manifest: metadata, stats, `content_refs`, raw request capture availability, input token attribution, `has_spans`, and related structure. It does not return full text bodies or span pages.
36
+
37
+ Example:
38
+
39
+ ```json
40
+ {
41
+ "action": "get_manifest",
42
+ "auditId": "audit-123"
43
+ }
44
+ ```
45
+
46
+ ### `list_spans`
47
+
48
+ Required:
49
+ - `auditId`
50
+
51
+ Optional:
52
+ - `revision`
53
+ - `cursor`
54
+ - `limit` (max 200)
55
+
56
+ Returns one page of span/timeline metadata: `items`, `next_cursor`, and `has_more`.
57
+
58
+ Example:
59
+
60
+ ```json
61
+ {
62
+ "action": "list_spans",
63
+ "auditId": "audit-123",
64
+ "revision": 2,
65
+ "limit": 50
66
+ }
67
+ ```
68
+
69
+ ### `get_content_chunk`
70
+
71
+ Required:
72
+ - `auditId`
73
+ - `contentId` from `get_manifest.result.content_refs`
74
+
75
+ Optional:
76
+ - `revision`
77
+ - `cursor`
78
+ - `maxBytes` (max 131072; use smaller chunks such as 32768 for interactive inspection)
79
+
80
+ Returns one UTF-8 text chunk: `value`, byte offsets, `next_cursor`, and `eof`. Continue with `next_cursor` only when the user actually needs more text.
81
+
82
+ Example:
83
+
84
+ ```json
85
+ {
86
+ "action": "get_content_chunk",
87
+ "auditId": "audit-123",
88
+ "contentId": "content-456",
89
+ "revision": 2,
90
+ "maxBytes": 32768
91
+ }
92
+ ```
93
+
94
+ ## Rules
95
+
96
+ - Do not guess or fabricate `auditId`, `contentId`, or cursors.
97
+ - Do not prefetch all content. Fetch manifest first, then the smallest span page or text chunk that answers the user.
98
+ - Treat cursors as opaque; pass back exactly the `next_cursor` returned by Grix.
99
+ - This tool reads only the current Agent's own audit data as authorized by Grix.
@@ -10,6 +10,7 @@
10
10
  "contracts": {
11
11
  "tools": [
12
12
  "grix_query",
13
+ "grix_audit_data",
13
14
  "grix_group",
14
15
  "grix_admin",
15
16
  "grix_egg",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grix-connector",
3
- "version": "3.32.0",
3
+ "version": "3.33.0",
4
4
  "description": "Connect local AI coding agents (Claude, Codex, Gemini, Qwen, DeepSeek, Cursor, OpenCode, Pi, OpenHuman, Reasonix) to the Grix scheduling platform. Also serves as an OpenClaw plugin for Grix channel transport.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",