LouisHaoL/dsh-timer-agent 预览 preview

LouisHaoL/dsh-timer-agent

DSH plugin: host-resident scheduled-jobs × AI-agent engine (hermes-agent cron inspired) — 60s ticker fires real agent sessions via cron; pinned-session / project-workdir / default-workspace targeting; timer_agent model tool + web board

Project Overview项目介绍

LouisHaoL/dsh-timer-agent is a native plugin built exclusively for DeepSeek Harness (DSH). It implements a persistent in-process scheduled task engine that runs alongside the DSH web service, and continues triggering tasks even when the web GUI is closed. To install the plugin, you run the command dsh plugin --profile web add link:<absolute path to this directory> then restart the dsh web process, after which a new "Scheduled Tasks" entry will appear in the web sidebar. The plugin supports two types of scheduled tasks: AI agent tasks that run a pre-written prompt at the scheduled time, and plain command tasks that run a custom shell command directly.

The plugin is designed for DSH users who need to automate recurring AI workflows or routine system maintenance scripts. When creating a task, users can select from pre-filled common cron schedules or write a custom 5-field cron expression. Users can also choose where the task runs: an existing DSH session to retain conversation context, a specified project working directory for a new session, or the default workspace for one-off tasks. AI agents can also create, list, update, pause, resume, and delete tasks directly via the timer_agent tool provided by the plugin.

The plugin is released under the open source MIT license, with only one small runtime dependency schemastery for configuration validation, and all peer dependencies are provided by the DSH host. It is compatible with DSH version 0.1.1-rc.2 and requires Node.js 22 or newer, and has only been tested on Windows 10 and 11, with no testing done on macOS or Linux. Users must note that plain command tasks run with the current user's system permissions, with no sandbox or whitelisting, so only trusted commands should be added as tasks.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,在DSH的Web GUI中实现了一个常驻的定时任务引擎,设计参考了NousResearch/hermes-agent项目的cron系统。插件随dsh web服务启动自动生效,即使关闭浏览器GUI页面也能照常触发任务,支持执行定时AI Agent会话和自定义命令两类任务,共有工具调用、Web面板、本地文件三种任务管理入口。

该插件面向需要自动化定期AI任务或系统脚本的DSH用户。用户可通过Web侧边栏面板创建任务,使用标准5段cron表达式配置触发时间,可选择在已有会话中继续对话保留上下文,也可指定工作目录新建会话,或是在默认工作空间发起新对话,AI也可通过内置的timer_agent工具直接创建和管理所有任务。

插件遵循MIT许可证开放分发,运行时仅依赖schemastery做配置校验,所有对等依赖由DSH宿主提供,无需额外安装。兼容DSH 0.1.1-rc.2版本与Node.js 22及以上版本,仅在Windows 10/11上经过测试,macOS和Linux未验证。普通命令任务以当前用户权限运行,无沙箱限制,需谨慎使用。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 13 stars - an early-stage project星标 13,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:LouisHaoL/dsh-timer-agent

把 LouisHaoL/dsh-timer-agent 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-timer-agent — DSH 定时任务 × AI Agent 引擎

中文 | English

一个 DeepSeek Harness (DSH) Web GUI 插件:调研 NousResearch/hermes-agent 的 cron 系统后,按其「定时器 ↔ Agent 协同」思路实现的 host 常驻定时任务引擎——dsh web 服务启动即生效,GUI 页面关闭也照常触发。

新建任务弹窗:项目/会话树 + Agent 预设 + cron 定时(截图数据已脱敏)

它做什么

到点(5 段 cron)通过真实 agent 会话执行你写好的 prompt:

  • 指定已有会话 → 每次触发继续该对话,具备上下文连续性(hermes cron 的 continuity 形态)
  • 指定项目 workdir → 每次在该项目内新建会话运行(自动加载其 AGENTS.md)
  • 两者都留空 → 每次触发在默认工作空间新建会话发起新对话

对话中可直接用 timer_agent 工具管理任务(create / list / update / pause / resume / remove / run);Web GUI 侧边栏「定时任务」面板管理同一批任务——一个台账,三个入口(工具 / WebUI / 文件)。

两种任务类型

  • AI Agent 任务(默认):到点驱动真实 agent 会话执行 prompt,消耗 API 额度
  • 普通任务(命令):到点直接 spawn 运行你指定的 命令 + 参数(可选工作目录、超时),不经过 AI、不消耗额度;stdout/stderr 尾部(≤16k 字符)与退出码随执行记录入账。适合自包含的脚本(下载、导出、续期等)

[!WARNING] 普通任务会在你的机器上以当前用户权限执行任意命令,没有任何沙箱或白名单。 任何能新建/编辑任务的人(你自己、能调用 timer_agent 工具的 agent 会话、能访问回环 API 的本机进程)都能让任意程序定时运行。请只填入你审查过的、无人值守安全的命令;不要把该插件暴露给不可信环境;任务台账 jobs.json 可被篡改即等价于本机任意代码执行。谨慎使用。

架构(hermes-agent cron 同构)

┌─ dsh web 宿主进程 ────────────────────────────────┐
│  60s ticker(常驻,GUI 关闭也运行)                  │
│   ├─ HostJobStore   ~/.dsh/timer-agent/jobs.json  │
│   │                 (原子写,损坏降级不崩溃)        │
│   ├─ TimerRunner    at-most-once:先顺延 nextRunAt │
│   │                 再触发;运行中跳过;错过即跳过   │
│   │   ├─ agents.resume(钉住会话)                  │
│   │   └─ agents.create + workspaceRegistry        │
│   │       (新会话挂到正确项目)                     │
│   ├─ timer_agent 工具(模型可调用)                 │
│   └─ /api/dsh-timer-agent/* 路由(仅回环)          │
└────────────────────────┬──────────────────────────┘
                         │ HTTP 轮询镜像(5s)
┌─ 浏览器半边(薄)────────┴──────────────────────────┐
│  侧边栏入口 + 任务面板(React)                      │
│  可折叠项目/会话树 · cron 预设 · 执行历史           │
└───────────────────────────────────────────────────┘

执行结算通过 session/event(turn/end 的 reason.kind)判定成功/失败,失败原因精确写入台账。

功能

  • 定时执行:5 段 cron(分 时 日 月 周,支持 * / */n / a-b / 逗号列表)+ 预设下拉(每天 09:00 / 每小时 / 每 10 分钟 / 每周一 09:00,新建与编辑页均有)
  • 三种执行模式:新建页下拉选择 Cron / 固定间隔 / 一次性(紧跟「启用定时执行」,未勾选时禁用);固定间隔按上次触发时刻堆整周期,不随重启漂移
  • 一次性任务:只设一个执行时间(默认当前 +1 小时),触发一次即自动归档——无论成功、失败还是手动「立即执行」,都算消耗;适合"做完即走"的收尾脚本与提醒
  • 下次执行时间可编辑:固定间隔与一次性任务可在详情页手动改下次执行时间;Cron 模式严格遵守表达式(服务端拒绝手改)
  • 暂停/恢复语义:暂停保留下次执行时间;恢复基于真实上次执行时间重算,错过的执行不补跑,直接跳到下一个未来时间点
  • 目标树选择器:按项目分组的可折叠树,每组含「新增会话」+ 该项目已有会话(按最近活跃排序);选中会话即钉住该对话
  • 任务面板:列表(标题/状态/下次运行/执行次数)、搜索过滤、详情页(cron 编辑/执行历史/跳转会话 transcript/立即执行/重置/删除)
  • 模型工具:任何对话中 timer_agent 直接创建与管理定时任务
  • 系统提示注入:host 半边注册 plugin:timer-agent 播报段,agent 知晓本插件能力与协作方式
  • 安全:API 路由仅回环 + 同源可访问(与 dsh-ssh 同防线)

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev DeepSeek-Harness-Hub 下一个 Next dsh-agent-plugins-market →