Add ephemeral turn context support

Introduce app-server ephemeralContext, render it as additional_context_for_this_turn fragments, and strip it correctly across contextual-user diffing and compaction flows.

Regenerate app-server schema fixtures and add coverage for model-visible layout, compaction, oversize validation, and resumed/forked context reconstruction.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-12 12:36:26 -07:00
parent 4bcfdafd01
commit 72d53a2c9b
54 changed files with 1422 additions and 26 deletions

View File

@@ -6828,6 +6828,23 @@
],
"type": "object"
},
"EphemeralContext": {
"properties": {
"text": {
"description": "Free-form text payload for additional context sent with one turn.",
"type": "string"
},
"title": {
"description": "Human-readable title for additional context sent with one turn.",
"type": "string"
}
},
"required": [
"text",
"title"
],
"type": "object"
},
"ErrorNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -13206,6 +13223,16 @@
],
"description": "Override the reasoning effort for this turn and subsequent turns."
},
"ephemeralContext": {
"description": "Additional model-visible context for this turn, such as editor or IDE state. This context is not re-injected automatically after compaction, so clients should send a fresh snapshot on each turn instead of expecting it to carry forward automatically.",
"items": {
"$ref": "#/definitions/v2/EphemeralContext"
},
"type": [
"array",
"null"
]
},
"input": {
"items": {
"$ref": "#/definitions/v2/UserInput"