mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
[App server] add mcp tool call item started/completed events (#6642)
this PR does two things:
1. refactor `apply_bespoke_event_handling` into a separate file as it's
getting kind of long;
2. add mcp tool call `item/started` and `item/completed` events. To roll
out app server events asap we didn't properly migrate mcp core events to
use TurnItem for mcp tool calls - this will be a follow-up PR.
real events generated in log:
```
{
"method": "codex/event/mcp_tool_call_end",
"params": {
"conversationId": "019a8021-26af-7c20-83db-21ca81e44d68",
"id": "0",
"msg": {
"call_id": "call_7EjRQkD9HnfyMWf7tGrT9FKA",
"duration": {
"nanos": 92708,
"secs": 0
},
"invocation": {
"arguments": {
"server": ""
},
"server": "codex",
"tool": "list_mcp_resources"
},
"result": {
"Ok": {
"content": [
{
"text": "{\"resources\":[]}",
"type": "text"
}
],
"isError": false
}
},
"type": "mcp_tool_call_end"
}
}
}
{
"method": "item/completed",
"params": {
"item": {
"arguments": {
"server": ""
},
"error": null,
"id": "call_7EjRQkD9HnfyMWf7tGrT9FKA",
"result": {
"content": [
{
"text": "{\"resources\":[]}",
"type": "text"
}
],
"structuredContent": null
},
"server": "codex",
"status": "completed",
"tool": "list_mcp_resources",
"type": "mcpToolCall"
}
}
}
```
This commit is contained in:
1 parent
f17b392470
commit
526777c9b4
6 files changed
+490
-251
No files matched your search
Generated
+1
@@ -850,6 +850,7 @@ dependencies = [
|
||||
"codex-protocol",
|
||||
"codex-utils-json-to-toml",
|
||||
"core_test_support",
|
||||
"mcp-types",
|
||||
"opentelemetry-appender-tracing",
|
||||
"os_info",
|
||||
"pretty_assertions",
|
||||
|
||||
Reference in new issue
Block a user