sandbox connected and streaming
This commit is contained in:
@@ -62,6 +62,8 @@ export type {
|
||||
StoreConfig,
|
||||
ChannelAdapter,
|
||||
ChannelCapabilities,
|
||||
ImageMessage,
|
||||
TextMessage,
|
||||
PathTrigger,
|
||||
PathTriggerHandler,
|
||||
PathTriggerContext,
|
||||
|
||||
@@ -131,6 +131,29 @@ export interface ChannelCapabilities {
|
||||
supportsTradingViewEmbed: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Image message for channel adapters.
|
||||
* Contains base64-encoded image data from MCP tools.
|
||||
*/
|
||||
export interface ImageMessage {
|
||||
/** Base64-encoded image data */
|
||||
data: string;
|
||||
|
||||
/** MIME type (e.g., 'image/png', 'image/jpeg') */
|
||||
mimeType: string;
|
||||
|
||||
/** Optional caption/description */
|
||||
caption?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Text message for channel adapters.
|
||||
*/
|
||||
export interface TextMessage {
|
||||
/** Text content */
|
||||
text: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapter interface for communication channels.
|
||||
* Implemented by WebSocket handler, Telegram handler, etc.
|
||||
@@ -142,6 +165,18 @@ export interface ChannelAdapter {
|
||||
/** Send an incremental patch to the client */
|
||||
sendPatch(msg: PatchMessage): void;
|
||||
|
||||
/** Send a text message to the client */
|
||||
sendText(msg: TextMessage): void;
|
||||
|
||||
/** Send a streaming text chunk to the client */
|
||||
sendChunk(content: string): void;
|
||||
|
||||
/** Send an image to the client */
|
||||
sendImage(msg: ImageMessage): void;
|
||||
|
||||
/** Notify client that a tool call is being executed */
|
||||
sendToolCall?(toolName: string, label?: string): void;
|
||||
|
||||
/** Get channel capabilities */
|
||||
getCapabilities(): ChannelCapabilities;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user