Commit Graph

8316 Commits

Author SHA1 Message Date
Ojus Save
f3334cfc96 fix: skip A2UI scaffold test when bundle not available (avoids 503 assertion in CI) 2026-01-28 12:04:28 -08:00
Ojus Save
f917ab31f8 docs: update Render docs for moltbot blueprint and token flow
- Intro and blueprint example use Moltbot, moltbot-data, dockerCommand
- Deploy link points to ojusave/clawdbot; document CLAWDBOT_GATEWAY_TOKEN
- After deployment: set token, then access Control UI at /clawdbot
- Config file: moltbot.json under CLAWDBOT_STATE_DIR / ~/.clawdbot
- Troubleshooting: CLAWDBOT_GATEWAY_TOKEN, health check note for this blueprint
2026-01-28 10:10:50 -08:00
Ojus Save
173f6d33c0 fix(render): add comprehensive error handling and logging
- Disable set -e during permission testing
- Add explicit error checks with clear messages
- Verify token is set before starting
- Add directory listings if dist/index.js missing
- More verbose logging throughout
- Check return codes explicitly
2026-01-28 10:10:18 -08:00
Ojus Save
aa0621ae38 fix(render): completely rewrite startup script for reliability
- Remove all complex permission testing
- Use HOME/.clawdbot as default (always writable)
- Add explicit checks for node and dist/index.js
- Simplify error handling
- Better logging
2026-01-28 10:10:18 -08:00
Ojus Save
0e1641f87b fix(render): ensure script is executable and improve permission testing
- Add chmod +x for render-start.sh in Dockerfile
- Improve permission testing with touch/rm
- Better error handling
2026-01-28 10:10:18 -08:00
Ojus Save
df160aec5a fix(render): simplify script and fix permission checks
- 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
2026-01-28 10:10:18 -08:00
Ojus Save
3c1e781ab0 fix(render): disable set -e during permission testing
- 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
2026-01-28 10:10:18 -08:00
Ojus Save
c23dd3e3e3 fix(render): simplify permission handling with set +e/-e toggle
- 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
2026-01-28 10:10:18 -08:00
Ojus Save
041e279427 fix(render): improve permission handling and error checking
- 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
2026-01-28 10:10:18 -08:00
Ojus Save
4b37990554 fix(render): handle permission errors when running as non-root user
- 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)
2026-01-28 10:10:18 -08:00
Ojus Save
993bb9a829 test: add comprehensive tests for CIDR support in isTrustedProxyAddress
- 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
2026-01-28 10:10:18 -08:00
Ojus Save
29d6bd6ed3 docs: update Render deployment guide with LLM API key configuration
- 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
2026-01-28 10:10:18 -08:00
Ojus Save
bf39de591c debug: verify config is readable and disable cache 2026-01-28 10:10:12 -08:00
Ojus Save
eec4567f0c fix: explicitly set CLAWDBOT_CONFIG_PATH to ensure config is loaded 2026-01-28 10:10:12 -08:00
Ojus Save
6df64ae4f7 debug: write config to both locations 2026-01-28 10:10:12 -08:00
Ojus Save
744371091b debug: add verbose output to startup script 2026-01-28 10:10:12 -08:00
Ojus Save
6b8680fe84 fix(gateway): add CIDR support to trustedProxies
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.
2026-01-28 10:10:12 -08:00
Ojus Save
e56581caf2 fix(render): use startup script to configure trustedProxies
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
2026-01-28 10:10:12 -08:00
Ojus Save
f9d14cbba5 fix(render): correct command - gateway not gateway run 2026-01-28 10:10:12 -08:00
Ojus Save
6946cde818 fix(render): simplify dockerCommand, use token auth with CLAWDBOT_GATEWAY_TOKEN 2026-01-28 10:10:12 -08:00
Ojus Save
453e40d25f fix(render): pass password from env var to gateway command 2026-01-28 10:10:12 -08:00
Ojus Save
9eaaa2b0d0 fix(render): add startup script to configure trusted proxies and insecure UI auth
- Create render-start.sh that writes config before starting gateway
- Configure gateway.trustedProxies for Render's internal network
- Enable gateway.controlUi.allowInsecureAuth to skip device pairing
2026-01-28 10:10:12 -08:00
Ojus Save
22ceef1b57 fix(render): add --trust-proxy flag for Render load balancer 2026-01-28 10:10:12 -08:00
Ojus Save
4c54fffa05 fix(render): use dockerCommand in render.yaml instead of modifying Dockerfile
- 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)
2026-01-28 10:10:12 -08: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
Shakker
da421b9ef7
Merge pull request #3316 from bguidolim/fix/mime-types-audio-video
fix(media): add missing MIME type mappings for audio/video files
2026-01-28 12:31:47 +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
9688454a30
Accidental inclusion 2026-01-28 01:12:04 -06:00
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
6fc3ca4996
CI: add auto-response labels 2026-01-27 23:17:22 -06:00
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
Shadow
d0ef4d3b85 fix: update Moonshot Kimi model references (#2762) (thanks @MarvinCui) 2026-01-27 21:10:59 -06:00
Boran Cui
b8aa041dcc Update Moonshot Kimi model references to kimi-k2.5 2026-01-27 21:10:59 -06:00
Boran Cui
394308076a Update Moonshot Kimi model references from kimi-k2-0905-preview to the latest kimi-k2.5 2026-01-27 21:10:59 -06:00
Shadow
7bfe6ab2d6 fix: resolve Discord usernames for outbound sends (#2649) (thanks @nonggialiang) 2026-01-27 21:05:37 -06:00
Shadow
cf827f03e8 tests: cover Discord username resolution 2026-01-27 21:05:37 -06:00