Honor thread-level plugin exclusions across runtime capabilities (#44655)

## What changed

- Apply `disabled_plugin_ids` to plugin skills, recommendations, hooks, and MCP servers without modifying shared plugin state.
- Activate selection changes when the next task starts, keeping pending settings from changing the active runtime.
- Hide app tools contributed only by disabled plugins from model tool catalogs and search. Preserve connectors shared with enabled plugins and existing direct Apps RPC behavior.
- Include plugin identity in MCP approval keys and use that identity when persisting plugin tool approvals.

## Testing

Add regression coverage for disabling and re-enabling plugin skills and tools, deferred activation of settings, shared connector ownership, selected plugin servers, executor hooks, and plugin-specific approval keys and persistence.

GitOrigin-RevId: 1153ff6aa7ab6953d50e838da05203904ecd2956
This commit is contained in:
Matthew Zeng authored and copyberry committed 2026-09-10 21:51:34 +00:00
1 parent 5c94936b56
commit 8570091e14
27 files changed
+565 -171

No files matched your search

+3
View File
@@ -68,6 +68,8 @@ impl ReasoningEffortPin {
/// Persistent, session-scoped state previously stored directly on `Session`.
pub(crate) struct SessionState {
pub(crate) session_configuration: SessionConfiguration,
/// Plugin selection of the last admitted task; settings updates take effect on the next task.
pub(crate) active_disabled_plugin_ids: Vec<String>,
/// Persisted origin of the session base instructions, when known.
pub(crate) base_instructions_provenance: Option<BaseInstructionsProvenance>,
pub(crate) history: ContextManager,
@@ -112,6 +114,7 @@ impl SessionState {
history: ContextManager,
) -> Self {
Self {
active_disabled_plugin_ids: Vec::new(),
session_configuration,
base_instructions_provenance: None,
history,