mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## What changed
Allow `mcpServer/resource/read` to specify `target: {connectorId, linkId}` for direct hosted app reads without tool discovery, when supported by the backend. Require an explicit `linkId`: a string selects an account, while `null` requests no-auth access subject to backend policy.
Restrict direct targets to `codex_apps` and reject empty connector IDs, empty link IDs, and synthetic link IDs. Preserve originating app/account scope when `originCallId` and `threadId` are supplied, and retain discovery when `target` is omitted.
Update protocol schemas and TypeScript and Python models, preserving required-but-nullable `linkId` semantics in Python code generation.
## Testing
Extend resource-read tests to check target metadata with and without a thread, including explicit no-auth targets and omitted targets. Add Python model tests for string and null `linkId` values and rejection of a missing `linkId`.
GitOrigin-RevId: 8cf5595fbdd937193aeb529901fc95299f6e18ad
68 lines
1.3 KiB
JSON
Generated
68 lines
1.3 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"McpResourceReadTarget": {
|
|
"properties": {
|
|
"connectorId": {
|
|
"type": "string"
|
|
},
|
|
"linkId": {
|
|
"description": "Null explicitly requests no-auth access, subject to the app's resource policy.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"connectorId",
|
|
"linkId"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"connectorId": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"originCallId": {
|
|
"description": "Originating MCP tool call used to select the resource's app.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"target": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/McpResourceReadTarget"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Explicit hosted app/account. Omit to retain legacy resource discovery."
|
|
},
|
|
"threadId": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"uri": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"server",
|
|
"uri"
|
|
],
|
|
"title": "McpResourceReadParams",
|
|
"type": "object"
|
|
} |