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

@ericality/dsh-reconcile

v0.1.0

Published

Idempotent session-log reconciliation for DSH plugins: replays missed per-turn bookkeeping after a host restart interrupts a turn.

Readme

@ericality/dsh-reconcile

Idempotent session-log reconciliation for DSH plugins — 会话日志幂等对账库:把"回合结束"从一次性事件变成可重放的对账,供宿主插件在会话恢复时补做缺失回合的记账/费用提醒/完成通知。

安装

npm i @ericality/dsh-reconcile

需 dsh (DeepSeek Harness) 宿主环境;作为宿主插件的依赖库加载(纯库,无 apply/inject)。

功能

  • attachReconcile(ctx, { shouldReconcile, reconcile, bootScanMs?, name? }) — 挂载对账调度: session/created(新建/恢复,此时 session.events 已含修复后的完整日志)触发,加启动延迟扫描在线会话兜底;每会话每进程只对账一次,并发保护。
  • listTurnEnds(session) / lastTurnEnd(session) / turnEndReason(ev) / turnElapsedMs(session, end) — 从会话日志提取 turn/end(含 interrupted)与回合耗时的只读工具。
  • 背景:宿主重启会掐断进行中的 agent 回合;会话恢复时由持久化层合成缺失的闭合事件(含 turn/end { reason: { kind: 'interrupted' } }),但种子事件不派发事件观察者,依赖实时 turn/end 的插件因此收不到 → 由本库在恢复时幂等补做。
  • 约定:reconcile(session) 必须与实时路径复用同一套处理函数且幂等(重复执行无副作用,出错留日志、下个进程自然重试)。

依赖

peer:无(纯库零依赖;ctx 由调用方传入)。

许可

MIT