mirror of
https://github.com/openai/codex.git
synced 2026-05-03 10:56:37 +00:00
## Why Thread-scoped config needs a stable boundary between the app/session owner and the config stack. Instead of having call sites manually copy thread config fields into individual overrides, this adds the proto and Rust plumbing needed for a `ThreadConfigLoader` implementation to return typed sources that can be translated into ordinary config layer entries. Keeping the remote payload typed also makes precedence easier to reason about: session-owned thread config maps back to the existing session config source, while user-owned thread config is represented separately without introducing a new config-layer source until it has TOML-backed fields. ## What changed - Added the `codex.thread_config.v1` protobuf service and generated Rust module for loading thread config sources. - Added `RemoteThreadConfigLoader`, which calls the gRPC service, parses `SessionThreadConfig` / `UserThreadConfig`, and validates provider fields such as `wire_api`, auth timeout, and absolute auth cwd. - Added proto generation tooling under `config/scripts/generate-proto.sh` and `config/examples/generate-proto.rs`. - Added `ThreadConfigLoader::load_config_layers`, plus static/no-op loader helpers, so tests and callers can use the same typed loader interface while config-layer translation stays centralized. ## Verification - `cargo test -p codex-config thread_config`
57 lines
1.7 KiB
TOML
57 lines
1.7 KiB
TOML
[package]
|
|
name = "codex-config"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[[example]]
|
|
name = "generate-proto"
|
|
path = "examples/generate-proto.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
codex-app-server-protocol = { workspace = true }
|
|
codex-execpolicy = { workspace = true }
|
|
codex-features = { workspace = true }
|
|
codex-model-provider-info = { workspace = true }
|
|
codex-network-proxy = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
codex-utils-path = { workspace = true }
|
|
futures = { workspace = true, features = ["alloc", "std"] }
|
|
gethostname = { workspace = true }
|
|
multimap = { workspace = true }
|
|
prost = "0.14.3"
|
|
schemars = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
serde_path_to_error = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true, features = ["fs"] }
|
|
toml = { workspace = true }
|
|
toml_edit = { workspace = true }
|
|
tonic = { workspace = true }
|
|
tonic-prost = { workspace = true }
|
|
tracing = { workspace = true }
|
|
wildmatch = { workspace = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
dns-lookup = { workspace = true }
|
|
libc = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
winapi-util = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
tokio = { workspace = true, features = ["full"] }
|
|
tokio-stream = { workspace = true, features = ["net"] }
|
|
tonic = { workspace = true, features = ["router", "transport"] }
|
|
tonic-prost-build = { version = "=0.14.3", default-features = false, features = ["transport"] }
|