Introduction¶
During task execution in DeepSeek Harness (DSH), if you need to interject mid-process or immediately stop the current step, there are usually only two extreme approaches: wait for the current round to finish (slow), or click the interface stop button (directly aborts the current step and leaves a partial state). The dsh-midtalk plugin separates the “interject” and “interrupt” logic using two slash commands, letting you decide the next action with a single press of Enter and preserving the scene when interrupting.
What Is It¶
dsh-midtalk is a workflow plugin maintained by blueberrymaid. It adds midtalk functionality to DSH, supporting in-task interjection and optional interruption, and automatically generating structured recovery cards. All code is Host-side (Cordis), with zero client-side code, no build step, no third-party runtime dependencies, and no npm distribution.
Core Capabilities¶
- In-task interjection: loss-free message delivery, inserted at the next step boundary.
- Optional interruption: aborts the current step and leaves a recovery card.
- Structured recovery cards: records the complete state at interruption time for later recovery.
- Hard-rule constraint: upon receiving an interjection, it must first output a regular text response, then decide whether to call a tool.
Installation and Enablement¶
Method A: Command-Line Installation (Recommended)¶
Use the dsh plugin command to install. After installation, you need to restart dsh web for it to take effect.
dsh plugin --profile web add "github:blueberrymaid/dsh-midtalk"
Method B: Manual Installation (No Network or pnpm Dependency)¶
- Place files:
Put the plugin directory (which must contain at leastindex.jsandlib/core.js) into the Profile’s module directory:
# 假设 Profile 名为 web
$DSH_HOME/profiles/web/node_modules/dsh-midtalk/
- Mount the plugin roster:
Add one insert line to$DSH_HOME/profiles/web/cordis.patch.yml:
- insert:
- id: midtalk
name: dsh-midtalk
> **Note**: This file is read once at startup. Back it up before modifying.
- Restart:
Restartdsh weband verify.
Verify Installation¶
Check $DSH_HOME/midtalk/boot.json. The file should contain stage: "registered" and the commands list should include "say" and "cut".
Usage¶
The plugin provides two slash commands:
1. /say <what you want to say>¶
- Semantics: loss-free interjection.
- Behavior: inserts at the next step boundary. Does not interrupt the current step.
- Use case: default choice.
2. /cut [what you want to say]¶
- Semantics: lossy interruption.
- Behavior: aborts the currently running step and generates a recovery card.
- Use case: stuck in a very long step and must stop immediately.
Both commands return the estimated remaining duration of the current step, for reference only.
Recovery Card¶
After /cut is triggered, a structured recovery card is generated and saved to $DSH_HOME/midtalk/last-interrupt-<session id>.json. One per session, written atomically.
The recovery card contains the following key information:
- at / reason: trigger time and reason.
- agentStatus / sessionId: status and session at interruption.
- interruptedAt: the exact position where interruption occurred.
- pendingToolCalls: tool-call intents that are being dispatched or were just dispatched.
- lastReasoning / lastText: reasoning and response text fragment before interruption.
- frames: the most recent 12 stream frames.
Recovery process:
1. Read the recovery card and list the current state.
2. Verify whether the tool calls in pendingToolCalls have materialized (files, commands, etc.).
3. After user confirmation, redo the interrupted step.
Notes and Boundaries¶
- Compatibility: verified only in environments compatible with the tested DSH version (
0.1.5-rc.3). - Queue limit: the pending outgoing message queue is capped at 8; once exceeded, the oldest request is silently dropped (logged in
$DSH_HOME/midtalk/wake.log). - Zero dependencies: pure Host-side implementation, no model capability registration, no data reporting.
- Installation method: mounted via
cordis.patch.yml, not an npm package.
Summary¶
dsh-midtalk returns DSH workflow control to users through simple commands, providing two modes: “loss-free interjection” and “controlled interruption.” For developers who need fine-grained control over task execution flow or need to intervene at any time in long-running tasks, this is a practical tool.
- Directory page: dsh-midtalk - SkillHub
- Source: blueberrymaid/dsh-midtalk - GitHub