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

omp-dashboard

v0.1.0

Published

OMP(Oh My Pi)会话的只读操作员追踪控制台。把一次 OMP 会话的计划、执行时间线、Agent 层级、模型用量和健康信号聚合到一个本地 Web 页面,适合观察多 Agent 任务、定位停滞点和回顾已结束的会话。

Readme

omp-dashboard

OMP(Oh My Pi)会话的只读操作员追踪控制台。把一次 OMP 会话的计划、执行时间线、Agent 层级、模型用量和健康信号聚合到一个本地 Web 页面,适合观察多 Agent 任务、定位停滞点和回顾已结束的会话。

omp-dashboard 概览:Task tree、Execution spine 和 Agent tree

截图使用代表性演示会话,界面来自实际生产构建,未做图片合成。

功能

  • Task tree:按 Phase 展示 Todo 状态、完成进度、阻塞/放弃计数及 Agent 归属。
  • Execution spine:按时间顺序汇总 session、phase、agent、tool 和 transport 事件,并支持 All / Agents / Tools 过滤。
  • Agent tree:展示显式父子层级、运行状态、当前工具、模型、耗时和失败原因;可选中 Agent 查看 Inspector 与 transcript。
  • 健康信号:标记 stalled、unattended、churning、重试耗尽和上下文压力;推断数据使用 ~ / INFERRED 与权威状态区分。
  • 用量面板:展示累计 token、当前上下文、上下文窗口、成本、请求数、子 Agent 小计和模型拆分。未知值显示 —,不做估算。
  • 历史记录:在 session_shutdown 时保存最终快照,/dashboard history 可查看最近会话。
  • 只读本地服务:仅监听 loopback;浏览器通过同源 WebSocket 接收快照,客户端消息会被拒绝。

安装

从 npm 安装(推荐)

在需要使用 Dashboard 的 OMP 项目目录执行:

bun add omp-dashboard
# 或
npm install omp-dashboard

在该项目的 package.json 中把构建后的扩展入口加入 omp.extensions:

{
  "omp": {
    "extensions": ["./node_modules/omp-dashboard/dist/extension/index.js"]
  }
}

启动或重启 OMP,使扩展被加载。然后在 OMP TUI 中执行:

/dashboard

Dashboard 会启动本地服务、绑定当前会话并尝试打开浏览器。默认端口从 4317 开始;若端口已占用,扩展会在允许的端口范围内继续查找。

从源码运行

git clone https://github.com/Sunshine168/omp-dashboard.git
cd omp-dashboard
bun install

# 开发:server + client 热重载
bun run dev

# 构建 standalone server
bun run build

# 构建 OMP 扩展产物
bun run build:extension

从源码加载 OMP 扩展时,在目标 OMP 项目的 package.json 中指向仓库入口:

{
  "omp": {
    "extensions": ["/absolute/path/to/omp-dashboard/extension/index.ts"]
  }
}

/dashboard 命令

| 命令 | 行为 | |---|---| | /dashboard | 启动服务、绑定当前会话并打开浏览器 | | /dashboard start | 与无参数命令相同;已运行时直接打开现有页面 | | /dashboard open | 打开已运行的 Dashboard;不会新建服务 | | /dashboard status | 显示 URL、端口、绑定会话和已连接浏览器数量 | | /dashboard history | 列出最近记录的会话摘要 | | /dashboard stop | 停止服务并释放事件订阅 |

OMP 扩展固定绑定 127.0.0.1,并在 4317–4330 中选择第一个可用端口;实际地址以启动日志为准,通常为 http://127.0.0.1:4317/。

直接运行 standalone server 时可通过环境变量调整端口或 loopback 主机:

PORT=4320 OMP_DASHBOARD_HOST=localhost bun run start

OMP_DASHBOARD_HOST 只接受 127.0.0.1、localhost 或 ::1,不能暴露到局域网或公网。

架构

OMP 会话 (extension)
   │  task:subagent:event / progress / lifecycle / goal / usage
   ▼
extension/index.ts               ← OMP 扩展入口和 /dashboard 命令
   │
   ▼
server/omp-extension-bridge.ts   ← 会话发现 + 事件归一化
server/dashboard-state.ts        ← 状态模型:agent / todo / timeline / goal + 健康信号
server/dashboard-server.ts       ← loopback HTTP + WebSocket 快照推送
   │
   ▼
src/client/ (React)              ← Task tree / Execution spine / Agent tree + Inspector

三层分离:bridge(事件接入)→ state(纯状态模型,可测)→ client(渲染)。健康信号及 todo→agent 推断为纯函数,服务端与客户端共用同一 view-model。

数据与安全边界

  • 只读:不向 OMP 会话写状态,不调用会话控制命令;客户端向 WebSocket 发送消息会被关闭。
  • 仅本机:服务端强制绑定 loopback,WebSocket 只接受同主机、同端口的 HTTP Origin。
  • 安全响应头:静态页面使用 CSP、X-Content-Type-Options: nosniff 和 Referrer-Policy: no-referrer。
  • 历史权限:历史目录以 0700 创建,记录文件以 0600 写入;异常 session ID 会使用 SHA-256 文件名。
  • stderr 脱敏:默认仅记录 stderr 字节数;仅在 OMP_DASHBOARD_DEBUG=1 时打印原始内容。
  • 权威数据优先:用量来自 OMP provider reported 值,未知显示 —;Timeline 默认保留最近 400 条事件。
  • 已知上游传递依赖存在 high 级 advisory(@oh-my-pi/pi-coding-agent optional 依赖),当前无可达攻击路径,待 OMP 上游更新。

验证

bun run check
bun run lint
bun run test
bun run build:extension
npm pack --dry-run

目录

| 路径 | 内容 | |---|---| | extension/ | OMP 扩展入口与命令控制器 | | server/ | bridge、state、HTTP/WebSocket server、history 持久化 | | src/client/ | React UI 与 view-model | | src/shared/ | Dashboard wire domain 类型 | | tests/ | Bun 测试套件 | | docs/assets/ | README 截图等静态资源 |

许可

MIT。