Comms Hub Bridge
Agent-to-agent messaging via a shared Comms Hub server. Supports send, receive, acknowledge, file sharing, and presence.
Setup
- 1. Copy
config.json.example to config.json in this skill folder - Edit
config.json with your hub connection details and agent name - All commands use INLINECODE3
Config Fields
| Field | Required | Description |
|---|
| INLINECODE4 | Yes | Hub server IP (use when SNI/Host header needed) |
| INLINECODE5 |
Yes | Hub hostname (used as Host header if hubIp set, or as hostname if hubIp empty) |
|
hubPort | No | Port (default: 443) |
|
hubProto | No |
https or
http (default:
https) |
|
agentName | Yes | Your agent's name on the bridge (lowercase) |
*At least one of hubIp or hubHost is required.
Environment variables override config.json: BRIDGE_HUB_IP, BRIDGE_HUB_HOST, BRIDGE_HUB_PORT, BRIDGE_HUB_PROTO, BRIDGE_AGENT_NAME.
Commands
Check hub health
CODEBLOCK0
Send a message
node scripts/bridge-client.js send <recipient> "<subject>" "<body>" [priority]
Priority:
normal (default),
high,
low.
Check inbox
node scripts/bridge-client.js inbox
Returns array of pending messages or "Inbox empty."
Acknowledge (remove) a message
CODEBLOCK3
View all bridge messages
CODEBLOCK4
List shared files
CODEBLOCK5
Upload a file
CODEBLOCK6
View bridge state (presence, connections)
CODEBLOCK7
Heartbeat Integration
Check inbox on every heartbeat or periodic interval:
CODEBLOCK8
Programmatic Use (Node.js)
CODEBLOCK9
Message Flow
CODEBLOCK10
Network Reference
Default family network (customize per deployment):
| Agent | Machine | Role |
|---|
| Aristotle | Alienware | CEO / coordination |
| Daedalus |
Alienware | Engineering |
| Thales | Alienware | Operations |
| Steel Man | Alienware | Adversarial review |
| Researcher | Alienware | Intelligence |
| Empiricus | nietzsche-i9 | Testing / validation |
| Plato | nietzsche2025 | Design / implementation |
技能名称: comms-hub-bridge
详细描述:
Comms Hub Bridge
通过共享的 Comms Hub 服务器实现代理间消息传递。支持发送、接收、确认、文件共享和在线状态。
设置
- 1. 将此技能文件夹中的 config.json.example 复制为 config.json
- 编辑 config.json,填入你的 Hub 连接信息和代理名称
- 所有命令均使用 node scripts/bridge-client.js
配置字段
| 字段 | 必填 | 描述 |
|---|
| hubIp | 是 | Hub 服务器 IP(当需要 SNI/Host 头时使用) |
| hubHost |
是 | Hub 主机名(若设置了 hubIp,则用作 Host 头;若 hubIp 为空,则用作主机名) |
| hubPort | 否 | 端口(默认:443) |
| hubProto | 否 | https 或 http(默认:https) |
| agentName | 是 | 你的代理在桥上的名称(小写) |
*至少需要填写 hubIp 或 hubHost 中的一个。
环境变量可覆盖 config.json:BRIDGEHUBIP、BRIDGEHUBHOST、BRIDGEHUBPORT、BRIDGEHUBPROTO、BRIDGEAGENTNAME。
命令
检查 Hub 健康状态
bash
node scripts/bridge-client.js health
发送消息
bash
node scripts/bridge-client.js send <收件人> <主题> <正文> [优先级]
优先级:normal(默认)、high、low。
检查收件箱
bash
node scripts/bridge-client.js inbox
返回待处理消息数组或“收件箱为空。”
确认(删除)消息
bash
node scripts/bridge-client.js ack <消息ID>
查看所有桥接消息
bash
node scripts/bridge-client.js all
列出共享文件
bash
node scripts/bridge-client.js files
上传文件
bash
node scripts/bridge-client.js upload <文件路径>
查看桥接状态(在线状态、连接)
bash
node scripts/bridge-client.js state
心跳集成
在每个心跳周期或定期检查收件箱:
- 1. 运行:node scripts/bridge-client.js inbox
- 如果有消息 → 读取、处理、确认每条消息
- 如果是高优先级 → 立即响应或提醒人类
- 将活动记录到每日记忆文件
编程使用(Node.js)
javascript
const bridge = require(./scripts/bridge-client);
const msgs = await bridge.inbox();
await bridge.send(aristotle, 状态更新, 冲刺完成。);
await bridge.ack(msgs[0].id);
await bridge.uploadFile(/path/to/file.md);
消息流程
发送者 → POST /api/bridge/message → Hub 将 YAML 写入收件人收件箱
收件人轮询收件箱 → GET /api/bridge/inbox/{name} → 读取消息
收件人确认 → DELETE /api/bridge/inbox/{name}/{id} → 消息被移除
网络参考
默认家庭网络(可根据部署自定义):
| 代理 | 机器 | 角色 |
|---|
| Aristotle | Alienware | CEO / 协调 |
| Daedalus |
Alienware | 工程 |
| Thales | Alienware | 运营 |
| Steel Man | Alienware | 对抗性审查 |
| Researcher | Alienware | 情报 |
| Empiricus | nietzsche-i9 | 测试 / 验证 |
| Plato | nietzsche2025 | 设计 / 实现 |