DSH (DeepSeek Harness) is known for its plug-in architecture, but directly connecting external processes (such as a Feishu bot) to a local DSH session often requires an additional bridge layer. dsh-agent-bridge aims to solve this pain point by allowing a Feishu bot to send tasks to DSH, enabling DSH to process those tasks in a specified workspace, and returning the results back to Feishu.

This is a DSH bundle maintained by CAI-MH, with the main function of acting as a “Feishu bot → DSH session bridge”. It runs as a standalone daemon, receives tasks from the Feishu bot, starts a “real session” in the user-specified workspace, injects the corresponding persona, skills, or knowledge base, calls existing DSH models and plugins to execute the task, and finally returns the conclusion to Feishu.

Core Functions

  • Real Session Bridging: Starts a real session in the specified workspace.
  • Task Execution: Executes tasks using existing DSH models and plugins, then returns the conclusion.
  • Protocol Conversion: Provides connectivity between the Feishu bot and DSH sessions.

Installation and Enablement

No official installation command has been found. The plugin is usually registered as a DSH bundle in dsh.profile.bundles of the web profile, and node_modules is a copy. If code changes are needed, modify the files in the original directory, then copy them back into node_modules and restart DSH Desktop for the changes to take effect.

Configuration and Interface

The interface listens only on 127.0.0.1 and requires a shared secret. The default listening address is 127.0.0.1:49990. The shared secret file path is ~/.dsh/agent-group-bridge.token (automatically generated if missing).

To change the port or secret file path, modify the patch configuration in the web profile. The path is usually located at:

~/Library/Application Support/dsh-desktop/harness/profiles/web/cordis.patch.yml

Example:

- id: agent-bridge
  config:
    port: 49990
    tokenFile: /Users/xxx/.dsh/agent-group-bridge.token

Typical Usage

Workspace Matching Rules

If the task text contains the title or path of a DSH workspace (ignoring spaces), the task is delivered to that workspace; if no workspace is recognized, an error is returned asking the user to specify the workspace. Each new task starts a new session under the target workspace; follow-up interactions (replying to the completion message) reuse the same session to continue.

Interface Calls

The interface only allows access from 127.0.0.1 and requires a shared secret.

  • Submit Task
    POST /run
Body:
    {
      "agent": "default",
      "system": "You are a helpful assistant.",
      "knowledge": "path/to/knowledge",
      "task": "Analyze this file",
      "chatId": "12345",
      "sessionId": "optional_session_id"
    }
Response:
    {
      "taskId": "abc123"
    }
  • Query Status
    GET /status?taskId=abc123
Response:
    {
      "status": "completed",
      "result": "Final text conclusion",
      "error": null,
      "workspace": "My Workspace",
      "sessionId": "sess_123"
    }
  • Health Check
    GET /health

Applicable Scenarios and Notes

This plugin is suitable for scenarios that require connecting a Feishu bot workflow with local DSH workflows. The plugin runs with the permissions of the current DSH process. Before installation, verify the source code and license (MIT).