Allow injecting the Codex Apps tools cache (#33113)

## What changed

- Accept a caller-provided `CodexAppsToolsCache` when constructing a `ThreadManager` and pass it through to the MCP manager.
- Add `ConnectorRuntimeManager::new_without_cache()` for an in-memory runtime that neither loads nor persists connector state on disk.
- Re-export `CodexAppsToolsCache` from `codex-core` and `codex-core-api` for embedders.

## Testing

- Verify that a cache-disabled connector runtime ignores existing disk state and publishes live tools without creating cache files.

GitOrigin-RevId: f52f4f27c425a8d84ad0d0987b30a6fc3c14d702
This commit is contained in:
Bryan Ashley authored and copyberry committed 2026-07-14 17:10:04 +00:00
1 parent 69acc71cb1
commit 8604689ec5
18 files changed
+127 -11

No files matched your search

+3 -1
View File
@@ -58,6 +58,7 @@ impl McpManager {
Self::new_with_extensions(
plugins_manager,
codex_extension_api::empty_extension_registry(),
ConnectorRuntimeManager::default(),
)
}
@@ -65,11 +66,12 @@ impl McpManager {
pub fn new_with_extensions(
plugins_manager: Arc<PluginsManager>,
extensions: Arc<ExtensionRegistry<Config>>,
codex_apps_tools_cache: ConnectorRuntimeManager<ToolInfo>,
) -> Self {
Self {
plugins_manager,
extensions,
codex_apps_tools_cache: ConnectorRuntimeManager::default(),
codex_apps_tools_cache,
}
}