feat(telegram): TelegramChatChannel delivers send files and scheduler texts in order

Add TelegramLimits, TelegramChatChannel (every delivery through
ChatRenderer.RunInOrderAsync, auto photo falls back to a document on a 400)
and wire it into ChatRegistry as AgentSessionOptions.Channel and
ChatContext.Channel. Spec: SendTextAsync names its failure text
("Telegram did not accept the message.") and throws when any chunk fails.
This commit is contained in:
EugeneTes
2026-09-26 22:00:06 +02:00
parent 1eed03e851
commit ee3049e47a
6 changed files with 277 additions and 4 deletions

View File

@@ -171,7 +171,8 @@ it (`chat.Channel`).
- Anything else becomes `ChatDeliveryException("Telegram refused the file: <description>")`.
- **Text.** `SendTextAsync(markdown)` reuses the renderer's reply path (`TelegramFormatter.Split` →
`ToHtml` → `SendHtmlAsync` with the plain fallback). It returns the id of the first message, or throws
`ChatDeliveryException` when every retry failed.
`ChatDeliveryException("Telegram did not accept the message.")` when a chunk still failed after its retries (the
other chunks are still sent).
### 4. Telegram — inbound: `InboundMedia`