Separate SSE streaming from POST work submission (#7834)

This commit is contained in:
jh-block
2026-03-18 18:00:06 +01:00
committed by GitHub
parent c2d10cea9b
commit 8d72344602
15 changed files with 1830 additions and 204 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+109
View File
@@ -59,6 +59,10 @@ export type CallToolResponse = {
structuredContent?: unknown;
};
export type CancelRequest = {
request_id: string;
};
export type ChatRequest = {
/**
* Override the server's conversation history. Only use this when you need absolute control
@@ -696,6 +700,9 @@ export type MessageEvent = {
} | {
conversation: Conversation;
type: 'UpdateConversation';
} | {
request_ids: Array<string>;
type: 'ActiveRequests';
} | {
type: 'Ping';
};
@@ -1255,6 +1262,21 @@ export type SessionListResponse = {
sessions: Array<Session>;
};
export type SessionReplyRequest = {
override_conversation?: Array<Message> | null;
recipe_name?: string | null;
recipe_version?: string | null;
/**
* Client-generated UUIDv7 identifying this request.
*/
request_id: string;
user_message: Message;
};
export type SessionReplyResponse = {
request_id: string;
};
export type SessionType = 'user' | 'scheduled' | 'sub_agent' | 'hidden' | 'terminal' | 'gateway';
export type SessionsQuery = {
@@ -4129,6 +4151,93 @@ export type SearchSessionsResponses = {
export type SearchSessionsResponse = SearchSessionsResponses[keyof SearchSessionsResponses];
export type SessionCancelData = {
body: CancelRequest;
path: {
/**
* Session ID
*/
id: string;
};
query?: never;
url: '/sessions/{id}/cancel';
};
export type SessionCancelResponses = {
/**
* Cancellation accepted
*/
200: unknown;
};
export type SessionEventsData = {
body?: never;
path: {
/**
* Session ID
*/
id: string;
};
query?: never;
url: '/sessions/{id}/events';
};
export type SessionEventsErrors = {
/**
* Session not found
*/
404: unknown;
};
export type SessionEventsResponses = {
/**
* SSE event stream
*/
200: MessageEvent;
};
export type SessionEventsResponse = SessionEventsResponses[keyof SessionEventsResponses];
export type SessionReplyData = {
body: SessionReplyRequest;
path: {
/**
* Session ID
*/
id: string;
};
query?: never;
url: '/sessions/{id}/reply';
};
export type SessionReplyErrors = {
/**
* Invalid request
*/
400: unknown;
/**
* Session not found
*/
404: unknown;
/**
* Agent not initialized
*/
424: unknown;
/**
* Internal server error
*/
500: unknown;
};
export type SessionReplyResponses = {
/**
* Request accepted
*/
200: SessionReplyResponse;
};
export type SessionReplyResponse2 = SessionReplyResponses[keyof SessionReplyResponses];
export type DeleteSessionData = {
body?: never;
path: {