grix-connector 3.1.13 → 3.1.14
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/README.md +241 -241
- package/dist/default-skills/grix-access-control/SKILL.md +31 -31
- package/dist/default-skills/grix-admin/SKILL.md +35 -35
- package/dist/default-skills/grix-agent-dispatch/SKILL.md +89 -89
- package/dist/default-skills/grix-chat-state/SKILL.md +56 -56
- package/dist/default-skills/grix-egg/SKILL.md +90 -90
- package/dist/default-skills/grix-group/SKILL.md +35 -35
- package/dist/default-skills/grix-owner-relay/SKILL.md +66 -66
- package/dist/default-skills/grix-query/SKILL.md +38 -38
- package/dist/default-skills/message-send/SKILL.md +36 -36
- package/dist/default-skills/message-unsend/SKILL.md +27 -27
- package/dist/default-skills/tailnet-file-share/SKILL.md +65 -65
- package/dist/grix.js +0 -0
- package/dist/service/platform-adapter.js +59 -16
- package/openclaw-plugin/skills/grix-admin/SKILL.md +202 -202
- package/openclaw-plugin/skills/grix-admin/references/api-contract.md +210 -210
- package/openclaw-plugin/skills/grix-egg/SKILL.md +81 -81
- package/openclaw-plugin/skills/grix-egg/references/api-contract.md +40 -40
- package/openclaw-plugin/skills/grix-group/SKILL.md +164 -164
- package/openclaw-plugin/skills/grix-group/references/api-contract.md +97 -97
- package/openclaw-plugin/skills/grix-query/SKILL.md +247 -247
- package/openclaw-plugin/skills/grix-register/SKILL.md +86 -86
- package/openclaw-plugin/skills/grix-register/references/api-contract.md +76 -76
- package/openclaw-plugin/skills/grix-register/references/grix-concepts.md +26 -26
- package/openclaw-plugin/skills/grix-register/references/handoff-contract.md +24 -24
- package/openclaw-plugin/skills/grix-register/references/openclaw-setup.md +6 -6
- package/openclaw-plugin/skills/grix-register/references/user-replies.md +25 -25
- package/openclaw-plugin/skills/grix-update/SKILL.md +310 -310
- package/openclaw-plugin/skills/grix-update/references/cron-setup.md +56 -56
- package/openclaw-plugin/skills/grix-update/references/update-contract.md +149 -149
- package/openclaw-plugin/skills/message-send/SKILL.md +197 -197
- package/openclaw-plugin/skills/message-unsend/SKILL.md +186 -186
- package/openclaw-plugin/skills/message-unsend/flowchart.mermaid +27 -27
- package/openclaw-plugin/skills/openclaw-memory-setup/SKILL.md +282 -282
- package/openclaw-plugin/skills/openclaw-memory-setup/references/case-study-macpro.md +52 -52
- package/openclaw-plugin/skills/openclaw-memory-setup/references/host-readiness.md +147 -147
- package/openclaw.plugin.json +24 -24
- package/package.json +121 -121
- package/scripts/install-guardian.mjs +27 -27
- package/scripts/install-guardian.sh +25 -25
- package/scripts/upgrade-guardian.sh +104 -104
- package/dist/adapter/claude/claude-bridge-server.js +0 -1
- package/dist/adapter/claude/claude-tools.js +0 -1
- package/dist/adapter/claude/claude-worker-client.js +0 -1
- package/dist/adapter/claude/mcp-http-launcher.js +0 -2
- package/dist/adapter/claude/result-timeout.js +0 -1
- package/dist/adapter/deepseek/deepseek-adapter.js +0 -6
- package/dist/adapter/deepseek/index.js +0 -1
- package/dist/adapter/qwen/index.js +0 -1
- package/dist/adapter/qwen/qwen-adapter.js +0 -4
- package/dist/aibot/client.js +0 -1
- package/dist/aibot/index.js +0 -1
- package/dist/aibot/types.js +0 -0
- package/dist/core/file-ops/handler.js +0 -1
- package/dist/core/file-ops/list-files.js +0 -1
- package/dist/core/file-ops/types.js +0 -0
- package/dist/default-skills/grix-task-status/SKILL.md +0 -36
- package/dist/log.js +0 -3
- package/dist/main.js +0 -31
- package/dist/mcp/stream-http/config.js +0 -1
- package/dist/mcp/stream-http/connection-binding.js +0 -1
- package/dist/mcp/stream-http/event-tool-executor.js +0 -1
- package/dist/mcp/stream-http/gateway.js +0 -1
- package/dist/mcp/stream-http/index.js +0 -1
- package/dist/mcp/stream-http/security.js +0 -1
- package/dist/mcp/stream-http/session-manager.js +0 -1
- package/dist/mcp/stream-http/tool-executor.js +0 -1
- package/dist/mcp/stream-http/tool-registry.js +0 -1
- package/dist/mcp/stream-http/tool-schemas.js +0 -1
- package/dist/session/index.js +0 -1
- package/dist/session/manager.js +0 -1
- package/dist/transport/index.js +0 -1
- package/dist/transport/json-rpc.js +0 -3
|
@@ -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. 同名技能已存在时按覆盖处理(用最新的包)。
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: grix-group
|
|
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
|
-
trigger: 当用户要创建、查看、退出、更新或解散群组,或群成员/禁言权限相关操作时
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Grix Group
|
|
8
|
-
|
|
9
|
-
Use the `grix_group` tool for Grix group lifecycle and membership management.
|
|
10
|
-
|
|
11
|
-
## Tool contract
|
|
12
|
-
|
|
13
|
-
Call `grix_group` with one `action`:
|
|
14
|
-
|
|
15
|
-
- `create` — create a group. Requires `name`; optionally seed members with
|
|
16
|
-
`memberIds` + matching `memberTypes` (1=user, 2=agent).
|
|
17
|
-
- `detail` — get group details. Requires `sessionId`.
|
|
18
|
-
- `leave` — leave the group. Requires `sessionId`.
|
|
19
|
-
- `dissolve` — dissolve the group (owner/admin only). Requires `sessionId`.
|
|
20
|
-
- `add_members` / `remove_members` — requires `sessionId`, `memberIds`, and
|
|
21
|
-
`memberTypes` aligned by index.
|
|
22
|
-
- `update_member_role` — requires `sessionId`, `memberId`, `role` (1=admin,
|
|
23
|
-
2=member).
|
|
24
|
-
- `update_all_members_muted` — requires `sessionId`, `allMembersMuted`.
|
|
25
|
-
- `update_member_speaking` — requires `sessionId`, `memberId`, `isSpeakMuted`,
|
|
26
|
-
and optionally `canSpeakWhenAllMuted`.
|
|
27
|
-
|
|
28
|
-
## Rules
|
|
29
|
-
|
|
30
|
-
1. `memberIds` and `memberTypes` are parallel arrays — keep them the same length
|
|
31
|
-
and order.
|
|
32
|
-
2. Any action except `create` needs the target group's `sessionId`; resolve it
|
|
33
|
-
with `grix_query` (`session_search`) first if unknown.
|
|
34
|
-
3. Scope or permission errors usually mean the current agent is not an admin of
|
|
35
|
-
that group — surface the exact error and required role, don't retry blindly.
|
|
1
|
+
---
|
|
2
|
+
name: grix-group
|
|
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
|
+
trigger: 当用户要创建、查看、退出、更新或解散群组,或群成员/禁言权限相关操作时
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Grix Group
|
|
8
|
+
|
|
9
|
+
Use the `grix_group` tool for Grix group lifecycle and membership management.
|
|
10
|
+
|
|
11
|
+
## Tool contract
|
|
12
|
+
|
|
13
|
+
Call `grix_group` with one `action`:
|
|
14
|
+
|
|
15
|
+
- `create` — create a group. Requires `name`; optionally seed members with
|
|
16
|
+
`memberIds` + matching `memberTypes` (1=user, 2=agent).
|
|
17
|
+
- `detail` — get group details. Requires `sessionId`.
|
|
18
|
+
- `leave` — leave the group. Requires `sessionId`.
|
|
19
|
+
- `dissolve` — dissolve the group (owner/admin only). Requires `sessionId`.
|
|
20
|
+
- `add_members` / `remove_members` — requires `sessionId`, `memberIds`, and
|
|
21
|
+
`memberTypes` aligned by index.
|
|
22
|
+
- `update_member_role` — requires `sessionId`, `memberId`, `role` (1=admin,
|
|
23
|
+
2=member).
|
|
24
|
+
- `update_all_members_muted` — requires `sessionId`, `allMembersMuted`.
|
|
25
|
+
- `update_member_speaking` — requires `sessionId`, `memberId`, `isSpeakMuted`,
|
|
26
|
+
and optionally `canSpeakWhenAllMuted`.
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
|
|
30
|
+
1. `memberIds` and `memberTypes` are parallel arrays — keep them the same length
|
|
31
|
+
and order.
|
|
32
|
+
2. Any action except `create` needs the target group's `sessionId`; resolve it
|
|
33
|
+
with `grix_query` (`session_search`) first if unknown.
|
|
34
|
+
3. Scope or permission errors usually mean the current agent is not an admin of
|
|
35
|
+
that group — surface the exact error and required role, don't retry blindly.
|