MichengAI/dsh-automation
DSH Automation 基于 DeepSeek Harness 的定时任务、自动化任务插件
已收录
2
Workflow
Bundle 已验证
预览
功能介绍
在独立会话里按计划执行编码任务,可在设置页或对话里管理。
适合
- 需要在独立 DSH 会话中无人值守执行周期性或一次性编码任务的团队。
- 希望从设置页或经审批的 agent 工具调用创建和管理计划的用户。
- 需要持久运行记录、重叠处理,以及按任务选择工作区、模型、技能和权限的运维工作流。
不适合
- 依赖继承来源会话历史的任务;每次运行都会创建新的根 agent 与会话。
- 同一规则必须并发执行的场景;每条规则只允许一个活动运行,冲突触发会被跳过。
- 认为创建计划等于永久授予执行权限的工作流;未来运行仍遵循无人值守审批策略。
README
DSH Automation is a community-maintained DeepSeek Harness (DSH) plugin, not an official DeepSeek AI product.
Features
- Manage scheduled tasks from Settings → Scheduled Tasks.
- Create, pause, resume, run now, and delete rules from the Web UI or Agent tools.
- Start each occurrence in a fresh root Agent and Session. Source-chat history is not inherited.
- Support once, interval, hourly, daily, weekly, monthly, and custom-every-N-days schedules.
- Pick workspace, model, skills, and
read-only/workspace-writein the create dialog. - Create from chat: describe the schedule in any conversation, then confirm with the official approval card.
- Keep durable run history:
queued,running,succeeded,failed,skipped,cancelled. - Add a sidebar Scheduled tab. Folders are task names and child sessions are run times. On stock DSH it wraps the official workspace tree and does not depend on
dsh-codex-ui.
Interface
Scheduled tasks live in the workspace Scheduled tab, next to Tasks and Channels:

Open Settings → Scheduled Tasks to search, create, pause, and inspect rules:

Describe the job in chat. The agent calls automation_create and asks through the official approval card:


After approval, the rule is saved and summarized in the conversation:

Run history stays in Settings and can be filtered by day, week, month, task, or status:

Prerequisites
- A working DeepSeek Harness Web installation with
dshavailable in PowerShell. - Examples use the
webprofile; replace it with the target profile. - Source installation and development require Node.js 22.19+. npm installation does not require running
npm installin an arbitrary directory.
Installation
dsh plugin add forwards to pnpm add in the profile directory. If you omit a version or the official registry, a local mirror may leave you on an old build.
Install from npm
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
dsh plugin --profile web add @michengai/dsh-automation@latest --registry=https://registry.npmjs.org/
dsh --profile web --dump-config
Restart DSH Web and hard-refresh the browser. Pin a version with @0.1.5 instead of @latest when needed.
Install from source
Use this for debugging or unpublished changes. The cloned directory becomes the plugin source path:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
Set-Location D:\Repository\deepseek-harness-plugin
git clone https://github.com/MichengAI/dsh-automation.git
Set-Location .\dsh-automation
pnpm install
pnpm test
pnpm build
dsh plugin --profile web add .
dsh --profile web --dump-config
Restart DSH Web and hard-refresh the browser. Local installation reads and applies cordis.patch.yml; do not copy lib files manually.
Usage
Open Settings → Scheduled Tasks, then use the panel as follows:
| Goal | Action | Scope |
|---|---|---|
| Create a rule | Select New scheduled task, then set name, schedule, prompt, workspace, model, skills, and permission. | Host-wide |
| Create from chat | Describe the schedule in any conversation, or select Create in chat. | Current conversation |
| Pause or resume | Use the switch on a task card. | One rule |
| Run now | Open the card menu and select Run now. | One rule |
| Delete | Open the card menu and select Delete task. Run history is kept. | Definition only |
| Inspect runs | Open Run history, then filter by day, week, month, task, or status. | Host-wide |
Each dispatched run uses the saved prompt, workspace, model, and permission boundary. It does not reuse approvals from the source chat.
Safety boundary
| Item | Behavior |
|---|---|
| Permission | Default is read-only. File writes require an explicit workspace-write choice. |
| Full access | Unattended danger-full-access is not offered. |
| Approval | Chat create follows the session policy. Full access (never) proceeds; Workspace Write / Read Only (ask) shows the official card. Unattended runs stay fail-closed never. |
| Retry | No automatic retry after a started run. |
| Host restart | Leftover queued / running records become failed(host_interrupted). |
| Overlap | One active run per rule. A colliding occurrence is recorded as skipped(overlap). |
A schedule stores future intent. It is not a cached permission grant.
Development
Current sources live in src and build into lib:
- src\index.ts: Host plugin, tools, and RPC.
- src\service.ts: Durable definitions, clock, and run admission.
- src\client\index.ts: Settings page and chat prefill.
-
tests\*.test.ts: Domain, recurrence, service, client, and package-contract tests.
After changing files, run tests, rebuild, and reinstall from the local directory:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
pnpm check
dsh plugin --profile web add .
Keep the at-most-once dispatch policy, workspace scoping for Agent tools, and fail-closed unattended approval when changing execution code.
Verification
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
pnpm test
pnpm build
pnpm check runs typecheck, tests, and build together.
Project docs and license
Start from the documentation entry for project status, architecture, and the current iteration. Product notes live in NOTICE.
This project uses Apache License 2.0.
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:MichengAI/dsh-automation。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。