dshbase

Plugin directory / Developer / dsh-yuzuha-prompts-manager

dsh-yuzuha-prompts-manager

Verified · install-tested on dsh Airrcat

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
JavaScriptLanguage
2026-08-15Last push
Cross-platformPlatform

What it does

a plugin for manage prompts in deepseek harness.

✅
Our take
Works — verified, early-stage project

a plugin for manage prompts in deepseek harness. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-prompt-manager

DeepSeek Harness 的「提示词管理」插件:一个宿主 + 浏览器双面插件,为 dsh web profile 提供独立面板(会话视图里的「提示词管理」标签页)。 > 声明:本插件由 DeepSeek Harness 的 deepseek-v4-pro-max 模式制作。

功能

1. 首次注入装配检查

通过真实的系统提示词注册表做**模拟装配**(ctx.systemPrompt.assemble(),不是自己拼字符串): - 系统提示词每个段的名称、装配顺序、字符数与 token 估算,可展开查看插值后的全文; 本插件写入的段(user:prompt-manager)单独计入「你管理的提示词」统计并高亮; - 运行时上下文快照的每个条目与整条快照(存在时才显示); - 提示词变量表(model、cwd 等)与本次模拟的值; - 工具 schema 清单(数量 + 描述),并按每个工具的序列化 JSON(name + description + parameters)汇总 **schema 序列化体积**(字符 + token 估算); - 汇总:系统提示词、你管理的提示词、工具 schema 序列化体积,以及三部分合计的 首次注入总长度(字符 + 估算 token)。 装配按当前会话的 agent 作用域进行:含该 agent(preset 层)贡献的段、工具与 model、cwd 等变量;未能在本次装配代入的变量保留占位符并在面板中单独标注。

2. 提示词管理

- 增删改、启用/禁用、上下排序一批要注入给模型的常驻提示词; - 保存后作为 **order 50** 的段(user:prompt-manager,persona 之后、工具引导之前)挂入 系统提示词注册表,**下一次装配即生效,无需重启**(每个模型步骤都会重新装配); - 空正文或被禁用的条目不注入(段为空时整体消失); - 数据保存在 $DSH_HOME/prompt-manager/prompts.json,与插件本体分离。

结构

- lib/index.js — 宿主插件入口:热加载 runner(watch lib/runtime.js → 动态 import → 重挂;POST /prompt-manager/reload 手动触发) - lib/runtime.js — 宿主逻辑(可热加载):注入 user:prompt-manager 段 + 下面两条路由 (经 webServer 注册,与 /plugins、/api 前缀不冲突): - GET /prompt-manager/state — 提示词列表 + 按当前会话 agent 作用域的模拟装配结果 - POST /prompt-manager/prompts — body {prompts: [...]},校验、持久化并重挂段 - 两个文件都只使用 node 内建模块,无第三方 import - lib/client.js — 浏览器插件(__ModuleLoader__ 包,React 18) - 注册 conversation.view 槽位,为每个会话视图添加「提示词管理」标签页 - 通过 fetch 调用上述两条路由 - package.json — dsh.client 声明让 dsh-client-modules 扫描到浏览器面并注入 window.__DSH_BOOT__;宿主面由 main 提供

安装到某个 profile

``sh git clone https://github.com/Airrcat/dsh-yuzuha-prompts-manager.git

把包登记为 profile 的本地依赖(dsh plugin 会把参数转发给 profile 目录下的 pnpm)

dsh plugin --profile <name> add file:../dsh-prompt-manager
` 然后在 $DSH_HOME/profiles/<name>/cordis.patch.yml 的数组里插入插件行: `yaml - insert: - id: prompt-manager name: 'dsh-prompt-manager' ` 重启 dsh --profile <name>(loader 在重启时拾取新行;hmr 行在 web profile 中默认禁用), 刷新页面后,会话视图切换栏(聊天 / 轨迹那排)会出现「提示词管理」标签。

热加载

- **浏览器面**:已挂载的
client-hmr 行会轮询 lib/client.js(默认 500ms),文件变化后 通过 /plugins/events SSE 把新 bundle 推给所有打开的页面,**无需刷新**。 - **宿主面**:入口 runner 用 fs.watch 监听 lib/runtime.js,变化后自动 dispose 旧代、 re-import 并重挂(出错自动回滚到上一代)。面板里也有「重载宿主」按钮 (POST /prompt-manager/reload)。 - 修改 lib/index.js 或 package.json 本身仍需要重启 dsh。

注意事项

- token 数量为估算(CJK 字符 ≈ 1 token,其余 ≈ 4 字符 / token),仅用于体量判断。 - 装配按当前会话(面板所在会话)的 agent 作用域进行;无活动 agent 时退化为全局层装配。 - 「会话首个用户消息」不在模拟范围内。 - 若日后在 profile 目录运行
pnpm install / dsh plugin install,pnpm 可能清掉未经 登记的文件式依赖:用 dsh plugin --profile <name> add file:<路径>` 重新登记即可。

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-yuzuha-prompts-manager for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:Airrcat/dsh-yuzuha-prompts-manager

Headless (CLI) profile:

dsh plugin --profile headless add github:Airrcat/dsh-yuzuha-prompts-manager

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

When to use it

Extend the agent's coding surface — give it a new tool, workflow, or integration so it handles a dev task it couldn't before.

Who it's for

Developers who want dsh to behave like a teammate on real codebases — editing, running, and verifying changes rather than just answering.

For developers — extending it

The tool/command surface is the seam: expose more of the SDK, add smarter context wiring, or tighten the loop between code changes and verification.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7797 plugins →