# 安装说明 前置条件:**Node.js ≥ 20**,DSH(`dsh web` 或 DeepSeek Harness Desktop)已可正常运行。 插件零运行时依赖,**不需要** `npm install`。 --- ## 一、打包 在插件目录执行: ```bash npm pack ``` 得到 `dsh-umbrella-startup-1.0.0.tgz`。也可以直接用目录安装(见第四节)。 --- ## 二、web profile(`dsh web`) ```bash dsh plugin --profile web add ./dsh-umbrella-startup-1.0.0.tgz ``` 装完**重启 `dsh web`**:关掉启动器窗口,再重新双击打开。刷新页面即可看到启动动画。 --- ## 三、桌面端(DeepSeek Harness Desktop) **必须先完全退出桌面端,包括托盘图标。** desktop profile 的 `package.json` 由桌面端进程加锁管理, 进程还在跑的时候写进去会被覆盖,`dsh` 会直接报错让你先退出。 ```bash # 1) 完全退出桌面端 # 2) 安装 dsh plugin --profile desktop add ./dsh-umbrella-startup-1.0.0.tgz # 3) 重新打开桌面端 ``` Windows 上更省事:解压 release 包后双击 `安装.cmd`,脚本会自动识别 `web` / `desktop` 两个 profile 并逐个安装。 --- ## 四、从目录安装(本地开发) ```bash # 先把插件目录 link 进 profile(不复制) dsh plugin --profile web add link:D:\path\to\dsh-umbrella-startup ``` 改完 `lib/` 下的文件,刷新页面即生效(静态文件按 mtime 缓存)。 --- ## 五、验证是否装上 不带 token 访问插件的静态路由: ```bash curl -i http://127.0.0.1:/dsh-umbrella/splash.js ``` | 返回 | 含义 | |---|---| | `401` | 路由已注册,插件是活的。这个 401 是插件自己的信任栅栏,属于正常现象 | | `404` | 没装成功,或者没重启 | 也可以看设置页:**设置 → 启动动画** 出现即表示客户端半侧已加载。 --- ## 六、常见坑 1. **不要手工把插件目录拷进 `node_modules`**。DSH 靠 `dsh.profile.bundles` 层堆栈加载插件, 手工拷贝不会被识别。 2. **不要在 profile 的 `cordis.patch.yml` 里重复添加条目**。若之前手工加过 `dsh-umbrella-startup`, 必须先删掉,否则同一路径重复注册会报错。 3. **桌面端没退出就安装**:会报 profile 被占用,按提示完全退出后重试。 4. **与 `dsh-startup-screen` 同时安装**:两者命名空间独立,可以共存,但会各自播一遍。 建议只保留一个。 5. **升级 DSH 后插件失效**:先确认 `dsh plugin list --profile web` 里条目还在,再重启; 仍失败就移除后重装。 --- ## 七、卸载 ```bash dsh plugin --profile web remove dsh-umbrella-startup dsh plugin --profile desktop remove dsh-umbrella-startup ``` 配置不会自动删除。如需彻底清理: ```bash rm ~/.dsh/dsh-umbrella.json ``` Windows 下对应 `%USERPROFILE%\.dsh\dsh-umbrella.json`。 --- ## 八、离线预览(不安装也能看) ```bash # macOS / Linux ./open-preview.sh # Windows 打开预览.cmd ``` 预览页直接引用 `lib/splash.css` 与 `lib/splash.js`,改完刷新即可看到效果,不写任何配置。