Xilin3/dsh-prompt-persona 预览 preview

Xilin3/dsh-prompt-persona

DSH插件:在设置页面编辑系统提示词(部署角色),并支持实时预览。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds a dedicated persona editing section to DSH's web settings page. It lets users edit the core deployment persona directly without modifying DSH source files or manually editing patch configuration files. All changes can be previewed in real time before saving, and three injection modes are supported: replace, append, and turn off. To install, users can choose between three methods: runtime injection for local development, bundle assembly for production, or local directory mounting for custom setups. After installation, you will need to run the included link-deps script to link DSH host dependencies, otherwise you may encounter an error that required @deepseek-ai packages cannot be found.

This plugin is designed for any DSH user that wants to customize their agent's system persona to fit specific use cases, from coding to data analysis. The typical workflow is straightforward: open the DSH settings page, navigate to the new System Prompt section, enter your custom persona text, select your preferred injection mode, and click the preview button to see the full assembled prompt. You can adjust the text as needed before saving, so you do not have to worry about breaking your existing configuration. It also supports template variable interpolation for dynamic values like current model, provider, and working directory.

The plugin is released under the open source MIT license, so it is free to use, modify, and distribute. It relies on peer dependencies provided by the DSH host, including @deepseek-ai/dsh-settings for configuration management and @deepseek-ai/schemastery for configuration schema validation. It also uses optimistic locking for saves to prevent overwriting concurrent edits made by other users, which reduces conflict issues when working in shared environments. There are two known minor issues: cached node resolution failures can be fixed by restarting the DSH process, and the HTTP route is not behind the web auth gate, so users need to assess exposure risk if hosting DSH publicly.

这是一个专为 DeepSeek Harness(DSH)开发的原生插件,用于在 DSH 的网页设置页面可视化编辑系统提示词(部署 persona)。用户无需修改 DSH 本体文件,也不需要手动编写 cordis.patch.yml 文件,就可以直接编辑、实时预览并持久化保存 persona 修改,支持替换、追加、关闭三种注入模式,还可在保存前预览完整生效提示词,不会污染当前已有配置。

这款插件适合需要自定义 DSH 系统角色的开发者或普通用户使用。典型工作流为:打开 DSH 设置页面,在新增的「系统提示词」区块输入自定义 persona 内容,选择注入模式后点击预览即可查看最终提示词效果,确认无误后保存即可生效。它还支持模板变量插值,可动态获取当前模型、服务商、工作目录等信息。

插件采用 MIT 许可开源免费使用,安装可通过 dsh 命令行、运行时注入或本地挂载三种方式完成。安装后需要运行配套脚本链接宿主依赖,否则会出现包找不到的错误。它采用非破坏性修改方式,不会删除原有配置中的其他历史字段,已知节点解析缓存问题可通过重启 DSH 解决,开放 HTTP 路由时需注意评估暴露面的安全风险。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 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:xilin3/dsh-prompt-persona

把 Xilin3/dsh-prompt-persona 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

@xilin3/dsh-prompt-persona

license topic

一个 DeepSeek Harness(DSH)插件:在 Web 设置页里可视化编辑系统提示词(部署 persona),并实时预览改动效果。即「给 Harness 加系统提示词」的方法 1 —— 改部署 persona。

在 Harness 的系统提示词组装模型里,部署 persona 是唯一一段「由配置/部署作者撰写」的片段(order 0)。本插件接管这段片段,把它变成设置页里可直接编辑、可预览、可持久化的内容,而无需改动 Harness 本体或手写 cordis.patch.yml。

当前版本:0.4.0 — 已适配 DSH 0.2.0-rc.2。 兼容性改动见下方「版本适配」。


版本适配(0.2.0-rc.2)

DSH 0.2.0 把设置页的槽位声明从 dsh-client-ui-settings 搬到了新的 dsh-client-ui-settings-general(设置外壳:侧栏、导航、settings.section 的 children 表)。 插件依赖的宿主 API 其余部分(system-prompt 注册表、settings 服务、webServer、 agentDefaultModel、whileServed)在 0.2.0 上契约不变,所以这一版主要是声明与 依赖准备的问题,而不是逻辑改写:

断裂点 0.1.7-rc.2 现在(0.2.0-rc.2) 本插件的处理
settings.section 槽位声明方 @deepseek-ai/dsh-client-ui-settings @deepseek-ai/dsh-client-ui-settings-general(ui-settings 只剩 configForms 与共享镜像) dsh.client.inject 补上 general;slots.inject 本身会等声明出现(declaration epoch),补声明方是为了让它先到
宿主依赖解析 宿主包能从 npm 全局 dsh/node_modules 里被顺带解析到 桌面版从 app.asar 装载,解出来是平铺目录,没有兄弟包 link-deps.mjs 改为从根包出发求依赖闭包(dsh-system-prompt → cordis / dsh-scope → @standard-schema/spec …),漏一个就 ERR_MODULE_NOT_FOUND
桌面版安装目录探测 只读注册表 InstallLocation 桌面版写的是 DisplayIcon / UninstallString,InstallLocation 不一定有 三个值都读;另加 $DSH_DESKTOP_HOME;asar 根前缀按 @deepseek-ai/* 校验
peer 范围 >=0.1.7-rc.2 <0.2 0.2.x 会被这个上界排除 上界放宽到 <0.3
依赖来源优先级 npm 全局 dsh 优先 桌面版实际在跑的那份是 app.asar $DSH_CHECKOUT(显式开发意图)→ app.asar → npm 全局 / profile

自检覆盖了这些点:npm run check 会打印本次跑在哪个宿主版本上(例如 dsh-system-prompt@0.2.0-rc.2 schemastery@3.18.4 cosmokit@1.8.5 cordis@4.0.4), 并断言 peer 上界不排除 0.2.x。

历史适配(0.1.7-rc.2)

DSH 0.1.7 重做了设置(settings)的持久化模型:插件不再自报 settings namespace,而是由自己的 Config schema 出表单,namespace 就是 profile 里这条 loader entry 的 id。该版本据此改写:

断裂点 0.1.5-rc.x 现在(0.1.7-rc.2) 本插件的处理
声明设置项 ctx.settings.register(ns, schema, opts) 该 API 已移除;改为插件导出 Config,表单只投影 .volatile() 字段 Config 两个字段都改成 .volatile(),SETTINGS_NAMESPACE 等于 cordis.patch.yml 里的 insert.id(prompt-persona)
读自己的值 scope.get() 插件保留 Config 的 volatile 引用并 .get()(dsh-agent-default-model 同款写法) config.js 的 live() 同时接受引用与普通值,resolveConfig() 每次组装现读
读设置页快照 settings.describe() + scope.get() settings.describe() 返回的就是表单投影值(ns = entry id) web.js 从描述符取 value/revision/applies,settings 缺席时回落插件 Config
设置页归属 无此概念 自带页面的插件要在 ctx.inject(['settings'], …) 子级里 settings.configure({ auto: false }, ctx.fiber),否则会再长出一个自动生成的页面 已按官方写法登记
settings 依赖 硬依赖 inject: ['settings', …] settings 是可选服务(业务插件可以没有它照常跑) 从 inject 去掉,改用 ctx.get('settings');未挂载时仍能用 profile 配置注入 persona,只是不能保存
client 端页面 ctx.slots 直接注册即可 设置域多了 configForms;跨命名空间表面用 configForms.whileServed(namespaces, register) 跟随 页面改为 inject = ['slots', 'configForms'] + whileServed(['prompt-persona'], …):宿主没挂 settings 时页面上不留痕迹
默认模型 settings.get('agent-default-model') 该 namespace 已不存在,改由 agentDefaultModel 服务回答 预览回落改用 ctx.get('agentDefaultModel').currentSelection()
依赖解析 @deepseek-ai/schemastery 任意 3.x .volatile() 由 schemastery ≥ 3.18.4 提供(dsh-settings 的 peer 要求 ~3.18.4) scripts/link-deps.mjs 现在会逐个校验依赖能力:不合格就换来源,必要时直接从 DSH Desktop 的 app.asar 里解出正确的 schemastery
持久化位置 $DSH_HOME/settings.yaml 当前 profile 的 Cordis patch(由 dsh-config-editor 落盘);旧的 settings.yaml 同名 section 会被导入一次后改名为 settings.yaml.imported 无需手工迁移:原来的 prompt-persona: section 会被导入到同名 entry

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-api-dashboard 下一个 Next dsh-file-mentions →