#!/usr/bin/env bash
# 组合包安装脚本（Trove 自动生成，勿手改；组合包文档为准）
# combo: combo-ai-code-review ｜ AI 代码审查工作流（repomix + code-review-graph + swe-rex） ｜ 状态: partial
# 生成: 2026-09-24 ｜ 详情: https://trove.xin/combos/combo-ai-code-review.html ｜ 依赖警告见文档
# 按官方下载源 + 国内镜像适配；每条命令后可验证（预期输出见组合包文档）。
# 注意：本包为配置/排查型，命令含占位符或示例片段，不能整段直跑；请按文档逐步复制执行。

# ==== [1/3] repomix：代码上下文打包 ====
# 版本要求: >= 1.18.0（2026-08-29 实测；Node >= 18）
npm_config_registry=https://registry.npmmirror.com npm install -g repomix
# repomix <仓库目录> --output repomix-output.txt --compress

# ==== [2/3] code-review-graph：审查 ====
# 版本要求: == 2.3.8（2026-08-28 收录实测版本）
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple code-review-graph==2.3.8
code-review-graph --version   # 预期输出: code-review-graph 2.3.8

# ==== [3/3] swe-rex：沙箱执行验证 ====
# 版本要求: == 1.4.0（2026-08-28 收录实测版本）
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple swe-rex==1.4.0
swerex-remote --help   # 预期输出: usage: swerex-remote [-h] [--host HOST] [--port PORT] --auth-token AUTH_TOKEN

