dsh-webhook-dispatcher: Inbound Webhook Dispatch for DSH Deployment

Introduction

When running agents in DSH (DeepSeek Harness), external systems—CI, Issue trackers, and monitoring alerts—often prefer to “push a single HTTP request to trigger a session” rather than writing separate bridge code for every service. Common approaches involve building custom forwarding services for the local API or manually copying and pasting payloads, which can quickly complicate operations and permission boundaries.

Below is an introduction to the community plugin dsh-webhook-dispatcher (Maintainer: xuan25, Category: Networking Tools). It registers precise routes on the profile’s webServer. When an external call reaches the endpoint, the plugin admits the request and spawns a fresh, isolated agent session to handle the delivered content. Directory Page: skillhub.cn/plugins/xuan25/dsh-webhook-dispatcher; Source Code & Documentation: github.com/xuan25/dsh-webhook-dispatcher. SkillHub is an independent community directory and has no official affiliation with DeepSeek or High-Flyer.

What is this

dsh-webhook-dispatcher is a out-of-tree plugin for DSH (package version 0.1.0, license MIT). In one sentence, it provides inbound webhook dispatch for dsh deployments—after an HTTP caller hits an endpoint configured by the plugin, the framework spins up a new agent session to process the content in the body; CI, Issue systems, and monitoring tools can directly drive DSH sessions without writing dedicated bridges per service.

Endpoints are mounted on precise paths of the profile’s webServer service (the web profile is provided by the Web GUI; other profiles must compose @deepseek-ai/dsh-host-webserver themselves, see below). External accessibility is determined by the operator’s reverse proxy.

Core Features

Endpoints & Admission

Each endpoint can be configured individually: id / path / name, token authentication (referencing a token value via an environment variable name), policy text, working directory (cwd), sandbox, model, reasoning effort, and resource & queue limits such as maxConcurrent / maxQueue / maxBodyBytes.

Every admitted delivery spawns a new agent session; when concurrent capacity or queue limits are exceeded, it returns 429 with Retry-After for backpressure.

Configuration Methods

The plugin does not create configuration files; endpoints are declared via two equivalent channels. Fields merge into the same contract with priority: cordis config layer > Environment Variables > Built-in Defaults.

  1. cordis: Target the plugin id dsh-webhook-dispatcher in the profile’s cordis.patch.yml (Hot reload: patch changes rebuild the plugin entry and re-read both configuration sources).
  2. Environment Variables: Format WEBHOOK_<ENDPOINT_ID>_<FIELD> (id converted to uppercase, hyphens to underscores, e.g., ci-run → WEBHOOK_CI_RUN_*).

The plugin fail-closed at startup if PATH is missing, values are out of bounds, or AUTH is declared but the corresponding token environment variable is not set; unknown config keys are rejected (preventing typos); path must not conflict with framework-owned routes.

Observability: Webhook Status

On the agent side, the tool webhook { verb: "status" } allows viewing live routes, queue depth, recent delivery history, and effective (non-secret) endpoint configurations. For full reference, see the plugin’s bundled dsh-webhook-dispatcher skill.

Session Offload

Webhook triggers leave disk logs in the framework session store; under high-frequency endpoints, the store may grow infinitely. The plugin scans every minute: it archives trigger sessions that are settled and exceed the endpoint’s sessionRetention window, keeping the store bounded (it only moves, does not delete from store; running sessions are processed once settled). Offload-related state is located at $DSH_HOME/dsh-webhook-dispatcher/ (including retention-log.jsonl, archived-sessions/, etc.). The optional env WEBHOOK_OFFLOAD_BATCH (default 50) limits the processing volume per sweep.

Installation & Enablement

Install on the target profile (command from the official README):

dsh plugin --profile <name> add dsh-webhook-dispatcher

After installation, configure endpoints via the WEBHOOK_* environment block and/or the cordis config layer.

Non-web Profiles: Mounting webServer

Endpoints are registered on the profile’s webServer. The web profile comes with the Web GUI’s webServer; sdk, acp, or custom bundles need to insert the webServer provider in the composition. One-off surfaces like headless cannot listen persistently and cannot host this plugin.

Example (excerpt from README, $DSH_HOME/profiles/<name>/cordis.patch.yml):

- insert:
    - id: webserver
      name: '@deepseek-ai/dsh-host-webserver'
      config:
        host: <host>
        port: <port>  # Free fixed port; port 0 re-resolves the bind address on every restart

Typical Usage: Configuring an Endpoint

Method 1: Cordis Config Layer

- id: dsh-webhook-dispatcher
  config:
    endpoints:
      - id: <name>
        path: /<path>
        policy: "Treat the content as a task description and act on it."
        # name: <name>           (default: the id)
        # cwd: /abs/path         (default: $DSH_HOME/dsh-webhook-dispatcher)
        # auth: <TOKEN_ENV>           (env var NAME holding the token value; empty = open endpoint)
        # sandbox: workspace-write    (read-only | workspace-write | danger-full-access)
        # model: some/model           (default: the default selection ladder)
        # reasoningEffort: low        (closed set off|minimal|low|medium|high|xhigh|max)
        # maxConcurrent: 1            (default)
        # maxQueue: 100               (default)
        # maxBodyBytes: 262144        (default)
        # sessionRetention: 24h       (absent/0 = retain in the store)

Method 2: Environment Variables

Corresponding to the fields in the table above, e.g.:

WEBHOOK_<NAME>_PATH=/<path>
WEBHOOK_<NAME>_POLICY="Treat the content as a task description and act on it."
WEBHOOK_<NAME>_AUTH=<TOKEN_ENV>   # The "NAME" of the env var holding the token value
WEBHOOK_<NAME>_MODEL=some/model
WEBHOOK_<NAME>_REASONING_EFFORT=low
<TOKEN_ENV>=...

Default values for common fields (from source documentation): cwd defaults to $DSH_HOME/dsh-webhook-dispatcher; maxConcurrent defaults to 1; maxQueue defaults to 100; maxBodyBytes defaults to 262144; if auth is empty, the endpoint is open; if policy is empty, it falls back to the free-policy default.

External systems initiate HTTP requests to https://<your-reverse-proxy>/<path> (must satisfy the plugin’s method gate, authentication, and body budget); upon success, it enters the queue and a new session processes the payload according to the policy.

While running, you can call webhook { verb: "status" } within a session to verify routes and queues, rather than guessing if the configuration took effect.

Use Cases & Notes

Who it is for: Systems with existing HTTP outbound capabilities (CI, GitHub/GitLab webhooks, monitoring, ticketing) that want one webhook to correspond to one DSH task, and require per-endpoint model, sandbox, concurrency, and queue policies.

Important Notes:

  1. The plugin runs with the current dsh process permissions; before installation, please read the GitHub Source Code and the MIT license to assess the risks of tokens, open endpoints, and sandbox combinations yourself.
  2. Before exposing endpoints externally, configure auth (AUTH pointing to a set environment variable name) and limit body size; open endpoints are only suitable for controlled networks.
  3. For high-frequency webhooks, it is recommended to set sessionRetention and monitor offload-related logs; invalid retention will trigger a warning and be treated as 0 (no archiving), without causing startup failure.
  4. Profiles requiring persistent HTTP routes must provide a webServer; purely headless one-off deployments cannot use this plugin.

Conclusion

dsh-webhook-dispatcher consolidates “External HTTP events → Isolated agent sessions” into declarable endpoints and unified backpressure, reducing per-service bridge code. The installation command is dsh plugin --profile <name> add dsh-webhook-dispatcher; configuration and behavior are subject to the README.

  • Directory Page: https://www.skillhub.cn/plugins/xuan25/dsh-webhook-dispatcher
  • GitHub: https://github.com/xuan25/dsh-webhook-dispatcher
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye