feat: add npm update checks and manual installation

Add profile-scoped npm updates for Desktop and Web, protect source installations, and keep restarts manual. Cover stale status recovery, request races, and dialog focus with regression tests.

Verified with npm run check (1626 tests) and isolated Desktop/Web npm installation flows.

Refs #61
This commit is contained in:
xmanrui 2026-08-28 06:37:40 +08:00
parent 5888641297
commit f3cefd8a84
23 changed files with 4058 additions and 271 deletions

View file

@ -28,6 +28,10 @@ const required = [
'plugin-src/client/channels/dingtalk/index.js',
'plugin-src/client/channels/slack/index.js',
'plugin-src/client/i18n.js',
'plugin-src/client/update-panel.js',
'plugin-src/host/update-service.mjs',
'plugin-src/host/update-runtime.mjs',
'plugin-src/host/update-rpc.mjs',
'plugin-src/host/channels/feishu/index.mjs',
'plugin-src/host/channels/weixin/index.mjs',
'plugin-src/host/channels/dingtalk/index.mjs',
@ -143,6 +147,14 @@ for (const marker of ['/feishu', '/weixin', '/dingtalk', '/wecom', '/qq', '/slac
throw new Error(`host bundle does not contain the internal ${marker} RPC provider`);
}
}
for (const marker of ['update.status', 'update.check', 'update.install']) {
if (!host.includes(marker) || !client.includes(marker)) {
throw new Error(`update RPC endpoint missing from Host or Client bundle: ${marker}`);
}
}
if (!host.includes('https://registry.npmjs.org/') || !host.includes('desktopPnpm')) {
throw new Error('host bundle is missing the npm updater or Desktop package-management adapter');
}
for (const marker of ['/session Session ID', 'bindWorkspaceSession', 'session-subagent-unsupported']) {
if (!host.includes(marker)) {
throw new Error(`host bundle does not contain the Session binding marker: ${marker}`);