DeepSeek Harness plugin

dsh-launcher-lifetime

DeepSeek Harness (dsh) plugin: control how long the dsh service (node) stays alive when using the dsh-launcher shell. Writes %LOCALAPPDATA%\dsh-launcher\settings.json (serviceLifetime: 0 always-on, 1

Jump to install

Source facts

Repository
Ruler4396/dsh-launcher-lifetime
Latest update
Aug 16, 2026
Category
Tools & Capabilities
GitHub stars
3
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Ruler4396/dsh-launcher-lifetime
Plugin: dsh-launcher-lifetime
Author: Ruler4396

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-launcher-lifetime

![npm](https://www.npmjs.com/package/dsh-launcher-lifetime) ![license](LICENSE) ![GitHub](https://github.com/Ruler4396/dsh-launcher-lifetime)

> DeepSeek Harness (dsh) 插件:控制 node 服务的驻留——配合 dsh-launcher 壳,决定关闭窗口 / 托盘退出时 node 服务是继续运行还是退出。

为什么需要它

dsh 是一个完整的服务进程(几百 MB 内存)。默认情况下它常驻运行(秒开,但一直占内存)。本插件把"node 服务何时退出"的控制权交给你:

  • 想要省内存 → 关窗即停服务,下次启动自动拉起(约 1–3 秒)
  • 想要秒开 → 保持常驻
  • 想要折中 → 托盘驻留(关窗最小化到托盘,明确"退出"才停服务)

特性

  • 🎛️ 三种驻留模式跟随窗口 / 常驻 / 托盘驻留
  • ⚙️ 配置入口:dsh 设置页的 "Node 服务驻留" 页面(竖排单选,即时生效);也可用 dsh 的 cordis 配置
  • 🪶 零运行时依赖:只写一个 JSON 文件,不加载任何第三方包
  • 🛡️ 安全:只停 dsh-launcher 壳自己拉起的服务,外部托管 / 手动启动的服务不受影响

工作原理

用户配置 → 插件写入 DSH_HOME\dsh-launcher\settings.json
                    ↓(每次关窗/托盘退出时读取)
        dsh-launcher 壳执行:继续运行 / 最小化到托盘 / 停止服务
模式行为
0常驻(默认)服务一直运行,关窗/托盘退出都不停
1托盘驻留关窗最小化到托盘;托盘"退出"才停服务
2跟随窗口关窗即停服务并退出(最省内存)

安装

dsh plugin --profile web add dsh-launcher-lifetime

配置

方式一:dsh 设置页(Web GUI)(推荐,即时生效)

打开 dsh 设置页 → "Node 服务驻留" → 选择其一(竖排单选,每个选项下有说明)。 更改通过 HTTP 路由(GET/POST /dsh-launcher-lifetime/settings)写入设置,无需重启, 下次关窗/托盘退出即按新模式执行。

方式二:dsh 的 cordis 配置(需重启 dsh 生效)

在 profile 的 cordis.patch.yml 中加入:

- id: dsh-launcher-lifetime
  config:
    serviceLifetime: 1

侧边栏图标(可选,本机定制)

dsh 设置页的导航图标由 dsh 内置的 navIcon(id) 映射决定:只有 models / agent-presets / plugins 有专属图标,其余设置页(包括本插件)统一显示齿轮。 如需给本插件的设置页换成专属图标,可编辑全局 dsh 包(dsh 升级后需重新应用):

node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js

navIcon 函数的 return IconSettingsOutline16(齿轮兜底)之前加入:

if (id === "launcher-lifetime") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline16, {
    className: SettingsRoot_module_css_default.navIcon,
    size: 16
});

改完重启 dsh 服务生效(IconRefreshOutline16 可换成 primitives 中任意图标)。

开发

npm install -D esbuild   # 仅开发依赖
npm run build            # src/index.ts → lib/index.js;src/client/* → lib/client.js(构建产物已提交,可直接用)

插件刻意**不 import 任何 @deepseek-ai/* 包**(dsh 的模块解析按 profile bundle 进行,外部依赖不可靠),配置手动校验。 Web 客户端面(src/client/)通过 dsh.client + exports["./client"] 声明,由 dsh 的 client-modules 挂载到设置页 slot。

贡献

欢迎提交 issue(bug、建议、文档)。本项目与 dsh-launcher 主仓库同步维护,PR 请说明改动动机。

相关项目

  • dsh-launcher — 本插件配套的 Windows 启动器壳(托盘菜单、服务生命周期执行)

许可证

[MIT](LICENSE) © dsh-launcher contributors