Replace compaction notifications with system notifications (#5218)

This commit is contained in:
David Katz
2025-10-22 16:09:44 -04:00
committed by GitHub
parent 755e9f893d
commit 23412e270f
31 changed files with 350 additions and 1060 deletions
+24 -103
View File
@@ -852,50 +852,6 @@
}
}
},
"/context/manage": {
"post": {
"tags": [
"Context Management"
],
"operationId": "manage_context",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextManageRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Context managed successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextManageResponse"
}
}
}
},
"401": {
"description": "Unauthorized - Invalid or missing API key"
},
"412": {
"description": "Precondition failed - Agent not available"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"api_key": []
}
]
}
},
"/diagnostics/{session_id}": {
"get": {
"tags": [
@@ -2195,69 +2151,12 @@
}
]
},
"ContextManageRequest": {
"type": "object",
"description": "Request payload for context management operations",
"required": [
"messages",
"sessionId"
],
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
},
"description": "Collection of messages to be managed"
},
"sessionId": {
"type": "string",
"description": "Optional session ID for session-specific agent"
}
}
},
"ContextManageResponse": {
"type": "object",
"description": "Response from context management operations",
"required": [
"messages",
"tokenCounts"
],
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
},
"description": "Processed messages after the operation"
},
"tokenCounts": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"description": "Token counts for each processed message"
}
}
},
"Conversation": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
"ConversationCompacted": {
"type": "object",
"required": [
"msg"
],
"properties": {
"msg": {
"type": "string"
}
}
},
"CreateRecipeRequest": {
"type": "object",
"required": [
@@ -3249,7 +3148,7 @@
{
"allOf": [
{
"$ref": "#/components/schemas/ConversationCompacted"
"$ref": "#/components/schemas/SystemNotificationContent"
},
{
"type": "object",
@@ -3260,7 +3159,7 @@
"type": {
"type": "string",
"enum": [
"conversationCompacted"
"systemNotification"
]
}
}
@@ -4310,6 +4209,28 @@
"propertyName": "type"
}
},
"SystemNotificationContent": {
"type": "object",
"required": [
"notificationType",
"msg"
],
"properties": {
"msg": {
"type": "string"
},
"notificationType": {
"$ref": "#/components/schemas/SystemNotificationType"
}
}
},
"SystemNotificationType": {
"type": "string",
"enum": [
"thinkingMessage",
"inlineMessage"
]
},
"TextContent": {
"type": "object",
"required": [