import type { TaskReviewReceipt } from './task-followup.js'; import { type NativeEmoji } from './sticker-adapter.js'; import type { SessionEvent } from '@deepseek-ai/dsh-session'; import type { PartnerOutboundAttachment, PartnerReply } from '../channel-message.js'; export type ChatPart = { type: 'emoji'; emoji: NativeEmoji; } | { type: 'text'; text: string; } | { type: 'image'; attachment: PartnerOutboundAttachment; url: string; label: string; }; export interface ChatReply { taskReview?: TaskReviewReceipt; kind: 'partner-chat-v1'; parts: ChatPart[]; silent?: boolean; intermediate?: boolean; taskPreamble?: boolean; expectedTools?: string[]; taskDisposition?: 'blocked'; inputMessageId?: string; deliveryKind?: 'text' | 'voice'; transportCallId?: string; delivered?: boolean; spokenText?: string; originRouteId?: string | null; } export declare function chatReplyFromEvent(event: SessionEvent): ChatReply | undefined; /** Legacy records keep text at 0 and attachments at 1+. New replies preserve authored order. */ export declare function replyDeliveryParts(reply: PartnerReply): Array<{ type: 'text'; text: string; } | { type: 'image'; attachment: PartnerOutboundAttachment; } | { type: 'emoji'; emoji: NativeEmoji; }>; export declare function parseChatInput(raw: unknown): Array<{ text: string; } | { stickerId: string; }>; /** Some providers put speech beside a terminal tool call instead of inside its arguments. * Preserve only that exact call's public text, never reasoning, earlier steps or other tools. */ export declare function withChatCompanionText(input: Array<{ text: string; } | { stickerId: string; }>, events: readonly SessionEvent[], callId: string | undefined): Array<{ text: string; } | { stickerId: string; }>; /** Unstructured short chat paragraphs get a delivery fallback (foreground and idle). * Explicit tool parts, documents and attachment replies keep authored boundaries. * Call before persisting the delivery so retries retain stable part indexes. */ export declare function segmentIdleChatReply(reply: PartnerReply, enabled: boolean): PartnerReply; /** Normalize only a single short text item; keep explicit multi-bubble order and the 8-part limit. */ export declare function segmentChatInput(input: Array<{ text: string; } | { stickerId: string; }>, enabled: boolean): Array<{ text: string; } | { stickerId: string; }>; //# sourceMappingURL=protocol.d.ts.map