mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Scope MCP resource reads by connector (#39244)
## What changed - Add an optional `connectorId` to `mcpServer/resource/read`. - Forward the selected connector through `x-codex-turn-metadata` for threaded and threadless resource reads, restricting hosted app resources to that connector. - Update the generated protocol schemas and app-server documentation. GitOrigin-RevId: 5cc94d703abbbb6086665910c1c9ed5dc7075210
This commit is contained in:
1 parent
19d185fec8
commit
a1dc95d5af
17 files changed
+69
-12
No files matched your search
@@ -349,7 +349,7 @@ pub async fn read_mcp_resource(
|
||||
codex_apps_tools_cache: ConnectorRuntimeManager<ToolInfo>,
|
||||
tool_catalog_cache: crate::McpToolCatalogCache,
|
||||
server: &str,
|
||||
uri: &str,
|
||||
params: ReadResourceRequestParams,
|
||||
) -> anyhow::Result<ReadResourceResult> {
|
||||
let mut mcp_servers = effective_mcp_servers(config, auth);
|
||||
mcp_servers.retain(|name, _| name == server);
|
||||
@@ -382,9 +382,7 @@ pub async fn read_mcp_resource(
|
||||
)
|
||||
.await;
|
||||
|
||||
let result = manager
|
||||
.read_resource(server, ReadResourceRequestParams::new(uri))
|
||||
.await;
|
||||
let result = manager.read_resource(server, params).await;
|
||||
cancel_token.cancel();
|
||||
result
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user