docs: add provider profile management spec

This commit is contained in:
Codex
2026-06-05 15:48:30 +08:00
parent 2ebb51eed7
commit 8e64a3974a
7 changed files with 208 additions and 0 deletions
+2
View File
@@ -13,6 +13,7 @@ AgentRun 是面向 UniDesk 与 HWLAB 的共享 Code Agent 执行基础设施。`
- Backend adapter 隐藏具体 Agent 工具协议,`v0.1` 使用一个真实 Codex stdio backend kind 形成闭环,并在该 kind 下支持 `codex``deepseek``minimax-m3` profile;其他 backend kind 不进入第一波实现。
- AgentRun CLI 是受控操作入口,负责创建 run、提交 command、轮询 events、手动启动 runner 和查看 backend capabilityCLI 不等待完整模型 turn。
- RuntimeAssembly 是 runner/backend 启动前的装配 SPEC,负责把 backend image、profile credential、session、Git-only resource bundle 和 tool credential scope 统一成受控 Job 输入;装配权威规格见 [spec-v01-runtime-assembly.md](spec-v01-runtime-assembly.md)。
- Provider Profile 管理是 `agentrun-mgr` 的服务端委托能力,负责 profile status、API Key 写入、Secret/config 更新和 canary 验证;HWLAB 只把已鉴权管理动作委托给 AgentRunAgentRun 不做 HWLAB 用户鉴权。权威规格见 [spec-v01-provider-profile-management.md](spec-v01-provider-profile-management.md)。
- AgentRun Queue 是吸收 UniDesk Code Queue 的任务队列层,负责 task、attempt、retry、judge、summary、stats、read cursor 和 commander 聚合;Queue 查询只返回 Session 引用,输出和 trace 进入 Session API/CLI。权威规格见 [spec-v01-queue.md](spec-v01-queue.md)。
- Scheduler 是后续自动派发能力;`v0.1` 可以保留规格和状态字段,但不把自动调度作为第一阶段验收目标。
@@ -85,6 +86,7 @@ Runner inbound API 只允许本地或私有诊断,不作为业务客户端入
| AgentRun CLI | CLI/Job 工具 | 保留,P0 | JSON 输出、短返回、run/command/event/runner/backend 操作入口。 | `spec-v01-cli.md` |
| Postgres durable store | 稳定外部服务 | 保留,P0 | 使用 `agentrun-v01-postgres` 保存 runs、commands、events、runners、backends、leases 和 migration ledger;不使用 file/sqlite 作为 v0.1 durable store。 | `spec-v01-postgres.md` |
| Secret distribution | 系统能力 | 保留,P0 | Provider credential 只通过 Kubernetes SecretRef、ServiceAccount/RBAC 和 runner env/file projection 分发;Codex 测试凭据使用 `~/.codex/auth.json``~/.codex/config.toml` 生成 Secret projectionsource、GitOps、logs 和 events 不保存明文。 | `spec-v01-secret-distribution.md` |
| Provider Profile 管理 | 系统能力 | 保留,P0 规格 | 服务端查询/更新 provider profile Secret/config 并触发 canary;信任 HWLAB 后端委托,不实现用户鉴权。 | `spec-v01-provider-profile-management.md` |
| RuntimeAssembly | 系统能力 | 保留,P0 规格 | runner/backend 启动前的装配 SPEC`BackendImageRef``ProfileRef``SessionRef`、Git-only `ResourceBundleRef` 和 tool credential SecretRef scopeProfileRef、SessionRef、ResourceBundleRef 和 GitHub tool credential env projection 已具备 v0.1 最小实现。 | `spec-v01-runtime-assembly.md` |
| HWLAB 手动调度接入 | canary 集成目标 | 保留,P0 规格 | HWLAB `hwlab-cloud-api` 显式创建 run/command 并调用 runner Job APIAgentRun 提供 durable facts、events、cancel、bundle 和 session 能力。 | `spec-v01-hwlab-manual-dispatch.md` |
| Tenant policy boundary | Run schema 合同 | 保留,P0 | 作为 `Run` 的必填字段和最小校验存在,不做独立 policy enginetenant 的业务授权仍由 UniDesk/HWLAB 判定。 | 并入 `spec-v01-agentrun-mgr.md` |