mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
Add per-app tool exposure configuration (#46035)
## Why Server-level tool exposure settings apply to every connector on the apps server. Individual connectors need a way to opt out of deferred discovery without changing exposure for other apps. ## What changed Add `apps.<connector_id>.omit_tools_from` with support for `code_mode`, `deferred`, and `direct`. Combine connector omissions with server omissions so app settings preserve server restrictions. For example, `omit_tools_from = ["deferred"]` makes a connector's tools available without tool search, through direct calls or Code Mode as permitted by the active tool mode and remaining restrictions. Expose the setting in the app-server protocol, JSON schemas, and generated TypeScript and Python types. ## Testing Add integration coverage for connector-specific exposure and MCP dispatch across tool modes, server restrictions, and direct-only namespaces. Extend config tests to cover populated, absent, and empty omission lists, and add a Code Mode request-history snapshot. GitOrigin-RevId: cc99ab290c8a878d06d8d7ccf2d1dbd7c46bfa8a
This commit is contained in:
@@ -915,6 +915,7 @@ async fn write_value_supports_nested_app_paths() -> Result<()> {
|
||||
value: serde_json::json!({
|
||||
"app1": {
|
||||
"enabled": false,
|
||||
"omit_tools_from": ["deferred"],
|
||||
},
|
||||
}),
|
||||
merge_strategy: MergeStrategy::Replace,
|
||||
@@ -950,6 +951,9 @@ async fn write_value_supports_nested_app_paths() -> Result<()> {
|
||||
"app1".to_string(),
|
||||
AppConfig {
|
||||
enabled: false,
|
||||
omit_tools_from: Some(vec![
|
||||
codex_protocol::config_types::ToolExposureSurface::Deferred
|
||||
]),
|
||||
approvals_reviewer: None,
|
||||
destructive_enabled: None,
|
||||
open_world_enabled: None,
|
||||
|
||||
Reference in New Issue
Block a user