Repository navigation
Conversation
…ite link Adds three WhatsApp agent tools, gated behind a new channels.whatsapp.actions.groups flag (default false, since they can add arbitrary people to chats): - whatsapp_group_create — create a group with a subject + E.164 participants, returns the new group JID - whatsapp_group_add_participants — add E.164 participants to a group JID - whatsapp_group_invite_link — resolve the invite code + chat.whatsapp.com link The tools are registered via the channel's agentTools factory and only appear when the gate is enabled. They operate through the existing active web listener, so they require WhatsApp to be linked and the gateway listener to be running — group ops are added to ActiveWebListener (createGroup / addGroupParticipants / getGroupInviteCode) and implemented in createWebSendApi via the reconnect-aware socket (Baileys groupCreate / groupParticipantsUpdate / groupInviteCode). Phone numbers are normalized to JIDs with the same helper used for outbound sends. Includes unit tests for the listener group methods and the agent-tool wrapper (gate visibility + enforcement, JID/participant validation, not-linked error), the actions.groups config schema + type, regenerated channel config metadata, and docs.
|
Codex review: needs real behavior proof before merge. Reviewed June 29, 2026, 6:35 PM ET / 22:35 UTC. Summary PR surface: Source +265, Tests +272, Docs +25, Generated 0. Total +562 across 14 files. Reproducibility: not applicable. as a feature request, but the review findings are source-reproducible: the PR exposes group-admin tool calls after only the global groups gate and accepts loose participant strings. Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land only after maintainers approve and enforce the WhatsApp group-administration authorization boundary, reject malformed participants, refresh the branch, and collect redacted live proof for all three operations. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature request, but the review findings are source-reproducible: the PR exposes group-admin tool calls after only the global groups gate and accepts loose participant strings. Is this the best way to solve the issue? No, not yet. The WhatsApp plugin boundary and Baileys primitives are plausible, but the best solution still needs explicit authorization policy, stricter participant validation, a clean merge result, and live linked-account proof for all three operations. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 843ad143647e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +265, Tests +272, Docs +25, Generated 0. Total +562 across 14 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
Real linked-WhatsApp validation (group creation)Per the review note asking for real behavior proof: (Linked account number and participant redacted to This exercises the complete path added by the PR:
|
Tag-triggered (whatsapp-v*) workflow that builds the @openclaw/whatsapp fork (group tools) and attaches the installable tarball to a GitHub Release. Fleet installs via 'openclaw plugins install <release-url>'. Interim auto-build point until openclaw#89033 lands.
|
Thanks for putting this together. I hit this exact gap today on a live OpenClaw WhatsApp setup and this PR matches the missing layer. Local notes from my install:
The concrete failure I saw: The OpenClaw wrapper gets to the group-create path, but the listener/send-api socket facade does not expose This PR fixes the right abstraction boundary from what I can see: add group methods to the active listener/send API and put first-class agent tools behind I agree with the review concern that this should stay gated because it lets an agent create groups / add participants through the linked WhatsApp identity. For my local use, I’m applying/testing this as a local OpenClaw patch with an owner-controlled workflow rather than enabling it broadly. The remaining things I’d most want before merge are:
Happy to report back with redacted local proof if useful once I finish testing the patch. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(whatsapp): agent tools for group create / add participants / invite link This is item 1/1 in the current shard. Shard 19/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Closing per ClawSweeper review verdict |
What
Adds three WhatsApp agent tools so an agent can manage groups programmatically, gated behind a new
channels.whatsapp.actions.groupsflag (defaultfalse):whatsapp_group_createwhatsapp_group_add_participantswhatsapp_group_invite_linkhttps://chat.whatsapp.com/...link for a group the bot administers.Why
WhatsApp already supports outbound sends (
openclaw message send) and thereactaction, but there's no first-class way for an agent to create groups or manage membership. Baileys exposesgroupCreate/groupParticipantsUpdate/groupInviteCodeon the socket; this surfaces them as proper agent tools.How
ActiveWebListenergainscreateGroup/addGroupParticipants/getGroupInviteCode, implemented increateWebSendApiover the reconnect-aware socket (same path assendMessage/sendPoll). Phone numbers are normalized to JIDs with the existingtoWhatsappJidhelper.createWhatsAppGroupTools({ cfg })registers the tools via the channel'sagentToolsfactory — they only appear when the gate is enabled, and each re-checks the gate (via livegetRuntimeConfig()) and requires an active linked listener at execute time, so a disabled or unlinked install can't invoke them.actions.groupsdefaults tofalsebecause these actions can add arbitrary people to chats — opt-in, consistent with the existingreactions/pollsgates.Config
Tests / checks
send-api.test.ts) and the agent-tool wrapper (agent-tools-groups.test.ts: gate visibility + enforcement, JID/participant validation, not-linked error).tsgo:core,tsgo:extensions,tsgo:extensions:testclean.bundled-channel-config-metadata(config:channels:gen);check:bundled-channel-config-metadatapasses.docs/channels/whatsapp.md.