sandbox connected and streaming

This commit is contained in:
2026-03-30 23:29:03 -04:00
parent c3a8fae132
commit 998f69fa1a
130 changed files with 7416 additions and 2123 deletions

View File

@@ -62,6 +62,8 @@ export type {
StoreConfig,
ChannelAdapter,
ChannelCapabilities,
ImageMessage,
TextMessage,
PathTrigger,
PathTriggerHandler,
PathTriggerContext,

View File

@@ -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;
}