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

cumber-info-bot

v0.1.0

Published

Multi-agent orchestration system built on pi-mono

Readme

Info-Bot

基于 pi-mono 的多 Agent 编排系统。采用 Orchestrator 模式,由中央协调 Agent 动态分解任务、分派给专业 Worker Agent 并行执行,借鉴 Claude Code 的 steer / followUp 异步消息机制实现 Agent 间非阻塞通信。

安装

# 全局安装
npm install -g info-bot

# 或项目内安装
npm install info-bot

快速开始

1. 初始化配置

info-bot init

这会在 ~/.infobot/ 下创建配置目录和默认配置文件。

2. 设置 API 密钥

# 通过命令行设置
info-bot config set apiKeys.anthropic sk-ant-...
info-bot config set apiKeys.google AIza...

# 或直接编辑配置文件
vim ~/.infobot/config.json

# 也可以通过环境变量
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="..."

3. 启动交互式会话

info-bot
info-bot v0.1.0 — 多 Agent 编排系统
配置目录: /Users/you/.infobot
输入 /help 查看帮助,/exit 或 Ctrl+C 退出

> 分析 React 和 Vue 的优缺点
⚙ plan_tasks ✓
⚙ spawn_worker ✓
⚙ spawn_worker ✓
⚙ wait_for_workers ✓

根据 Research Agent 和 Analysis Agent 的分析结果...

4. 单次执行模式

info-bot "分析当前项目的代码结构并给出改进建议"

配置

默认配置路径:~/.infobot/

可通过环境变量 INFOBOT_CONFIG_DIR 自定义。

目录结构

~/.infobot/
├── config.json          # 主配置文件
├── docs/                # 全局持久存储
│   ├── architecture/    #   架构文档
│   ├── agents/          #   Agent 行为规范
│   ├── knowledge/       #   知识库
│   ├── sessions/        #   会话日志
│   └── decisions/       #   决策记录
├── sessions/            # 会话历史
└── knowledge/           # 全局知识库

config.json

{
  "orchestrator": {
    "provider": "anthropic",
    "model": "claude-sonnet-4-20250514",
    "thinkingLevel": "medium"
  },
  "workers": {
    "research": { "provider": "google", "model": "gemini-2.5-flash", "thinkingLevel": "off" },
    "code": { "provider": "anthropic", "model": "claude-sonnet-4-20250514", "thinkingLevel": "low" },
    "analysis": { "provider": "google", "model": "gemini-2.5-flash", "thinkingLevel": "medium" }
  },
  "apiKeys": {
    "anthropic": "sk-ant-...",
    "google": "AIza..."
  }
}

命令行管理

info-bot config              # 显示当前配置
info-bot config set <k> <v>  # 设置配置项
info-bot config path         # 显示配置目录路径

CLI 命令

| 命令 | 说明 | |------|------| | info-bot | 启动交互式会话 | | info-bot <prompt> | 单次执行 | | info-bot init | 初始化配置目录 | | info-bot config | 管理配置 | | info-bot help | 显示帮助 |

交互模式命令

| 命令 | 说明 | |------|------| | /help | 显示帮助 | | /config | 显示当前配置 | | /workers | 列出可用 Worker | | /clear | 清除对话历史 | | /exit | 退出 |

作为 SDK 使用

import { createSession } from "info-bot";

const session = createSession({
  configDir: "~/.infobot",  // 可选,默认 ~/.infobot
  docsRoot: "./docs",       // 可选,项目级 docs 目录
});

session.subscribe((event) => {
  if (event.type === "message_update" && event.assistantMessageEvent.type === "text_delta") {
    process.stdout.write(event.assistantMessageEvent.delta);
  }
});

await session.prompt("对比 React 和 Vue 的优缺点");

session.dispose();

架构

详细架构文档见 docs/architecture/overview.md

用户请求 → OrchestratorSession
             └─ Orchestrator Agent (plan → spawn → wait → synthesize)
                  ├─ WorkerSession: Research Agent  ──┐
                  ├─ WorkerSession: Code Agent      ──┤── followUp / steer
                  └─ WorkerSession: Analysis Agent  ──┘
                                                       ↓
             docs/ 持久存储 ← 自动保存 ← EventBus 统一事件流

Worker 类型

| 类型 | 默认模型 | 职责 | |------|---------|------| | research | Gemini 2.5 Flash | 信息收集、文档分析、摘要生成 | | code | Claude Sonnet 4 | 代码生成、审查、重构建议 | | analysis | Gemini 2.5 Flash | 数据分析、对比评估、策略建议 |

扩展

添加新 Worker

  1. 创建 src/workers/<name>/(包含 agent.tssystem-prompt.tstools/
  2. 实现 createXxxWorkerConfig(): WorkerConfig
  3. src/index.ts 中注册:registry.register("<type>", config)

切换模型

编辑 ~/.infobot/config.json 中的 orchestratorworkers 配置。支持 OpenAI、Anthropic、Google、xAI、Groq、Mistral 等提供商。

开发

npm install      # 安装依赖
npm run build    # 构建
npm run dev      # 监听模式
npm run check    # 类型检查
npm start        # 运行 CLI

许可证

MIT