LeoYeAI/agent-master-skills / skills/agent-comm-hub
agent-comm-hub
Flagged多智能体协同通信基础设施——基于 MCP+SSE 的实时消息、任务调度、记忆共享与进化引擎。支持 WorkBuddy、Hermes、QClaw 及任意 MCP 兼容 Agent 接入。53 个 MCP 工具、4 级权限、零外部依赖 Python SDK。触发词:agent通信、智能体通信、hub通信、多智能体、跨agent通信、任务调度、assign_task、send_message、hermes通信、workbuddy通信、agent hub、通信hub、mcp通信、记忆共享、进化引擎、策略共享、经验分享、共享记忆,共同进化
src/identity.d.ts
View on GitHubexport declare const HEARTBEAT_CONFIG: {
TRUST_SCORE_INCREMENT_INTERVAL: number;
TRUST_SCORE_MAX: number;
};
export interface AgentInfo {
agent_id: string;
name: string;
role: "admin" | "member" | "group_admin";
status: "online" | "offline";
trust_score: number;
last_heartbeat: number | null;
created_at: number;
capabilities?: string[];
}
/**
* 注册新 Agent
* @returns { agentId, apiToken } 或错误信息
*/
export declare function registerAgent(inviteCode: string, name: string, capabilities?: string[]): {
success: boolean;
agentId?: string;
apiToken?: string;
role?: string;
error?: string;
};
/**
* 处理 Agent 心跳
* 连续在线心跳每 TRUST_SCORE_INCREMENT_INTERVAL 次自动增加 1 点 trust_score(上限 TRUST_SCORE_MAX)
* @returns 更新后的状态
*/
export declare function heartbeat(agentId: string): {
success: boolean;
status: "online" | "offline";
last_heartbeat: number;
trust_score?: number;
error?: string;
};
/**
* 查询已注册的 Agent 列表
*/
export declare function queryAgents(filters?: {
status?: "online" | "offline" | "all";
role?: "admin" | "member" | "group_admin";
capability?: string;
}): AgentInfo[];
/**
* 查询单个 Agent 信息
*/
export declare function getAgent(agentId: string): AgentInfo | null;
/**
* 启动心跳超时检测定时器
* - 90s 无心跳 → 标记 offline
* - 5min 无心跳 → 通知其他在线 Agent
*/
export declare function startHeartbeatMonitor(onAgentOffline?: (agentId: string) => void): void;
/**
* 停止心跳超时检测
*/
export declare function stopHeartbeatMonitor(): void;
/**
* 清除离线通知标记(Agent 重新上线时调用)
*/
export declare function clearOfflineNotification(agentId: string): void;
/**
* 获取 Agent 信任分
*/
export declare function getAgentTrustScore(agentId: string): number;
/**
* 更新 Agent 信任分(admin only)
* @returns 更新后的信任分,或 null(Agent 不存在)
*/
export declare function updateAgentTrustScore(agentId: string, delta: number, operatorId?: string): {
ok: true;
new_score: number;
} | {
ok: false;
error: string;
};
/**
* 设置 Agent 角色(admin only)
* 支持 admin / member / group_admin 三种角色
* group_admin 需要同时设置 managed_group_id
*/
export declare function setAgentRole(agentId: string, newRole: "admin" | "member" | "group_admin", operatorId: string, managedGroupId?: string): {
ok: true;
old_role: string;
new_role: string;
managed_group_id: string | null;
} | {
ok: false;
error: string;
};
/**
* 获取 Agent 角色
*/
export declare function getAgentRole(agentId: string): string | null;
/**
* 获取 Agent 的 managed_group_id
*/
export declare function getAgentManagedGroup(agentId: string): string | null;
/**
* 获取心跳超时配置(用于测试)
*/
export declare function getHeartbeatConfig(): {
onlineThreshold: number;
notifyThreshold: number;
checkInterval: number;
};
/**
* 解析 Agent 标识符为完整 agent_id。
* 支持:
* 1. 完整 agent_id(已注册则返回)
* 2. 已知别名(workbuddy / hermes / qclaw,大小写不敏感)
* 3. agent_id 子串匹配(大小写不敏感)
* 返回完整 agent_id 或 null(未找到)
*/
export declare function resolveAgentId(input: string): string | null;
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |