DSH 插件市场DeepSeek Harness 社区插件目录

dsh-block-ptc

已验证 记忆与上下文 ★ 103 0.5.0

AI-managed Auto Compact for DeepSeek Harness: the agent decides when to compact context and what to retain as work progresses, without waiting for a fixed token threshold.

一句话定位

AI-managed Auto Compact for DeepSeek Harness: the agent decides when to compact context and what to retain as work progresses, without waiting for a fixed token threshold.

安装方式

在 DSH 的 web profile 中执行下面的命令;装完刷新页面即可。

$ dsh plugin --profile web add dsh-block-ptc@0.5.0

兼容的 DSH 版本

>=0.2.2-rc.1

作者与热度

mengwEX · ★ 103 · 更新于 2026-11-09

关于这个插件

dsh-block-ptc

English | 中文

Auto Compact with AI-managed context for DeepSeek Harness.

The agent manages its own context as work progresses: it decides when to compact, which blocks to organize, and what information to retain. It can organize context before a fixed token threshold is reached. Information still needed for execution, replies or discussion is retained in full; material no longer needed can be condensed or omitted.

Blocks are the mechanism for organizing related work in PTC mode. The agent submits the retained content through block_compact({ ids, content }), and the plugin replaces the block interval in its next request. Original messages stay in the append-only session log. The host's native automatic compaction can continue to run alongside it.

Version 0.5.0 adapts to DSH 0.2.2-rc.1 and its native PTC executor interface. Update DSH first, then update this bundle, restart, and start a new Block PTC session. The API remains block_compact({ ids, content }). DeepSeek Harness 0.2.2-rc.1 or newer; no upper version bound Community plugin maintained by mengwEX Native PTC execution — reuses the executor supplied by DSH License: MIT Table of contents Why Context and cache comparison How it works Install Quick start Reference Design notes Verification Troubleshooting Known limits Development License Why

A token-threshold trigger tells a system when space is running low. The agent also knows which work is still active, which results have already been reported, and which details it will need next.

This Auto Compact mechanism lets the agent use that task knowledge to manage context proactively. It organizes work into blocks, keeps material needed for execution and discussion, and compacts earlier material when it is no longer needed or when reported work gives way to other work. The same agent writes the retained content; no separate summarizer model is called. Native threshold-triggered compaction remains available as a separate fallback. Context and cache comparison

Mechanism illustration, not an API benchmark. Both panels replay the same synthetic four-task workload with assigned token weights. Full bar = input context; blue = modeled cache hits, orange = modeled cache misses. Cached tokens still occupy the context window.

After a block closes, the next request carries a summary in place of its completed work. Replacing history can also invalidate the cached suffix: smaller context does not guarantee a higher cache-hit rate or a lower bill. The closing assistant/tool pair settles before replacement; original user messages remain. The baseline has not reached its automatic compaction threshold.

See the data, assumptions and reproduction steps. The plugin's tokensFreed is not a provider cache-hit measurement. How it works

The model's whole surface is the built-in PTC transport plus one program-callable:

相似插件