Add realtime transcript notification in v2

Emit a typed realtime handoff transcript notification and wire the app-server TUI to handle it.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-03-20 12:58:03 -07:00
parent a941d8439d
commit 4125a6a05f
15 changed files with 408 additions and 45 deletions

View File

@@ -8709,6 +8709,26 @@
"title": "Thread/realtime/itemAddedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/realtime/transcriptAdded"
],
"title": "Thread/realtime/transcriptAddedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ThreadRealtimeTranscriptAddedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/realtime/transcriptAddedNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -10802,6 +10822,50 @@
"title": "ThreadRealtimeStartedNotification",
"type": "object"
},
"ThreadRealtimeTranscriptAddedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL - flat transcript snapshot emitted when realtime hands off to the main agent.",
"properties": {
"handoffId": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"transcript": {
"items": {
"$ref": "#/definitions/ThreadRealtimeTranscriptEntry"
},
"type": "array"
}
},
"required": [
"handoffId",
"itemId",
"threadId",
"transcript"
],
"title": "ThreadRealtimeTranscriptAddedNotification",
"type": "object"
},
"ThreadRealtimeTranscriptEntry": {
"properties": {
"role": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"role",
"text"
],
"type": "object"
},
"ThreadResumeParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.",