dsh-token-trim: Measurable Trimming Before Tool Results Enter the Context

Introducing dsh-token-trim (0.2.0), a DSH workflow plugin maintained by LISHUANGXI1412. The plugin hooks into tools/post-execute to perform structured summarization of lengthy tool outputs, head-and-tail capping, deduplication of repeated deltas, and artifact persistence. Original content is stored under ~/.dsh/token-trim/artifacts/, and the model can retrieve it via guard_query. It ships with a Savings tab and manifest-based auditing. Configuration options include minChars, capsDefault, and per-tool caps. Install with dsh plugin add dsh-token-trim; it can be layered on top of dsh-context-kit for compaction. The plugin enforces a fail-open security model, and the maintainer's own testing confirms that the read tool is not capped by default.

Read More