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:
ptiet-oai authored and copyberry committed 2026-09-16 21:50:07 +00:00
1 parent 29e6bc814e
commit a6d4741d39
20 files changed
+465 -2

No files matched your search

+1
View File
@@ -39,6 +39,7 @@ mod additional_context;
mod agent_execution;
mod agent_websocket;
mod agents_md;
mod app_tool_exposure;
mod apply_patch_cli;
mod apply_patch_serialization;
#[cfg(not(target_os = "windows"))]