dsh-result-cap: Deterministic Byte Truncation Plugin for DeepSeek Harness Tool Results

`dsh-result-cap` is a model inference plugin for DeepSeek Harness that addresses task interruptions caused by excessively large results returned by tools. It uses deterministic truncation to retain the first N bytes of a result and returns the SHA256 hash of the original content, the truncation status, and the number of discarded bytes, ensuring that the model can identify incomplete content. The plugin supports configuring `maxBytes` (default: 8192), processes only string types, and performs no compression or summarization. After installation, set `id: result-cap` in the configuration file, then call the `capResult` function directly to enable it.

Read More