# Upgrade Guide — v0.12.33

<!-- bump: patch -->

## What Changed

### WhatsApp Group Support (Phase 1)

Agents can now participate in WhatsApp group conversations. When added to a group, the agent can respond to @mentions or all messages (configurable per group).

**Config:**

```json
{
  "messaging": [{
    "type": "whatsapp",
    "config": {
      "groups": {
        "enabled": true,
        "authorizedGroups": ["120363187170797617@g.us"],
        "defaultActivation": "mention",
        "maxContextMessages": 50,
        "agentName": "Dude"
      }
    }
  }]
}
```

**Features:**
- Group message authorization (`authorizedGroups` allowlist, empty = allow all)
- Activation modes: `mention` (respond only when @mentioned) or `always` (respond to all messages)
- Per-group activation overrides via `groupOverrides`
- Text-based triggers: messages starting with agent name activate the agent in mention mode
- Recent message context buffer (default 50 messages per group) — gives the agent conversation context when activated
- Sender identification from `msg.key.participant` — proper attribution in groups
- @mention detection from Baileys `contextInfo.mentionedJid`

### BaileysBackend: Participant & Mention Forwarding

The `messages.upsert` handler now extracts and forwards:
- `msg.key.participant` — the sender's JID within group messages
- `contextInfo.mentionedJid` — list of @mentioned users

These are passed through the `onMessage` handler to the adapter.

## What to Tell Your User

- **Groups**: "Your agent can now be added to WhatsApp groups. Configure `groups.enabled: true` in your WhatsApp config, add authorized group JIDs, and choose whether the agent responds to @mentions only or all messages."
- **Self-chat still works**: This builds on v0.12.32's self-chat support — private messaging and groups work simultaneously.

## Summary of New Capabilities

| Capability | How to Use |
|-----------|-----------|
| Group messaging | Set `groups.enabled: true` in WhatsApp config |
| Group authorization | List group JIDs in `authorizedGroups` (empty = all) |
| Mention activation | Default mode — agent responds when @mentioned |
| Always-on activation | Set `defaultActivation: "always"` for responsive groups |
| Per-group overrides | Use `groupOverrides: { "jid": { "activation": "always" } }` |
| Agent name trigger | Set `agentName` to activate via text (e.g., "@Dude what's up?") |
| Context buffer | Last N messages per group available as context |
