Separate SSE streaming from POST work submission (#7834)
This commit is contained in:
@@ -3281,6 +3281,127 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/sessions/{id}/cancel": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::session_events"
|
||||
],
|
||||
"operationId": "session_cancel",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "Session ID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CancelRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Cancellation accepted"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sessions/{id}/events": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"super::routes::session_events"
|
||||
],
|
||||
"operationId": "session_events",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "Session ID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "SSE event stream",
|
||||
"content": {
|
||||
"text/event-stream": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MessageEvent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Session not found"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sessions/{id}/reply": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::session_events"
|
||||
],
|
||||
"operationId": "session_reply",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "Session ID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SessionReplyRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Request accepted",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SessionReplyResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"404": {
|
||||
"description": "Session not found"
|
||||
},
|
||||
"424": {
|
||||
"description": "Agent not initialized"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sessions/{session_id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -3974,6 +4095,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"CancelRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"request_id"
|
||||
],
|
||||
"properties": {
|
||||
"request_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ChatRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -6043,6 +6175,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Sent at the start of an SSE stream to inform the client about\nin-flight requests it can reattach to.",
|
||||
"required": [
|
||||
"request_ids",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"request_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ActiveRequests"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -7738,6 +7892,48 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"SessionReplyRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"request_id",
|
||||
"user_message"
|
||||
],
|
||||
"properties": {
|
||||
"override_conversation": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Message"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"recipe_name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"recipe_version": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"request_id": {
|
||||
"type": "string",
|
||||
"description": "Client-generated UUIDv7 identifying this request."
|
||||
},
|
||||
"user_message": {
|
||||
"$ref": "#/components/schemas/Message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SessionReplyResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"request_id"
|
||||
],
|
||||
"properties": {
|
||||
"request_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SessionType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
Reference in New Issue
Block a user