Commit Graph

453 Commits (b63175d8228e3a041abdafff4ef618d57e60fd68)

Author SHA1 Message Date
Josh Palmer 43545a4864 🤖 codex: preserve spacing after inline directives (issue-telegram-inline-spacing) 2026-01-09 00:37:40 +01:00
Peter Steinberger 014667e00b fix: tighten group elevated targeting 2026-01-08 22:57:18 +01:00
Luke a574ae5415
Merge branch 'main' into commands-list-clean 2026-01-08 15:35:17 -05:00
Keith the Silly Goose 7866203c5c fix(status): include provider prefix in model display
The /status command was showing 'anthropic/claude-sonnet-4-5' even when
using 'google-antigravity/claude-sonnet-4-5' because buildStatusMessage
received only the model name without the provider prefix.

When resolveConfiguredModelRef parsed a model string without a slash,
it fell back to DEFAULT_PROVIDER ('anthropic'), causing the misleading
display.

Fix: Pass the full 'provider/model' string to buildStatusMessage so
the provider is correctly extracted and displayed.

🪿 Investigated and submitted by Keith the Silly Goose
2026-01-08 20:11:37 +01:00
Josh Palmer cc94db458c
🤖 codex: fix block reply ordering (#503)
What: serialize block reply sends, make typing non-blocking, add timeout fallback + abort-aware routing, and add regression tests.
Why: prevent out-of-order streamed blocks while keeping final fallback on timeouts.
Tests: ./node_modules/.bin/vitest run src/auto-reply/reply.block-streaming.test.ts src/auto-reply/reply/route-reply.test.ts
Tests: corepack pnpm lint && corepack pnpm build (pass). corepack pnpm test (ran locally; failure observed during run).

Co-authored-by: Josh Palmer <joshp123@users.noreply.github.com>
2026-01-08 19:30:24 +01:00
LK 559e175b38 feat(commands): add /commands slash list 2026-01-08 16:23:36 +01:00
Peter Steinberger bce3cc992f fix: group /model list output 2026-01-08 09:44:59 +01:00
Peter Steinberger 8930ec32cb feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
Peter Steinberger d1ceb3aa60 feat: add logs cli and restart hints 2026-01-08 06:56:34 +00:00
Peter Steinberger 6a81652ebf fix(typing): keep tool-start ttl mode-safe (#452, thanks @thesash) 2026-01-08 06:18:35 +00:00
Sash Catanzarite 29c5ed54b2 feat(typing): trigger indicator on tool start events
Add signalToolStart to TypingSignaler and call it from onAgentEvent
when tools begin executing. This keeps the typing indicator visible
during long-running tool operations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 06:18:35 +00:00
Sash Catanzarite a6a550032a fix(typing): refresh TTL on every startTypingLoop call
Previously, startTypingLoop would return early if the typing timer was
already running, which meant the TTL would never get refreshed during
long tool executions. This caused the typing indicator to stop after
2 minutes even if tools were still running.

Now we refresh the TTL at the start of startTypingLoop, before the
early-return checks. This keeps typing alive during long operations.
2026-01-08 05:45:46 +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 262f8a8d45 feat(telegram): add [[audio_as_file]] tag support
Allow agents to specify audio mode via inline tag:
- Default: voice bubble (sendVoice)
- [[audio_as_file]]: audio file with metadata (sendAudio)

The tag is stripped from the final message text.

Example agent response:
  Here's a podcast episode! [[audio_as_file]]
  MEDIA:https://example.com/episode.mp3
2026-01-08 03:15:08 +00:00
Peter Steinberger 8aa3efb9e8 refactor: tidy directive parsing + queue status 2026-01-08 03:47:52 +01:00
Peter Steinberger fbeb9e6775 fix(ci): stabilize windows tests 2026-01-08 02:44:19 +00:00
Peter Steinberger 780385e31f fix(auto-reply): handle /think no-arg 2026-01-08 03:39:05 +01:00
Peter Steinberger ad5c87c193 fix: relax slash command parsing 2026-01-08 03:24:18 +01:00
Lutro 36b443f4f3 Telegram: fix /think command to show current level when no arg 2026-01-08 03:24:18 +01:00
Peter Steinberger a450390f7c refactor: share reply payload threading/dedupe 2026-01-08 01:09:23 +00:00
Peter Steinberger 05b8679c8b feat: add providers CLI and multi-account onboarding 2026-01-08 01:55:59 +01:00
Peter Steinberger 17d052bcda fix: polish reply threading + tool dedupe (thanks @mneves75) (#326) 2026-01-08 00:50:47 +00:00
mneves75 33e2d53be3 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 b2de667b11 fix: persist topic session files 2026-01-07 22:56:50 +00:00
Peter Steinberger 434c25331e refactor: centralize typing mode signals 2026-01-07 22:18:11 +00:00
Peter Steinberger bac1608933 feat: add typing mode controls 2026-01-07 21:58:54 +00:00
Azade e41540e4ff feat(commands): add dynamic /<alias> model switching 2026-01-07 20:41:41 +00:00
Peter Steinberger 0d021391a9 fix: scope thread sessions and discord starter fetch 2026-01-07 19:42:50 +01:00
Shadow 7e5cef29a0 Threads: add Slack/Discord thread sessions 2026-01-07 19:30:30 +01:00
Peter Steinberger 1011640a13 refactor: drop autoReply, add topic requireMention
Co-authored-by: kitze <kristijan.mkd@gmail.com>
2026-01-07 12:07:15 +01:00
Peter Steinberger eef90b47a3 chore: satisfy lint 2026-01-07 11:49:01 +01:00
Peter Steinberger 43c6bb7595 feat: add channel/topic overrides for skills + auto-reply 2026-01-07 11:44:37 +01:00
Peter Steinberger 61f720b945 feat: add skill filter + group system prompt plumbing 2026-01-07 11:44:37 +01:00
Peter Steinberger 9bf6684366 feat: add provider usage tracking 2026-01-07 11:42:46 +01:00
Peter Steinberger a700f9896d feat: telegram draft streaming 2026-01-07 11:08:32 +01:00
Peter Steinberger e8420bd047 fix: refine bootstrap injections 2026-01-07 10:04:23 +00:00
Tobias Bischoff 412990a139 Reduce prompt token overhead with leaner context injections 2026-01-07 10:04:23 +00:00
Peter Steinberger 7973fd4caf feat: add agents command 2026-01-07 10:03:53 +01:00
Peter Steinberger dc941b7e57 fix: refresh status output 2026-01-07 07:22:06 +01:00
Peter Steinberger 1673a221f8 feat: add /reasoning reasoning visibility 2026-01-07 06:17:31 +01:00
Peter Steinberger cb2a72f8a9 test(routing): add route-reply coverage 2026-01-07 05:07:53 +00:00
Peter Steinberger 3668388912 fix(routing): harden originating reply routing 2026-01-07 05:02:34 +00:00
Josh Lehman 5414da9fd4 fix(routing): handle cross-provider messages in collect mode
When queued messages come from different providers (Slack + Telegram),
process them individually instead of collecting into a single prompt.
This ensures each reply routes back to its originating provider.

- Add hasCrossProviderItems() to detect multi-provider queues
- Skip collect mode when cross-provider detected
- Preserve originatingChannel/originatingTo when collecting same-provider
2026-01-07 04:51:33 +00:00
Josh Lehman 2d67ec5bfa fix(routing): only route to originating channel when cross-provider
When OriginatingChannel matches Surface (same provider), use normal
dispatcher. Only route via routeReply() when they differ, ensuring
cross-provider messages (e.g., Telegram queued while Slack active)
get routed back to their origin.
2026-01-07 04:51:33 +00:00
Josh Lehman 9d50ebad7d 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 e0efcda77f fix(commands): wire /stop across chat commands 2026-01-06 23:11:57 +00:00
Peter Steinberger fec7f37271 merge upstream/main 2026-01-06 23:09:01 +01:00
Peter Steinberger 86b56b2308 fix: harden gemini session reset 2026-01-06 23:06:01 +01:00
Peter Steinberger 96164b5955 fix: improve socket error handling 2026-01-06 22:43:29 +01:00
Emanuel Stadler fb17a32283 feat: enhance error handling for socket connection errors
- Added `isError` property to `EmbeddedPiRunResult` and reply items to indicate error states.
- Updated error handling in `runReplyAgent` to provide more informative messages for specific socket connection errors.
2026-01-06 22:19:37 +01:00
Peter Steinberger 84c8209158 fix(slack): clear assistant thread status after replies 2026-01-06 21:41:30 +01:00
Shadow 9b22e1f6e9
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
Peter Steinberger 31dbc62bdd fix(telegram): prevent stuck typing after tool runs 2026-01-06 18:56:43 +00:00
Abhi bdf597eb95
fix(telegram): stop typing after tool results (#322)
Thanks @AbhisekBasu1.
2026-01-06 18:54:08 +00:00
Peter Steinberger 2f24ea492b fix: restore Anthropic token accounting 2026-01-06 18:52:01 +00:00
Peter Steinberger dbfa316d19 feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
VAC eadb923000 fix: auto-recover from Gemini session corruption
Detect the Gemini API error 'function call turn comes immediately after
a user turn or after a function response turn' which indicates corrupted
session history.

When detected:
- Delete the corrupted transcript file
- Remove the session entry from the store
- Return a user-friendly message asking them to retry

This prevents the error loop where every subsequent message fails with
the same error until manual intervention.

Fixes #296
2026-01-06 07:25:15 -05:00
Peter Steinberger b5c604b7b7 fix: require slash for control commands 2026-01-06 07:05:17 +01:00
Shadow 88cb13dc82
Auto-reply: fix typing stop race (#270) 2026-01-05 22:57:04 -06:00
Peter Steinberger ea6ee16461 chore: fix lint warnings 2026-01-06 05:41:24 +01:00
Peter Steinberger 13eb9c9ee9 refactor: centralize reply dispatch 2026-01-06 04:55:00 +01:00
Peter Steinberger 5946f4c341 test: extend typing idle coverage 2026-01-06 03:42:33 +00:00
Peter Steinberger 58186aa56e test: cover typing idle gate 2026-01-06 03:28:47 +00:00
Peter Steinberger ca8f66f844 refactor: unify group allowlist policy 2026-01-06 04:27:51 +01:00
Peter Steinberger 9d656f4269 style: satisfy lint 2026-01-06 03:11:42 +00:00
Peter Steinberger d5f088978a fix: stop typing after dispatcher idle 2026-01-06 03:09:49 +00:00
Peter Steinberger b30bae89ed feat: track compaction count + verbose notice 2026-01-06 02:49:03 +01:00
Peter Steinberger b6ae376076 fix: gate reset auth and infer whatsapp sender 2026-01-06 02:23:55 +01:00
Peter Steinberger b56338171b feat: gate slash commands and add compact 2026-01-06 02:23:55 +01:00
Peter Steinberger e73573eaea fix: clean model config typing 2026-01-06 01:08:36 +00:00
Peter Steinberger b04c838c15 feat!: redesign model config + auth profiles 2026-01-06 00:56:58 +00:00
Peter Steinberger d813e14950 chore: update mention gating docs and tests 2026-01-06 01:38:36 +01:00
Peter Steinberger 811ec8b78b fix: unify mention gating across providers 2026-01-06 01:32:17 +01:00
Peter Steinberger 53bf8b7b80 fix: avoid duplicate missing auth label 2026-01-05 23:00:37 +01:00
Peter Steinberger c75b2a7067 refactor: unify reply dispatch across providers 2026-01-05 19:43:54 +01:00
Peter Steinberger b7e708c764 fix(chat): stabilize web UI tool runs 2026-01-05 17:22:29 +00:00
Peter Steinberger 86c404c48b chore: fix reply commands lint 2026-01-05 18:16:39 +01:00
Peter Steinberger 7f3f73af1c fix: show model auth in status 2026-01-05 15:50:18 +01:00
Peter Steinberger bf6aad1965 fix(ci): format directive-handling 2026-01-05 14:34:55 +00:00
Peter Steinberger 0c37f27a4a fix: show /model auth source 2026-01-05 14:14:26 +00:00
Peter Steinberger cffbe79077 fix: add /model list alias 2026-01-05 14:11:33 +00:00
Peter Steinberger 8e8d07cbf4 fix(ci): satisfy formatter checks 2026-01-05 13:55:53 +00:00
Peter Steinberger 7619534bc0 feat(groups): resolve requireMention for discord/slack 2026-01-05 13:55:32 +00:00
Peter Steinberger ce68d82dfa fix: widen /model key masking 2026-01-05 13:50:45 +00:00
Peter Steinberger 5163886694 fix: show auth in /model list 2026-01-05 13:49:25 +00:00
Peter Steinberger 17ef7b3b0e fix: status runtime + help 2026-01-05 07:07:17 +01:00
Peter Steinberger 67420e9a81 fix: allow group activation for allowFrom senders 2026-01-05 02:33:51 +01:00
Peter Steinberger 359cb66e68 fix: allow wildcard control commands 2026-01-05 02:06:18 +01:00
Peter Steinberger 17422608b2 fix: gate /activation to owners in groups 2026-01-05 02:03:29 +01:00
Peter Steinberger 85549ac3b6 fix: gate group activation by owner 2026-01-05 00:48:16 +00:00
Peter Steinberger 1bad96aa2b style: tidy auto-reply imports and formatting 2026-01-05 01:46:16 +01:00
Peter Steinberger 852f947b44 fix: unify control command handling 2026-01-05 01:31:36 +01:00
Jake 946b32c842
fix(whatsapp): suppress typing during heartbeats
- Prevent typing indicator during heartbeat runs
- Add regression tests

Co-authored-by: Jake <mcinteerj@gmail.com>
2026-01-04 23:03:36 +00:00
Peter Steinberger 1657c5e3d2 fix: route system events per session 2026-01-04 22:11:04 +01:00
Peter Steinberger ff46f8ce58 chore: format models CLI 2026-01-04 18:11:41 +01:00
Peter Steinberger 734bb6b4fd feat: add models scan and fallbacks 2026-01-04 17:57:52 +01:00
Peter Steinberger 246adaa119 chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
Shadow bf3d120f8c Slack: add new slack connection 2026-01-04 07:18:20 +01:00
Peter Steinberger c9504a6f20 refactor: split config module 2026-01-04 07:05:17 +01:00
Peter Steinberger ff88f3c075 style: fix lint ordering 2026-01-04 06:27:54 +01:00
Peter Steinberger fe0b3500cc feat: add elevated bash mode 2026-01-04 05:15:59 +00:00
Peter Steinberger 72a9e58777 refactor(auto-reply): split reply flow 2026-01-04 05:47:37 +01:00