Expose selecte namespaces as direct model tools (#28825)

## Why

Som tools, such as history and notes, must remain top-level when MCP
deferral is enabled while staying unavailable through code-mode `exec`.

## What changed

- Added `features.code_mode.direct_only_tool_namespaces`.
- Classified matching MCP tools as `DirectModelOnly`.
- Kept those tools top-level in `code_mode_only`.
- Excluded them from `tool_search` deferral and the nested `exec`
surface.
- Updated the generated config schema.

## Validation

- `code_mode_only_exposes_direct_model_only_mcp_namespaces`
- `load_config_resolves_code_mode_config`
This commit is contained in:
Won Park
2026-06-17 21:07:54 -07:00
committed by GitHub
Unverified
parent ac3fe64100
commit 78a9e169bb
9 changed files with 183 additions and 1 deletions
+5
View File
@@ -12,6 +12,11 @@ pub struct CodeModeConfigToml {
/// Exact tool namespaces to omit from the code-mode nested tool surface.
#[serde(skip_serializing_if = "Option::is_none")]
pub excluded_tool_namespaces: Option<Vec<String>>,
/// Exact tool namespaces to expose only as direct model tools.
/// These tools bypass deferral, remain top-level in code-mode-only sessions, and are omitted
/// from the nested code-mode tool surface.
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_only_tool_namespaces: Option<Vec<String>>,
}
impl FeatureConfig for CodeModeConfigToml {