npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xihe-jianmu-ipc

v0.4.1

Published

建木 — Real-time IPC hub for multi-AI-agent communication. WebSocket message routing between Claude Code, OpenClaw, Codex, and any HTTP client.

Readme

MIT License English | 中文

xihe-jianmu-ipc

多 AI 会话实时通信中枢,集成 WebSocket 消息路由、MCP、Channel 推送唤醒、飞书 AI 控制台、SQLite 持久化与结构化任务协议。

Xihe AI 锻造,面向所有需要跨 AI 会话协同的开发者。


项目简介

xihe-jianmu-ipc 是一个面向多 Agent 协作场景的通信 Hub。它把跨会话消息传递从 LLM 上下文中剥离出来,让消息通过 WebSocket / HTTP 直接送达目标 session,避免每次转发都重建整段对话上下文。

适用场景包括:

  • Claude Code 与 Claude Code 多会话协作
  • Claude Code 与 OpenClaw 双向通信
  • AI Agent 与脚本、CI、飞书机器人之间的联动
  • 需要结构化任务分发、消息留存和在线状态监控的团队

命名由来

项目遵循曦和三段式命名规范 xihe-{隐喻}-{功能}

  • xihe:品牌,源自中国神话中的太阳女神曦和
  • jianmu:隐喻,建木是神话中沟通天地的通天神树,象征多个 AI 会话之间的无声连通
  • ipc:功能,即进程间实时通信

为什么存在

多 Agent 协作如果依赖 LLM 充当路由器,每次跨 session 通信都会触发一次完整 agent run,并重复加载上下文,随着对话增长会造成显著的 token 浪费。

建木的核心思路是:让“哑管道”负责路由,而不是让 LLM 负责路由。消息经由 Hub 直接转发给目标 session,LLM 只看到最终收到的消息,看不到整段中转历史,因此单条消息的 token 成本与对话长度解耦。


快速开始

Claude Code

  1. 安装:
npm install -g xihe-jianmu-ipc

或从仓库运行:

git clone https://github.com/xihe-forge/xihe-jianmu-ipc
cd xihe-jianmu-ipc
npm install
  1. 在项目 .mcp.json 中添加:
{
  "mcpServers": {
    "ipc": {
      "command": "node",
      "args": ["/path/to/xihe-jianmu-ipc/mcp-server.mjs"],
      "env": {
        "IPC_NAME": "main"
      }
    }
  }
}
  1. 第一个 MCP 会话连接时,Hub 默认自动启动;也可以手动运行:
node hub.mjs
  1. 建议同时启动 network-watchdog,自动探测 CliProxy / Hub / Anthropic / DNS:
npm run watchdog
# 或 node bin/network-watchdog.mjs

# 健康检查
curl http://127.0.0.1:3180/status

Windows 上也可以注册 watchdog 守护任务:

npm run daemon:watchdog:install
npm run daemon:watchdog:uninstall
  1. 在任意连接的 session 中发送消息:
ipc_send(to="worker", content="Start processing task A")

OpenClaw

  1. 安装包:
npm install xihe-jianmu-ipc
  1. 若手动启动 Hub,则复制 .env.example.env 并填写 OPENCLAW_TOKEN

  2. openclaw.json 中注册 mcp-server.mjs,并配置 IPC_NAMEOPENCLAW_URLOPENCLAW_TOKEN 等环境变量。

Windows Hub 守护进程(推荐)

让 Hub 开机自启 + 挂了自动恢复,无需手动拉起。守护机制:Windows 任务计划 AtLogOn + 每 10 分钟重复触发 + VBS 内部每 5 分钟健康探测(curl /health),假活时精确 kill 该 PID 并拉起新进程。

# 注册守护任务(不需要管理员权限)
powershell -ExecutionPolicy Bypass -File bin\install-daemon.ps1

# 卸载
powershell -ExecutionPolicy Bypass -File bin\uninstall-daemon.ps1

# 验证自愈能力(会 kill Hub PID 测试恢复)
powershell -ExecutionPolicy Bypass -File bin\verify-daemons.ps1 -Service Hub

架构

核心组件如下:

  • hub.mjs:Hub 主进程,提供 WebSocket 服务与 HTTP API
  • bin/network-watchdog.mjs:独立 watchdog 进程,负责 4 路探测、POST /internal/network-eventGET /status
  • mcp-server.mjs:MCP 接入层,供 Claude Code、OpenClaw 等工具使用
  • lib/db.mjs:SQLite 持久化,保存消息历史、任务状态与统计数据
  • dashboard/:监控面板,查看 session、消息流和任务状态
  • feishu-bridge.mjs:飞书接收桥接进程,负责 AI 控制台与消息转发

简化后的通信路径:

AI Session -> MCP Server -> Hub
network-watchdog -> POST /internal/network-event -> Hub
Daemon -> GET http://127.0.0.1:3180/status -> network-watchdog
Hub -> WebSocket / HTTP -> Target Session
Hub -> SQLite -> Message / Task History
Hub <-> Feishu Bridge / Dashboard / OpenClaw Adapter

HTTP API

  • POST /send{from, to, content} 发送消息,返回 {accepted, id, online, buffered};若 target 不存在,sender 会收到 unknown-target 警告
  • POST /suspend{from, reason?, task_description?, suspended_by?} 记录挂起 session,返回 {ok, name, suspended_at, suspended_by}
  • POST /wake-suspended{reason?, from?} 临时运维 endpoint,通过 topic fanout 向所有订阅 network-up 的 session 广播手动唤醒消息,返回 {ok, broadcastTo, subscribers, clearedSessions}
  • POST /internal/network-event:内部端点,仅 127.0.0.1 + X-Internal-Token 可访问,接收 network-down / network-up
  • POST /task{from, to, title, ...} 创建结构化任务,返回 {ok, taskId, online, buffered}
  • GET /health:返回 Hub 状态、session 列表与消息计数

关于曦和 AI

曦和(Xihe)得名于中国神话中驾驭太阳的女神。xihe-forge 是曦和 AI 的开源锻造炉——我们在这里把实用的 AI 工具从想法锤炼成可以直接上手的开源项目。xihe-jianmu-ipc 是锻造炉中的第三个开源作品,也是我们多 AI 协作基础设施方向的重要一环。

项目矩阵

| 项目 | 简介 | |---|---| | xihe-jizhu-scaffold | AI 项目脚手架 | | xihe-jianmu-ipc | 多 AI 通信 Hub(本项目) | | xihe-core | 核心库 | | lumidrive-site | 光影随行官网 | | xihe-rinian-seo | SEO 工具 | | heartreadAI | AI 心理健康产品 | | xihe-jinwu-epet | 桌面宠物 | | xihe-taiwei-bridge | 多 Agent 协作平台 |

网站链接

  • 组织主页:https://github.com/xihe-forge
  • 光影随行官网:https://lumidrivetech.com
  • HeartRead 官网:https://heartread.ai

更多面向 AI 协作、搜索、增长与数字体验的产品仍在持续锻造中,欢迎关注组织、试用产品或参与贡献。


License

MIT — by xihe-forge