dsh-service-control
Manifest validdsh-service-control
在 DeepSeek Harness(DSH)Web 会话头部右侧工具区(导出会话/修复会话按钮旁)提供 「重启服务」 与 「关闭服务」 两个按钮,让你不用回到终端窗口,就能在 UI 里直接重启或关闭整个 dsh web 进程。
- 重启服务(⟳):优雅关闭当前进程 → 自动重新拉起
dsh web,前端 WebSocket 自动重连,页面无需手动刷新。 - 关闭服务(⏻):优雅关闭整个
dsh web进程,前端页面随后自动关闭(被浏览器拦截时回退到空白页,手动关标签即可)。
功能
- 两段式确认:点击一次按钮变红显示「确认?」,5 秒内再点一次才真正执行,防止误触。
- 优雅退出:通过 DSH launcher 的
ctx.appExit(0)退出入口,先 dispose 整个应用树(保存会话、关闭 WebSocket 等),等价于在启动窗口按 Ctrl+C,不会强杀丢数据。 - 自动重启(适配新启动器):重启走
restart-web.ps1→ 一次性计划任务 →restart-helper.ps1→ 启动器-ControlledRestart。计划任务独立于后端进程树,杀后端不影响它;-ControlledRestart复用「先启动后诊断」路径,不弹菜单、不开浏览器,只以退出码和日志报告。日志写入restart-web.log(.err)。 - 重启后保留:作为 profile 本地插件(junction 到 profile 的 node_modules 并在
cordis.patch.yml登记),进程重启后按钮依然存在——这是它与动态插件形态的根本区别。
安装
-
将本包放入工作区,例如
插件开发/dsh-service-control。 -
在 profile 的 node_modules 里建 junction:
New-Item -ItemType Junction ` -Path "$env:USERPROFILE\.dsh\profiles\web\node_modules\dsh-service-control" ` -Target "D:\ds harness默认工作区\插件开发\dsh-service-control" -
在
cordis.patch.yml末尾追加:- insert: - id: dsh-service-control name: 'dsh-service-control' -
重启
dsh web生效。
路径硬编码:Host 半区里的
D:\DeepSeek Harness与3080是当前部署事实,如需移植到其他部署请同步修改lib/index.js顶部的DSH_WEB/DSH_ROOT/PORT。
原理
- Host 半区通过
ctx.connection.rpc.handle(RPC_CHANNEL, handler, { authority: 'loopback' })暴露两个 endpoint:service/restart、service/shutdown。 - 关闭:
ctx.get('appExit')(0)优雅退出整个进程。 - 重启:
spawndetached 的pwsh运行restart-web.ps1(注册一次性计划任务),再appExit(0)退出宿主;计划任务独立运行restart-helper.ps1→ 启动器-ControlledRestart。
许可证
MIT
Comments
Loading…
From the same category
by whiteguo233
本地私有、开源的自进化跨平台 AI 内容发现 Agent:先理解你,再主动从 B站、小红书、抖音、YouTube、X、知乎、Reddit、微博等平台与开放 Web 寻找内容。(支持 deepseek harness 插件) | Local-first open-source cross-platform AI content discovery agent: understands you, th
★ 3.4k
MIT
Python
Sep 30, 2026
by chuspeeism
现代化可灵活嵌入的任务面板,支持 Codex、DeepSeek Harness
★ 3.3k
Apache-2.0
JavaScript
Sep 29, 2026
by NanmiCoder
AgentTeams plugin for DeepSeek Harness
★ 1.9k
↓ 10.1k/wk
MIT
JavaScript
Sep 29, 2026
dsh plugin --profile web add @nanmicoder/dsh-agent-teamsby EthanYoQ
AI 小说创作软件:把灵感、角色、世界观、大纲、章节写作、审稿和修稿组织成可控流程;提供 Windows/macOS 桌面版、Ollama 与 DSH 插件预览。AI Novel Writing Software: Organizes inspirations, characters, worldbuilding, outlines, chapter drafting, review, and r
★ 1.2k
↓ 304/wk
GPL-3.0
TypeScript
Sep 30, 2026
dsh plugin --profile agent add @ethanyoq/dsh-ai-novel-writerby agentrq
AgentRQ: Human-in-loop realtime conversational task manager for AI Agents. Self-hosted! Control your own agents from wherever you want Mobile, Web, Desktop. Designed to work well with your own Claude
★ 1.1k
↓ 64/wk
Apache-2.0
JavaScript
Sep 30, 2026
dsh plugin --profile web add @agentrq/dsh-plugin-agentrqby tong-io
Modality-First GenAI Platform
★ 1k
↓ 487/wk
AGPL-3.0
TypeScript
Sep 27, 2026
dsh plugin --profile agent add dsh-tongflow