TT-Wang/dsh-slice-agent-loop
一个即插即用的DeepSeek Harness智能体循环,其上下文引擎采用有界切片而非不断增长的记录。
Project Overview项目介绍
This is a native DSH plugin built exclusively for DeepSeek Harness versions 0.1.5-rc1 and 0.1.5-rc2, that implements a custom conversational context retention policy. It runs alongside the stock DSH agent loop, and preserves all of the host’s original lifecycle management, scheduler, inbox, persistence, and full request reconstruction logic. It is an additive add-on that only adds new context slicing functionality without modifying any core code, and the repository includes pre-built generated artifacts for direct installation via DSH’s built-in plugin installer.
It is intended for developers running long-lived agent sessions who need to retain access to full historical context without bloating the size of the current active prompt. It is most commonly used alongside the Agent Swarm DSH plugin, where it acts as the session context layer for each individual worker session in a swarm mission. It compresses the size of older context while keeping all original records available for recall, and users can retrieve any older conversation turns or tool results using the built-in recall_turn and expand_result tools whenever needed.
The plugin is released under the open-source BSD-3-Clause license, and it already bundles all required generated build artifacts so no extra compilation step is needed. You must keep the stock agent-loop and agent-loop-invariant modules enabled to use it, and you should not install the standalone dsh-tool-result-fold plugin alongside this one, as this plugin already bundles that functionality internally and duplicate registration will cause a load error. It does not guarantee reduced token billing, because provider caching may not recognize already sealed content, so you should test it with your typical workload to confirm it meets your needs.
这是一个专为 DeepSeek Harness 开发的原生插件,为 0.1.5-rc1 和 0.1.5-rc2 版本实现了一套对话上下文保留策略。它和原生代理循环并行运行,完整保留了宿主的生命周期、调度器、收件箱、持久化以及全请求重建逻辑,采用仅追加的日志模型封存超出保留数量的旧对话轮次,不对核心代码做侵入修改。
该插件主要面向需要长时间运行代理会话、又希望保留完整历史上下文不膨胀当前提示词的开发者。它通常和同为原生 DSH 插件的 Agent Swarm 配合使用,作为每个工作会话的上下文层,在压缩旧上下文体积的同时保留所有原始记录的召回入口。用户需要时可通过内置的 recall_turn、expand_result 等工具召回任意旧对话轮次或工具结果。
该插件采用 BSD-3-Clause 许可证开源,可直接通过 DSH 的插件安装器从本仓库安装使用。用户需要保持原生的 agent-loop 及相关模块处于启用状态,且不要同时安装独立版本的 dsh-tool-result-fold 插件,因为本插件已经内置了该功能。它不保证能减少 token 计费,因为服务商缓存可能无法命中已封存的内容。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-slice-agent-loop(TT-Wang/dsh-slice-agent-loop)
仓库:https://github.com/TT-Wang/dsh-slice-agent-loop
本站详情页:https://www.yhbd.top/plugins/tt-wang-dsh-slice-agent-loop/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 6 · 最近提交 2026-09-26 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:TT-Wang/dsh-slice-agent-loop
把 TT-Wang/dsh-slice-agent-loop 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-slice-agent-loop
A conversational-context retention policy for DeepSeek Harness 0.1.7-rc.2 / 0.1.7-rc.1 (session format V4). It runs alongside the stock agent loop, keeping the host's lifecycle, scheduler, inbox, persistence, request-series handling and full request-reconstruction invariant. The patch is additive: it adds this plugin and nothing else.
History model: an append-only tape
At the first step of a turn, eligible assistant/tool spans from completed turns beyond history.keepRecentTurns (default 0) are sealed into frozen [slice tape v1 …] user/message surface replacements at their original positions, with source kind plugin:slice:history. Existing entries are never re-rendered or nested. Sealing preserves the surface prefix through the last existing entry; newly eligible older nodes are left in place rather than backfilled ahead of that prefix. Protected nodes can split a turn into several entries.
Every original human user message still present on the host surface stays verbatim at its original node, in every turn. User text is not copied into the tape. The system prompt (surface node 0, replaced in place only by the host) and every other system/message / developer/message node are never sealed or cited. Instruction messages, multimodal input and the newest runtime-context snapshot (source kind runtime-context) also keep their original sources and positions. Superseded snapshots can be absorbed with their turn only after the frozen prefix. A snapshot that becomes superseded later, before an existing entry, stays raw at its original position. Snapshot text is never rendered as a human request. Raw events remain in the session log and can be recalled after sealing, folding or resume.
Frozen entries preserve their bytes, but this does not guarantee that each request bills only one new entry: a seal can make everything after its position miss the provider cache, including retained raw turns. See Prefix behaviour.
Entry contents
One entry renders, in order:
- a header naming the span:
[slice tape v1 · turns N-M · K turn(s) sealed · recall_turn({"turn":"<n>","view":"dialogue"}) returns a turn's dialogue; expand_result({"seq":<q>,"formatVersion":4}) returns a tool result]; - per sealed turn:
[turn N], then every visible assistant text message in that span, in source order, each with a reply wrapper and its source locator; by default the entire text is preserved, including whitespace and messages preceding a tool call; - the turn's read index line (below);
- the turn's tool lines —
[tool turn N step S seq Q · <name> · <size> chars · expand_result({"seq":Q,"formatVersion":4})], at most 6 per turn, each pointing at the durable log record instead of repeating the text.
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ZSeven-W/dsh-ios
jsdvjx/dsh-strata
Tkingxiao/dsh-any-background
hellodigua/dsh-share
KaichenCurry/dsh-design-mode
a903067276-rgb/dsh-file-upload
zmm863-commits/dsh-agnes-studio