Commit Graph

4491 Commits

Author SHA1 Message Date
Kira
0fd9d3abd1 feat(memory): add explicit paths config for memory search
Add a `paths` option to `memorySearch` config, allowing users to
explicitly specify additional directories or files to include in
memory search.

Follow-up to #2961 as suggested by @gumadeiras — instead of auto-following
symlinks (which has security implications), users can now explicitly
declare additional search paths.

- Add `memorySearch.paths` config option (array of strings)
- Paths can be absolute or relative (resolved from workspace)
- Directories are recursively scanned for `.md` files
- Single `.md` files can also be specified
- Paths from defaults and agent overrides are merged
- Added 4 test cases for listMemoryFiles
2026-01-28 22:00:11 -05:00
Shakker
b717724275 fix: add security hardening for media text attachments (#3700)
* fix: Prevent XML attribute injection by escaping special characters in file name and MIME type attributes.

* fix: text attachment MIME misclassification with security hardening (#3628)

- Fix CSV/TSV inference from content heuristics
- Add UTF-16 detection and BOM handling
- Add XML attribute escaping for file output (security)
- Add MIME override logging for auditability
- Add comprehensive test coverage for edge cases

Thanks @frankekn
2026-01-29 02:39:01 +00:00
Frank Yang
cb18ce7a85 Fix text attachment MIME misclassification (#3628)
* Fix text file attachment detection

* Add file attachment extraction tests
2026-01-29 02:33:03 +00:00
Shakker
67f1402703 fix: tts base url runtime read (#3341) (thanks @hclsys) 2026-01-28 23:30:29 +00:00
Gustavo Madeira Santana
109ac1c549 fix: banner spacing 2026-01-28 11:39:35 -05:00
Akshay
01e0d3a320 fix(cli): initialize plugins before pairing CLI registration (#3272)
The pairing CLI calls listPairingChannels() at registration time,
which requires the plugin registry to be populated. Without this,
plugin-provided channels like Matrix fail with "does not support
pairing" even though they have pairing adapters defined.

This mirrors the existing pattern used by the plugins CLI entry.

Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
2026-01-28 13:26:25 +00:00
Bruno Guidolim
57efd8e083 fix(media): add missing MIME type mappings for audio/video files
Add mappings for audio/x-m4a, audio/mp4, and video/quicktime to ensure
media files sent as documents are saved with proper extensions, enabling
automatic transcription/analysis tools to work correctly.

- audio/x-m4a → .m4a
- audio/mp4 → .m4a
- video/quicktime → .mov

Also adds comprehensive test coverage for extensionForMime().
2026-01-28 13:17:50 +01:00
Roopak Nijhara
d93f8ffc13 fix: use fileURLToPath for Windows compatibility 2026-01-28 16:42:39 +05:30
Roopak Nijhara
bffcef981d style: run pnpm format 2026-01-28 16:42:39 +05:30
Roopak Nijhara
39b7f9d581 feat(hooks): make session-memory message count configurable (#2681)
Adds `messages` config option to session-memory hook (default: 15).
Fixes filter order bug - now filters user/assistant messages first,
then slices to get exactly N messages. Previously sliced first which
could result in fewer messages when non-message entries were present.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:42:39 +05:30
Shadow
6044bf3637 Discord: fix resolveDiscordTarget parse options 2026-01-28 00:37:21 -06:00
Ayaan Zaidi
b6a3a91edf fix: wire per-account dm scope guidance (#3095) (thanks @jarvis-sam) 2026-01-28 11:42:33 +05:30
Jarvis Deploy
d499b14842 feat(routing): add per-account-channel-peer session scope
Adds a new dmScope option that includes accountId in session keys,
enabling isolated sessions per channel account for multi-bot setups.

- Add 'per-account-channel-peer' to DmScope type
- Update session key generation to include accountId
- Pass accountId through routing chain
- Add tests for new routing behavior (13/13 passing)

Closes #3094

Co-authored-by: Sebastian Almeida <89653954+SebastianAlmeida@users.noreply.github.com>
2026-01-28 11:42:33 +05:30
Ayaan Zaidi
93c2d65398 fix: restore discord username lookup and align minimax test (#3131) (thanks @bonald) 2026-01-28 11:04:07 +05:30
Jarvis
f897f17c6e test: update MiniMax API URL expectation to match #3064
The MiniMax provider config was updated to use api.minimax.chat
instead of api.minimax.io in PR #3064, but the test expectation
was not updated.

🤖 Generated with Claude Code
2026-01-28 11:04:07 +05:30
Jarvis
cd72b80011 fix(discord): add missing type exports and fix unused imports
- Re-export DirectoryConfigParams and ChannelDirectoryEntry from channels/targets
- Remove unused ChannelDirectoryEntry and resolveDiscordAccount imports
- Fix parseDiscordTarget calls to not pass incompatible options type
- Fix unused catch parameter

Fixes CI build failures on main.

🤖 Generated with Claude Code
2026-01-28 11:04:07 +05:30
Shadow
61ab348dd3 Discord: fix target type imports 2026-01-27 22:56:12 -06:00
Shadow
b01612c262 Discord: gate username lookups 2026-01-27 22:48:18 -06:00
Ayaan Zaidi
14e4b88bf0 fix: keep telegram dm thread sessions (#2731) (thanks @dylanneve1) 2026-01-28 09:32:20 +05:30
Dylan Neve
915497114e fix(telegram): ignore message_thread_id for non-forum group sessions
Regular Telegram groups (without Topics/Forums enabled) can send
message_thread_id when users reply to messages. This was incorrectly
being used to create separate session keys like '-123:topic:42',
causing each reply chain to get its own conversation context.

Now resolveTelegramForumThreadId only returns a thread ID when the
chat is actually a forum (is_forum=true). For regular groups, the
thread ID is ignored, ensuring all messages share the same session.

DMs continue to use messageThreadId for thread sessions as before.
2026-01-28 09:32:20 +05:30
Gustavo Madeira Santana
8f452dbc08 Update wizard header with new ASCII art 2026-01-27 22:30:38 -05:00
Gustavo Madeira Santana
c5effb78f3 Modify CLI banner ASCII art
Updated the ASCII art for the CLI banner.
2026-01-27 22:29:09 -05:00
Boran Cui
b8aa041dcc Update Moonshot Kimi model references to kimi-k2.5 2026-01-27 21:10:59 -06:00
Shadow
cf827f03e8 tests: cover Discord username resolution 2026-01-27 21:05:37 -06:00
nonggia.liang
7958ead91a fix: resolve Discord usernames to user IDs for outbound messages
When sending Discord messages via cron jobs or the message tool,
usernames like "john.doe" were incorrectly treated as channel names,
causing silent delivery failures.

This fix adds a resolveDiscordTarget() function that:
- Queries Discord directory to resolve usernames to user IDs
- Falls back to standard parsing for known formats
- Enables sending DMs by username without requiring explicit user:ID format

Changes:
- Added resolveDiscordTarget() in targets.ts with directory lookup
- Added parseAndResolveRecipient() in send.shared.ts
- Updated all outbound send functions to use username resolution

Fixes #2627
2026-01-27 21:05:37 -06:00
ryan
558b64f5fa fix: handle Telegram network errors gracefully to prevent gateway crashes
- Expand recoverable error codes (ECONNABORTED, ERR_NETWORK)
- Add message patterns for 'typeerror: fetch failed' and 'undici' errors
- Add isNetworkRelatedError() helper for broad network failure detection
- Retry on all network-related errors instead of crashing gateway
- Remove unnecessary 'void' from fire-and-forget patterns
- Add tests for new error patterns

Fixes #3005
2026-01-27 19:56:24 -06:00
hlbbbbbbb
2496056886 fix(minimax): use correct API endpoint and format
MiniMax has updated their API. The previous configuration used an
incorrect endpoint (api.minimax.io/anthropic) with anthropic-messages
format, which no longer works.

Changes:
- Update MINIMAX_API_BASE_URL to https://api.minimax.chat/v1
- Change API format from anthropic-messages to openai-completions
- Remove minimax from isAnthropicApi check in transcript-policy

This fixes the issue where MiniMax API calls return no results.
2026-01-27 19:48:38 -06:00
Shadow
34653e4baf fix: guard channel tool listActions (#2859) (thanks @mbelinky) 2026-01-27 19:25:50 -06:00
Mariano Belinky
4287c21e77 fix: guard channel-tools listActions against plugin crashes
Wraps plugin.actions.listActions() in a try/catch so a single
broken channel plugin cannot crash the entire agent boot sequence.

Errors are logged once per plugin+message (deduped) via
defaultRuntime.error() and the call gracefully returns an empty
array instead of propagating the exception.

Fixes: 'Cannot read properties of undefined (reading listActions)'
after the clawdbot→moltbot rename left some plugin state undefined.
2026-01-27 19:25:50 -06:00
Peter Steinberger
72a3046541 test: honor windows homedir env for legacy config 2026-01-28 01:09:44 +00:00
Peter Steinberger
f6d0d4dbc2 fix: honor state dir override in config resolution 2026-01-28 01:08:30 +00:00
Peter Steinberger
afd57c7e23 style: format unhandled rejection handler 2026-01-28 00:37:03 +00:00
Peter Steinberger
4aa2f24af3 test: handle legacy cron swift path 2026-01-28 00:31:58 +00:00
Peter Steinberger
8d07955f2c chore: bump beta version to 2026.1.27-beta.1 2026-01-28 01:28:16 +01:00
Peter Steinberger
e2c437e81e fix: migrate legacy state/config paths 2026-01-28 00:16:00 +00:00
Shadow
0770194b29 test: align unhandled rejection logs (#2980) (thanks @elliotsecops) 2026-01-27 18:11:04 -06:00
Shadow
3a25a4fa99 fix: keep unhandled rejections safe 2026-01-27 18:11:04 -06:00
elliotsecops
3b879fe524 fix(infra): prevent gateway crashes on transient network errors 2026-01-27 18:11:04 -06:00
Shadow
0b1c8db0ca fix: handle image size errors safely (#2871) (thanks @Suksham-sharma) 2026-01-27 16:02:19 -06:00
Shadow
20c0d1f2c5 fix: avoid global image size regression 2026-01-27 16:02:19 -06:00
{Suksham-sharma}
b59ea0e3f3 fix: prevent infinite retry loop for images exceeding 5MB
- Change MAX_IMAGE_BYTES from 6MB to 5MB to match Anthropic API limit
- Add isImageSizeError() to detect image size errors from API
- Handle image size errors with user-friendly message instead of retry
- Prevent failover for image size errors (not retriable)

Fixes #2271
2026-01-27 16:02:19 -06:00
Pooya Parsa
4a1b6bc008 update refs 2026-01-27 13:50:46 -08:00
Gustavo Madeira Santana
4768b59c27 fix: local updates for PR #2740
Co-authored-by: lploc94 <lploc94@users.noreply.github.com>
2026-01-27 16:47:32 -05:00
lploc94
4656dcef05 test(models): add tests for baseUrl and api inheritance
Add test cases to verify:
- baseUrl is inherited from provider when model does not specify it
- api is inherited from provider when model does not specify it
- model-level api takes precedence over provider-level api
- both baseUrl and api can be inherited together

Co-Authored-By: Claude (claude-opus-4.5) <noreply@anthropic.com>
2026-01-27 16:47:32 -05:00
lploc94
6bf2f0eee6 fix(models): inherit baseUrl and api from provider config
When using custom providers with inline model definitions, the baseUrl
and api properties from the provider config were not being passed to
the individual models. This caused requests to be sent to the wrong
endpoint or with the wrong API format.

Changes:
- buildInlineProviderModels now copies baseUrl from provider to models
- buildInlineProviderModels now inherits api from provider if not set on model
- resolveModel fallback path now includes baseUrl from provider config

Co-Authored-By: Claude (claude-opus-4.5) <noreply@anthropic.com>
2026-01-27 16:47:32 -05:00
Gustavo Madeira Santana
c568142af9 chore: stop tracking a2ui bundle hash 2026-01-27 16:07:33 -05:00
A. Duk
284b54af42 feat: Add support for Telegram quote (partial message replies) (#2900)
* feat: Add support for Telegram quote (partial message replies)

- Enhanced describeReplyTarget() to detect and extract quoted text from msg.quote
- Updated reply formatting to distinguish between full message replies and quotes
- Added isQuote flag to replyTarget object for proper identification
- Quote replies show as [Quoting user] "quoted text" [/Quoting]
- Regular replies unchanged: [Replying to user] full message [/Replying]

Resolves need for partial message reply support in Telegram Bot API.
Backward compatible with existing reply functionality.

* updating references

* Mac: finish Moltbot rename

* Mac: finish Moltbot rename (paths)

* fix(macOS): rename Clawdbot directories to Moltbot for naming consistency

Directory renames:
- apps/macos/Sources/Clawdbot → Moltbot
- apps/macos/Sources/ClawdbotDiscovery → MoltbotDiscovery
- apps/macos/Sources/ClawdbotIPC → MoltbotIPC
- apps/macos/Sources/ClawdbotMacCLI → MoltbotMacCLI
- apps/macos/Sources/ClawdbotProtocol → MoltbotProtocol
- apps/macos/Tests/ClawdbotIPCTests → MoltbotIPCTests
- apps/shared/ClawdbotKit → MoltbotKit
- apps/shared/MoltbotKit/Sources/Clawdbot* → Moltbot*
- apps/shared/MoltbotKit/Tests/ClawdbotKitTests → MoltbotKitTests

Resource renames:
- Clawdbot.icns → Moltbot.icns

Code fixes:
- Update Package.swift paths to reference Moltbot* directories
- Fix clawdbot* → moltbot* symbol references in Swift code:
  - clawdbotManagedPaths → moltbotManagedPaths
  - clawdbotExecutable → moltbotExecutable
  - clawdbotCommand → moltbotCommand
  - clawdbotNodeCommand → moltbotNodeCommand
  - clawdbotOAuthDirEnv → moltbotOAuthDirEnv
  - clawdbotSelectSettingsTab → moltbotSelectSettingsTab

* fix: update remaining ClawdbotKit path references to MoltbotKit

- scripts/bundle-a2ui.sh: A2UI_APP_DIR path
- package.json: format:swift and protocol:check paths
- scripts/protocol-gen-swift.ts: output paths
- .github/dependabot.yml: directory path and comment
- .gitignore: build cache paths
- .swiftformat: exclusion paths
- .swiftlint.yml: exclusion path
- apps/android/app/build.gradle.kts: assets.srcDir path
- apps/ios/project.yml: package path
- apps/ios/README.md: documentation reference
- docs/concepts/typebox.md: documentation reference
- apps/shared/MoltbotKit/Package.swift: fix argument order

* chore: update Package.resolved after dependency resolution

* fix: add MACOS_APP_SOURCES_DIR constant and update test to use new path

The cron-protocol-conformance test was using LEGACY_MACOS_APP_SOURCES_DIR
which points to the old Clawdbot path. Added a new MACOS_APP_SOURCES_DIR
constant for the current Moltbot path and updated the test to use it.

* fix: finish Moltbot macOS rename (#2844) (thanks @fal3)

* Extensions: use workspace moltbot in memory-core

* fix(security): recognize Venice-style claude-opus-45 as top-tier model

The security audit was incorrectly flagging venice/claude-opus-45 as
'Below Claude 4.5' because the regex expected -4-5 (with dash) but
Venice uses -45 (without dash between 4 and 5).

Updated isClaude45OrHigher() regex to match both formats.
Added test case to prevent regression.

* Branding: update bot.molt bundle IDs + launchd labels

* Branding: remove legacy android packages

* fix: wire telegram quote support (#2900)

Co-authored-by: aduk059 <aduk059@users.noreply.github.com>

* fix: support Telegram quote replies (#2900) (thanks @aduk059)

---------

Co-authored-by: Gustavo Madeira Santana <gumadeiras@users.noreply.github.com>
Co-authored-by: Shadow <shadow@clawd.bot>
Co-authored-by: Alex Fallah <alexfallah7@gmail.com>
Co-authored-by: Josh Palmer <joshp123@users.noreply.github.com>
Co-authored-by: jonisjongithub <jonisjongithub@users.noreply.github.com>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
Co-authored-by: aduk059 <aduk059@users.noreply.github.com>
2026-01-27 15:59:24 -05:00
Shadow
f7a0b0934d Branding: update bot.molt bundle IDs + launchd labels 2026-01-27 14:46:50 -06:00
Vignesh
1d37815443 fix(models): recognize Venice-style claude-opus-45 as claude-opus-4-5 thanks @jonisjongithub 2026-01-27 12:40:06 -08:00
jonisjongithub
60873a1ed1 fix(security): recognize Venice-style claude-opus-45 as top-tier model
The security audit was incorrectly flagging venice/claude-opus-45 as
'Below Claude 4.5' because the regex expected -4-5 (with dash) but
Venice uses -45 (without dash between 4 and 5).

Updated isClaude45OrHigher() regex to match both formats.
Added test case to prevent regression.
2026-01-27 12:20:40 -08:00