Commit Graph

195 Commits

Author SHA1 Message Date
Jarvis
9a7f050568 refactor(telegram): centralize voice decisions
- Share voice compatibility decision logic across send + bot flows
- Keep voice fallback logging consistent
- Simplify voice handling in the audio send path
2026-01-10 01:43:23 +01:00
Jarvis
ce786762db fix(telegram): guard voice note sends 2026-01-10 01:43:01 +01:00
Jarvis
2f036f7173 fix(audio): preserve audioAsVoice propagation
- Keep audioAsVoice-only payloads from being filtered out
- Allow empty payloads through when they carry the flag
- Remove temporary debug logs around audioAsVoice buffering

Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:42:09 +01:00
Jarvis
05a99aa49b feat(telegram): buffer audio blocks for [[audio_as_voice]] tag support
- Add [[audio_as_voice]] detection to splitMediaFromOutput()
- Pass audioAsVoice through onBlockReply callback chain
- Buffer audio blocks during streaming, flush at end with correct flag
- Non-audio media still streams immediately
- Fix: emit payloads with audioAsVoice flag even if text is empty

Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:41:18 +01:00
Peter Steinberger
1fd7a6e310 fix: keep telegram streamMode draft-only (#619) (thanks @rubyrunsstuff) 2026-01-10 01:14:40 +01:00
Ruby
b4fbf2fe0d fix: enable block streaming for Telegram when streamMode is 'block'
- Fix disableBlockStreaming logic in telegram/bot.ts to properly enable
  block streaming when telegram.streamMode is 'block' regardless of
  blockStreamingDefault setting
- Set minChars default to 1 for Telegram block mode so chunks send
  immediately on newlines/sentences instead of waiting for 800 chars
- Skip coalescing for Telegram block mode when not explicitly configured
  to reduce chunk batching delays
- Fix newline preference to wait for actual newlines instead of breaking
  on any whitespace when buffer is under maxChars

Fixes issue where all Telegram messages were batched into one message
at the end instead of streaming as separate messages during generation.
2026-01-10 01:11:41 +01:00
Peter Steinberger
e73b812236 fix: dedupe telegram updates 2026-01-09 21:06:06 +01:00
Peter Steinberger
6d378ee608 feat(telegram): inline keyboard buttons (#491)
Co-authored-by: Azade <azade@hey.com>
2026-01-09 20:47:03 +01:00
Peter Steinberger
fd15704c77 fix(auto-reply): coalesce block replies and document streaming toggles (#536) (thanks @mcinteerj) 2026-01-09 18:19:55 +00:00
Jake
a05916bee8 Config: add support for per-provider blockStreaming override 2026-01-09 18:11:27 +00:00
Peter Steinberger
36bdec0f2c refactor(messages): centralize per-agent prefixes 2026-01-09 16:54:54 +01:00
Peter Steinberger
66bbb723c5 fix: derive prefixes from routed identity (#578) (thanks @p6l-richard) 2026-01-09 16:39:32 +01:00
Peter Steinberger
407a3c2c10 fix: quiet telegram getUpdates errors 2026-01-09 15:35:39 +01:00
Peter Steinberger
f6f178ddee style(telegram): format bot init 2026-01-09 13:57:06 +01:00
Peter Steinberger
7b81d97ec2 feat: wire multi-agent config and routing
Co-authored-by: Mark Pors <1078320+pors@users.noreply.github.com>
2026-01-09 12:48:42 +00:00
Peter Steinberger
ac922e83d3 Merge branch 'main' into tobias-sync 2026-01-09 13:42:34 +01:00
Peter Steinberger
dc6f22c2c5 fix: add hosted minimax onboarding (#495, thanks @tobiasbischoff) 2026-01-09 13:40:01 +01:00
Tobias Bischoff
897685a2de Telegram: cast fetch to grammy client type 2026-01-09 13:39:28 +01:00
Onur
2ab5890eab wip 2026-01-09 11:06:49 +01:00
Peter Steinberger
3a99ac7e9a fix: honor mention-bypass for group commands 2026-01-09 02:52:44 +01:00
Peter Steinberger
4e92ccc0dd style: format 2026-01-09 00:33:09 +01:00
Peter Steinberger
71309c064a fix: drop redundant telegram audit union 2026-01-09 00:33:09 +01:00
Peter Steinberger
490bbd10fc feat(telegram): show user id in pairing 2026-01-09 00:01:23 +01:00
Peter Steinberger
69f8af530d feat(providers): improve doctor + status probes 2026-01-08 23:48:37 +01:00
Peter Steinberger
014667e00b fix: tighten group elevated targeting 2026-01-08 22:57:18 +01:00
Peter Steinberger
0373574f0b refactor(telegram): centralize target parsing 2026-01-08 21:38:59 +01:00
Tobias Bischoff
634f1389a4 Merge branch 'main' into main 2026-01-08 21:15:06 +01:00
Peter Steinberger
31fb5867e8 refactor(outbound): centralize telegram account defaults 2026-01-08 21:05:01 +01:00
Peter Steinberger
bf67b29a0e fix(telegram): resolve grammY fetch type mismatch (#512)
Co-authored-by: Yuri Chukhlib <yuri.v.chu@gmail.com>
2026-01-08 20:18:17 +01:00
Tobias Bischoff
3149d6d331 Telegram: cast fetch to grammy client type 2026-01-08 15:16:53 +01:00
Peter Steinberger
959a19d8ae fix: clean lint issues 2026-01-08 11:07:11 +00:00
Peter Steinberger
63ff5819b1 fix: retry telegram poll conflicts 2026-01-08 12:04:21 +01:00
Peter Steinberger
af2accf5e3 test: force bun fetch path in telegram send 2026-01-08 10:37:29 +01:00
Peter Steinberger
e6f8e1e531 fix(telegram): restrict native fetch to bun 2026-01-08 10:31:16 +01:00
Peter Steinberger
bfd3eb46c7 docs: drop legacy telegram pairing mention 2026-01-08 09:57:03 +01:00
Peter Steinberger
908a7e4fcb chore: sync ci tasks and relax telegram test timeouts 2026-01-08 09:09:33 +01:00
Peter Steinberger
2450af26ec test: fix telegram fetch expectation 2026-01-08 07:51:58 +00:00
Peter Steinberger
8930ec32cb feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
Peter Steinberger
00c1403f5c fix: unblock ci 2026-01-08 07:41:39 +00:00
Peter Steinberger
1b2957d050 style: lint cleanup 2026-01-08 08:40:02 +01:00
Peter Steinberger
9a11325cc9 fix: daemon status guidance and telegram fetch 2026-01-08 08:39:55 +01:00
Peter Steinberger
97cb469faf chore(telegram): fix bun comment 2026-01-08 08:26:40 +01:00
Peter Steinberger
c241cb25bd fix(telegram): gate native fetch to bun 2026-01-08 08:26:40 +01:00
Peter Steinberger
367ee8ea7b fix: stabilize telegram media group tests 2026-01-08 05:48:25 +00:00
Peter Steinberger
ab98ffe9fe fix: force telegram native fetch under bun 2026-01-08 05:20:38 +01:00
Peter Steinberger
15379dedf0 fix(telegram): voice-note tag defaults (#188, thanks @manmal) 2026-01-08 03:15:08 +00:00
Manuel Maly
2972fce02c fix: flip audio default to file (backward compat)
- Default: sendAudio (file with metadata) - preserves old behavior
- Opt-in: [[audio_as_voice]] tag for voice bubble

This is non-breaking - existing integrations keep working.
2026-01-08 03:15:08 +00:00
Manuel Maly
5e1b91b32c feat(telegram): wire audioAsVoice through bot.ts
- Add audioAsVoice option to ReplyPayload type
- Update bot.ts to use sendVoice by default for audio (voice bubble)
- When audioAsVoice is false, use sendAudio (file with metadata)

This allows agents to control voice vs file mode via ReplyPayload.
2026-01-08 03:15:08 +00:00
Manuel Maly
20fd9f7f67 feat(telegram): use sendVoice for audio with opt-out
Use Telegram's sendVoice API for audio files by default, displaying them
as round playable voice bubbles instead of file attachments.

Changes:
- Add asVoice option to TelegramSendOpts (defaults to true)
- When asVoice is true (default): use api.sendVoice() for voice bubbles
- When asVoice is false: use api.sendAudio() for traditional audio files

This gives callers control: voice messages for TTS/quick responses,
audio files for music/podcasts with metadata display.
2026-01-08 03:15:08 +00:00
Peter Steinberger
2140caaf67 fix: telegram html formatting (#435, thanks @RandyVentures) 2026-01-08 02:34:32 +01:00