Commit Graph

100 Commits

Author SHA1 Message Date
Peter Steinberger
43ca0e19b3 fix: remove ack reactions after reply (#633) (thanks @levifig) 2026-01-10 02:14:14 +01:00
Levi Figueira
d4b6af8d71 feat: add removeAckAfterReply option for Discord, Slack, and Telegram
Add `messages.removeAckAfterReply` config option to automatically remove
acknowledgment reactions after the bot sends a reply, reducing visual
clutter while still providing immediate feedback.

Platforms: Discord, Slack, Telegram

Implementation:
- Added removeAckAfterReply boolean field to MessagesConfig (default: false)
- Track ack reaction state in all three platform handlers
- Remove ack reaction after successful reply delivery
- Graceful error handling with verbose logging

Platform-specific:
- Discord: uses removeReactionDiscord()
- Slack: uses removeSlackReaction()
- Telegram: uses setMessageReaction() with empty array

Closes #627
2026-01-10 02:13:46 +01:00
Jarvis
6899918bfa chore: format audioAsVoice updates
Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:44:57 +01:00
Jarvis
e037a86921 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
b6171c881c fix(telegram): guard voice note sends 2026-01-10 01:43:01 +01:00
Jarvis
972e18996b 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
4341a6870e 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
c468f539c3 fix: keep telegram streamMode draft-only (#619) (thanks @rubyrunsstuff) 2026-01-10 01:14:40 +01:00
Ruby
b9cdf5b723 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
f58a8178a1 fix: dedupe telegram updates 2026-01-09 21:06:06 +01:00
Peter Steinberger
9817df9b67 feat(telegram): inline keyboard buttons (#491)
Co-authored-by: Azade <azade@hey.com>
2026-01-09 20:47:03 +01:00
Peter Steinberger
7550ef8192 fix(auto-reply): coalesce block replies and document streaming toggles (#536) (thanks @mcinteerj) 2026-01-09 18:19:55 +00:00
Jake
c289c9afc1 Config: add support for per-provider blockStreaming override 2026-01-09 18:11:27 +00:00
Peter Steinberger
7ac0229fa0 refactor(messages): centralize per-agent prefixes 2026-01-09 16:54:54 +01:00
Peter Steinberger
06411d0fdc fix: derive prefixes from routed identity (#578) (thanks @p6l-richard) 2026-01-09 16:39:32 +01:00
Peter Steinberger
947844117c 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
Onur
6d92e1d7c4 wip 2026-01-09 11:06:49 +01:00
Peter Steinberger
54a31c14c8 fix: honor mention-bypass for group commands 2026-01-09 02:52:44 +01:00
Peter Steinberger
4eb8ccfcf8 style: format 2026-01-09 00:33:09 +01:00
Peter Steinberger
97bccc2e66 feat(telegram): show user id in pairing 2026-01-09 00:01:23 +01:00
Peter Steinberger
9ff79bc33a feat(providers): improve doctor + status probes 2026-01-08 23:48:37 +01:00
Peter Steinberger
7a5585ab4c fix: tighten group elevated targeting 2026-01-08 22:57:18 +01:00
Peter Steinberger
ae505658c2 docs: drop legacy telegram pairing mention 2026-01-08 09:57:03 +01:00
Peter Steinberger
32e2616c1a fix(telegram): gate native fetch to bun 2026-01-08 08:26:40 +01:00
Peter Steinberger
a1f9aad360 fix: force telegram native fetch under bun 2026-01-08 05:20:38 +01:00
Manuel Maly
f63401f818 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
4108c4fa1c 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
Peter Steinberger
68d343b164 fix: telegram html formatting (#435, thanks @RandyVentures) 2026-01-08 02:34:32 +01:00
Peter Steinberger
03774b657f feat: add providers CLI and multi-account onboarding 2026-01-08 01:55:59 +01:00
mneves75
d03d152628 feat(telegram): wire replyToMode config, add forum topic support, fix messaging tool duplicates
Changes:
- Default replyToMode from "off" to "first" for better threading UX
- Add messageThreadId and replyToMessageId params for forum topic support
- Add messaging tool duplicate detection to suppress redundant block replies
- Add sendMessage action to telegram tool schema
- Add @grammyjs/types devDependency for proper TypeScript typing
- Remove @ts-nocheck and fix all type errors in send.ts
- Add comprehensive docs/telegram.md documentation
- Add PR-326-REVIEW.md with John Carmack-level code review

Test coverage:
- normalizeTextForComparison: 5 cases
- isMessagingToolDuplicate: 7 cases
- sendMessageTelegram thread params: 5 cases
- handleTelegramAction sendMessage: 4 cases
- Forum topic isolation: 4 cases

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:50:47 +00:00
Peter Steinberger
b6fea2c177 refactor(telegram): extract runner config and key helper 2026-01-07 22:22:21 +01:00
Peter Steinberger
f113249450 fix(telegram): sequence runner updates and cap concurrency 2026-01-07 22:08:20 +01:00
Peter Steinberger
639e14b476 style(telegram): format activation log 2026-01-07 11:21:12 +00:00
Peter Steinberger
6313b7c532 fix(telegram): honor session activation overrides 2026-01-07 11:19:09 +00:00
Julian Engel
0d8b0bf04d fix(telegram): make /activation command work by checking session state
The /activation command now properly controls group activation mode:
- Loads session state before filtering messages
- Checks groupActivation field (from /activation command)
- Falls back to config telegram.groups requireMention setting

Previously, the bot only checked config and ignored session state,
making the /activation command appear to work but have no effect.

Changes:
- Add resolveGroupActivation() to check session before config
- Import loadSessionStore to read session state early
- Pass messageThreadId to support forum topics correctly
2026-01-07 11:16:35 +00:00
Peter Steinberger
bf607f8f33 refactor: drop autoReply, add topic requireMention
Co-authored-by: kitze <kristijan.mkd@gmail.com>
2026-01-07 12:07:15 +01:00
Peter Steinberger
2c5db12a8d feat: add channel/topic overrides for skills + auto-reply 2026-01-07 11:44:37 +01:00
Peter Steinberger
9d469d5ffa feat: telegram draft streaming 2026-01-07 11:08:32 +01:00
Josh Lehman
03de48f43c feat(routing): route replies to originating channel
Implement reply routing based on OriginatingChannel/OriginatingTo fields.
This ensures replies go back to the provider where the message originated
instead of using the session's lastChannel.

Changes:
- Add OriginatingChannel/OriginatingTo fields to MsgContext (templating.ts)
- Add originatingChannel/originatingTo fields to FollowupRun (queue.ts)
- Create route-reply.ts with provider-agnostic router
- Update all providers (Telegram, Slack, Discord, Signal, iMessage)
  to pass originating channel info
- Update reply.ts to pass originating channel to followupRun
- Update followup-runner.ts to use route-reply for originating channels

This addresses the issue where messages from one provider (e.g., Slack)
would receive replies on a different provider (e.g., Telegram) because
the queue used the last active dispatcher instead of the originating one.
2026-01-07 04:51:33 +00:00
Peter Steinberger
316e3c02a9 fix: harden pairing flow 2026-01-07 05:06:04 +01:00
Peter Steinberger
a9371fa4eb refactor: streamline outbound payload handling 2026-01-07 02:30:42 +00:00
Peter Steinberger
e8b6da659a fix(telegram): import native reply helper 2026-01-07 02:19:42 +00:00
Peter Steinberger
8fc99495e4 refactor(telegram): polish topic threading 2026-01-07 02:19:42 +00:00
Peter Steinberger
4cb8925026 fix(telegram): support forum topics
Co-authored-by: Daniel Griesser <HazAT@users.noreply.github.com>
Co-authored-by: Nacho Iacovino <nachoiacovino@users.noreply.github.com>
Co-authored-by: Randy Ventures <RandyVentures@users.noreply.github.com>
2026-01-07 02:19:42 +00:00
Peter Steinberger
c366da7b4d fix(commands): wire /stop across chat commands 2026-01-06 23:11:57 +00:00
Nacho Iacovino
82157c6cb2 feat(telegram): add /stop command to abort running agent
Adds a /stop command that:
- Can interrupt a running agent session mid-execution
- Works in both DMs and group chats (including forum topics)
- Uses grammy's bot.command() to run before the main message handler
- Returns status: stopped, stop requested, or nothing running

Also fixes session key lookup in pi-embedded-runner to use sessionKey
instead of sessionId, ensuring /stop finds the correct active run.
2026-01-06 23:11:57 +00:00
Peter Steinberger
0f56d28c73 style: format lint offenders 2026-01-07 00:04:44 +01:00
Peter Steinberger
eeb398a8f8 fix: include telegram group sender in envelope headers 2026-01-06 22:34:02 +00:00
Peter Steinberger
13e94f4f66 fix(slack): clear assistant thread status after replies 2026-01-06 21:41:30 +01:00
Shadow
5b559080d1 feat(commands): unify chat commands (#275)
* Chat commands: registry, access groups, Carbon

* Chat commands: clear native commands on disable

* fix(commands): align command surface typing

* docs(changelog): note commands registry (PR #275)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-06 20:17:56 +00:00