@ours.network/tg-connector 2.0.4-nightly.2 → 2.1.0
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 +15 -0
- package/dist/connector.js +712 -61
- package/docs/telegram-widgets.md +229 -0
- package/examples/widget-choice.html +55 -0
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -208,6 +208,21 @@ 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. See
|
|
223
|
+
[docs/telegram-widgets.md](docs/telegram-widgets.md) and
|
|
224
|
+
[examples/widget-choice.html](examples/widget-choice.html).
|
|
225
|
+
|
|
211
226
|
### Voice transcription (speech-to-text)
|
|
212
227
|
|
|
213
228
|
A Telegram **voice note** carries no caption, so a bridged agent (a text LLM)
|