Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

All notable changes to **BotArk** (formerly BotHub) are documented in this file.

## [0.18.0] - 2026-11-30

### Added

- **Portable packages and portable data directory** (#87): added a Windows `portable` target (`BotArk-Portable-<version>-x64.exe`) alongside the NSIS installer. Startup resolves the data directory in order of `--user-data-dir=<path>`, `PORTABLE_EXECUTABLE_DIR`, or a sibling `BotArkData` folder / `.botark-portable` marker (next to the executable on Windows/Linux, or next to `BotArk.app` on macOS). Portable mode skips the legacy `BotHub` migration, creates missing directories, and falls back to the default `userData` with a warning when the location is read-only.

### Changed

- **Smaller production bundles and on-demand inspector**: enabled `build.minify` for Electron main, preload, and renderer (`electron-vite` defaults to unminified output), cutting total JS from 5.06 MB to 2.65 MB. Lazy-loaded the right-side `InfoPanel` and its platform inspectors on first open, reducing the renderer entry chunk from 2,048.81 kB to 729.07 kB.
- **Incremental Markdown streaming**: `MarkdownText` caches completed blocks separated by blank lines outside fenced code blocks in a bounded, locale- and handler-aware cache, so streaming appends only re-parse the trailing block instead of the full reply on every chunk. Stabilized `MessageBubble` link callbacks so memoized bubbles skip re-parsing and subtree reconciliation across unrelated renders. In 5 interleaved A/B pairs (`node scripts/bench/compare.mjs`), parser-only time for 80 incremental renders of a 30-section report dropped from 8.73 ms to 3.67 ms (-58.0%), and 40 full re-renders dropped from 26.20 ms to 20.78 ms (-20.7%).
- **Debounced collaboration room persistence**: room updates use the 350 ms debounced, lazy-serialized storage path already used by direct chats, flush on `pagehide`, and cancel queued writes when clearing saved data.

### Fixed

- **Grok Connect stream framing and memory bounds**: `WatchGrokBotTranscripts` rejects frame headers above 4 MiB immediately and reassembles fragmented frames with one copy per completed frame instead of concatenating the buffer on every read. In interleaved A/B sampling, median decode time for a 2 MiB frame delivered in 1 KiB chunks dropped from 110.84 ms to 26.91 ms (-75.7%).
- **Grok background watch cursor growth**: removed roster agents and conversations now drop their stale cursors without dropping incremental watch registrations from sending messages, listing agents, or reading transcripts, and standalone session pins keep only the latest viewed session per agent.
- **DS Bot duplicate relay connections**: concurrent relay connects share one in-flight connection, preventing leaked WebSockets and duplicated stream deltas across `ensureRelayClient` and connection probes.
- **MCP slow tool discovery**: the connect timeout is cleared as soon as the transport connects, so servers that connect quickly but take longer to finish paginated `tools/list` are no longer torn down prematurely.
- **Non-blocking macOS signature check**: replaced the synchronous `spawnSync` `codesign` probe (up to 3.5 s on the main thread) with a single-flight async `spawn` shared by the security vault status and auto-updater.

## [0.17.1] - 2026-11-28

### Changed
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,17 @@ Download the latest installer from [**GitHub Releases**](https://github.com/qyba
| **macOS (Apple Silicon M1–M4)** | `BotArk-<version>-arm64.dmg` | ✅ **Apple Developer ID signed & notarized** — drag into `Applications` and open directly |
| **macOS (Intel x64)** | `BotArk-<version>-x64.dmg` | ✅ **Apple Developer ID signed & notarized** — no Gatekeeper prompts |
| **Windows 10 / 11 (64-bit)** | `BotArk-Setup-<version>-x64.exe` | One-click NSIS installer (preserves local data across upgrades) |
| **Windows 10 / 11 Portable (64-bit)** | `BotArk-Portable-<version>-x64.exe` | No installer; stores all data in `BotArkData` beside the `.exe` |
| **Android 8.0+** | `BotArk-<version>-android.apk` | Signed universal APK — standalone mode + LAN QR sync |

#### Portable mode

- On **Windows**, run `BotArk-Portable-<version>-x64.exe` from any writable folder or USB drive. BotArk creates `BotArkData` beside the `.exe` and stores all accounts, sessions, and settings there.
- On **macOS**, unzip `BotArk-<version>-arm64.zip` or `BotArk-<version>-x64.zip` to a writable folder or USB drive. Create an empty `BotArkData` folder or an empty `.botark-portable` file in the same folder as `BotArk.app`, then open `BotArk.app`.
- To pick a custom data directory on any platform, launch BotArk with `--user-data-dir=<path>`. This flag overrides portable mode and the legacy `BotHub` migration.

If the portable location is read-only, BotArk logs a warning and falls back to the default `userData` directory instead of crashing at startup.

### 2. Add Your First Agent or Room

1. Press **`⌘N` / `Ctrl+N`** (or click **`+`** at the top-left) to connect any of the 6 platforms or launch a **Multi-Agent Collaboration Room**.
Expand Down
4 changes: 2 additions & 2 deletions android/BotArk/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId = "com.qybaihe.botark"
minSdk = 26
targetSdk = 35
versionCode = 18
versionName = "0.17.1"
versionCode = 19
versionName = "0.18.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
9 changes: 9 additions & 0 deletions docs/readme/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,17 @@ BotArk 直接对接各平台原生通信协议,右侧操作台(`⌘I`)会
| **macOS(Apple 芯片 M1–M4)** | `BotArk-<版本号>-arm64.dmg` | ✅ **Apple Developer ID 签名与官方公证**,拖入「应用程序」双击直开,无拦截提示 |
| **macOS(Intel 芯片)** | `BotArk-<版本号>-x64.dmg` | ✅ **Apple Developer ID 签名与官方公证**,安装即用 |
| **Windows 10 / 11(64 位)** | `BotArk-Setup-<版本号>-x64.exe` | NSIS 一键安装向导(版本升级自动保留本地账号数据) |
| **Windows 10 / 11 便携版(64 位)** | `BotArk-Portable-<版本号>-x64.exe` | 免安装,账号、会话与设置全部保存在同目录的 `BotArkData` 文件夹 |
| **Android 8.0+** | `BotArk-<版本号>-android.apk` | 官方签名安装包,支持独立直连与桌面端扫码同步 |

#### 便携模式

- 在 **Windows** 上,将 `BotArk-Portable-<版本号>-x64.exe` 放到任意可写文件夹或 U 盘直接运行。程序会在 `.exe` 同目录自动创建 `BotArkData`,所有账号、会话与设置都保存在其中。
- 在 **macOS** 上,将 `BotArk-<版本号>-arm64.zip` 或 `BotArk-<版本号>-x64.zip` 解压到可写文件夹或 U 盘,在 `BotArk.app` 同级目录新建空的 `BotArkData` 文件夹(或空的 `.botark-portable` 文件),再打开 `BotArk.app`。
- 如需手动指定数据目录,可在启动时添加 `--user-data-dir=<路径>` 参数,该参数的优先级高于便携模式与旧版 `BotHub` 数据迁移。

若便携目录为只读(例如只读镜像),BotArk 会输出警告并回退到默认 `userData` 目录,不会在启动时崩溃。

### 2. 添加首个账号或组建协作室

1. 按 **`⌘N` / `Ctrl+N`**(或点击侧边栏左上角 **`+`**)接入六大平台账号,或一键创建**多 Agent 协作室**;如需批量导入或配置代理池,打开左下角 **「设置与账号」**。
Expand Down
9 changes: 6 additions & 3 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { rendererAlias, rendererPlugins, sharedAlias } from './vite.shared.mts'

export default defineConfig({
main: {
resolve: { alias: sharedAlias }
resolve: { alias: sharedAlias },
build: { minify: true }
},
preload: {
resolve: { alias: sharedAlias }
resolve: { alias: sharedAlias },
build: { minify: true }
},
renderer: {
resolve: { alias: rendererAlias },
plugins: rendererPlugins()
plugins: rendererPlugins(),
build: { minify: true }
}
})
8 changes: 4 additions & 4 deletions ios/BotArk/BotArk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 13;
CURRENT_PROJECT_VERSION = 14;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -399,7 +399,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MARKETING_VERSION = 0.17.1;
MARKETING_VERSION = 0.18.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -447,7 +447,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 13;
CURRENT_PROJECT_VERSION = 14;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -460,7 +460,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MARKETING_VERSION = 0.17.1;
MARKETING_VERSION = 0.18.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
4 changes: 2 additions & 2 deletions ios/BotArk/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ settings:
base:
SWIFT_VERSION: "5.9"
IPHONEOS_DEPLOYMENT_TARGET: "17.0"
MARKETING_VERSION: "0.17.1"
CURRENT_PROJECT_VERSION: "13"
MARKETING_VERSION: "0.18.0"
CURRENT_PROJECT_VERSION: "14"
PRODUCT_NAME: "$(TARGET_NAME)"
TARGETED_DEVICE_FAMILY: "1,2"
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: NO
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "botark",
"version": "0.17.1",
"version": "0.18.0",
"goxfBuild": 15,
"private": false,
"description": "BotArk — all your personal AI agents in one native desktop workspace",
Expand Down
69 changes: 69 additions & 0 deletions scripts/bench/compare.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { execFileSync } from 'node:child_process'
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
import { loadavg } from 'node:os'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'

const root = resolve(dirname(fileURLToPath(import.meta.url)), '../..')
const baselineDir = resolve(process.argv[2] || resolve(root, '.worktrees/baseline'))
const rounds = Math.max(1, Number(process.env.BOTARK_AB_ROUNDS || 5))
const outDir = resolve(root, '.cache/bench')
mkdirSync(outDir, { recursive: true })

function sample(cwd, tag) {
const resultsFile = resolve(cwd, `.cache/bench/ab-${tag}.jsonl`)
mkdirSync(dirname(resultsFile), { recursive: true })
if (existsSync(resultsFile)) rmSync(resultsFile)
execFileSync(
process.execPath,
[resolve(root, 'node_modules/vitest/vitest.mjs'), 'run', '--config', 'scripts/bench/vitest.config.mts'],
{ cwd, env: { ...process.env, NODE_ENV: 'production', BOTARK_BENCH_RESULTS: resultsFile }, stdio: ['ignore', 'pipe', 'pipe'] }
)
return readFileSync(resultsFile, 'utf8').trim().split('\n').filter(Boolean).map((line) => JSON.parse(line))
}

const median = (xs) => {
const sorted = [...xs].sort((a, b) => a - b)
const mid = Math.floor(sorted.length / 2)
return sorted.length % 2 ? sorted[mid] : (sorted[mid - 1] + sorted[mid]) / 2
}

const series = new Map()
let errors = 0
for (let round = 0; round < rounds; round++) {
for (const [side, dir] of [['before', baselineDir], ['after', root]]) {
for (const row of sample(dir, side)) {
errors += row.errors
const key = `${row.metric}:${side}`
if (!series.has(key)) series.set(key, { values: [], work: row.work })
series.get(key).values.push(row.valueMs)
}
}
console.log(`completed round ${round + 1}/${rounds}`)
}

const metrics = [...new Set([...series.keys()].map((k) => k.replace(/:(before|after)$/, '')))]
const lines = [
'# Interleaved A/B benchmark report',
'',
`- Before: \`${execFileSync('git', ['-C', baselineDir, 'rev-parse', '--short', 'HEAD'], { encoding: 'utf8' }).trim()}\``,
`- After: \`${execFileSync('git', ['rev-parse', '--short', 'HEAD'], { cwd: root, encoding: 'utf8' }).trim()}\``,
`- Rounds: ${rounds} alternating A/B pairs (NODE_ENV=production), errors: ${errors}`,
`- Host load average during run: ${loadavg().map((n) => n.toFixed(2)).join(', ')}`,
'',
'| Metric | Before median ms (range) | After median ms (range) | Delta |',
'| :--- | ---: | ---: | ---: |'
]
for (const metric of metrics) {
const before = series.get(`${metric}:before`)
const after = series.get(`${metric}:after`)
const bMed = median(before.values)
const aMed = median(after.values)
const delta = ((aMed - bMed) / bMed) * 100
const fmt = (s) => `${median(s.values).toFixed(2)} (${Math.min(...s.values).toFixed(2)}..${Math.max(...s.values).toFixed(2)})`
lines.push(`| \`${metric}\` | ${fmt(before)} | ${fmt(after)} | ${delta >= 0 ? '+' : ''}${delta.toFixed(1)}% |`)
console.log(`${metric}: ${fmt(before)} -> ${fmt(after)} (${delta.toFixed(1)}%)`)
}
const report = lines.join('\n') + '\n'
writeFileSync(resolve(outDir, 'ab-report.md'), report)
if (errors > 0) process.exit(1)
Loading
Loading