dsh-self-restart
开发工具 活跃维护

dsh-self-restart

NecromanAlbert/dsh-self-restart

会话可主动发起桌面重启请求,重启完成后原持久化会话会自动恢复,直接继续此前未完成的任务流程,无需手动重连或重新配置运行环境,保障任务不中断。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
11 KB
仓库大小
29 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:NecromanAlbert/dsh-self-restart
git clone https://github.com/NecromanAlbert/dsh-self-restart.git
git clone git@github.com:NecromanAlbert/dsh-self-restart.git
README.md main
# dsh-self-restart **Any DeepSeek Harness session can restart Desktop and come back with its own mission.** [简体中文](https://github.com/NecromanAlbert/dsh-self-restart/blob/main/README.zh.md) · [MIT](https://github.com/NecromanAlbert/dsh-self-restart/blob/main/LICENSE) [![License: MIT](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/NecromanAlbert/dsh-self-restart/main/LICENSE) [![dsh.bundle](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/dsh.bundle-required-0f766e.svg)](https://deepseek-harness.github.io/deepseek-harness/develop/basic/publish.html) [![topic: dsh-plugin](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/topic-dsh--plugin-111827.svg)](https://github.com/topics/dsh-plugin) [![Node.js 22+](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/Node.js-22%2B-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org/)

Community plugin for DeepSeek Harness. Not an official DeepSeek AI product.

Host-only. Writes a handoff for the calling session, requests the official Desktop restart, then agents.resumes that persisted identity if it is not live yet and followups it. GUI does not have to open the tab first.

Install

dsh plugin --profile desktop add github:NecromanAlbert/dsh-self-restart

Restart Desktop after install. Any session on that profile then sees dsh_restart_session.

Agent tool

{
  "mission": "Reload plugin copies, then verify the notes pad still opens.",
  "reason": "reload-client"
}
Argument
mission Required. Self-contained. The next turn after boot only sees this text.
reason Optional. Stored on the handoff file.
sessionId Optional. Defaults to currentInitiator. Do not point this at another session unless you mean to.

After boot the plugin:

  1. Reads $DSH_HOME/self-restart/handoff.json (max age 30 minutes).
  2. Calls agents.resume({ resumeSessionId }) if that session is not live.
  3. followups a plugin notice with the mission.
  4. Clears the file so a later boot does not replay it.

One handoff file at a time. A second call before restart overwrites the first.

What this is not

  • Not a dsh web process killer / scheduled-task relaunch.
  • Not a sidebar / tray restart button.
  • Not “ask the human to restart, then wait for them to reopen the tab”.
  • Not a housekeeper identity fiber.
  • Not shengyvself/dsh-autoresume (one configured targetSessionId).
  • Not edusrez/dsh-smart-restart (systemd / web).

If the Host has no desktopActions.requestRestart, the tool still writes the handoff and tells you to restart Desktop yourself.

Develop

node --test

Host: lib/index.js. Shared: lib/handoff.js, lib/paths.js, lib/followup.js. No Client half.

License

MIT.