rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:NutshellLee/dsh-agent-restart
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Lets DeepSeek Harness (DSH NEXT desktop) pick up unfinished work by itself after the agent restarts the app.
Restarting kills the current turn, and a new turn only starts when something triggers it. The usual choices are waiting for the human to speak again or losing context and starting over. This plugin makes restart part of the workflow:
2.0.17-next (bundled @deepseek-ai/* at 0.2.0-rc.2).sessionController, sessions). Those are internal interfaces and may change between DSH releases, so re-verify after upgrading. The plugin does not promise compatibility with older DSH versions; when it cannot work it reports an error instead of failing silently.restart_harness toolrestart.log to confirm the helper actually started; otherwise reports failure.restart into the session and opens a new turn.voice-resume.json on startup.dsh-voice-mode-desktop) reads that file and decides whether to restore voice mode. The two plugins install independently and do not depend on each other.restart_harness(reason, pending); the plugin writes restart-journal.json.DSH NEXT, waits for exit, writes the one-shot marker agent-restart.flag, and relaunches the app.voice-resume.json for the voice plugin and removes the marker.restart continuation message and opens a new turn.continued.Before restarting, the plugin records the voice state (on/off, active session id) in the journal. After restart it writes voice-resume.json; the voice plugin reads it on startup and restores voice mode when needed, then acknowledges and deletes the file.
So voice state survives the restart: if it was on before, it is on afterwards and you can hold to speak. Only agent-initiated restarts use this path; manual launches do not auto-restore. If the voice plugin is not installed, restart still works without voice restoration.
Restarting in-process via Electron's relaunch looks cleanest, but it is unreachable here: the plugin runs in a host subprocess without the Electron app object. The renderer does expose a restart command, but it shows a native confirmation dialog and must be relayed through the UI. Removing the dialog would mean patching DSH's main process — platform core, overwritten by upgrades, not worth it.
Community restart plugins were evaluated too: they ship their own watchdog process plus a token-protected HTTP route, wrapping the external-process approach in more moving parts and requiring per-version adaptation. The cost outweighs the benefit.
That leaves an external helper process created through WMI: the only restart path verified to work on this machine, and it leaves DSH core untouched so the plugin can be updated independently.
Requirements: Windows, DSH NEXT desktop 2.0.17-next, PowerShell and WMI available.
Option A (recommended):
npm install @nutshelllee/dsh-agent-restart (or add it to the DSH profile dependencies).- id: agent-restart, name: "@nutshelllee/dsh-agent-restart" to the profile's cordis.patch.yml insert list.restart_harness appears in the tool list.Option B (local development): link this repository into node_modules/@nutshelllee/dsh-agent-restart of the profile, then follow steps 2 and 3.
MIT, see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。