Conversation
adding autosync
…command and instead call pkill via spawnSync with argument arrays (['-f', matchPattern]), removing path interpolation in shell strings. Added a dedicated regex-escaping helper plus buildOrphanedProcessMatchPattern(projectRoot) so pkill -f receives a safely escaped pattern derived from the project path (including special characters), while preserving the quiet fallback when pkill execution is unavailable (result.error). Added a focused test for the new pattern-construction helper using a path with spaces, quotes, and regex metacharacters to verify escaping behavior and guard against injection-prone command-string artifacts. Testing ✅ npm test -- setup/service.test.ts ✅ npm run typecheck
Refactored killOrphanedProcesses to stop using an interpolated shell …
adding a fine grained secret to repo
chore: sync fork with upstream main
- Install python3, python3-pip, python3-venv - Pre-install praw for Reddit API access - Enables Python-based CLI tools in agent environment Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Download photos and documents from Telegram messages - Save files to group media folder with proper MIME types - Detect file types using magic bytes (PDF, PNG, JPEG, GIF, WEBP) - Compatible with existing WhatsApp attachment handling - Media available to agents for reading and analysis Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add grammy dependency for Telegram bot support - Add TELEGRAM_BOT_TOKEN and TELEGRAM_ONLY config variables - Initialize TelegramChannel in main orchestrator alongside WhatsApp - Update main group documentation to reference Telegram instead of WhatsApp - Add Telegram JID pattern tests (tg: prefix, group detection) - Add comprehensive Telegram channel test suite Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Import GROUPS_DIR to support group-specific media directories - Refactor MIME type sniffing for better readability (PDF, PNG, JPEG detection) - Improve media download and file writing flow with proper error handling - Store media files in group-specific paths for better organization - Format function signatures for clarity Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Improve line wrapping in Telegram channel media handling - Simplify database migration ALTER TABLE statements - Format group-queue message payload construction for readability - Improve test file formatting with better line breaks Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Improve getClaudeAttachments function signature formatting - Simplify MIME type detection logic with better line breaks - Update package-lock.json for grammy dependency Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c38857c7cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| chat_jid: chatJid, | ||
| sender: ctx.from?.id?.toString() || '', | ||
| sender_name: senderName, | ||
| content: mediaPath ? caption : `${placeholder}${caption}`, |
There was a problem hiding this comment.
Keep Telegram caption triggers at message start
In storeNonText, the stored text is prefixed with placeholders when no media file is attached (content: mediaPath ? caption : ${placeholder}${caption}). For handlers like message:video(which callstoreNonText(..., false)), a caption such as @andy summarize thisbecomes[Video] @andy summarize this, so it no longer matches the anchored trigger (^@...`) used by the message loop. In trigger-required groups, media captions that mention the assistant can be silently ignored.
Useful? React with 👍 / 👎.
| if (!TELEGRAM_ONLY) { | ||
| whatsapp = new WhatsAppChannel(channelOpts); | ||
| channels.push(whatsapp); | ||
| await whatsapp.connect(); | ||
| } |
There was a problem hiding this comment.
Fail fast when TELEGRAM_ONLY leaves no channel
Channel initialization now enables Telegram only when a token is present and enables WhatsApp only when TELEGRAM_ONLY is false, but there is no validation that at least one channel was created. If TELEGRAM_ONLY=true and TELEGRAM_BOT_TOKEN is unset/empty, the service starts with an empty channels array and cannot receive or send messages, which is a silent unusable configuration.
Useful? React with 👍 / 👎.
Type of Change
.claude/skills/Description
For Skills