dsh-vcc: Deterministic VCC Compression and Lossless Recall for DSH Sessions

Introduction

When running long sessions in DeepSeek Harness (DSH), the context window will eventually fill up. The common practice is to call the LLM again to compress history into a summary; however, this incurs costs and latency, and the results of compressing the same conversation segment twice may be inconsistent. If you wish to perform compaction under the cordis preset but do not want to hand the “compression step” over to a model, you need a path that does not rely on the LLM, produces reproducible output, and allows content removed by compression to be retrieved by index number. Below is an introduction to the community plugin dsh-vcc (maintainer mpetruc), which compiles conversations into structured summaries and uses (#N) and vcc_recall for deterministic recall.

What is this

dsh-vcc (package name @local/dsh-vcc, version 1.0.0, MIT) is geared towards Deterministic VCC compaction for DSH: when a session exceeds the window, instead of calling the LLM, it uses a deterministic pipeline to organize the conversation into a stable summary while retaining a lossless index to the full session log. The implementation idea is adapted from the view-oriented compiler of pi-vcc; on SkillHub, it is categorized as a workflow. The plugin hooks into the compaction group of the cordis agent preset via cordis.patch.yml and disables the built-in LLM compaction backend in the same group.

Core Features

Structured Summary

The compression result contains fixed header blocks, which are merged between multiple compactions (deduplication, cross-file merging; volatile blocks are rebuilt every time):

  • [Session Goal] / [Files And Changes] / [Commits] / [Outstanding Context] / [User Preferences]
  • A brief transcript sorted by importance (entries separated by ---), where each message retains a lossless (#N) reference corresponding to the seq in the session log.

vcc_recall

The index used by (#N) and vcc_recall is consistent; details not visible in the summary can be queried again by seq or semantically using the tool:

vcc_recall(query: "redis cache decision")     → ranked, paged hits (#N)
vcc_recall(expand: [42])                       → full untruncated content
vcc_recall(query: "#42:auth.ts")               → drill into a file from an entry
vcc_recall(query: "#42:auth.ts:full")          → all lines of that file content
vcc_recall(mode: "touched")                    → files worked on, with entry indices
vcc_recall(scope: "all")                       → also reach edited/retried branches

Commands

  • /vcc: Preview the “summary that the next compaction will write”, without modifying the session.
  • /vcc-recall: Use the same recall capabilities as vcc_recall in the form of a human command.

Integration with DSH compaction

DshVccCompactionEngine inherits from the basic compaction backend, retaining mechanisms such as threshold/overflow triggers, region selection, maxTokens reduction, retry, and persistence, while only replacing summarize with the compileRanked core from pi-vcc. It returns { summary, rawOutput, provider: 'dsh-vcc', model: 'deterministic' } and does not go through llmStreamCall.

Installation and Activation

For installation, refer to the README: use install_bundle in plugin_manager and specify the plugin directory (the example path is below; please replace it with the actual path of your local clone or extraction):

plugin_manager  →  install_bundle  →  target: /home/user1/dsh-compaction/dsh-vcc

Notes:

  • install_bundle records @local/dsh-vcc: link:<this dir> in the profile’s package.json and applies cordis.patch.yml; no restart is required for the first installation.
  • If the same package is already installed and you want to replace it with a new version, you need to restart the profile to load the new module.
  • Verification: Use cordis_inspect_query to view Host Config / Tool / Service; execute /vcc in a cordis preset session to see a live preview, execute /compact to trigger compression, and then use vcc_recall to query the shadowed history.

The plugin runs with the permissions of the current DSH process; before installation, please read the repository source code and the license and attribution notices in NOTICE yourself.

Typical Usage

  1. Start a session under the cordis preset, and let the conversation grow until compaction is triggered or manually executed.
  2. Before compression, use /vcc to confirm that the summary structure to be written meets your expectations.
  3. After compression, if the information for a certain (#42) in the summary is insufficient, call vcc_recall(expand: [42]) to get the full content, or use query / #N:path for search and drill-down.
  4. Use vcc_recall(mode: "touched") when you need to know “which files were touched”; use scope: "all" when you need to include edit/retry branches.

Applicable Scenarios and Notes

Who is it for

  • Developers who are already using the cordis preset in DSH and want compaction with zero LLM calls, zero network usage, and identical output for identical input.
  • Scenarios requiring structured summaries (goals, file changes, outstanding context, etc.) in long sessions, while hoping that content removed by compression can still be deterministically retrieved via seq.

v1 Known Scope (README)

  • Only effective for the cordis preset; standard / ptc / minimal still use the built-in compaction backend.
  • Only the current session is searchable; recall across historical sessions is not possible.

The DSH ecosystem emphasizes that “everything is a plugin”; SkillHub is a community directory and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-vcc changes long session compaction from “calling the model again” to “deterministic compilation + (#N) recall”, aligning with the existing compaction lifecycle under the cordis preset. To view the introduction and classification, you can open the SkillHub directory page; for installation, API, and module division, refer to the GitHub repository README.

  • Directory Page: https://www.skillhub.cn/plugins/mpetruc/dsh-vcc
  • GitHub: https://github.com/mpetruc/dsh-vcc
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye