mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Remove template IDs from MCP tool call metadata (#33467)
## What changed - Remove `template_id` from MCP tool call items and lifecycle events. - Remove `templateId` from app-server `McpToolCallAppContext` responses and generated schemas. - Update protocol conversions, documentation, and existing test expectations for the revised metadata shape. GitOrigin-RevId: f2b1304eadff661eec3966673ea71206b1542b98
This commit is contained in:
1 parent
be39aab9f4
commit
800715d201
33 files changed
+2
-173
No files matched your search
@@ -773,7 +773,6 @@ impl ThreadHistoryBuilder {
|
||||
link_id: payload.link_id.clone(),
|
||||
resource_uri: payload.mcp_app_resource_uri.clone(),
|
||||
app_name: payload.app_name.clone(),
|
||||
template_id: payload.template_id.clone(),
|
||||
action_name: payload.action_name.clone(),
|
||||
}),
|
||||
mcp_app_resource_uri: payload.mcp_app_resource_uri.clone(),
|
||||
@@ -826,7 +825,6 @@ impl ThreadHistoryBuilder {
|
||||
link_id: payload.link_id.clone(),
|
||||
resource_uri: payload.mcp_app_resource_uri.clone(),
|
||||
app_name: payload.app_name.clone(),
|
||||
template_id: payload.template_id.clone(),
|
||||
action_name: payload.action_name.clone(),
|
||||
}),
|
||||
mcp_app_resource_uri: payload.mcp_app_resource_uri.clone(),
|
||||
@@ -2702,7 +2700,6 @@ mod tests {
|
||||
mcp_app_resource_uri: None,
|
||||
link_id: None,
|
||||
app_name: None,
|
||||
template_id: None,
|
||||
action_name: None,
|
||||
plugin_id: None,
|
||||
duration: Duration::from_millis(8),
|
||||
@@ -2791,7 +2788,6 @@ mod tests {
|
||||
mcp_app_resource_uri: Some("ui://widget/lookup.html".into()),
|
||||
link_id: Some("link_calendar".into()),
|
||||
app_name: Some("Calendar".into()),
|
||||
template_id: Some("calendar_template".into()),
|
||||
action_name: Some("lookup".into()),
|
||||
plugin_id: Some("sample@test".into()),
|
||||
duration: Duration::from_millis(8),
|
||||
@@ -2828,7 +2824,6 @@ mod tests {
|
||||
link_id: Some("link_calendar".into()),
|
||||
resource_uri: Some("ui://widget/lookup.html".into()),
|
||||
app_name: Some("Calendar".into()),
|
||||
template_id: Some("calendar_template".into()),
|
||||
action_name: Some("lookup".into()),
|
||||
}),
|
||||
mcp_app_resource_uri: Some("ui://widget/lookup.html".into()),
|
||||
|
||||
@@ -398,7 +398,6 @@ pub struct McpToolCallAppContext {
|
||||
pub link_id: Option<String>,
|
||||
pub resource_uri: Option<String>,
|
||||
pub app_name: Option<String>,
|
||||
pub template_id: Option<String>,
|
||||
pub action_name: Option<String>,
|
||||
}
|
||||
|
||||
@@ -950,7 +949,6 @@ impl From<CoreTurnItem> for ThreadItem {
|
||||
link_id: mcp.link_id,
|
||||
resource_uri: mcp.mcp_app_resource_uri.clone(),
|
||||
app_name: mcp.app_name,
|
||||
template_id: mcp.template_id,
|
||||
action_name: mcp.action_name,
|
||||
}),
|
||||
mcp_app_resource_uri: mcp.mcp_app_resource_uri,
|
||||
|
||||
@@ -2877,7 +2877,6 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
|
||||
mcp_app_resource_uri: Some("app://connector".to_string()),
|
||||
link_id: Some("link_calendar".to_string()),
|
||||
app_name: Some("Calendar".to_string()),
|
||||
template_id: Some("calendar_template".to_string()),
|
||||
action_name: Some("create_event".to_string()),
|
||||
plugin_id: Some("sample@test".to_string()),
|
||||
status: CoreMcpToolCallStatus::InProgress,
|
||||
@@ -2899,7 +2898,6 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
|
||||
link_id: Some("link_calendar".to_string()),
|
||||
resource_uri: Some("app://connector".to_string()),
|
||||
app_name: Some("Calendar".to_string()),
|
||||
template_id: Some("calendar_template".to_string()),
|
||||
action_name: Some("create_event".to_string()),
|
||||
}),
|
||||
mcp_app_resource_uri: Some("app://connector".to_string()),
|
||||
@@ -2919,7 +2917,6 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
|
||||
mcp_app_resource_uri: None,
|
||||
link_id: None,
|
||||
app_name: None,
|
||||
template_id: None,
|
||||
action_name: None,
|
||||
plugin_id: None,
|
||||
status: CoreMcpToolCallStatus::Completed,
|
||||
@@ -2968,7 +2965,6 @@ fn mcp_tool_call_app_context_serializes_connector_id() {
|
||||
link_id: Some("link_calendar".to_string()),
|
||||
resource_uri: Some("app://connector".to_string()),
|
||||
app_name: Some("Calendar".to_string()),
|
||||
template_id: Some("calendar_template".to_string()),
|
||||
action_name: Some("create_event".to_string()),
|
||||
}),
|
||||
mcp_app_resource_uri: Some("app://connector".to_string()),
|
||||
@@ -2992,7 +2988,6 @@ fn mcp_tool_call_app_context_serializes_connector_id() {
|
||||
"linkId": "link_calendar",
|
||||
"resourceUri": "app://connector",
|
||||
"appName": "Calendar",
|
||||
"templateId": "calendar_template",
|
||||
"actionName": "create_event",
|
||||
},
|
||||
"mcpAppResourceUri": "app://connector",
|
||||
@@ -3012,7 +3007,6 @@ fn mcp_tool_call_app_context_serializes_missing_mixed_version_fields_as_null() {
|
||||
link_id: None,
|
||||
resource_uri: None,
|
||||
app_name: None,
|
||||
template_id: None,
|
||||
action_name: None,
|
||||
})
|
||||
.expect("MCP tool call app context should serialize"),
|
||||
@@ -3021,7 +3015,6 @@ fn mcp_tool_call_app_context_serializes_missing_mixed_version_fields_as_null() {
|
||||
"linkId": null,
|
||||
"resourceUri": null,
|
||||
"appName": null,
|
||||
"templateId": null,
|
||||
"actionName": null,
|
||||
})
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user