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

@uncaged/openclaw-plugin-ograph

v0.1.2

Published

OGraph Channel Plugin — Agent Session dispatcher for OGraph events

Downloads

394

Readme

OpenClaw OGraph Plugin

OGraph 事件分发插件,将 OGraph 事件路由到基于主题的 Agent 会话中。

架构

Dispatcher (感知层) → Plugin (调度层) → Agent (执行层)
  • Dispatcher: 轮询 OGraph 事件流,发现新事件后 POST 到 Plugin
  • Plugin: 接收事件,按 topic 分组,去重合并,调用 Agent session
  • Agent: 处理具体任务逻辑

快速安装

1. 克隆并构建

git clone https://github.com/oc-xiaoju/openclaw-plugin-ograph.git
cd openclaw-plugin-ograph
npm install --ignore-scripts && npm run build

⚠️ 重要:使用 --ignore-scripts 避免权限问题

某些系统上 npm install 可能遇到 EPERM 错误。使用 --ignore-scripts 跳过 post-install 脚本可以避免此问题。这不会影响插件功能,因为我们手动运行 npm run build

2. 注册到 OpenClaw

编辑 ~/.openclaw/openclaw.json,添加:

{
  "plugins": {
    "allow": ["ograph"],
    "load": {
      "paths": ["/absolute/path/to/openclaw-plugin-ograph"]
    },
    "entries": {
      "ograph": {
        "enabled": true,
        "config": {
          "secret": "your-gateway-token-here",
          "topics": {
            "task-execution": {
              "description": "任务执行管理",
              "debounceMs": 5000,
              "systemPrompt": "你是 OGraph 任务执行管理器..."
            }
          }
        }
      }
    }
  }
}

🔑 认证说明:

  • config.secret 应填入你的 OpenClaw Gateway Token
  • 获取方法:在 ~/.openclaw/openclaw.json 中找到 gateway.auth.token 的值
  • 这个 token 用于 Dispatcher → Plugin 的 HTTP 认证

3. 重启 Gateway

openclaw gateway restart

4. 验证安装

# 应该返回 401 Unauthorized(说明端点存在但缺少认证)
curl -X POST http://localhost:18789/plugins/ograph/dispatch \\
  -H "Content-Type: application/json" -d '{}'

API 端点

  • POST /plugins/ograph/dispatch - 接收事件(需要 gateway 认证)
  • POST /plugins/ograph/flush - 强制刷新所有 ready topics
  • GET /plugins/ograph/status - 查看插件状态

配置选项

Topics

每个 topic 对应一个 Agent session:

{
  "topics": {
    "task-execution": {
      "description": "任务执行管理",
      "debounceMs": 5000,
      "systemPrompt": "你是任务管理器..."
    },
    "code-review": {
      "description": "代码审查",
      "debounceMs": 2000,
      "systemPrompt": "你是代码审查专家..."  
    }
  }
}

配置说明

  • debounceMs: 事件合并等待时间(毫秒)
  • systemPrompt: Agent 会话的系统提示词
  • Plugin 会为每个 topic 创建独立的 session key: agent:main:ograph:default:direct:{topic}

故障排除

| 问题 | 解决方法 | |------|----------| | Plugin 返回 404 | 检查 plugins.allow 包含 "ograph"load.paths 路径正确 | | Dispatcher 连接失败 | 确保 config.secret 使用正确的 Gateway Token | | npm install EPERM | 使用 npm install --ignore-scripts | | 事件没有触发 Agent | 检查 topic 名称匹配,查看 /plugins/ograph/status |

完整集成

这个 Plugin 需要配合 OGraph Dispatcher 使用。

完整安装指南请参考:OGraph Task 集成文档


小墨 🖊️ (KUMA Team) · 2026-04-13