dsh-plugin 1.5.0 → 1.5.2
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/client/client.js +326 -308
- package/client/client.js.map +1 -1
- package/lib/http/routes.js +29 -2
- package/lib/services/install/npm-resolve.js +53 -4
- package/lib/services/install/preflight.js +25 -2
- package/lib/services/install/task-queue.js +10 -1
- package/lib/types/services/install/npm-resolve.d.ts +4 -10
- package/lib/types/services/install/preflight.d.ts +5 -0
- package/package.json +1 -1
- package/src/client/components/modals/NotificationsModal.tsx +2 -2
- package/src/client/components/modals/modals.tsx +2 -2
- package/src/client/hooks/useTaskQueue.ts +2 -2
- package/src/client/locales.ts +2 -0
- package/src/client/logic/failures.ts +13 -3
- package/src/client/logic/install-command.ts +10 -0
- package/src/client/logic/urls.ts +7 -4
- package/src/server/http/routes.ts +28 -2
- package/src/server/services/install/npm-resolve.ts +54 -5
- package/src/server/services/install/preflight.ts +25 -2
- package/src/server/services/install/task-queue.ts +10 -1
|
@@ -172,7 +172,16 @@ export function desktopCliBootstrap(entry: string): string | null {
|
|
|
172
172
|
const marker = /[\\/]app\.asar(?=[\\/]|$)/i.exec(entry)
|
|
173
173
|
if (marker === null) return null
|
|
174
174
|
const root = entry.slice(0, marker.index + marker[0].length)
|
|
175
|
-
|
|
175
|
+
const candidates = [
|
|
176
|
+
join(root, 'lib', 'desktop-cli.js'),
|
|
177
|
+
join(root, 'dsh', 'lib', 'desktop-cli.js'),
|
|
178
|
+
// DeepSeek Harness 0.2.x 的布局:宿主入口本身就是 @deepseek-ai/dsh-desktop-host/lib/index.js,
|
|
179
|
+
// 保留档 CLI 是它同目录的 cli.js(内部以 manageDesktopProfile 放行 desktop 档的插件管理)。
|
|
180
|
+
// 漏掉这个布局就会回退 PATH 上的 dsh,而 `dsh plugin --profile desktop …` 必被
|
|
181
|
+
// 「profile desktop is managed exclusively by the Electron application」拒绝 —— 桌面端全部安装失败。
|
|
182
|
+
join(dirname(entry), 'cli.js'),
|
|
183
|
+
]
|
|
184
|
+
for (const candidate of candidates) {
|
|
176
185
|
if (existsSync(candidate)) return candidate
|
|
177
186
|
}
|
|
178
187
|
return null
|