mirror of
https://github.com/openai/codex.git
synced 2026-10-20 08:19:50 +00:00
## What changed Add the experimental `thread/readState/changed` notification with `threadId` and the committed `readState` receipt. Send it to existing thread subscribers when terminal activity updates read state or a revert clears a removed unread position. Emit terminal read-state updates before `turn/completed` so completion remains the last notification for that result. Expose the notification in generated JSON schemas, TypeScript types, and Python SDK models. Document experimental capability gating, subscription lifetime, notification opt-out, and refreshing receipts when concurrent responses disagree. ## Testing Extend the read-state integration test to assert that the notification receipt matches the receipt returned by `thread/read` after terminal activity. GitOrigin-RevId: 28935352a881b7a5e2e7f629173c3b2061bd7941
83 lines
2.0 KiB
JSON
Generated
83 lines
2.0 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"ThreadReadState": {
|
|
"description": "The first unread position in a durable local thread. A null position means read. The opaque revision guards edits against activity or marks the caller has not seen.",
|
|
"properties": {
|
|
"firstUnread": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ThreadUnreadPosition"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"revision": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"revision"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"ThreadUnreadPosition": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Explicitly marked unread, including when the thread has no turns.",
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"threadStart"
|
|
],
|
|
"title": "ThreadStartThreadUnreadPositionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "ThreadStartThreadUnreadPosition",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "The earliest completed result needing attention.",
|
|
"properties": {
|
|
"turnId": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"turn"
|
|
],
|
|
"title": "TurnThreadUnreadPositionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"turnId",
|
|
"type"
|
|
],
|
|
"title": "TurnThreadUnreadPosition",
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"readState": {
|
|
"$ref": "#/definitions/ThreadReadState"
|
|
},
|
|
"threadId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"readState",
|
|
"threadId"
|
|
],
|
|
"title": "ThreadReadStateChangedNotification",
|
|
"type": "object"
|
|
} |