WIP: resumable stream

This commit is contained in:
Danny Avila 2025-12-11 09:52:15 -05:00
parent 4119935051
commit 0a517a2b8f
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
12 changed files with 498 additions and 209 deletions

View file

@ -171,6 +171,30 @@ export namespace Agents {
stepDetails: StepDetails;
usage: null | object;
};
/** Content part for aggregated message content */
export interface ContentPart {
type: string;
text?: string;
[key: string]: unknown;
}
/** User message metadata for rebuilding submission on reconnect */
export interface UserMessageMeta {
messageId: string;
parentMessageId?: string;
conversationId?: string;
text?: string;
}
/** State data sent to reconnecting clients */
export interface ResumeState {
runSteps: RunStep[];
aggregatedContent?: ContentPart[];
userMessage?: UserMessageMeta;
responseMessageId?: string;
conversationId?: string;
}
/**
* Represents a run step delta i.e. any changed fields on a run step during
* streaming.