core-agent-ide/codex-rs/app-server/src
Celia Chen 526777c9b4
[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"
    }
  }
}
```
2025-11-14 08:08:43 -08:00
..
bespoke_event_handling.rs [App server] add mcp tool call item started/completed events (#6642) 2025-11-14 08:08:43 -08:00
codex_message_processor.rs [App server] add mcp tool call item started/completed events (#6642) 2025-11-14 08:08:43 -08:00
error_code.rs fix: separate codex mcp into codex mcp-server and codex app-server (#4471) 2025-09-30 07:06:18 +00:00
fuzzy_file_search.rs fix: resume lookup for gitignored CODEX_HOME (#5311) 2025-10-23 17:04:40 +00:00
lib.rs [App server] add mcp tool call item started/completed events (#6642) 2025-11-14 08:08:43 -08:00
main.rs fix: separate codex mcp into codex mcp-server and codex app-server (#4471) 2025-09-30 07:06:18 +00:00
message_processor.rs [codex][app-server] improve error response for client requests (#6050) 2025-10-31 15:28:04 -07:00
models.rs feat: support models with single reasoning effort (#6300) 2025-11-05 23:06:45 -08:00
outgoing_message.rs [App-server] Implement v2 for account/login/start and account/login/completed (#6183) 2025-11-05 13:52:50 -08:00