/** * Outbound Markdown formatting for enterprise channels (DingTalk, Slack, WeCom, Discord). * * Converts agent CommonMark output through the shared `src/markdown` IR into each * platform's supported markup while rejecting unsafe link schemes/credentials and * keeping chunks within provider payload limits. */ /** * Validate a link href so outbound messages only emit clickable anchors for * safe protocols without embedded credentials. */ export declare function sanitizeOutboundHref(rawHref: string): string | null; /** * Derive a clean plain-text preview title for DingTalk `sampleMarkdown.title`. */ export declare function extractPlainPreviewTitle(plainText: string, maxChars?: number, fallback?: string): string; export interface DingTalkMarkdownPayload { title: string; text: string; } export declare function formatDingTalkOutboundMessages(markdown: string, limit?: number): DingTalkMarkdownPayload[]; /** * Slack `mrkdwn` requires `&`, `<`, `>` to be HTML-entity escaped across all * text so user/LLM text cannot spoof mentions (``, `<@U...>`) or links. */ export declare function escapeSlackMrkdwn(text: string): string; export declare function formatSlackOutboundMrkdwn(markdown: string): string; export declare function formatSlackOutboundChunks(markdown: string, limit?: number): string[]; export declare function formatWeComOutboundChunks(markdown: string, maxBytes?: number): string[]; export declare function formatDiscordOutboundText(markdown: string): string; export declare function formatDiscordOutboundChunks(markdown: string, limit?: number): string[];