dsh-prompt-lab: A Session-Level Prompt Editor for DeepSeek Harness

Preface

The assembly process of DeepSeek Harness (DSH) is typically completed before a session begins. Once a conversation starts, the system prompt is locked in. For scenarios requiring fine-grained adjustment of system prompt sections, management of multiple Agent presets, or control over tool visibility, the native assembly mechanism lacks sufficient flexibility. dsh-prompt-lab builds on this foundation by providing a session-scoped prompt editing and configuration management solution, enabling high-degree-of-freedom system prompt and tool policy configuration before the first round of dialogue.

Plugin Scope

dsh-prompt-lab is a DeepSeek Harness plugin maintained by Eustia-Ast. It operates on a per-session basis, allowing you to edit or override individual sections within the system prompt. It supports adding new sections, template management, Agent preset editing, tool toggles, message appending, and automatic backup. The plugin’s session configuration is locked after the first round of dialogue, switching to read-only to avoid conflicts with the official assembly process.

Core Features

Session-Scoped Activation

The plugin only processes sessions where you have explicitly enabled “Apply to This Session.” Other sessions continue to use DSH’s official assembly.

Section Editing and Locking

  • Before the first round of dialogue, you can replace or clear a single section in the system prompt without rewriting the entire prompt.
  • After the first round of dialogue, the system prompt assembly is finalized and locked; the editing functionality is disabled, and all prompt sections become read-only.
  • If the current preset uses complete mode (e.g., a minimal preset), the panel will indicate that section editing is not effective. In this case, you need to switch to a different preset or start a new session.

Templates and Presets

  • Template Library: Multiple templates can be saved for the same section. Switch between them or save as new before the first round of dialogue.
  • Presets: Save overrides, added sections, and tool toggles as a configuration group, then apply to other sessions.
  • Agent Presets: On the “Agent Presets” page (top-right corner of the panel, to the left of “Text Management”), create/edit/deactivate/delete locally registered presets. The prompt portion directly references the snippet library; upon saving, it is materialized as the prefix for dsh-persona. The built-in standard / ptc / minimal / cordis presets are read-only—the editor statically rejects these four IDs.

Message Management

  • Append user messages: You can proactively append multiple user messages within a single turn.
  • Append assistant messages: Construct a complete turn to simulate a manually crafted assistant message. This feature is experimental—after writing an assistant message, the session will be locked and a DSH restart will be required to avoid turn number inconsistencies.

Tool Toggles

  • Disable global tools per session, and correspondingly hide the associated tool:<name> prompt sections.
  • Agent preset / scoped tools remain under preset control and cannot be overridden from the panel.

Backup and Drafts

  • Automatic backup and restore: A session snapshot is saved before every write; snapshots are automatically deleted after the first-round lock.
  • Drafts in open windows: Before the first round begins, configurations are written as drafts; they are automatically committed when the first round starts. Closing the window will not discard global templates.

Drift Detection

  • After the first round, if the official section text changes, saved overrides will be displayed as “pending.”
  • If the official text of an overridden section changes during a session, it automatically yields, and the plugin no longer participates in the modification.

Security and Permissions

  • The plugin does not replace DSH’s approval, sandbox, or tool policies.
  • The plugin itself performs no permission checks. Use it only in sessions you trust, and retain backups for critical sessions.

Installation and Activation

Before installing, please ensure:

  • DeepSeek Harness 0.2.2-rc.2 through 0.2.2-rc.5
  • Node.js >=24.9.0

Install from npm (using the desktop profile as an example):

dsh plugin --profile desktop add dsh-prompt-lab

If you use the web profile or another profile, replace desktop with your corresponding profile name.

Install from GitHub source:

dsh plugin --profile desktop add github:Eustia-Ast/dsh-prompt-lab

After installation or upgrade, fully exit DSH and restart to allow the Host to reload the plugin.

Activation steps:

  1. Open a new session.
  2. Click Prompt Lab at the bottom-left of the input box.
  3. Enable “Apply to This Session.”
  4. Edit the required sections on the “Prompt” page, or manage configurations on the “Presets”, “Text Management”, “Backup”, and “Settings” pages.

On first open, the plugin will attempt to read the current session’s official assembly. This operation does not send model requests and does not write to session logs.

Typical Usage

Editing Sections

  1. Open a new session.
  2. Enable “Apply to This Session” in Prompt Lab.
  3. Find the section you need to edit on the “Prompt” page.
  4. Replace or clear the content of that section, or add a new section.
  5. After the first round of dialogue begins, editing is locked—only the current prompt status can be viewed.

Managing Templates

  1. Select a section on the “Text Management” page.
  2. Click “Save Template” and enter a template name.
  3. In subsequent sessions, you can switch between templates in the list or save as a new template.

Creating Agent Presets

  1. Open Prompt Lab and navigate to the “Agent Presets” page (top-right corner of the panel, to the left of “Text Management”).
  2. Create a new preset, or duplicate an official preset’s configuration and modify it further.
  3. After saving, the new preset will appear in the preset selector of new sessions.

Appending Messages

  1. On the “Message Management” page, select “Append User Message” or “Append Assistant Message.”
  2. Enter the message content to append.
  3. Click “Append”—the message will be written to the actual session log and synthetic turn.
  4. If appending an assistant message, the session will be locked upon completion and a DSH restart will be required.

Tool Toggles

  1. On Prompt Lab’s “Settings” page, locate “Tool Toggles.”
  2. Select the global tools to disable.
  3. After saving, the corresponding tool:<name> prompt sections will no longer be displayed in that session.

Caveats and Limitations

  • Section editing is not effective for complete presets.
  • Tool toggles only override global tools; scoped / preset tools cannot be controlled from the panel.
  • Large template libraries / message libraries are loaded entirely into the panel; very large libraries may cause slowdowns.
  • The panel UI is currently available in Chinese only; the English locale contains only titles and descriptions.
  • No cloud sync, cross-device sync, or team sharing is provided.
  • The plugin runs with the current DSH process’s permissions. Review the source code and license before installing.

Security Boundaries

Prompt Lab can alter what the Agent sees. Treat it as a high-privilege prompt editor:

  • Inserting or rewriting persona-related sections may mislead the Agent’s identity recognition.
  • Rewriting sections related to tool protocols, permission descriptions, or planning rules may cause the Agent to misuse tools or misjudge permissions.
  • Disabling global tools will affect the actions executable in that session.
  • Added sections can contain arbitrary instructions, including those that conflict with DSH’s official rules.
  • Complete prompt presets are not subject to section editing.

The plugin itself performs no permission checks and does not replace DSH’s approval, sandbox, or tool policies. Use it only in sessions you trust, and retain backups for critical sessions.

Data and Privacy

Default data directories:

  • $DSH_HOME/plugins/dsh-prompt-lab (when DSH_HOME is set)
  • Otherwise, ~/.dsh/plugins/dsh-prompt-lab

You can change to another absolute path in “Settings”; the path must not be located within the current workspace or at the disk root. When changing the path, the old and new directories must not contain each other, nor may they contain the plugin configuration directory. Changing the path does not immediately move data—migration occurs upon DSH restart.

Directory contents:

Content Description
config.json Bootstrap configuration: data directory, backup/preset limits
library/ Section templates, message texts, presets
sessions/ Per-session state.json (overrides, added sections, tool policy) and pre-lock backups/; after first-round lock, locked.json is written (all sections with official hashes, official sections do not store full text; tool toggles are not saved), and backups/ is automatically deleted—no further backups are created or restored
drafts/ Pre-first-round window drafts
pending/ Restart lock after prefill/append messages
PROMPT-LAB-WORKSPACE-WARNING.md Reminder for the Agent not to modify this directory
.prompt-lab-owner.json Ownership marker for delete/cleanup operations

The plugin does not read credentials and does not send prompt content to any server. All data remains local; back up important templates yourself.

Use Cases

  • You need fine-grained control over system prompt sections for each session.
  • You need to manage multiple Agent presets and reuse configurations across different sessions.
  • You need to adjust tool visibility or add special instructions before a conversation.
  • You need prompt snapshots and restore capabilities for critical sessions.

Summary

dsh-prompt-lab provides DeepSeek Harness with a session-centric prompt editing and configuration management solution. It does not replace DSH’s permission and sandbox policies, but rather extends the degree of freedom in prompt assembly at the session level. If you are looking for more granular prompt control for complex agent development workflows, this is a good place to start.

  • Directory: https://www.skillhub.cn/plugins/Eustia-Ast/dsh-prompt-lab
  • GitHub: https://github.com/Eustia-Ast/dsh-prompt-lab
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye