Skip to content

[Channel RFC] Telegram adapter migration (shim → full TelegramChannelAdapter) #262

@eanzhao

Description

@eanzhao

Parent RFC: #254

Scope

TelegramPlatformAdapter(shim 级)迁移到 TelegramChannelAdapter(full adapter 实现)。

Deliverables

Package: agents/channels/Aevatar.GAgents.Channel.Telegram

底层 SDK: Telegram.Bot(11k+ stars,最成熟 .NET Telegram library)

Main class: TelegramChannelAdapter : IChannelTransport, IChannelOutboundPort

  • 迁移自 TelegramPlatformAdapter
  • Transport 双模式:Webhook 优先 / long-polling fallback(开发模式)
  • Group / supergroup / channel 的区分(ConversationReference.TelegramGroup / .TelegramChannel / .TelegramPrivate

Composer: TelegramMessageComposer : IMessageComposer

  • intent → text + inline keyboard
  • Attachments: upload via sendPhoto / sendDocument multipart

Capability declaration:

  • SupportsEphemeral = false / SupportsThread = false / SupportsModal = false / SupportsConfirmDialog = false
  • SupportsStreaming = EditLoopRateLimitededitMessageText 20/min per chat 硬限)
  • SupportsActionButtons = true(inline keyboard)

Streaming support:

  • BeginStreamingReplyAsync 实现用 editMessageText + rate-limited debounce(RecommendedStreamDebounceMs = 3000

Acceptance

References

  • RFC §10.2 Telegram

Dependencies

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions