Awoodwhale/dsh-agent-persona
Workspace personas for DeepSeek Harness (DSH): many system-prompt personas, each scoped by workspace path or session id, managed from the Web settings page (Apache-2.0)
Project Overview项目介绍
dsh-agent-persona is a native plugin built specifically for DSH (DeepSeek Harness); it does not target Claude Code, Codex, Cursor, or any other agent runtime, and exists solely to extend one DSH profile. The package is distributed on npm and installed with dsh plugin --profile web add dsh-agent-persona, which writes the plugin entry into the profile's bundles; a dsh web restart is then required because profiles read their bundle list only at startup. After restart the host side is loaded (verified by cat ~/.dsh/dsh-agent-persona/state.json), and three surfaces become available: a dedicated settings page, a per-session view in the conversation panel, and an optional card in the right sidebar that requires dsh-better-sidebar to be installed alongside it.
The typical workflow begins on the settings page, where the user creates a persona, adds one or more scope lines (each line is either a workspace directory or a specific session ID, picked from DSH's own lists), writes the persona body, and flips the enable switch — newly created personas stay disabled so they cannot affect existing conversations by accident. Matching supports four operators (exact, prefix, substring, regex), with session rules outranking workspace rules and exact matches beating prefix or regex; if nothing matches and a "default persona" is flagged, that one is used, otherwise the DSH-native system prompt is left untouched. Bodies support {{model}} and {{cwd}} placeholders, can be appended after or replace DSH's own identity line, and an empty body at a given scope is the explicit way to say "no persona here." The plugin also exposes read-only previews of the actual outgoing system prompt, an "AI tune" action powered by DSH's currently configured model (overridable via tuneProvider/tuneModel), and JSON import/export with live word- and rule-count previews.
Dependencies are narrow: DSH 0.1.5-rc.1 or 0.1.5-rc.2 is the only version range the author has tested, and dsh-better-sidebar is an optional companion only needed for the right-sidebar card; everything else ships inside the npm bundle. Personas live at ~/.dsh/dsh-agent-persona/personas.json with mode 600 and atomic writes (defaulting to a single global copy across profiles, overridable per profile through cordis.patch.yml's storePath), while state.json records load heartbeats. License is Apache-2.0, the build chain is TypeScript plus esbuild (npm run build must run after any src/** change, and lib/index.js host changes require a dsh web restart because ESM caches by URL). The tamper guard is behavioural, not a security boundary: it blocks file writes and shell commands that reference the persona file, but a danger-full-access host can still bypass it, so the README recommends OS-level hardening such as chflags uchg or running DSH inside a restricted sandbox.
dsh-agent-persona 是一个面向 DSH(DeepSeek Harness)的原生插件,按工作区或会话粒度把不同的 system prompt 人设注入到 system prompt 里的 agent-persona 段。它以 npm 包的形式发布,通过 dsh plugin --profile web add dsh-agent-persona 安装到指定 profile 的 bundles 中,装完后需要重启一次 dsh web 才能让 profile 把插件挂进去;自带设置页、会话视图与可选的 dsh-better-sidebar 右侧栏卡片三条界面。
典型用法是先在「设置 → Agent 人设」里新建人设,用四种匹配方式(完全一致、开头是、包含、正则)把若干工作区目录与若干会话 ID 划给它,再决定追加或替换 DSH 自带的身份提示,并把可选的某一条标为「默认人设」兜底;命中优先级是会话 ID 优先于工作区、精确优先于前缀或正则,规则线性扫描、多处同时命中只取第一条。它面向在同一台 DSH 部署里同时跑前端、文档、告警、代码审查等不同工作,需要给每摊活配不同口径和约束的用户。
依赖与约束:需要 DSH 0.1.5-rc.1 或 0.1.5-rc.2,侧栏卡片需要另装 dsh-better-sidebar;人设数据存在 ~/.dsh/dsh-agent-persona/personas.json(默认全局一份,profile 可用 cordis.patch.yml 覆写 storePath),插件用全局 tools.guard 阻止模型改写人设文件但仍可被宿主侧绕过,因此 README 建议把 DSH 跑在受限沙箱里或用 chflags uchg 加固。许可证为 Apache-2.0。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-agent-persona(Awoodwhale/dsh-agent-persona)
仓库:https://github.com/Awoodwhale/dsh-agent-persona
本站详情页:https://www.yhbd.top/plugins/awoodwhale-dsh-agent-persona/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 Apache-2.0 · ⭐ 2 · 最近提交 2026-09-23 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 dsh-agent-persona
把 Awoodwhale/dsh-agent-persona 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-agent-persona
给不同的工作区、不同的会话,用不同的 system prompt 人设。
它能做什么
一个 DSH 部署里常常同时跑着好几摊活:写前端、写文档、盯告警、做代码审查。它们需要不同的身份、口径和约束。 这个插件把人设按工作区或会话分发出去,每一份都是 system prompt 里的一段:
- 多个人设,各自声明适用范围:一条人设可以同时用于若干个工作区目录和若干个会话;匹配方式有 完全一致、开头是、包含、正则匹配四种。
- 越具体越优先:会话 ID 的规则优先于工作区,精确优先于前缀/正则;只有具体度相同时才按列表顺序决定。
- 显式默认人设:可以把某一条标成「默认人设」,它会收下所有没被位置命中的会话 —— 同一时刻只允许一条。 不标就没有兜底,那些会话继续用 DSH 自带的 system prompt。
- 一个位置只能属于一条人设:把某个工作区/会话配给新人设时,原来占着它的那条会自动失去它,并告诉你从谁那里转来的。
- 追加或替换:保留 DSH 自带的身份提示、把人设接在后面,或者去掉那句身份提示只用人设。
- 正文为空 = 这里不要人设:给某个位置加一行、正文留空,就显式地在那里关掉人设。
- 改完下一条消息生效,不用重启(正文按文件时间戳在每次组装时重读)。
- 工具改不动人设文件:人设会被注入 system prompt,所以宿主注册了一个全局
tools.guard,拒绝一切指向人设 存储的写入(write/edit各类文件工具,以及含写入特征的 shell 命令),只读命令照旧放行。 - 存储读不出来时不会悄悄丢:文件存在但读不出来(内容坏了、不是人设存储)时,页面会说明原因,并且在第一次
保存之前先把原文件复制成
personas.json.bak-<时间戳>;备份失败就不会写入。 - 导入 / 导出:导出为一份 JSON 文件(同时复制到剪贴板);导入可以选文件或粘贴,边输入边预览每条人设的 字数与规则数,再以「一律新建、一律停用」的方式写进去,默认人设不会被替换。
三处界面,各管一件事:
| 界面 | 位置 | 用途 |
|---|---|---|
| 设置页 | 设置 → Agent 人设 | 新建/编辑/删除/复制/排序人设;写正文、Markdown 预览、让 AI 改一版。标题旁另有 GitHub / npm 链接与当前安装的版本号(悬浮会说明这一份是 npm 装来的还是本地开发目录加载的) |
| 会话视图 | 对话页顶部的 人设 标签 | 看这条会话命中了哪条人设、实际发出去的 system prompt(渲染/源码两视图),以及就地管理全部人设 |
| 侧边栏卡片 | dsh-better-sidebar 的右侧栏 | 把上面那个「人设」页面挂进右侧栏(需要装了该插件) |
四个偏好开关(编辑后自动保存 / 在对话页显示「人设」标签 / 注册到 dsh-better-sidebar / 禁止模型改写人设文件)
都在设置 → Agent 人设页里,并且这个页面不受这些开关影响 —— 关掉「对话页显示」或「注册到 dsh-better-sidebar」后,
回到这里就能重新打开。本插件不在设置 → 通用设置里添加任何条目;鼠标停在开关上会给出每个开关的完整说明。
为什么它压得住 AGENTS.md
DSH 会把工作区指令(AGENTS.md 之类)变成一条 user 角色的消息,那条消息自己的导语就写着
"They do not override system, developer, or direct user instructions." 而这个插件写的是
system prompt 的一个 section(section 名 agent-persona,order 1,紧跟在身份行之后)。
这个先后关系是框架定的,不是插件自己声明的 —— 也正因为如此,工作区里怎么改文件都动不了这层人设。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
alaliqing/claude-paper
qkycir-123/dsh-run2skill
PKUfudawei/dsh-capability-menu
houyanchao/dsh-timeline
a735624258/dsh-skill-picker
Chael-Chael/dsh-reference-anything