mirror of
https://github.com/openai/codex.git
synced 2026-05-06 06:12:59 +03:00
## Why `codex-core` already owns too much of the tool stack, and `AGENTS.md` explicitly pushes us to move shared code out of `codex-core` instead of letting it keep growing. This PR takes the next incremental step in moving `core/src/tools` toward `codex-rs/tools` by extracting low-coupling tool configuration and image-detail gating logic into `codex-tools`. That gives later extraction work a cleaner boundary to build on without trying to move the entire tools subtree in one shot. ## What changed - moved `ToolsConfig`, `ToolsConfigParams`, shell backend config, and unified-exec session selection from `core/src/tools/spec.rs` into `codex-tools` - moved original image-detail gating and normalization into `codex-tools` - updated `codex-core` to consume the new `codex-tools` exports and pass a rendered agent-type description instead of raw role config - kept `codex-rs/tools/src/lib.rs` exports-only, with extracted unit tests living in sibling `*_tests.rs` modules ## Testing - `cargo test -p codex-tools` - `cargo test -p codex-core --lib tools::spec::`
706 B
706 B