feat(cli): 一键安装脚本 + CLI↔server 版本兼容门控 + 版本源统一 - #173
Merged
Conversation
curl … | bash 一条命令完成安装:探测系统/架构 → 解析最新 Release(或 MEEBOX_VERSION/--version) → 下载匹配压缩包 → 校验 SHA-256 → 解出 meebox 装入 PATH(默认 /usr/local/bin,不可写回退 ~/.local/bin;MEEBOX_BIN_DIR/--bin-dir 可覆盖)。刻意不落地 SKILL.md(已内嵌、meebox skill 可导出)。 仅覆盖 Linux 与 macOS arm64(与已发布产物一致),Windows 走手动下载。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
guide §2 增一键安装 + 手动下载回退;cli/README 增 Install 节;arch 02-cli 分发段补安装脚本说明。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CLI 请求带 X-Meebox-CLI-Version 头声明版本;服务端据集中管理的最低可兼容版本(MIN_CLI_VERSION) 对所有 API 调用统一门控:版本可解析且低于下限 → 426 + SV_CLIENT_TOO_OLD(meta 带 minVersion / clientVersion)。默认宽松:缺头 / 不可解析(dev 构建)放行,保证既有 CLI 可用;不做按端点差异化。 新增错误码 ESV0005。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
apiclient 每次请求带 X-Meebox-CLI-Version(版本经 New 注入,空则省略);收到 ESV0005 (HTTP 426)时 APIError.Error() 输出「CLI 过旧、请升级」提示,含双方版本与升级指引。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CLI release 版本不再独立取 git tag,改从 apps/desktop/package.json(app 运行期版本的唯一真相源) 读取并注入 cmd.version;发布前置已校验 tag == 该版本,故二者一致但只有一个来源。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
arch service-api 增「CLI 版本兼容门控」一节 + 426 状态;arch cli 与 AGENTS 记版本取自 apps/desktop/package.json(与 app 同源)+ 版本头门控;guide 增版本过旧升级提示说明。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
围绕
meeboxCLI 的分发与版本治理补三块能力。变更
1. macOS / Linux 一键安装脚本 ·
tools/cli/install.shcurl -fsSL …/tools/cli/install.sh | bash:探测系统/架构 → 解析最新 Release(或MEEBOX_VERSION/--version)→ 下载 → 校验 SHA-256 → 装入PATH(默认/usr/local/bin,不可写回退~/.local/bin;MEEBOX_BIN_DIR/--bin-dir可覆盖)。SKILL.md(已内嵌、meebox skill可导出)。2. CLI ↔ server 版本兼容门控
X-Meebox-CLI-Version头。426 Upgrade Required+SV_CLIENT_TOO_OLD(ESV0005,meta 带 minVersion/clientVersion)。3. CLI 发布版本号与 app 同源
apps/desktop/package.json(app 运行期版本的唯一真相源)读取并注入cmd.version;发布前置已校验 tag 与之一致,故二者一致但只有一个来源。文档
arch(service-api「版本兼容门控」+ 426、cli 分发/版本源/兼容说明)、guide(安装/升级提示)、AGENTS(版本源)、
cli/README/SKILL.md(安装、skill命令、fallback)全部对齐。验证
CLI
go vet/go test/go build全过(新增版本头、空版本省略、426→友好错误、安装脚本bash -n/--help);desktop + sharedtypecheck/lint/build全过。🤖 Generated with Claude Code