@ours.network/tg-connector 2.0.4-nightly.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -208,6 +208,23 @@ item stays unread and may be delivered again after restart. The connector favors
208
208
  recoverability over silently losing content and does not depend on removed
209
209
  defer/requeue or conversation-policy APIs.
210
210
 
211
+ ### Interactive widgets (Bot API 10.4)
212
+
213
+ A route pinned to one private chat (positive chat id, no topic) advertises two
214
+ typed ours commands to its connected agent: `telegram_widget_send` posts a
215
+ self-contained HTML widget (≤32768 bytes, ≤4096 compressed) and
216
+ `telegram_widget_update` changes its `chat_data` / `public_data`. When the user
217
+ interacts, the connector answers the widget at once and forwards the request to
218
+ that agent as a `telegram_widget_query` JSON message (untrusted data). Discover
219
+ the commands with `list_contact_commands`. Ordinary agent text is never turned
220
+ into a widget. Typed command rows are never posted to Telegram; the drain
221
+ consumes them and the SDK returns each command's result. Production Telegram
222
+ supports widgets in private chats only. Widget commands are accepted only from
223
+ the route's recorded agent, which the route takes from its contact list when it
224
+ has exactly one contact. See
225
+ [docs/telegram-widgets.md](docs/telegram-widgets.md) and
226
+ [examples/widget-choice.html](examples/widget-choice.html).
227
+
211
228
  ### Voice transcription (speech-to-text)
212
229
 
213
230
  A Telegram **voice note** carries no caption, so a bridged agent (a text LLM)