UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

31 lines • 1.47 kB
import type { ChannelMarkdown } from './types.js'; /** Escape text for Telegram's MarkdownV2 — every character it reserves gets a backslash. */ export declare function escapeTelegramMarkdown(value: string): string; /** Undo {@link escapeTelegramMarkdown}: what a message reads as plain text when MarkdownV2 is refused. */ export declare function unescapeTelegramMarkdown(value: string): string; /** A GitHub table found in a turn's text: header cells and body rows, as the model wrote them. */ export interface MarkdownTable { header: string[]; rows: string[][]; } /** A turn's text cut around its tables (`source` is the table as written, to fall back to). */ export type MarkdownPiece = { kind: 'text'; text: string; } | { kind: 'table'; table: MarkdownTable; source: string; }; /** * Cut `text` around its GitHub tables (header, divider, rows), outside fenced code. Text pieces * keep their line breaks; the pieces joined back with `\n` are the input. */ export declare function splitTables(text: string): MarkdownPiece[]; /** * Convert a turn's markdown to what `markdown` renders: WhatsApp's `*bold*` `_italic_` `~strike~`, * Telegram's MarkdownV2 (every reserved character escaped), or plain text. Links become * `label (url)` where the channel has no link syntax; headings become bold lines. */ export declare function toChannelMarkdown(text: string, markdown: ChannelMarkdown): string; //# sourceMappingURL=markdown.d.ts.map