mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +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:
@@ -734,14 +734,14 @@ impl CodexThread {
|
||||
pub async fn read_mcp_resource(
|
||||
&self,
|
||||
server: &str,
|
||||
uri: &str,
|
||||
params: ReadResourceRequestParams,
|
||||
) -> anyhow::Result<serde_json::Value> {
|
||||
self.session.refresh_mcp_if_dirty().await;
|
||||
let result = self
|
||||
.session
|
||||
.services
|
||||
.mcp_runtime
|
||||
.latest_read_resource(server, ReadResourceRequestParams::new(uri))
|
||||
.latest_read_resource(server, params)
|
||||
.await?;
|
||||
|
||||
Ok(serde_json::to_value(result)?)
|
||||
|
||||
Reference in New Issue
Block a user