Introduction¶
The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing or managing DSH, you may want a more convenient interaction entry point, or need to seamlessly switch sessions between mobile (WeChat) and desktop (Telegram). Traditional command-line or web interfaces may not be direct enough. aitcmhk-web/dsh-bot was created to solve this problem. It transforms Telegram and WeChat into DSH chat terminals and built-in memory continuation capabilities.
Plugin Introduction¶
Name: aitcmhk-web/dsh-bot
Positioning: A plugin that turns Telegram / WeChat into DSH chat entry points, supporting voice-to-text, handoff memory continuation, and more.
Maintainer: aitcmhk-web
License: MIT
Core Capabilities:
* Dual-platform access: Telegram entry, WeChat entry.
* Memory & State: handoff memory continuation, automatic memory, remote approval.
* Interaction enhancement: voice-to-text, model switching, restart functionality.
* Multi-platform interoperability: TG and WeChat share the same context, with synchronized message broadcasting.
* Command support: /whoami, /status, /model, /new (new session), /restart, /help.
Installation and Activation¶
Installation consists of two steps: first upgrade the DSH core (if not already installed), then install and configure the bot plugin.
- Install/Upgrade DSH core (includes Git, Node, DSH core, and upgrades for already-installed plugins):
curl -fsSL https://raw.githubusercontent.com/aitcmhk-web/DSH-bot/main/setupdsh.sh | sh
- Install the bot plugin (create/select a workspace, bind accounts, generate configuration files):
curl -fsSL https://raw.githubusercontent.com/aitcmhk-web/DSH-bot/main/setupbot.sh | sh
This script will guide you through the following operations:
* Select or create a workspace (default is `mybot`).
* Enter a Telegram Bot Token (get it by messaging @BotFather with `/newbot` in Telegram).
* Configure WeChat QR code login (optional).
After the script finishes, it will automatically add the `setupdsh` and `setupbot` commands to your PATH. To upgrade the core or rebind accounts later, simply run these two commands respectively.
- Start the service:
Navigate to the corresponding workspace directory and run the startup script:
~/DSH/<workspace-name>/start.command
- Local developer debugging (using source code):
If you have modified the source code locally, you can load it via afile:path without reinstalling:
dsh plugin --profile mybot add file:/absolute-path/dsh-botplugin
> Note: You cannot use `~` after `file:`. You must use an absolute path (e.g., `$HOME/DSH/BOT/botplugin`).
Typical Usage¶
- Start a new session: Send the command
/newin Telegram or WeChat. - Switch models: Send the command
/modelin the conversation. - Check status: Send
/statusor/whoami. - Restart the process: Send
/restart(will automatically save handoff memory).
Use Cases and Notes¶
Use Cases:
* Need to receive and send DSH messages via WeChat on mobile.
* Need to continue unfinished sessions via Telegram on different devices.
* Need remote approval functionality (just tap a button on your phone).
Notes:
1. Token conflicts: One token can only be occupied by one process. If two processes use the same token simultaneously, a 409 conflict will be triggered (typically manifested as the first-started process stopping polling and reporting an error). If conflicts persist after restart, check whether another process is occupying the token.
2. Telegram cursor mechanism: Telegram’s message cursor is stored in memory. After restarting the bot, it will pull messages from the current moment onward and will not backfill historical messages from the offline period.
3. WeChat tool limitations: When running the WeChat QR code scanning tool on Windows/Linux machines, it may degrade to only printing a link without rendering the QR code.
4. Progress and answer separation: Progress placeholder messages only show progress and do not carry the final answer. The answer is broadcast by the node to all endpoints; progress messages do not overwrite the final answer after replacing old messages.
5. LLM traffic budget: The plugin enables rate limiting by default (llmBudget), limiting the number of requests (default 50) and token count (default 900,000) within a rolling 60-second window. If you encounter a provider 429 error, adjust the tpm and rpm configuration or disable rate limiting (enabled: false).
6. Disable Handoff memory: Handoff memory continuation is enabled by default. To disable it, set memoryDir to an empty string in the configuration.
Short Conclusion¶
aitcmhk-web/dsh-bot provides the standard DSH plugin integration approach, transforming common instant messaging tools into development terminals. It solves the memory gap problem when switching between multiple platforms through the handoff mechanism, making it suitable for developers who need to use DSH on mobile or in cross-device environments.