WM-CODER/custom-first-control-prompt

插件Plugin ⭐ 10 MIT web-ui

DeepSeek Harness plugin for insert custom prompt

编辑导读Editor's Brief

## 核心特性
- 通过 harness system-prompt assembly 注册有序的 system-prompt sections,包含必填的 name、order 和 text 字段,以及可选的 enabled 标志。
- 在 llm/stream 拦截期间,将配置的 user/assistant 参考对话作为真实交替消息注入到普通对话请求的开头。
- 仅在请求路径中保留注入的参考内容,避免写入 session log,并使真实轮次编号仍从 1 开始。
- 在激活时一次性构建参考消息,作为深度冻结的共享对象,并在通过 ctx.llm.stream 重新分发前克隆请求。
- 提供面板配置编辑器,将按 id 定位的覆盖项写入 profile cordis.patch.yml,同时保留其他条目。

## 使用场景
- 为整个部署添加必须在每个普通对话请求中的 persona 之前渲染的通用规则或稳定指令。
- 提供固定参考对话以塑造模型行为,而不在 session history 中持久化种子消息。
- 使用 web profile panel 检查注入的 LLM 请求,并通过新会话提问验证配置内容。

## 技术细节
- 该插件可从 GitHub、npm 或本地目录安装到 DSH web profile,安装或配置更改后需要重启 web app。
- section 条目通过 ctx.systemPrompt.section() 注册,参与变量插值、作用域遮蔽和 assembly waterfall。
- 监听器会跳过带有辅助 purpose 标记的调用、没有 sessionId 的手动构建请求,以及来自 subagent 的会话,除非 includeSubagents 为 true。
- 单个条目的 section 或 history 问题会降级为跳过该条目并输出警告,而不是导致插件树失败。

## 注意事项
- 聊天 UI 不会显示注入的参考历史,因此模型可见内容必须从 session log 和部署配置中重建。
- 种子文本是模型可见的 prompt 材料,不应被视为可信通道。
- 配置更改需要重启 web 才能作用于新请求,并且不支持会话中途编辑。

## Core Features
- Registers ordered system-prompt sections through the harness system-prompt assembly, with required name, order, and text fields and optional enabled flag.
- Injects configured user/assistant reference exchanges as real alternating messages at the head of ordinary conversation requests during llm/stream interception.
- Keeps injected reference content on the request path only, avoiding session-log writes and leaving real turn numbering starting at 1.
- Builds reference messages once at activation as deep-frozen shared objects and clones requests before redispatching them through ctx.llm.stream.
- Provides a panel configuration editor that writes an id-targeted override into profile cordis.patch.yml while preserving other entries.

## Use Cases
- Adds deployment-wide house rules or stable instructions that must render before the persona in every ordinary conversation request.
- Supplies fixed reference exchanges that shape model behavior without persisting seed messages in session history.
- Uses the web profile panel to inspect injected LLM requests and verify configured content through a fresh-session question.

## Technical Details
- The plugin installs into the DSH web profile from GitHub, npm, or a local directory and requires a web app restart after installation or configuration changes.
- Section entries register via ctx.systemPrompt.section(), participating in variable interpolation, scope shadowing, and the assembly waterfall.
- The listener skips auxiliary purpose-stamped calls, hand-built requests without sessionId, and subagent-origin sessions unless includeSubagents is true.
- Per-entry section or history problems degrade to skipped entries with warnings instead of failing the plugin tree.

## Notes
- The chat UI does not display injected reference history, so model-visible content must be reconstructed from session log plus deployment config.
- Seed text is model-visible prompt material and should not be treated as a trusted channel.
- Configuration changes require a web restart for new requests, and mid-session editing is not supported.

安装Install

dsh plugin --profile web add @wm-coders/dsh-custom-first-control-prompt

WM-CODER/custom-first-control-prompt 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

上一个 Prev dsh-evolve 下一个 Next dsh-museai-tavern