feat: read codex agent definitions

This commit is contained in:
Yoilun
2026-05-25 16:39:35 +08:00
parent c67d5a33ad
commit fee920a895
9 changed files with 383 additions and 9 deletions

View File

@@ -10,6 +10,7 @@
| 2026-05-25 | 1 | review loop | 代码质量审查发现 symlink 绕过、敏感文件大小写、操作域 resolver、`CODEX_HOME` override 问题 | 已按 TDD 修复,并通过最终门禁 |
| 2026-05-25 | 1 | review loop | 规格复审发现 `ResolveAgentTOML` 可经 `agents/demo.toml -> ../auth.json` symlink 绕过 forbidden 检查 | 已按 TDD 修复,并通过最终门禁 |
| 2026-05-25 | planning | main agent | 修正 task_plan.md 阶段命名,与实施计划 Task 2-7 对齐 | 下一阶段明确为 Agent TOML 只读读取 |
| 2026-05-25 | 2 | coding agent | TDD 实现 Agent TOML 只读读取和 `/api/agents` | 完成;提交 `feat: read codex agent definitions` |
## Test Results
@@ -34,6 +35,15 @@
| 2026-05-25 | `go test ./...` | PASS | 全量 Go 测试通过 |
| 2026-05-25 | `git diff --check` | PASS | 无 whitespace error |
| 2026-05-25 | `git status --short` | PASS | 仅本轮 Phase 1 symlink target 修复文件变更 |
| 2026-05-25 | `go test ./internal/agents` | FAIL | TDD 红灯:`Store` 未定义,`internal/agents/store_test.go` 先于实现创建 |
| 2026-05-25 | `go test ./internal/agents` | PASS | 读取有效 TOML、坏 TOML 单条 invalid、敏感 symlink 不泄漏内容 |
| 2026-05-25 | `go test ./internal/server` | FAIL | TDD 红灯:`New` 未定义,`/api/agents` handler 测试先于实现创建 |
| 2026-05-25 | `go test ./internal/server` | PASS | `/api/agents` 返回 items非 GET 返回 405 |
| 2026-05-25 | `go test ./...` | PASS | 全量 Go 测试通过 |
| 2026-05-25 | `go test ./internal/agents` | PASS | Required verification |
| 2026-05-25 | `go test ./...` | PASS | Required verification |
| 2026-05-25 | `git diff --check` | PASS | Required verification |
| 2026-05-25 | `git status --short` | PASS | Required verificationPhase 2 文件待提交 |
## Bug Loop