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

@elinpf/dsh-ops-trace-ui

v0.4.1

Published

Host-plane half of the ops trace feature — registers the shared trace session projection and ships the web panel client bundle. The tool itself lives in @elinpf/dsh-ops-tool-trace (preset plane).

Downloads

1,117

Readme

@elinpf/dsh-ops-trace-ui

ops trace 功能的 host 面薄壳 — 注册共享的 trace session projection,并携带 web 面板 client bundle(输入框上方的调查树面板)。

功能

一个薄壳,两个 half:

  • Host 半(src/index.ts):把共享的 trace projection 注册进 ctx.sessionProjections,通过 ctx.inject 延迟执行,loader 不会因此把本行与 registry 排序。projection 定义从 @elinpf/dsh-ops-tool-trace 原样引用(引用同一对象,不是复制),因此 key/schema/fold/stateVersion 在工具半和面板半之间永不漂移。
  • Client 半(src/client.ts,esbuild 打包为 lib/client.js):注册一个 conversation.input.dock 条目(id: 'ops-tree'),渲染可折叠的调查树面板,结构上与 todo_write 的 TodoPanel 完全一致。通过 useProjectiontrace projection;registry 缺席时降级为不渲染。

不注册任何工具和 prompt section — trace 工具及其方法论在 @elinpf/dsh-ops-tool-trace,挂在 preset 面。

设计要点

  • 为什么单独成包:trace 功能按 plane 拆分。工具在 preset 面(面向模型);projection 注册表和 web client 载体在 host 面。本包就是 host 面的挂载点 — ops preset 组合它,面板才能到达浏览器。
  • client 发现是运行时的:web app 的 ClientModuleRegistry 扫描组合后的 host cordis 条目,因此本包必须通过 cordis.patch.yml 行保持 host 面挂载,否则面板永远到不了浏览器。
  • 共享布局:兄弟排序、深度、DFS 扁平化来自 ops-tool-trace/tree-layout — 人看到的布局与模型看到的一致。
  • 按会话的 UI 状态:dock 在切换会话时卸载,React state 随之重置;折叠/选择状态放在以会话为键的模块级 map(./typesDockUiState)里,卸载后仍然保留。

配置

- id: ops-trace-ui
  name: '@elinpf/dsh-ops-trace-ui'

无配置项 — Config 是空的 schemastery object。

测试

npm run build   # tsc → lib/,然后 esbuild → lib/client.js
npx vitest run

单元测试覆盖:两个入口的导出形态(函数插件形式、无 default 导出)、projection 的原样注册、通过注册定义驱动的 fold 行为、dock slot 注册,以及 HMR 卸载 — 执行全部 fiber disposer 后,projection 和 dock 条目都被移除。