In the plugin-based architecture of DeepSeek Harness (DSH), restarting the service for Web Profile usually requires manual operation and can easily cause the current session to be interrupted or its output to be truncated. dsh-launcher aims to address this pain point by using front-end status monitoring, automated restart workflows, and session recovery mechanisms to reduce maintenance costs.
This is a DeepSeek Harness Web Profile plugin maintained by Nasbaye. It provides a front-end status badge, one-click service restart, automatic conversation resume after restart, and automatic continuation when output is truncated.
Installation and Activation¶
Add the plugin file path to the profile bundle to enable the status dot and API.
- Install the plugin under the profile directory:
pnpm --dir %USERPROFILE%\\.dsh\\profiles\\web add file:D:/path/to/dsh-launcher
- Add the following to
dsh.profile.bundlesin%USERPROFILE%\\.dsh\\profiles\\web\\package.json:
"dsh": {
"profile": {
"bundles": [ "...", "@dsh-external/dsh-launcher" ]
}
}
- A full restart of DeepSeek Harness will activate it.
Core Features¶
1. Front-end Status Dot and One-click Restart¶
- Status display: The status dot appears to the right of the Agent preset label (e.g., “Standard Mode”) in the session header, or next to the mode selector on the new session page. Colors indicate status: green (online), yellow (restarting), red (offline). It polls every 5 seconds.
- Interaction: Clicking the status dot sends a request to
POST /api/launcher/restart. After the restart completes, the page automatically refreshes once to ensure the latest front end is loaded. - API endpoints:
GET /api/launcher/status: Get service status (JSON).POST /api/launcher/restart: Restart the service (returns 202; the actual work is completed by a background worker).
2. Restart Worker Reliability¶
The restart process is handled by restart-worker.js and includes the following safeguards:
- Dependency pre-check: Before restarting, it checks whether the bundles in
profiles/web/package.jsonare installed (including profile node_modules and engine-nested node_modules). If missing, it automatically runspnpm install; if installation fails, it aborts the restart and keeps the old service running. - Health confirmation: After starting the new process, it polls the port for up to 90 seconds to confirm service health, and writes the result to
dsh-web.log. - Popup-free: On Windows, both the worker and child processes use the
windowsHideoption to avoid black console windows popping up.
3. Resume After Restart¶
Before restart, it automatically detects “in-progress” sessions (those satisfying any of status === 'running', inbox.hasPending, or phase.kind === 'maintenance'). The matched session IDs are written to .dsh-launcher-resume.json.
After the new process starts, it sends the message 因 DeepSeek Harness 重启导致对话中断,请继续 to these sessions, prompting the agent to continue. This operation will automatically retry if it fails (up to 5 times per session, with a 3-second interval).
4. Auto-Continue¶
When the model output is truncated because it reaches the token limit (frontend displays “Output token limit reached”), the plugin automatically sends the 继续 command. Loop prevention includes:
- Up to 3 consecutive automatic 继续 per session.
- A 5-second cooldown for the same session.
- Any turn ending that is not due to max-tokens resets the counter.
- Only top-level sessions are processed.
Logs and Notes¶
- Logs: All actions are written to
dsh-web.log, with prefixes[launcher ...]or[launcher-worker ...]. - Use cases: Web Profile users who need to restart the service frequently or process long-context tasks.
- Note: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installing. On Windows, if
windowsHideis not set on the engine side, tool calls may still pop up console windows (this is the engine’s default configuration, not specific to the plugin).
Summary¶
dsh-launcher solves the problems of difficult restarts and difficult interruption recovery for DeepSeek Harness Web Profile through front-end status feedback and backend automation workflows. Combined with the Auto-Continue feature, it can improve stability for long-running usage.
- Catalog page: nasbaye/dsh-launcher
- Source code: GitHub