mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Emit Trusted MCP App Identity on Tool-Call Items (#27132)
## Summary
- Add optional `appContext` to app-server MCP tool-call items with
trusted `connectorId`, `linkId`, and `mcpAppResourceUri` metadata.
- Preserve that context across tool-call events, persisted history,
reconnects, and thread resume.
- Keep the deprecated top-level `mcpAppResourceUri` temporarily for
client migration.
The consumer contract is `{ appContext: { connectorId, linkId,
mcpAppResourceUri }, tool }`.
## Validation
- Full GitHub Actions suite passes, including CLA, Bazel tests, clippy,
release builds, and argument-comment lint.
---------
Co-authored-by: martinauyeung-oai <280153141+martinauyeung-oai@users.noreply.github.com>
This commit is contained in:
co-authored by
martinauyeung-oai
parent
9bcc09f9f7
commit
765309d5a6
+34
@@ -460,6 +460,29 @@
|
||||
"LegacyAppPathString": {
|
||||
"type": "string"
|
||||
},
|
||||
"McpToolCallAppContext": {
|
||||
"properties": {
|
||||
"connectorId": {
|
||||
"type": "string"
|
||||
},
|
||||
"linkId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"resourceUri": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"connectorId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1235,6 +1258,16 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"appContext": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/McpToolCallAppContext"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"arguments": true,
|
||||
"durationMs": {
|
||||
"description": "The duration of the MCP tool call in milliseconds.",
|
||||
@@ -1258,6 +1291,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"mcpAppResourceUri": {
|
||||
"description": "Deprecated: use `appContext.resourceUri` instead.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
|
||||
Reference in New Issue
Block a user