Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin”. During the development and long-running operation of agent sessions, developers often face practical issues such as cumbersome restarts, expired timestamps, difficult debugging, and limited access to external services. dsh-pouch is a practical, lightweight, and polished plugin collection designed for DSH, aiming to improve daily development efficiency and interaction experience through small functional enhancements.

Core Features

This plugin collection includes six core modules, each addressing a different scenario pain point:

  1. Safe Restart Mechanism
    Manually restarting the DSH process in the terminal interrupts the current session, while directly killing the process may cause the session to freeze. This plugin provides the /dsh-restart command and dsh_restart proxy tool. It starts an asynchronous detached Worker process in the background and grants a 3-second grace period before returning the response, ensuring the session can be restarted cleanly.

  2. Time Context Injection
    Models do not have a local clock. If a session crosses midnight, the model may continue reasoning based on the stale date from startup. This plugin injects the host’s real date, time, and time zone into the proxy context at the beginning of each turn, ensuring reasoning is based on the latest time information.

  3. Session ID Quick Copy
    Obtaining the current Session UUID in the Web interface for debugging or log tracing usually requires checking the URL or console. This plugin injects a native-styled Session ID badge into the Web session header toolbar, which can be clicked to automatically copy it to the clipboard.

  4. Tavily Web Search
    The ctx.web capability in DSH requires a specific search provider. This plugin provides real-time web search support based on the Tavily REST API. It is registered through the ctx.web.registerSearchProvider interface and supports resolving the API key from the environment variable TAVILY_API_KEY or the DSH credential service.

  5. Custom LLM Request Headers
    DSH injects its own User-Agent in all requests, which can sometimes interfere with gateways that require specific client authentication (for example, Tencent CodeBuddy). This plugin allows custom request headers to be configured under the llm-headers node in settings.yaml. It provides a dedicated “Request Headers” settings page, supporting overriding DSH reserved headers, environment variable interpolation (${env:NAME}), per-model overrides, and deletion operations.

  6. MCP Server Console
    Officially configuring MCP servers requires static configuration in cordis.patch.yml, lacking a GUI and making dynamic modification difficult. This plugin provides a Web-based MCP server console, supporting adding, editing, enabling, disabling, reconnecting, or deleting servers at runtime. It supports per-tool toggles, real-time status viewing through SSE, and importing mcpServers in JSON format.

Installation and Enabling

Installing through the DSH CLI is the recommended method; DSH automatically downloads, packages, and mounts all plugins.

dsh plugin --profile web add @moon16u/dsh-pouch

Usage Examples

Restart the DSH Process
You can call the tool or command directly in the session:

/dsh-restart

Or call the proxy tool:

dsh_restart()

Enable Web Search
Ensure TAVILY_API_KEY is configured. After the plugin loads, you can use ctx.web in proxy code to perform web searches.

Configure Custom Headers
Configure llm-headers in DSH’s settings.yaml:

llm-headers:
  # 自定义 User-Agent
  User-Agent: "MyAgent/1.0"
  # 支持环境变量插值
  X-Custom-Header: "${env:MY_HEADER}"

Notes

  • Version Compatibility: This plugin collection is currently built specifically for DSH 0.1.5-rc.1. The llm-headers plugin adapts to different DSH versions by reading the connection.api or remote.llm/settings namespace.
  • Protocol Dependency: MCP protocol-related code is fully based on the official @deepseek-ai/dsh-mcp-client implementation and does not include additional MCP protocol implementations.
  • Security Check: Plugins run with the permissions of the current DSH process. Before installing, it is recommended to review the GitHub source code to ensure compliance with security standards.
  • License: This plugin collection is open source under the MIT License.

Summary

dsh-pouch addresses high-frequency pain points including restarting, time synchronization, debugging convenience, and access to external services (such as web search and MCP), providing DSH users with a ready-to-use toolbox. It does not change DSH’s core architecture; instead, it acts as a patch layer to enhance the smoothness of development and interaction.