Moeblack/deepseek-manners 预览 preview

Moeblack/deepseek-manners

DSH 插件:在每条消息后注入感谢语 | DSH plugin: 在每次消息后自动添加感谢语句 (deepseek-manners)

Project Overview项目介绍

This is a plugin built exclusively for DeepSeek Harness (DSH), designed to inject custom text at the end of every user-facing payload sent to DeepSeek. It can be installed directly through DSH’s command line interface by running the command dsh plugin --profile web add github:moeblack/deepseek-manners, or linked from local source code with a similar command. Pre-built output files index.mjs and client.js are already included in the repository, so no extra build steps are required after installation. Once installed, a heart-shaped toggle appears next to the input box on DSH’s web interface to quickly turn the injection on or off.

The core use case for this plugin is to add custom role-play prompts, adjust how the model handles its thinking process, and set specific requirements for output format and tone. All injected content is controlled via the text field in the deepseek-manners section of DSH_HOME/settings.yaml. Users can write multi-line injected content using YAML block scalar syntax, which preserves line breaks for structured instructions. The plugin only injects content during the first model request of a new conversation turn, and manages old suffixes based on the length of the assistant’s most recent reply to preserve prompt cache integrity.

Changes to the plugin’s configuration do not require a full restart of your DSH instance, because DSH enables hot reloading of configuration files by default, and any valid change will take effect within 1 to 2 seconds. If you enter invalid YAML syntax in the configuration section, DSH will keep the last working valid configuration and send a warning alert to the service logs, so it will not crash your running DSH instance. This plugin is also specifically adapted to work with the chain-of-thought overwrite mode from the public deepseek_v4_rolepaly_instruct repository.

这是一个专为 DeepSeek Harness(DSH)开发的原生插件,功能是在每次用户请求的 payload 末尾注入自定义文本。它支持通过 DSH 命令行直接从 GitHub 安装,也支持本地源码链接安装,仓库已经提交了预构建的 index.mjs 和 client.js,安装后不需要额外执行构建步骤。安装完成后,DSH 的 Web 界面输入框右侧会新增一个心形开关,可随时开启或关闭注入功能。

它主要用于给模型追加自定义的角色扮演要求、修改模型思考模式、指定输出格式要求。用户可通过 DSH_HOME/settings.yaml 配置文件中的 text 字段自定义注入内容,支持使用 YAML 块标量写法写入多行文本。它仅在当前轮次的第一个模型请求中注入文本,还可根据助理上一次回复的长度自动选择保留或清除之前的后缀,以此保护 prompt 缓存。

修改配置后不需要重启 DSH,因为 DSH 默认开启了配置文件的热重载功能,改动会在 1 到 2 秒内自动生效。如果配置中出现 YAML 语法错误,服务会保留最后一份合法配置,并在日志中发出告警,不会导致服务崩溃。该插件还专门适配了 deepseek_v4_rolepaly_instruct 仓库的思维链覆写模式。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • 14 stars - an early-stage project星标 14,属于早期项目
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:moeblack/deepseek-manners

把 Moeblack/deepseek-manners 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

deepseek-manners

在每次发消息之后给可爱的鲸鱼娘说谢谢(默认「谢谢你,鲸鱼大人」),仅当轮生效。

安装

本插件是 DeepSeek Harness(DSH) 的插件,需要先有一个可运行的 DSH。

本地源码装配

dsh plugin --profile web add -w link:/path/to/deepseek-manners

从 GitHub 安装

dsh plugin --profile web add github:moeblack/deepseek-manners

构建产物(index.mjs / client.js)已随仓库提交,git 安装无需额外构建步骤。

装配完成后,Web 界面输入框右侧会多出一个心形开关,用于随时开关注入。

配置

DSH_HOME/settings.yaml:

deepseek-manners:
  text: 谢谢你,鲸鱼大人
  enabled: true
  hideAboveChars: 2000   # 最近一Turn assistant 回复超过此字符数时跳过遮蔽(保护 prompt cache);0 = 总是遮蔽

机制

  • 仅在包含用户直接输入的 step(turn 的第一个模型请求)注入,落在 payload 底部
  • 只看最近一次 assistant 回复长度——
    • 回复短 → 回收最近一条旧后缀(surface replace 为空,日志保留)
    • 回复超长 → 跳过回收,该后缀永久保留(保护长回复的 prompt cache)

如何自定义注入文本

text 字段的内容会原样注入到每次上行 payload 的底部。你可以把它写成一段多行指令(YAML 块标量),用于:

  • 追加角色扮演风格的回复引导
  • 覆写模型的思考模式(think 标签行为)
  • 追加风格、语气、输出格式要求

text 不支持模板变量,写入什么就注入什么。

多行长文本写法

YAML 中使用 |(保留换行)或 |-(去掉末尾换行)块标量:

deepseek-manners:
  text: |-
    以下是对本次回复的补充要求,请严格遵守:

    1. 回复开头使用角色惯用的口头禅,保持角色语气一致。
    2. 思考过程放在 <think> 标签内,正文直接输出。
    3. 正文不使用列表式结构,用自然段落叙述。
    4. 每次回复控制在 200 字以内。
  enabled: true
  hideAboveChars: 600

块标量内的每一行都要至少缩进 6 个空格(text: 本身缩进 2,正文在它之下再缩进 4)。

生效方式

  • 修改 settings.yaml 后无需重启:DSH 的 dsh-settings-file 默认开启文件热重载(chokidar,100ms 防抖),改动 1-2 秒内自动生效。
  • 若 YAML 语法错误,服务会保留最后一份合法配置并在日志告警,不会崩溃。

示例:注入思考模式覆写

deepseek-manners:
  text: |-
    <think>
    请在思考过程中遵循以下约定:

    - 先简要分析当前对话的目标与立场。
    - 列出 2-3 个可选回应方向,再选择最符合角色设定的一项。
    - 思考结束后直接输出正文,不重写、不检查。
    </think>
  enabled: true
  hideAboveChars: 600

额外用法(主要用法)

← 上一个 Prev deepseek-harness-android 下一个 Next deepseek-harness-whitepaper →