Commit Graph

13 Commits

Author SHA1 Message Date
maaz519 f255ef91fb feat(worker): seal WhatsApp adapter — normalize inside session, reactions handled internally
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 16:58:22 +05:30
maaz519 c7cec29c83 fix: rename queue from tower:ingest to tower-ingest (BullMQ v5 forbids colons)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 16:23:55 +05:30
maaz519 b32f901005 fix: load .env in worker dev script via dotenv/config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 16:23:02 +05:30
maaz519 31f047492a fix: harden session error handling, normalizer null guard, extract redis-connection
- Wrap groupFetchAllParticipating in try/catch to prevent unhandled rejection on connect
- Catch errors from async onMessage/onGroups callbacks via Promise.resolve().catch
- Return null from normalizer when key.id is missing (prevents empty upsert key collision)
- Extract parseRedisUrl to redis-connection.ts to eliminate duplication

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 16:18:56 +05:30
maaz519 213e496c3a feat: wire worker bootstrap — session → normalizer → queue pipeline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:39:19 +05:30
maaz519 fe7a779ed7 chore: add Prisma client to worker, turbo generate task, update env
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:36:52 +05:30
maaz519 a4771aaf05 feat: add Baileys WhatsApp session with reconnect logic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:33:46 +05:30
maaz519 0d45bd8bd6 feat: add WhatsApp group sync to database
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:19:15 +05:30
maaz519 81da0d483e feat: add BullMQ ingest queue and processor
Idempotent message persistence via prisma.message.upsert. Uses URL parsing
to pass connection options to BullMQ, avoiding ioredis version conflicts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:18:04 +05:30
maaz519 a4135fe983 feat: add BullMQ ingest queue and processor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:15:08 +05:30
maaz519 7151e0dd6d feat: add Baileys message normalizer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:08:10 +05:30
maaz519 4c721f0b19 feat: add tag detector for TOWER message flagging
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:00:37 +05:30
maaz519 f26c50dec0 feat: scaffold worker application shell
Adds apps/worker with TypeScript config, BullMQ/ioredis dependencies,
pino logger bootstrap, and a smoke test. Queue consumers wired in later phases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:36:15 +05:30