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

dsh-context-compression-selector-runtime

v0.1.1

Published

Auditable context-compression runtime for DeepSeek Harness

Readme

dsh-context-compression-selector-runtime

这是非官方社区 Bundle dsh-context-compression-selector 的内部运行时包。普通用户应安装入口 Bundle,不需要直接安装本包。

本包提供确定性的 Fresh、Aggregate、History、Native 工具结果与 Custom TailTrim 压缩,插件自有的 context_compression_retrieve 恢复工具,结构化审计记录,以及固定版本的离线 DeepSeek V4 tokenizer。它只使用 DeepSeek Harness 的公开 API,兼容 0.1.1-rc.2 与 0.1.2-alpha.5,不修改 Harness 核心。

有损改写要求 replacement 前后取得同 revision 的 exact count。明确验证过的模型 id 为 deepseek-flash、deepseek-v4-flash、deepseek-v4-pro 和 deepseek-v4-flash-vision-exp。deepseek-flash、deepseek-v4-flash 与 deepseek-v4-flash-vision-exp 由 DeepSeek-V4.1-Flash 服务;deepseek-v4-pro 保留自有 DeepSeek-V4-Pro tokenizer。视觉模型的文本计数使用 deepseek-ai/DeepSeek-V4.1-Flash tokenizer。图片 token 使用由官方 golden fixtures 逐项验证的官方图像处理算术,并以 tokenizer-estimate 上报:块长度恒为 nLlmH * (nLlmW + 1) + 2 且与序列化位置无关,因此 padding 最小值与最大值相等,每张图片保留 1024 token 上限;尺寸畸形或无法计算时固定计为 256 token。由于 adapter 最终图片投影不可公开观测,该数值不标记为 exact。含图片的工具结果候选仍不具备 exact 资格并保持原样;未知模型、tokenizer 资产不可用、不安全工具组或文本计量不完整时继续 fail-open。

审计日志以 context-compression audit 开头,区分策略快照、组件关闭/跳过、已提交 rewrite、fail-open 错误和已观察到的核心 compaction/summary。审计记录不包含 prompt 或工具结果正文。

首次 policy-frozen 会携带完整 settings/deployment 快照。它通过 Harness logger 输出,因此保留期限由部署的日志 sink 决定;标准 prune/replacement Session event 仍是已提交 rewrite 的持久证据。本包不会在 ~/.dsh 下硬编码私有路径。

安装、Profile、兼容性、Adaptive/cache 限制与发布证据见仓库 README。Tokenizer 来源与校验和见 assets/deepseek-v4/manifest.json、assets/deepseek-v4.1-flash/manifest.json 与 THIRD_PARTY_NOTICES.md。