Commit Graph

2311 Commits (518dfd4e42f0ca6c6feebebfccd99b3f26662dbb)

Author SHA1 Message Date
Mahmoud Ibrahim 18338bc60f Style: format contact label helper 2026-01-10 01:00:00 +01:00
Mahmoud Ibrahim fd7450e5b9 WhatsApp: include numbers in contact cards 2026-01-10 01:00:00 +01:00
Peter Steinberger e311dc82e0 refactor: centralize reasoning tag handling 2026-01-10 00:53:48 +01:00
Peter Steinberger 097550c299 fix: centralize verbose overrides and tool stream gating 2026-01-10 00:52:24 +01:00
Peter Steinberger 9a8d3aed26 test: update status expectations for verbose/elevated labels 2026-01-09 23:43:24 +00:00
Peter Steinberger e18080163f fix: simplify verbose/elevated status labels 2026-01-09 23:41:57 +00:00
Peter Steinberger bd10f3d3f1 feat: allow session_status in sandbox 2026-01-09 23:41:57 +00:00
Peter Steinberger a25922a21f fix: clarify sessions_send delivery semantics 2026-01-10 00:34:24 +01:00
Peter Steinberger 96e17d407a fix: filter NO_REPLY prefixes 2026-01-09 23:29:05 +00:00
Peter Steinberger a9a70ea278 fix: persist verbose off and gate tool stream 2026-01-10 00:22:28 +01:00
Peter Steinberger 695be8e92d
Merge pull request #624 from clawdbot/refactor/vcard-utils
refactor: extract vcard parsing helper
2026-01-09 23:16:31 +00:00
Peter Steinberger b6b1b570f9 refactor: extract vcard parsing helper 2026-01-10 00:12:53 +01:00
Peter Steinberger 6016a63162 refactor(web): centralize active web listener resolution 2026-01-09 23:12:29 +00:00
Peter Steinberger 6f6acd94cc
Merge pull request #614 from zknicker/fix/block-stream-think-leak
fix: prevent <think> leakage in block streaming
2026-01-09 23:10:17 +00:00
Peter Steinberger 1277f6e27b fix: prefer FN for WhatsApp contact cards (#622) (thanks @mahmoudashraf93) 2026-01-10 00:08:30 +01:00
Mahmoud Ibrahim 30b3d6ce61 WhatsApp: handle contact cards inbound 2026-01-10 00:07:04 +01:00
Peter Steinberger 51ec578cec fix: suppress <think> leakage + split reasoning output (#614) (thanks @zknicker) 2026-01-10 00:02:13 +01:00
Zach Knickerbocker 2d0ca67c21 fix: prevent <think> leakage in block streaming 2026-01-09 23:58:48 +01:00
Peter Steinberger 88cbe2d275 fix: cap pairing requests and suppress outbound pairing replies 2026-01-09 22:58:18 +00:00
Peter Steinberger 98d0318d4e
refactor: cron payload migration cleanup (#621)
* refactor: centralize cron payload migration

* test: stabilize block streaming mocks

* test: adjust chunker fence-close case
2026-01-09 22:56:55 +00:00
Peter Steinberger 89dc6ebb8b feat(signal): add reaction notifications 2026-01-09 23:53:36 +01:00
Peter Steinberger a18743eabc fix(web): improve WhatsApp Web listener errors (#612, thanks @YuriNachos) 2026-01-09 22:40:58 +00:00
Yurii Chukhlib a9f8719cd2 fix(web): remove provider name from gateway listener error messages
Error messages in sendMessageWhatsApp, sendReactionWhatsApp, and
sendPollWhatsApp included hardcoded \"WhatsApp\" references. This caused
confusion when cron jobs using other providers (e.g., Telegram) failed
with errors mentioning WhatsApp.

Changes error messages to be provider-agnostic while maintaining the
same error handling behavior.

Fixes #461
Fixes #470

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 22:40:58 +00:00
Peter Steinberger 5bc3d15bba fix: handle signal reactions safely (#616) (thanks @neist) 2026-01-09 23:39:18 +01:00
Kasper Neist 94e7a98bf2 feat(signal): add reaction message support
- Add SignalReactionMessage type with emoji, targetAuthor, timestamp
- Handle reaction messages in monitor (log and skip for now)
- Prevents reactions from showing as unknown media
2026-01-09 23:37:33 +01:00
Peter Steinberger 3b91148a0a fix: handle fence-close paragraph breaks 2026-01-09 22:20:22 +00:00
Peter Steinberger 22b3bd4415 fix: migrate cron payload channel alias 2026-01-09 22:20:22 +00:00
Peter Steinberger bdee50da6b fix(test): reduce gateway port collisions 2026-01-09 22:18:57 +00:00
Peter Steinberger 2af3853bfa fix(protocol): keep agent provider string 2026-01-09 23:09:10 +01:00
Peter Steinberger 79f5ccc99d fix(gateway): harden agent provider routing 2026-01-09 23:00:36 +01:00
Peter Steinberger 3adec35632 fix: make forced block chunking fence-safe 2026-01-09 21:52:47 +00:00
Peter Steinberger 79af03ba5e fix(auto-reply): tighten block streaming defaults 2026-01-09 22:41:10 +01:00
Peter Steinberger f8bf041396 test(gateway): cover internal provider defaults 2026-01-09 22:40:37 +01:00
Peter Steinberger 40b4341a1d test: fix Windows path in LID mapping test 2026-01-09 21:34:35 +00:00
Peter Steinberger 35083fcb37 fix(gateway): avoid whatsapp fallback for internal runs 2026-01-09 22:33:05 +01:00
Peter Steinberger 53f51786f2 fix: default block streaming coalesce idle to 1s 2026-01-09 22:31:19 +01:00
Peter Steinberger 6c7a27c010 refactor: normalize main session key handling 2026-01-09 22:30:15 +01:00
Peter Steinberger 304ec1abe5 fix(agents): sessions_spawn inherits provider (#528) 2026-01-09 22:21:33 +01:00
Peter Steinberger 55e830b009 fix: harden onboarding for non-systemd environments 2026-01-09 22:17:09 +01:00
Peter Steinberger 402c35b91c refactor(agents): centralize failover normalization 2026-01-09 22:15:06 +01:00
Peter Steinberger 6220106ab2 refactor: centralize main session key resolution 2026-01-09 22:13:20 +01:00
Peter Steinberger c37b77855b
Merge pull request #464 from austinm911/fix/slack-thread-replies
feat(slack): implement configurable reply threading
2026-01-09 21:10:39 +00:00
Peter Steinberger 84046cbad8 fix(slack): mrkdwn + thread edge cases (#464) (thanks @austinm911) 2026-01-09 22:09:02 +01:00
Peter Steinberger c27b1441f7 fix(auth): billing backoff + cooldown UX 2026-01-09 22:00:14 +01:00
Austin Mudd 8890fbcf38 Slack: fix message tool not passing threading context to handleSlackAction 2026-01-09 21:59:51 +01:00
Austin Mudd 8ae0429162 Slack: add mrkdwn formatter for proper bold/italic/strikethrough rendering 2026-01-09 21:59:51 +01:00
Austin Mudd 909c14d443 fix: resolve merge conflicts and fix threading tests
- Update MessageToolOptions type to include Slack threading options
- Remove duplicate threadTs property in slack/actions.ts
- Fix replyThreadTs parameter name in monitor.ts
- Update test to correctly verify 'first' mode threading behavior:
  - 'off' mode: no threading unless already in a thread
  - 'first' mode: first reply starts a thread
- Add new test case for 'first' mode threading
2026-01-09 21:59:51 +01:00
Austin Mudd b4663ed11c Slack: implement replyToMode threading for tool path
- Add shared hasRepliedRef state between auto-reply and tool paths
- Extract buildSlackThreadingContext helper in agent-runner.ts
- Extract resolveThreadTsFromContext helper in slack-actions.ts
- Update docs with clear replyToMode table (off/first/all)
- Add tests for first mode behavior across multiple messages
2026-01-09 21:59:51 +01:00
Austin Mudd 29e6f13b29 Test: add threadTs passthrough test for Slack sendMessage 2026-01-09 21:59:27 +01:00
Austin Mudd 1be8d06cca Slack: expose threadTs in agent sendMessage tool for thread replies 2026-01-09 21:59:27 +01:00
Peter Steinberger 42a0089b3b fix: require explicit system event session keys 2026-01-09 21:59:01 +01:00
Peter Steinberger a5065b354e fix(whatsapp): resolve lid mappings for inbound 2026-01-09 21:46:18 +01:00
Peter Steinberger 5fa26bfec7 feat: add per-agent elevated controls 2026-01-09 20:42:19 +00:00
Peter Steinberger 1a97aadb6b fix: broadcast group history consistency (#547) 2026-01-09 21:39:58 +01:00
Peter Steinberger 7641b142ad refactor: harden broadcast groups 2026-01-09 21:39:58 +01:00
Peter Steinberger 374aa856f2 refactor(agents): centralize failover handling 2026-01-09 21:31:18 +01:00
Peter Steinberger cfeaa34c16 refactor: centralize cli timeout parsing 2026-01-09 21:29:52 +01:00
Peter Steinberger 2bb9716598 fix: write clawdbot config atomically 2026-01-09 21:27:51 +01:00
Peter Steinberger 564caf49bb feat: add config --section 2026-01-09 21:27:51 +01:00
Peter Steinberger 24605379b9 refactor: centralize skills prompt resolution 2026-01-09 21:27:20 +01:00
Peter Steinberger e8dbb350ae fix: honor config timeout in tui 2026-01-09 21:22:50 +01:00
Peter Steinberger 4861f09f78 fix: inject skills prompt list 2026-01-09 21:20:51 +01:00
Peter Steinberger 0297b38ce0 fix(discord): remove unused import 2026-01-09 21:18:26 +01:00
Peter Steinberger 65cb9dc3f7 fix(agents): fail over on billing/credits errors 2026-01-09 21:17:07 +01:00
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
Peter Steinberger 377885bd36 style: format doctor gateway services 2026-01-09 17:53:57 +01:00
Peter Steinberger cf1e0d743c fix: harden slash command registry 2026-01-09 17:53:24 +01:00
Peter Steinberger cae8e8d6e8 refactor: consolidate discord thread context handling 2026-01-09 17:52:47 +01:00
Peter Steinberger 24af8adcf9
Merge pull request #587 from clawdbot/refactor/hook-agent-normalize
Hooks: normalize agent provider handling
2026-01-09 16:52:32 +00:00
Peter Steinberger c3083f0186 feat: add setup-token + token auth 2026-01-09 17:50:34 +01:00
Peter Steinberger 083877d286 fix: audit doctor service entrypoint 2026-01-09 17:50:28 +01:00
Luke 401f2a77e3
Merge branch 'main' into commands-list-clean 2026-01-09 11:46:08 -05:00
Peter Steinberger b1ddf1f048 refactor: share hook provider types 2026-01-09 17:45:42 +01:00
Peter Steinberger 51725a71a3 refactor: normalize hook agent providers 2026-01-09 17:40:36 +01:00
Peter Steinberger f146c9ef16
Merge pull request #585 from clawdbot/shadow/forum
Discord: fix forum thread starters
2026-01-09 16:35:33 +00:00
Peter Steinberger abfd5719d6 fix: cache discord channel lookups for thread starters (#585) (thanks @thewilloftheshadow) 2026-01-09 17:35:16 +01:00
Peter Steinberger 40fcfc9479 test: cover hook deliver default (#533) (thanks @mcinteerj) 2026-01-09 17:34:22 +01:00
Jake cac467a2df Hooks: default agent delivery to true 2026-01-09 17:32:42 +01:00
Shadow 6ef9fc64d7 Discord: fix forum thread starters 2026-01-09 17:32:14 +01:00
Peter Steinberger ee70a1d1fb fix(status): use claude-cli token for usage 2026-01-09 16:24:55 +00:00
Peter Steinberger 1478473537 refactor(commands): canonicalize text command aliases 2026-01-09 17:22:46 +01:00
Peter Steinberger c82ebd3ef3 docs(commands): document /usage slash command 2026-01-09 17:18:01 +01:00
Peter Steinberger 1838582546 refactor(auto-reply): centralize chat command aliases 2026-01-09 17:16:52 +01:00
Peter Steinberger d372fac9c6 refactor: streamline reply tag parsing 2026-01-09 17:14:40 +01:00
Peter Steinberger cef13aa705
Merge pull request #586 from clawdbot/temp/landpr-492
fix(commands): wire /usage alias to /status
2026-01-09 16:14:11 +00:00
Peter Steinberger f4ec53dcb9 refactor(sessions): dedupe sessions.resolve 2026-01-09 17:13:38 +01:00
Peter Steinberger 68ad27e31c fix(commands): wire /usage to status (#492) (thanks @lc0rp) 2026-01-09 17:10:53 +01:00
Luke 4658f937cc
Merge branch 'main' into commands-list-clean 2026-01-09 11:06:06 -05:00
Peter Steinberger 67af3c3291
Merge pull request #560 from mcinteerj/fix/reply-tags-whitespace
Auto-Reply: relax regex for reply tags to allow whitespace
2026-01-09 16:05:17 +00:00
Luke 98b875cd0f
Merge branch 'main' into commands-list-clean 2026-01-09 11:04:23 -05:00
Peter Steinberger 7d9300e0f5 fix: allow whitespace in reply tags (#560) (thanks @mcinteerj) 2026-01-09 17:03:44 +01:00
Peter Steinberger c892fd174e refactor(sessions): add sessions.resolve + label helper (#570) 2026-01-09 17:02:57 +01:00
LK 08caf7b9fc feat(commands): add /usage alias for /status 2026-01-09 17:02:29 +01:00
Jake 4381b03412 Auto-Reply: relax regex for reply tags to allow whitespace 2026-01-09 17:01:58 +01:00
Peter Steinberger d099dabf37 refactor: centralize slack threading helpers 2026-01-09 16:01:53 +00:00
Peter Steinberger d0b06b4334 fix: avoid object stringification in session labels 2026-01-09 16:57:50 +01:00
Peter Steinberger be48233bc4 chore: format 2026-01-09 16:55:51 +01:00
Peter Steinberger fd9e2d3def feat: remove provider config in configure 2026-01-09 16:55:47 +01:00
Peter Steinberger c643ce2a7a feat: add /debug runtime overrides 2026-01-09 16:55:16 +01:00
Peter Steinberger 36bdec0f2c refactor(messages): centralize per-agent prefixes 2026-01-09 16:54:54 +01:00
Peter Steinberger 8341b662af refactor(test): temp home env + normalize status 2026-01-09 16:50:09 +01:00
Peter Steinberger c8b15af979 refactor(test): centralize temp home + polling 2026-01-09 16:49:02 +01:00
Peter Steinberger 7d518e336e feat(sessions): label lookup tightening (#570) (thanks @azade-c) 2026-01-09 16:42:09 +01:00
Peter Steinberger 09b602b4ec style: format trigger test 2026-01-09 16:41:05 +01:00
Peter Steinberger 4ffbd9802a refactor(test): consolidate temp home + vitest setup 2026-01-09 16:41:05 +01:00
Peter Steinberger 1eecce9a15
Merge pull request #578 from p6l-richard/feature/identity-based-message-prefix
fix(messages): derive messagePrefix from identity.name
2026-01-09 15:40:52 +00:00
Peter Steinberger 66bbb723c5 fix: derive prefixes from routed identity (#578) (thanks @p6l-richard) 2026-01-09 16:39:32 +01:00
Peter Steinberger 8de1c449ee
Merge pull request #558 from carlulsoe/mobile-ui-improvements
feat(ui): improve mobile responsiveness [AI-assisted]
2026-01-09 15:39:19 +00:00
Peter Steinberger facf5c09a0 fix: honor slack reply threading (#574, thanks @bolismauro) 2026-01-09 15:38:43 +00:00
Peter Steinberger b3e0fafe50 fix: stabilize windows CI (#558) (thanks @carlulsoe) 2026-01-09 16:37:58 +01:00
Mauro Bolis 96149d1f71 fix: honor slack reply threading 2026-01-09 15:35:54 +00:00
Peter Steinberger 014a4d51a6 feat(status): add claude.ai usage fallback 2026-01-09 15:34:58 +00:00
Peter Steinberger 922ca2ee1c fix(status): surface provider usage errors 2026-01-09 15:34:58 +00:00
Richard Poelderl 43848b7b43 feat(messages): also derive responsePrefix from identity.name
When identity.name is configured and responsePrefix is not explicitly set,
automatically default responsePrefix to [identity.name].

This means users only need to set their identity once:
  { identity: { name: "MyBot" } }

And outbound messages will automatically be prefixed with [MyBot].
2026-01-09 16:31:20 +01:00
Richard Poelderl 8112b276c0 feat(messages): derive messagePrefix from identity.name
When identity.name is configured, use it for the default messagePrefix
instead of hardcoded '[clawdbot]'. Falls back to 'clawdbot' if not set.

This allows users to customize how their bot identifies itself in messages
by setting identity.name in their config or IDENTITY.md.
2026-01-09 16:31:01 +01:00
Peter Steinberger f436808735 refactor: consolidate schema scrub + test harness 2026-01-09 16:27:28 +01:00
Peter Steinberger 7957196924 feat: add TUI bootstrap start 2026-01-09 16:25:29 +01:00
Josh Palmer 25babbfdc4 🤖 codex: fix duplicate agentDir (no-issue) 2026-01-09 16:23:34 +01:00
Peter Steinberger d3ca84e14c feat: add dev workspace templates 2026-01-09 16:13:41 +01:00
Peter Steinberger 07430eb33d
Merge pull request #569 from bjesuiter/ui-build-default-to-relative-path
fix(ui): default to relative paths for control UI assets
2026-01-09 14:47:46 +00:00
Peter Steinberger 9af5b13803 test: make withTempHome cross-platform 2026-01-09 15:47:26 +01:00
Peter Steinberger f5cc6bb283 fix: harden node bridge keepalive 2026-01-09 15:46:45 +01:00
Peter Steinberger 6177c2d575 fix: auto-create dev config for dev profile 2026-01-09 15:45:11 +01:00
Peter Steinberger 616293f8a7
Merge pull request #567 from erikpr1994/fix/gemini-schema-sanitization
fix(agents): remove unsupported JSON Schema keywords for Cloud Code Assist API
2026-01-09 14:44:38 +00:00
Peter Steinberger d77dee50c9
Merge pull request #570 from azade-c/feat/sessions-label
feat(sessions): expose label in sessions.list and support label lookup in sessions_send
2026-01-09 14:44:23 +00:00
Peter Steinberger c4c0f1349a fix: keep build green after main rebase (#570) (thanks @azade-c) 2026-01-09 15:40:36 +01:00
Peter Steinberger 17a7d4e8dd test: stabilize Windows test env (#567) (thanks @erikpr1994) 2026-01-09 15:40:02 +01:00
Peter Steinberger d17141b859 fix(status): show usage for token auth profiles 2026-01-09 14:36:46 +00:00
Peter Steinberger 1afa48fcdf style(models): biome format auth order 2026-01-09 14:36:46 +00:00
Peter Steinberger 407a3c2c10 fix: quiet telegram getUpdates errors 2026-01-09 15:35:39 +01:00
Peter Steinberger 5f4eb8b509 style: format cli files 2026-01-09 15:34:41 +01:00
Peter Steinberger d5b826ffc8 fix: restore openUrl import 2026-01-09 15:32:55 +01:00
Peter Steinberger 59d942c9ec fix: unblock CI on main (#569) (thanks @bjesuiter) 2026-01-09 15:32:55 +01:00
Peter Steinberger 56e77f6843 fix: sessions label lookup and persistence (#570) (thanks @azade-c) 2026-01-09 15:32:49 +01:00
Azade e24e0cf364 test(sessions): add tests for sessions_send label lookup
- Test finding session by label
- Test error when label not found
- Test error when neither sessionKey nor label provided
2026-01-09 15:32:49 +01:00
Azade 3133c7c84e feat(sessions): expose label in sessions.list and support label lookup in sessions_send
- Add `label` field to session entries and expose it in `sessions.list`
- Display label column in the web UI sessions table
- Support `label` parameter in `sessions_send` for lookup by label instead of sessionKey

- `sessions.patch`: Accept and store `label` field
- `sessions.list`: Return `label` in session entries
- `sessions_spawn`: Pass label through to registry and announce flow
- `sessions_send`: Accept optional `label` param, lookup session by label if sessionKey not provided
- `agent` method: Accept `label` and `spawnedBy` params (stored in session entry)

- Add `label` column to sessions table in web UI

- Changed session store writes to merge with existing entry (`{ ...existing, ...new }`)
  to preserve fields like `label` that might be set separately

We attempted to implement label persistence "properly" by passing the label
through the `agent` call and storing it during session initialization. However,
the auto-reply flow has multiple write points that overwrite the session entry,
and making all of them merge-aware proved unreliable.

The working solution patches the label in the `finally` block of
`runSubagentAnnounceFlow`, after all other session writes complete.
This is a workaround but robust - the patch happens at the very end,
just before potential cleanup.

A future refactor could make session writes consistently merge-based,
which would allow the cleaner approach of setting label at spawn time.

```typescript
// Spawn with label
sessions_spawn({ task: "...", label: "my-worker" })

// Later, find by label
sessions_send({ label: "my-worker", message: "continue..." })

// Or use sessions_list to see labels
sessions_list() // includes label field in response
```
2026-01-09 15:32:49 +01:00
Peter Steinberger 80ff2dc77d fix: honor gateway --dev flag 2026-01-09 15:25:51 +01:00
Peter Steinberger c228df8f90 fix: rebase onto main + restore build/lint (#567) (thanks @erikpr1994) 2026-01-09 15:23:41 +01:00
Peter Steinberger 760e9b3df5 fix: avoid Windows runner unicode crash (#567) 2026-01-09 15:19:49 +01:00
Peter Steinberger 63f5fa47de fix: avoid invalid UTF-16 in truncation (#567) 2026-01-09 15:19:49 +01:00
Peter Steinberger fd535a50d3 fix: scrub tool schemas for Cloud Code Assist (#567) (thanks @erikpr1994) 2026-01-09 15:19:49 +01:00
Erik e9217181c1 fix(agents): remove unsupported JSON Schema keywords for Cloud Code Assist API
Cloud Code Assist API requires strict JSON Schema draft 2020-12 compliance
and rejects keywords like patternProperties, additionalProperties, $schema,
$id, $ref, $defs, and definitions.

This extends cleanSchemaForGemini to:
- Remove all unsupported keywords from tool schemas
- Add oneOf literal flattening (matching existing anyOf behavior)
- Add test to verify no unsupported keywords remain in tool schemas
2026-01-09 15:19:48 +01:00
Peter Steinberger 2c5ec94843 test: stabilize sandbox/doctor tests 2026-01-09 15:17:20 +01:00
Peter Steinberger fc7580ab5e fix: remove configure control-ui prompt 2026-01-09 15:17:20 +01:00
Peter Steinberger adb3bc2577 fix: reset dev gateway setup 2026-01-09 15:17:20 +01:00
Peter Steinberger 3e400ff9f2 feat(models): add per-agent auth order overrides 2026-01-09 14:07:45 +00:00
Peter Steinberger 944f15e401 fix(discovery): decode dns-sd escaped UTF-8 2026-01-09 14:56:01 +01:00
Peter Steinberger 02aeff8efc style(gateway): multiline discovery output 2026-01-09 14:43:46 +01:00
Peter Steinberger b5c32a4c79 fix(onboarding): remove redundant model spread fallback 2026-01-09 14:16:37 +01:00
Peter Steinberger 576f8d4681
Merge pull request #572 from ngutman/fix/mac-node-bridge-ping
fix(macos): add node bridge ping loop (AI-assisted)
2026-01-09 13:03:03 +00:00
Peter Steinberger cb86d0d6d4 fix: land mac node bridge ping loop (#572) (thanks @ngutman) 2026-01-09 14:01:20 +01:00
Peter Steinberger f6f178ddee style(telegram): format bot init 2026-01-09 13:57:06 +01:00
Peter Steinberger b3d640b978 fix(onboarding): remove duplicate minimax constants 2026-01-09 13:56:16 +01:00
Peter Steinberger 0fc7a06913 fix(discovery): silence oxlint warning 2026-01-09 13:55:28 +01:00
Peter Steinberger b21e62f072 style: format gateway discovery 2026-01-09 13:55:28 +01:00
Peter Steinberger b0672da396 fix(gateway): fix wide-area discovery update 2026-01-09 13:55:27 +01:00
Peter Steinberger c2d185aab7 fix: normalize routed replies 2026-01-09 13:55:27 +01:00
Peter Steinberger bfadc8f4ee style: format onboard providers 2026-01-09 13:54:53 +01:00
Peter Steinberger 1716c01bdf feat(gateway): improve wide-area discovery 2026-01-09 13:54:53 +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 81beda0772 feat: migrate agent config to multi-agent layout 2026-01-09 12:44:29 +00:00
Peter Steinberger 82b342e77b fix: respect auth cooldown with auth.order 2026-01-09 12:44:29 +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
Tobias Bischoff a0bb2bccaf Onboarding: add MiniMax hosted API key option 2026-01-09 13:39:28 +01:00
Peter Steinberger 17a7dfc966 chore: update dev identity default 2026-01-09 13:34:45 +01:00
Peter Steinberger 22d517a520 fix: clarify WhatsApp owner number prompts 2026-01-09 13:32:52 +01:00
Peter Steinberger 201c879772 fix(sandbox): compare list to config images (#563) - thanks @pasogott 2026-01-09 13:29:47 +01:00
sheeek 7883491ce2 test(sandbox): add unit tests for formatter functions
Add comprehensive tests for sandbox-formatters.ts (20 tests):
- formatStatus: running/stopped with emojis
- formatSimpleStatus: running/stopped without emojis
- formatImageMatch: match/mismatch indicators
- formatAge: seconds, minutes, hours, days with edge cases
- countRunning: count items by running state
- countMismatches: count items by image mismatch

All pure functions now covered. 152 LOC tests added.

Total test count: 39 tests (19 integration + 20 unit)
Test coverage increased from ~66% to ~80%.
2026-01-09 13:23:16 +01:00
sheeek 7f02b62bba style(sandbox): fix linting errors
- Remove unused normalizeOptions function
- Fix line length violations (format long lines)
- Fix import order (alphabetical)
- Format function signatures for readability

All lint checks now passing.
2026-01-09 13:23:16 +01:00
sheeek b0c97d6178 refactor(sandbox-cli): improve structure and reduce duplication
Improvements:
- Extract help text examples into EXAMPLES constant object
- Add createRunner() helper to reduce try-catch boilerplate
- Add normalizeOptions() helper (prepared for future use)
- Fix command names from 'clawd' to 'clawdbot' throughout
- Update main sandbox command to show help by default
- Better organize code with clear section comments

Increases from 82 to 137 LOC but with much better organization
and reduced duplication in error handling.
2026-01-09 13:23:16 +01:00
sheeek 1c757ae35e refactor(sandbox): use extracted display and formatter modules
Update sandbox.ts to import and use functions from:
- sandbox-display.ts for all UI output
- sandbox-formatters.ts for data formatting

Removes 141 LOC of display/formatting code from sandbox.ts,
reducing it from 351 to 210 LOC (-40%).

Core business logic now clearer and more focused.
2026-01-09 13:23:16 +01:00
sheeek 81c55be19b refactor(sandbox): extract display logic into separate module
Move all display functions to sandbox-display.ts:
- displayContainers, displayBrowsers with generic displayItems helper
- displaySummary with image mismatch warnings
- displayRecreatePreview, displayRecreateResult

Uses DisplayConfig pattern to reduce duplication between container
and browser display logic. 156 LOC.
2026-01-09 13:23:16 +01:00
sheeek dd0104290e refactor(sandbox): extract formatters into separate module
Move formatting utilities to sandbox-formatters.ts:
- formatStatus, formatSimpleStatus, formatImageMatch, formatAge
- countRunning, countMismatches helper functions
- ContainerItem type definition

Improves modularity and reusability. 49 LOC.
2026-01-09 13:23:16 +01:00
sheeek c3932c8508 test(sandbox): add comprehensive test suite for CLI commands
Add 19 tests covering sandboxListCommand and sandboxRecreateCommand:
- List command: human/JSON output, browser flag, error handling
- Recreate command: validation, filtering (session/agent), confirmation flow
- Factory functions (createContainer, createBrowser) reduce duplication
- Helper functions (expectLogContains, setupDefaultMocks) improve readability

All tests passing. 365 LOC with ~66% production code coverage.
2026-01-09 13:23:16 +01:00
sheeek 00b77421dd refactor: improve sandbox commands code structure
Improvements:
- Extract validation into separate function
- Split display logic from business logic
- Create reusable container matcher for agent filtering
- Abstract status/image formatting into helpers
- Reduce code duplication between containers and browsers
- Extract container removal into generic function
- Add type safety with FilteredContainers type
- Improve readability with smaller, focused functions

Changes:
- validateRecreateOptions(): Validate mutual exclusivity
- fetchAndFilterContainers(): Fetch + filter in one place
- createAgentMatcher(): Reusable agent filter predicate
- displayContainers/Browsers(): Dedicated display functions
- displaySummary/RecreatePreview/Result(): Clear separation
- removeContainer(): Generic removal with error handling
- Format helpers: formatStatus, formatImageMatch, etc.
- Count helpers: countRunning, countMismatches

Result: 85 more lines but much better maintainability and testability.
2026-01-09 13:23:16 +01:00
sheeek 5e78d5a21f feat: add sandbox CLI commands for container management
Add 'clawd sandbox list' and 'clawd sandbox recreate' commands to manage
sandbox containers. This fixes the issue where containers continue using
old images/configs after updates.

Problem:
- When sandbox Docker images or configs are updated, existing containers
  keep running with old settings
- Containers are only recreated after 24h inactivity (pruning)
- If agents are used regularly, old containers run indefinitely

Solution:
- 'clawd sandbox list': Show all containers with status, age, and image match
- 'clawd sandbox recreate': Force container removal (recreated on next use)
  - Supports --all, --session, --agent, --browser filters
  - Requires confirmation unless --force is used

Implementation:
- Added helper functions to sandbox.ts (list/remove containers)
- Created sandbox-cli.ts following existing CLI patterns
- Created commands/sandbox.ts with list and recreate logic
- Integrated into program.ts

Use case: After updating sandbox images or changing sandbox config,
run 'clawd sandbox recreate --all' to ensure fresh containers.
2026-01-09 13:22:51 +01:00
Peter Steinberger ae6f268987 refactor(msteams): validate send recipient
Co-authored-by: Onur <onutc@users.noreply.github.com>
2026-01-09 11:22:59 +01:00
Peter Steinberger 08cceb6435 fix(config): add gateway remote ssh fields 2026-01-09 11:18:37 +01:00
Peter Steinberger 6b107e9e74 refactor(msteams): consolidate stores and send context 2026-01-09 11:18:33 +01:00
Peter Steinberger 6d223303eb refactor(msteams): extract sdk + storage helpers 2026-01-09 11:07:32 +01:00
Peter Steinberger 8875dbd449 refactor(msteams): split monitor handler and poll store 2026-01-09 11:07:32 +01:00
Peter Steinberger 475d598ecb fix: normalize poll providers and msteams deps 2026-01-09 11:07:32 +01:00
Peter Steinberger e55358c65d feat: finalize msteams polls + outbound parity 2026-01-09 11:07:32 +01:00
Onur a2bba7ef51 fix(msteams): add msteams to pairing provider labels 2026-01-09 11:07:32 +01:00
Onur 7f326ae4ae fix: sync doctor-prompter.ts with main 2026-01-09 11:07:17 +01:00
Onur 13b47e6047 fix(doctor): restore initialValue behavior in non-interactive mode
The repair/force commit added an early return that broke non-interactive
mode - migrations would return false instead of using initialValue.
2026-01-09 11:07:01 +01:00
Onur 0bc50abd73 style: format quickstart note and media-note test 2026-01-09 11:07:00 +01:00
Onur c469fac8ef Tests: speed up media note prompt setup 2026-01-09 11:07:00 +01:00
Onur a542a285a3 Wizard: preserve QuickStart gateway settings 2026-01-09 11:07:00 +01:00
Onur eb908985f7 Gateway: fix reload tests for MS Teams provider 2026-01-09 11:07:00 +01:00
Onur 1df7bfefe7 MSTeams: stop on shutdown and honor chunk limit 2026-01-09 11:07:00 +01:00
Onur 678d704341 image works in DM 2026-01-09 11:07:00 +01:00
Onur e67ca92443 MS Teams: ingest inbound image attachments 2026-01-09 11:06:49 +01:00
Onur 2ab5890eab wip 2026-01-09 11:06:49 +01:00
Onur d6256a388e feat(msteams): wire up proactive messaging in routeReply for queued replies 2026-01-09 11:06:49 +01:00
Onur 04b1eb57eb MS Teams: fix top-level replies (agent reference) 2026-01-09 11:06:39 +01:00
Onur 8d096ef85d Tests: stabilize file watchers 2026-01-09 11:06:39 +01:00
Onur a2bab7d923 MS Teams: refactor provider + replyStyle + reliability 2026-01-09 11:06:38 +01:00
Onur 81f81be816 feat(msteams): add replyStyle config for thread vs top-level replies
- Add replyStyle config at global, team, and channel levels
- "thread" replies to the original message (for Posts layout channels)
- "top-level" posts as a new message (for Threads layout channels)
- Default based on requireMention: false → top-level, true → thread
- DMs always use thread style (direct reply)
2026-01-09 11:06:28 +01:00