Move Agent-Native under deps and return stable error envelopes.
HTTP failures now carry catalog codes and a trace id, and the parent replace directives are the only copies used at build time. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,20 +7,31 @@
|
||||
设计参考 Multica 的 agent orchestration 理念与 Agent-System `internal/squad`
|
||||
的成熟机制(黑板/沙箱工作区/顺序并行混合调度/动态调整),按"空表起步"通用化重写。
|
||||
|
||||
本仓库是该模块的源码位置。Go 模块路径为 `agent-squad`。智能体执行依赖子模块 [Agent-Native](./Agent-Native)(`replace agent-native => ./Agent-Native`),钉在固定提交,不随 Agent-Native 分支浮动。
|
||||
本仓库是该模块的源码位置。Go 模块路径为 `agent-squad`。依赖都在 `deps/`,由本仓 gitlink 固定,不随上游分支浮动:
|
||||
|
||||
克隆时带上子模块,否则无法编译:
|
||||
| 路径 | 作用 |
|
||||
|---|---|
|
||||
| `deps/agent-native` | 智能体执行。`replace agent-native => ./deps/agent-native` |
|
||||
| `deps/error-code-system` | HTTP 错误信封与规范码 |
|
||||
| `deps/logging-system` | 组合根日志。`trace_id` 来自 `X-Trace-Id`,`run_id` 标识一次编排 |
|
||||
| `deps/development-guidelines` | 开发规范,不参与编译 |
|
||||
|
||||
Agent-Native 自己的 `deps/` 里还有一份错误码库、日志库和规范。本仓编译只使用本仓 `go.mod` 的 `replace`,嵌套目录里的 `replace` 不生效。`scripts/submodule-consistency.sh` 要求两侧 gitlink 相同,避免两份副本锁到不同提交。
|
||||
|
||||
克隆时带上子模块,否则无法编译。已有克隆若仍留着根目录 `Agent-Native`,先删掉该残留目录再初始化:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git
|
||||
# 已克隆时:git submodule update --init
|
||||
# 已克隆时:
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
## 与周边仓库的关系
|
||||
|
||||
| 仓库/模块 | 关系 |
|
||||
|---|---|
|
||||
| Agent-Native(本仓 submodule `./Agent-Native`) | **智能体执行的唯一来源**:角色执行经 agent-native `adapters/native`(自研内核 runtime 循环 + 工作区工具)或产品注册的其他 agent-native 后端(如 pi-agent);LLM 规划器复用 `runtime/llm` 客户端做编排决策。本库不实现任何 Agent——只做编排与任务拆解。依赖方向 agent-squad → agent-native,反向无依赖 |
|
||||
| Agent-Native(本仓 submodule `deps/agent-native`) | **智能体执行的唯一来源**:角色执行经 agent-native `adapters/native`(自研内核 runtime 循环 + 工作区工具)或产品注册的其他 agent-native 后端(如 pi-agent);LLM 规划器复用 `runtime/llm` 客户端做编排决策。本库不实现任何 Agent——只做编排与任务拆解。依赖方向 agent-squad → agent-native,反向无依赖 |
|
||||
| `agent-system-multi/modules/squad`(U4 产品小队暂存仓) | **不在本仓**,互不依赖。产品小队含医疗器械预设角色与任务键,属产品层;后续产品仓接入本底座时,预设角色/任务模板改为向本底座注册(独立一期) |
|
||||
| 主仓 `internal/squad` | 机制语义(工作流驱动/黑板/子工作区/防篡改清单)的权威来源;本底座为通用化重写,不做逐行同步 |
|
||||
|
||||
@@ -168,7 +179,7 @@ LLM 配置走环境变量:`AGENT_SQUAD_LLM_BASE_URL` / `AGENT_SQUAD_LLM_API_KE
|
||||
|
||||
## 快速开始
|
||||
|
||||
在仓库根目录(需已初始化 `Agent-Native` 子模块):
|
||||
在仓库根目录(需已初始化 `deps/` 下的子模块):
|
||||
|
||||
```bash
|
||||
go build -o agent-squad .
|
||||
@@ -185,7 +196,8 @@ go build -o agent-squad .
|
||||
## 验证
|
||||
|
||||
```bash
|
||||
go vet ./... && go test -count=1 ./...
|
||||
GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./...
|
||||
./scripts/submodule-consistency.sh
|
||||
```
|
||||
|
||||
当前全绿(conformance 全链路 + HITL 各挂起点 + server + store + textextract)。
|
||||
|
||||
Reference in New Issue
Block a user