Files
Hermit/MIGRATION.md
T
WHCandCursor f29c1000b6
ci / tcc-check (push) Failing after 39s
ci / linux (aarch64, 0) (push) Skipped
ci / linux (x86, 1) (push) Skipped
ci / linux (x86_64, 1) (push) Skipped
ci / windows (push) Skipped
fix: ship hermit-update (and hermit-service) as 1.0.1
Install hermit-update / hermit-service from make install and bootstrap;
keep cst-agent-* as compat symlinks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-29 22:00:07 +08:00

105 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 从 CST-Agent 迁移到 Hermit
**本仓库 `WHC/CST-agent` 保留为兼容入口。** 产品名与规范克隆地址已改为:
**https://git.whcself.xyz/WHC/Hermit**
二进制、配置与环境变量自 **0.10.0** 起以 Hermit 为准;`CST-agent` 仓库与旧包名仅作过渡。
---
## 1. 换源码远程(推荐)
已有检出:
```bash
# 一键(在仓库根目录)
./scripts/migrate_remote_to_hermit.sh
# 或手动
git remote set-url origin https://git.whcself.xyz/WHC/Hermit.git
git fetch origin
git branch -u origin/main
```
新克隆:
```bash
git clone https://git.whcself.xyz/WHC/Hermit.git
cd Hermit
make -j$(nproc) && make install PREFIX=$HOME/.local
```
旧地址仍可拉代码一段时间:
```bash
git clone https://git.whcself.xyz/WHC/CST-agent.git # 兼容;请改 origin 到 Hermit
```
---
## 2. 二进制与 PATH
| 旧 | 新 |
|---|---|
| `cst-agent` | `hermit`(安装时仍提供 `cst-agent` → `hermit` 软链) |
| `cst-agent-update` | → `hermit-update`(软链;议会助手 → `hermit-service`) |
| Release `cst-agent-VERSION-linux-*.tar.gz` | `hermit-VERSION-linux-*.tar.gz`(过渡期可能双发) |
```bash
hermit --version # hermit 1.0.x
hermit-update # 升级;兼容名 cst-agent-update
cst-agent --version # 同二进制(软链)
```
---
## 3. 配置目录
| 旧 | 新 |
|---|---|
| `~/.config/cst-agent/` | `~/.config/hermit/` |
| Windows `%APPDATA%\cst-agent` | `%APPDATA%\hermit` |
程序若发现 **仅有** 旧目录、尚无新目录,会继续读旧路径。建议主动迁移:
```bash
# Linux / macOS
mkdir -p ~/.config/hermit
# 若尚未迁过:
cp -a ~/.config/cst-agent/. ~/.config/hermit/ 2>/dev/null || true
```
工作区 `.agent/` 会话目录**不变**,无需改动。
---
## 4. 环境变量
`HERMIT_*` 优先;未设置时仍读 `CST_*`。
| 用途 | 新 | 旧(兼容) |
|---|---|---|
| Provider / Key / Model | `HERMIT_PROVIDER` 等 | `CST_PROVIDER` 等 |
| ASCII / Icons | `HERMIT_ASCII` / `HERMIT_ICONS` | `CST_ASCII` / `CST_ICONS` |
| 议会密码等 | `HERMIT_REALM_PASSWORD`(若已接双读) | `CST_REALM_PASSWORD` |
systemd:`EnvironmentFile` 已同时尝试 `~/.config/hermit/parliament.env` 与旧路径。
---
## 5. CI / 脚本 / 文档链接
- 安装脚本、bootstrap、文档中的规范 URL 改为 `…/WHC/Hermit`。
- 本文件与 README 顶栏是 **CST-agent 仓库上的最后一次迁移说明**;后续功能请在 **Hermit** 仓库跟进。
---
## 6. 核对清单
- [ ] `git remote -v` 指向 `WHC/Hermit.git`
- [ ] `hermit --version` 正常;PATH 上可选保留 `cst-agent` 软链
- [ ] `~/.config/hermit/` 有 credentials / settings(或确认仍在用旧目录回退)
- [ ] 书签 / 镜像 / CI 的 clone URL 已更新
- [ ](可选)归档或只读化 `CST-agent` 仓库说明,避免双主开发