feat: add threadId to MCP server messages (#9192)
This favors `threadId` instead of `conversationId` so we use the same
terms as https://developers.openai.com/codex/sdk/.
To test the local build:
```
cd codex-rs
cargo build --bin codex
npx -y @modelcontextprotocol/inspector ./target/debug/codex mcp-server
```
I sent:
```json
{
"method": "tools/call",
"params": {
"name": "codex",
"arguments": {
"prompt": "favorite ls option?"
},
"_meta": {
"progressToken": 0
}
}
}
```
and got:
```json
{
"content": [
{
"type": "text",
"text": "`ls -lah` (or `ls -alh`) — long listing, includes dotfiles, human-readable sizes."
}
],
"structuredContent": {
"threadId": "019bbb20-bff6-7130-83aa-bf45ab33250e"
}
}
```
and successfully used the `threadId` in the follow-up with the
`codex-reply` tool call:
```json
{
"method": "tools/call",
"params": {
"name": "codex-reply",
"arguments": {
"prompt": "what is the long versoin",
"threadId": "019bbb20-bff6-7130-83aa-bf45ab33250e"
},
"_meta": {
"progressToken": 1
}
}
}
```
whose response also has the `threadId`:
```json
{
"content": [
{
"type": "text",
"text": "Long listing is `ls -l` (adds permissions, owner/group, size, timestamp)."
}
],
"structuredContent": {
"threadId": "019bbb20-bff6-7130-83aa-bf45ab33250e"
}
}
```
Fixes https://github.com/openai/codex/issues/3712.