DeepSeek Harness plugin

dsh-webhook

dsh webhook plugin: HTTP webhook -> fixed session delivery (async queue), for bank SMS auto-bookkeeping etc. Bearer token auth, per-hook workspace/session mapping.

Jump to install

Source facts

Repository
fatatalia/dsh-webhook
Latest update
Aug 21, 2026
Category
Remote & Mobile
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/fatatalia/dsh-webhook
Plugin: dsh-webhook
Author: fatatalia

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

dsh-webhook — Webhook 插件

提供 HTTP webhook 入口 POST /webhook/<hookId>,把外部请求转成消息投递到 dsh 的固定会话,由 agent 处理。随 dsh web 启停,零 dsh 框架改动。

功能

  • HTTP 入口POST /webhook/<hookId>,Bearer token 认证(常数时间比较,防时序攻击)
  • 异步队列:默认立即 202 返回,消息入队投递;同一 hook 串行处理(上一条未完成下一条排队),不同 hook 互不阻塞
  • 同步模式:hook 配置 sync: true 时,等待 agent 完成并随 HTTP 响应返回回复文本(200 {ok, reply})——适合小爱音箱等"发一句等一句"的交互场景
  • 固定会话:hookId 派生固定会话 id,上下文延续;支持 workspace / session / sessionMode(新/持久) / template 映射
  • 典型场景:手机把银行短信 POST 进来 → 固定会话 agent 用记账工具自动记账 → 完成后可调 iMessage 网关的全局 message 工具通知

目录

dsh-webhook/
├── index.js              # host 插件:webServer 路由 + Bearer 认证 + 配置 remote
├── client.js             # 浏览器 bundle:Settings → Webhook 配置页(hooks 表)
├── lib/webhook-core.mjs  # 队列 + 投递核心(固定会话 + preset mount + workspace 归属)
├── cordis.patch.yml      # bundle patch(插入 host 插件行)
└── package.json

挂载:web profile(~/.dsh/profiles/web/package.jsondependencies["dsh-webhook"] = "link:<project>/dsh-webhook",bundles 列表含 dsh-webhook

配置

$DSH_HOME/settings.yamlwebhook: 段(可在配置页编辑):

webhook:
  hooks:
    sms-forward:
      token: "<bearer-token>"                 # 必填;请求头 Authorization: Bearer <token>
      workspace: "/Users/<you>/dsh/default"   # 投递目标工作区
      session: ""                             # 可选;默认用 hookId 派生固定会话
      template: "请处理这条短信并记账:\n{{text}}"  # 消息模板,{{text}} 为请求体
    xiaoai:
      token: "<token>"
      workspace: "/Users/<you>/dsh/default"
      sessionMode: "persistent"               # "persistent" 固定会话 / "new" 一次性
      sync: true                              # 同步模式:等待回复并随 HTTP 返回
      template: "你是智能管家,简洁口语化回答:\n{{text}}"

调用方式:

curl -X POST https://<dsh-host>/webhook/sms-forward \
  -H "Authorization: Bearer <token>" \
  -d '您的账户入账 100.00 元'

开发要点

  • 新插件项目必须建依赖软链(否则 import @deepseek-ai/* 报 ERR_MODULE_NOT_FOUND):

``sh mkdir -p node_modules && ln -sfn /usr/local/lib/node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai node_modules/@deepseek-ai ``

  • 改代码后重启 web 生效(web profile 的 HMR 已禁用)