#!/usr/bin/env bash
# 组合包安装脚本（Trove 自动生成，勿手改；组合包文档为准）
# combo: combo-governance-stack ｜ 开发链路治理栈（agent-governance-toolkit + code-review-graph + herdr） ｜ 状态: verified
# 生成: 2026-09-24 ｜ 详情: https://trove.xin/combos/combo-governance-stack.html ｜ 依赖警告见文档
# 按官方下载源 + 国内镜像适配；每条命令后可验证（预期输出见组合包文档）。
set -euo pipefail

# ==== [1/3] agent-governance-toolkit：策略门禁与合规检查 ====
# 版本要求: [4.1.0, 4.1.0]（manifest 锁定单版本；CLI = agt，meta 包形态；本组合只用 CLI 面）
pip install agent-governance-toolkit --index-url https://pypi.tuna.tsinghua.edu.cn/simple
agt --version   # 预期输出: agt, version 4.1.0

# ==== [2/3] code-review-graph：代码关联图谱 ====
# 版本要求: [2.3.8, 2.3.8]（manifest 锁定；Python >= 3.10）
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] herdr：会话与工作区监督 ====
# 版本要求: [0.8.2, 0.8.2]（manifest 锁定；Linux x86_64 单二进制，无运行时依赖）
curl -sL -o herdr https://gh-proxy.com/https://github.com/herdrdev/herdr/releases/download/v0.8.2/herdr-linux-x86_64
chmod +x herdr && ./herdr --version   # 预期输出: herdr 0.8.2

