dsh-plugin 1.6.9 → 1.6.10
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 +303 -298
- package/client/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client/components/modals/NotificationsModal.tsx +6 -0
- package/src/client/components/modals/modals.tsx +5 -0
- package/src/client/locales.ts +2 -0
- package/src/client/logic/failures.ts +5 -1
- package/src/client/logic/urls.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"description": "A community plugin marketplace for DeepSeek Harness, built to the official plugin spec — browse, search and install 10000+ human-curated community plugins without leaving the app. · DeepSeek Harness 社区插件市场(遵循官方开发规范):10000+ 人工精选社区插件,每日更新。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -401,6 +401,12 @@ export function NotificationsModal({ records, tasks, pendingRestarts, t, env, on
|
|
|
401
401
|
h('div', { className: styles.failPrepareHint }, t('failTimeoutHint')),
|
|
402
402
|
])
|
|
403
403
|
}
|
|
404
|
+
if (kind === 'profileLock') {
|
|
405
|
+
// DSH 写 profile 的锁超时(同一 profile 被别的 dsh/安装任务占着):只给可行动提示,不引导提 Issue
|
|
406
|
+
return h('div', null, [
|
|
407
|
+
h('div', { className: styles.failPrepareHint }, t('failProfileLockHint')),
|
|
408
|
+
])
|
|
409
|
+
}
|
|
404
410
|
// pnpm allowBuilds 拦截与未知失败:不归到插件作者,改为引导到插件中心仓库排查
|
|
405
411
|
return h('div', null, [
|
|
406
412
|
kind === 'pnpmIgnoredBuild'
|
|
@@ -522,6 +522,11 @@ export function ErrorModal({ message, repo, kind, command, attempts, t, env, onC
|
|
|
522
522
|
// 安装命令超时被强杀(日志里 pnpm 可能已 Done):可能其实已装成功 —— 给可行动提示,不引导提 Issue
|
|
523
523
|
h('div', { className: styles.failPrepareHint }, t('failTimeoutHint')),
|
|
524
524
|
])
|
|
525
|
+
: failureKind === 'profileLock'
|
|
526
|
+
? h('div', null, [
|
|
527
|
+
// DSH 写 profile 的锁超时(同一 profile 被别的 dsh/安装任务占着):给可行动提示,不引导提 Issue
|
|
528
|
+
h('div', { className: styles.failPrepareHint }, t('failProfileLockHint')),
|
|
529
|
+
])
|
|
525
530
|
: h('div', null, [
|
|
526
531
|
// pnpm allowBuilds 拦截与未知失败:不归到插件作者,改为引导到插件中心仓库排查
|
|
527
532
|
failureKind === 'pnpmIgnoredBuild'
|
package/src/client/locales.ts
CHANGED
|
@@ -324,6 +324,7 @@ export const zh = {
|
|
|
324
324
|
failHubStateHint: '插件列表状态已过期或与本地不一致:该插件可能已经装过了(无需重复安装,要升级请点「更新」),也可能已不在已安装列表中,或已在队列中。这不是插件本身的问题 —— 请刷新页面后重试。',
|
|
325
325
|
// 安装命令超时被强杀:可能其实已装成功(安装器超时后会先核对已安装列表),给可行动提示,不引导提 Issue
|
|
326
326
|
failTimeoutHint: '安装耗时超过本地上限、已被中断 —— 但很可能其实已经装上了(安装器在超时后会先核对本地已安装列表)。请刷新页面确认该插件是否已装上;若确实没装上,可在终端手动执行一次安装命令查看完整输出。这不是插件本身的问题。',
|
|
327
|
+
failProfileLockHint: 'DSH 在写入插件清单时等不到文件锁、超时中止 —— 通常是同时有另一个 DSH 进程或安装任务在写同一个 profile(也可能是上一次的进程没退干净留下的锁)。请先关掉其他 dsh 窗口或正在跑的命令,再重试一次;若反复出现,重启一次 DSH。这不是插件本身的问题,也不需要重复安装。',
|
|
327
328
|
// prepare 构建脚本实际执行失败(git 分发缺子模块/构建产物):插件打包分发问题,应提 Issue
|
|
328
329
|
failPrepareHint: '该插件安装时的构建脚本执行失败(git 分发常缺失子模块或构建产物),属插件打包分发问题。请向作者仓库提交 Issue 反馈。',
|
|
329
330
|
// 「插件打包问题」分支的次要入口:该判据由插件中心自己的预检/装后校验产出(不是 pnpm 原文),
|
|
@@ -734,6 +735,7 @@ export const en = {
|
|
|
734
735
|
failHubStateHint: 'The plugin list is out of date or out of sync: this plugin may already be installed (no need to reinstall — use "Update" to upgrade), or may no longer be in the installed list, or may already be queued. This is not a plugin problem — refresh the page and retry.',
|
|
735
736
|
// The install command hit the local time limit and was killed: it may well have installed successfully (the installer re-checks the installed list after a timeout) — actionable hint, no issue prompt
|
|
736
737
|
failTimeoutHint: 'The install exceeded the local time limit and was interrupted — but it may well have completed already (the installer re-checks your installed list after a timeout). Refresh the page to see whether the plugin is installed; if it is not, run the install command in a terminal to see the full output. This is not a plugin problem.',
|
|
738
|
+
failProfileLockHint: 'DSH timed out waiting for the file lock while writing the plugin list — usually because another DSH process or install task is writing the same profile (sometimes a previous run left the lock behind). Close other dsh windows or running commands, then retry; if it keeps happening, restart DSH once. This is not a plugin problem, and the plugin does not need to be reinstalled.',
|
|
737
739
|
// prepare script actually failed (git tarball misses submodules/build output): a packaging issue of the plugin itself — file an issue
|
|
738
740
|
failPrepareHint: 'This plugin failed while running its build scripts during install (git tarballs often miss submodules or build output). This is a packaging issue of the plugin itself — please report it to the author repository.',
|
|
739
741
|
// Secondary entry on the "plugin packaging" branch: that verdict comes from the hub's own
|
|
@@ -151,7 +151,7 @@ export function removeNotification(id: number): NotificationRecord[] {
|
|
|
151
151
|
return next
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
export type FailureKind = 'npmTooOld' | 'dshMissing' | 'gitMissing' | 'pnpmMissing' | 'npmMissing' | 'pnpmStore' | 'pnpmWorkspace' | 'originRejected' | 'pnpmPolicy' | 'pnpmUnusedPatch' | 'pnpmMissingDep' | 'registryVersionStale' | 'pnpmLinkedDirMissing' | 'fileLocked' | 'accessDenied' | 'fsUnavailable' | 'pnpmIgnoredBuild' | 'pluginPrepare' | 'network' | 'hubState' | 'timeout' | 'hub'
|
|
154
|
+
export type FailureKind = 'npmTooOld' | 'dshMissing' | 'gitMissing' | 'pnpmMissing' | 'npmMissing' | 'pnpmStore' | 'pnpmWorkspace' | 'originRejected' | 'pnpmPolicy' | 'pnpmUnusedPatch' | 'pnpmMissingDep' | 'registryVersionStale' | 'pnpmLinkedDirMissing' | 'fileLocked' | 'accessDenied' | 'fsUnavailable' | 'pnpmIgnoredBuild' | 'pluginPrepare' | 'network' | 'hubState' | 'timeout' | 'profileLock' | 'hub'
|
|
155
155
|
|
|
156
156
|
/** Match the pnpm error code, not a generic mention of checksum or integrity. */
|
|
157
157
|
function missingTarballIntegrity(message: string): boolean {
|
|
@@ -248,6 +248,10 @@ export function classifyFailure(message: string): FailureKind {
|
|
|
248
248
|
// 「其实已经装上了」——摆放位置在一切错误码分支之后,日志里真有 pnpm 报错时仍以真实报错为准。
|
|
249
249
|
// 单独归类,给「刷新确认是否已安装」这类可行动提示,不引导提 Issue。
|
|
250
250
|
if (/^\[timed out\]$/m.test(message)) return 'timeout'
|
|
251
|
+
// DSH 自身的 profile 写锁超时(atomic-write 等不到 package.json.lock):同一 profile 上还有另一个
|
|
252
|
+
// dsh 进程或安装任务在写,锁一直没释放。既不是插件问题、也不是用户环境坏了 —— 把并发收掉重试即可。
|
|
253
|
+
// 摆放位置同样在一切错误码分支之后:日志里真有 pnpm 报错时仍以真实报错为准。
|
|
254
|
+
if (/atomic-write: timed out waiting for the writer lock|timed out waiting for the writer lock/i.test(message)) return 'profileLock'
|
|
251
255
|
// 其余未知失败:引导到插件中心仓库排查
|
|
252
256
|
return 'hub'
|
|
253
257
|
}
|
package/src/client/logic/urls.ts
CHANGED
|
@@ -65,6 +65,7 @@ function reasonTitleOf(kind: FailureKind): string {
|
|
|
65
65
|
case 'network': return 'network failure on the user side'
|
|
66
66
|
case 'hubState': return 'stale install state in the plugin hub'
|
|
67
67
|
case 'timeout': return 'install timed out'
|
|
68
|
+
case 'profileLock': return 'DSH profile is locked by another process'
|
|
68
69
|
case 'hub': return 'install failed (cause unclassified)'
|
|
69
70
|
default: return 'plugin install failed'
|
|
70
71
|
}
|