Commit Graph

477 Commits

Author SHA1 Message Date
Shakker 3ad747e25f style: apply formatter cleanups 2026-03-30 16:20:27 +01:00
pgondhi987 c4fa8635d0
fix(telegram): gate audio preflight transcription on sender authorization (#57566)
* Telegram: gate audio preflight transcription on sender authorization

* fix: honor telegram audio preflight command auth
2026-03-30 12:19:31 +01:00
Vincent Koc 348b094fe8 fix(test): satisfy telegram pairing seam 2026-03-30 20:05:29 +09:00
Vincent Koc 2fbd5e3f5f fix(test): trim telegram command registry imports 2026-03-30 19:34:47 +09:00
Gustavo Madeira Santana 8b0cbebe43
Telegram: align channel test with runtime probe precedence 2026-03-29 23:34:03 -04:00
Gustavo Madeira Santana f380305ee4
Tests: restore extension plugin test seams 2026-03-29 22:38:44 -04:00
Peter Steinberger 9d005e6fbb
fix: stabilize telegram contract runtime coverage 2026-03-30 03:02:25 +01:00
Gustavo Madeira Santana acea28a9bb
Telegram: fix extension-fast test seams 2026-03-29 21:54:47 -04:00
Gustavo Madeira Santana f44174cf61
Extensions: stabilize telegram registry contracts 2026-03-29 21:42:58 -04:00
Peter Steinberger fec51572a3
fix: stabilize gate and extension boundary checks 2026-03-30 02:37:36 +01:00
Vincent Koc 3034adfdb3 fix(commands): harden fast status and Telegram callbacks 2026-03-30 09:32:53 +09:00
Vincent Koc b82fd50472 fix(test): add extension-safe test helper bridges 2026-03-30 09:31:33 +09:00
Peter Steinberger f3bf7fe53a
chore: bump version to 2026.3.30 2026-03-30 09:28:29 +09:00
Peter Steinberger 63cbc097b5
refactor(channels): route core through registered plugin capabilities 2026-03-30 01:03:42 +01:00
Peter Steinberger 3b878e6b86
refactor: move approval auth and payload hooks to generic channel capabilities 2026-03-30 08:46:44 +09:00
Peter Steinberger 8720070fe0
refactor: rename channel approval capabilities 2026-03-30 08:28:33 +09:00
Peter Steinberger 52fb4a149a
refactor: share approval interactive renderers 2026-03-30 08:03:59 +09:00
Peter Steinberger cfac0e8698
refactor: move plugin-owned test support into plugins 2026-03-30 08:03:04 +09:00
Peter Steinberger 8861cdbb6f
refactor(plugin-sdk): untangle extension test seams 2026-03-29 23:43:53 +01:00
Peter Steinberger 69eea2cb80
refactor: split approval auth delivery and rendering 2026-03-30 07:36:18 +09:00
Peter Steinberger f8dc4305a5
refactor: share native approval delivery helpers 2026-03-30 07:16:33 +09:00
Peter Steinberger 6d9a7224aa
refactor: unify approval command authorization 2026-03-30 07:06:29 +09:00
Peter Steinberger 3ec000b995
refactor: align same-chat approval routing 2026-03-30 06:52:28 +09:00
Peter Steinberger 574d3c5213
fix: make same-chat approvals work across channels 2026-03-30 06:35:04 +09:00
Peter Steinberger 1ca01b738b
fix: stabilize exec approval approver routing 2026-03-30 06:25:03 +09:00
Peter Steinberger cce6d3bbb7
fix: resolve CI type and lint regressions 2026-03-30 04:51:33 +09:00
Peter Steinberger 855878b4f0
fix: stabilize serial test suite 2026-03-30 04:46:04 +09:00
Peter Steinberger 8109195ad8
fix(plugin-sdk): avoid recursive bundled facade loads 2026-03-29 15:00:25 +01:00
Peter Steinberger f1af7d66d2
chore: bump version to 2026.3.29 2026-03-29 14:33:12 +01:00
Peter Steinberger 270d0c5158
fix: avoid telegram plugin self-recursive sdk imports 2026-03-29 11:32:29 +01:00
Peter Steinberger 8e0ab35b0e
refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Peter Steinberger c48e0f8e6a
style: normalize import order and formatting 2026-03-29 16:33:22 +09:00
Peter Steinberger 04c976b43d
refactor(markdown): share render-aware chunking 2026-03-29 16:33:22 +09:00
wangchunyue dd61171f5b
fix: prevent Telegram polling watchdog from dropping replies (#56343) (thanks @openperf)
* fix(telegram): prevent polling watchdog from aborting in-flight message delivery

The polling-stall watchdog only tracked getUpdates timestamps to detect
network stalls. When the agent takes >90s to process a message (common
with local/large models), getUpdates naturally pauses, and the watchdog
misidentifies this as a stall. It then calls fetchAbortController.abort(),
which cancels all in-flight Telegram API requests — including the
sendMessage call delivering the agent's reply. The message is silently
lost with no retry.

Track a separate lastApiActivityAt timestamp that is updated whenever
any Telegram API call (sendMessage, sendChatAction, etc.) completes
successfully. The watchdog now only triggers when both getUpdates AND
all other API activity have been silent beyond the threshold, proving
the network is genuinely stalled rather than just busy processing.

Update existing stall test to account for the new timestamp, and add a
regression test verifying that recent sendMessage activity suppresses
the watchdog.

Fixes #56065
Related: #53374, #54708

* fix(telegram): guard watchdog against in-flight API calls

* fix(telegram): bound watchdog API liveness

* fix: track newest watchdog API activity (#56343) (thanks @openperf)

* fix: note Telegram watchdog delivery fix (#56343) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 11:11:28 +05:30
Ayaan Zaidi 7a16a48198
fix: keep telegram plugin callbacks explicit 2026-03-29 10:56:36 +05:30
Ayaan Zaidi 1791c7c304 fix: unify telegram exec approval auth 2026-03-29 10:45:57 +05:30
Subash Natarajan aee7992629 fix(telegram): accept approval callbacks from forwarding target recipients
When approvals.exec.targets routes to a Telegram DM, the recipient
receives inline approval buttons but may not have explicit
channels.telegram.execApprovals configured. This adds a fallback
isTelegramExecApprovalTargetRecipient check so those DM recipients
can act on the buttons they were sent.

Includes accountId scoping for multi-bot deployments and 9 new tests.
2026-03-29 10:45:57 +05:30
Peter Steinberger f9b1079283
build: cut 2026.3.28 stable 2026-03-29 02:33:41 +01:00
Robin Waslander 3847ace25b
fix(telegram): preserve forum topic routing for /new and /reset (#56654)
Build a topic-qualified routing target (telegram:<chatId>:topic:<threadId>)
for native commands in forum groups so /new and /reset stay scoped to
the active topic instead of falling back to General.

General topic (threadId=1) correctly falls through to the base chat
target since Telegram rejects message_thread_id=1 on sends.

Add regression tests for topic routing and General topic edge case.

Fixes #35963
2026-03-29 00:21:41 +01:00
Peter Steinberger 587e18cd3f chore: prepare 2026.3.28-beta.1 release 2026-03-28 22:24:51 +00:00
Peter Steinberger 8a24cbf450 chore: bump version to 2026.3.28 2026-03-28 22:05:21 +00:00
Robin Waslander 4d6c8edd74
fix(telegram): skip empty text replies instead of crashing with GrammyError 400 (#56620)
Filter whitespace-only text chunks at the bot delivery fan-in before
they reach sendTelegramText(). Covers normal text replies, follow-up
text, and voice fallback text paths.

Media-only replies are unaffected. message_sent hook still fires with
success: false for suppressed empty replies.

Fixes #37278
2026-03-28 22:27:56 +01:00
Robin Waslander ab2ef7bbfc
fix(telegram): split long messages at word boundaries instead of mid-word (#56595)
Replace proportional text estimate with binary search for the largest
text prefix whose rendered Telegram HTML fits the character limit, then
split at the last whitespace boundary within that verified prefix.

Single words longer than the limit still hard-split (unavoidable).
Markdown formatting stays balanced across split points.

Fixes #36644
2026-03-28 21:24:59 +01:00
Robin Waslander 865160e572
fix(telegram): validate replyToMessageId before sending to Telegram API (#56587)
Add shared normalizeTelegramReplyToMessageId() that rejects non-numeric,
NaN, and mixed-content strings before they reach the Telegram Bot API.
Apply at all four API sinks: direct send, bot delivery, draft stream,
and bot helpers.

Prevents GrammyError 400 when non-numeric values from session metadata
slip through typed boundaries.

Fixes #37222
2026-03-28 20:47:10 +01:00
Peter Steinberger 02d4c1f2c3 refactor: derive channel metadata from plugin manifests 2026-03-28 17:17:10 +00:00
Saurabh Mishra 90e82fabb3
fix: display model name instead of ID in Telegram model selector (#56165) (#56175)
* fix: display model name instead of ID in Telegram model selector (#56165)

* fix(telegram): scope model display names by provider

Signed-off-by: sallyom <somalley@redhat.com>

---------

Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: sallyom <somalley@redhat.com>
2026-03-28 09:23:09 -04:00
Ayaan Zaidi 5f82741d0f
test: align telegram thread binding seam coverage 2026-03-28 14:17:09 +05:30
Ayaan Zaidi 8366c74ccd
test: mock telegram conversation route seam 2026-03-28 13:17:57 +05:30
Peter Steinberger 2fd1a5274a fix: add getChat to telegram media test harness 2026-03-28 07:14:48 +00:00
Peter Steinberger 5802d112da refactor: narrow telegram test mocks off infra runtime 2026-03-28 06:56:41 +00:00