A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Document macOS release support
Fei2411d95ed98ed2bb
diff --git a/app/README.md b/app/README.mdindex 5138db37..c2049702 100644--- a/app/README.md+++ b/app/README.md@@ -18,8 +18,10 @@ npm installs `ds-bot` from `../ds-bot` as a copy of its package files (`install-|---|---|---|| `DS_BOT_HOME` | The data location: the `DSH_HOME` of the app. When it is set, the app asks nothing at its first start and imports nothing | The folder chosen at the first start || `DS_BOT_WORKSPACE` | With `DS_BOT_HOME`: the folder for the files that Bots make | `bot/workspace` in the data location |-| `DS_BOT_SHELL_DATA` | The app's own data (window, Chromium storage, `locations.json`) | Electron's `userData` (Windows: `%APPDATA%\DeepSeek Bot`) |-| `DS_BOT_UPDATE_URL` | A folder URL with a `latest.yml` and the installer it names, which the installed app updates from (see [Updates](#updates)). With `DS_BOT_HOME`, the app checks for updates only when this is set | The newest GitHub release |+| `DS_BOT_SHELL_DATA` | The app's own data (window, Chromium storage, `locations.json`) | Electron's `userData` (Windows: `%APPDATA%\DeepSeek Bot`; macOS: `~/Library/Application Support/DeepSeek Bot`) |+| `DS_BOT_UPDATE_URL` | Windows: a folder URL with `latest.yml` and its installer. macOS: a URL returning JSON like `releases/latest`, with `tag_name` and `html_url` (see [Updates](#updates)). With `DS_BOT_HOME`, the app checks only when this is set | The newest GitHub release |++On macOS, Electron's default `userData` directory for `productName` "DeepSeek Bot" is `~/Library/Application Support/DeepSeek Bot`.## First start and import@@ -65,6 +67,8 @@ npm run dist # the installer: dist-pack/DeepSeek-Bot-<version>-win-x64npm run check-packed # starts the packaged app on throwaway folders with the mock model, chats once, closes it```+macOS produces one DMG per architecture. Build arm64 on an Apple chip Mac and x64 on an Intel Mac. Do not cross-build: it packages native modules from `node_modules`; a combined build put 12 arm64-only native modules in its x64 app. The app is ad-hoc signed so downloaded copies are sealed. On first open, use System Settings → Privacy & Security → Open Anyway. Do not disable Gatekeeper.+`check-packed` takes another executable as its first argument, and a file for a screenshot of the window as its second. It runs an app that lies inside this checkout from a copy in its throwaway folder: from inside the checkout, Node would find a module that the package left out in the checkout's own `node_modules`.electron-builder packs only the packages that it finds through `dependencies` and `optionalDependencies`. The DSH packages ask for many packages as peers, which npm installs but electron-builder would leave out, so `package.json` lists them as dependencies. `npm test` fails when one is missing and names it.@@ -77,7 +81,9 @@ The installed app on Windows updates itself with electron-updater (`src/updates.The checks start before the Host (after a first start's import), so that a version whose Host does not start can still update. When the start fails, the app waits up to 15 seconds for the newest check. When it found a newer version, the error box says so; after the box the app waits for the download, then installs it and opens again.-`app-update.yml` in the package tells the app where its releases are; `npm run dist` writes it from `publish` in `electron-builder.yml`, together with `latest.yml` beside the installer (`npm run pack` writes neither). Neither command publishes. The release workflow (`.github/workflows/release.yml`) builds the installer when a release is published and attaches the installer, its `.blockmap` and `latest.yml` to the release. The release tag is the version of `ds-bot`, and `npm test` checks that the app has the same version.+On macOS, the app checks GitHub's latest release at start and every 4 hours. It asks once per version. Download opens the release page; Later closes the dialog. The app does not install the update itself. `DS_BOT_UPDATE_URL` on macOS points to JSON like the `releases/latest` API response, with `tag_name` and an HTTPS `html_url`.++On Windows, `app-update.yml` tells the app where its releases are; `npm run dist` writes it from `publish` in `electron-builder.yml`, together with `latest.yml` beside the installer (`npm run pack` writes neither). Neither command publishes. The release workflow (`.github/workflows/release.yml`) builds the installer when a release is published and attaches the installer, its `.blockmap` and `latest.yml` to the release. The release tag is the version of `ds-bot`, and `npm test` checks that the app has the same version. The macOS release job builds each DMG on a matching-architecture runner and attaches only the DMG.On throwaway folders (`DS_BOT_HOME`) the app checks for updates only from `DS_BOT_UPDATE_URL`, and it never asks: the update waits until the app quits. `scripts/check-update.mjs` checks the update of a packaged app with such a feed:@@ -88,6 +94,14 @@ node scripts/check-update.mjs "dist-pack/win-unpacked/DeepSeek Bot.exe" dist-nexIt serves the feed folder, starts the app on throwaway folders and waits until the app has downloaded the update and checked its sha512. Then it closes the app as a user does, so that the app installs the update as it quits; with `--kill` it ends the app, so that nothing is installed. On your own machine use `--kill`: the installer would install into `%LOCALAPPDATA%\Programs\DeepSeek Bot`. The download stays in `%LOCALAPPDATA%\deepseek-bot-updater`. CI runs it without `--kill` on its installed app, then checks that the installed version is the new one and that the updated app passes `check-packed`.+On macOS, pass the app executable and a version to mock a newer release:++```sh+node scripts/check-update.mjs "<app executable>" 99.0.0+```++The script serves a throwaway `releases/latest` JSON response, starts the app with throwaway data folders, waits for the available-update log, and closes the window. It does not open a browser.+## Layout| File | What it does |@@ -99,7 +113,7 @@ It serves the feed folder, starts the app on throwaway folders and waits until t| `src/profile.mjs` | The profile: its name, its bundles, and its creation and update || `src/first-run.mjs` | The first start's dialogs: the two folders and the offer to import || `src/import.mjs` | The import of a Bot team from the user's DSH |-| `src/updates.mjs` | The updates of the installed app on Windows: the checks, the background download and the question to restart |+| `src/updates.mjs` | The Windows installer updates and macOS release-page checks || `engine/` | On hold, not installed: the bundle `deepseek-bot-engine` for the app's own window in `ui/` || `test/` | `npm test`: the composition of the profile, and the dependencies that the package needs || `src/web.mjs` | DSH's Web front end document, the launch-token cookie exchange and the request forwarding |@@ -107,7 +121,7 @@ It serves the feed folder, starts the app on throwaway folders and waits until t| `assets/` | The app icon: `icon.svg`, `icon.png` (1024 px) and `icon.ico` (Windows, 16 to 256 px). `npm run icon` (`scripts/icon.mjs`) draws them again from the Main Bot's whale in `../ds-bot` || `electron-builder.yml`, `build/` | The package and the installer: app identity, files, icons, the Windows installer and the macOS disk image || `scripts/check-packed.mjs` | `npm run check-packed`: the check of a packaged app |-| `scripts/check-update.mjs` | The check of a packaged app's update from a feed folder |+| `scripts/check-update.mjs` | The check of a packaged app's update from a Windows feed folder or a macOS release |The Host installs plugins with the app's own pnpm (`node_modules/pnpm`).diff --git a/docs/dev/release-checklist.md b/docs/dev/release-checklist.mdindex bc4589b5..fb60c551 100644--- a/docs/dev/release-checklist.md+++ b/docs/dev/release-checklist.md@@ -147,3 +147,15 @@ CI 只跑单元测试和 Linux 上的测试台。窗口外框、输入法、高| 12.3 | 给一个 Bot 发消息;再打开设置 → 关于 DS Bot | 收到回复;DS Bot 一行写「随 DeepSeek Bot 应用一起更新。」 | || 12.4 | 装上一个发布版本的 App,打开它,等它提示新版本已经下载好,选「立即重启」 | App 关掉后自己装好新版并重新打开;关于页里是新版本号;团队都在 | || 12.5 | 再装一次上一个版本,等下载好的提示,选「稍后」,退出 App,等半分钟再打开 | 打开的是新版 | |++## 13. 桌面应用(macOS)++13.2–13.5 在 Apple 芯片和 Intel Mac 上分别做一次。++| # | 步骤 | 期望 | 结果 |+|---|---|---|---|+| 13.1 | 发布 Release,等工作流传完文件 | Release 里有 arm64 和 x64 两个 DMG | |+| 13.2 | 打开匹配架构的 DMG,把 DeepSeek Bot 拖到「应用程序」并第一次打开 | Gatekeeper 拦截;到「系统设置 → 隐私与安全性」点「仍要打开」后可打开 | |+| 13.3 | 首次启动选数据位置和 Bot 工作文件夹;用 mock model 发一条消息 | 位置对话框正常;收到回复 | |+| 13.4 | 关闭窗口 | 应用退出,Dock 里不留着 | |+| 13.5 | 装上旧版并打开,等新版提示后点「下载」 | 打开当前 Release 的发布页;应用不自动安装新版 | |diff --git a/docs/plans/2026-10-16-desktop-app.md b/docs/plans/2026-10-16-desktop-app.mdindex c6d7d040..6f57d509 100644--- a/docs/plans/2026-10-16-desktop-app.md+++ b/docs/plans/2026-10-16-desktop-app.md@@ -72,7 +72,7 @@- 发版:发布 Release 时,工作流打 Windows 安装包,把它、它的 `.blockmap` 和 `latest.yml` 传到 Release。应用和 ds-bot 用同一个版本号,Release 的标签就是这个版本号。- macOS(Apple 芯片和 Intel):dmg;不能自动更新,有新版时提示下载。- 安装包带着锁定的 DSH 装上的全部文件,不按 profile 删减。-- 不签名。+- 不用开发者证书签名,也不公证;macOS 包只做 ad-hoc 签名。macOS 第一次打开会被拦下,要到「系统设置 → 隐私与安全性」点「仍要打开」。## 不做什么@@ -86,8 +86,9 @@## 已知限制-- 还没有:在设置里改数据位置和 Bot 工作文件夹;导入后逐个试读会话(同一格式版本里更新的 DSH 加了新事件时,锁定版打不开那段对话);macOS 的 dmg 和有新版时的下载提示。-- 不签名:Windows 第一次运行会弹出 SmartScreen 警告,macOS 要在系统设置里手动放行。+- 还没有:在设置里改数据位置和 Bot 工作文件夹;导入后逐个试读会话(同一格式版本里更新的 DSH 加了新事件时,锁定版打不开那段对话)。+- 第一次运行:Windows 会弹出 SmartScreen 警告,macOS 要在系统设置里手动放行。+- macOS 上关掉窗口就退出应用(和 Windows 一样),Dock 里不留着。- 会话里记着工作文件夹的完整路径,不能改。所以导入和搬工作文件夹都要换段。- 安装的 `@deepseek-ai/dsh` 包带着 Office 套件和语音包,所以安装包里仍有这些文件,只是不加载。@@ -103,3 +104,4 @@- 2026-10-18:自己的界面先停下,窗口换回 DSH 的网页前端和系统标题栏;引擎的 profile 换回 `dsh-base`、`dsh-web-app`、`ds-bot`,PR #323。- 2026-10-18:首次启动选两个位置、从用户 DSH 导入团队的细节,PR #324。- 2026-10-19:Windows 自动更新的细节;发 Release 时传 Windows 安装包;应用里的插件不再自己查更新,PR #329。+- 2026-10-19:macOS 出两个 dmg(Apple 芯片 arm64、Intel x64),各在同架构的 runner 上打包;ad-hoc 签名(不签名的话下载后会显示"已损坏");有新版时弹框,点「下载」打开发布页,不自动安装;CI 和发版都打包并检查。