跳到主要内容

开发渠道

最后更新日期:2026-01-21

Clawdbot 提供三个更新渠道:

  • stable (稳定版):npm dist-tag 为 latest
  • beta (Beta 版):npm dist-tag 为 beta(测试中的构建版本)。
  • dev (开发版)main 分支 (git) 的动态头部。npm dist-tag 为 dev(发布时)。

我们将构建版本发布到 beta,进行测试,然后将 经过验证的构建版本提升为 latest,而不更改版本号 —— dist-tag 是 npm 安装的权威来源。

切换渠道

Git 检出方式:

clawdbot update --channel stable
clawdbot update --channel beta
clawdbot update --channel dev
  • stable/beta 检出最新的匹配标签(通常是同一个标签)。
  • dev 切换到 main 分支并基于上游进行 rebase。

npm/pnpm 全局安装方式:

clawdbot update --channel stable
clawdbot update --channel beta
clawdbot update --channel dev

这将通过对应的 npm dist-tag(latest, beta, dev)进行更新。

当你使用 --channel 显式 切换渠道时,Clawdbot 还会对齐安装方法:

  • dev 确保使用 git 检出(默认路径为 ~/clawdbot,可通过 CLAWDBOT_GIT_DIR 覆盖),更新它,并从该检出版本安装全局 CLI。
  • stable/beta 使用匹配的 dist-tag 从 npm 安装。

提示:如果你想并排使用稳定版和开发版,请保留两个克隆副本,并将你的网关指向稳定版那个。

插件与渠道

当你使用 clawdbot update 切换渠道时,Clawdbot 还会同步插件源码:

  • dev 优先使用 git 检出的内置插件。
  • stablebeta 会恢复为 npm 安装的插件包。

打标签的最佳实践

  • 为你希望 git 检出落点的版本打标签(vYYYY.M.DvYYYY.M.D-<patch>)。
  • 保持标签不可变:永远不要移动或重复使用标签。
  • npm dist-tag 仍然是 npm 安装的权威来源:
    • latest → 稳定版
    • beta → 候选构建版本
    • dev → main 分支快照(可选)

macOS 应用可用性

Beta 版和开发版构建可能 包含 macOS 应用版本。这没关系:

  • Git 标签和 npm dist-tag 仍然可以发布。
  • 在发布说明或更新日志中注明“此 Beta 版不提供 macOS 构建版本”。