diff --git a/build/plugin-recovery.html b/build/plugin-recovery.html index 72f761dc..efcc85d0 100644 --- a/build/plugin-recovery.html +++ b/build/plugin-recovery.html @@ -523,7 +523,7 @@

const versionStr = candidate.targetVersion.startsWith('v') ? candidate.targetVersion : `v${candidate.targetVersion}` - upgradeBtn.textContent = model.upgradeHint || (model.locale === 'zh' ? '该插件有新的兼容版本' : 'A compatible update is available') + upgradeBtn.textContent = model.upgradeHint || (model.locale === 'zh' ? `该插件有新的兼容版本(${versionStr})` : `A compatible update is available (${versionStr})`) upgradeBtn.title = model.locale === 'zh' ? `可升级至 ${versionStr}` : `Can upgrade to ${versionStr}` upgradeBtn.addEventListener('click', () => { primary.click() @@ -547,7 +547,7 @@

if (model.upgradeCandidate) { setText('primary', model.upgradeLabel) - setText('secondary', model.uninstallLabel || (model.locale === 'zh' ? '仍要卸载此插件' : 'Uninstall plugin instead')) + setText('secondary', model.uninstallLabel || (model.locale === 'zh' ? '卸载插件' : 'Uninstall plugin')) secondary.hidden = false secondary.addEventListener('click', () => { secondary.disabled = true diff --git a/package-lock.json b/package-lock.json index db0ad634..b3ed803e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -241,6 +241,7 @@ "dsh-desktop-hmr-fallback": "file:packages/dsh-desktop-hmr-fallback", "dsh-desktop-market-installer": "file:packages/dsh-desktop-market-installer", "dsh-desktop-preset-transfer": "file:packages/dsh-desktop-preset-transfer", + "dsh-kimi-ppt": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz", "dshmarket": "file:packages/dshmarket", "electron-updater": "^6.8.9", "node": "24.9.0", @@ -248,8 +249,7 @@ "qrcode": "^1.5.4", "react": "18.3.1", "react-dom": "18.3.1", - "ws": "^8.21.3", - "dsh-kimi-ppt": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz" + "ws": "^8.21.3" }, "devDependencies": { "@types/node": "24.10.1", @@ -7132,7 +7132,7 @@ }, "node_modules/@noble/hashes": { "version": "2.4.0", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 20.19.0" @@ -9625,7 +9625,6 @@ }, "node_modules/core-util-is": { "version": "1.0.3", - "dev": true, "license": "MIT" }, "node_modules/cors": { @@ -9987,6 +9986,59 @@ "resolved": "packages/dsh-desktop-preset-transfer", "link": true }, + "node_modules/dsh-kimi-ppt": { + "version": "0.1.1-rc.2", + "resolved": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz", + "integrity": "sha512-tUWnVk/m1RCPNTAooKtN8zp283L7lw+t+EMwI92JAfrYQBROygLj1+KT5QEbZFaPMKlrs7NVO6Bazo7FrtIcdQ==", + "license": "MIT", + "dependencies": { + "@aiden0z/pptx-renderer": "1.2.4", + "@deepseek-ai/schemastery": "^3.18.1", + "fflate": "^0.8.3", + "js-yaml": "^4.2.0", + "jsdom": "29.1.1", + "pptxgenjs": "^4.0.1", + "sharp": "^0.35.3", + "typescript": "^6.0.3", + "zod": "^4.4.3" + }, + "bin": { + "dsh-pptd": "lib/bin.js" + }, + "engines": { + "node": "^22.19.0 || >=24.0.0" + }, + "peerDependencies": { + "@deepseek-ai/cordis": "^4.0.1", + "@deepseek-ai/dsh-agent": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-brand": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-llm": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-session": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-skill": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4", + "@deepseek-ai/dsh-tools": "^0.1.2-alpha.4", + "react": "^18.2.0" + } + }, + "node_modules/dsh-kimi-ppt/node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/dshmarket": { "resolved": "packages/dshmarket", "link": true @@ -13799,7 +13851,6 @@ }, "node_modules/process-nextick-args": { "version": "2.0.1", - "dev": true, "license": "MIT" }, "node_modules/progress": { @@ -14125,7 +14176,6 @@ }, "node_modules/readable-stream": { "version": "2.3.8", - "dev": true, "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", @@ -14139,12 +14189,10 @@ }, "node_modules/readable-stream/node_modules/isarray": { "version": "1.0.0", - "dev": true, "license": "MIT" }, "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", - "dev": true, "license": "MIT" }, "node_modules/readdirp": { @@ -14753,7 +14801,6 @@ }, "node_modules/source-map-js": { "version": "1.2.1", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -14809,6 +14856,17 @@ "dev": true, "license": "MIT" }, + "node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, "node_modules/string-width": { "version": "4.2.3", "license": "MIT", @@ -14821,19 +14879,6 @@ "node": ">=8" } }, - "node_modules/string_decoder": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/stringify-entities": { "version": "4.0.4", "license": "MIT", @@ -15351,7 +15396,6 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, "license": "MIT" }, "node_modules/vary": { @@ -16406,59 +16450,6 @@ "engines": { "node": ">=20.18.1" } - }, - "node_modules/dsh-kimi-ppt": { - "version": "0.1.1-rc.2", - "resolved": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz", - "integrity": "sha512-tUWnVk/m1RCPNTAooKtN8zp283L7lw+t+EMwI92JAfrYQBROygLj1+KT5QEbZFaPMKlrs7NVO6Bazo7FrtIcdQ==", - "license": "MIT", - "dependencies": { - "@aiden0z/pptx-renderer": "1.2.4", - "@deepseek-ai/schemastery": "^3.18.1", - "fflate": "^0.8.3", - "js-yaml": "^4.2.0", - "jsdom": "29.1.1", - "pptxgenjs": "^4.0.1", - "sharp": "^0.35.3", - "typescript": "^6.0.3", - "zod": "^4.4.3" - }, - "bin": { - "dsh-pptd": "lib/bin.js" - }, - "engines": { - "node": "^22.19.0 || >=24.0.0" - }, - "peerDependencies": { - "@deepseek-ai/cordis": "^4.0.1", - "@deepseek-ai/dsh-agent": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-brand": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-llm": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-session": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-skill": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4", - "@deepseek-ai/dsh-tools": "^0.1.2-alpha.4", - "react": "^18.2.0" - } - }, - "node_modules/dsh-kimi-ppt/node_modules/typescript": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", - "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } } } } diff --git a/packages/dsh-desktop-market-installer/generations/installer.d.ts b/packages/dsh-desktop-market-installer/generations/installer.d.ts index 84c2e472..e2d1942a 100644 --- a/packages/dsh-desktop-market-installer/generations/installer.d.ts +++ b/packages/dsh-desktop-market-installer/generations/installer.d.ts @@ -13,7 +13,7 @@ export interface GenerationInstallOptions { sourceDirectory?: string nodeExecutablePath: string pnpmEntryPath: string - /** Hard ceiling for the pnpm subprocess; defaults to 12 minutes. */ + /** Hard ceiling for the pnpm subprocess; defaults to 90 seconds. */ installTimeoutMs?: number spawnProcess?: unknown environment?: NodeJS.ProcessEnv diff --git a/packages/dsh-desktop-market-installer/generations/installer.mjs b/packages/dsh-desktop-market-installer/generations/installer.mjs index f40c725d..d84d0d9a 100644 --- a/packages/dsh-desktop-market-installer/generations/installer.mjs +++ b/packages/dsh-desktop-market-installer/generations/installer.mjs @@ -35,7 +35,7 @@ const GIT_ALLOW_BUILD_PATTERN = /^[A-Za-z0-9@/_.-]+@git\+https:\/\/github\.com\/ const CODELOAD_ALLOW_BUILD_PATTERN = /^[A-Za-z0-9@/_.-]+@https:\/\/codeload\.github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/tar\.gz\/[0-9a-f]{40}$/u const PINNED_GITHUB_TARGET_PATTERN = /^github:(?[A-Za-z0-9_.-]+)\/(?[A-Za-z0-9_.-]+)#(?[0-9a-f]{40})(?&path:\/(?:(?!\.\.?\/)[A-Za-z0-9_.-]+\/)*(?!\.\.?$)[A-Za-z0-9_.-]+)?$/u const PINNED_GIT_APPROVAL_PATTERN = /@git\+ssh:\/\/git@github\.com\//u -const GENERATION_INSTALL_TIMEOUT_MS = 12 * 60 * 1000 +const GENERATION_INSTALL_TIMEOUT_MS = 90 * 1000 function isHostSingleton(name) { return HOST_SINGLETON_PATTERNS.some((pattern) => pattern.test(name)) @@ -153,8 +153,9 @@ async function defaultRunInstall(options, stagingDir) { } child.stdout?.on('data', collect) child.stderr?.on('data', collect) - // Source monorepos can legitimately spend several minutes in prepare, but - // they still stay below the host's fifteen-minute operation ceiling. + // Do not leave a launch or generation operation stalled indefinitely; the + // caller may override this ceiling when a longer explicit operation is + // appropriate. const timer = setTimeout( () => child.kill('SIGKILL'), options.installTimeoutMs ?? GENERATION_INSTALL_TIMEOUT_MS diff --git a/patches/@deepseek-ai+dsh-client-ui-agent-preset+0.1.2-rc.1.patch b/patches/@deepseek-ai+dsh-client-ui-agent-preset+0.1.2-rc.1.patch index 17774217..68489d37 100644 --- a/patches/@deepseek-ai+dsh-client-ui-agent-preset+0.1.2-rc.1.patch +++ b/patches/@deepseek-ai+dsh-client-ui-agent-preset+0.1.2-rc.1.patch @@ -454,7 +454,7 @@ diff --git a/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-agent-preset"; tag.dataset.pluginCss = tagId; - tag.textContent = css; -+ tag.textContent = `${css}.rtSEdW_sectionHead{align-items:center;gap:16px;display:flex}.rtSEdW_sectionActions{flex:none;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;display:flex}.rtSEdW_hiddenInput{display:none}`; ++ tag.textContent = `${css}.rtSEdW_sectionHead{align-items:center;gap:16px;display:flex}.rtSEdW_sectionActions{flex:none;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;display:flex}.rtSEdW_importButton{flex:none}.rtSEdW_hiddenInput{display:none}.rtSEdW_importSecurity{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border-radius:8px;margin:0;padding:8px 10px;font-size:12px;line-height:1.5}.rtSEdW_importSummary{grid-template-columns:max-content minmax(0,1fr);column-gap:12px;row-gap:4px;margin:0;font-size:12px;display:grid}.rtSEdW_importSummary dt{color:var(--dsw-alias-label-tertiary)}.rtSEdW_importSummary dd{margin:0;overflow-wrap:anywhere}.rtSEdW_importWarnings{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-label-secondary));margin:0;padding-left:20px;font-size:12px;line-height:1.5}`; document.head.appendChild(tag); } var AgentPresetSection_module_css_default = { @@ -500,41 +500,41 @@ diff --git a/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js + "importSecurity": "rtSEdW_importSecurity", + "importSummary": "rtSEdW_importSummary", + "importWarnings": "rtSEdW_importWarnings", -+ "badge": "eWkxHa_badge", -+ "brokenBadge": "eWkxHa_brokenBadge", -+ "brokenTip": "eWkxHa_brokenTip", -+ "card": "eWkxHa_card", -+ "cardActive": "eWkxHa_cardActive", -+ "cardBroken": "eWkxHa_cardBroken", -+ "cardBrokenReason": "eWkxHa_cardBrokenReason", -+ "cardDesc": "eWkxHa_cardDesc", -+ "cardFoot": "eWkxHa_cardFoot", -+ "cardHead": "eWkxHa_cardHead", -+ "cardId": "eWkxHa_cardId", -+ "cardMain": "eWkxHa_cardMain", -+ "cardName": "eWkxHa_cardName", -+ "cards": "eWkxHa_cards", -+ "creatorButton": "eWkxHa_creatorButton", -+ "deleteConfirm": "eWkxHa_deleteConfirm", -+ "deleteDialog": "eWkxHa_deleteDialog", -+ "dialog": "eWkxHa_dialog", -+ "dialogFields": "eWkxHa_dialogFields", -+ "error": "eWkxHa_error", -+ "field": "eWkxHa_field", -+ "fieldLabel": "eWkxHa_fieldLabel", -+ "group": "eWkxHa_group", -+ "groupHead": "eWkxHa_groupHead", -+ "iconButton": "eWkxHa_iconButton", -+ "iconDanger": "eWkxHa_iconDanger", -+ "inUse": "eWkxHa_inUse", -+ "input": "eWkxHa_input", -+ "intro": "eWkxHa_intro", -+ "revealedPath": "eWkxHa_revealedPath", -+ "revealedPathLabel": "eWkxHa_revealedPathLabel", -+ "secondaryButton": "eWkxHa_secondaryButton", -+ "section": "eWkxHa_section", -+ "title": "eWkxHa_title", -+ "viewerCode": "eWkxHa_viewerCode" ++ "badge": "aThYWW_badge", ++ "brokenBadge": "aThYWW_brokenBadge", ++ "brokenTip": "aThYWW_brokenTip", ++ "card": "aThYWW_card", ++ "cardActive": "aThYWW_cardActive", ++ "cardBroken": "aThYWW_cardBroken", ++ "cardBrokenReason": "aThYWW_cardBrokenReason", ++ "cardDesc": "aThYWW_cardDesc", ++ "cardFoot": "aThYWW_cardFoot", ++ "cardHead": "aThYWW_cardHead", ++ "cardId": "aThYWW_cardId", ++ "cardMain": "aThYWW_cardMain", ++ "cardName": "aThYWW_cardName", ++ "cards": "aThYWW_cards", ++ "creatorButton": "aThYWW_creatorButton", ++ "deleteConfirm": "aThYWW_deleteConfirm", ++ "deleteDialog": "aThYWW_deleteDialog", ++ "dialog": "aThYWW_dialog", ++ "dialogFields": "aThYWW_dialogFields", ++ "error": "aThYWW_error", ++ "field": "aThYWW_field", ++ "fieldLabel": "aThYWW_fieldLabel", ++ "group": "aThYWW_group", ++ "groupHead": "aThYWW_groupHead", ++ "iconButton": "aThYWW_iconButton", ++ "iconDanger": "aThYWW_iconDanger", ++ "inUse": "aThYWW_inUse", ++ "input": "aThYWW_input", ++ "intro": "aThYWW_intro", ++ "revealedPath": "aThYWW_revealedPath", ++ "revealedPathLabel": "aThYWW_revealedPathLabel", ++ "secondaryButton": "aThYWW_secondaryButton", ++ "section": "aThYWW_section", ++ "title": "aThYWW_title", ++ "viewerCode": "aThYWW_viewerCode" }; //#endregion //#region lib/types/client/AgentPresetSection.js diff --git a/src/main/plugin-recovery-view.ts b/src/main/plugin-recovery-view.ts index ddb8e357..562391d9 100644 --- a/src/main/plugin-recovery-view.ts +++ b/src/main/plugin-recovery-view.ts @@ -198,9 +198,9 @@ export function buildPluginRecoveryViewModel(options: { : undefined, upgradeBusyLabel: upgradeCandidate ? '正在升级…' : undefined, upgradeHint: upgradeCandidate - ? '该插件有新的兼容版本' + ? `该插件有新的兼容版本(${upgradeCandidate.targetVersion.startsWith('v') ? upgradeCandidate.targetVersion : `v${upgradeCandidate.targetVersion}`})` : undefined, - uninstallLabel: upgradeCandidate ? '仍要卸载此插件' : undefined, + uninstallLabel: upgradeCandidate ? '卸载插件' : undefined, logLabel: '打开 Harness 日志', advancedLabel: '查看技术详情', errorLabel: '错误信息', @@ -242,9 +242,9 @@ export function buildPluginRecoveryViewModel(options: { : undefined, upgradeBusyLabel: upgradeCandidate ? 'Upgrading…' : undefined, upgradeHint: upgradeCandidate - ? 'A compatible update is available' + ? `A compatible update is available (${upgradeCandidate.targetVersion.startsWith('v') ? upgradeCandidate.targetVersion : `v${upgradeCandidate.targetVersion}`})` : undefined, - uninstallLabel: upgradeCandidate ? 'Uninstall this plugin instead' : undefined, + uninstallLabel: upgradeCandidate ? 'Uninstall plugin' : undefined, logLabel: 'Open Harness log', advancedLabel: 'View technical details', errorLabel: 'Error details', diff --git a/test/plugin-recovery-html.test.ts b/test/plugin-recovery-html.test.ts index 972103c0..0429d90e 100644 --- a/test/plugin-recovery-html.test.ts +++ b/test/plugin-recovery-html.test.ts @@ -25,5 +25,7 @@ describe('plugin recovery page', () => { expect(html).not.toContain('💡') expect(html).not.toContain('id="upgrade-card"') expect(html).toContain('plugin-upgrade') + expect(html).toContain('该插件有新的兼容版本(${versionStr})') + expect(html).toContain("'卸载插件' : 'Uninstall plugin'") }) }) diff --git a/test/plugin-recovery-view.test.ts b/test/plugin-recovery-view.test.ts index 32155e56..377be815 100644 --- a/test/plugin-recovery-view.test.ts +++ b/test/plugin-recovery-view.test.ts @@ -119,7 +119,7 @@ describe('plugin recovery view model', () => { }) expect(model.upgradeCandidate?.targetVersion).toBe('2.0.0') expect(model.upgradeLabel).toBe('升级插件并重启') - expect(model.upgradeHint).toBe('该插件有新的兼容版本') - expect(model.uninstallLabel).toBe('仍要卸载此插件') + expect(model.upgradeHint).toBe('该插件有新的兼容版本(v2.0.0)') + expect(model.uninstallLabel).toBe('卸载插件') }) }) diff --git a/test/preset-transfer-patch.test.ts b/test/preset-transfer-patch.test.ts index 457430b8..4f85a1d8 100644 --- a/test/preset-transfer-patch.test.ts +++ b/test/preset-transfer-patch.test.ts @@ -460,6 +460,24 @@ describe('agent preset package transfer', () => { expect(patch).toContain('.rtSEdW_hiddenInput{display:none}') }) + it('keeps the rc.1 preset page class map aligned with the CSS emitted by rc.1', async () => { + const patch = await readFile( + patchPath('@deepseek-ai/dsh-client-ui-agent-preset'), + 'utf8' + ) + + // rc.1 renamed the upstream CSS-module hash to aThYWW. The preceding + // version of this patch carried its old eWkxHa map forward, so the page + // rendered with classes that had no matching selectors at all. + expect(patch).not.toContain('eWkxHa_') + expect(patch).toContain('"section": "aThYWW_section"') + expect(patch).toContain('"card": "aThYWW_card"') + expect(patch).toContain('"dialog": "aThYWW_dialog"') + expect(patch).toContain('.rtSEdW_importSecurity{') + expect(patch).toContain('.rtSEdW_importSummary{') + expect(patch).toContain('.rtSEdW_importWarnings{') + }) + it('keeps a large mode roster searchable, grouped, compact, and connected to Awesome Presets', async () => { const patch = await readFile( patchPath('@deepseek-ai/dsh-client-ui-agent-preset'),