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

@liuch0812/info-sidebar

v0.2.0

Published

An opencode-style info sidebar for DeepSeek Harness (DSH): session/runtime status, token & cost, and live activity. Static DSH Cordis plugin — install with `dsh plugin --profile web add @liuch0812/info-sidebar`.

Readme

@liuch0812/info-sidebar

npm version license

An opencode-style info sidebar for DeepSeek Harness (DSH), packaged as a real static Cordis plugin — one command to install, no dynamic cordis_define needed.

It adds a floating right-side panel that shows, in three sections, the kind of session/runtime information opencode surfaces:

  • 会话与运行 — session title, provider / model, agent preset, workspace path, and the current Git branch.
  • Token 与花费 — input / output / total tokens (from DSH's real tokenMeter), plus an estimated cost.
  • 实时活动 — Agent status (running / idle), running background jobs, and live subagent count.

The panel opens automatically, is dismissible to a floating "ⓘ 信息" launcher, shifts the main content left while open (it does not cover the workspace), and refreshes every 3 seconds. Visuals follow DSH's own theme tokens, so it looks native and adapts to light/dark.

一键安装

方式一:官方 dsh plugin(推荐)

需要 pnpm(npm i -g pnpm):

dsh plugin --profile web add @liuch0812/info-sidebar

dsh plugin add 会把包装进 profile 并自动把包名加入 dsh.profile.bundles(本包声明了 dsh.bundle.patch,启动时自动把插件行 insert 进组合)。然后重启 dsh web:

dsh web

方式二:install.sh(无需 pnpm)

仓库里的 install.sh 在机器没有 pnpm 时自动走等价 fallback (npm pack + 解压进 profile node_modules + 手动 reconcile bundles 名单), 有 pnpm 时则直接走方式一:

# 从 npm 安装到 web profile
curl -fsSL https://raw.githubusercontent.com/liuchang0812/dsh-plugins-info-sidebar/main/install.sh | bash

# 或克隆仓库后本地执行
./install.sh                 # 等价 ./install.sh web
./install.sh web             # 显式指定 profile
./install.sh web /path/to/checkout   # 发布前从本地目录验证

装完重启 dsh web。验证是否生效:

dsh --profile web --dump-config | grep -A2 info-sidebar
# 应看到:
# == @liuch0812/info-sidebar
# - id: info-sidebar
#   name: '@liuch0812/info-sidebar'

卸载

dsh plugin --profile web remove @liuch0812/info-sidebar

(无 pnpm 时手动删掉 profile node_modules/@liuch0812/info-sidebar、以及 profile package.json 里 dependencies 与 dsh.profile.bundles 中的对应 条目。)之后重启 dsh web。

工作原理

一个包、一个组合行(cordis.patch.yml 里 insert 的 name: 行),两个半:

  • Host 半(lib/index.js):标准 Cordis 插件,inject: ['webServer'], 在 webServer 服务上注册 exact 路由 /plugins/info-sidebar/snapshot, 每次请求现算快照 JSON(复用 DSH 的 agents / sessions / sessionTitle / shell / tokenMeter / jobs / subagents 服务)。client-modules 自己 就用同一个 webServer 服务提供 /plugins/<id>/client.js,所以该服务在 web profile 里必然存在。
  • Client 半(lib/client.js):window.__ModuleLoader__.load 格式的 预构建 bundle(DSH 模块加载器的私有格式,无需额外构建链), require('react'),每 3 秒 fetch 上述路由刷新,并通过 slots 服务注册 进 shell.overlay 槽(静态面板层)。

Host↔Client 通信没有用动态插件私有的 harness/host.call 桥(静态包里 不存在),而是普通的同源 HTTP——浏览器端无沙箱,fetch/setInterval 直接可用。

Notes & caveats

  • Cost is an estimate. The built-in LLM service exposes no pricing, so the panel uses a small hardcoded price table (PRICES in lib/index.js) keyed by model id. Unknown models show —. Patch the table or wire in a real pricing source as needed.
  • Git branch is read once per workspace (git rev-parse --abbrev-ref HEAD) and cached; non-git workspaces or sandbox-denied commands show —.
  • The panel reads live Host services and only renders data already available to the runtime; it never stores anything.
  • 装完必须重启 dsh web(运行中的 dsh web 不会重读 profile)。

Development

npm run check     # 语法检查 host/client 两个半
./install.sh web /path/to/this/checkout   # 发布前本地全链路验证

License

MIT