grix-connector 3.1.13 → 3.1.15

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 (75) hide show
  1. package/README.md +241 -241
  2. package/dist/adapter/claude/claude-adapter.js +19 -19
  3. package/dist/adapter/claude/usage-parser.js +9 -7
  4. package/dist/default-skills/grix-access-control/SKILL.md +31 -31
  5. package/dist/default-skills/grix-admin/SKILL.md +35 -35
  6. package/dist/default-skills/grix-agent-dispatch/SKILL.md +89 -89
  7. package/dist/default-skills/grix-chat-state/SKILL.md +56 -56
  8. package/dist/default-skills/grix-egg/SKILL.md +90 -90
  9. package/dist/default-skills/grix-group/SKILL.md +35 -35
  10. package/dist/default-skills/grix-owner-relay/SKILL.md +66 -66
  11. package/dist/default-skills/grix-query/SKILL.md +38 -38
  12. package/dist/default-skills/message-send/SKILL.md +36 -36
  13. package/dist/default-skills/message-unsend/SKILL.md +27 -27
  14. package/dist/default-skills/tailnet-file-share/SKILL.md +65 -65
  15. package/dist/grix.js +0 -0
  16. package/dist/service/platform-adapter.js +59 -16
  17. package/openclaw-plugin/skills/grix-admin/SKILL.md +202 -202
  18. package/openclaw-plugin/skills/grix-admin/references/api-contract.md +210 -210
  19. package/openclaw-plugin/skills/grix-egg/SKILL.md +81 -81
  20. package/openclaw-plugin/skills/grix-egg/references/api-contract.md +40 -40
  21. package/openclaw-plugin/skills/grix-group/SKILL.md +164 -164
  22. package/openclaw-plugin/skills/grix-group/references/api-contract.md +97 -97
  23. package/openclaw-plugin/skills/grix-query/SKILL.md +247 -247
  24. package/openclaw-plugin/skills/grix-register/SKILL.md +86 -86
  25. package/openclaw-plugin/skills/grix-register/references/api-contract.md +76 -76
  26. package/openclaw-plugin/skills/grix-register/references/grix-concepts.md +26 -26
  27. package/openclaw-plugin/skills/grix-register/references/handoff-contract.md +24 -24
  28. package/openclaw-plugin/skills/grix-register/references/openclaw-setup.md +6 -6
  29. package/openclaw-plugin/skills/grix-register/references/user-replies.md +25 -25
  30. package/openclaw-plugin/skills/grix-update/SKILL.md +310 -310
  31. package/openclaw-plugin/skills/grix-update/references/cron-setup.md +56 -56
  32. package/openclaw-plugin/skills/grix-update/references/update-contract.md +149 -149
  33. package/openclaw-plugin/skills/message-send/SKILL.md +197 -197
  34. package/openclaw-plugin/skills/message-unsend/SKILL.md +186 -186
  35. package/openclaw-plugin/skills/message-unsend/flowchart.mermaid +27 -27
  36. package/openclaw-plugin/skills/openclaw-memory-setup/SKILL.md +282 -282
  37. package/openclaw-plugin/skills/openclaw-memory-setup/references/case-study-macpro.md +52 -52
  38. package/openclaw-plugin/skills/openclaw-memory-setup/references/host-readiness.md +147 -147
  39. package/openclaw.plugin.json +24 -24
  40. package/package.json +121 -121
  41. package/scripts/install-guardian.mjs +27 -27
  42. package/scripts/install-guardian.sh +25 -25
  43. package/scripts/upgrade-guardian.sh +104 -104
  44. package/dist/adapter/claude/claude-bridge-server.js +0 -1
  45. package/dist/adapter/claude/claude-tools.js +0 -1
  46. package/dist/adapter/claude/claude-worker-client.js +0 -1
  47. package/dist/adapter/claude/mcp-http-launcher.js +0 -2
  48. package/dist/adapter/claude/result-timeout.js +0 -1
  49. package/dist/adapter/deepseek/deepseek-adapter.js +0 -6
  50. package/dist/adapter/deepseek/index.js +0 -1
  51. package/dist/adapter/qwen/index.js +0 -1
  52. package/dist/adapter/qwen/qwen-adapter.js +0 -4
  53. package/dist/aibot/client.js +0 -1
  54. package/dist/aibot/index.js +0 -1
  55. package/dist/aibot/types.js +0 -0
  56. package/dist/core/file-ops/handler.js +0 -1
  57. package/dist/core/file-ops/list-files.js +0 -1
  58. package/dist/core/file-ops/types.js +0 -0
  59. package/dist/default-skills/grix-task-status/SKILL.md +0 -36
  60. package/dist/log.js +0 -3
  61. package/dist/main.js +0 -31
  62. package/dist/mcp/stream-http/config.js +0 -1
  63. package/dist/mcp/stream-http/connection-binding.js +0 -1
  64. package/dist/mcp/stream-http/event-tool-executor.js +0 -1
  65. package/dist/mcp/stream-http/gateway.js +0 -1
  66. package/dist/mcp/stream-http/index.js +0 -1
  67. package/dist/mcp/stream-http/security.js +0 -1
  68. package/dist/mcp/stream-http/session-manager.js +0 -1
  69. package/dist/mcp/stream-http/tool-executor.js +0 -1
  70. package/dist/mcp/stream-http/tool-registry.js +0 -1
  71. package/dist/mcp/stream-http/tool-schemas.js +0 -1
  72. package/dist/session/index.js +0 -1
  73. package/dist/session/manager.js +0 -1
  74. package/dist/transport/index.js +0 -1
  75. package/dist/transport/json-rpc.js +0 -3
@@ -1,31 +1,31 @@
1
- ---
2
- name: grix-access-control
3
- description: Manage sender access control with the typed `grix_access_control` tool — approve/deny a pairing code, allow/remove a sender, or set the access policy. Trigger when the user asks to approve a pairing request, allowlist or block a sender, or change who is allowed to message the agent.
4
- trigger: 当用户要批准/拒绝配对码、允许或移除某个发送者、或调整谁可以给 Agent 发消息的访问策略时
5
- ---
6
-
7
- # Grix Access Control
8
-
9
- Use the `grix_access_control` tool to manage who may message this agent.
10
-
11
- ## Tool contract
12
-
13
- Call `grix_access_control` with one `action`:
14
-
15
- - `pair_approve` / `pair_deny` — approve or deny a pairing request. Requires the
16
- `code` from the pairing request.
17
- - `allow_sender` — add a sender to the allowlist. Requires `sender_id`.
18
- - `remove_sender` — remove a sender. Requires `sender_id`.
19
- - `set_policy` — set the access policy. Requires `policy`, one of:
20
- - `allowlist` — only allowlisted senders may message
21
- - `open` — anyone may message
22
- - `disabled` — access control off
23
-
24
- ## Rules
25
-
26
- 1. Pick exactly one `action` and supply only the field it needs (`code` for
27
- pairing, `sender_id` for allow/remove, `policy` for set_policy).
28
- 2. These actions change who can reach the agent — confirm with the user before
29
- approving an unknown pairing code or switching the policy to `open`.
30
- 3. On failure, report the exact reason (e.g. expired/invalid code) instead of
31
- retrying with a guessed value.
1
+ ---
2
+ name: grix-access-control
3
+ description: Manage sender access control with the typed `grix_access_control` tool — approve/deny a pairing code, allow/remove a sender, or set the access policy. Trigger when the user asks to approve a pairing request, allowlist or block a sender, or change who is allowed to message the agent.
4
+ trigger: 当用户要批准/拒绝配对码、允许或移除某个发送者、或调整谁可以给 Agent 发消息的访问策略时
5
+ ---
6
+
7
+ # Grix Access Control
8
+
9
+ Use the `grix_access_control` tool to manage who may message this agent.
10
+
11
+ ## Tool contract
12
+
13
+ Call `grix_access_control` with one `action`:
14
+
15
+ - `pair_approve` / `pair_deny` — approve or deny a pairing request. Requires the
16
+ `code` from the pairing request.
17
+ - `allow_sender` — add a sender to the allowlist. Requires `sender_id`.
18
+ - `remove_sender` — remove a sender. Requires `sender_id`.
19
+ - `set_policy` — set the access policy. Requires `policy`, one of:
20
+ - `allowlist` — only allowlisted senders may message
21
+ - `open` — anyone may message
22
+ - `disabled` — access control off
23
+
24
+ ## Rules
25
+
26
+ 1. Pick exactly one `action` and supply only the field it needs (`code` for
27
+ pairing, `sender_id` for allow/remove, `policy` for set_policy).
28
+ 2. These actions change who can reach the agent — confirm with the user before
29
+ approving an unknown pairing code or switching the policy to `open`.
30
+ 3. On failure, report the exact reason (e.g. expired/invalid code) instead of
31
+ retrying with a guessed value.
@@ -1,35 +1,35 @@
1
- ---
2
- name: grix-admin
3
- description: Use the typed `grix_admin` tool to manage agents and categories on the Grix platform — create agents, list/create/update categories, assign an agent to a category, and rotate an agent's API key. Trigger when the user asks to create a new agent, organize agents into categories, or rotate an agent key.
4
- trigger: 当用户要在 Grix 平台创建 Agent、管理分类、给 Agent 分配分类、或轮换 Agent 的 API key 时
5
- ---
6
-
7
- # Grix Admin
8
-
9
- Use the `grix_admin` tool for agent and category management on the Grix
10
- platform. This skill covers only platform-side management — it does not touch
11
- any local connector configuration or binding.
12
-
13
- ## Tool contract
14
-
15
- Call `grix_admin` with one `action`:
16
-
17
- - `create_agent` — create an agent. Requires `agentName`; optional
18
- `introduction`, `isMain`, `categoryId`.
19
- - `list_categories` — list all categories. No extra fields.
20
- - `create_category` — requires `name`; optional `parentId`, `sortOrder`.
21
- - `update_category` — requires `categoryId`; optional `name`, `parentId`,
22
- `sortOrder`.
23
- - `assign_category` — assign an agent to a category. Requires `agentId` and
24
- `categoryId`.
25
- - `rotate_api_key` — rotate an agent's API key. Requires `agentId`.
26
-
27
- ## Rules
28
-
29
- 1. Pick exactly one `action` per call and supply only the fields that action
30
- needs.
31
- 2. For `assign_category` / `rotate_api_key` you need the target `agentId`; for
32
- category edits you need the `categoryId`. Resolve unknown IDs first
33
- (`list_categories`, or `grix_query` for agents) rather than guessing.
34
- 3. `rotate_api_key` invalidates the old key. Confirm the target agent with the
35
- user before rotating, and report the new key handling per platform policy.
1
+ ---
2
+ name: grix-admin
3
+ description: Use the typed `grix_admin` tool to manage agents and categories on the Grix platform — create agents, list/create/update categories, assign an agent to a category, and rotate an agent's API key. Trigger when the user asks to create a new agent, organize agents into categories, or rotate an agent key.
4
+ trigger: 当用户要在 Grix 平台创建 Agent、管理分类、给 Agent 分配分类、或轮换 Agent 的 API key 时
5
+ ---
6
+
7
+ # Grix Admin
8
+
9
+ Use the `grix_admin` tool for agent and category management on the Grix
10
+ platform. This skill covers only platform-side management — it does not touch
11
+ any local connector configuration or binding.
12
+
13
+ ## Tool contract
14
+
15
+ Call `grix_admin` with one `action`:
16
+
17
+ - `create_agent` — create an agent. Requires `agentName`; optional
18
+ `introduction`, `isMain`, `categoryId`.
19
+ - `list_categories` — list all categories. No extra fields.
20
+ - `create_category` — requires `name`; optional `parentId`, `sortOrder`.
21
+ - `update_category` — requires `categoryId`; optional `name`, `parentId`,
22
+ `sortOrder`.
23
+ - `assign_category` — assign an agent to a category. Requires `agentId` and
24
+ `categoryId`.
25
+ - `rotate_api_key` — rotate an agent's API key. Requires `agentId`.
26
+
27
+ ## Rules
28
+
29
+ 1. Pick exactly one `action` per call and supply only the fields that action
30
+ needs.
31
+ 2. For `assign_category` / `rotate_api_key` you need the target `agentId`; for
32
+ category edits you need the `categoryId`. Resolve unknown IDs first
33
+ (`list_categories`, or `grix_query` for agents) rather than guessing.
34
+ 3. `rotate_api_key` invalidates the old key. Confirm the target agent with the
35
+ user before rotating, and report the new key handling per platform policy.
@@ -1,89 +1,89 @@
1
- ---
2
- name: grix-agent-dispatch
3
- description: Dispatch one of the owner's other agents to do work in a given directory (`grix_dispatch_agent`), and update an agent's text introduction (`grix_agent_update`). Trigger when the user asks to hand a task to another agent, run work in a specific directory via a sibling agent, or change an agent's introduction.
4
- trigger: 当用户要把任务派发给 owner 名下的另一个 Agent、让某个 Agent 在指定目录干活、或修改某个 Agent 的简介时
5
- ---
6
-
7
- # Grix Agent Dispatch
8
-
9
- Manage and delegate to the owner's other agents.
10
-
11
- ## Dispatch a task — `grix_dispatch_agent`
12
-
13
- Hand work to another of the owner's agents. The backend opens (or reuses) a
14
- private session between the owner and that agent, binds the working directory
15
- when the agent type requires it (claude/codex/etc.), and sends the task in **as
16
- the owner** so the agent starts working.
17
-
18
- - `agent_id` (required) — target agent's numeric ID, as a string.
19
- - `cwd` (required) — absolute working directory for the task.
20
- - `task` (required) — what to do, **written in the owner's first-person voice
21
- and tone**. The task is delivered into the session as the owner, so the target
22
- agent sees it as the owner speaking directly to it. Phrase it the way the owner
23
- would talk to the agent (e.g. "帮我把…改好", "你去 X 目录跑一下测试"), not as a
24
- third-person relay ("请帮 owner 完成…") and not as yourself narrating on the
25
- owner's behalf.
26
-
27
- ## After dispatching — monitor and report back (don't fire-and-forget)
28
-
29
- Dispatching is only step one. After `grix_dispatch_agent` succeeds, **do not end
30
- your turn there**. Stay and watch the dispatched session until it reaches a
31
- terminal state, then report the actual result back to the user.
32
-
33
- 1. **Capture the session.** Take the target session id from the dispatch result.
34
- If it isn't clearly present, list sessions with `grix_chat_state_query` (each
35
- entry carries its `task_title`) and match the one you just created.
36
-
37
- 2. **Poll the state.** Call `grix_chat_state_query` with that `session_id` on a
38
- calm cadence — wait ~15–30s between polls, never spin in a tight loop. Each
39
- entry has one mutually-exclusive `state`; act on it:
40
- - `running` — still working. Keep polling.
41
- - `completed` — done. Go to step 3.
42
- - `failed` — errored. Fetch recent messages (step 3) to capture the error,
43
- then report the failure.
44
- - `waiting_approval` / `waiting_question` — the agent is blocked on the owner
45
- (approve/deny, or answer a question) and will **not** progress on its own.
46
- Fetch the latest message to see what it's asking, surface that to the user,
47
- and stop polling — the user has to act.
48
- - `idle` — no active task / stopped. If it never hit `completed`, fetch recent
49
- messages to see what happened, then report.
50
-
51
- 3. **Read the answer.** Once the state is terminal, pull the agent's final reply
52
- with `grix_query` (`action: "message_history"`, `sessionId: <session>`). Read
53
- the latest agent message(s) and summarize the outcome — don't dump raw logs.
54
-
55
- 4. **Reply the result.** Send the conclusion back to the user: what the
56
- dispatched agent did and how it turned out.
57
-
58
- ### Long-running tasks
59
- - If `running` persists past a few minutes (≈3 min), send a short interim
60
- progress note to the user so they know it's still working, then keep polling.
61
- Repeat at sensible intervals so the user is never left in the dark.
62
- - A single turn can't run forever. If the task is still `running` when you've
63
- watched for a long stretch (≈20 min) and must wrap up, do **not** promise to
64
- notify the user later — you cannot send anything after the turn ends. Report
65
- the current state plainly and tell them how to re-check (ping you again to
66
- resume monitoring; the dispatched session keeps running on its own).
67
-
68
- ## Update an introduction — `grix_agent_update`
69
-
70
- Change the text introduction of one of the owner's agents.
71
-
72
- - `agent_id` (required) — target agent's numeric ID, as a string.
73
- - `introduction` (required) — new introduction text (max 300 chars).
74
-
75
- ## Rules
76
-
77
- 1. You need the exact numeric `agent_id`. Resolve it with `grix_query` first if
78
- you only have a name; never guess an ID.
79
- 2. `cwd` must be an absolute path the target agent can access.
80
- 3. Dispatch runs the task as the owner in a separate session — confirm the
81
- target agent and directory with the user when the task is consequential.
82
- 4. The `task` is delivered AS THE OWNER, so always write it in the owner's
83
- first-person voice and tone — never as a third-person relay and never in your
84
- own narrating voice.
85
- 5. Dispatch is **not** fire-and-forget. After dispatching, monitor the session
86
- state (`grix_chat_state_query`), read the final answer when it completes
87
- (`grix_query` message_history), and report the result. Never promise a future
88
- notification you cannot send — if you must stop while it's still running, say
89
- so plainly and give the user a way to re-check.
1
+ ---
2
+ name: grix-agent-dispatch
3
+ description: Dispatch one of the owner's other agents to do work in a given directory (`grix_dispatch_agent`), and update an agent's text introduction (`grix_agent_update`). Trigger when the user asks to hand a task to another agent, run work in a specific directory via a sibling agent, or change an agent's introduction.
4
+ trigger: 当用户要把任务派发给 owner 名下的另一个 Agent、让某个 Agent 在指定目录干活、或修改某个 Agent 的简介时
5
+ ---
6
+
7
+ # Grix Agent Dispatch
8
+
9
+ Manage and delegate to the owner's other agents.
10
+
11
+ ## Dispatch a task — `grix_dispatch_agent`
12
+
13
+ Hand work to another of the owner's agents. The backend opens (or reuses) a
14
+ private session between the owner and that agent, binds the working directory
15
+ when the agent type requires it (claude/codex/etc.), and sends the task in **as
16
+ the owner** so the agent starts working.
17
+
18
+ - `agent_id` (required) — target agent's numeric ID, as a string.
19
+ - `cwd` (required) — absolute working directory for the task.
20
+ - `task` (required) — what to do, **written in the owner's first-person voice
21
+ and tone**. The task is delivered into the session as the owner, so the target
22
+ agent sees it as the owner speaking directly to it. Phrase it the way the owner
23
+ would talk to the agent (e.g. "帮我把…改好", "你去 X 目录跑一下测试"), not as a
24
+ third-person relay ("请帮 owner 完成…") and not as yourself narrating on the
25
+ owner's behalf.
26
+
27
+ ## After dispatching — monitor and report back (don't fire-and-forget)
28
+
29
+ Dispatching is only step one. After `grix_dispatch_agent` succeeds, **do not end
30
+ your turn there**. Stay and watch the dispatched session until it reaches a
31
+ terminal state, then report the actual result back to the user.
32
+
33
+ 1. **Capture the session.** Take the target session id from the dispatch result.
34
+ If it isn't clearly present, list sessions with `grix_chat_state_query` (each
35
+ entry carries its `task_title`) and match the one you just created.
36
+
37
+ 2. **Poll the state.** Call `grix_chat_state_query` with that `session_id` on a
38
+ calm cadence — wait ~15–30s between polls, never spin in a tight loop. Each
39
+ entry has one mutually-exclusive `state`; act on it:
40
+ - `running` — still working. Keep polling.
41
+ - `completed` — done. Go to step 3.
42
+ - `failed` — errored. Fetch recent messages (step 3) to capture the error,
43
+ then report the failure.
44
+ - `waiting_approval` / `waiting_question` — the agent is blocked on the owner
45
+ (approve/deny, or answer a question) and will **not** progress on its own.
46
+ Fetch the latest message to see what it's asking, surface that to the user,
47
+ and stop polling — the user has to act.
48
+ - `idle` — no active task / stopped. If it never hit `completed`, fetch recent
49
+ messages to see what happened, then report.
50
+
51
+ 3. **Read the answer.** Once the state is terminal, pull the agent's final reply
52
+ with `grix_query` (`action: "message_history"`, `sessionId: <session>`). Read
53
+ the latest agent message(s) and summarize the outcome — don't dump raw logs.
54
+
55
+ 4. **Reply the result.** Send the conclusion back to the user: what the
56
+ dispatched agent did and how it turned out.
57
+
58
+ ### Long-running tasks
59
+ - If `running` persists past a few minutes (≈3 min), send a short interim
60
+ progress note to the user so they know it's still working, then keep polling.
61
+ Repeat at sensible intervals so the user is never left in the dark.
62
+ - A single turn can't run forever. If the task is still `running` when you've
63
+ watched for a long stretch (≈20 min) and must wrap up, do **not** promise to
64
+ notify the user later — you cannot send anything after the turn ends. Report
65
+ the current state plainly and tell them how to re-check (ping you again to
66
+ resume monitoring; the dispatched session keeps running on its own).
67
+
68
+ ## Update an introduction — `grix_agent_update`
69
+
70
+ Change the text introduction of one of the owner's agents.
71
+
72
+ - `agent_id` (required) — target agent's numeric ID, as a string.
73
+ - `introduction` (required) — new introduction text (max 300 chars).
74
+
75
+ ## Rules
76
+
77
+ 1. You need the exact numeric `agent_id`. Resolve it with `grix_query` first if
78
+ you only have a name; never guess an ID.
79
+ 2. `cwd` must be an absolute path the target agent can access.
80
+ 3. Dispatch runs the task as the owner in a separate session — confirm the
81
+ target agent and directory with the user when the task is consequential.
82
+ 4. The `task` is delivered AS THE OWNER, so always write it in the owner's
83
+ first-person voice and tone — never as a third-person relay and never in your
84
+ own narrating voice.
85
+ 5. Dispatch is **not** fire-and-forget. After dispatching, monitor the session
86
+ state (`grix_chat_state_query`), read the final answer when it completes
87
+ (`grix_query` message_history), and report the result. Never promise a future
88
+ notification you cannot send — if you must stop while it's still running, say
89
+ so plainly and give the user a way to re-check.
@@ -1,56 +1,56 @@
1
- ---
2
- name: grix-chat-state
3
- description: Observe chat state — query the task state of all the owner's chats (`grix_chat_state_query`), and check the current MCP connection status (`grix_status`). Trigger when the user asks which chats are running/done/waiting, or to verify the Grix connection is healthy.
4
- trigger: 当用户问哪些聊天任务在跑/已完成/在等待审批,或要确认 Grix 连接是否正常时
5
- ---
6
-
7
- # Grix Chat State & Status
8
-
9
- Read-only observation of chat task state and connection state.
10
-
11
- ## Chat task states — `grix_chat_state_query`
12
-
13
- Query the task state across all the owner's chats (direct and group sessions).
14
- Supports pagination and optional state filtering.
15
-
16
- Parameters:
17
- - `session_id` — query a single session; omit to return all sessions
18
- - `page` — page number, default 1
19
- - `page_size` — items per page, default 10, max 100
20
- - `state` — filter by state; omit to return all
21
-
22
- Returns one entry per session with a single mutually-exclusive state:
23
-
24
- - `running` — working
25
- - `waiting_approval` — blocked on the owner to approve/deny
26
- - `waiting_question` — asked the owner a question, awaiting reply
27
- - `completed` / `failed` — finished
28
- - `idle` — no task / stopped
29
-
30
- Also returns `task_title` for easy identification of each chat.
31
-
32
- Use it to see at a glance which chats are done, still running, or waiting on the
33
- owner.
34
-
35
- ## Connection status — `grix_status`
36
-
37
- Query the Grix connection status of the current MCP session. Takes no
38
- parameters. Use it to confirm the agent is connected before relying on other
39
- grix tools.
40
-
41
- ## Manually update a chat state — `grix_chat_state_update`
42
-
43
- Override the task state of a specific chat session. Useful when you need to
44
- mark a chat as done, failed, or idle outside of a normal task lifecycle.
45
-
46
- Parameters:
47
- - `session_id` — **(required)** the session to update
48
- - `state` — **(required)** one of: `running`, `waiting_approval`, `waiting_question`, `completed`, `failed`, `idle`
49
- - `reason` — **(optional)** reason for the change, written to `stop_reason`
50
-
51
- ## Rules
52
-
53
- 1. `grix_chat_state_query` is read-only — safe to call any time to orient yourself.
54
- 2. `grix_chat_state_update` only updates existing records; it will error if the session has no prior state entry.
55
- 3. `grix_chat_state_query` reports per-session state, not per-message; pair it with
56
- `grix_query` (`message_history`) when you need the actual content.
1
+ ---
2
+ name: grix-chat-state
3
+ description: Observe chat state — query the task state of all the owner's chats (`grix_chat_state_query`), and check the current MCP connection status (`grix_status`). Trigger when the user asks which chats are running/done/waiting, or to verify the Grix connection is healthy.
4
+ trigger: 当用户问哪些聊天任务在跑/已完成/在等待审批,或要确认 Grix 连接是否正常时
5
+ ---
6
+
7
+ # Grix Chat State & Status
8
+
9
+ Read-only observation of chat task state and connection state.
10
+
11
+ ## Chat task states — `grix_chat_state_query`
12
+
13
+ Query the task state across all the owner's chats (direct and group sessions).
14
+ Supports pagination and optional state filtering.
15
+
16
+ Parameters:
17
+ - `session_id` — query a single session; omit to return all sessions
18
+ - `page` — page number, default 1
19
+ - `page_size` — items per page, default 10, max 100
20
+ - `state` — filter by state; omit to return all
21
+
22
+ Returns one entry per session with a single mutually-exclusive state:
23
+
24
+ - `running` — working
25
+ - `waiting_approval` — blocked on the owner to approve/deny
26
+ - `waiting_question` — asked the owner a question, awaiting reply
27
+ - `completed` / `failed` — finished
28
+ - `idle` — no task / stopped
29
+
30
+ Also returns `task_title` for easy identification of each chat.
31
+
32
+ Use it to see at a glance which chats are done, still running, or waiting on the
33
+ owner.
34
+
35
+ ## Connection status — `grix_status`
36
+
37
+ Query the Grix connection status of the current MCP session. Takes no
38
+ parameters. Use it to confirm the agent is connected before relying on other
39
+ grix tools.
40
+
41
+ ## Manually update a chat state — `grix_chat_state_update`
42
+
43
+ Override the task state of a specific chat session. Useful when you need to
44
+ mark a chat as done, failed, or idle outside of a normal task lifecycle.
45
+
46
+ Parameters:
47
+ - `session_id` — **(required)** the session to update
48
+ - `state` — **(required)** one of: `running`, `waiting_approval`, `waiting_question`, `completed`, `failed`, `idle`
49
+ - `reason` — **(optional)** reason for the change, written to `stop_reason`
50
+
51
+ ## Rules
52
+
53
+ 1. `grix_chat_state_query` is read-only — safe to call any time to orient yourself.
54
+ 2. `grix_chat_state_update` only updates existing records; it will error if the session has no prior state entry.
55
+ 3. `grix_chat_state_query` reports per-session state, not per-message; pair it with
56
+ `grix_query` (`message_history`) when you need the actual content.
@@ -1,90 +1,90 @@
1
- ---
2
- name: grix-egg
3
- description: Install a Grix egg skill package into your own skill directory. Use when you receive an instruction containing a line like "技能包: <URL>" and are asked to install / incubate it as a skill for yourself.
4
- trigger: 当收到含「技能包: <URL>」的安装指令、要求把虾蛋技能包装进自己的技能目录时
5
- ---
6
-
7
- # Grix Egg — 技能包自装
8
-
9
- 虾蛋(egg)孵化对你这类 agent 来说就是一件事:**把一个技能包装进你自己的技能目录**,让你之后能用上它。
10
-
11
- 当你收到一条带有 `技能包: <URL>` 的安装指令时,就用本技能完成安装、自检,再回发一张安装状态卡片。整件事由你自己在本机完成——没有别的 agent 会替你装,主 agent 也碰不到你的技能目录。
12
-
13
- ## 指令里会给你什么
14
-
15
- - `技能包: <URL>` —— 要安装的技能包下载地址(必有)。
16
- - `install_id: <ID>` —— 这次安装的编号,回发状态卡片时要原样带上(必有)。
17
- - `grix agent id: <ID>` —— 你自己的 grix agent id,回发状态卡片时作为 `target_agent_id`(可能有)。
18
-
19
- ## 你要做的事
20
-
21
- 1. 取出 `技能包:` 后面的下载 URL。
22
- 2. 确定你自己的技能目录:就是**本 grix-egg 技能所在目录的上一级**。例如本技能在 `~/.codex/skills/grix-egg/`,技能目录就是 `~/.codex/skills/`;在 `~/.claude/skills/grix-egg/` 则是 `~/.claude/skills/`,以此类推。
23
- 3. 下载技能包、解压。
24
- 4. 把解压出来的每个技能(含 `SKILL.md` 的目录)整目录拷进你的技能目录。
25
- 5. 确认技能目录里已经出现新技能的 `SKILL.md`。
26
- 6. **回发安装状态卡片**(见下),让平台把这次安装收口成成功/失败。
27
- 7. 再用一句自然语言告诉用户:装好了哪个/哪些技能。
28
-
29
- ## 第 2~5 步:安装(用 shell 执行)
30
-
31
- 把两处尖括号替换成真实值后执行。`SKILLS_DIR` 取本技能所在目录的上一级。
32
-
33
- ```bash
34
- set -e
35
- URL="<技能包 URL>"
36
- SKILLS_DIR="<你的技能目录绝对路径>"
37
-
38
- TMP="$(mktemp -d)"
39
- curl -fsSL "$URL" -o "$TMP/skill.zip"
40
- mkdir -p "$TMP/unpacked"
41
- unzip -o -q "$TMP/skill.zip" -d "$TMP/unpacked"
42
-
43
- # 把每个含 SKILL.md 的技能目录整目录拷进技能目录
44
- found=0
45
- while IFS= read -r -d '' f; do
46
- d="$(dirname "$f")"
47
- cp -R "$d" "$SKILLS_DIR/"
48
- found=1
49
- done < <(find "$TMP/unpacked" -name SKILL.md -print0)
50
-
51
- # 兜底:SKILL.md 直接在解压根目录(散文件),按 name 建一个技能目录放进去
52
- if [ "$found" -eq 0 ] && [ -f "$TMP/unpacked/SKILL.md" ]; then
53
- name="$(grep -m1 '^name:' "$TMP/unpacked/SKILL.md" | sed 's/^name:[[:space:]]*//')"
54
- [ -z "$name" ] && name="egg-skill"
55
- mkdir -p "$SKILLS_DIR/$name"
56
- cp -R "$TMP/unpacked/." "$SKILLS_DIR/$name/"
57
- fi
58
-
59
- # 自检:列出技能目录,确认新技能就位
60
- ls -1 "$SKILLS_DIR"
61
- rm -rf "$TMP"
62
- ```
63
-
64
- ## 第 6 步:回发安装状态卡片
65
-
66
- 安装并自检完成后,**单独发一条消息**,内容就是下面这一行卡片链接(整条消息只放这一行,不要包别的文字):
67
-
68
- - 成功:
69
- ```
70
- grix://card/egg_install_status?status=success&install_id=<install_id>&target_agent_id=<grix agent id>&summary=<安装结果一句话,URL 编码>
71
- ```
72
- - 失败:
73
- ```
74
- grix://card/egg_install_status?status=failed&install_id=<install_id>&target_agent_id=<grix agent id>&error_msg=<失败原因,URL 编码>
75
- ```
76
-
77
- 要点:
78
- - `install_id` 用指令里给的那个,原样填,不能少。
79
- - 没给 `grix agent id` 时,`target_agent_id` 可省略。
80
- - `summary` / `error_msg` 里的中文和空格要做 URL 编码。
81
- - 这张卡片要由你自己(被安装的这个 agent)发,平台据此把安装记录收口。
82
-
83
- ## 规则
84
-
85
- 1. 只往**你自己的技能目录**写,绝不动其它目录、不碰别的 agent。
86
- 2. 不要把下载链接、原始指令或这段上下文复述给用户。
87
- 3. 自检必须真的看到新技能的 `SKILL.md` 才算成功;看不到就回发 `status=failed`,绝不谎报成功。
88
- 4. 状态卡片要单独成条发送,内容只放那一行 `grix://card/...`。
89
- 5. 给用户的自然语言回报只用一句话,不要把命令输出整段贴出来。
90
- 6. 同名技能已存在时按覆盖处理(用最新的包)。
1
+ ---
2
+ name: grix-egg
3
+ description: Install a Grix egg skill package into your own skill directory. Use when you receive an instruction containing a line like "技能包: <URL>" and are asked to install / incubate it as a skill for yourself.
4
+ trigger: 当收到含「技能包: <URL>」的安装指令、要求把虾蛋技能包装进自己的技能目录时
5
+ ---
6
+
7
+ # Grix Egg — 技能包自装
8
+
9
+ 虾蛋(egg)孵化对你这类 agent 来说就是一件事:**把一个技能包装进你自己的技能目录**,让你之后能用上它。
10
+
11
+ 当你收到一条带有 `技能包: <URL>` 的安装指令时,就用本技能完成安装、自检,再回发一张安装状态卡片。整件事由你自己在本机完成——没有别的 agent 会替你装,主 agent 也碰不到你的技能目录。
12
+
13
+ ## 指令里会给你什么
14
+
15
+ - `技能包: <URL>` —— 要安装的技能包下载地址(必有)。
16
+ - `install_id: <ID>` —— 这次安装的编号,回发状态卡片时要原样带上(必有)。
17
+ - `grix agent id: <ID>` —— 你自己的 grix agent id,回发状态卡片时作为 `target_agent_id`(可能有)。
18
+
19
+ ## 你要做的事
20
+
21
+ 1. 取出 `技能包:` 后面的下载 URL。
22
+ 2. 确定你自己的技能目录:就是**本 grix-egg 技能所在目录的上一级**。例如本技能在 `~/.codex/skills/grix-egg/`,技能目录就是 `~/.codex/skills/`;在 `~/.claude/skills/grix-egg/` 则是 `~/.claude/skills/`,以此类推。
23
+ 3. 下载技能包、解压。
24
+ 4. 把解压出来的每个技能(含 `SKILL.md` 的目录)整目录拷进你的技能目录。
25
+ 5. 确认技能目录里已经出现新技能的 `SKILL.md`。
26
+ 6. **回发安装状态卡片**(见下),让平台把这次安装收口成成功/失败。
27
+ 7. 再用一句自然语言告诉用户:装好了哪个/哪些技能。
28
+
29
+ ## 第 2~5 步:安装(用 shell 执行)
30
+
31
+ 把两处尖括号替换成真实值后执行。`SKILLS_DIR` 取本技能所在目录的上一级。
32
+
33
+ ```bash
34
+ set -e
35
+ URL="<技能包 URL>"
36
+ SKILLS_DIR="<你的技能目录绝对路径>"
37
+
38
+ TMP="$(mktemp -d)"
39
+ curl -fsSL "$URL" -o "$TMP/skill.zip"
40
+ mkdir -p "$TMP/unpacked"
41
+ unzip -o -q "$TMP/skill.zip" -d "$TMP/unpacked"
42
+
43
+ # 把每个含 SKILL.md 的技能目录整目录拷进技能目录
44
+ found=0
45
+ while IFS= read -r -d '' f; do
46
+ d="$(dirname "$f")"
47
+ cp -R "$d" "$SKILLS_DIR/"
48
+ found=1
49
+ done < <(find "$TMP/unpacked" -name SKILL.md -print0)
50
+
51
+ # 兜底:SKILL.md 直接在解压根目录(散文件),按 name 建一个技能目录放进去
52
+ if [ "$found" -eq 0 ] && [ -f "$TMP/unpacked/SKILL.md" ]; then
53
+ name="$(grep -m1 '^name:' "$TMP/unpacked/SKILL.md" | sed 's/^name:[[:space:]]*//')"
54
+ [ -z "$name" ] && name="egg-skill"
55
+ mkdir -p "$SKILLS_DIR/$name"
56
+ cp -R "$TMP/unpacked/." "$SKILLS_DIR/$name/"
57
+ fi
58
+
59
+ # 自检:列出技能目录,确认新技能就位
60
+ ls -1 "$SKILLS_DIR"
61
+ rm -rf "$TMP"
62
+ ```
63
+
64
+ ## 第 6 步:回发安装状态卡片
65
+
66
+ 安装并自检完成后,**单独发一条消息**,内容就是下面这一行卡片链接(整条消息只放这一行,不要包别的文字):
67
+
68
+ - 成功:
69
+ ```
70
+ grix://card/egg_install_status?status=success&install_id=<install_id>&target_agent_id=<grix agent id>&summary=<安装结果一句话,URL 编码>
71
+ ```
72
+ - 失败:
73
+ ```
74
+ grix://card/egg_install_status?status=failed&install_id=<install_id>&target_agent_id=<grix agent id>&error_msg=<失败原因,URL 编码>
75
+ ```
76
+
77
+ 要点:
78
+ - `install_id` 用指令里给的那个,原样填,不能少。
79
+ - 没给 `grix agent id` 时,`target_agent_id` 可省略。
80
+ - `summary` / `error_msg` 里的中文和空格要做 URL 编码。
81
+ - 这张卡片要由你自己(被安装的这个 agent)发,平台据此把安装记录收口。
82
+
83
+ ## 规则
84
+
85
+ 1. 只往**你自己的技能目录**写,绝不动其它目录、不碰别的 agent。
86
+ 2. 不要把下载链接、原始指令或这段上下文复述给用户。
87
+ 3. 自检必须真的看到新技能的 `SKILL.md` 才算成功;看不到就回发 `status=failed`,绝不谎报成功。
88
+ 4. 状态卡片要单独成条发送,内容只放那一行 `grix://card/...`。
89
+ 5. 给用户的自然语言回报只用一句话,不要把命令输出整段贴出来。
90
+ 6. 同名技能已存在时按覆盖处理(用最新的包)。