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/sse.d.ts
View on GitHub/**
* sse.ts — SSE 连接管理 (Phase 1 Week 2 增强)
* 维护 AgentID → Response 映射,实现零轮询实时推送
*
* Week 2 增强:
* - pushToAgent 支持可选的 dedup_id,用于客户端去重
* - 每个 SSE 事件附加 event_id(递增),客户端可据此去重
*/
import type { Response } from "express";
/**
* 获取下一个 event_id(不递增,预览用)
*/
export declare function peekNextEventId(agentId: string): number;
/**
* 注册 Agent 的 SSE 连接
*/
export declare function registerClient(agentId: string, res: Response): void;
/**
* 移除 Agent 连接(断线时调用)
*/
export declare function removeClient(agentId: string): void;
/**
* 向指定 Agent 推送事件
*
* 每个推送附加递增的 event_id,客户端可据此实现去重:
* - event_id 是严格递增的
* - 客户端保存 last_seen_event_id,忽略 ≤ last_seen 的消息
*
* @param agentId 目标 Agent
* @param event 事件数据(会被序列化为 JSON)
* @param dedupId 可选的去重标识(如 msg_hash),附加到事件中供客户端验证
* @returns true = 在线已推送;false = 离线,消息已持久化等待补发
*/
export declare function pushToAgent(agentId: string, event: object, dedupId?: string): boolean;
/**
* 广播给多个 Agent
*/
export declare function broadcast(agentIds: string[], event: object): Record<string, boolean>;
/**
* 查询哪些 Agent 在线
*/
export declare function onlineAgents(): string[];
/**
* Phase 5b: 优雅关闭时 drain 所有 SSE 连接
* 向每个客户端发送 close 事件后关闭连接
*/
export declare function drainAllClients(): void;
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 |