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

openclaw-plugin-metrics

v1.0.17

Published

实时监控 OpenClaw 智能体运行指标(多维度详细版)

Readme

openclaw-plugin-metrics

OpenClaw 局域网智能体协同与运行指标监控插件。

安装后,你的智能体将自动接入局域网注册中心,具备以下能力:

  • 跨智能体协同 — 自动发现局域网内的其他智能体,分配任务、对话追踪、汇总结果
  • 注册中心查询 — 查看组织架构、搜索在线智能体、查询成员信息
  • 运行指标上报 — 实时将 24 种运行事件推送到注册中心,供全局监控

安装

openclaw plugins install openclaw-plugin-metrics
openclaw gateway restart

本地开发安装:

git clone <repo-url>
cd openclaw-plugin-metrics
npm install && npm run build
openclaw plugins install -l .
openclaw gateway restart

快速上手

检查插件状态

在对话中输入:

/metrics

正常输出:

🟢 插件状态正常

✅ 注册中心连接:已联通(1 个 registry,self_id=3,ping=12ms)
✅ 技能文件加载:openclaw-collaboration 已就位(共 1 个技能:openclaw-collaboration)
✅ Cluster 就绪:已初始化(id=3,活跃任务=0,连接数=0)

三项全部为 ✅ 表示插件就绪,可以开始使用。

发起协同任务

使用 /task 指令告诉智能体你想做什么:

/task 做一个博客静态登录页
/task 帮我把这篇文档翻译成英文
/task 写一个 TODO 应用的后端 API

智能体会自动进入 Manager 角色,按以下流程执行:

PLAN(和你讨论需求)  →  你说"开始"  →  EXEC(自动执行)
  1. PLAN 阶段 — 智能体先和你聊需求:理解目标、构思方案、列出选项。这个阶段不会调用任何工具,纯对话
  2. 你满意后说 "开始"
  3. EXEC 阶段 — 智能体自动查组织架构、匹配合适的远程智能体、创建连接、分发任务、追踪进度、汇总结果

入场时会看到确认信息:

✅ 已进入 OpenClaw 协同模式 | 角色:Manager | 阶段:PLAN
我会先和你讨论需求,方案确认后你说"开始"我再执行。

看到这条信息就表示协同技能已正确加载。

查询注册中心

不需要协同,只想查信息?直接用自然语言:

查看组织架构
搜索在线的智能体
注册中心有哪些成员?

智能体会自动调用注册中心查询工具返回结果。

命令列表

| 命令 | 说明 | |------|------| | /metrics | 检测插件注入状态:注册中心连接(ping)、技能文件加载、Cluster 就绪 | | /tasks | 查看当前所有活跃的协同任务详情(角色、连接、session) | | /tasking | 快速查看是否有协同任务正在执行 | | /task <需求描述> | 启动一个协同任务,进入 Manager 流程 |

协同任务工具

以下工具由插件自动注册,在协同流程中被智能体自动调用,用户无需手动操作

| 工具 | 用途 | |------|------| | metrics_get_org_tree | 查询组织架构树 | | metrics_get_org_all_agents | 查询组织下所有在线智能体 | | metrics_search_agents | 按关键词搜索智能体 | | metrics_get_agent_token | 获取目标智能体的认证令牌 | | metrics_create_task_session | 创建协同会话 | | metrics_task_connection | 建立与 Worker 的连接 | | metrics_task_publish | 向 Worker 发布任务 | | metrics_poll_task_messages | 拉取 Worker 回复的消息 | | metrics_send_task_message | 向对方智能体发送消息 | | metrics_complete_task | 结束协同任务 |

另有 metrics_get_org_statsmetrics_get_org_listmetrics_get_org_detailmetrics_get_org_agentsmetrics_get_org_available_agentsmetrics_get_org_childrenmetrics_get_org_subtreemetrics_get_unassigned_agents 等注册中心查询工具。

前提条件

  • 局域网内需部署 openclaw-registry 注册中心
  • 网络需支持 mDNS(Bonjour),插件通过 mDNS 自动发现注册中心
  • 参与协同的智能体都需安装本插件

问题解决

开启局域网内非严格模式的方法

openclaw config set gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback "true"
openclaw config set gateway.controlUi.allowInsecureAuth "true"
openclaw config set gateway.controlUi.dangerouslyDisableDeviceAuth "true"

依赖

| 包 | 用途 | |----|------| | openclaw | OpenClaw Plugin SDK | | bonjour-service | mDNS 服务发现 | | ws | WebSocket 通信 | | zod | 工具参数校验 | | @hile/message-loader | 消息路由 | | @hile/message-ws | WebSocket 消息协议 | | node-machine-id | 设备唯一标识 |

License

ISC