unera/dsh-graceful-restart ↗★ 1

@dr-co/dsh-graceful-restart

Graceful, idle-aware restart of the DSH host: dsh_restart registers a request that waits for every agent (subagents included) to finish, logs the causes, ends the process after a quiet window, wakes the sessions that asked for a note once the host is up again, and tells the session that started a background job that the restart killed it.

包名
@dr-co/dsh-graceful-restart
兼容性
待验证
Harness 依赖范围
^0.2.1-rc.4
Cordis 依赖范围
~4.0.5
版本
1.5.0
许可证
MIT
最近更新
2026年11月11日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:unera/dsh-graceful-restart

Configuration

Everything is edited on the plugin's own page: Plugins → dsh-graceful-restart. The card is rendered by client.js against the plugin's Config schema, so the fields are the same ones the config file holds (volatile() fields are the ones the settings service persists). Language: English, Russian, Chinese.

FieldDefaultMeaning
exitMethodsystemctlsystemctl — systemctl --user restart , the only method that comes back by itself under a systemd user unit. command — run exitCommand. kill — SIGTERM to itself. exit — process.exit(0).
serviceUnitdsh-serverUnit restarted by systemctl.
exitCommand—Shell command for command, started detached from the dying process.
quietSeconds10How long the host must stay idle after the last activity, re-checked every second.
waitForJobsfalseHold the restart while a background job (run_in_background, job_*) is running or stopping. Off by default on purpose: a dev server that never ends would postpone the restart forever. When it is on, the job id and label are logged once, and they are counted in the card's status line.
notifyJobOwnerstrueAfter the restart, tell each session whose background job the restart killed: one note per session, listing all of that session's interrupted jobs. The switch is greyed out in the card while waitForJobs is on — then the restart waits for the jobs instead of killing them, so there is nothing to report.
reasonFile—Optional file that receives the causes before the restart, one line. On a host where the unit's ExecStartPost prints a start-up report, point this at the file that report reads (for example /home/dsh/.cache/dsh-restart-reason.txt).
languageenLanguage of tool descriptions, tool answers and the post-restart note: en, ru, zh.
stateDir$DSH_HOME/graceful-restartRequests, event log and pending notifications.