把 github.com/Autumn-27/norma v0.4.3(commit 320ae32)的源码复制到 third_party/norma,并用 go.mod 的 replace 指向本地副本。上游删除仓库或 改写 tag 都不再影响本仓库构建。 - 已验证 GOPROXY=off 下可完整编译并打出发行包 - go.sum 中该模块的两条校验记录随之删除(本地 replace 不需要哈希) - 升级方法与授权注意事项见 third_party/README.md
43 lines
1.6 KiB
Markdown
43 lines
1.6 KiB
Markdown
# third_party
|
|
|
|
本目录存放随仓库分发的第三方源码,避免上游仓库删除或改写 tag 后本仓库无法构建。
|
|
|
|
## norma
|
|
|
|
ARTEX 的 agent SDK,提供 `agentcore`、`harness`、`llm`、`tool`、`permission`、`memory`、`mcp`、`coordinator` 等子包。
|
|
|
|
| 项 | 值 |
|
|
|---|---|
|
|
| 上游 | <https://github.com/Autumn-27/norma> |
|
|
| 版本 | v0.4.3 |
|
|
| commit | `320ae32989da97dd91469bb89164cbfe87d83d5d` |
|
|
| 固化日期 | 2026-10-20 |
|
|
| 体积 | 1.8 MB / 206 个 `.go` 文件 |
|
|
|
|
`go.mod` 通过下面这行把模块指向本地副本,构建不再访问上游:
|
|
|
|
```
|
|
replace github.com/Autumn-27/norma => ./third_party/norma
|
|
```
|
|
|
|
### 升级方法
|
|
|
|
```bash
|
|
# 1. 取新版本源码(只下载,不切换依赖)
|
|
go mod download github.com/Autumn-27/norma@v0.4.4
|
|
|
|
# 2. 覆盖本地副本。模块缓存里的文件是只读的,复制后要放开权限
|
|
rm -rf third_party/norma
|
|
cp -R "$(go env GOMODCACHE)/github.com/!autumn-27/norma@v0.4.4" third_party/norma
|
|
chmod -R u+w third_party/norma
|
|
|
|
# 3. 同步 go.mod 里的 require 版本 && 更新本文件的版本/commit 表
|
|
go build ./...
|
|
```
|
|
|
|
### 注意
|
|
|
|
- 本地 `replace` 不需要校验和,因此根 `go.sum` 里已没有 `github.com/Autumn-27/norma` 的记录;这是预期行为,不是漏提交。
|
|
- 上游仓库**没有 LICENSE 文件**。按默认版权规则应视为“保留所有权利”,对外分发含此副本的构建产物前,请先向上游作者确认授权。
|
|
- 该目录自带 `go.mod`,是独立 module,不参与主模块的 `./...` 通配,也不影响 `go vet ./...` 的包范围。
|