dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Event-Condition-Action (ECA) automation plugin for DeepSeek Harness: turns your agent into a proactive watchdog with polling/push event sources, condition evaluation, and composable actions.
面向 DeepSeek Harness 的事件驱动自主 Agent 运行时
让 DeepSeek Agent 从"随叫随到的助理"变成"主动感知环境、自主完成目标的守护进程"。
dsh-reactor 不是另一个 cron 插件。它把 DeepSeek Harness 的 Agent 变成一个事件驱动的自主运行时:你告诉它"监控什么、什么时候值得处理、想达成什么目标",它就在后台持续观察,一旦条件命中,拉起一个隔离的 Agent Session,让 LLM 用 ReAct 自主完成任务、验证结果、自动恢复,并留下完整运行轨迹。
社区插件,非 DeepSeek 官方出品。
| 维度 | 传统 cron 插件 | dsh-reactor |
|---|---|---|
| 触发方式 | 固定时间 | 任意事件源 + 条件评估 |
| 决策逻辑 | 到点就执行 | 评估条件后决定是否执行 |
| 执行方式 | 跑预设脚本 | 拉起隔离 Agent,LLM ReAct 自主完成 |
| 结果验证 | 无 | 确定性验证(文件存在/命令退出码) |
| 失败恢复 | 无 | 自动分类 + 智能 retry |
| 状态感知 | 无 | 上次摘要注入,续作不重头开始 |
| 可审计 | 日志 | 完整 Run Trace 决策链 |
dsh plugin --profile web add dsh-reactor
安装后重启 dsh web,右下角出现时钟主题挂件。
dsh plugin --profile web remove dsh-reactor
安装后,在 DSH 对话中直接用自然语言描述你的目标:
"帮我监控 https://api.github.com/repos/snhna-a/dsh-reactor 的最新 commit,当 HEAD 变化时,在 C:\work\dsh-reactor 目录里 git pull 最新代码并跑 npm run build,然后告诉我结果。"
Agent 会自动调用 reactor_define 创建规则。之后无需人工干预,规则在后台持续运行。
更多示例:
git log --oneline -1,当输出变化时,在新会话里分析这次提交"dsh-reactor 把传统 ECA 升级为 ECG:
Event(事件)
↓ 轮询/监听/接收推送
Condition(条件)
↓ JSONPath + 比较运算 + AND/OR + changed
Goal(目标)
↓ 拉起隔离 Agent Session,LLM ReAct 自主完成
关键区别:Action 模式跑固定脚本;Goal 模式把你的目标 + 事件上下文注入隔离 Agent Session,让 LLM 自己决定怎么完成——拉代码、跑测试、分析报错、修复、再验证,全程自主。
| 类型 | 说明 |
|---|---|
http-poll | 轮询 HTTP 接口,解析 JSON/文本 |
file-watch | 读取本地文件(自动处理 BOM) |
command | 执行 shell 命令,解析 stdout |
webhook | 外部系统 HTTP POST 主动推送 |
JSONPath($.status、$.data.count)+ 运算符(eq/ne/gt/contains/exists/changed)+ AND/OR 组合。
shell:执行命令(支持 {{payload.field}} 模板)webhook:POST JSON 到指定 URLagent-talk:在隔离 Session 中跑提示词| 机制 | 说明 |
|---|---|
| Budget Gate | maxRunsPerDay / maxTokens 硬门,超限 blocked 0 token |
| Approval Gate | riskLevel: high + requireApproval → 等人工批准才跑 |
| Preflight | 启动 Agent 前检查工作目录/文件系统/网络能力,缺能力 blocked 0 token |
| Cooldown | 触发后冷却时间,防刷屏 |
| Overlap Protection | 同一规则不并发跑 |
| Failure Classification | 自动分类 transient/repairable/dangerous |
| Smart Retry | transient 错误(网络 blip/超时)自动多 retry 一次 |
DSH Web 右下角常驻时钟主题挂件:
Agent 通过以下工具管理规则(自然语言即可,无需手动操作):
| 工具 | 用途 |
|---|---|
reactor_define | 创建规则(支持 action/goal 模式) |
reactor_list | 列出所有规则及运行状态 |
reactor_status | 查看规则详情 |
reactor_test | 用模拟载荷手动测试规则 |
reactor_remove | 删除规则 |
reactor_history | 查看执行历史 |
~/.dsh/reactor/rules.json,重启自动恢复~/.dsh/reactor/history.jsonl(ring buffer 500 条)permissionPreset 控制能力边界。webhookToken + TLS。~/.dsh/reactor/,不上传第三方。| 项 | 说明 |
|---|---|
| DeepSeek Harness | ≥ 0.1.2-rc.1(@deepseek-ai/cordis ^4.0.0) |
| Node.js | ≥ 22 |
| profile | web 完整能力;headless 自动降级 |
| 平台 | Windows / Linux / macOS |
pnpm install
pnpm typecheck
pnpm build
Event-Driven Autonomous Agent Runtime for DeepSeek Harness
Turn your DeepSeek Agent from an on-demand assistant into a proactive daemon that senses the world, acts on real conditions, and finishes the job autonomously.
Community plugin — not an official DeepSeek product.
| Dimension | Traditional cron plugin | dsh-reactor |
|---|---|---|
| Trigger | Fixed schedule | Any event source + condition evaluation |
| Decision | Runs on time | Evaluates conditions first |
| Execution | Preset shell script | Spawns isolated Agent, LLM ReAct does the work |
| Verification | None | Deterministic checks (file exists / command exit code) |
| Recovery | None | Failure classification + smart retry |
| State | Stateless | Last summary injected — continues where it left off |
| Audit | Logs only | Full Run Trace decision chain |
dsh plugin --profile web add dsh-reactor
Restart dsh web after install. A clock-themed widget appears in the bottom-right corner.
dsh plugin --profile web remove dsh-reactor
After install, just describe your goal in the DSH chat:
"Watch https://api.github.com/repos/snhna-a/dsh-reactor for new commits. When HEAD changes, git pull in C:\work\dsh-reactor and run npm run build, then tell me the result."
The Agent calls reactor_define to create the rule. It runs in the background without further input.
More examples:
git log --oneline -1; when output changes, analyze the commit in a new session."dsh-reactor upgrades traditional ECA to ECG:
Event
↓ poll / watch / webhook
Condition
↓ JSONPath + operators + AND/OR + changed
Goal
↓ spawn isolated Agent Session, LLM ReAct autonomously
Key difference: Action mode runs a fixed script. Goal mode injects your goal + event context into an isolated Agent Session — the LLM decides how to do it: pull code, run tests, read errors, fix, re-verify, all autonomously.
| Type | Description |
|---|---|
http-poll | Poll HTTP endpoints, parse JSON/text |
file-watch | Read local files (BOM handled) |
command | Execute shell command, parse stdout |
webhook | External system POSTs events directly |
JSONPath ($.status, $.data.count) + operators (eq/ne/gt/contains/exists/changed) + AND/OR.
shell: run command (with {{payload.field}} templating)webhook: POST JSON to a URLagent-talk: run prompt in an isolated session| Mechanism | Description |
|---|---|
| Budget Gate | maxRunsPerDay / maxTokens hard limits; over → blocked, 0 tokens |
| Approval Gate | riskLevel: high + requireApproval → wait for human approval |
| Preflight | Check workspace/filesystem/network before spawning Agent; missing → blocked, 0 tokens |
| Cooldown | No duplicate triggers within window |
| Overlap Protection | Same rule never runs concurrently |
| Failure Classification | Auto-tag transient/repairable/dangerous |
| Smart Retry | Transient errors (network blip/timeout) auto-retry once |
Clock-themed floating widget in the bottom-right of DSH Web:
The Agent manages rules via these tools (natural language, no manual UI needed):
| Tool | Purpose |
|---|---|
reactor_define | Create a rule (action/goal mode) |
reactor_list | List all rules and their status |
reactor_status | Rule detail (last payload, run state) |
reactor_test | Test rule with a simulated payload |
reactor_remove | Delete a rule |
reactor_history | Execution history (Run Trace, tokens, failure class) |
~/.dsh/reactor/rules.json, restored on restart~/.dsh/reactor/history.jsonl (ring buffer, 500 entries)permissionPreset boundary control.webhookToken + TLS for external exposure.~/.dsh/reactor/; no third-party telemetry.| Item | Requirement |
|---|---|
| DeepSeek Harness | ≥ 0.1.2-rc.1 (@deepseek-ai/cordis ^4.0.0) |
| Node.js | ≥ 22 |
| Profile | web full features; headless auto-degrades |
| Platform | Windows / Linux / macOS |
pnpm install
pnpm typecheck
pnpm build
MIT
MIT