deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
DeepSeek Harness (dsh) 定时任务插件:让代理自己编排"到点执行某命令"的重复任务,触发前会询问代理是否阻止(veto),代理无法响应时才真正执行。
A DeepSeek Harness (dsh) plugin that lets the agent schedule recurring timer tasks ("run this command when due"). Before a firing executes, the owning session (or its blocking subagent) is prompted and may veto it; only when nobody vetoes does the action run.
timer_schedule — 设置定时任务,三种生命周期(见下)timer_cancel — 取消任务timer_veto — 阻止本次触发description)与本次 veto 的后果| 模式 | 参数 | veto 后 | 执行成功后 |
|---|---|---|---|
| 一次性 | (默认) | 任务结束,不再询问 | 任务结束 |
| 执行即收工(最常用) | untilDone: true |
每 interval_minutes 重新询问 |
任务自动结束 |
| 周期循环 | repeat: true |
每 interval_minutes 重新询问 |
继续循环,直到 timer_cancel |
description 参数用于说明任务目的(如"编译完成后关闭云构建实例"),每次触发都会随提示注入给代理,代理无需自行猜测。
夜间无人值守跑长任务(如编译)时,让代理设置一个"每 30 分钟自动关机"的定时任务:
timer_schedule(name="auto-shutdown",
command="bash /path/to/your/stop-instances.sh",
delay_minutes=30, repeat=true)
# 从 GitHub 安装
dsh plugin --profile <name> add github:YOUR_NAME/dsh-timer-task
# 或本地路径
dsh plugin --profile <name> add /path/to/dsh-timer-task
在 profile 的 cordis.patch.yml(或插件自带 patch)中启用 timer-task 条目后重启 dsh。
| 配置项 | 默认 | 说明 |
|---|---|---|
vetoWindowSeconds |
60 | 全部 agent 空闲后,无人 veto 的宽限窗口(秒) |
checkIntervalSeconds |
20 | 定时器检查周期(秒) |
vetoDir |
~/.dsh/plugins/dsh-timer-task/veto |
全局 veto 标记目录(插件进程可写) |
persistFile |
~/.dsh/plugins/dsh-timer-task/tasks.json |
任务持久化文件 |
agent.inject(),通知型,不打断工作流)vetoWindowSecondscommand;有人 veto → 跳过本次(重复型任务重排下一周期)veto 通道(任一即可):
timer_veto 工具(主代理/有该工具的代理).timer-veto-<name>(子代理 toolFilter 白名单场景)vetoDir 下创建 <name> 文件(外部手动)任务数据含会话归属,默认存于用户家目录(os.homedir() 解析,可通过配置覆盖);动作命令由使用方自行指定,插件本身不内置任何外部调用。
timer_schedule 的调用方(代理/用户)指定——请只调度你信任的命令MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。