dsh-optimize: Context Metering, Alerting, and Optional Compression in Long Sessions

dsh-optimize is a long-session resource governance plugin for DeepSeek Harness: it meters the character and token estimates of each outbound request at the agent/pre-step stage, in conjunction with the harness's contextPressure; state is persisted to $DSH_HOME/storages/dsh-optimize/state.json. It supports warnTokens and criticalTokens alerts, with an optional autoCompact mode that triggers early compression via the official compaction handle. On the Web side, Lite rendering is enabled by default to reduce the chat-line list layout overhead, toggleable via the Composer chip and localStorage. Install: dsh plugin --profile <profile> add dsh-optimize; configuration is defined in cordis.patch.yml. MIT licensed, requires Node >= 20.

Read More
dsh-optimize: DeepSeek Harness Long-Session Resource Manager

`dsh-optimize` is a long-session resource management plugin for DeepSeek Harness, designed to address issues caused by conversations growing over time, such as repeated transmission of history, rapidly increasing context costs, and web UI rendering lag. The plugin provides context load measurement, session state logging, automatic compaction (disabled by default), and browser view optimization (Lite rendering mode). It helps users manage resource usage by accurately tracking token consumption, and improves the interaction smoothness of long-conversation interfaces using CSS techniques.

Read More