- Use set +e for permission testing, check exit codes explicitly
- Default to HOME/.clawdbot which is always writable
- Use heredoc for config file writing (more reliable)
- Add debug output for user/UID
- Remove duplicate echo statements
- Disable set -e for entire permission testing section
- Re-enable set -e after config is written
- Simpler logic without complex conditionals
- More reliable error handling
- Use for loop to try directories in order
- Temporarily disable set -e for permission tests
- Write config file directly to test writability
- More robust error handling that works with set -e
- Use touch/rm test instead of -w flag for better compatibility
- Clean up unused variables
- Add clearer fallback chain with logging
- Ensure script handles all edge cases gracefully
- Check if CLAWDBOT_STATE_DIR or /data/.clawdbot is writable
- Fall back to $HOME/.clawdbot if permissions fail
- Update CLAWDBOT_STATE_DIR export to match actual directory used
- Prevents Docker failures when running as node user (non-root)
- Test exact IP matching (backward compatibility)
- Test CIDR notation (/8, /12, /16 ranges)
- Test multiple CIDR ranges
- Test mixed exact IPs and CIDR ranges
- Test edge cases and invalid CIDR handling
- Test IPv4-mapped IPv6 address normalization
- Add section on configuring LLM provider API keys (Anthropic, OpenAI, Gemini, etc.)
- Include wrapper reference to render_clawdbot repository
- Update render.yaml blueprint example with API key environment variables
- Add instructions for setting API keys in Render dashboard
- Document alternative config file method
Previously trustedProxies only supported exact IP matching.
Now supports CIDR notation (e.g., 10.0.0.0/8) for matching
IP ranges, which is needed for cloud deployments like Render
where proxy IPs come from private network ranges.
The key difference from the wrapper:
- Wrapper strips proxy headers before forwarding to internal gateway
- Direct deployment needs trustedProxies config to trust Render's proxy IPs
This script:
1. Creates config with gateway.trustedProxies for Render's internal IPs
2. Sets allowInsecureAuth for Control UI access
3. Starts gateway with token auth
- Revert Dockerfile to generic CMD for compatibility with other platforms
- Add dockerCommand to render.yaml to run gateway with proper flags
- Use CLAWDBOT_GATEWAY_PASSWORD env var for password auth
- Remove healthCheckPath (gateway uses WebSocket, not HTTP health)
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>
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().
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>
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>
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
- 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
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.
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