48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
# Project Documentation
|
||
|
||
## Goal
|
||
|
||
构建一个本机 Codex 智能体管理台,用中文管理 agent 配置、项目运行状态、动态工作流和安全写回流程。
|
||
|
||
## Target Architecture
|
||
|
||
计划架构为:Go 后端提供 localhost HTTP API,Vue 3 + Vite 前端提供中文工作台界面。当前后端已提供健康检查和 `.codex/agents/*.toml` 只读读取;目标后端将继续增加只读 SQLite 状态库、安全读取项目配置,并仅在用户确认后写回 `.codex/agents/*.toml`。
|
||
|
||
## Configuration
|
||
|
||
- `CODEX_HOME`: 默认 `/Users/yoilun/.codex`
|
||
- 后端监听地址:默认 `127.0.0.1:18083`
|
||
- 前端开发地址:默认 `127.0.0.1:13083`
|
||
|
||
## Runbook
|
||
|
||
启动后端:
|
||
|
||
```bash
|
||
go run ./cmd/codex-agent-manager
|
||
```
|
||
|
||
健康检查:
|
||
|
||
```bash
|
||
curl http://127.0.0.1:18083/api/health
|
||
```
|
||
|
||
读取智能体定义:
|
||
|
||
```bash
|
||
curl http://127.0.0.1:18083/api/agents
|
||
```
|
||
|
||
## Security Boundaries
|
||
|
||
- 不读取 `.codex/auth.json`。
|
||
- 不写入 Codex SQLite。
|
||
- `.codex/agents/*.toml` 写回必须先备份。
|
||
- 当前 `/api/agents` 只读列出 `.codex/agents` 直属 `.toml` 文件,读取前通过 Codex home 边界和 agent TOML 专用 resolver;坏 TOML 以单条 `invalid` 状态返回,不导致服务崩溃。
|
||
|
||
## Known Risks
|
||
|
||
- Codex 内部 SQLite schema 可能变化。
|
||
- 运行状态由多来源推断,必须显示置信度。
|