Skip to content

v2.2.7

Latest

Choose a tag to compare

@simonlin1212 simonlin1212 released this 12 Nov 14:50

修 CodeBuddy 做研究大脑时每轮都拿不到结果的问题(#59);运行列表页点链接不再要求重新带 token;服务被停掉时不再留下 Agent 的临时工作区。界面和使用方式没有变化。

原因

CodeBuddy CLI 用 --output-format json 答完后会立刻 process.exit()。stdout 是管道时,Node 在 macOS 上是异步写,超过约 64 KB 的部分来不及写出就丢了,JSON 断在半截,产品只能报「返回了无法解析的结果」(agent_bad_output)。只回一句话的接入测试输出很小,所以能通过;研究阶段的输出远超这个大小,所以每轮都失败。

修复

  • 大输出不再被截断:Claude Code / CodeBuddy 的回答先写进临时文件,进程结束后再读(普通文件同步写,退出不会丢),4 MB 输出上限照旧。Codex 是逐行事件流,仍走管道。
  • 独立安装的 CodeBuddy CLI 不再被套上 WorkBuddy 精简包:CODEBUDDY_FORCE_LITE_WB_BUNDLE=1 现在只给 WorkBuddy 桌面版自带的 CLI(按真实路径判断),npm 全局装的独立 CLI 走它自己的包。
  • 开着交互式 CodeBuddy 时提问不再直接退出:CLI 的帮助里列出 --port 时传 --port 0,让系统分配空闲端口,不再和交互会话抢同一个固定端口(EADDRINUSE);老版本没有这个参数就不传。
  • 运行列表页点链接不再要求重新带 token:运行列表和运行详情页允许同站跳转,点链接时浏览器会带上登录 cookie;页面里仍然不允许运行脚本,报告查看器保持原来更严的策略。
  • 服务被停掉时删掉 Agent 临时工作区:本机 Agent 还在回答时用 Ctrl+C 或系统信号停掉服务,原来临时工作区(里面有回答原文、上传的图片)会留在系统临时目录,现在退出前同步删掉。
  • 同一组问题在 vibe-astock 里是 #27、#28,两边一起修。

验证

修复提交:58e1265;发布提交:76bd805。

  • 本机(macOS):后端全套 1301 项,1293 通过、8 跳过、0 失败;前端 351 项全部通过,构建通过;前后端类型检查通过;mypy 检查通过。补上临时工作区清理后重跑本机 Agent 那组用例,2 项按时间判断的用例在机器高负载时没等到假 CLI 启动,单独重跑通过。
  • 新增 7 条回归用例,修复前都失败、修复后通过:假 CLI 一次写出 300 KB 后立刻 process.exit()(CodeBuddy、Claude 各一条),修复前 JSON 被截断,修复后拿到完整回答;超过 4 MB 仍按输出过大处理;独立 CLI 不设精简包;帮助里有无 --port 两种情况;运行页安全策略;父服务收到 SIGTERM 时临时工作区被删。修复经一轮独立审查(Codex 6.1 Sol):无问题;vibe-astock 同一套修复的审查报了 1 条(服务被停掉时临时文件可能留下),两边一起修了,复核无问题。
  • 跨平台 CI:Ubuntu / macOS / Windows × Node 22 / 24,修复提交 6 组全部通过(运行记录),发布提交首轮 ubuntu + Node 22 一组那条偶发的并发用例(「参数无效或同步启动失败都不占住并发槽位」,Claude 版本检测超时)失败,重跑一次后通过,6 组全部通过(运行记录)。

没有验证到的:没有可用的 CodeBuddy 订阅环境,没用真实 CodeBuddy CLI 跑深度研究;没有 Windows 实机;外部取数端点与完整研究业务未重跑。

Windows / macOS 免安装包:本页附 Windows x64、Apple 芯片 Mac、Intel Mac 三个压缩包,各带 .sha256 校验文件,由 GitHub Actions 在三个平台各构建一次、解压冒烟通过后自动附上。升级免安装版:解压到新文件夹,把旧文件夹的 .local 整个复制过去再启动。

安装包 SHA-256(下载后可用 shasum -a 256 文件名(macOS)或 certutil -hashfile 文件名 SHA256(Windows)核对):

文件 SHA-256
VibeResearch-2.2.7-win-x64.zip 8bfe112b4a20fd2f5d9fc424a99ff72d2b4090709afc72bffcae5f90c47061c6
VibeResearch-2.2.7-mac-arm64.zip 43568b45ee37ee33d24efe3881adbcb92ca111756461932004b71ad16fddcbc0
VibeResearch-2.2.7-mac-x64.zip 70b3fba12071152cedb33652a9353214e1db1e99597231511cabc4a373a57ac7

三个包都由发布提交 76bd805 构建,构建与冒烟记录三个平台全部通过。

源码版升级:git pull 后重新运行 scripts/setup(Windows:scripts\setup-windows.cmd)。

完整变更见 CHANGELOG。

English: When CodeBuddy was the research brain, every stage failed with agent_bad_output (#59). The CLI writes its JSON result and calls process.exit() right away; with stdout on a pipe, Node on macOS writes asynchronously, so anything past roughly 64 KB was lost and the JSON was cut off. Claude Code and CodeBuddy answers now go to a temporary file that is read after the process exits (the 4 MB output cap still applies; Codex stays on the pipe). Also fixed: the WorkBuddy lite bundle is now forced only for the CLI bundled with the WorkBuddy desktop app; --port 0 is passed when the CLI supports it, so an open interactive CodeBuddy session no longer causes EADDRINUSE; links on the run list and run detail pages keep the login cookie (scripts are still not allowed); and the agent's temporary workspace is removed when the service is stopped by a signal. Verified with regression tests and cross-platform CI; not verified with a real CodeBuddy subscription or on physical Windows hardware.