前言¶
DeepSeek Harness(DSH)可以在同一会话里切换不同的 agent 来应答。每个 agent 的行为往往还取决于 system prompt 和部署侧的默认模型;若把这些写在 profile 的 YAML 里改,排查路径长,升级 profile 时也可能和手写补丁缠在一起。
dsh-agent-customizer 是 borncode-app 维护的客户端类插件:在 Web GUI 的 Settings → Agent customization 页面,为当前选中的 agent 编辑一段 Instructions(写入该 agent 的 system prompt),并设置 deployment default model。内容由插件旁的 state.json 持久化,不嵌进 bundle,profile 升级或拉取插件更新时一般不会被清空。
资料说明:原独立仓库 borncode-app/dsh-agent-customizer 已迁入 monorepo borncode-app/dsh-borncode(包路径 packages/dsh-agent-customizer)。新用户宜安装统一 bundle dsh-borncode,而非逐个安装旧仓库;旧链接仍可用。下文能力描述以 README 与 package.json 为准。
这是什么¶
- 名称:
dsh-agent-customizer(插件列表中常显示为agent-customizer) - 维护者:BornCode / borncode-app
- 分类:客户端(Web GUI 注入设置页)
- 许可证:MIT(© 2026 BornCode)
- 版本(package.json):1.0.0
一句话:让你在 Web 界面按 agent 粒度定制 Instructions 与部署默认模型,并在每轮对话把对应 Instructions 贡献进该 agent 的 system prompt。
核心功能¶
以下为 README 中已列出的能力:
- Per-agent instructions:每个 agent 独立编辑器;只有当前 agent 使用自己的文本块。
- Deployment default model:与 Instructions 同一页读写,不必在 YAML 里找 fallback 模型。
- Survives upgrades:文本存在插件目录的
state.json,不在 profile patch 里,减少升级覆盖风险。 - Bounded input:通过
maxLength在写入 system prompt 前拒绝过长粘贴。 - Localized UI:
locale/提供英文、泰文、中文界面串。 - 无额外运行时负担:README 写明无网络调用、无凭据、无后台定时器。
环境与要求¶
| 项 | 说明 |
|---|---|
| DeepSeek Harness | 0.2.x(带 Web GUI) |
| Runtime | Node 24,由 Harness 运行时提供 |
| 平台 | Windows、macOS、Linux |
安装与启用¶
README 给出的安装方式是:将 bundle 放到本机稳定目录后,在 DSH 中安装该目录。因任务要求不采用 git clone,可按你已有的获取方式(例如 release 包、monorepo dsh-borncode 中的 packages/dsh-agent-customizer 路径)准备好目录,再执行下列之一。
在 DSH 打开 Plugins,从该目录安装 bundle;或让 agent 执行:
plugin_manager install_bundle target=C:\path\to\dsh-agent-customizer
(将路径换成本机实际目录;Linux/macOS 使用对应绝对路径。)
安装后重启一次。列表中会出现 agent-customizer 行;profile 通过 link: 引用目录,后续在目录内更新插件即可原地生效。
若你安装的是合并后的 dsh-borncode bundle,则按该仓库说明安装一次即可包含本插件,无需再单独装旧独立仓库。
配置¶
通过 profile 的 cordis.patch.yml 覆盖 bundle 默认项(cordis.patch.yml 会插入 host row):
| 字段 | 默认值 | 含义 |
|---|---|---|
endpoint |
/plugins/agent-customizer |
Web GUI 读写定制内容的 HTTP 路径 |
maxLength |
20000 |
Instructions 允许的最大字符数 |
示例:
- id: agent-customizer
config:
maxLength: 40000
典型用法¶
- 完成安装并重启 DSH。
- 在 Web GUI 进入 Settings → Agent customization。
- 选择要配置的 agent,在 Instructions 编辑器中写入希望进入该 agent system prompt 的说明,保存。
- 在同一页设置 deployment default model(部署默认模型)。
- 切换会话中的 agent 验证:每个 agent 只应看到自己对应的 Instructions 块。
工作原理(简)¶
- Host row 在 Web GUI 源站注册小型 HTTP endpoint,并加载
state.json。 - 客户端
client.js渲染当前 agent 的编辑器,并通过 PUT 写回文本。 - 每一轮对话,host row 把已存文本贡献给该 agent 的 system prompt,不做其它改写。
主要文件:index.js(endpoint、持久化、system-prompt 贡献)、client.js(设置页 UI)、cordis.patch.yml(插入 host row)、locale/{en,th,zh}.json。
适用场景与注意¶
适合:需要在 GUI 里长期维护「多 agent、每人设不同 Instructions / 默认模型」的 DSH 用户;希望 Instructions 与 profile patch 解耦、减少升级丢配置的情况。
注意:
- 插件随当前 DSH 进程权限运行;安装前请自行查看源码与 MIT 许可证,确认符合你的环境策略。
- 社区目录 skillhub.cn 为独立站点,与 DeepSeek / 幻方无官方从属关系;插件星标(目录线索)为 0,选用时以功能与源码为准。
- 迁入 monorepo 后,长期维护以
dsh-borncode为准;旧仓库 README 仅作跳转与兼容链接。
结尾¶
dsh-agent-customizer 把「按 agent 的 Instructions + 部署默认模型」收到 Web 设置页,并用 state.json 持久化,适合在 DSH 0.2.x 上做多 agent 人设与模型 fallback 的日常维护。
- 目录页:https://www.skillhub.cn/plugins/borncode-app/dsh-agent-customizer
- GitHub(兼容):https://github.com/borncode-app/dsh-agent-customizer
- 新归属 monorepo:https://github.com/borncode-app/dsh-borncode