mit einem Klick
cluster
与集群中的其他节点进行 RPC 通信,实现分布式协作和能力发现
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
与集群中的其他节点进行 RPC 通信,实现分布式协作和能力发现
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Basierend auf der SOC-Berufsklassifikation
| name | cluster |
| description | 与集群中的其他节点进行 RPC 通信,实现分布式协作和能力发现 |
| homepage | https://github.com/276793422/NemesisBot |
| metadata | {"nanobot":{"emoji":"🌐","requires":{"bins":["curl"]}}} |
本技能允许你与集群中的其他 NemesisBot 节点进行 RPC 通信,实现:
RPC 是一种远程过程调用协议,允许你:
Actions 是节点提供的功能接口,每个 action:
使用 get_info action 查询集群中的所有节点:
{
"tool": "cluster_rpc",
"parameters": {
"peer_id": "any-online-node",
"action": "get_info"
}
}
返回示例:
{
"node_id": "node-abc123",
"peers": [
{
"id": "node-def456",
"name": "Worker Bot 1",
"capabilities": ["llm", "tools", "web_fetch"],
"status": "online"
},
{
"id": "node-ghi789",
"name": "Worker Bot 2",
"capabilities": ["llm", "memory"],
"status": "online"
}
]
}
使用 list_actions action 查询节点支持的所有功能:
{
"tool": "cluster_rpc",
"parameters": {
"peer_id": "node-def456",
"action": "list_actions"
}
}
返回示例:
{
"actions": [
{
"name": "ping",
"description": "健康检查,测试节点是否在线",
"parameters": null,
"examples": [
{
"request": {"action": "ping", "payload": null},
"response": {"status": "ok", "node_id": "node-abc123"}
}
]
},
{
"name": "llm_forward",
"description": "转发 LLM 请求到当前节点",
"parameters": {
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "模型名称"
},
"messages": {
"type": "array",
"description": "对话消息列表"
}
},
"required": ["model", "messages"]
}
}
]
}
检查节点是否在线:
{
"tool": "cluster_rpc",
"parameters": {
"peer_id": "node-def456",
"action": "ping"
}
}
使用场景:
了解节点支持的功能:
{
"tool": "cluster_rpc",
"parameters": {
"peer_id": "node-def456",
"action": "get_capabilities"
}
}
返回示例:
{
"capabilities": ["llm", "tools", "memory", "web_fetch"]
}
与对等节点进行智能对话、任务协作或信息交流:
{
"tool": "cluster_rpc",
"parameters": {
"peer_id": "node-ghi789",
"action": "peer_chat",
"data": {
"type": "task",
"content": "帮我分析这段文本的情感倾向"
}
}
}
使用场景:
对话类型:
chat - 纯聊天交流request - 请求帮助task - 任务协作query - 查询信息示例:
// 请求帮助写诗
{
"peer_id": "node-ghi789",
"action": "peer_chat",
"data": {
"type": "task",
"content": "帮我写一首关于春天的诗"
}
}
// 简单聊天
{
"peer_id": "node-ghi789",
"action": "peer_chat",
"data": {
"type": "chat",
"content": "你好,最近忙什么呢?"
}
}
get_info 获取在线节点列表list_actions 了解节点能力ping 验证节点状态用户: 使用 node-ghi789 节点帮我写一首诗
LLM: 好的,让我先查询节点信息。
[调用 get_info]
→ 发现 node-ghi789 在线
[调用 list_actions on node-ghi789]
→ 确认支持 peer_chat
[调用 peer_chat on node-ghi789]
→ 成功生成诗歌
LLM: 诗歌已生成完成!
问题: 调用离线节点会失败
解决方案:
ping 检查节点状态问题: 参数格式错误会导致调用失败
解决方案:
list_actions 查看参数格式问题: 远程调用可能超时
解决方案:
常见错误:
peer not found: 节点 ID 错误或节点离线no handler for action: 节点不支持该 actiontimeout: 请求超时处理方式:
{
"error": "peer not found: node-xyz",
"suggestion": "使用 get_info 查看可用节点"
}
// 1. 获取所有在线节点
let nodes = cluster_rpc(peer_id: "any", action: "get_info")
// 2. 为每个节点获取功能列表
for (let node of nodes.peers) {
let actions = cluster_rpc(
peer_id: node.id,
action: "list_actions"
)
// 存储节点功能信息
cache[node.id] = actions.actions
}
// 3. 根据能力选择合适的节点
let targetNode = findNodeWithCapability("llm")
根据节点能力选择合适的服务:
| 能力 | 用途 | 推荐节点 |
|---|---|---|
llm | 文本生成 | 高性能节点 |
tools | 工具调用 | 全功能节点 |
memory | 记忆存储 | 大存储节点 |
web_fetch | 网络抓取 | 有网络节点 |
{status: "ok", node_id: "..."}{capabilities: ["..."]}{node_id: "...", peers: [...]}{actions: [{name, description, parameters, returns, examples}]}{type: chat|request|task|query, content: string, context?: object}{response: string, result?: object, status: success|error|busy}{from?: string, timestamp?: string}{greeting, timestamp, node_id, status}✓ 先检查节点在线
✓ 再查询节点功能
✓ 然后执行具体操作
用户: 帮我写一篇关于 AI 的文章
LLM: 我发现有 3 个节点可以协作:
- node-1, node-2, node-3
[检查节点负载]
→ node-2 最空闲
[调用 peer_chat on node-2]
{
"type": "task",
"content": "帮我写一篇关于 AI 的文章"
}
→ 成功生成文章
用户: 让 node-xyz 帮我分析这段数据
LLM: 好的,让我先和 node-xyz 对话。
[调用 peer_chat on node-xyz]
{
"type": "request",
"content": "请帮我分析以下数据...",
"context": {"data": [...]}
}
node-xyz: 收到!我这就为你分析...
→ 分析完成
docs/cluster/module/cluster/rpc/module/cluster/handlers/集群成员通信时,需要严格遵守如下守则。此守则非常重要。
最后更新: 2026-03-06 版本: 1.2 (更新: 成员守则)
Scanner 杀毒引擎端到端自动化测试。验证 ClamAV 从配置、下载、安装、启动、扫描到拦截的完整生命周期。
This skill should be used when the user asks to "analyze crash dump", "analyze dump files", "analyze .dmp", "check crash dumps", "debug crash", "analyze crash", "cdb analyze", "windbg analyze", or mentions dump analysis, crash analysis, or debugging crash dumps (.dmp files).
This skill should be used when the user asks to "run WSL commands", "execute Linux on Windows", "manage WSL processes", "check WSL status", "transfer files between Windows and WSL", or mentions WSL-related operations like "wsl", "ubuntu", "debian in WSL", "compile in WSL", "wsl bash", "wsl script".
A simple test skill that performs basic math calculations and string operations. Use this skill when you need to demonstrate that skills are being loaded and executed correctly.
定义 NemesisBot 项目的构建流程,包括环境准备、版本信息收集、编译构建、结果验证等步骤。所有构建工作必须严格按照此流程执行。
定义完整的结构化开发流程,包括预研、计划、开发、测试、复查、报告等阶段。所有开发工作必须严格按照此流程执行。