Record an MCP refresh reason for session permission grants (#60513)

Add `McpRefreshReason::SessionPermissionsGranted` and pass it when marking the
MCP runtime dirty after a session-scoped permission grant. This supplies the
required reason argument and identifies the refresh cause in CLI diagnostics.

GitOrigin-RevId: 2ff8f6b9e1a40d68e1f799d0414c2d45e2576a1a
This commit is contained in:
Charlie Marsh
2026-11-10 03:40:10 +00:00
committed by copyberry
parent 0811df3976
commit 551fc719d6
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -3810,7 +3810,7 @@ impl Session {
environment_id,
response.permissions.clone().into(),
);
self.mark_mcp_runtime_dirty();
self.mark_mcp_runtime_dirty(McpRefreshReason::SessionPermissionsGranted);
}
}
}
+1
View File
@@ -299,6 +299,7 @@ pub enum McpRefreshReason {
RuntimeAuthChanged,
SelectedCapabilityRootsChanged,
SessionMcpInputsChanged,
SessionPermissionsGranted,
SkillMcpDependenciesAdded,
TaskStartedExecutorDiscovery,
TurnStartContributorPreparedMcp,