[codex] reduce module visibility (#16978)

## Summary
- reduce public module visibility across Rust crates, preferring private
or crate-private modules with explicit crate-root public exports
- update external call sites and tests to use the intended public crate
APIs instead of reaching through module trees
- add the module visibility guideline to AGENTS.md

## Validation
- `cargo check --workspace --all-targets --message-format=short` passed
before the final fix/format pass
- `just fix` completed successfully
- `just fmt` completed successfully
- `git diff --check` passed
This commit is contained in:
pakrym-oai
2026-04-07 08:03:35 -07:00
committed by GitHub
parent 89f1a44afa
commit 413c1e1fdf
129 changed files with 695 additions and 496 deletions

View File

@@ -102,7 +102,8 @@ mod clipboard_paste;
mod clipboard_text;
mod collaboration_modes;
mod color;
pub mod custom_terminal;
pub(crate) mod custom_terminal;
pub use custom_terminal::Terminal;
mod cwd_prompt;
mod debug_config;
mod diff_render;
@@ -113,10 +114,12 @@ mod file_search;
mod frames;
mod get_git_diff;
mod history_cell;
pub mod insert_history;
pub(crate) mod insert_history;
pub use insert_history::insert_history_lines;
mod key_hint;
mod line_truncation;
pub mod live_wrap;
pub(crate) mod live_wrap;
pub use live_wrap::RowBuilder;
mod local_chatgpt_auth;
mod markdown;
mod markdown_render;
@@ -126,10 +129,10 @@ mod model_catalog;
mod model_migration;
mod multi_agents;
mod notifications;
pub mod onboarding;
pub(crate) mod onboarding;
mod oss_selection;
mod pager_overlay;
pub mod public_widgets;
pub(crate) mod public_widgets;
mod render;
mod resume_picker;
mod selection_list;
@@ -148,7 +151,8 @@ mod theme_picker;
mod tooltips;
mod tui;
mod ui_consts;
pub mod update_action;
pub(crate) mod update_action;
pub use update_action::UpdateAction;
mod update_prompt;
mod updates;
mod version;
@@ -212,7 +216,7 @@ mod voice {
mod wrapping;
#[cfg(test)]
pub mod test_backend;
pub(crate) mod test_backend;
#[cfg(test)]
pub(crate) mod test_support;