Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Describe the Windows install path and publish version-less downloads

AdamPlatin123bd08abe5aad3
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index be5d9bde..83caeceb 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: Questions & help
url: https://github.com/Fei2411/DS-Bot/discussions/new?category=q-a
- about: Installation, setup and usage questions — ask in Discussions, not Issues.
+ about: Setup and usage questions — ask in Discussions, not Issues. If the desktop app does not install or start, use Install problem.
- name: Feature requests & ideas
url: https://github.com/Fei2411/DS-Bot/discussions/new?category=ideas
about: Suggest features and discuss anything that is not a bug — in Discussions.
diff --git a/.github/ISSUE_TEMPLATE/install.yml b/.github/ISSUE_TEMPLATE/install.yml
new file mode 100644
index 00000000..f57a25eb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/install.yml
@@ -0,0 +1,65 @@
+name: Install problem / 安装问题
+description: The desktop app does not download, install or start. / 桌面应用下载不了、装不上或打不开。
+labels: [bug]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **No diagnostics needed**: the app may not have started at all. Tell us where it stopped and what the message said.
+ **不需要诊断信息**:应用可能根本没跑起来。告诉我们卡在哪一步、提示框里写了什么就行。
+
+ Many warnings have a way through: see **The browser or Windows warns you, or blocks the installer?** at the top of the [README](https://github.com/Fei2411/DS-Bot#readme).
+ 很多提示都能点过去:先看 [README](https://github.com/Fei2411/DS-Bot/blob/main/README.zh.md) 开头的 **浏览器或 Windows 提示、拦下了安装包?**。
+ - type: dropdown
+ id: step
+ attributes:
+ label: Where did it stop? / 卡在哪一步?
+ options:
+ - Download / 下载
+ - Browser warning / 浏览器提示
+ - SmartScreen or Smart App Control / SmartScreen 或智能应用控制
+ - Installer / 安装
+ - First start / 第一次打开
+ - Other / 其他
+ validations:
+ required: true
+ - type: textarea
+ id: message
+ attributes:
+ label: The message, or a photo of it / 提示框的文字,或者拍一张照片
+ description: Copy the text of the dialog, or paste a screenshot or a phone photo (Ctrl+V or drag it in). / 复制提示框里的文字,或者粘贴截图、手机拍的照片(Ctrl+V 或拖进来)。
+ validations:
+ required: true
+ - type: input
+ id: windows
+ attributes:
+ label: Windows version / Windows 版本
+ description: Press Win+R, type winver and press Enter. On macOS or Linux, write the system and its version. / 按 Win+R,输入 winver,回车。macOS 或 Linux 上写系统和版本。
+ placeholder: Windows 11 24H2
+ validations:
+ required: true
+ - type: input
+ id: language
+ attributes:
+ label: System language / 系统显示语言
+ description: The display language of Windows, macOS or Linux. / Windows、macOS 或 Linux 的显示语言。
+ placeholder: 简体中文 / English
+ validations:
+ required: true
+ - type: input
+ id: file
+ attributes:
+ label: File you downloaded / 下载的文件名
+ placeholder: DeepSeek-Bot-0.2.2-win-x64.exe
+ - type: textarea
+ id: more
+ attributes:
+ label: Anything else / 其他情况
+ description: For example the antivirus you use, or what you already tried. / 比如用的杀毒软件,或者已经试过什么。
+ - type: checkboxes
+ id: clean
+ attributes:
+ label: Privacy / 隐私
+ options:
+ - label: This report has no API keys, tokens or personal data. / 报告里没有 API key、token 或个人信息。
+ required: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d943241b..d039c83c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -13,6 +13,10 @@ name: Release
# The release tag must be v<version in ds-bot/package.json> and must point at a commit on
# main. A version with a pre-release part (0.2.0-rc.1) goes to the npm tag "next", so that
# "latest" stays on the last stable version.
+#
+# Publish the release with "Set as latest release" turned off: the last job marks it Latest
+# once every package, the download table and SHA256SUMS.txt are on it, so a releases/latest
+# link never finds a release whose installer is still being built.
on:
release:
@@ -230,3 +234,54 @@ jobs:
run: |
version="$(node -p "require('./package.json').version")"
gh release upload "$TAG" "dist-pack/DeepSeek-Bot-$version-linux-x86_64.AppImage" "dist-pack/DeepSeek-Bot-$version-linux-amd64.deb" dist-pack/latest-linux.yml --clobber
+
+ downloads:
+ name: Download table, checksums and Latest
+ needs: [app-windows, app-macos, app-linux]
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ defaults:
+ run:
+ shell: bash
+ working-directory: app
+ env:
+ GH_TOKEN: ${{ github.token }}
+ TAG: ${{ github.event.release.tag_name }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 24
+ - name: Download the packages from the release
+ if: github.event_name == 'release'
+ run: |
+ version="$(node -p "require('./package.json').version")"
+ gh release download "$TAG" --dir "$RUNNER_TEMP/packages" --pattern "DeepSeek-Bot-$version-*"
+ gh release view "$TAG" --json body --jq .body > "$RUNNER_TEMP/notes.md"
+ # The dry run has no release, so it checks the table and the checksums on the packages
+ # that the app jobs kept.
+ - name: Download the packages of the dry run
+ if: github.event_name == 'workflow_dispatch'
+ uses: actions/download-artifact@v4
+ with:
+ pattern: DeepSeek-Bot-*
+ path: ${{ runner.temp }}/packages
+ merge-multiple: true
+ - name: Write the download table and the checksums
+ run: |
+ version="$(node -p "require('./package.json').version")"
+ notes=()
+ if [ -f "$RUNNER_TEMP/notes.md" ]; then notes=("$RUNNER_TEMP/notes.md"); fi
+ node scripts/release-notes.mjs "$version" "$RUNNER_TEMP/packages" "$RUNNER_TEMP/attach" "${notes[@]}" > "$RUNNER_TEMP/body.md"
+ ls -l "$RUNNER_TEMP/attach"
+ cat "$RUNNER_TEMP/body.md" >> "$GITHUB_STEP_SUMMARY"
+ - name: Attach the checksums and the copies without a version
+ if: github.event_name == 'release'
+ run: gh release upload "$TAG" "$RUNNER_TEMP"/attach/* --clobber
+ - name: Put the download table on top of the notes
+ if: github.event_name == 'release'
+ run: gh release edit "$TAG" --notes-file "$RUNNER_TEMP/body.md"
+ # GitHub cannot make a pre-release Latest.
+ - name: Mark the release as Latest
+ if: github.event_name == 'release' && !github.event.release.prerelease
+ run: gh release edit "$TAG" --latest
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 82c83882..32e113fb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -72,7 +72,7 @@ Keep one pull request to one issue. Split a large change into several pull reque
1. In a pull request into `dev`, set the version in `ds-bot/package.json` and write the `CHANGELOG.md` section from the Changelog sentences of the merged pull requests.
2. Open a pull request from `dev` into `main` titled `release: vX.Y.Z`. List every `Fixes #<number>` of the release in its description, so that these issues close when it is merged.
-3. Before you merge it, run the [release checklist](docs/dev/release-checklist.md) (in Chinese) on a real Windows machine, and on macOS when the change touches it, and post the result in the pull request. Merge it with a merge commit and publish a GitHub release `vX.Y.Z` on `main`. The Release workflow checks that the tag matches the version and is on `main`, runs the checks and publishes the package to npm (a pre-release version under the npm tag `next`). Do not run `npm publish` by hand.
+3. Before you merge it, run the [release checklist](docs/dev/release-checklist.md) (in Chinese) on a real Windows machine, and on macOS when the change touches it, and post the result in the pull request. Merge it with a merge commit and publish a GitHub release `vX.Y.Z` on `main`, with "Set as the latest release" turned off: the workflow marks it latest itself once the installers, `SHA256SUMS.txt` and the download table are attached. The Release workflow checks that the tag matches the version and is on `main`, runs the checks and publishes the package to npm (a pre-release version under the npm tag `next`). Do not run `npm publish` by hand.
4. For a hotfix, start `fix/hot-<name>` from `main`, open the pull request into `main`, release a patch version, then merge `main` into `dev`.
## Set up
diff --git a/CONTRIBUTING.zh.md b/CONTRIBUTING.zh.md
index 4cd338d2..1b20ca75 100644
--- a/CONTRIBUTING.zh.md
+++ b/CONTRIBUTING.zh.md
@@ -72,7 +72,7 @@
1. 向 `dev` 提一个 Pull Request:修改 `ds-bot/package.json` 里的版本号,根据已合并 Pull Request 的 Changelog 句子写 `CHANGELOG.md` 的这一版。
2. 提一个从 `dev` 到 `main` 的 Pull Request,标题为 `release: vX.Y.Z`。在描述里列出这一版所有的 `Fixes #<号>`,合并时这些 Issue 会一起关闭。
-3. 合并前在 Windows 真机上做一遍[发版前真机检查](docs/dev/release-checklist.md),改动涉及 macOS 时在 macOS 上也做一遍,结果贴在这个 PR 里。用 merge commit 合并,在 `main` 上发布 GitHub Release `vX.Y.Z`。Release 工作流会检查 tag 与版本号一致、且在 `main` 上,跑完检查后把包发到 npm(预发布版本发到 npm 的 `next` 标签)。不要手动 `npm publish`。
+3. 合并前在 Windows 真机上做一遍[发版前真机检查](docs/dev/release-checklist.md),改动涉及 macOS 时在 macOS 上也做一遍,结果贴在这个 PR 里。用 merge commit 合并,在 `main` 上发布 GitHub Release `vX.Y.Z`,发布时不勾「Set as the latest release」:安装包、`SHA256SUMS.txt` 和下载表都传完后,工作流会自己把它标为最新。Release 工作流会检查 tag 与版本号一致、且在 `main` 上,跑完检查后把包发到 npm(预发布版本发到 npm 的 `next` 标签)。不要手动 `npm publish`。
4. 热修:从 `main` 切 `fix/hot-<短名>`,向 `main` 提 Pull Request,发一个补丁版本,再把 `main` 合回 `dev`。
## 搭建环境
diff --git a/README.md b/README.md
index 529864ba..a568902c 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,4 @@
-<p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="docs/images/logo-dark.svg">
- <img src="docs/images/logo.svg" alt="DS Bot" width="260">
- </picture>
-</p>
+<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/images/logo-dark.svg"><img src="docs/images/logo.svg" alt="DS Bot" width="260"></picture></p>
# DS Bot
@@ -11,6 +6,38 @@ English | [中文](README.zh.md)
![version](https://img.shields.io/badge/version-v0.2_preview-blue) ![DSH](https://img.shields.io/badge/DSH-0.2.1--rc.2-4D6BFE) ![license](https://img.shields.io/badge/license-Apache_2.0-green)
+**[Download DeepSeek Bot for Windows 10/11 (64-bit) / 下载 Windows 10/11(64 位)版](https://github.com/Fei2411/DS-Bot/releases/latest)**, about 212 MB / 约 212 MB. A community project, not an official DeepSeek product. / 社区开源项目,不是 DeepSeek 官方产品。
+
+On that page, download `DeepSeek-Bot-<version>-win-x64.exe`. Double-click it to install; DeepSeek Bot opens when it is done. No administrator rights, no Node or DSH needed. You need a DeepSeek account (you can sign up with a phone number on the spot) or a DeepSeek API key. DeepSeek bills by usage: see [its prices](https://api-docs.deepseek.com/quick_start/pricing). For macOS, Linux or the DSH plugin, see [Install](README.md#install).
+
+在这个页面下载 `DeepSeek-Bot-<版本>-win-x64.exe`,双击就会安装,装好自动打开。不用管理员权限,不用另装 Node 或 DSH。需要一个 DeepSeek 账号(可以当场用手机号注册)或 DeepSeek API Key。DeepSeek 按用量收费,见[价格页](https://api-docs.deepseek.com/quick_start/pricing)。macOS、Linux 和 DSH 插件见[安装](README.zh.md#安装)。
+
+<details>
+<summary><b>The browser or Windows warns you, or blocks the installer? / 浏览器或 Windows 提示、拦下了安装包?</b></summary>
+
+The installer is not signed yet, so Windows does not know its publisher.
+
+- Edge says the file is not commonly downloaded: **···** → **Keep** → **Show more** → **Keep anyway**.
+- "Windows protected your PC": **More info** → **Run anyway**.
+- "Smart App Control blocked …", with no **Run anyway**: there is no safe way around this for an unsigned installer. Use [DSH Desktop with the DS Bot plugin](README.md#install) instead. Do not turn Smart App Control off.
+- An antivirus blocks it: check the file first. In Command Prompt, run `certutil -hashfile <file> SHA256` and compare the result with the file's line in `SHA256SUMS.txt` on the release page. If they match, choose to trust the file in the antivirus.
+- The installer says it could not uninstall the old version: close DeepSeek Bot and run the installer again. If your antivirus stopped the installer, check and trust it as above first.
+
+Still stuck? [Report an install problem](https://github.com/Fei2411/DS-Bot/issues/new?template=install.yml).
+
+安装包还没有签名,所以 Windows 认不出发布者。
+
+- Edge 提示「不常下载」:「···」→「保留」→「显示更多」→「仍然保留」。
+- 「Windows 已保护你的电脑」:「更多信息」→「仍要运行」。
+- 「智能应用控制已阻止…」,而且没有「仍要运行」:未签名的安装包没有安全的绕过办法,请改用 [DSH Desktop 加 DS Bot 插件](README.zh.md#安装)。不要关掉智能应用控制。
+- 杀毒软件拦截:先核对文件。在命令提示符里运行 `certutil -hashfile <文件> SHA256`,和 Release 页上 `SHA256SUMS.txt` 里这个文件的那一行比较,一致后再在杀毒软件里选「信任」。
+- 安装时提示卸载旧版失败:先关掉 DeepSeek Bot,再运行一次安装包。杀毒软件拦了安装包时,先按上面的方法核对,选「信任」。
+
+还是装不上?[报告安装问题](https://github.com/Fei2411/DS-Bot/issues/new?template=install.yml)。
+</details>
+
+**DeepSeek Bot**: the desktop app / 桌面应用 · **DS Bot**: the project and the plugin / 项目和插件 · **DeepSeek Harness (DSH)**: what they are built on / 它们的底层
+
DS Bot is a bot plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). It turns DSH into bots. You create your own bots, then talk and work with them.
![Say one sentence to Chief, and it sets up the bots and the group chat](docs/images/team.png)
@@ -21,12 +48,14 @@ DS Bot is a bot plugin for [DeepSeek Harness](https://github.com/deepseek-ai/dee
The desktop app brings its own DSH, so you don't need to install DSH first. Download it from [Releases](https://github.com/Fei2411/DS-Bot/releases):
-- Windows (x64): `DeepSeek-Bot-<version>-win-x64.exe`. Run it; it installs for your user only, without administrator rights. If Windows shows "Windows protected your PC", select **More info** → **Run anyway**.
+- Windows (x64): `DeepSeek-Bot-<version>-win-x64.exe`. Run it; it installs for your user only, without administrator rights. If Windows shows "Windows protected your PC", select **More info** → **Run anyway**. For other warnings and blocks, open **The browser or Windows warns you, or blocks the installer?** at the top of this page.
- macOS: `DeepSeek-Bot-<version>-mac-arm64.zip` for an Apple chip, `DeepSeek-Bot-<version>-mac-x64.zip` for Intel. Safari unzips it by itself; drag **DeepSeek Bot** into **Applications** and open it. When macOS says it cannot check the app, open **System Settings** → **Privacy & Security** and select **Open Anyway**.
- Linux (x64): `DeepSeek-Bot-<version>-linux-x86_64.AppImage` runs on every distribution — make it executable and open it. It mounts through FUSE 2, which you may need to install first (`sudo apt install libfuse2t64` on Ubuntu 24.04+, `sudo dnf install fuse-libs` on Fedora, `sudo pacman -S fuse2` on Arch). On Ubuntu 24.04 and later an AppImage can refuse to start (Ubuntu restricts the sandbox it needs); the `DeepSeek-Bot-<version>-linux-amd64.deb` on Debian/Ubuntu does not have this problem and adds a menu entry.
At the first start the app asks where to keep its data and the Bots' files, and offers to copy a Bot team from your DSH (it only reads your DSH). Set up a model in its settings. The Windows app and the Linux AppImage update themselves; the macOS app and the Linux deb tell you when a new version is ready to download.
+If the app does not download, install or start, [report an install problem](https://github.com/Fei2411/DS-Bot/issues/new?template=install.yml); it needs no diagnostics.
+
**As a plugin in DSH**
First install DSH and set up at least one model in it. DS Bot uses the models from DSH.
@@ -37,7 +66,7 @@ First install DSH and set up at least one model in it. DS Bot uses the models fr
2. In **Package name or address**, enter `ds-bot`. In mainland China, set **Registry** to **Mainland China mirror**.
3. Select **Install**, then **Enable now**. If DSH says the change takes effect at the next start, quit DSH completely and open it again.
-If npm is not reachable, in step 2 you can also enter the full path of `ds-bot-0.2.1.tgz` downloaded from [Releases](https://github.com/Fei2411/DS-Bot/releases), or `github:Fei2411/DS-Bot#v0.2.1&path:/ds-bot` (needs Git).
+If npm is not reachable, in step 2 you can also enter the full path of `ds-bot-<version>.tgz` downloaded from [Releases](https://github.com/Fei2411/DS-Bot/releases), or `github:Fei2411/DS-Bot#v<version>&path:/ds-bot` (needs Git).
DS Bot 0.2.1 and earlier cannot update themselves in DSH Desktop 0.2.1-rc.2 or later: on the Plugins page, remove `ds-bot` and add `ds-bot` again. The Bots, chats and memory stay.
diff --git a/README.zh.md b/README.zh.md
index b08c4074..9b220e59 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -1,9 +1,4 @@
-<p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="docs/images/logo-dark.svg">
- <img src="docs/images/logo.svg" alt="DS Bot" width="260">
- </picture>
-</p>
+<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/images/logo-dark.svg"><img src="docs/images/logo.svg" alt="DS Bot" width="260"></picture></p>
# DS Bot
@@ -11,6 +6,38 @@
![版本](https://img.shields.io/badge/版本-v0.2_预览-blue) ![DSH](https://img.shields.io/badge/DSH-0.2.1--rc.2-4D6BFE) ![许可](https://img.shields.io/badge/许可-Apache_2.0-green)
+**[Download DeepSeek Bot for Windows 10/11 (64-bit) / 下载 Windows 10/11(64 位)版](https://github.com/Fei2411/DS-Bot/releases/latest)**, about 212 MB / 约 212 MB. A community project, not an official DeepSeek product. / 社区开源项目,不是 DeepSeek 官方产品。
+
+On that page, download `DeepSeek-Bot-<version>-win-x64.exe`. Double-click it to install; DeepSeek Bot opens when it is done. No administrator rights, no Node or DSH needed. You need a DeepSeek account (you can sign up with a phone number on the spot) or a DeepSeek API key. DeepSeek bills by usage: see [its prices](https://api-docs.deepseek.com/quick_start/pricing). For macOS, Linux or the DSH plugin, see [Install](README.md#install).
+
+在这个页面下载 `DeepSeek-Bot-<版本>-win-x64.exe`,双击就会安装,装好自动打开。不用管理员权限,不用另装 Node 或 DSH。需要一个 DeepSeek 账号(可以当场用手机号注册)或 DeepSeek API Key。DeepSeek 按用量收费,见[价格页](https://api-docs.deepseek.com/quick_start/pricing)。macOS、Linux 和 DSH 插件见[安装](README.zh.md#安装)。
+
+<details>
+<summary><b>The browser or Windows warns you, or blocks the installer? / 浏览器或 Windows 提示、拦下了安装包?</b></summary>
+
+The installer is not signed yet, so Windows does not know its publisher.
+
+- Edge says the file is not commonly downloaded: **···** → **Keep** → **Show more** → **Keep anyway**.
+- "Windows protected your PC": **More info** → **Run anyway**.
+- "Smart App Control blocked …", with no **Run anyway**: there is no safe way around this for an unsigned installer. Use [DSH Desktop with the DS Bot plugin](README.md#install) instead. Do not turn Smart App Control off.
+- An antivirus blocks it: check the file first. In Command Prompt, run `certutil -hashfile <file> SHA256` and compare the result with the file's line in `SHA256SUMS.txt` on the release page. If they match, choose to trust the file in the antivirus.
+- The installer says it could not uninstall the old version: close DeepSeek Bot and run the installer again. If your antivirus stopped the installer, check and trust it as above first.
+
+Still stuck? [Report an install problem](https://github.com/Fei2411/DS-Bot/issues/new?template=install.yml).
+
+安装包还没有签名,所以 Windows 认不出发布者。
+
+- Edge 提示「不常下载」:「···」→「保留」→「显示更多」→「仍然保留」。
+- 「Windows 已保护你的电脑」:「更多信息」→「仍要运行」。
+- 「智能应用控制已阻止…」,而且没有「仍要运行」:未签名的安装包没有安全的绕过办法,请改用 [DSH Desktop 加 DS Bot 插件](README.zh.md#安装)。不要关掉智能应用控制。
+- 杀毒软件拦截:先核对文件。在命令提示符里运行 `certutil -hashfile <文件> SHA256`,和 Release 页上 `SHA256SUMS.txt` 里这个文件的那一行比较,一致后再在杀毒软件里选「信任」。
+- 安装时提示卸载旧版失败:先关掉 DeepSeek Bot,再运行一次安装包。杀毒软件拦了安装包时,先按上面的方法核对,选「信任」。
+
+还是装不上?[报告安装问题](https://github.com/Fei2411/DS-Bot/issues/new?template=install.yml)。
+</details>
+
+**DeepSeek Bot**: the desktop app / 桌面应用 · **DS Bot**: the project and the plugin / 项目和插件 · **DeepSeek Harness (DSH)**: what they are built on / 它们的底层
+
DS Bot 是一个基于 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(简称 dsh)的 bot 插件,插件将 dsh 改造为 bot 形式。你可以与自己创建的 bot 交流、工作。
![和 Chief 说一句话,它就把 bot 和群聊建好](docs/images/team.zh.png)
@@ -21,12 +48,14 @@ DS Bot 是一个基于 [DeepSeek Harness](https://github.com/deepseek-ai/deepsee
桌面应用自带 dsh,不用先装 dsh。在 [Releases](https://github.com/Fei2411/DS-Bot/releases) 里下载:
-- Windows(x64):`DeepSeek-Bot-<版本>-win-x64.exe`。运行它即可安装,只装给当前用户,不要管理员权限。如果提示“Windows 已保护你的电脑”,点 **更多信息** → **仍要运行**。
+- Windows(x64):`DeepSeek-Bot-<版本>-win-x64.exe`。运行它即可安装,只装给当前用户,不要管理员权限。如果提示“Windows 已保护你的电脑”,点 **更多信息** → **仍要运行**。其他提示和拦截,打开本页开头的 **浏览器或 Windows 提示、拦下了安装包?**。
- macOS:Apple 芯片下载 `DeepSeek-Bot-<版本>-mac-arm64.zip`,Intel 下载 `DeepSeek-Bot-<版本>-mac-x64.zip`。Safari 会自动解压;把 **DeepSeek Bot** 拖进 **应用程序**,再打开。如果提示无法检查这个 App,打开 **系统设置** → **隐私与安全性**,点 **仍要打开**。
- Linux(x64):`DeepSeek-Bot-<版本>-linux-x86_64.AppImage` 通用于所有发行版——加上可执行权限后打开即可。它通过 FUSE 2 挂载,可能需要先安装(Ubuntu 24.04+ 用 `sudo apt install libfuse2t64`,Fedora 用 `sudo dnf install fuse-libs`,Arch 用 `sudo pacman -S fuse2`)。Ubuntu 24.04 及以后版本会限制 AppImage 需要的沙箱,AppImage 可能因此拒绝启动;Debian/Ubuntu 上的 `DeepSeek-Bot-<版本>-linux-amd64.deb` 没有这个问题,还会加菜单项。
第一次打开时,App 会问数据和 Bot 的文件放在哪里,并可以从你的 dsh 复制 Bot 团队(只读取你的 dsh,不改它)。在 App 的设置里配好模型就能用。Windows 版和 Linux 的 AppImage 会自动更新;macOS 版和 Linux 的 deb 有新版本时会提示你下载。
+下载不了、装不上或打不开时,[报告安装问题](https://github.com/Fei2411/DS-Bot/issues/new?template=install.yml),不需要诊断信息。
+
**作为 dsh 插件**
先装好 dsh,并在 dsh 里配好至少一个模型。ds bot 直接使用 dsh 里的模型。
@@ -37,7 +66,7 @@ DS Bot 是一个基于 [DeepSeek Harness](https://github.com/deepseek-ai/deepsee
2. **包名或地址** 填 `ds-bot`。在中国大陆,**安装源** 选 **中国大陆镜像源**。
3. 点 **安装**,再点 **立即启用**。如果提示“下次启动生效”,完全退出 dsh 再打开。
-连不上 npm 时,第 2 步也可以填 [Releases](https://github.com/Fei2411/DS-Bot/releases) 里下载的 `ds-bot-0.2.1.tgz` 的完整路径,或者 `github:Fei2411/DS-Bot#v0.2.1&path:/ds-bot`(需要装 Git)。
+连不上 npm 时,第 2 步也可以填 [Releases](https://github.com/Fei2411/DS-Bot/releases) 里下载的 `ds-bot-<版本>.tgz` 的完整路径,或者 `github:Fei2411/DS-Bot#v<版本>&path:/ds-bot`(需要装 Git)。
DS Bot 0.2.1 及更早的版本在 DSH Desktop 0.2.1-rc.2 及以后的版本里不能自己更新:在插件页移除 `ds-bot`,再添加 `ds-bot`。Bot、聊天和记忆都会保留。
diff --git a/app/scripts/release-notes.mjs b/app/scripts/release-notes.mjs
new file mode 100644
index 00000000..c02decc1
--- /dev/null
+++ b/app/scripts/release-notes.mjs
@@ -0,0 +1,124 @@
+// Writes what a release offers for download: the "Download / 下载" table at the top of its notes,
+// SHA256SUMS.txt, and a copy of each package without the version in its name, which a fixed
+// releases/latest/download/ link can name.
+// Usage: node scripts/release-notes.mjs <version> <folder with the packages> <folder for the files to attach> [<current notes>]
+// It prints the notes with the table on top. MIRROR_BASE, when set, is a URL that holds the
+// packages under the same names; GITHUB_REPOSITORY names the repository (default Fei2411/DS-Bot).
+import { createHash } from 'node:crypto'
+import { copyFileSync, createReadStream, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
+import { join } from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+export const REPO = 'Fei2411/DS-Bot'
+// The order of the table: Windows first, where most downloads are.
+export const PACKAGES = [
+ { file: 'win-x64.exe', system: '**Windows 10/11 (64-bit / 64 位)**', note: 'Double-click to install / 双击安装' },
+ { file: 'mac-arm64.zip', system: 'macOS, Apple chip / Apple 芯片' },
+ { file: 'mac-x64.zip', system: 'macOS, Intel' },
+ { file: 'linux-x86_64.AppImage', system: 'Linux, AppImage' },
+ { file: 'linux-amd64.deb', system: 'Linux, deb (Debian, Ubuntu)' },
+]
+export const SUMS = 'SHA256SUMS.txt'
+// The table sits between these, so a second run replaces it instead of adding another.
+const START = '<!-- downloads -->'
+const END = '<!-- /downloads -->'
+
+export const packageName = (version, entry) => `DeepSeek-Bot-${version}-${entry.file}`
+export const copyName = entry => `DeepSeek-Bot-${entry.file}`
+
+/** @returns {string[]} the packages of `version` that are not among `names` */
+export function missingPackages(version, names) {
+ const have = new Set(names)
+ return PACKAGES.map(entry => packageName(version, entry)).filter(name => !have.has(name))
+}
+
+export function formatSize(bytes) {
+ return `${String(Math.max(1, Math.round(bytes / 1024 ** 2)))} MB`
+}
+
+export function releaseUrl({ repo = REPO, version, name }) {
+ return `https://github.com/${repo}/releases/download/v${version}/${encodeURIComponent(name)}`
+}
+
+function mirrorUrl(mirror, name) {
+ return `${mirror.replace(/\/+$/u, '')}/${encodeURIComponent(name)}`
+}
+
+/** `sizes`: bytes by package name. Without `mirror` each package has its GitHub link only. */
+export function downloadBlock({ version, sizes, repo = REPO, mirror }) {
+ const links = (name) => {
+ const github = releaseUrl({ repo, version, name })
+ return mirror ? `${name}: [Mirror / 国内镜像](${mirrorUrl(mirror, name)}) · [GitHub](${github})` : `[${name}](${github})`
+ }
+ const rows = PACKAGES.map((entry) => {
+ const name = packageName(version, entry)
+ const system = entry.note === undefined ? entry.system : `${entry.system}<br>${entry.note}`
+ return `| ${system} | ${links(name)} | ${formatSize(sizes[name])} |`
+ })
+ const sums = releaseUrl({ repo, version, name: SUMS })
+ return [
+ START,
+ '## Download / 下载',
+ '',
+ '| System / 系统 | Download / 下载 | Size / 大小 |',
+ '|---|---|---|',
+ ...rows,
+ '',
+ 'The `.blockmap`, `latest*.yml` and `ds-bot-*.tgz` files and the source code archives are for updates and the plugin: you do not need to download them.',
+ '',
+ '`.blockmap`、`latest*.yml`、`ds-bot-*.tgz` 和源代码是给自动更新和插件用的,不用下载。',
+ '',
+ `To check a download, compare its SHA-256 with [${SUMS}](${sums}). / 下载后可以用 [${SUMS}](${sums}) 核对 SHA-256。`,
+ END,
+ ].join('\n')
+}
+
+/** `hashes`: SHA-256 hex by package name. Each package is listed under both of its names. */
+export function checksums(version, hashes) {
+ const lines = PACKAGES.flatMap((entry) => {
+ const hash = hashes[packageName(version, entry)]
+ return [`${hash} ${packageName(version, entry)}`, `${hash} ${copyName(entry)}`]
+ })
+ return `${lines.join('\n')}\n`
+}
+
+/** The release notes with `block` on top, in place of a table from an earlier run. */
+export function withDownloads(notes, block) {
+ const start = notes.indexOf(START)
+ const end = notes.indexOf(END, start)
+ const rest = start === -1 || end === -1 ? notes : notes.slice(0, start) + notes.slice(end + END.length)
+ const body = rest.trim()
+ return body === '' ? `${block}\n` : `${block}\n\n${body}\n`
+}
+
+async function sha256(file) {
+ const hash = createHash('sha256')
+ for await (const chunk of createReadStream(file)) hash.update(chunk)
+ return hash.digest('hex')
+}
+
+async function main([version, from, to, notesFile]) {
+ if (!version || !from || !to) {
+ console.error('release-notes: usage: node scripts/release-notes.mjs <version> <folder with the packages> <folder for the files to attach> [<current notes>]')
+ process.exit(2)
+ }
+ const missing = missingPackages(version, readdirSync(from))
+ if (missing.length > 0) {
+ console.error(`release-notes: ${from} has no ${missing.join(', ')}`)
+ process.exit(1)
+ }
+ mkdirSync(to, { recursive: true })
+ const sizes = {}
+ const hashes = {}
+ for (const entry of PACKAGES) {
+ const name = packageName(version, entry)
+ sizes[name] = statSync(join(from, name)).size
+ hashes[name] = await sha256(join(from, name))
+ copyFileSync(join(from, name), join(to, copyName(entry)))
+ }
+ writeFileSync(join(to, SUMS), checksums(version, hashes))
+ const block = downloadBlock({ version, sizes, repo: process.env.GITHUB_REPOSITORY || REPO, mirror: process.env.MIRROR_BASE || undefined })
+ process.stdout.write(withDownloads(notesFile === undefined ? '' : readFileSync(notesFile, 'utf8'), block))
+}
+
+if (process.argv[1] === fileURLToPath(import.meta.url)) await main(process.argv.slice(2))
diff --git a/app/test/release-notes.test.mjs b/app/test/release-notes.test.mjs
new file mode 100644
index 00000000..dabab44b
--- /dev/null
+++ b/app/test/release-notes.test.mjs
@@ -0,0 +1,164 @@
+import assert from 'node:assert/strict'
+import { spawnSync } from 'node:child_process'
+import { createHash } from 'node:crypto'
+import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+import { test } from 'node:test'
+import { fileURLToPath } from 'node:url'
+import YAML from 'yaml'
+import { checksums, copyName, downloadBlock, formatSize, missingPackages, PACKAGES, packageName, withDownloads } from '../scripts/release-notes.mjs'
+
+const script = fileURLToPath(new URL('../scripts/release-notes.mjs', import.meta.url))
+const read = file => readFileSync(new URL(file, import.meta.url), 'utf8')
+const names = version => PACKAGES.map(entry => packageName(version, entry))
+const MB = 1024 ** 2
+
+test('the packages carry the names electron-builder gives them, and copies drop the version', () => {
+ assert.match(read('../electron-builder.yml'), /^artifactName: DeepSeek-Bot-\$\{version\}-\$\{os\}-\$\{arch\}\.\$\{ext\}$/mu)
+ assert.deepEqual(names('0.2.3'), [
+ 'DeepSeek-Bot-0.2.3-win-x64.exe',
+ 'DeepSeek-Bot-0.2.3-mac-arm64.zip',
+ 'DeepSeek-Bot-0.2.3-mac-x64.zip',
+ 'DeepSeek-Bot-0.2.3-linux-x86_64.AppImage',
+ 'DeepSeek-Bot-0.2.3-linux-amd64.deb',
+ ])
+ assert.deepEqual(PACKAGES.map(copyName), [
+ 'DeepSeek-Bot-win-x64.exe',
+ 'DeepSeek-Bot-mac-arm64.zip',
+ 'DeepSeek-Bot-mac-x64.zip',
+ 'DeepSeek-Bot-linux-x86_64.AppImage',
+ 'DeepSeek-Bot-linux-amd64.deb',
+ ])
+})
+
+test('sizes are whole megabytes, as GitHub shows them', () => {
+ assert.equal(formatSize(222_174_558), '212 MB')
+ assert.equal(formatSize(10), '1 MB')
+})
+
+test('the table lists Windows first, then macOS and Linux, and says which files are not for download', () => {
+ const sizes = Object.fromEntries(names('0.2.3').map((name, index) => [name, (index + 1) * 100 * MB]))
+ const block = downloadBlock({ version: '0.2.3', sizes })
+ const rows = block.split('\n').filter(line => line.startsWith('| ') && !line.startsWith('| System'))
+ assert.equal(rows.length, 5)
+ assert.match(rows[0], /^\| \*\*Windows 10\/11 \(64-bit \/ 64 位\)\*\*<br>Double-click to install \/ 双击安装 \| \[DeepSeek-Bot-0\.2\.3-win-x64\.exe\]\(https:\/\/github\.com\/Fei2411\/DS-Bot\/releases\/download\/v0\.2\.3\/DeepSeek-Bot-0\.2\.3-win-x64\.exe\) \| 100 MB \|$/u)
+ assert.match(rows[1], /^\| macOS, Apple chip .*mac-arm64\.zip.*\| 200 MB \|$/u)
+ assert.match(rows[2], /^\| macOS, Intel .*mac-x64\.zip.*\| 300 MB \|$/u)
+ assert.match(rows[3], /^\| Linux, AppImage .*linux-x86_64\.AppImage.*\| 400 MB \|$/u)
+ assert.match(rows[4], /^\| Linux, deb .*linux-amd64\.deb.*\| 500 MB \|$/u)
+ assert.match(block, /^## Download \/ 下载$/mu)
+ assert.match(block, /The `\.blockmap`, `latest\*\.yml` and `ds-bot-\*\.tgz` files and the source code archives are for updates and the plugin/u)
+ assert.match(block, /\[SHA256SUMS\.txt\]\(https:\/\/github\.com\/Fei2411\/DS-Bot\/releases\/download\/v0\.2\.3\/SHA256SUMS\.txt\)/u)
+ assert.doesNotMatch(block, /Mirror/u)
+})
+
+test('a mirror comes before GitHub, and a fork links to its own releases', () => {
+ const sizes = Object.fromEntries(names('0.2.3').map(name => [name, MB]))
+ const block = downloadBlock({ version: '0.2.3', sizes, repo: 'someone/DS-Bot', mirror: 'https://mirror.example/ds-bot/v0.2.3/' })
+ assert.match(block, /\| DeepSeek-Bot-0\.2\.3-win-x64\.exe: \[Mirror \/ 国内镜像\]\(https:\/\/mirror\.example\/ds-bot\/v0\.2\.3\/DeepSeek-Bot-0\.2\.3-win-x64\.exe\) · \[GitHub\]\(https:\/\/github\.com\/someone\/DS-Bot\/releases\/download\/v0\.2\.3\/DeepSeek-Bot-0\.2\.3-win-x64\.exe\) \|/u)
+ assert.doesNotMatch(block, /Fei2411/u)
+})
+
+test('SHA256SUMS.txt lists each package under both of its names, in the format sha256sum checks', () => {
+ const hashes = Object.fromEntries(names('0.2.3').map((name, index) => [name, String(index).repeat(64)]))
+ const lines = checksums('0.2.3', hashes).split('\n')
+ assert.equal(lines.pop(), '')
+ assert.equal(lines.length, 10)
+ assert.equal(lines[0], `${'0'.repeat(64)} DeepSeek-Bot-0.2.3-win-x64.exe`)
+ assert.equal(lines[1], `${'0'.repeat(64)} DeepSeek-Bot-win-x64.exe`)
+ assert.equal(lines[9], `${'4'.repeat(64)} DeepSeek-Bot-linux-amd64.deb`)
+})
+
+test('a missing package is named; other files in the folder do not count', () => {
+ const present = ['DeepSeek-Bot-0.2.3-win-x64.exe', 'DeepSeek-Bot-0.2.3-win-x64.exe.blockmap', 'DeepSeek-Bot-mac-arm64.zip', 'DeepSeek-Bot-0.2.2-mac-x64.zip',
+ 'DeepSeek-Bot-0.2.3-linux-x86_64.AppImage', 'DeepSeek-Bot-0.2.3-linux-amd64.deb', 'latest.yml']
+ assert.deepEqual(missingPackages('0.2.3', present), ['DeepSeek-Bot-0.2.3-mac-arm64.zip', 'DeepSeek-Bot-0.2.3-mac-x64.zip'])
+ assert.deepEqual(missingPackages('0.2.3', names('0.2.3')), [])
+})
+
+test('the table goes on top of the notes, and a second run replaces it', () => {
+ const sizes = Object.fromEntries(names('0.2.3').map(name => [name, MB]))
+ const block = downloadBlock({ version: '0.2.3', sizes })
+ const once = withDownloads('## What changed\r\n\r\n- Fixed it\r\n', block)
+ assert.ok(once.startsWith(`${block}\n\n## What changed`))
+ assert.equal(withDownloads(once, block), once)
+ const bigger = downloadBlock({ version: '0.2.3', sizes: Object.fromEntries(names('0.2.3').map(name => [name, 2 * MB])) })
+ const again = withDownloads(once, bigger)
+ assert.ok(again.startsWith(`${bigger}\n\n## What changed`))
+ assert.equal(again.split('## Download / 下载').length, 2)
+ assert.equal(withDownloads('', block), `${block}\n`)
+})
+
+test('the script hashes and copies the packages and prints the notes', (t) => {
+ const work = mkdtempSync(join(tmpdir(), 'ds-bot-release-notes-'))
+ t.after(() => { rmSync(work, { recursive: true, force: true }) })
+ const from = join(work, 'packages')
+ const to = join(work, 'attach')
+ mkdirSync(from)
+ for (const name of names('0.2.3')) writeFileSync(join(from, name), `package ${name}`)
+ writeFileSync(join(from, 'DeepSeek-Bot-0.2.3-win-x64.exe.blockmap'), 'map')
+ writeFileSync(join(work, 'notes.md'), '- Fixed it\n')
+ const env = { ...process.env, GITHUB_REPOSITORY: '', MIRROR_BASE: '' }
+ const run = spawnSync(process.execPath, [script, '0.2.3', from, to, join(work, 'notes.md')], { encoding: 'utf8', env })
+ assert.equal(run.status, 0, run.stderr)
+ assert.ok(run.stdout.startsWith('<!-- downloads -->\n## Download / 下载\n'))
+ assert.ok(run.stdout.endsWith('<!-- /downloads -->\n\n- Fixed it\n'))
+ assert.match(run.stdout, /\/Fei2411\/DS-Bot\/releases\/download\/v0\.2\.3\/DeepSeek-Bot-0\.2\.3-win-x64\.exe/u)
+ assert.deepEqual(readdirSync(to).sort(), [...PACKAGES.map(copyName), 'SHA256SUMS.txt'].sort())
+ const sums = readFileSync(join(to, 'SHA256SUMS.txt'), 'utf8')
+ for (const entry of PACKAGES) {
+ const name = packageName('0.2.3', entry)
+ const hash = createHash('sha256').update(`package ${name}`).digest('hex')
+ assert.ok(sums.includes(`${hash} ${name}\n`) && sums.includes(`${hash} ${copyName(entry)}\n`), name)
+ assert.equal(readFileSync(join(to, copyName(entry)), 'utf8'), `package ${name}`)
+ }
+})
+
+test('the script stops when a package is missing, so the release is not marked Latest', (t) => {
+ const work = mkdtempSync(join(tmpdir(), 'ds-bot-release-notes-'))
+ t.after(() => { rmSync(work, { recursive: true, force: true }) })
+ for (const name of names('0.2.3').slice(1)) writeFileSync(join(work, name), name)
+ const run = spawnSync(process.execPath, [script, '0.2.3', work, join(work, 'attach')], { encoding: 'utf8' })
+ assert.equal(run.status, 1)
+ assert.match(run.stderr, /has no DeepSeek-Bot-0\.2\.3-win-x64\.exe$/mu)
+})
+
+// A releases/latest link must never reach a release whose files are still being attached.
+test('the release becomes Latest last, after every job that attaches files', () => {
+ const workflow = YAML.parse(read('../../.github/workflows/release.yml'))
+ const runs = job => (job.steps ?? []).map(step => step.run ?? '').join('\n')
+ const latest = Object.entries(workflow.jobs).filter(([, job]) => /gh release edit "\$TAG" --latest/u.test(runs(job)))
+ assert.equal(latest.length, 1)
+ const [name, job] = latest[0]
+ const before = (jobName, seen = new Set()) => {
+ for (const need of [workflow.jobs[jobName].needs ?? []].flat()) if (!seen.has(need)) before(need, seen.add(need))
+ return seen
+ }
+ const uploaders = Object.keys(workflow.jobs).filter(other => other !== name && /gh release upload/u.test(runs(workflow.jobs[other])))
+ assert.ok(uploaders.length >= 4)
+ for (const uploader of uploaders) assert.ok(before(name).has(uploader), `${name} must come after ${uploader}`)
+ assert.match(job.steps.at(-1).run, /^gh release edit "\$TAG" --latest$/u)
+ assert.match(runs(job), /node scripts\/release-notes\.mjs /u)
+})
+
+test('both READMEs open with the same download block, a Windows link and the not-official line', () => {
+ for (const file of ['../../README.md', '../../README.zh.md']) {
+ const top = read(file).split(/\r?\n/u).slice(0, 10).join('\n')
+ assert.match(top, /\(https:\/\/github\.com\/Fei2411\/DS-Bot\/releases\/latest\)/u, file)
+ assert.match(top, /Windows 10\/11/u, file)
+ assert.match(top, /not an official DeepSeek product/u, file)
+ assert.match(top, /不是 DeepSeek 官方产品/u, file)
+ }
+ const block = (file) => {
+ const lines = read(file).split(/\r?\n/u)
+ return lines.slice(lines.findIndex(line => line.startsWith('**[Download DeepSeek Bot')), lines.findIndex(line => line.startsWith('**DeepSeek Bot**:')) + 1)
+ }
+ assert.ok(block('../../README.md').length > 10)
+ assert.deepEqual(block('../../README.zh.md'), block('../../README.md'))
+ // Edge shows Keep anyway only under Show more.
+ assert.match(block('../../README.md').join('\n'), /\*\*Keep\*\* → \*\*Show more\*\* → \*\*Keep anyway\*\*/u)
+ assert.match(block('../../README.md').join('\n'), /「保留」→「显示更多」→「仍然保留」/u)
+ for (const file of ['../../README.md', '../../README.zh.md'])
+ assert.doesNotMatch(read(file), /ds-bot-\d+\.\d+\.\d+\.tgz|DS-Bot#v\d/u, file)
+})
diff --git a/docs/dev/release-checklist.md b/docs/dev/release-checklist.md
index aaef41eb..48973095 100644
--- a/docs/dev/release-checklist.md
+++ b/docs/dev/release-checklist.md
@@ -141,7 +141,9 @@ DSH Desktop 和桌面应用各做一遍。
## 12. 桌面应用(Windows)
-12.7 和 12.8 要在 Release 发布、工作流传完安装包之后做:Release 里要有安装包、它的 `.blockmap` 和 `latest.yml`。上一个发布版本没有安装包时,跳过这两项。
+发布 Release 时不勾「Set as the latest release」。工作流的最后一个任务「Download table, checksums and Latest」等所有安装包都传完,最后一步才把它标为 Latest。工作流跑完后确认:Release 里有 `SHA256SUMS.txt` 和不带版本号的文件(如 `DeepSeek-Bot-win-x64.exe`),说明开头是「下载 / Download」表,Release 标着「Latest」。有任务失败时,在这次运行里重跑失败的任务(Re-run failed jobs);不要手动标为 Latest,那样 Release 就没有校验和和下载表。
+
+12.7 和 12.8 要等整个 Release 工作流跑完、Release 页上显示「Latest」之后再做:Windows 的自动更新只看标为 Latest 的 Release,在那之前它会一直说没有新版本。Release 里还要有安装包、它的 `.blockmap` 和 `latest.yml`。上一个发布版本没有安装包时,跳过这两项。
| # | 步骤 | 期望 | 结果 |
|---|---|---|---|