Skip to content
Back to search

dsh-automation

DSH 自动化插件:让 Coding 任务按计划在全新 Agent Session 中运行,并由用户或 Agent 创建和管理定时任务。 / Run coding tasks in fresh Agent sessions and manage schedules from DSH Web or an Agent.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/titanwings--dsh-automation/badge.svg)](/listings/titanwings--dsh-automation)

HTML

<a href="/listings/titanwings--dsh-automation"><img src="/api/listings/titanwings--dsh-automation/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the GitHub bundle into the DSH Web profile, then restart `dsh web`:

dsh plugin --profile web add github:titanwings/dsh-automation#v0.1.7

The version tag keeps the install reproducible; a reviewed commit SHA is equally valid. If you run DSH from its source checkout, use `pnpm dsh` in place of `dsh`.

<details> <summary><strong>Install from a local checkout</strong></summary>

<br>

Node.js 22.19 or newer is required.

git clone https://github.com/titanwings/dsh-automation.git
cd dsh-automation
pnpm install
pnpm check

cd /path/to/deepseek-harness
pnpm dsh plugin --profile web add /absolute/path/to/dsh-automation

The repository ships its built Host and Web bundles. Git installation runs no package build script and needs no `allowBuilds` entry.

</details>

---

<a id="quick-start"></a>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 320 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # ⏱️ dsh-automation
  3. ### *Run coding tasks on schedule. Manage them from Web or Agent.*
  4. [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-plugin-4D6BFE)](https://github.com/deepseek-ai)
  5. [![Version](https://img.shields.io/badge/version-0.1.7-4D6BFE)](package.json)
  6. [![Node.js](https://img.shields.io/badge/Node.js-22.19%2B-4D6BFE)](package.json)
  7. [![License: MIT](https://img.shields.io/badge/license-MIT-4D6BFE)](LICENSE)
  8. [![GitHub stars](https://img.shields.io/github/stars/titanwings/dsh-automation?style=social)](https://github.com/titanwings/dsh-automation/stargazers)
  9. <br>
  10. <table>
  11. <tr><td align="left">
  12. 🕒 &nbsp;Need recurring or one-shot coding work to run later without relying on an old chat?<br>
  13. 🧭 &nbsp;Need each unattended run to stay inside an explicit workspace and permission boundary?<br>
  14. 🧾 &nbsp;Need to inspect what ran, which revision it used, and how it ended?
  15. </td></tr>
  16. </table>
  17. ### ✨ dsh-automation turns all three requirements into one workflow.
  18. Create and manage schedules from DSH Web or any eligible root Agent. Every
  19. dispatched occurrence starts in a fresh root Agent and Session, then leaves an
  20. auditable record.
  21. **Self-contained task + schedule + permission boundary → fresh root Agent + fresh Session + durable run history**
  22. <br>
  23. [Why automation](#why-automation) · [Features](#features) · [Install](#install) · [Quick start](#quick-start) · [Safety](#a-schedule-is-not-permission) · [Technical details](#technical-details)
  24. **English** · [简体中文](README.zh-CN.md)
  25. <br>
  26. ![dsh-automation — Schedule. Run. Remember.](docs/social-preview.png)
  27. </div>
  28. ---
  29. ![Automation dashboard showing workspace rules, next runs, and recent outcomes](docs/01-dashboard-en.png)
  30. <a id="why-automation"></a>
  31. ## 🎯 Why automation
  32. DSH Core Schedule is the right tool for reminders in the current conversation: “come back to this Session in ten minutes.” `dsh-automation` handles a different job: “run this complete task independently every weekday and leave me a result I can inspect.”
  33. | | DSH Core Schedule | dsh-automation |
  34. | --- | --- | --- |
  35. | Execution context | Returns to the same live Agent | Starts a fresh root Agent and Session |
  36. | Input | A follow-up inside existing context | A saved, self-contained task |
  37. | Scope | Current Session Log | One canonical DSH workspace |
  38. | History | Conversation events | Definition revisions and durable run records |
  39. | Best for | Reminders and same-chat follow-ups | Repeated or one-shot standalone coding work |
  40. If a task depends on unstated chat history, needs an interactive approval halfway through, or should react to a file, HTTP, or process condition rather than time, it is not a good automation yet.
  41. ---
  42. <a id="features"></a>
  43. ## ✨ Features
  44. ### 🕹️ One control plane, two ways in
  45. - **DSH Web:** open **Automations** from the sidebar or the conversation tab to create a rule, pause or resume it, run it now, delete it, and inspect recent runs. On the blank New Session screen, the sidebar shortcut tells you to start a conversation instead of failing silently.
  46. - **Any eligible root Agent:** ask in natural language. Six scoped tools let the Agent manage automations only for its exact workspace.
  47. There is no separate bot, daemon UI, or third-party scheduler to operate.
  48. ### 📅 Schedules people can read
  49. Create a one-shot, fixed-interval, daily, or weekly rule. Daily and weekly schedules use an IANA time zone; the friendly form is normalized into a validated RFC 5545 RRULE for persistence and inspection.
  50. ![Create form with schedule, time zone, and permission boundary](docs/02-create-en.png)
  51. ### 🧠 A model target for each automation
  52. The Web form can follow the live global model or pin one provider/model pair. A pinned model can use its own default reasoning effort or one of the opaque effort values advertised by that exact model. The card shows the saved target, and each run keeps the same target in its immutable snapshot.
  53. Agent tools expose the same fields. Omitting all model fields on create preserves the existing behavior of capturing the creating Session's complete selection; explicitly setting `provider` and `model` to `null` follows the live global selection at run time. On update, omitted fields stay unchanged, `null` clears a pin, and changing the route without an effort resets to the new model's default.
  54. ### 🧼 A clean execution boundary every time
  55. Each dispatched occurrence receives:
  56. - a new Session ID and fresh root Agent;
  57. - the saved prompt, not the source conversation history;
  58. - the captured workspace, cwd, Agent preset, permission preset, and a durable model target that either follows the live global selection or pins one model and optional reasoning effort;
  59. - an explicit `automation` message source containing the automation ID, run ID, and scheduled time;
  60. - a terminal result derived from the actual DSH turn end, not merely “message delivered.”
  61. ### 🧾 History that explains failure as well as success
  62. Runs progress through `queued`, `running`, and a terminal state such as `succeeded`, `failed`, `skipped`, or `cancelled`. Each record keeps its definition revision, prompt and target snapshot, scheduled time, result Session ID, bounded summary, and structured error.
  63. ![Run history with a completed run, an interrupted failure, summaries, and result Session links](docs/03-run-history-en.png)
  64. Updating a definition increments its revision, so each retained run still identifies what it executed. Deleting the definition does not immediately erase those run records. Retention removes only the oldest terminal records; queued and running records are never pruned.
  65. Set `archiveRunSessions: true` in the Cordis plugin config to archive completed, failed, cancelled, and other terminal run Sessions from the ordinary DSH conversation list. Their logs are not deleted: the Automations run history keeps the Session ID, summary, and error as an auditable inbox. Current Harness releases do not expose an unarchive API, so an archived result is labeled instead of offering a broken Session-open action. The default is `false` and preserves ordinary Session navigation.
  66. ---
  67. <a id="install"></a>
  68. ## ⚡ Install
  69. Install the GitHub bundle into the DSH Web profile, then restart `dsh web`:
  70. ```bash
  71. dsh plugin --profile web add github:titanwings/dsh-automation#v0.1.7
  72. ```
  73. The version tag keeps the install reproducible; a reviewed commit SHA is equally valid. If you run DSH from its source checkout, use `pnpm dsh` in place of `dsh`.
  74. <details>
  75. <summary><strong>Install from a local checkout</strong></summary>
  76. <br>
  77. Node.js 22.19 or newer is required.
  78. ```bash
  79. git clone https://github.com/titanwings/dsh-automation.git
  80. cd dsh-automation
  81. pnpm install
  82. pnpm check
  83. cd /path/to/deepseek-harness
  84. pnpm dsh plugin --profile web add /absolute/path/to/dsh-automation
  85. ```
  86. The repository ships its built Host and Web bundles. Git installation runs no
  87. package build script and needs no `allowBuilds` entry.
  88. </details>
  89. ---
  90. <a id="quick-start"></a>
  91. ## 🚀 Quick start
  92. ### 🖥️ From DSH Web
  93. 1. Open a Session attached to the workspace you want to automate.
  94. 2. Open **Automations** from the sidebar, or select it next to Chat and Trajectory. If the New Session screen is still blank, start the conversation first.
  95. 3. Enter a self-contained task, schedule, IANA time zone, model target, and permission boundary.
  96. 4. Use **Run now** once before relying on the schedule; inspect the resulting Session and run record.
  97. ### 💬 Ask an Agent
  98. Once installed, eligible root Agents receive the management tools. For example:
  99. ```text
  100. Create a read-only automation called "Weekday regression triage" for this workspace.
  101. Run it Monday through Friday at 09:30 in Asia/Shanghai. Inspect the latest local test
  102. evidence, identify regressions, and return a short report. Do not modify files.
  103. ```
  104. | Tool | Purpose |
  105. | --- | --- |
  106. | `automation_create` | Create a workspace-bound standalone rule, optionally with a pinned model and reasoning effort. |
  107. | `automation_list` | Read rules, next occurrences, and recent history. |
  108. | `automation_update` | Change name, prompt, cadence, model target, permission, or active/paused state. |
  109. | `automation_run_now` | Queue one manual occurrence with the same boundary. |
  110. | `automation_runs` | Read bounded run history, errors, summaries, and Session IDs. |
  111. | `automation_delete` | Delete the definition while retaining durable run records. |
  112. Plugin-level approval asks for human confirmation when an Agent creates or expands unattended future work. Read operations and a pause-only update do not add that extra approval step.
  113. ---
  114. ## 🧰 Good automation candidates
  115. The best automations are repeatable, bounded, and easy to verify.
  116. | Automation | Suggested boundary | Why it is useful |
  117. | --- | --- | --- |
  118. | Weekday regression triage | `read-only` | Inspect local test evidence, group failures, and leave a concise diagnosis in a new Session. |
  119. | Weekly repository health report | `read-only` | Review stale TODOs, dependency manifests, ignored failures, and test gaps without changing the tree. |
  120. | One-shot verification | `read-only` | Recheck a flaky failure later and preserve evidence outside the current chat. |
  121. | Generated-code refresh | `workspace-write` | Rebuild a known generated artifact, run focused checks, and report the exact diff. |
  122. | Maintenance fix window | `workspace-write` | Reproduce one bounded issue, make the smallest verified fix, and stop when acceptance checks pass. |
  123. A strong task states the goal, evidence to inspect, allowed changes, verification, and stopping condition. Avoid prompts such as “continue what we discussed” or “fix everything”: scheduled runs do not inherit the conversation that created them.
  124. ---
  125. <a id="a-schedule-is-not-permission"></a>
  126. ## 🛡️ A schedule is not permission
  127. Unattended coding needs a smaller trust boundary than an interactive chat. `dsh-automation` makes these constraints explicit:
  128. - **No inherited authority.** A run receives no source-chat history, inbox, grant, or past approval.
  129. - **Two permission modes only.** Rules may use `read-only` or `workspace-write`; unattended `danger-full-access` is not accepted.
  130. - **Fail closed.** Each fresh Session uses approval policy `never`. A tool that still requires interactive approval fails instead of waiting forever or silently escalating.
  131. - **Exact workspace scope.** Agent tools bind to the caller's canonical registered workspace; callers cannot supply an arbitrary target path.
  132. - **Explicit capability allowlist.** The fresh Agent admits a small coding-tool set. Interactive questions, plans, goals, nested Agents, runtime plugin mounting, terminal/background jobs, recursive automation management, and unknown third-party tools are denied by an Agent-scoped final guard.
  133. - **Loopback Web control.** The management RPC channel accepts loopback authority only.
  134. - **Traceable origin.** The task enters the Session with `source.kind = automation`, plus the automation/run identity and scheduled time. It never impersonates a human message.
  135. - **No blind retries.** Once an Agent may have produced side effects, the plugin does not automatically retry it.
  136. These boundaries do not turn every third-party DSH tool into a sandbox. Foreground shell and network behavior still depends on the selected Agent preset, tool set, and DSH guards. Review a task with **Run now** before enabling unattended writes.
  137. ---
  138. <a id="technical-details"></a>
  139. ## 🔧 Technical details
  140. ### ⏱️ Scheduling and recovery semantics
  141. | Situation | Behavior |
  142. | --- | --- |
  143. | Interval | Minimum five minutes; the first run occurs after one full interval, not immediately. |
  144. | Daily / weekly | Evaluated at local `HH:mm` in an explicit IANA zone; nonexistent DST wall times are skipped rather than shifted. |
  145. | Overlap | One active run per automation. A due occurrence is recorded as `skipped(overlap)` if its previous run is queued or running. |
  146. | Host restarts late | Within the grace window (15 minutes by default), only the latest due occurrence can catch up. Older work is not replayed as a write backlog. |
  147. | Run timeout | The Agent is cancelled after 60 minutes by default and the run is recorded as failed. |
  148. | Host crash | Persisted `queued` or `running` records become `failed(host_interrupted)` on recovery; they are not secretly re-executed. |
  149. | Session list | With `archiveRunSessions` enabled, terminal run Sessions are durably archived after their run record is saved. Startup retries archival for an interrupted terminal record, and an archive failure never changes the run outcome. |
  150. | Retry | Manual **Run now** only. There is no automatic side-effect retry. |
  151. A deterministic occurrence key prevents the scheduler from dispatching the same recorded occurrence twice. This is an **at-most-once dispatch policy**, not a claim that external side effects are exactly once.
  152. The DSH Host must be running for a task to start. Version 0.1 is not an operating-system daemon and does not coordinate multiple Hosts over one storage directory.
  153. <details>
  154. <summary><strong>🏗️ Architecture</strong></summary>
  155. <br>
  156. The product model is inspired by Codex [Scheduled tasks](https://learn.chatgpt.com/docs/automations), especially the distinction between returning to a chat and starting a standalone run. The implementation is native to DSH and Cordis; it does not copy Codex internals or patch DSH Core.
  157. ```mermaid
  158. flowchart LR
  159. UI["Web control center"] --> Service["Automation service"]
  160. Tools["Agent-scoped tools"] --> Service
  161. Service --> Definitions["Durable definitions"]
  162. Clock["Cordis-owned clock"] --> Claim["Durable occurrence claim"]
  163. Definitions --> Clock
  164. Claim --> Executor["Run executor"]
  165. Executor --> Agent["Fresh root Agent + Session"]
  166. Agent --> Runs["Durable run history"]
  167. Runs --> Service
  168. ```
  169. | Layer | Owns | Does not own |
  170. | --- | --- | --- |
  171. | Definition/run store | Durable facts and revision snapshots | Timers or Agents |
  172. | Clock | Finding the next due occurrence | Prompts, permissions, or execution |
  173. | Executor | One already-claimed fresh Agent run | Schedule mutation |
  174. | Agent tools / Web RPC | Validated service calls | Tables, timers, or direct Agent construction |
  175. | Web client | Native `conversation.view` presentation | Authoritative due state |
  176. Cordis disposal stops the clock, cancels plugin-owned live handles, removes tools/RPC/UI, and closes storage without inventing a successful run. The full rationale and data model are in the [design document](docs/DESIGN.zh-CN.md).
  177. </details>
  178. ### ⚙️ Configuration
  179. The included `cordis.patch.yml` uses conservative defaults:
  180. | Option | Default | Meaning |
  181. | --- | ---: | --- |
  182. | `maxConcurrentRuns` | `2` | Global execution capacity for this Host. Per-automation overlap is still disabled. |
  183. | `runTimeoutMinutes` | `60` | Maximum wall-clock time for one fresh Agent run. |
  184. | `misfireGraceMinutes` | `15` | How late the latest due occurrence may catch up after downtime. |
  185. | `historyLimit` | `200` | Durable terminal-run retention per automation; active records are always kept. |
  186. | `archiveRunSessions` | `false` | Opt in to archiving terminal run Sessions from the ordinary conversation list while preserving their logs and durable Automation result metadata. Current Harness releases cannot directly reopen an archived Session. |
  187. Edit the plugin row in the deployment profile if you need different values. Increasing concurrency or timeout expands the amount of unattended work; treat those changes as policy decisions.
  188. ### 🚧 Current limits
  189. Version 0.1 deliberately does not provide:
  190. - same-chat heartbeats — use DSH Core Schedule;
  191. - raw cron or arbitrary shell actions;
  192. - unattended full access;
  193. - automatic retry of a run that may have side effects;
  194. - Git worktree creation or cleanup;
  195. - multi-workspace targets, DAGs, or hidden cross-run memory;
  196. - external email, SMS, or push delivery;
  197. - a guarantee of exactly-once external side effects.
  198. Only local execution is implemented. A stable DSH worktree lifecycle service should exist before a UI toggle claims worktree isolation.
  199. ### 🧪 Development
  200. ```bash
  201. pnpm typecheck
  202. pnpm test
  203. pnpm build
  204. # or all three
  205. pnpm check
  206. ```
  207. The package builds a Host ESM bundle and a Web client bundle for DSH's `window.__ModuleLoader__` contract. Tests cover recurrence and DST behavior, durable-domain invariants, Agent capability guards, scheduler overlap/recovery/retention, and client schedule/localization helpers.
  208. ---
  209. ## 📄 License
  210. [MIT](LICENSE). This is an independent community plugin for DeepSeek Harness. “Codex” is referenced only to describe the product pattern that informed the design.
  211. ### Fork maintenance notes
  212. The local reliability/performance branch and its data-compatibility, validation, and rollout notes are documented in [the optimization handoff](docs/OPTIMIZATION.zh-CN.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.