DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(core): 内核基线迁移至 dsh 0.2.1-rc.1,最低支持提升到 0.1.7-rc.1 (#1117)
Hairy0245694056ce
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 1ba88da2..67fd4c12 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -90,10 +90,10 @@ jobs:- name: Test iOS signing and Beta review guards without credentialsrun: python3 -m unittest discover -s .github/scripts -p 'test_ios_*.py' -v- - name: Install alpha.3 core for desktop admission regression- run: npm install --prefix "$RUNNER_TEMP/dsh-cli-admission" --no-audit --no-fund @deepseek-ai/[email protected]+ - name: Install rc.1 core for desktop admission regression+ run: npm install --prefix "$RUNNER_TEMP/dsh-cli-admission" --no-audit --no-fund @deepseek-ai/[email protected]- - name: Test desktop admission against alpha.3 gateway+ - name: Test desktop admission against rc.1 gatewayenv:DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli-admission/node_modules/@deepseek-ai/dsh/lib/bin.jsrun: |@@ -137,15 +137,20 @@ jobs:run: pnpm build:plugins- name: Unit test- run: pnpm run test:unit -- --run+ run: node node_modules/vitest/vitest.mjs run --project unit --sequence.shuffle --sequence.seed=400- # 插件 L2 E2E(vitest + Playwright 库 API):- # 打构建产物,起真实 `dsh web` 进程,断言宿主路由与客户端挂载点。plugins-e2e:- name: Plugins E2E Tests (vitest + playwright)+ name: Plugins E2E (${{ matrix.core }})needs: pre_jobif: ${{ needs.pre_job.outputs.should_skip != 'true' }}runs-on: ubuntu-latest+ timeout-minutes: 60+ strategy:+ fail-fast: false+ matrix:+ core: [0.2.1-rc.1, 0.1.7-rc.1]+ env:+ DSH_E2E_CORE_VERSION: ${{ matrix.core }}steps:- name: Checkout repositoryuses: actions/checkout@v7@@ -156,86 +161,51 @@ jobs:- name: Install dependenciesrun: pnpm install --frozen-lockfile- # Chromium 二进制不带在 npm 包里:runner 缺它时 chromium.launch() 会直接失败,- # 浏览器类用例必须真跑,不能因缺二进制而静默跳过。- name: Install Playwright Chromiumrun: pnpm exec playwright install --with-deps chromium- # L2 只针对构建产物运行(官方「真实入口路径」要求),未构建会直接失败。- name: Build Pluginsrun: pnpm build:plugins- # dsh CLI 刻意不进仓库依赖树:它是运行期产物,装进依赖树会与 catalog 的- # `@deepseek-ai/dsh-*` 形成双树,profile 组合时取到不匹配的实例- # (实测报 `dsh-session does not provide an export named 'snapshotJsonValue'`)。- # 这里装到独立目录,经 DSH_E2E_DSH_BIN 指给编排。- - name: Install dsh CLI (isolated)- run: |- mkdir -p "$RUNNER_TEMP/dsh-cli"- cd "$RUNNER_TEMP/dsh-cli"- npm init -y >/dev/null- # 0.1.5-rc.3 起该发布代的依赖区间引用了一个从未发布的版本- # (dsh-client-ui-sidebar-documentpreview@^0.1.5-rc.3),整条 0.1.5-rc.x- # 直接安装都会 ETARGET;用 overrides 夹回已发布的 rc.2(同一发布代)。- node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.overrides={'@deepseek-ai/dsh-client-ui-sidebar-documentpreview':'0.1.5-rc.2'};fs.writeFileSync('package.json',JSON.stringify(p,null,2))"- # 插件 L2 用例的文案/分区断言按 0.1.5-rc 基线写就(也是 README 声明的最低兼容基线);- # 0.1.6 起上游改了设置侧栏分区名与未分组 chip 等文案,另需一轮 e2e 适配。- npm install --no-audit --no-fund @deepseek-ai/[email protected]-- # dsh-tauri-remote 的入站暴露用例按当前内核(dsh-h3 设置分区与面板)写就,- # 与 extension-panel 同口径:legacy 内核排除,改由「Host and migrated plugin contracts」批次跑。- - name: Plugin L2 test (legacy core)- env:- DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli/node_modules/@deepseek-ai/dsh/lib/bin.js- run: |- node node_modules/vitest/vitest.mjs run --project plugin \- --exclude test/e2e/plugins/dsh-tauri-extension-panel.e2e.ts \- --exclude test/e2e/plugins/dsh-tauri-scheduler.e2e.ts \- --exclude test/e2e/plugins/dsh-tauri-scheduler-client.e2e.ts \- --exclude test/e2e/plugins/dsh-tauri-remote-access.e2e.ts \- --exclude test/e2e/plugins/dsh-tauri-remote-panel.e2e.ts-- - name: Mobile settings composition (legacy core)+ - name: Install isolated dsh CLI+ run: npm install --prefix "$RUNNER_TEMP/dsh-cli" --no-audit --no-fund @deepseek-ai/dsh@${{ matrix.core }}++ - name: Plugin L2 full suiteenv:DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli/node_modules/@deepseek-ai/dsh/lib/bin.js- run: |- for seed in 201 202 203 204 205; do- node node_modules/vitest/vitest.mjs run --project plugin --sequence.shuffle --sequence.seed="$seed" test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts || exit $?- done+ run: node node_modules/vitest/vitest.mjs run --project plugin --sequence.shuffle --sequence.seed=100- - name: Install current dsh CLI (isolated)- run: npm install --prefix "$RUNNER_TEMP/dsh-cli-current" --no-audit --no-fund @deepseek-ai/[email protected]-- - name: Official plugins, appearance and mobile settings (current core)+ - name: Host, settings and official plugin composition stabilityenv:- DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli-current/node_modules/@deepseek-ai/dsh/lib/bin.js+ DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli/node_modules/@deepseek-ai/dsh/lib/bin.jsrun: |for seed in 101 102 103 104 105; do- node node_modules/vitest/vitest.mjs run --project plugin --sequence.shuffle --sequence.seed="$seed" test/e2e/plugins/dsh-tauri-extension-panel.e2e.ts test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts test/e2e/plugins/dsh-tauri-appearance.e2e.ts test/e2e/plugins/dsh-tauri-appearance-boot.e2e.ts || exit $?+ node node_modules/vitest/vitest.mjs run --project plugin --sequence.shuffle --sequence.seed="$seed" \+ test/e2e/plugins/dsh-host-and-core-contract.e2e.ts \+ test/e2e/plugins/dsh-tauri.e2e.ts \+ test/e2e/plugins/dsh-tauri-ui.e2e.ts \+ test/e2e/plugins/dsh-tauri-extension-panel.e2e.ts \+ test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts \+ test/e2e/plugins/dsh-tauri-appearance.e2e.ts \+ test/e2e/plugins/dsh-tauri-appearance-boot.e2e.ts || exit $?done- - name: Host and migrated plugin contracts (current core)+ - name: Unified scheduler host and right-sidebar stabilityenv:- DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli-current/node_modules/@deepseek-ai/dsh/lib/bin.js- run: node node_modules/vitest/vitest.mjs run --project plugin test/e2e/plugins/dsh-host-and-core-contract.e2e.ts test/e2e/plugins/dsh-tauri-model.e2e.ts test/e2e/plugins/dsh-tauri-worktree.e2e.ts test/e2e/plugins/dsh-tauri-experimental.e2e.ts test/e2e/plugins/dsh-tauri-remote-access.e2e.ts test/e2e/plugins/dsh-tauri-remote-panel.e2e.ts-- - name: Unified scheduler host and right-sidebar contracts (current core)- id: scheduler_contracts- env:- DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli-current/node_modules/@deepseek-ai/dsh/lib/bin.js+ DSH_E2E_DSH_BIN: ${{ runner.temp }}/dsh-cli/node_modules/@deepseek-ai/dsh/lib/bin.jsDSH_SCHEDULER_DIAGNOSTICS_DIR: ${{ runner.temp }}/scheduler-diagnosticsrun: |for seed in 987 988 989 990 991; donode node_modules/vitest/vitest.mjs run --project plugin --sequence.shuffle --sequence.seed="$seed" test/e2e/plugins/dsh-tauri-scheduler.e2e.ts test/e2e/plugins/dsh-tauri-scheduler-client.e2e.ts || exit $?done- - name: Upload scheduler contract failure diagnostics- if: failure() && steps.scheduler_contracts.outcome == 'failure'+ - name: Upload scheduler failure diagnostics+ if: failure()uses: actions/upload-artifact@v6with:- name: scheduler-contract-diagnostics+ name: scheduler-contract-diagnostics-${{ matrix.core }}path: ${{ runner.temp }}/scheduler-diagnostics- if-no-files-found: error+ if-no-files-found: ignore# 桌面端 L3 E2E(vitest + WebdriverIO):# 驱动真实 Tauri 窗口,只能在 Windows 上跑(embedded WebDriver + WebView2)。@@ -310,7 +280,7 @@ jobs:pnpm tauri build --debug --no-bundle --config "$env:RUNNER_TEMP\tauri-e2e.json"- name: Desktop L3 test- run: pnpm run test:e2e:desktop -- --run+ run: node node_modules/vitest/vitest.mjs run --project desktop --sequence.shuffle --sequence.seed=500# Rust 单元测试(应用主体逻辑):# 这是 CI 此前完全缺失的部分。仓库存在大量平台专属代码,必须在对应 OS 上编译并测试:diff --git a/README.en.md b/README.en.mdindex 66388217..7a5cc233 100644--- a/README.en.md+++ b/README.en.md@@ -21,7 +21,7 @@<a href="https://github.com/dsh-tauri/deepseek-harness-desktop/releases"><img src="https://img.shields.io/github/v/release/dsh-tauri/deepseek-harness-desktop?&label=Release&color=4D6BFE" alt="Release" /></a>- <img src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-4d6bfe" alt="DSH 0.2.0-rc.2" />+ <img src="https://img.shields.io/badge/DSH-0.2.1--rc.2-4d6bfe" alt="Recommended DSH 0.2.1-rc.1" /><img src="https://img.shields.io/github/license/dsh-tauri/deepseek-harness-desktop" alt="MIT License" /><br><img src="https://img.shields.io/github/downloads/dsh-tauri/deepseek-harness-desktop/total?&label=downloads&color=4D6BFE" alt="Downloads" />@@ -78,9 +78,9 @@ First-party plugins distributed with desktop resources:Setup offers the following community plugins for installation on demand.-- [DSH Market](https://github.com/dsh-market/dsh-market) — Community plugin market- [DSH Better Sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) — Per-session editor sidebar- [Billion Context](https://github.com/ranxianglei/billion-context) — Context compression and history restoration+- [DSH Market](https://github.com/dsh-market/dsh-market) — Community plugin market- [DSH Rewind](https://github.com/SiriLee/dsh-rewind) — Conversation rewind and workspace backups- [DSH IM](https://github.com/xmanrui/dsh-im) — IM channels and bot management@@ -135,8 +135,10 @@ Windows startup failures show a native dialog with the underlying error. For `ST| Current baseline | Version || --- | --- |-| Recommended Harness core | `0.2.0-rc.2` |-| Declared minimum core | `0.1.5-rc.1`; not a compatibility guarantee for every plugin |+| Recommended Harness core | `0.2.1-rc.1` |+| Minimum supported core | `0.1.7-rc.1`; not a compatibility guarantee for every plugin |++Older cores are no longer supported. Earlier compatibility records describe history, not the current support range.- Core and preset selection follow the [resource manifest](<./src-tauri/resources/manifest.jsonc>) and declared plugin version ranges, not a promise of compatibility with arbitrary latest upstream releases.- CLI integration is enabled by default in release: Windows / macOS / Linux update PATH automatically. Reopen your terminal; other shells may still need manual setup.diff --git a/README.es.md b/README.es.mdindex 02fd71fb..7ad0902a 100644--- a/README.es.md+++ b/README.es.md@@ -21,7 +21,7 @@<a href="https://github.com/dsh-tauri/deepseek-harness-desktop/releases"><img src="https://img.shields.io/github/v/release/dsh-tauri/deepseek-harness-desktop?&label=Release&color=4D6BFE" alt="Release" /></a>- <img src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-4d6bfe" alt="DSH 0.2.0-rc.2" />+ <img src="https://img.shields.io/badge/DSH-0.2.1--rc.2-4d6bfe" alt="DSH recomendado 0.2.1-rc.1" /><img src="https://img.shields.io/github/license/dsh-tauri/deepseek-harness-desktop" alt="MIT License" /><br><img src="https://img.shields.io/github/downloads/dsh-tauri/deepseek-harness-desktop/total?&label=downloads&color=4D6BFE" alt="Downloads" />@@ -78,9 +78,9 @@ Plugins propios distribuidos con los recursos del escritorio:El asistente ofrece los siguientes plugins comunitarios para instalar a demanda.-- [DSH Market](https://github.com/dsh-market/dsh-market) — Mercado de plugins comunitarios- [DSH Better Sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) — Barra lateral del editor por sesión- [Billion Context](https://github.com/ranxianglei/billion-context) — Compresión de contexto y restauración del historial+- [DSH Market](https://github.com/dsh-market/dsh-market) — Mercado de plugins comunitarios- [DSH Rewind](https://github.com/SiriLee/dsh-rewind) — Retroceso de conversación y backups del workspace- [DSH IM](https://github.com/xmanrui/dsh-im) — Canales IM y gestión de bots@@ -135,8 +135,10 @@ Windows muestra los errores de inicio en un diálogo nativo. Para `STARTUP_LOW_I| Base actual | Versión || --- | --- |-| Núcleo Harness recomendado | `0.2.0-rc.2` |-| Núcleo mínimo declarado | `0.1.5-rc.1`; no garantiza compatibilidad con todos los plugins |+| Núcleo Harness recomendado | `0.2.1-rc.1` |+| Núcleo mínimo compatible | `0.1.7-rc.1`; no garantiza compatibilidad con todos los plugins |++Los núcleos anteriores ya no son compatibles. Los registros previos describen hechos históricos, no el soporte actual.- La selección del núcleo y los preajustes sigue el [manifiesto de recursos](<./src-tauri/resources/manifest.jsonc>) y los rangos declarados por los plugins; no garantiza compatibilidad con cualquier nueva versión oficial.- La integración CLI está habilitada por defecto en release: Windows / macOS / Linux actualizan el PATH automáticamente. Reabrí la terminal; otros shells pueden seguir necesitando configuración manual.diff --git a/README.md b/README.mdindex d6973e7e..1b88062a 100644--- a/README.md+++ b/README.md@@ -21,7 +21,7 @@<a href="https://github.com/dsh-tauri/deepseek-harness-desktop/releases"><img src="https://img.shields.io/github/v/release/dsh-tauri/deepseek-harness-desktop?&label=Release&color=4D6BFE" alt="Release" /></a>- <img src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-4d6bfe" alt="DSH 0.2.0-rc.2" />+ <img src="https://img.shields.io/badge/DSH-0.2.1--rc.2-4d6bfe" alt="Recommended DSH 0.2.1-rc.1" /><img src="https://img.shields.io/github/license/dsh-tauri/deepseek-harness-desktop" alt="MIT License" /><br><img src="https://img.shields.io/github/downloads/dsh-tauri/deepseek-harness-desktop/total?&label=downloads&color=4D6BFE" alt="Downloads" />@@ -77,9 +77,9 @@启动引导提供以下社区插件,可按需安装;-- [DSH Market](https://github.com/dsh-market/dsh-market) — 社区插件市场- [DSH Better Sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) — 按会话隔离的右编辑器侧栏- [Billion Context](https://github.com/ranxianglei/billion-context) — 上下文压缩与历史恢复+- [DSH Market](https://github.com/dsh-market/dsh-market) — 社区插件市场- [DSH Rewind](https://github.com/SiriLee/dsh-rewind) — 对话回退与工作区备份- [DSH IM](https://github.com/xmanrui/dsh-im) — IM 渠道与机器人管理@@ -134,8 +134,10 @@ Windows 启动失败时会通过原生对话框显示具体错误。若出现 `S| 当前基线 | 版本 || --- | --- |-| 推荐 Harness 内核 | `0.2.0-rc.2` |-| 声明的内核最低版本 | `0.1.5-rc.1`,不保证所有兼容 |+| 推荐 Harness 内核 | `0.2.1-rc.1` |+| 支持的内核最低版本 | `0.1.7-rc.1`,不保证所有插件兼容 |++更早内核不再支持;旧兼容记录仅保留历史事实,不代表当前支持范围。- 内核与预设选择遵循[资源清单](<./src-tauri/resources/manifest.jsonc>)及插件声明的版本范围;不保证任意最新上游版本都兼容。- 正式版默认启用 CLI 集成:Windows / macOS / Linux 自动更新 PATH。需重新打开终端,其他 shell 仍需要手动配置。diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex f8f366e5..83fc2ff2 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -5,23 +5,23 @@| 插件 | 引用宿主 | 版本 | hash | source | 声明文件 || --- | --- | --- | --- | --- | --- |-| `packages/dsh-tauri` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-model` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-model/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-extension` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-model` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-model/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-extension` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-extension` | [qinyre/dsh-plugin-capabilities](https://github.com/qinyre/dsh-plugin-capabilities) | `0.3.11` | `52e3f664dbe1c9f1166ea3cf4e7416d5352f3ee9` | `source/dsh-plugin-capabilities` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-extension` | [anthropics/skills](https://github.com/anthropics/skills) | — | — | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-extension` | [vercel-labs/skills](https://github.com/vercel-labs/skills) | — | — | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-scheduler` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `ec48669f48ac81bac353fc646e7cf9c57241242f` | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-scheduler` | [deepseek-ai/deepseek-harness(派生原始来源)](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `ec48669f48ac81bac353fc646e7cf9c57241242f` | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-scheduler` | [MichengAI/dsh-automation](https://github.com/MichengAI/dsh-automation) | `0.1.42` | `e75499e55d0b8bfe85e04ba5a579080b54edff56` | `source/dsh-automation` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-pet` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-pet` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-pet` | [PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet) | — | `e1ff8c1e4001878cbb80441262d530e16541f138` | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-pet` | [dsh-tauri-desk/dsh-pet-mov](https://github.com/dsh-tauri-desk/dsh-pet-mov) | — | `be0f3bb494cb71a4c73f916c0b92d25a3ab4d002` | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-pet` | [hairyf/dsh-pet-sticker](https://github.com/hairyf/dsh-pet-sticker) | — | `6634e0de9cace37ac6b747a960c833209ad015a3` | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri-pet` | [QCYTSN/dsh-dafeiyu](https://github.com/QCYTSN/dsh-dafeiyu) | — | — | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-rightclick` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-rightclick/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-experimental` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-experimental/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-archive` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-archive/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-ui` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-ui-playground` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-ui-playground/THIRD_PARTY_NOTICES.md) |-| `packages/dsh-tauri-worktree` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-alpha.1` | `5badb15009ae1756c3afe0ae0cef1faafc290ccc` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-worktree/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-rightclick` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-rightclick/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-experimental` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-experimental/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-archive` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-archive/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-ui` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-ui-playground` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-ui-playground/THIRD_PARTY_NOTICES.md) |+| `packages/dsh-tauri-worktree` | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) | `dsh-v0.2.1-rc.1` | `1600d8a1e140dcde43a1a0941940a0480712c011` | `source/deepseek-harness` | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri-worktree/THIRD_PARTY_NOTICES.md) || `packages/dsh-tauri` | [primer/primitives](https://github.com/primer/primitives) | — | `f48bc063f7bc0fb3e447386a8c259650ce46dea8` | — | [THIRD_PARTY_NOTICES.md](packages/dsh-tauri/THIRD_PARTY_NOTICES.md) |diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.mdindex e03ea9a2..d10be00f 100644--- a/docs/DEVELOPMENT.md+++ b/docs/DEVELOPMENT.md@@ -2,7 +2,7 @@[English](<./DEVELOPMENT.md>) · [中文](<./DEVELOPMENT.zh.md>) · [README](<../README.en.md>)-Tauri 2 + React 19: UI in [`src/`](<../src/>), Rust backend in [`src-tauri/`](<../src-tauri/>), plugins in [`packages/`](<../packages/>). Current desktop: `0.22.1`; recommended Harness core: `0.2.0-rc.2`.+Tauri 2 + React 19: UI in [`src/`](<../src/>), Rust backend in [`src-tauri/`](<../src-tauri/>), plugins in [`packages/`](<../packages/>). Recommended Harness core: `0.2.1-rc.1`; minimum supported core: `0.1.7-rc.1`. Older core versions are unsupported; earlier compatibility logs record history, not the current support policy. See the [current compatibility record](<../packages/dsh-tauri/docs/compatibility-0.2.1-rc.1.md>).Read [AGENTS.md](<../AGENTS.md>) and the [routed specifications](<./specs/devlopment.md>) before changes. Do not inspect the restricted archive directory or run builds during plugin work.diff --git a/docs/DEVELOPMENT.zh.md b/docs/DEVELOPMENT.zh.mdindex c4f1f8fe..ac85d3ab 100644--- a/docs/DEVELOPMENT.zh.md+++ b/docs/DEVELOPMENT.zh.md@@ -2,7 +2,7 @@[English](<./DEVELOPMENT.md>) · [中文](<./DEVELOPMENT.zh.md>) · [README](<../README.md>)-Tauri 2 + React 19:前端位于 [`src/`](<../src/>),Rust 后端位于 [`src-tauri/`](<../src-tauri/>),插件位于 [`packages/`](<../packages/>)。当前桌面端:`0.22.1`;推荐 Harness 内核:`0.2.0-rc.2`。+Tauri 2 + React 19:前端位于 [`src/`](<../src/>),Rust 后端位于 [`src-tauri/`](<../src-tauri/>),插件位于 [`packages/`](<../packages/>)。推荐 Harness 内核:`0.2.1-rc.1`;最低支持内核:`0.1.7-rc.1`。更早内核不再支持,旧兼容日志只记录历史,不构成当前支持承诺;本轮范围见[当前兼容记录](<../packages/dsh-tauri/docs/compatibility-0.2.1-rc.1.md>)。修改前先读 [AGENTS.md](<../AGENTS.md>) 与[路由规范](<./specs/devlopment.md>)。禁止查看受限归档目录,插件改动期间禁止执行构建。diff --git a/package.json b/package.jsonindex 92c70f3d..6f494e17 100644--- a/package.json+++ b/package.json@@ -156,7 +156,6 @@"changelogithub": "catalog:release","diff": "catalog:testing","dsh-h3": "catalog:",- "dsh-session-current": "catalog:testing","eslint": "catalog:lint","eslint-plugin-react-refresh": "catalog:lint","h3": "catalog:",diff --git a/packages/dsh-tauri-archive/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-archive/THIRD_PARTY_NOTICES.mdindex 2df66b61..834bb8b8 100644--- a/packages/dsh-tauri-archive/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-archive/THIRD_PARTY_NOTICES.md@@ -3,10 +3,12 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: the official workspace browser and settings sidebar are extended through official slots, official primitives `Menu` entries and the official sessions / workspaces service surfaces.@@ -21,7 +23,7 @@ Deliberate difference:- The official entry only unarchives; this package's "Archived chats" page adds search, sort, grouping, project filter, delete, and a "delete workspace" action rewritten into "archive workspace".-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The sessions and workspaces integration still delegates to official services. Optional draft initialization on `uiWorkspace.startSession` does not replace the adapter open path.- The official workspace menu and row shapes used by the archive-entry patch remain compatible; no removed invariant export is imported.diff --git a/packages/dsh-tauri-archive/package.json b/packages/dsh-tauri-archive/package.jsonindex 97a71140..40a076ae 100644--- a/packages/dsh-tauri-archive/package.json+++ b/packages/dsh-tauri-archive/package.json@@ -31,6 +31,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-experimental/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-experimental/THIRD_PARTY_NOTICES.mdindex f86dd821..893e22b1 100644--- a/packages/dsh-tauri-experimental/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-experimental/THIRD_PARTY_NOTICES.md@@ -3,10 +3,12 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: the per-turn Git snapshot and file restore path are this repo's own; only the input-dock chip mirrors the official deliverables row.@@ -17,7 +19,7 @@ Mirrored official surface:- Dock order: the chip is ordered against the official dock rows (official `todo` = 0, `goal` = 10, `queue` = 20, worktree banner = -10); a negative order places it above the official task list and worktree banner (`src/client/constants/index.ts:12`, `src/client/register/running-chip.ts:5`).- Official reference chips (`ctx.conversation.input` insertion path) → `src/client/register/paste-collapse.ts`: large pastes collapse into the official reference chip through the official public surface only.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The reference-insertion, source-codec, and revision-guarded span contracts used by paste collapse remain available. This package does not override the removed composer `stats` registration.- The independent `activity` and `usage` dock entries are supplied by the target core; the running-changes chip keeps its separate registration and order.diff --git a/packages/dsh-tauri-experimental/package.json b/packages/dsh-tauri-experimental/package.jsonindex b27be700..7d75e9cd 100644--- a/packages/dsh-tauri-experimental/package.json+++ b/packages/dsh-tauri-experimental/package.json@@ -33,6 +33,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.register.test.ts b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.register.test.tsindex eae03ccb..0186121f 100644--- a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.register.test.ts+++ b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.register.test.ts@@ -92,8 +92,7 @@ interface HarnessOptions {insertable?: booleanretained?: booleantriggersAvailable?: boolean- /** 模拟 `0.1.5-rc.x`:动作面没有 captureInsertion,只有壳自身的 caretSpan。 */- legacyActions?: boolean+ captureAvailable?: boolean}function harness(options: HarnessOptions = {}) {@@ -106,13 +105,12 @@ function harness(options: HarnessOptions = {}) {const sessionInput = {insertReference,state: occurrences,- ...options.legacyActions === true ? { caretSpan: () => ({ start: 5, end: 5 }) } : {},}const list = snapshotSource({ current: 's-1' as string | undefined })const binding = vi.fn((id: string) =>id === 's-1' && options.retained !== false ? { ctx: { scope: id } } : undefined)const provideInfo = vi.fn(() => ({- props: { inputActions: options.legacyActions === true ? {} : { captureInsertion: () => span } },+ props: { inputActions: options.captureAvailable === false ? {} : { captureInsertion: () => span } },}))const registered: { source?: { name?: string, trigger?: string, codec?: { clipboardText: (ref: string) => string, serialize: (ref: string, signal: AbortSignal) => Promise<string> } } } = {}const triggers = {@@ -287,15 +285,14 @@ describe('pasteCollapseFeature', () => {h.cleanup()})- it('0.1.5-rc.x 动作面没有 captureInsertion 时退回壳自身的 caretSpan,chip 仍插在光标处', () => {- const h = harness({ legacyActions: true })+ it('captureInsertion 能力缺席时保留官方粘贴,不再构造旧版光标快照', () => {+ const h = harness({ captureAvailable: false })const event = pasteEvent()h.paste(event)- expect(h.insertReference, '旧基线的折叠同样必须生效').toHaveBeenCalledTimes(1)- expect(h.insertReference.mock.calls[0]![1], '快照由 caretSpan + state.draftRev 组成').toEqual({ start: 5, end: 5, draftRev: 7 })- expect(event.preventDefault).toHaveBeenCalledTimes(1)+ expect(h.insertReference).not.toHaveBeenCalled()+ expect(event.preventDefault).not.toHaveBeenCalled()h.cleanup()})diff --git a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.ts b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.tsindex cd354556..e1cb1387 100644--- a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.ts+++ b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.ts@@ -9,7 +9,7 @@ import { defineRegister } from 'dsh-tauri/client'import { PLUGIN_ID } from '../../shared/constants'import { PASTE_CHIP_SOURCE } from '../constants'import { locale } from '../locales'-import { clipboardFileCount, isCollapsiblePaste, livePasteRefs, pasteChipTitle, resolveInsertionSpan, stalePasteRefs } from './paste-collapse.utils'+import { clipboardFileCount, isCollapsiblePaste, livePasteRefs, pasteChipTitle, stalePasteRefs } from './paste-collapse.utils'/*** 大段粘贴(>500 字)折叠成官方引用 chip:编辑器里只留一枚 `首行… · N 字` 的 chip,@@ -20,7 +20,6 @@ import { clipboardFileCount, isCollapsiblePaste, livePasteRefs, pasteChipTitle,* 草稿投影、原生复制、持久化镜像都拿得到原文;模型侧由 codec.serialize 还原);* - `ctx.conversation.input.for(actx)` 在光标处插入 chip(官方 picks 用的是同一条通路);* - `sessions.provideInfo().props.inputActions.captureInsertion()` 取带修订号的选区快照- * (`0.1.5-rc.x` 的动作面还没有它,退回壳自身的 `caretSpan()` + `state.draftRev`)。** 任何一环缺席都不接管:官方 paste 路径照常把原文插入编辑器(退级第 4 级),绝不吞掉粘贴。* 文本落点判定只认官方 `[data-composer-card]`。@@ -96,7 +95,7 @@ export const pasteCollapseFeature = defineRegister<ClientContext>((controller, cconst input = sessionInputOf(sessionId)if (input === undefined)return- const span = resolveInsertionSpan(sessions().provideInfo?.(sessionId)?.props?.inputActions, input)+ const span = sessions().provideInfo?.(sessionId)?.props?.inputActions?.captureInsertion?.()if (span === undefined)returndiff --git a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.types.ts b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.types.tsindex b1b0011b..99b1a3ec 100644--- a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.types.ts+++ b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.types.ts@@ -30,7 +30,6 @@ export interface PasteOccurrence {}export interface PasteInputState {- draftRev?: numberoccurrences?: readonly PasteOccurrence[]}@@ -41,8 +40,6 @@ export interface PasteInputStateSource {export interface PasteSessionInput {insertReference: (reference: PasteReferenceInsert, span: PasteTokenSpan) => boolean- /** `0.1.5-rc.x` 的动作面还没有 `captureInsertion`:壳自身的同义方法仍在(后者就是它 + draftRev)。 */- caretSpan?: () => { start: number, end: number }state: PasteInputStateSource}diff --git a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.test.ts b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.test.tsindex a3b6d35d..b5ea5b62 100644--- a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.test.ts+++ b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.test.ts@@ -4,7 +4,6 @@ import {isCollapsiblePaste,livePasteRefs,pasteChipTitle,- resolveInsertionSpan,stalePasteRefs,} from './paste-collapse.utils'@@ -83,29 +82,3 @@ describe('stalePasteRefs', () => {expect(stalePasteRefs(stash, new Set(['a']), 60_000, 2000)).toEqual([])})})--describe('resolveInsertionSpan', () => {- it('动作面提供 captureInsertion 时直接用它的快照', () => {- const span = { start: 4, end: 4, draftRev: 9 }-- expect(resolveInsertionSpan({ captureInsertion: () => span }, sessionInput())).toBe(span)- })-- it('动作面没有 captureInsertion(0.1.5-rc.x)时退回 caretSpan + state.draftRev,组成同形快照', () => {- const input = sessionInput({ caret: { start: 2, end: 5 }, draftRev: 12 })-- expect(resolveInsertionSpan({}, input)).toEqual({ start: 2, end: 5, draftRev: 12 })- })-- it('两条通路都缺席时返回 undefined,由调用方退回官方粘贴', () => {- expect(resolveInsertionSpan(undefined, sessionInput())).toBeUndefined()- })-})--function sessionInput(options: { caret?: { start: number, end: number }, draftRev?: number } = {}) {- return {- insertReference: () => true,- ...(options.caret === undefined ? {} : { caretSpan: () => options.caret! }),- state: { getSnapshot: () => ({ occurrences: [], ...options.draftRev === undefined ? {} : { draftRev: options.draftRev } }), subscribe: () => () => {} },- }-}diff --git a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.ts b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.tsindex cea7497d..129f55d9 100644--- a/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.ts+++ b/packages/dsh-tauri-experimental/src/client/register/paste-collapse.utils.ts@@ -1,4 +1,4 @@-import type { PasteInputActions, PasteOccurrence, PasteSessionInput, PasteTokenSpan } from './paste-collapse.types'+import type { PasteOccurrence } from './paste-collapse.types'/** 超过该字符数的粘贴折叠成引用 chip;官方路径会把整段原文灌进编辑器,长文本即「一大串文字」。 */const PASTE_COLLAPSE_THRESHOLD = 500@@ -6,25 +6,6 @@ const PASTE_COLLAPSE_THRESHOLD = 500/** chip 标题(粘贴内容首行)的字符上限:chip 自身还有 240px 省略,这里只保证标题可读。 */const PASTE_TITLE_MAX_LENGTH = 24-/**- * 取插入 chip 用的选区快照(detect 坐标 + 修订号)。- *- * `0.1.5-rc.x` 的动作面只有 setDraft/submit,没有 `captureInsertion`;壳自身的 `caretSpan()`- * 仍在,而 `0.1.7` 的 `captureInsertion` 实现就是「caretSpan + draftRev」。按能力探测取用,- * 两条通路都缺席时返回 undefined,由调用方退回官方粘贴路径。- */-export function resolveInsertionSpan(- actions: PasteInputActions | undefined,- input: PasteSessionInput,-): PasteTokenSpan | undefined {- const captured = actions?.captureInsertion?.()- if (captured !== undefined)- return captured- const caret = input.caretSpan?.()- const draftRev = input.state.getSnapshot().draftRev- return caret === undefined || draftRev === undefined ? undefined : { ...caret, draftRev }-}-/*** 是否接管这次粘贴:带文件的粘贴必须让给官方路径(它负责文件入草稿),空文本同样不接管。*/diff --git a/packages/dsh-tauri-experimental/src/host/service/workspace.test.ts b/packages/dsh-tauri-experimental/src/host/service/workspace.test.tsindex 6b48340c..a64feb70 100644--- a/packages/dsh-tauri-experimental/src/host/service/workspace.test.ts+++ b/packages/dsh-tauri-experimental/src/host/service/workspace.test.ts@@ -25,14 +25,12 @@ async function initRepo(path: string): Promise<void> {await run('git', ['-c', 'init.defaultBranch=main', 'init', '--quiet', path], { windowsHide: true })}-/** 绑一个假宿主:`workspace.resolve` 的 cwd 只能来自宿主 SessionStore(get 优先,list 兜底)。 */function bindSessions(cwds: Record<string, string | undefined>): void {const rows = Object.entries(cwds).map(([id, cwd]) => ({ id, header: cwd === undefined ? {} : { cwd } }))disposers.push(server({webServer: { register: () => () => {} },sessions: {get: (id: string) => rows.find(row => row.id === id),- list: () => rows,},} as never))}@@ -79,4 +77,25 @@ describe('workspace.resolve', () => {expect(await workspace.resolve('session-missing')).toEqual({ ok: false, reason: REASON_GIT_REQUIRED })expect(await workspace.resolve('session-empty')).toEqual({ ok: false, reason: REASON_GIT_REQUIRED })})++ it('does not resolve removed session cwd fields or list-only stores', async () => {+ const root = await tempRoot()+ await initRepo(root)+ disposers.push(server({+ webServer: { register: () => () => {} },+ sessions: {+ get: () => ({ id: 'legacy-cwd', header: {}, cwd: root }),+ list: () => [{ id: 'list-only', header: { cwd: root } }],+ },+ } as never))+ expect(workspace.peek('legacy-cwd')).toBe(true)+ expect(await workspace.resolve('legacy-cwd')).toEqual({ ok: false, reason: REASON_GIT_REQUIRED })+ disposers.pop()?.()+ disposers.push(server({+ webServer: { register: () => () => {} },+ sessions: { list: () => [{ id: 'list-only', header: { cwd: root } }] },+ } as never))+ expect(workspace.peek('list-only')).toBe(false)+ expect(await workspace.resolve('list-only')).toEqual({ ok: false, reason: REASON_GIT_REQUIRED })+ })})diff --git a/packages/dsh-tauri-experimental/src/host/service/workspace.ts b/packages/dsh-tauri-experimental/src/host/service/workspace.tsindex 0c1b3048..9dffefa8 100644--- a/packages/dsh-tauri-experimental/src/host/service/workspace.ts+++ b/packages/dsh-tauri-experimental/src/host/service/workspace.ts@@ -52,22 +52,16 @@ function sessionOf(sessionId: string): any {try {const ctx = getServerContext<HostContext>(server)return ctx.sessions?.get?.(sessionId)- ?? ctx.sessions?.list?.().find((session: any) => session?.id === sessionId)}catch {return undefined}}-/** 会话 cwd(header.cwd 优先,兼容 session.cwd);缺失返回 null,不猜测进程工作目录。 */function cwdOf(sessionId: string): string | null {const session = sessionOf(sessionId)- const cwd = typeof session?.header?.cwd === 'string'- ? session.header.cwd- : typeof session?.cwd === 'string'- ? session.cwd- : ''- return cwd.length > 0 ? cwd : null+ const cwd = session?.header?.cwd+ return typeof cwd === 'string' && cwd.length > 0 ? cwd : null}function remember(key: string, result: WorkspaceProbe): void {diff --git a/packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.mdindex 5f380227..63064070 100644--- a/packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-extension/THIRD_PARTY_NOTICES.md@@ -25,10 +25,12 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: the manager drives the official Host plugins instead of re-implementing them.@@ -41,7 +43,7 @@ Official contracts used:- MCP config subset: the official `toolCallTimeoutMs`, `failOnStartupError`, `maxInstructionBytes` and `reconnect` keys are not surfaced yet.- MCP resources: left to the official `@deepseek-ai/dsh-mcp-resources`; this package adds no resource tooling.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The skill-filesystem source and MCP client source remain unchanged; provider configuration, policy calls, and the managed MCP subset require no migration.- The removed `./invariant` exports and subpath package metadata lookup have no local consumers. This package uses root plugin entries and does not fork the official plugin-manager runtime-resolution logic.diff --git a/packages/dsh-tauri-extension/package.json b/packages/dsh-tauri-extension/package.jsonindex dadce03f..70d4fbfa 100644--- a/packages/dsh-tauri-extension/package.json+++ b/packages/dsh-tauri-extension/package.json@@ -34,6 +34,9 @@"dist","skills"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-extension/src/client/constants/index.ts b/packages/dsh-tauri-extension/src/client/constants/index.tsindex c06d0c60..017d28b1 100644--- a/packages/dsh-tauri-extension/src/client/constants/index.ts+++ b/packages/dsh-tauri-extension/src/client/constants/index.ts@@ -7,6 +7,7 @@ export const CONVERSATION_INPUT_LEFT_SLOT = 'conversation.input.left'export const MARKET_SERVICE_NAME = 'market'export const PANEL_ID = PLUGIN_IDexport const PANEL_ACTION_ORDER = 20+export const PLUGINS_MORE_HEADER_SELECTOR = '[data-dsh-extension-plugins] [data-plugin-panel] > header:has(> button:first-child + h1)'export const INPUT_PREFILL_ID = `${PLUGIN_ID}.skill-prefill`export const INPUT_PREFILL_ORDER = 40export const INPUT_PREFILL_PRIORITY = 0diff --git a/packages/dsh-tauri-extension/src/client/locales/index.ts b/packages/dsh-tauri-extension/src/client/locales/index.tsindex b2cc87c6..fa41bfc5 100644--- a/packages/dsh-tauri-extension/src/client/locales/index.ts+++ b/packages/dsh-tauri-extension/src/client/locales/index.ts@@ -4,6 +4,7 @@ import { PLUGIN_ID } from '../constants'const zh = {extension: '插件扩展',pluginsTab: '插件',+ pluginsBack: '回退',skillsTab: '技能',mcpTab: 'MCP',marketTab: '市场',@@ -121,6 +122,7 @@ type LocaleKey = keyof typeof zhconst en: Record<LocaleKey, string> = {extension: 'Plugin Extensions',pluginsTab: 'Plugins',+ pluginsBack: 'Back',skillsTab: 'Skills',mcpTab: 'MCP',marketTab: 'Market',diff --git a/packages/dsh-tauri-extension/src/client/register/extension-panel-plugins.test.tsx b/packages/dsh-tauri-extension/src/client/register/extension-panel-plugins.test.tsxnew file mode 100644index 00000000..3d380025--- /dev/null+++ b/packages/dsh-tauri-extension/src/client/register/extension-panel-plugins.test.tsx@@ -0,0 +1,373 @@+// @vitest-environment jsdom+import type { ClientContext, LocaleService } from 'dsh-tauri/client'+import { cleanup, fireEvent, render, waitFor } from '@testing-library/react'+import { useState } from 'react'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { ExtensionPanel } from '../components/extension-panel'+import { PANEL_ID } from '../constants'+import { locale } from '../locales'+import { extensionPanelFeature } from './extension-panel'++vi.mock('dsh-tauri-ui/client', async () => {+ const { cssr } = await import('../../../../dsh-tauri-ui/src/client/utils/cssr')+ const { mountStyle } = await import('../../../../dsh-tauri-ui/src/client/utils/style')+ const { SegmentedControl } = await import('../../../../dsh-tauri-ui/src/client/components/segmented-control')+ return { cssr, mountStyle, SegmentedControl, SlotOutlet: () => null }+})+vi.mock('../components/skills-tab', () => ({ SkillsTab: () => <section>Skills</section> }))+vi.mock('../components/mcp-tab', () => ({ McpTab: () => <section>MCP</section> }))++const disposers: Array<() => void> = []+const styleSelector = `style[cssr-id="${PANEL_ID}-plugins"]`++function runtime(active = 'zh') {+ const dictionaries = new Map<string, Record<string, string>>()+ const listeners = new Set<() => void>()+ const service = {+ register(namespace: string, language: string, dictionary: Record<string, string>) {+ const key = `${namespace}:${language}`+ dictionaries.set(key, dictionary)+ return () => {+ dictionaries.delete(key)+ }+ },+ bind: (namespace: string) => (key: string) => dictionaries.get(`${namespace}:${active}`)?.[key] ?? key,+ getLocale: () => ({ active }),+ subscribe(listener: () => void) {+ listeners.add(listener)+ return () => {+ listeners.delete(listener)+ }+ },+ } as unknown as LocaleService+ return {+ service,+ listeners,+ change(language: string) {+ active = language+ for (const listener of listeners)+ listener()+ },+ }+}++function install(active = 'zh') {+ const host = runtime(active)+ const slots = {+ entriesOfSlot: () => [],+ subscribe: () => () => {},+ inject: (_slot: string, register: () => () => void) => register(),+ register: () => () => {},+ }+ const ctx = { locale: host.service, slots, inject: () => {} } as unknown as ClientContext+ const unregister = locale.registerLocale({ locale: host.service })+ const release = extensionPanelFeature.call(ctx)+ const dispose = (): void => {+ release()+ unregister()+ }+ disposers.push(dispose)+ return { dispose, host }+}++function element<T extends Element>(root: ParentNode, selector: string): T {+ const found = root.querySelector<T>(selector)+ if (found === null)+ throw new Error(`Missing fixture element: ${selector}`)+ return found+}++function Plugins({ floor = false, initial = 'list', backLabel = '返回插件', title = '实验性插件' }: { floor?: boolean, initial?: 'list' | 'more', backLabel?: string, title?: string }) {+ const [view, setView] = useState<'list' | 'more' | 'detail'>(initial)+ return (+ <div data-dsh-extension-plugins>+ <span data-dsh-plugins-icon aria-hidden="true"><svg width="16" height="16" /></span>+ <section data-plugin-panel>+ {view === 'list' && (+ <header className="upstream-main" {...floor ? {} : { 'data-window-drag': '' }}>+ <div>+ <h1 className="upstream-title">官方插件</h1>+ {floor+ ? <p className="upstream-intro">插件简介</p>+ : (+ <div className="upstream-intro">+ <span>插件简介</span>+ <button type="button" aria-label="插件信息" />+ </div>+ )}+ </div>+ <div><button type="button">刷新插件</button></div>+ </header>+ )}+ {view === 'more' && (+ <header className="upstream-more" data-window-drag>+ <button type="button" className="upstream-back" aria-label={backLabel} onClick={() => setView('list')}><svg width="20" height="20" aria-hidden="true" /></button>+ <h1 className="upstream-title">{title}</h1>+ </header>+ )}+ {view === 'list' && (+ <div className="upstream-tabs">+ <div role="tablist" aria-label="插件分组" />+ </div>+ )}+ {view === 'list' && (+ <section data-plugin-group={floor ? 'official' : 'extensions'}>+ <h3>实验性插件</h3>+ {!floor && <button type="button" onClick={() => setView('more')}>更多</button>}+ <button type="button" onClick={() => setView('detail')}>打开配置</button>+ </section>+ )}+ {view === 'more' && <div><section data-plugin-group="more"><ul><li>插件</li></ul></section></div>}+ {view === 'detail' && (+ <div data-plugin-item-detail="shell">+ {floor+ ? (+ <>+ <button type="button" aria-label="返回插件" onClick={() => setView('list')}>插件</button>+ <div>配置图标与操作</div>+ </>+ )+ : (+ <div data-window-drag>+ <button type="button" aria-label="返回插件" onClick={() => setView('list')}>插件</button>+ <div>配置图标与操作</div>+ </div>+ )}+ <section data-plugin-config><div data-window-drag>插件自己的内容</div></section>+ </div>+ )}+ </section>+ </div>+ )+}++function renderPanel(plugins = <Plugins />) {+ return render(<ExtensionPanel plugins={plugins} market={{ version: 1, render: () => <section>Market</section>, setSettingsVisible: () => {}, settingsVisible: () => false }} createSkill={async () => {}} />)+}++async function settle(): Promise<void> {+ await new Promise(resolve => setTimeout(resolve, 0))+}++let upstreamStyle: HTMLStyleElement+beforeEach(() => {+ upstreamStyle = document.createElement('style')+ upstreamStyle.textContent = '.upstream-main { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:16px; padding-top:28px } .upstream-title { margin:0; font-size:20px; line-height:28px; font-weight:500 } .upstream-intro { margin:4px 0 0; font-size:13px; line-height:20px } .upstream-more { align-items:center; gap:8px } .upstream-back { width:28px; padding:0 } .upstream-tabs { display:flex; margin-top:-16px }'+ document.head.append(upstreamStyle)+})++afterEach(() => {+ for (const dispose of disposers.splice(0))+ dispose()+ cleanup()+ upstreamStyle.remove()+ vi.restoreAllMocks()+})++describe('embedded official plugin headers', () => {+ it('keeps one native back action and the selected extension tabs through More and back', async () => {+ install()+ const view = renderPanel()+ const tabs = view.getAllByRole('tab')+ expect(tabs.map(tab => tab.textContent)).toEqual(['插件', '市场', '技能', 'MCP'])+ expect(tabs[0]?.getAttribute('aria-selected')).toBe('true')+ const mainTitle = view.getByRole('heading', { name: '官方插件', level: 1 })+ expect(getComputedStyle(mainTitle).paddingLeft).toBe('32px')+ expect(getComputedStyle(element(view.container, '[data-dsh-plugins-icon]')).display).toBe('inline-flex')++ fireEvent.click(view.getByRole('button', { name: '更多' }))+ await waitFor(() => expect(view.getAllByRole('button', { name: '回退' })).toHaveLength(1))+ const back = view.getByRole('button', { name: '回退' })+ const moreTitle = view.getByRole('heading', { name: '实验性插件', level: 1 })+ expect(back.hasAttribute('data-dsh-plugins-back')).toBe(true)+ expect(back.textContent).toBe('回退')+ expect(back.querySelectorAll('svg')).toHaveLength(1)+ expect(getComputedStyle(back).width).toBe('auto')+ expect(getComputedStyle(moreTitle).paddingLeft).toBe('0px')+ expect(getComputedStyle(element(view.container, '[data-plugin-panel] > header')).display).toBe('flex')+ expect(getComputedStyle(element(view.container, '[data-plugin-panel] > header')).gap).toBe('10px')+ expect(getComputedStyle(element(view.container, '[data-dsh-plugins-icon]')).display).toBe('none')+ expect(view.getAllByRole('tab')).toEqual(tabs)++ fireEvent.click(back)+ await waitFor(() => expect(back.hasAttribute('data-dsh-plugins-back')).toBe(false))+ expect(back.getAttribute('aria-label')).toBe('返回插件')+ expect(back.querySelector('span')).toBeNull()+ expect(view.getByRole('heading', { name: '官方插件', level: 1 })).toBeTruthy()+ expect(view.queryByRole('button', { name: '回退' })).toBeNull()+ expect(view.getAllByRole('tab')).toEqual(tabs)+ expect(tabs[0]?.getAttribute('aria-selected')).toBe('true')+ })++ it('drops the official tab strip negative margin so the header keeps its spacing', async () => {+ install()+ const view = renderPanel()+ const strip = element<HTMLElement>(view.container, '[data-plugin-panel] > div:has(> [role="tablist"])')+ expect(getComputedStyle(strip).marginTop).toBe('0px')+ })++ it('preserves the floor header without drag attributes, its paragraph intro and native configuration navigation', async () => {+ install()+ const view = renderPanel(<Plugins floor />)+ const header = element<HTMLElement>(view.container, '[data-plugin-panel] > header')+ const intro = element<HTMLElement>(header, 'p')+ expect(header.hasAttribute('data-window-drag')).toBe(false)+ expect(getComputedStyle(header).paddingTop).toBe('0px')+ expect(getComputedStyle(header).gap).toBe('14px 10px')+ expect(getComputedStyle(intro).fontSize).toBe('12px')+ expect(getComputedStyle(intro).lineHeight).toBe('18px')+ expect(getComputedStyle(intro).order).toBe('2')+ expect(view.queryByRole('button', { name: '更多' })).toBeNull()+ expect(view.container.querySelector('[data-dsh-plugins-back]')).toBeNull()++ fireEvent.click(view.getByRole('button', { name: '打开配置' }))+ await settle()+ const crumb = view.getByRole('button', { name: '返回插件' })+ expect(crumb.textContent).toBe('插件')+ expect(crumb.hasAttribute('data-dsh-plugins-back')).toBe(false)+ expect(getComputedStyle(element(view.container, '[data-dsh-plugins-icon]')).display).toBe('none')+ expect(getComputedStyle(crumb).marginTop).toBe('12px')+ expect(getComputedStyle(element(view.container, '[data-plugin-config] > div')).paddingTop).not.toBe('12px')+ fireEvent.click(crumb)+ expect(view.getByRole('heading', { name: '官方插件', level: 1 })).toBeTruthy()+ })++ it('keeps the rc.1 detail navigation and limits its spacing to the official drag header', async () => {+ install()+ const view = renderPanel()+ fireEvent.click(view.getByRole('button', { name: '打开配置' }))+ await settle()+ const crumb = view.getByRole('button', { name: '返回插件' })+ expect(crumb.hasAttribute('data-dsh-plugins-back')).toBe(false)+ expect(getComputedStyle(element(view.container, '[data-plugin-item-detail] > div[data-window-drag]')).paddingTop).toBe('12px')+ expect(getComputedStyle(element(view.container, '[data-plugin-config] > div')).paddingTop).not.toBe('12px')+ expect(getComputedStyle(element(view.container, '[data-dsh-plugins-icon]')).display).toBe('none')+ fireEvent.click(crumb)+ expect(view.getByRole('heading', { name: '官方插件', level: 1 })).toBeTruthy()+ expect(view.getByRole('tab', { name: '插件' }).getAttribute('aria-selected')).toBe('true')+ })++ it('restores an absent native aria label and the exact original child nodes on dispose', async () => {+ const view = render(<Plugins initial="more" />)+ const back = element<HTMLButtonElement>(view.container, '[data-plugin-panel] > header > button')+ back.removeAttribute('aria-label')+ const children = [...back.childNodes]+ const { dispose } = install()+ await waitFor(() => expect(view.getByRole('button', { name: '回退' })).toBe(back))+ expect(back.firstChild).toBe(children[0])+ expect(back.querySelectorAll('span')).toHaveLength(1)+ dispose()+ await settle()+ expect(back.hasAttribute('aria-label')).toBe(false)+ expect([...back.childNodes]).toEqual(children)+ expect(back.firstChild).toBe(children[0])+ expect(back.hasAttribute('data-dsh-plugins-back')).toBe(false)+ expect(document.querySelector(styleSelector)).toBeNull()+ fireEvent.click(back)+ expect(view.getByRole('heading', { name: '官方插件', level: 1 })).toBeTruthy()+ })++ it('localizes the visible native button, repairs an upstream rerender and restores the newest upstream label', async () => {+ const { dispose, host } = install()+ const view = render(<Plugins initial="more" title="Unrelated title" />)+ await waitFor(() => expect(view.getByRole('button', { name: '回退' })).toBeTruthy())+ const back = view.getByRole('button', { name: '回退' })+ view.rerender(<Plugins initial="more" title="Unrelated title" backLabel="Back to plugins" />)+ host.change('en')+ await waitFor(() => expect(view.getAllByRole('button', { name: 'Back' })).toHaveLength(1))+ expect(view.getByRole('button', { name: 'Back' })).toBe(back)+ expect(back.textContent).toBe('Back')+ element(back, 'span').remove()+ await waitFor(() => expect(back.querySelectorAll('span')).toHaveLength(1))+ expect(host.listeners.size).toBe(2)++ dispose()+ dispose()+ expect(back.getAttribute('aria-label')).toBe('Back to plugins')+ expect(back.textContent).toBe('')+ expect(back.hasAttribute('data-dsh-plugins-back')).toBe(false)+ expect(back.querySelector('svg')).not.toBeNull()+ expect(host.listeners.size).toBe(0)+ expect(document.querySelector(styleSelector)).toBeNull()+ fireEvent.click(back)+ expect(view.getByRole('heading', { name: '官方插件', level: 1 })).toBeTruthy()+ })++ it('cleans detached buttons on tab switches and patches the next mount once', async () => {+ install()+ const view = renderPanel()+ fireEvent.click(view.getByRole('button', { name: '更多' }))+ await waitFor(() => expect(view.getByRole('button', { name: '回退' })).toBeTruthy())+ const back = view.getByRole('button', { name: '回退' })+ fireEvent.click(view.getByRole('tab', { name: '技能' }))+ await waitFor(() => expect(back.querySelector('span')).toBeNull())+ expect(back.isConnected).toBe(false)+ expect(back.getAttribute('aria-label')).toBe('返回插件')+ expect(back.hasAttribute('data-dsh-plugins-back')).toBe(false)+ fireEvent.click(view.getByRole('tab', { name: '插件' }))+ fireEvent.click(view.getByRole('button', { name: '更多' }))+ await waitFor(() => expect(view.getAllByRole('button', { name: '回退' })).toHaveLength(1))+ expect(view.getByRole('button', { name: '回退' })).not.toBe(back)+ expect(view.getByRole('button', { name: '回退' }).querySelectorAll('span')).toHaveLength(1)+ })++ it('does not infer a subpage from text or touch plugin content and other panels', async () => {+ install()+ const view = render(+ <>+ <section data-plugin-panel>+ <header>+ <button type="button" aria-label="Outside">回退</button>+ <h1>实验性插件</h1>+ </header>+ </section>+ <div data-dsh-extension-plugins>+ <section data-plugin-panel>+ <header>+ <div>+ <h1>实验性插件</h1>+ <p>更多</p>+ </div>+ <div><button type="button" aria-label="Toolbar">回退</button></div>+ </header>+ <section data-plugin-config>+ <header>+ <button type="button" aria-label="Plugin content">回退</button>+ <h1>实验性插件</h1>+ </header>+ </section>+ </section>+ </div>+ </>,+ )+ await settle()+ expect(view.container.querySelector('[data-dsh-plugins-back]')).toBeNull()+ expect(view.getByRole('button', { name: 'Outside' }).textContent).toBe('回退')+ expect(view.getByRole('button', { name: 'Toolbar' }).textContent).toBe('回退')+ expect(view.getByRole('button', { name: 'Plugin content' }).textContent).toBe('回退')+ })++ it('survives five dispose and HMR-style remount cycles without duplicate labels, styles or residual observers', async () => {+ const view = render(<Plugins initial="more" />)+ const back = element<HTMLButtonElement>(view.container, '[data-plugin-panel] > header > button')+ for (let pass = 0; pass < 5; pass++) {+ const { dispose, host } = install()+ await waitFor(() => expect(view.getAllByRole('button', { name: '回退' })).toHaveLength(1))+ view.container.append(document.createElement('div'))+ await settle()+ expect(back.querySelectorAll('span')).toHaveLength(1)+ expect(document.querySelectorAll(styleSelector)).toHaveLength(1)+ expect(document.querySelector(styleSelector)?.getAttribute('data-plugin')).toBe(PANEL_ID)+ dispose()+ expect(back.getAttribute('aria-label')).toBe('返回插件')+ expect(back.hasAttribute('data-dsh-plugins-back')).toBe(false)+ expect(back.querySelector('span')).toBeNull()+ expect(document.querySelector(styleSelector)).toBeNull()+ expect(host.listeners.size).toBe(0)+ view.container.append(document.createElement('div'))+ await settle()+ expect(back.textContent).toBe('')+ expect(back.hasAttribute('data-dsh-plugins-back')).toBe(false)+ }+ })+})diff --git a/packages/dsh-tauri-extension/src/client/register/extension-panel.tsx b/packages/dsh-tauri-extension/src/client/register/extension-panel.tsxindex b3cf604e..cbe253c1 100644--- a/packages/dsh-tauri-extension/src/client/register/extension-panel.tsx+++ b/packages/dsh-tauri-extension/src/client/register/extension-panel.tsx@@ -1,28 +1,16 @@-import type { ClientContext, PanelHandle, SlotRegistry } from 'dsh-tauri/client'+import type { ClientContext, LocaleService, PanelHandle, SlotRegistry } from 'dsh-tauri/client'import type { ReactElement } from 'react'-import { cssr, Icon, IconSparkleRegular, mountStyle, Panel, Puzzle, SlotOutlet } from 'dsh-tauri-ui/client'+import { Icon, IconSparkleRegular, mountStyle, Panel, Puzzle, SlotOutlet } from 'dsh-tauri-ui/client'import { definePanel, defineRegister, hidePanel } from 'dsh-tauri/client'import { useSyncExternalStore } from 'react'import { ExtensionPanel } from '../components/extension-panel'-import { MARKET_SERVICE_NAME, PANEL_ACTION_ORDER, PANEL_ID } from '../constants'+import { MARKET_SERVICE_NAME, PANEL_ACTION_ORDER, PANEL_ID, PLUGINS_MORE_HEADER_SELECTOR } from '../constants'import { locale } from '../locales'import { currentScope, hostsMarketPanel, readMarket } from '../service/market'import { store } from '../store'+import { pluginsStyle } from '../styles/plugins.cssr'import { chooseWorkspace, sessionSnapshotOf, workspaceSnapshotOf } from './extension-panel.utils'-const pluginsStyle = cssr.c([- cssr.c('[data-dsh-extension-plugins]', { position: 'relative' }),- cssr.c('[data-dsh-extension-plugins] > [data-dsh-plugins-icon]', { display: 'none', position: 'absolute', top: '5px', left: 0, width: '22px', height: '22px', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none' }),- cssr.c('[data-dsh-extension-plugins]:has([data-plugin-panel] > header[data-window-drag]) > [data-dsh-plugins-icon]', { display: 'inline-flex' }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel]', { height: 'auto', padding: 0, overflow: 'visible', gap: '14px' }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel] > header[data-window-drag]', { paddingTop: 0, flexWrap: 'wrap', alignItems: 'center', gap: '14px 10px' }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel] > header > div:first-child', { display: 'contents' }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel] > header h1', { margin: 0, paddingLeft: '32px', fontSize: '16px', lineHeight: '24px', fontWeight: 500 }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel] > header > div:first-child > div', { order: 2, width: '100%', margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel] > header > div:last-child', { marginLeft: 'auto' }),- cssr.c('[data-dsh-extension-plugins] [data-plugin-panel] div[data-window-drag]', { paddingTop: '12px' }),-])-export const extensionPanelFeature = defineRegister<ClientContext>((controller, ctx, adapter) => {let panel: PanelHandle | undefinedconst embedMarket = hostsMarketPanel(currentScope())@@ -52,7 +40,52 @@ export const extensionPanelFeature = defineRegister<ClientContext>((controller,}}+ const backButtons = new Map<HTMLButtonElement, { label: HTMLSpanElement, original: string | null, applied: string }>()+ function syncBackButtons(buttons: Iterable<HTMLButtonElement>): void {+ const current = new Set(buttons)+ for (const [button, entry] of backButtons) {+ if (current.has(button))+ continue+ entry.label.remove()+ button.removeAttribute('data-dsh-plugins-back')+ if (button.getAttribute('aria-label') === entry.applied) {+ if (entry.original === null)+ button.removeAttribute('aria-label')+ else+ button.setAttribute('aria-label', entry.original)+ }+ backButtons.delete(button)+ }+ const text = locale.text('pluginsBack')+ for (const button of current) {+ let entry = backButtons.get(button)+ if (entry === undefined) {+ const label = document.createElement('span')+ entry = { label, original: button.getAttribute('aria-label'), applied: text }+ backButtons.set(button, entry)+ }+ else if (button.getAttribute('aria-label') !== entry.applied) {+ entry.original = button.getAttribute('aria-label')+ }+ if (entry.label.textContent !== text)+ entry.label.textContent = text+ if (entry.label.parentElement !== button)+ button.append(entry.label)+ if (!button.hasAttribute('data-dsh-plugins-back'))+ button.setAttribute('data-dsh-plugins-back', '')+ entry.applied = text+ if (button.getAttribute('aria-label') !== text)+ button.setAttribute('aria-label', text)+ }+ }+ const syncBack = (): void => syncBackButtons(document.querySelectorAll<HTMLButtonElement>(`${PLUGINS_MORE_HEADER_SELECTOR} > button:first-child`))controller.add(mountStyle(pluginsStyle, `${PANEL_ID}-plugins`, PANEL_ID))+ controller.observe(document.body, syncBack, { childList: true, subtree: true, attributes: true, attributeFilter: ['aria-label'] })+ const localeService = adapter.service<LocaleService>('locale')+ if (typeof localeService?.subscribe === 'function')+ controller.add(localeService.subscribe(syncBack))+ controller.add(() => syncBackButtons([]))+ syncBack()if (typeof slots?.subscribe === 'function')controller.add(subscribePlugins(syncPlugins))syncPlugins()diff --git a/packages/dsh-tauri-extension/src/client/styles/plugins.cssr.ts b/packages/dsh-tauri-extension/src/client/styles/plugins.cssr.tsnew file mode 100644index 00000000..6b48ee8e--- /dev/null+++ b/packages/dsh-tauri-extension/src/client/styles/plugins.cssr.ts@@ -0,0 +1,25 @@+import { cssr } from 'dsh-tauri-ui/client'+import { PLUGINS_MORE_HEADER_SELECTOR } from '../constants'++const root = '[data-dsh-extension-plugins]'+const page = `${root} [data-plugin-panel]`+const mainHead = `${page} > header:has(> div:first-child > h1)`+const detail = `${page} > :is([data-plugin-item-detail], [data-plugin-detail], [data-plugin-row-detail])`++export const pluginsStyle = cssr.c([+ cssr.c(root, { position: 'relative' }),+ cssr.c(`${root} > [data-dsh-plugins-icon]`, { display: 'none', position: 'absolute', top: '5px', left: 0, width: '22px', height: '22px', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none' }),+ cssr.c(`${root}:has([data-plugin-panel] > header > div:first-child > h1) > [data-dsh-plugins-icon]`, { display: 'inline-flex' }),+ cssr.c(page, { height: 'auto', padding: 0, overflow: 'visible', gap: '14px' }),+ cssr.c(`${page} > div:has(> [role="tablist"])`, { marginTop: 0 }),+ cssr.c(mainHead, { paddingTop: 0, flexWrap: 'wrap', alignItems: 'center', gap: '14px 10px' }),+ cssr.c(`${mainHead} > div:first-child`, { display: 'contents' }),+ cssr.c(`${mainHead} > div:first-child > h1`, { margin: 0, paddingLeft: '32px', fontSize: '16px', lineHeight: '24px', fontWeight: 500 }),+ cssr.c(`${mainHead} > div:first-child > :is(p, div)`, { order: 2, width: '100%', margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }),+ cssr.c(`${mainHead} > div:last-child`, { marginLeft: 'auto' }),+ cssr.c(PLUGINS_MORE_HEADER_SELECTOR, { display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: '10px', paddingTop: 0 }),+ cssr.c(`${PLUGINS_MORE_HEADER_SELECTOR} > button:first-child`, { display: 'inline-flex', flex: '0 0 auto', alignItems: 'center', justifyContent: 'center', gap: '4px', width: 'auto', minWidth: '28px', padding: '0 6px', whiteSpace: 'nowrap', WebkitAppRegion: 'no-drag' }),+ cssr.c(`${PLUGINS_MORE_HEADER_SELECTOR} > h1`, { flex: '1 1 0', minWidth: 0, margin: 0, padding: 0, fontSize: '16px', lineHeight: '24px', fontWeight: 500 }),+ cssr.c(`${detail} > div[data-window-drag]:first-child`, { paddingTop: '12px' }),+ cssr.c(`${detail} > button:first-child`, { marginTop: '12px' }),+])diff --git a/packages/dsh-tauri-kernel/package.json b/packages/dsh-tauri-kernel/package.jsonindex edbc14b6..48e6c5f8 100644--- a/packages/dsh-tauri-kernel/package.json+++ b/packages/dsh-tauri-kernel/package.json@@ -18,6 +18,9 @@"module": "./dist/index.js","types": "./dist/index.d.ts","files": ["cordis.patch.yml", "dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-kernel/src/client/service/kernel-version.test.ts b/packages/dsh-tauri-kernel/src/client/service/kernel-version.test.tsindex bdeb9c8b..c20f239c 100644--- a/packages/dsh-tauri-kernel/src/client/service/kernel-version.test.ts+++ b/packages/dsh-tauri-kernel/src/client/service/kernel-version.test.ts@@ -7,12 +7,14 @@ const codex = (patch: Partial<BackendDetection> = {}): BackendDetection => ({ iddescribe('kernel core version gate', () => {it.each([+ ['0.1.7-rc.1', false],['0.2.0', false],['0.2.1-alpha.1', false],['0.2.1-alpha.2', true],['0.2.1-alpha.2+build.7', true],['0.2.1-alpha.10', true],['0.2.1-beta.1', true],+ ['0.2.1-rc.1', true],['0.2.1', true],['0.2.2-alpha.1', true],['0.3.0-alpha.1', true],diff --git a/packages/dsh-tauri-kernel/src/host/apply.test.ts b/packages/dsh-tauri-kernel/src/host/apply.test.tsindex 720b24bc..e7132dd8 100644--- a/packages/dsh-tauri-kernel/src/host/apply.test.ts+++ b/packages/dsh-tauri-kernel/src/host/apply.test.ts@@ -3,6 +3,7 @@ import type { WebRoute } from '@deepseek-ai/dsh-host-webserver'import type { HostContext, NativeEntry, PlatformLoader } from './types'import { Context } from '@deepseek-ai/cordis'import * as llmModule from '@deepseek-ai/dsh-llm'+import * as sessionModule from '@deepseek-ai/dsh-session'import { SessionProjectionRegistry } from '@deepseek-ai/dsh-session-projection'import { getServerContext } from 'dsh-h3/utils'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'@@ -11,9 +12,6 @@ import { apply } from './apply'import { resetRuntime, runtime } from './config/runtime'import { server } from './server'-const packageId: string = 'dsh-session-current'-const sessionModule = await import(packageId) as typeof import('@deepseek-ai/dsh-session')-function deferred<T>() {let resolve!: (value: T | PromiseLike<T>) => voidconst promise = new Promise<T>((accept) => {diff --git a/packages/dsh-tauri-kernel/src/host/server/index.test.ts b/packages/dsh-tauri-kernel/src/host/server/index.test.tsindex 168404fe..98fb165f 100644--- a/packages/dsh-tauri-kernel/src/host/server/index.test.ts+++ b/packages/dsh-tauri-kernel/src/host/server/index.test.ts@@ -7,7 +7,7 @@ import type { AddressInfo } from 'node:net'import type { NativeModelCatalog } from '../../shared/native-model'import type { BackendDetection } from '../../shared/types'import type { NativeSession } from '../backends/types'-import type { HostContext, PlatformLoader, RuntimeModules } from '../types'+import type { HostContext, PlatformLoader } from '../types'import { createServer } from 'node:http'import { createRequire } from 'node:module'import { join } from 'node:path'@@ -18,7 +18,7 @@ import { AgentRegistry } from '@deepseek-ai/dsh-agent'import { AgentDefaultModelConfig } from '@deepseek-ai/dsh-agent-default-model'import { AgentLoop } from '@deepseek-ai/dsh-agent-loop'import * as llmModule from '@deepseek-ai/dsh-llm'-import * as legacySessionModule from '@deepseek-ai/dsh-session'+import * as sessionModule from '@deepseek-ai/dsh-session'import { assertContiguous, materializeAppendBatch, materializeCreateHeader, SessionPersistence, SessionPersistenceRevision, validateStoredEvents } from '@deepseek-ai/dsh-session-persistence'import { SessionProjectionRegistry } from '@deepseek-ai/dsh-session-projection'import { ToolRuntime } from '@deepseek-ai/dsh-tools'@@ -38,8 +38,6 @@ vi.mock('../utils/detection', () => ({ detectBackend: vi.fn() }))vi.mock('../backends/codex', () => ({ createCodexSession: vi.fn() }))vi.mock('../backends/claude', () => ({ createClaudeSession: vi.fn() }))-const packageId: string = 'dsh-session-current'-const sessionModule = await import(packageId) as typeof legacySessionModule & Pick<RuntimeModules, 'appendPluginRecord' | 'pluginRecordOf'>const require = createRequire(import.meta.url)const coreRequire = createRequire(require.resolve('@deepseek-ai/dsh-agent-loop'))const promptModule: { SystemPrompt: new (ctx: Context, config: { includeHarnessIdentity: boolean, includeRuntimeContext: boolean }) => Context['systemPrompt'] } = await import(pathToFileURL(coreRequire.resolve('@deepseek-ai/dsh-system-prompt')).href)@@ -159,7 +157,7 @@ let llm: llmModule.LlmRuntimelet persistence: MemoryPersistencelet http: Server | undefinedlet rejection: 401 | 403 | undefined-let runtimeSession: typeof legacySessionModule+let runtimeSession: unknownlet runtimeBoot: unknownlet registered: Map<string, WebRoute>let requestRejection: ReturnType<typeof vi.fn<(request: IncomingMessage) => 401 | 403 | undefined>>@@ -343,16 +341,17 @@ describe('exported bridge plugin HTTP dependency boundary', () => {})it('reports the official runtime version so the client can gate on it', async () => {- runtimeBoot = { getDshRuntimeVersion: () => '0.2.1-alpha.2' }+ runtimeBoot = { getDshRuntimeVersion: () => '0.2.1-rc.1' }const base = await start()const response = await fetch(`${base}/api/tauri/bridge/backends`)expect(response.status).toBe(200)const payload = await response.json() as Array<Record<string, unknown>>- expect(payload[0]).toEqual({ ...dsh, version: '0.2.1-alpha.2' })+ expect(payload[0]).toEqual({ ...dsh, version: '0.2.1-rc.1' })})it('retains CLI installation status while marking the bridge unavailable when official record support is absent', async () => {- runtimeSession = legacySessionModule+ const { appendPluginRecord: _appendPluginRecord, pluginRecordOf: _pluginRecordOf, ...withoutPluginRecords } = sessionModule+ runtimeSession = withoutPluginRecordsconst base = await start()const response = await fetch(`${base}/api/tauri/bridge/backends`)expect(response.status).toBe(200)diff --git a/packages/dsh-tauri-kernel/src/host/service/identity-write.test.ts b/packages/dsh-tauri-kernel/src/host/service/identity-write.test.tsindex faa26d69..a5cc6be9 100644--- a/packages/dsh-tauri-kernel/src/host/service/identity-write.test.ts+++ b/packages/dsh-tauri-kernel/src/host/service/identity-write.test.ts@@ -1,10 +1,10 @@import type { Agent } from '@deepseek-ai/dsh-agent'import type { Session as OfficialSession, SessionStore as OfficialSessionStore, SessionEvent } from '@deepseek-ai/dsh-session'import type { KernelBinding } from '../../shared/types'-import type { HostContext, PlatformLoader, RuntimeModules } from '../types'+import type { HostContext, PlatformLoader } from '../types'import { Context } from '@deepseek-ai/cordis'import * as llmModule from '@deepseek-ai/dsh-llm'-import { SessionLogOffset } from '@deepseek-ai/dsh-session'+import * as sessionModule from '@deepseek-ai/dsh-session'import { SessionProjectionRegistry } from '@deepseek-ai/dsh-session-projection'import { getServerContext } from 'dsh-h3/utils'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'@@ -16,9 +16,7 @@ import { identity } from './identity'vi.mock('dsh-h3/utils', () => ({ getServerContext: vi.fn() }))vi.mock('../server', () => ({ server: vi.fn() }))-const currentSessionPackage: string = 'dsh-session-current'-const sessionModule = await import(currentSessionPackage) as unknown as typeof import('@deepseek-ai/dsh-session') & Required<Pick<RuntimeModules, 'appendPluginRecord' | 'pluginRecordOf'>>-const { Session, SessionId, SessionStore } = sessionModule+const { Session, SessionId, SessionLogOffset, SessionStore } = sessionModuleconst binding: KernelBinding = { backend: 'codex', nativeSessionId: 'native-a', sessionId: 'session-a' }let context: Contextlet sessions: OfficialSessionStorediff --git a/packages/dsh-tauri-kernel/src/host/service/identity.test.ts b/packages/dsh-tauri-kernel/src/host/service/identity.test.tsindex 49d26456..df6b792c 100644--- a/packages/dsh-tauri-kernel/src/host/service/identity.test.ts+++ b/packages/dsh-tauri-kernel/src/host/service/identity.test.ts@@ -337,14 +337,12 @@ describe('official kernel identity projection', () => {expect(() => identity.resolve(agentOf(session))).toThrow('BRIDGE_CORE_UNAVAILABLE')})- it('fails before any append when the actual alpha official module lacks the plugin record writer', async () => {+ it.each(['appendPluginRecord', 'pluginRecordOf'] as const)('fails before any append when the host lacks %s', async (missing) => {await identity.register()- vi.mocked(loader.import).mockClear()+ vi.mocked(loader.import).mockImplementation(async id => id === 'zod' ? zodModule : id === '@deepseek-ai/dsh-llm' ? llmModule : { ...sessionModule, [missing]: undefined })const session = Session.create(SessionId('session-a'))const append = vi.spyOn(session, 'append')const before = session.seq- expect(Reflect.get(sessionModule, 'appendPluginRecord')).toBeUndefined()- expect(Reflect.get(sessionModule, 'pluginRecordOf')).toBeUndefined()await expect(identity.append(agentOf(session), binding)).rejects.toThrow('BRIDGE_CORE_UNAVAILABLE')expect(session.seq).toBe(before)expect(append).not.toHaveBeenCalled()diff --git a/packages/dsh-tauri-kernel/src/host/service/model.test.ts b/packages/dsh-tauri-kernel/src/host/service/model.test.tsindex 9b08035c..2c5013f5 100644--- a/packages/dsh-tauri-kernel/src/host/service/model.test.ts+++ b/packages/dsh-tauri-kernel/src/host/service/model.test.ts@@ -4,7 +4,7 @@ import type { Session, SessionEvent } from '@deepseek-ai/dsh-session'import type { SessionHandle } from '@deepseek-ai/dsh-session-persistence'import type { NativeModelCatalog, NativeTurnOptions } from '../../shared/native-model'import type { NativeSession } from '../backends/types'-import type { HostContext, PlatformLoader, RuntimeModules } from '../types'+import type { HostContext, PlatformLoader } from '../types'import { createRequire } from 'node:module'import process from 'node:process'import { pathToFileURL } from 'node:url'@@ -13,6 +13,7 @@ import { AgentRegistry } from '@deepseek-ai/dsh-agent'import { AgentDefaultModelConfig } from '@deepseek-ai/dsh-agent-default-model'import { AgentLoop } from '@deepseek-ai/dsh-agent-loop'import * as llmModule from '@deepseek-ai/dsh-llm'+import * as sessionModule from '@deepseek-ai/dsh-session'import { assertContiguous, materializeAppendBatch, materializeCreateHeader, SessionPersistence, SessionPersistenceRevision, validateStoredEvents } from '@deepseek-ai/dsh-session-persistence'import { SessionProjectionRegistry } from '@deepseek-ai/dsh-session-projection'import { ToolRuntime } from '@deepseek-ai/dsh-tools'@@ -31,8 +32,6 @@ vi.mock('../utils/detection', () => ({ detectBackend: vi.fn() }))vi.mock('../backends/codex', () => ({ createCodexSession: vi.fn() }))vi.mock('../backends/claude', () => ({ createClaudeSession: vi.fn() }))-const packageId: string = 'dsh-session-current'-const sessionModule = await import(packageId) as typeof import('@deepseek-ai/dsh-session') & Pick<RuntimeModules, 'appendPluginRecord' | 'pluginRecordOf'>const require = createRequire(import.meta.url)const coreRequire = createRequire(require.resolve('@deepseek-ai/dsh-agent-loop'))const promptModule: { SystemPrompt: new (ctx: Context, config: { includeHarnessIdentity: boolean, includeRuntimeContext: boolean }) => Context['systemPrompt'] } = await import(pathToFileURL(coreRequire.resolve('@deepseek-ai/dsh-system-prompt')).href)diff --git a/packages/dsh-tauri-kernel/src/host/service/session.test.ts b/packages/dsh-tauri-kernel/src/host/service/session.test.tsindex 92603f20..ffe6a1a4 100644--- a/packages/dsh-tauri-kernel/src/host/service/session.test.ts+++ b/packages/dsh-tauri-kernel/src/host/service/session.test.ts@@ -4,7 +4,7 @@ import type { Session, SessionEvent } from '@deepseek-ai/dsh-session'import type { SessionHandle } from '@deepseek-ai/dsh-session-persistence'import type { ToolDefinition } from '@deepseek-ai/dsh-tools'import type { NativeSession } from '../backends/types'-import type { HostContext, PlatformLoader, RuntimeModules } from '../types'+import type { HostContext, PlatformLoader } from '../types'import type { DetectedCommand } from '../utils/detection'import { createRequire } from 'node:module'import { join } from 'node:path'@@ -15,6 +15,7 @@ import { AgentRegistry } from '@deepseek-ai/dsh-agent'import { AgentLoop } from '@deepseek-ai/dsh-agent-loop'import * as llmModule from '@deepseek-ai/dsh-llm'import { PermissionPresetService } from '@deepseek-ai/dsh-permission-presets'+import * as sessionModule from '@deepseek-ai/dsh-session'import { assertContiguous, materializeAppendBatch, materializeCreateHeader, SessionPersistence, SessionPersistenceRevision, validateStoredEvents } from '@deepseek-ai/dsh-session-persistence'import { SessionProjectionRegistry } from '@deepseek-ai/dsh-session-projection'import { ToolRuntime } from '@deepseek-ai/dsh-tools'@@ -35,8 +36,6 @@ vi.mock('../utils/detection', () => ({ detectBackend: vi.fn() }))vi.mock('../backends/codex', () => ({ createCodexSession: vi.fn() }))vi.mock('../backends/claude', () => ({ createClaudeSession: vi.fn() }))-const packageId: string = 'dsh-session-current'-const sessionModule = await import(packageId) as typeof import('@deepseek-ai/dsh-session') & Pick<RuntimeModules, 'appendPluginRecord' | 'pluginRecordOf'>const require = createRequire(import.meta.url)const coreRequire = createRequire(require.resolve('@deepseek-ai/dsh-agent-loop'))const { sessionFormatCatalog } = await import(pathToFileURL(coreRequire.resolve('@deepseek-ai/dsh-session-format-catalog')).href)diff --git a/packages/dsh-tauri-kernel/src/host/service/sink.test.ts b/packages/dsh-tauri-kernel/src/host/service/sink.test.tsindex e7d6eac0..a74bc4ab 100644--- a/packages/dsh-tauri-kernel/src/host/service/sink.test.ts+++ b/packages/dsh-tauri-kernel/src/host/service/sink.test.ts@@ -6,7 +6,7 @@ import type { PostToolDecision, ToolExecution, ToolExecutionResult } from '@deepimport type { ApprovalRequest } from '@deepseek-ai/dsh-user-approval'import type { AskUserQuestionRequest } from '@deepseek-ai/dsh-user-questions'import type { NativeSession, NativeSink } from '../backends/types'-import type { HostContext, NativeExecution, PlatformLoader, RuntimeModules } from '../types'+import type { HostContext, NativeExecution, PlatformLoader } from '../types'import type { OfficialSink } from './sink.types'import { createRequire } from 'node:module'import process from 'node:process'@@ -15,6 +15,7 @@ import { Context } from '@deepseek-ai/cordis'import { AgentRegistry } from '@deepseek-ai/dsh-agent'import { AgentLoop } from '@deepseek-ai/dsh-agent-loop'import * as llmModule from '@deepseek-ai/dsh-llm'+import * as sessionModule from '@deepseek-ai/dsh-session'import { SessionProjectionRegistry } from '@deepseek-ai/dsh-session-projection'import { ToolRuntime } from '@deepseek-ai/dsh-tools'import { ApprovalService } from '@deepseek-ai/dsh-user-approval'@@ -30,8 +31,6 @@ import { identity } from './identity'import { session as bridgeSession } from './session'import { sink } from './sink'-const currentPackage: string = 'dsh-session-current'-const sessionModule = await import(currentPackage) as unknown as typeof import('@deepseek-ai/dsh-session') & Required<Pick<RuntimeModules, 'appendPluginRecord' | 'pluginRecordOf'>>const require = createRequire(import.meta.url)const loopRequire = createRequire(require.resolve('@deepseek-ai/dsh-agent-loop'))const promptModule: { SystemPrompt: new (ctx: Context, options: { includeHarnessIdentity: boolean, includeRuntimeContext: boolean }) => Context['systemPrompt'] } = await import(pathToFileURL(loopRequire.resolve('@deepseek-ai/dsh-system-prompt')).href)diff --git a/packages/dsh-tauri-kernel/src/host/utils/runtime-version.test.ts b/packages/dsh-tauri-kernel/src/host/utils/runtime-version.test.tsindex 1c65a609..523775f5 100644--- a/packages/dsh-tauri-kernel/src/host/utils/runtime-version.test.ts+++ b/packages/dsh-tauri-kernel/src/host/utils/runtime-version.test.ts@@ -8,13 +8,13 @@ function loader(value: (id: string) => unknown, unwrap: PlatformLoader['unwrapExdescribe('host runtime version probe', () => {it('reads the official runtime version through the loader', async () => {- const runtime = vi.fn(() => '0.2.1-alpha.2')- expect(await runtimeVersion(loader(() => ({ getDshRuntimeVersion: runtime })))).toBe('0.2.1-alpha.2')+ const runtime = vi.fn(() => '0.2.1-rc.1')+ expect(await runtimeVersion(loader(() => ({ getDshRuntimeVersion: runtime })))).toBe('0.2.1-rc.1')expect(runtime).toHaveBeenCalledOnce()})it('accepts a loader whose module namespace needs unwrapping', async () => {- expect(await runtimeVersion(loader(() => ({ default: {} }), () => ({ getDshRuntimeVersion: () => '0.2.1-alpha.2' })))).toBe('0.2.1-alpha.2')+ expect(await runtimeVersion(loader(() => ({ default: {} }), () => ({ getDshRuntimeVersion: () => '0.2.1-rc.1' })))).toBe('0.2.1-rc.1')})it.each([diff --git a/packages/dsh-tauri-kernel/src/shared/types.ts b/packages/dsh-tauri-kernel/src/shared/types.tsindex 2d3d883f..b02a4f16 100644--- a/packages/dsh-tauri-kernel/src/shared/types.ts+++ b/packages/dsh-tauri-kernel/src/shared/types.ts@@ -25,6 +25,13 @@ export interface KernelProjectionState {readonly binding: KernelBinding | null}+declare module '@deepseek-ai/dsh-session/types' {+ interface PluginRecordMap {+ 'plugin:dsh-tauri-kernel/kernel': KernelBinding+ 'plugin:dsh-tauri-kernel/model': NativeTurnOptions+ }+}+declare module '@deepseek-ai/dsh-session-projection/types' {interface SessionProjectionMap {bridgeModel: NativeTurnOptionsdiff --git a/packages/dsh-tauri-mobile-ui/package.json b/packages/dsh-tauri-mobile-ui/package.jsonindex 7742190a..a22b3658 100644--- a/packages/dsh-tauri-mobile-ui/package.json+++ b/packages/dsh-tauri-mobile-ui/package.json@@ -22,6 +22,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-model/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-model/THIRD_PARTY_NOTICES.mdindex 72baa8cf..4c4c53d1 100644--- a/packages/dsh-tauri-model/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-model/THIRD_PARTY_NOTICES.md@@ -3,9 +3,11 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.- License: MIT — Copyright (c) 2026 DeepSeekDerived (upstream `packages/client/ui-settings-models/` → this package `src/`):@@ -49,7 +51,7 @@ Re-implemented instead of copied:- Styling runs on this repo's `css-render` stack (`client/models/styles.ts`, `client/models/styles.overrides.ts`); upstream `.module.css` files are not copied.- `client/register/styles.ts`, `client/models/remote.ts`, `client/models/settings-forms.ts`, `client/types/remotes.ts`, `client/constants/index.ts` are this repo's own glue.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The derived `packages/client/ui-settings-models/src/` tree is byte-for-byte unchanged across this corridor, including onboarding, credential events, provider forms, model compatibility fields, and slots.- The new Cordis release needs its matching Include, Loader, and Group peers. They are pinned in the workspace so the fork shares the same augmented `Context` as the official client packages.diff --git a/packages/dsh-tauri-model/package.json b/packages/dsh-tauri-model/package.jsonindex 7eb266cf..44bf4223 100644--- a/packages/dsh-tauri-model/package.json+++ b/packages/dsh-tauri-model/package.json@@ -37,6 +37,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-notification/package.json b/packages/dsh-tauri-notification/package.jsonindex 51461f9d..9ae98fdf 100644--- a/packages/dsh-tauri-notification/package.json+++ b/packages/dsh-tauri-notification/package.json@@ -32,6 +32,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.mdindex da308fba..78c27bab 100644--- a/packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-pet/THIRD_PARTY_NOTICES.md@@ -3,9 +3,11 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: the plugin mounts an official provider and consumes official client contracts.@@ -42,7 +44,7 @@ Integration points:- `source/dsh-pet`: reference copy at `4c097297ca773abb173198b1384b3a11dcf89409`, not the source of the play-time assets above.- `QCYTSN/dsh-dafeiyu`: referenced for text and status-priority behaviour only; no sprite or `legacy/` assets are bundled, downloaded or redistributed (see [`docs/sync-log.md`](./docs/sync-log.md)). Its own art was replaced upstream in `v0.1.10` by assets imported from `PC2005-cloud/dsh-pet`.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The skill provider, account-menu geometry, workspace list, and official primitives entry points remain compatible. The StateDot animation restart fix arrives through the official re-export.- Asset pins and third-party pet implementations are independent of this Harness compatibility baseline and are not advanced.diff --git a/packages/dsh-tauri-pet/package.json b/packages/dsh-tauri-pet/package.jsonindex 0571953f..d58c8c59 100644--- a/packages/dsh-tauri-pet/package.json+++ b/packages/dsh-tauri-pet/package.json@@ -34,6 +34,9 @@"dist","skills"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-remote/package.json b/packages/dsh-tauri-remote/package.jsonindex c687b8c4..92c30817 100644--- a/packages/dsh-tauri-remote/package.json+++ b/packages/dsh-tauri-remote/package.json@@ -35,6 +35,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [@@ -68,6 +71,7 @@"h3": "catalog:","pathe": "catalog:utils","schemastery": "catalog:utils",+ "semver": "catalog:runtime","ssh2": "catalog:utils","yaml": "catalog:testing"},@@ -78,6 +82,7 @@"@types/qrcode": "catalog:types","@types/react": "catalog:types","@types/react-dom": "catalog:types",+ "@types/semver": "catalog:types","@types/ssh2": "catalog:types","dsh-tauri-tsdown": "workspace:*","jsdom": "catalog:testing",diff --git a/packages/dsh-tauri-remote/src/host/apply.test.ts b/packages/dsh-tauri-remote/src/host/apply.test.tsindex fc84031d..8ee697cc 100644--- a/packages/dsh-tauri-remote/src/host/apply.test.ts+++ b/packages/dsh-tauri-remote/src/host/apply.test.ts@@ -269,10 +269,10 @@ describe('remote plugin', () => {it('forwards installs to the manager', async () => {const { service } = await boot()const install = vi.spyOn(service, 'install')- .mockResolvedValue({ installed: ['node'], dshRef: 'dsh-0.1.2-rc.1-1', dshVersion: '0.1.2-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true })+ .mockResolvedValue({ installed: ['node'], dshRef: 'dsh-0.2.1-rc.1-39009013600', dshVersion: '0.2.1-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true })const result = await service.install(MachineId('a'), undefined)expect(install).toHaveBeenCalledWith(MachineId('a'), undefined)- expect(result).toEqual({ installed: ['node'], dshRef: 'dsh-0.1.2-rc.1-1', dshVersion: '0.1.2-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true })+ expect(result).toEqual({ installed: ['node'], dshRef: 'dsh-0.2.1-rc.1-39009013600', dshVersion: '0.2.1-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true })})it('saves a machine into the state document and refreshes the manager', async () => {diff --git a/packages/dsh-tauri-remote/src/host/server/index.test.ts b/packages/dsh-tauri-remote/src/host/server/index.test.tsindex a77832a6..82d18199 100644--- a/packages/dsh-tauri-remote/src/host/server/index.test.ts+++ b/packages/dsh-tauri-remote/src/host/server/index.test.ts@@ -92,7 +92,7 @@ function fakeHost(overrides: Partial<HostFakes> = {}): HostFakes {test: async (): Promise<RemoteTestResult> => ({ ok: true, banner: 'Linux alpha' }),connect: async (machineId): Promise<{ machineId: MachineId, tunnelBaseUrl: string }> => ({ machineId, tunnelBaseUrl: 'http://127.0.0.1:45678' }),disconnect: async () => {},- install: async () => ({ installed: ['node'], dshRef: 'dsh-0.1.2-rc.1-1', dshVersion: '0.1.2-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true }),+ install: async () => ({ installed: ['node'], dshRef: 'dsh-0.2.1-rc.1-39009013600', dshVersion: '0.2.1-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true }),events: (machineId, sinceSeq) => readEvents(machineId, sinceSeq),save: async () => {},remove: async () => {},@@ -617,14 +617,14 @@ describe('ssh REST handlers', () => {})it('installs dsh on a machine and returns the outcome', async () => {- const install = vi.fn(async () => ({ installed: ['node'], dshRef: 'dsh-0.1.2-rc.1-1', dshVersion: '0.1.2-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true }))+ const install = vi.fn(async () => ({ installed: ['node'], dshRef: 'dsh-0.2.1-rc.1-39009013600', dshVersion: '0.2.1-rc.1', dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js', credentialsCopied: true }))installHost(fakeHost({ install }))const reply = await call<RemoteInstallResponse>('POST', `${BASE}/machines/install`, { machineId: 'm1' })expect(reply.status).toBe(200)expect(reply.body).toEqual({installed: ['node'],- dshRef: 'dsh-0.1.2-rc.1-1',- dshVersion: '0.1.2-rc.1',+ dshRef: 'dsh-0.2.1-rc.1-39009013600',+ dshVersion: '0.2.1-rc.1',dshPath: '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js',credentialsCopied: true,})diff --git a/packages/dsh-tauri-remote/src/host/service/bootstrap.baseline.test.ts b/packages/dsh-tauri-remote/src/host/service/bootstrap.baseline.test.tsnew file mode 100644index 00000000..ed5eb9fd--- /dev/null+++ b/packages/dsh-tauri-remote/src/host/service/bootstrap.baseline.test.ts@@ -0,0 +1,150 @@+import type { Config } from '../config/schema'+import type { MachineProfile, RemoteExecResult, RemoteSession } from '../types/index'+import type { RemoteInstallPlan } from './bootstrap.types'+import { afterEach, describe, expect, it, vi } from 'vitest'+import { MachineId } from '../types/index'+import { FALLBACK_DSH_TAG, RECOMMENDED_DSH_VERSION } from '../utils/version'+import { assertRemoteDshVersion, buildInstallScript, ensureRemoteInstance, planRemoteInstall, runInstallScript, startCommandFor } from './bootstrap.utils'++const profile: MachineProfile = { id: MachineId('baseline'), name: 'baseline', host: 'fixture.invalid', port: 22, user: 'fixture', remotePort: 3080 }+const config: Config = {+ connectTimeoutMs: 100,+ healthCheckTimeoutMs: 100,+ healthPollIntervalMs: 1,+ healthPollAttempts: 1,+ keepaliveIntervalMs: 100,+ keepaliveCountMax: 1,+ reconnectInitialDelayMs: 1,+ reconnectMaxDelayMs: 1,+ reconnectMaxAttempts: 1,+}+const releases = [{ tag: 'dsh-0.2.1-rc.1-39009013600', prerelease: false }]+const bootHtml = '<script>globalThis["__DSH_BOOT__"] = {"release":{"version":"0.1.7-rc.0"},"entries":[{"url":"/plugins/layout/client.js"}]};</script>'++function fetchers() {+ return {+ listReleases: vi.fn(async () => releases),+ listAssets: vi.fn(async () => []),+ npmDist: vi.fn(async () => ({ url: 'https://fixture.invalid/dsh.tgz', mirrorUrl: 'https://fixture.invalid/mirror.tgz' })),+ }+}++function fakeSession(respond: (command: string) => RemoteExecResult): RemoteSession & { commands: string[] } {+ const commands: string[] = []+ return {+ commands,+ exec: async (command) => {+ commands.push(command)+ return respond(command)+ },+ stream: async () => { throw new Error('unexpected stream') },+ close: async () => {},+ onClosed: () => {},+ }+}++afterEach(() => vi.unstubAllGlobals())++describe('remote DSH baseline', () => {+ it('uses the manifest recommendation and verified offline fallback', async () => {+ expect(RECOMMENDED_DSH_VERSION).toBe('0.2.1-rc.1')+ expect(FALLBACK_DSH_TAG).toBe('dsh-0.2.1-rc.1-39009013600')+ const plan = await planRemoteInstall('Linux x86_64', {}, fetchers())+ expect(plan.dshVersion).toBe('0.2.1-rc.1')+ expect(plan.dsh).toMatchObject({ tag: 'dsh-0.2.1-rc.1-39009013600' })+ })++ it.each(['0.1.2-rc.1', '0.1.7-rc.0', 'dsh-0.1.6-rc.9-42', 'dsh-0.1.7-rc.0-42', 'dsh-invalid-42'])(+ 'rejects unsupported pin %s before metadata requests',+ async (installRef) => {+ const mocks = fetchers()+ await expect(planRemoteInstall('Linux x86_64', { installRef }, mocks)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED.*0\.1\.7-rc\.1/)+ expect(mocks.listReleases).not.toHaveBeenCalled()+ expect(mocks.listAssets).not.toHaveBeenCalled()+ expect(mocks.npmDist).not.toHaveBeenCalled()+ },+ )++ it.each(['0.1.7-rc.1', '0.1.7-rc.2', '0.1.7', '0.1.8-alpha.1', '0.2.1-rc.1'])(+ 'admits supported prerelease boundary %s',+ async (version) => {+ const mocks = fetchers()+ mocks.listReleases.mockResolvedValue([{ tag: `dsh-${version}-42`, prerelease: false }])+ const plan = await planRemoteInstall('Linux aarch64', { installRef: version }, mocks)+ expect(plan.dshVersion).toBe(version)+ expect(mocks.npmDist).toHaveBeenCalledWith('@deepseek-ai/dsh', version)+ },+ )++ it.each(['Linux x86_64', 'Linux aarch64'])('rejects an obsolete stable resolution on %s before asset requests', async (uname) => {+ const mocks = fetchers()+ mocks.listReleases.mockResolvedValue([{ tag: 'dsh-0.1.2-rc.1-33729514615', prerelease: false }])+ await expect(planRemoteInstall(uname, {}, mocks)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ expect(mocks.listAssets).not.toHaveBeenCalled()+ expect(mocks.npmDist).not.toHaveBeenCalled()+ })++ it('rejects stale or forged plans before any remote installation or launch', async () => {+ const valid = await planRemoteInstall('Linux x86_64', {}, fetchers())+ const stale: RemoteInstallPlan = { ...valid, dshVersion: '0.1.7-rc.0', dsh: { ...valid.dsh, tag: 'dsh-0.1.7-rc.0-42' } as RemoteInstallPlan['dsh'] }+ const session = fakeSession(() => {+ throw new Error('must not execute')+ })+ expect(() => buildInstallScript(stale)).toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ expect(() => startCommandFor(profile, stale)).toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ await expect(runInstallScript(session, stale, 100, {})).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ expect(session.commands).toEqual([])+ })++ it.each(['0.1.2-rc.1', '0.1.7-rc.0', 'unknown'])('does not run existing unsupported managed runtime %s', async (version) => {+ vi.stubGlobal('fetch', vi.fn(async () => ({ ok: true, json: async () => releases.map(item => ({ tag_name: item.tag, prerelease: false })) })))+ const session = fakeSession((command) => {+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return { code: 0, stdout: JSON.stringify({ version }), stderr: '' }+ if (command === 'uname -srm')+ return { code: 0, stdout: 'Linux x86_64', stderr: '' }+ if (command.includes('echo node'))+ return { code: 0, stdout: '', stderr: '' }+ if (command.includes('dsh-remote.pid'))+ return { code: 0, stdout: '', stderr: '' }+ return { code: 7, stdout: '', stderr: '' }+ })+ const events = vi.fn()+ await expect(ensureRemoteInstance(session, profile, config, { onEvent: events })).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ expect(session.commands.some(command => command.includes('dsh-remote.pid'))).toBe(false)+ expect(session.commands.some(command => command.includes('trap cleanup EXIT'))).toBe(false)+ expect(events).toHaveBeenCalledWith('failed', 'bootstrap 失败', expect.objectContaining({ terminal: 'failed' }))+ })++ it.each(['0.1.7-rc.1', '0.1.7-rc.2', '0.1.7', '0.1.8-alpha.1', '0.2.1-rc.1'])('accepts installed package metadata at or above floor: %s', async (version) => {+ const session = fakeSession(() => ({ code: 0, stdout: JSON.stringify({ version }), stderr: '' }))+ await expect(assertRemoteDshVersion(session)).resolves.toBeUndefined()+ expect(session.commands[0]).toContain('node_modules/@deepseek-ai/dsh/package.json')+ expect(session.commands[0]).toContain('dependencies/dsh/package.json')+ expect(session.commands[0]).not.toContain('--version')+ })++ it.each(['{}', '{"version":123}', 'invalid', '{"version":"0.1.7-rc.0"}'])('rejects unreadable or unsupported installed package metadata: %s', async (stdout) => {+ const session = fakeSession(() => ({ code: 0, stdout, stderr: '' }))+ await expect(assertRemoteDshVersion(session, true)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ })++ it('allows only a confirmed missing runtime when probing a fresh machine', async () => {+ const session = fakeSession(() => ({ code: 0, stdout: 'REMOTE_DSH_MISSING\n', stderr: '' }))+ await expect(assertRemoteDshVersion(session, true)).resolves.toBeUndefined()+ await expect(assertRemoteDshVersion(session)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ const failed = fakeSession(() => ({ code: 1, stdout: 'REMOTE_DSH_MISSING', stderr: 'denied' }))+ await expect(assertRemoteDshVersion(failed, true)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ })++ it('does not accept a running old managed instance even with a valid boot graph', async () => {+ const session = fakeSession((command) => {+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return { code: 0, stdout: '{"version":"0.1.2-rc.1"}', stderr: '' }+ if (command.includes('-w'))+ return { code: 0, stdout: 'console.log(1)\n200', stderr: '' }+ return { code: 0, stdout: bootHtml, stderr: '' }+ })+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ })+})diff --git a/packages/dsh-tauri-remote/src/host/service/bootstrap.e2e.test.ts b/packages/dsh-tauri-remote/src/host/service/bootstrap.e2e.test.tsdeleted file mode 100644index f7b81654..00000000--- a/packages/dsh-tauri-remote/src/host/service/bootstrap.e2e.test.ts+++ /dev/null@@ -1,201 +0,0 @@-/* eslint-disable no-console -- the run's console output IS the recorded evidence */-import type { MachineProfile, RemoteLink, RemoteSession } from '../types/index'-import type { RemoteTransportOptions } from './transport.types'-import { mkdtempSync, rmSync } from 'node:fs'-import { tmpdir } from 'node:os'-import { join } from 'pathe'-import { afterAll, beforeAll, describe, expect, it } from 'vitest'-import { clearHostRuntime, setHostConfig, setKnownHostsPath, setMachineDeps } from '../config/runtime'-import { MachineId } from '../types/index'-import { EMPTY_ALLOWLIST } from '../utils/allowlist'-import { resolveSshAuth } from '../utils/ssh-config'-import { events } from './events'-import { machine } from './machine'-import { sshTransport } from './transport.ssh'--const HOME_DIR = process.env.HOME ?? ''-const SSH_DIR = join(HOME_DIR, '.ssh')--function credentialsOf(target: MachineProfile) {- return resolveSshAuth(target, SSH_DIR, HOME_DIR)-}--/** The shared dev machine alias from `~/.ssh/config` (key auth). */-const HOST = process.env.DSH_SSH_E2E_HOST--/**- * The remote instance port. Defaults to 3080; the shared dev machine's 3080- * is held by caddy (shared infra, never touched), so runs there pass an- * explicit free port (e.g. `DSH_SSH_E2E_PORT=3082`).- */-const PORT = Number.parseInt(process.env.DSH_SSH_E2E_PORT ?? '3080', 10)--/** Generous budgets: real downloads (~90 MB) over SSH plus instance start. */-const E2E_CONFIG = {- connectTimeoutMs: 30_000,- healthCheckTimeoutMs: 5_000,- healthPollIntervalMs: 1_000,- healthPollAttempts: 90,- installTimeoutMs: 1_800_000,- keepaliveIntervalMs: 10_000,- keepaliveCountMax: 3,- reconnectInitialDelayMs: 1_000,- reconnectMaxDelayMs: 5_000,- reconnectMaxAttempts: 6,-}--/** Kill only processes whose command line references the shared layout. */-const CLEANUP_COMMAND = [- `if [ -f "$HOME/.dsh/.dsh-remote.pid" ]; then kill "$(cat "$HOME/.dsh/.dsh-remote.pid")" 2>/dev/null || true; rm -f "$HOME/.dsh/.dsh-remote.pid"; fi`,- // No `IFS= read` here: an empty IFS disables word splitting, the whole- // pgrep line lands in the pid variable, and the kill silently no-ops- // (verified live — the leftover instance survived the old loop). pgrep- // without -a prints bare pids; this shell's own pid is skipped so the- // cleanup does not kill itself mid-script.- `for _pid in $(pgrep -f '\\.dsh-desktop'); do [ "$_pid" = "$$" ] && continue; kill "$_pid" 2>/dev/null || true; done`,- `sleep 1`,- // Escalation pass: anything still alive after SIGTERM gets SIGKILL.- `for _pid in $(pgrep -f '\\.dsh-desktop'); do [ "$_pid" = "$$" ] && continue; kill -9 "$_pid" 2>/dev/null || true; done`,- `sleep 1`,- `pgrep -af '\\.dsh-desktop' | grep -v "^$$ " || true`,-].join('\n')--const profile: MachineProfile = HOST === undefined- ? {} as MachineProfile- : {- id: MachineId('e2e-dev'),- name: 'dev-e2e',- host: HOST,- port: 22,- user: '',- remotePort: PORT,- // The dev machine's home-level user patch pins the webserver row to- // 3081 (held by its production instance behind caddy), which by design- // overrides the CLI --port flag. The launch therefore goes through the- // profile's startCommand override — the product's operator escape- // hatch for exactly this — with a `--patch` overlay (applied after the- // user layer, so it wins) restating the webserver row on our port.- startCommand: `"$HOME/.dsh-desktop/runtime/bin/node" "$HOME/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js" --profile web --patch "$HOME/.dsh-e2e-port.yml" --host 127.0.0.1 --port ${PORT} --no-open`,- }--/** The `--patch` overlay restating the webserver row on the E2E port. */-const PORT_PATCH_COMMAND = `cat > "$HOME/.dsh-e2e-port.yml" <<'EOF'-- id: webserver- config:- host: '127.0.0.1'- port: ${PORT}-EOF-`--describe.skipIf(HOST === undefined)('bootstrap E2E (real linux x64 remote)', () => {- const roots: string[] = []- const options: RemoteTransportOptions = {- readyTimeoutMs: E2E_CONFIG.connectTimeoutMs,- resolveProfile: credentialsOf,- keepaliveIntervalMs: E2E_CONFIG.keepaliveIntervalMs,- keepaliveCountMax: E2E_CONFIG.keepaliveCountMax,- }-- async function openRaw(): Promise<RemoteSession> {- return await sshTransport.connect(profile, () => true, options)- }-- beforeAll(() => {- const known = mkdtempSync(join(tmpdir(), 'dsh-ssh-e2e-'))- roots.push(known)- clearHostRuntime()- setHostConfig({ ...E2E_CONFIG, sshDir: SSH_DIR })- setKnownHostsPath(join(known, 'known-hosts.json'))- setMachineDeps({ transport: { resolve: () => sshTransport }, emitStatus: () => {}, localAllowlist: () => EMPTY_ALLOWLIST })- machine.refreshProfiles(new Map([[profile.id, profile]]))- })-- afterAll(async () => {- await machine.disconnect(profile.id).catch(() => undefined)- await machine.dispose().catch(() => undefined)- // Leave the installed tree for sibling nodes; stop only our processes.- const session = await openRaw().catch(() => undefined)- if (session !== undefined) {- const leftovers = await session.exec(`${CLEANUP_COMMAND}\nrm -f "$HOME/.dsh-e2e-port.yml"`).catch(() => undefined)- const remaining = (leftovers?.stdout ?? '(probe failed)').trim()- console.log('[e2e] remote cleanup done; remaining layout processes:', JSON.stringify(remaining))- // The cleanup must actually leave nothing behind — a leftover instance- // would hold the port and fake the next run's readiness.- expect(remaining).toBe('')- await session.close().catch(() => undefined)- }- for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true })- })-- it('bootstraps a fresh machine end to end (probe → download → verify → install → launch → ready)', async () => {- // Fresh start: stop leftover shared-layout processes, wipe the tree, and- // stage the port overlay the launch's --patch consumes.- const cleaner = await openRaw()- const wiped = await cleaner.exec(`${CLEANUP_COMMAND}\nrm -rf "$HOME/.dsh-desktop"\n${PORT_PATCH_COMMAND}\n[ -f "$HOME/.dsh-e2e-port.yml" ] && [ ! -e "$HOME/.dsh-desktop" ] && echo wiped`)- await cleaner.close()- expect(wiped.stdout).toContain('wiped')-- const startedAt = Date.now()- let link: RemoteLink- try {- link = await machine.connect(profile.id)- }- catch (error) {- // Surface everything the event channel captured before failing.- console.log('[e2e] bootstrap FAILED; events:', JSON.stringify(events.since(profile.id), null, 2))- throw error- }- const seconds = (Date.now() - startedAt) / 1000- const page = events.since(profile.id)- console.log(`[e2e] bootstrap to ready in ${seconds.toFixed(1)}s over ${page.events.length} events`)- for (const event of page.events)- console.log(`[e2e] #${event.seq} ${event.stage}${event.terminal === undefined ? '' : `(${event.terminal})`}: ${event.line.slice(0, 160)}`)-- expect(link.tunnelBaseUrl).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/)- const stages = page.events.map(event => event.stage)- expect(stages).toContain('download')- expect(stages).toContain('verify')- expect(stages).toContain('install')- expect(stages).toContain('launch')- const ready = page.events.find(event => event.stage === 'ready')- expect(ready?.terminal).toBe('success')- // A fresh instance serves its auth fence on `/` (401, no boot page), so- // readiness is judged by the legacy fallback — the designed behavior;- // instances that serve the SPA manifest take the boot-HTML path instead.- console.log(`[e2e] readiness judged by: ${ready?.line}`)- expect(machine.status(profile.id).state).toBe('connected')- }, 30 * 60_000)-- it('installs the shared default layout with working binaries', async () => {- const session = await openRaw()- const probe = await session.exec(- `"$HOME/.dsh-desktop/runtime/bin/node" --version && ls "$HOME/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js" >/dev/null && echo entry-ok && ls "$HOME/.dsh-desktop/dependencies/pnpm/bin/pnpm.cjs" >/dev/null && echo pnpm-ok`,- )- await session.close()- console.log('[e2e] layout probe:', JSON.stringify(probe.stdout.trim()), 'stderr:', JSON.stringify(probe.stderr.trim()))- expect(probe.code).toBe(0)- expect(probe.stdout).toMatch(/^v\d+\.\d+\.\d+/)- expect(probe.stdout).toContain('entry-ok')- expect(probe.stdout).toContain('pnpm-ok')- })-- it('reconnects without reinstalling and returns to ready', async () => {- await machine.disconnect(profile.id)- const page0 = events.since(profile.id)- const link = await machine.connect(profile.id)- expect(link.tunnelBaseUrl).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/)- const page1 = events.since(profile.id)- const fresh = page1.events.filter(event => event.seq > (page0.events.at(-1)?.seq ?? 0))- for (const event of fresh)- console.log(`[e2e] #${event.seq} ${event.stage}${event.terminal === undefined ? '' : `(${event.terminal})`}: ${event.line.slice(0, 160)}`)- const stages = fresh.map(event => event.stage)- // Already-initialized remote: no download/verify/install stages, and no- // launch either when the detached instance survived the disconnect (the- // still-running path judges readiness immediately).- expect(stages).not.toContain('download')- expect(stages).not.toContain('verify')- expect(stages).not.toContain('install')- const ready = fresh.find(event => event.stage === 'ready')- expect(ready?.terminal).toBe('success')- }, 10 * 60_000)-})diff --git a/packages/dsh-tauri-remote/src/host/service/bootstrap.listener.test.ts b/packages/dsh-tauri-remote/src/host/service/bootstrap.listener.test.tsnew file mode 100644index 00000000..3f6c43c7--- /dev/null+++ b/packages/dsh-tauri-remote/src/host/service/bootstrap.listener.test.ts@@ -0,0 +1,218 @@+import type { Config } from '../config/schema'+import type { MachineProfile, RemoteExecResult, RemoteSession } from '../types/index'+import { execFile } from 'node:child_process'+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { dirname, join } from 'node:path'+import { promisify } from 'node:util'+import { afterEach, describe, expect, it, vi } from 'vitest'+import { MachineId } from '../types/index'+import { ensureRemoteInstance } from './bootstrap.utils'++const profile: MachineProfile = { id: MachineId('listener'), name: 'listener', host: 'fixture.invalid', port: 22, user: 'fixture', remotePort: 3080 }+const config: Config = {+ connectTimeoutMs: 100,+ healthCheckTimeoutMs: 100,+ healthPollIntervalMs: 1,+ healthPollAttempts: 1,+ keepaliveIntervalMs: 100,+ keepaliveCountMax: 1,+ reconnectInitialDelayMs: 1,+ reconnectMaxDelayMs: 1,+ reconnectMaxAttempts: 1,+}+const ok = (stdout: string): RemoteExecResult => ({ code: 0, stdout, stderr: '' })+const bootHtml = (version?: unknown) => `<script>globalThis["__DSH_BOOT__"] = ${JSON.stringify({ entries: [{ url: '/plugins/layout/client.js' }], ...version === undefined ? {} : { release: { version } } })};</script>`+const snapshot = (args = ['/usr/bin/node', '/opt/dsh/lib/bin.js'], os = 'Linux') => `${os}\n424242\n/opt/work\n123 456\n${os === 'Linux' ? `${args.join('\0')}\0` : args.join(' ')}`++function sessionFor(respond: (command: string) => RemoteExecResult | Promise<RemoteExecResult>): RemoteSession & { commands: string[] } {+ const commands: string[] = []+ return {+ commands,+ exec: async (command) => {+ commands.push(command)+ return respond(command)+ },+ stream: async () => { throw new Error('unexpected stream') },+ close: async () => {},+ onClosed: () => {},+ }+}++function servingSession(html: string, packageVersion = '0.1.7-rc.1', name = '@deepseek-ai/dsh', identity = snapshot()) {+ return sessionFor((command) => {+ if (command.includes('REMOTE_DSH_LISTENER_PACKAGE'))+ return ok(JSON.stringify({ name, version: packageVersion }))+ if (command.includes('REMOTE_DSH_LISTENER_PID'))+ return ok(identity)+ if (command.includes('REMOTE_DSH_PACKAGE'))+ throw new Error('unrelated managed tree must not be read')+ if (command.includes('-w'))+ return ok('export const ready = true\n200')+ return ok(html)+ })+}++afterEach(() => vi.unstubAllGlobals())++describe('actual remote listener admission', () => {+ it('rejects an old serving release even when the managed tree could be new', async () => {+ const session = servingSession(bootHtml('0.1.7-rc.0'), '0.2.1-rc.1')+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ expect(session.commands).toHaveLength(1)+ })++ it('admits a supported serving release without reading an unrelated old managed tree', async () => {+ const session = servingSession(bootHtml('0.2.1-rc.1'), '0.1.2-rc.1')+ await expect(ensureRemoteInstance(session, profile, config)).resolves.toBe('fixture.invalid:3080')+ expect(session.commands).toHaveLength(2)+ expect(session.commands.some(command => command.includes('REMOTE_DSH_PACKAGE'))).toBe(false)+ })++ it.each(['', 123, null])('rejects an invalid explicit boot release %s rather than using another package', async (version) => {+ const session = servingSession(bootHtml(version))+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ })++ it.each(['Linux', 'Darwin'])('admits the floor graph without release only with the actual %s listener package', async (os) => {+ const session = servingSession(bootHtml(), '0.1.7-rc.1', '@deepseek-ai/dsh', snapshot(undefined, os))+ await expect(ensureRemoteInstance(session, profile, config)).resolves.toBe('fixture.invalid:3080')+ expect(session.commands.filter(command => command.includes('REMOTE_DSH_LISTENER_PID'))).toHaveLength(2)+ expect(session.commands.some(command => command.includes('--version'))).toBe(false)+ })++ it.each(['0.1.2-rc.1', '0.1.7-rc.0'])('rejects an old actual listener %s despite an otherwise healthy graph', async (version) => {+ const session = servingSession(bootHtml(), version)+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNSUPPORTED/)+ expect(session.commands.some(command => command.includes('dsh-remote.pid'))).toBe(false)+ })++ it('does not borrow a version from a non-DSH package', async () => {+ const session = servingSession(bootHtml(), '0.2.1-rc.1', 'another-package')+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNVERIFIABLE/)+ })++ it.each([+ snapshot(['/usr/bin/python', '/opt/dsh/lib/bin.js']),+ snapshot(['/usr/bin/node', '--eval', 'require("/opt/dsh/lib/bin.js")']),+ 'Linux\n\n/opt/work\n123 456\nnode\0/opt/dsh/lib/bin.js\0',+ 'Linux\n424242 424243\n/opt/work\n123 456\nnode\0/opt/dsh/lib/bin.js\0',+ ])('rejects missing/ambiguous PID or unknown process argv without reading another package', async (identity) => {+ const session = servingSession(bootHtml(), '0.2.1-rc.1', '@deepseek-ai/dsh', identity)+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNVERIFIABLE/)+ expect(session.commands.some(command => command.includes('REMOTE_DSH_LISTENER_PACKAGE'))).toBe(false)+ })++ it.each(['TOOLS_MISSING', 'MISSING', 'MULTIPLE', 'COMMAND_UNREADABLE'])('fails once when listener identity is %s, without modifying the host', async (reason) => {+ const session = sessionFor(command => command.includes('REMOTE_DSH_LISTENER_PID')+ ? { code: 1, stdout: '', stderr: `REMOTE_DSH_LISTENER_${reason}` }+ : ok(bootHtml()))+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNVERIFIABLE/)+ expect(session.commands).toHaveLength(2)+ expect(session.commands.some(command => /kill|trap cleanup EXIT|dsh-remote.pid/u.test(command))).toBe(false)+ })++ it('binds a relative script to the listener cwd', async () => {+ const session = servingSession(bootHtml(), '0.1.7-rc.1', '@deepseek-ai/dsh', snapshot(['/usr/bin/node', './dsh/lib/bin.js']))+ await expect(ensureRemoteInstance(session, profile, config)).resolves.toBe('fixture.invalid:3080')+ const metadata = session.commands.find(command => command.includes('REMOTE_DSH_LISTENER_PACKAGE')) ?? ''+ expect(metadata).toContain('REMOTE_DSH_LISTENER_ENTRY=\'./dsh/lib/bin.js\'')+ expect(metadata).toContain('/opt/work')+ })++ it('does not admit an unknown auth fence using an unrelated managed runtime', async () => {+ const session = sessionFor((command) => {+ if (command.includes('REMOTE_DSH_LISTENER_PID'))+ return { code: 1, stdout: '', stderr: 'REMOTE_DSH_LISTENER_MISSING' }+ if (command.includes('-w'))+ return ok('401')+ if (command.includes('REMOTE_DSH_PACKAGE'))+ throw new Error('must not use managed metadata')+ return ok('<html>authentication required</html>')+ })+ await expect(ensureRemoteInstance(session, profile, config)).rejects.toThrow(/REMOTE_DSH_VERSION_UNVERIFIABLE/)+ })++ it('admits a supported auth fence only from the actual listener package', async () => {+ const session = sessionFor((command) => {+ if (command.includes('REMOTE_DSH_LISTENER_PACKAGE'))+ return ok('{"name":"@deepseek-ai/dsh","version":"0.1.7-rc.1"}')+ if (command.includes('REMOTE_DSH_LISTENER_PID'))+ return ok(snapshot())+ if (command.includes('-w'))+ return ok('401')+ return ok('<html>authentication required</html>')+ })+ await expect(ensureRemoteInstance(session, profile, config)).resolves.toBe('fixture.invalid:3080')+ })++ it('accepts a global dsh symlink entry before resolving its package', async () => {+ const session = servingSession(bootHtml(), '0.1.7-rc.1', '@deepseek-ai/dsh', snapshot(['/usr/bin/node', '/usr/local/bin/dsh']))+ await expect(ensureRemoteInstance(session, profile, config)).resolves.toBe('fixture.invalid:3080')+ const metadata = session.commands.find(command => command.includes('REMOTE_DSH_LISTENER_PACKAGE')) ?? ''+ expect(metadata).toContain('while [ -L "$REMOTE_DSH_LISTENER_ENTRY" ]')+ expect(metadata).toContain('case "$REMOTE_DSH_LISTENER_ENTRY" in */lib/bin.js)')+ expect(metadata).toContain('REMOTE_DSH_LISTENER_ENTRY=\'/usr/local/bin/dsh\'')+ })++ it.each([+ { entry: 'dsh/lib/bin.js', name: '@deepseek-ai/dsh', accepted: true },+ { entry: 'other/lib/bin.js', name: 'another-package', accepted: false },+ { entry: 'other/server.js', name: '@deepseek-ai/dsh', accepted: false },+ ])('checks the canonical entry and package in an isolated shell: $entry ($name)', async ({ entry, name, accepted }) => {+ const sandbox = mkdtempSync(join(tmpdir(), 'dsh-listener-'))+ const shellPath = (path: string) => process.platform === 'win32'+ ? path.replaceAll('\\', '/').replace(/^([A-Z]):/iu, (_, drive: string) => `/${drive.toLowerCase()}`)+ : path+ try {+ const bin = join(sandbox, entry)+ mkdirSync(dirname(bin), { recursive: true })+ writeFileSync(bin, '')+ writeFileSync(join(sandbox, entry.split('/')[0]!, 'package.json'), JSON.stringify({ name, version: '0.1.7-rc.1' }))+ const identity = `Linux\n424242\n${shellPath(sandbox)}\n123 456\n/usr/bin/node\0./${entry}\0`+ const session = sessionFor(async (command) => {+ if (command.includes('REMOTE_DSH_LISTENER_PACKAGE')) {+ const script = join(sandbox, 'probe.sh')+ writeFileSync(script, command)+ return promisify(execFile)(process.platform === 'win32' ? 'C:/Program Files/Git/bin/bash.exe' : 'bash', [shellPath(script)], { cwd: sandbox, env: { ...process.env, HOME: sandbox } }).then(+ result => ok(result.stdout),+ (error: { code?: number, stdout?: string, stderr?: string }) => ({ code: error.code ?? 1, stdout: error.stdout ?? '', stderr: error.stderr ?? '' }),+ )+ }+ if (command.includes('REMOTE_DSH_LISTENER_PID'))+ return ok(identity)+ return command.includes('-w') ? ok('export const ready = true\n200') : ok(bootHtml())+ })+ const result = ensureRemoteInstance(session, profile, config)+ if (accepted)+ await expect(result).resolves.toBe('fixture.invalid:3080')+ else+ await expect(result).rejects.toThrow(/REMOTE_DSH_VERSION_UNVERIFIABLE/)+ }+ finally {+ rmSync(sandbox, { recursive: true, force: true })+ }+ })++ it('starts a custom command without provisioning or checking an unrelated managed tree', async () => {+ const fetch = vi.fn(() => {+ throw new Error('must not fetch')+ })+ vi.stubGlobal('fetch', fetch)+ let started = false+ const session = sessionFor((command) => {+ if (command.includes('fixture-custom-start')) {+ started = true+ return ok('')+ }+ if (command.includes('REMOTE_DSH_PACKAGE') || command.includes('echo node') || command === 'uname -srm')+ throw new Error('managed provisioning must not run')+ if (command.includes('-w'))+ return ok('export const ready = true\n200')+ return started ? ok(bootHtml('0.2.1-rc.1')) : { code: 7, stdout: '', stderr: 'not running' }+ })+ await expect(ensureRemoteInstance(session, { ...profile, startCommand: 'fixture-custom-start' }, config)).resolves.toBe('fixture.invalid:3080')+ expect(started).toBe(true)+ expect(fetch).not.toHaveBeenCalled()+ })+})diff --git a/packages/dsh-tauri-remote/src/host/service/bootstrap.test.ts b/packages/dsh-tauri-remote/src/host/service/bootstrap.test.tsindex 8e4f1958..c230c6cf 100644--- a/packages/dsh-tauri-remote/src/host/service/bootstrap.test.ts+++ b/packages/dsh-tauri-remote/src/host/service/bootstrap.test.ts@@ -11,7 +11,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { REMOTE_ROOT } from '../config/constants'import { MachineId } from '../types/index'import { DSH_MIRROR_PREFIXES } from '../utils/assets'-import { FALLBACK_DSH_TAG, RECOMMENDED_DSH_VERSION } from '../utils/version'import {buildInstallScript,bundleProbeCommand,@@ -22,7 +21,6 @@ import {ensurePnpmCommand,ensureRemoteInstance,firstLineOf,- legacyProbeCommand,missingComponentsOf,normalizeNpmIntegrity,parseBootstrapLine,@@ -30,6 +28,7 @@ import {readEnvCredentials,REMOTE_PROBE_NO_DOWNLOADER,rootProbeCommand,+ rootStatusProbeCommand,skippedVerificationSummary,splitBundleProbeStdout,startCommandFor,@@ -46,9 +45,8 @@ const profile: MachineProfile = {const PKG_REPO = 'dsh-tauri-desk/deepseek-harness-pkg'-/** The pinned core and its release/npm shapes: fixtures follow the pin, never the reverse. */-const DSH_VERSION = RECOMMENDED_DSH_VERSION-const DSH_TAG = `dsh-${DSH_VERSION}-36556493178`+const DSH_VERSION = '0.2.1-rc.1'+const DSH_TAG = 'dsh-0.2.1-rc.1-39009013600'const DSH_TGZ = `dsh-${DSH_VERSION}.tgz`const NPM_TGZ = `https://registry.npmjs.org/@deepseek-ai/dsh/-/${DSH_TGZ}`const MIRROR_TGZ = `https://registry.npmmirror.com/@deepseek-ai/dsh/-/${DSH_TGZ}`@@ -104,11 +102,14 @@ function stubGithub(): void {class FakeSession implements RemoteSession {commands: string[] = []+ dshVersion = '0.2.1-rc.1'constructor(private readonly responder: (command: string, index: number) => RemoteExecResult) {}exec(command: string, _options?: RemoteExecOptions): Promise<RemoteExecResult> {this.commands.push(command)+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return Promise.resolve({ code: 0, stdout: JSON.stringify({ version: this.dshVersion }), stderr: '' })return Promise.resolve(this.responder(command, this.commands.length - 1))}@@ -296,7 +297,7 @@ describe('planRemoteInstall', () => {}))if (plan.dsh.kind !== 'pkg-zip')throw new Error('expected pkg-zip')- expect(plan.dsh.tag).toBe(FALLBACK_DSH_TAG)+ expect(plan.dsh.tag).toBe('dsh-0.2.1-rc.1-39009013600')expect(plan.notes.join('\n')).toContain('release 列表获取失败')})@@ -304,11 +305,11 @@ describe('planRemoteInstall', () => {const repos: string[] = []const plan = await planRemoteInstall('Linux 6.8 x86_64', {installRepo: 'https://github.com/my-org/deepseek-harness-pkg.git',- installRef: '0.1.1-rc.1',+ installRef: '0.1.7-rc.1',}, {listReleases: (repo) => {repos.push(repo)- return Promise.resolve(RELEASES)+ return Promise.resolve([{ tag: 'dsh-0.1.7-rc.1-42', prerelease: false }, ...RELEASES])},listAssets: () => Promise.resolve(LINUX_ASSETS),npmDist: () => Promise.reject(new Error('unused')),@@ -316,7 +317,7 @@ describe('planRemoteInstall', () => {expect(repos).toEqual(['my-org/deepseek-harness-pkg'])if (plan.dsh.kind !== 'pkg-zip')throw new Error('expected pkg-zip')- expect(plan.dsh.tag).toBe('dsh-0.1.1-rc.1-32342588166')+ expect(plan.dsh.tag).toBe('dsh-0.1.7-rc.1-42')})it('rejects platforms outside the matrix before any network use', async () => {@@ -593,7 +594,7 @@ describe('install script execution (real POSIX sh)', () => {// dsh dist: the npm package layout (package.json + lib/bin.js).const dshStage = join(work, 'dsh-stage')mkdirSync(join(dshStage, 'package', 'lib'), { recursive: true })- writeFileSync(join(dshStage, 'package', 'package.json'), '{"name":"@deepseek-ai/dsh","version":"0.1.2-rc.1"}\n')+ writeFileSync(join(dshStage, 'package', 'package.json'), '{"name":"@deepseek-ai/dsh","version":"0.2.1-rc.1"}\n')writeFileSync(join(dshStage, 'package', 'lib', 'bin.js'), '#!/usr/bin/env node\nvoid 0\n')const dshTgz = join(served, DSH_TGZ)await promisify(execFile)('tar', ['-czf', dshTgz, '-C', dshStage, 'package'])@@ -946,15 +947,14 @@ describe('probe execution (real POSIX sh)', () => {}})- it('legacy verdict probe: wget 6/8 answer 4xx/5xx, exit 4 is no answer', async () => {- for (const fake of [WGET_AUTH_CHALLENGE, WGET_SERVER_ERROR]) {- const answered = await runProbe(legacyProbeCommand(3080, 2500), tempDir(), { wget: fake })- expect(answered).toMatchObject({ code: 0, stdout: '4xx/5xx\n' })+ it('reports exact wget HTTP status instead of treating every server error as ready', async () => {+ for (const status of [200, 401, 404, 500]) {+ const fake = `#!/bin/sh\nprintf ' HTTP/1.1 302 Found\\n HTTP/1.1 ${status} Response\\n' >&2\nexit ${status < 400 ? 0 : 8}\n`+ const answered = await runProbe(rootStatusProbeCommand(3080, 2500), tempDir(), { wget: fake })+ expect(answered).toMatchObject({ code: 0, stdout: `${status}\n` })}- const refused = await runProbe(legacyProbeCommand(3080, 2500), tempDir(), { wget: WGET_REFUSED })+ const refused = await runProbe(rootStatusProbeCommand(3080, 2500), tempDir(), { wget: WGET_REFUSED })expect(refused.code).not.toBe(0)- const healthy = await runProbe(legacyProbeCommand(3080, 2500), tempDir(), { wget: '#!/bin/sh\nexit 0\n' })- expect(healthy).toMatchObject({ code: 0, stdout: '200\n' })})})@@ -1050,7 +1050,7 @@ describe('credentials copy execution (real POSIX sh)', () => {const BOOT_HTML = ['<html><head>','<script src="/plugins/??@deepseek-ai/dsh-client-modules/client.js&rev=1"></script>',- '</head><body><script>globalThis["__DSH_BOOT__"] = {"entries":[{"url":"/plugins/@deepseek-ai/dsh-client-ui-layout/client.js"}]};</script></body></html>',+ '</head><body><script>globalThis["__DSH_BOOT__"] = {"release":{"version":"0.2.1-rc.1"},"entries":[{"url":"/plugins/@deepseek-ai/dsh-client-ui-layout/client.js"}]};</script></body></html>',].join('')const BOOTSTRAP = {@@ -1090,18 +1090,36 @@ describe('ensureRemoteInstance', () => {expect(events).toEqual([{ stage: 'ready', line: expect.stringContaining('已就绪'), terminal: 'success' }])})- it('falls back to the legacy any-response verdict when the HTML carries no manifest', async () => {+ it('accepts the supported auth fence when no boot manifest is exposed', async () => {const session = new FakeSession((command) => {+ if (command.includes('REMOTE_DSH_LISTENER_PACKAGE'))+ return { code: 0, stdout: '{"name":"@deepseek-ai/dsh","version":"0.1.7-rc.1"}', stderr: '' }+ if (command.includes('REMOTE_DSH_LISTENER_PID'))+ return { code: 0, stdout: 'Linux\n424242\n/opt/work\n123 456\n/usr/bin/node\0/opt/dsh/lib/bin.js\0', stderr: '' }if (command.includes('/dev/null'))- return { code: 0, stdout: '200', stderr: '' }- return { code: 0, stdout: '<html>an old instance without a boot graph</html>', stderr: '' }+ return { code: 0, stdout: '401', stderr: '' }+ return { code: 0, stdout: 'Unauthorized', stderr: '' }})const events: string[] = []await expect(ensureRemoteInstance(session, profile, BOOTSTRAP, {onEvent: (stage, line) => events.push(`${stage}: ${line}`),})).resolves.toBe('10.0.0.1:3080')- expect(events[0]).toContain('旧探测兜底')- expect(events[0]).toContain('root answered 200')+ expect(events).toEqual(['ready: 远端实例已就绪(auth required (HTTP 401))'])+ })++ it.each(['200', '404', '500'])('rejects a manifest-less HTTP %s as ready', async (status) => {+ const session = new FakeSession((command) => {+ if (command === 'uname -srm')+ return { code: 0, stdout: 'Linux x86_64', stderr: '' }+ if (command.includes('/dev/null'))+ return { code: 0, stdout: status, stderr: '' }+ return { code: 0, stdout: '<html>no boot graph</html>', stderr: '' }+ })+ const events: string[] = []+ await expect(ensureRemoteInstance(session, profile, { ...BOOTSTRAP, healthPollAttempts: 1 }, {+ onEvent: stage => events.push(stage),+ })).rejects.toThrow(/did not become ready/)+ expect(events).not.toContain('ready')})it('bootstraps a fresh machine end to end: probe → install → launch → ready', async () => {@@ -1238,8 +1256,6 @@ describe('ensureRemoteInstance', () => {if (command.includes('tail'))return { code: 0, stdout: 'instance log line\n', stderr: '' }if (command.includes('/dev/null'))- // The legacy verdict probe: this remote has neither curl nor wget,- // so its else-arm prints the marker on stdout.return { code: 0, stdout: REMOTE_PROBE_NO_DOWNLOADER, stderr: '' }// The root/bundle probes fail (their else-arm exits 1) — not ready.return { code: 1, stdout: '', stderr: '' }diff --git a/packages/dsh-tauri-remote/src/host/service/bootstrap.utils.ts b/packages/dsh-tauri-remote/src/host/service/bootstrap.utils.tsindex 186c5f19..e47f8363 100644--- a/packages/dsh-tauri-remote/src/host/service/bootstrap.utils.ts+++ b/packages/dsh-tauri-remote/src/host/service/bootstrap.utils.ts@@ -6,9 +6,9 @@ import { readFileSync } from 'node:fs'import { messageOf } from '../../shared/error'import { DEFAULT_REMOTE_PROFILE, REMOTE_ROOT } from '../config/constants'import { assetMatrixFor, dshNpmTarballUrls, dshZipDownloadUrls, NODE_SHASUMS256_SHA256, NODE_VERSION, nodeDownloadUrls, nodeShasumUrls, parsePlatform, PNPM_SHA256, PNPM_VERSION, pnpmDownloadUrls } from '../utils/assets'-import { clientUrlsFromBootHtml, looksLikePluginBundle } from '../utils/boot-html'+import { clientUrlsFromBootHtml, looksLikePluginBundle, releaseVersionFromBootHtml } from '../utils/boot-html'import { shQuote } from '../utils/shell'-import { listGithubAssets, listGithubReleases, npmDistMetadata, parseGitHubRepo, pickReleaseTag, pkgRepoOf } from '../utils/version'+import { assertSupportedDshVersion, listGithubAssets, listGithubReleases, npmDistMetadata, parseGitHubRepo, parseVersionFromTag, pickReleaseTag, pkgRepoOf } from '../utils/version'export const REMOTE_WEB_LOG = '.dsh/dsh-remote-web.log'@@ -89,6 +89,9 @@ export async function planRemoteInstall(} = {},): Promise<RemoteInstallPlan> {const { os, arch } = parsePlatform(unameOut)+ const ref = config.installRef?.trim()+ if (ref !== undefined && ref !== '')+ assertSupportedDshVersion(ref.startsWith('dsh-') ? parseVersionFromTag(ref) ?? '' : ref)const matrix = assetMatrixFor(os, arch)const repo = pkgRepoOf(config.installRepo)const notes: string[] = []@@ -106,6 +109,7 @@ export async function planRemoteInstall(notes.push(`release 列表获取失败(${messageOf(error)})`)}const resolved = pickReleaseTag(metas, { ref: config.installRef })+ assertSupportedDshVersion(resolved.version)notes.push(...resolved.notes.map(note => `版本选择: ${note}`))const node = {urls: nodeDownloadUrls(os, arch),@@ -181,6 +185,8 @@ function quoteUrls(urls: string[]): string {}export function buildInstallScript(plan: RemoteInstallPlan): string {+ assertSupportedDshVersion(plan.dshVersion)+ assertSupportedDshVersion(plan.dsh.kind === 'pkg-zip' ? parseVersionFromTag(plan.dsh.tag) ?? '' : plan.dsh.version)const dshSection = plan.dsh.kind === 'pkg-zip'? [`if [ -f "$ROOT/dependencies/dsh/${DSH_ZIP_ENTRY}" ]; then`,@@ -365,6 +371,28 @@ export function checkMissingCommand(): string {].join('\n')}+export async function assertRemoteDshVersion(session: RemoteSession, allowMissing = false): Promise<void> {+ const result = await session.exec([+ `ROOT="$HOME/${REMOTE_ROOT}"`,+ `if [ -f "$ROOT/dependencies/dsh/${DSH_ZIP_ENTRY}" ]; then REMOTE_DSH_PACKAGE="$ROOT/dependencies/dsh/node_modules/@deepseek-ai/dsh/package.json"`,+ `elif [ -f "$ROOT/dependencies/dsh/${DSH_NPM_ENTRY}" ]; then REMOTE_DSH_PACKAGE="$ROOT/dependencies/dsh/package.json"`,+ 'else echo REMOTE_DSH_MISSING; exit 0; fi',+ 'cat "$REMOTE_DSH_PACKAGE"',+ ].join('\n'))+ if (allowMissing && result.code === 0 && result.stdout.trim() === 'REMOTE_DSH_MISSING')+ return+ let version = ''+ if (result.code === 0) {+ try {+ const pkg: unknown = JSON.parse(result.stdout)+ if (typeof pkg === 'object' && pkg !== null && 'version' in pkg && typeof pkg.version === 'string')+ version = pkg.version+ }+ catch {}+ }+ assertSupportedDshVersion(version)+}+export function missingComponentsOf(stdout: string): string[] {return stdout.split('\n').map(line => line.trim()).filter(line => line !== '' && ['node', 'dsh', 'pnpm'].includes(line))}@@ -405,6 +433,8 @@ export function safeProfileName(raw: string | undefined): string {}export function startCommandFor(profile: MachineProfile, plan?: RemoteInstallPlan): string {+ if (plan !== undefined)+ assertSupportedDshVersion(plan.dshVersion)if (profile.startCommand !== undefined)return `mkdir -p "$HOME/.dsh" && ( ${profile.startCommand} >>"$HOME/${REMOTE_WEB_LOG}" 2>&1 < /dev/null & ) &`const node = `$HOME/${REMOTE_ROOT}/runtime/bin/node`@@ -522,6 +552,81 @@ export function describeExecFailure(code: number | null, stderr: string): stringreturn `exit ${code ?? '?'}${tail === '' ? '' : `: ${tail}`}`}+function listenerSnapshotCommand(port: number): string {+ return [+ 'fail() { echo "REMOTE_DSH_LISTENER_$1" >&2; exit 1; }',+ 'OS=$(uname -s) || fail PLATFORM',+ 'case "$OS" in Linux|Darwin) ;; *) fail PLATFORM ;; esac',+ `if command -v lsof >/dev/null 2>&1; then PIDS=$(lsof -a -nP -iTCP:${port} -sTCP:LISTEN -t 2>/dev/null | sort -u)`,+ `elif [ "$OS" = Linux ] && command -v ss >/dev/null 2>&1; then PIDS=$(ss -H -lntp 'sport = :${port}' 2>/dev/null | grep -oE 'pid=[0-9]+' | cut -d= -f2 | sort -u)`,+ 'else fail TOOLS_MISSING; fi',+ 'set -f; set -- $PIDS; [ "$#" -eq 1 ] || fail PID_MISSING_OR_MULTIPLE',+ 'REMOTE_DSH_LISTENER_PID=$1',+ 'case "$REMOTE_DSH_LISTENER_PID" in ""|*[!0-9]*) fail PID_INVALID ;; esac',+ 'if [ "$OS" = Linux ]; then',+ ' CWD=$(readlink "/proc/$REMOTE_DSH_LISTENER_PID/cwd") || fail CWD_UNREADABLE',+ ' STAMP=$(stat -Lc "%d:%i" "/proc/$REMOTE_DSH_LISTENER_PID") || fail PROCESS_UNREADABLE',+ ' [ -r "/proc/$REMOTE_DSH_LISTENER_PID/cmdline" ] || fail COMMAND_UNREADABLE',+ ' printf "%s\\n" "$OS" "$REMOTE_DSH_LISTENER_PID" "$CWD" "$STAMP"',+ ' cat "/proc/$REMOTE_DSH_LISTENER_PID/cmdline" || fail COMMAND_UNREADABLE',+ 'else',+ ' CWD=$(lsof -a -p "$REMOTE_DSH_LISTENER_PID" -d cwd -Fn 2>/dev/null | sed -n "s/^n//p") || fail CWD_UNREADABLE',+ ' STAMP=$(ps -p "$REMOTE_DSH_LISTENER_PID" -o lstart=) || fail PROCESS_UNREADABLE',+ ' ARGS=$(ps -ww -p "$REMOTE_DSH_LISTENER_PID" -o command=) || fail COMMAND_UNREADABLE',+ ' printf "%s\\n" "$OS" "$REMOTE_DSH_LISTENER_PID" "$CWD" "$STAMP" "$ARGS"',+ 'fi',+ ].join('\n')+}++async function assertListenerDshVersion(session: RemoteSession, port: number): Promise<void> {+ const unverifiable = (reason: string): never => {+ throw new Error(`REMOTE_DSH_VERSION_UNVERIFIABLE: 无法确认端口 ${port} 的 DSH 版本(${reason});需要可识别的 Node DSH 入口及只读进程权限`)+ }+ const command = listenerSnapshotCommand(port)+ const snapshot = await session.exec(command)+ if (snapshot.code !== 0)+ return unverifiable(snapshot.stderr.trim() || 'listener identity unavailable')+ const [os, pid, cwd, stamp, ...rest] = snapshot.stdout.split('\n')+ if (!['Linux', 'Darwin'].includes(os ?? '') || !/^\d+$/u.test(pid ?? '') || !cwd?.startsWith('/') || !stamp?.trim())+ return unverifiable('invalid listener identity')+ const argv = os === 'Linux' ? rest.join('\n').split('\0') : rest.join('\n').trim().split(/\s+/u)+ const entry = argv[1]+ if (!/(?:^|\/)node(?:js)?$/u.test(argv[0] ?? '') || entry === undefined || entry === '' || entry.startsWith('-'))+ return unverifiable('unknown DSH command entry')+ const metadata = await session.exec([+ `cd ${shQuote(cwd)} || exit 1`,+ `REMOTE_DSH_LISTENER_ENTRY=${shQuote(entry)}`,+ 'case "$REMOTE_DSH_LISTENER_ENTRY" in /*) ;; *) REMOTE_DSH_LISTENER_ENTRY="$PWD/$REMOTE_DSH_LISTENER_ENTRY" ;; esac',+ 'COUNT=0',+ 'while [ -L "$REMOTE_DSH_LISTENER_ENTRY" ]; do',+ ' [ "$COUNT" -lt 16 ] || exit 1; COUNT=$((COUNT + 1))',+ ' LINK=$(readlink "$REMOTE_DSH_LISTENER_ENTRY") || exit 1',+ ' case "$LINK" in /*) REMOTE_DSH_LISTENER_ENTRY=$LINK ;; *) REMOTE_DSH_LISTENER_ENTRY="$(dirname "$REMOTE_DSH_LISTENER_ENTRY")/$LINK" ;; esac',+ 'done',+ '[ -f "$REMOTE_DSH_LISTENER_ENTRY" ] || exit 1',+ 'DIR=$(CDPATH= cd -P "$(dirname "$REMOTE_DSH_LISTENER_ENTRY")" && pwd) || exit 1',+ 'REMOTE_DSH_LISTENER_ENTRY="$DIR/$(basename "$REMOTE_DSH_LISTENER_ENTRY")"',+ 'case "$REMOTE_DSH_LISTENER_ENTRY" in */lib/bin.js) ;; *) exit 1 ;; esac',+ `REMOTE_DSH_LISTENER_PACKAGE="\${REMOTE_DSH_LISTENER_ENTRY%/lib/bin.js}/package.json"`,+ 'cat "$REMOTE_DSH_LISTENER_PACKAGE"',+ ].join('\n'))+ if (metadata.code !== 0)+ return unverifiable('listener package unreadable')+ let pkg: unknown+ try {+ pkg = JSON.parse(metadata.stdout)+ }+ catch {+ return unverifiable('invalid listener package')+ }+ if (typeof pkg !== 'object' || pkg === null || !('name' in pkg) || pkg.name !== '@deepseek-ai/dsh' || !('version' in pkg) || typeof pkg.version !== 'string')+ return unverifiable('listener is not an identifiable DSH package')+ assertSupportedDshVersion(pkg.version)+ const confirmed = await session.exec(command)+ if (confirmed.code !== 0 || confirmed.stdout !== snapshot.stdout)+ unverifiable('listener changed during version check')+}+export async function ensureRemoteInstance(session: RemoteSession,profile: MachineProfile,@@ -530,36 +635,55 @@ export async function ensureRemoteInstance(): Promise<string> {const { onEvent, onProgress } = hooksconst target = `${profile.host}:${profile.remotePort}`- const readyFromHtml = await judgeReadiness(session, profile, config)- if (readyFromHtml !== undefined) {- emitReady(onEvent, target, readyFromHtml)- return target- }- onEvent?.('probe', '探测远端平台 (uname -srm)')- const uname = await session.exec('uname -srm')- if (uname.code !== 0) {- return failBootstrap(onEvent, `无法探测远端平台: ${describeExecFailure(uname.code, uname.stderr)}`)- }- let plan: RemoteInstallPlantry {- plan = await planRemoteInstall(uname.stdout, config)+ const readyFromHtml = await judgeReadiness(session, profile, config)+ if (readyFromHtml !== undefined) {+ emitReady(onEvent, target, readyFromHtml)+ return target+ }}catch (error) {return failBootstrap(onEvent, messageOf(error))}- onEvent?.('probe', `远端平台 ${plan.os}/${plan.arch},安装源 ${plan.repo}${plan.dsh.kind === 'pkg-zip' ? ` tag ${plan.dsh.tag}` : ` npm ${plan.dsh.version}`}`)- for (const note of plan.notes)- onEvent?.('probe', note)- const missing = missingComponentsOf((await session.exec(checkMissingCommand())).stdout)- let skips: string[] = []- if (missing.length > 0) {- onEvent?.('probe', `缺失组件: ${missing.join(', ')}`)- skips = await runInstallScript(session, plan, config.installTimeoutMs!, hooks)- }- else {- onEvent?.('probe', '三件套已就绪,跳过安装')+ let plan: RemoteInstallPlan | undefined+ let skipSummary = ''+ if (profile.startCommand === undefined) {+ try {+ await assertRemoteDshVersion(session, true)+ }+ catch (error) {+ return failBootstrap(onEvent, messageOf(error))+ }+ onEvent?.('probe', '探测远端平台 (uname -srm)')+ const uname = await session.exec('uname -srm')+ if (uname.code !== 0)+ return failBootstrap(onEvent, `无法探测远端平台: ${describeExecFailure(uname.code, uname.stderr)}`)+ try {+ plan = await planRemoteInstall(uname.stdout, config)+ }+ catch (error) {+ return failBootstrap(onEvent, messageOf(error))+ }+ onEvent?.('probe', `远端平台 ${plan.os}/${plan.arch},安装源 ${plan.repo}${plan.dsh.kind === 'pkg-zip' ? ` tag ${plan.dsh.tag}` : ` npm ${plan.dsh.version}`}`)+ for (const note of plan.notes)+ onEvent?.('probe', note)+ const missing = missingComponentsOf((await session.exec(checkMissingCommand())).stdout)+ let skips: string[] = []+ if (missing.length > 0) {+ onEvent?.('probe', `缺失组件: ${missing.join(', ')}`)+ skips = await runInstallScript(session, plan, config.installTimeoutMs!, hooks)+ }+ else {+ onEvent?.('probe', '三件套已就绪,跳过安装')+ }+ try {+ await assertRemoteDshVersion(session)+ }+ catch (error) {+ return failBootstrap(onEvent, messageOf(error))+ }+ skipSummary = skippedVerificationSummary(plan.notes, skips)}- const skipSummary = skippedVerificationSummary(plan.notes, skips)onProgress?.({ phase: 'starting' })onEvent?.('launch', `拉起远端实例 (端口 ${profile.remotePort})`)const started = await session.exec(startCommandFor(profile, plan))@@ -572,7 +696,13 @@ export async function ensureRemoteInstance(for (let attempt = 0; attempt < config.healthPollAttempts; attempt++) {onProgress?.({ phase: 'probing', attempt: attempt + 1, total: config.healthPollAttempts })await sleep(config.healthPollIntervalMs)- const verdict = await judgeReadiness(session, profile, config)+ let verdict: string | undefined+ try {+ verdict = await judgeReadiness(session, profile, config)+ }+ catch (error) {+ return failBootstrap(onEvent, messageOf(error))+ }if (verdict !== undefined) {emitReady(onEvent, target, verdict, skipSummary)return target@@ -582,7 +712,7 @@ export async function ensureRemoteInstance(return failBootstrap(onEvent,`remote dsh web did not become ready on "${target}" within ${config.healthPollAttempts} polls; `- + `fallback probe: root ${await legacyRootVerdict(session, profile, config)}; `+ + `fallback probe: root ${await rootResponseVerdict(session, profile, config)}; `+ `remote log tail: ${tail}`,)}@@ -591,10 +721,19 @@ async function judgeReadiness(session: RemoteSession, profile: MachineProfile, cconst root = await session.exec(rootProbeCommand(profile.remotePort, config.healthCheckTimeoutMs))if (root.code !== 0)return undefined+ const release = releaseVersionFromBootHtml(root.stdout)+ if (release !== undefined)+ assertSupportedDshVersion(release)const urls = clientUrlsFromBootHtml(profile.remotePort, root.stdout)if (urls === undefined) {- return await legacyRootVerdict(session, profile, config)+ const status = await session.exec(rootStatusProbeCommand(profile.remotePort, config.healthCheckTimeoutMs))+ if (status.code !== 0 || status.stdout.trim() !== '401')+ return undefined+ await assertListenerDshVersion(session, profile.remotePort)+ return 'auth required (HTTP 401)'}+ if (release === undefined)+ await assertListenerDshVersion(session, profile.remotePort)const first = urls[0]if (first === undefined)return undefined@@ -605,17 +744,17 @@ async function judgeReadiness(session: RemoteSession, profile: MachineProfile, creturn undefined}-export function legacyProbeCommand(remotePort: number, timeoutMs: number): string {+export function rootStatusProbeCommand(remotePort: number, timeoutMs: number): string {const seconds = Math.max(1, Math.ceil(timeoutMs / 1000))return [`if [ -n "$(command -v curl)" ]; then curl -s -o /dev/null -m ${seconds} -w '%{http_code}' http://127.0.0.1:${remotePort}/`,- `elif [ -n "$(command -v wget)" ]; then wget -q -T ${seconds} -O /dev/null http://127.0.0.1:${remotePort}/; case $? in 0) echo 200 ;; 6|8) echo 4xx/5xx ;; *) exit 1 ;; esac`,+ `elif [ -n "$(command -v wget)" ]; then wget -S -T ${seconds} -O /dev/null http://127.0.0.1:${remotePort}/ 2>&1 | { status=; while read -r protocol code rest; do case "$protocol" in HTTP/*) status=$code ;; esac; done; [ -n "$status" ] && printf '%s\\n' "$status"; }`,`else echo ${REMOTE_PROBE_NO_DOWNLOADER}; fi`,].join('; ')}-async function legacyRootVerdict(session: RemoteSession, profile: MachineProfile, config: Config): Promise<string> {- const probe = await session.exec(legacyProbeCommand(profile.remotePort, config.healthCheckTimeoutMs))+async function rootResponseVerdict(session: RemoteSession, profile: MachineProfile, config: Config): Promise<string> {+ const probe = await session.exec(rootStatusProbeCommand(profile.remotePort, config.healthCheckTimeoutMs))if (probe.stdout.includes(REMOTE_PROBE_NO_DOWNLOADER))return `no downloader (${REMOTE_PROBE_NO_DOWNLOADER}: 远端缺少 curl 与 wget,无法探测就绪状态)`return probe.code === 0 ? `root answered ${probe.stdout.trim() || '?'}` : 'no answer'@@ -664,7 +803,7 @@ function emitReady(): void {const base = verdict.startsWith('boot')? `远端实例已就绪 (${target})`- : `远端实例已就绪(旧探测兜底: ${verdict})`+ : `远端实例已就绪(${verdict})`onEvent?.('ready', `${base}${skipSummary}`, { terminal: 'success' })}diff --git a/packages/dsh-tauri-remote/src/host/service/machine.test.ts b/packages/dsh-tauri-remote/src/host/service/machine.test.tsindex 784d9e55..c8adb269 100644--- a/packages/dsh-tauri-remote/src/host/service/machine.test.ts+++ b/packages/dsh-tauri-remote/src/host/service/machine.test.ts@@ -38,7 +38,7 @@ const config = {healthCheckTimeoutMs: 1000,healthPollIntervalMs: 5,healthPollAttempts: 3,- installRef: 'dsh-0.1.2-rc.1-33729514615',+ installRef: 'dsh-0.2.1-rc.1-39009013600',installTimeoutMs: 60000,keepaliveIntervalMs: 10000,keepaliveCountMax: 3,@@ -62,7 +62,7 @@ function stubGithub(): void {}/** A boot page whose manifest the bundle probe confirms. */-const BOOT_HTML = '<html><body><script>globalThis["__DSH_BOOT__"] = {"entries":[{"url":"/plugins/@deepseek-ai/dsh-client-ui-layout/client.js"}]};</script></body></html>'+const BOOT_HTML = '<html><body><script>globalThis["__DSH_BOOT__"] = {"release":{"version":"0.2.1-rc.1"},"entries":[{"url":"/plugins/@deepseek-ai/dsh-client-ui-layout/client.js"}]};</script></body></html>'/** The layout entry the pinned dsh release resolves: the remote shell expands $HOME (root user in the fake). */const ENTRY = '/root/.dsh-desktop/dependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js'@@ -95,6 +95,7 @@ class FakeSession implements RemoteSession {unameResult = 'Linux 6.8.0-45-generic x86_64\n'/** The check-script answer: one missing component per line (default: none). */missingResult = ''+ dshVersion = '0.2.1-rc.1'/** When set, the plugin-sync apply command answers a non-zero code with this stderr. */pluginSyncError: Error | undefined/** The local port the fake tunnel reports. */@@ -110,6 +111,8 @@ class FakeSession implements RemoteSession {const respond = (): RemoteExecResult => {if (this.connectError !== undefined)throw this.connectError+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return { code: 0, stdout: this.missingResult.includes('dsh') ? 'REMOTE_DSH_MISSING' : JSON.stringify({ version: this.dshVersion }), stderr: '' }if (command === 'uname -srm') {return { code: 0, stdout: this.unameResult, stderr: '' }}@@ -577,10 +580,12 @@ describe('sshManager', () => {await manager.connect(MachineId('m1'))const flow = bootstrapFlowCommands(session)expect(flow[0]).toContain('curl')- expect(flow[1]).toBe('uname -srm')- expect(flow[2]).toContain('echo node')- expect(flow[3]).toContain('dsh-remote.pid')- expect(flow[3]).toContain('--host 127.0.0.1')+ expect(flow[1]).toContain('REMOTE_DSH_PACKAGE')+ expect(flow[2]).toBe('uname -srm')+ expect(flow[3]).toContain('echo node')+ expect(flow[4]).toContain('REMOTE_DSH_PACKAGE')+ expect(flow[5]).toContain('dsh-remote.pid')+ expect(flow[5]).toContain('--host 127.0.0.1')expect(manager.status(MachineId('m1')).state).toBe('connected')})@@ -789,9 +794,11 @@ describe('sshManager', () => {markProbeStarted = resolve})const session = new FakeSession(() => true)- session.exec = () => {+ session.execGate = (command) => {+ if (!command.includes('curl'))+ return undefinedmarkProbeStarted?.()- return gate.then(() => ({ code: 0, stdout: '200', stderr: '' }))+ return gate}const { manager, events } = boot({ sessionFactory: () => session })const pending = manager.connect(MachineId('m1'))@@ -1081,6 +1088,19 @@ describe('sshManager', () => {})describe('sshManager install', () => {+ it.each(['0.1.2-rc.1', '0.1.7-rc.0', 'unknown'])('rejects existing unsupported runtime %s without installing, copying credentials, or launching', async (version) => {+ const session = new FakeSession(() => false)+ session.dshVersion = version+ session.missingResult = 'node\n'+ const { manager, transport } = boot({ sessionFactory: () => session, envCredentials: () => ({ apiKey: 'sk-test' }) })+ await expect(manager.install(MachineId('m1'))).rejects.toMatchObject({ code: 'machine-install-failed', message: expect.stringContaining('REMOTE_DSH_VERSION_UNSUPPORTED') })+ expect(session.commands.some(command => command.includes('trap cleanup EXIT'))).toBe(false)+ expect(session.commands.some(command => command.includes('dsh-remote.pid'))).toBe(false)+ expect(session.commands.some(command => command.includes('DEEPSEEK_API_KEY'))).toBe(false)+ expect(transport.connectCalls).toBe(1)+ expect(manager.status(MachineId('m1')).state).toBe('disconnected')+ })+it('installs dsh end-to-end, copies credentials, and auto-connects', async () => {let sessions = 0const factory = () => {@@ -1097,19 +1117,21 @@ describe('sshManager install', () => {const result = await manager.install(MachineId('m1'))expect(result).toEqual({installed: ['node', 'dsh', 'pnpm'],- dshRef: 'dsh-0.1.2-rc.1-33729514615',- dshVersion: '0.1.2-rc.1',+ dshRef: 'dsh-0.2.1-rc.1-39009013600',+ dshVersion: '0.2.1-rc.1',dshPath: ENTRY,credentialsCopied: true,})const installSession = transport.sessions[0]!expect(installSession.commands[0]).toBe('uname -srm')- expect(installSession.commands[1]).toContain('echo node')- expect(installSession.commands[2]).toContain('https://nodejs.org/dist/')- expect(installSession.commands[3]).toContain('test -f')- expect(installSession.commands[4]).toContain('DEEPSEEK_API_KEY')- expect(installSession.options[2]!.timeoutMs).toBe(60000)- expect(typeof installSession.options[2]!.onData).toBe('function')+ expect(installSession.commands[1]).toContain('REMOTE_DSH_PACKAGE')+ expect(installSession.commands[2]).toContain('echo node')+ expect(installSession.commands[3]).toContain('https://nodejs.org/dist/')+ expect(installSession.commands[4]).toContain('test -f')+ expect(installSession.commands[5]).toContain('REMOTE_DSH_PACKAGE')+ expect(installSession.commands[6]).toContain('DEEPSEEK_API_KEY')+ expect(installSession.options[3]!.timeoutMs).toBe(60000)+ expect(typeof installSession.options[3]!.onData).toBe('function')await until(() => manager.status(MachineId('m1')).state === 'connected', 'auto-connect')expect(transport.connectCalls).toBe(2)})@@ -1167,6 +1189,8 @@ describe('sshManager install', () => {session.exec = (command, _options) => {if (command.includes('grep -q \'^DEEPSEEK_API_KEY=\''))return Promise.resolve({ code: 1, stdout: '', stderr: 'disk full' })+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return Promise.resolve({ code: 0, stdout: '{"version":"0.2.1-rc.1"}', stderr: '' })if (command === 'uname -srm')return Promise.resolve({ code: 0, stdout: session.unameResult, stderr: '' })return Promise.resolve({ code: 0, stdout: command.includes('test -f ') ? `${ENTRY}\n` : 'installed', stderr: '' })@@ -1396,6 +1420,8 @@ describe('sshManager install', () => {// oxlint-disable-next-line typescript/prefer-promise-reject-errors -- hostile rejection// eslint-disable-next-line prefer-promise-reject-errors -- deliberately non-Error: covers describeExecFailure's message tailreturn Promise.reject('disk full')+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return Promise.resolve({ code: 0, stdout: '{"version":"0.2.1-rc.1"}', stderr: '' })if (command === 'uname -srm')return Promise.resolve({ code: 0, stdout: session.unameResult, stderr: '' })return Promise.resolve({ code: 0, stdout: command.includes('test -f ') ? `${ENTRY}\n` : 'installed', stderr: '' })@@ -1443,6 +1469,8 @@ describe('sshManager install', () => {it('fails loud when the install finished but the entry is not present', async () => {const session = new FakeSession(() => false)session.exec = (command, _options) => {+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return Promise.resolve({ code: 0, stdout: '{"version":"0.2.1-rc.1"}', stderr: '' })if (command === 'uname -srm')return Promise.resolve({ code: 0, stdout: session.unameResult, stderr: '' })if (command.includes('echo node'))@@ -1603,6 +1631,8 @@ describe('sshManager install', () => {const session = new FakeSession(() => false)session.missingResult = 'node\n'session.exec = (command, _options) => {+ if (command.includes('REMOTE_DSH_PACKAGE'))+ return Promise.resolve({ code: 0, stdout: '{"version":"0.2.1-rc.1"}', stderr: '' })if (command === 'uname -srm')return Promise.resolve({ code: 0, stdout: session.unameResult, stderr: '' })if (command.includes('echo node'))diff --git a/packages/dsh-tauri-remote/src/host/service/machine.ts b/packages/dsh-tauri-remote/src/host/service/machine.tsindex 54de3dad..6dbd8cbc 100644--- a/packages/dsh-tauri-remote/src/host/service/machine.ts+++ b/packages/dsh-tauri-remote/src/host/service/machine.ts@@ -18,7 +18,7 @@ import { carryWorkspaceAllowlist } from '../utils/allowlist'import { syncBundledPlugins } from '../utils/plugins-sync'import { discoverableHosts, loadSshConfigBlocks, lookupSshConfig, resolveSshAuth } from '../utils/ssh-config'import { bootstrap } from './bootstrap'-import { checkMissingCommand, credentialsCopyCommand, describeExecFailure, ensurePnpmCommand, firstLineOf, missingComponentsOf, planRemoteInstall, readEnvCredentials, remoteWebTokenCommand, safeProfileName, skippedVerificationSummary } from './bootstrap.utils'+import { assertRemoteDshVersion, checkMissingCommand, credentialsCopyCommand, describeExecFailure, ensurePnpmCommand, firstLineOf, missingComponentsOf, planRemoteInstall, readEnvCredentials, remoteWebTokenCommand, safeProfileName, skippedVerificationSummary } from './bootstrap.utils'import { events } from './events'import { gateway } from './gateway'import { knownHosts } from './known-hosts'@@ -816,6 +816,7 @@ async function performInstall(machineId: MachineId, profile: MachineProfile, sigonEvent('probe', `远端平台 ${plan.os}/${plan.arch},安装源 ${plan.repo}${plan.dsh.kind === 'pkg-zip' ? ` tag ${plan.dsh.tag}` : ` npm ${plan.dsh.version}`}`)for (const note of plan.notes)onEvent('probe', note)+ await assertRemoteDshVersion(session, true)const missing = missingComponentsOf((await session.exec(checkMissingCommand())).stdout)const skips: string[] = []if (missing.length > 0) {@@ -845,6 +846,7 @@ async function performInstall(machineId: MachineId, profile: MachineProfile, sig`dsh install finished on "${profile.host}" but the entry ${dshExpr} is not present`,)}+ await assertRemoteDshVersion(session)let credentialsCopied = falselet credentialsError: string | undefinedtry {diff --git a/packages/dsh-tauri-remote/src/host/service/sync.test.ts b/packages/dsh-tauri-remote/src/host/service/sync.test.tsindex 50f3c2d1..33d5b22f 100644--- a/packages/dsh-tauri-remote/src/host/service/sync.test.ts+++ b/packages/dsh-tauri-remote/src/host/service/sync.test.ts@@ -14,9 +14,12 @@ import { machine } from './machine'import { sync } from './sync'import { buildPreview, classifySpec, installSpecOf, pluginAddCommand, skillExtractCommand } from './sync.utils'+const ok = (stdout = ''): RemoteExecResult => ({ code: 0, stdout, stderr: '' })+const fail = (stderr: string): RemoteExecResult => ({ code: 1, stdout: '', stderr })+function fakeSession(respond: (command: string, options?: { stdinData?: Buffer }) => RemoteExecResult): RemoteSession & { execSpy: ReturnType<typeof vi.fn>, closed: () => boolean } {let open = true- const execSpy = vi.fn(async (command: string, options?: { stdinData?: Buffer }) => respond(command, options))+ const execSpy = vi.fn(async (command: string, options?: { stdinData?: Buffer }) => command.includes('REMOTE_DSH_PACKAGE') ? ok('{"version":"0.2.1-rc.1"}') : respond(command, options))return {execSpy,exec: execSpy as unknown as RemoteSession['exec'],@@ -29,9 +32,6 @@ function fakeSession(respond: (command: string, options?: { stdinData?: Buffer }}}-const ok = (stdout = ''): RemoteExecResult => ({ code: 0, stdout, stderr: '' })-const fail = (stderr: string): RemoteExecResult => ({ code: 1, stdout: '', stderr })-describe('classifySpec', () => {it('accepts remotely installable specs', () => {expect(classifySpec('github:omdsh-dev/dsh-market').syncable).toBe(true)diff --git a/packages/dsh-tauri-remote/src/host/service/sync.ts b/packages/dsh-tauri-remote/src/host/service/sync.tsindex fcff6af1..192c4626 100644--- a/packages/dsh-tauri-remote/src/host/service/sync.ts+++ b/packages/dsh-tauri-remote/src/host/service/sync.ts@@ -4,7 +4,7 @@ import type { SyncDeps } from './sync.types'import { defineService } from 'dsh-tauri'import { syncRuntimeDeps } from '../config/runtime'import { carryWorkspaceAllowlist, parseBuildAllowKeys } from '../utils/allowlist'-import { dshEntryProbeCommand, firstLineOf } from './bootstrap.utils'+import { assertRemoteDshVersion, dshEntryProbeCommand, firstLineOf } from './bootstrap.utils'import { machine } from './machine'import { buildPreview, dedupeBy, describeFailure, failureLogOf, installSpecOf, pluginAddCommand, skillExtractCommand } from './sync.utils'@@ -61,6 +61,7 @@ async function applyPlugins(): Promise<void> {if (plugins.length === 0)return+ await assertRemoteDshVersion(session, true)const dshEntry = firstLineOf((await session.exec(dshEntryProbeCommand())).stdout)for (const plugin of plugins) {announceItem(machineId, progress, plugin.name)diff --git a/packages/dsh-tauri-remote/src/host/utils/assets.test.ts b/packages/dsh-tauri-remote/src/host/utils/assets.test.tsindex 2eb68668..24b7724d 100644--- a/packages/dsh-tauri-remote/src/host/utils/assets.test.ts+++ b/packages/dsh-tauri-remote/src/host/utils/assets.test.ts@@ -93,17 +93,17 @@ describe('download URL builders', () => {})it('builds the packaged zip URL list (GitHub official → every proxy mirror)', () => {- const asset = 'https://github.com/dsh-tauri-desk/deepseek-harness-pkg/releases/download/dsh-0.1.2-rc.1-1/deepseek-harness-pkg-linux.zip'- expect(dshZipDownloadUrls('dsh-tauri-desk/deepseek-harness-pkg', 'dsh-0.1.2-rc.1-1', 'deepseek-harness-pkg-linux.zip')).toEqual([+ const asset = 'https://github.com/dsh-tauri-desk/deepseek-harness-pkg/releases/download/dsh-0.2.1-rc.1-39009013600/deepseek-harness-pkg-linux.zip'+ expect(dshZipDownloadUrls('dsh-tauri-desk/deepseek-harness-pkg', 'dsh-0.2.1-rc.1-39009013600', 'deepseek-harness-pkg-linux.zip')).toEqual([asset,...DSH_MIRROR_PREFIXES.map(prefix => `${prefix}${asset}`),])})it('builds the npm tarball URL pair for the arm64 kind', () => {- expect(dshNpmTarballUrls('@deepseek-ai/dsh', '0.1.2-rc.1')).toEqual([- 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz',- 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz',+ expect(dshNpmTarballUrls('@deepseek-ai/dsh', '0.2.1-rc.1')).toEqual([+ 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.2.1-rc.1.tgz',+ 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.2.1-rc.1.tgz',])})})diff --git a/packages/dsh-tauri-remote/src/host/utils/boot-html.ts b/packages/dsh-tauri-remote/src/host/utils/boot-html.tsindex 5267d6e8..7fc9f23d 100644--- a/packages/dsh-tauri-remote/src/host/utils/boot-html.ts+++ b/packages/dsh-tauri-remote/src/host/utils/boot-html.ts@@ -1,6 +1,6 @@const BOOT_MARKER = /globalThis\[(['"])__DSH_BOOT__\1\]\s*=\s*/u-export function clientUrlsFromBootHtml(port: number, html: string): string[] | undefined {+function bootFromHtml(html: string): Record<string, unknown> | undefined {const marker = BOOT_MARKER.exec(html)if (marker === null)return undefined@@ -16,7 +16,19 @@ export function clientUrlsFromBootHtml(port: number, html: string): string[] | ucatch {return undefined}- const entries = (boot as { entries?: unknown }).entries+ return typeof boot === 'object' && boot !== null && !Array.isArray(boot) ? boot as Record<string, unknown> : undefined+}++export function releaseVersionFromBootHtml(html: string): string | undefined {+ const boot = bootFromHtml(html)+ if (boot === undefined || !('release' in boot))+ return undefined+ const release = boot.release+ return typeof release === 'object' && release !== null && 'version' in release && typeof release.version === 'string' ? release.version : ''+}++export function clientUrlsFromBootHtml(port: number, html: string): string[] | undefined {+ const entries = bootFromHtml(html)?.entriesif (!Array.isArray(entries))return undefinedconst paths: string[] = []diff --git a/packages/dsh-tauri-remote/src/host/utils/version.test.ts b/packages/dsh-tauri-remote/src/host/utils/version.test.tsindex f50ec33b..04f32818 100644--- a/packages/dsh-tauri-remote/src/host/utils/version.test.ts+++ b/packages/dsh-tauri-remote/src/host/utils/version.test.ts@@ -1,6 +1,5 @@import { describe, expect, it } from 'vitest'import {- FALLBACK_DSH_TAG,isPreviewTag,OFFICIAL_INSTALL_REPO,OFFICIAL_PKG_REPO,@@ -25,6 +24,7 @@ const RELEASES = [describe('parseVersionFromTag', () => {it('extracts the semver from build-id tags', () => {expect(parseVersionFromTag('dsh-0.1.2-rc.1-33729514615')).toBe('0.1.2-rc.1')+ expect(parseVersionFromTag('dsh-0.2.1-rc.1-39009013600')).toBe('0.2.1-rc.1')expect(parseVersionFromTag('dsh-0.1.0-rc.8-32342588167')).toBe('0.1.0-rc.8')// Bare dsh-prefixed tags always lose their last dash segment (the build-id// convention) — matching the retired Rust parser exactly.@@ -50,11 +50,11 @@ describe('isPreviewTag', () => {})describe('pickReleaseTag', () => {- it('keeps rc.2 recommended when a newer alpha.1 package release is listed', () => {- const releases = [{ tag: 'dsh-0.2.1-alpha.1-37117505103', prerelease: false }, ...RELEASES]+ it('keeps the manifest recommendation when a newer alpha package is listed', () => {+ const releases = [{ tag: 'dsh-0.2.2-alpha.1-42', prerelease: false }, { tag: 'dsh-0.2.1-rc.1-39009013600', prerelease: false }, ...RELEASES]expect(pickReleaseTag(releases)).toEqual({- tag: 'dsh-0.2.0-rc.2-36556493178',- version: '0.2.0-rc.2',+ tag: 'dsh-0.2.1-rc.1-39009013600',+ version: '0.2.1-rc.1',source: 'recommended',notes: [],})@@ -127,7 +127,7 @@ describe('pickReleaseTag', () => {it('falls back to the known stable tag when the release list is unavailable', () => {const resolved = pickReleaseTag(undefined)- expect(resolved).toMatchObject({ tag: FALLBACK_DSH_TAG, source: 'fallback' })+ expect(resolved).toMatchObject({ tag: 'dsh-0.2.1-rc.1-39009013600', version: '0.2.1-rc.1', source: 'fallback' })expect(resolved.notes[0]).toContain('回退已知稳定 tag')})diff --git a/packages/dsh-tauri-remote/src/host/utils/version.ts b/packages/dsh-tauri-remote/src/host/utils/version.tsindex f8247ed8..0bf94e61 100644--- a/packages/dsh-tauri-remote/src/host/utils/version.ts+++ b/packages/dsh-tauri-remote/src/host/utils/version.ts@@ -1,3 +1,8 @@+import semver from 'semver'++declare const __REMOTE_DSH_RECOMMEND__: string+declare const __REMOTE_DSH_MINIMUM__: string+export interface DshPkgReleaseMeta {tag: stringprerelease: boolean@@ -12,9 +17,16 @@ export interface ResolvedDshTag {notes: string[]}-export const RECOMMENDED_DSH_VERSION = '0.2.0-rc.2'+export const RECOMMENDED_DSH_VERSION = __REMOTE_DSH_RECOMMEND__++export const MINIMUM_DSH_VERSION = __REMOTE_DSH_MINIMUM__-export const FALLBACK_DSH_TAG = 'dsh-0.2.0-rc.2-36556493178'+export const FALLBACK_DSH_TAG = 'dsh-0.2.1-rc.1-39009013600'++export function assertSupportedDshVersion(version: string): void {+ if (!semver.satisfies(version, `>=${MINIMUM_DSH_VERSION}`, { includePrerelease: true }))+ throw new Error(`REMOTE_DSH_VERSION_UNSUPPORTED: DSH ${version || '(unknown)'} 不受支持,最低版本 ${MINIMUM_DSH_VERSION};请先升级远端内核`)+}export const OFFICIAL_INSTALL_REPO = 'https://github.com/deepseek-ai/deepseek-harness.git'diff --git a/packages/dsh-tauri-remote/tsdown.config.ts b/packages/dsh-tauri-remote/tsdown.config.tsindex 58e71305..0a90f563 100644--- a/packages/dsh-tauri-remote/tsdown.config.ts+++ b/packages/dsh-tauri-remote/tsdown.config.ts@@ -1,3 +1,5 @@+import { fileURLToPath } from 'node:url'+import { readManifest } from '../../scripts/bundle-metadata.mjs'import { defineDshConfig } from '../dsh-tauri-tsdown/src/index.ts'import { gatewayAuthHtml } from './src/host/service/gateway.auth.ts'@@ -6,10 +8,15 @@ import { gatewayAuthHtml } from './src/host/service/gateway.auth.ts'// qrcode 只在宿主侧生成二维码:构建期内联,部署树不带 pngjs(其 browserify 产物会让// 部署闭包校验误判相对引用缺失);因此它声明为 devDependency 而不是 dependencies。export default async function () {+ const dshEngine = (readManifest(fileURLToPath(new URL('../..', import.meta.url))).engines as { dsh: { recommend: string, minimum: string } }).dshreturn defineDshConfig({server: {noExternal: ['qrcode'],- define: { __GATEWAY_AUTH_HTML__: JSON.stringify(await gatewayAuthHtml()) },+ define: {+ __GATEWAY_AUTH_HTML__: JSON.stringify(await gatewayAuthHtml()),+ __REMOTE_DSH_RECOMMEND__: JSON.stringify(dshEngine.recommend),+ __REMOTE_DSH_MINIMUM__: JSON.stringify(dshEngine.minimum),+ },},})}diff --git a/packages/dsh-tauri-rightclick/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-rightclick/THIRD_PARTY_NOTICES.mdindex 7c9ff71c..1b41a929 100644--- a/packages/dsh-tauri-rightclick/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-rightclick/THIRD_PARTY_NOTICES.md@@ -3,21 +3,23 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: the native-style context menu is this repo's own feature; where an action exists officially it is delegated to the official implementation first, with the plugin's own path as fallback.Integration points:- Official primitives popovers: menus and toasts run on the official primitives `Menu`; the plugin adds host capabilities and extra items (`src/client/register/context-menu.tsx:46`), and shortcut hints reuse the official menu item shape that accepts `ReactNode` (`context-menu.tsx:32`).-- Official actions first: rename, archive and fork call the official implementation with the service instance as receiver and fall back only when unavailable (`src/client/service/menu.ts:43,63,102,111`); pinning is offered only when the kernel provides it (0.1.7+), older kernels hide the entry (`menu.ts:77,90`).+- Official actions first: rename, archive and fork call the official implementation with the service instance as receiver and fall back only when unavailable (`src/client/service/menu.ts:43,63,102,111`); pinning consumes the official pinned-session capability in the supported `0.1.7-rc.1` and later core family (`menu.ts:77,90`).- Official menu/row location: menu items and inline row action buttons are located through their official text and ARIA shape (`src/client/register/official-menu.ts:8`, `src/client/register/locate.ts:40,107`), including the official React-rendered action button that appears after hover.- Official service surface: `src/client/types/index.ts:21,29,33` extends the official sessions / workspaces services with the capabilities this menu needs (`open` was removed in kernel 0.1.7 and is restored by the adapter compat bridge; the pinned-session set exists from 0.1.7).-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The workspace navigation change adds optional draft initialization to `startSession`; session open, archive, fork, pinning, and official primitives menu shapes used here remain compatible.diff --git a/packages/dsh-tauri-rightclick/package.json b/packages/dsh-tauri-rightclick/package.jsonindex 59848cd6..431c00c5 100644--- a/packages/dsh-tauri-rightclick/package.json+++ b/packages/dsh-tauri-rightclick/package.json@@ -33,6 +33,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-rightclick/src/client/service/menu.ts b/packages/dsh-tauri-rightclick/src/client/service/menu.tsindex 212282d7..205ac293 100644--- a/packages/dsh-tauri-rightclick/src/client/service/menu.ts+++ b/packages/dsh-tauri-rightclick/src/client/service/menu.ts@@ -173,12 +173,6 @@ export async function deleteWorkspace(input: {}}-/**- * Action:在指定工作区新建会话。- *- * legacy 投影在两个候选服务都没有 `startSession` 时把该属性读为 undefined(不是抛错),- * 可选链调用就会静默什么都不做(issue #780),因此这里显式回报不可用。- */export async function startWorkspaceSession(input: {workspaces: WorkspacesRuntimeLikeworkspaceId: WorkspaceIddiff --git a/packages/dsh-tauri-rightclick/src/client/types/index.ts b/packages/dsh-tauri-rightclick/src/client/types/index.tsindex 5c917106..d612acca 100644--- a/packages/dsh-tauri-rightclick/src/client/types/index.ts+++ b/packages/dsh-tauri-rightclick/src/client/types/index.ts@@ -12,13 +12,8 @@ import type {export type { SessionId, SessionListState, SessionSummary, WorkspaceId, WorkspaceSnapshot, WorkspaceView }export type SessionSummaryLike = SessionSummary-/**- * 会话列表快照的读取面:`current` 在 ≤0.1.6 由核心自带,0.1.7 起改由适配层投影补回,- * 因此此处按可选成员声明(缺席即「无法判断当前会话」)。- */export type SessionListSnapshotLike = Pick<SessionListState, 'ids' | 'byId'> & { current?: SessionId }-/** 官方 sessions 服务加上右键菜单 fork 所需能力(`open` 在 0.1.7 移除,由适配层兼容桥补回)。 */export type SessionsRuntimeLike = Omit<Pick<ISessions, 'list' | 'binding' | 'fork'>, 'list'> & {open?: (sessionId: SessionId) => unknownlist: { getSnapshot: () => SessionListSnapshotLike }@@ -26,14 +21,11 @@ export type SessionsRuntimeLike = Omit<Pick<ISessions, 'list' | 'binding' | 'forexport type WorkspaceViewLike = WorkspaceViewexport type WorkspaceListSnapshotLike = Pick<WorkspaceSnapshot, 'items' | 'archivedSessionIds'> & {- /** 0.1.7 起官方快照提供置顶集合;旧核心缺席即「无置顶」。 */pinnedSessionIds?: readonly SessionId[]}-/** 官方 workspaces 服务加上 alpha/桌面导航兼容扩展。 */export type WorkspacesRuntimeLike = Pick<IWorkspaces, 'list' | 'archiveSession' | 'delete'> & {startSession?: (workspaceId: WorkspaceId) => unknown- /** 置顶/取消置顶会话:0.1.7 起官方提供;旧核心缺席时右键菜单不展示该入口。 */pinSession?: (sessionId: SessionId) => Promise<void>unpinSession?: (sessionId: SessionId) => Promise<void>}diff --git a/packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.mdindex 218f08f3..4b64c4c8 100644--- a/packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md@@ -6,7 +6,7 @@- Version: `0.1.42`- Revision: `e75499e55d0b8bfe85e04ba5a579080b54edff56`- Baseline adopted: `f1bc91a3437f0b952631a46a8363089587b9ae6a` (`v0.1.32`)-- Baseline follow-up: `c426c3d` (`v0.1.35`, DSH `0.1.5-rc.1` host compatibility)+- Baseline follow-up (historical): `c426c3d` (`v0.1.35`, DSH `0.1.5-rc.1` host compatibility); not the current support floor.- Source: `source/dsh-automation`- License: Apache-2.0 — Copyright 2026 MichengAI contributors- Adapted: the scheduled-task panel; the submodule pointer is independent of the adopted baseline.@@ -45,10 +45,12 @@ Copyright 2026 MichengAI contributors## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`+- Refork version (historical source): `dsh-v0.2.1-alpha.1`- Refork revision: `ec48669f48ac81bac353fc646e7cf9c57241242f`-- Reference: the release-matched source at this revision; the repository submodule pointer is not advanced by this refork.-- Catalog pin: `dsh:` → `0.2.1-alpha.1` ([`pnpm-workspace.yaml`](../../pnpm-workspace.yaml))+- Reference: the refork used the source at the revision above; that provenance is independent of the current compatibility reference.+- Compatibility reference: `dsh-v0.2.1-rc.1` (`1600d8a1e140dcde43a1a0941940a0480712c011`).+- Support policy: minimum core `0.1.7-rc.1`; earlier cores are unsupported. See the [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>) for verification scope; this does not imply a fresh refork or source equality.+- Catalog pin: `dsh:` → `0.2.1-rc.1` ([`pnpm-workspace.yaml`](<../../pnpm-workspace.yaml>))- License: MIT — Copyright (c) 2026 DeepSeekReforked contracts and local destinations:diff --git a/packages/dsh-tauri-scheduler/package.json b/packages/dsh-tauri-scheduler/package.jsonindex 36884032..fb8d74da 100644--- a/packages/dsh-tauri-scheduler/package.json+++ b/packages/dsh-tauri-scheduler/package.json@@ -33,6 +33,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.test.ts b/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.test.tsindex 66f47a28..d0136b71 100644--- a/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.test.ts+++ b/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.test.ts@@ -41,7 +41,7 @@ const translate = ((key: string) => key) as Translatefunction runtime(options: { ids?: string[], current?: string, original?: string, mounted?: string, archived?: string[] } = {}) {const ids = (options.ids ?? ['original', 'current', 'first']).map(sessionId)- const list = observable<SessionListState & { current?: string }>({+ const list = observable<SessionListState>({ids,byId: Object.fromEntries(ids.map(id => [id, {id,@@ -53,8 +53,8 @@ function runtime(options: { ids?: string[], current?: string, original?: string,}])),phase: 'ready',projectionsBySession: {},- current: options.current ?? 'current',})+ const current = observable({ key: options.current === '' ? undefined : sessionId(options.current ?? 'current') })const workspaces = observable<WorkspaceSnapshot>({items: [],archivedSessionIds: (options.archived ?? []).map(sessionId),@@ -90,7 +90,7 @@ function runtime(options: { ids?: string[], current?: string, original?: string,}const uiWorkspace: { openSession?: typeof openSession, startSession?: typeof startSession } = { openSession, startSession }const sessions: { list: typeof list, create?: () => Promise<SessionId> } = { list }- const adapter = defineAdapter({ sessions, workspaces: { list: workspaces }, uiWorkspace }, { onWarn: vi.fn() })+ const adapter = defineAdapter({ sessions, workspaces: { list: workspaces }, uiWorkspace, uiSession: { adapter: { current } } }, { onWarn: vi.fn() })const controller = createLifecycleController()const abort = new AbortController()const target: TaskTabNavigation = { id: 'task-1', sessionId: options.original ?? 'original' }@@ -144,6 +144,20 @@ afterEach(() => {})describe('openTaskTab pending public navigation', () => {+ it('opens after the mounted session arrives when the core layout has no panelInfo service', async () => {+ const fixture = runtime()+ const { panelInfo: _panelInfo, ...layout } = fixture.layout+ const request = openTaskTab({ ...fixture.input, layout: layout as ILayout })+ await vi.advanceTimersByTimeAsync(0)+ expect(fixture.openTab).not.toHaveBeenCalled()+ expect(fixture.openSession).toHaveBeenCalledExactlyOnceWith('original')++ fixture.mounted.publish(sessionId('original'))+ await request+ expect(fixture.openTab).toHaveBeenCalledExactlyOnceWith('scheduleTask', { params: { id: 'task-1', sessionId: 'original' } })+ expectClean(fixture)+ })+it('bounds an unresolved openSession promise by the five-second navigation deadline', async () => {const fixture = runtime()const opening = deferred()diff --git a/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.ts b/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.tsindex 4c68003e..0193f2cc 100644--- a/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.ts+++ b/packages/dsh-tauri-scheduler/src/client/register/task-tab.navigation.ts@@ -151,10 +151,10 @@ export async function openTaskTab({ controller, adapter, layout, sidebar, targetunhookDisposal = controller.add(() => fail(undefined))cancelDeadline = controller.timeout(() => fail(undefined), 5_000)unsubscribe = sidebar.mounted.subscribe(attempt)- unsubscribePanel = layout.panelInfo.subscribe(() => {+ unsubscribePanel = layout.panelInfo?.subscribe(() => {if (layout.panelInfo.getSnapshot().activePanelId !== null)fail(undefined)- })+ }) ?? (() => {})if (settled) {unsubscribe()unsubscribePanel()diff --git a/packages/dsh-tauri-scheduler/src/host/service/binding-platform.test.ts b/packages/dsh-tauri-scheduler/src/host/service/binding-platform.test.tsindex 00cc1f1b..f4e82f5e 100644--- a/packages/dsh-tauri-scheduler/src/host/service/binding-platform.test.ts+++ b/packages/dsh-tauri-scheduler/src/host/service/binding-platform.test.ts@@ -69,19 +69,21 @@ async function createHarness(dependencies: readonly string[], missing = false, wagentPresets: {},permissionPresets: {},llm: llmModule,+ remoteAccess: { allows: vi.fn(() => true) },attachments: { imageLimits: { maxImageBytes: 1024 } },fileUploads: { registerAgentResolver: () => () => {} },fs: {},fileReferences: {},- typert: { lookups: { configure: vi.fn() }, contexts: { configureHost: vi.fn() } },+ typert: { lookups: { configure: vi.fn() }, contexts: { configureHost: vi.fn() }, resources: { register: vi.fn(() => () => {}) } },connection: { fetch: { register: () => () => {} } },}for (const [name, value] of Object.entries(values))ctx.provide(name, value)},})- await root.plugin(SessionController, { nativeOpen: false })+ await root.plugin(SessionController, { nativeOpen: false }).await()const controller = root.get('sessionController') as SessionController+ expect(controller).toBeInstanceOf(SessionController)let pluginContext: Context | undefinedawait root.plugin({name: 'scheduler-binding-platform-regression',@@ -90,7 +92,8 @@ async function createHarness(dependencies: readonly string[], missing = false, wpluginContext = ctxctx.effect(() => server(ctx))},- })+ }).await()+ expect(pluginContext).toBeInstanceOf(Context)const httpServer = createServer((request, response) => {const pathname = new URL(request.url ?? '/', 'http://127.0.0.1').pathnameconst route = routes.get(pathname)diff --git a/packages/dsh-tauri-scheduler/src/host/service/executor.test.ts b/packages/dsh-tauri-scheduler/src/host/service/executor.test.tsindex 05bdfd7f..3f325dc9 100644--- a/packages/dsh-tauri-scheduler/src/host/service/executor.test.ts+++ b/packages/dsh-tauri-scheduler/src/host/service/executor.test.ts@@ -51,7 +51,7 @@ interface AgentInput {sessionId: stringmeta: { cwd: string, agentPreset: string }agentOptions: { provider?: string, model?: string }- setup: (agentCtx: unknown, createdAgent?: SetupAgentLike) => Promise<void>+ setup: (agentCtx: unknown, agent: SetupAgentLike) => Promise<void>}interface RunControl {@@ -386,6 +386,33 @@ describe('executor.run', () => {expect(control.followup.mock.calls[0]![0]).toBe(host.runtime.createUserMessage.mock.results[0]!.value)})+ it('rejects a missing setup Agent without reading a context Agent', async () => {+ const host = installHost()+ const readAgent = vi.fn(() => ({ session: { id: 'context-session' } }))+ const agentContext = Object.defineProperty({}, 'agent', { get: readAgent })+ host.create.mockImplementationOnce(async (input) => {+ await Reflect.apply(input.setup, undefined, [agentContext])+ throw new Error('setup accepted a missing Agent')+ })++ await expect(executor.run(taskFixture, 'manual')).resolves.toMatchObject({+ ok: false,+ error: 'scheduler setup has no scoped Agent',+ })++ expect(readAgent).not.toHaveBeenCalled()+ expect(host.mount).not.toHaveBeenCalled()+ expect(host.runtime.installModelSelection).not.toHaveBeenCalled()+ expect(host.permissions.set).not.toHaveBeenCalled()+ expect(host.runtime.setApprovalPolicy).not.toHaveBeenCalled()+ expect(host.flush).not.toHaveBeenCalled()+ expect(runs.save).toHaveBeenLastCalledWith(expect.objectContaining({+ status: 'failed',+ error: 'scheduler setup has no scoped Agent',+ }))+ expect(vi.getTimerCount()).toBe(0)+ })+it('未指定资源时使用宿主默认模型、权限与 standard preset', async () => {const host = installHost()const pending = executor.run(taskFixture, 'manual')diff --git a/packages/dsh-tauri-scheduler/src/host/service/executor.ts b/packages/dsh-tauri-scheduler/src/host/service/executor.tsindex fdd793b8..ebcb02a9 100644--- a/packages/dsh-tauri-scheduler/src/host/service/executor.ts+++ b/packages/dsh-tauri-scheduler/src/host/service/executor.ts@@ -14,7 +14,7 @@ import { getServerContext } from 'dsh-h3/utils'import { defineService } from 'dsh-tauri'import { join } from 'pathe'import { server } from '../server'-import { loadSchedulerRuntimeModules, resolveSetupAgent } from '../utils/agent-runtime'+import { loadSchedulerRuntimeModules } from '../utils/agent-runtime'import { applyUnattendedPermission } from '../utils/permission'import { decideRunOutcome, isPluginUnloadError, summarizeCollectedRun, waitForTurnStart, watchSessionEvents } from './executor.utils'import { runs } from './runs'@@ -218,12 +218,11 @@ async function createAgent(sessionId: input.sessionId,meta: { cwd: input.cwd, agentPreset: input.agentPreset },agentOptions: input.selection ? { provider: input.selection.provider, model: input.selection.model } : {},- setup: async (agentCtx: any, createdAgent?: SetupAgentLike) => {- await (ctx.agentPresets as { mount?: (agentCtx: unknown, presetId: string) => Promise<unknown> } | undefined)?.mount?.(agentCtx, input.agentPreset)- runtime.installModelSelection(agentCtx, { current: input.selection, assembled: undefined })- const agent = resolveSetupAgent(agentCtx, createdAgent)+ setup: async (agentCtx: unknown, agent: SetupAgentLike) => {if (!agent)throw new Error('scheduler setup has no scoped Agent')+ await (ctx.agentPresets as { mount?: (agentCtx: unknown, presetId: string) => Promise<unknown> } | undefined)?.mount?.(agentCtx, input.agentPreset)+ runtime.installModelSelection(agentCtx, { current: input.selection, assembled: undefined })applyUnattendedPermission(ctx.permissionPresets as PermissionPresetService,agent.session,diff --git a/packages/dsh-tauri-scheduler/src/host/service/executor.utils.test.ts b/packages/dsh-tauri-scheduler/src/host/service/executor.utils.test.tsindex 7b80113a..123dde1d 100644--- a/packages/dsh-tauri-scheduler/src/host/service/executor.utils.test.ts+++ b/packages/dsh-tauri-scheduler/src/host/service/executor.utils.test.ts@@ -111,16 +111,16 @@ describe('waitForTurnStart', () => {})describe('summarizeRun', () => {- it('内核 0.1.2-rc.1 起改从 snapshotEvents 读日志,失败收尾不会被吞成成功', () => {+ it('从 snapshotEvents 读日志,失败收尾不会被吞成成功', () => {const outcome = summarizeRun({ snapshotEvents: () => runEvents }, 1)expect(outcome).toEqual({ text: 'done', reason: failureReason })expect(decideRunOutcome({ started: true, timedOut: false, reason: outcome.reason })).toEqual({ status: 'failed', error: { code: 'llm_error', message: 'boom' } })})- it('legacy 内核的 log / events 仍作兜底', () => {+ it('不从已移除的 log / events 属性读取会话记录', () => {for (const session of [{ log: runEvents }, { events: runEvents }]) {- expect(summarizeRun(session, 1)).toEqual({ text: 'done', reason: failureReason })+ expect(summarizeRun(session, 1)).toEqual({ text: '' })}})diff --git a/packages/dsh-tauri-scheduler/src/host/service/executor.utils.ts b/packages/dsh-tauri-scheduler/src/host/service/executor.utils.tsindex ad4bebdf..1cea74aa 100644--- a/packages/dsh-tauri-scheduler/src/host/service/executor.utils.ts+++ b/packages/dsh-tauri-scheduler/src/host/service/executor.utils.ts@@ -154,7 +154,6 @@ export function isPluginUnloadError(error: unknown): boolean {&& (error as { readonly code?: unknown }).code === 'INACTIVE_EFFECT'}-/** 内核 `Session` 的日志面逐版本漂移:0.1.2-rc.1 起移除 `events` 访问器,以 `snapshotEvents()` 为准,`log` / `events` 仅作兜底。 */function sessionEvents(value: unknown): readonly SessionEventLike[] {if (typeof value !== 'object' || value === null)return []@@ -165,9 +164,7 @@ function sessionEvents(value: unknown): readonly SessionEventLike[] {if (Array.isArray(snapshot))return snapshot as readonly SessionEventLike[]}- if (Array.isArray(session.log))- return session.log as readonly SessionEventLike[]- return Array.isArray(session.events) ? session.events as readonly SessionEventLike[] : []+ return []}function textOf(event: SessionEventLike): string {diff --git a/packages/dsh-tauri-scheduler/src/host/service/scheduler.test.ts b/packages/dsh-tauri-scheduler/src/host/service/scheduler.test.tsindex 4d449030..8826d232 100644--- a/packages/dsh-tauri-scheduler/src/host/service/scheduler.test.ts+++ b/packages/dsh-tauri-scheduler/src/host/service/scheduler.test.ts@@ -34,7 +34,7 @@ interface AgentInput {sessionId: stringmeta: { cwd: string, agentPreset: string }agentOptions: { provider?: string, model?: string }- setup: (agentCtx: unknown, createdAgent?: SetupAgentLike) => Promise<void>+ setup: (agentCtx: unknown, agent: SetupAgentLike) => Promise<void>}interface NewAgentControl {diff --git a/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.test.ts b/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.test.tsindex 4765290e..aae5e7e9 100644--- a/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.test.ts+++ b/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.test.ts@@ -1,5 +1,5 @@import { describe, expect, it, vi } from 'vitest'-import { loadSchedulerRuntimeModules, resolveSetupAgent } from './agent-runtime'+import { loadSchedulerRuntimeModules } from './agent-runtime'describe('loadSchedulerRuntimeModules', () => {it('resolves DSH-owned modules through the platform loader', async () => {@@ -45,27 +45,3 @@ describe('loadSchedulerRuntimeModules', () => {expect(loader.unwrapExports).not.toHaveBeenCalled()})})--describe('resolveSetupAgent', () => {- it('prefers the Agent the 0.1.5+ host passes as the setup second parameter', () => {- const session = { id: 'task-1' }- const agentCtx = {- get agent(): never {- throw new Error('cannot get property "agent" without inject')- },- }-- expect(resolveSetupAgent(agentCtx, { session })).toEqual({ session })- })-- it('falls back to the context entry on hosts that predate the explicit Agent parameter', () => {- const session = { id: 'task-1' }-- expect(resolveSetupAgent({ agent: { session } })).toEqual({ session })- })-- it('returns undefined when neither the parameter nor the context entry carries an Agent', () => {- expect(resolveSetupAgent(undefined)).toBeUndefined()- expect(resolveSetupAgent({})).toBeUndefined()- })-})diff --git a/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.ts b/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.tsindex 3c19feb5..e5dd24ab 100644--- a/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.ts+++ b/packages/dsh-tauri-scheduler/src/host/utils/agent-runtime.ts@@ -1,4 +1,4 @@-import type { PlatformModuleLoader, SchedulerRuntimeModules, SetupAgentLike } from './agent-runtime.types'+import type { PlatformModuleLoader, SchedulerRuntimeModules } from './agent-runtime.types'import { isFunction } from 'lodash-es'import { withSessionDeadline } from './session-deadline'@@ -40,13 +40,6 @@ export async function isSchedulerSessionNotFound(loader: PlatformModuleLoader |}}-export function resolveSetupAgent(- agentCtx: unknown,- createdAgent?: SetupAgentLike,-): SetupAgentLike | undefined {- return createdAgent ?? (agentCtx as { agent?: SetupAgentLike } | undefined)?.agent-}-// --- internal ---function resolveRuntimeExport<T extends keyof SchedulerRuntimeModules>(diff --git a/packages/dsh-tauri-ui-playground/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-ui-playground/THIRD_PARTY_NOTICES.mdindex 3cf80fa5..4890244f 100644--- a/packages/dsh-tauri-ui-playground/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-ui-playground/THIRD_PARTY_NOTICES.md@@ -3,10 +3,12 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: a development-only playground that renders the component registry of `dsh-tauri-ui`, so it shows — but does not copy — official client UI components.@@ -14,10 +16,10 @@ Official surface referenced:- Registry semantics: the `reexport` (official implementation forwarded as is, styles from the official CSS Modules) and `refork` (official CSS reproduced locally because only the newer kernel implements or exports the component) distinctions, including the official class each refork maps to (`src/client/ui/components-playground/ui-components.tsx:112,128-130,252`).- Official `Menu`: wired into the chip triggers so selection state, chevron rotation and popover placement behave like the shipped UI (`ui-components.tsx:57`).-- Icons: two kernel generations export the official icons barrel under different names, so icons are consumed through `@gravity-ui/icons` re-exported by `dsh-tauri-ui/client` (`ui-components.tsx:262`).+- Icons: consumed through `@gravity-ui/icons` re-exported by `dsh-tauri-ui/client`, without assuming that official icon barrel names match across supported cores (`ui-components.tsx:262`).- Derivation table of those official components: `packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.md`.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The playground continues to consume the shared registry and official primitives through `dsh-tauri-ui/client`; the additive InlineEditor and shell seat need no local component migration.diff --git a/packages/dsh-tauri-ui-playground/package.json b/packages/dsh-tauri-ui-playground/package.jsonindex 07239cbb..7e33f658 100644--- a/packages/dsh-tauri-ui-playground/package.json+++ b/packages/dsh-tauri-ui-playground/package.json@@ -33,6 +33,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx b/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsxindex 0dd16d87..b425e7b3 100644--- a/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx+++ b/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx@@ -78,7 +78,7 @@ function SourceCard({ entry }: { entry: UiComponentEntry }): ReactElement {: `映射组件:${source.component} · ${source.variant}`}</span><span className="dshp-ui-components__code">{source.package}</span>- <span>{`版本:${source.availableAt.join(' / ')}`}</span>+ <span>{`来源采样 / Source samples:${source.availableAt.join(' / ')}`}</span>{source.mappedClass === undefined? null: <span>{`官方类名:.${source.mappedClass}`}</span>}diff --git a/packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.mdindex 50257504..3f8d98fb 100644--- a/packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-ui/THIRD_PARTY_NOTICES.md@@ -3,16 +3,18 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek-- Not copied: a Tauri-flavoured refork of the official client UI — official components are re-exported as-is where both kernel generations agree, reforked locally where only the newer kernel implements or exports them; no official source file is vendored.+- Not copied: a Tauri-flavoured refork of the official client UI — official components are re-exported where the supported kernels expose the required contract, with local reforks for additional geometry and variants; no official source file is vendored.Derived (upstream → this package):-- `packages/client/ui-primitives/src/` (version `0.1.7-alpha.1`, ≥ `0.1.5-rc.1`) → `src/client/components/official.tsx`: pass-through re-export of `Button`, `Switch`, `Tag`, `Pill`, `Menu`, `Input`, `Tooltip`, `Toast`, `Modal`, `HoverCard`, `DisclosureRow`, `StateDot`, `ConnectionIndicator`, `BrandWordmark`, `FishLogo`; `Button` / `Tag` are taken over per-variant by `button.tsx` / `tag.tsx` (official variant → official implementation, local variant → refork style).+- `packages/client/ui-primitives/src/` (historical derivation reference: `0.1.7-alpha.1`, then documented for ≥ `0.1.5-rc.1`; not the current support floor) → `src/client/components/official.tsx`: pass-through re-export of `Button`, `Switch`, `Tag`, `Pill`, `Menu`, `Input`, `Tooltip`, `Toast`, `Modal`, `HoverCard`, `DisclosureRow`, `StateDot`, `ConnectionIndicator`, `BrandWordmark`, `FishLogo`; `Button` / `Tag` are taken over per-variant by `button.tsx` / `tag.tsx` (official variant → official implementation, local variant → refork style).- `packages/client/ui-primitives/src/` icons barrel → deliberately not re-exported (export names differ between kernel generations).- `packages/client/ui-plugin-manager/src/client/PluginManagerPage.module.css` → `src/client/ui/panel-page.cssr.ts`, `src/client/ui/panel-page.tsx`: the plugin panel is laid out line-by-line on the official plugin page geometry.- `packages/client/ui-sidebar`, `ui-workspace`, `ui-chat`, `ui-settings-models`, `ui-agent-preset`, `ui-permission-presets`, `ui-goal` CSS Modules → `src/client/components/registry.ts` (`UI_COMPONENT_REGISTRY`, `kind: 'reexport' | 'refork'`, `mappedClass`) plus `src/client/components/*.cssr.ts`: reforked geometry and official class mapping on this repo's `css-render` stack; official `.module.css` files are not copied.@@ -21,9 +23,9 @@ Derived (upstream → this package):- Official settings launcher seat (`ui-settings-general` `SettingsRoot` rendering the account menu) → `src/client/constants/index.ts` (`SETTINGS_TRIGGER_PRIORITY`), `src/client/ui/settings-trigger.tsx`: seat takeover keeping a host for the official account UI, plus the official dictionary strings for the sidebar "new session" button and the ungrouped workspace-group `+` (`new-session.utils.ts`, official `UNGROUPED_KEY`).- Official primitives variants `PermissionRow.selector`, `PermissionSelect`, `AgentPresetSeat` → `src/client/components/chip.tsx`: per-variant wrapping and the official `@container` query that `css-render` can only emit as a top-level raw rule.-## Schedule-detail refork (`0.2.1-alpha.1`)+## Historical schedule-detail refork (`0.2.1-alpha.1`)-- Release-matched revision: `ec48669f48ac81bac353fc646e7cf9c57241242f` from <https://github.com/deepseek-ai/deepseek-harness>.+- Historical source revision: `ec48669f48ac81bac353fc646e7cf9c57241242f` from <https://github.com/deepseek-ai/deepseek-harness>.- `packages/client/ui-schedule/src/client/DatePicker.tsx`, `ClockPicker.tsx` and `TaskManagerPage.module.css` → `src/client/components/date-picker.tsx`, `time-picker.tsx`, `picker-popover.tsx`, and the `SegmentedControl` underline variant: calendar/clock geometry, native anchored popovers, keyboard interaction and rule/history strip.- Date/calendar trigger uses the existing shared `Calendar` glyph because the installed official primitives do not export its calendar glyph; clock and chevrons use the public official exports. Recurring local tasks add minute-only clock precision to preserve the existing `HH:mm` host contract.- Existing `Checkbox` default geometry remains unchanged; `size="xs"` is a local compact extension for weekday options.@@ -67,7 +69,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.```-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The official primitives re-exports receive the StateDot restart fix without a local fork. InlineEditor is additive; no existing primitive export used here is removed.- The target adds the optional `shell.bottom` seat without changing the settings launcher, hero workspace, or panel seats used here. The composer `stats` split has no local replacement registration.diff --git a/packages/dsh-tauri-ui/package.json b/packages/dsh-tauri-ui/package.jsonindex 7e58c674..9409fd98 100644--- a/packages/dsh-tauri-ui/package.json+++ b/packages/dsh-tauri-ui/package.json@@ -35,6 +35,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-ui/src/client/components/official.tsx b/packages/dsh-tauri-ui/src/client/components/official.tsxindex fbc3e020..f1bbbe42 100644--- a/packages/dsh-tauri-ui/src/client/components/official.tsx+++ b/packages/dsh-tauri-ui/src/client/components/official.tsx@@ -27,7 +27,6 @@ export {Menu,Modal,Pill,- projectUserText,rankByName,ReadBlock,relativeTime,diff --git a/packages/dsh-tauri-ui/src/client/constants/index.ts b/packages/dsh-tauri-ui/src/client/constants/index.tsindex bf5f545e..c55d5877 100644--- a/packages/dsh-tauri-ui/src/client/constants/index.ts+++ b/packages/dsh-tauri-ui/src/client/constants/index.ts@@ -36,14 +36,6 @@ export const HERO_WORKSPACE_PRIORITY = -1*/export const NEW_SESSION_LABELS = ['新建会话', 'New session'] as const-/**- * 官方「未分组」分组行「+」的 aria-label(中英双语,逐字取自官方 ui-workspace 词典的- * `actions.newSession.aria` 与 `group.ungrouped` 组合)。- *- * 0.1.7 起分组行带 `data-row-key`,优先按行键判定;此文案只作为 ≤0.1.6 的退化判据。- */-export const UNGROUPED_NEW_SESSION_LABELS = ['在“未分组”中新建会话', 'New session in Ungrouped'] as const-/** 官方未分组分组行的行键:`workspace:` + 官方 `UNGROUPED_KEY`(后者为空串)。 */export const UNGROUPED_ROW_KEY = 'workspace:'diff --git a/packages/dsh-tauri-ui/src/client/index.ts b/packages/dsh-tauri-ui/src/client/index.tsindex 2c0359b7..3b9ec6eb 100644--- a/packages/dsh-tauri-ui/src/client/index.ts+++ b/packages/dsh-tauri-ui/src/client/index.ts@@ -30,7 +30,8 @@ export * from './utils/cssr'export * from './utils/style'export const name = PLUGIN_ID-export const inject = ['slots', 'layout', 'locale', 'sessions']+// cordis 的 ctx.get 只放行已注入服务;漏声明会让 uiSession/uiWorkspace 投影静默失效。+export const inject = ['slots', 'layout', 'locale', 'sessions', 'uiSession', 'uiWorkspace', 'workspaces']const COMPOSER_RESUME_EFFECT = `${PLUGIN_ID}: composer resume`const CONTINUE_NOTICE_EFFECT = `${PLUGIN_ID}: continue notice`diff --git a/packages/dsh-tauri-ui/src/client/register/hero-workspace.test.ts b/packages/dsh-tauri-ui/src/client/register/hero-workspace.test.tsindex d2a8c807..4e4dd8e2 100644--- a/packages/dsh-tauri-ui/src/client/register/hero-workspace.test.ts+++ b/packages/dsh-tauri-ui/src/client/register/hero-workspace.test.ts@@ -1,3 +1,4 @@+// @vitest-environment jsdom/*** register/hero-workspace.test.ts — 英雄区工作区选择控件接管的注册契约回归测试。*@@ -6,6 +7,9 @@* 未分组新建动作交给组件,并暴露目录流程槽的占用源(官方「添加工作区」入口据此决定是否出现)。*/import type { ClientContext } from 'dsh-tauri/client'+import type { SelectorHook } from '../types/selector'+import type { SessionListStateLike } from '../ui/hero-workspace.types'+import { act, cleanup, renderHook } from '@testing-library/react'import { afterEach, describe, expect, it, vi } from 'vitest'import { heroWorkspaceFeature } from './hero-workspace'@@ -22,6 +26,8 @@ const mocks = vi.hoisted(() => ({registrations: [] as Array<{ key: string, options: Record<string, unknown>, component: unknown }>,composerWorkspaceLess: true,workspaceServiceAvailable: true,+ sessions: undefined as { list: { getSnapshot: () => { current?: string }, subscribe: (listener: () => void) => () => void } } | undefined,+ sessionsService: undefined as { list: { getSnapshot: () => { current?: string }, subscribe: (listener: () => void) => () => void } } | undefined,}))vi.mock('../service/ungrouped-session', () => ({ startUngroupedSession: mocks.startUngroupedSession }))@@ -49,9 +55,12 @@ vi.mock('dsh-tauri/client', () => ({},}setup(controller, this, {- service: (name: string) => name === 'workspaces' && mocks.workspaceServiceAvailable- ? mocks.workspaceService- : undefined,+ get sessions() { return mocks.sessions },+ service: (name: string) => name === 'sessions'+ ? mocks.sessionsService+ : name === 'workspaces' && mocks.workspaceServiceAvailable+ ? mocks.workspaceService+ : undefined,has: () => mocks.composerWorkspaceLess,})return () => controller.dispose()@@ -81,6 +90,9 @@ function createCtx(options: { flowOccupied?: boolean } = {}) {}afterEach(() => {+ cleanup()+ mocks.sessions = undefined+ mocks.sessionsService = undefinedmocks.registrations.length = 0mocks.composerWorkspaceLess = truemocks.workspaceServiceAvailable = true@@ -150,6 +162,92 @@ describe('heroWorkspaceFeature', () => {dispose()})+ it.each(['sessions', 'sessionsService'] as const)('%s 的 current 投影随列表通知更新并在卸载时清理订阅', (source) => {+ let snapshot: SessionListStateLike = { current: 'session-first' }+ const listeners = new Set<() => void>()+ const unsubscribe = vi.fn((listener: () => void) => listeners.delete(listener))+ const list = {+ getSnapshot: vi.fn(() => snapshot),+ subscribe: vi.fn((listener: () => void) => {+ listeners.add(listener)+ return () => {+ unsubscribe(listener)+ }+ }),+ }+ mocks[source] = { list }+ if (source === 'sessions') {+ mocks.sessionsService = {+ list: {+ getSnapshot: vi.fn(() => ({ current: 'wrong-fallback-session' })),+ subscribe: vi.fn(() => () => {}),+ },+ }+ }+ const { ctx } = createCtx()+ const dispose = heroWorkspaceFeature.call(ctx)+ const injectFactory = mocks.registrations[0]!.options.inject as () => {+ useSessions: SelectorHook<SessionListStateLike>+ }+ const { useSessions } = injectFactory()+ const view = renderHook(() => useSessions(state => state.current))++ expect(view.result.current, '必须读取适配层列表投影,而非 ctx 或空快照').toBe('session-first')+ expect(list.getSnapshot).toHaveBeenCalled()+ expect(listeners.size, '挂载后必须订阅真实列表源').toBe(1)+ if (source === 'sessions') {+ expect(mocks.sessionsService!.list.getSnapshot, '直接 sessions 存在时不得读服务兜底').not.toHaveBeenCalled()+ expect(mocks.sessionsService!.list.subscribe).not.toHaveBeenCalled()+ }++ act(() => {+ snapshot = { current: 'session-next' }+ for (const listener of [...listeners])+ listener()+ })+ expect(view.result.current, '列表通知必须触发 current 投影重新渲染').toBe('session-next')++ act(() => {+ snapshot = {}+ for (const listener of [...listeners])+ listener()+ })+ expect(view.result.current, '清空当前会话后不得保留旧 current').toBeUndefined()+ expect(listeners.size, '重渲染不得叠加订阅').toBe(1)++ const activeListener = [...listeners][0]!+ const cleanupCount = unsubscribe.mock.calls.length+ view.unmount()+ expect(unsubscribe).toHaveBeenCalledTimes(cleanupCount + 1)+ expect(unsubscribe).toHaveBeenLastCalledWith(activeListener)+ expect(listeners.size, '卸载后列表不得保留订阅').toBe(0)+ dispose()+ })++ it('sessions 缺席时投影为空,服务晚到后重渲染读取 current', () => {+ const { ctx } = createCtx()+ const dispose = heroWorkspaceFeature.call(ctx)+ const injectFactory = mocks.registrations[0]!.options.inject as () => {+ useSessions: SelectorHook<SessionListStateLike>+ }+ const { useSessions } = injectFactory()+ const view = renderHook(() => useSessions(state => state.current))+ expect(view.result.current, '服务缺席时必须稳定投影空 current').toBeUndefined()++ const unsubscribe = vi.fn()+ const subscribe = vi.fn(() => unsubscribe)+ const snapshot = { current: 'session-late' }+ mocks.sessionsService = {+ list: { getSnapshot: () => snapshot, subscribe },+ }+ view.rerender()+ expect(view.result.current, '不得永久捕获创建适配层时缺席的服务').toBe('session-late')+ expect(subscribe).toHaveBeenCalledTimes(1)+ view.unmount()+ expect(unsubscribe).toHaveBeenCalledTimes(1)+ dispose()+ })+it('缺 composer 补丁时不接管:保留官方工作区选择器并告警', () => {const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})mocks.composerWorkspaceLess = falsediff --git a/packages/dsh-tauri-ui/src/client/register/hero-workspace.ts b/packages/dsh-tauri-ui/src/client/register/hero-workspace.tsindex 1a352627..53163e2e 100644--- a/packages/dsh-tauri-ui/src/client/register/hero-workspace.ts+++ b/packages/dsh-tauri-ui/src/client/register/hero-workspace.ts@@ -1,5 +1,8 @@-import type { AdapterWorkspaces, ClientAdapter, ClientContext } from 'dsh-tauri/client'+import type { AdapterSessions, AdapterWorkspaces, ClientAdapter, ClientContext } from 'dsh-tauri/client'+import type { SelectorHook } from '../types/selector'+import type { SessionListStateLike } from '../ui/hero-workspace.types'import { defineRegister } from 'dsh-tauri/client'+import { useSyncExternalStore } from 'react'import { PLUGIN_ID } from '../../shared/constants'import {HERO_WORKSPACE_FLOW_SLOT,@@ -38,6 +41,7 @@ export const heroWorkspaceFeature = defineRegister<ClientContext>((controller, cinject: () => ({createWorkspace: readCreateWorkspace(adapter),startUngrouped: () => startUngroupedSession(ctx, adapter),+ useSessions: selectSessionsFrom(adapter),hooks: { directoryFlow },}),} as never,@@ -51,3 +55,20 @@ function readCreateWorkspace(adapter: ClientAdapter): AdapterWorkspaces['create'const workspaces = adapter.service<AdapterWorkspaces>('workspaces')return workspaces?.create?.bind(workspaces)}++/**+ * 0.1.7 起核心把「当前会话」搬到 `uiSession`,适配层已把 `current` 投影回+ * `sessions.list` 快照;chip 靠该投影区分「未分组」与「尚未选工作区」。+ */+function selectSessionsFrom(adapter: ClientAdapter): SelectorHook<SessionListStateLike> {+ const absent: SessionListStateLike = {}+ return function useSessionList<S>(select: (state: SessionListStateLike) => S): S {+ const list = (adapter.sessions ?? adapter.service<AdapterSessions>('sessions'))?.list+ const read = (): SessionListStateLike => (list?.getSnapshot() ?? absent) as SessionListStateLike+ return select(useSyncExternalStore(+ listener => list?.subscribe(listener) ?? (() => {}),+ read,+ read,+ ))+ }+}diff --git a/packages/dsh-tauri-ui/src/client/register/new-session.test.ts b/packages/dsh-tauri-ui/src/client/register/new-session.test.tsindex 38e23415..aa2ece99 100644--- a/packages/dsh-tauri-ui/src/client/register/new-session.test.ts+++ b/packages/dsh-tauri-ui/src/client/register/new-session.test.ts@@ -285,19 +285,20 @@ describe('ungroupedNewSessionFeature', () => {dispose()})- it('≤0.1.6:没有 data-row-key 时退化按「未分组」文案命中', () => {+ it('没有 data-row-key 时不根据中英文文案接管按钮', () => {const dispose = ungroupedNewSessionFeature.call(ctx)const controller = mocks.controller as ControllerStub-- controller.click(clickEvent(plusIn(null, '在“未分组”中新建会话')))- expect(mocks.startUngroupedSession).toHaveBeenCalledTimes(1)-- controller.click(clickEvent(plusIn(null, 'New session in Ungrouped')))- expect(mocks.startUngroupedSession).toHaveBeenCalledTimes(2)+ const chinese = clickEvent(plusIn(null, '在“未分组”中新建会话'))+ const english = clickEvent(plusIn(null, 'New session in Ungrouped'))+ controller.click(chinese)+ controller.click(english)+ expect(mocks.startUngroupedSession).not.toHaveBeenCalled()+ expect(chinese.preventDefault).not.toHaveBeenCalled()+ expect(english.preventDefault).not.toHaveBeenCalled()dispose()})- it('≤0.1.6:真实工作区的「+」与侧边栏「新建会话」都不命中', () => {+ it('真实工作区的「+」与侧边栏「新建会话」都不命中', () => {const dispose = ungroupedNewSessionFeature.call(ctx)const controller = mocks.controller as ControllerStubdiff --git a/packages/dsh-tauri-ui/src/client/register/new-session.utils.test.ts b/packages/dsh-tauri-ui/src/client/register/new-session.utils.test.tsindex e7825eea..d2290185 100644--- a/packages/dsh-tauri-ui/src/client/register/new-session.utils.test.ts+++ b/packages/dsh-tauri-ui/src/client/register/new-session.utils.test.ts@@ -6,7 +6,7 @@* 文案逐字取自官方词典:sidebar `session.new.label`、workspace `actions.newSession.aria`。*/import { describe, expect, it } from 'vitest'-import { isNewSessionLabel, isUngroupedNewSessionLabel } from './new-session.utils'+import { isNewSessionLabel } from './new-session.utils'describe('isNewSessionLabel', () => {it('认官方侧边栏「新建会话」按钮的中英两条 aria-label', () => {@@ -30,26 +30,3 @@ describe('isNewSessionLabel', () => {expect(isNewSessionLabel('')).toBe(false)})})--/**- * ≤0.1.6 的退化判据:那两代分组行没有 `data-row-key`,只能靠官方词典里的- * 「未分组」新建会话文案识别(0.1.7 起按行键判定,见 `new-session.test.ts`)。- */-describe('isUngroupedNewSessionLabel', () => {- it('认官方「未分组」分组行「+」的中英两条 aria-label', () => {- expect(isUngroupedNewSessionLabel('在“未分组”中新建会话'), '官方中文文案').toBe(true)- expect(isUngroupedNewSessionLabel('New session in Ungrouped'), '官方英文文案').toBe(true)- })-- it('不认真实工作区的带名字文案与侧边栏「新建会话」', () => {- expect(isUngroupedNewSessionLabel('在“dsh-tauri-desktop”中新建会话')).toBe(false)- expect(isUngroupedNewSessionLabel('New session in dsh-tauri-desktop')).toBe(false)- expect(isUngroupedNewSessionLabel('新建会话')).toBe(false)- expect(isUngroupedNewSessionLabel('New session')).toBe(false)- })-- it('缺 aria-label 时不命中', () => {- expect(isUngroupedNewSessionLabel(null)).toBe(false)- expect(isUngroupedNewSessionLabel('')).toBe(false)- })-})diff --git a/packages/dsh-tauri-ui/src/client/register/new-session.utils.ts b/packages/dsh-tauri-ui/src/client/register/new-session.utils.tsindex 4d65c6e7..ffd69541 100644--- a/packages/dsh-tauri-ui/src/client/register/new-session.utils.ts+++ b/packages/dsh-tauri-ui/src/client/register/new-session.utils.ts@@ -1,4 +1,4 @@-import { NEW_SESSION_LABELS, UNGROUPED_NEW_SESSION_LABELS, UNGROUPED_ROW_KEY } from '../constants'+import { NEW_SESSION_LABELS, UNGROUPED_ROW_KEY } from '../constants'/** 官方侧边栏「新建会话」按钮的 aria-label 判据(品牌按钮与工具栏按钮共用同一条文案)。 */export function isNewSessionLabel(label: string | null): boolean {@@ -13,20 +13,6 @@ export function newSessionButtonFrom(target: unknown): Element | null {return button !== null && isNewSessionLabel(button.getAttribute('aria-label')) ? button : null}-/** 官方「未分组」分组行「+」的 aria-label 判据(仅 ≤0.1.6 需要,见 `ungroupedCreateButtonFrom`)。 */-export function isUngroupedNewSessionLabel(label: string | null): boolean {- return label !== null && (UNGROUPED_NEW_SESSION_LABELS as readonly string[]).includes(label)-}--/**- * 官方「未分组」分组行的「+」按钮。- *- * 官方 `onCreate` 在未分组桶(`group.workspaceId === undefined`)里是空实现,点击没有任何- * 效果;这里把该按钮识别出来,交给与侧边栏「新建会话」相同的未分组开会话路径。- *- * 0.1.7 起分组行带 `data-row-key`(未分组桶的行键为 `workspace:`),按行键判定最稳且与语言- * 无关;≤0.1.6 没有该属性,退化为官方词典里的「未分组」新建会话文案。- */export function ungroupedCreateButtonFrom(target: unknown): Element | null {if (!(target instanceof Element))return null@@ -34,7 +20,5 @@ export function ungroupedCreateButtonFrom(target: unknown): Element | null {if (button === null)return nullconst row = button.closest('[data-row-key]')- if (row !== null)- return row.getAttribute('data-row-key') === UNGROUPED_ROW_KEY ? button : null- return isUngroupedNewSessionLabel(button.getAttribute('aria-label')) ? button : null+ return row?.getAttribute('data-row-key') === UNGROUPED_ROW_KEY ? button : null}diff --git a/packages/dsh-tauri-ui/src/client/service/ungrouped-session.test.ts b/packages/dsh-tauri-ui/src/client/service/ungrouped-session.test.tsindex d286f5ed..b487f9af 100644--- a/packages/dsh-tauri-ui/src/client/service/ungrouped-session.test.ts+++ b/packages/dsh-tauri-ui/src/client/service/ungrouped-session.test.ts@@ -7,6 +7,7 @@* 不新造;目录解析失败时退回无参创建;失败只告警,不把 rejection 漏给 UI 调用点。*/import type { ClientContext, SessionId } from 'dsh-tauri/client'+import { defineAdapter } from 'dsh-tauri/client'import { afterEach, describe, expect, it, vi } from 'vitest'import { getUngrouped } from '../apis'import { startUngroupedSession } from './ungrouped-session'@@ -35,30 +36,36 @@ function createCtx(options: CtxOptions = {}) {const open = vi.fn()const selectPanel = vi.fn()const items = options.sessionIds === undefined ? [] : [{ sessionIds: options.sessionIds }]- const ctx = {- sessions: {- list: {- getSnapshot: () => ({- current: options.current,- byId: options.current === undefined- ? {}- : { [options.current]: { blank: options.blank ?? true, cwd: options.cwd ?? UNGROUPED_CWD } },- }),- },- create,- open,+ const sessions = {+ list: {+ getSnapshot: () => ({+ byId: options.current === undefined+ ? {}+ : { [options.current]: { blank: options.blank ?? true, cwd: options.cwd ?? UNGROUPED_CWD } },+ }),},+ create,+ }+ const services: Record<string, unknown> = {+ sessions,+ uiSession: { adapter: { current: { getSnapshot: () => ({ key: options.current }) } } },+ uiWorkspace: { openSession: open },+ workspaces: { list: { getSnapshot: () => ({ items }) } },+ }+ const ctx = {+ sessions,layout: { selectPanel },get: (name: string) => {- if (name !== 'workspaces' || options.workspacesAvailable === false)- return undefined- // inject-only 守卫的真实形态:未注入的服务名读属性即抛错。- if (options.workspacesThrows === true)- throw new Error('service "workspaces" is not injected')- return { list: { getSnapshot: () => ({ items }) } }+ if (name === 'workspaces') {+ if (options.workspacesAvailable === false)+ return undefined+ if (options.workspacesThrows === true)+ throw new Error('service "workspaces" is not injected')+ }+ return services[name]},} as unknown as ClientContext- return { ctx, create, open, selectPanel }+ return { ctx, adapter: defineAdapter(ctx), create, open, selectPanel }}afterEach(() => {@@ -68,9 +75,9 @@ afterEach(() => {describe('startUngroupedSession', () => {it('没有当前会话时新建:只带未分组目录,不带 workspaceId', async () => {- const { ctx, create, open, selectPanel } = createCtx()+ const { ctx, adapter, create, open, selectPanel } = createCtx()- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith('session-new'))expect(create, '必须落到 $DSH_HOME/ungrouped,而不是桌面壳进程的 cwd').toHaveBeenCalledWith({ cwd: UNGROUPED_CWD })@@ -78,53 +85,53 @@ describe('startUngroupedSession', () => {})it('当前会话已是「未分组目录下的空白会话」时复用,不再新造', async () => {- const { ctx, create, open } = createCtx({ current: UNGROUPED, blank: true })+ const { ctx, adapter, create, open } = createCtx({ current: UNGROUPED, blank: true })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith(UNGROUPED))expect(create).not.toHaveBeenCalled()})it('当前空白会话的 cwd 是核心安装目录(历史遗留)时另起一条,不复用', async () => {- const { ctx, create, open } = createCtx({ current: UNGROUPED, blank: true, cwd: OTHER_CWD })+ const { ctx, adapter, create, open } = createCtx({ current: UNGROUPED, blank: true, cwd: OTHER_CWD })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith('session-new'))expect(create).toHaveBeenCalledWith({ cwd: UNGROUPED_CWD })})it('当前空白会话已归属某工作区时另起一条未分组会话', async () => {- const { ctx, create, open } = createCtx({ current: GROUPED, blank: true, sessionIds: [GROUPED] })+ const { ctx, adapter, create, open } = createCtx({ current: GROUPED, blank: true, sessionIds: [GROUPED] })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith('session-new'))expect(create).toHaveBeenCalledWith({ cwd: UNGROUPED_CWD })})it('当前会话非空白时另起一条未分组会话', async () => {- const { ctx, create } = createCtx({ current: UNGROUPED, blank: false })+ const { ctx, adapter, create } = createCtx({ current: UNGROUPED, blank: false })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(create).toHaveBeenCalledTimes(1))})it('工作区服务读不到时按「无法判断」处理:复用当前空白会话', async () => {- const { ctx, create, open } = createCtx({ current: UNGROUPED, blank: true, workspacesAvailable: false })+ const { ctx, adapter, create, open } = createCtx({ current: UNGROUPED, blank: true, workspacesAvailable: false })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith(UNGROUPED))expect(create).not.toHaveBeenCalled()})it('工作区服务读取抛错(inject-only 守卫)时同样按「无法判断」处理,不阻断开会话', async () => {- const { ctx, create, open } = createCtx({ current: UNGROUPED, blank: true, workspacesThrows: true })+ const { ctx, adapter, create, open } = createCtx({ current: UNGROUPED, blank: true, workspacesThrows: true })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith(UNGROUPED))expect(create).not.toHaveBeenCalled()@@ -134,9 +141,9 @@ describe('startUngroupedSession', () => {const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})const failure = new Error('route down')vi.mocked(getUngrouped).mockRejectedValue(failure)- const { ctx, create, open } = createCtx()+ const { ctx, adapter, create, open } = createCtx()- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith('session-new'))expect(create).toHaveBeenCalledWith()@@ -145,9 +152,9 @@ describe('startUngroupedSession', () => {it('未分组目录为空串时同样退回无参创建', async () => {vi.mocked(getUngrouped).mockImplementation(async () => ({ cwd: ' ' }))- const { ctx, create, open } = createCtx()+ const { ctx, adapter, create, open } = createCtx()- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(open).toHaveBeenCalledWith('session-new'))expect(create).toHaveBeenCalledWith()@@ -159,9 +166,9 @@ describe('startUngroupedSession', () => {const failingCreate = async (): Promise<SessionId> => {throw failure}- const { ctx, open, selectPanel } = createCtx({ create: failingCreate })+ const { ctx, adapter, open, selectPanel } = createCtx({ create: failingCreate })- startUngroupedSession(ctx)+ startUngroupedSession(ctx, adapter)await vi.waitFor(() => expect(warn).toHaveBeenCalledWith(expect.stringContaining('未分组新建会话失败'), failure))expect(open).not.toHaveBeenCalled()diff --git a/packages/dsh-tauri-ui/src/client/service/ungrouped-session.ts b/packages/dsh-tauri-ui/src/client/service/ungrouped-session.tsindex 127fa7c8..990c211e 100644--- a/packages/dsh-tauri-ui/src/client/service/ungrouped-session.ts+++ b/packages/dsh-tauri-ui/src/client/service/ungrouped-session.ts@@ -2,7 +2,6 @@ import type { ClientAdapter, ClientContext, SessionId } from 'dsh-tauri/client'import { PLUGIN_ID } from '../../shared/constants'import { getUngrouped } from '../apis'-/** 会话列表快照中本服务读取的字段(`current` 在 0.1.7 由适配层投影补回)。 */interface ListSnapshotLike {current?: SessionIdbyId?: Record<string, { blank?: boolean, cwd?: string } | undefined>@@ -15,15 +14,11 @@ interface ListSnapshotLike {* 不显式传 `cwd` 时宿主退回 `process.cwd()`——桌面壳把该进程的 cwd 固定为核心安装目录* (版本切换时需持住目录句柄),未分组会话就会落进核心目录这一伪项目。目录由宿主在建会话* 前 `mkdir -p`,无需客户端预热;路由不可用时退回旧行为并告警。- *- * `adapter` 负责跨内核代的会话能力:`open` 在 ≤0.1.6 位于 `sessions`,0.1.7 收进- * `uiWorkspace.openSession`;列表快照的 `current` 在 0.1.7 也改由 `uiSession` 投影补回。- * 省略 `adapter` 时回退原生 `ctx.sessions`(旧内核与单测路径)。*/-export function startUngroupedSession(ctx: ClientContext, adapter?: ClientAdapter): void {+export function startUngroupedSession(ctx: ClientContext, adapter: ClientAdapter): void {void connectUngroupedSession(ctx, adapter).then((sessionId) => {- openSession(ctx, adapter, sessionId)+ adapter.openSession(sessionId)ctx.layout.selectPanel(null)},(reason: unknown) => {@@ -32,7 +27,7 @@ export function startUngroupedSession(ctx: ClientContext, adapter?: ClientAdapte)}-async function connectUngroupedSession(ctx: ClientContext, adapter?: ClientAdapter): Promise<SessionId> {+async function connectUngroupedSession(ctx: ClientContext, adapter: ClientAdapter): Promise<SessionId> {const cwd = await resolveUngroupedCwd()const current = snapshotOf(ctx, adapter).currentif (current !== undefined && isUngroupedBlank(ctx, adapter, current, cwd))@@ -42,7 +37,7 @@ async function connectUngroupedSession(ctx: ClientContext, adapter?: ClientAdaptfunction isUngroupedBlank(ctx: ClientContext,- adapter: ClientAdapter | undefined,+ adapter: ClientAdapter,sessionId: SessionId,cwd: string | undefined,): boolean {@@ -69,18 +64,8 @@ async function resolveUngroupedCwd(): Promise<string | undefined> {}}-/** 打开已有会话:适配层优先(0.1.7 走 `uiWorkspace.openSession`),缺席时回退原生成员。 */-function openSession(ctx: ClientContext, adapter: ClientAdapter | undefined, sessionId: SessionId): void {- if (adapter !== undefined) {- adapter.openSession(sessionId)- return- }- const native = ctx.sessions as unknown as { open?: (id: SessionId) => unknown }- native.open?.(sessionId)-}--function snapshotOf(ctx: ClientContext, adapter?: ClientAdapter): ListSnapshotLike {- const list = adapter?.sessions.list ?? ctx.sessions.list+function snapshotOf(ctx: ClientContext, adapter: ClientAdapter): ListSnapshotLike {+ const list = adapter.sessions.list ?? ctx.sessions.listreturn (list.getSnapshot() ?? {}) as ListSnapshotLike}diff --git a/packages/dsh-tauri-ui/src/host/service/session.test.ts b/packages/dsh-tauri-ui/src/host/service/session.test.tsindex 4163f4a2..a50ff8d4 100644--- a/packages/dsh-tauri-ui/src/host/service/session.test.ts+++ b/packages/dsh-tauri-ui/src/host/service/session.test.ts@@ -558,12 +558,12 @@ describe('session.resume', () => {expect(await session.resume('unknown')).toEqual({ ok: false, code: 404, error: '会话不存在或尚未运行' })})- it('reads the log through the legacy fallbacks', async () => {- const log = [turnEnd('aborted')]- setup({ session: { log } })- expect(await session.resume('s1')).toEqual({ ok: true })- setup({ session: { events: log } })- expect(await session.resume('s1')).toEqual({ ok: true })+ it('does not interpret removed log or events properties as current session history', async () => {+ const log = [turnEnd('completed')]+ for (const source of [{ log }, { events: log }]) {+ setup({ session: source })+ expect(await session.resume('s1')).toEqual({ ok: true })+ }})it('treats an unreadable log as continuable rather than blocking the user', async () => {diff --git a/packages/dsh-tauri-ui/src/host/service/session.ts b/packages/dsh-tauri-ui/src/host/service/session.tsindex feedeb62..16883dde 100644--- a/packages/dsh-tauri-ui/src/host/service/session.ts+++ b/packages/dsh-tauri-ui/src/host/service/session.ts@@ -273,7 +273,6 @@ function lastTurnEndKind(value: unknown): string | undefined {return typeof kind === 'string' ? kind : undefined}-/** 内核 `Session` 的日志面逐版本漂移:`snapshotEvents()` 为准,`log` / `events` 仅作兜底。 */function sessionEvents(value: unknown): readonly unknown[] | undefined {if (typeof value !== 'object' || value === null)return undefined@@ -284,9 +283,7 @@ function sessionEvents(value: unknown): readonly unknown[] | undefined {if (Array.isArray(snapshot))return snapshot}- if (Array.isArray(session.log))- return session.log- return Array.isArray(session.events) ? session.events : undefined+ return undefined}/** 模型可见表面节点(`surface.nodes`);内核缺这一面时恢复必须退化为人工提示。 */diff --git a/packages/dsh-tauri-worktree/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri-worktree/THIRD_PARTY_NOTICES.mdindex 52e58521..feb7c1a4 100644--- a/packages/dsh-tauri-worktree/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri-worktree/THIRD_PARTY_NOTICES.md@@ -3,10 +3,12 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`-- Catalog pin: `dsh:` → `0.2.1-alpha.1` (`pnpm-workspace.yaml`)+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.+- Catalog pin: `dsh:` → `0.2.1-rc.1` (`pnpm-workspace.yaml`)- License: MIT — Copyright (c) 2026 DeepSeek- Not copied: the per-session Git worktree is this repo's own feature; only the official Host and client contracts below are relied on.@@ -17,7 +19,7 @@ Integration points:- Official composer DOM: send interception depends on the official composer's private DOM because no pre-submit hook exists (`src/client/components/mode-select.tsx:104`); file uploads wait for readiness exactly as the official composer disables send while it is not ready.- Ordinary session titles: refreshed once per session via the official entry, matching the kernel's own timing.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The target preserves semantic drafts as text plus reference identities. Worktree transfer and rollback now capture the resident input shell draft before clearing the source, restore the complete semantic document, and flush the mounted persistence action when present.- Structured input is detected by `SessionInputShell.draftSnapshot`; when the composer exposes `persistDraft` but its semantic snapshot is unavailable, transfer stops before creating the target or clearing the source. Old kernels retain the plain-text action path. Attachments remain under their existing owner and retain the existing capture/recreate/upload checks.diff --git a/packages/dsh-tauri-worktree/package.json b/packages/dsh-tauri-worktree/package.jsonindex d9f63a26..4c312eef 100644--- a/packages/dsh-tauri-worktree/package.json+++ b/packages/dsh-tauri-worktree/package.json@@ -31,6 +31,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri-worktree/src/host/service/handoff.test.ts b/packages/dsh-tauri-worktree/src/host/service/handoff.test.tsindex 470497a3..f77eab83 100644--- a/packages/dsh-tauri-worktree/src/host/service/handoff.test.ts+++ b/packages/dsh-tauri-worktree/src/host/service/handoff.test.ts@@ -99,10 +99,7 @@ describe('handoff API', () => {describe('handoff.inherit', () => {it.each(['codex', 'claude'] as const)('preserves the official %s fork binding without injecting a desktop handoff message', async (backend) => {- const packageId: string = 'dsh-session-current'- const kernel = await import(packageId) as typeof import('@deepseek-ai/dsh-session') & {- appendPluginRecord: (value: Session, type: 'plugin:dsh-tauri-kernel/kernel', data: { backend: 'codex' | 'claude', nativeSessionId: string, sessionId: string }) => number- }+ const kernel = await import('@deepseek-ai/dsh-session')const context = new Context()try {const sessions = new kernel.SessionStore(context)@@ -699,19 +696,14 @@ describe('handoff.inherit', () => {expect(pendingWorktreeTitles.size).toBe(0)})- it('reads the log through the legacy fallbacks', async () => {- const legacy = [- { id: 'session-source', header: {}, log: conversationEvents },- { id: 'session-source', header: {}, events: conversationEvents },- ]- for (const session of legacy) {- const { created } = setup({ session })+ it('does not seed inherited sessions from removed log or events properties', async () => {+ for (const source of [{ log: conversationEvents }, { events: conversationEvents }]) {+ const { created } = setup({ session: { id: 'session-source', header: {}, ...source } })expect(await handoff.inherit('session-source', 'session-target', 'C:/work')).toEqual({- ok: true,- targetSessionId: 'session-target',- seedLength: conversationEvents.length,+ ok: false,+ error: '源会话没有可继承的事件:session-source',})- expect(created[0]?.seed).toEqual(conversationEvents)+ expect(created).toHaveLength(0)}})diff --git a/packages/dsh-tauri-worktree/src/host/service/handoff.ts b/packages/dsh-tauri-worktree/src/host/service/handoff.tsindex 43a84d67..c82171b2 100644--- a/packages/dsh-tauri-worktree/src/host/service/handoff.ts+++ b/packages/dsh-tauri-worktree/src/host/service/handoff.ts@@ -189,7 +189,6 @@ async function createAgent(return { handle, seed: inheritedSeed }}-/** 内核 0.1.2-rc.1 移除 events,旧版本以 log/events 兼容。 */function sessionEvents(value: unknown): readonly unknown[] {if (typeof value !== 'object' || value === null)return []@@ -200,7 +199,5 @@ function sessionEvents(value: unknown): readonly unknown[] {if (Array.isArray(snapshot))return snapshot}- if (Array.isArray(session.log))- return session.log- return Array.isArray(session.events) ? session.events : []+ return []}diff --git a/packages/dsh-tauri/THIRD_PARTY_NOTICES.md b/packages/dsh-tauri/THIRD_PARTY_NOTICES.mdindex 5d6e0832..4dbb26f3 100644--- a/packages/dsh-tauri/THIRD_PARTY_NOTICES.md+++ b/packages/dsh-tauri/THIRD_PARTY_NOTICES.md@@ -3,9 +3,11 @@## deepseek-ai/deepseek-harness- Repository: <https://github.com/deepseek-ai/deepseek-harness>-- Version: `dsh-v0.2.1-alpha.1`-- Revision: `5badb15009ae1756c3afe0ae0cef1faafc290ccc`+- Reference version: `dsh-v0.2.1-rc.1`+- Reference revision: `1600d8a1e140dcde43a1a0941940a0480712c011`+- Previous documented reference: `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`); retained as historical attribution, not a claim that this release recopies or revalidates every derived file.- Source: `source/deepseek-harness`+- Support policy: recommended core `0.2.1-rc.1`, minimum core `0.1.7-rc.1`; earlier cores are unsupported. Verification scope: [current compatibility record](<../dsh-tauri/docs/compatibility-0.2.1-rc.1.md>). Earlier version comparisons below are historical, not a current support promise.- License: MIT — Copyright (c) 2026 DeepSeekDerived (upstream → this package):@@ -24,7 +26,7 @@ Note:- The account-stream carrier gate and the sidebar/DOM contracts mirrored here survived `0.2.0-rc.1` → `0.2.0-rc.2` unchanged; `dshDesktop` still reports `protocolVersion: 1` with the optional `deviceInfo` member, and `DESKTOP_HOST_PROTOCOL_VERSION` stays `4`.-## Compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`+## Historical compatibility `0.2.0-rc.2` → `0.2.1-alpha.1`- The account watch, carrier marker, index injection union, and connection authentication gates remain unchanged from `0.2.0-rc.2` to `0.2.1-alpha.1`.- The target still uses desktop product protocol `1` and desktop host protocol `4`; no Electron product API is added to the Tauri marker.diff --git a/packages/dsh-tauri/docs/compatibility-0.2.1-alpha.1.md b/packages/dsh-tauri/docs/compatibility-0.2.1-alpha.1.mdindex b9b9d92f..b313a330 100644--- a/packages/dsh-tauri/docs/compatibility-0.2.1-alpha.1.md+++ b/packages/dsh-tauri/docs/compatibility-0.2.1-alpha.1.md@@ -1,5 +1,7 @@# Harness 0.2.1-alpha.1 兼容核对+> 历史记录:下文中的「本轮」「默认推荐」、旧内核车道和验证数量只描述 alpha.1 当时状态,不是当前支持承诺。当前推荐 `0.2.1-rc.1`、最低支持 `0.1.7-rc.1`,见[当前兼容记录](<./compatibility-0.2.1-rc.1.md>);原核对区间、来源 SHA 与历史结果保留不改。+本轮只推进必须兼容的 Harness 源码与开发依赖基线,不同步其他 `source/` 仓库或桌宠资产;默认推荐内核仍为 rc.2,避免普通用户收到 alpha 更新提示。## 版本与来源diff --git a/packages/dsh-tauri/docs/compatibility-0.2.1-rc.1.md b/packages/dsh-tauri/docs/compatibility-0.2.1-rc.1.mdnew file mode 100644index 00000000..3f60259c--- /dev/null+++ b/packages/dsh-tauri/docs/compatibility-0.2.1-rc.1.md@@ -0,0 +1,38 @@+# Harness 0.2.1-rc.1 兼容记录++## 当前支持范围与来源++- 当前推荐与开发核对基线:`dsh-v0.2.1-rc.1`,`1600d8a1e140dcde43a1a0941940a0480712c011`;本地[对照源码](<../../../source/deepseek-harness>)已切至该提交。+- 最低支持内核仍为 `dsh-v0.1.7-rc.1`,`46a7f68b0922371ce7144b668b90e377d8e799f4`。更早内核不再支持;历史日志和派生来源不构成支持承诺。+- 已核实的推荐打包 tag:`dsh-0.2.1-rc.1-39009013600`,build ID `39009013600`。源码 tag 与打包 tag 独立登记,不从版本号推算 build ID。+- 上一声明/开发基线为 `dsh-v0.2.1-alpha.1`(`5badb15009ae1756c3afe0ae0cef1faafc290ccc`),不复用其通过数量。更早的 [alpha.1 记录](<./compatibility-0.2.1-alpha.1.md>)只对其原核对区间成立。++## 定点静态核对++下表 10 个文件只证明接口或 DOM 锚点存在,不证明整个派生源码树相同,也不替代运行验证。++| 接缝 | 本次回读文件与约束 |+| --- | --- |+| 桌面载体 | [host protocol](<../../../source/deepseek-harness/apps/desktop/src/host-protocol.ts#L4>) 与 [preload](<../../../source/deepseek-harness/apps/desktop/src/preload-app.ts#L13-L58>):host protocol `4`、产品 `protocolVersion: 1`;不伪造未实现的 Electron 能力。 |+| index 注入 | [injections](<../../../source/deepseek-harness/packages/host/webserver/src/injections.ts#L15-L104>):保留六类注入行及末尾 `__DSH_BOOT_READY__` 就绪流程。 |+| 鉴权 | [Connection](<../../../source/deepseek-harness/packages/client/connection/src/rpc.ts#L227-L266>)、[宿主实现](<../../../source/deepseek-harness/packages/client/connection/src/rpc-host.ts#L123-L136>)、[静态入口](<../../../source/deepseek-harness/packages/host/frontend-static/src/index.ts#L85-L90>)、[open-in-app](<../../../source/deepseek-harness/packages/host/open-in-app/src/index.ts#L184-L190>):保留 `requestRejection` / `authorizeIndex`、Host/Origin 与存活 Peer 检查;嵌入免登录不放宽 `403` 或正常 Cookie 车道。 |+| 会话 DOM | [ChatNodeSeat](<../../../source/deepseek-harness/packages/client/ui-chat/src/client/chat/ChatNodeSeat.tsx#L145-L160>) 与 [ChatGroupSeat](<../../../source/deepseek-harness/packages/client/ui-chat/src/client/chat/ChatGroupSeat.tsx#L185-L199>):沿用语义 flow/node/group/anchor 锚点,不把私有 class 当稳定接口。 |+| 语义草稿 | [输入 facade](<../../../source/deepseek-harness/packages/client/ui-conversation/src/client/input/facade.ts#L272-L283>):保留 `draftSnapshot` 与 `persistCurrentDraft()`,失败时不先清除来源草稿。 |++## 声明与派生来源++根[声明索引](<../../../THIRD_PARTY_NOTICES.md>)中 Harness source 行及各包当前参考版本为 rc.1,保留 alpha.1 等历史派生来源与 [Scheduler 声明](<../../dsh-tauri-scheduler/THIRD_PARTY_NOTICES.md#L45-L65>)的 `ec48669f48ac81bac353fc646e7cf9c57241242f`,未宣称重新复制所有文件。++推荐版本不代替最低版本:15 个具 `dsh` 元数据的运行插件仍以根级 `engines.dsh: ">=0.1.7-rc.1"` 声明支持下限;[最低版本回归](<../../../test/plugin-version-baseline.test.ts>)读取真实清单、检查精确范围与 `includePrerelease` 准入,允许 floor / rc.1、排除 `0.1.6` 和低于 floor 的同代预发布;不证明最低内核完整运行通过。私有聚合包 `dsh-tauri-bundle` 与纯构建包 `dsh-tauri-tsdown` 不在这 15 个运行插件内。固定规范不改;依赖实际解析以 [workspace 配置](<../../../pnpm-workspace.yaml>)与 [lockfile](<../../../pnpm-lock.yaml>)为准。++## 验证与限制++- 最低版本声明、打包元数据、导航和配置契约共 5 个文件 / 158 项,shuffle seed `73411`、`73412`、`73413`、`73414`、`73415` 连续通过,其中最低声明回归为 121 项。+- 客户端适配与内置插件定向回归 47 个文件 / 1023 项,shuffle seed `1701`、`1707`、`1717`、`1723`、`1733` 连续通过;后续 scheduler 收尾回归 34 个文件 / 809 项,seed `1801`、`1807`、`1817`、`1823`、`1831` 连续通过。两组有重叠,不合并为全量计数。+- 发布版 CLI `0.1.7-rc.1` 与 `0.2.1-rc.1` 的真实宿主鉴权定向回归均通过,覆盖拒绝、嵌入连接、解绑恢复以及 Host/Origin 限制;这不等于两端完整浏览器套件通过。+- “更多”页回退定向回归 2 个文件 / 15 项,shuffle seed `4301`–`4305` 连续通过。布局、会话当前项和 scheduler setup 的临时变异均被相应回归拦截,恢复后重新通过。+- 版本、档案及核心更新前端回归 14 个文件 / 236 项,shuffle seed `17091`–`17095` 连续通过,含原生完整错误前缀的字符串与 `Error` 两种返回;五类临时变异均被拦截。+- 原生本地更新及设置回写焦点回归 4 组 / 每轮 44 项,轮换顺序连续五轮通过,共 220 项执行,含 55 次隔离子进程场景。旧快照覆盖选核与活动本地核心原位更新均先取得真实红测;成功、失败、转换锁等待/持有以及受管核心缺失或版本不支持均使用独占临时目录与假包管理器验证,不执行真实 npm。临时撤除更新前的 App 固定后,成功更新场景按预期变红;恢复后旧快照用例和 11 个隔离场景重新通过。+- Native 前端 16 个文件 / 586 项,shuffle seed `73501`–`73505` 连续通过;测试隔离、构建新鲜度及升级保护 5 个文件 / 82 项,seed `601`–`605` 连续通过,人工集成的非法配置及 CI 禁入另有真实配置加载失败验证。++本地未执行插件 Build。源码已变更后的旧插件和桌面产物会被 freshness gate 拒绝;完整浏览器套件、真实桌面几何/启动隔离及三平台原生结果待 PR CI 重建后确认。Windows 全量单测记录为 5902 通过、13 失败、6 pending(5921 总项);13 项失败均在 remote 测试,涉及 POSIX `tar`、`438` / `384` 文件模式、symlink `EPERM`、Git Bash Windows 路径及 shim 执行位限制。相关 bootstrap 安装布局失败亦已独立复现,不将这些失败、定点源码回读或上述定向通过记为全量通过,也不据此宣称派生文件相同。diff --git a/packages/dsh-tauri/docs/sync-log.md b/packages/dsh-tauri/docs/sync-log.mdindex cefef68c..85488bf4 100644--- a/packages/dsh-tauri/docs/sync-log.md+++ b/packages/dsh-tauri/docs/sync-log.md@@ -6,11 +6,19 @@## 当前状态-- 已采纳基线:`dsh-v0.2.1-alpha.1`(`5badb15009a`)-- 上一声明/依赖基线:`dsh-v0.2.0-rc.2`(`639ed015397`);原实际 gitlink 为 `aa8262e`,本轮纠正。-- 当前依赖:DSH `0.2.1-alpha.1` 与配套 Cordis `4.0.5-alpha.1`,Group / Include / Loader peers 显式一致。-- 本轮逐包契约、七类接缝、验证范围与回滚依据:[兼容核对](./compatibility-0.2.1-alpha.1.md)。-- 默认推荐与回退仍为 rc.2:`dsh-0.2.0-rc.2-36556493178`;兼容目标产物已核实为 `dsh-0.2.1-alpha.1-37117505103`,供显式选择。+- 当前兼容与推荐基线:`dsh-v0.2.1-rc.1`(`1600d8a1e140dcde43a1a0941940a0480712c011`)。+- 最低支持内核:`dsh-v0.1.7-rc.1`(`46a7f68b0922371ce7144b668b90e377d8e799f4`);更早内核不再支持。+- 已核实的推荐打包产物:`dsh-0.2.1-rc.1-39009013600`,build ID `39009013600`;上游源码 tag 与打包 tag 分开登记,不由版本号推算 build ID。+- 当前核对范围与验证边界:[0.2.1-rc.1 兼容记录](<./compatibility-0.2.1-rc.1.md>)。开发依赖与配套 peers 以 [workspace 配置](<../../../pnpm-workspace.yaml>)、[lockfile](<../../../pnpm-lock.yaml>) 为准。+- 下列内容及其他旧兼容日志不扩展当前支持范围;历史「逐字节相同」与通过数量只对各自已记录区间成立。++## 0.2.1-alpha.1 历史记录++- 当时已采纳基线:`dsh-v0.2.1-alpha.1`(`5badb15009a`)。+- 当时上一声明/依赖基线:`dsh-v0.2.0-rc.2`(`639ed015397`);原实际 gitlink 为 `aa8262e`,该轮纠正。+- 当时依赖:DSH `0.2.1-alpha.1` 与配套 Cordis `4.0.5-alpha.1`,Group / Include / Loader peers 显式一致。+- 该轮逐包契约、七类接缝、验证范围与回滚依据:[历史兼容核对](<./compatibility-0.2.1-alpha.1.md>)。+- 当时默认推荐与回退仍为 rc.2:`dsh-0.2.0-rc.2-36556493178`;该轮兼容目标产物核实为 `dsh-0.2.1-alpha.1-37117505103`,供显式选择。## 0.2.0-rc.1 → 0.2.0-rc.2 历史记录@@ -20,7 +28,7 @@- 同步范围:187 commits(140 非 merge),1022 文件(+33253 / −6141)- 登记 `pnpm-workspace.yaml` `catalogs.dsh` 全部钉 `0.2.0-rc.2`-## 已核对的载体契约(逐字节未变)+### 该轮已核对的载体契约(逐字节未变)- 鉴权闸门:`packages/client/connection/src/{rpc,rpc-host,browser-auth}.ts`、`packages/host/frontend-static/src/index.ts`、`packages/host/open-in-app/src/index.ts` 与 0.2.0-rc.1 逐字节相同 → `src/host/service/gate.ts` 覆写的 `requestRejection` / `authorizeIndex` 无需改动。- index 注入行:`packages/host/webserver/src/{index,injections}.ts` 逐字节相同(上游导出名为 `IndexInjection`,本地自定名 `IndexInjectRow`,`kind: 'global' | 'script'` 语义不变)→ `src/host/types/harness.ts` 契约不变。@@ -30,13 +38,13 @@上述 10 个契约源文件在 0.2.0-rc.1 → 0.2.0-rc.2 区间内 blob SHA 完全相等(不是「空 diff」,是同一份对象);变化的只有各包 `package.json` 的 `version` 串。区间内也没有新增 `engines` / peer 要求,没有新增 workspace 包(`git diff --diff-filter=A -- '**/package.json'` 为空)。-## 本次采纳+### 该轮采纳- **载体契约基线推进**至 `0.2.0-rc.2`:187 commits 全部落在内核侧,宿主契约零改动,本地只跟随版本基线 —— 子模块指针、`pnpm-workspace.yaml` 的 `catalogs.dsh`(25 条)与 `minimumReleaseAgeExclude`、`pnpm-lock.yaml`、12 份 `THIRD_PARTY_NOTICES.md`、3 份 README 徽章、`src/{host,client}/types/harness.ts` 的【基准】注释、`src-tauri/resources/manifest.jsonc` 的 `engines.dsh.recommend`(`minimum` 仍为 `0.1.5-rc.1`;插件矩阵的 `"dsh": "^0.2.0-rc.1"` 无需改,同一 0.2.0 代际已被 `^` 覆盖)。- **推荐版本与回退 tag 分离**:`RECOMMENDED_DSH_VERSION` 随基线推进到 `0.2.0-rc.2`;回退 tag 命名的是**打包仓库的 release**,在打包仓库尚未产出 rc.2 之前不能杜撰 buildId。打包仓库已于 2026-09-29T11:36:07Z 发布 `Release-0.2.0-rc.2`(tag `dsh-0.2.0-rc.2-36556493178`,四个平台 zip 资产齐备),故本次把 `FALLBACK_DSH_TAG` 一并推进到 `dsh-0.2.0-rc.2-36556493178`。解析不到推荐版本时 `pickReleaseTag` 会带 note 回退到最新稳定 release,安装链路不受影响。两个常量此前同值、掩盖了这一区别,分离后有两处测试需要显式化:`version.test.ts` 的「pin 不可解析」用例改为显式传 `recommended`(不再隐式依赖常量当前值),`bootstrap.test.ts` 的「release 列表获取失败」用例改为断言 `FALLBACK_DSH_TAG`(该路径确实取回退 tag,而不是推荐 tag)。- **模型选择器搜索姿态移植**(rc.2 release note 的另一条):上游把搜索做在核心自有的 `ui-model-selection` 上(共享 popup 契约新增 `searchMode: 'fuzzy-label'` 与 `searchLabels`,算法复用既有的 `rankByName`),本地没有该选择器的实现 —— 桌面壳对核心那份只打 `src-tauri/src/service/patch/model_selection.rs` 的失焦补丁 —— 故择优落到本仓自有的候选模型选择器 `packages/dsh-tauri-model/src/client/models/ModelListEditor.tsx`:过滤由 `includes` 换成复用已装 primitives 的 `rankByName`,搜索框支持 ArrowUp / ArrowDown(环绕)、Home / End、Enter 切换当前行、Escape 关闭,当前行高亮并滚入视图。该包的派生源 `packages/client/ui-settings-models/` 在本区间零代码变更(只有 `package.json` 版本串),逐条登记见其 `THIRD_PARTY_NOTICES.md`。-## 本轮归档(不实施)+### 该轮归档(不实施)- **Windows 标题栏 / 全屏 DOM 契约**:0.2.0 起 `ui-layout` / `ui-dockkit` / `ui-sidebar-right` 依赖 `html[data-windows-titlebar][data-fullscreen]` 与 `--dsh-windows-titlebar-height`;官方由 Electron preload 提供(`apps/desktop/src/preload-windows.ts:12-13`、`preload-platform.ts:30-31`)。本地壳不设这些属性,仅在 Windows 全屏时浮动层/遮罩保留顶栏内边距(视觉偏移,不影响功能)。- **`dshDesktop.deviceInfo` 的设备指纹**:官方 `readDeviceInfo()` 输出 `platform; os; app_arch; cpu; memory_gib`;本地按要求只用 `navigator.userAgent`。@@ -44,7 +52,7 @@- **Electron 专属适配**:`macos-entitlements.plist`(本地由 `src-tauri/Entitlements.plist` + `Info.plist` 覆盖)、koffi 版本 pin(本地运行时从已装内核动态读取;本次区间上游 `apps/desktop-host/package.json` 才把 `koffi: ^3.1.0` 提为直接依赖,本地仍不 pin)、`scripts/verify-npm-install-layout.ts`、`scripts/install-lefthook.mjs`(本地无 lefthook)、`scripts/smoke-python-runtime.py`(本地无 Python SDK)。- **上游专属依赖升级**:区间内上游根 `pnpm-workspace.yaml` 把 `@earendil-works/pi-ai` / `pi-telemetry` 0.85.1 → 0.87.1 并同步 `patchedDependencies`(`6ed596f71b chore(deps): upgrade pi-ai to 0.87.1`)。上游根无 `catalog:` 块,与本地 `catalogs.dsh` 无关,不跟随。该升级即 rc.2 release note 的「第三方模型目录与兼容适配」,对本地无待办:没有任何本地包枚举 pi-ai 的 compat 字段(`deferredToolsMode` / `supportsToolReferences` / `supportsMidConvo*` / `sessionAffinityFormat` / `mistral-conversations` 全仓 0 命中),`dsh-tauri-model` 的 `model-compat.ts` 写的仍是 0.87.1 未变的 `thinkingFormat` / `chatTemplateKwargs` / `supportsDeveloperRole`,第三方模型目录取自 LiteLLM 实时索引而非 pi-ai 内置 id。-## 有意保留的差异+### 该轮有意保留的差异- `src/host/service/gate.ts` 覆写两道鉴权闸门以适配本地嵌入式 WebView,上游只定义 `connection` 闸门语义;该差异在本次区间内零冲突。- 只发布 `{ protocolVersion: 1, deviceInfo }`,不伪造 Electron 的 `updates` / `browser` 产品 API。diff --git a/packages/dsh-tauri/package.json b/packages/dsh-tauri/package.jsonindex bc5ad8e4..af657252 100644--- a/packages/dsh-tauri/package.json+++ b/packages/dsh-tauri/package.json@@ -35,6 +35,9 @@"cordis.patch.yml","dist"],+ "engines": {+ "dsh": ">=0.1.7-rc.1"+ },"dsh": {"client": {"inject": [diff --git a/packages/dsh-tauri/src/client/apply.test.ts b/packages/dsh-tauri/src/client/apply.test.tsindex 9046e6a1..3f3ffd4f 100644--- a/packages/dsh-tauri/src/client/apply.test.ts+++ b/packages/dsh-tauri/src/client/apply.test.ts@@ -180,7 +180,8 @@ describe('apply', () => {const create = vi.fn(async () => ({ workspaceId: 'ws-1' }))const ctx = Object.assign(fakeCtx(env.labels), {layout: { toggleSidebar },- workspaces: { startSession, pickDirectory, create },+ workspaces: { create },+ uiWorkspace: { startSession, pickDirectory },})apply(ctx)diff --git a/packages/dsh-tauri/src/client/register/index.adapter.test.ts b/packages/dsh-tauri/src/client/register/index.adapter.test.tsindex 8d5ff937..8537e233 100644--- a/packages/dsh-tauri/src/client/register/index.adapter.test.ts+++ b/packages/dsh-tauri/src/client/register/index.adapter.test.ts@@ -1,22 +1,8 @@-/**- * register/index.adapter.test.ts — DSH 升级迁移适配层的边界测试。- *- * 覆盖:modern / legacy 两种服务布局的世代探测与投影、方法 this 绑定与 list 引用稳定性、- * Cordis inject 守卫抛错与属性回退、DOM 退级与「不可用」明确回报、`addWorkspace` 全流程与- * 用户取消、自定义迁移的追加顺序、单条迁移失败不中断装配。- *- * 用例只用 `ctx.get` / `ctx[name]` 的返回形态构造上下文(与真实探测路径一致);- * DOM 依赖用 `vi.stubGlobal('document', …)` 提供最小假实现(仓库未装 jsdom)。- */import type { AdapterAddWorkspaceRuntime, AdapterRuntimeObject, ClientAdapter, DshMigration } from './index'import { afterEach, describe, expect, it, vi } from 'vitest'import { defineAdapter } from './index'-/** 假 ObservableSnapshot(`list.subscribe` / `list.getSnapshot`)。 */-function makeList(snapshot: unknown = { ids: [] }): {- getSnapshot: ReturnType<typeof vi.fn>- subscribe: ReturnType<typeof vi.fn>-} {+function makeList(snapshot: unknown = { ids: [] }) {const listeners = new Set<() => void>()return {getSnapshot: vi.fn(() => snapshot),@@ -27,33 +13,26 @@ function makeList(snapshot: unknown = { ids: [] }): {}}-/** 只带 `ctx.get` 的最小客户端上下文(探测完全基于它的返回形态)。 */function makeContext(services: Record<string, unknown>): unknown {return { get: (name: string) => services[name] }}-/** 可变 ObservableSnapshot:测试里能主动 publish,验证投影的订阅扇出与引用稳定。 */-function makeLiveList<T>(initial: T): {- getSnapshot: () => T- subscribe: (listener: () => void) => () => void- publish: (next: T) => void-} {+function makeLiveList<T>(initial: T) {let value = initialconst listeners = new Set<() => void>()return {getSnapshot: () => value,- subscribe: (listener) => {+ subscribe: (listener: () => void) => {listeners.add(listener)return () => listeners.delete(listener)},- publish: (next) => {+ publish: (next: T) => {value = nextfor (const listener of [...listeners]) listener()},}}-/** 非空收窄(tsc / lint 友好的断言辅助,不用 `!`)。 */function requireAddWorkspace(adapter: ClientAdapter): AdapterAddWorkspaceRuntime {const runtime = adapter.resolveAddWorkspace()if (runtime === undefined)@@ -61,7 +40,6 @@ function requireAddWorkspace(adapter: ClientAdapter): AdapterAddWorkspaceRuntimereturn runtime}-/** 每个用例一个安静告警出口:只记录,不打印。 */function makeWarn() {return vi.fn<(message: string, error?: unknown) => void>()}@@ -71,188 +49,154 @@ afterEach(() => {vi.restoreAllMocks()})-describe('defineAdapter — 世代探测与内置迁移', () => {- it('modern 布局:sessions.list 即投影,导航与目录选择都在 workspaces', () => {+describe('defineAdapter — supported client services', () => {+ it('projects official session lists and uiWorkspace navigation without legacy migrations', () => {const sessionsList = makeList()const workspacesList = makeList()const adapter = defineAdapter(makeContext({sessions: { list: sessionsList },- workspaces: {- list: workspacesList,- create: vi.fn(),- pickDirectory: vi.fn(),- startSession: vi.fn(),- },+ workspaces: { list: workspacesList, create: vi.fn() },+ uiWorkspace: { pickDirectory: vi.fn(), startSession: vi.fn() },}))expect(adapter.generation).toBe('modern')- // 工作区导航投影无条件安装、候选能力在调用期解析:判定「uiWorkspace 创建期在不在场」- // 会让晚激活的服务永远接不上(issue #756),因此 modern 布局同样装上投影。- expect(adapter.migrations).toContain('services:auto-bind')- expect(adapter.migrations).toContain('sessions:list-projection')- expect(adapter.migrations).toContain('legacy:workspaces-navigation')- expect(adapter.migrations).not.toContain('sessions:provide-info-bridge')- expect(adapter.migrations).toContain('navigation:resolve-start-session')- expect(adapter.migrations).toContain('workspace:resolve-add-workspace')+ expect(adapter.migrations).toEqual([+ 'services:auto-bind',+ 'sessions:list-projection',+ 'sessions:current-projection',+ 'workspaces:navigation',+ 'navigation:resolve-start-session',+ 'sessions:open-bridge',+ 'workspace:resolve-add-workspace',+ ])expect(adapter.failures).toEqual([])-- // 顶层别名是同一份 feed 的转发(老写法读 ctx.sessions.getSnapshot 也能用)expect(adapter.sessions.getSnapshot?.()).toEqual({ ids: [] })expect(adapter.sessions.list?.getSnapshot()).toEqual({ ids: [] })-expect(adapter.has('sessions.list')).toBe(true)expect(adapter.has('workspaces.list')).toBe(true)expect(adapter.has('workspaces.create')).toBe(true)expect(adapter.has('navigation.startSession')).toBe(true)expect(adapter.has('navigation.addWorkspace')).toBe(true)- // modern 的 sessions 面没有 legacy 的 per-session 查询,且无 uiSession 桥可用expect(adapter.has('sessions.provideInfo')).toBe(false)})- it('legacy 布局:uiWorkspace 提供导航与目录选择,sessions 嵌套投影被补齐', () => {- const snapshot = { ids: ['s1'] }- const list = makeList(snapshot)+ it('binds navigation and bindingSource to their official owners', () => {+ const list = makeList({ ids: ['s1'] })const startSession = vi.fn()const connectWorkspace = vi.fn()- const pickDirectory = vi.fn()- const resolve = vi.fn(() => ({ props: { inputActions: { submit: true } } }))+ const inputActions = { submit: true }+ const binding = { scope: 'retained' }+ const bindingSource = vi.fn(() => makeList({ props: { inputActions } }))+ const uiWorkspace = { startSession, connectWorkspace }+ const uiAdapter = { bindingSource }const adapter = defineAdapter(makeContext({- sessions: { list, binding: vi.fn(() => ({})) },- uiWorkspace: { startSession, connectWorkspace, pickDirectory },- uiSession: { adapter: { resolve } },+ sessions: { list, binding: vi.fn(() => binding) },+ uiWorkspace,+ uiSession: { adapter: uiAdapter },}))- expect(adapter.generation).toBe('legacy')- expect(adapter.migrations).toContain('sessions:list-projection')- expect(adapter.migrations).toContain('sessions:provide-info-bridge')- expect(adapter.migrations).toContain('legacy:workspaces-navigation')-- // 嵌套投影补齐成与新版同形的 getSnapshot / subscribe(订阅转发:核心列表发布即通知消费方)- expect(adapter.sessions.getSnapshot?.()).toEqual(snapshot)const listener = vi.fn()- adapter.sessions.subscribe?.(listener)- expect(list.subscribe).toHaveBeenCalledTimes(1)+ const off = adapter.sessions.subscribe?.(listener)+ expect(list.subscribe).toHaveBeenCalledOnce()list.subscribe.mock.calls[0]?.[0]?.()- expect(listener).toHaveBeenCalledTimes(1)-- // per-session 信息:legacy 走 binding + uiSession.adapter.resolve 投影- expect(adapter.has('sessions.provideInfo')).toBe(true)- expect(adapter.sessions.provideInfo?.('s1')).toEqual({ props: { inputActions: { submit: true } } })- expect(resolve).toHaveBeenCalledWith('s1')-- // 导航能力落到 uiWorkspace,且 this 必须绑回该服务+ expect(listener).toHaveBeenCalledOnce()+ off?.()+ expect(adapter.sessions.provideInfo?.('s1')).toEqual({ props: { inputActions } })+ expect(bindingSource).toHaveBeenCalledWith({ sessionId: 's1', binding })+ expect(bindingSource.mock.instances[0]).toBe(uiAdapter)adapter.workspaces.startSession?.('w1')expect(startSession).toHaveBeenCalledWith('w1')- expect(startSession.mock.instances[0]).toMatchObject({ startSession })-+ expect(startSession.mock.instances[0]).toBe(uiWorkspace)adapter.workspaces.connectWorkspace?.('w1')expect(connectWorkspace).toHaveBeenCalledWith('w1')-adapter.resolveStartSession()?.('w2')expect(startSession).toHaveBeenCalledWith('w2')})- it('工作区导航投影:创建期 uiWorkspace 尚未激活,服务到达后 connectWorkspace / startSession 照常可用', () => {+ it('resolves late uiWorkspace navigation and directory selection without rebuilding the adapter', () => {const connectWorkspace = vi.fn(() => 's1')const startSession = vi.fn()const list = makeList()- // `dsh-client-ui-workspace` 额外等 ui-session / connection,可能晚于 dsh-tauri-pet 创建:- // 创建期读不到 uiWorkspace 是常态,投影的安装判据不能依赖它(issue #756)。const services: Record<string, unknown> = { sessions: { list }, workspaces: { list, create: vi.fn() } }const adapter = defineAdapter(makeContext(services))-- expect(adapter.migrations).toContain('legacy:workspaces-navigation')- // 两个候选都没有该能力时诚实缺席,而不是给一个调用即崩的假投影expect(adapter.workspaces.connectWorkspace).toBeUndefined()expect(adapter.has('navigation.startSession')).toBe(false)expect(adapter.resolveStartSession()).toBeUndefined()expect(adapter.has('navigation.addWorkspace')).toBe(false)- // uiWorkspace 稍后激活:投影在调用期重读服务,无需重建适配层- services.uiWorkspace = { connectWorkspace, startSession, pickDirectory: vi.fn().mockResolvedValue('D:/work/demo') }+ const uiWorkspace = { connectWorkspace, startSession, pickDirectory: vi.fn().mockResolvedValue('D:/work/demo') }+ services.uiWorkspace = uiWorkspaceexpect(adapter.workspaces.connectWorkspace?.('w1')).toBe('s1')- expect(connectWorkspace).toHaveBeenCalledWith('w1')- expect(connectWorkspace.mock.instances[0]).toMatchObject({ connectWorkspace })-+ expect(connectWorkspace.mock.instances[0]).toBe(uiWorkspace)expect(adapter.has('navigation.startSession')).toBe(true)adapter.resolveStartSession()?.('w2')expect(startSession).toHaveBeenCalledWith('w2')adapter.workspaces.startSession?.('w3')expect(startSession).toHaveBeenCalledWith('w3')- expect(startSession.mock.instances[0]).toMatchObject({ startSession })-- // 目录选择是工作区侧原生实现:晚到的 uiWorkspace 也要能接上聚合出的 addWorkspace+ expect(startSession.mock.instances[0]).toBe(uiWorkspace)expect(adapter.has('navigation.addWorkspace')).toBe(true)expect(requireAddWorkspace(adapter).pickDirectory).toBeTypeOf('function')})- it('provideInfo 桥原生优先:原生只覆盖部分会话时回退 binding + uiSession 投影', () => {- const resolve = vi.fn(() => ({ props: { inputActions: { submit: true } } }))+ it('preserves native provideInfo results and falls back to bindingSource for missing or failed materialization', () => {+ const binding = {}+ const bindingSource = vi.fn(() => makeList({ props: { inputActions: { submit: true } } }))+ const provideInfo = vi.fn((id: string) => {+ if (id === 'failed')+ throw new Error('materializing')+ return id === 'native' ? { props: { native: true } } : undefined+ })const adapter = defineAdapter(makeContext({- sessions: {- list: makeList(),- // 原生实现只认 'native':其余会话交给兼容桥- provideInfo: vi.fn((sessionId: string) => (sessionId === 'native' ? { props: { native: true } } : undefined)),- binding: vi.fn(() => ({})),- },- uiSession: { adapter: { resolve } },+ sessions: { list: makeList(), provideInfo, binding: vi.fn(() => binding) },+ uiSession: { adapter: { bindingSource } },}))-- expect(adapter.migrations).toContain('sessions:provide-info-bridge')expect(adapter.sessions.provideInfo?.('native')).toEqual({ props: { native: true } })- expect(resolve).not.toHaveBeenCalled()-+ expect(bindingSource).not.toHaveBeenCalled()expect(adapter.sessions.provideInfo?.('s1')).toEqual({ props: { inputActions: { submit: true } } })- expect(resolve).toHaveBeenCalledWith('s1')+ expect(bindingSource).toHaveBeenCalledWith({ sessionId: 's1', binding })+ expect(adapter.sessions.provideInfo?.('failed')).toEqual({ props: { inputActions: { submit: true } } })})- it('uiWorkspace 只有目录选择时,导航回退到 workspaces 原生实现(不静默吞掉)', () => {+ it('does not advertise navigation or directory selection from removed workspaces APIs', () => {const nativeStart = vi.fn()- const pickDirectory = vi.fn().mockResolvedValue('D:/work/demo')- const create = vi.fn().mockResolvedValue({ workspaceId: 'w1' })const adapter = defineAdapter(makeContext({- uiWorkspace: { pickDirectory },- workspaces: { startSession: nativeStart, create },+ uiWorkspace: { pickDirectory: vi.fn() },+ workspaces: { startSession: nativeStart, create: vi.fn() },}))-- expect(adapter.generation).toBe('legacy')- // uiWorkspace 缺席 startSession,不该因此丢掉 workspaces 的原生导航- expect(adapter.has('navigation.startSession')).toBe(true)- adapter.resolveStartSession()?.('w1')- expect(nativeStart).toHaveBeenCalledWith('w1')-- // 目录选择来自 uiWorkspace、建工作区/开会话来自 workspaces:混合宿主也能聚合- const runtime = requireAddWorkspace(adapter)- expect(runtime.pickDirectory).toBeTypeOf('function')- expect(adapter.has('navigation.addWorkspace')).toBe(true)+ expect(adapter.generation).toBe('modern')+ expect(adapter.has('navigation.startSession')).toBe(false)+ expect(adapter.resolveStartSession()).toBeUndefined()+ expect(adapter.workspaces.startSession).toBeUndefined()+ expect(adapter.has('navigation.addWorkspace')).toBe(false)+ expect(nativeStart).not.toHaveBeenCalled()+ const misplacedPicker = defineAdapter(makeContext({+ workspaces: { pickDirectory: vi.fn(), create: vi.fn() },+ uiWorkspace: { startSession: vi.fn() },+ }))+ expect(misplacedPicker.has('navigation.addWorkspace')).toBe(false)})- it('官方服务方法绑定到原对象(解构后仍可用),list 投影引用稳定', () => {+ it('binds detached service methods to their original objects and stabilizes list references', () => {const list = makeList()- const startSession = vi.fn()- const adapter = defineAdapter(makeContext({- sessions: { list, refresh: vi.fn() },- workspaces: { list, startSession, create: vi.fn() },- }))-- const { startSession: detached } = adapter.workspaces- detached?.('w1')- expect(startSession.mock.instances[0]).toMatchObject({ startSession })-- // uSES 快照比较依赖 list 引用稳定:同一服务多次读取必须是同一个投影+ const sessions = { list, refresh: vi.fn() }+ const uiWorkspace = { startSession: vi.fn() }+ const adapter = defineAdapter(makeContext({ sessions, workspaces: { list }, uiWorkspace }))+ const { refresh } = adapter.sessions+ refresh?.()+ expect(sessions.refresh.mock.instances[0]).toBe(sessions)+ const { startSession } = adapter.workspaces+ startSession?.('w1')+ expect(uiWorkspace.startSession.mock.instances[0]).toBe(uiWorkspace)expect(adapter.sessions.list).toBe(adapter.sessions.list)expect(adapter.workspaces.list).toBe(adapter.workspaces.list)})- it('ctx 投影替换 sessions/workspaces,其余成员透传;服务缺失时返回空投影', () => {- const list = makeList()- const ctx: AdapterRuntimeObject = { sessions: { list }, marker: 'keep-me', get: () => undefined }+ it('replaces projected context services, forwards unrelated members and tolerates missing services', () => {+ const ctx: AdapterRuntimeObject = { sessions: { list: makeList() }, marker: 'keep-me', get: () => undefined }const adapter = defineAdapter(ctx)-- expect((adapter.ctx as AdapterRuntimeObject).sessions).toBe(adapter.sessions)- expect((adapter.ctx as AdapterRuntimeObject).workspaces).toBe(adapter.workspaces)- expect((adapter.ctx as AdapterRuntimeObject).marker).toBe('keep-me')-+ expect(adapter.ctx.sessions).toBe(adapter.sessions)+ expect(adapter.ctx.workspaces).toBe(adapter.workspaces)+ expect(adapter.ctx.marker).toBe('keep-me')const bare = defineAdapter({ get: () => undefined })expect(bare.generation).toBe('unknown')expect(bare.has('sessions.list')).toBe(false)@@ -260,12 +204,9 @@ describe('defineAdapter — 世代探测与内置迁移', () => {expect(bare.sessions.getSnapshot).toBeUndefined()})- it('ctx 是 undefined / 非对象 / inject 守卫抛错时都不抛,按服务缺失处理', () => {- expect(() => defineAdapter(undefined)).not.toThrow()- expect(() => defineAdapter(42)).not.toThrow()+ it('treats invalid contexts and throwing inject guards as absent capabilities', () => {expect(defineAdapter(undefined).generation).toBe('unknown')-- // Cordis 对未声明键的 inject-only 守卫会抛错:探测必须吞掉并当作服务不存在+ expect(defineAdapter(42).generation).toBe('unknown')const guarded = defineAdapter({get: (name: string) => {if (name === 'sessions')@@ -273,174 +214,133 @@ describe('defineAdapter — 世代探测与内置迁移', () => {return name === 'uiWorkspace' ? { startSession: vi.fn() } : undefined},})- expect(guarded.generation).toBe('legacy')+ expect(guarded.generation).toBe('modern')expect(guarded.sessions.getSnapshot).toBeUndefined()expect(guarded.has('navigation.startSession')).toBe(true)-- // 没有 ctx.get 时回退属性读取(非 cordis 宿主的兼容路径)- const list = makeList()- const attribute = defineAdapter({ sessions: { list } })+ const attribute = defineAdapter({ sessions: { list: makeList() } })expect(attribute.generation).toBe('modern')- expect(attribute.sessions.list).toBeDefined()+ expect(attribute.has('sessions.list')).toBe(true)})})-describe('defineAdapter — 退级阶梯(官方服务 → DOM → 明确不可用)', () => {- it('startSession:官方服务优先,thenable 才 await', async () => {+describe('defineAdapter — fallback ladder', () => {+ it('prefers official startSession and awaits only thenables', async () => {const startSession = vi.fn().mockResolvedValue('ok')const adapter = defineAdapter(makeContext({ uiWorkspace: { startSession } }), { onWarn: makeWarn() })-await expect(adapter.startSession('w1')).resolves.toEqual({ status: 'started', value: 'ok' })expect(startSession).toHaveBeenCalledWith('w1')-- // 同步返回值不做无意义等待:outcome 立刻可用- const sync = vi.fn()- const syncAdapter = defineAdapter(makeContext({ uiWorkspace: { startSession: sync } }), { onWarn: makeWarn() })- await expect(syncAdapter.startSession()).resolves.toEqual({ status: 'started', value: undefined })+ const sync = defineAdapter(makeContext({ uiWorkspace: { startSession: vi.fn() } }), { onWarn: makeWarn() })+ await expect(sync.startSession()).resolves.toEqual({ status: 'started', value: undefined })})- it('startSession:服务缺席时点官方按钮,按钮也缺席才回报不可用并告警', async () => {+ it('delegates missing startSession to the official button or reports unavailable', async () => {const click = vi.fn()vi.stubGlobal('document', { querySelector: vi.fn(() => ({ click })) })const delegated = defineAdapter(undefined, { onWarn: makeWarn() })expect(delegated.has('dom.newSession')).toBe(true)await expect(delegated.startSession()).resolves.toEqual({ status: 'delegated' })- expect(click).toHaveBeenCalledTimes(1)-+ expect(click).toHaveBeenCalledOnce()vi.stubGlobal('document', { querySelector: vi.fn(() => null) })const warn = makeWarn()const unavailable = defineAdapter(undefined, { onWarn: warn })- const outcome = await unavailable.startSession()- expect(outcome.status).toBe('unavailable')+ expect((await unavailable.startSession()).status).toBe('unavailable')expect(warn.mock.calls[0][0]).toContain('startSession unavailable')})- it('composer.workspace-less:只认桌面壳补丁写在 <html> 上的能力标记', () => {+ it('reads workspace-less composer support only from the desktop capability marker', () => {vi.stubGlobal('document', { documentElement: { getAttribute: () => '1' } })- expect(defineAdapter(undefined, { onWarn: makeWarn() }).has('composer.workspace-less')).toBe(true)-+ expect(defineAdapter(undefined).has('composer.workspace-less')).toBe(true)vi.stubGlobal('document', { documentElement: { getAttribute: () => null } })- expect(defineAdapter(undefined, { onWarn: makeWarn() }).has('composer.workspace-less')).toBe(false)+ expect(defineAdapter(undefined).has('composer.workspace-less')).toBe(false)})- it('addWorkspace:官方三段能力全流程', async () => {+ it('adds a workspace through the official picker, registry and navigation owners', async () => {const pickDirectory = vi.fn().mockResolvedValue('D:/work/demo')const create = vi.fn().mockResolvedValue({ workspaceId: 'w1' })const startSession = vi.fn()- const adapter = defineAdapter(- makeContext({ workspaces: { pickDirectory, create, startSession } }),- { onWarn: makeWarn() },- )-- await expect(adapter.addWorkspace()).resolves.toEqual({- status: 'created',- workspaceId: 'w1',- path: 'D:/work/demo',- sessionStarted: true,- })+ const workspaces = { create }+ const uiWorkspace = { pickDirectory, startSession }+ const adapter = defineAdapter(makeContext({ workspaces, uiWorkspace }), { onWarn: makeWarn() })+ await expect(adapter.addWorkspace()).resolves.toEqual({ status: 'created', workspaceId: 'w1', path: 'D:/work/demo', sessionStarted: true })expect(create).toHaveBeenCalledWith({ path: 'D:/work/demo' })+ expect(create.mock.instances[0]).toBe(workspaces)expect(startSession).toHaveBeenCalledWith('w1')- // 方法必须绑到各自的服务实例上- expect(pickDirectory.mock.instances[0]).toMatchObject({ pickDirectory })- expect(startSession.mock.instances[0]).toMatchObject({ startSession })+ expect(pickDirectory.mock.instances[0]).toBe(uiWorkspace)+ expect(startSession.mock.instances[0]).toBe(uiWorkspace)})- it('addWorkspace:用户取消是正常结果;openSession:false 不建会话', async () => {- const create = vi.fn()+ it('treats directory cancellation as normal and respects openSession:false', async () => {+ const create = vi.fn().mockResolvedValue({ workspaceId: 'w1' })const startSession = vi.fn()- const cancelled = defineAdapter(- makeContext({ workspaces: { pickDirectory: vi.fn().mockResolvedValue(null), create, startSession } }),- { onWarn: makeWarn() },- )+ const cancelled = defineAdapter(makeContext({+ workspaces: { create },+ uiWorkspace: { pickDirectory: vi.fn().mockResolvedValue(null), startSession },+ }))await expect(cancelled.addWorkspace()).resolves.toEqual({ status: 'cancelled' })expect(create).not.toHaveBeenCalled()-- const adapter = defineAdapter(- makeContext({- workspaces: {- pickDirectory: vi.fn().mockResolvedValue('D:/work/demo'),- create: vi.fn().mockResolvedValue({ workspaceId: 'w1' }),- startSession,- },- }),- { onWarn: makeWarn() },- )- await expect(adapter.addWorkspace({ openSession: false })).resolves.toMatchObject({- status: 'created',- sessionStarted: false,- })+ const adapter = defineAdapter(makeContext({+ workspaces: { create },+ uiWorkspace: { pickDirectory: vi.fn().mockResolvedValue('D:/work/demo'), startSession },+ }))+ await expect(adapter.addWorkspace({ openSession: false })).resolves.toEqual({ status: 'created', workspaceId: 'w1', path: 'D:/work/demo', sessionStarted: false })expect(startSession).not.toHaveBeenCalled()})- it('addWorkspace:三段能力缺一时点官方按钮,按钮也缺席才回报不可用', async () => {- // 缺 workspaces.create- vi.stubGlobal('document', { querySelector: vi.fn(() => ({ click: vi.fn() })) })- const delegated = defineAdapter(- makeContext({ workspaces: { pickDirectory: vi.fn(), startSession: vi.fn() } }),- { onWarn: makeWarn() },- )+ it('delegates an incomplete addWorkspace capability or explicitly reports unavailable', async () => {+ const click = vi.fn()+ vi.stubGlobal('document', { querySelector: vi.fn(() => ({ click })) })+ const delegated = defineAdapter(makeContext({ uiWorkspace: { pickDirectory: vi.fn(), startSession: vi.fn() } }))expect(delegated.has('navigation.addWorkspace')).toBe(false)await expect(delegated.addWorkspace()).resolves.toEqual({ status: 'delegated' })-+ expect(click).toHaveBeenCalledOnce()vi.stubGlobal('document', { querySelector: vi.fn(() => null) })const warn = makeWarn()const unavailable = defineAdapter(undefined, { onWarn: warn })- const outcome = await unavailable.addWorkspace()- expect(outcome.status).toBe('unavailable')+ expect((await unavailable.addWorkspace()).status).toBe('unavailable')expect(warn.mock.calls[0][0]).toContain('addWorkspace unavailable')})})-describe('defineAdapter — 迁移注册表', () => {- it('自定义迁移在默认迁移之后执行,可覆盖既有投影', async () => {+describe('defineAdapter — migrations', () => {+ it('runs custom migrations last and allows explicit navigation projections', async () => {const custom = vi.fn()+ const open = vi.fn()const migration: DshMigration = {id: 'test:custom-navigation',detect: () => true,apply(surface) {surface.startSession = () => custom()+ surface.openSession = open},}- const adapter = defineAdapter(makeContext({ uiWorkspace: { startSession: vi.fn() } }), {- migrations: [migration],- onWarn: makeWarn(),- })-+ const adapter = defineAdapter(undefined, { migrations: [migration], onWarn: makeWarn() })expect(adapter.migrations.at(-1)).toBe('test:custom-navigation')await adapter.startSession('w1')- expect(custom).toHaveBeenCalledTimes(1)+ expect(custom).toHaveBeenCalledOnce()+ expect(adapter.openSession('s1').status).toBe('opened')+ expect(open).toHaveBeenCalledWith('s1')})- it('detect 为 false 的迁移不执行、不记入 migrations', () => {+ it('does not apply or record a migration whose detection returns false', () => {const apply = vi.fn()- const adapter = defineAdapter(undefined, {- migrations: [{ id: 'test:skipped', detect: () => false, apply }],- onWarn: makeWarn(),- })-+ const adapter = defineAdapter(undefined, { migrations: [{ id: 'test:skipped', detect: () => false, apply }], onWarn: makeWarn() })expect(apply).not.toHaveBeenCalled()expect(adapter.migrations).not.toContain('test:skipped')expect(adapter.failures).toEqual([])})- it('单条迁移失败只记录 failures 并告警,后续迁移与装配照常', () => {+ it('records failed migrations and warnings while continuing subsequent migrations', () => {const late = vi.fn()const warn = makeWarn()+ const error = new Error('projection failed')const adapter = defineAdapter(undefined, {migrations: [- {- id: 'test:boom',- detect: () => true,- apply: () => {- throw new Error('projection failed')- },- },+ { id: 'test:boom', detect: () => true, apply: () => { throw error } },{ id: 'test:late', detect: () => true, apply: surface => void (surface.startSession = () => late()) },],onWarn: warn,})-- expect(adapter.failures.map(failure => failure.migration)).toEqual(['test:boom'])+ expect(adapter.failures).toEqual([{ migration: 'test:boom', error }])expect(adapter.migrations).not.toContain('test:boom')expect(adapter.migrations).toContain('test:late')expect(warn.mock.calls[0][0]).toContain('test:boom')@@ -448,100 +348,91 @@ describe('defineAdapter — 迁移注册表', () => {})})-describe('defineAdapter — openSession 能力', () => {- it('0.1.6-alpha.2 布局:导航落在 uiWorkspace.openSession', () => {+describe('defineAdapter — session navigation and projections', () => {+ it('opens sessions through uiWorkspace rather than removed core navigation methods', () => {const openSession = vi.fn()+ const oldOpen = vi.fn()const adapter = defineAdapter(makeContext({- sessions: { list: makeList() },- workspaces: { list: makeList(), open: vi.fn() },+ sessions: { list: makeList(), open: oldOpen },+ workspaces: { open: oldOpen },uiWorkspace: { openSession },}))-- expect(adapter.migrations).toContain('navigation:resolve-open-session')expect(adapter.has('navigation.openSession')).toBe(true)- expect(adapter.openSession('s-2').status).toBe('opened')- expect(openSession).toHaveBeenCalledWith('s-2')- })-- it('初始候选缺席时:workspaces.open 优先于 sessions.open', () => {- const workspaceOpen = vi.fn()- const sessionOpen = vi.fn()- const adapter = defineAdapter(makeContext({- sessions: { list: makeList(), open: sessionOpen },- workspaces: { list: makeList(), open: workspaceOpen },- }))-- adapter.openSession('s-3')- expect(workspaceOpen).toHaveBeenCalledWith('s-3')- expect(sessionOpen).not.toHaveBeenCalled()- })-- it('旧核心:uiWorkspace 缺席时回退 sessions.open', () => {- const open = vi.fn()- const adapter = defineAdapter(makeContext({- sessions: { list: makeList(), open },- }))-- expect(adapter.resolveOpenSession()).toBeDefined()- expect(adapter.openSession('s-4').status).toBe('opened')- expect(open).toHaveBeenCalledWith('s-4')+ expect(adapter.openSession('s2').status).toBe('opened')+ adapter.sessions.open?.('s1')+ expect(openSession).toHaveBeenCalledWith('s1')+ expect(openSession).toHaveBeenCalledWith('s2')+ expect(oldOpen).not.toHaveBeenCalled()})- it('能力全缺:明确回报 unavailable 并告警', () => {+ it('does not mistake removed sessions.open or workspaces.open for supported navigation', () => {+ const oldOpen = vi.fn()const warn = makeWarn()- const adapter = defineAdapter(makeContext({ sessions: { list: makeList() } }), { onWarn: warn })+ const adapter = defineAdapter(makeContext({ sessions: { open: oldOpen }, workspaces: { open: oldOpen } }), { onWarn: warn })+ expect(adapter.resolveOpenSession()).toBeUndefined()+ expect(adapter.has('navigation.openSession')).toBe(false)+ expect(adapter.openSession('s1')).toEqual({ status: 'unavailable', reason: 'no uiWorkspace.openSession capability' })+ expect(() => adapter.sessions.open?.('s1')).toThrow('sessions.open is unavailable')+ expect(oldOpen).not.toHaveBeenCalled()+ expect(warn).toHaveBeenCalledOnce()+ })+ it('resolves late uiWorkspace arrival and rejects calls after its capability disappears', () => {+ const services: Record<string, unknown> = { sessions: { list: makeList() } }+ const adapter = defineAdapter(makeContext(services), { onWarn: makeWarn() })expect(adapter.has('navigation.openSession')).toBe(false)- expect(adapter.openSession('s-5').status).toBe('unavailable')- expect(warn.mock.calls[0][0]).toContain('openSession unavailable')+ expect(adapter.openSession('s1').status).toBe('unavailable')+ const uiWorkspace = { openSession: vi.fn() }+ services.uiWorkspace = uiWorkspace+ expect(adapter.has('navigation.openSession')).toBe(true)+ adapter.sessions.open?.('s1')+ expect(uiWorkspace.openSession).toHaveBeenCalledWith('s1')+ expect(uiWorkspace.openSession.mock.instances[0]).toBe(uiWorkspace)+ services.uiWorkspace = undefined+ expect(adapter.has('navigation.openSession')).toBe(false)+ expect(() => adapter.sessions.open?.('s2')).toThrow('sessions.open is unavailable')})-})-describe('defineAdapter — 0.1.6-alpha.2 会话面投影', () => {- it('provideInfo:binding + uiSession.adapter.bindingSource 补出输入面', () => {+ it('projects bindingSource input actions through the retained session reference', () => {const inputActions = { submit: vi.fn() }const binding = { sessionId: 's1' }- const source = makeLiveList({ key: 's1', props: { inputActions } })- const bindingSource = vi.fn(() => source)+ const bindingSource = vi.fn(() => makeLiveList({ key: 's1', props: { inputActions } }))const adapter = defineAdapter(makeContext({sessions: { list: makeList(), binding: vi.fn(() => binding) },- uiSession: { adapter: { bindingSource, current: makeLiveList({ key: 's1' }) } },+ uiSession: { adapter: { bindingSource } },}))-- expect(adapter.migrations).toContain('sessions:provide-info-bridge')expect(adapter.has('sessions.provideInfo')).toBe(true)expect(adapter.sessions.provideInfo?.('s1')).toEqual({ props: { inputActions } })expect(bindingSource).toHaveBeenCalledWith({ sessionId: 's1', binding })})- it('provideInfo:未被保留(binding 缺席)的会话诚实回报不可用', () => {- const bindingSource = vi.fn()- const adapter = defineAdapter(makeContext({- sessions: { list: makeList(), binding: vi.fn(() => undefined) },- uiSession: { adapter: { bindingSource, current: makeLiveList({ key: undefined }) } },- }))+ it('does not revive the removed uiSession.adapter.resolve API', () => {+ const resolve = vi.fn(() => ({ props: { inputActions: {} } }))+ const adapter = defineAdapter(makeContext({ sessions: { binding: vi.fn(() => ({})) }, uiSession: { adapter: { resolve } } }))+ expect(adapter.sessions.provideInfo?.('s1')).toBeUndefined()+ expect(resolve).not.toHaveBeenCalled()+ })+ it('returns unavailable for unretained sessions and transient binding failures', () => {+ const bindingSource = vi.fn()+ const binding = vi.fn(() => undefined)+ const adapter = defineAdapter(makeContext({ sessions: { binding }, uiSession: { adapter: { bindingSource } } }))+ expect(adapter.sessions.provideInfo?.('s1')).toBeUndefined()+ binding.mockImplementationOnce(() => {+ throw new Error('released')+ })expect(adapter.sessions.provideInfo?.('s1')).toBeUndefined()expect(bindingSource).not.toHaveBeenCalled()})- it('current 投影:核心快照缺 current 时由 uiSession.adapter.current 补齐', () => {+ it('keeps current projection snapshots stable and fans out subscriptions with disposal', () => {const list = makeLiveList<Record<string, unknown>>({ ids: ['s1'], byId: {} })const current = makeLiveList<{ key?: string }>({ key: 's1' })- const adapter = defineAdapter(makeContext({- sessions: { list },- uiSession: { adapter: { bindingSource: vi.fn(), current } },- }))-- expect(adapter.migrations).toContain('sessions:current-projection')+ const adapter = defineAdapter(makeContext({ sessions: { list }, uiSession: { adapter: { current } } }))const projected = adapter.sessions.listexpect(projected?.getSnapshot()).toEqual({ ids: ['s1'], byId: {}, current: 's1' })- // uSES 依赖 getSnapshot 引用稳定:同一份核心快照 + 同一个 current 必须返回同一对象expect(projected?.getSnapshot()).toBe(projected?.getSnapshot())- // list 投影本身也引用稳定(消费方按引用比较 / 作为订阅源)expect(adapter.sessions.list).toBe(projected)-- // 订阅扇出:核心列表变化与 current 变化都要通知消费方const listener = vi.fn()const off = projected?.subscribe(listener)list.publish({ ids: ['s1', 's2'], byId: {} })@@ -551,142 +442,52 @@ describe('defineAdapter — 0.1.6-alpha.2 会话面投影', () => {expect(projected?.getSnapshot()).toEqual({ ids: ['s1', 's2'], byId: {}, current: 's2' })off?.()current.publish({ key: 's3' })+ list.publish({ ids: ['s3'] })expect(listener).toHaveBeenCalledTimes(2)-- // 顶层别名与 list 同源:老写法读 sessions.getSnapshot 也拿到 current- expect(adapter.sessions.getSnapshot?.()).toEqual({ ids: ['s1', 's2'], byId: {}, current: 's3' })+ expect(adapter.sessions.getSnapshot?.()).toEqual({ ids: ['s3'], current: 's3' })})- it('current 投影:创建期 uiSession 尚未激活,服务到达后仍补齐 current', () => {- const list = makeLiveList<Record<string, unknown>>({ ids: ['s1'], byId: {} })- const current = makeLiveList<{ key?: string }>({ key: undefined })- // `dsh-tauri-ui` 只声明 sessions,会早于 ui-session 激活:创建期读不到 uiSession 是常态+ it('follows late uiSession current sources and replaces subscriptions when their owner changes', () => {+ const list = makeLiveList({ ids: ['s1'] })const services: Record<string, unknown> = { sessions: { list } }const adapter = defineAdapter(makeContext(services))-- expect(adapter.migrations).toContain('sessions:current-projection')const projected = adapter.sessions.list- const currentOf = (): unknown => (projected?.getSnapshot() as { current?: unknown } | undefined)?.current- expect(currentOf()).toBeUndefined()-- // ui-session 稍后激活:投影在调用期重读服务,无需重建适配层- services.uiSession = { adapter: { bindingSource: vi.fn(), current } }- current.publish({ key: 's1' })- expect(currentOf()).toBe('s1')-- // 订阅侧同样自愈:源到达前订阅,到达后 current 变化仍要通知消费方+ expect(projected?.getSnapshot()).toEqual({ ids: ['s1'] })const listener = vi.fn()const off = projected?.subscribe(listener)- list.publish({ ids: ['s1', 's2'], byId: {} })- expect(listener).toHaveBeenCalledTimes(1)+ const current = makeLiveList({ key: 's1' })+ services.uiSession = { adapter: { current } }+ list.publish({ ids: ['s1', 's2'] })current.publish({ key: 's2' })expect(listener).toHaveBeenCalledTimes(2)- expect(currentOf()).toBe('s2')+ expect(projected?.getSnapshot()).toEqual({ ids: ['s1', 's2'], current: 's2' })+ const replacement = makeLiveList({ key: 's3' })+ services.uiSession = { adapter: { current: replacement } }+ list.publish({ ids: ['s3'] })+ current.publish({ key: 'obsolete' })+ expect(listener).toHaveBeenCalledTimes(3)+ replacement.publish({ key: 's4' })+ expect(listener).toHaveBeenCalledTimes(4)off?.()- current.publish({ key: 's3' })- expect(listener).toHaveBeenCalledTimes(2)+ replacement.publish({ key: 's5' })+ expect(listener).toHaveBeenCalledTimes(4)})- it('provideInfo:创建期 uiSession 尚未激活,服务到达后桥照常解析', () => {+ it('resolves late uiSession binding sources without rebuilding the adapter', () => {const inputActions = { submit: vi.fn() }const binding = { sessionId: 's1' }- const source = makeLiveList({ key: 's1', props: { inputActions } })- const services: Record<string, unknown> = {- sessions: { list: makeList(), binding: vi.fn(() => binding) },- }+ const services: Record<string, unknown> = { sessions: { binding: vi.fn(() => binding) } }const adapter = defineAdapter(makeContext(services))-- expect(adapter.migrations).toContain('sessions:provide-info-bridge')- expect(adapter.has('sessions.provideInfo')).toBe(true)- // 投影源未到达:诚实回报不可用,而不是抛错expect(adapter.sessions.provideInfo?.('s1')).toBeUndefined()-- const bindingSource = vi.fn(() => source)- services.uiSession = { adapter: { bindingSource, current: makeLiveList({ key: 's1' }) } }+ const bindingSource = vi.fn(() => makeLiveList({ props: { inputActions } }))+ services.uiSession = { adapter: { bindingSource } }expect(adapter.sessions.provideInfo?.('s1')).toEqual({ props: { inputActions } })expect(bindingSource).toHaveBeenCalledWith({ sessionId: 's1', binding })})-- it('current 投影:0.1.5 布局(核心自带 current)不装投影,原样保留', () => {- const adapter = defineAdapter(makeContext({- sessions: { list: makeList({ ids: ['s1'], current: 's1' }) },- uiSession: { adapter: { current: makeList({ key: 's9' }) } },- }))-- expect(adapter.migrations).not.toContain('sessions:current-projection')- expect(adapter.sessions.list?.getSnapshot()).toEqual({ ids: ['s1'], current: 's1' })- })-- it('open 桥:0.1.6 布局下 sessions.open 由 uiWorkspace.openSession 补齐', () => {- const openSession = vi.fn()- const adapter = defineAdapter(makeContext({- sessions: { list: makeList() },- uiWorkspace: { openSession },- }))-- expect(adapter.migrations).toContain('sessions:open-bridge')- adapter.sessions.open?.('s1')- expect(openSession).toHaveBeenCalledWith('s1')- })-- it('open 桥:创建期 uiWorkspace 尚未激活,服务到达后 sessions.open 照常切换', () => {- const openSession = vi.fn()- // `dsh-client-ui-workspace` 额外等 ui-session / connection,可能晚于本适配层创建:- // 创建期读不到 uiWorkspace 是常态,桥的安装判据不能依赖它。- const services: Record<string, unknown> = { sessions: { list: makeList() } }- const adapter = defineAdapter(makeContext(services))-- expect(adapter.migrations).toContain('sessions:open-bridge')- expect(adapter.has('navigation.openSession')).toBe(false)- expect(adapter.openSession('s1').status).toBe('unavailable')-- services.uiWorkspace = { openSession }- expect(adapter.has('navigation.openSession')).toBe(true)- adapter.sessions.open?.('s1')- expect(openSession).toHaveBeenCalledWith('s1')- expect(adapter.openSession('s2').status).toBe('opened')- expect(openSession).toHaveBeenCalledWith('s2')- })-- it('open 桥:能力全缺时 sessions.open 明确抛错,不静默吞掉切换请求', () => {- const adapter = defineAdapter(makeContext({ sessions: { list: makeList() } }))-- expect(adapter.migrations).toContain('sessions:open-bridge')- expect(() => adapter.sessions.open?.('s1')).toThrow(/sessions\.open is unavailable/)- })-- it('open 桥:桥装好后核心才补上原生 sessions.open,原生优先于桥', () => {- const native = vi.fn()- // 服务延迟物化:装桥时核心还没有 open,之后才补上。- const sessions: Record<string, unknown> = { list: makeList() }- const adapter = defineAdapter(makeContext({ sessions }))-- expect(adapter.migrations).toContain('sessions:open-bridge')- expect(() => adapter.sessions.open?.('s1')).toThrow(/sessions\.open is unavailable/)-- sessions.open = native- expect(adapter.has('navigation.openSession')).toBe(true)- adapter.sessions.open?.('s2')- expect(native).toHaveBeenCalledWith('s2')- })-- it('open 桥:原生 sessions.open 在场时不覆盖', () => {- const open = vi.fn()- const openSession = vi.fn()- const adapter = defineAdapter(makeContext({- sessions: { list: makeList(), open },- uiWorkspace: { openSession },- }))-- expect(adapter.migrations).not.toContain('sessions:open-bridge')- adapter.sessions.open?.('s1')- expect(open).toHaveBeenCalledWith('s1')- expect(openSession).not.toHaveBeenCalled()- })})describe('defineAdapter — official session APIs', () => {- it('create and catalog refresh capabilities bind only existing official methods', async () => {+ it('binds existing official create, refresh and refreshProjections methods', async () => {const owner = {create: vi.fn(function (this: object, input?: unknown) {expect(this).toBe(owner)@@ -697,20 +498,6 @@ describe('defineAdapter — official session APIs', () => {expect(this).toBe(owner)return Promise.resolve()}),- }- const adapter = defineAdapter(makeContext({ sessions: owner }))- expect(adapter.has('sessions.create')).toBe(true)- expect(adapter.has('sessions.refresh')).toBe(true)- await expect(adapter.sessions.create?.({ cwd: '/project' })).resolves.toBe('official-session')- await adapter.sessions.refresh?.()- expect(owner.refresh).toHaveBeenCalledOnce()- const unavailable = defineAdapter(makeContext({ sessions: {} }))- expect(unavailable.has('sessions.create')).toBe(false)- expect(unavailable.has('sessions.refresh')).toBe(false)- })-- it('projection refresh capability binds only the official existing method', async () => {- const owner = {refreshProjections: vi.fn(function (this: object, id: string) {expect(this).toBe(owner)expect(id).toBe('session-a')@@ -718,52 +505,46 @@ describe('defineAdapter — official session APIs', () => {}),}const adapter = defineAdapter(makeContext({ sessions: owner }))+ expect(adapter.has('sessions.create')).toBe(true)+ expect(adapter.has('sessions.refresh')).toBe(true)expect(adapter.has('sessions.refreshProjections')).toBe(true)+ await expect(adapter.sessions.create?.({ cwd: '/project' })).resolves.toBe('official-session')+ await adapter.sessions.refresh?.()await adapter.sessions.refreshProjections?.('session-a')+ expect(owner.refresh).toHaveBeenCalledOnce()expect(owner.refreshProjections).toHaveBeenCalledOnce()- expect(defineAdapter(makeContext({ sessions: {} })).has('sessions.refreshProjections')).toBe(false)+ const unavailable = defineAdapter(makeContext({ sessions: {} }))+ expect(unavailable.has('sessions.create')).toBe(false)+ expect(unavailable.has('sessions.refresh')).toBe(false)+ expect(unavailable.has('sessions.refreshProjections')).toBe(false)})-})--describe('defineAdapter — sessionList 投影', () => {- it('sessionList:过滤非字符串 id、只带字符串 current,subscribe 转发到核心列表', () => {- const list = makeLiveList<{ ids: unknown[], current?: unknown }>({ ids: ['s1', 7, 's2', null], current: 's2' })- const adapter = defineAdapter(makeContext({ sessions: { list } }))+ it('filters invalid ids and reads selected sessions from uiSession rather than the core catalog', () => {+ const list = makeLiveList({ ids: ['s1', 7, 's2', null] })+ const current = makeLiveList({ key: 's2' })+ const adapter = defineAdapter(makeContext({ sessions: { list }, uiSession: { adapter: { current } } }))const projection = adapter.sessionList()expect(projection?.ids).toEqual(['s1', 's2'])expect(projection?.current).toBe('s2')-const listener = vi.fn()const off = projection?.subscribe(listener)- list.publish({ ids: ['s3'], current: 's3' })- expect(listener).toHaveBeenCalledTimes(1)+ current.publish({ key: 's3' })+ list.publish({ ids: ['s3'] })+ expect(listener).toHaveBeenCalledTimes(2)expect(adapter.sessionList()?.ids).toEqual(['s3'])expect(adapter.sessionList()?.current).toBe('s3')off?.()- list.publish({ ids: ['s4'], current: 's4' })- expect(listener).toHaveBeenCalledTimes(1)- expect(adapter.sessionList()?.ids).toEqual(['s4'])- })-- it('sessionList:快照非对象时按「无法判断」返回 undefined,ids 非数组时退化为空列表', () => {- const nullSnapshot = makeLiveList<unknown>(null)- expect(defineAdapter(makeContext({ sessions: { list: nullSnapshot } })).sessionList()).toBeUndefined()-- const stringIds = makeLiveList<unknown>({ ids: 's1' })- expect(defineAdapter(makeContext({ sessions: { list: stringIds } })).sessionList())- .toEqual({ ids: [], subscribe: expect.any(Function) })-- // current 只认字符串:非字符串一律当缺席,不猜一个结论- const numericCurrent = makeLiveList<unknown>({ ids: ['s1'], current: 42 })- expect(defineAdapter(makeContext({ sessions: { list: numericCurrent } })).sessionList())- .toEqual({ ids: ['s1'], subscribe: expect.any(Function) })+ list.publish({ ids: ['s4'] })+ expect(listener).toHaveBeenCalledTimes(2)})- it('sessionList:核心没有 list 投影时返回 undefined', () => {- const adapter = defineAdapter(makeContext({ sessions: { getSnapshot: vi.fn() } }))-- expect(adapter.has('sessions.list')).toBe(false)- expect(adapter.sessionList()).toBeUndefined()+ it('treats invalid catalog snapshots and nonstring current keys as unprovable state', () => {+ expect(defineAdapter(makeContext({ sessions: { list: makeList(null) } })).sessionList()).toBeUndefined()+ expect(defineAdapter(makeContext({ sessions: { list: makeList({ ids: 's1' }) } })).sessionList()).toEqual({ ids: [], subscribe: expect.any(Function) })+ const numeric = defineAdapter(makeContext({ sessions: { list: makeList({ ids: ['s1'] }) }, uiSession: { adapter: { current: makeList({ key: 42 }) } } }))+ expect(numeric.sessionList()).toEqual({ ids: ['s1'], subscribe: expect.any(Function) })+ const unavailable = defineAdapter(makeContext({ sessions: { getSnapshot: vi.fn() } }))+ expect(unavailable.has('sessions.list')).toBe(false)+ expect(unavailable.sessionList()).toBeUndefined()})})diff --git a/packages/dsh-tauri/src/client/register/index.adapter.ts b/packages/dsh-tauri/src/client/register/index.adapter.tsindex e19b5954..ba689d6a 100644--- a/packages/dsh-tauri/src/client/register/index.adapter.ts+++ b/packages/dsh-tauri/src/client/register/index.adapter.ts@@ -1,34 +1,3 @@-/**- * register/index.adapter.ts — DSH 客户端升级迁移适配层(`defineRegister` 的第三个参数)。- *- * 用法:- * ```ts- * const feature = defineRegister((controller, ctx, adapter) => {- * // 新建会话:官方服务 → DOM 退级,明确回报走了哪一级- * void adapter.startSession()- * // 打开文件夹:pickDirectory → create → startSession 全流程- * void adapter.addWorkspace({ openSession: true })- * // 跨版本同形的会话列表投影- * controller.add(adapter.sessions.list!.subscribe(() => sync()))- * if (adapter.has('workspaces.create')) { ... }- * })- *- * ctx.effect(feature, 'demo: feature')- * ```- *- * 四条设计约束:- *- * 1. **只按能力探测,不比对版本号**——`generation` 仅供诊断与日志,所有分支读服务形态;- * 2. **迁移是按序执行的注册表**——新增一代 DSH 只需追加一条 `DshMigration`- * (`defineAdapter` 的 `migrations` 选项),既有迁移与消费方都不改;- * 3. **探测绝不抛错**——Cordis 的 inject-only 守卫、半初始化上下文、缺失服务一律当作- * 「能力不可用」,把退级决定权交回消费方(官方 API → 壳补丁 → DOM 补丁 → 禁用);- * 4. **官方服务的方法一律绑定到原对象再外抛**——核心服务是 class 实例,方法被解构后不能丢- * `this`,也绝不能让 Proxy 冒充 `this`(内部自调用与私有字段会炸)。- *- * 适配层是无状态投影:每次调用返回新实例,不注册监听、不持跨卸载状态,因此不需要 disposer,- * 也不会与 `ctx.effect` 的清理路径冲突。- */import type {AdapterAddWorkspaceOptions,AdapterAddWorkspaceOutcome,@@ -59,19 +28,8 @@ import { clickIfPresent } from '../utils/browser'export type * from '../types/adapter'-/** 官方「添加工作区」按钮:工作区创建能力缺席时的 DOM 退级目标(只有本文件消费)。 */const ADD_WORKSPACE_SELECTOR = 'button[aria-label="添加工作区"],button[aria-label="Add workspace"]'--/**- * 桌面壳 composer 补丁的能力标记(与 `src-tauri/src/service/patch/composer.rs` 逐字一致)。- *- * 官方 `ConversationRoot` 对「不属于任何工作区的空白会话」把 composer 换成「选择工作区」- * 触发器;桌面壳补丁放宽该判定并在 `<html>` 上写下这个标记。消费方据此决定「未分组」- * 入口是否可用——不猜核心版本,也不看补丁文件。- */const COMPOSER_CWD_ATTRIBUTE = 'data-dsh-composer-cwd'--/** 适配层告警出口(默认 console.warn;宿主可注入以上报到插件面板)。 */type AdapterWarn = (message: string, error?: unknown) => voidconst defaultWarn: AdapterWarn = (message, error) => {@@ -81,10 +39,6 @@ const defaultWarn: AdapterWarn = (message, error) => {console.warn(message, error)}-/**- * 守卫安全的服务读取:`ctx.get(name)` 优先(Cordis 对未声明键的 inject-only 守卫会抛错),- * 回退属性读取;任何异常都等同于「服务不存在」。- */function readService(ctx: unknown, name: string): unknown {if (ctx === null || ctx === undefined)return undefined@@ -100,7 +54,6 @@ function readService(ctx: unknown, name: string): unknown {}}-/** 把对象的方法绑定到自身。 */function bindMembers<T extends object>(target: T): T {return new Proxy(target, {get(t, prop) {@@ -110,10 +63,6 @@ function bindMembers<T extends object>(target: T): T {})}-/**- * 适配一个官方服务:方法绑定到**原对象**(绝不让 Proxy 充当 `this`);- * `list` 投影再包一层并缓存(`sessions.list` 的引用稳定性是 uSES 的前提)。- */function adaptService<T extends object>(service: T): T {const boundLists = new WeakMap<object, object>()return new Proxy(service, {@@ -132,19 +81,12 @@ function adaptService<T extends object>(service: T): T {})}-/**- * 跨版本 thenable 判定。- *- * legacy 与 modern 的 `startSession` 都返回 void,但投影实现可能返回 Promise:- * 只 await 真正的 thenable,避免对同步返回值做无意义等待。- */function isThenable(value: unknown): value is PromiseLike<unknown> {if (value === null || (typeof value !== 'object' && typeof value !== 'function'))return falsereturn typeof (value as PromiseLike<unknown>).then === 'function'}-/** 从标准面投影里取出输入动作(两代同形:`props.inputActions`)。 */function readInputActions(projected: unknown): unknown {if (projected === null || typeof projected !== 'object')return undefined@@ -155,99 +97,48 @@ function readInputActions(projected: unknown): unknown {return inputActions === undefined ? undefined : { props: { inputActions } }}-/**- * 惰性读取 `uiSession.adapter`。- *- * 客户端服务按激活顺序到达:`dsh-tauri-ui` 只声明 `sessions`,会在 `ui-session`- * (额外等 `remote`,由 `dsh-client-connection` 稍后提供)之前激活,因此**适配层创建期- * 读到的 `uiSession` 可能缺席**。依赖它的投影一律在调用期重读,不缓存创建期快照。- */function uiSessionAdapter(probe: AdapterProbe): AdapterRuntimeObject | undefined {return probe.service<AdapterRuntimeObject>('uiSession')?.adapter as AdapterRuntimeObject | undefined}-/**- * 核心不暴露 per-session 的 `provideInfo`:官方能力优先,缺失时借已保留会话的 binding 补齐。- *- * 落点逐版本漂移:`≤0.1.5-rc.2` 在 `uiSession.adapter.resolve(id)`;`0.1.6-alpha.2` 起- * `sessions.binding` 只在**被保留**的会话上存在,标准面改由 `uiSession.adapter.bindingSource`- * 物化,因此这里用 `{ sessionId, binding }` 满足它的 SessionReference 读取路径(binding 未变即有效,- * 与 `sessions.binding` 的「借出不续期」语义一致)。- * 补不出也绝不因此让插件失败——这是可选桥,不是必需能力。- */function resolveProvideInfo(sessions: AdapterRuntimeObject,sessionId: string,probe: AdapterProbe,): unknown {- // 部分桌面运行时即使在 legacy 布局下也提供了完整投影:原生路径优先。const native = sessions.provideInfoif (typeof native === 'function') {+ let value: unknowntry {- const value = native.call(sessions, sessionId)- if (value !== undefined)- return value+ value = native.call(sessions, sessionId)}catch {- // 新建会话正在物化时可能瞬时抛错:继续走下面的兼容投影。+ value = undefined}+ if (value !== undefined)+ return value}-- const bindingFn = sessions.binding- const binding = typeof bindingFn === 'function' ? bindingFn.call(sessions, sessionId) : undefined- if (binding === undefined)- return undefined-- const adapter = uiSessionAdapter(probe)-- // legacy:`uiSession.adapter.resolve(id)` 直接按 id 物化标准面。- const resolveFn = adapter?.resolve- if (typeof resolveFn === 'function') {- try {- return readInputActions(resolveFn.call(adapter, sessionId))- }- catch {- // binding 可能在新会话物化期间消失:按不可用处理。+ try {+ const bindingFn = sessions.binding+ const binding = typeof bindingFn === 'function' ? bindingFn.call(sessions, sessionId) : undefined+ if (binding === undefined)return undefined- }- }-- // 0.1.6-alpha.2:`bindingSource` 只接受 SessionReference,用已借出的 binding 调用它。- const bindingSourceFn = adapter?.bindingSource- if (typeof bindingSourceFn === 'function') {- try {- const source = bindingSourceFn.call(adapter, { sessionId, binding }) as AdapterListProjection | undefined- return readInputActions(typeof source?.getSnapshot === 'function' ? source.getSnapshot() : undefined)- }- catch {+ const adapter = uiSessionAdapter(probe)+ const bindingSource = adapter?.bindingSource+ if (typeof bindingSource !== 'function')return undefined- }+ const source = bindingSource.call(adapter, { sessionId, binding }) as AdapterListProjection | undefined+ return readInputActions(typeof source?.getSnapshot === 'function' ? source.getSnapshot() : undefined)+ }+ catch {+ return undefined}-- return undefined}-/**- * 布局世代探测——**只用于诊断与日志**,任何分支都不读它。- *- * 世代标记是「`uiWorkspace` 这个独立导航服务是否在场」:`≤0.1.2-rc.1` 线把导航与目录选择- * 放在它上面,`0.1.5-rc.1` 起统一收进 `ctx.workspaces`。注意 `sessions.list` 嵌不嵌套**不是**- * 世代信号(两代的 `list` 都带 `getSnapshot` / `subscribe`),它只是能力差异,由迁移自己探测。- */function detectGeneration(service: AdapterProbe['service']): AdapterGeneration {- try {- if (service('uiWorkspace') !== undefined)- return 'legacy'- if (service('sessions') !== undefined || service('workspaces') !== undefined)- return 'modern'- }- catch {- // 半初始化上下文:世代不明,交回能力探测判断。- }- return 'unknown'+ return ['sessions', 'workspaces', 'uiWorkspace'].some(name => service(name) !== undefined) ? 'modern' : 'unknown'}-/** 基线迁移:官方服务方法绑定到原对象(所有布局都跑,越早越好)。 */const SERVICES_AUTO_BIND_MIGRATION: DshMigration = {id: 'services:auto-bind',description: '官方 sessions / workspaces 服务方法自动绑定 this',@@ -260,12 +151,6 @@ const SERVICES_AUTO_BIND_MIGRATION: DshMigration = {},}-/**- * 把列表投影补到 `sessions` 顶层(老写法读 `ctx.sessions.getSnapshot / subscribe`)。- *- * 这是**能力**迁移而非版本迁移:两代核心的投影都挂在 `sessions.list` 上,顶层别名只是让旧式- * 消费方免改;新版若已在顶层提供同形方法则原样保留。- */const SESSIONS_LIST_PROJECTION_MIGRATION: DshMigration = {id: 'sessions:list-projection',description: 'sessions.list 投影 → sessions.getSnapshot / subscribe 顶层别名',@@ -291,18 +176,6 @@ const SESSIONS_LIST_PROJECTION_MIGRATION: DshMigration = {},}-/**- * 把列表快照的 `current` 补回 `sessions.list`。- *- * `0.1.6-alpha.2` 起核心不再把选中态放进列表快照(改由 `uiSession.adapter.current` 持有),- * 而桌面消费方(worktree 会话切换、composer 续跑、右键定位…)都按- * `list.getSnapshot().current` 判断「当前会话」。核心自带 `current` 时原样优先(0.1.5 及更早),- * 缺席时用 `uiSession.adapter.current` 的 binding key 补齐。- *- * 快照按(核心快照引用,current)缓存:uSES 的 `getSnapshot` 必须引用稳定,否则会无限重渲染。- * `current` 源按调用期解析(见 {@link uiSessionAdapter}):`ui-session` 可能晚于本适配层创建,- * 订阅侧因此在每次列表发布时重挂,源一出现就接上。- */function projectListCurrent(list: AdapterListProjection,resolveCurrent: () => AdapterListProjection | undefined,@@ -320,8 +193,7 @@ function projectListCurrent(return {getSnapshot: () => {const snapshot = list.getSnapshot()- const owned = snapshot !== null && typeof snapshot === 'object' ? (snapshot as { current?: unknown }).current : undefined- const selected = owned ?? currentId()+ const selected = currentId()if (snapshot === lastSnapshot && selected === lastCurrent)return lastProjectedlastSnapshot = snapshot@@ -353,19 +225,10 @@ function projectListCurrent(}}-/** 核心列表快照是否自带 `current`(`0.1.5` 及更早自带,`0.1.6-alpha.2` 起交给 `uiSession`)。 */-function ownsCurrent(list: AdapterListProjection): boolean {- const snapshot = list.getSnapshot()- return snapshot !== null && typeof snapshot === 'object' && 'current' in snapshot-}-const SESSIONS_CURRENT_PROJECTION_MIGRATION: DshMigration = {id: 'sessions:current-projection',description: 'uiSession.adapter.current → sessions.list 快照的 current 投影',- detect: (_probe, surface) => {- const list = surface.sessions?.list- return list !== undefined && !ownsCurrent(list)- },+ detect: (_probe, surface) => surface.sessions?.list !== undefined,apply(surface, probe) {const sessions = surface.sessionsconst list = sessions?.list as AdapterListProjection | undefined@@ -387,24 +250,14 @@ const SESSIONS_CURRENT_PROJECTION_MIGRATION: DshMigration = {},}-/** `uiSession.adapter.current` 投影源;缺席(服务未到达或核心不自带该源)时返回 undefined。 */function currentSourceOf(probe: AdapterProbe): AdapterListProjection | undefined {const current = uiSessionAdapter(probe)?.current as AdapterListProjection | undefinedreturn current !== undefined && typeof current.getSnapshot === 'function' ? current : undefined}-/**- * 核心不暴露 per-session 的 `provideInfo`:用 `sessions.binding(id)` +- * `uiSession.adapter`(legacy 的 `resolve`,0.1.6 起的 `bindingSource`)补齐- * (消费方如 worktree 依赖它取 inputActions)。- *- * 探测只认 `binding`:`uiSession` 由投影在调用期解析,因此晚到达的 `ui-session` 不再让桥缺席;- * 会话未被保留(`binding` 缺席)时仍诚实回报 undefined。原生 `provideInfo` 在场也照样装桥:- * 它可能只覆盖部分会话,`resolveProvideInfo` 会原生优先、缺失时回退投影。- */const SESSIONS_PROVIDE_INFO_MIGRATION: DshMigration = {id: 'sessions:provide-info-bridge',- description: 'sessions.binding + uiSession.adapter.resolve|bindingSource → sessions.provideInfo 兼容桥',+ description: 'sessions.binding + uiSession.adapter.bindingSource → sessions.provideInfo',detect: (_probe, surface) => typeof surface.sessions?.binding === 'function',apply(surface, probe) {const sessions = surface.sessions@@ -421,40 +274,19 @@ const SESSIONS_PROVIDE_INFO_MIGRATION: DshMigration = {},}-/**- * 按能力读取一个候选服务上的 `startSession`,返回**绑定到 owner** 的调用器。- *- * `uiWorkspace` 可能晚于适配层创建(见 {@link SESSIONS_OPEN_MIGRATION}),因此调用期重读。- */-function startSessionAt(owner: AdapterRuntimeObject | undefined): AdapterStartSession | undefined {- if (owner === undefined)- return undefined- const fn = owner.startSession- if (typeof fn !== 'function')- return undefined- return (workspaceId?: AdapterWorkspaceId) => fn.call(owner, workspaceId)-}--/** 跨布局解析「新建会话」的官方入口(`uiWorkspace` 优先,`workspaces` 兜底,调用期解析)。 */function resolveStartSessionCapability(surface: AdapterSurface): AdapterStartSession | undefined {- return startSessionAt(surface.uiWorkspace) ?? startSessionAt(surface.workspaces)+ const owner = surface.uiWorkspace+ const fn = owner?.startSession+ return typeof fn === 'function' ? (workspaceId?: AdapterWorkspaceId) => fn.call(owner, workspaceId) : undefined}-/** 迁移写入的 `surface.startSession` 优先;缺席时调用期重解析(晚到达的服务也能接上)。 */function surfaceStartSession(surface: AdapterSurface): AdapterStartSession | undefined {return surface.startSession ?? resolveStartSessionCapability(surface)}-/**- * legacy:`workspaces` 自身没有导航方法,由独立的 `uiWorkspace` 服务提供。- *- * 投影**无条件安装**、候选能力在调用期按需解析:`uiWorkspace` 可能晚于适配层创建,- * 拿「创建期该服务是否在场」当安装判据会让 `workspaces.connectWorkspace` / `startSession`- * 永久缺席(issue #756)。两个候选都没有该能力时返回 undefined,不静默吞掉消费方的调用。- */-const LEGACY_WORKSPACES_MIGRATION: DshMigration = {- id: 'legacy:workspaces-navigation',- description: 'uiWorkspace.startSession / connectWorkspace → workspaces 导航投影(调用期解析)',+const WORKSPACES_NAVIGATION_MIGRATION: DshMigration = {+ id: 'workspaces:navigation',+ description: 'uiWorkspace.startSession / connectWorkspace → workspaces 导航投影',detect: () => true,apply(surface) {const workspaces = surface.workspaces@@ -463,15 +295,14 @@ const LEGACY_WORKSPACES_MIGRATION: DshMigration = {surface.workspaces = new Proxy(workspaces as object, {get(target, prop) {if (prop === 'startSession' || prop === 'connectWorkspace') {- if (surface.uiWorkspace?.[prop] === undefined && typeof Reflect.get(target, prop) !== 'function')+ if (typeof surface.uiWorkspace?.[prop] !== 'function')return undefinedreturn (...args: unknown[]) => {const owner = surface.uiWorkspaceconst fn = owner?.[prop]- if (typeof fn === 'function')- return fn.call(owner, ...args)- const fallback = Reflect.get(target, prop)- return typeof fallback === 'function' ? fallback.call(target, ...args) : fallback+ if (typeof fn !== 'function')+ throw new Error(`uiWorkspace.${prop} is unavailable`)+ return fn.call(owner, ...args)}}const member = Reflect.get(target, prop)@@ -481,125 +312,46 @@ const LEGACY_WORKSPACES_MIGRATION: DshMigration = {},}-/** 跨布局:把「新建会话」收敛成 `surface.startSession`(`uiWorkspace` 优先,`workspaces` 兜底)。 */const NAVIGATION_MIGRATION: DshMigration = {id: 'navigation:resolve-start-session',- description: 'uiWorkspace.startSession ?? workspaces.startSession → surface.startSession',+ description: 'uiWorkspace.startSession → surface.startSession',detect: () => true,apply(surface) {- // 逐个候选服务找「真的实现了 startSession」的那一个:只按服务在场判断会让- // 半迁移宿主(uiWorkspace 只提供 pickDirectory)静默吞掉 workspaces 的原生导航。- // 创建期一个都没有时保持缺席(不落投影),由 surfaceStartSession 在调用期接上晚到的服务,- // 否则能力探测与退级阶梯(点官方按钮 → 明确回报不可用)会把「尚未物化」误判成「已支持」。if (resolveStartSessionCapability(surface) === undefined)returnsurface.startSession = (workspaceId?: AdapterWorkspaceId) => {const start = resolveStartSessionCapability(surface)if (start === undefined)- throw new Error('startSession is unavailable: no uiWorkspace.startSession / workspaces.startSession capability')+ throw new Error('startSession is unavailable: no uiWorkspace.startSession capability')return start(workspaceId)}},}-/**- * `sessions.open` 兼容桥登记表(`surface` → 桥函数)。- *- * 桥带着 `open` 方法,`surface.sessions.open` 在桥缺席时会读回桥自身;能力探测与桥内部解析- * 都要按函数身份把它排除,否则 `has('navigation.openSession')` 会永久自证为 true、- * 桥也会递归调用自己。用 WeakMap 而不是给 `AdapterSurface` 加字段:这是纯诊断用途的- * 内部登记,不进入公开契约。- */-const openBridges = new WeakMap<AdapterSurface, unknown>()--/**- * 解析一个候选落点上的 `open` 能力,返回**绑定到 owner** 的调用器。- *- * 调用期 `surface.sessions` 可能已是被投影包装的 Proxy,`open` 由内层桥提供;桥自身带着- * `open` 方法,因此按函数身份 `exclude` 掉它,避免把桥当成「原生 open」而递归调用。- */-function openCapabilityAt(owner: AdapterRuntimeObject | undefined, member: string, exclude: unknown): AdapterOpenSession | undefined {- if (owner === undefined)- return undefined- const fn = owner[member]- if (typeof fn !== 'function' || fn === exclude)- return undefined- return (sessionId: AdapterSessionId) => fn.call(owner, sessionId)-}--/** 按能力解析「打开已有会话」的官方入口(调用期解析,见 {@link SESSIONS_OPEN_MIGRATION})。 */-function resolveOpenCapability(surface: AdapterSurface, exclude?: unknown): AdapterOpenSession | undefined {- return openCapabilityAt(surface.uiWorkspace, 'openSession', exclude)- ?? openCapabilityAt(surface.workspaces, 'open', exclude)- ?? openCapabilityAt(surface.sessions, 'open', exclude)-}--/** 迁移表里解析出的 `surface.openSession` 快照(调用期重解析,见 {@link resolveOpenCapability})。 */-function surfaceOpenSession(surface: AdapterSurface, exclude?: unknown): AdapterOpenSession | undefined {- return resolveOpenCapability(surface, exclude) ?? surface.openSession+function surfaceOpenSession(surface: AdapterSurface): AdapterOpenSession | undefined {+ const owner = surface.uiWorkspace+ const fn = owner?.openSession+ return typeof fn === 'function' ? sessionId => fn.call(owner, sessionId) : surface.openSession}-/**- * `surface.openSession` 快照是否真的是官方能力(不是 `sessions.open` 兼容桥自己)。- *- * 桥缺席时 `surface.sessions.open` 读到的就是桥本身,能力探测必须把桥排除掉。- */-function hasOpenCapability(surface: AdapterSurface): boolean {- if (resolveOpenCapability(surface, openBridges.get(surface)) !== undefined)- return true- const snapshot = surface.openSession- return snapshot !== undefined && snapshot !== openBridges.get(surface)-}--/** 跨布局:把「打开已有会话」收敛成 `surface.openSession`(解析结果仅作诊断快照)。 */-const NAVIGATION_OPEN_MIGRATION: DshMigration = {- id: 'navigation:resolve-open-session',- description: 'uiWorkspace.openSession ?? workspaces.open ?? sessions.open → surface.openSession',- detect: () => true,- apply(surface) {- const resolved = resolveOpenCapability(surface)- if (resolved !== undefined)- surface.openSession = resolved- },-}--/**- * 把「打开已有会话」补回 `sessions.open`(旧式消费方免改)。- *- * `0.1.6-alpha.2` 起核心移除了 `sessions.open`,选中态改由 `uiWorkspace.openSession` 承担;- * 桌面消费方(worktree 会话切换、桌宠新建会话、右键分叉等)仍按 `sessions.open(id)` 切换。- *- * 桥的**安装判据只看核心有没有 `sessions.open`**:`uiWorkspace` 可能晚于适配层创建,- * 用「创建期是否解析出 openSession」当判据会让桥永久缺席。真正的落点在调用期按能力重解析,- * 与 `provideInfo` / `current` 两条投影同一条约束。原生 `sessions.open` 在场时不装桥。- *- * 候选 owner 一律**读 `target`(内层投影)而不是 `surface.sessions`**:后者在本迁移之后就是- * 本 Proxy,读回来会把桥自身当成原生能力。- */const SESSIONS_OPEN_MIGRATION: DshMigration = {id: 'sessions:open-bridge',- description: 'uiWorkspace.openSession / workspaces.open → sessions.open 兼容桥(调用期解析)',- detect: (_probe, surface) => typeof surface.sessions?.open !== 'function',+ description: 'uiWorkspace.openSession → sessions.open',+ detect: () => true,apply(surface) {const sessions = surface.sessionsif (sessions === undefined)return- const bridge: (sessionId: AdapterSessionId) => unknown = (sessionId) => {- const open = surfaceOpenSession(surface, bridge)- // 能力全缺时明确抛错,不静默吞掉消费方的切换请求。+ const bridge: AdapterOpenSession = (sessionId) => {+ const open = surfaceOpenSession(surface)if (open === undefined)- throw new Error('sessions.open is unavailable: no uiWorkspace.openSession / workspaces.open / sessions.open capability')+ throw new Error('sessions.open is unavailable: no uiWorkspace.openSession capability')return open(sessionId)}- openBridges.set(surface, bridge)surface.sessions = new Proxy(sessions as object, {get(target, prop) {- if (prop === 'open') {- // 核心可能在被捕获之后才补上原生 `open`(服务延迟物化):原生永远优先于兼容桥,- // 否则桥会永久遮蔽后到的原生能力,消费方拿到的仍是「不可用」。- const native = Reflect.get(target, prop)- return typeof native === 'function' ? native.bind(target) : bridge- }+ if (prop === 'open')+ return bridgeconst member = Reflect.get(target, prop)return typeof member === 'function' ? member.bind(target) : member},@@ -607,31 +359,14 @@ const SESSIONS_OPEN_MIGRATION: DshMigration = {},}-/**- * 跨布局:「打开文件夹」三段能力聚合。- *- * 目录选择在 legacy 是 `uiWorkspace.pickDirectory`、modern 是 `workspaces.pickDirectory`;- * 建工作区一直是 `workspaces.create`;开新会话复用「新建会话」解析出的入口。- * 三段缺一即视为不可用,由消费方退级到点官方按钮。- *- * 聚合在**调用期**重算(见 {@link surfaceAddWorkspace}):`uiWorkspace` 可能晚于适配层创建,- * 创建期一次探测会让「打开文件夹」在晚到达的宿主上永久不可用。- */function addWorkspaceAt(surface: AdapterSurface): AdapterAddWorkspaceRuntime | undefined {const workspaces = surface.workspacesconst create = workspaces?.create- // 目录选择的宿主服务随版本迁移(详见文件头):modern 在 workspaces 上,legacy 在 uiWorkspace 上。- const pickOwner = typeof workspaces?.pickDirectory === 'function' ? workspaces : surface.uiWorkspace+ const pickOwner = surface.uiWorkspaceconst pickDirectory = pickOwner?.pickDirectoryconst startSession = surfaceStartSession(surface)- if (- typeof pickDirectory !== 'function'- || typeof create !== 'function'- || pickOwner === undefined- || startSession === undefined- ) {+ if (typeof pickDirectory !== 'function' || typeof create !== 'function' || startSession === undefined)return undefined- }return {pickDirectory: () => pickDirectory.call(pickOwner) as Promise<string | null | undefined>,createWorkspace: input => create.call(workspaces, input),@@ -639,14 +374,13 @@ function addWorkspaceAt(surface: AdapterSurface): AdapterAddWorkspaceRuntime | u}}-/** 迁移写入的 `surface.addWorkspace` 优先;缺席时调用期重算(晚到达的服务也能接上)。 */function surfaceAddWorkspace(surface: AdapterSurface): AdapterAddWorkspaceRuntime | undefined {return surface.addWorkspace ?? addWorkspaceAt(surface)}const WORKSPACE_ADD_MIGRATION: DshMigration = {id: 'workspace:resolve-add-workspace',- description: 'pickDirectory + workspaces.create + startSession → surface.addWorkspace',+ description: 'uiWorkspace.pickDirectory + workspaces.create + startSession → surface.addWorkspace',detect: () => true,apply(surface) {const runtime = addWorkspaceAt(surface)@@ -655,30 +389,17 @@ const WORKSPACE_ADD_MIGRATION: DshMigration = {},}-/**- * 内置迁移(按序执行,后一条能看到前一条的投影):- * 1. 基线自动绑定 → 2. 会话列表投影别名 → 3. 列表 `current` 投影 → 4. `provideInfo` 兼容桥 →- * 5. legacy 工作区导航投影 → 6. 跨布局导航解析 → 7. 跨布局「打开会话」解析 →- * 8. `sessions.open` 兼容桥(安装只看核心有无 `sessions.open`,落点在调用期解析)→- * 9. 跨布局「打开文件夹」解析。- * 消费方可用 `defineAdapter(ctx, { migrations })` 追加,追加项在最后执行。- */export const DEFAULT_DSH_MIGRATIONS: readonly DshMigration[] = [SERVICES_AUTO_BIND_MIGRATION,SESSIONS_LIST_PROJECTION_MIGRATION,SESSIONS_CURRENT_PROJECTION_MIGRATION,SESSIONS_PROVIDE_INFO_MIGRATION,- LEGACY_WORKSPACES_MIGRATION,+ WORKSPACES_NAVIGATION_MIGRATION,NAVIGATION_MIGRATION,- NAVIGATION_OPEN_MIGRATION,SESSIONS_OPEN_MIGRATION,WORKSPACE_ADD_MIGRATION,]-/**- * 迁移后的上下文投影:`sessions` / `workspaces` 换成适配后的服务面,其余成员原样透传;- * 读取失败按 undefined(不把 Cordis 的 inject 守卫抛给消费方)。- */function createAdapterContext(ctx: unknown,sessions: AdapterSessions,@@ -702,7 +423,6 @@ function createAdapterContext(}) as AdapterContext}-/** 新建会话:官方导航 → 点官方按钮 → 明确回报不可用(绝不静默半工作)。 */async function runStartSession(surface: AdapterSurface,workspaceId: AdapterWorkspaceId | undefined,@@ -711,7 +431,6 @@ async function runStartSession(const start = surfaceStartSession(surface)if (start !== undefined) {const value = start(workspaceId)- // 异步实现回报解析后的结果(而不是把 pending Promise 当 value 外抛)。return { status: 'started', value: isThenable(value) ? await value : value }}if (clickIfPresent(NEW_SESSION_SELECTOR))@@ -721,12 +440,6 @@ async function runStartSession(return { status: 'unavailable', reason }}-/**- * 读官方会话列表投影。- *- * 归档是「从列表里消失」而不是某个状态位,所以消费方只能靠 `ids` 判断会话还在不在。- * 快照形态不合预期时返回 undefined,由调用方按「无法判断」退级,而不是猜一个结论。- */function readSessionList(surface: AdapterSurface): AdapterSessionList | undefined {const list = surface.sessions?.listif (list === undefined)@@ -742,18 +455,16 @@ function readSessionList(surface: AdapterSurface): AdapterSessionList | undefine}}-/** 打开已有会话:官方入口在场即打开;会话导航没有 DOM 退级目标,缺席只能明确回报。 */function runOpenSession(surface: AdapterSurface, sessionId: AdapterSessionId, warn: AdapterWarn): AdapterOpenSessionOutcome {- const open = surfaceOpenSession(surface, openBridges.get(surface))+ const open = surfaceOpenSession(surface)if (open === undefined) {- const reason = 'no uiWorkspace.openSession / workspaces.open / sessions.open capability'+ const reason = 'no uiWorkspace.openSession capability'warn(`[dsh-adapter] openSession unavailable: ${reason}`)return { status: 'unavailable', reason }}return { status: 'opened', value: open(sessionId) }}-/** 打开文件夹:官方三段能力全流程 → 点官方按钮 → 明确回报不可用;目录选择器取消是正常结果。 */async function runAddWorkspace(surface: AdapterSurface,options: AdapterAddWorkspaceOptions | undefined,@@ -767,12 +478,9 @@ async function runAddWorkspace(warn(`[dsh-adapter] addWorkspace unavailable: ${reason}`)return { status: 'unavailable', reason }}-const path = await runtime.pickDirectory()- // 用户在原生目录选择器里取消:正常结果,不是失败。if (path === null || path === undefined)return { status: 'cancelled' }-const workspace = await runtime.createWorkspace({ path })const openSession = options?.openSession ?? trueif (openSession) {@@ -783,36 +491,21 @@ async function runAddWorkspace(return { status: 'created', workspaceId: workspace.workspaceId, path, sessionStarted: openSession }}-/**- * 创建 DSH 升级迁移适配实例(`defineRegister` 的第三个参数就由它产生)。- *- * 探测与迁移全程不抛错:单条迁移失败只记入 `failures` 并告警,插件装配照常继续——- * 一条投影失败不该让整个插件不可用,但也不能悄悄吞掉。- *- * @param ctx - 客户端上下文(可为 `undefined`:`defineRegister(setup)()` 直接调用时没有 ctx)。- * @param options - 追加迁移与告警出口。- * @returns 无状态适配实例(不注册监听,无需 disposer)。- */export function defineAdapter(ctx: unknown, options: DefineAdapterOptions = {}): ClientAdapter {const warn = options.onWarn ?? defaultWarnconst service = <T = AdapterRuntimeObject>(name: string): T | undefined =>readService(ctx, name) as T | undefined-const probe: AdapterProbe = { generation: detectGeneration(service), service }const surface: AdapterSurface = {sessions: service<AdapterSessions>('sessions') ?? {},workspaces: service<AdapterWorkspaces>('workspaces') ?? {},- // 取值为 live:`dsh-client-ui-workspace` 额外等 `ui-session` / `connection`,可能晚于本适配层- // 激活;缓存创建期快照会让依赖它的「打开会话」能力永久缺席(见 {@link SESSIONS_OPEN_MIGRATION})。get uiWorkspace() {return service<AdapterRuntimeObject>('uiWorkspace')},- // 取值为 live:`ui-session` 晚于本适配层激活,缓存创建期快照会让依赖它的迁移永久缺席。get uiSession() {return service<AdapterRuntimeObject>('uiSession')},}-const migrations: string[] = []const failures: AdapterMigrationFailure[] = []for (const migration of [...DEFAULT_DSH_MIGRATIONS, ...(options.migrations ?? [])]) {@@ -827,11 +520,8 @@ export function defineAdapter(ctx: unknown, options: DefineAdapterOptions = {}):warn(`[dsh-adapter] migration "${migration.id}" failed; projection kept as-is`, error)}}-const sessions = surface.sessions ?? {}const workspaces = surface.workspaces ?? {}-- // 用 Record 而非 switch 表达穷尽性:新增能力时编译期就会报缺少检查项。const capabilityChecks: Record<AdapterCapability, () => boolean> = {'sessions.list': () => typeof sessions.list?.getSnapshot === 'function','sessions.provideInfo': () => typeof sessions.provideInfo === 'function',@@ -841,7 +531,7 @@ export function defineAdapter(ctx: unknown, options: DefineAdapterOptions = {}):'workspaces.list': () => typeof workspaces.list?.getSnapshot === 'function','workspaces.create': () => typeof workspaces.create === 'function','navigation.startSession': () => surfaceStartSession(surface) !== undefined,- 'navigation.openSession': () => hasOpenCapability(surface),+ 'navigation.openSession': () => surfaceOpenSession(surface) !== undefined,'navigation.addWorkspace': () => surfaceAddWorkspace(surface) !== undefined,'composer.workspace-less': () =>typeof document !== 'undefined'@@ -849,7 +539,6 @@ export function defineAdapter(ctx: unknown, options: DefineAdapterOptions = {}):'dom.newSession': () => typeof document !== 'undefined' && document.querySelector(NEW_SESSION_SELECTOR) !== null,'dom.addWorkspace': () => typeof document !== 'undefined' && document.querySelector(ADD_WORKSPACE_SELECTOR) !== null,}-return {generation: probe.generation,migrations,@@ -860,7 +549,7 @@ export function defineAdapter(ctx: unknown, options: DefineAdapterOptions = {}):service,has: capability => capabilityChecks[capability](),resolveStartSession: () => surfaceStartSession(surface),- resolveOpenSession: () => surfaceOpenSession(surface, openBridges.get(surface)),+ resolveOpenSession: () => surfaceOpenSession(surface),sessionList: () => readSessionList(surface),resolveAddWorkspace: () => surfaceAddWorkspace(surface),startSession: workspaceId => runStartSession(surface, workspaceId, warn),diff --git a/packages/dsh-tauri/src/client/register/navigation.test.ts b/packages/dsh-tauri/src/client/register/navigation.test.tsindex f073f17f..45eb32cf 100644--- a/packages/dsh-tauri/src/client/register/navigation.test.ts+++ b/packages/dsh-tauri/src/client/register/navigation.test.ts@@ -88,7 +88,7 @@ describe('navigationFeature', () => {it('dsh://session:new 走官方 startSession,其它 type 不触发', async () => {const startSession = vi.fn()const host = stubHost()- const ctx = ctxWithServices({ workspaces: { startSession } })+ const ctx = ctxWithServices({ uiWorkspace: { startSession } })const dispose = navigationFeature.call(ctx)host.dispatch({ type: 'dsh://other' })@@ -103,7 +103,7 @@ describe('navigationFeature', () => {const pickDirectory = vi.fn(async () => 'C:/ws')const create = vi.fn(async () => ({ workspaceId: 'ws-1' }))const host = stubHost()- const ctx = ctxWithServices({ workspaces: { startSession, pickDirectory, create } })+ const ctx = ctxWithServices({ workspaces: { create }, uiWorkspace: { startSession, pickDirectory } })const dispose = navigationFeature.call(ctx)host.dispatch({ type: CMD_ADD_WORKSPACE })diff --git a/packages/dsh-tauri/src/client/register/style.utils.test.ts b/packages/dsh-tauri/src/client/register/style.utils.test.tsindex 1e8c6899..14150671 100644--- a/packages/dsh-tauri/src/client/register/style.utils.test.ts+++ b/packages/dsh-tauri/src/client/register/style.utils.test.ts@@ -65,7 +65,7 @@ afterEach(() => {})describe('getOverlayMarkedStyle', () => {- it('≤0.1.7-alpha.1:底色在蒙版元素自身', () => {+ it('preserves an opaque background painted on the overlay itself', () => {install([element({own: {backgroundColor: 'rgba(0, 0, 0, 0.24)',diff --git a/packages/dsh-tauri/src/client/register/style.utils.ts b/packages/dsh-tauri/src/client/register/style.utils.tsindex 84ce7e82..cc5c9f6a 100644--- a/packages/dsh-tauri/src/client/register/style.utils.ts+++ b/packages/dsh-tauri/src/client/register/style.utils.ts@@ -64,7 +64,6 @@ export function getSidebarStyle() {** 入场动效按官方 `modalEnter` 的时长/缓动镜像成 `background`、`backdrop-filter` 过渡:* 壳层在自己的文档里,拿不到包内 CSS 的 keyframes 名,过渡是等价且不跨文档的实现- * (进场淡入、出场瞬时,与官方一致);无动画的代次(≤0.1.7-alpha.1)时长解析为 `0s`。*/export function getOverlayMarkedStyle() {const overlay = overlayElement()diff --git a/packages/dsh-tauri/src/client/types/adapter.ts b/packages/dsh-tauri/src/client/types/adapter.tsindex b280a6eb..1a695415 100644--- a/packages/dsh-tauri/src/client/types/adapter.ts+++ b/packages/dsh-tauri/src/client/types/adapter.ts@@ -1,34 +1,8 @@-/**- * client/types/adapter.ts — DSH 客户端升级迁移适配层的公开契约。- *- * 实现见 `client/register/index.adapter.ts`(`defineAdapter` / `defineRegister` 第三个参数)。- *- * 存在的理由:官方核心的客户端服务布局逐版本漂移,同一件事在不同版本落在不同服务上——- * 目录选择在 `≤0.1.2-rc.1` 线由独立的 `uiWorkspace` 提供,`0.1.5-rc.1` 起收进- * `ctx.workspaces.pickDirectory`;会话列表投影在旧版嵌在 `sessions.list` 上,新版- * `sessions.list` 本身就是 ObservableSnapshot 契约。消费插件不该散落- * `if (version)` 分支与 `as unknown as` 断言。- *- * 本契约只描述「能力」,不描述「版本」:成员按需可选,探测不到即视为不可用。- * 消费方按退级阶梯自行决定(官方 API → 桌面壳补丁 → DOM 补丁 → 禁用),- * 或直接用 `startSession` / `addWorkspace`,由适配层替它走完整条退级链路。- */--/** 运行期服务对象的宽松读取目标(官方 client 服务的结构随版本漂移)。 */export type AdapterRuntimeObject = Record<string, unknown>--/** 会话 id / 工作区 id 的结构等价物(不绑定具体核心版本的 branded 类型)。 */export type AdapterSessionId = stringexport type AdapterWorkspaceId = string+export type AdapterGeneration = 'modern' | 'unknown'-/**- * 探测到的服务布局世代——**只用于诊断与日志**,任何分支都不读它:- * `legacy` 对 `≤0.1.2-rc.1` 线(导航在独立 `uiWorkspace`、列表投影嵌在 `sessions.list`),- * `modern` 对 `0.1.5-rc.1` 起(导航与目录选择统一在 `workspaces`)。- */-export type AdapterGeneration = 'legacy' | 'modern' | 'unknown'--/** 官方列表服务的稳定投影(`list.subscribe` / `list.getSnapshot`)。 */export interface AdapterListProjection<TSnapshot = unknown> {subscribe: (listener: () => void) => () => voidgetSnapshot: () => TSnapshot@@ -40,17 +14,11 @@ export interface AdapterSessionCreateOptions {sessionId?: AdapterSessionId}-/** 已适配的 `ctx.sessions` 面;成员按能力可选,缺失即视为不可用。 */export interface AdapterSessions extends AdapterRuntimeObject {- /** `useSessions` 标准 feed(跨版本同形)。 */list?: AdapterListProjection- /** legacy 投影:由 `list.getSnapshot` 派生(新核心请直接用 `list.getSnapshot`)。 */getSnapshot?: () => unknown- /** legacy 投影:由 `list.subscribe` 派生。 */subscribe?: (listener: () => void) => () => void- /** legacy 投影:per-session 信息查询(新核心已由 `provide` / `currentProvideInfo` 取代)。 */provideInfo?: (sessionId: AdapterSessionId) => unknown- /** 稳定会话 binding(legacy 的 `provideInfo` 兼容投影依赖它)。 */binding?: (sessionId: AdapterSessionId) => unknowncreate?: (options?: AdapterSessionCreateOptions) => Promise<AdapterSessionId>refreshProjections?: (sessionId: AdapterSessionId) => Promise<void>@@ -59,70 +27,35 @@ export interface AdapterSessions extends AdapterRuntimeObject {fork?: (...args: unknown[]) => unknown}-/** 已适配的 `ctx.workspaces` 面;成员按能力可选,缺失即视为不可用。 */export interface AdapterWorkspaces extends AdapterRuntimeObject {list?: AdapterListProjection- /** 登记一个已有路径为工作区。 */create?: (input: { path: string }) => Promise<{ workspaceId: AdapterWorkspaceId } & AdapterRuntimeObject>- /** 新建会话(modern 原生 / legacy 由 `uiWorkspace` 投影)。 */startSession?: (workspaceId?: AdapterWorkspaceId) => unknown- /** 连接的复用或新建空白会话(modern 原生 / legacy 由 `uiWorkspace` 投影)。 */connectWorkspace?: (workspaceId: AdapterWorkspaceId) => unknown- /** 拉起宿主原生目录选择器(modern 原生 / legacy 在 `uiWorkspace` 上)。 */- pickDirectory?: () => Promise<string | null | undefined>- /** 打开已有会话(0.1.6-alpha.2 起改由 `uiWorkspace.openSession` 承担,此处为兼容候选)。 */- open?: (sessionId: AdapterSessionId) => unknownarchiveSession?: (...args: unknown[]) => unknowndelete?: (...args: unknown[]) => unknown}-/**- * 「打开文件夹」三段能力的聚合面。- *- * 与官方「添加工作区」流程(`pickDirectory()` → `create({ path })` → `startSession(id)`)- * 逐步一致;三段缺一即视为不可用,由消费方退级到点官方按钮。- */export interface AdapterAddWorkspaceRuntime {pickDirectory: () => Promise<string | null | undefined>createWorkspace: (input: { path: string }) => Promise<{ workspaceId: AdapterWorkspaceId }>startSession: (workspaceId: AdapterWorkspaceId) => unknown}-/**- * 官方会话列表的稳定投影。- *- * 这是判断「某条会话是否还在」的唯一官方依据:归档的会话会直接从 `ids` 消失,- * 而不是被标记成某个状态。- */export interface AdapterSessionList {- /** 官方活动会话 id(已归档的不在其中)。 */ids: readonly AdapterSessionId[]- /** 当前选中的会话 id。 */current?: AdapterSessionId- /** 订阅列表变化。 */subscribe: (listener: () => void) => () => void}-/** 跨版本导航入口(legacy 的 `startSession` 返回 void,modern 也返回 void)。 */export type AdapterStartSession = (workspaceId?: AdapterWorkspaceId) => unknown--/**- * 跨版本「选中已有会话」入口。- *- * 落点随版本迁移:`≤0.1.5-rc.2` 在 `sessions.open`,`0.1.6-alpha.2` 收进- * `uiWorkspace.openSession` 并移除了 `sessions.open`。- */export type AdapterOpenSession = (sessionId: AdapterSessionId) => unknown-/** 守卫安全的服务读取器(`ctx.get(name)` 优先,回退属性读取,异常即不可用)。 */export interface AdapterProbe {- /** 读官方服务;Cordis 的 inject-only 守卫抛错时返回 undefined。 */service: <T = AdapterRuntimeObject>(name: string) => T | undefined- /** 由原始上下文探测出的布局世代(迁移执行前算好,只作诊断)。 */generation: AdapterGeneration}-/** 迁移可读写的适配中间态:迁移按序把服务投影到这里,最终冻结为 `ClientAdapter`。 */export interface AdapterSurface {sessions?: AdapterSessionsworkspaces?: AdapterWorkspaces@@ -133,28 +66,18 @@ export interface AdapterSurface {addWorkspace?: AdapterAddWorkspaceRuntime}-/**- * 一条 DSH 升级迁移。- *- * 约定:`detect` 只读上下文(能力探测),`apply` 只写表面投影;两者都应为幂等、无副作用的- * 纯投影——不注册监听、不写官方服务、不依赖调用顺序以外的状态。- */export interface DshMigration {- /** 稳定 id(诊断、测试与 `adapter.migrations` 断言的键)。 */id: string- /** 该迁移负责的版本差异(文档用)。 */description?: stringdetect: (probe: AdapterProbe, surface: AdapterSurface) => booleanapply: (surface: AdapterSurface, probe: AdapterProbe) => void}-/** 迁移执行失败记录:不中断插件装配,但绝不静默。 */export interface AdapterMigrationFailure {migration: stringerror: unknown}-/** 可探测的适配能力;消费方据此选退级路径,而不是猜版本号。 */export type AdapterCapability= | 'sessions.list'| 'sessions.provideInfo'@@ -170,18 +93,15 @@ export type AdapterCapability| 'dom.newSession'| 'dom.addWorkspace'-/** `adapter.startSession()` 的结果:明确回报走了退级阶梯的哪一级。 */export type AdapterStartSessionOutcome= | { status: 'started', value: unknown }| { status: 'delegated' }| { status: 'unavailable', reason: string }-/** `adapter.openSession()` 的结果:官方入口在场即打开,缺席明确回报不可用。 */export type AdapterOpenSessionOutcome= | { status: 'opened', value: unknown }| { status: 'unavailable', reason: string }-/** `adapter.addWorkspace()` 的结果:明确回报走了退级阶梯的哪一级。 */export type AdapterAddWorkspaceOutcome= | { status: 'created', workspaceId: AdapterWorkspaceId, path: string, sessionStarted: boolean }| { status: 'cancelled' }@@ -189,53 +109,33 @@ export type AdapterAddWorkspaceOutcome| { status: 'unavailable', reason: string }export interface AdapterAddWorkspaceOptions {- /** 建好工作区后是否立即在其上开新会话(官方流程为 true,默认 true)。 */openSession?: boolean}-/** 迁移后的上下文投影:`sessions` / `workspaces` 已换成适配后的服务面。 */export interface AdapterContext extends AdapterRuntimeObject {sessions?: AdapterSessionsworkspaces?: AdapterWorkspaces}-/** DSH 升级迁移适配实例(`defineRegister` 的第三个参数)。 */export interface ClientAdapter {- /** 探测到的布局世代(诊断用)。 */readonly generation: AdapterGeneration- /** 本次实际应用的迁移 id(按执行顺序)。 */readonly migrations: readonly string[]- /** 探测或迁移失败的记录(失败即告警,不中断装配)。 */readonly failures: readonly AdapterMigrationFailure[]- /** 迁移后的上下文投影(旧写法可继续经它取服务)。 */readonly ctx: AdapterContext- /** 适配后的会话服务面(服务缺席时为空对象,消费方可直接可选链)。 */readonly sessions: AdapterSessions- /** 适配后的工作区服务面(服务缺席时为空对象)。 */readonly workspaces: AdapterWorkspaces- /** 读任意官方服务(守卫安全)。 */service: <T = AdapterRuntimeObject>(name: string) => T | undefined- /** 能力探测:不猜版本号,缺什么就报什么。 */has: (capability: AdapterCapability) => boolean- /** 解析出的官方「新建会话」入口;缺席返回 undefined(调用方自行退级)。 */resolveStartSession: () => AdapterStartSession | undefined- /** 解析出的官方「打开已有会话」入口;缺席返回 undefined(调用方自行退级)。 */resolveOpenSession: () => AdapterOpenSession | undefined- /** 读官方会话列表投影;列表能力缺席时返回 undefined(调用方按「无法判断」处理)。 */sessionList: () => AdapterSessionList | undefined- /** 解析出的官方「打开文件夹」能力;三段缺一返回 undefined。 */resolveAddWorkspace: () => AdapterAddWorkspaceRuntime | undefined- /** 新建会话:官方服务 → 点官方按钮 → 明确回报不可用。 */startSession: (workspaceId?: AdapterWorkspaceId) => Promise<AdapterStartSessionOutcome>- /** 打开已有会话:官方服务 → 明确回报不可用。 */openSession: (sessionId: AdapterSessionId) => AdapterOpenSessionOutcome- /** 打开文件夹:官方三段能力全流程 → 点官方按钮 → 明确回报不可用。 */addWorkspace: (options?: AdapterAddWorkspaceOptions) => Promise<AdapterAddWorkspaceOutcome>}export interface DefineAdapterOptions {- /** 追加迁移;在 `DEFAULT_DSH_MIGRATIONS` 之后按序执行(可覆盖既有投影)。 */migrations?: readonly DshMigration[]- /** 告警出口(默认 console.warn;宿主可注入以把适配降级上报到插件面板)。 */onWarn?: (message: string, error?: unknown) => void}diff --git a/packages/dsh-tauri/src/client/types/harness.ts b/packages/dsh-tauri/src/client/types/harness.tsindex 7bc8f0d7..b3e4bbd6 100644--- a/packages/dsh-tauri/src/client/types/harness.ts+++ b/packages/dsh-tauri/src/client/types/harness.ts@@ -5,8 +5,6 @@* `@deepseek-ai/cordis` 的 `Context`(slots / uiRenderer / sessions / workspaces /* locale / layout),因此 `ClientContext` 就是增强后的 cordis `Context`,不再自行声明* 自包含接口。本文件同时是客户端全部类型(上游类型 + Tauri 桥/适配层协议)的唯一出口。- *- * 【基准】@deepseek-ai/* 0.2.1-alpha.1(版本由 pnpm-workspace.yaml 的 `dsh` catalog 钉住)。*/import type { Context } from '@deepseek-ai/cordis'import type { ISessions } from '@deepseek-ai/dsh-api-session-controller/client'diff --git a/packages/dsh-tauri/src/host/service/gate.runtime.test.ts b/packages/dsh-tauri/src/host/service/gate.runtime.test.tsindex 4139532d..627185a6 100644--- a/packages/dsh-tauri/src/host/service/gate.runtime.test.ts+++ b/packages/dsh-tauri/src/host/service/gate.runtime.test.ts@@ -46,7 +46,7 @@ it('real core /api prefix admits its original peer only while the embedded gateawait connectionModule.apply(context)await vi.waitFor(() => expect(routes.map(route => route.path)).toContain('/api'))const connection = context.connection as HostConnectionService & {- browserPeer?: { id: string, signal: AbortSignal, dispose: () => Promise<void> }+ operator?: Pick<HostConnectionService['browserPeer'], 'id' | 'signal' | 'dispose'>admitConnection?: (request: IncomingMessage) => { rejection: number } | { peer: unknown, release: () => Promise<void> }}const peer = connection.browserPeer ?? connection.operatordiff --git a/packages/dsh-tauri/src/host/types/harness.ts b/packages/dsh-tauri/src/host/types/harness.tsindex feaf0ee5..fdd1ef96 100644--- a/packages/dsh-tauri/src/host/types/harness.ts+++ b/packages/dsh-tauri/src/host/types/harness.ts@@ -6,8 +6,6 @@* agentDefaultModel / agentPresets / permissionPresets / connection /* storageDomain / approval)。本文件只补桌面端自有的宿主服务(webServer / loader),* 并作为 dsh-tauri 宿主侧全部类型的统一出口。- *- * 【基准】@deepseek-ai/* 0.2.1-alpha.1(版本由 pnpm-workspace.yaml 的 `dsh` catalog 钉住)。*/import type { Context } from '@deepseek-ai/cordis'import type { Agent, AgentHandle, AgentSetupCommit } from '@deepseek-ai/dsh-agent'diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 38232931..1d8a582d 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -76,113 +76,113 @@ catalogs:version: 2.3.2dsh:'@deepseek-ai/cordis':- specifier: 4.0.5-alpha.1- version: 4.0.5-alpha.1+ specifier: 4.0.5+ version: 4.0.5'@deepseek-ai/cordis-plugin-group':- specifier: 1.0.5-alpha.1- version: 1.0.5-alpha.1+ specifier: 1.0.5+ version: 1.0.5'@deepseek-ai/cordis-plugin-include':- specifier: 1.0.10-alpha.1- version: 1.0.10-alpha.1+ specifier: 1.0.10+ version: 1.0.10'@deepseek-ai/cordis-plugin-loader':- specifier: 1.0.6-alpha.1- version: 1.0.6-alpha.1+ specifier: 1.0.6+ version: 1.0.6'@deepseek-ai/dsh-agent':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-agent-default-model':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-agent-loop':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-agent-preset':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-agent-preset-registry':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-api-session-controller':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-api-workspace-controller':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-connection':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-locale':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-store':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-conversation':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-layout':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-primitives':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-renderer':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-session':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-settings':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-slots':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-theme':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-client-ui-workspace':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-host-webserver':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-llm':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-permission-presets':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-session':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-session-persistence':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-session-projection':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-skill-filesystem':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-tools':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-user-approval':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-user-questions':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-util-code-language':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-util-values':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1'@deepseek-ai/dsh-workspace':- specifier: 0.2.1-alpha.1- version: 0.2.1-alpha.1+ specifier: 0.2.1-rc.1+ version: 0.2.1-rc.1lint:'@antfu/eslint-config':specifier: ^9.3.0@@ -378,9 +378,6 @@ catalogs:diff:specifier: 9.0.0version: 9.0.0- dsh-session-current:- specifier: npm:@deepseek-ai/[email protected]- version: 0.2.1-alpha.2immer:specifier: 10.1.1version: 10.1.1@@ -660,112 +657,112 @@ importers:version: 9.3.0(@eslint-react/[email protected]([email protected]([email protected]))([email protected]))(@typescript-eslint/[email protected]([email protected]))(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))(@vue/[email protected])([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected])([email protected])'@deepseek-ai/cordis':specifier: catalog:dsh- version: 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ version: 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])'@deepseek-ai/cordis-plugin-group':specifier: catalog:dsh- version: 1.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ version: 1.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])'@deepseek-ai/cordis-plugin-include':specifier: catalog:dsh- version: 1.0.10-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ version: 1.0.10(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])'@deepseek-ai/cordis-plugin-loader':specifier: catalog:dsh- version: 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])+ version: 1.0.6(@deepseek-ai/[email protected])([email protected])'@deepseek-ai/dsh-agent':specifier: catalog:dsh- version: 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)+ version: 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)'@deepseek-ai/dsh-agent-default-model':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'@deepseek-ai/dsh-agent-loop':specifier: catalog:dsh- version: 0.2.1-alpha.1(e1828a76db60a945ed06863233e61b8e)+ version: 0.2.1-rc.1(5b3ff47d581eefbbe78423e40aa0ce48)'@deepseek-ai/dsh-agent-preset':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](54d3464f7955532d08907e94aa6ef05e))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](71ffdfd1d3a7cef10db94d8acfe158e7))'@deepseek-ai/dsh-agent-preset-registry':specifier: catalog:dsh- version: 0.2.1-alpha.1(54d3464f7955532d08907e94aa6ef05e)+ version: 0.2.1-rc.1(71ffdfd1d3a7cef10db94d8acfe158e7)'@deepseek-ai/dsh-api-session-controller':specifier: catalog:dsh- version: 0.2.1-alpha.1(a79f88b2459a2ea67d90459500724f45)+ version: 0.2.1-rc.1(2fe48064461599bc195bdd80b7ba6bf8)'@deepseek-ai/dsh-api-workspace-controller':specifier: catalog:dsh- version: 0.2.1-alpha.1(d3483591bb775ec681d959d8dbc1efc5)+ version: 0.2.1-rc.1(0042cb50664b205915e88624151fd3e4)'@deepseek-ai/dsh-client-connection':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'@deepseek-ai/dsh-client-locale':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-store':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-conversation':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-layout':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-primitives':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-renderer':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-session':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-settings':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-slots':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-theme':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-client-ui-workspace':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-host-webserver':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-llm':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-permission-presets':specifier: catalog:dsh- version: 0.2.1-alpha.1(1489a79f98e16e336ccc634555797cd6)+ version: 0.2.1-rc.1(4b0904c14ed0fa9409cf478adaaa38d5)'@deepseek-ai/dsh-session':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'@deepseek-ai/dsh-session-persistence':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'@deepseek-ai/dsh-session-projection':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))'@deepseek-ai/dsh-skill-filesystem':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))'@deepseek-ai/dsh-tools':specifier: catalog:dsh- version: 0.2.1-alpha.1(6990646b5580becf37a10a1fe3d5469e)+ version: 0.2.1-rc.1(14ea9b2f1090d1f852482c689f41a9bb)'@deepseek-ai/dsh-user-approval':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))'@deepseek-ai/dsh-user-questions':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'@deepseek-ai/dsh-util-code-language':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-util-values':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])'@deepseek-ai/dsh-workspace':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'@eslint-react/eslint-plugin':specifier: catalog:lint@@ -840,10 +837,7 @@ importers:version: 9.0.0dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])- dsh-session-current:- specifier: catalog:testing- version: '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])eslint:specifier: catalog:lintversion: 10.8.1([email protected])@@ -912,7 +906,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])h3:specifier: 'catalog:'version: 2.0.1@@ -964,7 +958,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1034,7 +1028,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1065,7 +1059,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1117,7 +1111,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1158,7 +1152,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1186,7 +1180,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1211,10 +1205,10 @@ importers:dependencies:'@deepseek-ai/dsh-skill-filesystem':specifier: catalog:dsh- version: 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ version: 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1239,7 +1233,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1255,6 +1249,9 @@ importers:schemastery:specifier: catalog:utilsversion: 3.18.0+ semver:+ specifier: catalog:runtime+ version: 7.8.5ssh2:specifier: catalog:utilsversion: 1.17.0@@ -1280,6 +1277,9 @@ importers:'@types/react-dom':specifier: catalog:typesversion: 19.2.4(@types/[email protected])+ '@types/semver':+ specifier: catalog:types+ version: 7.8.0'@types/ssh2':specifier: catalog:typesversion: 1.15.6@@ -1312,7 +1312,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1343,7 +1343,7 @@ importers:version: 6.0.0dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1386,7 +1386,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1438,7 +1438,7 @@ importers:dependencies:dsh-h3:specifier: 'catalog:'- version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])+ version: 0.2.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected])dsh-tauri:specifier: workspace:*version: link:../dsh-tauri@@ -1999,139 +1999,139 @@ packages:resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==}engines: {node: '>=18'}- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-sxreqVFNaU+htapFHLjc7zQnC10afWeHRPWfWZi+I9nvMrXGLoj2qanXGoYL7QHo8F95NMQYRL5ENZJnqw9trw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-PGYqImAydmAjmy5fl1Js6qDmk0Ivt1fipa3fOj1KyyRd0tZ9i61a2rhzHc7LaSeBb/spJ1LF4k3Pcppaq+w8fw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-rGRfj74+IzeN9yDPMh9kO2VVUur75mcllouKZhyb5Vk77ZdQqSmo4KPibGsRbXEHaP8rzscTC267UPZVmWztWA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Rdo6Uqf9WfDbfN3dsYkYj/EW+SGuWCSfthz1PoOtZYUr6qrRpqD7ND4Gj3nUYj8XhSGIo8E3xpsck6J5nM5BYQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-S+3ygx3cyoA/uvcX8hpWf+FnNlygO2pE3BgLMC0Y+vss3SHmGPPC/gfELBQFu0WPRa4ieE0ZRdTk0FLW12e1Eg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-fr011A782oEjkJXCY4pePt2qaPpkGvem7Rmst6Rhwgg6icgwI4eN9QBRb6S/q9XOYGVQUdvL0wXUWyNxO8WipA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- node-addon-require-builtin: ^0.1.6+ '@deepseek-ai/cordis': ~4.0.5+ node-addon-require-builtin: ^0.1.9peerDependenciesMeta:node-addon-require-builtin:optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-I0akiPAK9EEWO+GMAO0YGbn3/rzg/yopaxohBaG9JHM8dDzGaCZNp3mehjeC66IQL0AyTyDwvgv7v1aB+eMnKQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Sktq5axy0owk9PdnivBRNOJjHEVEibCt0+TDDZcv0+UH2KS1M910fX4kn5y45YFsrpZIi1mJf/1s5VzywMUnyg==}hasBin: truepeerDependencies:- '@deepseek-ai/cordis-plugin-include': ~1.0.10-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1+ '@deepseek-ai/cordis-plugin-include': ~1.0.10+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6peerDependenciesMeta:'@deepseek-ai/cordis-plugin-include':optional: true'@deepseek-ai/cordis-plugin-loader':optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-qtuYVBRu7VrD1jLHvaM5sSShtBVgff/0R5vx57fsHUeeobvvv5TmtnTrs0+h4H263kF3ie25VO70Ija8R1eaow==}-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-1BUz0I3Nt0SQPkc/gL8nl0Cp202xIPicjc/PTJiAFWpIHxXkeRUCn6U/XiLevaljPunALamQ5xT5eR/g6bGDgQ==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Tg1iniB25uzDWEb7M/22BovzleV12OqzL4PgPYxThWGe7HbzL47pK0f+vooew2ZEXvFbJ8dlwZLETD0wmLH34w==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-jHD5M0POCDvh3IpjLCUPQxDrIONHa24jnnA75EocyAhTTrVRvprBNNrVoIStmKAhjML2t9Iy6V2Zk/GycpYcbA==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-include': ~1.0.10-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-settings': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-OM/SHYStiNkAnM3dNacL6DcyM9RZj1MTiuNvVLpY7Mq1P4M8vNZI+qHRud6RlliqTXXizkAdtXvgv+hNlw16cQ==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-BFgw84lNQyhoPusRP/rjEV7RvEoDlLjgqgl62WeoCzqEv/kn/+Memua2KwEE2KpdpKqpQX+BJ87ndS8EJXX9ng==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-ZSD/fN52L498LBIOYwjIOlaLv5veY6ZEwI2yzvZUKQtctn0QAPqu8tKdJ+OF5+Tv6NBq1U+wJWH+QI6OGy5EvQ==}++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-/Pv10PDX50g+iVJN6FjcdPzMHSsaTBWTsNs8/Peiv0av1cGz7q4vLiHOjRCR1XmUQhNDWNl1EJPHoXDnsptwsA==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-FiSNfvpoMP9XSFUirQchRG4mDhNvQx/Ia5OdbkJzEDMUckZ+ecailEmvLn7bcl6EhfmEmAKvzUyuNs4C9qHM1Q==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-ZgGKXKZb3YeRq2kfCVhOKSBdi6DhXWWJJr9jY2qlI15E7PZ55Se1LMpD6zdMrDhm0CVOLIPOGY/n1obFsz8b0A==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/cordis-plugin-include': ~1.0.10+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-settings': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-P1hZ1EOjbEAU77T05/EpCP994/bFeHVQizSF7LB4qJDZh1eEvxr+/uLjqcLudo5U79sC+S0Q0B1gVZ/FaD94jw==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-lwnLPKbEixZdMfYgTWmeUiDaQIKgYjdhjNxF7DRDVljaknanivsSAwSUqyJ6ze3xnsBU36CZ365faeEduNEGdQ==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1peerDependenciesMeta:'@deepseek-ai/dsh-workspace':optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-FEpFSU2BdmnCfZfBEy3qFafCmKTjTY2vXrmiNIE9OuBvlpFFxa/4No1aM5tA5B6EV/oujWAz3sCfL9mNqwKxGg==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-RPWVbDeLG9cDVyIuWZeULkqhJ+VGHddP5pJt1FpimlYqgzxt/9ckr04QzMFLtb1jp4agf+oC/c7Q38+rQDoMvQ==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-default-model': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1- '@deepseek-ai/dsh-api-gateway': 0.2.1-alpha.1- '@deepseek-ai/dsh-attachment': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-file-upload': 0.2.1-alpha.1- '@deepseek-ai/dsh-commands': 0.2.1-alpha.1- '@deepseek-ai/dsh-credentials': 0.2.1-alpha.1- '@deepseek-ai/dsh-file-reference': 0.2.1-alpha.1- '@deepseek-ai/dsh-fs': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-native-command': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection-cache': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-query': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-title': 0.2.1-alpha.1- '@deepseek-ai/dsh-settings': 0.2.1-alpha.1- '@deepseek-ai/dsh-skill': 0.2.1-alpha.1- '@deepseek-ai/dsh-subagent': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-registry': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-time': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-workspace-path': 0.2.1-alpha.1- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-iCdUHe8/kgoE7L+0ElRRYV6LkNW21CJTStJS8nPyhcB71l27iiQOvuuRNlyptndyj9mFAr09MYV+fqHnMwI70Q==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-pow1DEJhYvbYvgJwlaynS5WZgtRL2H5EmU/n49oXLmd30d4NU/4gK6h9i/+P2+wOm4ZZrOB26sJgLgEDj2dHKA==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-default-model': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1+ '@deepseek-ai/dsh-api-gateway': 0.2.1-rc.1+ '@deepseek-ai/dsh-attachment': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-connection': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-file-upload': 0.2.1-rc.1+ '@deepseek-ai/dsh-commands': 0.2.1-rc.1+ '@deepseek-ai/dsh-credentials': 0.2.1-rc.1+ '@deepseek-ai/dsh-file-reference': 0.2.1-rc.1+ '@deepseek-ai/dsh-fs': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-native-command': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection-cache': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-query': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-title': 0.2.1-rc.1+ '@deepseek-ai/dsh-settings': 0.2.1-rc.1+ '@deepseek-ai/dsh-skill': 0.2.1-rc.1+ '@deepseek-ai/dsh-subagent': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-registry': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-time': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-workspace-path': 0.2.1-rc.1+ '@deepseek-ai/dsh-working-directory': 0.2.1-rc.1+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1peerDependenciesMeta:'@deepseek-ai/dsh-session-persistence':optional: true@@ -2140,330 +2140,319 @@ packages:'@deepseek-ai/dsh-settings':optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-4KiHGmWJ2Q7F2p3lhhwylsGxA4RYg04E2JOSoszdAJg2gk8hjRVjI6iCzKBUnxswFVSWRFtHRebS6/fPFOul0A==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-api-gateway': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1- '@deepseek-ai/dsh-host-directory-picker': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-storage-domain': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-UZ1DiyT8qBcMCoCt8jm1tcBlunByNWAGF7/rJ6/aCba+i/TCKnY37vlSlk5lslLuv4SomGLtBOQ+H7JSYjxSdg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-UgifKGTa1vBNMgOfAvIJtsbWU4vwtn7t83ZDVJiWMlVN+72+lqdupV/gDl6Vz+aHn72oGG4W7uANIjHP3plckQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-group': ~1.0.5-alpha.1- '@deepseek-ai/cordis-plugin-include': ~1.0.10-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1- '@deepseek-ai/dsh-home-paths': 0.2.1-alpha.1- '@deepseek-ai/dsh-launch-environment': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-api-gateway': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-connection': 0.2.1-rc.1+ '@deepseek-ai/dsh-host-directory-picker': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-storage-domain': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-4ADMLg8g0HVK2Tor/qPoT7RKdSeyRiK3MSj+PBIaxR0ZtQvxxoWbFJGwj4WwUyePhtMDfxYNhdwXDvYovlyTkg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-gdmfJnLRBxXcYDcOFylikAJNm6/Ufw/uajjxpZskYX+RbKXEFzjWg0qRjlpUIbMqwBTCZZKUjijmuJNFYDb4zA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/cordis-plugin-group': ~1.0.5+ '@deepseek-ai/cordis-plugin-include': ~1.0.10+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6+ '@deepseek-ai/dsh-home-paths': 0.2.1-rc.1+ '@deepseek-ai/dsh-launch-environment': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Fqwym3k1JbypM6vocxRc4pUVCVBdUdKxbC1V5zYyK6EwEO+5dN0QVEtdRUd1LNo7pcUQruhPtI4CWVSULDSNgg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Evl8o5uv2st9kjBzs9L/E8EqdmTfplvQ3UjPFzHQLef7+bBkj40pRzhziwg4eD2iWbIZMAxHF6gxa6INL4wbqg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-DNzncR3F5uO21E/dQGHvIFpYu1I11Ti3okkqUsE4BWqMyCsgLUaSGX/Vg6dtYeoFmPNbcWuhmk26L1/uaz1/Gw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-CWiS0AVziuTU7WMTKdO3IcGQQyoW6TLhJYdSuT1UteXPtw5fa3mzD97IihRGUi9YPz77g2t0Y79BpBTMGA5BWg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-2cpJzyu0IbyRXwZMBSEy+tWxj1OvhgiQwSTY1GlhEcPi+VF0nvT2pJIa/i43kH+0hs48r4tFX/v/tczK6d//Hg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-24PMiFxG2CxszA8ApwgVi+GTlmEd0aDYclyzHh2bED6vqiiiByrSCJ/GiEOGiZC73kSZIYN8LBlJhYqq6O+Jdg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-j8k2SUn4D0LOxgQnPPHCOqphLe/YdHIQuRrLdXX4o6oNynrOSQSWYsbvHqQxhjbRdDFHqcOXZf2u5/tMcrWYKA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-9429sR0n/2Rt0P5XMolhZGToV4R0KS1P8qSJ0b3scxHMlco+a55M8TJrnYuGo0weo9FAABulKYZ6PW9XmUVMBw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-y4O4Ryj4vlM08v4XCU6Pb0eaYIbq4jmRXWR4Xd4veUEKXlKzIhoBxbHu6Vm30sOrAmaDjCbFhkuEmEvHoxgjcw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-V/85e7+jPTUI7s1vAO8E4xhp8XmUlF9OuDXhiwYOyp83YvQ1ueG5yAM+ME7rul11ed9Tgy2FSlIffUYfMKdDXQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-XRNu6EWrcEOuZPjsGJeBlhT6C69lEGknkuQUuRoDwxVTrjz4WuXsKyvPspo++Ak+EOOqI32cYJOqBI886oiqhg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-cU4UJHryGTSN6cSMks8K1afzKr/IZwQVfInWj2iGQQ/6fS3xyY5nZ6tJFrC0a08jPhxHShx5AA3bo5wlpxHKxA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-+ncAy0uByylbj5lH5jSs01m5u9I8gUiIjdjwl4N2AGyPgqm0iNOXLmTyIhPHtBbnepkpOnRhcMKQM42HDO90QQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-OPLhpezKhznVP5JyxVc4zo/tEkHik/F8ptB2EdWAtvomyaT2a+8Huh9lF4hEJaHC+rTe3JFw8L2q+S8PvWdMFA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-2ivVEWOdSBFR5LMwhYKYtoKUEh/N21+Ba2uWWrWgmkJ1UMJ8oX7DwkwLONNtqp7tu6fWSbgAXdEgpe1IqNSfQA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Di1KrN16mqaafTeJlKaqPdQpWQUjC3WrOpp2u0cJc7LyQCgglMNYkkji9E83StAJN92pRJfW7RrTdguenfbwIQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-sDXRgRqD3H/dI+20WjVJLUl6i1q8WAAR3VSLtne7onBfBtNmLble6EaYcP11gpvgLUf6KWtmyk0i/y+gXoQhlQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-H0My82DzncddYliu6HGfE7Mq1LSlnQ/O+szuhKQdslVxQxGy6PmwPbzvjHQ/KIGtNQF3AyYCuoROSQh0DVNu5g==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-hRHwcayihljoCuSQRmIzYAbSPpsn9JTmZkYkVt98iywm0zEP5nMRPfT202mgziq56K+42z+Tr1XOkpblIuKFXQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-g7stNa35pGLKwO3i/RRSLxwKgmzRARjf/zVKi+GTrMAlGLBEuRvB6h8sgj8vl0BMIvL8RRbSlEuyGi/uRuaUQw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-sgRpN9kMcfcUyX4KkB9vQn902wDmzEfstGL/tguqvSkxUfl32hUfzUnJph7+SglDFI6O21Ecvtjagt85zDkzkA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-wVRjpcPYcBcNQEjYS/fxjTlbmUsl8pwDB4Ycll6pAk+jcM55u3B0M5/oGA5j775DUMDoI8M8Sx7mLwpVqgbvOA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-xGX3ogNqFGTf+blD249IVz+mwHcFbf71yDtcIikL2rVUrLHaKanTkdQNT5sRK0YTG5iz3Vzl60JxJoVTjsO27Q==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-LOFSTFPCa9kbvaUkjj5zj52IaiRMPs64LiObdhqx2ZIDiAe2IeV67PTyGLFkyCXIz/ozYrG+NpBrMY+qfNxJWQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-+vZbJ5tevvomurukmI3i9eWOcLvo/yfhV218HBFdd/yEbFxcI5XQeJIcpQrHUgn+5VHV7ZaGO+Hz0tTehYbl2Q==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-ud98YNIJqT6ieSmTi1dsv8tKUr0D0o+0I0u2yGZmeF9buda9dZNplCWSlT+StJgzDct9oTN77+MaEw9oHp8EmA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-tSGa/ljVo5ip1YIOEXl3MkQ9WfTGighPc06AxyGzxMe3NrFO9fgoTUer4FZJ0TAoSoG9XIRzIc4+OpmT1kmcfQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-2Kh6jwhthCxzqPApN6V+9hpX9Mb0Nm3obPnAYqcrjt6xJEvRrKIzxta5LS/xdjo2gXWLHZGNbXogGMXIQcgN6Q==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-DlblKPBopAUvAuSNqpsqxlJa9H1HKt8jMrWjGqqerguTAFPEKA++HA503WVX/ObmxCQ1ZLOrJ/s04LQu/MwqEQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-1Y5OukNdsi6Evbwqavc5KcgWoscm/Kn0ZaQxo8VVPpCRTsuIESQ41ceZCqWWW/cWC1TmRGURd6K2BXJVuYEyqA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-aBApZlZCWwci7bFuttJFkhR7DpklxQCPo5d//R7GzgKHZqsNvDhKQq+JMaDEh4YQ2I2IBrwfEyMZcUA977KYVA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-UneUR5/zHRtVy1xeCpHW57K8a5Rowo6qKh1CyDD94K1e8jYDDvEqBhnmpeFinvxyCoN2Ui8xy1QGaeyD0SFP4A==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-b/kGOoLg60FTphriytOt8yEbIgmySUarpEZBVNWS0n9dHsBm6CaLlWbnhoFAMZYs3Stz06PTh7goCI68RNPhIw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-ReSfjy4kbZxQh7SpBqej5Aov8at2NB0grlfy6zuhqH7lz3RlNHJQGHzcC3B4rFNqoNTG/dZ53MUxskAGpFvyXQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Zple4rDiwd4SU7uVqfOHNkDQlR4JjdxdCBhfQWLer9yPMgpPAQszQNOIUscDV2uqp4D5lwqBgPvzLydz8sQv4g==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Mki5XPWyS/h/SUO7P5mxaUkqQFyZHaQJABe0vmVru5vqNtHyJ8BmWiMNKBE3ORaaE5ikfq4nrzoyv6/XZGUH0g==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-attachment': 0.2.1-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-attachment': 0.2.1-rc.1+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-qKJeQSK8yj04wgK1hPZ8aFILLD/4Toam1rWbpCGhbfhnmE28jtR9hfY5lZN4GFbTsLgDalIzpdZ7H2WhdINoyQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Lrw5qvMALrm6InGjqJAXsHOg/ryg7bLwrJE+uw62KZ8ZxE5n/i7dAqVsDpVHQOtEQDaQzKFqKhWm4CaNHfFT5Q==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-compaction': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-compaction': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-8SkvZrHguDQexLLgZh/QAlS35bYeJb1FDddyRcMtAx2RJK/zPLPuJxhjKM1Ke43ibW+O5c5BiNuzaI6YQefg5w==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-qhiHY0AGsq7z6pcqKI6az7yJitgnObVMCniLCGZDGO31hA1AgC0r+0XYzphmccYn62uAadeM624+bkMAWOS4Wg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-commands': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-commands': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-lMTEh5R214VpBchwZ0g4sMt13oJH2R//nor17n1qdSx40X0M3SG8somw67cJMsw/qphI2NRftF8rG7rnUHg8oA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-DtlPgfH1Q85K96z0F+pHLSTjmLRjHW0HsbZ4F2CrRXPefK9sBv7ptkBG1RqHDfqAuQ/3Z7ozcg4XI84J2JDxLQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-include': ~1.0.10-alpha.1- '@deepseek-ai/cordis-plugin-loader': ~1.0.6-alpha.1- '@deepseek-ai/dsh-app-boot': 0.2.1-alpha.1- '@deepseek-ai/dsh-hmr': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/cordis-plugin-include': ~1.0.10+ '@deepseek-ai/cordis-plugin-loader': ~1.0.6+ '@deepseek-ai/dsh-app-boot': 0.2.1-rc.1+ '@deepseek-ai/dsh-hmr': 0.2.1-rc.1peerDependenciesMeta:'@deepseek-ai/dsh-hmr':optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-+v6vCJoglb3zClmaFqenPBK/QWux/EOi403dCttH3kt7hUfjDwKoKGbDxInjvLxhqoKvjNnEN3JttjMXj+PEcA==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-2Qo6KyjlLEejMxLrJflXPVSgxsDgRs21JsUZfmHwdMx8a6e8uAEvCeFaKl93SfypSQcGkfF0uChygJ4Ct1+d0w==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-4M0g475PSUXRaO5ZEx7TAiGd1Uvwxs3PSWtjXH6xYI7a+Q14lA9hWRjkZ2Xzy0qsVMXs48ZUbnB8iVqX0khJjg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-7et6Tk+O7CI1ygiDaFagJH76eP58W92BGjF3KwJrQB0QSNmxs3I05KTt9xYr8nsBf0xfGGNqQVTapVywJxJzZQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-fgXnwBbM4bNk59VELe3cbHD3siVD+6tbgFSqzFovisqD1he1du18yAvMK8vlJe/twLwBcbZRVB9SQ4C33v1MdA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-5tkrZL0NF/O49twckURiF6Pj9UGgBQxKewuhcbDgZLRS3eg45S7XvIcEIjXWkY96zYxViIqjjMtXUjDpHwdrtg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-FUhQx8GJAxbWGAVHqZf+Vnn2J+j4ZOZCzIEOnuMF0tVgBgoFrowSZVKbQWHkGfAio5MFDWYK/L6bYppuJoXd3Q==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-qf3DDHCb4xEqoCETt3xfoOb42SXFRtC2kZEo8trzCY+Ksdfyw1bq2p6Mt1S3BQbaJGrDt5xuV5ituqBJViVoHA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-eRavy+AaUaQdty3382ZbDu/nBqj1BI316qTNpytOtEuC3D4/6ugFrCcOIWiWs/dYkULQaZVpejEY1XpFXVKcjA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-6ReaEKAGYh8X5UpYGjYvqDj4MAfCy9uIAtIBEJ3Q3QL+cnJa9i06P2RjZBIwNY9p+G4uuCkqIgZbxmXruIdM/g==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-WjLUeJHetJVHzDrWFHIMLzzMBWGbz7YUTeAbu2hAc/EyB9NUCE+BJ6OP2pZukb1VOMDT4mq+ZnJvPqnPcNr0fg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-/lHO20DyIBxNl8heV3Q5xb5wX6q4rLTsr7XCXh2ocgWfjCHthcvbHUo3J5t0VqpxBTvyy1pea8iDGLk8VMBtDQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-IwcdGP9fj0aUmcH4bUohxOa5UbVV2Sa5pATUHwzLtrGR8UrRYl8DidEiBqwEPglpSWyyisy+lK4en5noVJQkfA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-sCv6BTczWtrUJ3c/LsQQ8pPO67uiDcR9QXoXHnKq+Mqfu40qE834yVbly3FQoHkoRDH8hzB+AEZhZ+E2qBK/IA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-5AseXkhCdY9TdIJOTEE8xKKwQF6lD/Xp4EpcYykDTARVImHyRZmWlc/XyFt2QJZ3snx/3Ztpw8B+HODyWb6ajw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-wro2ThQwnjyX/8MPUPkffiV7R7h1CQuUi+hucusnXj3tuzHJHjvFinkavtZwJVrhGOH/GTdZAFxn/ij6X0HMNg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-ZA8V1j8OZP1xg/TjQNesk8smjPxLvGZdINGzXC1etL79iN/Q6xiTYFdcIUKmxdC9inDfebpt4hN1AszLUuxywg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-BKvO+mcV+L8y8df39BmbpB3OntmpBHUAeVcvJhI8RyUoGjxJ3I0RfNTgYwmde57C/UpVKVOsnNo7SV9lDsI+BQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-pQG3k+UIh2eKsPc2Em0DBZWrpLO/IWEEOqfYIloubFp3T1clu9V8sDKF6Sm11kqkkWInSsKtbcicor3/ZS78tQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-+pUKWsWBZorW3nQLGAC2qEQudFOscKINR0njoPhhFhJsVPuAqLUYF3bf6G4evbMKUF1+Uw901CFHOfwLluljNQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-4yIQJlXxZ8vabIo5nmYdqUlk4FFgICq3bCTieTKCNmqNEYU3NrlHwGXDXWgK+w7JuJqh3ofO3RaLMxVjNCEu6w==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-cmfuE0mrtMyGQRm5s9UYyJOO1X5cLYtDiG45ryzaEH9u2UxFywYzvQ5MBW9XRSRZFtWOCE7Uw5nt4/Dq5SNQPw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Poal3O5feAqaW4rkm/80bDSkkMaPwYULw29ObDwAZEgIAg4pd8qTi/qubnCyMwNKL3i5Qi0PWb6iBBFjnZAQBQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-xYAiMIzpXriIN01LtHZ1fNgsN4T8hYyesDqO2215sWvvVrquWKuVcvVp6sqwlkSBAkqwvrXFOgXTiFdaNFjlKw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Zo2Nqtz3Coxo/KrZUUDYukVp4b9QQfeI5pa6BsDUCGbw9LV+i5OFfrfGd10D4U1aDSK3G0m0ccF4z/IbWCB7Lw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-hFHPig8HvdLYTGfO1aR53q6Oq9o9j4ikZH2DuMjRfxe2kRwLI/2QxGXkaFv0u2Galmtu1MaDvQz4pDzhUS80rw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-ubDkrMkg6X+Xhklblq+Oy2KWyZL5vsaJQxSdnVYd+PtTCSYABAZTznPlPsCrypBMlAbTjJNbfU67inZC/M9GxQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-commands': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox-policy': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-shell': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-commands': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox-policy': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-shell': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-ZrMoOgd9s8nlQHsFcdnmZUn9dfdgGt6tEZfeNs1iXKUFZAelCyRlqTJOLvNPJ0+K3Wt+5/LgDIBiCNFpBndQqw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Ond3UUZ4WoNStU3BbmaZ6P/RKN6+awwKHrjMcW0z1c0W+qSUJgbpT4LM1xWhUFZxnTknSHKujUZCLGDvBE4EmQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-wDDok1WoH4JK+/NRwuoXlEDfu3eHVErfhOQjGaVhQQxFkW5jhx5HCAkQT25OkGHIuKX1dj00V3Ekw4iMV2HZIw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-rhyakT4g9Dgim7l0WCXFXyhZr8S1vuuBBK+tRcj2DPwFE5sXBbJ1HZxVVzRMZaKSz29JxEXwGgLwkxIhEWKhxw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-37Q3biu4oCKDObXsO4MNk1nQNk/ZWuqdGmgHoO1ZLj/Uwr0oMVtKSpasjtf/0Tu5DcakYnbG7a5eKn4Lm851BQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-hlLmOO5BUCIgoTGmUENTXSaox1WBGCwGMFOUc0aGs3p0YGyruGHmrF5hNSWf0hO9Kz0v6jZJTvTjMu6kbUMLuQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-2t2lf9sT5eE5T7b8KkS4LJJWLH+JI4JG/4eMmFe9bnUwUiJAknU65SHa5duCRck29JWypN2CU05sDFb7ubnuSA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-kfydrdwGt8epXANWo4jTu2+tNFzKGTmAOJvGP9+E76nc1IMQoAaYsFh/+oX5KnTHaepC0AW+RIHUJrLlLd+/rg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-GkYyuXAUQXHGp2EEBvD0w2YYxx7HWCbKY2Dsn3deUc/624R9rJESBC+V714nNLZ/xRX9fBSEJSCx8xPEnaEosQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-/I5kUwxBcnr2TlX4ZAz5yCiN0B9UB66+D1UVZBYv31YTViZVmLyltC04Y8qT3psjwSFzlSWI4j6718IrGFF+HA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-session': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-tCVQoHaEdPokEJ/C/XVRBmn1/MgSfLg/HDawsd/FramZYB0IGM/ps2QM6oLUlPozbH77zOtTm6WDtkgYS3v+pQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-9FKTdyAy2ljsspA6Ya54DgOeLBZ1ZClcY3nI1WvHs3IqeI1ytbndDlUaRmFRUWvJn+zDbc+TQnECRZro9mVz9g==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-3ejXglxNpFFn9KnxdBhmKWt5LPsj1XyFslS29zn+YYhUBohmgdkzUQCVlTzLhmyi708881j0C8iuLnRPGSN1Uw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-FkFLKxMzPMNQ2Qt3ftekseOQloxTVyaOrrPahtHAeeGLAImiffdPVBqgljo6KUrMAr/gi0F6cpjQwBE6Mu837w==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Y7C40MKxVUXF89HKaTTniJk743TNHEe8sJsa/TKTQv/0PtMmkhs90GNa2k9boYe3zK1ulrq4Rc+IZg0iMm/KdQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-xXZe9do+OEkdRPxqdj7fpy3ccTcwWU0g6DHbvXeI/LlTl6DP5FCvgNW0Z8SmRX6GiLpI31KJ77RhzKn6Vmv+bQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-gSB6/u+kw+d/LTU0H0qA7KoXmfX0Uys/CdKTxnlPP1yDnZrqjMdGK7qzRAV7TAXxyBqNjCFgIs5v5GrDxuEbAg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-NEZPguXe/IDMqh1GdP4jlZHkuLgUfg1nIz+fU6K7x/FNy8m2XBzv0E0dkB9wvps+LKftj0CjFbpWBTvlLjBj3A==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-u82XGEESCTN9RoIwQ4kwk1ZQQiGRANLsyJinD7wDeWp6WFRKFOvD2wga/5rdKQwNu9H1yGFaVD+7cnGpyCuaxg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-CV6/UbW9udVBOwxaydPW356w9v7lJUGk9JE7+tXANH6nYsa+4XyJA2RB1ftJ50q4rYz0xW0ySkpfwoyrd986Dg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-h9mObhRfy4zHz8sVFOhMkht15s/DCROkdnEdGhXx5tLRaHh2DuLNoemYeJg7ItGrIOStrKcVg1aInU+jt61yOw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-f6+CksrLMo/9gaKQ9OXueAOGzoJyrBp5oLYfjD8jAwrUdTAlELs1rmBSbu4Q+aPEdzgMbhGKfo/xZMGXucFHqQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-timeout': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-timeout': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-uWDiHRRwXMXwtkX7FMkPVEjFY8pKo2h0NOkwTQuO3y5FjN/G9LMKWFKhRsPQysXmO12rqeGkxBnjI0AbUtpgCQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-IKAfQtARFppQhQbJQXclcCCaEpo4/vlDp1V6uT7dXl9ExB8e7Au/uytkWc7GikyKn/UnjZvN8+WWIsdshJatig==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-session': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-uFTNCku5rPySZzClZ6NVGFB8nfmb2mgAW+4gIwoXN8NUq95yAzlsdRVHqWp95k6sTGOMnq2PRvl05FOFvhO0og==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-bg1ZYUUNFtMWZ33NrZs6sNHesS4Ogj0M7pd/r89maHGwjWlVaLzRhZGf+PhQsjIKEaBPazQAmx+52cK0iegGWg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection-cache': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-title': 0.2.1-alpha.1- '@deepseek-ai/dsh-tool-todo': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection-cache': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-title': 0.2.1-rc.1+ '@deepseek-ai/dsh-tool-todo': 0.2.1-rc.1peerDependenciesMeta:'@deepseek-ai/dsh-session-persistence':optional: true@@ -2472,98 +2461,89 @@ packages:'@deepseek-ai/dsh-session-projection-cache':optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-81iPEXW5f0c/T2gK3wfmiDVS0tNoVKKLPrcstpDJtFM9Cez8h1dmfVZMHFNhynnvHdwOsAELuuwN4DlgmJQhvA==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-33GdDCYXlp0u4ptJgKwM1DkNDvbabDQ2zZFtj278o1XL9cBf2f2Q11fVj8FW9IV88YhrXjRBT/Ju978i/M7mDA==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-xINgQ8XFC40aLxPLBMxAMl3ZkY8NlkasVVrnIio94hZYX+dqw7N63y53vqLU69WKTPEFJ11GdCJq4Yx5Tr2HFA==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.2-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-KjiH3Cnr3hxsuVOX+j3r8cPWbhQOcxq2sIg8icRWdOMKN9vdhsKLpId56lezXF1tKIlAHVcLkQyO4ac9Bjp6WA==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/schemastery': ~3.18.5-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-2DbzfLfxQXzr+V1sN7rAX+MdsRjoarfYzyaP55LWgOlbFRzBIrqZIdV/fygBxQRaP50vydOIFpORqEIOeXjM4w==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1- '@deepseek-ai/dsh-subprocess': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Lj+Pq9IcfOdwovlpu+istQMNIx7/2yymcRJWd8170UYx8JbrmF5n6CRPgSGIS7eUMncNIOrJ4tRN4cXDdxF57A==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-fs': 0.2.1-alpha.1- '@deepseek-ai/dsh-home-paths': 0.2.1-alpha.1- '@deepseek-ai/dsh-skill': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Gf6C8ZBE8bkXCwAL8WvdPKUHYOgfbo3O6LlqqbeMWA8sycU+7RtD5UehAGFTtVvwDIKoFSFljt3JKJtUqPABog==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-ykQAtLHM6Ns2eCflghBKk6qBlVhwsrfdl/9GEOJKyGBLkgO6z28DH7fAy6jrhgDJ03Dl/ZUx9bq2n7x4Dov5/A==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-storage': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-qTwmphDRxExShYB34NN1D3f471tbqTJOkk5+9kQib6JoKflSFAx64DOrPBeeFXbS9hF1ungRr+Q9L/PkmCfPNg==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-fpqg7+9r9aibBXUKARjtVDZHIKbud0PauObJb2EdO2StP+xoiladphf/GwGX5l6l5+L2zaaJagzwqwQNdGlAwg==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1- '@deepseek-ai/dsh-attachment': 0.2.1-alpha.1- '@deepseek-ai/dsh-jobs': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-permission-presets': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox-policy': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-query': 0.2.1-alpha.1- '@deepseek-ai/dsh-settings': '*'- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-time': 0.2.1-alpha.1- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-X0umuW2pwbdEAC0w8f3I/QpjoP1u/wQGVDQPPOXARTSElBr9gixzUtwGcyqKOxydbrbueSUYEOK1hlhTkrSWAg==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-gQpJnWJU2b5xbVtzT9BXhPG+o8DpGsmcfmsSqnVcDCfgg1MmzQ9rJAgG1rbGmBmQXjap2i+KrEjFdiiabzjDnQ==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-rfRsMkiB1umuXADpxRiKFZqsGL5yOENHe8jj+t0ck8MC4O2QKBpqqIDoNiZpn4GrUzRuq3E8LlRs7sNypXcR4A==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/schemastery': ~3.18.5++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-rbUJEkKDJRV7Ho1rPL6PoFVzJBi+/1UT1NJNcZ6uODYCN7ySy2lH3mYQi8BgBNvpPh+EhNSp2rqb14EUQ5lGSg==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1+ '@deepseek-ai/dsh-subprocess': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-0WOmlsFroYBQKjn1RpeSaD5jILsrPbIZMIBDPdylHS06+TzqvPpYlfwcj/WepAAGcueAeRuyHnXdie6jVbL26g==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-fs': 0.2.1-rc.1+ '@deepseek-ai/dsh-home-paths': 0.2.1-rc.1+ '@deepseek-ai/dsh-skill': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-5eq2OHrzB5LSgcJoQh2lIRBwLasWpu/SVffudpuD1xcrpD0hbMDPlZKDCKhWTu+GuaVXRapp811gF8oPDcILJw==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-U7mz43RqRMk8EypkwgvHt3waqflk5a0Sno/iYzdJ6aODYhCsXPjg0pW28EIqpQXzvVNwTa2NSMRzyXni70cLaQ==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-storage': 0.2.1-rc.1++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-0X4WTtWEqBev5h8lbWmiiBZe4PyQrJnithoHU1+dd24sCs6e6KN2KuTYyJI/DIlQHaygx7Z9co58DcvdzBWxNg==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5++ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-24b6Zg2SMkYh/7pOh7RRKocXS7B35E6zu8KHQnA8k6n2WL3rztUEk9HyyweQCLAoUIVkVKn5tgaT49IpR+LUgQ==}+ peerDependencies:+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1+ '@deepseek-ai/dsh-attachment': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-permission-presets': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox-policy': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-query': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-time': 0.2.1-rc.1+ '@deepseek-ai/dsh-working-directory': 0.2.1-rc.1+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1peerDependenciesMeta:'@deepseek-ai/dsh-agent-preset-registry':optional: true- '@deepseek-ai/dsh-jobs':- optional: true'@deepseek-ai/dsh-permission-presets':optional: true'@deepseek-ai/dsh-sandbox':@@ -2576,143 +2556,133 @@ packages:optional: true'@deepseek-ai/dsh-session-query':optional: true- '@deepseek-ai/dsh-settings':- optional: true'@deepseek-ai/dsh-user-approval':optional: true'@deepseek-ai/dsh-workspace':optional: true- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-2tjlzMl9hTjl5X14eKH9fpqsX0tD3446B7WaHIspyTdHBWBofZS6FLIJNKwgZ2ItQHOeb+khSfBQioCxna0O7w==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-JFL0SsiNCEkSx1L5KlFlyroGSNPI1bkzJIbu5PeUB9W6LLDpM2Tjdv+5hZao9tDty3rbuIhVR+2NSH1RAkEyWA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-http-proxy': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-http-proxy': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-BvqCc2gLD314H/Sgl3epP5zpsIK7N3TR3JWyqi5LKmBZuxDeX41WI36ErjByQUwCoOZ79LCF9XG+AJGU9UUCzA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-eN3FLgoRWIYyqSbe98PbutYbS7JDfhJDdD6BfCV6uObc70qWdP+g7XUvRIbw+JjMZpZVPCP2MHwK43ETmU9k6g==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-lsdyhMVixctXVGIdo2cXZHyjwBdLisgC3T5zmWFHs/Azv48v+gZExuc85VYpJ4JlztRgbtRS7FFoAALrCWr+FQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-LLwlrSe6NXvz5fmKgmRsmQYZYZq2EsZkGEys937JD9wi7b81oOYhEq0YEgIQ0KsdUs/4O52JyTon0zLif21XKQ==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-hgII55C+B2MWnMwP8Nv1BTCh+RbNP14EhzwMfOiwBWK08PdVHi2gdB7ZtbRprps5s2fO2gVXaclgXpnLX05hgw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-mMnjHgvxqY8D8ALBXYK+o4ALboObb6oHm4xgIuaWPL8UPqfRCnmTecmY5KDauO4hTjfHBqQcReBEdYhj5Gx1Fg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-gjDpn7aLmZZRWMaOHOhjZu8wchSeWxDSIlCsMh79HXYBSgdZsu7ExJeYm61TSfG4wqUevOH7TrjVhVXsimcSIw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-A2pVzQkEXusF/o5ZFsUc4pMQKCSvJC1bYVbelTHFbfwGFba/PHz1Dg0v6nNOwHR8DdRxGDAxiyYu7qm708e8Ig==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-ptc-runtime': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1+ '@deepseek-ai/dsh-sandbox-policy': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1+ '@deepseek-ai/dsh-working-directory': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-3B3HoXoE2h1chS+cWXt1XfqGaMljFehKx2t6Wb5gdlVUqCKgKV0wkd1KLjJb0ZTh1KQGtSNQzozT3f9uMSTtyg==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-G9dG7nTptaaHBlItIzsxyWU5Kpq/x9XpH8p2xpnYD0mD0Y8rYbxd/V6E2sOwPaIftfAgHKGuVVwt1AJcfJ572Q==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-ptc-runtime': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1- '@deepseek-ai/dsh-sandbox-policy': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-nzNwKdiMv3nxrE6y99WtKOwbLZB5v1KzAIciMcCuZQ38rv/PKNLxE4P1QlbzyLdmKKeb68IUYvf9a1TNkv9V3g==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-60zG9CHGnaG6YWt1Dppb2vP8Tp7UJrYMeFjbfx78z99jtKvfthiFLCH2oiUJFmuJaBsE2Gfia7Rl5rbo0sz+yg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-L/f22tnjV9LXFOf8CaX5XmEyKXR18oRKP2X3qb/I7NrAxk5uwKZcLHCFU/LXECVXrkm/Q0MPp5iNiREG1rLfzQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-omAw3DX3QbnZNi9SCLHbpzCFVwBzLiqMWJX7LYa9aW5IXyq/+/utVX6o7E1RujgtoBAmLm0t2OB5Kc2kblnamw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-CK9Nxgh7xQpOOohMb100qHM5Vu6XgffH+5FdaQ8sPqAaAivjZWZXOVPXrUaZK8Fces/BooPY9PUyV7DN/JhpOw==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-urciUfbmOmJ2Ig3jSysCFVMMqLvESbFnja4c5RfNnGN3+zyykbf0iI26SraTKmXpW9rY4vELGB//VMtjZ69lhA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-qH1qeDj0wEyws4SPxV6WrPQmM8xbJVBm0rkR9w+SYiYv7slIzy9nj1UaGM62FD5ZFv4LD+Br6UgoN7rIvy9uew==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-mEqjz1v7jJsxad77xpnWOlnLEBtqxUmyEzE5NZijOf1+YAzp99JsuWX/vZQxrlwb46s9iZE9z3qKvfWQedv+mg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-1Gmlxo62T5Nk8EFWD+aGaIDQAnUS5AFaqayyWl3GTedhtw+v5/HX6lMO622wUQHOhGGsQXOyps4NIqJbPPPVEA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-3NbsPwY1j60STJfFGshqToX/ei/fbwR9b+WAfZ7IhvSUlkEB2EECqCilvajvh0gbuQiQ4+glN30U9OiRPxYtUg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-nrbjxZGnsQFdCGsP9Cv57gOlx6HOpWbtCGVGw4pGg3NZufqZN70y3bym8mOBtmV+IJmd0u41H47IS6mkD0vhoA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-0LxxsgEbNHwSiFpXbYCSNaMsbU2oUdPfY+w1lZguo7yj6D38rcnfyCm3iyJXAirU4HVT4AUnLp2u+kFaKwLByw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-uZhfu30VShru7GxknldvvKdPfiXIJJewm0KwJgrtwZbOMoWTH8lzTvDFgK8YvhG8rCRmFySNqQdgdzsMRLiZVQ==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-MFCazvkLRIaPLQp3x5FzqkGURS9yvquLGmH8Ip+qCWFidXa12NcffPibwPdfGY393/0NVI4Coi9hpc7UbL6H/A==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-Hrm2c1H5ZOGBfviHPSEfPOg+FqagqH7PwGLoB/PVWZztQ2otw31NarPgrzSXO4cVY5fUmuoK8lsMRmgnQzs0FA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-2N6TRB5zyfMjKxsSk6UZpvAkc4Lca788H3z7p19beh4Ln7HUZiFtKugqwPmlr9qoDvkaaFlOUXBDe7S8MiRlmg==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-fdVI4yWqGTMEgYeWbJy5X9mhmdfBLgt95pi0A5lTvyrxIAFc58t3LzDEerVhnKsU1/9SYTNLmlOvJnaQRX7t+w==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Kwy3JzW9Dvw1rT4cEKHRMl/MWcbifj4U2l8V6TC1SOc2jatVQiiCVMpvQOT3vzaMW56opR215hpxlyO0FO1rNA==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-fs': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-RlA49PBUEiahDt11WQ6gFUGlLWG8jfC+Y/D5MNDysg5A2VbixSsbS/ZTuDp8/SrJrZKoYMxa1g7T9T61zuvP7Q==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-yoiOyhTs+1t7O6NPaG62VCcjDPqwV0f6XBxbh1zDprsndefUPT4yZYQXCxwyNieSSMuC1iw0jrhUtj6dhAhRlw==}peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1+ '@deepseek-ai/cordis': ~4.0.5+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1+ '@deepseek-ai/dsh-storage': 0.2.1-rc.1+ '@deepseek-ai/dsh-storage-domain': 0.2.1-rc.1+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-0MoZ0C8rXC+2PyxJER6ZSRfkU21/HbX4Z5oCcdC3b151epcBYQVlP/o8vjqePQAJCZwTrWAEknnJHRMWbVlh0A==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-N1nU1FdJ3JXXZoUWoL+y1A9SH7FxQrNRBn2/RKMDKPrp4nrEhtd+Jdih8iPmA5rjzVJIkN4Rc3FDA2GxEDVTHg==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-drH82m/CaSI/o3OtRQ0NOtUJroYsYhCpUjO756c3ix7tQtN+lSdbkfFp7aqS183fNgZK96Vr7cOFHhvSArEy8Q==}- peerDependencies:- '@deepseek-ai/cordis': ~4.0.5-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1- '@deepseek-ai/dsh-storage': 0.2.1-alpha.1- '@deepseek-ai/dsh-storage-domain': 0.2.1-alpha.1- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1-- '@deepseek-ai/[email protected]':- resolution: {integrity: sha512-HojoBv1wMQn6N8nDgTgWbc/f4EFAlg/ZsIYN2AChnEDoFOmcWd3+MDzhozNffmywywzV7pcouHRR4x37YZfcjA==}+ '@deepseek-ai/[email protected]':+ resolution: {integrity: sha512-Mnobvqf9rHsZYv4g5edj5ddxS1oF1kIdSlz0DunUgnY3LWG5F26MqvH3YOOsSaodCgyzJ16OMN9O99/s5Crtdw==}'@e18e/[email protected]':resolution: {integrity: sha512-JQkeXoZA12f9WM2H4t4IobIRqlPvYLeNAjZF6raFu2vmD5YoyuzKmwsLZNJ4g/39c3v1Se2ad3o+oq4y2et/RA==}@@ -6990,6 +6960,10 @@ packages:resolution: {integrity: sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==}engines: {node: '>= 12'}+ resolution: {integrity: sha512-aq+t5NAc+cS6rZQQVWC2x98CPqGtKKTMDd4Gaodv0wShnItdKg/51djkGJ1hqH+Oy0ivDftCbSLCQob8zso01w==}+ engines: {node: '>= 10'}+resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==}@@ -7890,56 +7864,70 @@ packages:resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}- resolution: {integrity: sha512-QaW7d8lTcGCXrpNVyFDtID3vrpa7vFdpcY9pql2/9FGFSe7tcSnhQOKZX+1aOWq+pB1d2ZwNnKAdQI5nD9wAXA==}+ resolution: {integrity: sha512-Zh87aubSc1UF8CzZsRws1KtSwXiPDH0tbcg8V/2OA8Tcq9yGJRESFcEOC5NGLFama5IGfC3aJhubZbrj9Un2qA==}engines: {node: '>=20'}- resolution: {integrity: sha512-KpaAh0mDcIScoJs7gD/mjXREcENJ023/DgWW3GrlLXFVzCE6bK6wFrTFpNfnkxZZP8yWsEWOg1o5T+uQ7olgTQ==}+ resolution: {integrity: sha512-n45xEILQVOLZ2hVhzRXesTMYS4odHquyI/B/IkPMPUCONa8PjNfBag6lYBH4wDrhgpLNNBwMsUD8d8O/13QPPA==}engines: {node: '>=20'}cpu: [arm64]os: [darwin]- resolution: {integrity: sha512-lh9o5rCvmkH8MZgBBmhyKzJRc1M1hJzgXLTFzB6iomRXNH9P1DKjN2nAJLmvGrdTij47Wcch1JVnlV5AG0cRCQ==}+ resolution: {integrity: sha512-Sm4Liqh1uo9zgJB2F/pACPPZdHu+fj9Qniyr1Q99dDQB0v71VgZgkAgv3K0/E1iPQBlZq9rakFkY7MGUIfWc0A==}engines: {node: '>=20'}cpu: [x64]os: [darwin]- resolution: {integrity: sha512-DrQA3aS1LBn4NgrewbZkzSAWdSSRPD/fYO5AkQfvriQ/TQD3E2adB012sZ5eac6p9TAcTjUIYhk395AYVxo4Zw==}+ resolution: {integrity: sha512-ToU4wGtOD/069i2y4fJ3cjDJiiWtcjSQTZMf0YKlotb5BmTM7FjhR3X1aub8J/YjlOwl6665J/XAYuvCaDO5sA==}engines: {node: '>=20'}cpu: [arm64]os: [linux]libc: [glibc]- resolution: {integrity: sha512-8wCxrFlB2Ld5DhxIm2P+nNFnQ0wjzDE5sXF68EUhLH0X+z313B07TUQFMBKCOkyhZIIBh590dBmhHCuA43No2A==}+ resolution: {integrity: sha512-85Z5Avp++wfa9iiTIH8LC/r6qvlC/CiwpifiwIz0gYQ9PzajTSkz06gX7YDqf1oUqWYxU9uwNEOmo7mktHOOfA==}+ engines: {node: '>=20'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ resolution: {integrity: sha512-fh3K3/JvBfSYwU8vEOpp4Wdp4N/jX0EnZYq5GsaftlQin1FVqgve/yDNoh+asxBMOQyHOG8F4dXlV1WCierrfg==}engines: {node: '>=20'}cpu: [x64]os: [linux]libc: [glibc]- resolution: {integrity: sha512-NET6DiLnKrK2DHuO4NNN+zJz0CFas+RwpJlGY0d3A3A3tc5dJQqZXgw8DzLOn4cSTAQCaDq6+LbPyYX7jE2F3Q==}+ resolution: {integrity: sha512-B6fu/5xmbRxnifM7nWz0IESkYnUl8dwFZmRDMsxdhzv2nb+EtBRFAXg4lf73qhX3yoZD4SnWJILBQMlIAwBCzw==}+ engines: {node: '>=20'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ resolution: {integrity: sha512-FOQuzNe8B1BANu886rJgdbQuRxPGUQmewkykw87wSr32U0ibQ3AWGuUM/Gh7LG4RekjFaifj7gEI/tq2+6GU6g==}engines: {node: '>=20'}cpu: [arm64]os: [win32]- resolution: {integrity: sha512-oj4G51r81kJ3E2t5KknKhBNb8TmTWzc/t9x7jkBF9JeRd+1a0kr99mVJVYwJNxq9d3jpt7dgBdI8mxaomuXOEQ==}+ resolution: {integrity: sha512-N29P0kmIBT6hnkNNFYzxn+o9ydT6OYZe9RFAi8dSxV1rNSul1FlxtuKWYe8w2sQpbQGYuGDEtpOwdeFtq2iFTg==}engines: {node: '>=20 <23'}cpu: [ia32]os: [win32]- resolution: {integrity: sha512-ZQ+6thVzQBOFamW7s3t2YqHsw99EEPBNH1uAjvCx4QfnjFJTsu6I/H3prpN8i6cSt6gjnQtArfWc2LXN2ufcJQ==}+ resolution: {integrity: sha512-+i6N4A7m7txjbw8pDYESdWXiKO9EEVq0SzTzwPS0WZuV4F1MzQnaDJwJJnO7T6zAc0BvqHXBOkpharCrUjFhbQ==}engines: {node: '>=20'}cpu: [x64]os: [win32]- resolution: {integrity: sha512-P9ZGMDkloktirLJSggfpxsJ9jog5FItE1Omxpj50UBn3LhD6TS6/yx0jEBXsCGK3P9EtW1EpQVA1QL5gb11GaQ==}+ resolution: {integrity: sha512-BCxXCMZDs/VLLh64SwKNw/me7Qx1I7Be4qxWwYVRRm8tJoOB8fL7qg6CmXhSXeUqsKt72t8RaKCX4EN+5nocVg==}engines: {node: '>=20'}@@ -9247,8 +9235,8 @@ packages:resolution: {integrity: sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q==}engines: {node: '>=20.18.1'}- resolution: {integrity: sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==}+ resolution: {integrity: sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==}engines: {node: '>=22.19.0'}@@ -10446,80 +10434,80 @@ snapshots:'@csstools/[email protected]': {}dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])- '@deepseek-ai/cosmokit': 1.8.6-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/cosmokit': 1.8.6js-yaml: 4.3.2dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cosmokit': 1.8.6-alpha.1- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cosmokit': 1.8.6+ '@deepseek-ai/schemastery': 3.18.5optionalDependencies:- node-addon-require-builtin: 0.1.6+ node-addon-require-builtin: 0.1.9dependencies:- '@deepseek-ai/cosmokit': 1.8.6-alpha.1+ '@deepseek-ai/cosmokit': 1.8.6'@standard-schema/spec': 1.1.0optionalDependencies:- '@deepseek-ai/cordis-plugin-include': 1.0.10-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])-- '@deepseek-ai/[email protected]': {}-- ? '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))'- : dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-config-editor': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])++ '@deepseek-ai/[email protected]': {}++ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-config-editor': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5transitivePeerDependencies:- '@deepseek-ai/cordis-plugin-include'- '@deepseek-ai/cordis-plugin-loader'- '@deepseek-ai/dsh-app-boot'- '@deepseek-ai/dsh-hmr'- '@deepseek-ai/[email protected](e1828a76db60a945ed06863233e61b8e)':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1(6990646b5580becf37a10a1fe3d5469e)- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/[email protected](5b3ff47d581eefbbe78423e40aa0ce48)':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1(14ea9b2f1090d1f852482c689f41a9bb)+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](54d3464f7955532d08907e94aa6ef05e)':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-include': 1.0.10-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-app-boot': 0.2.1-alpha.1(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-settings': 0.2.1-alpha.1(7bb39d3a398590d9618f8116f6a0da69)- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1(6990646b5580becf37a10a1fe3d5469e)- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/[email protected](71ffdfd1d3a7cef10db94d8acfe158e7)':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-app-boot': 0.2.1-rc.1(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-settings': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1(14ea9b2f1090d1f852482c689f41a9bb)+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5js-yaml: 4.3.2zod: 4.4.3transitivePeerDependencies:@@ -10527,468 +10515,445 @@ snapshots:- '@deepseek-ai/dsh-home-paths'- '@deepseek-ai/dsh-launch-environment'- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](54d3464f7955532d08907e94aa6ef05e))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](71ffdfd1d3a7cef10db94d8acfe158e7))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1(54d3464f7955532d08907e94aa6ef05e)- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1(71ffdfd1d3a7cef10db94d8acfe158e7)+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030)':+ '@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957)':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])optionalDependencies:- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-deque': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-timeout': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-deque': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-timeout': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5ws: 8.21.3transitivePeerDependencies:- bufferutil- utf-8-validate- '@deepseek-ai/[email protected](a79f88b2459a2ea67d90459500724f45)':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-agent-default-model': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1(54d3464f7955532d08907e94aa6ef05e)- '@deepseek-ai/dsh-api-gateway': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-attachment': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-client-file-upload': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-commands': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-credentials': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-deque': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-file-reference': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))- '@deepseek-ai/dsh-fs': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-native-command': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-session-query': 0.2.1-alpha.1(52d1ee53a3bf3a3b164d53411007110a)- '@deepseek-ai/dsh-session-title': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-skill': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-subagent': 0.2.1-alpha.1(c8c5177f0a84eb42d1d28dd452657b3c)- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-typert-registry': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-time': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-workspace-path': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/[email protected](2fe48064461599bc195bdd80b7ba6bf8)':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-agent-default-model': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1(71ffdfd1d3a7cef10db94d8acfe158e7)+ '@deepseek-ai/dsh-api-gateway': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-attachment': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-client-connection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-client-file-upload': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-commands': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-credentials': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-deque': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-file-reference': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))+ '@deepseek-ai/dsh-fs': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-native-command': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session-query': 0.2.1-rc.1(1cf297e4daa03428748114d543fcf6be)+ '@deepseek-ai/dsh-session-title': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-skill': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-subagent': 0.2.1-rc.1(779e3651d12298ce45ce702b661ff997)+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-typert-registry': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-time': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-workspace-path': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-working-directory': 0.2.1-rc.1(0ec4c2999410a8838072dd59b95b3f14)+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/schemastery': 3.18.5mime-types: 3.0.2zod: 4.4.3optionalDependencies:- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-settings': 0.2.1-alpha.1(7bb39d3a398590d9618f8116f6a0da69)-- '@deepseek-ai/[email protected](d3483591bb775ec681d959d8dbc1efc5)':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-api-gateway': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-deque': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-host-directory-picker': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-native-command': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-storage-domain': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-settings': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected])([email protected])++ '@deepseek-ai/[email protected](0042cb50664b205915e88624151fd3e4)':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-api-gateway': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-client-connection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-deque': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-host-directory-picker': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-native-command': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-storage-domain': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-group': 1.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-include': 1.0.10-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])- '@deepseek-ai/dsh-atomic-write': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-home-paths': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-launch-environment': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-package-manifest': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-group': 1.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/dsh-atomic-write': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-home-paths': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-launch-environment': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-package-manifest': 0.2.1-rc.1(@deepseek-ai/[email protected])'@eslint-community/regexpp': 4.12.2ajv: 8.20.0js-yaml: 4.3.2- node-addon-require-builtin: 0.1.6+ node-addon-require-builtin: 0.1.9resolve.exports: 2.0.3semver: 7.8.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-credentials': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-credentials': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-attachment': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-crypto': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-attachment': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-crypto': 0.2.1-rc.1(@deepseek-ai/[email protected])zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](e97c258581e3a21f43736e0fe69c7c37))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](6a06f1cfdb74568a6c0d0a26c3e2f1e7)':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-compaction': 0.2.1-alpha.1(e97c258581e3a21f43736e0fe69c7c37)- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-compaction': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](e97c258581e3a21f43736e0fe69c7c37)':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-commands': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-commands': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-include': 1.0.10-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])- '@deepseek-ai/dsh-app-boot': 0.2.1-alpha.1(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-atomic-write': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/dsh-app-boot': 0.2.1-rc.1(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-atomic-write': 0.2.1-rc.1(@deepseek-ai/[email protected])js-yaml: 4.3.2yaml: 2.9.0- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5compression: 1.8.2+ ipaddr.js: 2.5.0negotiator: 1.1.0transitivePeerDependencies:- supports-color- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- undici: 8.10.2+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ undici: 8.11.2- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-timeout': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-crypto': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-timeout': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-crypto': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-timeout': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-crypto': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1- zod: 4.4.3-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](1489a79f98e16e336ccc634555797cd6)':+ '@deepseek-ai/[email protected](4b0904c14ed0fa9409cf478adaaa38d5)':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-commands': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-sandbox-policy': 0.2.1-alpha.1(dcfd189700dd430904baf57fe4b0456a)- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-shell': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-commands': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-sandbox-policy': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-shell': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/[email protected](dcfd189700dd430904baf57fe4b0456a)':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](e97c258581e3a21f43736e0fe69c7c37))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](6a06f1cfdb74568a6c0d0a26c3e2f1e7)':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-compaction-image-offload': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](e97c258581e3a21f43736e0fe69c7c37))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-format': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v1-to-v2': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v2-to-v3': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v3-to-v4': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-compaction-image-offload': 0.2.1-rc.1(6a06f1cfdb74568a6c0d0a26c3e2f1e7)+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-format': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v1-to-v2': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v2-to-v3': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v3-to-v4': 0.2.1-rc.1(@deepseek-ai/[email protected])transitivePeerDependencies:- '@deepseek-ai/dsh-agent'- '@deepseek-ai/dsh-compaction'- '@deepseek-ai/dsh-llm'- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v1-to-v2': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v1-to-v2': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session-format-v2-to-v3': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session-format-v2-to-v3': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-timeout': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-timeout': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))zod: 4.4.3- '@deepseek-ai/[email protected](52d1ee53a3bf3a3b164d53411007110a)':+ '@deepseek-ai/[email protected](1cf297e4daa03428748114d543fcf6be)':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-format-catalog': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](e97c258581e3a21f43736e0fe69c7c37))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-session-title': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-tool-todo': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](6990646b5580becf37a10a1fe3d5469e))+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-format-catalog': 0.2.1-rc.1(6a06f1cfdb74568a6c0d0a26c3e2f1e7)+ '@deepseek-ai/dsh-session-title': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-tool-todo': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](14ea9b2f1090d1f852482c689f41a9bb))optionalDependencies:- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))transitivePeerDependencies:- '@deepseek-ai/dsh-agent'- '@deepseek-ai/dsh-compaction'- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.2(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.2(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](7bb39d3a398590d9618f8116f6a0da69)':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected])([email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1(@deepseek-ai/[email protected])([email protected])- '@deepseek-ai/cosmokit': 1.8.6-alpha.1- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-config-editor': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/[email protected])([email protected])+ '@deepseek-ai/cosmokit': 1.8.6+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-config-editor': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected]))(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5yaml: 2.9.0transitivePeerDependencies:- '@deepseek-ai/cordis-plugin-include'@@ -10996,196 +10961,193 @@ snapshots:- '@deepseek-ai/dsh-hmr'- node-addon-require-builtin- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-subprocess': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-subprocess': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-fs': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))- '@deepseek-ai/dsh-home-paths': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-skill': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-fs': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))+ '@deepseek-ai/dsh-home-paths': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-skill': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/schemastery': 3.18.5chokidar: 5.0.0yaml: 2.9.0- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-storage': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-storage': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])-- '@deepseek-ai/[email protected](c8c5177f0a84eb42d1d28dd452657b3c)':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-attachment': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-chunked-list': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1(6990646b5580becf37a10a1fe3d5469e)- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-time': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])++ '@deepseek-ai/[email protected](779e3651d12298ce45ce702b661ff997)':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-attachment': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-chunked-list': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1(14ea9b2f1090d1f852482c689f41a9bb)+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-time': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-working-directory': 0.2.1-rc.1(0ec4c2999410a8838072dd59b95b3f14)+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3optionalDependencies:- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1(54d3464f7955532d08907e94aa6ef05e)- '@deepseek-ai/dsh-permission-presets': 0.2.1-alpha.1(1489a79f98e16e336ccc634555797cd6)- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-sandbox-policy': 0.2.1-alpha.1(dcfd189700dd430904baf57fe4b0456a)- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-session-query': 0.2.1-alpha.1(52d1ee53a3bf3a3b164d53411007110a)- '@deepseek-ai/dsh-settings': 0.2.1-alpha.1(7bb39d3a398590d9618f8116f6a0da69)- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-http-proxy': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1(71ffdfd1d3a7cef10db94d8acfe158e7)+ '@deepseek-ai/dsh-permission-presets': 0.2.1-rc.1(4b0904c14ed0fa9409cf478adaaa38d5)+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-sandbox-policy': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-session-query': 0.2.1-rc.1(1cf297e4daa03428748114d543fcf6be)+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-http-proxy': 0.2.1-rc.1(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](6990646b5580becf37a10a1fe3d5469e))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](14ea9b2f1090d1f852482c689f41a9bb))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1(6990646b5580becf37a10a1fe3d5469e)- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1(14ea9b2f1090d1f852482c689f41a9bb)+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](6990646b5580becf37a10a1fe3d5469e)':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-ptc-runtime': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))- '@deepseek-ai/dsh-sandbox': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-sandbox-policy': 0.2.1-alpha.1(dcfd189700dd430904baf57fe4b0456a)- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.2(@deepseek-ai/[email protected])+ '@deepseek-ai/[email protected](14ea9b2f1090d1f852482c689f41a9bb)':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-ptc-runtime': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))+ '@deepseek-ai/dsh-sandbox': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-sandbox-policy': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-working-directory': 0.2.1-rc.1(0ec4c2999410a8838072dd59b95b3f14)+ '@deepseek-ai/schemastery': 3.18.5++ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-system-prompt': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/schemastery': 3.18.5-alpha.1-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](bc8e1a234d16d0329e7a818df1caf030))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1(bc8e1a234d16d0329e7a818df1caf030)- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-scope': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/schemastery': 3.18.5-alpha.1+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/schemastery': 3.18.5++ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](0353620dad4a0e9c9befc32df9332957))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ dependencies:+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-scope': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/schemastery': 3.18.5zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':- dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])-- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])':+ '@deepseek-ai/[email protected](0ec4c2999410a8838072dd59b95b3f14)':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1(0353620dad4a0e9c9befc32df9332957)+ '@deepseek-ai/dsh-fs': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))))+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))+ '@deepseek-ai/dsh-system-prompt': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/schemastery': 3.18.5+ zod: 4.4.3- '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':+ '@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))':dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-brand': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-session': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-storage': 0.2.1-alpha.1(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-storage-domain': 0.2.1-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))- '@deepseek-ai/dsh-typert-protocol': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-brand': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-session': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@deepseek-ai/[email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected])))(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-storage': 0.2.1-rc.1(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-storage-domain': 0.2.1-rc.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))+ '@deepseek-ai/dsh-typert-protocol': 0.2.1-rc.1(@deepseek-ai/[email protected])zod: 4.4.3- '@deepseek-ai/[email protected]':+ '@deepseek-ai/[email protected]':dependencies:- '@deepseek-ai/cosmokit': 1.8.6-alpha.1+ '@deepseek-ai/cosmokit': 1.8.6'@standard-schema/spec': 1.1.0@@ -14559,10 +14521,10 @@ snapshots:- [email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected]):+ [email protected](@deepseek-ai/[email protected])(@deepseek-ai/[email protected](@deepseek-ai/[email protected]))(@genapi/[email protected])([email protected]):dependencies:- '@deepseek-ai/cordis': 4.0.5-alpha.1(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])- '@deepseek-ai/dsh-host-webserver': 0.2.1-alpha.1(@deepseek-ai/[email protected])+ '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/[email protected])(@deepseek-ai/[email protected])+ '@deepseek-ai/dsh-host-webserver': 0.2.1-rc.1(@deepseek-ai/[email protected])h3: 2.0.1optionalDependencies:'@genapi/shared': 4.1.4@@ -15825,6 +15787,8 @@ snapshots:+ [email protected]: {}+@@ -17093,54 +17057,66 @@ snapshots:lower-case: 2.0.2tslib: 2.8.1- [email protected]: {}+ [email protected]: {}++ dependencies:+ node-addon-native-custom-loader: 0.1.9+ optional: true++ dependencies:+ node-addon-native-custom-loader: 0.1.9+ optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optional: truedependencies:- node-addon-native-custom-loader: 0.1.6+ node-addon-native-custom-loader: 0.1.9optionalDependencies:- node-addon-require-builtin-darwin-arm64: 0.1.6- node-addon-require-builtin-darwin-x64: 0.1.6- node-addon-require-builtin-linux-arm64-gnu: 0.1.6- node-addon-require-builtin-linux-x64-gnu: 0.1.6- node-addon-require-builtin-win32-arm64-msvc: 0.1.6- node-addon-require-builtin-win32-ia32-msvc: 0.1.6- node-addon-require-builtin-win32-x64-msvc: 0.1.6+ node-addon-require-builtin-darwin-arm64: 0.1.9+ node-addon-require-builtin-darwin-x64: 0.1.9+ node-addon-require-builtin-linux-arm64-gnu: 0.1.9+ node-addon-require-builtin-linux-arm64-musl: 0.1.9+ node-addon-require-builtin-linux-x64-gnu: 0.1.9+ node-addon-require-builtin-linux-x64-musl: 0.1.9+ node-addon-require-builtin-win32-arm64-msvc: 0.1.9+ node-addon-require-builtin-win32-ia32-msvc: 0.1.9+ node-addon-require-builtin-win32-x64-msvc: 0.1.9@@ -18564,7 +18540,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex ba37ea90..b9f11ea2 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -13,94 +13,96 @@ minimumReleaseAgeExclude:- '@reause/[email protected]'- '@reause/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected] || 0.2.1-alpha.2'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'- - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'+ - '@deepseek-ai/[email protected]'shellEmulator: truetrustPolicy: no-downgrade@@ -139,42 +141,42 @@ catalogs:tsdown: ^0.17.3typescript: ~5.8.3dsh:- '@deepseek-ai/cordis': 4.0.5-alpha.1- '@deepseek-ai/cordis-plugin-group': 1.0.5-alpha.1- '@deepseek-ai/cordis-plugin-include': 1.0.10-alpha.1- '@deepseek-ai/cordis-plugin-loader': 1.0.6-alpha.1- '@deepseek-ai/dsh-agent': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-default-model': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-loop': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-preset': 0.2.1-alpha.1- '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-alpha.1- '@deepseek-ai/dsh-api-session-controller': 0.2.1-alpha.1- '@deepseek-ai/dsh-api-workspace-controller': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-connection': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-locale': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-store': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-conversation': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-layout': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-primitives': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-renderer': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-settings': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-slots': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-theme': 0.2.1-alpha.1- '@deepseek-ai/dsh-client-ui-workspace': 0.2.1-alpha.1- '@deepseek-ai/dsh-host-webserver': 0.2.1-alpha.1- '@deepseek-ai/dsh-llm': 0.2.1-alpha.1- '@deepseek-ai/dsh-permission-presets': 0.2.1-alpha.1- '@deepseek-ai/dsh-session': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-persistence': 0.2.1-alpha.1- '@deepseek-ai/dsh-session-projection': 0.2.1-alpha.1- '@deepseek-ai/dsh-skill-filesystem': 0.2.1-alpha.1- '@deepseek-ai/dsh-tools': 0.2.1-alpha.1- '@deepseek-ai/dsh-user-approval': 0.2.1-alpha.1- '@deepseek-ai/dsh-user-questions': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-code-language': 0.2.1-alpha.1- '@deepseek-ai/dsh-util-values': 0.2.1-alpha.1- '@deepseek-ai/dsh-workspace': 0.2.1-alpha.1+ '@deepseek-ai/cordis': 4.0.5+ '@deepseek-ai/cordis-plugin-group': 1.0.5+ '@deepseek-ai/cordis-plugin-include': 1.0.10+ '@deepseek-ai/cordis-plugin-loader': 1.0.6+ '@deepseek-ai/dsh-agent': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-default-model': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-loop': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-preset': 0.2.1-rc.1+ '@deepseek-ai/dsh-agent-preset-registry': 0.2.1-rc.1+ '@deepseek-ai/dsh-api-session-controller': 0.2.1-rc.1+ '@deepseek-ai/dsh-api-workspace-controller': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-connection': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-locale': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-store': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-conversation': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-layout': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-primitives': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-renderer': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-settings': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-slots': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-theme': 0.2.1-rc.1+ '@deepseek-ai/dsh-client-ui-workspace': 0.2.1-rc.1+ '@deepseek-ai/dsh-host-webserver': 0.2.1-rc.1+ '@deepseek-ai/dsh-llm': 0.2.1-rc.1+ '@deepseek-ai/dsh-permission-presets': 0.2.1-rc.1+ '@deepseek-ai/dsh-session': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-persistence': 0.2.1-rc.1+ '@deepseek-ai/dsh-session-projection': 0.2.1-rc.1+ '@deepseek-ai/dsh-skill-filesystem': 0.2.1-rc.1+ '@deepseek-ai/dsh-tools': 0.2.1-rc.1+ '@deepseek-ai/dsh-user-approval': 0.2.1-rc.1+ '@deepseek-ai/dsh-user-questions': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-code-language': 0.2.1-rc.1+ '@deepseek-ai/dsh-util-values': 0.2.1-rc.1+ '@deepseek-ai/dsh-workspace': 0.2.1-rc.1lint:'@antfu/eslint-config': ^9.3.0'@eslint-react/eslint-plugin': ^5.18.6@@ -244,7 +246,6 @@ catalogs:'@wdio/tauri-service': ^1.4.0anser: 2.3.5diff: 9.0.0- dsh-session-current: npm:@deepseek-ai/[email protected]immer: 10.1.1jsdom: ^26.1.0playwright: ^1.63.0diff --git a/source/deepseek-harness b/source/deepseek-harnessindex aa8262ec..1600d8a1 160000--- a/source/deepseek-harness+++ b/source/deepseek-harness@@ -1 +1 @@-Subproject commit aa8262ec091698bae9a6b04773a6b5b06ad4aef2+Subproject commit 1600d8a1e140dcde43a1a0941940a0480712c011diff --git a/src-tauri/resources/README.md b/src-tauri/resources/README.mdindex d975693a..b581b0bd 100644--- a/src-tauri/resources/README.md+++ b/src-tauri/resources/README.md@@ -2,6 +2,10 @@This directory is bundled into the installer as `resources/**`.+The current recommended Harness core is `0.2.1-rc.1`; the minimum supported core+is `0.1.7-rc.1`. Earlier core versions are unsupported. Legacy data-location notes+below describe migration history, not support for earlier Harness versions.+At runtime, the application downloads everything it needs into the OS user-datadirectory (the Tauri app-data dir for identifier `dsh-tauri`, e.g.`%APPDATA%/dsh-tauri/` on Windows):@@ -46,7 +50,7 @@ mapping entry**.```jsonc{- "engines": { "dsh": { "recommend": "0.2.0-rc.2", "minimum": "0.1.5-rc.1" } },+ "engines": { "dsh": { "recommend": "0.2.1-rc.1", "minimum": "0.1.7-rc.1" } },"dependencies": {"node": {"engine": ">=22.22.0",@@ -75,7 +79,7 @@ relative path).| Section | Purpose || ------- | ------- || `engines.dsh.recommend` | Recommended core version (update hints, "above recommended" marks) |-| `engines.dsh.minimum` | Lowest supported core; older local cores are not preferred |+| `engines.dsh.minimum` | Lowest supported core (`0.1.7-rc.1`); earlier cores are unsupported || `dependencies` | Dependency mapping spec: entry path per platform, default managed root, whether arbitrary overrides are allowed || `plugins.preset` | Community preset list shown by the first-run wizard / sidebar || `plugins.built-in` | Plugins shipped *with* the installer (auto-installed and auto-healed at startup) |@@ -186,7 +190,7 @@ To propose a new preset plugin, open a PR that adds one entry:"repo": "https://github.com/owner/repo","recommended": true,"checked": true,- "version": [{ "version": "^0.19.1", "dsh": "^0.1.5-rc.1" }]+ "version": [{ "version": "^0.19.1", "dsh": "^0.1.7-rc.1" }]}```@@ -212,8 +216,10 @@ setup time, so the PR only needs to add the JSON entry.For a given active core version, the **last** `version` matrix entry whose `dsh`range matches the core decides the compatible plugin version range — the matrix is-an ascending ladder, and older rules usually stay open-ended (`^0.1.5-rc.1` covers-all of `0.1.x`), so a release core can match several entries at once. That single+an ascending ladder, and rules may overlap (`^0.1.7-rc.1` also covers later+`0.1.x` release cores), so a core can match several entries at once. The desktop+support floor still applies; a preset range does not restore support for earlier+cores. That singlematching entry drives both the UI compatibility mark and core-driven cleanup:* no matrix entry matches the running core → the preset is markeddiff --git a/src-tauri/resources/manifest.jsonc b/src-tauri/resources/manifest.jsoncindex bc0d7d32..23ad784d 100644--- a/src-tauri/resources/manifest.jsonc+++ b/src-tauri/resources/manifest.jsonc@@ -1,8 +1,8 @@{"engines": {"dsh": {- "recommend": "0.2.0-rc.2",- "minimum": "0.1.5-rc.1"+ "recommend": "0.2.1-rc.1",+ "minimum": "0.1.7-rc.1"},"node": {"version": ">=22.22.0"@@ -43,8 +43,8 @@},"dsh": {"engine": {- "recommend": "0.2.0-rc.2",- "minimum": "0.1.5-rc.1"+ "recommend": "0.2.1-rc.1",+ "minimum": "0.1.7-rc.1"},"entry": "node_modules/@deepseek-ai/dsh/lib/bin.js","managedRoot": "$AppData/dependencies/dsh",@@ -158,16 +158,6 @@}],"preset": [- {- "id": "dshmarket",- "spec": "dshmarket",- "name": "DSH Market",- "repo": "https://github.com/dsh-market/dsh-market",- "description": "The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场",- "recommended": true,- "checked": true,- "version": "latest"- },{"id": "dsh-better-sidebar","spec": "dsh-better-sidebar",@@ -177,10 +167,6 @@"recommended": true,"checked": true,"version": [- {- "version": "^0.19.1",- "dsh": "^0.1.5-rc.1"- },{"version": "^0.21.1","dsh": "^0.1.7-rc.1"@@ -200,10 +186,6 @@"recommended": true,"checked": true,"version": [- {- "version": "^0.12.2",- "dsh": "^0.1.5-rc.1"- },{"version": "^0.14.0","dsh": "^0.1.7-rc.1"@@ -224,6 +206,16 @@"checked": false,"version": "latest"},+ {+ "id": "dshmarket",+ "spec": "dshmarket",+ "name": "DSH Market",+ "repo": "https://github.com/dsh-market/dsh-market",+ "description": "The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场",+ "recommended": false,+ "checked": false,+ "version": "latest"+ },{"id": "@xmanrui/dsh-im","spec": "@xmanrui/dsh-im",@@ -233,10 +225,6 @@"recommended": false,"checked": false,"version": [- {- "version": "^4.25.0",- "dsh": "^0.1.5-rc.1"- },{"version": "^4.29.0","dsh": "^0.1.7-rc.1"diff --git a/src-tauri/src/config/manifest.rs b/src-tauri/src/config/manifest.rsindex 470ed0c3..271f9b95 100644--- a/src-tauri/src/config/manifest.rs+++ b/src-tauri/src/config/manifest.rs@@ -698,53 +698,90 @@ mod tests {);}+ #[test]+ fn shipped_manifest_keeps_recommendation_and_minimum_in_sync() {+ let manifest = shipped_manifest();+ assert_eq!(manifest.engines.dsh.recommend, "0.2.1-rc.1");+ assert_eq!(manifest.engines.dsh.minimum, "0.1.7-rc.1");+ let raw = std::fs::read_to_string(source_manifest_path()).unwrap();+ let value: serde_json::Value = serde_json::from_str(&strip_jsonc(&raw)).unwrap();+ assert_eq!(+ value["dependencies"]["dsh"]["engine"]["recommend"],+ "0.2.1-rc.1"+ );+ assert_eq!(+ value["dependencies"]["dsh"]["engine"]["minimum"],+ "0.1.7-rc.1"+ );+ for (id, floor_req) in [+ ("dsh-better-sidebar", "^0.21.1"),+ ("dsh-rewind-plugin", "^0.14.0"),+ ("@xmanrui/dsh-im", "^4.29.0"),+ ] {+ let entry = manifest+ .plugins+ .preset+ .iter()+ .find(|entry| entry.id == id)+ .unwrap();+ let matrix = entry.version.as_ref().unwrap();+ assert_eq!(+ matrix.plugin_req_for_core(Some("0.1.7-rc.1")),+ Some(floor_req),+ "{id}"+ );+ assert_eq!(+ matrix.plugin_req_for_core(Some("0.2.1-rc.1")),+ Some("latest"),+ "{id}"+ );+ for core in ["0.1.5-rc.1", "0.1.6", "0.1.7-alpha.1", "0.1.7-rc.0"] {+ assert_eq!(matrix.plugin_req_for_core(Some(core)), None, "{id} {core}");+ assert!(matrix.unsupported_on(Some(core)), "{id} {core}");+ }+ }+ }+#[test]fn plugin_version_matrix_matches_core_ranges() {let matrix = PluginVersion::Matrix(vec![- VersionPair {- version: "^0.19.1".to_string(),- dsh: "^0.1.5-rc.1".to_string(),- },VersionPair {version: "^0.21.1".to_string(),dsh: "^0.1.7-rc.1".to_string(),},+ VersionPair {+ version: "^0.22.1".to_string(),+ dsh: "^0.1.7-rc.5".to_string(),+ },]);assert_eq!(- matrix.plugin_req_for_core(Some("0.1.5-rc.3")),- Some("^0.19.1")+ matrix.plugin_req_for_core(Some("0.1.7-rc.1")),+ Some("^0.21.1"));assert_eq!(matrix.plugin_req_for_core(Some("0.1.7-rc.2")),Some("^0.21.1"));- // release 核心同时落在两条区间内:必须取最新一代规则,否则会把新插件按旧一代钉版本- assert_eq!(matrix.plugin_req_for_core(Some("0.1.8")), Some("^0.21.1"));- assert_eq!(matrix.plugin_req_for_core(Some("0.2.0")), None);- assert!(!matrix.unsupported_on(Some("0.1.5-rc.3")));+ assert_eq!(+ matrix.plugin_req_for_core(Some("0.1.7-rc.5")),+ Some("^0.22.1")+ );+ assert_eq!(matrix.plugin_req_for_core(Some("0.1.8")), Some("^0.22.1"));+ assert_eq!(matrix.plugin_req_for_core(Some("0.2.1-rc.1")), None);+ assert!(!matrix.unsupported_on(Some("0.1.7-rc.1")));assert!(!matrix.unsupported_on(Some("0.1.8")));assert!(!matrix.unsupported_on(None));assert!(!matrix.unsupported_on(Some("not-a-version")));- assert!(matrix.unsupported_on(Some("0.2.0")));- assert!(matrix.matches_any_declared(Some("0.19.5")));+ assert!(matrix.unsupported_on(Some("0.2.1-rc.1")));assert!(matrix.matches_any_declared(Some("0.21.3")));+ assert!(matrix.matches_any_declared(Some("0.22.3")));assert!(!matrix.matches_any_declared(Some("0.25.0")));assert!(!matrix.matches_any_declared(None));}- /// 回归:预发布核心按**数值区间**判定,与内核安装校验- /// (`semver.satisfies(runtime, req, { includePrerelease: true })`)一致。- ///- /// `^0.2.0-rc.1` 覆盖整个 0.2.x,包括 `0.2.1-rc.1` 这类更高补丁号的预发布核心;- /// 旧实现按 `semver` crate 的预发布门槛判定,会把刚发的 rc 判成「不兼容当前核心」,- /// 并把已装插件退役。#[test]fn prerelease_core_is_judged_by_numeric_range() {let matrix = PluginVersion::Matrix(vec![- VersionPair {- version: "^0.19.1".to_string(),- dsh: "^0.1.5-rc.1".to_string(),- },VersionPair {version: "^0.21.1".to_string(),dsh: "^0.1.7-rc.1".to_string(),@@ -755,14 +792,14 @@ mod tests {},]);for (core, expected) in [+ ("0.1.7-rc.1", Some("^0.21.1")),+ ("0.1.7-rc.3", Some("^0.21.1")),+ ("0.1.8", Some("^0.21.1")),("0.2.0-rc.1", Some("^0.24.1")),("0.2.0-rc.2", Some("^0.24.1")),("0.2.0", Some("^0.24.1")),("0.2.1-rc.1", Some("^0.24.1")),("0.2.9-beta.3", Some("^0.24.1")),- ("0.1.5-rc.3", Some("^0.19.1")),- ("0.1.6-rc.1", Some("^0.19.1")),- ("0.1.7-rc.3", Some("^0.21.1")),] {assert_eq!(matrix.plugin_req_for_core(Some(core)),@@ -771,46 +808,43 @@ mod tests {);assert!(!matrix.unsupported_on(Some(core)), "core={core}");}- // 低于下界 / 跨代边界仍判不兼容:门槛放宽不能把真正的越界版本放进来- for core in ["0.1.5-alpha.2", "0.2.0-alpha.1", "0.3.0-rc.1", "0.3.0"] {+ for core in [+ "0.1.6-rc.1",+ "0.1.7-alpha.1",+ "0.1.7-beta.9",+ "0.1.7-rc.0",+ "0.2.0-alpha.1",+ "0.3.0-rc.1",+ "0.3.0",+ ] {assert_eq!(matrix.plugin_req_for_core(Some(core)), None, "core={core}");assert!(matrix.unsupported_on(Some(core)), "core={core}");}}- /// 回归 issue:已装版本**新于**声明区间时不算过期。- ///- /// 清单声明 `^0.21.1`(核心 `^0.1.7-rc.1`)时,用户手动升级到 0.22.0 必须被保留:- /// `^0.21.1` 不匹配 0.22.0,若按「不匹配即过期」判定会在启动时把用户装好的新版本- /// 自动卸载,用户永远无法升级插件。#[test]fn newer_installed_version_is_not_outdated() {let matrix = PluginVersion::Matrix(vec![- VersionPair {- version: "^0.19.1".to_string(),- dsh: "^0.1.5-rc.1".to_string(),- },VersionPair {version: "^0.21.1".to_string(),dsh: "^0.1.7-rc.1".to_string(),},+ VersionPair {+ version: "^0.24.1".to_string(),+ dsh: "^0.2.0-rc.1".to_string(),+ },]);for (core, installed, outdated) in [- // 命中区间上界内:不过期(Some("0.1.7-rc.1"), Some("0.21.1"), Some(false)),(Some("0.1.7-rc.1"), Some("0.21.3"), Some(false)),- // 高于区间上界(用户自升级):不过期(Some("0.1.7-rc.1"), Some("0.22.0"), Some(false)),(Some("0.1.7-rc.1"), Some("1.0.0"), Some(false)),- // 低于区间下界(上一代遗留):过期,需按当前代重装(Some("0.1.7-rc.1"), Some("0.19.1"), Some(true)),(Some("0.1.7-rc.1"), Some("0.20.9"), Some(true)),- // 上一代核心:按其下界判定- (Some("0.1.5-rc.3"), Some("0.18.0"), Some(true)),- (Some("0.1.5-rc.3"), Some("0.19.1"), Some(false)),- (Some("0.1.5-rc.3"), Some("0.25.0"), Some(false)),- // 核心无命中代 / 已装版本不可解析:无法判定- (Some("0.2.0"), Some("0.19.1"), None),+ (Some("0.2.1-rc.1"), Some("0.21.3"), Some(true)),+ (Some("0.2.1-rc.1"), Some("0.24.1"), Some(false)),+ (Some("0.2.1-rc.1"), Some("0.25.0"), Some(false)),+ (Some("0.3.0"), Some("0.19.1"), None),(Some("0.1.7-rc.1"), None, None),(Some("0.1.7-rc.1"), Some("invalid"), None),(None, Some("0.19.1"), None),diff --git a/src-tauri/src/config/setting.rs b/src-tauri/src/config/setting.rsindex 2a292fe4..a3a9d6ef 100644--- a/src-tauri/src/config/setting.rs+++ b/src-tauri/src/config/setting.rs@@ -229,14 +229,31 @@ pub fn is_e2e_run() -> bool {std::env::var_os(E2E_PORT_ENV_VAR).is_some_and(|v| !v.is_empty())}+pub(crate) fn e2e_app_data_dir() -> Result<Option<std::path::PathBuf>, String> {+ resolve_e2e_app_data_dir(is_e2e_run(), std::env::var_os("DSH_E2E_HOME").as_deref())+}++fn resolve_e2e_app_data_dir(+ e2e: bool,+ home: Option<&std::ffi::OsStr>,+) -> Result<Option<std::path::PathBuf>, String> {+ if !e2e {+ return Ok(None);+ }+ let home = home+ .map(std::path::Path::new)+ .filter(|home| home.is_absolute())+ .ok_or_else(|| {+ "STARTUP_E2E_HOME_INVALID: DSH_E2E_HOME must be a non-empty absolute path".to_string()+ })?;+ Ok(Some(home.join("app-data")))+}+/// 当前进程应使用的 Store 持久化文件名(生产 / 开发 / E2E 三方隔离的唯一真值)。////// store(端口、installed、active_core、窗口几何等)属于「应用数据」而非共用核心:/// 生产默认 3080、开发默认 3081,共用一份 store 会让两边端口一路漂移并相互污染状态;/// E2E 若复用开发文件,用例写入的窗口几何会覆盖用户正在使用的开发版配置。-///-/// 注意 `app_data_dir()` 在 Windows 上由 `SHGetKnownFolderPath` 解析,重定向-/// `APPDATA` 环境变量**无法**把 store 引到 scratch 目录——三方隔离只能靠换文件名。pub fn store_dat_file_name() -> &'static str {resolve_store_dat_file(is_e2e_run(), cfg!(debug_assertions))}@@ -337,7 +354,10 @@ pub(crate) fn read_store_dat_setting<R: Runtime>(app_handle: &AppHandle<R>) -> Ssetting_from_value(raw.as_ref())}-fn write_store_dat_setting(app_handle: &AppHandle, setting: &Setting) -> serde_json::Value {+fn write_store_dat_setting<R: Runtime>(+ app_handle: &AppHandle<R>,+ setting: &Setting,+) -> serde_json::Value {let store = app_handle.store(store_dat_file_name()).expect("Failed to load store");@@ -347,13 +367,14 @@ fn write_store_dat_setting(app_handle: &AppHandle, setting: &Setting) -> serde_jvalue}-fn emit_setting(app_handle: &AppHandle, value: &serde_json::Value) {+fn emit_setting<R: Runtime>(app_handle: &AppHandle<R>, value: &serde_json::Value) {app_handle.emit("setting_updated", value).expect("Failed to emit event");}fn preserve_persisted_fields(mut replacement: Setting, current: &Setting) -> Setting {+ replacement.active_core.clone_from(¤t.active_core);replacement.proxy_url.clone_from(¤t.proxy_url);replacement.appearance.clone_from(¤t.appearance);replacement.zoom_factor = normalize_zoom_factor(current.zoom_factor);@@ -370,7 +391,7 @@ fn preserve_persisted_fields(mut replacement: Setting, current: &Setting) -> Set/// 兼容旧调用方的整对象写入,但始终保留锁内读到的最新缩放、关窗动作、桌宠与本地/// 插件热重载等持久字段,避免长流程用陈旧 `Setting` 覆盖精确更新路径刚写入的值(丢更新)。-pub fn set_store_dat_setting(app_handle: &AppHandle, mut setting: Setting) {+pub fn set_store_dat_setting<R: Runtime>(app_handle: &AppHandle<R>, mut setting: Setting) {let value = {let _guard = setting_write_lock().lock()@@ -384,7 +405,7 @@ pub fn set_store_dat_setting(app_handle: &AppHandle, mut setting: Setting) {}/// 在一个短临界区内读取、修改并写回设置,避免多个精确字段更新彼此丢失。-pub fn update_store_dat_setting<F>(app_handle: &AppHandle, update: F) -> Setting+pub fn update_store_dat_setting<R: Runtime, F>(app_handle: &AppHandle<R>, update: F) -> SettingwhereF: FnOnce(&mut Setting),{@@ -433,9 +454,9 @@ mod tests {use super::{default_close_action, default_zoom_factor, force_xwayland_in_store_json,normalize_close_action, normalize_setting, normalize_zoom_factor,- preserve_persisted_fields, resolve_store_dat_file, setting_from_value, unwrap_json_value,- Setting, STORE_DAT_DEV_FILE, STORE_DAT_FILE, STORE_DAT_TEST_FILE, STORE_SETTING_KEY,- ZOOM_FACTOR_MAX, ZOOM_FACTOR_MIN,+ preserve_persisted_fields, resolve_e2e_app_data_dir, resolve_store_dat_file,+ setting_from_value, unwrap_json_value, Setting, STORE_DAT_DEV_FILE, STORE_DAT_FILE,+ STORE_DAT_TEST_FILE, STORE_SETTING_KEY, ZOOM_FACTOR_MAX, ZOOM_FACTOR_MIN,};/// 启动前读取跑在 `logger::init()` 之前,任何损坏输入都只能静默回落到关闭。@@ -484,6 +505,46 @@ mod tests {assert!(force_xwayland_in_store_json(&raw));}+ #[test]+ fn e2e_app_data_requires_an_absolute_scratch_home() {+ for home in [+ None,+ Some(""),+ Some(" "),+ Some("scratch"),+ Some("./scratch"),+ ] {+ let error = resolve_e2e_app_data_dir(true, home.map(std::ffi::OsStr::new)).unwrap_err();+ assert_eq!(+ error,+ "STARTUP_E2E_HOME_INVALID: DSH_E2E_HOME must be a non-empty absolute path"+ );+ }+ #[cfg(windows)]+ for home in [r"C:scratch", r"\scratch"] {+ assert!(resolve_e2e_app_data_dir(true, Some(std::ffi::OsStr::new(home))).is_err());+ }+ let home = tempfile::tempdir().unwrap();+ assert_eq!(+ resolve_e2e_app_data_dir(true, Some(home.path().as_os_str())).unwrap(),+ Some(home.path().join("app-data"))+ );+ assert!(!home.path().join("app-data").exists());+ }++ #[test]+ fn normal_runs_ignore_e2e_home() {+ let home = tempfile::tempdir().unwrap();+ for candidate in [+ None,+ Some(std::ffi::OsStr::new("")),+ Some(std::ffi::OsStr::new("scratch")),+ Some(home.path().as_os_str()),+ ] {+ assert_eq!(resolve_e2e_app_data_dir(false, candidate), Ok(None));+ }+ }+#[test]fn store_dat_file_name_isolates_the_three_modes() {assert_eq!(resolve_store_dat_file(true, true), STORE_DAT_TEST_FILE);@@ -774,6 +835,26 @@ mod tests {);}+ #[test]+ fn stale_setting_writes_cannot_replace_the_latest_active_core() {+ for active_core in [None, Some("app"), Some("local")] {+ for stale_core in [None, Some("app"), Some("local")] {+ let current = Setting {+ active_core: active_core.map(str::to_owned),+ ..Default::default()+ };+ let stale = Setting {+ active_core: stale_core.map(str::to_owned),+ language: "en-US".into(),+ ..Default::default()+ };+ let merged = preserve_persisted_fields(stale, ¤t);+ assert_eq!(merged.active_core.as_deref(), active_core);+ assert_eq!(merged.language, "en-US");+ }+ }+ }+#[test]fn proxy_setting_survives_serialization_and_defaults_for_legacy_settings() {let setting = Setting {diff --git a/src-tauri/src/desktop/startup.rs b/src-tauri/src/desktop/startup.rsindex ff1c68b5..0bd8f89a 100644--- a/src-tauri/src/desktop/startup.rs+++ b/src-tauri/src/desktop/startup.rs@@ -1,4 +1,5 @@pub(crate) fn verify() -> Result<(), String> {+ crate::config::e2e_app_data_dir()?;#[cfg(windows)]{let level = process_integrity_level()@@ -130,6 +131,130 @@ mod tests {assert!(!cache.exists(), "public asset HTTP created a cookie cache");}+ #[test]+ fn e2e_startup_paths_are_isolated_and_invalid_roots_fail_closed() {+ for mode in ["missing", "empty", "relative", "absolute"] {+ let scratch = tempfile::tempdir().unwrap();+ let home = scratch.path().join("home");+ let local = home.join("AppData/Local");+ let roaming = home.join("AppData/Roaming");+ std::fs::create_dir_all(&local).unwrap();+ std::fs::create_dir_all(&roaming).unwrap();+ let mut command = std::process::Command::new(std::env::current_exe().unwrap());+ command+ .args([+ "--exact",+ "desktop::startup::tests::e2e_startup_paths_child",+ "--nocapture",+ ])+ .env("DSH_TEST_E2E_STARTUP_MODE", mode)+ .env("DSH_TEST_E2E_SCRATCH", scratch.path())+ .env("TAURI_WEBDRIVER_PORT", "4445")+ .env("HOME", &home)+ .env("USERPROFILE", &home)+ .env("LOCALAPPDATA", local)+ .env("APPDATA", roaming)+ .env("XDG_DATA_HOME", home.join(".local/share"))+ .stdout(std::process::Stdio::piped())+ .stderr(std::process::Stdio::piped());+ match mode {+ "missing" => {+ command.env_remove("DSH_E2E_HOME");+ }+ "empty" => {+ command.env("DSH_E2E_HOME", "");+ }+ "relative" => {+ command.env("DSH_E2E_HOME", "scratch");+ }+ _ => {+ command.env("DSH_E2E_HOME", scratch.path());+ }+ }+ #[cfg(windows)]+ {+ use std::os::windows::process::CommandExt;+ command.creation_flags(0x08000000);+ }+ let mut child = command.spawn().unwrap();+ let deadline = std::time::Instant::now() + std::time::Duration::from_secs(30);+ while child.try_wait().unwrap().is_none() {+ if std::time::Instant::now() >= deadline {+ child.kill().unwrap();+ let _ = child.wait();+ panic!("E2E startup isolation did not return within 30 seconds: {mode}");+ }+ std::thread::sleep(std::time::Duration::from_millis(25));+ }+ let output = child.wait_with_output().unwrap();+ assert!(+ output.status.success(),+ "E2E startup isolation failed ({mode}): {}\n{}",+ String::from_utf8_lossy(&output.stdout),+ String::from_utf8_lossy(&output.stderr)+ );+ assert!(String::from_utf8_lossy(&output.stdout).contains("E2E_STARTUP_PATHS_VERIFIED"));+ }+ }++ #[test]+ fn e2e_startup_paths_child() {+ let Ok(mode) = std::env::var("DSH_TEST_E2E_STARTUP_MODE") else {+ return;+ };+ let scratch = std::path::PathBuf::from(std::env::var_os("DSH_TEST_E2E_SCRATCH").unwrap());+ let expected = scratch.join("app-data");+ if mode != "absolute" {+ assert_eq!(+ verify().unwrap_err(),+ "STARTUP_E2E_HOME_INVALID: DSH_E2E_HOME must be a non-empty absolute path"+ );+ assert_eq!(crate::logger::identifier_dir(), None);+ assert!(!crate::config::force_xwayland_setting());+ assert!(!expected.exists());+ } else {+ use tauri::Manager;+ use tauri_plugin_store::StoreExt;++ verify().unwrap();+ let directory = crate::config::e2e_app_data_dir().unwrap().unwrap();+ assert_eq!(directory, expected);+ assert_eq!(crate::logger::identifier_dir(), Some(expected.clone()));+ assert_eq!(crate::config::store_dat_file_name(), ".store.test.dat");+ std::fs::create_dir_all(&expected).unwrap();+ let user_store = br#"{"setting":{"force_xwayland":false}}"#;+ for name in [".store.dat", ".store.dev.dat"] {+ std::fs::write(expected.join(name), user_store).unwrap();+ }+ std::fs::write(+ expected.join(".store.test.dat"),+ br#"{"setting":{"force_xwayland":true}}"#,+ )+ .unwrap();+ assert!(crate::config::force_xwayland_setting());+ let mut context = mock_context(noop_assets());+ context.config_mut().app.app_directories_override = Some(+ tauri::utils::config::AppDirectoriesOverride::Root(directory),+ );+ let app = mock_builder()+ .plugin(tauri_plugin_store::Builder::default().build())+ .build(context)+ .unwrap();+ assert_eq!(app.path().app_data_dir().unwrap(), expected);+ let store = app.store(crate::config::store_dat_file_name()).unwrap();+ store.set("isolation_marker", serde_json::json!("e2e"));+ store.save().unwrap();+ let saved: serde_json::Value =+ serde_json::from_slice(&std::fs::read(expected.join(".store.test.dat")).unwrap())+ .unwrap();+ assert_eq!(saved["isolation_marker"], "e2e");+ for name in [".store.dat", ".store.dev.dat"] {+ assert_eq!(std::fs::read(expected.join(name)).unwrap(), user_store);+ }+ }+ println!("E2E_STARTUP_PATHS_VERIFIED");+ }+#[test]fn only_below_medium_integrity_requires_repair() {let executable = std::path::Path::new("F:/Tool/DeepSeek Harness Desktop/app.exe");diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rsindex ffd45d85..88e341f2 100644--- a/src-tauri/src/lib.rs+++ b/src-tauri/src/lib.rs@@ -67,7 +67,12 @@ pub fn run() -> Result<(), String> {// 否则首次 get_dsh_data_path 会落到默认目录,日志、store 与 shim 全部写错位置。service::data_dir::restore_process_env();- let context = tauri::generate_context!();+ let mut context = tauri::generate_context!();+ if let Some(directory) = config::e2e_app_data_dir()? {+ context.config_mut().app.app_directories_override = Some(+ tauri::utils::config::AppDirectoriesOverride::Root(directory),+ );+ }log::info!("STARTUP_BOOT: name=context_ready elapsed_ms={}",started.elapsed().as_millis()diff --git a/src-tauri/src/logger/mod.rs b/src-tauri/src/logger/mod.rsindex 564744e6..12e826aa 100644--- a/src-tauri/src/logger/mod.rs+++ b/src-tauri/src/logger/mod.rs@@ -33,6 +33,11 @@ static FRONTDESK_WRITER: OnceLock<Arc<Mutex<SizeRotatingWriter>>> = OnceLock::ne/// 仅用 `std::env` 解析,不依赖 `AppHandle`,因此也是启动前读取 store 的路径来源/// (`config::force_xwayland_setting`)。pub(crate) fn identifier_dir() -> Option<PathBuf> {+ match crate::config::e2e_app_data_dir() {+ Ok(Some(directory)) => return Some(directory),+ Err(_) => return None,+ Ok(None) => {}+ }#[cfg(target_os = "windows")]{let appdata = std::env::var("APPDATA").ok()?;diff --git a/src-tauri/src/service/core/local.rs b/src-tauri/src/service/core/local.rsindex 252559b6..c706e20b 100644--- a/src-tauri/src/service/core/local.rs+++ b/src-tauri/src/service/core/local.rs@@ -5,9 +5,9 @@use crate::service::cli;use std::path::{Path, PathBuf};-use tauri::AppHandle;#[cfg(unix)]use tauri::Manager;+use tauri::{AppHandle, Runtime};/// 解析出的本地核心信息pub(super) struct LocalCore {@@ -24,7 +24,7 @@ pub(super) struct LocalCore {/// 与 pnpm shim 的"用户优先"策略一致,只排除我们自己生成的 shim,而非整个 bin/// 目录——用户可能恰好把 npm/pnpm 全局 dsh 装进 `~/.local/bin`(Unix XDG 约定,/// 与本应用 shim 目录相同),若整目录跳过会误判为"无本地 dsh"(issue #54)。-pub(super) fn find_user_dsh_bin(app_handle: &AppHandle) -> Option<PathBuf> {+pub(super) fn find_user_dsh_bin<R: Runtime>(app_handle: &AppHandle<R>) -> Option<PathBuf> {let candidates: &[&str] = if cfg!(windows) {&["dsh.cmd", "dsh.exe", "dsh.bat"]} else {@@ -283,7 +283,7 @@ fn prefix_candidates(bin: &Path) -> Vec<PathBuf> {/// 2. npm 标准全局布局 `<prefix>/lib/node_modules/@deepseek-ai/dsh`/// (bin 位于 `<prefix>/bin`,包目录位于 `<prefix>/lib`);/// 3. pnpm 全局布局 `<prefix>/global/<n>/node_modules/@deepseek-ai/dsh`。-fn user_dsh_package_dir(app_handle: &AppHandle) -> Option<PathBuf> {+fn user_dsh_package_dir<R: Runtime>(app_handle: &AppHandle<R>) -> Option<PathBuf> {let bin = find_user_dsh_bin(app_handle)?;package_dir_from_bin(&bin)}@@ -324,7 +324,7 @@ fn read_package_version(dir: &Path) -> Option<String> {}/// 本地核心:包目录 + 版本 + bin.js 入口。任一环节缺失视为不存在。-pub(super) fn local_core(app_handle: &AppHandle) -> Option<LocalCore> {+pub(super) fn local_core<R: Runtime>(app_handle: &AppHandle<R>) -> Option<LocalCore> {let package_dir = user_dsh_package_dir(app_handle)?;let version = read_package_version(&package_dir)?;let bin = package_dir.join("lib").join("bin.js");@@ -344,7 +344,7 @@ pub fn local_core_package_dir(app_handle: &AppHandle) -> Option<PathBuf> {}/// 本地核心是否由 pnpm 全局布局管理(决定更新走 pnpm 还是 npm)。-fn local_core_uses_pnpm(app_handle: &AppHandle) -> bool {+fn local_core_uses_pnpm<R: Runtime>(app_handle: &AppHandle<R>) -> bool {let Some(bin) = find_user_dsh_bin(app_handle) else {return false;};@@ -369,11 +369,37 @@ fn local_core_uses_pnpm(app_handle: &AppHandle) -> bool {/// 通过用户包管理器 CLI 更新本地核心(npm `update -g` / pnpm `add -g`)。////// 返回更新后的版本号。失败返回错误(附进程输出尾部,便于排查)。-pub async fn update_local_core(app_handle: AppHandle) -> Result<String, String> {+pub async fn update_local_core<R: Runtime>(app_handle: AppHandle<R>) -> Result<String, String> {+ let _transition_guard = crate::service::workflow::acquire_core_transition().await?;crate::service::workflow::instances::require_exclusive_profile()?;let Some(core) = local_core(&app_handle) else {return Err("CORE_LOCAL_NOT_FOUND: no local core to update".to_string());};+ if super::source::active_source(&app_handle) != super::source::CoreSource::App {+ return Err(+ "CORE_LOCAL_UPDATE_REQUIRES_APP: switch to a supported managed core before updating the local core"+ .to_string(),+ );+ }+ let managed_version = crate::config::get_dsh_version(&app_handle)+ .as_deref()+ .and_then(|version| semver::Version::parse(version).ok());+ let minimum = crate::config::manifest::minimum_dsh_version(&app_handle)+ .as_deref()+ .and_then(|version| semver::Version::parse(version).ok());+ if !crate::config::get_dsh_binary_path(&app_handle).is_file()+ || !managed_version+ .zip(minimum)+ .is_some_and(|(version, minimum)| version >= minimum)+ {+ return Err(+ "CORE_LOCAL_UPDATE_REQUIRES_APP: a supported managed core must be installed before updating the local core"+ .to_string(),+ );+ }+ crate::config::update_store_dat_setting(&app_handle, |setting| {+ setting.active_core = Some(super::source::CoreSource::App.as_str().to_string());+ });log::info!("Updating local dsh core at {}", core.package_dir.display());let uses_pnpm = local_core_uses_pnpm(&app_handle);@@ -450,6 +476,10 @@ pub async fn update_local_core(app_handle: AppHandle) -> Result<String, String>Ok(version)}+#[cfg(test)]+#[path = "local_update_tests.rs"]+mod local_update_tests;+#[cfg(test)]mod tests {use super::*;diff --git a/src-tauri/src/service/core/local_update_tests.rs b/src-tauri/src/service/core/local_update_tests.rsnew file mode 100644index 00000000..0e6ae28e--- /dev/null+++ b/src-tauri/src/service/core/local_update_tests.rs@@ -0,0 +1,350 @@+use super::*;+use crate::config;+use crate::service::core::source::{active_source, CoreSource};+use crate::service::workflow;+use std::process::{Command, Stdio};+use std::time::{Duration, Instant};+use tauri::Manager;++#[test]+fn local_update_isolation_checks_real_state_before_running_the_package_manager() {+ for case in [+ "active-local",+ "automatic-local",+ "fallback-success",+ "fallback-failure",+ "automatic-fallback-success",+ "managed-success",+ "missing-app",+ "unsupported-app",+ "unreadable-app",+ "transition-reread",+ "holds-transition",+ ] {+ let scratch = tempfile::tempdir().unwrap();+ let home = scratch.path().join("home");+ std::fs::create_dir_all(&home).unwrap();+ let bin = scratch.path().join("bin");+ std::fs::create_dir_all(&bin).unwrap();+ let local_bin = bin.join(if cfg!(windows) { "dsh.cmd" } else { "dsh" });+ std::fs::write(&local_bin, "local dsh fixture").unwrap();+ let marker = scratch.path().join("pm-called");+ let script = if cfg!(windows) {+ "@echo off\r\necho %* > \"%DSH_TEST_LOCAL_UPDATE_MARKER%\"\r\n\"%DSH_TEST_LOCAL_UPDATE_EXE%\" --exact service::core::local::local_update_tests::local_update_package_manager_child --nocapture --test-threads=1\r\nexit /b %errorlevel%\r\n"+ } else {+ "#!/bin/sh\nprintf '%s\\n' \"$*\" > \"$DSH_TEST_LOCAL_UPDATE_MARKER\"\nexec \"$DSH_TEST_LOCAL_UPDATE_EXE\" --exact service::core::local::local_update_tests::local_update_package_manager_child --nocapture --test-threads=1\n"+ };+ for pm in ["npm", "pnpm"] {+ let path = bin.join(if cfg!(windows) {+ format!("{pm}.cmd")+ } else {+ pm.into()+ });+ std::fs::write(&path, script).unwrap();+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o700)).unwrap();+ }+ }+ let mut command = Command::new(std::env::current_exe().unwrap());+ command+ .args([+ "--exact",+ "service::core::local::local_update_tests::local_update_isolation_child",+ "--nocapture",+ ])+ .env("DSH_TEST_LOCAL_UPDATE_CASE", case)+ .env("DSH_TEST_LOCAL_UPDATE_SCRATCH", scratch.path())+ .env("DSH_TEST_LOCAL_UPDATE_MARKER", &marker)+ .env(+ "DSH_TEST_LOCAL_UPDATE_EXE",+ std::env::current_exe().unwrap(),+ )+ .env("DSH_CLI_PATH", &local_bin)+ .env("PATH", &bin)+ .env("HOME", &home)+ .env("USERPROFILE", &home)+ .env("APPDATA", home.join("AppData/Roaming"))+ .env("LOCALAPPDATA", home.join("AppData/Local"))+ .env("XDG_DATA_HOME", home.join(".local/share"))+ .env("DSH_HOME", home.join(".dsh"))+ .env("DSH_E2E_HOME", &home)+ .env("TAURI_WEBDRIVER_PORT", "4445")+ .env(+ "DSH_DOWNLOAD_CACHE_DIR",+ scratch.path().join("dependencies"),+ )+ .stdout(Stdio::piped())+ .stderr(Stdio::piped());+ #[cfg(windows)]+ {+ use std::os::windows::process::CommandExt;+ command.creation_flags(0x08000000);+ }+ let mut child = command.spawn().unwrap();+ let deadline = Instant::now() + Duration::from_secs(30);+ while child.try_wait().unwrap().is_none() {+ if Instant::now() >= deadline {+ #[cfg(windows)]+ {+ use std::os::windows::process::CommandExt;+ let taskkill = std::path::PathBuf::from(+ std::env::var_os("SystemRoot").unwrap_or_else(|| "C:\\Windows".into()),+ )+ .join("System32/taskkill.exe");+ let _ = Command::new(taskkill)+ .args(["/PID", &child.id().to_string(), "/T", "/F"])+ .creation_flags(0x08000000)+ .status();+ }+ let _ = child.kill();+ let _ = child.wait();+ panic!("local update isolation timed out: {case}");+ }+ std::thread::sleep(Duration::from_millis(10));+ }+ let output = child.wait_with_output().unwrap();+ assert!(+ output.status.success(),+ "local update isolation failed ({case}): {}\n{}",+ String::from_utf8_lossy(&output.stdout),+ String::from_utf8_lossy(&output.stderr),+ );+ assert!(String::from_utf8_lossy(&output.stdout).contains("LOCAL_UPDATE_ISOLATION_VERIFIED"));+ }+}++#[test]+fn local_update_package_manager_child() {+ let Ok(case) = std::env::var("DSH_TEST_LOCAL_UPDATE_CASE") else {+ return;+ };+ let scratch = PathBuf::from(std::env::var_os("DSH_TEST_LOCAL_UPDATE_SCRATCH").unwrap());+ if case == "holds-transition" {+ std::fs::write(scratch.join("pm-started"), "started").unwrap();+ let deadline = Instant::now() + Duration::from_secs(5);+ while !scratch.join("pm-release").exists() {+ assert!(+ Instant::now() < deadline,+ "fixture package manager was not released"+ );+ std::thread::sleep(Duration::from_millis(10));+ }+ }+ if case == "fallback-failure" {+ eprintln!("fixture package manager failed");+ std::process::exit(1);+ }+ std::fs::write(+ scratch.join("node_modules/@deepseek-ai/dsh/package.json"),+ br#"{"name":"@deepseek-ai/dsh","version":"0.2.1-rc.1"}"#,+ )+ .unwrap();+}++#[test]+fn local_update_isolation_child() {+ let Ok(case) = std::env::var("DSH_TEST_LOCAL_UPDATE_CASE") else {+ return;+ };+ let scratch = PathBuf::from(std::env::var_os("DSH_TEST_LOCAL_UPDATE_SCRATCH").unwrap());+ let mut context = tauri::test::mock_context(tauri::test::noop_assets());+ context.config_mut().app.app_directories_override = Some(+ tauri::utils::config::AppDirectoriesOverride::Root(scratch.join("app-data")),+ );+ let app = tauri::test::mock_builder()+ .plugin(tauri_plugin_store::Builder::default().build())+ .build(context)+ .unwrap();+ assert!(app.path().app_data_dir().unwrap().starts_with(&scratch));+ let package = scratch.join("node_modules/@deepseek-ai/dsh");+ std::fs::create_dir_all(package.join("lib")).unwrap();+ std::fs::write(package.join("lib/bin.js"), "local entry").unwrap();+ let local_version = if matches!(+ case.as_str(),+ "active-local" | "automatic-local" | "managed-success"+ ) {+ "0.1.7-rc.1"+ } else {+ "0.1.6"+ };+ std::fs::write(+ package.join("package.json"),+ format!(r#"{{"name":"@deepseek-ai/dsh","version":"{local_version}"}}"#),+ )+ .unwrap();+ let managed = config::get_dsh_install_path(app.handle());+ let entry = config::get_dsh_binary_path(app.handle());+ assert!(managed.starts_with(&scratch));+ assert!(entry.starts_with(&managed));+ std::fs::create_dir_all(entry.parent().unwrap()).unwrap();+ if case != "missing-app" {+ std::fs::write(&entry, "managed entry").unwrap();+ }+ let managed_manifest = if case == "unsupported-app" {+ br#"{"dependencies":{"@deepseek-ai/dsh":"0.1.6"}}"#.as_slice()+ } else if case == "unreadable-app" {+ b"not json".as_slice()+ } else {+ br#"{"dependencies":{"@deepseek-ai/dsh":"0.2.1-rc.1"}}"#.as_slice()+ };+ std::fs::write(managed.join("package.json"), managed_manifest).unwrap();+ let profile = config::get_dsh_data_path(app.handle()).join("profiles/keep-profile");+ assert!(profile.starts_with(&scratch));+ std::fs::create_dir_all(&profile).unwrap();+ std::fs::write(profile.join("config.jsonc"), "keep config").unwrap();+ std::fs::write(profile.join("session.jsonl"), "keep session").unwrap();+ let original = config::update_store_dat_setting(app.handle(), |setting| {+ setting.active_profile = "keep-profile".into();+ setting.active_core = if matches!(+ case.as_str(),+ "automatic-local" | "automatic-fallback-success"+ ) {+ None+ } else if matches!(+ case.as_str(),+ "active-local" | "fallback-success" | "fallback-failure" | "holds-transition"+ ) {+ Some("local".into())+ } else {+ Some("app".into())+ };+ });+ assert_eq!(local_core(app.handle()).unwrap().version, local_version);+ let marker = scratch.join("pm-called");+ tauri::async_runtime::block_on(async {+ if case == "transition-reread" {+ let guard = workflow::acquire_core_transition().await.unwrap();+ let handle = app.handle().clone();+ let task = tokio::spawn(async move { update_local_core(handle).await });+ tokio::time::sleep(Duration::from_millis(40)).await;+ assert!(+ !task.is_finished(),+ "update must wait for the shared transition lock"+ );+ std::fs::write(+ package.join("package.json"),+ br#"{"name":"@deepseek-ai/dsh","version":"0.1.7-rc.1"}"#,+ )+ .unwrap();+ config::update_store_dat_setting(app.handle(), |setting| {+ setting.active_core = Some("local".into());+ });+ drop(guard);+ let error = task.await.unwrap().unwrap_err();+ assert!(+ error.starts_with("CORE_LOCAL_UPDATE_REQUIRES_APP:"),+ "{error}"+ );+ assert!(!marker.exists());+ } else if case == "holds-transition" {+ let handle = app.handle().clone();+ let task = tokio::spawn(async move { update_local_core(handle).await });+ tokio::time::timeout(Duration::from_secs(5), async {+ while !scratch.join("pm-started").exists() {+ tokio::time::sleep(Duration::from_millis(10)).await;+ }+ })+ .await+ .unwrap();+ assert_eq!(+ config::get_store_dat_setting(app.handle())+ .active_core+ .as_deref(),+ Some("app")+ );+ let mut stale = original.clone();+ stale.language = "en-US".into();+ config::set_store_dat_setting(app.handle(), stale);+ assert_eq!(+ config::get_store_dat_setting(app.handle())+ .active_core+ .as_deref(),+ Some("app")+ );+ assert!(tokio::time::timeout(+ Duration::from_millis(40),+ workflow::acquire_core_transition()+ )+ .await+ .is_err());+ std::fs::write(scratch.join("pm-release"), "release").unwrap();+ assert_eq!(task.await.unwrap().unwrap(), "0.2.1-rc.1");+ let _guard =+ tokio::time::timeout(Duration::from_secs(1), workflow::acquire_core_transition())+ .await+ .unwrap()+ .unwrap();+ assert_eq!(active_source(app.handle()), CoreSource::App);+ } else {+ let result = update_local_core(app.handle().clone()).await;+ if matches!(+ case.as_str(),+ "active-local"+ | "automatic-local"+ | "missing-app"+ | "unsupported-app"+ | "unreadable-app"+ ) {+ let error = result.unwrap_err();+ assert!(+ error.starts_with("CORE_LOCAL_UPDATE_REQUIRES_APP:"),+ "{case}: {error}"+ );+ assert!(+ !marker.exists(),+ "rejected updates must not execute the package manager"+ );+ assert_eq!(+ config::get_store_dat_setting(app.handle()).active_core,+ original.active_core+ );+ } else if case == "fallback-failure" {+ let error = result.unwrap_err();+ assert!(error.starts_with("CORE_UPDATE_FAILED:"), "{case}: {error}");+ assert!(error.contains("fixture package manager failed"), "{error}");+ } else {+ assert_eq!(result.unwrap(), "0.2.1-rc.1");+ }+ }+ });+ if marker.exists() {+ assert_eq!(+ std::fs::read_to_string(&marker).unwrap().trim(),+ "install -g @deepseek-ai/dsh@latest"+ );+ assert_eq!(+ config::get_store_dat_setting(app.handle())+ .active_core+ .as_deref(),+ Some("app")+ );+ assert_eq!(active_source(app.handle()), CoreSource::App);+ if case == "fallback-failure" {+ assert_eq!(local_core(app.handle()).unwrap().version, "0.1.6");+ } else {+ assert_eq!(local_core(app.handle()).unwrap().version, "0.2.1-rc.1");+ }+ }+ assert_eq!(+ config::get_store_dat_setting(app.handle()).active_profile,+ "keep-profile"+ );+ assert_eq!(+ std::fs::read(profile.join("config.jsonc")).unwrap(),+ b"keep config"+ );+ assert_eq!(+ std::fs::read(profile.join("session.jsonl")).unwrap(),+ b"keep session"+ );+ assert_eq!(+ std::fs::read(managed.join("package.json")).unwrap(),+ managed_manifest+ );+ if case != "missing-app" {+ assert_eq!(std::fs::read(entry).unwrap(), b"managed entry");+ }+ println!("LOCAL_UPDATE_ISOLATION_VERIFIED");+}diff --git a/src-tauri/src/service/core/source.rs b/src-tauri/src/service/core/source.rsindex 3c1dc727..fe288d4a 100644--- a/src-tauri/src/service/core/source.rs+++ b/src-tauri/src/service/core/source.rs@@ -121,7 +121,7 @@ fn warn_unsupported_local_core(version: &str, baseline: Option<&str>) {/// 本地核心低于最低支持版本时不参与优先,一律回退预打包核心:内置插件是桌面壳的/// 组成部分,装上也无法加载,只会把启动卡在插件阶段(issue #596)。持久化的/// `active_core` 设置不改写——用户升级本地核心后自动恢复「本地优先」。-pub fn active_source(app_handle: &AppHandle) -> CoreSource {+pub fn active_source<R: tauri::Runtime>(app_handle: &AppHandle<R>) -> CoreSource {let setting = config::get_store_dat_setting(app_handle);let local = local_core(app_handle);let baseline = config::manifest::minimum_dsh_version(app_handle);@@ -225,38 +225,38 @@ mod tests {#[test]fn baseline_gate_accepts_equal_or_newer_versions() {- let baseline = "0.1.5-rc.1";- assert!(meets_baseline("0.1.5-rc.1", baseline));- assert!(meets_baseline("0.1.5-rc.2", baseline));- assert!(meets_baseline("0.1.6-alpha.2", baseline));+ let baseline = "0.1.7-rc.1";+ for version in ["0.1.7-rc.1", "0.1.7-rc.2", "0.1.7", "0.2.1-rc.1"] {+ assert!(meets_baseline(version, baseline), "version={version}");+ }}- /// issue #596:更早的核心(0.1.2-rc.1 / 0.1.0-rc.7)早于内置插件依赖的平台- /// 种子词,内置插件必然加载失败,不再支持。#[test]fn baseline_gate_rejects_older_versions() {- let baseline = "0.1.5-rc.1";- assert!(!meets_baseline("0.1.0-rc.7", baseline));- assert!(!meets_baseline("0.1.2-rc.1", baseline));- assert!(!meets_baseline("0.1.5-alpha.2", baseline));+ let baseline = "0.1.7-rc.1";+ for version in [+ "0.1.0-rc.7",+ "0.1.5-rc.1",+ "0.1.6-alpha.2",+ "0.1.6",+ "0.1.7-alpha.1",+ "0.1.7-beta.1",+ "0.1.7-rc.0",+ ] {+ assert!(!meets_baseline(version, baseline), "version={version}");+ }}- /// 版本不可解析(旧安装记录/异常清单)时不阻断:漏放行只是回到修复前的行为,- /// 误拦截会把可用的本地核心判死。#[test]fn baseline_gate_passes_unparsable_versions() {- assert!(meets_baseline("", "0.1.5-rc.1"));- assert!(meets_baseline("not-a-version", "0.1.5-rc.1"));- assert!(meets_baseline("0.1.0-rc.7", ""));+ assert!(meets_baseline("", "0.1.7-rc.1"));+ assert!(meets_baseline("not-a-version", "0.1.7-rc.1"));+ assert!(meets_baseline("0.1.7-rc.1", ""));}- /// 清单缺失(读不到最低支持基线)时同样放行,避免资源损坏阻断本地核心。#[test]fn missing_baseline_keeps_local_core_usable() {- assert!(core_supports_bundled_plugins("0.1.0-rc.7", None));- assert!(!core_supports_bundled_plugins(- "0.1.0-rc.7",- Some("0.1.5-rc.1")- ));+ assert!(core_supports_bundled_plugins("0.1.6", None));+ assert!(!core_supports_bundled_plugins("0.1.6", Some("0.1.7-rc.1")));}}diff --git a/src-tauri/src/service/core/version.rs b/src-tauri/src/service/core/version.rsindex 225ee7c1..eddb5666 100644--- a/src-tauri/src/service/core/version.rs+++ b/src-tauri/src/service/core/version.rs@@ -465,9 +465,9 @@ pub async fn set_active(app_handle: &AppHandle, id: &str) -> Result<HarnessCore,));}stop_harness_for_core_switch(app_handle).await?;- let mut setting = config::get_store_dat_setting(app_handle);- setting.active_core = Some(CoreSource::Local.as_str().to_string());- config::set_store_dat_setting(app_handle, setting);+ config::update_store_dat_setting(app_handle, |setting| {+ setting.active_core = Some(CoreSource::Local.as_str().to_string());+ });// 映射表记录「该依赖由系统环境满足」(`null`),与清单的 `Path | null` 语义一致。config::dependencies::record(app_handle, config::dependencies::DEP_DSH, None);} else if id == BUNDLED_CORE_ID {@@ -480,22 +480,20 @@ pub async fn set_active(app_handle: &AppHandle, id: &str) -> Result<HarnessCore,return Err("CORE_BUNDLED_NOT_FOUND: bundled core files are missing".to_string());}stop_harness_for_core_switch(app_handle).await?;- let mut setting = config::get_store_dat_setting(app_handle);- setting.active_core = Some(CoreSource::App.as_str().to_string());- // 随包内核没有 pkg tag/commit:必须清掉下载版本留下的记录,否则版本展示与- // 「当前激活」判定仍指着那份已下载的核心。- setting.dsh_pkg_tag = None;- setting.dsh_pkg_commit = None;- config::set_store_dat_setting(app_handle, setting);+ config::update_store_dat_setting(app_handle, |setting| {+ setting.active_core = Some(CoreSource::App.as_str().to_string());+ setting.dsh_pkg_tag = None;+ setting.dsh_pkg_commit = None;+ });config::dependencies::record(app_handle, config::dependencies::DEP_DSH, Some(bundled));} else if id == "app" {if !config::get_dsh_binary_path(app_handle).exists() {return Err("CORE_APP_NOT_FOUND: bundled core is not installed".to_string());}stop_harness_for_core_switch(app_handle).await?;- let mut setting = config::get_store_dat_setting(app_handle);- setting.active_core = Some(CoreSource::App.as_str().to_string());- config::set_store_dat_setting(app_handle, setting);+ config::update_store_dat_setting(app_handle, |setting| {+ setting.active_core = Some(CoreSource::App.as_str().to_string());+ });// 切回预打包核心:托管根重新成为该依赖的安装根。record_managed_core(app_handle);} else if let Some(tag) = id.strip_prefix("app-") {@@ -538,9 +536,9 @@ async fn switch_app_version(app_handle: &AppHandle, tag: &str) -> Result<(), Str// 激活目录已是目标版本(tag 相同)→ 仅切来源标记(如 local → app 同版本)if cur_tag.as_deref() == Some(tag) && config::get_dsh_binary_path(app_handle).is_file() {stop_harness_for_core_switch(app_handle).await?;- let mut setting = config::get_store_dat_setting(app_handle);- setting.active_core = Some(CoreSource::App.as_str().to_string());- config::set_store_dat_setting(app_handle, setting);+ config::update_store_dat_setting(app_handle, |setting| {+ setting.active_core = Some(CoreSource::App.as_str().to_string());+ });return Ok(());}let target_dir = existing_slot_dir(app_handle, tag)@@ -559,13 +557,13 @@ async fn switch_app_version(app_handle: &AppHandle, tag: &str) -> Result<(), StrNone}};- let mut setting = config::get_store_dat_setting(app_handle);- setting.active_core = Some(CoreSource::App.as_str().to_string());- setting.dsh_pkg_tag = Some(tag.to_string());- if let Some(commit) = commit {- setting.dsh_pkg_commit = Some(commit);- }- config::set_store_dat_setting(app_handle, setting);+ config::update_store_dat_setting(app_handle, |setting| {+ setting.active_core = Some(CoreSource::App.as_str().to_string());+ setting.dsh_pkg_tag = Some(tag.to_string());+ if let Some(commit) = commit {+ setting.dsh_pkg_commit = Some(commit);+ }+ });config::dependencies::record(app_handle, config::dependencies::DEP_DSH, Some(target_dir));return Ok(());}@@ -670,13 +668,13 @@ async fn switch_app_version(app_handle: &AppHandle, tag: &str) -> Result<(), StrNone}};- let mut setting = config::get_store_dat_setting(app_handle);- setting.active_core = Some(CoreSource::App.as_str().to_string());- setting.dsh_pkg_tag = Some(tag.to_string());- if let Some(c) = commit {- setting.dsh_pkg_commit = Some(c);- }- config::set_store_dat_setting(app_handle, setting);+ config::update_store_dat_setting(app_handle, |setting| {+ setting.active_core = Some(CoreSource::App.as_str().to_string());+ setting.dsh_pkg_tag = Some(tag.to_string());+ if let Some(commit) = commit {+ setting.dsh_pkg_commit = Some(commit);+ }+ });// 切换后的激活核心回到托管根;映射表随之写回,界面与解析链路保持一致。record_managed_core(app_handle);Ok(())diff --git a/src-tauri/src/service/patch/composer.rs b/src-tauri/src/service/patch/composer.rsindex 6a7a29d4..2aee5d36 100644--- a/src-tauri/src/service/patch/composer.rs+++ b/src-tauri/src/service/patch/composer.rs@@ -37,11 +37,11 @@ const PATCH_MARKER: &str = "dsh-tauri: composer stays usable for a session outsi/// `composer.workspace-less` 能力判据逐字一致,跨语言协议字面量)。const CAPABILITY_ATTRIBUTE: &str = "data-dsh-composer-cwd";-/// 官方 inert 语句(锚点绑定 0.1.5-rc.1 / rc.2 的压缩后源码)。const INERT_ORIGINAL: &str = "const inert = sessionId === void 0 || hero && chipTitle === void 0;";/// 放宽后的语句:会话有 cwd 就不再算 inert。-const INERT_PATCHED: &str = "const inert = sessionId === void 0 || hero && chipTitle === void 0 && cwd === void 0;";+const INERT_PATCHED: &str =+ "const inert = sessionId === void 0 || hero && chipTitle === void 0 && cwd === void 0;";/// 导出锚点的关键字(所在行的前导缩进随版本变化,不做硬编码)。const ANCHOR_KEYWORD: &str = "return module.exports;";@@ -61,11 +61,9 @@ fn patch_source(source: &str) -> PatchOutcome {}let needs_relax = if source.contains(INERT_ORIGINAL) {true- }- else if source.contains(INERT_PATCHED) {+ } else if source.contains(INERT_PATCHED) {false- }- else {+ } else {return PatchOutcome::AnchorMissing;};let Some((line_start, indent)) = locate_return_module_exports(source) else {@@ -90,7 +88,10 @@ fn patch_source(source: &str) -> PatchOutcome {/// 行首到关键字之间必须是纯空白,否则不是锚行(防御上游把该语句挪进表达式里)。fn locate_return_module_exports(source: &str) -> Option<(usize, &str)> {let match_start = source.find(ANCHOR_KEYWORD)?;- let line_start = source[..match_start].rfind('\n').map(|i| i + 1).unwrap_or(0);+ let line_start = source[..match_start]+ .rfind('\n')+ .map(|i| i + 1)+ .unwrap_or(0);let indent = &source[line_start..match_start];if !indent.chars().all(|c| c == '\t' || c == ' ') {return None;@@ -114,9 +115,7 @@ mod tests {/// 官方产物末尾片段(单 tab 缩进,与 renderer 补丁同一形状)。fn fixture() -> String {- format!(- "\t\t\t{INERT_ORIGINAL}\n\t\t\tconst heroWorkspaceRow = 1;\n\t\texports.apply = apply;\n\t\texports.inject = inject;\n\t\treturn module.exports;\n\t}}\n}});\n"- )+ "\t\t\tconst inert = sessionId === void 0 || hero && chipTitle === void 0;\n\t\t\tconst heroWorkspaceRow = 1;\n\t\texports.apply = apply;\n\t\texports.inject = inject;\n\t\treturn module.exports;\n\t}\n});\n".into()}#[test]@@ -166,7 +165,10 @@ mod tests {#[test]fn skips_when_anchor_missing() {- assert_eq!(patch_source("\t\t\tconst inert = 1;\n"), PatchOutcome::AnchorMissing);+ assert_eq!(+ patch_source("\t\t\tconst inert = 1;\n"),+ PatchOutcome::AnchorMissing+ );let no_return = format!("\t\t\t{INERT_ORIGINAL}\n");assert_eq!(patch_source(&no_return), PatchOutcome::AnchorMissing);}diff --git a/src-tauri/src/service/patch/model_selection.rs b/src-tauri/src/service/patch/model_selection.rsindex a9c55f66..93311de6 100644--- a/src-tauri/src/service/patch/model_selection.rs+++ b/src-tauri/src/service/patch/model_selection.rs@@ -32,7 +32,6 @@ use crate::utils::{patch_core_file, patch_dsh, PatchOutcome};/// 幂等/自识别标记:出现在新增守卫行的末尾。const PATCH_MARKER: &str = "dsh-tauri: keep the model menu mounted through a WebKit blur";-/// `onBlur` 里「焦点仍在自身或菜单内则放行」的那条判定(锚点绑定 0.1.6-alpha.2 压缩后源码)。const ONBLUR_ANCHOR: &str = "\t\t\t\tif (event.relatedTarget instanceof Node && (rootRef.current?.contains(event.relatedTarget) === true || menuRef.current?.contains(event.relatedTarget) === true)) return;";/// 补丁后:先放行 `relatedTarget` 缺失的 blur(WebKit 点按钮不给焦点),再保留原判定。@@ -66,9 +65,8 @@ pub fn apply(app_handle: &tauri::AppHandle) -> Result<(), String> {mod tests {use super::*;- /// 0.1.6-alpha.2 产物的真实片段(`onBlur` 三行,含上游缩进)。fn fixture() -> String {- format!("\t\t\tconst onBlur = (event) => {{\n{ONBLUR_ANCHOR}\n\t\t\t\tclose();\n\t\t\t}};\n")+ "\t\t\tconst onBlur = (event) => {\n\t\t\t\tif (event.relatedTarget instanceof Node && (rootRef.current?.contains(event.relatedTarget) === true || menuRef.current?.contains(event.relatedTarget) === true)) return;\n\t\t\t\tclose();\n\t\t\t};\n".into()}#[test]diff --git a/src-tauri/src/service/patch/workspace_view.rs b/src-tauri/src/service/patch/workspace_view.rsindex a2047c30..d2172f6b 100644--- a/src-tauri/src/service/patch/workspace_view.rs+++ b/src-tauri/src/service/patch/workspace_view.rs@@ -1,60 +1,24 @@-//! workspace view 持久化状态补丁:降级核心读到新核心写下的形状时不再崩溃。-//!-//! 现象(0.1.5-rc.1 / 0.1.5-rc.2 一进页面就报-//! `slot entry crashed in 'sidebar.workspaces': TypeError: Cannot convert undefined or null to object`,-//! 工作区列表整条槽渲染失败):核心 0.1.6-alpha.1 起-//! `@deepseek-ai/dsh-client-ui-workspace` 的浏览视图 store 去掉了-//! `sessionUpdatedAtByAccount`,持久化键却仍是同一个 `dsh.workspace.view.v5`。-//! 于是「先跑 0.1.6 + 再切回旧核心」时,旧核心 rehydrate 到的 state 没有该字段,-//! 而 `retainAccountKeys` 直接 `Object.entries(d.sessionUpdatedAtByAccount)` → 必抛;-//! 存储里的形状又不会自愈(每次进入都崩),工作区在旧核心上等于永久不可用。-//!-//! 本补丁只把该 action 里三处 `Object.entries(d.X)` 改成 `Object.entries(d.X ?? {})`-//! ——与上游 0.1.6 的定义对齐(0.1.6 直接删掉这个字段,消费方不再引用)。三处同属-//! 一个 action,任一字段缺失都该退化成空表,所以一起放宽;`?? {}` 对正常路径是 no-op。-//!-//! 目标选择:**活动核心**的 `dsh-client-ui-workspace/lib/client.js`(web 侧由 dsh 的-//! web 服务直接读该文件),读写与幂等判定统一交给 [`crate::utils::patch_dsh`]。-//!-//! 锚点按语句逐条独立判定(issue #762):0.1.7 起上游把第三条 `Object.entries(...)`-//! 换成了 `delete d.sessionUpdatedAtByAccount;`,三行连排的整块锚点随之失配,-//! 前两条的 `?? {}` 保护也跟着静默失效。逐条放宽后,存活几条就放宽几条,-//! 只有三条语句全都不在场(上游整体改写该 action)才判定锚点缺失并安全跳过。-//!-//! 挂点:`service::workflow::launch` 启动 dsh 进程前的补丁链(最佳努力,失败只告警)。-use std::path::Path;use crate::utils::{patch_core_file, patch_dsh, PatchOutcome};-/// 幂等/自识别标记:出现在被改写的三条语句末尾。const PATCH_MARKER: &str = "dsh-tauri: tolerate workspace view state written by a newer core";-/// `retainAccountKeys` 里按账号收敛的三条语句(锚点绑定 rc.1/rc.2 的压缩后源码)。const GROUP_EXPANSION_ORIGINAL: &str ="d.groupExpansion = Object.fromEntries(Object.entries(d.groupExpansion).filter(([key]) => retained.has(key)));";const SESSION_ORDER_ORIGINAL: &str ="d.sessionOrderByAccount = Object.fromEntries(Object.entries(d.sessionOrderByAccount).filter(([key]) => retained.has(key)));";-const SESSION_UPDATED_AT_ORIGINAL: &str =- "d.sessionUpdatedAtByAccount = Object.fromEntries(Object.entries(d.sessionUpdatedAtByAccount).filter(([key]) => retained.has(key)));";const GROUP_EXPANSION_PATCHED: &str ="d.groupExpansion = Object.fromEntries(Object.entries(d.groupExpansion ?? {}).filter(([key]) => retained.has(key))); /* dsh-tauri: tolerate workspace view state written by a newer core */";const SESSION_ORDER_PATCHED: &str ="d.sessionOrderByAccount = Object.fromEntries(Object.entries(d.sessionOrderByAccount ?? {}).filter(([key]) => retained.has(key))); /* dsh-tauri: tolerate workspace view state written by a newer core */";-const SESSION_UPDATED_AT_PATCHED: &str =- "d.sessionUpdatedAtByAccount = Object.fromEntries(Object.entries(d.sessionUpdatedAtByAccount ?? {}).filter(([key]) => retained.has(key))); /* dsh-tauri: tolerate workspace view state written by a newer core */";-/// 相对活动核心安装目录的 workspace 客户端 `lib/client.js` 包内路径。-const WORKSPACE_CLIENT_JS: &str =- "node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js";+const WORKSPACE_CLIENT_JS: &str = "node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js";-/// 逐条锚点(原写法 → 放宽写法)。独立判定、独立替换:上游只要还留着其中一条,-/// 这条的 `?? {}` 保护就必须生效,不被其它条目的增删连坐。-const RETENTION_STATEMENTS: [(&str, &str); 3] = [+const RETENTION_STATEMENTS: [(&str, &str); 2] = [(GROUP_EXPANSION_ORIGINAL, GROUP_EXPANSION_PATCHED),(SESSION_ORDER_ORIGINAL, SESSION_ORDER_PATCHED),- (SESSION_UPDATED_AT_ORIGINAL, SESSION_UPDATED_AT_PATCHED),];fn patch_source(source: &str) -> PatchOutcome {@@ -75,9 +39,6 @@ fn patch_source(source: &str) -> PatchOutcome {PatchOutcome::Patched(patched)}-/// 对活动核心的 dsh-client-ui-workspace `lib/client.js` 应用补丁(幂等)。-/// 返回 Err 表示读/写失败;文件缺失、已打过、锚点变更均静默跳过(Ok)。-/// 对显式给定的核心安装目录施加本补丁(E2E 编排复用,无需运行中的桌面端)。pub fn apply_at(core_dir: &Path) -> Result<(), String> {patch_core_file(core_dir, WORKSPACE_CLIENT_JS, patch_source)}@@ -89,69 +50,61 @@ pub fn apply(app_handle: &tauri::AppHandle) -> Result<(), String> {mod tests {use super::*;- /// rc.1/rc.2 产物的真实片段(`retainAccountKeys` 三连,含上游缩进)。- fn fixture() -> String {- format!(- "\t\t\t\t\tretainAccountKeys: (d, workspaceKeys) => {{\n\t\t\t\t\t\tconst retained = new Set(workspaceKeys);\n\t\t\t\t\t\t{GROUP_EXPANSION_ORIGINAL}\n\t\t\t\t\t\t{SESSION_ORDER_ORIGINAL}\n\t\t\t\t\t\t{SESSION_UPDATED_AT_ORIGINAL}\n\t\t\t\t\t}},\n"- )- }-- #[test]- fn relaxes_all_three_retained_keys() {- let PatchOutcome::Patched(patched) = patch_source(&fixture()) else {- panic!("expected patched source");- };- assert!(patched.contains("Object.entries(d.groupExpansion ?? {})"));- assert!(patched.contains("Object.entries(d.sessionOrderByAccount ?? {})"));- assert!(patched.contains("Object.entries(d.sessionUpdatedAtByAccount ?? {})"));- assert!(!patched.contains("Object.entries(d.sessionUpdatedAtByAccount).filter"));- // 补丁只放宽取值,收敛逻辑本身(filter + fromEntries)保持不变。- assert_eq!(patched.matches("filter(([key]) => retained.has(key)))").count(), 3);- }-- /// 0.1.7 起上游把第三条换成 `delete d.sessionUpdatedAtByAccount;`(issue #762 现场)。- fn fixture_after_delete() -> String {- format!(- "\t\t\t\t\tretainAccountKeys: (d, workspaceKeys) => {{\n\t\t\t\t\t\tconst retained = new Set(workspaceKeys);\n\t\t\t\t\t\t{GROUP_EXPANSION_ORIGINAL}\n\t\t\t\t\t\t{SESSION_ORDER_ORIGINAL}\n\t\t\t\t\t\tdelete d.sessionUpdatedAtByAccount;\n\t\t\t\t\t}},\n"- )- }+ const FIXTURE: &str = "retainAccountKeys: (d, workspaceKeys) => {\n const retained = new Set(workspaceKeys);\n d.groupExpansion = Object.fromEntries(Object.entries(d.groupExpansion).filter(([key]) => retained.has(key)));\n d.sessionOrderByAccount = Object.fromEntries(Object.entries(d.sessionOrderByAccount).filter(([key]) => retained.has(key)));\n delete d.sessionUpdatedAtByAccount;\n},\n";#[test]- fn relaxes_surviving_keys_after_upstream_switched_to_delete() {- let PatchOutcome::Patched(patched) = patch_source(&fixture_after_delete()) else {+ fn relaxes_retained_keys_and_preserves_deleted_state() {+ let PatchOutcome::Patched(patched) = patch_source(FIXTURE) else {panic!("expected patched source");};assert!(patched.contains("Object.entries(d.groupExpansion ?? {})"));assert!(patched.contains("Object.entries(d.sessionOrderByAccount ?? {})"));assert!(patched.contains("delete d.sessionUpdatedAtByAccount;"));+ assert_eq!(+ patched+ .matches("filter(([key]) => retained.has(key)))")+ .count(),+ 2+ );assert_eq!(patched.matches(PATCH_MARKER).count(), 2);}#[test]- fn patch_is_idempotent() {- for layout in [fixture(), fixture_after_delete()] {- let PatchOutcome::Patched(patched) = patch_source(&layout) else {+ fn patches_each_supported_statement_independently() {+ for statement in [+ "d.groupExpansion = Object.fromEntries(Object.entries(d.groupExpansion).filter(([key]) => retained.has(key)));",+ "d.sessionOrderByAccount = Object.fromEntries(Object.entries(d.sessionOrderByAccount).filter(([key]) => retained.has(key)));",+ ] {+ let PatchOutcome::Patched(patched) = patch_source(statement) else {panic!("expected Patched");};- assert_eq!(patch_source(&patched), PatchOutcome::AlreadyPatched);+ assert_eq!(patched.matches(" ?? {}").count(), 1);+ assert_eq!(patched.matches(PATCH_MARKER).count(), 1);}}+ #[test]+ fn patch_is_idempotent() {+ let PatchOutcome::Patched(patched) = patch_source(FIXTURE) else {+ panic!("expected Patched");+ };+ assert_eq!(patch_source(&patched), PatchOutcome::AlreadyPatched);+ }+#[test]fn skips_when_retention_statements_are_gone() {- // 上游整体改写该 action:三条语句全不在,不能凭残缺片段猜着改。- let rewritten =- "\t\t\t\t\tretainAccountKeys: (d) => {\n\t\t\t\t\t\tdelete d.groupExpansion;\n\t\t\t\t\t},\n";+ let rewritten = "retainAccountKeys: (d) => { delete d.groupExpansion; },";assert_eq!(patch_source(rewritten), PatchOutcome::AnchorMissing);}#[test]fn leaves_lookalike_from_entries_untouched() {let lookalike = "d.sessionOrderByAccount = Object.fromEntries(Object.entries(source.members).map(([key, members]) => {";- let source = format!("{}{lookalike}", fixture());+ let source = format!("{FIXTURE}{lookalike}");let PatchOutcome::Patched(patched) = patch_source(&source) else {panic!("expected Patched");};+ assert!(patched.ends_with(lookalike));assert!(!patched.contains("Object.entries(source.members ?? {})"));}}diff --git a/src-tauri/src/service/plugin/compat.rs b/src-tauri/src/service/plugin/compat.rsindex 3fd20b57..f352c7ce 100644--- a/src-tauri/src/service/plugin/compat.rs+++ b/src-tauri/src/service/plugin/compat.rs@@ -209,7 +209,10 @@ mod tests {assert_eq!(range_matches(">>>1.0.0", "0.2.0"), None);assert_eq!(range_matches("", "0.2.0"), None);assert_eq!(range_matches("^1.0.0", "not-a-version"), None);- assert_eq!(evaluate(&peers(&[("@deepseek-ai/dsh", "garbage")]), "0.2.0"), Some(true));+ assert_eq!(+ evaluate(&peers(&[("@deepseek-ai/dsh", "garbage")]), "0.2.0"),+ Some(true)+ );}#[test]@@ -235,9 +238,18 @@ mod tests {});let merged = peers_from_manifest(&manifest);assert_eq!(merged.len(), 3);- assert_eq!(merged.get("@deepseek-ai/dsh-llm").map(String::as_str), Some("^0.1.7-rc.1"));- assert_eq!(merged.get("@deepseek-ai/dsh-fs").map(String::as_str), Some("^0.1.0"));- assert_eq!(merged.get("@deepseek-ai/dsh").map(String::as_str), Some("^0.2.0"));+ assert_eq!(+ merged.get("@deepseek-ai/dsh-llm").map(String::as_str),+ Some("^0.1.7-rc.1")+ );+ assert_eq!(+ merged.get("@deepseek-ai/dsh-fs").map(String::as_str),+ Some("^0.1.0")+ );+ assert_eq!(+ merged.get("@deepseek-ai/dsh").map(String::as_str),+ Some("^0.2.0")+ );assert!(!merged.contains_key("dshmarket"));assert!(!merged.contains_key("@deepseek-ai/other"));assert!(is_dsh_package("@deepseek-ai/dsh"));diff --git a/src-tauri/src/service/plugin/install/mod.rs b/src-tauri/src/service/plugin/install/mod.rsindex d4673f1f..2984ffba 100644--- a/src-tauri/src/service/plugin/install/mod.rs+++ b/src-tauri/src/service/plugin/install/mod.rs@@ -90,7 +90,7 @@ use diagnose::{use pnpm::ensure_pnpm;use single::single_plugin_args;pub(crate) use spec::local_spec_from_path;-use spec::{bundled_dir_of, normalize_git_spec, preset_spec_for_install, spec_argument};+use spec::{bundled_dir_of, normalize_git_spec, preset_spec_for_install};/// 允许构建重试的上限。每次重试解决 pnpm 报出的一个允许键(git depPath 或/// 传递构建包名),多个 git 插件 / 多个原生依赖各占一次,上限封顶防死循环。@@ -180,15 +180,6 @@ pub async fn install_specs(app_handle: &AppHandle, specs: &[String]) -> Result<(/// 缺陷(pnpm issue #3948 / #7243 / #13276):公开仓库一旦落进 git+ssh,在没有/// SSH 配置的桌面机上必然 `Host key verification failed` / `Permission denied/// (publickey)`。-///-/// 最后按活动核心决定是否为含空格的 spec 加内嵌双引号:0.1.6-alpha.2 起 dsh CLI-/// 改用 execa 以 argv 数组启动 pnpm,参数不再经 shell 拼接,预加引号只会让 pnpm-/// 收到带字面引号的 spec(issue #647);更早的核心在 win32 用 `shell:true` 把参数-/// 拼成命令行(Node 只拼接、不转义,DEP0190),含空格的内置插件路径-/// (`link:<应用安装目录>`)不预加引号就会被切碎成多个 spec,pnpm 报-/// `ERR_PNPM_SPEC_NOT_SUPPORTED`、启动自愈每轮重装(死循环)。两种形态落盘-/// `package.json` 的值都是不带引号的 `link:<路径>`,与内核对账的 `expected`-/// (bundled_dep_spec)一致(见 [`spec_argument`])。fn preset_targets(app_handle: &AppHandle, ids: &[String]) -> Result<Vec<InstallTarget>, String> {if ids.is_empty() {return Err("PREINSTALL_EMPTY: no plugins selected".to_string());@@ -213,7 +204,7 @@ fn preset_targets(app_handle: &AppHandle, ids: &[String]) -> Result<Vec<InstallTtargets.push(InstallTarget {id: preset.id.clone(),name: Some(installed_name(preset).to_string()),- spec: spec_argument(&raw, core_version.as_deref()),+ spec: raw,});}Ok(targets)@@ -260,7 +251,7 @@ fn spec_targets(app_handle: &AppHandle, specs: &[String]) -> Result<Vec<InstallTtargets.push(InstallTarget {id: preset.id.clone(),name: Some(installed_name(preset).to_string()),- spec: spec_argument(&normalize_git_spec(&raw), core_version.as_deref()),+ spec: normalize_git_spec(&raw),});continue;}@@ -270,7 +261,7 @@ fn spec_targets(app_handle: &AppHandle, specs: &[String]) -> Result<Vec<InstallTtargets.push(InstallTarget {id: name.clone().unwrap_or_else(|| raw.clone()),name,- spec: spec_argument(&raw, core_version.as_deref()),+ spec: raw,});}Ok(targets)diff --git a/src-tauri/src/service/plugin/install/spec.rs b/src-tauri/src/service/plugin/install/spec.rsindex 7a6f6a35..a725422c 100644--- a/src-tauri/src/service/plugin/install/spec.rs+++ b/src-tauri/src/service/plugin/install/spec.rs@@ -1,7 +1,3 @@-//! 安装 spec 准备:本地目录 spec 的判定与规范化(统一改写成 `link:` 绝对路径)、-//! 内置插件捆绑目录解析、GitHub 简写规范化(绕开 pnpm 的 HTTPS→SSH 回退缺陷)-//! 与 Windows 下含空格 spec 的引号化(dsh CLI 只在 win32 用 shell 拼接参数)。-use std::path::{Path, PathBuf};use tauri::AppHandle;@@ -278,65 +274,6 @@ pub(super) fn normalize_git_spec(spec: &str) -> String {url}-/// `dsh plugin` 仍把 pnpm 参数拼进 shell 的最后一个核心版本(开区间上界)。-///-/// 该版本起 `dsh plugin` 改经 `@deepseek-ai/dsh-plugin-manager`、用 execa 以-/// **argv 数组**启动 pnpm,并在 Windows 上自行按 cmd 规则转义参数-/// (`arguments/command-file.js`),spec 因此必须原样透传。-const SHELL_JOINED_PNPM_CLI_BELOW: &str = "0.1.6-alpha.2";--/// 活动核心的 `dsh plugin` 是否把 pnpm 参数拼成命令行交给 shell。-///-/// - `< 0.1.6-alpha.2`(0.1.5-rc.2 / 0.1.6-alpha.1 等):JS 里-/// `spawnSync("pnpm", args, { shell: process.platform === "win32" })`,Node 对-/// `shell:true` 只按空格拼接、不做引号转义(DEP0190),含空格的 spec 不预加引号-/// 就会被切碎成多个 spec。-/// - `>= 0.1.6-alpha.2`:参数作为单个 argv 直达 pnpm,spec 里的字面 `"` 会被当成-/// 包名的一部分 → `ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER`(issue #647)。-///-/// 版本读不到 / 解析失败时按新核心处理:预加引号对新核心是**必然失败**,不预加-/// 引号只在「老核心 + 含空格安装路径」这一组合下失败。-pub(super) fn joins_pnpm_args_in_shell(core_version: Option<&str>) -> bool {- let Ok(threshold) = semver::Version::parse(SHELL_JOINED_PNPM_CLI_BELOW) else {- return false;- };- core_version- .and_then(|version| semver::Version::parse(version).ok())- .is_some_and(|actual| actual < threshold)-}--/// 给含空白字符的依赖 spec 加内嵌双引号,使其在 shell 拼接后仍保持单一 token。-///-/// 只对「把参数拼进 shell 的老核心」且「Windows」成立:老核心在 win32 用-/// `shell:true` 启动 pnpm,内置插件的 `link:<应用安装目录>` 一旦含空格就会被切碎-/// (pnpm 报 `ERR_PNPM_SPEC_NOT_SUPPORTED`),包一层双引号让 cmd 把整条 spec 视为-/// 单一 token;pnpm 解析后自行剥离引号,落盘 `package.json` 的值仍是不带引号的-/// `link:<路径>`(与 [`bundled_dep_spec`] 的内核对账一致)。-///-/// 新核心与 macOS / Linux(老核心在 mac 上也是 `shell:false`)都是 argv 数组直达-/// pnpm、空格天然保留,加引号反而把字面 `"` 当成包名的一部分传给 pnpm → 非法-/// spec → exit 1,这是 issue #104 的根因(内置插件指向 `/Applications/Deepseek-/// Harness Desktop.app/...`)。因此调用方必须经 [`spec_argument`] 按核心版本决定。-pub(super) fn shell_quote_spec(spec: &str) -> String {- #[cfg(windows)]- {- if spec.chars().any(|c| c == ' ' || c == '\t') {- return format!("\"{spec}\"");- }- }- spec.to_string()-}--/// 传给 `dsh plugin add` 的最终参数:只有把参数拼进 shell 的老核心才预加引号-/// (见 [`joins_pnpm_args_in_shell`] 与 [`shell_quote_spec`])。-pub(super) fn spec_argument(spec: &str, core_version: Option<&str>) -> String {- if joins_pnpm_args_in_shell(core_version) {- shell_quote_spec(spec)- } else {- spec.to_string()- }-}-#[cfg(test)]mod tests {use super::*;@@ -378,27 +315,25 @@ mod tests {#[test]fn install_spec_pins_recommended_range_for_current_core() {- // 清单矩阵声明的该代推荐区间必须钉进 spec:裸包名会让 pnpm 装 latest- // (核心 0.1.7-rc.1 该装 ^0.21.1,registry 的 latest 却还是 0.19.x)let mut p = preset("dsh-better-sidebar", "dsh-better-sidebar", false);p.version = Some(PluginVersion::Matrix(vec![- VersionPair {- version: "^0.19.1".into(),- dsh: "^0.1.5-rc.1".into(),- },VersionPair {version: "^0.21.1".into(),dsh: "^0.1.7-rc.1".into(),},+ VersionPair {+ version: "^0.22.0".into(),+ dsh: "^0.2.1-rc.1".into(),+ },]));- assert_eq!(- preset_spec_for_install(&p, None, Some("0.1.5-rc.3")).unwrap(),- "dsh-better-sidebar@^0.19.1"- );assert_eq!(preset_spec_for_install(&p, None, Some("0.1.7-rc.1")).unwrap(),"dsh-better-sidebar@^0.21.1");+ assert_eq!(+ preset_spec_for_install(&p, None, Some("0.2.1-rc.1")).unwrap(),+ "dsh-better-sidebar@^0.22.0"+ );// scope 包名同样支持;核心没有任何命中区间时退回裸 speclet mut scoped = preset("@xmanrui/dsh-im", "@xmanrui/dsh-im", false);scoped.version = p.version.clone();@@ -418,7 +353,12 @@ mod tests {// issue #715:清单区间本身就带 `^`,拼接只能再加一个 `@`——出现 `^^` 会让 pnpm// 报 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER,而预设插件共用同一条 `add`// 调用,一个坏 spec 就让整批预设都装不上(应用卡在加载中,见 issue #716)。- for core in ["0.1.5-rc.3", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0"] {+ for core in [+ "0.1.7-rc.1",+ "0.1.7-rc.2",+ "0.2.1-rc.1",+ "0.3.0",+ ] {let spec = preset_spec_for_install(&p, None, Some(core)).unwrap();assert!(!spec.contains("^^"), "core={core}: {spec}");}@@ -430,24 +370,24 @@ mod tests {let mut git = preset("probe", "git+https://github.com/o/r.git", false);git.version = Some(PluginVersion::Matrix(vec![VersionPair {version: "^1.2.0".into(),- dsh: "^0.1.5-rc.1".into(),+ dsh: "^0.1.7-rc.1".into(),}]));assert_eq!(- preset_spec_for_install(&git, None, Some("0.1.6")).unwrap(),+ preset_spec_for_install(&git, None, Some("0.1.7-rc.1")).unwrap(),"git+https://github.com/o/r.git");let mut versioned = preset("probe", "[email protected]", false);versioned.version = git.version.clone();assert_eq!(- preset_spec_for_install(&versioned, None, Some("0.1.6")).unwrap(),+ preset_spec_for_install(&versioned, None, Some("0.1.7-rc.1")).unwrap(),);let mut link = preset("probe", "link:C:/deps/probe", false);link.version = git.version.clone();assert_eq!(- preset_spec_for_install(&link, None, Some("0.1.6")).unwrap(),+ preset_spec_for_install(&link, None, Some("0.1.7-rc.1")).unwrap(),"link:C:/deps/probe");}@@ -482,6 +422,32 @@ mod tests {);}+ #[test]+ fn install_spec_keeps_space_paths_bare_for_supported_cores() {+ let preset = preset("dsh-tauri", "dsh-tauri", true);+ for core in [+ Some("0.1.7-rc.1"),+ Some("0.2.1-rc.1"),+ None,+ ] {+ for (path, expected) in [+ (+ "C:/Program Files/DeepSeek Harness Desktop/resources/node_modules/dsh-tauri",+ "link:C:/Program Files/DeepSeek Harness Desktop/resources/node_modules/dsh-tauri",+ ),+ (+ "/Applications/DeepSeek Harness Desktop.app/Contents/Resources/resources/node_modules/dsh-tauri",+ "link:/Applications/DeepSeek Harness Desktop.app/Contents/Resources/resources/node_modules/dsh-tauri",+ ),+ ] {+ assert_eq!(+ preset_spec_for_install(&preset, Some(PathBuf::from(path)), core).unwrap(),+ expected+ );+ }+ }+ }+#[test]fn install_spec_errors_when_internal_bundle_missing() {// 内置插件捆绑目录缺失:发布缺陷,显式报错而非静默走 npm/git spec@@ -548,84 +514,6 @@ mod tests {);}- // ---- spec 引号化(仅老核心 + Windows:dsh CLI 只在 win32 用 shell 拼接参数)------ #[cfg(windows)]- #[test]- fn shell_quote_quotes_spec_containing_spaces() {- // 安装目录含空格(如 G:\Deepseek Harness Desktop):整条 spec 加双引号,- // 使 dsh CLI 的 shell:true 拼接后仍被 shell 视为单一 token(DEP0190:- // Node 对 shell:true 只拼接不转义)- assert_eq!(- shell_quote_spec(- "link:G:/Deepseek Harness Desktop/resources/internal-plugins/dsh-tauri"- ),- "\"link:G:/Deepseek Harness Desktop/resources/internal-plugins/dsh-tauri\""- );- // 制表符同样触发- assert_eq!(shell_quote_spec("link:C:/x\ty"), "\"link:C:/x\ty\"");- }-- #[cfg(not(windows))]- #[test]- fn shell_quote_leaves_space_path_untouched_on_non_windows() {- // 回归(issue #104):macOS/Linux 上 dsh CLI 直接 spawnSync(shell:false),- // spec 作为一个 argv 传递、空格天然保留,绝不能加引号——字面 `"` 会成为- // 包名的一部分,pnpm 报非法 spec → exit 1 → 内置插件每次启动重装都失败。- assert_eq!(- shell_quote_spec("link:/Applications/Deepseek Harness Desktop.app/Contents/Resources/resources/internal-plugins/dsh-tauri-ui"),- "link:/Applications/Deepseek Harness Desktop.app/Contents/Resources/resources/internal-plugins/dsh-tauri-ui"- );- assert_eq!(- shell_quote_spec("link:/Users/me/my plugins/dsh-tauri"),- "link:/Users/me/my plugins/dsh-tauri"- );- }-- #[test]- fn shell_quote_leaves_space_free_spec_untouched() {- // 普通 npm 包名 / git HTTPS spec 无空格:原样透传,不引入多余引号- assert_eq!(shell_quote_spec("dshmarket"), "dshmarket");- assert_eq!(- shell_quote_spec("git+https://github.com/omdsh-dev/DSH-better-sidebar.git#next"),- "git+https://github.com/omdsh-dev/DSH-better-sidebar.git#next"- );- // 无空格的内置插件路径同样不被改动(保持与 internal.rs expected 一致)- assert_eq!(- shell_quote_spec("link:C:/Apps/dsh/resources/internal-plugins/dsh-tauri"),- "link:C:/Apps/dsh/resources/internal-plugins/dsh-tauri"- );- }-- #[cfg(windows)]- #[test]- fn shell_quote_preserves_link_prefix_semantics() {- // 引号只包 path 部分也不影响 pnpm 解析(落盘值仍为不带引号的 link: 规范形)- let quoted = shell_quote_spec(- "link:G:/Deepseek Harness Desktop/resources/internal-plugins/dsh-tauri",- );- assert!(quoted.starts_with('"'));- assert!(quoted.ends_with('"'));- assert!(quoted.contains("Deepseek Harness Desktop"));- }-- // ---- 引号化随核心版本(issue #647:0.1.6-alpha.2 起 pnpm 由 argv 数组启动)------ #[test]- fn shell_join_gate_boundary_versions() {- // 0.1.6-alpha.1 仍是 spawnSync + shell:true(首个 argv 数组版是 alpha.2)- assert!(joins_pnpm_args_in_shell(Some("0.1.5-rc.2")));- assert!(joins_pnpm_args_in_shell(Some("0.1.6-alpha.1")));- assert!(!joins_pnpm_args_in_shell(Some("0.1.6-alpha.2")));- assert!(!joins_pnpm_args_in_shell(Some("0.1.6")));- assert!(!joins_pnpm_args_in_shell(Some("0.1.7")));- assert!(!joins_pnpm_args_in_shell(Some("1.0.0")));- // 版本未知 / 非法:按新核心处理(预加引号对新核心必然失败)- assert!(!joins_pnpm_args_in_shell(None));- assert!(!joins_pnpm_args_in_shell(Some("")));- assert!(!joins_pnpm_args_in_shell(Some("not-a-version")));- }-// ---- 本地目录 spec(issue 需求的本地安装链路)----/// 造一个真实存在的本地插件目录:本地 spec 必须走 canonicalize,只有真实路径@@ -819,41 +707,4 @@ mod tests {assert_eq!(forward_slashes(Path::new("D:/a/b/")), "D:/a/b");assert_eq!(forward_slashes(Path::new("D:\\a")), "D:/a");}-- #[test]- fn spec_argument_keeps_space_spec_bare_for_argv_cores() {- // issue #647:0.1.6-alpha.2 起 spec 作为单个 argv 直达 pnpm,Windows 上的- // cmd 转义由 CLI 自己完成,预加引号会让 pnpm 收到带字面引号的 spec- let spec = "link:D:/Deepseek Harness Desktop/resources/node_modules/dsh-tauri";- assert_eq!(spec_argument(spec, Some("0.1.6-alpha.2")), spec);- assert_eq!(spec_argument(spec, None), spec);- assert_eq!(spec_argument(spec, Some("not-a-version")), spec);- // 无空格 spec 与版本无关,始终原样透传- assert_eq!(spec_argument("dshmarket", Some("0.1.5-rc.2")), "dshmarket");- }-- #[cfg(windows)]- #[test]- fn spec_argument_quotes_space_spec_for_shell_joining_cores() {- // 回归:老核心把参数拼进 cmd,含空格的安装路径必须预加引号才不被切碎- let spec = "link:G:/Deepseek Harness Desktop/resources/internal-plugins/dsh-tauri";- assert_eq!(- spec_argument(spec, Some("0.1.5-rc.2")),- format!("\"{spec}\"")- );- assert_eq!(- spec_argument(spec, Some("0.1.6-alpha.1")),- format!("\"{spec}\"")- );- }-- #[cfg(not(windows))]- #[test]- fn spec_argument_never_quotes_on_non_windows() {- // issue #104:macOS/Linux 上 dsh 直接 spawnSync(shell:false),spec 作为- // 单个 argv 传递、空格天然保留,老核心也不得加引号- let spec = "link:/Users/me/my plugins/dsh-tauri";- assert_eq!(spec_argument(spec, Some("0.1.5-rc.2")), spec);- assert_eq!(spec_argument(spec, Some("0.1.6-alpha.2")), spec);- }}diff --git a/src-tauri/src/service/plugin/mod.rs b/src-tauri/src/service/plugin/mod.rsindex 19786ee6..5200568b 100644--- a/src-tauri/src/service/plugin/mod.rs+++ b/src-tauri/src/service/plugin/mod.rs@@ -1,4 +1,4 @@-//! 预装插件:首次启动引导安装官方推荐插件(当前为 DSH Market)。+//! 预装插件:首次启动引导安装预设清单中的社区插件。//!//! 安装通过 `dsh plugin --profile <当前档案> add <pkg>` 完成:该子命令是 pnpm//! 转发器,会在 `$DSH_HOME/profiles/<当前档案>` 初始化 profile 并执行 `pnpm add`,diff --git a/src-tauri/src/service/plugin/patch_entries.rs b/src-tauri/src/service/plugin/patch_entries.rsindex 0dfaca0f..082a7c28 100644--- a/src-tauri/src/service/plugin/patch_entries.rs+++ b/src-tauri/src/service/plugin/patch_entries.rs@@ -15,12 +15,6 @@//! 条目一定会被 import。顶层带 `id` 的 insert 只在目标 group 存在时才生效//! (上游 `applyEntryPatches` 找不到目标只 warn 后跳过),是否需要该 group 取决于//! 组合后的树,桌面端不做猜测——这类只记 debug 日志,绝不阻断启动。-//!-//! 解析规则与 loader 一致:条目 `name` 是裸包名时按 Node 的 `node_modules` 查找-//! 顺序从档案目录逐级向上解析;`dsh` 安装树自身的依赖由 dsh 启动时的-//! `$DSH_HOME/profiles/node_modules` 回退镜像提供,同样算可解析(宁可漏报,绝不-//! 因为猜错而拦下一个本来能起来的启动)。路径 / `file:` URL 形式的 `name` 由-//! 上游改写,不做判定。use std::collections::HashMap;use std::path::Path;@@ -34,9 +28,6 @@ use super::patch_guard::{backup_path, now_stamp, patch_layer_paths};/// 启动失败错误串的前缀;前端据此识别并渲染「移除悬空条目」入口。pub(crate) const PATCH_ENTRY_UNRESOLVED: &str = "PATCH_LAYER_ENTRY_UNRESOLVED";-/// 档案本地模块回退目录(与 dsh-app-boot 的 `PROFILE_MODULE_FALLBACK_DIR` 同名)。-const PROFILE_MODULE_FALLBACK_DIR: &str = ".dsh-module-fallback";-/// 补丁层里一个解析不到对应包的 `insert` 条目。#[derive(Debug, Clone, serde::Serialize)]pub struct UnresolvedPatchEntry {@@ -299,21 +290,9 @@ fn is_bare_package_name(name: &str) -> bool {}}-/// 包是否能被 loader 解析:档案目录的 Node 查找顺序、档案本地回退目录、-/// dsh 安装树(安装依赖由 dsh 启动时的 `profiles/node_modules` 回退镜像提供)。fn package_resolvable(profile_dir: &Path, install_anchor: Option<&Path>, name: &str) -> bool {- if resolvable_from(profile_dir, name) {- return true;- }- if install_anchor.is_some_and(|anchor| resolvable_from(anchor, name)) {- return true;- }- profile_dir- .join(PROFILE_MODULE_FALLBACK_DIR)- .join("node_modules")- .join(name)- .join("package.json")- .is_file()+ resolvable_from(profile_dir, name)+ || install_anchor.is_some_and(|anchor| resolvable_from(anchor, name))}/// 按 Node 的 `node_modules` 查找顺序(逐级向上的父目录)判定包是否存在。@@ -502,6 +481,43 @@ mod tests {let _ = std::fs::remove_dir_all(&home);}+ #[test]+ fn retired_profile_projection_does_not_resolve_dangling_insert() {+ let root = tempfile::tempdir().unwrap();+ let profile = root.path().join("profiles/web");+ let home = root.path().join("home");+ std::fs::create_dir_all(&profile).unwrap();+ std::fs::create_dir_all(&home).unwrap();+ let retired = profile.join(".dsh-module-fallback");+ install_package(&retired, "dsh-file-edit");+ std::fs::write(profile.join("cordis.patch.yml"), DANGLING_LAYER).unwrap();++ let entries = scan_unresolved_entries_in(&profile, &home, None);+ assert_eq!(entries.len(), 1);+ assert_eq!(entries[0].name, "dsh-file-edit");+ assert_eq!(entries[0].line, 3);+ assert!(!entries[0].declared);++ let report = strip_unresolved_entries_in(&profile, &home, None).unwrap();+ assert_eq!(report.layers.len(), 1);+ assert_eq!(report.layers[0].removed, 1);+ assert_eq!(+ std::fs::read_to_string(&report.layers[0].backup).unwrap(),+ "- insert:\n - id: file-edit\n name: dsh-file-edit\n"+ );+ assert_eq!(+ std::fs::read_to_string(profile.join("cordis.patch.yml"))+ .unwrap()+ .trim(),+ "[]"+ );+ assert_eq!(+ std::fs::read_to_string(retired.join("node_modules/dsh-file-edit/package.json"))+ .unwrap(),+ "{}\n"+ );+ }+#[test]fn installed_package_is_not_reported() {let profile = tmp_dir("installed-profile");@@ -514,8 +530,6 @@ mod tests {let _ = std::fs::remove_dir_all(&home);}- /// 父目录里的 `node_modules` 同样算可解析(`$DSH_HOME/profiles/node_modules`- /// 回退镜像就是这一层),否则会把核心包误判成悬空。#[test]fn ancestor_node_modules_counts_as_resolvable() {let root = tmp_dir("ancestor-root");@@ -601,7 +615,6 @@ mod tests {let _ = std::fs::remove_dir_all(&home);}- /// 安装树自带的包(由 dsh 的 `profiles/node_modules` 回退镜像提供)不阻断启动。#[test]fn installation_anchor_makes_a_package_resolvable() {let install = tmp_dir("install-anchor");diff --git a/src-tauri/src/service/workflow/launch.rs b/src-tauri/src/service/workflow/launch.rsindex 8f266d32..0173b22a 100644--- a/src-tauri/src/service/workflow/launch.rs+++ b/src-tauri/src/service/workflow/launch.rs@@ -746,12 +746,6 @@ pub async fn launch(app_handle: tauri::AppHandle) -> Result<(), String> {if let Err(e) = crate::service::patch::workspace::apply(&app_handle) {log::warn!("workspace worktree membership patch failed: {e}");}- // 0.1.6-alpha.1 起 dsh-client-ui-workspace 的浏览视图 store 去掉了- // `sessionUpdatedAtByAccount`(persist key 仍是 dsh.workspace.view.v5):先跑过新核心- // 再切回 0.1.5-rc.1 / rc.2 时,旧核心的 retainAccountKeys 会- // Object.entries(undefined) 抛错,sidebar.workspaces 整条槽崩掉且不会自愈。- // 补丁把该 action 的取值放宽为 `?? {}`,逐条独立判定:0.1.7 起上游第三条改成了- // `delete`,前两条的放宽仍然生效;只有该 action 被整体改写才安全跳过。if let Err(e) = crate::service::patch::workspace_view::apply(&app_handle) {log::warn!("workspace view state patch failed: {e}");}@@ -1012,10 +1006,6 @@ pub(super) async fn launch_prepared(.map_err(|e| format!("LOG_DIR_MKDIR_FAILED: create log dir failed: {e}"))?;rotate_service_log(&log_path, 3);- // `dsh web` 默认在系统浏览器打开 UI;桌面端内嵌 WebView,不需要浏览器,- // 追加 `--no-open` 关闭。该标志自 0.1.0-rc.8 起提供,全部受支持核心(≥- // 0.1.5-rc.1)均已具备,无需按版本判定。-// 补丁层悬空 insert 预检:手写的 `insert` 条目在包被卸载(市场会拒绝卸载// 「仍被用户补丁引用」的插件,用户于是改走手工删依赖 / pnpm remove)或本地// `link:` 源被删后仍留在补丁层里,loader 会在 import 时抛 ERR_MODULE_NOT_FOUND,diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.jsonindex 3b1952ab..c6c6a508 100644--- a/src/i18n/locales/en-US.json+++ b/src/i18n/locales/en-US.json@@ -417,8 +417,6 @@"core.switch_confirm_desc": "Switch to the {{version}} version? The running engine will change to this copy.","core.recommended_warning_title": "Warning","core.recommended_warning_desc": "The current recommended version is “{{version}}”. Switching to this version may cause software errors. Continue switching?",- "core.above_rc2_warning_title": "Warning",- "core.above_rc2_warning_desc": "Versions above {{version}} contain breaking changes that may cause third-party plugin errors. Confirm the update? You can switch back to {{version}} in the core at any time.","core.activate_toast": "Switched to {{version}}","core.uninstalled_toast": "Uninstalled {{version}}","core.remove_confirm_title": "Uninstall version",@@ -428,7 +426,10 @@"core.preview": "Preview","core.incompatible_title": "Incompatible versions ({{count}})","core.update_local": "Update Local Core",+ "core.update_local_requires_app": "Switch to a managed core before updating",+ "core.update_local_requires_app_hint": "The package manager chooses the target version. Switch to a downloaded managed core first, update, then switch back manually and choose a matching profile.","core.updated_toast": "Local core updated: {{version}}",+ "core.updated_switch_back_hint": "The desktop will keep using the current managed core. Switch back to the local core manually and choose a matching profile when prompted.","core.update_failed": "Failed to update the local core","core.switch_restart_hint": "Core switched — restarting the service…","core.switch_failed": "Failed to switch the core",diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.jsonindex 4d658abb..1e0abf9f 100644--- a/src/i18n/locales/zh-CN.json+++ b/src/i18n/locales/zh-CN.json@@ -417,8 +417,6 @@"core.switch_confirm_desc": "切换至 {{version}} 版本吗?运行中的引擎将切换为该副本。","core.recommended_warning_title": "警告","core.recommended_warning_desc": "当前推荐版本是 “{{version}}”,切换到该版本可能导致软件异常,确定切换吗?",- "core.above_rc2_warning_title": "警告",- "core.above_rc2_warning_desc": "{{version}} 以上的版本引入破坏性更改,可能导致第三方插件异常,确定更新吗?你可随时在核心中切换回 {{version}}。","core.activate_toast": "已切换到 {{version}}","core.uninstalled_toast": "已卸载 {{version}}","core.remove_confirm_title": "卸载版本",@@ -428,7 +426,10 @@"core.preview": "预览版","core.incompatible_title": "不兼容版本({{count}})","core.update_local": "更新本地核心",+ "core.update_local_requires_app": "请先切换到受管核心再更新",+ "core.update_local_requires_app_hint": "包管理器决定实际更新版本。请先切换到已下载的受管核心,更新后手动切回本地核心并选择配套档案。","core.updated_toast": "本地核心已更新:{{version}}",+ "core.updated_switch_back_hint": "桌面端将继续使用当前受管核心。请手动切回本地核心,并在提示时选择配套档案。","core.update_failed": "本地核心更新失败","core.switch_restart_hint": "核心已切换,正在自动重启服务…","core.switch_failed": "切换核心失败",diff --git a/src/layout/components/setup-preinstall.tsx b/src/layout/components/setup-preinstall.tsxindex d2f0390c..ff834492 100644--- a/src/layout/components/setup-preinstall.tsx+++ b/src/layout/components/setup-preinstall.tsx@@ -1,7 +1,7 @@import type { IconComponent } from './loadable'import type { PluginProcess } from '@/store/modules/plugins'import type { PreinstallPlugin } from '@/store/modules/preinstall'-import { ArrowUpRightFromSquare, ArrowUturnCcwLeft, Comments, Copy, Cubes3Overlap, LayoutSideContentLeft, PlugConnection, ShoppingCart, Xmark } from '@gravity-ui/icons'+import { ArrowUpRightFromSquare, ArrowUturnCcwLeft, Comments, Copy, Cubes3Overlap, Layers, LayoutSideContentLeft, PlugConnection, ShoppingCart, Sparkles, Xmark } from '@gravity-ui/icons'import { Button, Card, Checkbox, Chip, ScrollShadow, Spinner, Switch, Typography } from '@heroui/react'import { useMount } from '@reause/core'import { invoke } from '@tauri-apps/api/core'@@ -55,6 +55,8 @@ const PLUGIN_ICONS: Record<string, IconComponent | undefined> = {'dsh-rewind-plugin': ArrowUturnCcwLeft,'billion-context': Cubes3Overlap,'@xmanrui/dsh-im': Comments,+ '@changfenhuang/dsh-genui': Sparkles,+ 'dsh-context': Layers,}/** 插件卡片:图标 + 名称 + 状态 chip 在顶,描述居中,开关居底部右侧 */diff --git a/src/layout/index.tsx b/src/layout/index.tsxindex 94c205f2..7aecf7e5 100644--- a/src/layout/index.tsx+++ b/src/layout/index.tsx@@ -10,7 +10,6 @@ import { queryKeys } from '@/config/query-keys'import { useListen } from '@/hooks/use-listen'import { useThemeAdaptive } from '@/hooks/use-theme-adaptive'import { useWakelockRelease } from '@/hooks/use-wakelock-release'-import { useCoreBreakingConfirm } from '@/ui/config/hooks/use-core-breaking-confirm'import { useCoreProfileSwitch } from '@/ui/config/hooks/use-core-profile-switch'import { toast } from '@/utils/toast'import { store } from '../store'@@ -41,7 +40,6 @@ export function App() {const { t } = useTranslation()const { status } = useStore(store.harness)const { updateInfo, updating } = useStore(store.harnessUpdater)- const { holder: coreBreakingHolder, confirmCoreBreaking } = useCoreBreakingConfirm()const { holder: coreProfileSwitchHolder, guardCoreUpgrade } = useCoreProfileSwitch()// issue #469:本应用没有屏幕常亮的正当需求(常驻播放的 <video> 会让系统无法息屏),@@ -127,20 +125,15 @@ export function App() {})})- // 新版本提示:仅提示不打断用户;破坏性更改确认推迟到点击「立即更新」时useWatch([updateInfo, updating], () => {if (!updateInfo || updating)returnstore.harnessUpdater.showToast(() => handleUpdate())}, { immediate: true })- /**- * 点击「立即更新」:目标版本高于 rc.2 时先弹破坏性更改确认,取消则中止更新;- * 目标版本是升级时先落到配套版本档案,更新失败再把档案切回去。- */async function handleUpdate() {const info = store.harnessUpdater.updateInfo- if (!info || !(await confirmCoreBreaking(info.tag)))+ if (!info)returnconst guard = await guardCoreUpgrade(info.tag)if (!guard)@@ -152,9 +145,6 @@ export function App() {return (<div className="flex h-screen w-screen" data-testid="dsh-shell-root"><Webview />- <If cond={status === 'ready'}>- {coreBreakingHolder}- </If><If cond={status === 'ready'}>{coreProfileSwitchHolder}</If>diff --git a/src/store/modules/harness-updater/store.ts b/src/store/modules/harness-updater/store.tsindex a2557766..5840c906 100644--- a/src/store/modules/harness-updater/store.ts+++ b/src/store/modules/harness-updater/store.ts@@ -92,12 +92,7 @@ export const harnessUpdater = defineStore({this.updateInfo = null},- /**- * 展示「发现新版本」提示条。- * onUpdate 由调用方(持有破坏性更改确认弹窗的组件)注入:点击「立即更新」时- * 先确认(高于 rc.2 则弹框),确认后才真正安装;未注入时回退为直接更新。- */- showToast(onUpdate?: () => void) {+ showToast(onUpdate: () => void) {if (!this.updateInfo)returntoast(t('update.available', { tag: this.updateInfo.tag }), {@@ -105,10 +100,7 @@ export const harnessUpdater = defineStore({children: t('update.now'),onPress: () => {toast.clear()- if (onUpdate)- void onUpdate()- else- void this.handleUpdate()+ onUpdate()},variant: 'tertiary',},diff --git a/src/ui/config/core.test.tsx b/src/ui/config/core.test.tsxnew file mode 100644index 00000000..12d183a2--- /dev/null+++ b/src/ui/config/core.test.tsx@@ -0,0 +1,225 @@+// @vitest-environment jsdom+import type { HarnessCore } from '@/types'+import { QueryClient, QueryClientProvider } from '@tanstack/react-query'+import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'+import { createInstance } from 'i18next'+import { I18nextProvider } from 'react-i18next'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import enUS from '@/i18n/locales/en-US.json'+import { ConfigCore } from './core'++const mocks = vi.hoisted(() => ({+ invoke: vi.fn(),+ restart: vi.fn(),+ toast: Object.assign(vi.fn(), { close: vi.fn() }),+}))++vi.mock('@tauri-apps/api/core', () => ({ invoke: mocks.invoke }))+vi.mock('@tauri-apps/api/event', () => ({ listen: vi.fn(async () => () => {}) }))+vi.mock('@/store', () => ({ store: { harness: { restart: mocks.restart } } }))+vi.mock('@/utils/toast', () => ({ toast: mocks.toast }))++const localFixture: HarnessCore = {+ id: 'local',+ source: 'local',+ version: '0.1.7-rc.1',+ tag: '',+ path: '/fixture/local/bin.js',+ dir: '/fixture/local',+ present: true,+ active: false,+ removable: false,+ preview: false,+ aboveRecommended: false,+ orphaned: false,+ bundled: false,+ recommendedVersion: '0.2.1-rc.1',+}+const managedFixture: HarnessCore = {+ id: 'app-dsh-0.2.1-rc.1-39009013600',+ source: 'app',+ version: '0.2.1-rc.1',+ tag: 'dsh-0.2.1-rc.1-39009013600',+ path: '/fixture/managed',+ dir: '/fixture/managed',+ present: true,+ active: true,+ removable: false,+ preview: false,+ aboveRecommended: false,+ orphaned: false,+ bundled: false,+ recommendedVersion: '0.2.1-rc.1',+}+const clients = new Set<QueryClient>()+let cores: HarnessCore[]+let translations = createInstance()+let updateVersion: string+let updateError: string | Error | null++function renderCore() {+ const client = new QueryClient({ defaultOptions: { queries: { retry: false }, mutations: { retry: false } } })+ clients.add(client)+ return render(+ <I18nextProvider i18n={translations}>+ <QueryClientProvider client={client}>+ <ConfigCore />+ </QueryClientProvider>+ </I18nextProvider>,+ )+}++function expectNoCoreOrProfileSwitch() {+ const commands = mocks.invoke.mock.calls.map(([command]) => command)+ expect(commands).not.toContain('set_active_core')+ expect(commands).not.toContain('create_profile')+ expect(commands).not.toContain('set_active_profile')+ expect(mocks.restart).not.toHaveBeenCalled()+}++function expectManagedWarning() {+ expect(mocks.toast).toHaveBeenCalledWith('Switch to a managed core before updating', {+ variant: 'warning',+ description: 'The package manager chooses the target version. Switch to a downloaded managed core first, update, then switch back manually and choose a matching profile.',+ timeout: 10_000,+ })+}++beforeEach(async () => {+ vi.clearAllMocks()+ cores = [{ ...localFixture }, { ...managedFixture }]+ updateVersion = '0.2.2-rc.1'+ updateError = null+ translations = createInstance()+ await translations.init({+ lng: 'en-US',+ fallbackLng: 'en-US',+ resources: { 'en-US': { translation: enUS } },+ interpolation: { escapeValue: false },+ })+ mocks.restart.mockResolvedValue(undefined)+ mocks.invoke.mockImplementation(async (command: string) => {+ if (command === 'get_cores')+ return cores.map(core => ({ ...core }))+ if (command === 'update_local_core') {+ if (updateError)+ throw updateError+ cores[0] = { ...cores[0], version: updateVersion }+ return updateVersion+ }+ if (command === 'get_profiles')+ return [{ id: 'core-0.2.1', name: 'Core-0.2.1', active: true }]+ throw new Error(`Unexpected command: ${command}`)+ })+})++afterEach(() => {+ cleanup()+ for (const client of clients)+ client.clear()+ clients.clear()+ vi.restoreAllMocks()+})++describe('本地核心更新档案安全', () => {+ it('在用本地核心不可原地更新,提示先切受管核心且不发送更新命令', async () => {+ cores[0].active = true+ cores[1].active = false+ renderCore()++ fireEvent.click(await screen.findByRole('button', { name: 'Update Local Core' }))++ await waitFor(expectManagedWarning)+ expect(mocks.invoke).not.toHaveBeenCalledWith('update_local_core')+ expectNoCoreOrProfileSwitch()+ })++ it('未在用的本地核心可更新至包管理器实际版本,保持受管核心并提示手动切回', async () => {+ renderCore()++ fireEvent.click(await screen.findByRole('button', { name: 'Update Local Core' }))++ await waitFor(() => expect(mocks.toast).toHaveBeenCalledWith('Local core updated: 0.2.2-rc.1', {+ variant: 'success',+ description: 'The desktop will keep using the current managed core. Switch back to the local core manually and choose a matching profile when prompted.',+ timeout: 10_000,+ }))+ expect(mocks.invoke).toHaveBeenCalledWith('update_local_core')+ expect((screen.getByRole('checkbox', { name: '0.2.1-rc.1' }) as HTMLInputElement).checked).toBe(true)+ expect((screen.getByRole('checkbox', { name: '0.2.2-rc.1' }) as HTMLInputElement).checked).toBe(false)+ expectNoCoreOrProfileSwitch()+ })++ it('旧本地核心已回退受管核心时仍可更新,不把低于下限误当在用', async () => {+ cores[0].version = '0.1.6'+ renderCore()+ fireEvent.click(await screen.findByRole('button', { name: 'Incompatible versions (1)' }))++ fireEvent.click(screen.getByRole('button', { name: 'Update Local Core' }))++ await waitFor(() => expect(mocks.toast).toHaveBeenCalledWith('Local core updated: 0.2.2-rc.1', {+ variant: 'success',+ description: 'The desktop will keep using the current managed core. Switch back to the local core manually and choose a matching profile when prompted.',+ timeout: 10_000,+ }))+ expect(mocks.invoke).toHaveBeenCalledWith('update_local_core')+ expectNoCoreOrProfileSwitch()+ })++ it.each([+ 'CORE_LOCAL_UPDATE_REQUIRES_APP',+ new Error('CORE_LOCAL_UPDATE_REQUIRES_APP'),+ 'CORE_LOCAL_UPDATE_REQUIRES_APP: switch to a supported managed core before updating the local core',+ new Error('CORE_LOCAL_UPDATE_REQUIRES_APP: switch to a supported managed core before updating the local core'),+ 'CORE_LOCAL_UPDATE_REQUIRES_APP: a supported managed core must be installed before updating the local core',+ new Error('CORE_LOCAL_UPDATE_REQUIRES_APP: a supported managed core must be installed before updating the local core'),+ ])('列表过期但 Native 拒绝在用本地更新时映射可操作警告,不改档案或重启(%s)', async (error) => {+ updateError = error+ renderCore()++ fireEvent.click(await screen.findByRole('button', { name: 'Update Local Core' }))++ await waitFor(expectManagedWarning)+ expect(mocks.invoke).toHaveBeenCalledWith('update_local_core')+ expect(mocks.toast).toHaveBeenCalledTimes(1)+ expectNoCoreOrProfileSwitch()+ expect((screen.getByRole('button', { name: 'Update Local Core' }) as HTMLButtonElement).disabled).toBe(false)+ })++ it.each([+ 'npm exited with code 1',+ new Error('npm exited with code 1'),+ 'CORE_LOCAL_UPDATE_REQUIRES_APPENDED: unrelated failure',+ new Error('CORE_LOCAL_UPDATE_REQUIRES_APPENDED: unrelated failure'),+ 'npm failed: CORE_LOCAL_UPDATE_REQUIRES_APP',+ new Error('npm failed: CORE_LOCAL_UPDATE_REQUIRES_APP'),+ ])('非契约错误保持原核心及档案,保留通用失败提示和重试状态(%s)', async (error) => {+ updateError = error+ const errorLog = vi.spyOn(console, 'error').mockImplementation(() => {})+ renderCore()++ fireEvent.click(await screen.findByRole('button', { name: 'Update Local Core' }))++ await waitFor(() => expect(mocks.toast).toHaveBeenCalledWith('Failed to update the local core', {}))+ expect(errorLog).toHaveBeenCalledWith('[ConfigCore] update local core failed:', error)+ expectNoCoreOrProfileSwitch()+ expect((screen.getByRole('checkbox', { name: '0.1.7-rc.1' }) as HTMLInputElement).checked).toBe(false)+ expect((screen.getByRole('button', { name: 'Update Local Core' }) as HTMLButtonElement).disabled).toBe(false)+ })++ it('更新后手动切回本地新版本仍先询问配套档案,取消不切核心', async () => {+ renderCore()+ fireEvent.click(await screen.findByRole('button', { name: 'Update Local Core' }))+ const updatedLocal = await screen.findByRole('checkbox', { name: '0.2.2-rc.1' })+ fireEvent.click(updatedLocal)++ const dialog = await screen.findByRole('alertdialog')+ expect((within(dialog).getByRole('textbox', { name: 'Profile name' }) as HTMLInputElement).value).toBe('Core-0.2.2')+ expectNoCoreOrProfileSwitch()++ fireEvent.click(within(dialog).getByRole('button', { name: 'Cancel' }))++ await waitFor(() => expect(screen.queryByRole('alertdialog')).toBeNull())+ expectNoCoreOrProfileSwitch()+ })+})diff --git a/src/ui/config/core.tsx b/src/ui/config/core.tsxindex 231ad3e6..b208d9b0 100644--- a/src/ui/config/core.tsx+++ b/src/ui/config/core.tsx@@ -15,36 +15,16 @@ import { Panel } from '@/components/panel'import { queryKeys } from '@/config/query-keys'import { useInvalidateOnSettingUpdated } from '@/hooks/use-invalidate-on-setting-updated'import { store } from '@/store'-import { useCoreBreakingConfirm } from '@/ui/config/hooks/use-core-breaking-confirm'import { useCoreProfileSwitch } from '@/ui/config/hooks/use-core-profile-switch'import { DownloadCoreDialog } from '@/ui/dialog/update-core'import { compareVersions, isCoreUnsupported, MIN_SUPPORTED_CORE_VERSION } from '@/utils/core-version'import { silence } from '@/utils/silence'import { toast } from '@/utils/toast'-/**- * 「核心」面板:管理 Harness 引擎来源与多版本。- *- * - 列表来自 `get_cores` 查询(`setting_updated` 事件一并失效刷新):- * `local` = 用户通过 CLI 全局安装的本地核心(存在且不低于最低支持基线时优先使用,- * 需求 3;低于基线时后端改用预打包核心,行内标注「不兼容」并给出更新提示);- * `app-<tag>` = deepseek-harness-pkg 各发布版本(GitHub releases 拉取失败时- * 降级为 git tags / 磁盘扫描,仅显示已下载版本)。预览版(Pre-release label- * 或 tag 命名)照常列出、可下载安装,但带「预览版」标签、不参与更新提示。- * - 切换核心:持久化后**自动重启**服务(需求 5),重启走 harness store 的- * restart 流程(停止 → 重新启动 → 健康检查)。升级到更新的版本时先弹「破坏性更改」- * 警告,确认后把当前档案换成与目标版本配套的版本档案(缺失则新建),再切核心并重启。- * - 下载版本:拉指定 tag 的发布资产到历史槽位(不激活),随后可切换;- * 卸载仅允许非激活的已下载版本。- * - 本地核心更新:通过用户包管理器 CLI(npm install -g @latest / pnpm add -g @latest)。- * - 每行展示核心入口(cli path,超长省略号 + 限制宽度)。- */-export function ConfigCore() {const [dialogHolder, openDialog] = useOverlay(Modal, { type: 'holder' })const [downloadDialogHolder, openDownloadDialog] = useOverlay(DownloadCoreDialog, { type: 'holder' })const { holder: upgradeDialogHolder, guardCoreUpgrade } = useCoreProfileSwitch()- const { holder: coreBreakingHolder, confirmCoreBreaking } = useCoreBreakingConfirm()const { t } = useTranslation()@@ -152,9 +132,6 @@ export function ConfigCore() {})return}- // 升级到更新的 dsh 版本 = 破坏性更改:先把当前档案换成配套档案,档案名默认取目标- // 版本的 x.x。该弹窗自带「切换」语义,命中时不再叠加一次普通的切换确认。- // 版本比对只用列表里已加载的在用核心,不为此联网重拉核心列表。const activeCore = cores.find(c => c.active)const guard = await guardCoreUpgrade(coreVersionKey(core), activeCore ? coreVersionKey(activeCore) : '')if (!guard)@@ -213,10 +190,6 @@ export function ConfigCore() {async function onDownload(core: HarnessCore) {if (busy)return- // rc.2 以上版本引入破坏性更改,可能影响第三方插件 → 下载前先弹出确认。- // 取消则中止,确认后继续;该提示与推荐版本逻辑无关,仅告知用户可随时切回 rc.2。- if (!(await confirmCoreBreaking(core.version)))- return// 下载过程在对话框内展示进度 + 日志(复用 install-progress 事件流);// 对话框 confirm(下载成功)或 cancel(失败后点关闭)都会结束本次等待。try {@@ -299,16 +272,37 @@ export function ConfigCore() {}}+ function showLocalUpdateWarning() {+ toast(t('core.update_local_requires_app'), {+ variant: 'warning',+ description: t('core.update_local_requires_app_hint'),+ timeout: 10_000,+ })+ }+async function onUpdateLocal() {if (busy)return+ if (localCore?.active) {+ showLocalUpdateWarning()+ return+ }setBusyId('local')try {const version = await updateLocal.mutateAsync()await refetch()- toast(t('core.updated_toast', { version: version || '—' }), {})+ toast(t('core.updated_toast', { version: version || '—' }), {+ variant: 'success',+ description: t('core.updated_switch_back_hint'),+ timeout: 10_000,+ })}catch (err) {+ const message = err instanceof Error ? err.message : String(err)+ if (message === 'CORE_LOCAL_UPDATE_REQUIRES_APP' || message.startsWith('CORE_LOCAL_UPDATE_REQUIRES_APP:')) {+ showLocalUpdateWarning()+ return+ }console.error('[ConfigCore] update local core failed:', err)toast(t('core.update_failed'), {})}@@ -494,7 +488,6 @@ export function ConfigCore() {{dialogHolder}{downloadDialogHolder}{upgradeDialogHolder}- {coreBreakingHolder}</div>)}@@ -509,13 +502,6 @@ function coreVersionKey(core: HarnessCore): string {return core.version || core.tag}-/**- * 本地核心是否低于最低支持基线。判据与「不兼容版本」分组完全一致(同一基线,- * `isUnsupportedCore`),低于基线时随包内置插件无法加载(issue #596),桌面端自动- * 改用预打包核心。不可与推荐核心版本(`engines.dsh.recommend`)混用——后者只用于- * 更新提示,拿它当基线会把「高于基线、低于推荐版本」的可用本地核心误判为不兼容- * (推荐版本为 0.1.7-alpha.1 时,0.1.5-rc.3 就是这么被挡下的)。- */function isUnsupportedLocal(core: HarnessCore): boolean {return core.source === 'local' && core.present && isUnsupportedCore(core)}diff --git a/src/ui/config/debug.test.tsx b/src/ui/config/debug.test.tsxindex 070bdf6a..07509a82 100644--- a/src/ui/config/debug.test.tsx+++ b/src/ui/config/debug.test.tsx@@ -24,9 +24,6 @@ vi.mock('react-i18next', () => ({vi.mock('@/hooks/use-listen', () => ({ useListen: () => {} }))vi.mock('@/ui/config/components/close-action', () => ({ ConfigCloseAction: () => null }))vi.mock('@/ui/config/components/launch-on-login', () => ({ ConfigLaunchOnLogin: () => null }))-vi.mock('@/ui/config/hooks/use-core-breaking-confirm', () => ({- useCoreBreakingConfirm: () => ({ holder: null, confirmCoreBreaking: vi.fn() }),-}))vi.mock('@/ui/config/hooks/use-core-profile-switch', () => ({useCoreProfileSwitch: () => ({ holder: null, guardCoreUpgrade: vi.fn() }),}))diff --git a/src/ui/config/debug.tsx b/src/ui/config/debug.tsxindex f6189c87..2bae5917 100644--- a/src/ui/config/debug.tsx+++ b/src/ui/config/debug.tsx@@ -15,7 +15,6 @@ import { store } from '@/store'import { HARNESS_HEAP_MAX_MB, HARNESS_HEAP_MIN_MB } from '@/store/modules/setting'import { ConfigCloseAction } from '@/ui/config/components/close-action'import { ConfigLaunchOnLogin } from '@/ui/config/components/launch-on-login'-import { useCoreBreakingConfirm } from '@/ui/config/hooks/use-core-breaking-confirm'import { useCoreProfileSwitch } from '@/ui/config/hooks/use-core-profile-switch'import { writeClipboardText } from '@/utils/clipboard'import { toast } from '@/utils/toast'@@ -46,7 +45,6 @@ export function ConfigDebug() {const { t, i18n } = useTranslation()const { serviceRunning, busyAction } = useStore(store.harness)const { updateInfo } = useStore(store.harnessUpdater)- const { holder: coreBreakingHolder, confirmCoreBreaking } = useCoreBreakingConfirm()const { holder: coreProfileSwitchHolder, guardCoreUpgrade } = useCoreProfileSwitch()// 端口编辑态:用户尚未输入时为 undefined,展示值始终以 store 中已保存的端口为准。@@ -77,18 +75,13 @@ export function ConfigDebug() {queryFn: () => invoke<CliLinkStatus>('get_cli_link_status'),})- /** 「存在新版本」:直接展示更新提示;破坏性更改确认推迟到点击「立即更新」时 */function handleShowNewVersion() {store.harnessUpdater.showToast(() => handleUpdate())}- /**- * 点击「立即更新」:目标版本高于 rc.2 时先弹破坏性更改确认,取消则中止更新;- * 目标版本是升级时先落到配套版本档案,更新失败再把档案切回去。- */async function handleUpdate() {const info = store.harnessUpdater.updateInfo- if (!info || !(await confirmCoreBreaking(info.tag)))+ if (!info)returnconst guard = await guardCoreUpgrade(info.tag)if (!guard)@@ -263,7 +256,6 @@ export function ConfigDebug() {</Button>)}/>- {coreBreakingHolder}{coreProfileSwitchHolder}<div className="space-y-1.5"><div className="flex items-center justify-between">diff --git a/src/ui/config/hooks/use-core-breaking-confirm.tsx b/src/ui/config/hooks/use-core-breaking-confirm.tsxdeleted file mode 100644index a1669cf7..00000000--- a/src/ui/config/hooks/use-core-breaking-confirm.tsx+++ /dev/null@@ -1,40 +0,0 @@-import { useOverlay } from '@overlastic/react'-import { useTranslation } from 'react-i18next'-import { Modal } from '@/components/modal'-import { CORE_BREAKING_BASELINE, isCoreBreakingVersion } from '@/utils/core-version'--/**- * rc.2 以上版本的下载前确认:若目标核心版本高于 rc.2 基准(引入破坏性更改、- * 可能影响第三方插件),先弹出确认对话框;取消则中止,确认后继续。- *- * 该逻辑与「推荐版本」逻辑无关,仅用于提示用户,提示可随时在核心中切回 rc.2。- * 三个入口(核心面板下载、核心「发现新版本」toast、debug「存在新版本」链接)- * 共用此一份逻辑。- */-export function useCoreBreakingConfirm() {- const [holder, openDialog] = useOverlay(Modal, { type: 'holder' })- const { t } = useTranslation()-- /** 返回 true=继续下载,false=用户取消。版本高于 rc.2 时弹确认框,否则直接放行 */- async function confirmCoreBreaking(version: string): Promise<boolean> {- if (!isCoreBreakingVersion(version))- return true- try {- await openDialog({- status: 'warning',- title: t('core.above_rc2_warning_title'),- description: (- <p>- {t('core.above_rc2_warning_desc', { version: CORE_BREAKING_BASELINE })}- </p>- ),- })- return true- }- catch {- return false- }- }-- return { holder, confirmCoreBreaking }-}diff --git a/src/utils/core-version.ts b/src/utils/core-version.tsindex 73586ac1..02e0bcba 100644--- a/src/utils/core-version.ts+++ b/src/utils/core-version.ts@@ -1,69 +1,33 @@import semver from 'semver'-/**- * 核心(dsh)版本判断:以 rc.2 为硬编码基准,高于该基准的版本引入破坏性更改、- * 可能影响第三方插件。该判断与「推荐版本」逻辑无关,仅作为用户提示的阈值。- */-export const CORE_BREAKING_BASELINE = '0.1.2-rc.1'+export const MIN_SUPPORTED_CORE_VERSION = '0.1.7-rc.1'-/** 剥掉 release tag 的 `dsh-`/`src-` 前缀(含重复的 `dsh-src-` 链)后再交给 semver */-function stripVersionPrefix(version: string): string {+function normalizeVersion(version: string): string {let value = version- while (value.startsWith('dsh-') || value.startsWith('src-'))+ let packaged = false+ while (value.startsWith('dsh-') || value.startsWith('src-')) {+ packaged ||= value.startsWith('dsh-')value = value.replace(/^(?:src|dsh)-/, '')- return value+ }+ return packaged ? value.replace(/-\d+$/, '') : value}-/**- * Semver comparison using the `semver` package.- * Handles `dsh-`/`src-` prefixes (including repeated `dsh-src-` chains) by- * stripping before comparison; unparsable values compare as equal.- * Returns: negative if a < b, 0 if equal, positive if a > b.- */export function compareVersions(a: string, b: string): number {- const pa = semver.parse(stripVersionPrefix(a))- const pb = semver.parse(stripVersionPrefix(b))+ const pa = semver.parse(normalizeVersion(a))+ const pb = semver.parse(normalizeVersion(b))if (!pa || !pb)return 0return semver.compare(pa, pb)}-/**- * 版本档案的建议名(`Core-x.y.z`,含 patch、不含预发布标识);缺失或不可解析时为空串。- *- * 必须带上 patch:破坏性更改在 patch 之间同样发生(用户实测 0.1.5-rc.2 → 0.1.7-rc.2),- * 只取 `x.y` 会让两个核心共用一个档案——经 `normalizeProfileId` 归一化后 `0.1.5` 与- * `0.1.7` 都落成 `01`,用户在弹窗里照默认名确认,实际切回的就是同一个档案,等于没隔离。- * 预发布标识(`-rc.2`)不参与取名:同一 patch 的 rc 之间共用档案,避免每次 rc 都新建。- *- * 前缀 `Core-` 不是装饰:`create_profile` 只拿归一化后的 id 建目录,而档案在 UI 上的- * 展示名取自清单 `name` 去掉 `dsh-profile-` 前缀(首字母大写,见- * `service::profile::display_name`),所以没有前缀时列表里就是一个光秃秃的 `017`,- * 用户根本看不出它是核心版本档案;带上前缀即 `Core-017`。- */export function coreProfileName(version: string): string {- const parsed = semver.parse(stripVersionPrefix(version))+ const parsed = semver.parse(normalizeVersion(version))return parsed ? `Core-${parsed.major}.${parsed.minor}.${parsed.patch}` : ''}-/**- * 目标核心是否相对在用核心做了升级(只认 `x.y.z` 核心号变大)。- *- * 核心与档案是配套的:换到任何更新的 dsh 版本都可能破坏当前档案里的插件与设置,切换前- * 先提示用户换配套档案。判据取「核心号变大」而非「跨主/次版本」——dsh 在 0.1.x 上持续推进- * 破坏性更改(0.1.5 → 0.1.7 就是一次),只跨主/次版本会漏掉这些升级提示。- *- * 预发布标识不参与判定:同一个 `x.y.z` 的 rc/alpha/beta 之间互换(含 `-rc.1` → `-rc.2`、- * `-rc.2` → 正式版)只换预发布序号,插件与设置的配套关系不变,`coreProfileName` 也给它们- * 同一个档案名。按 semver 严格比较会把 `0.1.7-rc.2 > 0.1.7-rc.1` 判成升级,让用户每次- * 追一个 rc 都被弹「含破坏性更改」——这正是要避免的误报。- *- * 不可解析(本地核心版本号缺失、首次切换没有在用核心)一律返回 false——漏提示只是少了- * 一次提醒,误判会把正常切换挡在弹窗后面。- */export function isCoreUpgrade(from: string, to: string): boolean {- const current = semver.parse(stripVersionPrefix(from))- const target = semver.parse(stripVersionPrefix(to))+ const current = semver.parse(normalizeVersion(from))+ const target = semver.parse(normalizeVersion(to))if (!current || !target)return falseconst currentCore = [current.major, current.minor, current.patch]@@ -75,27 +39,6 @@ export function isCoreUpgrade(from: string, to: string): boolean {return false}-/** 判断核心版本(版本串或 release tag)是否高于 rc.2 基准(引入破坏性更改) */-export function isCoreBreakingVersion(version: string): boolean {- return !!version && compareVersions(version, CORE_BREAKING_BASELINE) > 0-}--/**- * 最低支持的核心版本(与 Rust `MIN_SUPPORTED_CORE_VERSION` 对齐)。低于它的核心缺少- * 内置插件依赖的平台种子词,随包插件必然加载失败并把应用卡在启动阶段(issue #596)。- *- * 这是兼容性的唯一基线:它低于推荐核心版本(`manifest.jsonc` 的 `engines.dsh.recommend`,仅用于更新- * 提示),两者不可混用——拿推荐版本当基线会把「高于基线、低于推荐版本」的可用核心- * 误判为不兼容(推荐版本为 0.1.7-alpha.1 时,0.1.5-rc.3 就是这么被挡下的)。- */-export const MIN_SUPPORTED_CORE_VERSION = '0.1.5-rc.1'--/**- * 核心版本是否低于最低支持基线(按版本判定,与来源无关)。- *- * 版本缺失或不可解析时返回 false(`compareVersions` 对不可解析值返回 0)——漏放行只是- * 回到修复前的行为,误判会把可用的核心归进「不兼容」分组。- */export function isCoreUnsupported(version: string): boolean {return compareVersions(version, MIN_SUPPORTED_CORE_VERSION) < 0}diff --git a/test/bundle-metadata.test.ts b/test/bundle-metadata.test.tsindex c3bc2d23..fc02f796 100644--- a/test/bundle-metadata.test.ts+++ b/test/bundle-metadata.test.ts@@ -22,7 +22,7 @@ const constants = {dshCoreUrl: 'https://github.com/dsh-tauri-desk/deepseek-harness-pkg/releases/latest/download/',}-const DSH_TAG = 'dsh-0.1.5-rc.3-12345678901'+const DSH_TAG = 'dsh-0.2.1-rc.1-39009013600'function assetsFor(platform: BundlePlatform, arch: BundleArch, options: { withGit?: boolean } = {}) {return bundleMetadata.bundleAssets({ platform, arch, constants, dshTag: DSH_TAG, ...options })@@ -118,9 +118,9 @@ describe('bundle asset resolution', () => {describe('bundle release resolution', () => {it('picks the release whose tag parses to the recommended version', () => {expect(bundleMetadata.findReleaseTag([- { tag_name: 'dsh-0.1.6-rc.1-200' },+ { tag_name: 'dsh-0.1.7-rc.1-35871708301' },{ tag_name: DSH_TAG },- ], '0.1.5-rc.3')).toBe(DSH_TAG)+ ], '0.2.1-rc.1')).toBe(DSH_TAG)})it('fails loudly when no release matches', () => {@@ -128,7 +128,7 @@ describe('bundle release resolution', () => {})it('resolves the tag through the GitHub releases API', async () => {- const tag = await bundleMetadata.resolveDshTag('0.1.5-rc.3', async () => [+ const tag = await bundleMetadata.resolveDshTag('0.2.1-rc.1', async () => [{ tag_name: 'dsh-0.1.7-rc.1-35871708301' },{ tag_name: DSH_TAG },])@@ -145,7 +145,8 @@ describe('bundle build constants', () => {expect(parsed.pnpmSha256).toHaveLength(64)expect(parsed.mingitX64Sha256).toHaveLength(64)expect(parsed.dshCoreUrl).toContain('deepseek-harness-pkg')- expect(bundleMetadata.readRecommendedDshVersion(process.cwd())).toMatch(/^\d+\.\d+\.\d+/)+ expect(bundleMetadata.readRecommendedDshVersion(process.cwd())).toBe('0.2.1-rc.1')+ expect(bundleMetadata.readManifest(process.cwd())).toMatchObject({ engines: { dsh: { recommend: '0.2.1-rc.1', minimum: '0.1.7-rc.1' } } })})})@@ -168,7 +169,7 @@ describe('jsonc stripping', () => {describe('bundle manifest rewrite', () => {const SHIPPED = `{// 依赖映射规范- "engines": { "dsh": { "recommend": "0.1.5-rc.3", "minimum": "0.1.5-rc.1" } },+ "engines": { "dsh": { "recommend": "0.2.1-rc.1", "minimum": "0.1.7-rc.1" } },"dependencies": {"node": { "entry": "node.exe", "managedRoot": "$AppData/runtime", "overridable": true },"pnpm": { "entry": "bin/pnpm.cjs", "managedRoot": "$AppData/dependencies/pnpm", "overridable": true },@@ -203,7 +204,7 @@ describe('bundle manifest rewrite', () => {// 入口形状由清单声明,改写托管根不得动它。expect(manifest.dependencies[key].entry).toEqual(shipped.dependencies[key].entry)}- expect(manifest.engines.dsh.recommend).toBe('0.1.5-rc.3')+ expect(manifest.engines.dsh.recommend).toBe('0.2.1-rc.1')// 未随包的 git 保持清单原值:不能指向并不存在的 `$Resources/git`。expect(manifest.dependencies.git.managedRoot).toBe('$AppData/dependencies/git')expect(manifest.dependencies.git.overridable).toBe(true)diff --git a/test/core-local-unsupported.test.ts b/test/core-local-unsupported.test.tsindex 42137a43..50871716 100644--- a/test/core-local-unsupported.test.ts+++ b/test/core-local-unsupported.test.ts@@ -1,75 +1,55 @@-import { readFileSync } from 'node:fs'import { describe, expect, it } from 'vitest'import { compareVersions, isCoreUnsupported, MIN_SUPPORTED_CORE_VERSION } from '@/utils/core-version'--const CORE_PANEL = new URL('../src/ui/config/core.tsx', import.meta.url)-const RESOURCE_MANIFEST = new URL('../src-tauri/resources/manifest.jsonc', import.meta.url)--/** 随包推荐核心版本(前端核心面板的「更新」提示基线)。 */-function recommendedVersion(): string {- // 资源清单是 JSONC(允许行注释):解析前先剥掉行注释。- const raw = JSON.parse(- readFileSync(RESOURCE_MANIFEST, 'utf8').replace(/^\s*\/\/.*$/gm, ''),- ) as { engines: { dsh: { recommend: string } } }- return raw.engines.dsh.recommend+import { readSource } from './setup/read-source'++const coreSource = readSource('src/ui/config/core.tsx')+const manifest = JSON.parse(+ readSource('src-tauri/resources/manifest.jsonc').replace(/^\s*\/\/.*$/gm, ''),+) as {+ engines: { dsh: { recommend: string, minimum: string } }+ dependencies: { dsh: { engine: { recommend: string, minimum: string } } }}-/** `isUnsupportedLocal` 的函数体源码(用于锁定它不再复用推荐版本当基线)。 */function localPredicateSource(): string {- const source = readFileSync(CORE_PANEL, 'utf8')- const start = source.indexOf('function isUnsupportedLocal')+ const start = coreSource.indexOf('function isUnsupportedLocal')expect(start).toBeGreaterThan(-1)- return source.slice(start, source.indexOf('\n}', start))+ const end = coreSource.indexOf('\n}', start)+ expect(end).toBeGreaterThan(start)+ return coreSource.slice(start, end + 2)}-/**- * 兼容性只由**最低支持基线**(0.1.5-rc.1)决定,与推荐核心版本无关。- *- * 回归背景:本地核心的判定曾复用「推荐核心版本」(`manifest.jsonc` 的- * `engines.dsh.recommend`,误报发生时- * 为 0.1.7-alpha.1)当基线,于是 0.1.5-rc.3 这类**高于最低支持基线**的本地核心被误判为- * 「不兼容」:行内挂红标、激活被拒、提示文案还引用推荐版本号。最低支持基线独立于推荐- * 版本(issue #596),两者不可混用。- *- * 推荐版本随发布上下调整(曾从 0.1.7-alpha.1 回退到 0.1.5-rc.3),因此这里的断言只锁- * 「基线 ↔ 兼容性」的契约,不锁推荐版本与某个具体核心版本的相对取值。- */describe('local core compatibility baseline', () => {- it('最低支持基线与推荐核心版本是两个不同的版本', () => {- expect(MIN_SUPPORTED_CORE_VERSION).toBe('0.1.5-rc.1')- expect(recommendedVersion()).not.toBe(MIN_SUPPORTED_CORE_VERSION)- // 推荐版本高于最低支持基线,这正是误判的来源- expect(compareVersions(recommendedVersion(), MIN_SUPPORTED_CORE_VERSION)).toBeGreaterThan(0)+ it('前端与资源清单的最低支持版本均为 0.1.7-rc.1', () => {+ expect(MIN_SUPPORTED_CORE_VERSION).toBe('0.1.7-rc.1')+ expect(manifest.engines.dsh.minimum).toBe('0.1.7-rc.1')+ expect(manifest.dependencies.dsh.engine.minimum).toBe('0.1.7-rc.1')+ })++ it('推荐版本为 0.2.1-rc.1,仍是支持版本而非最低支持门槛', () => {+ expect(manifest.engines.dsh.recommend).toBe('0.2.1-rc.1')+ expect(manifest.dependencies.dsh.engine.recommend).toBe('0.2.1-rc.1')+ expect(isCoreUnsupported('0.2.1-rc.1')).toBe(false)})- it('高于最低支持基线的本地核心不算不兼容(误报版本 0.1.5-rc.3)', () => {- // 误报现场:0.1.5-rc.3 > 0.1.5-rc.1,却被按当时的推荐版本(0.1.7-alpha.1)挡下- expect(compareVersions('0.1.5-rc.3', MIN_SUPPORTED_CORE_VERSION)).toBeGreaterThan(0)- expect(isCoreUnsupported('0.1.5-rc.3')).toBe(false)+ it.each(['0.1.7-rc.1', '0.1.7-rc.2', '0.1.7', '0.2.0-rc.2'])('低于推荐版本的本地核心 %s 仍然受支持', (version) => {+ expect(compareVersions(version, '0.2.1-rc.1')).toBe(-1)+ expect(isCoreUnsupported(version)).toBe(false)})- it('基线本身及更高版本都算兼容,低于基线的旧版本才算不兼容', () => {- expect(isCoreUnsupported(MIN_SUPPORTED_CORE_VERSION)).toBe(false)- expect(isCoreUnsupported('0.1.5-rc.2')).toBe(false)- expect(isCoreUnsupported('0.1.7-alpha.1')).toBe(false)- expect(isCoreUnsupported('0.1.5-alpha.2')).toBe(true)- expect(isCoreUnsupported('0.1.2-rc.1')).toBe(true)+ it.each(['0.1.5-rc.3', '0.1.6', '0.1.7-alpha.1', '0.1.7-beta.1', '0.1.7-rc.0'])('本地核心 %s 低于 rc.1 下限,判为不兼容', (version) => {+ expect(isCoreUnsupported(version)).toBe(true)})})describe('config core panel local compatibility predicate', () => {- it('不复用推荐核心版本当兼容性基线', () => {+ it('仅对存在的本地核心复用最低支持版本判据,不复用推荐版本', () => {const predicate = localPredicateSource()- expect(predicate).toContain('isUnsupportedCore(core)')+ expect(predicate).toContain('return core.source === \'local\' && core.present && isUnsupportedCore(core)')expect(predicate).not.toContain('recommendedVersion')+ expect(coreSource).toContain('return isCoreUnsupported(core.version || core.tag)')})- it('不再引用已删除的推荐版本基线工具', () => {- expect(readFileSync(CORE_PANEL, 'utf8')).not.toContain('isCoreBelowBaseline')- })-- it('「不兼容」提示文案引用最低支持基线而不是推荐版本', () => {- const source = readFileSync(CORE_PANEL, 'utf8')- expect(source).toContain('t(\'core.local_unsupported_hint\', { version: MIN_SUPPORTED_CORE_VERSION })')+ it('「不兼容」提示引用最低支持版本,而不是推荐版本', () => {+ expect(coreSource).toContain('t(\'core.local_unsupported_hint\', { version: MIN_SUPPORTED_CORE_VERSION })')})})diff --git a/test/core-upgrade-profile.test.ts b/test/core-upgrade-profile.test.tsindex f6876bcb..0bd6078f 100644--- a/test/core-upgrade-profile.test.ts+++ b/test/core-upgrade-profile.test.ts@@ -155,16 +155,19 @@ describe('守卫:档案缺失才新建,已存在只切换,失败即中止'describe('更新提示入口(桌面外壳 / 调试页)走同一守卫', () => {for (const [name, source] of [['layout', layoutSource], ['debug', debugSource]] as const) {- it(`${name}:「立即更新」先确认、再落档案、更新失败回滚`, () => {+ it(`${name}:「立即更新」只走档案守卫,落档案后更新、失败回滚`, () => {const body = updateBody(source)-- expect(body).toContain('confirmCoreBreaking(info.tag)')- expect(body).toContain('guardCoreUpgrade(info.tag)')- expect(body).toMatch(/if \(!guard\)\n\s*return/)- expect(body).toContain('if (!(await store.harnessUpdater.handleUpdate()))')- expect(body).toContain('await guard.rollback?.()')- // 守卫的弹窗必须挂进渲染树,否则 useOverlay 的 holder 无处可渲染- expect(source).toContain('{coreProfileSwitchHolder}')+ const guardIndex = body.indexOf('await guardCoreUpgrade(info.tag)')+ const updateIndex = body.indexOf('if (!(await store.harnessUpdater.handleUpdate()))')+ const rollbackIndex = body.indexOf('await guard.rollback?.()')++ expect(source, '不得再次叠加已废弃的版本确认').not.toContain('confirmCoreBreaking')+ expect(guardIndex, '更新前必须调用档案守卫').toBeGreaterThan(-1)+ expect(updateIndex, '必须先落定档案,再更新核心').toBeGreaterThan(guardIndex)+ expect(body.slice(guardIndex, updateIndex), '取消或档案切换失败必须阻断更新').toMatch(/if \(!guard\)\n\s*return/)+ expect(rollbackIndex, '核心更新失败后必须回滚档案').toBeGreaterThan(updateIndex)+ expect(body.slice(updateIndex, rollbackIndex), '档案回滚只能发生在更新未切换的分支').not.toContain('}')+ expect(source, '档案守卫对话框必须挂进渲染树').toContain('{coreProfileSwitchHolder}')})}diff --git a/test/core-version.test.ts b/test/core-version.test.tsindex 0664b132..0f1aeb3e 100644--- a/test/core-version.test.ts+++ b/test/core-version.test.ts@@ -1,92 +1,115 @@import { describe, expect, it } from 'vitest'-import { coreProfileName, isCoreUnsupported, isCoreUpgrade, MIN_SUPPORTED_CORE_VERSION } from '@/utils/core-version'+import { compareVersions, coreProfileName, isCoreUnsupported, isCoreUpgrade, MIN_SUPPORTED_CORE_VERSION } from '@/utils/core-version'import { normalizeProfileId } from '@/utils/profile-id'-/**- * issue #596:随包内置插件依赖的平台种子词自 dsh 0.1.5 起才存在,核心低于最低支持- * 基线(0.1.5-rc.1)时 `@deepseek-ai/*` 模块在运行时模块表里不存在,插件必然加载失败- * 并把应用卡在启动阶段。- *- * 后端据此回退预打包核心,前端核心面板据此标注「不兼容」并拒绝激活;这里锁住两侧- * 共用的版本判定:低于基线为 true,等于/高于为 false,不可解析不误判。- *- * 兼容性只看最低支持基线,与推荐核心版本(`manifest.jsonc` 的 `engines.dsh.recommend`)无关——推荐版本- * 高于基线、仅用于更新提示。- */+describe('compareVersions', () => {+ it.each([+ ['0.1.7-alpha.1', '0.1.7-rc.1', -1],+ ['0.1.7-beta.2', '0.1.7-rc.1', -1],+ ['0.1.7-rc.0', '0.1.7-rc.1', -1],+ ['0.1.7-rc.1', '0.1.7-rc.1', 0],+ ['0.1.7-rc.10', '0.1.7-rc.2', 1],+ ['0.1.7', '0.1.7-rc.1', 1],+ ['0.2.1-rc.1', '0.2.0', 1],+ ['dsh-src-dsh-0.1.5-rc.3-1', 'src-0.1.7-rc.1', -1],+ ['dsh-0.1.7-rc.0-39009013600', 'src-0.1.7-rc.1', -1],+ ['dsh-0.1.7-rc.1-39009013600', '0.1.7-rc.1', 0],+ ['dsh-0.1.7-39009013600', 'src-0.1.7', 0],+ ['dsh-0.2.1-rc.1-39009013600', 'src-0.2.1-rc.1', 0],+ ['0.2.1-preview-1', '0.2.1-preview', 1],+ ['src-0.2.1-preview-1', '0.2.1-preview', 1],+ ['dsh-0.2.1-preview-1-39009013600', '0.2.1-preview-1', 0],+ ])('%s 与 %s 的版本顺序为 %s', (a, b, expected) => {+ expect(compareVersions(a, b)).toBe(expected)+ })++ it.each([+ ['', '0.2.1-rc.1'],+ ['not-a-version', '0.1.7-rc.1'],+ ['0.2.1-rc.1', ''],+ ['0.1.7-rc.1', 'app'],+ ])('无法解析的比较 %s / %s 返回中立值', (a, b) => {+ expect(compareVersions(a, b)).toBe(0)+ })+})+describe('isCoreUnsupported', () => {- it('把低于 0.1.5-rc.1 的旧版本判为不兼容', () => {- expect(isCoreUnsupported('0.1.0-rc.7')).toBe(true)- expect(isCoreUnsupported('0.1.2-rc.1')).toBe(true)- expect(isCoreUnsupported('0.1.5-alpha.2')).toBe(true)+ it('最低支持版本固定为 0.1.7-rc.1', () => {+ expect(MIN_SUPPORTED_CORE_VERSION).toBe('0.1.7-rc.1')})- it('基线本身与更新的版本都算兼容', () => {- expect(isCoreUnsupported(MIN_SUPPORTED_CORE_VERSION)).toBe(false)- expect(isCoreUnsupported('0.1.5-rc.2')).toBe(false)- expect(isCoreUnsupported('0.1.6-alpha.2')).toBe(false)- expect(isCoreUnsupported('0.1.7-alpha.1')).toBe(false)+ it.each([+ '0.1.0-rc.7',+ '0.1.2-rc.1',+ '0.1.5-rc.1',+ '0.1.5-rc.3',+ '0.1.6',+ '0.1.7-alpha.1',+ '0.1.7-alpha.999',+ '0.1.7-beta.2',+ '0.1.7-rc.0',+ 'dsh-0.1.7-rc.0-39009013600',+ 'dsh-src-0.1.7-rc.0-39009013600',+ 'src-0.1.7-rc.0',+ 'src-0.1.7-alpha.1',+ ])('%s 低于最低支持版本,判为不兼容', (version) => {+ expect(isCoreUnsupported(version)).toBe(true)})- it('版本缺失或不可解析时不误判为不兼容', () => {- expect(isCoreUnsupported('')).toBe(false)- expect(isCoreUnsupported('not-a-version')).toBe(false)+ it.each([+ '0.1.7-rc.1',+ '0.1.7-rc.2',+ '0.1.7',+ '0.1.8-alpha.1',+ '0.2.0-rc.2',+ '0.2.1-rc.1',+ 'src-0.1.7-rc.1',+ 'dsh-src-dsh-0.1.7-rc.1-39009013600',+ 'dsh-0.2.1-rc.1-39009013600',+ ])('%s 达到最低支持版本,判为兼容', (version) => {+ expect(isCoreUnsupported(version)).toBe(false)})- it('带 dsh-/src- 前缀的 release tag 按同一基线判定', () => {- expect(isCoreUnsupported('dsh-0.1.2-rc.1')).toBe(true)- expect(isCoreUnsupported('src-0.1.5-rc.1')).toBe(false)+ it.each(['', 'not-a-version', 'local'])('版本 %s 缺失或不可解析时不误判为不兼容', (version) => {+ expect(isCoreUnsupported(version)).toBe(false)})})-/**- * 版本档案建议名必须带 patch、且带 `Core-` 前缀:- * - patch 升级同样可能带破坏性更改(用户实测 0.1.5-rc.2 → 0.1.7-rc.2)。只取 `x.y` 时- * 两个核心经 `normalizeProfileId` 归一化后都会落成 `01`,用户照默认名确认其实切回- * 同一个档案,隔离等于没做(见最后一条 id 断言);- * - 档案在 UI 上的展示名 = 清单名去 `dsh-profile-` 前缀后首字母大写,也就是 id 本身,- * 所以没有前缀时列表里只有 `017` 这种看不懂的名字(见 `Core-` 断言);- * - 同一 patch 的 rc 不参与取名,避免每次 rc 都新建档案。- */describe('coreProfileName', () => {it('取主/次/补丁版本号并加 Core- 前缀,丢掉预发布标识', () => {expect(coreProfileName('0.1.7-rc.2')).toBe('Core-0.1.7')+ expect(coreProfileName('0.2.1-rc.1')).toBe('Core-0.2.1')expect(coreProfileName('0.17.1')).toBe('Core-0.17.1')expect(coreProfileName('0.18.0-rc.1')).toBe('Core-0.18.0')expect(coreProfileName('1.2.3')).toBe('Core-1.2.3')})- it('同一个 patch 的 rc 共用档案名', () => {- expect(coreProfileName('0.1.7-rc.1')).toBe(coreProfileName('0.1.7-rc.2'))- expect(coreProfileName('0.1.7-rc.2')).toBe('Core-0.1.7')+ it.each(['0.1.7-alpha.1', '0.1.7-rc.1', '0.1.7-rc.2', '0.1.7'])('%s 共用 Core-0.1.7 档案名', (version) => {+ expect(coreProfileName(version)).toBe('Core-0.1.7')})- it('剥掉 dsh-/src- 前缀后再取名', () => {+ it('剥掉 dsh-/src- 前缀后再取名,包括旧安装的 tag', () => {expect(coreProfileName('dsh-0.1.0-rc.8-32331963388')).toBe('Core-0.1.0')+ expect(coreProfileName('dsh-src-0.2.1-rc.1-39009013600')).toBe('Core-0.2.1')expect(coreProfileName('src-2.0.0')).toBe('Core-2.0.0')})- it('版本缺失或不可解析时为空串', () => {- expect(coreProfileName('')).toBe('')- expect(coreProfileName('local')).toBe('')- expect(coreProfileName('app-0.1.0-rc.8')).toBe('')+ it.each(['', 'local', 'app-0.1.0-rc.8'])('版本 %s 缺失或不可解析时为空串', (version) => {+ expect(coreProfileName(version)).toBe('')})- it('patch 不同的两个核心归一化后仍是两个不同档案 id,且名字可读', () => {+ it('patch 不同的两个核心归一化后仍有各自可读的档案 id', () => {expect(normalizeProfileId(coreProfileName('0.1.5-rc.2'))).toBe('core-015')expect(normalizeProfileId(coreProfileName('0.1.7-rc.2'))).toBe('core-017')+ expect(normalizeProfileId(coreProfileName('0.2.1-rc.1'))).toBe('core-021')})})-/**- * 只有核心号(`x.y.z`)变大才算「升级 → 请切换档案」:- * patch 升级同样可能带破坏性更改(用户实测 0.1.5 → 0.1.7 未提示是漏报,见反馈);- * 同一个核心号的预发布标识互换(rc.1 → rc.2、rc.2 → 正式版)共用同一个配套档案,- * 不算升级——按 semver 严格比较会把它误报成破坏性更改。- * 降级、平级与不可解析版本一律放行:误报会把正常切换挡在弹窗后面。- */describe('isCoreUpgrade', () => {- it('核心号变大(含 patch)都算升级', () => {+ it('核心号变大(含 patch)都算升级,包括旧安装迁移', () => {expect(isCoreUpgrade('0.1.5', '0.1.7')).toBe(true)+ expect(isCoreUpgrade('0.1.7-rc.1', '0.2.1-rc.1')).toBe(true)+ expect(isCoreUpgrade('0.2.0-rc.2', '0.2.1-rc.1')).toBe(true)expect(isCoreUpgrade('0.17.1', '0.18.0')).toBe(true)expect(isCoreUpgrade('0.17.1', '1.0.0')).toBe(true)expect(isCoreUpgrade('0.17.1', '2.0.0')).toBe(true)@@ -99,14 +122,19 @@ describe('isCoreUpgrade', () => {expect(isCoreUpgrade('0.1.7-rc.2', '0.1.7-alpha.1')).toBe(false)expect(isCoreUpgrade('0.1.5-rc.1', '0.1.5')).toBe(false)expect(isCoreUpgrade('0.1.5', '0.1.5-rc.1')).toBe(false)+ expect(isCoreUpgrade('0.2.1-alpha.1', '0.2.1-rc.1')).toBe(false)+ expect(isCoreUpgrade('0.2.1-rc.1', '0.2.1')).toBe(false)})it('平级不算升级', () => {expect(isCoreUpgrade('0.1.5', '0.1.5')).toBe(false)expect(isCoreUpgrade('0.1.5-rc.1', '0.1.5-rc.1')).toBe(false)+ expect(isCoreUpgrade('0.2.1-rc.1', '0.2.1-rc.1')).toBe(false)})it('降级不算升级', () => {+ expect(isCoreUpgrade('0.2.1-rc.1', '0.1.7-rc.1')).toBe(false)+ expect(isCoreUpgrade('0.2.1-rc.1', '0.2.0-rc.2')).toBe(false)expect(isCoreUpgrade('0.1.7', '0.1.5')).toBe(false)expect(isCoreUpgrade('0.1.7-rc.2', '0.1.5-rc.1')).toBe(false)expect(isCoreUpgrade('0.18.0', '0.17.1')).toBe(false)@@ -123,5 +151,6 @@ describe('isCoreUpgrade', () => {it('带 dsh-/src- 前缀的 release tag 按同一版本判定', () => {expect(isCoreUpgrade('dsh-0.1.5-rc.8-1', 'src-0.1.7')).toBe(true)expect(isCoreUpgrade('dsh-0.1.7-rc.1-1', 'src-0.1.7-rc.2-2')).toBe(false)+ expect(isCoreUpgrade('dsh-src-0.2.0-rc.2-38900000000', 'src-0.2.1-rc.1-39009013600')).toBe(true)})})diff --git a/test/e2e/desktop/boot.e2e.ts b/test/e2e/desktop/boot.e2e.tsindex 4702f755..53679e2b 100644--- a/test/e2e/desktop/boot.e2e.ts+++ b/test/e2e/desktop/boot.e2e.ts@@ -1,7 +1,6 @@import type { DesktopApp } from '../support/desktop'import { existsSync, readFileSync } from 'node:fs'-import { join } from 'node:path'-import process from 'node:process'+import { isAbsolute, join, relative, resolve } from 'node:path'import { afterAll, beforeAll, describe, expect, it } from 'vitest'import { Key } from 'webdriverio'import { startDesktopApp } from '../support/desktop'@@ -12,7 +11,7 @@ import { SETUP_ERROR, SHELL_IFRAME, SHELL_ROOT } from '../support/selectors'interface DshWindow extends Window {__dshE2eErrors?: string[]__TAURI_INTERNALS__?: {- invoke: (cmd: string) => Promise<{ service_url: string, node_version: string }>+ invoke: (cmd: string) => Promise<{ service_url: string, node_version: string, dsh_version: string, data_dir: string, log_path: string }>}}@@ -65,7 +64,7 @@ function dshRootText(selector: string): string {return document.querySelector(selector)?.textContent?.trim() ?? ''}-describe.skipIf(process.platform === 'darwin')('桌面端启动冒烟', () => {+describe('桌面端启动冒烟', () => {let app: DesktopApp | undefinedlet browser: WebdriverIO.Browser@@ -98,6 +97,10 @@ describe.skipIf(process.platform === 'darwin')('桌面端启动冒烟', () => {})expect(info.node_version, '未解析到可用 Node 运行时').not.toBe('')+ expect(info.dsh_version, '冷装配必须实际启动推荐的 rc.2 核心').toBe('0.2.1-rc.1')+ expect(resolve(info.data_dir), '真实核心数据根必须隔离在本次 scratch').toBe(resolve(app!.home, 'home', '.dsh.dev'))+ const logRelative = relative(app!.downloadCacheDir, info.log_path)+ expect(isAbsolute(logRelative) || logRelative === '..' || logRelative.startsWith('../') || logRelative.startsWith('..\\'), '真实核心日志不得写入用户运行实例目录').toBe(false)expect(info.service_url, '内核未给出服务地址').toMatch(/^http:\/\/127\.0\.0\.1:\d+$/)const iframe = await browser.$(SHELL_IFRAME)@@ -291,6 +294,11 @@ describe.skipIf(process.platform === 'darwin')('桌面端启动冒烟', () => {await click('dsh-appearance-zoom-1.2')await browser.waitUntil(async () => (await config()).zoom_factor === 1.2, { timeoutMsg: '本机界面缩放未从外观面板保存' })expect(await appearance(), '原生设置与所选外观不一致').toEqual({ palette: 'nord', terminal: true, transparency: true, opacity: 79, blur: true, sidebarOnly: false })+ const storePath = join(app!.home, 'app-data', '.store.test.dat')+ await expect.poll(() => existsSync(storePath), { message: '原生 Store 必须真实保存到本次隔离 app-data' }).toBe(true)+ const persisted = JSON.parse(readFileSync(storePath, 'utf8')) as { setting: { zoom_factor: number, appearance: unknown } }+ expect(persisted.setting.appearance, '隔离 Store 中必须存在刚保存的原生外观设置').toEqual(await appearance())+ expect(persisted.setting.zoom_factor, '隔离 Store 中必须存在刚保存的缩放值').toBe(1.2)await click('dsh-appearance-reset')await browser.waitUntil(async () => (await appearance()).palette === 'default', { timeoutMsg: '原生外观设置未恢复默认值' })expect(await appearance(), '重置未还原完整原生外观设置').toEqual({ palette: 'default', terminal: false, transparency: false, opacity: 100, blur: false, sidebarOnly: false })diff --git a/test/e2e/desktop/pet.e2e.ts b/test/e2e/desktop/pet.e2e.tsindex dd408c55..7d8d1d33 100644--- a/test/e2e/desktop/pet.e2e.ts+++ b/test/e2e/desktop/pet.e2e.ts@@ -1,38 +1,14 @@import type { DesktopApp } from '../support/desktop'-import process from 'node:process'import { afterAll, beforeAll, describe, expect, it } from 'vitest'import { startDesktopApp } from '../support/desktop'-import { dismissDshModals } from '../support/onboarding'import { completePreinstall } from '../support/preinstall'-import { SHELL_IFRAME } from '../support/selectors'-// ==========================================-// 1. 常量配置-// ==========================================--/** 冷装配(真的联网下载 Node + dsh)的等待上限。 */const ASSEMBLY_TIMEOUT_MS = 900_000--/** 桌宠窗口创建/销毁的收敛窗口(Rust 侧建窗是异步的)。 */const PET_WINDOW_TIMEOUT_MS = 30_000--/**- * 就绪锚点:内嵌 dsh 界面的官方侧栏根节点。- *- * 桌面壳自有设置入口,浏览器态的 `.dshp-settings-trigger`(官方设置启动器座位接管)在桌面端- * 不渲染,不能作为桌面端就绪条件;这里只要求内嵌界面已经挂载出来。- */-const READY_ANCHOR = '[data-slot="sidebar"]'--/** 桌宠尺寸合法区间(`src-tauri/src/desktop/pet.rs:48-49` 的 50.0 / 200.0)。 */const PET_SIZE_MIN = 50const PET_SIZE_MAX = 200const PET_SIZE_DEFAULT = 100-// ==========================================-// 2. 类型定义-// ==========================================-interface PetStatus {enabled?: booleanvisible?: boolean@@ -47,16 +23,6 @@ interface WindowWithDshErrors extends Window {}}-// ==========================================-// 3. 浏览器端 DOM/Tauri 脚本函数(在 `browser.execute` 中执行)-// ==========================================--/** 元素是否存在 */-function elementExists(selector: string): boolean {- return document.querySelector(selector) !== null-}--/** 在页面(壳层或帧内)安装报错收集器:三类页面级错误收进 `window.__dshE2eErrors` */function collectPageErrors(): void {const host = window as unknown as WindowWithDshErrorsif (host.__dshE2eErrors)@@ -75,12 +41,10 @@ function collectPageErrors(): void {}}-/** 读回当前上下文的报错收集器 */function readPageErrors(): string[] {return (window as unknown as WindowWithDshErrors).__dshE2eErrors ?? []}-/** 壳层内调用 Tauri 命令 */function shellInvoke(cmd: string, args?: unknown): Promise<unknown> {const internals = (window as unknown as WindowWithDshErrors).__TAURI_INTERNALS__if (!internals) {@@ -89,35 +53,15 @@ function shellInvoke(cmd: string, args?: unknown): Promise<unknown> {return internals.invoke(cmd, args as Record<string, unknown> | undefined)}-// ==========================================-// 4. 测试套件-// ==========================================--describe.skipIf(process.platform !== 'win32')('桌面端桌宠独立窗口', () => {+describe('桌面端桌宠独立窗口', () => {let app: DesktopAppbeforeAll(async () => {app = await startDesktopApp()const browser = app.browser- // 尽早装壳层收集器:装配失败、iframe 加载失败都会在壳层留下痕迹await browser.execute(collectPageErrors)- const iframe = await browser.$(SHELL_IFRAME)await completePreinstall(browser, ASSEMBLY_TIMEOUT_MS)- await iframe.waitForDisplayed({ timeout: ASSEMBLY_TIMEOUT_MS })-- // 切入 iframe 安装收集器并等待 UI 渲染。- //- // 就绪锚点用内嵌界面的官方侧栏根节点:桌宠设置分区及其菜单补丁由后续用例断言,这里只等界面可用。- await withIframe(async () => {- await browser.execute(collectPageErrors)- await browser.waitUntil(- () => browser.execute(elementExists, READY_ANCHOR),- { timeout: 60_000, timeoutMsg: '内嵌 dsh 界面未渲染出官方侧栏(插件 client 未生效)' },- )- })-- await dismissDshModals(browser)await setEnabled(false)}, ASSEMBLY_TIMEOUT_MS)@@ -125,45 +69,10 @@ describe.skipIf(process.platform !== 'win32')('桌面端桌宠独立窗口', ()await app?.stop()})- // ------------------------------------------- // Helper 函数库(特定于套件)- // -------------------------------------------- /** 封装 iframe 切换的高阶函数,自动保证调用后切回主框架 */- async function withIframe<T>(action: () => Promise<T>): Promise<T> {- const browser = app.browser- const iframe = await browser.$(SHELL_IFRAME)- await browser.switchFrame(iframe)- try {- return await action()- }- finally {- await browser.switchFrame(null)- }- }-- /** 壳层报错快照(当前上下文必须已在壳层) */- async function shellErrors(): Promise<string[]> {- return (await app.browser.execute(readPageErrors)) as string[]- }-- /** 帧内报错快照:自动进出 iframe */- async function frameErrors(): Promise<string[]> {- return withIframe(() => app.browser.execute(readPageErrors) as Promise<string[]>)- }-- /** 收尾断言:壳层与内嵌 dsh 页面都不得留下未捕获错误 */- async function expectNoPageErrors(scene: string): Promise<void> {- expect(await frameErrors(), `${scene}:内嵌 dsh 页面出现报错`).toEqual([])- expect(await shellErrors(), `${scene}:壳层出现报错`).toEqual([])- }-- /** 壳层读状态 */async function status(): Promise<PetStatus> {return (await app.browser.execute(shellInvoke, 'get_pet_status')) as PetStatus}- /** 壳层写启用状态 */async function setEnabled(enabled: boolean): Promise<void> {await app.browser.execute(shellInvoke, 'set_pet_enabled', { enabled })await app.browser.waitUntil(@@ -172,7 +81,6 @@ describe.skipIf(process.platform !== 'win32')('桌面端桌宠独立窗口', ())}- /** 越界提交必须由命令层拒绝(暂禁 WDIO 500 重试机制) */async function expectSizeRejected(outOfRange: number): Promise<void> {const browser = app.browserconst retryCount = browser.options.connectionRetryCount@@ -188,10 +96,6 @@ describe.skipIf(process.platform !== 'win32')('桌面端桌宠独立窗口', ()}}- // ------------------------------------------- // 5. 测试用例集- // -------------------------------------------it('TC-PET-L3-02-004 桌宠尺寸边界:范围内接受、越界拒绝且不改状态', async () => {await setEnabled(true)@@ -213,6 +117,6 @@ describe.skipIf(process.platform !== 'win32')('桌面端桌宠独立窗口', ()expect((await status()).pet_size, '收尾必须恢复默认尺寸').toBe(PET_SIZE_DEFAULT)await setEnabled(false)- await expectNoPageErrors('TC-PET-L3-02-004 尺寸边界')+ expect(await app.browser.execute(readPageErrors), 'TC-PET-L3-02-004 尺寸边界:壳层出现报错').toEqual([])})})diff --git a/test/e2e/integrations/ssh.e2e.ts b/test/e2e/integrations/ssh.e2e.tsnew file mode 100644index 00000000..3d68fe52--- /dev/null+++ b/test/e2e/integrations/ssh.e2e.ts@@ -0,0 +1,71 @@+import type { RemoteSession, RemoteStreamHandle } from '../../../packages/dsh-tauri-remote/src/host/types/index'+import { createHash } from 'node:crypto'+import { afterEach, describe, expect, it, vi } from 'vitest'+import { sshTransport } from '../../../packages/dsh-tauri-remote/src/host/service/transport.ssh'+import { MachineId } from '../../../packages/dsh-tauri-remote/src/host/types/index'+import { loadManualSshFixture } from '../support/integrations'++const fixture = loadManualSshFixture()++afterEach(() => {+ vi.unstubAllEnvs()+})++describe('人工 SSH 集成:专用远程 dsh 与真实转发', () => {+ it('只连接显式测试凭据,真实读取 dsh 页面并重连到原本地转发端口', async () => {+ vi.stubEnv('SSH_AUTH_SOCK', undefined)+ const profile = {+ id: MachineId('manual-ssh'),+ name: 'manual-ssh',+ host: fixture.host,+ port: fixture.port,+ user: fixture.user,+ remotePort: fixture.remotePort,+ }+ const sessions: RemoteSession[] = []+ const streams: RemoteStreamHandle[] = []+ const connect = async () => {+ const session = await sshTransport.connect(profile, (_label, key) => createHash('sha256').update(key).digest('base64').replace(/=+$/u, '') === fixture.hostKeySha256.replace(/=+$/u, ''), {+ readyTimeoutMs: 30_000,+ resolveProfile: async () => ({+ host: fixture.host,+ port: fixture.port,+ username: fixture.user,+ keys: fixture.privateKey ? [{ privateKey: fixture.privateKey }] : [],+ proxyJump: [],+ ...(fixture.password ? { password: fixture.password } : {}),+ }),+ })+ sessions.push(session)+ return session+ }+ try {+ const session = await connect()+ const first = await session.stream(fixture.remotePort)+ streams.push(first)+ const origin = `http://127.0.0.1:${first.localPort}`+ let cookie = ''+ if (fixture.token) {+ const exchange = await fetch(`${origin}/?token=${encodeURIComponent(fixture.token)}`, { redirect: 'manual', signal: AbortSignal.timeout(30_000) })+ expect(exchange.status, '显式测试 token 必须被真实 dsh 交换为会话').toBe(303)+ cookie = exchange.headers.getSetCookie().map(value => value.split(';')[0]).join('; ')+ expect(cookie, '真实核心必须签发会话 Cookie').not.toBe('')+ }+ const response = await fetch(origin, { headers: { cookie }, signal: AbortSignal.timeout(30_000) })+ expect(response.status, '专用远程 dsh 必须真实提供页面,不接受 Python HTTP 替代').toBe(200)+ expect(await response.text(), '页面必须包含真实 dsh 启动数据').toContain('__DSH_BOOT__')+ await first.close()+ await session.close()+ const again = await (await connect()).stream(fixture.remotePort, first.localPort)+ streams.push(again)+ expect(again.localPort, '重连必须复用原本地转发端口').toBe(first.localPort)+ const restored = await fetch(origin, { headers: { cookie }, signal: AbortSignal.timeout(30_000) })+ expect(restored.status, '同一转发地址必须在重连后恢复真实页面').toBe(200)+ expect(await restored.text(), '重连后仍必须是真实 dsh 页面').toContain('__DSH_BOOT__')+ }+ finally {+ await Promise.all(streams.map(stream => stream.close()))+ await Promise.all(sessions.map(session => session.close()))+ }+ })+})diff --git a/test/e2e/integrations/tunnel.e2e.ts b/test/e2e/integrations/tunnel.e2e.tsnew file mode 100644index 00000000..06736f27--- /dev/null+++ b/test/e2e/integrations/tunnel.e2e.ts@@ -0,0 +1,81 @@+import type { Browser } from 'playwright'+import { afterAll, beforeAll, describe, expect, inject, it } from 'vitest'+import { expectNoSyntheticFallbacks, launchDshBrowser, newDshPage, openSettings, selectSettingsSection } from '../support/browser'+import { requireManualIntegration } from '../support/integrations'++requireManualIntegration('tunnel')++const API = '/api/tauri/remote/access'+let browser: Browser++beforeAll(async () => {+ browser = await launchDshBrowser()+})++afterAll(async () => {+ await browser?.close()+})++async function api(method: string, path: string, body?: object): Promise<Response> {+ const response = await fetch(`${inject('dshBaseUrl')}${path}`, {+ method,+ headers: { 'cookie': inject('dshCookie'), 'content-type': 'application/json' },+ body: body ? JSON.stringify(body) : undefined,+ signal: AbortSignal.timeout(30_000),+ })+ expect(response.status, '专用宿主接口必须真实成功').toBe(200)+ return response+}++async function resetExposure(): Promise<void> {+ await api('POST', API, { enabled: false, address: '127.0.0.1', authEnabled: false, password: null })+ await api('DELETE', `${API}/tunnel`)+ await api('DELETE', `${API}/token`)+}++async function status(): Promise<{ tunnel: { state: string, url?: string }, pairing?: { tunnelLink?: string } }> {+ return await (await api('GET', API)).json()+}++describe('人工公网集成:真实 Cloudflare quick 隧道', () => {+ it('真实下载、启动、展示进度与配对凭据,随后停止回收', async () => {+ await resetExposure()+ const app = await newDshPage(browser)+ try {+ await openSettings(app.page, app.frame, app.syntheticFallbacks)+ await selectSettingsSection(app.page, app.frame, '远程访问', app.syntheticFallbacks)+ const tab = app.frame.getByTestId('remote-tabs').getByRole('tab', { name: '远程访问' })+ await tab.click()+ await expect.poll(() => tab.getAttribute('aria-selected'), { message: '远程访问 Tab 必须打开' }).toBe('true')+ const panel = app.frame.getByTestId('access-section')+ await panel.getByRole('switch', { name: '公网隧道' }).click()+ await panel.getByTestId('access-tunnel-mode').waitFor({ state: 'visible' })+ await panel.getByTestId('access-tunnel-start').click()+ let sawProgress = false+ await expect.poll(async () => {+ sawProgress ||= await panel.getByTestId('access-tunnel-progress').isVisible()+ return (await status()).tunnel.url+ }, { message: '真实隧道必须签发 quick 公网地址', timeout: 180_000, interval: 500 }).toMatch(/^https:\/\/[a-z0-9-]+\.trycloudflare\.com$/u)+ expect(sawProgress, '启动期必须能看到真实阶段进度').toBe(true)+ const running = await status()+ expect(running.tunnel.state, '宿主必须报告真实隧道运行状态').toBe('running')+ const pairingLink = running.pairing?.tunnelLink+ expect(pairingLink, '真实公网隧道必须签发短期配对链接').toBeDefined()+ expect(new URL(pairingLink!).searchParams.get('auth'), '面板配对码必须与公网链接一致').toBe(await panel.getByTestId('access-pairing-code').textContent())+ await expect.poll(() => panel.getByTestId('access-tunnel-state').textContent(), { message: '面板必须展示运行回执' }).toBe('隧道运行中')+ await panel.getByTestId('access-tunnel-stop').click()+ await expect.poll(async () => (await status()).tunnel.url, { message: '停止后必须回收公网入口', timeout: 30_000 }).toBeUndefined()+ await expect.poll(() => panel.getByTestId('access-tunnel-state').count(), { message: '面板必须回收运行状态' }).toBe(0)+ expectNoSyntheticFallbacks(app)+ expect(app.errors, '真实公网集成不得产生浏览器错误').toEqual([])+ }+ finally {+ try {+ await resetExposure()+ }+ finally {+ await app.close()+ }+ }+ }, 300_000)+})diff --git a/test/e2e/plugins/browser-modals.e2e.ts b/test/e2e/plugins/browser-modals.e2e.tsindex 6dd0f015..f04a6e21 100644--- a/test/e2e/plugins/browser-modals.e2e.ts+++ b/test/e2e/plugins/browser-modals.e2e.ts@@ -81,7 +81,8 @@ describe('浏览器编排:阻塞引导弹窗', () => {contentType: 'text/html',body: `<main data-slot="sidebar">ready</main><script>setTimeout(() => document.body.insertAdjacentHTML('beforeend', ${JSON.stringify(ONBOARDING)}), 600)- setTimeout(() => document.body.dataset.lateModalWindow = 'elapsed', 1_300)+ setTimeout(() => document.body.insertAdjacentHTML('beforeend', ${JSON.stringify(ONBOARDING)}), 1_500)+ setTimeout(() => document.body.dataset.lateModalWindow = 'elapsed', 2_000)</script>`,}))diff --git a/test/e2e/plugins/dsh-host-and-core-contract.e2e.ts b/test/e2e/plugins/dsh-host-and-core-contract.e2e.tsindex 5f61f496..eb53a23c 100644--- a/test/e2e/plugins/dsh-host-and-core-contract.e2e.ts+++ b/test/e2e/plugins/dsh-host-and-core-contract.e2e.ts@@ -136,6 +136,7 @@ describe('编排骨架', () => {})it('验证 DSH_E2E_MOUNT=cli 走真实 CLI 挂载路径', async () => {+ const previous = process.env.DSH_E2E_MOUNTprocess.env.DSH_E2E_MOUNT = 'cli'try {// 只验挂载落盘,不起宿主:`dsh plugin add` 的产物就是 profile 本身。@@ -154,7 +155,10 @@ describe('编排骨架', () => {}}finally {- delete process.env.DSH_E2E_MOUNT+ if (previous === undefined)+ delete process.env.DSH_E2E_MOUNT+ else+ process.env.DSH_E2E_MOUNT = previous}})})diff --git a/test/e2e/plugins/dsh-tauri-extension-panel.e2e.ts b/test/e2e/plugins/dsh-tauri-extension-panel.e2e.tsindex dc1a1c3a..0c1dff60 100644--- a/test/e2e/plugins/dsh-tauri-extension-panel.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-extension-panel.e2e.ts@@ -1,7 +1,12 @@import type { Browser } from 'playwright'-import { afterAll, beforeAll, describe, expect, it } from 'vitest'+import type { DshPage } from '../support/browser'+import { afterAll, beforeAll, describe, expect, inject, it } from 'vitest'import { expectNoSyntheticFallbacks, launchDshBrowser, newDshPage } from '../support/browser'+const OFFICIAL_PAGE = '[data-dsh-extension-plugins] [data-plugin-panel]'+const MAIN_HEADER = 'header:has(> div:first-child > h1)'+const BACK = '[data-dsh-plugins-back]'+let browser: BrowserbeforeAll(async () => {browser = await launchDshBrowser()@@ -10,32 +15,49 @@ afterAll(async () => {await browser?.close()})+async function openPlugins(app: DshPage, touch = false): Promise<void> {+ if (touch) {+ await app.frame.locator('[data-dsh-mobile-sidebar-toggle]').tap()+ await expect.poll(() => app.frame.locator('html[data-dsh-mobile-sidebar-open]').count(), { message: '触屏侧栏必须真实展开' }).toBe(1)+ const row = app.frame.getByRole('button', { name: '插件扩展', exact: true })+ await row.tap()+ await expect.poll(() => row.getAttribute('aria-current'), { message: '触屏点击必须真实激活插件扩展入口' }).toBe('page')+ await app.frame.locator(OFFICIAL_PAGE).waitFor({ state: 'visible' })+ await app.frame.locator('[data-dsh-mobile-sidebar-shade]').tap()+ await expect.poll(() => app.frame.locator('html[data-dsh-mobile-sidebar-open]').count(), { message: '进入插件面板后必须真实收起触屏侧栏以解除主槽 inert' }).toBe(0)+ }+ else {+ await app.frame.getByRole('button', { name: '插件扩展', exact: true }).click()+ }+ await app.frame.locator(OFFICIAL_PAGE).waitFor({ state: 'visible' })+}+describe('extension panel official plugins composition', () => {it('hides the original sidebar row and mounts the official page only while its first tab is active', async () => {const app = await newDshPage(browser, { ready: '[data-dsh-hidden-panel="plugins"]' })try {const originalRow = app.frame.locator('button:has([data-dsh-hidden-panel="plugins"])')expect(await originalRow.count(), '原插件入口必须保留注册但隐藏整行').toBe(1)- expect(await originalRow.evaluate(el => getComputedStyle(el).display)).toBe('none')- expect(await originalRow.isVisible()).toBe(false)+ expect(await originalRow.evaluate(el => getComputedStyle(el).display), '原插件入口必须隐藏布局').toBe('none')+ expect(await originalRow.isVisible(), '原插件入口不得重复展示').toBe(false)- await app.frame.getByRole('button', { name: '插件扩展', exact: true }).click()+ await openPlugins(app)const tabs = app.frame.getByRole('tablist', { name: '插件扩展' })const pluginsTab = tabs.getByRole('tab', { name: '插件', exact: true })- await expect.poll(() => tabs.getByRole('tab').first().textContent()).toBe('插件')- await expect.poll(() => pluginsTab.getAttribute('aria-selected')).toBe('true')+ await expect.poll(() => tabs.getByRole('tab').first().textContent(), { message: '官方插件必须是首个 Tab' }).toBe('插件')+ await expect.poll(() => pluginsTab.getAttribute('aria-selected'), { message: '打开入口必须选中官方插件 Tab' }).toBe('true')- const officialPage = app.frame.locator('[data-dsh-extension-plugins] [data-plugin-panel]')- await expect.poll(() => officialPage.isVisible(), { message: '首 Tab 必须渲染真实官方插件页面' }).toBe(true)- expect(await officialPage.count()).toBe(1)+ const officialPage = app.frame.locator(OFFICIAL_PAGE)+ expect(await officialPage.count(), '只能挂载一个真实官方插件页面').toBe(1)expect(await officialPage.evaluate((el) => {const style = getComputedStyle(el)return { padding: style.padding, overflow: style.overflow }- })).toEqual({ padding: '0px', overflow: 'visible' })- expect(await officialPage.locator(':scope > header[data-window-drag]').evaluate(el => getComputedStyle(el).paddingTop)).toBe('0px')+ }), '官方页必须由外层插件面板管理滚动与内边距').toEqual({ padding: '0px', overflow: 'visible' })+ const header = officialPage.locator(MAIN_HEADER)+ expect(await header.evaluate(el => getComputedStyle(el).paddingTop), '两端基线主页页头均不得叠加顶距').toBe('0px')- const heading = officialPage.locator(':scope > header h1')- const intro = officialPage.locator(':scope > header > div:first-child > div')+ const heading = header.locator(':scope > div:first-child > h1')+ const intro = header.locator(':scope > div:first-child > :is(p, div)')const titleStyle = await heading.evaluate((el) => {const style = getComputedStyle(el)return { fontSize: style.fontSize, lineHeight: style.lineHeight, fontWeight: style.fontWeight }@@ -44,24 +66,36 @@ describe('extension panel official plugins composition', () => {const style = getComputedStyle(el)return { fontSize: style.fontSize, lineHeight: style.lineHeight, color: style.color }})- expect(titleStyle).toEqual({ fontSize: '16px', lineHeight: '24px', fontWeight: '500' })- expect(introStyle).toMatchObject({ fontSize: '12px', lineHeight: '18px' })- expect(await officialPage.locator(':scope > header').evaluate(el => getComputedStyle(el).rowGap)).toBe('14px')+ expect(titleStyle, '官方标题必须使用插件面板的统一字号').toEqual({ fontSize: '16px', lineHeight: '24px', fontWeight: '500' })+ expect(introStyle, '官方简介必须使用插件面板的统一字号').toMatchObject({ fontSize: '12px', lineHeight: '18px' })+ expect(await header.evaluate(el => getComputedStyle(el).rowGap), '主页标题与简介间距必须保持一致').toBe('14px')const sparkle = app.frame.locator('[data-dsh-plugins-icon] svg')- expect(await sparkle.isVisible(), '官方闪光图标必须出现在页头').toBe(true)- expect(await sparkle.getAttribute('width')).toBe('16')+ expect(await sparkle.isVisible(), '官方闪光图标必须出现在主页页头').toBe(true)+ expect(await sparkle.getAttribute('width'), '主页图标不得放大').toBe('16')- await expect.poll(() => officialPage.locator('[data-plugin-item]').count()).toBeGreaterThan(0)+ await expect.poll(() => officialPage.locator('[data-plugin-item]').count(), { timeout: 15_000, message: '必须加载真实官方插件条目' }).toBeGreaterThan(0)await officialPage.locator('[data-plugin-item]').first().getByRole('button').first().click()- const detailTop = officialPage.locator('[data-plugin-item-detail] > div[data-window-drag]')- await expect.poll(() => detailTop.isVisible()).toBe(true)- expect(await detailTop.evaluate(el => getComputedStyle(el).paddingTop), '详情顶部间距必须为 12px').toBe('12px')- expect(await sparkle.isVisible(), '详情页不显示列表页头图标').toBe(false)- await detailTop.getByRole('button').first().click()+ const detail = officialPage.locator('[data-plugin-item-detail]')+ await detail.waitFor({ state: 'visible' })+ const minimum = inject('dshCoreVersion') === '0.1.7-rc.1'+ const detailTop = minimum+ ? detail.locator(':scope > button:first-child')+ : detail.locator(':scope > div[data-window-drag]')+ expect(await detailTop.evaluate((el, isMinimum) => {+ const style = getComputedStyle(el)+ return isMinimum ? style.marginTop : style.paddingTop+ }, minimum), '两端基线详情顶部间距必须为 12px').toBe('12px')+ expect(await sparkle.isVisible(), '详情页不显示主页图标').toBe(false)+ const detailBack = detail.getByRole('button', { name: inject('dshCoreVersion') === '0.1.7-rc.1' ? '返回插件列表' : '返回插件', exact: true })+ expect(await detailBack.count(), '官方详情必须保留唯一原生返回入口').toBe(1)+ expect(await detailBack.evaluate(el => el.getBoundingClientRect().top - el.closest('[data-plugin-item-detail]')!.getBoundingClientRect().top), '原生返回入口距详情顶部必须真实留出 12px').toBeCloseTo(12, 1)+ expect(await detailBack.getAttribute('data-dsh-plugins-back'), '详情返回不得冒充更多页回退').toBeNull()+ await detailBack.click()+ await header.waitFor({ state: 'visible' })await tabs.getByRole('tab', { name: '技能', exact: true }).click()const skillsPanel = app.frame.getByRole('tabpanel', { name: '技能', exact: true, includeHidden: true })- await expect.poll(() => skillsPanel.isVisible()).toBe(true)+ await expect.poll(() => skillsPanel.isVisible(), { message: '技能 Tab 必须正常挂载' }).toBe(true)expect(await skillsPanel.locator(':scope > div > div:first-child > h3').evaluate((el) => {const style = getComputedStyle(el)return { fontSize: style.fontSize, lineHeight: style.lineHeight, fontWeight: style.fontWeight }@@ -74,10 +108,10 @@ describe('extension panel official plugins composition', () => {await tabs.getByRole('tab', { name: 'MCP', exact: true }).click()expect(await skillsPanel.count(), '其他已访问 Tab 仍须保留挂载').toBe(1)- expect(await skillsPanel.isVisible()).toBe(false)+ expect(await skillsPanel.isVisible(), '非活动技能页必须隐藏').toBe(false)await pluginsTab.click()- await expect.poll(() => officialPage.isVisible()).toBe(true)- expect(await originalRow.isVisible()).toBe(false)+ await expect.poll(() => officialPage.isVisible(), { message: '切回插件 Tab 必须恢复官方页面' }).toBe(true)+ expect(await originalRow.isVisible(), '原侧栏入口不得因重挂载复现').toBe(false)expectNoSyntheticFallbacks(app)expect(app.errors, '复用官方页面和切换 Tab 不得产生浏览器错误').toEqual([])}@@ -86,51 +120,107 @@ describe('extension panel official plugins composition', () => {}})- it('keeps the embedded page head on the same axis as its icon on touch viewports', async () => {+ it.each([+ { name: '桌面', width: 1400, height: 900, touch: false },+ { name: '触屏', width: 399, height: 938, touch: true },+ ])('$name:更多只保留唯一回退,返回原主页且标题、图标和按钮互不遮挡', async ({ width, height, touch }) => {const app = await newDshPage(browser, {ready: '[data-dsh-hidden-panel="plugins"]',- viewport: { width: 399, height: 938 },- hasTouch: true,- isMobile: true,+ viewport: { width, height },+ hasTouch: touch,+ isMobile: touch,})try {- const toggle = app.frame.locator('[data-dsh-mobile-sidebar-toggle]')- if (await toggle.count() > 0)- await toggle.first().click()- await expect.poll(() => app.frame.locator('html[data-dsh-mobile-sidebar-open]').count()).toBe(1)- // 抽屉的偏移是逐帧驱动的,行本身永远不满足 playwright 的 stable 判定;这里用真实- // 指针点击打开抽屉,再用页内点击选中面板行,几何断言不受影响。- const panelRow = app.frame.getByRole('button', { name: '插件扩展', exact: true })- await panelRow.evaluate((el: HTMLElement) => {- el.click()- })- const officialPage = app.frame.locator('[data-dsh-extension-plugins] [data-plugin-panel]')- await officialPage.waitFor()- const geometry = await officialPage.evaluate((el) => {- const wrapper = el.closest('[data-dsh-extension-plugins]') as HTMLElement- const header = el.querySelector(':scope > header[data-window-drag]') as HTMLElement- const title = header.querySelector('h1') as HTMLElement- const icon = wrapper.querySelector('[data-dsh-plugins-icon]') as HTMLElement- const center = (node: Element): number => {- const rect = node.getBoundingClientRect()- return rect.top + rect.height / 2- }+ await openPlugins(app, touch)+ const officialPage = app.frame.locator(OFFICIAL_PAGE)+ const tabs = app.frame.getByRole('tablist', { name: '插件扩展' })+ const initialTabs = await tabs.getByRole('tab').evaluateAll(elements => elements.map(element => ({ id: element.id, text: element.textContent })))+ const selectedTab = await tabs.getByRole('tab', { selected: true }).getAttribute('id')+ const mainHeader = officialPage.locator(MAIN_HEADER)+ const originalTitle = await mainHeader.locator('h1').textContent()+ const mainGeometry = await officialPage.evaluate((el) => {+ const wrapper = el.closest('[data-dsh-extension-plugins]')!+ const header = el.querySelector(':scope > header')!+ const title = header.querySelector('h1')!+ const icon = wrapper.querySelector('[data-dsh-plugins-icon]')!+ const titleBox = title.getBoundingClientRect()+ const iconBox = icon.getBoundingClientRect()return {headerPaddingTop: getComputedStyle(header).paddingTop,- titleCenter: center(title),- iconCenter: center(icon),- titleLeft: title.getBoundingClientRect().left,- iconLeft: icon.getBoundingClientRect().left,- iconWidth: icon.getBoundingClientRect().width,+ titleCenter: titleBox.top + titleBox.height / 2,+ iconCenter: iconBox.top + iconBox.height / 2,+ titleLeft: titleBox.left,+ iconLeft: iconBox.left,+ iconWidth: iconBox.width,titlePaddingLeft: Number.parseFloat(getComputedStyle(title).paddingLeft),}})- expect(geometry.headerPaddingTop, '移动端页头不得叠加主槽的顶距').toBe('0px')- expect(Math.abs(geometry.iconCenter - geometry.titleCenter), '闪光图标必须与插件标题同轴').toBeLessThanOrEqual(1)- expect(geometry.iconLeft, '图标必须落在标题的左内边距内').toBeCloseTo(geometry.titleLeft, 1)- expect(geometry.iconWidth + 10, '图标盒加 10px 间距必须等于标题的 32px 缩进').toBeCloseTo(geometry.titlePaddingLeft, 1)+ expect(mainGeometry.headerPaddingTop, '主页页头不得叠加主槽的顶距').toBe('0px')+ expect(Math.abs(mainGeometry.iconCenter - mainGeometry.titleCenter), '闪光图标必须与主页标题同轴').toBeLessThanOrEqual(1)+ expect(mainGeometry.iconLeft, '图标必须落在标题的左内边距内').toBeCloseTo(mainGeometry.titleLeft, 1)+ expect(mainGeometry.iconWidth + 10, '图标盒加 10px 间距必须等于标题的 32px 缩进').toBeCloseTo(mainGeometry.titlePaddingLeft, 1)+ expect(await officialPage.locator(BACK).count(), '主页不得伪造回退按钮').toBe(0)++ if (inject('dshCoreVersion') === '0.1.7-rc.1') {+ expect(await officialPage.getByRole('button', { name: '更多', exact: true }).count(), '最低基线没有官方更多页,不得由桌面插件伪造').toBe(0)+ await expect.poll(() => officialPage.locator('[data-plugin-item]').count(), { message: '最低基线必须实际加载官方插件列表' }).toBeGreaterThan(0)+ }+ else {+ const more = officialPage.locator('[data-plugin-group="extensions"]').getByRole('button', { name: '更多', exact: true })+ await expect.poll(() => more.count(), { timeout: 15_000, message: 'rc.1 必须提供唯一真实官方更多入口' }).toBe(1)+ await more.click()+ await officialPage.locator('[data-plugin-group="more"]').waitFor({ state: 'visible' })+ await expect.poll(() => officialPage.locator(BACK).count(), { message: '更多页只能有一个回退按钮' }).toBe(1)+ const back = officialPage.locator(BACK)+ expect(await back.getAttribute('aria-label'), '回退按钮必须有本地化无障碍名称').toBe('回退')+ expect(await back.textContent(), '回退按钮必须显示中文文案').toBe('回退')+ expect(await officialPage.getByRole('button', { name: '回退', exact: true }).count(), '不可有重复的可访问回退入口').toBe(1)+ expect(await back.locator('span').count(), '回退文案不得重复注入').toBe(1)+ expect(await back.locator('svg').count(), '必须保留官方原生回退图标').toBe(1)+ expect(await app.frame.locator('[data-dsh-plugins-icon]').isVisible(), '更多页不得叠加主页闪光图标').toBe(false)+ const geometry = await officialPage.evaluate((el) => {+ const header = el.querySelector(':scope > header')!+ const button = header.querySelector('[data-dsh-plugins-back]')!+ const title = header.querySelector(':scope > h1')!+ const icon = button.querySelector('svg')!+ const label = button.querySelector('span')!+ const rect = (node: Element) => {+ const box = node.getBoundingClientRect()+ return { left: box.left, top: box.top, right: box.right, bottom: box.bottom, width: box.width, height: box.height }+ }+ return {+ header: rect(header),+ button: rect(button),+ title: rect(title),+ icon: rect(icon),+ label: rect(label),+ titlePadding: getComputedStyle(title).paddingLeft,+ headerPadding: getComputedStyle(header).paddingTop,+ }+ })+ expect(geometry.headerPadding, '更多页页头不得残留主页顶距').toBe('0px')+ expect(geometry.titlePadding, '更多页标题不得残留主页图标缩进').toBe('0px')+ expect(geometry.button.width, '回退按钮必须真实占据可点击空间').toBeGreaterThan(28)+ expect(geometry.label.width, '中文回退文案必须真实可见').toBeGreaterThan(0)+ expect(geometry.icon.width, '官方回退图标必须真实可见').toBeGreaterThan(0)+ expect(geometry.icon.right, '回退图标和中文文案不得相交').toBeLessThanOrEqual(geometry.label.left)+ expect(geometry.button.right + 9, '回退按钮与实验性插件标题必须保留间距且不相交').toBeLessThanOrEqual(geometry.title.left)+ expect(Math.abs((geometry.button.top + geometry.button.bottom - geometry.title.top - geometry.title.bottom) / 2), '回退与更多标题必须同轴').toBeLessThanOrEqual(1)+ expect(geometry.title.right, '更多标题不得越出页头').toBeLessThanOrEqual(geometry.header.right + 1)+ expect(await tabs.getByRole('tab').evaluateAll(elements => elements.map(element => ({ id: element.id, text: element.textContent }))), '进入更多不得重建或改写外层 Tab').toEqual(initialTabs)+ expect(await tabs.getByRole('tab', { selected: true }).getAttribute('id'), '进入更多不得切换外层 Tab').toBe(selectedTab)++ await back.click()+ await mainHeader.waitFor({ state: 'visible' })+ await expect.poll(() => officialPage.locator(BACK).count(), { message: '返回主页必须回收回退标记' }).toBe(0)+ expect(await mainHeader.locator('h1').textContent(), '回退必须返回原官方主页而非重定向到其他面板').toBe(originalTitle)+ expect(await officialPage.locator('[data-plugin-group="more"]').count(), '回退后必须卸载更多页').toBe(0)+ expect(await app.frame.locator('[data-dsh-plugins-icon]').isVisible(), '返回主页必须恢复闪光图标').toBe(true)+ }+ expect(await tabs.getByRole('tab').evaluateAll(elements => elements.map(element => ({ id: element.id, text: element.textContent }))), '导航往返必须保留原外层 Tab').toEqual(initialTabs)+ expect(await tabs.getByRole('tab', { selected: true }).getAttribute('id'), '导航往返必须保留原选中 Tab').toBe(selectedTab)expectNoSyntheticFallbacks(app)- expect(app.errors, '移动端组合官方页面不得产生浏览器错误').toEqual([])+ expect(app.errors, '两端基线真实官方页面导航不得产生浏览器错误').toEqual([])}finally {await app.close()diff --git a/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts b/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.tsindex f6aca552..e949508e 100644--- a/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts@@ -11,8 +11,7 @@ afterAll(async () => {})const DIALOG = '[role="dialog"][aria-modal="true"][data-dsh-mobile-settings]'-// Official current SettingsRoot uses settings.launcher; legacy puts settings.trigger inside its button.-const LAUNCHER = '[data-slot="settings.launcher"] button[aria-haspopup="dialog"], button[aria-haspopup="dialog"]:has([data-slot="settings.trigger"])'+const LAUNCHER = '[data-slot="settings.launcher"] button[aria-haspopup="dialog"]'async function openPhoneSettings(width: number, height: number) {const app = await newDshPage(browser, {@@ -82,10 +81,14 @@ describe('mobile settings official host composition', () => {})), '触摸后恢复焦点不能留下浏览器默认框').toEqual({ outline: 'none', tap: 'rgba(0, 0, 0, 0)', keyboardFocus: false })await plus.tap()expect(await plus.evaluate(element => getComputedStyle(element).outlineStyle), '新会话图标触摸后也不能留下默认框').toBe('none')- await app.page.keyboard.press('Shift+Tab')- await toggle.focus()- expect(await toggle.evaluate(element => element.matches(':focus-visible')), '键盘导航仍须有可见焦点').toBe(true)- expect(await toggle.evaluate(element => getComputedStyle(element).outlineStyle)).toBe('solid')+ await expect.poll(() => app.frame.locator('[data-conversation-scroll]').count(), { message: '新会话必须先挂载会话区', timeout: 15_000 }).toBe(1)+ for (let index = 0; index < 10 && !await toggle.evaluate(element => document.activeElement === element); index++)+ await app.page.keyboard.press('Shift+Tab')+ expect(await toggle.evaluate(element => ({+ active: document.activeElement === element,+ focusVisible: element.matches(':focus-visible'),+ outline: getComputedStyle(element).outlineStyle,+ })), '键盘导航仍须有可见焦点').toEqual({ active: true, focusVisible: true, outline: 'solid' })await app.page.emulateMedia({ reducedMotion: 'reduce' })await toggle.tap()@@ -114,6 +117,20 @@ describe('mobile settings official host composition', () => {await app.page.emulateMedia({ reducedMotion: 'no-preference' })await app.frame.locator('[data-dsh-mobile-new-session]').tap()await expect.poll(() => app.frame.locator('[data-conversation-scroll]').count(), { message: '必须在真实会话区验证手势,而非插件面板' }).toBe(1)+ await expect.poll(+ () => app.frame.evaluate(async () => {+ const target = document.elementFromPoint(80, 220)+ if (!target?.closest('[data-conversation-scroll]'))+ return false+ for (let frame = 0; frame < 3; frame++) {+ await new Promise<void>(resolve => requestAnimationFrame(() => resolve()))+ if (!target.isConnected || document.elementFromPoint(80, 220) !== target)+ return false+ }+ return true+ }),+ { message: '真实会话内的手势落点必须跨渲染帧保持同一已连接节点' },+ ).toBe(true)const center = app.frame.locator('[class$="_centerCol"]')const toggle = app.frame.locator('[data-dsh-mobile-sidebar-toggle]')const shade = app.frame.locator('[data-dsh-mobile-sidebar-shade]')@@ -289,7 +306,16 @@ describe('mobile settings official host composition', () => {await expect.poll(() => dialog.getAttribute('data-dsh-mobile-settings-view')).toBe('detail')}await language.getByRole('button', { name: /^(?:中文|English)$/ }).click()- await menu.getByRole('menuitem', { name: '中文', exact: true }).click()+ const [persistedLocale] = await Promise.all([+ app.page.waitForResponse(async (response) => {+ if (!response.url().endsWith('/api/settings/mutate'))+ return false+ const body = await response.json()+ return body.result?.value?.ns === 'locale' && body.result.value.user?.preference === 'zh'+ }),+ menu.getByRole('menuitem', { name: '中文', exact: true }).click(),+ ])+ expect(await persistedLocale.json(), '关闭页面前必须确认宿主已接受中文写入,而非仅完成乐观 UI 更新').toMatchObject({ result: { ok: true, value: { ns: 'locale', user: { preference: 'zh' } } } })await expect.poll(() => language.getByRole('button', { name: '中文', exact: true }).count(), { message: '共享宿主语言偏好必须原生恢复,不能污染后续 shuffle 用例' }).toBe(1)await expect.poll(() => dialog.evaluate(el => document.getElementById(el.getAttribute('aria-labelledby')!)?.textContent?.trim())).toBe('设置')await dialog.locator('[data-dsh-mobile-settings-close]').click()diff --git a/test/e2e/plugins/dsh-tauri-pet.e2e.ts b/test/e2e/plugins/dsh-tauri-pet.e2e.tsindex 19ebee70..1461159b 100644--- a/test/e2e/plugins/dsh-tauri-pet.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-pet.e2e.ts@@ -225,7 +225,7 @@ describe('L2 客户端', () => {await openSettings(top.page, top.frame, top.syntheticFallbacks)const slots = await top.frame.evaluate(() => ({- hasTrigger: document.querySelector('[data-settings-trigger]') !== null,+ hasTrigger: document.querySelector('[data-settings-trigger], [data-slot="settings.launcher"] button[aria-haspopup]') !== null,petSections: document.querySelectorAll('[id="dsh-tauri-pet-settings"]').length,}))diff --git a/test/e2e/plugins/dsh-tauri-remote-panel.e2e.ts b/test/e2e/plugins/dsh-tauri-remote-panel.e2e.tsindex a694b7f6..5b5a87fc 100644--- a/test/e2e/plugins/dsh-tauri-remote-panel.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-remote-panel.e2e.ts@@ -8,15 +8,12 @@** 非回环监听的前置状态用同一套 HTTP 路由布置(面板下拉在 iframe 里的指针命中不稳,* 不适合做断言支点);面板侧只断言渲染与凭据开关的真实回写。- * 隧道用例默认关闭:它会真的下载 cloudflared 并占用公网随机域名,不适合放进常规门禁;- * 打开后用例自带收尾(停止隧道、关闭暴露),不把状态留给后续用例。*/import type { Browser } from 'playwright'import type { DshPage } from '../support/browser'import { mkdirSync } from 'node:fs'import { join } from 'node:path'-import process from 'node:process'import { afterAll, beforeAll, describe, expect, inject, it } from 'vitest'import { launchDshBrowser, newDshPage, openSettings, selectSettingsSection } from '../support/browser'@@ -24,7 +21,6 @@ const ARTIFACTS = join(import.meta.dirname, '..', '.artifacts')const ACCESS_API = '/api/tauri/remote/access'const PANEL = '[data-testid="access-section"]'const LAN = '局域网'-const TUNNEL = '公网隧道'const ACCESS_TOGGLE = '[data-testid="access-toggle"]'const LAN_ADDRESS = '[data-testid="access-lan-address"]'const LAN_DRAFT = '[data-testid="access-lan-draft"]'@@ -36,12 +32,6 @@ const PERMANENT_VALUE = '[data-testid="access-permanent-value"]'const PERMANENT_REVEAL = '[data-testid="access-permanent-reveal"]'const TOKEN_ROTATE = '[data-testid="access-token-rotate"]'const TOKEN_REVOKE = '[data-testid="access-token-revoke"]'-const TUNNEL_TOGGLE = '[data-testid="access-tunnel-toggle"]'-const TUNNEL_MODE = '[data-testid="access-tunnel-mode"]'-const TUNNEL_START = '[data-testid="access-tunnel-start"]'-const TUNNEL_STOP = '[data-testid="access-tunnel-stop"]'-const TUNNEL_STATE = '[data-testid="access-tunnel-state"]'-const PROGRESS = '[data-testid="access-tunnel-progress"]'const REMOVED = ['[data-testid^="access-logs"]','[data-testid="access-events"]',@@ -61,7 +51,6 @@ const REMOVED = [].join(', ')const CODE = /^[2-9A-HJ-NP-Z]{8}$/uconst MASK = '••••••••'-const TUNNEL_E2E = process.env.DSH_E2E_TUNNEL === '1'interface AccessStatusPayload {enabled: boolean@@ -238,39 +227,4 @@ describe('入站访问面板(真实浏览器)', () => {await app.page.close()}}, 120_000)-- it.skipIf(!TUNNEL_E2E)('启动真实 quick 隧道并拿到公网地址,随后停止回收', async () => {- await resetExposure()- const app = await newDshPage(browser, { ready: '[data-slot="sidebar"]' })- try {- await openAccessPanel(app)- await expect.poll(() => app.frame.locator(TUNNEL_TOGGLE).count(), { timeout: 20_000 }).toBe(1)- await switchOf(app, TUNNEL).click()- await expect.poll(() => app.frame.locator(TUNNEL_MODE).count(), { timeout: 20_000 }).toBe(1)- await app.frame.locator(TUNNEL_START).click()- // 启动期边轮询边采样:进度必须在拿到公网地址之前至少出现过一次(不能静默)- let sawProgress = false- await expect.poll(async () => {- if (await app.frame.locator(PROGRESS).count() > 0)- sawProgress = true- return (await accessStatus()).tunnel.url === undefined ? 0 : 1- }, { timeout: 180_000, interval: 500 }).toBe(1)- expect(sawProgress, '启动期必须能看到阶段进度').toBe(true)-- const status = await accessStatus()- expect(status.tunnel.state).toBe('running')- expect(status.tunnel.url, '面板不再展示公网地址,只能从宿主状态取').toMatch(/^https:\/\/[a-z0-9-]+\.trycloudflare\.com$/u)- expect(await readText(app, PAIRING_CODE), '隧道链接只带宿主签发的短期配对码').toBe(authParamOf(status.pairing?.tunnelLink))- await expect.poll(() => readText(app, TUNNEL_STATE), { timeout: 30_000 }).toBe('隧道运行中')- await shoot(app, 'access-4-tunnel')-- await app.frame.locator(TUNNEL_STOP).click()- await expect.poll(async () => (await accessStatus()).tunnel.url === undefined, { timeout: 30_000 }).toBe(true)- await expect.poll(() => app.frame.locator(TUNNEL_STATE).count(), { timeout: 30_000 }).toBe(0)- }- finally {- await resetExposure()- await app.page.close()- }- }, 300_000)})diff --git a/test/e2e/plugins/dsh-tauri-remote.e2e.ts b/test/e2e/plugins/dsh-tauri-remote.e2e.tsindex dca006c4..ae829330 100644--- a/test/e2e/plugins/dsh-tauri-remote.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-remote.e2e.ts@@ -1,67 +1,21 @@-/**- * dsh-tauri-remote 远程机插件 E2E:真实 ssh2 传输层与真实 SSH 协议往返。- *- * 四条契约各占一个 describe,共用同一套 `bootHarness` 脚手架——装配真实的- * 运行时单例(`transport` 服务 + `config/runtime.ts` 的 use* 装配面),宿主- * 自身 `~/.ssh` 的别名与身份文件解析,带时间戳的 status/event 证据日志。- * 事件证据走公开读面 `events.since(machineId, fromSeq)` 轮询:重构后事件类- * 已不存在,轮询读回的每一行按 `event <stage>[/<terminal>]: <line>` 打平,- * `at` 取事件自报的 `ts`,因此重连退避的间隔算术与轮询延迟无关。断言对象是- * 外部世界(HTTP 字节、服务端记录的认证方法序列、被杀的 sshd 会话进程),- * 不采信插件自报:- * - reconnect:真实 linux x64 机器上杀掉服务端会话 → 自动重连 → 同一隧道 URL 继续服务;- * - give-up:持续不可达的本机端口上的指数退避节奏与 given-up 终态;- * - password-chain:回环 ssh2 协议服务器上的 agent→key→password 认证链与三类失败分类;- * - watchdog:静默冻结(无 FIN/RST)连接上的 keepalive 看门狗。- *- * 环境降级标注(不得以 skip 掩盖):- * - password-chain:本机 22 端口关闭、无 docker、共享 dev 机 sshd 配置不可动,- * 故无 OS sshd 可测——「OS-sshd password E2E 未验证(环境不可得)」,以本地- * ssh2 协议服务器替代证据;- * - reconnect:需要可达的 `ssh dev` 别名机器。- */-import type { IncomingMessage } from 'node:http'import type { Duplex } from 'node:stream'import type { Connection, Server as SshServer } from 'ssh2'-import type { MachineProfile, RemoteHostContext, RemoteSession } from '../../../packages/dsh-tauri-remote/src/host/types/index'+import type { MachineProfile, RemoteSession } from '../../../packages/dsh-tauri-remote/src/host/types/index'import { Buffer } from 'node:buffer'-import { execSync } from 'node:child_process'import { createHash, generateKeyPairSync } from 'node:crypto'-import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'import { createServer as createHttpServer } from 'node:http'import { createServer, connect as tcpConnect } from 'node:net'-import { homedir, tmpdir } from 'node:os'+import { tmpdir } from 'node:os'import process from 'node:process'import { join } from 'pathe'import { Server } from 'ssh2'import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest'-import { clearHostRuntime, machineProfiles, setCurrentHostInstance, setHostConfig, setMachineDeps } from '../../../packages/dsh-tauri-remote/src/host/config/runtime'-import { events } from '../../../packages/dsh-tauri-remote/src/host/service/events'-import { machine } from '../../../packages/dsh-tauri-remote/src/host/service/machine'-import { sshTransport } from '../../../packages/dsh-tauri-remote/src/host/service/transport.ssh'+import { clearHostRuntime } from '../../../packages/dsh-tauri-remote/src/host/config/runtime'import { MachineId } from '../../../packages/dsh-tauri-remote/src/host/types/index'-import { EMPTY_ALLOWLIST } from '../../../packages/dsh-tauri-remote/src/host/utils/allowlist'--/** One timestamped evidence line. */-interface EvidenceLine {- at: number- text: string-}--/** The E2E harness: the assembled runtime service plus captured evidence. */-interface Harness {- manager: typeof machine- evidence: EvidenceLine[]- drain: () => void- log: (text: string) => void- dispose: () => Promise<void>-}--/** A monotonic-ish wall clock in epoch ms. */-function now(): number {- return Date.now()-}+import { RECOMMENDED_DSH_VERSION } from '../../../packages/dsh-tauri-remote/src/host/utils/version'+import { bootHarness, waitFor } from '../support/ssh'/** One freshly generated RSA key in PKCS#1 PEM form (what ssh2 parses natively). */function freshRsaPem(): string {@@ -69,305 +23,15 @@ function freshRsaPem(): string {return String(privateKey.export({ format: 'pem', type: 'pkcs1' }))}-/**- * The minimal host context the runtime needs: the E2E suite drives the- * services directly, so nothing is ever registered on the web server and no- * effect is ever mounted.- */-function hostContextStub(): RemoteHostContext {- return {- webServer: { register: () => () => {} },- effect: () => undefined,- }-}--/** Every `it` leaves no runtime behind (assembly is process-global state). */afterEach(() => {clearHostRuntime()})-/**- * Boot one real-transport runtime with scratch TOFU/state storage and the- * given connect/reconnect timing, logging every status and event emission- * with a timestamp.- *- * Assembly order is the production one (`apply.ts` is the only other caller):- * clear the runtime → bind the host instance → `setHostConfig` → `setMachineDeps`.- */-function bootHarness(options: {- connectTimeoutMs?: number- keepaliveIntervalMs?: number- keepaliveCountMax?: number- reconnectInitialDelayMs?: number- reconnectMaxDelayMs?: number- reconnectMaxAttempts?: number- healthPollIntervalMs?: number- healthPollAttempts?: number- sshDir?: string-} = {}): Harness {- const evidence: EvidenceLine[] = []- const t0 = now()- const root = mkdtempSync(join(tmpdir(), 'dsh-ssh-e2e-'))- const seenSeq = new Map<MachineId, number>()-- /**- * Read the public event surface forward from the last seen seq. `at` is the- * event's own timestamp, so the retry spacing is exact regardless of how- * often this poller happens to run.- */- const drain = (): void => {- for (const machineId of machineProfiles.keys()) {- const after = seenSeq.get(machineId) ?? 0- const page = events.since(machineId, after)- // Advance only past events actually handed over: `nextSeq` is the- // buffer's own next seq and would skip events appended after the poll.- const last = page.events.at(-1)?.seq- if (last !== undefined)- seenSeq.set(machineId, last)- for (const event of page.events) {- const at = Date.parse(event.ts)- evidence.push({- at: Number.isNaN(at) ? now() : at,- text: `event ${event.stage}${event.terminal === undefined ? '' : `/${event.terminal}`}: ${event.line}`,- })- }- }- }-- const log = (text: string): void => {- drain()- const line = { at: now(), text }- evidence.push(line)- // eslint-disable-next-line no-console -- the E2E evidence log is the point- console.log(`[+${(line.at - t0).toString().padStart(6)}ms] ${text}`)- }-- clearHostRuntime()- setCurrentHostInstance(hostContextStub())- setHostConfig({- connectTimeoutMs: options.connectTimeoutMs ?? 15_000,- healthCheckTimeoutMs: 3_000,- healthPollIntervalMs: options.healthPollIntervalMs ?? 500,- healthPollAttempts: options.healthPollAttempts ?? 30,- keepaliveIntervalMs: options.keepaliveIntervalMs ?? 3_000,- keepaliveCountMax: options.keepaliveCountMax ?? 3,- reconnectInitialDelayMs: options.reconnectInitialDelayMs ?? 1_000,- reconnectMaxDelayMs: options.reconnectMaxDelayMs ?? 5_000,- reconnectMaxAttempts: options.reconnectMaxAttempts ?? 6,- // The host's real ~/.ssh: config aliases and identity files, exactly- // what the plugin in the desktop app would resolve against.- sshDir: options.sshDir ?? join(homedir(), '.ssh'),- // Scratch TOFU + machine table: the suite must never touch ~/.dsh.- knownHostsPath: join(root, 'known-hosts.json'),- statePath: join(root, 'machines.json'),- })- setMachineDeps({- transport: { resolve: () => sshTransport },- emitStatus: (statusId, status) => {- const hints = [- status.state,- ...status.tunnelBaseUrl === undefined ? [] : [`tunnel=${status.tunnelBaseUrl}`],- ...status.nextRetryAt === undefined ? [] : [`nextRetryAt=+${status.nextRetryAt - now()}ms`],- ...status.authMethod === undefined ? [] : [`auth=${status.authMethod}`],- ...status.lastError === undefined ? [] : [`lastError=${status.lastError}`],- ]- log(`status ${String(statusId)}: ${hints.join(' ')}`)- },- localAllowlist: () => ({ ...EMPTY_ALLOWLIST }),- })- const poller = setInterval(drain, 50)-- return {- manager: machine,- evidence,- drain,- log,- dispose: async () => {- clearInterval(poller)- drain()- await machine.dispose()- clearHostRuntime()- rmSync(root, { recursive: true, force: true })- },- }-}--/** Wait until the predicate holds or the deadline passes (step-probe wait). */-async function waitFor(predicate: () => boolean, label: string, timeoutMs = 30_000): Promise<void> {- const deadline = now() + timeoutMs- while (!predicate()) {- if (now() > deadline)- throw new Error(`timed out waiting for ${label}`)- await new Promise(resolve => setTimeout(resolve, 100))- }-}-/** Brand a machine id. */function id(name: string): ReturnType<typeof MachineId> {return MachineId(name)}-/**- * Whether the operator's `~/.ssh/config` declares a host alias. The drop spec- * needs a real sshd it may kill a session on, so it can only be verified where- * such an alias exists; the gate reads the config file itself (no network) and- * the reason is printed, so a skipped run is never a silent one.- */-function sshConfigDeclaresHost(host: string): boolean {- try {- return readFileSync(join(homedir(), '.ssh', 'config'), 'utf8')- .split('\n')- .some((line) => {- const declared = /^Host[ \t]+(\S.*)$/iu.exec(line.trim())?.[1]- return declared !== undefined && declared.split(/\s+/u).includes(host)- })- }- catch {- return false- }-}--/** The alias the drop spec drives (the gate for verifying it). */-const DROP_HOST_ALIAS = 'dev'--const dropHostAvailable = sshConfigDeclaresHost(DROP_HOST_ALIAS)--if (!dropHostAvailable) {- console.warn(`[e2e] skipping the reconnect drop spec: ~/.ssh/config declares no \`${DROP_HOST_ALIAS}\` host to kill a session on`)-}--/**- * E2E #1 — drop-driven auto-reconnect on a real linux x64 machine.- *- * Flow: connect to `ssh dev` (a python3 HTTP server stands in for the remote- * `dsh web` instance — the dev host has no Node/dsh and the clone-path- * install cannot run there; the connection/tunnel/poll surface under test is- * identical), verify the tunnel serves HTTP, kill exactly the sshd session- * process serving OUR connection (identified as the one new session worker- * that appeared while connecting; never the listener, never a global- * restart), and watch the manager walk connected → reconnecting → connected- * with the SAME tunnel URL serving HTTP again.- *- * Environment gate: this spec is the only one in the suite that cannot be- * stood in for — it kills a live sshd session, so it needs the operator's own- * `dev` alias. Without that alias the describe is reported as skipped (with- * the reason printed above), never silently passed; a machine that has `dev`- * verifies the real contract.- */-describe.skipIf(!dropHostAvailable)('e2e reconnect (linux x64 dev machine)', () => {- const REMOTE_PORT = 3100-- const profile: MachineProfile = {- id: id('dev-drop'),- name: 'dev-drop',- host: DROP_HOST_ALIAS,- port: 22,- user: '',- // The remote instance stand-in: any loopback HTTP listener exercises the- // same probe → start → healthy → tunnel path.- startCommand: `python3 -m http.server ${REMOTE_PORT} --bind 127.0.0.1`,- remotePort: REMOTE_PORT,- }-- /**- * The dev host's container hides /proc/net from `ss`, so peer-port matching- * is unavailable. Instead: snapshot the sshd session workers (the- * `sshd-session: …@notty` processes, excluding the probe's own session via- * `$PPID` and the privileged parents), and diff around our connect.- */- function sshdSessionWorkers(): Set<number> {- const out = execSync(- `ssh dev 'echo OWN=$PPID; ps -eo pid=,cmd= | grep "[s]shd-session"'`,- { encoding: 'utf8' },- )- const own = Number(out.match(/OWN=(\d+)/u)?.[1] ?? NaN)- const workers = new Set<number>()- for (const line of out.split('\n')) {- const pid = Number(line.trim().match(/^(\d+)\s/u)?.[1] ?? NaN)- if (!Number.isFinite(pid) || pid === own)- continue- if (line.includes('[priv]'))- continue- if (line.includes('@'))- workers.add(pid)- }- return workers- }-- it('recovers a server-side session kill with the same tunnel URL', async () => {- const harness = bootHarness({ keepaliveIntervalMs: 3_000, reconnectInitialDelayMs: 1_000, reconnectMaxDelayMs: 5_000, reconnectMaxAttempts: 6 })- const { manager, log } = harness- try {- manager.refreshProfiles(new Map([[profile.id, profile]]))-- // 1. Connect and verify the tunnel serves HTTP (the "polling" probe).- const beforeSessions = sshdSessionWorkers()- const link = await manager.connect(profile.id)- expect(manager.status(profile.id).state).toBe('connected')- const afterSessions = sshdSessionWorkers()- const fresh = [...afterSessions].filter(pid => !beforeSessions.has(pid))- const before = await fetch(link.tunnelBaseUrl)- expect(before.status).toBe(200)- log(`tunnel serves HTTP ${before.status} at ${link.tunnelBaseUrl}`)- // A second URL through the same tunnel proves a real HTTP round trip.- const deep = await fetch(`${link.tunnelBaseUrl}/definitely-missing`)- expect(deep.status).toBe(404)-- // 2. Our session worker is exactly the one that appeared during the- // connect; verify what we are about to kill before killing it.- expect(fresh.length).toBe(1)- const pid = fresh[0]!- const cmdOfPid = execSync(`ssh dev "ps -p ${pid} -o cmd="`, { encoding: 'utf8' }).trim()- expect(cmdOfPid, `refusing to kill non-sshd process: ${cmdOfPid}`).toMatch(/sshd-session/iu)- log(`identified session sshd pid=${pid} (${cmdOfPid}) as the connect-window diff`)-- // 3. Kill exactly that process (targeted single PID, no restarts).- execSync(`ssh dev "kill ${pid}"`)- log(`killed session sshd pid=${pid}`)-- // 4. The manager must walk reconnecting → connected on its own.- await waitFor(() => manager.status(profile.id).state === 'reconnecting', 'reconnecting state')- log('observed reconnecting state')- await waitFor(() => manager.status(profile.id).state === 'connected', 'auto-reconnect', 60_000)- const status = manager.status(profile.id)- expect(status.state).toBe('connected')- expect(['agent', 'key']).toContain(status.authMethod)- log(`auto-reconnected (auth=${status.authMethod})`)-- // 5. Same URL, serving again: tunnel rebuilt on the preferred port.- expect(manager.link(profile.id)?.tunnelBaseUrl).toBe(link.tunnelBaseUrl)- const after = await fetch(link.tunnelBaseUrl)- expect(after.status).toBe(200)- log(`tunnel serves HTTP ${after.status} again at the SAME ${link.tunnelBaseUrl}`)-- // 6. Clean teardown; a manual disconnect is `disconnected`, not given-up.- await manager.disconnect(profile.id)- expect(manager.status(profile.id).state).toBe('disconnected')-- // 7. Leave the dev machine as we found it: stop the stand-in listener- // (verify it is our python3 http.server before killing the PID).- const listenerLine = execSync(- `ssh dev "ss -tlnp '( sport = :${REMOTE_PORT} )' | grep ':${REMOTE_PORT} '"`,- { encoding: 'utf8' },- ).trim()- const listenerPid = listenerLine.match(/pid=(\d+)/u)?.[1]- if (listenerPid !== undefined) {- const listenerCmd = execSync(`ssh dev "ps -p ${listenerPid} -o cmd="`, { encoding: 'utf8' }).trim()- if (/http\.server/iu.test(listenerCmd)) {- execSync(`ssh dev "kill ${listenerPid}"`)- log(`stopped stand-in listener pid=${listenerPid} on remote port ${REMOTE_PORT}`)- }- else {- log(`left remote listener pid=${listenerPid} alone (not our http.server: ${listenerCmd})`)- }- }- }- finally {- await harness.dispose()- }- }, 240_000)-})-/*** E2E #2 — backoff rhythm and the give-up terminal state, driven by a* persistently unreachable local port (nothing listens on 127.0.0.1:1).@@ -970,6 +634,24 @@ describe('e2e outbound gateway (loopback ssh2 protocol server)', () => {stream.end()return}+ if (command.includes('REMOTE_DSH_LISTENER_PACKAGE')) {+ stream.write(JSON.stringify({ name: '@deepseek-ai/dsh', version: RECOMMENDED_DSH_VERSION }))+ stream.exit(0)+ stream.end()+ return+ }+ if (command.includes('REMOTE_DSH_LISTENER_PID')) {+ stream.write([+ 'Linux',+ '4242',+ '/opt/remote-dsh',+ '1760000000:987654',+ '/usr/bin/node\0/opt/remote-dsh/node_modules/@deepseek-ai/dsh/lib/bin.js\0',+ ].join('\n'))+ stream.exit(0)+ stream.end()+ return+ }if (command.includes('%{http_code}')) {stream.write('console.log(1)\n200')stream.exit(0)diff --git a/test/e2e/plugins/dsh-tauri-scheduler-client.e2e.ts b/test/e2e/plugins/dsh-tauri-scheduler-client.e2e.tsindex f1348af0..09cd168f 100644--- a/test/e2e/plugins/dsh-tauri-scheduler-client.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-scheduler-client.e2e.ts@@ -20,7 +20,7 @@ const TITLE_SLOT = '[data-slot="sidebar.right.pane.tab.title"]'function scratchHome(): string {const home = resolve(inject('dshHome'))expect(dirname(home), '夹具只能写入系统临时目录的直接子目录').toBe(resolve(tmpdir()))- expect(basename(home), '夹具只能写入本轮编排创建的 dsh-e2e 隔离目录').toMatch(/^dsh-e2e-.+-[a-z0-9]+$/)+ expect(basename(home), '夹具只能写入本轮编排创建的 dsh-e2e 隔离目录').toMatch(/^dsh-e2e-.+-[a-z0-9]+$/i)expect(inject('dshMounted'), '隔离宿主必须实际挂载被测 scheduler').toContain('dsh-tauri-scheduler')return home}@@ -48,6 +48,44 @@ async function createScratchSession(): Promise<string> {return sessionId}+async function seedCompletedSession(home: string): Promise<string> {+ const coreRequire = createRequire(resolveDshCommand()[0]!)+ const { Context } = coreRequire('@deepseek-ai/cordis')+ const { SessionStore, SessionId } = coreRequire('@deepseek-ai/dsh-session')+ const { createUserMessage } = coreRequire('@deepseek-ai/dsh-llm')+ const jsonl = coreRequire('@deepseek-ai/dsh-session-persistence-jsonl')+ const context = new Context()+ try {+ let persistence+ if (typeof jsonl.apply === 'function') {+ await jsonl.apply(context, { root: join(home, 'sessions') })+ persistence = context.sessionPersistence+ }+ else {+ const JsonlSessionPersistence = jsonl.default+ persistence = new JsonlSessionPersistence(context, { root: join(home, 'sessions') })+ }+ const session = new SessionStore(context).create(SessionId(`session-${randomUUID()}`), { meta: { cwd: home } })+ session.append('turn/start', { turn: 1 })+ session.append('step/start', { turn: 1, step: 1 })+ session.append('user/message', createUserMessage({ content: [{ type: 'text', text: '已结束的 UI 夹具消息,没有请求任何模型。' }], source: { kind: 'user', rpcId: randomUUID() } }), { surfaceOp: 'append' })+ session.append('step/end', { turn: 1, step: 1 })+ session.append('turn/end', { turn: 1, reason: { kind: 'completed' } })+ const handle = await persistence.create(session.header)+ try {+ await handle.append(session.snapshotEvents())+ await handle.flush()+ }+ finally {+ await handle.close()+ }+ return session.id+ }+ finally {+ await context.fiber.dispose()+ }+}+async function readTasks(): Promise<GetApiTauriSchedulerTasksResponse['tasks']> {const payload = await api<GetApiTauriSchedulerTasksResponse>(TASKS_PATH)expect(Array.isArray(payload.tasks), '真实任务清单必须带 tasks 数组').toBe(true)@@ -427,39 +465,9 @@ describe('C 当前 core 的定时任务主面板内联详情', () => {})it('会话提醒入口保留原生右栏身份与 37px 标签条,隐藏同会话跳转和冗余关闭并在刷新后恢复绑定', async () => {+ const home = scratchHome()+ const sessionId = await seedCompletedSession(home)await withScratchPage(async (app, prefix) => {- const coreRequire = createRequire(resolveDshCommand()[0]!)- const { Context } = coreRequire('@deepseek-ai/cordis')- const { SessionStore, SessionId } = coreRequire('@deepseek-ai/dsh-session')- const { createUserMessage } = coreRequire('@deepseek-ai/dsh-llm')- const { default: JsonlSessionPersistence } = coreRequire('@deepseek-ai/dsh-session-persistence-jsonl')- const home = scratchHome()- const context = new Context()- let sessionId: string- try {- const persistence = new JsonlSessionPersistence(context, { root: join(home, 'sessions') })- const session = new SessionStore(context).create(SessionId(`session-${randomUUID()}`), { meta: { cwd: home } })- session.append('turn/start', { turn: 1 })- session.append('step/start', { turn: 1, step: 1 })- session.append('user/message', createUserMessage({ content: [{ type: 'text', text: '已结束的 UI 夹具消息,没有请求任何模型。' }], source: { kind: 'user', rpcId: randomUUID() } }), { surfaceOp: 'append' })- session.append('step/end', { turn: 1, step: 1 })- session.append('turn/end', { turn: 1, reason: { kind: 'completed' } })- const handle = await persistence.create(session.header)- try {- await handle.append(session.snapshotEvents())- await handle.flush()- }- finally {- await handle.close()- }- sessionId = session.id- }- finally {- await context.fiber.dispose()- }- const rpcId = randomUUID()- const adopted = await api<{ type: string, rpcId: string, result: { ok: boolean, value?: { sessionId: string } } }>('/api/session/create', 'POST', { type: 'client-request', rpcId, method: 'session/create', payload: { args: { request: { sessionId, cwd: home } } } })- expect(adopted, `真实 RPC 必须接管公开持久化夹具而不是创建另一个空白会话:${JSON.stringify(adopted)}`).toMatchObject({ type: 'server-response', rpcId, result: { ok: true, value: { sessionId } } })const name = `${prefix}-native`const created = await api<PostApiTauriSchedulerTasksResponse>(TASKS_PATH, 'POST', {name,@@ -486,10 +494,12 @@ describe('C 当前 core 的定时任务主面板内联详情', () => {const tabId = await chip.getAttribute('data-dockkit-tab')if (!tabId)throw new Error('原生任务 Tab 缺少公共 data-dockkit-tab 标识')- const body = app.frame.locator(`[data-sidebar-right-tab=${JSON.stringify(tabId)}] ${BODY_SLOT}`)+ const pane = app.frame.locator('[data-dockkit-pane]').filter({ has: chip })+ const body = pane.locator(BODY_SLOT)await expect.poll(() => body.getByLabel('名称', { exact: true }).inputValue(), { timeout: 15_000, message: '同一公共 Tab 内容槽必须读取正确提醒任务' }).toBe(name)expect(await body.count(), '原生任务 Tab 内容不得重复挂载').toBe(1)- expect(await chip.locator('[data-sidebar-right-tab]').getAttribute('data-sidebar-right-tab'), '公共标题必须属于同一原生 Tab').toBe(tabId)+ expect(await pane.count(), '原生任务标题与内容必须属于唯一的同一停靠面板').toBe(1)+ expect(await pane.locator('[data-dockkit-tab][aria-selected="true"]').getAttribute('data-dockkit-tab'), '内容所在面板必须选中同一原生任务 Tab').toBe(tabId)const tabs = body.getByRole('tablist', { name: '任务详情', exact: true })expect(await tabs.evaluate(element => element.parentElement!.getBoundingClientRect().height), '会话已有标题栏时本地标签条必须恰好 37px').toBe(37)expect(await body.getByRole('button', { name: /^关联会话:/ }).count(), '会话内详情不得重复链接到自身会话').toBe(0)diff --git a/test/e2e/plugins/dsh-tauri-ui.e2e.ts b/test/e2e/plugins/dsh-tauri-ui.e2e.tsindex 80419599..f8a7aecd 100644--- a/test/e2e/plugins/dsh-tauri-ui.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-ui.e2e.ts@@ -20,6 +20,7 @@ import {launchDshBrowser,newDshPage,openSettings,+ openSettingsMenu,SETTINGS_SIDEBAR,SETTINGS_TRIGGER,} from '../support/browser'@@ -38,11 +39,7 @@ function headers(): Record<string, string> {/** 插件接管后的英雄区工作区 chip(`ui/hero-workspace.tsx` 渲染)。 */const HERO_WORKSPACE_CHIP = '[data-hero-workspace]'-/**- * 官方英雄区工作区 chip:与插件 chip 共用 aria-label(官方 conversation 词典 `hero.chooseWorkspace`),- * 用 `:not([data-hero-workspace])` 把两者分开。官方行类名取自官方 ConversationRoot 模块。- */-const OFFICIAL_HERO_WORKSPACE_CHIP = '[class$="heroWorkspaceRow"] button[aria-label="选择工作区"]:not([data-hero-workspace])'+const OFFICIAL_HERO_WORKSPACE_CHIP = '[class$="heroWorkspaceRow"] button[class$="workspace"][aria-haspopup="menu"]:not([data-hero-workspace])'/*** 官方侧边栏「新建会话」按钮(官方 sidebar 词典 `session.new.label`)。@@ -128,7 +125,9 @@ describe('L2 客户端', () => {const app = await newDshPage(browser, { ready: SETTINGS_TRIGGER })try {const triggerHost = await app.frame.evaluate(() => {- const trigger = document.querySelector('[data-settings-trigger]')+ // rc.1 起官方账号菜单占据 `sidebar.settings` 座位,`data-settings-trigger` 只是+ // 老核心无 launcher 时的兜底;两种形态都必须是侧栏内的原生 button。+ const trigger = document.querySelector('[data-settings-trigger], [data-slot="settings.launcher"] button[aria-haspopup]')const sidebar = document.querySelector('[data-slot="sidebar"]')return {triggerInsideSidebar: Boolean(trigger && sidebar?.contains(trigger)),@@ -155,7 +154,7 @@ describe('L2 客户端', () => {expect(state.hasSearch, '设置侧栏必须带搜索框').toBe(true)expect(state.navLabels.length, '设置侧栏必须至少渲染一个导航项').toBeGreaterThan(0)expect(state.navLabels, '插件分区与核心分区必须同时出现在同一侧栏').toContain('宠物')- expect(state.navLabels, '本插件提供的设置分区必须在同一侧栏').toContain('插件')+ expect(state.navLabels, '核心内置插件分区必须与插件分区共用同一侧栏').toContain('内置插件')expect(state.railWidth, '侧栏宽度必须落在插件声明的 264–420px 夹紧区间内(插件不覆写宿主宽度)').toBeGreaterThanOrEqual(264)expect(state.railWidth!).toBeLessThanOrEqual(420)@@ -167,28 +166,37 @@ describe('L2 客户端', () => {}})- it('验证触发器 aria-expanded 随设置侧栏开合变化', async () => {+ it('验证设置入口开合与设置侧栏可见性', async () => {const app = await newDshPage(browser, { ready: SETTINGS_TRIGGER })try {const trigger = app.frame.locator(SETTINGS_TRIGGER).first()expect(await trigger.getAttribute('aria-expanded'), '初始必须为 false').toBe('false')expect(await app.frame.locator(SETTINGS_SIDEBAR).count(), '初始不得渲染设置侧栏').toBe(0)+ // rc.1 的入口是官方账号菜单:`aria-expanded` 只反映菜单自身开合,+ // 选中「设置」条目后菜单收起,侧栏由壳层 relay 打开。+ await openSettingsMenu(app.page, app.frame, app.syntheticFallbacks)+ expect(await trigger.getAttribute('aria-expanded'), '菜单展开时必须为 true').toBe('true')+ await app.page.keyboard.press('Escape')+ await expect.poll(+ async () => await trigger.getAttribute('aria-expanded'),+ { timeout: 10_000, message: 'Escape 关闭菜单后必须回到 false' },+ ).toBe('false')+await openSettings(app.page, app.frame, app.syntheticFallbacks)- expect(await trigger.getAttribute('aria-expanded'), '首次点击后必须为 true').toBe('true')await expect.poll(async () => await app.frame.locator(SETTINGS_SIDEBAR).first().isVisible(),{ timeout: 10_000, message: '展开后设置侧栏必须可见' },).toBe(true)- // 展开态下设置触发器被设置侧栏整体盖住(`trigger.boundingBox()` 为 null),+ // 展开态下设置入口被设置侧栏整体盖住(`trigger.boundingBox()` 为 null),// 收起只能走侧栏自身的 Escape 通道(`sidebar.tsx` 的 keydown 监听)。await app.page.keyboard.press('Escape')await expect.poll(- async () => await trigger.getAttribute('aria-expanded'),- { timeout: 10_000, message: 'Escape 后必须回到 false' },- ).toBe('false')- expect(await app.frame.locator(SETTINGS_SIDEBAR).count(), '收起后设置侧栏必须卸载').toBe(0)+ async () => await app.frame.locator(SETTINGS_SIDEBAR).count(),+ { timeout: 10_000, message: '收起后设置侧栏必须卸载' },+ ).toBe(0)+ expect(await trigger.getAttribute('aria-expanded'), '收起后入口不得停在展开态').toBe('false')expectNoSyntheticFallbacks(app)expect(app.errors, '开合不得抛出应用级错误').toEqual([])}@@ -251,24 +259,25 @@ describe('L2 客户端', () => {it('验证英雄区工作区选择被插件接管,官方 chip 让位且菜单首位是「未分组」', async () => {const app = await newDshPage(browser, { ready: HERO_WORKSPACE_CHIP })try {- // 官方 chip 与插件 chip 共用 aria-label(官方 conversation 词典 `hero.chooseWorkspace`),- // 用类名把两者分开:官方那枚必须仍在 DOM 里(接管失败时可原样回来)但被样式隐藏。const chips = await app.frame.evaluate((officialSelector) => {const row = document.querySelector('[class$="heroWorkspaceRow"]')- const official = row?.querySelector(officialSelector) ?? null+ const official = row?.querySelectorAll(officialSelector) ?? []+ const ours = row?.querySelector('[data-hero-workspace]') ?? nullreturn {rowExists: row !== null,- officialInRow: official !== null,- officialDisplay: official === null ? null : getComputedStyle(official).display,- oursInRow: row?.querySelector('[data-hero-workspace]') !== null,+ officialCount: official.length,+ officialDisplays: Array.from(official, chip => getComputedStyle(chip).display),+ oursInRow: ours !== null,+ oursSlot: ours?.closest('[data-slot]')?.getAttribute('data-slot') ?? null,oursCount: document.querySelectorAll('[data-hero-workspace]').length,}}, OFFICIAL_HERO_WORKSPACE_CHIP)expect(chips.rowExists, '英雄区工作区行必须存在(否则这条断言没有目标)').toBe(true)- expect(chips.officialInRow, '官方 chip 必须仍在 DOM 中:接管条目退位时要能原样回来').toBe(true)- expect(chips.officialDisplay, '官方 chip 必须被隐藏,否则会出现两枚选择控件').toBe('none')+ expect(chips.officialCount, '官方旧 chip 必须保留且唯一,不依赖其本地化 aria-label').toBe(1)+ expect(chips.officialDisplays, '官方旧 chip 必须被隐藏,否则会出现两枚选择控件').toEqual(['none'])expect(chips.oursInRow, '接管后的 chip 必须渲染在官方同一行内').toBe(true)+ expect(chips.oursSlot, '插件 chip 必须占据官方英雄区工作区槽位').toBe('conversation.hero.workspace')expect(chips.oursCount, '接管后的 chip 必须唯一').toBe(1)const capability = await app.frame.evaluate(() => document.documentElement.getAttribute('data-dsh-composer-cwd'))@@ -331,9 +340,12 @@ describe('L2 客户端', () => {const app = await newDshPage(browser, { ready: HERO_WORKSPACE_CHIP })try {const before = await app.frame.evaluate(() => ({+ card: document.querySelector('[data-composer-card]') !== null,inert: document.querySelector('[data-composer-card] [aria-label="选择工作区"]') !== null,}))- expect(before.inert, '夹具前置:没有会话时 composer 是官方的「选择工作区」触发器').toBe(true)+ // 共享宿主里前面的用例可能已经留下会话/草稿,composer 未必还停在+ // 「必须先选工作区」态;夹具只要求 composer 已挂载,产品断言交给点击之后的 poll。+ expect(before.card, '夹具前置:composer 必须已挂载').toBe(true)// 品牌按钮与工具栏按钮共用 aria-label(官方 sidebar 词典 `session.new.label`),两者都是// 「新建会话」入口、都该走未分组;工作区分组行的「+」是另一条带工作区名字的文案,diff --git a/test/e2e/plugins/dsh-tauri.e2e.ts b/test/e2e/plugins/dsh-tauri.e2e.tsindex 564080fc..6bd810e1 100644--- a/test/e2e/plugins/dsh-tauri.e2e.ts+++ b/test/e2e/plugins/dsh-tauri.e2e.ts@@ -18,7 +18,7 @@ import { basename, join } from 'node:path'import process from 'node:process'import { finished } from 'node:stream/promises'import { describe, expect, it } from 'vitest'-import { resolveDshCommand, resolveNodeBin, scaffoldDshProfile } from '../support/dsh'+import { isolatedDshEnv, resolveDshCommand, resolveNodeBin, scaffoldDshProfile } from '../support/dsh'const EMBEDDED_ENV = 'DSH_TAURI_EMBEDDED'@@ -104,9 +104,12 @@ async function startGateHost(): Promise<GateHost> {log(`🚀 挂载 [${basename(profile.home)}] carrier=${process.env[EMBEDDED_ENV] ?? '(unset)'}`)+ const env = isolatedDshEnv(profile.home)+ if (process.env[EMBEDDED_ENV] !== undefined)+ env[EMBEDDED_ENV] = process.env[EMBEDDED_ENV]const child = spawn(resolveNodeBin(), args, {cwd: profile.profileDir,- env: { ...process.env, DSH_HOME: profile.home },+ env,stdio: ['ignore', 'pipe', 'pipe'],windowsHide: true,})diff --git a/test/e2e/probe-wdio.ts b/test/e2e/probe-wdio.tsindex 8f800e82..bfeeaff3 100644--- a/test/e2e/probe-wdio.ts+++ b/test/e2e/probe-wdio.ts@@ -9,17 +9,21 @@import type { ChildProcess } from 'node:child_process'import { Buffer } from 'node:buffer'import { spawn } from 'node:child_process'-import { closeSync, existsSync, openSync, readSync, statSync } from 'node:fs'+import { closeSync, existsSync, mkdtempSync, openSync, readSync, statSync } from 'node:fs'import { createConnection } from 'node:net'+import { tmpdir } from 'node:os'import path from 'node:path'import process from 'node:process'import { setTimeout as sleep } from 'node:timers/promises'import { fileURLToPath } from 'node:url'+import { assertDesktopArtifactsCurrent } from './support/artifacts'+import { isolatedDshEnv } from './support/dsh'// 常量配置const ROOT = fileURLToPath(new URL('../../../', import.meta.url))const APP_PATH = path.join(ROOT, 'src-tauri', 'target', 'debug', 'deepseek-harness-desktop.exe')-const LOG_PATH = path.join(ROOT, '.temp-wdio-probe-app.log')+const SCRATCH = mkdtempSync(path.join(tmpdir(), 'dsh-e2e-desktop-probe-'))+const LOG_PATH = path.join(SCRATCH, 'probe.log')const APP_PORT = 3081const WD_PORT = 4445@@ -190,9 +194,9 @@ async function stopApp(child: ChildProcess): Promise<void> {*/async function main() {// 1. 环境与前置预检- if (!existsSync(APP_PATH)) {- fail(`二进制不存在:${APP_PATH}\n先运行:cargo build --manifest-path src-tauri/Cargo.toml`)- }+ if (process.platform !== 'win32')+ fail('原生 WebDriver 探针仅支持 Windows,不能降级到普通浏览器。')+ assertDesktopArtifactsCurrent(ROOT, APP_PATH)if (await isPortBusy(APP_PORT)) {fail(`${APP_PORT} 已被监听(debug 固定端口)。请先停掉 dev/debug 实例;探针不自动杀进程。`)}@@ -204,7 +208,13 @@ async function main() {const fd = openSync(LOG_PATH, 'w')const child = spawn(APP_PATH, [], {cwd: ROOT,- env: { ...process.env, TAURI_WEBDRIVER_PORT: String(WD_PORT) },+ env: {+ ...isolatedDshEnv(SCRATCH),+ DSH_E2E_HOME: SCRATCH,+ DSH_E2E_WEBVIEW_DATA_DIR: path.join(SCRATCH, 'webview2'),+ DSH_DOWNLOAD_CACHE_DIR: path.join(SCRATCH, 'download-cache'),+ TAURI_WEBDRIVER_PORT: String(WD_PORT),+ },stdio: ['ignore', fd, fd],})closeSync(fd)@@ -212,7 +222,7 @@ async function main() {try {// 3. 执行 WebDriver 协议验证const status = await waitForStatus(child)- console.log(`[probe] status: ok (${JSON.stringify((status.json as any).value)})`)+ console.log(`[probe] status: ok (${JSON.stringify(status.json)})`)const sessionId = await createSession(child)console.log(`[probe] sessionId: ${sessionId}`)diff --git a/test/e2e/setup-desktop.ts b/test/e2e/setup-desktop.tsindex e83b1771..14e6c45c 100644--- a/test/e2e/setup-desktop.ts+++ b/test/e2e/setup-desktop.ts@@ -1,19 +1,7 @@import process from 'node:process'-import { assertPreconditions, purgeStaleHomes, WEBDRIVER_PORT } from './support/desktop'+import { assertPreconditions, WEBDRIVER_PORT } from './support/desktop'-/**- * `desktop` project 的 globalSetup:车道级前置与清理,整条车道只做一次。- *- * 应用实例仍由各用例文件自己 `startDesktopApp()`(`fileParallelism: false` 保证串行、- * 一次只有一个实例);这里只做「一次就够」的事——清掉上一轮遗留的 scratch 根,并校验- * debug 二进制存在、WebDriver 与 debug 端口空闲。这样「端口被占 / 二进制缺失」会在车道- * 开始前一次性报出来,而不是让每个用例文件各报一次同样的错。- *- * 端口可用 `TAURI_WEBDRIVER_PORT` 覆盖:本机若已跑着另一个桌面实例(它同样占着默认- * 4445),用它另开一路即可并存,无需结束那个实例。- */export default async function setup(): Promise<void> {- await purgeStaleHomes()await assertPreconditions()process.stdout.write(`[desktop-setup] WebDriver 端口 ${WEBDRIVER_PORT} 空闲,debug 二进制就绪\n`)}diff --git a/test/e2e/setup-plugin.ts b/test/e2e/setup-plugin.tsindex 9c52a7ea..0a251d9e 100644--- a/test/e2e/setup-plugin.ts+++ b/test/e2e/setup-plugin.ts@@ -28,6 +28,7 @@ declare module 'vitest' {dshHome: string/** 已挂载的包名。 */dshMounted: string[]+ dshCoreVersion: string}}@@ -61,6 +62,7 @@ export default async function setup(project: TestProject): Promise<() => Promiseproject.provide('dshCookie', host.cookie)project.provide('dshHome', host.home)project.provide('dshMounted', [...host.mounted])+ project.provide('dshCoreVersion', host.coreVersion)return async () => {await host.stop()diff --git a/test/e2e/support/artifacts.test.ts b/test/e2e/support/artifacts.test.tsnew file mode 100644index 00000000..38ea28be--- /dev/null+++ b/test/e2e/support/artifacts.test.ts@@ -0,0 +1,117 @@+import { mkdirSync, mkdtempSync, rmSync, utimesSync, writeFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { dirname, join } from 'node:path'+import { afterEach, beforeEach, describe, expect, it } from 'vitest'+import { assertDesktopArtifactsCurrent, assertPluginArtifactsCurrent } from './artifacts'++let root: string+const SOURCE_TIME = 1_700_000_000+const BUILD_TIME = SOURCE_TIME + 10++function file(path: string, content = '', time = SOURCE_TIME): string {+ const target = join(root, path)+ mkdirSync(dirname(target), { recursive: true })+ writeFileSync(target, content)+ utimesSync(target, time, time)+ return target+}++function plugin(name = 'fixture', client: string | { default: string } = './dist/client.js'): void {+ file(`packages/${name}/package.json`, JSON.stringify({ main: './dist/index.js', exports: { './client': client } }))+ file(`packages/${name}/src/index.ts`, 'export default {}')+ file(`packages/${name}/dist/index.js`, '', BUILD_TIME)+ file(`packages/${name}/dist/client.js`, '', BUILD_TIME)+}++beforeEach(() => {+ root = mkdtempSync(join(tmpdir(), 'dsh-e2e-artifacts-test-'))+})++afterEach(() => {+ rmSync(root, { recursive: true, force: true })+})++describe('真实集成产物门禁', () => {+ it.each(['./dist/client.js', { default: './dist/client.js' }])('接受两种真实 client 导出形态且只比较文件元数据:%j', (client) => {+ plugin('fixture', client)+ expect(() => assertPluginArtifactsCurrent(root, 'fixture'), '新产物必须能进入真实集成').not.toThrow()+ })++ it.each(['dist/index.js', 'dist/client.js'])('缺少任一运行入口必须失败:%s', (entry) => {+ plugin()+ rmSync(join(root, 'packages/fixture', entry))+ expect(() => assertPluginArtifactsCurrent(root, 'fixture'), '缺构建不得跳过或降级到源码').toThrow('尚未构建')+ })++ it.each([+ 'packages/fixture/src/index.ts',+ 'packages/fixture/scripts/styles.ts',+ 'packages/fixture/tsdown.config.ts',+ 'packages/fixture/package.json',+ 'packages/dsh-tauri-tsdown/src/index.ts',+ 'package.json',+ 'pnpm-lock.yaml',+ 'pnpm-workspace.yaml',+ 'tailwind.plugins.config.js',+ ])('任一输入晚于产物时禁止旧 L2 假绿:%s', (input) => {+ plugin()+ if (input.endsWith('package.json') && input.startsWith('packages/fixture/'))+ utimesSync(join(root, input), BUILD_TIME + 1, BUILD_TIME + 1)+ else+ file(input, '', BUILD_TIME + 1)+ expect(() => assertPluginArtifactsCurrent(root, 'fixture'), '源文件或构建依赖变动必须阻断旧产物').toThrow('构建产物已过期')+ })++ it('宿主新而 client 旧仍必须拒绝,不能只看最新入口', () => {+ plugin()+ file('packages/fixture/src/index.ts', '', BUILD_TIME + 1)+ file('packages/fixture/dist/index.js', '', BUILD_TIME + 2)+ expect(() => assertPluginArtifactsCurrent(root, 'fixture'), '旧 client 不得被新宿主入口掩盖').toThrow('构建产物已过期')+ })++ it('测试文件不作为构建输入', () => {+ plugin()+ file('packages/fixture/src/index.test.ts', '', BUILD_TIME + 1)+ file('packages/fixture/test/helper.ts', '', BUILD_TIME + 1)+ expect(() => assertPluginArtifactsCurrent(root, 'fixture'), '仅测试变动不应强制插件构建').not.toThrow()+ })++ it('忽略构建后回写的生成样式,但仍校验原 CSS 输入', () => {+ plugin('dsh-tauri-ui')+ file('packages/dsh-tauri-ui/src/client/styles/index.ts', '', BUILD_TIME + 1)+ expect(() => assertPluginArtifactsCurrent(root, 'dsh-tauri-ui'), '生成器构建后回写不得误报').not.toThrow()+ file('packages/dsh-tauri-ui/src/client/styles/index.css', '', BUILD_TIME + 1)+ expect(() => assertPluginArtifactsCurrent(root, 'dsh-tauri-ui'), '原始样式晚于 bundle 必须失败').toThrow('构建产物已过期')+ })++ it.each(['native', 'frontend'])('桌面缺少产物直接失败:%s', (missing) => {+ const binary = join(root, 'desktop.exe')+ if (missing !== 'native')+ file('desktop.exe', '', BUILD_TIME)+ if (missing !== 'frontend')+ file('dist/index.html', '', BUILD_TIME)+ expect(() => assertDesktopArtifactsCurrent(root, binary), '缺原生或前端产物不得启动桌面').toThrow('缺少构建产物')+ })++ it.each(['src-tauri/src/lib.rs', 'src-tauri/resources/manifest.jsonc', 'src/index.tsx', 'pnpm-lock.yaml'])('桌面任一层输入过期均失败:%s', (input) => {+ const binary = file('desktop.exe', '', BUILD_TIME)+ file('dist/index.html', '', BUILD_TIME)+ file(input, '', BUILD_TIME + 1)+ expect(() => assertDesktopArtifactsCurrent(root, binary), '旧原生隔离钩子或旧前端都不得启动').toThrow('构建产物已过期')+ })++ it('只重建前端但未重建内嵌前端的原生二进制时必须失败', () => {+ const binary = file('desktop.exe', '', BUILD_TIME)+ file('src/index.tsx', '', BUILD_TIME + 1)+ file('dist/index.html', '', BUILD_TIME + 2)+ expect(() => assertDesktopArtifactsCurrent(root, binary), '新前端不能证明旧二进制已包含当前前端').toThrow('构建产物已过期')+ })++ it('桌面两层产物均新时才放行', () => {+ const binary = file('desktop.exe', '', BUILD_TIME)+ file('dist/index.html', '', BUILD_TIME)+ file('src-tauri/src/lib.rs')+ file('src/index.tsx')+ expect(() => assertDesktopArtifactsCurrent(root, binary), '完整新产物必须放行').not.toThrow()+ })+})diff --git a/test/e2e/support/artifacts.ts b/test/e2e/support/artifacts.tsnew file mode 100644index 00000000..56ea7d6f--- /dev/null+++ b/test/e2e/support/artifacts.ts@@ -0,0 +1,82 @@+import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'+import { join, relative } from 'node:path'++interface PluginManifest {+ main?: string+ exports?: Record<string, string | { default?: string }>+}++const EXCLUDED_DIRECTORIES = new Set(['archive', 'dist', 'node_modules', 'target', 'test', 'tests', '__tests__'])++function inputFiles(path: string): string[] {+ if (!existsSync(path))+ return []+ if (statSync(path).isFile())+ return [path]+ return readdirSync(path, { withFileTypes: true }).flatMap((entry) => {+ if (entry.isSymbolicLink() || entry.name.startsWith('.') || EXCLUDED_DIRECTORIES.has(entry.name))+ return []+ if (/\.(?:test|spec)\.[^.]+$/.test(entry.name))+ return []+ if (entry.name === 'index.ts' && path.endsWith(join('dsh-tauri-ui', 'src', 'client', 'styles')))+ return []+ return inputFiles(join(path, entry.name))+ })+}++export function assertDesktopArtifactsCurrent(repoRoot: string, binaryPath: string): void {+ const frontend = join(repoRoot, 'dist', 'index.html')+ const checks = [+ {+ entry: binaryPath,+ inputs: [+ 'src-tauri/src',+ 'src-tauri/build.rs',+ 'src-tauri/Cargo.toml',+ 'src-tauri/Cargo.lock',+ 'src-tauri/tauri.conf.json',+ 'src-tauri/resources/manifest.jsonc',+ 'dist/index.html',+ ],+ },+ {+ entry: frontend,+ inputs: ['src', 'index.html', 'vite.config.ts', 'package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml'],+ },+ ]+ for (const { entry, inputs } of checks) {+ if (!existsSync(entry))+ throw new Error(`桌面 E2E 缺少构建产物:${entry};请交由 CI 构建后验证。`)+ const builtAt = statSync(entry).mtimeMs+ const newerInput = inputs.flatMap(path => inputFiles(join(repoRoot, path)))+ .find(input => statSync(input).mtimeMs > builtAt)+ if (newerInput)+ throw new Error(`桌面 E2E 构建产物已过期:${relative(repoRoot, newerInput)} 新于 ${entry};请交由 CI 构建,禁止启动旧产物。`)+ }+}++export function assertPluginArtifactsCurrent(repoRoot: string, pkg: string): void {+ const pkgDir = join(repoRoot, 'packages', pkg)+ const manifest = JSON.parse(readFileSync(join(pkgDir, 'package.json'), 'utf8')) as PluginManifest+ const client = manifest.exports?.['./client']+ const clientEntry = typeof client === 'string' ? client : client?.default+ const entries = [manifest.main ?? './dist/index.js', ...(clientEntry ? [clientEntry] : [])]+ .map(entry => join(pkgDir, entry))+ for (const entry of entries) {+ if (!existsSync(entry))+ throw new Error(`${pkg} 尚未构建:缺少 ${entry};请在 CI 运行 pnpm build:plugins。`)+ }+ const inputs = [+ join(pkgDir, 'src'),+ join(pkgDir, 'scripts'),+ join(pkgDir, 'package.json'),+ join(pkgDir, 'tsdown.config.ts'),+ join(repoRoot, 'packages', 'dsh-tauri-tsdown', 'src'),+ ...['package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'tailwind.config.js', 'tailwind.plugins.config.js']+ .map(file => join(repoRoot, file)),+ ].flatMap(inputFiles)+ const oldestEntry = Math.min(...entries.map(entry => statSync(entry).mtimeMs))+ const newerInput = inputs.find(input => statSync(input).mtimeMs > oldestEntry)+ if (newerInput)+ throw new Error(`${pkg} 构建产物已过期:${relative(repoRoot, newerInput)} 新于运行入口;请在 CI 运行 pnpm build:plugins 后验证,不能用旧产物宣称通过。`)+}diff --git a/test/e2e/support/browser.ts b/test/e2e/support/browser.tsindex fb870db4..f591207c 100644--- a/test/e2e/support/browser.ts+++ b/test/e2e/support/browser.ts@@ -47,13 +47,13 @@ export const PET_MENU_PATCHED = '[data-dsh-tauri-pet-menu-patched="1"]'/** dsh 内部结构(上游产物):可用稳定结构性锚点。 */export const SIDEBAR = '[data-slot="sidebar"]'export const SIDEBAR_PANELLIST = '[data-slot="sidebar.panellist"]'-export const SETTINGS_TRIGGER = '[data-settings-trigger]'+export const SETTINGS_TRIGGER = '[data-settings-trigger], [data-slot="settings.launcher"] button[aria-haspopup]'export const SETTINGS_SIDEBAR = '[data-slot-sidebar="dsh-tauri-ui"]'export const SETTINGS_SECTION_SLOT = '[data-slot="settings.section"]'export const SETTINGS_NAV_ITEM = 'nav[aria-label] button'/** 壳层自有设置菜单(浏览器态)的条目:官方 primitives 的 portal Menu 条目。 */export const SETTINGS_MENU_ITEM = '[role="menuitem"]'-export const SETTINGS_MENU_LABEL = /^(设置|Settings)$/+export const SETTINGS_MENU_LABEL = /^(设置|Settings)/export const SETTINGS_CONTENT = '[data-slot="settings.content"]'export const SETTINGS_ONBOARDING = '[data-slot="settings.onboarding"]'export const COMPOSER_CARD = '[data-composer-card]'@@ -532,7 +532,7 @@ async function dismissOneModal(/*** 确保帧内无阻塞弹层(可重入的闸)。- * `discoveryMs` 只延长「尚未发现弹层」的启动观察期;发现并关闭后仍沿用 300ms 复核。+ * 首次启动的每段引导都可能延迟挂载,关闭一段后重新开始发现窗口。*/export async function dismissAppModals(page: Page,@@ -545,12 +545,12 @@ export async function dismissAppModals(let discoveryDeadline = Math.min(deadline, Date.now() + discoveryMs)while (Date.now() < deadline) {if (await dismissOneModal(page, frame, fallbacks)) {- discoveryDeadline = Date.now()+ discoveryDeadline = Math.min(deadline, Date.now() + discoveryMs)continue}await delay(300)if (await dismissOneModal(page, frame, fallbacks)) {- discoveryDeadline = Date.now()+ discoveryDeadline = Math.min(deadline, Date.now() + discoveryMs)continue}if (Date.now() >= discoveryDeadline)@@ -564,6 +564,9 @@ export async function dismissAppModals()}+/** 引导弹层里「改用 API Key」的入口(rc.1 账号包在凭据弹层前先渲染登录/API Key 二选一)。 */+const API_KEY_ENTRY = /^(添加 API Key|Add API Key)$/+/** 等「带凭据输入的 API Key 引导弹层」,返回它的 locator。 */export async function waitForCredentialModal(page: Page,@@ -579,13 +582,28 @@ export async function waitForCredentialModal(}if (await frame.locator(APP_MODAL).count() > 0) {+ const apiKeyEntry = frame.locator(APP_MODAL).first().getByRole('button', { name: API_KEY_ENTRY })+ if (await apiKeyEntry.count() > 0) {+ await clickInFrame(page, apiKeyEntry.first(), fallbacks)+ continue+ }await dismissOneModal(page, frame, fallbacks)}else {await delay(300)}}- throw new Error('等待带凭据输入的 API Key 引导弹层超时')+ const report = await describePageState(page, frame)+ const dialogs = await frame.evaluate(() =>+ Array.from(document.querySelectorAll('[role="dialog"]')).map(dialog => ({+ ariaModal: dialog.getAttribute('aria-modal'),+ inputs: dialog.querySelectorAll('input,textarea').length,+ text: (dialog.textContent ?? '').trim().slice(0, 160),+ }))).catch(error => [`DIALOG_DUMP_FAILED ${(error as Error).message}`])+ throw new Error(+ `等待带凭据输入的 API Key 引导弹层超时(${timeoutMs}ms)\n`+ + `--- 弹层现场 ---\ndialogs=${JSON.stringify(dialogs)}\n--- 失败现场 ---\n${report}`,+ )}/**diff --git a/test/e2e/support/desktop.test.ts b/test/e2e/support/desktop.test.tsnew file mode 100644index 00000000..26493853--- /dev/null+++ b/test/e2e/support/desktop.test.ts@@ -0,0 +1,47 @@+import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { join } from 'node:path'+import { afterEach, describe, expect, it } from 'vitest'+import { resetTestStore } from './desktop'++const roots: string[] = []++function scratch(prefix: string): string {+ const root = mkdtempSync(join(tmpdir(), prefix))+ roots.push(root)+ return root+}++afterEach(() => {+ for (const root of roots.splice(0))+ rmSync(root, { recursive: true, force: true })+})++describe('原生配置隔离清理', () => {+ it('仅删除本次 scratch 的测试 Store,保留同目录其他配置', async () => {+ const root = scratch('dsh-e2e-desktop-')+ const data = join(root, 'app-data')+ mkdirSync(data)+ const testStore = join(data, '.store.test.dat')+ const productionStore = join(data, '.store.dat')+ const developmentStore = join(data, '.store.dev.dat')+ writeFileSync(testStore, 'test')+ writeFileSync(productionStore, 'production')+ writeFileSync(developmentStore, 'development')+ await resetTestStore(root)+ expect(existsSync(testStore), '独占测试配置必须被删除').toBe(false)+ expect(readFileSync(productionStore, 'utf8'), '清理不得波及生产配置').toBe('production')+ expect(readFileSync(developmentStore, 'utf8'), '清理不得波及开发配置').toBe('development')+ await expect(resetTestStore(root), '重复清理必须安全').resolves.toBeUndefined()+ })++ it('非专用根必须拒绝,不能靠调用方路径删除配置', async () => {+ const root = scratch('dsh-store-negative-')+ const data = join(root, 'app-data')+ mkdirSync(data)+ const store = join(data, '.store.test.dat')+ writeFileSync(store, 'must survive')+ await expect(resetTestStore(root), '未标记的目录即使在 Temp 中也不能清理').rejects.toThrow('仅可使用系统临时目录')+ expect(readFileSync(store, 'utf8'), '被拒绝目录内容必须不变').toBe('must survive')+ })+})diff --git a/test/e2e/support/desktop.ts b/test/e2e/support/desktop.tsindex db5abc10..4cd9102b 100644--- a/test/e2e/support/desktop.ts+++ b/test/e2e/support/desktop.ts@@ -1,14 +1,15 @@import type { Buffer } from 'node:buffer'import { spawn } from 'node:child_process'import { existsSync } from 'node:fs'-import { mkdir, readdir, rm, stat } from 'node:fs/promises'+import { mkdir, mkdtemp, realpath, rm } from 'node:fs/promises'import { createConnection } from 'node:net'import { tmpdir } from 'node:os'-import { dirname, join, resolve } from 'node:path'+import { basename, dirname, join, resolve } from 'node:path'import process from 'node:process'import { setTimeout as sleep } from 'node:timers/promises'import { fileURLToPath } from 'node:url'import { cleanupWdioSession, createTauriCapabilities, startWdioSession } from '@wdio/tauri-service'+import { assertDesktopArtifactsCurrent } from './artifacts'// ============================================================================// 常量定义@@ -38,9 +39,6 @@ const TEST_STORE_FILE = '.store.test.dat'/** scratch home 的目录前缀。 */const SCRATCH_PREFIX = 'dsh-e2e-desktop-'-/** 只清理超过该年龄的残留:足够避开并发会话正在使用的 scratch (30 分钟)。 */-const STALE_HOME_AGE_MS = 30 * 60 * 1000-/** WDIO 会话建立上限。 */const SESSION_TIMEOUT_MS = 120_000@@ -128,13 +126,9 @@ export async function startDesktopApp(options: StartDesktopAppOptions = {}): Proawait assertPreconditions({ binaryPath })}- // 触发后台异步垃圾回收与 Store 重置(非阻塞)- void purgeStaleHomes()- const resetStorePromise = resetStore ? resetTestStore() : Promise.resolve()-- const home = options.homeDir ?? makeHome(keepHome)-- // 并行初始化目录与重置 Store+ const home = options.homeDir+ ? await assertScratchHome(options.homeDir)+ : await mkdtemp(join(await realpath(tmpdir()), SCRATCH_PREFIX))const coldCache = options.coldCache ?? process.env.DSH_E2E_COLD_ASSEMBLY === '1'const cacheDir = options.downloadCacheDir?? (coldCache@@ -144,15 +138,28 @@ export async function startDesktopApp(options: StartDesktopAppOptions = {}): Proawait Promise.all([ensureHomeDirs(home),mkdir(cacheDir, { recursive: true }),- resetStorePromise,+ resetStore ? resetTestStore(home) : Promise.resolve(),])const profile = join(home, 'home')+ const local = join(profile, 'AppData', 'Local')const env: Record<string, string> = {USERPROFILE: profile,HOME: profile,+ APPDATA: join(profile, 'AppData', 'Roaming'),+ LOCALAPPDATA: local,+ XDG_CONFIG_HOME: join(profile, '.config'),+ XDG_CACHE_HOME: join(profile, '.cache'),+ XDG_DATA_HOME: join(profile, '.local', 'share'),+ DSH_HOME: join(profile, '.dsh.dev'),+ DSH_E2E_HOME: home,DSH_DOWNLOAD_CACHE_DIR: cacheDir,DSH_E2E_WEBVIEW_DATA_DIR: join(home, 'webview2'),+ PNPM_HOME: join(local, 'pnpm'),+ COREPACK_HOME: join(local, 'corepack'),+ npm_config_userconfig: join(profile, '.npmrc'),+ NPM_CONFIG_USERCONFIG: join(profile, '.npmrc'),+ npm_config_cache: join(profile, '.npm'),}const capabilities = createTauriCapabilities(binaryPath, {@@ -187,11 +194,11 @@ export async function startDesktopApp(options: StartDesktopAppOptions = {}): Pro}}- // 并行执行孤儿进程清理与端口释放等待,提升收尾效率await Promise.all([killOrphanHarness(cacheDir),waitForPortRelease(WEBDRIVER_PORT, 20),])+ await waitForPortRelease(APP_PORT, 20)if (keepHome || stopOptions.keepHome) {log(`保留 scratch home:${home}`)@@ -270,10 +277,16 @@ async function waitForPortRelease(port: number, maxAttempts = 20): Promise<void>}}-/** 应用真实 app-data 目录。 */-function getAppDataDir(): string {- const roaming = process.env.APPDATA ?? join(process.env.USERPROFILE ?? '', 'AppData', 'Roaming')- return join(roaming, 'dsh-tauri')+/**+ * 清理本车道遗留的 dsh 服务进程(其命令行携带下载缓存目录)。+ */+async function killOrphanHarness(cacheDir: string): Promise<void> {+ if (process.platform !== 'win32')+ return++ const safePattern = cacheDir.replace(/'/g, '\'\'')+ const script = `Get-CimInstance Win32_Process -Filter "Name='node.exe'" | Where-Object { $_.CommandLine -like '*${safePattern}*' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }`+ await execPowerShell(script)}/** 执行 PowerShell 命令的轻量辅助封装。 */@@ -292,19 +305,6 @@ function execPowerShell(script: string): Promise<string> {})}-/**- * 清理本车道遗留的 dsh 服务进程。- */-async function killOrphanHarness(cacheDir: string): Promise<void> {- if (process.platform !== 'win32')- return-- // PowerShell 路径单引号安全转义- const safePattern = cacheDir.replace(/'/g, '\'\'')- const script = `Get-CimInstance Win32_Process -Filter "Name='node.exe'" | Where-Object { $_.CommandLine -like '*${safePattern}*' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }`- await execPowerShell(script)-}-/*** 检查指定二进制路径是否有活动的进程。*/@@ -332,13 +332,17 @@ export async function assertPreconditions(options: { port?: number, binaryPath?:const port = options.port ?? APP_PORTconst binaryPath = options.binaryPath ?? defaultBinaryPath()+ if (process.platform !== 'win32')+ throw new Error('桌面 E2E 必须在 Windows 上运行;缺少原生 WebView2/WebDriver 环境不得跳过用例。')+if (!existsSync(binaryPath)) {throw new Error(`二进制不存在:${binaryPath};先在 src-tauri/ 下运行 \`tauri build --debug --no-bundle\`(必须带 custom-protocol,否则应用走 devUrl 而不嵌 dist)。`,)}- // 并行检测端口与残留进程,缩短校验耗时+ assertDesktopArtifactsCurrent(REPO_ROOT, binaryPath)+const [appPortBusy, webdriverPortBusy, liveProcess] = await Promise.all([isPortBusy(port),isPortBusy(WEBDRIVER_PORT),@@ -360,68 +364,16 @@ export async function assertPreconditions(options: { port?: number, binaryPath?:}}-/** 清空测试 Store(异步)。 */-export async function resetTestStore(): Promise<void> {- const file = join(getAppDataDir(), TEST_STORE_FILE)- try {- await rm(file, { force: true })- }- catch {- // 忽略文件不存在或删除失败- }+export async function resetTestStore(home: string): Promise<void> {+ const scratch = await assertScratchHome(home)+ await rm(join(scratch, 'app-data', TEST_STORE_FILE), { force: true })}-let isStaleHomesPurged = false--/**- * 异步清理历史运行残留的 scratch home(单例非阻塞执行)。- */-export async function purgeStaleHomes(): Promise<void> {- if (isStaleHomesPurged)- return- isStaleHomesPurged = true-- const root = tmpdir()- const deadline = Date.now() - STALE_HOME_AGE_MS-- try {- const entries = await readdir(root)- const candidates = entries.filter(e => e.startsWith(SCRATCH_PREFIX))-- const removePromises = candidates.map(async (entry) => {- const targetPath = join(root, entry)- try {- const stats = await stat(targetPath)- if (stats.mtimeMs <= deadline) {- await rm(targetPath, { recursive: true, force: true })- return true- }- }- catch {- // 忽略单个目录异常- }- return false- })-- const results = await Promise.all(removePromises)- const removedCount = results.filter(Boolean).length-- if (removedCount > 0) {- log(`清理历史 scratch:${removedCount} 个`)- }- }- catch {- // 忽略根目录读取异常- }-}--/** 建隔离根并派生 home 根。 */-function makeHome(keep: boolean): string {- const home = join(tmpdir(), `${SCRATCH_PREFIX}${Date.now().toString(36)}`)- if (keep) {- log(`KEEP_HOME:${home}`)- }- return home+async function assertScratchHome(home: string): Promise<string> {+ const path = await realpath(home)+ if (dirname(path) !== await realpath(tmpdir()) || !basename(path).startsWith(SCRATCH_PREFIX))+ throw new Error(`桌面 E2E 仅可使用系统临时目录下的 ${SCRATCH_PREFIX} 独占根:${home}`)+ return path}/** 建立隔离根内的 profile 目录。 */diff --git a/test/e2e/support/dsh.test.ts b/test/e2e/support/dsh.test.tsnew file mode 100644index 00000000..b8e850cd--- /dev/null+++ b/test/e2e/support/dsh.test.ts@@ -0,0 +1,128 @@+import { existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { join, relative } from 'node:path'+import process from 'node:process'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { isolatedDshEnv, patchCoreClients, resolveDshCommand, startDshProcess } from './dsh'++let root: string++function cli(version: string): string {+ const packageRoot = join(root, 'cli', 'node_modules', '@deepseek-ai', 'dsh')+ mkdirSync(join(packageRoot, 'lib'), { recursive: true })+ writeFileSync(join(packageRoot, 'package.json'), JSON.stringify({ version }))+ const entry = join(packageRoot, 'lib', 'bin.js')+ writeFileSync(entry, '')+ return entry+}++beforeEach(() => {+ root = mkdtempSync(join(tmpdir(), 'dsh-e2e-isolation-test-'))+ vi.stubEnv('DSH_E2E_DSH_BIN', undefined)+ vi.stubEnv('DSH_E2E_CORE_VERSION', undefined)+})++afterEach(() => {+ vi.unstubAllEnvs()+ rmSync(root, { recursive: true, force: true })+})++describe('独立 CLI 与用户目录隔离', () => {+ it('缺少显式 CLI 直接失败,禁止用户运行时回退', () => {+ expect(() => resolveDshCommand(), '缺环境不得使用真实用户安装').toThrow('请设置 DSH_E2E_DSH_BIN')+ })++ it('相对入口和不存在入口直接失败', () => {+ vi.stubEnv('DSH_E2E_DSH_BIN', 'lib/bin.js')+ expect(() => resolveDshCommand(), '相对路径不得隐式解析到仓库').toThrow('绝对路径')+ vi.stubEnv('DSH_E2E_DSH_BIN', join(root, 'missing.js'))+ expect(() => resolveDshCommand(), '缺入口不得回退到其他核心').toThrow('绝对路径')+ })++ it.each(['0.1.5-rc.2', '0.1.7-beta.1', 'unknown'])('拒绝最低基线之前或非法的版本:%s', (version) => {+ vi.stubEnv('DSH_E2E_DSH_BIN', cli(version))+ expect(() => resolveDshCommand(), '老核心不得继续作为适配基线').toThrow('最低版本为 0.1.7-rc.1')+ })++ it.each(['0.1.7-rc.1', '0.2.1-rc.1'])('独立实物 CLI 精确匹配时放行:%s', (version) => {+ const entry = cli(version)+ vi.stubEnv('DSH_E2E_DSH_BIN', entry)+ vi.stubEnv('DSH_E2E_CORE_VERSION', version)+ expect(resolveDshCommand(), '必须解析到实际隔离安装,而不是另一版本').toEqual([realpathSync(entry)])+ })++ it('声明版本与实际包不一致必须失败', () => {+ vi.stubEnv('DSH_E2E_DSH_BIN', cli('0.1.7-rc.1'))+ vi.stubEnv('DSH_E2E_CORE_VERSION', '0.2.1-rc.1')+ expect(() => resolveDshCommand(), '错误版本 lane 不得被当成已验证').toThrow('要求 0.2.1-rc.1,实际 0.1.7-rc.1')+ })++ it.each(['package', 'file', 'ancestor'])('补丁目标经 %s 外链越界时必须在读取前拒绝', (layout) => {+ const entry = cli('0.2.1-rc.1')+ vi.stubEnv('DSH_E2E_DSH_BIN', entry)+ const outside = join(root, 'outside', 'node_modules', '@deepseek-ai', 'dsh-client-ui-renderer')+ mkdirSync(join(outside, 'lib'), { recursive: true })+ const target = join(outside, 'lib', 'client.js')+ const source = 'return module.exports;\n'+ writeFileSync(target, source)+ const scoped = join(root, 'cli', 'node_modules', '@deepseek-ai')+ if (layout === 'package') {+ symlinkSync(outside, join(scoped, 'dsh-client-ui-renderer'), process.platform === 'win32' ? 'junction' : 'dir')+ }+ else if (layout === 'file') {+ const nested = join(scoped, 'dsh-client-ui-renderer')+ mkdirSync(nested, { recursive: true })+ symlinkSync(join(outside, 'lib'), join(nested, 'lib'), process.platform === 'win32' ? 'junction' : 'dir')+ }+ else {+ mkdirSync(join(root, 'node_modules', '@deepseek-ai'), { recursive: true })+ symlinkSync(outside, join(root, 'node_modules', '@deepseek-ai', 'dsh-client-ui-renderer'), process.platform === 'win32' ? 'junction' : 'dir')+ writeFileSync(join(outside, 'package.json'), JSON.stringify({ exports: { './client': './lib/client.js' } }))+ }+ expect(() => patchCoreClients(entry), '包链接、文件链接与祖先解析都不得越出安装根').toThrow('补丁目标越出独立安装根')+ expect(readFileSync(target, 'utf8'), '外部客户端内容必须完全未被写入').toBe(source)+ })++ it('真实无效 Node 命令立即失败并清理 profile,不等待就绪超时', async () => {+ const entry = cli('0.2.1-rc.1')+ vi.stubEnv('DSH_E2E_DSH_BIN', entry)+ vi.stubEnv('DSH_E2E_NODE_BIN', join(root, 'missing-node'))+ const scoped = join(root, 'cli', 'node_modules', '@deepseek-ai')+ for (const [pkg, source] of [+ ['dsh-client-ui-renderer', 'exports.SlotOutlet = SlotOutlet;\nreturn module.exports;\n'],+ ['dsh-client-ui-conversation', 'dsh-tauri: composer stays usable for a session outside every workspace\n'],+ ]) {+ const lib = join(scoped, pkg, 'lib')+ mkdirSync(lib, { recursive: true })+ writeFileSync(join(lib, 'client.js'), source)+ }+ const home = join(root, 'dsh-e2e-process-failure')+ const profileDir = join(home, 'profiles', 'web')+ mkdirSync(profileDir, { recursive: true })+ const started = Date.now()+ await expect(startDshProcess({ home, profileDir, packages: [] }, entry), 'spawn ENOENT 必须以可诊断拒绝返回').rejects.toThrow(/dsh web 启动失败.*ENOENT/)+ expect(Date.now() - started, '错误不能变成 120 秒超时').toBeLessThan(10_000)+ expect(existsSync(home), 'spawn 失败必须回收独占 profile 与日志句柄').toBe(false)+ })++ it('构造子进程环境时隔离全部用户根并去除冒充桌面标记', () => {+ vi.stubEnv('DSH_TAURI_EMBEDDED', '1')+ vi.stubEnv('DSH_E2E_HOME', 'parent-scratch')+ vi.stubEnv('HOME', 'real-user-sentinel')+ vi.stubEnv('USERPROFILE', 'real-user-sentinel')+ const env = isolatedDshEnv(root)+ expect(env.DSH_HOME, '核心状态只能写本次 scratch').toBe(root)+ for (const key of ['HOME', 'USERPROFILE', 'APPDATA', 'LOCALAPPDATA', 'XDG_CONFIG_HOME', 'XDG_CACHE_HOME', 'XDG_DATA_HOME', 'PNPM_HOME', 'COREPACK_HOME', 'npm_config_userconfig', 'npm_config_cache']) {+ const path = env[key]!+ expect(relative(root, path).startsWith('..'), `${key} 必须位于 scratch 内`).toBe(false)+ }+ for (const key of ['HOME', 'USERPROFILE', 'APPDATA', 'LOCALAPPDATA', 'XDG_CONFIG_HOME', 'XDG_CACHE_HOME', 'XDG_DATA_HOME', 'PNPM_HOME'])+ expect(existsSync(env[key]!), `${key} 目录必须已实际创建`).toBe(true)+ expect(readFileSync(env.npm_config_userconfig!, 'utf8'), '不得继承用户 npm 凭据').toBe('')+ expect(env.NPM_CONFIG_USERCONFIG, '大小写配置必须指向同一隔离文件').toBe(env.npm_config_userconfig)+ expect(env.DSH_TAURI_EMBEDDED, '普通 web 不得继承桌面 admission').toBeUndefined()+ expect(env.DSH_E2E_HOME, '子核心不得继承另一原生测试隔离根').toBeUndefined()+ expect(process.env.HOME, '环境生成不得改写调用方进程').toBe('real-user-sentinel')+ expect(process.env.DSH_TAURI_EMBEDDED, '不得影响调用方 admission 状态').toBe('1')+ })+})diff --git a/test/e2e/support/dsh.ts b/test/e2e/support/dsh.tsindex 16fd8e93..36badca8 100644--- a/test/e2e/support/dsh.ts+++ b/test/e2e/support/dsh.ts@@ -1,15 +1,16 @@import type { ChildProcess } from 'node:child_process'+import type { WriteStream } from 'node:fs'import { spawn } from 'node:child_process'-import { createWriteStream, existsSync, mkdirSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'+import { createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'import { createRequire } from 'node:module'import { tmpdir } from 'node:os'-import { basename, dirname, join, resolve } from 'node:path'+import { basename, dirname, isAbsolute, join, relative, resolve } from 'node:path'import process from 'node:process'import { createInterface } from 'node:readline'import { finished } from 'node:stream/promises'import { fileURLToPath } from 'node:url'--const require = createRequire(import.meta.url)+import { gte, valid } from 'semver'+import { assertPluginArtifactsCurrent } from './artifacts'/** 仓库根目录(本文件位于 `<root>/test/e2e/support/`)。 */export const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../../..')@@ -26,15 +27,7 @@ const READY_RE = /http:\/\/127\.0\.0\.1:\d\S*//** 就绪等待上限(冷启 dsh web + 插件装配)。 */const READY_TIMEOUT_MS = 120_000-/** 预定义 app-data 相对路径节点 */-const APPDATA_BASE = process.env.APPDATA ?? ''-const DSH_BIN_REL_PATH = join('dependencies', 'dsh', 'node_modules', '@deepseek-ai', 'dsh', 'lib', 'bin.js')--/** 桌面端已装配的 dsh 入口(无 PATH 上的 dsh 时的兜底)。 */-const ASSEMBLED_DSH = join(APPDATA_BASE, 'dsh-tauri', DSH_BIN_REL_PATH)--/** 标识符改名前的 Legacy 装配目录(兼容旧机器)。 */-const LEGACY_ASSEMBLED_DSH = join(APPDATA_BASE, 'io.github.hairyf.deepseek-harness-desktop', DSH_BIN_REL_PATH)+const MINIMUM_CORE_VERSION = '0.1.7-rc.1'/* ==========================================* 类型定义 (Type Definitions)@@ -60,6 +53,7 @@ export interface DshProfile {}export interface DshHost {+ readonly coreVersion: string/** 带一次性 token 的就绪 URL;`baseUrl` 用于 HTTP 断言。 */readonly url: string/** 裸 origin(`http://127.0.0.1:<port>`)。 */@@ -136,30 +130,26 @@ function tailOf(path: string, lines = 30): string {* 业务逻辑与依赖解析* ========================================== */-/**- * 解析 dsh 入口:显式环境变量 → 依赖树里的 `@deepseek-ai/dsh/lib/bin.js` → 桌面端装配目录- */-export function resolveDshCommand(): string[] {- const explicit = process.env.DSH_E2E_DSH_BIN- if (explicit)- return [explicit]-- try {- return [require.resolve('@deepseek-ai/dsh/lib/bin.js')]- }- catch {- // 仓库未直接依赖 dsh CLI 时忽略- }-- if (existsSync(ASSEMBLED_DSH))- return [ASSEMBLED_DSH]- if (existsSync(LEGACY_ASSEMBLED_DSH))- return [LEGACY_ASSEMBLED_DSH]+function isWithin(root: string, target: string): boolean {+ const path = relative(root, target)+ return path === '' || (!isAbsolute(path) && path !== '..' && !path.startsWith('../') && !path.startsWith('..\\'))+}- throw new Error(- 'DSH_E2E_DSH_BIN 未设置,PATH 与桌面端装配目录都没有 dsh 入口;'- + '请设置 DSH_E2E_DSH_BIN 指向 @deepseek-ai/dsh 的 lib/bin.js',- )+export function resolveDshCommand(): string[] {+ const explicit = process.env.DSH_E2E_DSH_BIN?.trim()+ if (!explicit || !isAbsolute(explicit) || !existsSync(explicit))+ throw new Error('请设置 DSH_E2E_DSH_BIN 为系统临时目录中独立安装的 @deepseek-ai/dsh/lib/bin.js 绝对路径。')+ const dshBin = realpathSync(explicit)+ const tempRoots = [tmpdir(), process.env.RUNNER_TEMP].filter((root): root is string => Boolean(root))+ if (!tempRoots.some(root => isWithin(realpathSync(root), dshBin)) || isWithin(REPO_ROOT, dshBin))+ throw new Error('DSH_E2E_DSH_BIN 必须使用系统临时目录中的独立 CLI,禁止修改用户或运行时核心。')+ const version = coreVersion(dshBin)+ if (!valid(version) || !gte(version, MINIMUM_CORE_VERSION))+ throw new Error(`E2E 核心版本 ${version} 不受支持;最低版本为 ${MINIMUM_CORE_VERSION}。`)+ const expected = process.env.DSH_E2E_CORE_VERSION+ if (expected && version !== expected)+ throw new Error(`E2E 核心版本不匹配:要求 ${expected},实际 ${version}。`)+ return [dshBin]}/** 从 dsh 入口反推核心版本;读不到返回 `unknown`(仅用于日志)。 */@@ -168,26 +158,37 @@ function coreVersion(dshBin: string): string {return readJson<PkgManifest>(manifestPath)?.version ?? 'unknown'}-/** 校验插件已构建 */-function assertBuilt(pkgDir: string, pkg: string): void {- const manifest = readJson<PkgManifest>(join(pkgDir, 'package.json')) ?? {}- const main = manifest.main ?? './dist/index.js'- const hostEntry = join(pkgDir, main.replace(/^\.\//, ''))-- if (!existsSync(hostEntry)) {- throw new Error(- `${pkg} 尚未构建:缺少 ${hostEntry}。先跑一次 \`pnpm build:plugins\`(或 \`pnpm --filter ${pkg} build\`)。`,- )+export function isolatedDshEnv(home: string): NodeJS.ProcessEnv {+ const userHome = join(home, 'user-home')+ const roaming = join(userHome, 'AppData', 'Roaming')+ const local = join(userHome, 'AppData', 'Local')+ const paths = {+ HOME: userHome,+ USERPROFILE: userHome,+ APPDATA: roaming,+ LOCALAPPDATA: local,+ XDG_CONFIG_HOME: join(userHome, '.config'),+ XDG_CACHE_HOME: join(userHome, '.cache'),+ XDG_DATA_HOME: join(userHome, '.local', 'share'),+ PNPM_HOME: join(local, 'pnpm'),}-- const client = manifest.exports?.['./client']- const clientEntry = typeof client === 'string'- ? client- : (client as { default?: string } | undefined)?.default-- if (clientEntry !== undefined && !existsSync(join(pkgDir, clientEntry.replace(/^\.\//, '')))) {- throw new Error(`${pkg} 的 client 产物缺失:${clientEntry};先跑一次 \`pnpm build:plugins\`。`)+ for (const path of Object.values(paths))+ mkdirSync(path, { recursive: true })+ const userConfig = join(userHome, '.npmrc')+ if (!existsSync(userConfig))+ writeFileSync(userConfig, '')+ const env: NodeJS.ProcessEnv = {+ ...process.env,+ ...paths,+ DSH_HOME: home,+ npm_config_userconfig: userConfig,+ NPM_CONFIG_USERCONFIG: userConfig,+ npm_config_cache: join(userHome, '.npm'),+ COREPACK_HOME: join(local, 'corepack'),}+ delete env.DSH_TAURI_EMBEDDED+ delete env.DSH_E2E_HOME+ return env}/** 写 scratch profile 三件套(镜像 dsh 的 profile 模板)。 */@@ -320,10 +321,8 @@ function patchRendererSlotOutlet(dshBin: string): void {const coreDir = dirname(dirname(dshBin))const target = locateCoreClient(coreDir, RENDERER_PACKAGE)- if (target === undefined) {- log(`⚠️ 未找到 renderer 客户端产物,跳过 SlotOutlet 补丁(core: ${coreDir})`)- return- }+ if (target === undefined)+ throw new Error(`未找到 renderer 客户端产物,无法施加 SlotOutlet 补丁:${coreDir}`)const source = readFileSync(target, 'utf8')if (source.includes('exports.SlotOutlet'))@@ -333,10 +332,8 @@ function patchRendererSlotOutlet(dshBin: string): void {const lineStart = anchor < 0 ? -1 : source.lastIndexOf('\n', anchor) + 1const indent = lineStart < 0 ? '' : source.slice(lineStart, anchor)- if (lineStart < 0 || !/^[\t ]*$/.test(indent)) {- log(`⚠️ renderer 产物缺少可用的导出锚点 "${RENDERER_EXPORT_ANCHOR}",跳过 SlotOutlet 补丁:${target}`)- return- }+ if (lineStart < 0 || !/^[\t ]*$/.test(indent))+ throw new Error(`renderer 产物缺少导出锚点 "${RENDERER_EXPORT_ANCHOR}":${target}`)writeFileSync(target,@@ -347,19 +344,32 @@ function patchRendererSlotOutlet(dshBin: string): void {/** 核心客户端产物定位:核心自带嵌套依赖 → 安装根提升产物 → Node 子路径解析。 */function locateCoreClient(coreDir: string, pkg: string): string | undefined {+ const installationRoot = realpathSync(resolve(coreDir, '../../..'))+ if (basename(coreDir) !== 'dsh' || basename(dirname(coreDir)) !== '@deepseek-ai' || basename(dirname(dirname(coreDir))) !== 'node_modules')+ throw new Error(`核心必须来自独立 npm 安装根:${coreDir}`)const relPath = join('@deepseek-ai', pkg, 'lib', 'client.js')const candidates = [join(coreDir, 'node_modules', relPath), join(dirname(dirname(coreDir)), relPath)]-- const direct = candidates.find(candidate => existsSync(candidate))- if (direct !== undefined)- return direct-- try {- return createRequire(join(coreDir, 'package.json')).resolve(`@deepseek-ai/${pkg}/client`)- }- catch {- return undefined+ let candidate = candidates.find(path => existsSync(path))+ if (candidate === undefined) {+ try {+ candidate = createRequire(join(coreDir, 'package.json')).resolve(`@deepseek-ai/${pkg}/client`)+ }+ catch {+ return undefined+ }}+ const target = realpathSync(candidate)+ if (!isWithin(installationRoot, target))+ throw new Error(`核心客户端补丁目标越出独立安装根,拒绝读取或修改:${target}`)+ return target+}++export function patchCoreClients(dshBin: string): void {+ const [isolatedBin] = resolveDshCommand()+ if (realpathSync(dshBin) !== isolatedBin)+ throw new Error('核心补丁入口必须与隔离 CLI 完全一致。')+ patchRendererSlotOutlet(isolatedBin)+ patchComposerCwd(isolatedBin)}/**@@ -376,10 +386,8 @@ function patchComposerCwd(dshBin: string): void {const coreDir = dirname(dirname(dshBin))const target = locateCoreClient(coreDir, CONVERSATION_PACKAGE)- if (target === undefined) {- log(`⚠️ 未找到 conversation 客户端产物,跳过 composer 补丁(core: ${coreDir})`)- return- }+ if (target === undefined)+ throw new Error(`未找到 conversation 客户端产物,无法施加 composer 补丁:${coreDir}`)const source = readFileSync(target, 'utf8')if (source.includes(COMPOSER_PATCH_MARKER))@@ -389,18 +397,14 @@ function patchComposerCwd(dshBin: string): void {// 反过来的优先级会让注释里的同形文本把补丁误判成已修,声明了能力却漏放宽。const needsRelax = source.includes(COMPOSER_INERT_ORIGINAL)const upstreamFixed = !needsRelax && source.includes(COMPOSER_INERT_PATCHED)- if (!needsRelax && !upstreamFixed) {- log(`⚠️ conversation 产物缺少 composer 语句锚点,跳过 composer 补丁:${target}`)- return- }+ if (!needsRelax && !upstreamFixed)+ throw new Error(`conversation 产物缺少 composer 语句锚点:${target}`)const anchor = source.indexOf(RENDERER_EXPORT_ANCHOR)const lineStart = anchor < 0 ? -1 : source.lastIndexOf('\n', anchor) + 1const indent = lineStart < 0 ? '' : source.slice(lineStart, anchor)- if (lineStart < 0 || !/^[\t ]*$/.test(indent)) {- log(`⚠️ conversation 产物缺少可用的导出锚点 "${RENDERER_EXPORT_ANCHOR}",跳过 composer 补丁:${target}`)- return- }+ if (lineStart < 0 || !/^[\t ]*$/.test(indent))+ throw new Error(`conversation 产物缺少导出锚点 "${RENDERER_EXPORT_ANCHOR}":${target}`)const marker = `${indent}if (typeof document !== "undefined") document.documentElement.setAttribute("${COMPOSER_CWD_ATTRIBUTE}", "1"); /* ${COMPOSER_PATCH_MARKER} */\n`const withMarker = `${source.slice(0, lineStart)}${marker}${source.slice(lineStart)}`@@ -461,8 +465,7 @@ async function mountViaCli(profileDir: string, home: string, pkgs: readonly striconst [dshBin] = resolveDshCommand()const storeDir = process.env.DSH_E2E_PNPM_STORE_DIRconst env: NodeJS.ProcessEnv = {- ...process.env,- DSH_HOME: home,+ ...isolatedDshEnv(home),...(storeDir ? { npm_config_store_dir: storeDir, pnpm_config_store_dir: storeDir } : {}),}@@ -496,43 +499,43 @@ async function killTree(child: ChildProcess): Promise<void> {/*** 实时从进程流解析 Ready 状态,避免频繁全量读磁盘 logPath*/-async function waitForReadyStream(child: ChildProcess, logPath: string): Promise<string> {+async function waitForReadyStream(child: ChildProcess, logPath: string, logStream: WriteStream): Promise<string> {return new Promise<string>((resolve, reject) => {let timer: NodeJS.Timeout-+ const readers = [child.stdout, child.stderr].flatMap(input => input ? [createInterface({ input })] : [])const cleanup = () => {clearTimeout(timer)child.off('exit', onExit)+ child.off('error', onError)+ logStream.off('error', onError)+ for (const reader of readers) {+ reader.removeAllListeners('line')+ reader.close()+ }+ }+ function onError(error: Error): void {+ cleanup()+ reject(new Error(`dsh web 启动失败:${error.message};日志:${logPath}`, { cause: error }))}-function onExit(code: number | null): void {cleanup()reject(new Error(`dsh web 提前退出(code ${code});日志:${logPath}\n${tailOf(logPath)}`))}-timer = setTimeout(() => {cleanup()reject(new Error(`等待 dsh web 就绪超时(${READY_TIMEOUT_MS}ms);日志:${logPath}\n${tailOf(logPath)}`))}, READY_TIMEOUT_MS)-- child.on('exit', onExit)-- const checkLine = (line: string) => {- const match = READY_RE.exec(line)- if (match) {- cleanup()- resolve(match[0])- }- }-- if (child.stdout) {- const rlOut = createInterface({ input: child.stdout })- rlOut.on('line', checkLine)- }-- if (child.stderr) {- const rlErr = createInterface({ input: child.stderr })- rlErr.on('line', checkLine)+ child.once('exit', onExit)+ child.once('error', onError)+ logStream.once('error', onError)+ for (const reader of readers) {+ reader.on('line', (line: string) => {+ const match = READY_RE.exec(line)+ if (match) {+ cleanup()+ resolve(match[0])+ }+ })}})}@@ -545,9 +548,7 @@ async function exchangeLaunchToken(url: string): Promise<string> {const response = await fetch(launch.href, { redirect: 'manual' })- // 兼容 Node.js fetch API 的 getSetCookie 规范- const getSetCookieFn = (response.headers as unknown as { getSetCookie?: () => string[] }).getSetCookie- const setCookies = getSetCookieFn?.call(response.headers) ?? []+ const setCookies = response.headers.getSetCookie()const first = setCookies[0] ?? response.headers.get('set-cookie')if (response.status !== 303 || !first) {@@ -569,13 +570,12 @@ async function exchangeLaunchToken(url: string): Promise<string> {*/export async function scaffoldDshProfile(options: StartDshHostOptions): Promise<DshProfile> {const { plugin, also = [] } = options- const packages = [...also, plugin]+ const packages = [...new Set([...also, plugin])]- for (const pkg of packages) {- assertBuilt(join(REPO_ROOT, 'packages', pkg), pkg)- }+ for (const pkg of packages)+ assertPluginArtifactsCurrent(REPO_ROOT, pkg)- const home = join(tmpdir(), `dsh-e2e-${plugin}-${Date.now().toString(36)}`)+ const home = mkdtempSync(join(tmpdir(), `dsh-e2e-${plugin}-`))const profileDir = join(home, 'profiles', PROFILE)const bundles = ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app', ...packages]@@ -608,61 +608,49 @@ export async function scaffoldDshProfile(options: StartDshHostOptions): Promise<* 调用方负责 `stop()`(globalSetup/globalTeardown 保证)。*/export async function startDshHost(options: StartDshHostOptions): Promise<DshHost> {- const { keepHome = false } = options-const [dshBin] = resolveDshCommand()- patchRendererSlotOutlet(dshBin)- patchComposerCwd(dshBin)+ const profile = await scaffoldDshProfile(options)+ return startDshProcess(profile, dshBin, options.keepHome ?? false)+}- const { home, profileDir, packages } = await scaffoldDshProfile(options)+export async function startDshProcess(profile: DshProfile, dshBin: string, keepHome = false): Promise<DshHost> {+ const { home, profileDir, packages } = profile+ if (!isWithin(realpathSync(tmpdir()), realpathSync(home)) || !basename(home).startsWith('dsh-e2e-') || !isWithin(realpathSync(home), realpathSync(profileDir)))+ throw new Error('DSH 进程仅可使用系统临时目录内的独占 E2E profile。')const logPath = join(home, 'dsh-web.log')-- const args = [dshBin, 'web', '--host', '127.0.0.1', '--port', '0', '--no-open']-- const profile = basename(home)- log(`🚀 挂载 DSH 核心 [${coreVersion(dshBin)}] (profile: ${profile})`)- log(`└─ 路径: ${dshBin}`)-- const logStream = createWriteStream(logPath, { flags: 'a' })-- const child = spawn(resolveNodeBin(), args, {- cwd: profileDir,- env: { ...process.env, DSH_HOME: home },- stdio: ['ignore', 'pipe', 'pipe'],- windowsHide: true,- })-- // 同时将数据流写入日志文件- child.stdout?.pipe(logStream, { end: false })- child.stderr?.pipe(logStream, { end: false })-+ let child: ChildProcess | undefined+ let logStream: WriteStream | undefinedlet stopped = falseconst stop = async (): Promise<void> => {if (stopped)returnstopped = true-- await killTree(child)- child.stdout?.unpipe(logStream)- child.stderr?.unpipe(logStream)- logStream.end()- await finished(logStream).catch(() => {})-- if (!keepHome) {- rmSync(home, { recursive: true, force: true })+ if (child)+ await killTree(child)+ if (logStream) {+ child?.stdout?.unpipe(logStream)+ child?.stderr?.unpipe(logStream)+ logStream.end()+ await finished(logStream).catch(() => {})}+ if (!keepHome)+ rmSync(home, { recursive: true, force: true })}-try {- const url = await waitForReadyStream(child, logPath)+ patchCoreClients(dshBin)+ const env = isolatedDshEnv(home)+ const args = [dshBin, 'web', '--host', '127.0.0.1', '--port', '0', '--no-open']+ log(`挂载 DSH 核心 [${coreVersion(dshBin)}] (profile: ${basename(home)})`)+ logStream = createWriteStream(logPath, { flags: 'a' })+ child = spawn(resolveNodeBin(), args, { cwd: profileDir, env, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true })+ const ready = waitForReadyStream(child, logPath, logStream)+ child.stdout?.pipe(logStream, { end: false })+ child.stderr?.pipe(logStream, { end: false })+ const url = await readyconst baseUrl = new URL(url).originconst cookie = await exchangeLaunchToken(url)-- const mounted = packages.every(pkg => pkg.startsWith('dsh-tauri')) ? 'dsh-tauri*' : packages.join(', ')-- log(`✅ 就绪 [${baseUrl}] → ${mounted}${keepHome ? ' [keepHome]' : ''}`)-- return { url, baseUrl, cookie, home, logPath, mounted: packages, stop }+ log(`就绪 [${baseUrl}] → ${packages.join(', ')}${keepHome ? ' [keepHome]' : ''}`)+ return { coreVersion: coreVersion(dshBin), url, baseUrl, cookie, home, logPath, mounted: packages, stop }}catch (error) {await stop()diff --git a/test/e2e/support/integrations.test.ts b/test/e2e/support/integrations.test.tsnew file mode 100644index 00000000..bcef9b41--- /dev/null+++ b/test/e2e/support/integrations.test.ts@@ -0,0 +1,114 @@+import { mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { join } from 'node:path'+import process from 'node:process'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { loadManualSshFixture, manualIntegrations, requireManualIntegration } from './integrations'++const roots: string[] = []+let root: string++function temp(prefix = 'dsh-e2e-ssh-'): string {+ const path = mkdtempSync(join(tmpdir(), prefix))+ roots.push(path)+ return path+}++function fixture(overrides: Record<string, unknown> = {}): string {+ const path = join(root, 'fixture.json')+ writeFileSync(path, JSON.stringify({+ host: '127.0.0.1',+ port: 2222,+ user: 'test',+ remotePort: 3080,+ hostKeySha256: 'A'.repeat(43),+ password: 'dedicated-test-only',+ ...overrides,+ }))+ vi.stubEnv('DSH_E2E_SSH_FIXTURE', path)+ return path+}++beforeEach(() => {+ root = temp()+ for (const key of ['CI', 'GITHUB_ACTIONS', 'DSH_E2E_INTEGRATIONS', 'DSH_E2E_SSH_FIXTURE'])+ vi.stubEnv(key, undefined)+})++afterEach(() => {+ vi.unstubAllEnvs()+ for (const path of roots.splice(0))+ rmSync(path, { recursive: true, force: true })+})++describe('人工外部集成必须显式、独占并拒绝 CI', () => {+ it('默认常规门禁不包含外部 SSH 或公网试验,旧环境变量不能偷偷启用', () => {+ expect(manualIntegrations({ DSH_SSH_E2E_HOST: 'dev', DSH_E2E_TUNNEL: '1' }), '旧别名不得隐式启动外部副作用').toEqual([])+ expect(() => requireManualIntegration('ssh'), '未显式选择必须失败而非跳过').toThrow('显式选择')+ expect(() => loadManualSshFixture(), '没有选择时不能读取任何 fixture').toThrow('显式选择')+ })++ it.each(['ssh', 'tunnel', 'ssh,tunnel'])('只接受显式声明的人工入口:%s', (value) => {+ expect(manualIntegrations({ DSH_E2E_INTEGRATIONS: value }), '选择结果必须精确匹配').toEqual(value.split(','))+ })++ it.each(['unknown', 'ssh,ssh', 'ssh,tunnel,', '*'])('无效或重复入口必须失败:%s', (value) => {+ expect(() => manualIntegrations({ DSH_E2E_INTEGRATIONS: value }), '配置错误不能静默忽略').toThrow('仅接受')+ })++ it.each(['CI', 'GITHUB_ACTIONS'])('即使显式选择也拒绝 %s,禁止 CI 触碰外部主机', (key) => {+ expect(() => manualIntegrations({ DSH_E2E_INTEGRATIONS: 'ssh,tunnel', [key]: 'true' }), '人工入口必须拒绝 CI').toThrow('禁止在 CI')+ })++ it('缺少 fixture 或给相对路径时失败,不尝试读取用户 SSH 配置', () => {+ vi.stubEnv('DSH_E2E_INTEGRATIONS', 'ssh')+ expect(() => loadManualSshFixture(), '缺 fixture 必须失败').toThrow('不使用用户 SSH 配置')+ vi.stubEnv('DSH_E2E_SSH_FIXTURE', 'fixture.json')+ expect(() => loadManualSshFixture(), '相对 fixture 必须失败').toThrow('不使用用户 SSH 配置')+ })++ it('没有专用目录标记的 Temp fixture 也必须拒绝', () => {+ vi.stubEnv('DSH_E2E_INTEGRATIONS', 'ssh')+ const outside = join(temp('unowned-ssh-'), 'fixture.json')+ writeFileSync(outside, '{}')+ vi.stubEnv('DSH_E2E_SSH_FIXTURE', outside)+ expect(() => loadManualSshFixture(), '临时目录不是放弃所有权的理由').toThrow('独占的系统 Temp')+ })++ it('目录外链不能把个人凭据伪装成专用 fixture', () => {+ vi.stubEnv('DSH_E2E_INTEGRATIONS', 'ssh')+ const outside = temp('unowned-ssh-')+ writeFileSync(join(outside, 'fixture.json'), '{}')+ const link = join(root, 'dsh-e2e-ssh-linked')+ symlinkSync(outside, link, process.platform === 'win32' ? 'junction' : 'dir')+ vi.stubEnv('DSH_E2E_SSH_FIXTURE', join(link, 'fixture.json'))+ expect(() => loadManualSshFixture(), '必须校验 canonical 根而非用户传入的表面路径').toThrow('独占的系统 Temp')+ })++ it.each([+ { host: 'dev' },+ { port: 0 },+ { remotePort: 65536 },+ { hostKeySha256: undefined },+ { password: undefined },+ { privateKey: {} },+ ])('别名、错误端口或缺明确凭据/指纹均必须失败:%j', (input) => {+ vi.stubEnv('DSH_E2E_INTEGRATIONS', 'ssh')+ fixture(input)+ expect(() => loadManualSshFixture(), '不能回退到用户 alias、agent、密钥或信任全部主机').toThrow('显式测试凭据')+ })++ it('只读取显式测试凭据,不读取或修改 HOME/.ssh,也不改调用进程 HOME', () => {+ vi.stubEnv('DSH_E2E_INTEGRATIONS', 'ssh')+ const home = temp('dsh-readonly-home-')+ mkdirSync(join(home, '.ssh'))+ const config = join(home, '.ssh', 'config')+ writeFileSync(config, 'Host dev\n IdentityFile must-not-read\n')+ vi.stubEnv('HOME', home)+ vi.stubEnv('USERPROFILE', home)+ fixture()+ expect(loadManualSshFixture(), '仅允许显式 fixture 凭据').toMatchObject({ host: '127.0.0.1', password: 'dedicated-test-only' })+ expect(process.env.HOME, '加载 fixture 不得改写 HOME').toBe(home)+ expect(readFileSync(config, 'utf8'), '用户 SSH 配置必须完全未变').toBe('Host dev\n IdentityFile must-not-read\n')+ })+})diff --git a/test/e2e/support/integrations.ts b/test/e2e/support/integrations.tsnew file mode 100644index 00000000..367076ac--- /dev/null+++ b/test/e2e/support/integrations.ts@@ -0,0 +1,63 @@+import { readFileSync, realpathSync } from 'node:fs'+import { isIP } from 'node:net'+import { tmpdir } from 'node:os'+import { basename, dirname, isAbsolute, relative } from 'node:path'+import process from 'node:process'++export type ManualIntegration = 'ssh' | 'tunnel'++export function manualIntegrations(env: NodeJS.ProcessEnv = process.env): ManualIntegration[] {+ const value = env.DSH_E2E_INTEGRATIONS?.trim()+ if (!value)+ return []+ if (env.CI || env.GITHUB_ACTIONS)+ throw new Error('人工外部集成禁止在 CI 运行。')+ const kinds = value.split(',')+ if (kinds.some(kind => kind !== 'ssh' && kind !== 'tunnel') || new Set(kinds).size !== kinds.length)+ throw new Error('DSH_E2E_INTEGRATIONS 仅接受 ssh、tunnel 或 ssh,tunnel。')+ return kinds as ManualIntegration[]+}++export function requireManualIntegration(kind: ManualIntegration): void {+ if (!manualIntegrations().includes(kind))+ throw new Error(`请通过 DSH_E2E_INTEGRATIONS=${kind} 显式选择人工外部集成。`)+}++export interface ManualSshFixture {+ host: string+ port: number+ user: string+ remotePort: number+ hostKeySha256: string+ privateKey?: string+ password?: string+ token?: string+}++export function loadManualSshFixture(): ManualSshFixture {+ requireManualIntegration('ssh')+ const configured = process.env.DSH_E2E_SSH_FIXTURE+ if (!configured || !isAbsolute(configured))+ throw new Error('DSH_E2E_SSH_FIXTURE 必须指向系统 Temp/dsh-e2e-ssh-*/fixture.json;不使用用户 SSH 配置。')+ const file = realpathSync(configured)+ const root = dirname(file)+ const temp = realpathSync(tmpdir())+ if (dirname(root) !== temp || !basename(root).startsWith('dsh-e2e-ssh-') || basename(file) !== 'fixture.json')+ throw new Error('SSH fixture 必须位于独占的系统 Temp/dsh-e2e-ssh-* 根内。')+ const within = relative(root, file)+ if (isAbsolute(within) || within.startsWith('..'))+ throw new Error('SSH fixture 不得越出独占根。')+ const fixture: unknown = JSON.parse(readFileSync(file, 'utf8'))+ if (!fixture || typeof fixture !== 'object')+ throw new Error('SSH fixture 必须是对象。')+ const value = fixture as Record<string, unknown>+ if (typeof value.host !== 'string' || isIP(value.host) === 0+ || typeof value.user !== 'string' || !/^[\w.-]+$/u.test(value.user)+ || ![value.port, value.remotePort].every(port => typeof port === 'number' && Number.isInteger(port) && port > 0 && port <= 65535)+ || typeof value.hostKeySha256 !== 'string' || !/^[A-Za-z0-9+/]{43}=?$/u.test(value.hostKeySha256)+ || ![value.privateKey, value.password].some(secret => typeof secret === 'string' && secret.length > 0)+ || [value.privateKey, value.password, value.token].some(secret => secret !== undefined && typeof secret !== 'string')) {+ throw new Error('SSH fixture 需要 IP、用户名、合法端口、SHA-256 主机指纹及显式测试凭据。')+ }+ return value as unknown as ManualSshFixture+}diff --git a/test/e2e/support/ssh.ts b/test/e2e/support/ssh.tsnew file mode 100644index 00000000..be0ab6e0--- /dev/null+++ b/test/e2e/support/ssh.ts@@ -0,0 +1,122 @@+import type { MachineId, RemoteHostContext } from '../../../packages/dsh-tauri-remote/src/host/types/index'+import { mkdtempSync, rmSync } from 'node:fs'+import { tmpdir } from 'node:os'+import process from 'node:process'+import { join } from 'pathe'+import { clearHostRuntime, machineProfiles, setCurrentHostInstance, setHostConfig, setMachineDeps } from '../../../packages/dsh-tauri-remote/src/host/config/runtime'+import { events } from '../../../packages/dsh-tauri-remote/src/host/service/events'+import { machine } from '../../../packages/dsh-tauri-remote/src/host/service/machine'+import { sshTransport } from '../../../packages/dsh-tauri-remote/src/host/service/transport.ssh'+import { EMPTY_ALLOWLIST } from '../../../packages/dsh-tauri-remote/src/host/utils/allowlist'++interface EvidenceLine {+ at: number+ text: string+}++interface Harness {+ manager: typeof machine+ evidence: EvidenceLine[]+ drain: () => void+ log: (text: string) => void+ dispose: () => Promise<void>+}++export function bootHarness(options: {+ connectTimeoutMs?: number+ keepaliveIntervalMs?: number+ keepaliveCountMax?: number+ reconnectInitialDelayMs?: number+ reconnectMaxDelayMs?: number+ reconnectMaxAttempts?: number+ healthPollIntervalMs?: number+ healthPollAttempts?: number+ sshDir?: string+} = {}): Harness {+ const evidence: EvidenceLine[] = []+ const t0 = Date.now()+ const root = mkdtempSync(join(tmpdir(), 'dsh-ssh-e2e-'))+ const seenSeq = new Map<MachineId, number>()+ const drain = (): void => {+ for (const machineId of machineProfiles.keys()) {+ const page = events.since(machineId, seenSeq.get(machineId) ?? 0)+ const last = page.events.at(-1)?.seq+ if (last !== undefined)+ seenSeq.set(machineId, last)+ for (const event of page.events) {+ const at = Date.parse(event.ts)+ evidence.push({+ at: Number.isNaN(at) ? Date.now() : at,+ text: `event ${event.stage}${event.terminal === undefined ? '' : `/${event.terminal}`}: ${event.line}`,+ })+ }+ }+ }+ const log = (text: string): void => {+ drain()+ const line = { at: Date.now(), text }+ evidence.push(line)+ process.stderr.write(`[ssh-e2e +${line.at - t0}ms] ${text}\n`)+ }+ const context: RemoteHostContext = {+ webServer: { register: () => () => {} },+ effect: () => undefined,+ }+ clearHostRuntime()+ setCurrentHostInstance(context)+ setHostConfig({+ connectTimeoutMs: options.connectTimeoutMs ?? 15_000,+ healthCheckTimeoutMs: 3_000,+ healthPollIntervalMs: options.healthPollIntervalMs ?? 500,+ healthPollAttempts: options.healthPollAttempts ?? 30,+ keepaliveIntervalMs: options.keepaliveIntervalMs ?? 3_000,+ keepaliveCountMax: options.keepaliveCountMax ?? 3,+ reconnectInitialDelayMs: options.reconnectInitialDelayMs ?? 1_000,+ reconnectMaxDelayMs: options.reconnectMaxDelayMs ?? 5_000,+ reconnectMaxAttempts: options.reconnectMaxAttempts ?? 6,+ sshDir: options.sshDir ?? join(root, 'ssh'),+ knownHostsPath: join(root, 'known-hosts.json'),+ statePath: join(root, 'machines.json'),+ })+ setMachineDeps({+ transport: { resolve: () => sshTransport },+ emitStatus: (statusId, status) => {+ const hints = [+ status.state,+ ...status.tunnelBaseUrl === undefined ? [] : [`tunnel=${status.tunnelBaseUrl}`],+ ...status.nextRetryAt === undefined ? [] : [`nextRetryAt=+${status.nextRetryAt - Date.now()}ms`],+ ...status.authMethod === undefined ? [] : [`auth=${status.authMethod}`],+ ...status.lastError === undefined ? [] : [`lastError=${status.lastError}`],+ ]+ log(`status ${String(statusId)}: ${hints.join(' ')}`)+ },+ localAllowlist: () => ({ ...EMPTY_ALLOWLIST }),+ })+ const poller = setInterval(drain, 50)+ return {+ manager: machine,+ evidence,+ drain,+ log,+ dispose: async () => {+ clearInterval(poller)+ drain()+ try {+ await machine.dispose()+ }+ finally {+ clearHostRuntime()+ rmSync(root, { recursive: true, force: true })+ }+ },+ }+}++export async function waitFor(predicate: () => boolean, label: string, timeoutMs = 30_000): Promise<void> {+ const deadline = Date.now() + timeoutMs+ while (!predicate()) {+ if (Date.now() > deadline)+ throw new Error(`timed out waiting for ${label}`)+ await new Promise(resolve => setTimeout(resolve, 100))+ }+}diff --git a/test/plugin-presets.test.ts b/test/plugin-presets.test.tsindex 7cb22b77..594cee6d 100644--- a/test/plugin-presets.test.ts+++ b/test/plugin-presets.test.ts@@ -21,6 +21,14 @@ describe('community plugin presets', () => {])})+ it('keeps DSH Market unselected and ordered after Billion Context', () => {+ const ids = presets.map(plugin => plugin.id)+ expect(ids.indexOf('dshmarket')).toBeGreaterThan(ids.indexOf('billion-context'))+ expect(presets.filter(plugin => plugin.id === 'dshmarket')).toMatchObject([+ { spec: 'dshmarket', recommended: false, checked: false },+ ])+ })+it.each([{id: '@changfenhuang/dsh-genui',diff --git a/test/plugin-version-baseline.test.ts b/test/plugin-version-baseline.test.tsnew file mode 100644index 00000000..2c1d3e19--- /dev/null+++ b/test/plugin-version-baseline.test.ts@@ -0,0 +1,64 @@+import { existsSync, readdirSync, readFileSync } from 'node:fs'+import { satisfies } from 'semver'+import { describe, expect, it } from 'vitest'++interface WorkspaceManifest {+ name: string+ dsh?: object+ engines?: { dsh?: string }+}++const packagesUrl = new URL('../packages/', import.meta.url)+const packages = readdirSync(packagesUrl, { withFileTypes: true })+ .filter(entry => entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'archive')+ .filter(entry => existsSync(new URL(`${entry.name}/package.json`, packagesUrl)))+ .map((entry) => {+ const manifest = JSON.parse(readFileSync(new URL(`${entry.name}/package.json`, packagesUrl), 'utf8')) as WorkspaceManifest+ return { directory: entry.name, manifest }+ })+const plugins = packages.filter(({ manifest }) => manifest.dsh !== undefined)++const expectedPlugins = [+ 'dsh-tauri',+ 'dsh-tauri-archive',+ 'dsh-tauri-experimental',+ 'dsh-tauri-extension',+ 'dsh-tauri-kernel',+ 'dsh-tauri-mobile-ui',+ 'dsh-tauri-model',+ 'dsh-tauri-notification',+ 'dsh-tauri-pet',+ 'dsh-tauri-remote',+ 'dsh-tauri-rightclick',+ 'dsh-tauri-scheduler',+ 'dsh-tauri-ui',+ 'dsh-tauri-ui-playground',+ 'dsh-tauri-worktree',+]++describe('运行插件最低内核声明', () => {+ it('覆盖全部 15 个 dsh 插件而不包含聚合与构建包', () => {+ expect(plugins.map(({ directory }) => directory).sort()).toEqual(expectedPlugins)+ })++ it.each(plugins)('$directory 明确声明最低内核为 0.1.7-rc.1', ({ manifest }) => {+ expect(manifest.engines?.dsh).toBe('>=0.1.7-rc.1')+ })++ describe.each(plugins)('$directory 的内核版本准入', ({ manifest }) => {+ it.each([+ ['0.1.7-rc.1', true],+ ['0.1.7', true],+ ['0.1.8-alpha.1', true],+ ['0.2.1-rc.1', true],+ ['0.1.7-rc.0', false],+ ['0.1.7-alpha.1', false],+ ['0.1.6', false],+ ] as const)('%s 的准入结果为 %s', (version, expected) => {+ const range = manifest.engines?.dsh+ if (typeof range !== 'string')+ throw new TypeError(`${manifest.name}: 缺少 engines.dsh 声明`)+ expect(satisfies(version, range, { includePrerelease: true })).toBe(expected)+ })+ })+})diff --git a/test/tooling-config.test.ts b/test/tooling-config.test.tsindex 4773b503..f1c916d1 100644--- a/test/tooling-config.test.ts+++ b/test/tooling-config.test.ts@@ -66,9 +66,12 @@ describe('tooling configuration contracts', () => {expect(pluginConfig.test).toEqual({name: 'plugin',include: ['test/e2e/plugins/**/*.e2e.ts'],+ exclude: ['**/archive/**', '**/dist/**', '**/node_modules/**', '**/target/**'],globalSetup: ['./test/e2e/setup-plugin.ts'],environment: 'node',fileParallelism: false,+ allowOnly: false,+ retry: 0,testTimeout: 120_000,hookTimeout: 120_000,})diff --git a/vitest.plugin.config.ts b/vitest.plugin.config.tsindex 5c689b37..13ec4c2e 100644--- a/vitest.plugin.config.ts+++ b/vitest.plugin.config.ts@@ -1,26 +1,24 @@+import { fileURLToPath } from 'node:url'import { defineProject } from 'vitest/config'+import { readManifest } from './scripts/bundle-metadata.mjs'+import { manualIntegrations } from './test/e2e/support/integrations'++const remoteDshEngine = (readManifest(fileURLToPath(new URL('.', import.meta.url))).engines as { dsh: { recommend: string, minimum: string } }).dsh-/**- * `plugin` project:插件 L2 E2E(真实 `dsh web` 进程 + 真实 Chromium 页面)。- *- * 用例集中在 `test/e2e/plugins/`,与桌面端 L3 的 `test/e2e/desktop/` 平级;- * 共享编排(`support/dsh.ts`)与 `setup-plugin.ts` 留在 `test/e2e/` 根下。- *- * 驱动架构:`environment: 'node'` + **驱动库 API**。真实浏览器直接由用例- * `import { chromium } from 'playwright'` 后 `chromium.launch()` 拉起,- * 复用 globalSetup 起的宿主与已换取的 Cookie;不采用 Vitest browser mode,- * 也不引入 Playwright Test Runner(见 `docs/specs/plugin.test.md` §3.2)。- *- * `fileParallelism: false`:整个 project 共享一个真实 dsh 服务实例(由 globalSetup 起),- * 串行执行让断言有意义,也避免多个 spec 同时打同一个服务。- */export default defineProject({+ define: {+ __REMOTE_DSH_RECOMMEND__: JSON.stringify(remoteDshEngine.recommend),+ __REMOTE_DSH_MINIMUM__: JSON.stringify(remoteDshEngine.minimum),+ },test: {name: 'plugin',- include: ['test/e2e/plugins/**/*.e2e.ts'],+ include: ['test/e2e/plugins/**/*.e2e.ts', ...manualIntegrations().map(kind => `test/e2e/integrations/${kind}.e2e.ts`)],+ exclude: ['**/archive/**', '**/dist/**', '**/node_modules/**', '**/target/**'],globalSetup: ['./test/e2e/setup-plugin.ts'],environment: 'node',fileParallelism: false,+ allowOnly: false,+ retry: 0,testTimeout: 120_000,hookTimeout: 120_000,},diff --git a/vitest.unit.config.ts b/vitest.unit.config.tsindex 3144d095..8cbd8f31 100644--- a/vitest.unit.config.ts+++ b/vitest.unit.config.ts@@ -1,7 +1,10 @@import { fileURLToPath } from 'node:url'import { defineProject } from 'vitest/config'+import { readManifest } from './scripts/bundle-metadata.mjs'import { SHARED_ALIAS } from './tooling.config'+const remoteDshEngine = (readManifest(fileURLToPath(new URL('.', import.meta.url))).engines as { dsh: { recommend: string, minimum: string } }).dsh+const optionalPrimitiveDependency = fileURLToPath(new URL('./test/setup/primitives-optional-deps.ts', import.meta.url))const optionalPrimitiveAliases = Object.fromEntries([...'simple-icons anser shiki/core shiki/engine/javascript @deepseek-ai/dsh-util-code-language'.split(' '),@@ -9,6 +12,10 @@ const optionalPrimitiveAliases = Object.fromEntries([].map(name => [name, optionalPrimitiveDependency]))export default defineProject({+ define: {+ __REMOTE_DSH_RECOMMEND__: JSON.stringify(remoteDshEngine.recommend),+ __REMOTE_DSH_MINIMUM__: JSON.stringify(remoteDshEngine.minimum),+ },resolve: {alias: {...SHARED_ALIAS,