DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Cwl — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-cwl

Cwl

CWL — DeepSeek Harness 的上下文窗口生命周期管理:结构化上下文驱逐(arXiv:2606.11213)。当上下文压力超过预算时,分级、确定性地清除探索/操作回合,无需 LLM;不会产生摘要损失,不会幻觉,且永不清除用户消息。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-cwl@0.2.1
README兼容性版本

兼容性与来源证明

Cwl 以 dsh-cwl 发布,当前版本为 0.2.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/9/4

版本

0.2.1stable
2026/9/4
0.2.0stable
2026/9/3

相关插件

正在加载相关插件…

最新版
0.2.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
103.7 kB
文件数
13
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/9/4
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。

README

dsh-cwl

CWL — Context Window Lifecycle for DeepSeek Harness: structured context eviction for long-horizon agents.

Paradigm: Beyond Compaction: Structured Context Eviction for Long-Horizon Agents (arXiv:2606.11213, Kiz8)

English | 简体中文

Why not summarization compaction?

Compaction (the standard response to context pressure) summarizes history with an LLM. Four structural problems (per the CWL paper):

  • Unpredictable lossiness — the summarizer decides what matters, not the task.
  • Structural destruction — causal chains (tool call → output → decision → action) collapse into prose.
  • Blocking cost — a full LLM call fires mid-task, under token pressure.
  • Compression-induced hallucination — summarization under length pressure is a known failure mode.

CWL treats the transcript as a structured record of work and evicts deterministically: the agent's trajectory is inferred into a typed episode graph (exploration expl / action act, with dependency edges), and when context pressure exceeds budget, a zero-LLM, deterministic policy strips content in graduated levels — exploration episodes first (pure context, safest), then action episodes whose effects are already persisted. User messages are never evicted.

How it works

  1. Episode inference (automatic, no agent annotation needed): consecutive same-type tool batches merge into semantic episodes (expl for pure read/search — including read-only bash like grep/cat — act for anything with side effects: edit/write/write-style bash). Each user message closes the current episode (a turn boundary), and episodes are capped at a batch limit, so even a single-request long autonomous run (dozens of tool calls) splits into bounded, evictable segments instead of collapsing into one giant episode. An act that touches files an earlier expl read gets a dependency edge.
  2. Pressure metering: real context pressure = input + cacheRead + output + reasoning tokens (accumulated from assistant/message usage events — tokenMeter.measure().totalTokens omits cacheRead, which dominates long sessions).
  3. Graduated eviction on the agent/pre-step waterfall (before every LLM call), from fine to coarse:
    • content stubbing (fine): large tool-result contents in expl episodes are rewritten to a short stub first ([cwl-stub: …]) — structure kept, tokens cut, tool pairing intact
    • whole-episode eviction (coarse): expl episodes first (pure context, one-line "explored: …" marker), then completed act episodes; executed as positional blocks in the surface (positions are the invariant that survives replaces — an eviction never splits a tool-call/result pair into orphans)
    • never touch the newest tail (preserve-recent) or user messages
    • evicted ranges are replaced with a lightweight marker via the official surface-replace seam (original events stay in the log; cwl_recall can restore file paths)

Install

dsh plugin --profile <name> add dsh-cwl                 # from npm
dsh plugin --profile <name> add github:kalifun/dsh-cwl  # or from GitHub

Or vendor the directory and add to your composition:

- id: dsh-cwl
  name: ./dsh-cwl/index.js

Usage

No configuration needed. It stays completely inert while context is under budget (default 80% of the model's context window), and starts evicting only when pressure exceeds budget.

# Optional: override the budget (tokens) — for testing pressure behavior
DSH_CWL_BUDGET=30000 dsh web

Eviction policy (deterministic cache-replay validation: eviction −24% cacheRead, strategy-independent; batch best mean −24.7%, consistent across 7 sessions → defaults below; override via env):

Env varDefaultValuesEffect
DSH_CWL_EVICT_ORDERtailtail / oldestoldest evicts oldest episodes first
DSH_CWL_EVICT_BATCHon0 / false / off to disablemerge adjacent episodes into one surface replace (fewer cache breaks)
DSH_CWL_EVICT_TAIL_WINDOW0Nonly evict episodes whose end falls within the last N surface nodes
DSH_CWL_STRIPon0 to disablefine-grained level: stub large tool-result content in expl episodes before whole-episode eviction (structure preserved)
DSH_CWL_STRIP_THRESHOLD1500charsminimum result text length to be stubbed
# back to the conservative config (oldest, per-episode replaces)
DSH_CWL_EVICT_ORDER=oldest DSH_CWL_EVICT_BATCH=0 dsh web

Session analysis (per-round token breakdown + "cacheRead of the round after an eviction"):

node tools/analyze-session.mjs <session.jsonl>

Agent-facing tools:

ToolPurpose
cwl_recalllist file paths touched by evicted episodes, to re-read on demand

Observability:

EndpointPurpose
GET /api/cwl/evictionseviction log (session → episodes evicted)
POST /api/cwl/forcedebug: force one eviction on a session

Verification

node check.js          # pure-function unit checks (episode inference, eviction policy, strip, pairing)

Live capability benchmarks (helmsman platform): BENCHMARKS.md — the fixed test plan (scenario A: 12-round long conversation; scenario B: single-request long autonomous task ×3) with per-version data rows, refreshed after every behavioral change.

Offline regression tools (run on your own local sessions — no data leaves your machine): tools/cache-replay.mjs (deterministic cacheRead), tools/replay-real.mjs --apply (engine apply-layer with real surface fold + tool-pairing assertion), tools/eval-episodes.mjs.

License

MIT