Commit Graph

2047 Commits

Author SHA1 Message Date
Peter Steinberger
e0089bb4eb Merge pull request #547 from pasogott/feature/broadcast-groups
feat: add broadcast groups for multi-agent responses
2026-01-09 20:15:42 +00:00
Peter Steinberger
76964162c7 fix: land broadcast groups (#547) (thanks @pasogott) 2026-01-09 21:14:19 +01:00
Nicholas Spisak
d1b0a3584f fix(discord): add zombie connection detection with HELLO timeout
Add 30-second timeout after WebSocket opens to detect when Discord
never sends HELLO (zombie state). If isConnected stays false after
timeout, forces a fresh connection instead of hanging indefinitely.

Relates to #595
2026-01-09 14:12:38 -06:00
Nicholas Spisak
90be8c632a fix(discord): log gateway debug events for disconnect visibility
Add listener for Carbon GatewayPlugin 'debug' events to capture WebSocket
connection state changes. Critical events (close, reconnect, resume) are
logged at INFO level always; all debug messages logged in verbose mode.

Fixes #595
2026-01-09 14:12:38 -06:00
Peter Steinberger
4121f9e6dc feat(agents): add session_status tool 2026-01-09 21:09:42 +01:00
Peter Steinberger
d309d4fe8b fix(discord): log gateway reconnects 2026-01-09 21:06:19 +01:00
Peter Steinberger
e73b812236 fix: dedupe telegram updates 2026-01-09 21:06:06 +01:00
sheeek
09769d127f feat: add broadcast groups for multi-agent responses
Enables multiple agents to process the same message simultaneously,
allowing teams of specialized agents with atomic tasks to work together
in the same group using one phone number.

Key features:
- Configure multiple agents per WhatsApp group/DM via routing.broadcast
- Parallel (default) or sequential processing strategies
- Full session isolation (separate history, workspace, tools per agent)
- Minimal code changes (~50 lines in auto-reply.ts)
- Backward compatible with existing routing

Use cases:
- Specialized agent teams (code reviewer + security scanner + docs)
- Multi-language support (EN + DE + ES agents)
- Quality assurance workflows (support + QA agents)
- Task automation (tracker + logger + reporter)

Example config:
{
  "routing": {
    "broadcast": {
      "strategy": "parallel",
      "120363403215116621@g.us": ["alfred", "baerbel", "assistant3"]
    }
  }
}

This enables scaling to hundreds of focused micro-agents on a single
phone number, each handling specific atomic tasks.
2026-01-09 21:05:58 +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
fb989cd0f8 Merge pull request #600 from samratjha96/fix/discord-duplicate-messages
fix(queue): deduplicate followup queue entries
2026-01-09 19:45:10 +00:00
Peter Steinberger
d3a0114b6b fix: dedupe followup queue by message id (#600) (thanks @samratjha96) 2026-01-09 20:44:11 +01:00
Peter Steinberger
a65455e25d fix: align WhatsApp activity account id (#537) (thanks @Nachx639) 2026-01-09 20:42:35 +01:00
Samrat Jha
9185fdc896 fix(queue): deduplicate followup queue entries to prevent duplicate responses
## Problem

When messages arrived while the agent was busy processing a previous message,
the same message could be enqueued multiple times into the followup queue.
This happened because Discord's event system can emit the same message multiple
times (e.g., during reconnects or due to slow listener processing), and the
followup queue had no deduplication logic.

This caused the bot to respond to the same user message 2-4+ times.

## Solution

Add simple exact-match deduplication in `enqueueFollowupRun()`: if a prompt
is already in the queue, skip adding it again. Extracted into a small
`isPromptAlreadyQueued()` helper for clarity.

## Testing

- Added test cases for deduplication (same prompt rejected, different accepted)
- Manually verified on Discord: single response per message even when multiple
  events fire during slow agent processing
2026-01-09 20:40:18 +01:00
Tu Nombre Real
a05c4fca5c fix(web): pass accountId in WhatsApp provider activity tracking
Recent changes added recordProviderActivity calls with accountId, but
the type definition and usage didn't include accountId in ActiveWebSendOptions.
This fix adds the optional accountId field and uses optional chaining
when accessing it to handle cases where options is undefined.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:40:03 +01:00
Peter Steinberger
2977b296e6 feat(messages): add whatsapp messagePrefix and responsePrefix auto 2026-01-09 19:29:04 +00:00
Peter Steinberger
0a4cb0d264 Merge pull request #604 from clawdbot/fix/model-fallback-error-message
Fix model fallback error message handling
2026-01-09 19:24:22 +00:00
Peter Steinberger
6481806751 fix: avoid base-to-string in model fallback 2026-01-09 20:23:00 +01:00
Peter Steinberger
71a08eed84 Merge pull request #599 from mcinteerj/fix/gemini-tool-schemas
fix: simplify tool schemas for Gemini compatibility
2026-01-09 19:19:01 +00:00
Peter Steinberger
72b0777341 fix(messages): restore explicit responsePrefix default 2026-01-09 19:18:34 +00:00
Peter Steinberger
0edacd0469 fix: simplify session tool schemas for Gemini compatibility (#599) (thanks @mcinteerj) 2026-01-09 20:17:46 +01:00
Peter Steinberger
237480ed9b Merge pull request #602 from clawdbot/refactor/model-override-warnings
refactor: centralize model override validation
2026-01-09 19:15:51 +00:00
Peter Steinberger
837cec64af refactor: centralize test path containment checks 2026-01-09 19:15:44 +00:00
Keith the Silly Goose
423eef4624 fix: simplify tool schemas for Gemini compatibility
Replaces Type.Integer with Type.Number and simplifies the sessions_send tool schema to avoid anyOf/oneOf unions that cause 400 errors with Google Cloud Code Assist API.
2026-01-09 20:15:26 +01:00
Peter Steinberger
7e81980747 refactor: centralize model override validation 2026-01-09 20:14:42 +01:00
Peter Steinberger
ade06cb9fb Merge pull request #472 from koala73/main
feat: add hooks.gmail.model for cheaper Gmail PubSub processing
2026-01-09 19:00:53 +00:00
Peter Steinberger
5755d85ad1 fix: harden Gmail hook model defaults (#472) (thanks @koala73) 2026-01-09 19:59:45 +01:00
Magi Metal
50a5b4ddcc Discord: fix DM recipient parsing for bare numeric user IDs (#596)
Co-authored-by: Shadow <shadow@clawd.bot>
2026-01-09 12:58:25 -06:00
Peter Steinberger
47a8b410ee Merge pull request #475 from rahthakor/feature/ui-enhancements
feat(ui): refactor chat layout with sidebar, message grouping, and nav improvements
2026-01-09 18:54:44 +00:00
Peter Steinberger
067c20608c fix(ui): landing cleanup (#475) (thanks @rahthakor) 2026-01-09 19:53:32 +01:00
Peter Steinberger
87f432880a fix: honor whatsapp mediaMaxMb (#505) (thanks @koala73) 2026-01-09 19:51:35 +01:00
rahthakor
9624d70187 test(ui): add tests for chat modules and update for icon refactor
- Add 21 tests for message-normalizer.ts (normalizeMessage, normalizeRoleForGrouping, isToolResultMessage)
- Add 17 tests for tool-helpers.ts (formatToolOutputForSidebar, getTruncatedPreview)
- Update navigation.test.ts to test iconClassForTab instead of deprecated iconForTab
- Skip focus-mode.browser.test.ts (toggle button moved to settings)
- Skip chat-markdown.browser.test.ts (tool card rendering refactored to sidebar)
- Skip bash-tools.test.ts line offset tests (shell env pollution issue)
2026-01-09 19:47:19 +01:00
Elie Habib
3026367c1b feat(whatsapp): add configurable media max size
- Add whatsapp.mediaMaxMb config option (default: 50MB)
- Increases default from previous 5MB hardcoded limit
- Allows receiving larger documents/media files
- Per-account override via whatsapp.accounts.*.mediaMaxMb

Fixes #<issue-number> (if applicable)
2026-01-09 19:40:21 +01:00
Elie Habib
f85807a2a6 fix: add serveBaseUrl to compactEmbeddedPiSession params 2026-01-09 19:39:42 +01:00
Elie Habib
1a47aec6e4 feat(gateway): add serve feature for sharing files via public URLs 2026-01-09 19:39:42 +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
3eef200145 Merge pull request #535 from mdahmann/fix/imessage-groupish-threads
imessage: isolate group-ish threads by chat_id
2026-01-09 17:42:42 +00:00
Peter Steinberger
d6d84ce349 test: harden logout path check on windows 2026-01-09 18:39:38 +01:00
Peter Steinberger
42ead1499f refactor: centralize minimax onboarding + keys 2026-01-09 18:37:06 +01:00
Peter Steinberger
d0a20cadaf Merge branch 'main' into fix/imessage-groupish-threads 2026-01-09 17:36:15 +00:00
Peter Steinberger
dac3b675cc fix: stabilize CI path assumptions 2026-01-09 18:35:52 +01:00
Peter Steinberger
6aac3184c3 test: normalize windows path assertions 2026-01-09 18:32:45 +01:00
Peter Steinberger
e6a7429ac7 refactor: add helper for empty assistant content 2026-01-09 18:29:27 +01:00
Peter Steinberger
79b3abd797 refactor: drop empty error messages in history 2026-01-09 18:23:26 +01:00
Peter Steinberger
a6a469435a fix: finalize minimax-api onboarding (#590) (thanks @mneves75) 2026-01-09 18:17:13 +01:00
Peter Steinberger
805969b598 Merge branch 'main' into fix/imessage-groupish-threads 2026-01-09 17:16:44 +00:00
mneves75
9279795c47 feat: Add MiniMax Anthropic-compatible API support (minimax-api)
Add --auth-choice minimax-api for direct MiniMax API usage at
https://api.minimax.io/anthropic using the anthropic-messages API.

Changes:
- Add applyMinimaxApiConfig() function with provider/model config
- Add minimax-api to AuthChoice type and CLI options
- Add handler and non-interactive support
- Fix duplicate minimax entry in envMap
- Update live test to use anthropic-messages API
- Add 11 unit tests covering all edge cases
- Document configuration in gateway docs

Test results:
- 11/11 unit tests pass
- 1/1 live API test passes (verified with real API key)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 18:13:18 +01:00
NickSpisak_
cfcff68e91 feat(discord): add channel/category management actions (#487)
Co-authored-by: Shadow <shadow@clawd.bot>
2026-01-09 11:05:58 -06:00
Peter Steinberger
e74656fa71 Merge pull request #589 from clawdbot/chore/commands-registry-guards
fix: harden slash command registry
2026-01-09 16:56:01 +00:00
Peter Steinberger
d64ed620d5 Merge pull request #588 from clawdbot/refactor/discord-thread-context
refactor: consolidate discord thread context handling
2026-01-09 16:54:14 +00:00