DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(ssh): 远端 bootstrap 版本钉对齐 DSH 0.1.5-rc.2
Menghuan19182f55cc9ec2b2
diff --git a/archive/docs/plugins/ssh-cordis.patch.example.md b/archive/docs/plugins/ssh-cordis.patch.example.mdindex 3523836b..c0c38fa3 100644--- a/archive/docs/plugins/ssh-cordis.patch.example.md+++ b/archive/docs/plugins/ssh-cordis.patch.example.md@@ -30,11 +30,14 @@# remotePort: 3080 # 可选:未覆盖机器的默认远端 dsh web 端口# startCommand: '$HOME/.local/bin/dsh web --host 127.0.0.1 --port {port}'# # 可选:默认启动命令模板({port} 替换);远端 PATH 无 dsh 时填绝对路径- # installRepo: 'https://git.example.com/team/dsh.git'- # # 可选:一键安装克隆的 git 仓库(远端执行 clone,需远端可访问;- # # 官方 deepseek-harness 仓库尚未创建,请填你自己的仓库地址)- # installRef: 'main'- # # 可选:一键安装检出的分支/tag(默认仓库默认分支)+ # installRepo: 'dsh-tauri-desk/deepseek-harness-pkg'+ # # 可选:一键安装的发行仓(owner/name 或 GitHub URL):远端安装走+ # # 二进制分发——从该仓 releases 下载打包运行时(Node + DSH,+ # # SHA-256 校验);默认即官方发行仓,自有镜像/镜像仓填这里+ # installRef: '0.1.5-rc.2'+ # # 可选:版本钉(semver 或完整 release tag,如+ # # 'dsh-0.1.5-rc.2-34495473237';默认取推荐版本,解析失败回退+ # # 最新稳定 release)# installTimeoutMs: 1800000 # 可选:一次远端安装的截止时间(毫秒)# 设置页:浏览器插件注册表行(dsh.client 声明在包内 package.json)。@@ -76,7 +79,9 @@6. `dsh web` → 设置 → SSH 机器。> 版本要求:`dsh-tauri-ssh-ui` 的 `dsh.client.inject` 面向-> **dsh ≥ 0.1.2-alpha.1**(`slots` 服务由 `dsh-client-ui-renderer` 提供)。+> **dsh ≥ 0.1.2-alpha.1**(`slots` 服务由 `dsh-client-ui-renderer` 提供),+> 本仓库当前对齐 **0.1.5-rc.2**(远端 bootstrap 的+> `RECOMMENDED_DSH_VERSION` 与桌面 `version-recommend.json` 同步钉定)。> 更早版本(≤ 0.1.1-rc.2)需把该行换回 `@deepseek-ai/dsh-client-runtime`。同时需要:diff --git a/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts b/packages/dsh-tauri-ssh-ui/src/client/locales/index.tsindex 99ce246a..b85f7f3e 100644--- a/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts@@ -71,9 +71,9 @@ export const zh = {'progress.handshake': '正在建立 SSH 连接…','progress.starting': '正在启动远端实例…','progress.probing': '健康检查 {attempt}/{total}…',- 'progress.installing': '正在安装 dsh(克隆 + 依赖 + 构建,约 5–15 分钟)…',+ 'progress.installing': '正在安装 dsh(下载并校验官方打包运行时,通常 1–3 分钟)…','install.action': '一键安装 dsh',- 'install.hint': '远端未检测到 dsh。将执行官方安装脚本(克隆 deepseek-harness 仓库 + pnpm install + 构建 Web UI);如需使用自己的 git 仓库,请在插件配置中设置 installRepo。安装完成后自动连接。',+ 'install.hint': '远端未检测到 dsh。将下载官方打包运行时(Node + DSH,版本钉定 + SHA-256 校验)并部署到远端 ~/.dsh-desktop;如需使用自己的发行仓,请在插件配置中设置 installRepo。安装完成后自动连接。','install.done.copied': '安装完成,已复制本机 API Key,正在自动连接…','install.done.nokey': '安装完成。本机未找到 DEEPSEEK_API_KEY,请在远端 dsh Web 的 Models 页面配置后使用。','install.done.error': '安装完成,但凭据复制失败:',@@ -153,9 +153,9 @@ export const en = {'progress.handshake': 'Connecting over SSH…','progress.starting': 'Starting the remote instance…','progress.probing': 'Health check {attempt}/{total}…',- 'progress.installing': 'Installing dsh (clone + deps + build, ~5–15 min)…',+ 'progress.installing': 'Installing dsh (downloading and verifying the official packaged runtime, usually 1–3 min)…','install.action': 'Install dsh',- 'install.hint': 'No dsh found on the remote. This runs the official installer (clones deepseek-harness, pnpm install, builds the Web UI); set installRepo in the plugin config to use your own git repository. Auto-connects when done.',+ 'install.hint': 'No dsh found on the remote. This downloads the official packaged runtime (Node + DSH, version-pinned and SHA-256 verified) and deploys it to ~/.dsh-desktop on the remote; set installRepo in the plugin config to use your own release repository. Auto-connects when done.','install.done.copied': 'Installed. Your API key was copied to the remote; auto-connecting…','install.done.nokey': 'Installed. No DEEPSEEK_API_KEY found locally; configure one on the remote Models page to use it.','install.done.error': 'Installed, but copying credentials failed: ',diff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.tsindex 60c7190a..e6d28d66 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts@@ -45,6 +45,7 @@ const profile: MachineProfile = {/** A realistic newest-first release list matching the live pkg repository. */const RELEASES = [{ tag: 'dsh-0.2.0-preview.1-32490000001', prerelease: true },+ { tag: 'dsh-0.1.5-rc.2-34495473237', prerelease: false },{ tag: 'dsh-0.1.2-rc.1-33729514615', prerelease: false },{ tag: 'dsh-0.1.1-rc.1-32342588166', prerelease: false },]@@ -55,7 +56,7 @@ const PKG_REPO = 'dsh-tauri-desk/deepseek-harness-pkg'const LINUX_ASSETS = [{name: 'deepseek-harness-pkg-linux.zip',- url: `https://github.com/${PKG_REPO}/releases/download/dsh-0.1.2-rc.1-33729514615/deepseek-harness-pkg-linux.zip`,+ url: `https://github.com/${PKG_REPO}/releases/download/dsh-0.1.5-rc.2-34495473237/deepseek-harness-pkg-linux.zip`,digest: 'sha256:6b7ecfebe3b7d779b459262943b17777427860f1b96dbf3b6f16a5074b1119a7',},]@@ -70,8 +71,8 @@ function healthyFetchers(overrides: Partial<{listReleases: () => Promise.resolve(RELEASES),listAssets: () => Promise.resolve(LINUX_ASSETS),npmDist: () => Promise.resolve({- url: 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz',- mirrorUrl: 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz',+ url: 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz',+ mirrorUrl: 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz',integrity: 'sha512-ZXhhZQ==',}),...overrides,@@ -193,12 +194,12 @@ describe('planRemoteInstall', () => {expect(plan.dsh.kind).toBe('pkg-zip')if (plan.dsh.kind !== 'pkg-zip')throw new Error('expected pkg-zip')- expect(plan.dsh.tag).toBe('dsh-0.1.2-rc.1-33729514615')+ expect(plan.dsh.tag).toBe('dsh-0.1.5-rc.2-34495473237')expect(plan.dsh.digest).toBe(LINUX_ASSETS[0]?.digest)expect(plan.dsh.urls[0]).toBe(LINUX_ASSETS[0]?.url)expect(plan.dsh.urls[1]).toContain('ghfast.top/')expect(plan.dshEntry).toBe('node_modules/@deepseek-ai/dsh/lib/bin.js')- expect(plan.dshVersion).toBe('0.1.2-rc.1')+ expect(plan.dshVersion).toBe('0.1.5-rc.2')expect(plan.notes).toEqual([])})@@ -207,8 +208,8 @@ describe('planRemoteInstall', () => {expect(plan.dsh.kind).toBe('npm-tgz')if (plan.dsh.kind === 'npm-tgz') {expect(plan.dsh.urls).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',+ 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz',+ 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz',])// The SRI digest arrives normalized into the script-verifiable hex form.expect(plan.dsh.integrity).toBe(`sha512:${Buffer.from('ZXhhZQ==', 'base64').toString('hex')}`)@@ -234,7 +235,7 @@ describe('planRemoteInstall', () => {}))expect(plan.dsh.kind).toBe('npm-tgz')if (plan.dsh.kind === 'npm-tgz')- expect(plan.dsh.urls[0]).toBe('https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz')+ expect(plan.dsh.urls[0]).toBe('https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz')expect(plan.notes.join('\n')).toContain('未取得')})@@ -244,7 +245,7 @@ describe('planRemoteInstall', () => {}))if (plan.dsh.kind !== 'pkg-zip')throw new Error('expected pkg-zip')- expect(plan.dsh.tag).toBe('dsh-0.1.2-rc.1-33729514615')+ expect(plan.dsh.tag).toBe('dsh-0.1.5-rc.2-34495473237')expect(plan.notes.join('\n')).toContain('release 列表获取失败')})@@ -301,7 +302,7 @@ describe('buildInstallScript', () => {it('arm64: assembles node_modules on the remote with registry fallback', async () => {const plan = await planRemoteInstall('Linux 5.15 aarch64', {}, healthyFetchers())const script = buildInstallScript(plan)- expect(script).toContain('https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz')+ expect(script).toContain('https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz')expect(script).toContain(`sha512:${Buffer.from('ZXhhZQ==', 'base64').toString('hex')}`)expect(script).toContain('install --prod --silent --registry')expect(script).toContain('"$ROOT/dependencies/pnpm/bin/pnpm.cjs"')@@ -321,7 +322,7 @@ describe('buildInstallScript', () => {})it('dedupes the npm tarball URL pair when the packument already carries the mirror', async () => {- const mirrorOnly = 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz'+ const mirrorOnly = 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz'const plan = await planRemoteInstall('Linux 5.15 aarch64', {}, healthyFetchers({npmDist: () => Promise.resolve({ url: mirrorOnly, mirrorUrl: mirrorOnly, integrity: 'sha512-ZXhhZQ==' }),}))@@ -494,7 +495,7 @@ describe('install script execution (real POSIX sh)', () => {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', 'lib', 'bin.js'), '#!/usr/bin/env node\nvoid 0\n')- const dshTgz = join(served, 'dsh-0.1.2-rc.1.tgz')+ const dshTgz = join(served, 'dsh-0.1.5-rc.2.tgz')await promisify(execFile)('tar', ['-czf', dshTgz, '-C', dshStage, 'package'])const digest = (file: string, algorithm: 'sha256' | 'sha512', encoding: 'hex' | 'base64') =>@@ -503,8 +504,8 @@ describe('install script execution (real POSIX sh)', () => {const basePlan = await planRemoteInstall('Linux 5.15 aarch64', {}, healthyFetchers({npmDist: () => Promise.resolve({- url: 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz',- mirrorUrl: 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.2-rc.1.tgz',+ url: 'https://registry.npmjs.org/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz',+ mirrorUrl: 'https://registry.npmmirror.com/@deepseek-ai/dsh/-/dsh-0.1.5-rc.2.tgz',// The real SRI form npm serves; the planner normalizes it to hex.integrity: `sha512-${digest(dshTgz, 'sha512', 'base64')}`,}),diff --git a/packages/dsh-tauri-ssh/src/host/service/version.test.ts b/packages/dsh-tauri-ssh/src/host/service/version.test.tsindex 7db6a33e..3a208c0c 100644--- a/packages/dsh-tauri-ssh/src/host/service/version.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/version.test.ts@@ -14,6 +14,7 @@ import {/** A realistic newest-first release list (test tags republishing included). */const RELEASES = [{ tag: 'dsh-0.2.0-preview.1-32490000001', prerelease: true },+ { tag: 'dsh-0.1.5-rc.2-34495473237', prerelease: false },{ tag: 'dsh-0.1.2-rc.1-33729514615', prerelease: false },{ tag: 'dsh-0.1.1-rc.1-32342588166', prerelease: false },{ tag: 'dsh-0.1.0-rc.8-32342588167', prerelease: false },@@ -51,7 +52,7 @@ describe('isPreviewTag', () => {describe('pickReleaseTag', () => {it('resolves the recommended version onto its release tag (recommended path)', () => {const resolved = pickReleaseTag(RELEASES)- expect(resolved).toMatchObject({ tag: 'dsh-0.1.2-rc.1-33729514615', version: RECOMMENDED_DSH_VERSION, source: 'recommended' })+ expect(resolved).toMatchObject({ tag: 'dsh-0.1.5-rc.2-34495473237', version: RECOMMENDED_DSH_VERSION, source: 'recommended' })expect(resolved.notes).toEqual([])})@@ -92,7 +93,7 @@ describe('pickReleaseTag', () => {it('falls back to the newest stable release when the recommended version is absent', () => {const resolved = pickReleaseTag(RELEASES, { recommended: '0.3.0' })expect(resolved.source).toBe('latest-stable')- expect(resolved.tag).toBe('dsh-0.1.2-rc.1-33729514615')+ expect(resolved.tag).toBe('dsh-0.1.5-rc.2-34495473237')expect(resolved.notes[0]).toContain('回退最新稳定')})diff --git a/packages/dsh-tauri-ssh/src/host/service/version.ts b/packages/dsh-tauri-ssh/src/host/service/version.tsindex 186d1716..c87115ae 100644--- a/packages/dsh-tauri-ssh/src/host/service/version.ts+++ b/packages/dsh-tauri-ssh/src/host/service/version.ts@@ -31,18 +31,20 @@ export interface ResolvedDshTag {}/**- * The recommended DSH version. Mirrors the desktop mainline's- * `version-recommend.json` intent: installs pin this version instead of- * following whatever "latest" happens to be.+ * The recommended DSH version pinned for remote installs. Kept in lockstep+ * with the desktop mainline's `src-tauri/resources/version-recommend.json`+ * (both name the version this desktop generation is verified against);+ * installs pin this version instead of following whatever "latest" happens+ * to be.*/-export const RECOMMENDED_DSH_VERSION = '0.1.2-rc.1'+export const RECOMMENDED_DSH_VERSION = '0.1.5-rc.2'/*** The last known-good packaged release tag, used when version resolution* fails (offline, rate-limited, or the recommended version vanished). A* concrete tag — never an unknown version.*/-export const FALLBACK_DSH_TAG = 'dsh-0.1.2-rc.1-33729514615'+export const FALLBACK_DSH_TAG = 'dsh-0.1.5-rc.2-34495473237'/** The official DSH project repository (org verified on GitHub). */export const OFFICIAL_INSTALL_REPO = 'https://github.com/deepseek-ai/deepseek-harness.git'diff --git a/packages/dsh-tauri-ssh/src/host/storage/index.ts b/packages/dsh-tauri-ssh/src/host/storage/index.tsindex 7777a7c1..b53d7197 100644--- a/packages/dsh-tauri-ssh/src/host/storage/index.ts+++ b/packages/dsh-tauri-ssh/src/host/storage/index.ts@@ -94,8 +94,8 @@ export interface Config {*/installRepo?: string/**- * DSH version pin for the binary install: a semver (`0.1.2-rc.1`) or a full- * release tag (`dsh-0.1.2-rc.1-33729514615`). Defaults to the recommended+ * DSH version pin for the binary install: a semver (`0.1.5-rc.2`) or a full+ * release tag (`dsh-0.1.5-rc.2-34495473237`). Defaults to the recommended* version; unresolvable pins fall back to the latest stable release.*/installRef?: string