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-compaction-semantic

v0.1.0

Published

Semantic context compaction for DeepSeek Harness — keep/drop by calibrated judgment instead of character arithmetic; kept content stays verbatim, failures fail closed to official behavior

Readme

dsh-compaction-semantic —— DeepSeek Harness 的语义化上下文压缩

留任务还需要的,丢不需要的——靠判断,不靠字符数。 DeepSeek Harness 出厂的压缩用算术回答上下文膨胀(超过 8,192 码点的工具结果保头 4,096 + 尾 1,024),再用 LLM 摘要把你的错误堆栈洗成散文。本插件把决策换成校准 判断——保留的内容 verbatim 不改写,丢弃的按相关性散布取舍(相关内容 也会出现在中段),任何失败都降级回官方行为。

English | 简体中文

为什么(agent 使用中最普遍的痛点)

每个长会话 agent 用户终会撞上压缩,而得到的是"最旧的寒暄活过了字节预算, 三步前的错误堆栈没有"。跨 harness 数据集里最响的痛点信号:fast-jev-compaction 原仓一天 8,002 星(2026-09-17,此后休眠,社区 fork 续命)——为 Claude Code 做的正是这件事:keep/drop 判断 + verbatim 保留。DSH 出厂的是确定性剪枝 (dsh-compaction-tool-result-pruner),但把判断位留空了:引擎按可选的、按名 解析的服务消费 pruner,且总是先剪枝、后考虑 LLM 摘要。那个空位就是本仓。

交付什么(计划)

  • V1 语义化工具结果剪枝器:挂在 agent/pre-step(先于压缩引擎自己的监听器), 对所有超预算工具结果合并一次判断请求(共享 state=近期用户请求+计划;每段 一问,~300ms 级),按官方回放安全协议(compaction/prune 遮蔽事件 → tool/result replace surfaceOp)落盘 keep/drop。判断器关闭/超时/出错 → 整体 跳过,官方行为不变。
  • V2 keep/drop 压缩引擎:用逐消息 keep/drop 替换摘要器(完整主张),走设计好的 summarize() 钩子。

挂载机制精读(官方 pruner 如何接入、塑造 V1 的同步调用约束、两个插入点): docs/analysis-official-pruner.md(英文)。 跨 harness 对照分析——Claude Code(三层体系 + PreCompact/function hooks)与 Codex(单层、无钩子、AGENTS.md 挂载)的压缩实现,及 DSH 为何是最佳宿主: docs/analysis-cc-codex-compaction.md(英文)。

状态

Spike #1(本分析)2026-11-21 交付。见 ROADMAP.md。

与 DeepSeek、TypeSafe 及任何上游无关。MIT。