dsh-infinite-gen-3
Minglink/dsh-infinite-gen-3DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投影在输入框上方显示实时破甲状态徽标。
DSH 插件:把人设正文注入系统提示词,把历史对话注入上下文。设置页的人设管理负责保存与编辑,对话模式选择行下方可以随时切换人设。
Bilingual README. 中文 · English
它负责两件事:把一段文字送进系统提示词,把一段对话送进上下文。为了说清楚,本文与插件设置界面统一使用两个叫法:
叫法 · 指的是 人设正文 · 注入系统提示词的那段内容 历史对话 · 作为上下文注入的一段"已经发生过"的对话
两者按人设成对保存:在设置页把人设正文和历史对话写好、存成一条预设「人设」,之后在对话里选中这条人设,两者按各自的规则进入这一次请求。
人设正文进入系统提示词的人设段,注入位置可自行编辑:「段序权重」决定这一段排在系统提示词的哪个位置。
-1,排在预设里那句 "You are a coding agent…" 之前)。-1000000000 ~ 1000000000):小数、指数、带单位都会被拒绝保存。历史对话在新对话的第一步作为 user 侧上下文注入一次,并按仿照 DSH 自身注入的格式包裹:
,开口之后是 CONTEXT_ROAD:,结尾是 CONTINUE_CONTEXT.`;正文里出现的收尾标签会被转义,保证壳子不会被提前闭合。 里;模型侧的思考包在 里、说的话包在 里;双方非对话内容包在 之类的标记里;压缩摘要保持 …` 原样。已经注入过的对话不会重复注入(那会把整段对话的缓存读取推倒重来)。所以历史对话只在每个新对话的第一步生效;如果想让一个已经聊起来的对话也带上历史,只能把历史写进人设正文——但效果不好,不推荐。
四个开关各自撤掉一类模型本来能看到的系统侧输入:
开关 · 撤掉什么 只留人设 · 系统提示词里除人设段以外的所有段:harness 身份、部署人设、工具指引、计划模式策略、harness 源码说明。人设为空时,系统提示词就是空的。 屏蔽 runtime 上下文 · 两类:① 沙箱策略、审批策略、委派规则等以 user 角色快照下发的动态上下文;② 包在 `` 里的 runtime 快照与 skill 目录。 屏蔽 schema 工具 · 工具定义(它走独立的协议字段,不是系统提示词段,通常是最大的一笔 token)。打开后模型没有可调用的工具。 屏蔽其他注入内容 · AGENTS.md / CLAUDE.md 之类的指令基线与逐步时间读数——它们同样是以 user 角色消息追加进来的,只能按来源过滤。
四个开关全开、且没有选中人设,就是纯聊天:系统侧注入归零,模型只看到你发的内容。对话界面的选择框里有「一键纯聊天 / 恢复系统输入」按钮直接切换这两个状态。
工具保活通道(「可复用工具」):屏蔽 schema 工具的保险丝。DSH 的工具账本要求每个对话有一份非空的工具声明基线,基线一旦被清空,回来的工具都会被打上 deferred 标记并被服务方以 INVALID_REQUEST 拒绝。勾上它,插件只在两个时刻保留完整工具列表各一轮——这个对话的第一次请求,以及疑似声明序列重启(例如压缩)时——先让基线建立起来,之后无论怎么开关屏蔽,工具都还能回来。
以下为关闭所有系统测注入后,你能够真实达到的token消耗
导出(设置页编辑器里那条人设的正文 + 段序权重 + 历史对话一起走):
导入:
.json,或「导出图片」生成的那张 .png,作为新人设追加进列表——绝不覆盖已有条目。/export 产生的 .zip,也接受裸的 session.vN.jsonl / session.jsonl,以及 .jsonl.zstd / .zst。导入时两个独立开关:对话模式选择行下方那个「人设」展开:
complete: true 的「极简模式」);本对话已经聊过,所以这条人设的历史对话不再注入;或「可复用工具」没勾。/persona-select/(DSH_HOME 默认 ~/.dsh):
文件 · 内容 personas.json · 全局设置、人设列表、每个对话的选择与开关 personas.json.v2-backup · 旧版升级时的备份,可删 history/.txt · 各条人设的历史对话正文
设置页与对话界面均跟随宿主语言,内置中文 / English 两套文案。
插件中“鲸鱼娘”的形象描述来自@ZipZipPipe,遵守CC BY-NC-SA 4.0协议再创作并开源,请尊重相关形象创造者。
Two jobs: put a block of text into the system prompt, and put a stretch of conversation into the context. To keep the wording precise, this README uses the same two names as the plugin UI:
Term · Meaning Persona text · the content injected into the system prompt Conversation history · a stretch of "already happened" dialogue injected as context
The two are stored together as one persona: write the text and the history in the settings page, save them as a persona preset, then pick that persona in a conversation and both enter the request by their own rules.
Persona text becomes the persona section of the system prompt, and its position is yours to edit: the "Section order weight" decides where that section sits.
-1, ahead of the preset line "You are a coding agent…").-1000000000 to 1000000000): decimals, exponents and units are refused on save.Conversation history is injected once, as user-side context, at the first step of a new conversation, wrapped in a shell that imitates how DSH itself injects context:
pair, opened by CONTEXT_ROAD: and closed by CONTINUE_CONTEXT.`; any closing tag occurring in the body is escaped so the shell can never be closed early.; the model side's thinking goes inside , its spoken content inside ; non-conversational content from either side (tool calls, multimodal parts) goes inside markers such as ; compaction summaries stay wrapped in …`, verbatim.A conversation that has already been injected is never injected again — doing so would tear down the whole conversation's cached input(KV cache). History therefore only takes effect on the first step of each new conversation. If an already-running conversation must carry history across a persona switch, you can write that history into the persona text itself — the result is poor, so it is not recommended.
Four switches, each removing one class of system-side input the model would otherwise see:
Switch · What it removes Persona only · Every system-prompt section except the persona: harness identity, deployment persona, tool guidance, plan-mode policy, harness-source notes. With no persona selected the system prompt is empty. Suppress runtime context · Two families: (1) sandbox policy, approval policy and delegation rules delivered as user-role snapshots; (2) the runtime snapshot and skill catalog framed as `` blocks. Suppress tool schemas · Tool definitions (a separate wire field, not a prompt section, and usually the biggest token item). With this on the model has nothing to call. Suppress other injections · The AGENTS.md / CLAUDE.md instruction baseline and per-step time readings — also user-role messages, so they can only be filtered by provenance.
All four on with no persona selected is pure chat: zero system-side injection, the model sees only what you send. The picker in the conversation view has one-click Make it pure chat / Restore system input buttons.
Tool-keeping channel ("Reusable tools"): the safety valve for "Suppress tool schemas". DSH's tool ledger requires a non-empty tool-declaration baseline for the session; once that baseline is emptied, tools that come back are all marked deferred and the provider rejects the request with INVALID_REQUEST. When checked, the plugin keeps the full tool list for exactly one turn at two moments — the session's first request, and a suspected declaration-series restart (a compaction, for example) — so a non-empty baseline gets written. Afterwards tools can always come back no matter how you toggle suppression.
This is what token consumption really looks like after every system-side injection is disabled!
Export (the editor's persona text + section order + history together):
Import:
.json this plugin exported, or the .png from "Export image", and append it as new personas — existing entries are never overwritten..zip produced by /export, or a bare session.vN.jsonl / session.jsonl, or a .jsonl.zstd / .zst. Two independent options:The "Persona" dropdown under the mode selector:
complete: true); the conversation has already been chatting, so its history will not be injected; or "Reusable tools" is unchecked./persona-select/ (DSH_HOME defaults to ~/.dsh):
File · Contents personas.json · global settings, the persona list, and each conversation's selection and switches personas.json.v2-backup · migration backup, safe to delete history/.txt · the conversation history body of each persona
Settings page and conversation picker follow the host language, with Simplified Chinese and English built in.
The “DeepSeek chan” likeness used by the built-in persona comes from @ZipZipPipe; it is re-created and open-sourced under the CC BY-NC-SA 4.0 licence. Please respect the creator of the likeness.
MIT