插件目录 / UI & Skins / dsh-timer-scheduler
dsh-timer-scheduler
已验证 · 实测可装 GMH13552
功能简介
简单的dsh定时任务插件 支持定时列表任务、ui显示,对于长期任务有益
可用 — 实测通过,早期项目
简单的dsh定时任务插件 支持定时列表任务、ui显示,对于长期任务有益 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-timer-scheduler-ui
A DeepSeek Harness (DSH) plugin: an agent self-scheduler that wakes the agent at a future time to autonomously check on background jobs, remote tasks, or anything that needs a "come back later" look — without a human having to prompt it — plus a header reminder menu in the web UI.
Features
schedule_reminder— schedule a one-shot reminder, relative (delay_seconds) or absolute (at: ISO 8601 /HH:MM[:SS]).- Auto-cancel via
subject— pass asubject(background subagent id / shell background job id); when that subagent or background job settles and its completion notice enters the parent inbox, the plugin cancels matching reminders automatically. list_reminders— list pending reminders.cancel_reminder— cancel a reminder by id.- Auto-wake — on fire, the agent is woken through
agent.followup()with a new turn; it acts and reports on its own, no human wake-up needed. - Persistence — pending reminders are serialized to
$DSH_HOME/timer-reminders.jsonand re-armed on restart. - Header reminder menu (client half) — per-reminder note + live countdown, theme-aware via
--dsw-alias-*tokens, hidden when empty, never covering the send button.
Structure
One package, two halves, in the standard dsh.client + dsh.bundle.patch shape. Everything is host-plane: composing this bundle into the web profile's host composition makes the model tools available to every agent regardless of preset, and the route serves the browser panel.
| File | Half | Role |
|---|---|---|
lib/index.js |
Host | The three model tools (schedule_reminder / list_reminders / cancel_reminder), auto-wake, disk persistence, and GET /api/timer-reminders |
lib/client.js |
Client | conversation.session.header.actions compact dropdown, polling every second |
cordis.patch.yml |
bundle | Inserts the Host half into the web profile's host composition |
package.json |
— | dsh.client (browser bundle) + dsh.bundle.patch (host row) |
Preset adaptation: the anchored-standard preset keeps these tools resident for its agents via its residentTools option; every other preset works without any configuration.
Installation
Not published to npm yet. Install from source:
Host-plane tools: once this bundle is composed, every agent on any preset can call
schedule_reminder/list_reminders/cancel_reminder. If a preset uses an aggressive tool-bootstrap filter (likeanchored-standard), keep the three tool names resident so its agents still see them:# inside the tool-bootstrap row's config residentTools: [schedule_reminder, list_reminders, cancel_reminder]
Place this directory in the web profile workspace and mount it as a dependency + bundle in the profile's
package.json:{ "dependencies": { "dsh-timer-scheduler-ui": "file:./packages/dsh-timer-scheduler-ui" }, "dsh": { "profile": { "bundles": [ "@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-timer-scheduler-ui" ] } } }Install and restart:
cd <web-profile> pnpm install # restart dsh web (the Host half runs in the server process), then hard-refreshVerify:
curl 'http://127.0.0.1:<port>/api/timer-reminders?sessionId=x' # → {"reminders":[]} curl 'http://127.0.0.1:<port>/plugins/dsh-timer-scheduler-ui/client.js' # → 200 JS
Once published to npm: dsh plugin --profile web add dsh-timer-scheduler-ui.
Usage
In an agent session, just say:
- "Remind me in 30 minutes to check that background job" →
schedule_reminder(delay_seconds=1800, note=…, subject=<subagentId>) - "Check the deployment at 3pm" →
schedule_reminder(at="15:00", note=…) - Manage with
list_reminders/cancel_reminder.
The header reminder menu shows the countdown while reminders are pending and hides when empty.
How it works
- The agent calls
schedule_reminder; the host plugin arms a one-shot Cordistimerand writes{id, note, dueMs, sessionId, subject?}to~/.dsh/timer-reminders.json. - On fire, the host plugin resolves the agent via
agents.get(sessionId). If it is not live, the plugin cold-resumes the persisted session throughctx.agents.resume(), then builds asource.kind = 'plugin'user message and delivers it throughagent.followup()to wake the driver. This works for both regular sessions and continuable subagent sessions (as long as session persistence is configured and the session can be resumed). - If a reminder carries a
subjectand a matching background subagent completion notice (source.kind = 'subagent-settled') or shell background job completion notice (source.plugin = 'tool-jobs') enters the parent session's inbox, the host plugin cancels the reminder automatically. - This package's client half fetches
/api/timer-reminders?sessionId=…every second and renders the countdown from that same file.
Known limitations
- Cold resume requires session persistence to be configured and the owning session to be resumable. If resume fails, the reminder is logged and skipped rather than silently dropped. The cold-resumed AgentHandle is kept until the plugin is unloaded, so the woken session stays resident after the reminder; a future version may dispose it after the wake turn settles.
- Reminders that become due while the DSH process is down are re-armed on startup and fire immediately (instead of being skipped).
- Delays beyond ~24.8 days are chunked, so they work, but the mechanism is "in-process timer + disk snapshot"; the timer only needs the process to stay up to fire.
License
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-timer-scheduler」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:GMH13552/dsh-timer-scheduler Headless(CLI)profile:
dsh plugin --profile headless add github:GMH13552/dsh-timer-scheduler 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。