v0.10: add automated Codex orchestration and deployment check
This commit is contained in:
+57
-4
@@ -36,16 +36,42 @@ find .agents/skills -maxdepth 2 -name SKILL.md | sort
|
||||
uv run python scripts/dr.py status <slug>
|
||||
```
|
||||
|
||||
新机器部署后可以先跑自检:
|
||||
|
||||
```bash
|
||||
uv run python scripts/deploy_check.py
|
||||
```
|
||||
|
||||
如果隐藏目录缺失或 skills 没同步:
|
||||
|
||||
```bash
|
||||
uv run python scripts/deploy_check.py --repair --force
|
||||
```
|
||||
|
||||
默认自动化权限:
|
||||
|
||||
- `sandbox_mode = "workspace-write"`:允许写入当前研究 workspace。
|
||||
- `approval_policy = "never"`:命令执行不逐次弹窗。
|
||||
- `web_search = "live"`:默认使用实时网络检索。
|
||||
- `[sandbox_workspace_write].network_access = true`:脚本和 MCP server 默认可访问网络。
|
||||
- Tavily / Brave / Exa MCP 默认启用,且 `required = false`,某个搜索服务临时不可用时不阻塞 Codex 主流程。
|
||||
|
||||
## Codex Commands
|
||||
|
||||
Codex custom command templates 位于 `.codex/commands/`。在 CLI 中可以用 `scripts/dr.py prompt` 展开:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py prompt dr-frame dual-target-rnai-pipeline-2026
|
||||
codex exec "$(uv run python scripts/dr.py prompt dr-frame dual-target-rnai-pipeline-2026)"
|
||||
uv run python scripts/dr.py prompt dr-run dual-target-rnai-pipeline-2026
|
||||
codex exec "$(uv run python scripts/dr.py prompt dr-run dual-target-rnai-pipeline-2026)"
|
||||
```
|
||||
|
||||
建议流程:
|
||||
推荐入口是 `dr-run`:让 Codex 主线程进入 PM 模式,读取 manifest,判断当前应该继续哪个 phase,并在 Phase 2 主动调度 `dr-analyst` / `dr-verifier` subagents。用户不需要逐个执行每个 phase;只有 Phase 1 框架确认和 Phase 3 审校决策这类人类暂停点需要停下来。
|
||||
|
||||
```bash
|
||||
codex exec "$(uv run python scripts/dr.py prompt dr-run <slug-or-topic>)"
|
||||
```
|
||||
|
||||
分阶段命令保留为调试和人工接管入口:
|
||||
|
||||
```bash
|
||||
codex exec "$(uv run python scripts/dr.py prompt dr-init '<topic>')"
|
||||
@@ -75,7 +101,7 @@ uv run python scripts/dr.py finalize <slug> \
|
||||
|
||||
## Subagent Usage
|
||||
|
||||
Codex subagents 不会自动启动;主线程必须明确要求。例如:
|
||||
Codex 的平台限制是:subagents 不会仅因为 `.codex/agents/*.toml` 存在就自动启动,必须由当前主线程明确要求。`dr-run` 已把这个要求写进 PM prompt:Phase 1 会调度 `dr-plan` / `dr-searcher`,Phase 2 会调度 `dr-analyst` / `dr-verifier`,Phase 3 会调度 `dr-chief-editor`。
|
||||
|
||||
```text
|
||||
Spawn dr-searcher agents in parallel for four keyword groups, wait for all results, then synthesize phase1/initial-scan.md.
|
||||
@@ -121,3 +147,30 @@ uv run python scripts/install_codex_adapter.py --force
|
||||
- `.opencode/skills/**` → `.agents/skills/**`
|
||||
|
||||
安装后,在 Codex 中运行 `/debug-config`,确认 project `.codex/config.toml` 已加载。
|
||||
|
||||
## Config Troubleshooting
|
||||
|
||||
如果 `.codex/config.toml` 生效后启动报错,先按下面顺序排查:
|
||||
|
||||
1. 确认当前 project 已被 Codex trust。未 trust 时,Codex 会跳过项目级 `.codex/**`,此时 `--profile deep-research` 会报 profile 不存在。
|
||||
2. Tavily / Brave / Exa MCP 默认启用但不是 required。若某个 server 启动异常,先确认对应环境变量存在,再临时把该 server 改成 `enabled = false`。
|
||||
3. 如果要完全离线排障,先把第三方 MCP 全部关掉,只保留 OpenAI Docs MCP 和内置 web search。
|
||||
4. 如果仍然报错,临时保留最小配置确认 Codex 主体能启动:
|
||||
|
||||
```toml
|
||||
model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
sandbox_mode = "workspace-write"
|
||||
approval_policy = "never"
|
||||
project_doc_max_bytes = 65536
|
||||
web_search = "live"
|
||||
|
||||
[agents]
|
||||
max_threads = 6
|
||||
max_depth = 1
|
||||
|
||||
[sandbox_workspace_write]
|
||||
network_access = true
|
||||
```
|
||||
|
||||
这个最小配置只启用模型、沙盒、项目说明、web search 与 subagent 上限;确认能启动后,再逐个恢复 profiles 和 MCP server。
|
||||
|
||||
Reference in New Issue
Block a user