dsh-config-manager 0.1.66 → 0.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/README.zh-CN.md +13 -0
- package/lib/adapters/plugins.js +6 -1
- package/lib/client.d.ts +2 -0
- package/lib/client.js +425 -393
- package/lib/core/plugin-cli.d.ts +29 -7
- package/lib/core/plugin-cli.js +49 -3
- package/lib/index.d.ts +15 -1
- package/lib/index.js +39 -17
- package/lib/profiles/dsh-profile-launcher.d.ts +2 -0
- package/lib/profiles/dsh-profile-launcher.js +20 -3
- package/lib/profiles/dsh-profile-manager.d.ts +3 -0
- package/lib/profiles/dsh-profile-manager.js +10 -1
- package/lib/profiles/dsh-profile-shared.d.ts +17 -1
- package/lib/profiles/dsh-profile-shared.js +17 -1
- package/lib/ui/dsh-profiles-view.d.ts +11 -2
- package/lib/ui/dsh-profiles-view.js +12 -4
- package/lib/utils/desktop-carrier.d.ts +54 -0
- package/lib/utils/desktop-carrier.js +60 -0
- package/package.json +1 -1
- package/src/adapters/plugins.ts +6 -1
- package/src/client/locales.ts +4 -0
- package/src/client/profiles/ProfilesPanel.tsx +21 -11
- package/src/core/plugin-cli.test.ts +53 -1
- package/src/core/plugin-cli.ts +60 -3
- package/src/index.facade.test.ts +32 -1
- package/src/index.ts +38 -13
- package/src/profiles/dsh-profile-launcher.test.ts +19 -0
- package/src/profiles/dsh-profile-launcher.ts +22 -3
- package/src/profiles/dsh-profile-manager.test.ts +33 -0
- package/src/profiles/dsh-profile-manager.ts +8 -1
- package/src/profiles/dsh-profile-shared.ts +21 -1
- package/src/ui/dsh-profiles-view.test.ts +15 -4
- package/src/ui/dsh-profiles-view.ts +18 -4
- package/src/utils/desktop-carrier.test.ts +55 -0
- package/src/utils/desktop-carrier.ts +82 -0
package/README.md
CHANGED
|
@@ -197,6 +197,19 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
197
197
|
> Write-Output "Already present, nothing to do"
|
|
198
198
|
> }
|
|
199
199
|
> ```
|
|
200
|
+
>
|
|
201
|
+
> 🐛 **Install rejected for a version you never installed?** Symptom: pnpm logs `+ dsh-config-manager ^0.1.66`, yet DSH reports `Plugin dsh-config-manager@0.1.44 is incompatible with dsh …` and rolls the install back.
|
|
202
|
+
>
|
|
203
|
+
> The cause is neither pnpm nor version resolution. After installing, DSH runs a compatibility check that reads this plugin's `cordis.patch.yml` mount row (`name: 'dsh-config-manager'`) and **resolves that package again** — and Node's resolution chain honours `NODE_PATH`. If your global npm root (`npm root -g`) still holds an **old copy of the same package** (for example a `npm i -g dsh-config-manager` of 0.1.44 from earlier), the check compares **that** copy's `peerDependencies` and reports a version pnpm never installed.
|
|
204
|
+
>
|
|
205
|
+
> Confirm and fix:
|
|
206
|
+
>
|
|
207
|
+
> ```powershell
|
|
208
|
+
> npm ls -g dsh-config-manager # output means a global copy exists
|
|
209
|
+
> npm i -g dsh-config-manager@latest # upgrade it (or npm uninstall -g dsh-config-manager to remove it)
|
|
210
|
+
> ```
|
|
211
|
+
>
|
|
212
|
+
> Then retry the install. As long as that global copy exists and is incompatible with your DSH, every profile (`web` / `desktop` / custom) is rejected the same way.
|
|
200
213
|
|
|
201
214
|
---
|
|
202
215
|
|
package/README.zh-CN.md
CHANGED
|
@@ -200,6 +200,19 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
200
200
|
> Write-Output "已存在,无需修改"
|
|
201
201
|
> }
|
|
202
202
|
> ```
|
|
203
|
+
>
|
|
204
|
+
> 🐛 **安装被拒,但报错的版本你从没装过?** 症状:日志里 pnpm 明明写了 `+ dsh-config-manager ^0.1.66`,DSH 却报 `Plugin dsh-config-manager@0.1.44 is incompatible with dsh …` 并把安装回滚了。
|
|
205
|
+
>
|
|
206
|
+
> 原因既不在 pnpm 也不在版本解析:DSH 安装后还会做一次兼容校验,其中一步会读本插件 `cordis.patch.yml` 里的挂载行(`name: 'dsh-config-manager'`)并**再次解析这个包**,而 Node 的解析链会经过 `NODE_PATH`。若你的全局 npm 目录(`npm root -g`)里留着一份**同名旧版**(例如以前 `npm i -g dsh-config-manager` 装的 0.1.44),校验就会拿**那一份**的 `peerDependencies` 去比对 —— 于是报出一个 pnpm 根本没装的版本号。
|
|
207
|
+
>
|
|
208
|
+
> 确认与修复:
|
|
209
|
+
>
|
|
210
|
+
> ```powershell
|
|
211
|
+
> npm ls -g dsh-config-manager # 有输出 = 全局确实存在一份
|
|
212
|
+
> npm i -g dsh-config-manager@latest # 升到兼容版(或 npm uninstall -g dsh-config-manager 直接删掉)
|
|
213
|
+
> ```
|
|
214
|
+
>
|
|
215
|
+
> 之后重试安装即可。只要全局那份还在且与当前 DSH 不兼容,装哪个 profile(`web` / `desktop` / 自建)都会被同样拒绝。
|
|
203
216
|
|
|
204
217
|
---
|
|
205
218
|
|
package/lib/adapters/plugins.js
CHANGED
|
@@ -609,12 +609,17 @@ export class PluginsAdapter {
|
|
|
609
609
|
if (ctx.signal?.aborted)
|
|
610
610
|
throw err;
|
|
611
611
|
const reason = err instanceof Error ? err.message : String(err);
|
|
612
|
+
// 提示里的 profile 必须与**实际安装目标**同源(ctx.target.profile = 宿主解析出的
|
|
613
|
+
// config.profile → profileContext → --profile → env → web)。此前这里单独调
|
|
614
|
+
// resolveProcessProfileName()(只认 argv/env):Desktop 外壳不传 --profile,
|
|
615
|
+
// 真机于是出现「安装用的是 desktop、提示却写 dsh plugin --profile web add …」的自相矛盾。
|
|
616
|
+
const hintProfile = ctx.target.profile ?? resolveProcessProfileName();
|
|
612
617
|
return {
|
|
613
618
|
ok: false,
|
|
614
619
|
warning: true,
|
|
615
620
|
// 保留 warning(§34.17 非致命):一个装不上的插件不得拖垮已成功导入的其余配置;
|
|
616
621
|
// message 附可复制的手动安装命令(profile 解析与 M1 宿主一致)。
|
|
617
|
-
message: (item.kind === 'Update' ? msg('adapter.pluginUpdateFailed', { name, msg: reason, profile:
|
|
622
|
+
message: (item.kind === 'Update' ? msg('adapter.pluginUpdateFailed', { name, msg: reason, profile: hintProfile }) : msg('adapter.pluginInstallFailed', { name, msg: reason, profile: hintProfile })),
|
|
618
623
|
};
|
|
619
624
|
}
|
|
620
625
|
}
|
package/lib/client.d.ts
CHANGED
|
@@ -3224,6 +3224,7 @@ declare const zh$3: {
|
|
|
3224
3224
|
readonly 'profiles.launching': '启动中…';
|
|
3225
3225
|
readonly 'profiles.launch.hint': '用该档案另起一个独立 DSH 实例(自动挑空闲端口、自动打开浏览器);当前实例不受影响。只支持 Web 形态档案。';
|
|
3226
3226
|
readonly 'profiles.launch.notWeb': '「{name}」不是 Web 形态(bundles 里没有 @deepseek-ai/dsh-web-app),没有浏览器界面,无法作为独立实例启动。请在终端运行:';
|
|
3227
|
+
readonly 'profiles.launch.managed': '「{name}」是 DeepSeek Harness Desktop 应用独占管理的保留档案:普通 dsh 命令行对它一律报错(profile "{name}" is managed exclusively by the Electron application),也无法作为独立实例启动。请直接在桌面端应用里打开它并安装插件。';
|
|
3227
3228
|
readonly 'profiles.launch.started': '已启动档案「{name}」的独立实例(端口 {port})';
|
|
3228
3229
|
readonly 'profiles.launch.pending': '档案「{name}」的进程已启动(端口 {port}),但 {seconds} 秒内未确认就绪 —— 请看日志确认:';
|
|
3229
3230
|
readonly 'profiles.launch.open': '打开新实例';
|
|
@@ -3301,6 +3302,7 @@ declare const zh$3: {
|
|
|
3301
3302
|
readonly 'profiles.error.reservedName': 'DSH 保留名不能手动创建';
|
|
3302
3303
|
readonly 'profiles.error.unknownTemplate': '未知的起步模板';
|
|
3303
3304
|
readonly 'profiles.error.notLaunchable': '该档案不是 Web 形态,没有浏览器界面(请用终端运行 dsh --profile <名>)';
|
|
3305
|
+
readonly 'profiles.error.managedProfile': '「desktop」档案由 DeepSeek Harness Desktop 应用独占管理:删掉或改名会让桌面端下次启动时按 web 模板重建一个空档案(已装插件全部消失)。请在桌面端应用里管理它。';
|
|
3304
3306
|
readonly 'profiles.error.launcherUnavailable': '定位不到 dsh 启动器(非标准启动方式),请手动运行 dsh --profile <名>';
|
|
3305
3307
|
readonly 'profiles.error.launchFailed': '档案实例启动失败';
|
|
3306
3308
|
readonly 'profiles.error.alreadyRunning': '该档案的实例已经在运行(先停止再启动)';
|