Skip to content

t1385.3: WhatsApp bot subagent doc (Baileys)#2779

Merged
alex-solovyev merged 2 commits intomainfrom
chore/t1385.3-whatsapp-agent
Mar 3, 2026
Merged

t1385.3: WhatsApp bot subagent doc (Baileys)#2779
alex-solovyev merged 2 commits intomainfrom
chore/t1385.3-whatsapp-agent

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Comprehensive WhatsApp bot integration doc via Baileys (TypeScript, unofficial WhatsApp Web API)
  • Covers: QR/pairing auth, multi-device, DM/group messaging, media, reactions, polls, status broadcasts, access control, runner dispatch, Matterbridge bridging
  • Includes privacy/security assessment (Signal Protocol E2E encryption vs Meta metadata harvesting)

Changes from review feedback (PR #2761)

Addresses all CodeRabbit and Gemini review findings:

  1. Updated Baileys specs (lines 22-29): Node.js 20+ (runtime guard), unscoped baileys package (formerly @whiskeysockets/baileys), clarified session store as file-based example only
  2. Backoff delay on reconnect (line 180): setTimeout(() => startBot(), 3000) prevents stack overflow from rapid recursive calls
  3. Shell injection fix (lines 757-785): Replaced execSync with string interpolation with execFileSync using argument arrays — eliminates all shell metacharacter injection vectors
  4. Security guidance update (lines 788-799): References execFileSync with argument arrays, prompt-guard-helper.sh scanning, JSON IPC as preferred pattern
  5. Phone number format: Removed + prefix from pairing code example per Baileys JID format spec
  6. All startBot() reconnections: Use setTimeout throughout (no direct recursive calls)

Rebased

Rebased onto current main to resolve conflicts with #2771 (batch chat platform agents). This branch's version is the comprehensive, reviewed version (966 lines vs 740-line batch version).

Closes #2750

marcusquinn and others added 2 commits March 3, 2026 05:07
Create .agents/services/communications/whatsapp.md covering:
- Baileys library (TypeScript, MIT, unofficial WhatsApp Web API)
- QR code linking and pairing code authentication
- Multi-device support and session persistence
- Full messaging features (text, media, reactions, polls, status)
- Group management and JID format reference
- Access control patterns (allowlist, rate limiting, permission levels)
- Privacy/security assessment: Signal Protocol E2E for content but
  extensive Meta metadata harvesting, ToS violation risks, account
  ban mitigation strategies
- aidevops runner dispatch integration with command router pattern
- Matterbridge bridging via whatsmeow (native WhatsApp support)
- Connection management and health monitoring
- Comparison tables vs SimpleX, Matrix, XMTP, WhatsApp Business API

Closes #2750
- Replace execSync with execFileSync + argument array to eliminate shell
  injection vulnerability (critical security fix)
- Add setTimeout backoff delays to all reconnect paths to prevent stack
  overflow on rapid connection failures
- Update package name from @whiskeysockets/baileys to baileys (official
  unscoped package) and Node.js requirement from 18+ to 20+
- Clarify session store as non-production example, not pluggable built-in
- Update security guidance to recommend execFileSync and JSON IPC patterns
- Fix pairing code example to omit + prefix per JID format spec
- Pin matterbridge install to @latest instead of @master for stability
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7e385b9 and 2e26492.

📒 Files selected for processing (1)
  • .agents/services/communications/whatsapp.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/t1385.3-whatsapp-agent

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 113 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Mar 3 05:08:47 UTC 2026: Code review monitoring started
Tue Mar 3 05:08:47 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 113

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 113
  • VULNERABILITIES: 0

Generated on: Tue Mar 3 05:08:50 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2026

@alex-solovyev alex-solovyev merged commit 8223025 into main Mar 3, 2026
18 of 19 checks passed
@alex-solovyev alex-solovyev deleted the chore/t1385.3-whatsapp-agent branch March 3, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t1385.3: WhatsApp bot agent

2 participants