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

@sparkelf/dsh-patch-session-history-search

v0.1.0-rc.22

Published

Data-only exact official-source patch for searchable historical Session migration at production scale

Downloads

119

Readme

@sparkelf/dsh-patch-session-history-search

English | 中文

该data-only patch使official SQLite Session内容搜索可用于保留的pre-release history。v0迁移将历史pi-ai replay-state v1扁平记录转换为当前{ response, blocks }信封,并把subagent descriptor v2提升至v3;v3相对v2只新增可选reasoning-effort字段。Message content、tool records、title及Workspace archive state均不变。

大型history仍走official JSONL到v2路径。完整日志Zstandard解码复用既有multi-frame decoder,将小输出合并为有界batch并周期性让出event loop。Session-format snapshot只记忆已经由owner完成脱离及冻结的对象,使codec和相邻migration可组装这些owned rows,而不重复复制同一整份日志。

SQLite reconciliation观察到一份changed persisted Session后,立即经attempt savepoint写入,而非在完整corpus读取结束前保留全部Session document arrays。外层transaction仍只提交一个stable corpus,或整体rollback;source snapshot变化会先丢弃本轮再重试。

Cold seeded分支在重启后仍可识别。Current projection checkpoint携带自身精确inherited cut,header生命周期匹配时可提供list hints;缺少lineage fields的predecessor checkpoint只能提供由id绑定且通过schema校验的title,并使用不参与排序的asOfSeq: -1 sentinel。列表不读取Session正文,也不使用predecessor state播种fold。

在暴露问题的166份Session、623 MB保留语料上,全部历史日志迁移均无错误。最大source由3,500,551条v0 events折叠为122,575条v2 events,用时4:49.86,峰值5.50 GiB;全部Session已迁移后建立索引用时58.42秒,峰值3.64 GiB;warm内容查询用时0.74秒。这些是该语料的观测值,不是通用性能承诺。

target是exact official source revision d347e703908d0406b7a7ef80e3a0e594d86b2215。本package不含runtime JavaScript、alternate history reader、archive mutation或fallback provider。official DSH等价接受这些历史记录并有界化full-corpus reconciliation后,retire本package。