dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
在 DSH Web 侧边栏底部添加重启控件:宿主经自身的优雅退出通道退出,由检测到的进程守护(systemd、Kubernetes 或 Docker)拉起新进程,没有守护时插件自行拉起;右下角提示条轮询宿主 pid,直到新进程应答。
A DSH Web plugin that restarts the running host from the sidebar, and keeps reporting until a new process answers.
Click again to restart), a second click sends the request. Arming expires after five seconds.appExit (ctx.get('appExit')), so the Cordis fiber tree disposes before the process leaves — it does not kill the process outright.INVOCATION_ID), Kubernetes (KUBERNETES_SERVICE_HOST) and Docker (/.dockerenv) are detected; when one is present the plugin only exits and lets it restart the unit/container. With no supervisor detected, the plugin starts a detached successor itself: a shell waits two seconds for the port to be released, then execs the same executable and arguments with the same cwd and environment.Restarting…, then Restarted or the failure reason, with Reload page / Retry / Dismiss. The attempt is stored in localStorage, so it survives the shell remounting during the reconnect, a page reload, and a second tab opened by the restarted process.dsh web), version 0.2.x.webServer and connection services, which the shipped Web composition provides.Install it as a bundle from the DSH Web plugin manager (Plugin Manager → install bundle → this package or its directory).
For a manual profile install:
dsh plugin --profile <profile> add <path-or-git-url>
then add dsh-restart-control to dsh.profile.bundles in $DSH_HOME/profiles/<profile>/package.json and restart the host. A bundle is only composed when it is listed there; adding the dependency alone does not start it.
The Host half registers one exact route on the composition's webServer:
| Method | Path | Result |
|---|---|---|
GET | /restart-dsh | { pid, startedAt, pending } — the live process identity |
POST | /restart-dsh | 202 { pid, startedAt, pending, supervisor, relaunch }, then the shutdown; 409 while a restart is already pending |
Every request first passes ctx.connection.requestRejection(req): the Host/Origin fence and the browser login cookie gate the caller before any state is read or any restart is scheduled. An unauthenticated request gets 401 and changes nothing.
MIT
在 DSH Web 侧边栏底部添加重启控件,并持续汇报进度直到新进程应答。
ctx.get('appExit'))退出,先 dispose 插件树再退出进程。exec。localStorage,重连导致外壳重挂载、刷新页面、乃至重启后新开的标签页都能看到结果。安装:在 DSH Web 的插件管理器里按 bundle 安装本包;或 dsh plugin --profile <profile> add <路径或 git 地址> 后,把 dsh-restart-control 加入 $DSH_HOME/profiles/<profile>/package.json 的 dsh.profile.bundles,再重启宿主。
路由 /restart-dsh 的每个请求都先过 ctx.connection.requestRejection:未通过 Host/Origin 围栏与登录 cookie 的请求返回 401,不读取任何状态、不触发重启。