DSH Plugins Marketplace

DSH Plugins

Plugins

/

UI & Experience

/

dsh-shutdown-idle

d

dsh-shutdown-idle

Manifest valid

Runs a chosen power action (shutdown / restart / hibernate / sleep / lock / logoff) once every Agent session and background job has gone idle: the plugin samples in-process sessions once per second, c

UI (client)hasBundlePatch

dsh-shutdown-idle

DSH 插件:开启后,等所有会话都结束(没有任何 Agent 在跑)并保持空闲,自动执行关机(也可选重启 / 休眠 / 睡眠 / 锁定 / 注销)。

用起来

  1. 打开「设置 → 会话结束后关机」,点 开启。
  2. 正常派活给任意会话;所有会话的回合结束后,插件先等 空闲确认 秒,再进入 倒计时 秒。
  3. 倒计时结束即执行所选动作。期间任何会话重新开始运行,或点界面上的 取消,这次动作都会被撤销。

右上角(浮层右下角)在开启后会常驻一张小卡片,显示当前阶段与剩余秒数,并带「取消」按钮。按住卡片标题即可拖动:松手后位置写进浏览器 localStorage(键 dsh.shutdown-idle.pill.position),下次打开停在原处;拖动过程始终夹在视口内(留 8px 可见),窗口变小也会自动收回视野。从「取消」按钮上按下不会误触发拖动。

判据

  • 会话进行中 = ctx.get('agents').list() 里存在 status === 'running' 的 Agent(与 dshmarket 的更新守卫同一判据)。这一条固定生效,不可关闭。
  • 后台任务 = ctx.get('jobs') 中 status === 'running' 的作业(含各存活会话名下的作业),即 DSH 界面里的「后台任务」;由配置项 considerJobs 决定是否检测,关掉后完全不再统计。
  • 拿不到 agents 服务时按 不空闲 处理:宁可不执行,也不误关机。
  • 「必须观察到会话运行过」默认开启:刚开启且没有任何任务时不会执行动作。

参数

参数默认说明
动作shutdownshutdown / restart / hibernate / sleep / lock / logoff / none(none = 只记录不执行)
空闲确认20 秒全部空闲后先确认这么久,避免回合间隙被误判为结束
倒计时60 秒可取消的执行前倒计时
必须观察到会话运行过是防止刚开启就执行
后台任务也算占用(considerJobs)是关掉后完全不再检测后台任务(shell 作业)

设置页把这几项收在「什么算『还在忙』」区块里:会话在跑固定算忙,下面两个复选框是配置项。

初始值来自本包 cordis.patch.yml 的行 config;界面改动写入 <DSH_HOME>/dsh-shutdown-idle/settings.json 并优先生效(删除该文件即回落到 patch 初始值)。

开关状态不持久化:宿主重启后一律是「关闭」,避免开机即误关机。

接口

方法路径说明
GET/dsh-shutdown/api/state开关、阶段、倒计时、运行中会话/作业
POST/dsh-shutdown/api/config{ enabled?, action?, settleSeconds?, countdownSeconds?, requireActivity?, considerJobs? }
POST/dsh-shutdown/api/cancel取消倒计时并关闭开关
GET/dsh-shutdown客户端半不可用时的兜底页面

平台

动作命令是 Windows 自带的 shutdown / rundll32。非 Windows 平台上,除 none 外的动作会被降级为 none 并在界面标注,不会执行命令。

字段一览

  • host.v2.mjs — Host 半:状态机、HTTP 接口、命令派发、兜底页面。(host.v1.mjs 为上一版,保留以便回滚。)
  • client.js — 浏览器半:设置页分区 + shell.overlay 浮层卡片(可拖动,useDraggable 负责指针捕获、边界夹取与位置持久化)。
  • cordis.patch.yml — bundle 补丁:插入插件行与初始配置。

升级宿主半代码时换文件名(host.v1.mjs → host.v2.mjs)并同步 package.json 的 main / exports:config-only 热重载不会重新加载同一路径的模块。

Comments

Loading…

Similar plugins

dsh-mac-keep-awake

by wjvalue

Keep macOS awake (no idle system sleep) while a DeepSeek Harness session is running · 会话进行时不让 Mac 空闲休眠的 DSH 插件

Development & InfrastructureManifest valid

★ 0

MIT

JavaScript

Oct 4, 2026

dsh plugin --profile web add dsh-mac-keep-awake

by SanYe-SanJiu

Windows-only process control for the harness: a sidebar button that shuts DSH down through the host's own graceful exit path, an app-window / normal-tab switch on the Plugins card that rewrites the de

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-power-switch

Keeps an unfinished task list visible across turns. DSH clears the todos projection at the start of every turn and expects the model to rewrite the whole list, so when a turn is interrupted the plan i

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-todo-continuity

by qingyou002

DSH plugin: hands a long session over to a fresh session in the same workspace on /handoff or at a token threshold, carrying the preset, model, permissions and plan mode across; the brief is written by the session's own model and the switch waits for a step boundary instead of interrupting running work.

Sessions & MessagesManifest valid

★ 0

MIT

TypeScript

Sep 28, 2026

dsh plugin --profile web add dsh-auto-handoff

by Meowrium

dsh plugin: auto-continue after quota/rate-limit reset + peak/valley idle-task suspend/resume, with composer toggles and a status line.

Manifest valid

★ 0

MIT

JavaScript

Sep 10, 2026

dsh plugin --profile web add dsh-auto-continue

Compacts a long session after a configurable idle time when its context exceeds a configurable token threshold, before the provider KV cache expires; both values are set on the plugin's page in the Pl

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-idle-compact