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

@xbzb404/dsh-context-compression-selector-runtime

v0.2.2-rc.5

Published

Auditable context-compression runtime for DeepSeek Harness

Readme

dsh-context-compression-selector-runtime

Internal runtime package for the unofficial community Bundle dsh-context-compression-selector. Most users should install the Bundle, not this package directly.

It provides deterministic Fresh, Aggregate, History, Native tool-result, and Custom TailTrim compression; a plugin-owned context_compression_retrieve recovery tool; structured audit records; and a pinned offline DeepSeek V4 tokenizer. It uses only public DeepSeek Harness APIs and supports both 0.1.1-rc.2 and 0.1.2-alpha.5; it does not patch Harness core.

Lossy rewrites require exact same-revision counts before and after replacement. Verified model ids are deepseek-flash, deepseek-v4-flash, deepseek-v4-pro, and deepseek-v4-flash-vision-exp. deepseek-flash, deepseek-v4-flash, and deepseek-v4-flash-vision-exp are served by DeepSeek-V4.1-Flash; deepseek-v4-pro keeps its own DeepSeek-V4-Pro tokenizer. Vision text counting uses the deepseek-ai/DeepSeek-V4.1-Flash tokenizer. Vision images use the official image-processor arithmetic validated against official golden fixtures and are reported as tokenizer-estimate: the block length is exactly nLlmH * (nLlmW + 1) + 2 and is independent of the serialized position, so the padding minimum and maximum are equal, with 1024 tokens retained as the per-image upper bound; malformed or unevaluable dimensions use a fixed 256-token fallback. The estimate is not exact because the adapter's final image projection is not publicly observable. Image-bearing tool-result candidates remain exact-ineligible and intact; unknown models, unavailable tokenizer assets, unsafe tool groups, and incomplete text measurements still fail open.

Audit log records use the prefix context-compression audit and distinguish policy snapshots, skipped/disabled components, committed rewrites, fail-open errors, and observed core compaction/summary events. No audit record contains prompt or tool-result content.

The first policy-frozen record carries the complete settings/deployment snapshot. It is emitted through the Harness logger, so its retention follows the configured log sink; standard prune/replacement Session events remain the durable proof of committed rewrites. This package does not hard-code a private path below ~/.dsh.

See the repository README for installation, profiles, compatibility, Adaptive/cache limitations, and release evidence. Tokenizer provenance and checksums are in assets/deepseek-v4/manifest.json and assets/deepseek-v4.1-flash/manifest.json, summarized in THIRD_PARTY_NOTICES.md.