Support Apps tool catalogs without shared snapshots (#57572)

## What changed

- Add `ConnectorRuntimeManager::without_shared_snapshot()` to keep connector catalogs local to each client and disable disk caching.
- Use the thread's own Apps discovery when snapshot sharing is disabled, preserving its catalog across turns.
- Expose `apps_tools_from_mcp_client()` to read a ready, unshared Apps client's tools without starting or waiting for discovery.

## Testing

Extend coverage for shared-cache eligibility and verify that an unshared thread waits for its own Apps discovery and uses its own tools on successive model requests, even when a peer finishes discovery first.

GitOrigin-RevId: d57ddacaede047e67c09d378c86c1aa3577ca56f
This commit is contained in:
bkotsopoulos
2026-10-27 22:01:13 +00:00
committed by copyberry
parent 6562117a81
commit d03a6e1a6a
10 changed files with 330 additions and 26 deletions
+7
View File
@@ -739,6 +739,13 @@ impl McpRuntime {
.await
}
/// Returns tools from this thread’s ready, unshared Apps MCP client.
/// Returns an empty list if the client is absent, still starting, or uses
/// a shared catalog. Does not start or wait for discovery.
pub async fn apps_tools_from_mcp_client(&self) -> Vec<ToolInfo> {
self.latest_connections().apps_tools_from_mcp_client().await
}
/// Lists the latest known tools for non-model discovery surfaces.
///
/// Unlike [`Self::current_binding`], this may return cached tools while their