dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
给 QQ 那一条线单独装一张嘴:把口径文件挂成那段会话的系统提示段,只挂 QQ,别的线一个字不动;改 md 就生效,不必重装插件。须把 home 指向放有口径文件(默认 QQ线口径.md)的目录才生效;应挂进 QQ 的 preset,而非全局插件列表。
把一份渠道口径文件只挂进某个渠道会话的系统提示里,让那条线答得短,别的会话一个字不动。
同一份通用人设管的是「这个 agent 是什么样」,管不了「这条管道只放得下多少字」。即时通讯那条线通常要一两行说清,而别的会话(桌面端、文档式的活儿)需要正常篇幅。两套口径打起来,输的永远是长度那条——因为长度是硬约束,人设是软约定。
这个插件把一份单独的渠道口径(一份 Markdown 文件)挂成系统提示里的一个段,而且只挂在指定的那个 preset 上:home 指的目录里有这份文件就挂,读不到就整段不挂,绝不把会话建不起来。
走系统提示、不往消息历史里注入:后者会进消息历史、每轮都占上下文,而这本来是长期口径。文本是每次组装提示时重新解析的(带 mtime 缓存)——改完那份 md,下一轮就生效,不用重装插件。
dsh plugin add hzh5021/dsh-qq-voice手工四步:
~/.dsh/plugins/dsh-qq-voice/。package.json 里 dependencies 加一条(本机口径:"dsh-qq-voice": "file:../../plugins/dsh-qq-voice"),并在 profile 的 node_modules/ 下留一个同名联接。package.json 的 dsh.profile.bundles 里加上 "dsh-qq-voice"。注意这个包的用意是只活在目标渠道那个 preset 里,不是挂在 profile 顶层花名册上:
preset- 的插件行(放在 preset 里,它才只影响那一段会话)。cordis.patch.yml 留着,是因为 package.json 声明了 dsh.bundle.patch;万一有人把它当普通 bundle 装进来,插进去也只是一段提示词,不碰任何运行时状态。键 · 默认 · 说明 home · "" · 口径文件所在目录;空 = 不挂这一段(等于关闭) file · "QQ线口径.md" · 相对 home 的文件名 after · "DEPLOYMENT_PERSONA_SUFFIX" · 插在这一节后面——位置比内容要紧 fallbackOrder · 10201 · 拿不到 after 那节的顺序值时用的 order
- id: qq-voice
name: dsh-qq-voice
config:
home: /path/to/your/home
file: QQ线口径.mdinject = ["systemPrompt"]。Cordis 的规矩是没报名的服务连读都不让读,而除了往提示词里放一段字,这个插件什么都不干。after 那一节的顺序值(ctx.systemPrompt.getSectionOrder(opts.after)),取 +1 插在它后面——先读完「我是谁」,紧接着就是这条渠道的规矩。拿不到(宿主没这节的贡献方、或者没有这个方法)就退到 fallbackOrder;不能因为要不到位置就不挂。qq-voice:channel,interpolate: false(内容是中文,不该被当成模板变量解析)。挂载时在正文前加一句固定的中文前言,声明「本段只约束当前渠道」。ctx.systemPrompt.section();没有就整段挂不上(只记日志,不报错)。getSectionOrder 是可选的:没有它就用 fallbackOrder,段照挂。node:fs、node:path)。node test/smoke.mjs不碰 profile、不碰 DSH 进程:造一个只有 systemPrompt 的假 ctx,跑 apply() 看挂出来的段对不对——正常路径(文件在、位置取得到)、位置取不到时的兜底、文件改过之后跟不跟着变、文件不在时的行为。
What it does — Mounts a per-channel speaking-rules Markdown file as one named section of the system prompt, and only for the preset it is installed into — so a chat channel answers in one or two lines while every other conversation keeps its normal length. The file is re-read when it changes (mtime cache), so editing the Markdown takes effect on the next turn without reinstalling. Nothing is mounted when the file is missing.
Install — dsh plugin add hzh5021/dsh-qq-voice, or drop the package into ~/.dsh/plugins/dsh-qq-voice/ and register it — preferably inside the target preset's plugin row rather than the profile-wide roster — then restart DSH.
Config — home ("", empty = disabled), file (QQ线口径.md), after (DEPLOYMENT_PERSONA_SUFFIX), fallbackOrder (10201).
Requirements — DSH exposing systemPrompt; Node 18+; no external dependencies.
License — MIT.
MIT 许可。