Skip to content

Cherry-pick 16505718e8: move WhatsApp channel to extensions/#2032

Merged
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/16505718e8-whatsapp-extensions-move
Mar 28, 2026
Merged

Cherry-pick 16505718e8: move WhatsApp channel to extensions/#2032
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/16505718e8-whatsapp-extensions-move

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick from upstream

Upstream commit: 16505718e8
Author: scoootscooob
Tier: AUTO-PICK

refactor: move WhatsApp channel implementation to extensions/ (openclaw#45725)

Closes #2031

Conflict Resolution

38 files conflicted. Resolved in 4 categories:

  1. src/web/ shims (19 files): Took upstream's thin re-export shims — the actual implementations now live in extensions/whatsapp/src/
  2. extensions/whatsapp/src/ (11 files): Merged upstream's correct relative paths with fork's rebranded types (RemoteClawConfig, remoteclaw CLI names, etc.)
  3. src/ infrastructure (7 files): package.json (kept fork's removal of build:docker), discord tests (accepted deletion — already moved to extension), plugin-sdk (kept fork's RemoteClawConfig export, removed ResolvedWhatsAppAccount now in extension), channel plugins (took upstream shims)
  4. TS adaptation (20+ files): Fixed OpenClawConfigRemoteClawConfig across all non-conflicted extension files, adapted heartbeat runner to fork's async resolveHeartbeatPrompt API (no HEARTBEAT_PROMPT fallback), removed onHeartbeatStrip callback (not in fork's dispatcher), added missing WebChannelHealthState type, created test harness shims

Files

127 files changed, 4764 insertions(+), 7977 deletions(-)

🤖 Generated with Claude Code

…aw#45725)

* refactor: move WhatsApp channel from src/web/ to extensions/whatsapp/

Move all WhatsApp implementation code (77 source/test files + 9 channel
plugin files) from src/web/ and src/channels/plugins/*/whatsapp* to
extensions/whatsapp/src/.

- Leave thin re-export shims at all original locations so cross-cutting
  imports continue to resolve
- Update plugin-sdk/whatsapp.ts to only re-export generic framework
  utilities; channel-specific functions imported locally by the extension
- Update vi.mock paths in 15 cross-cutting test files
- Rename outbound.ts -> send.ts to match extension naming conventions
  and avoid false positive in cfg-threading guard test
- Widen tsconfig.plugin-sdk.dts.json rootDir to support shim->extension
  cross-directory references

Part of the core-channels-to-extensions migration (PR 6/10).

* style: format WhatsApp extension files

* fix: correct stale import paths in WhatsApp extension tests

Fix vi.importActual, test mock, and hardcoded source paths that weren't
updated during the file move:
- media.test.ts: vi.importActual path
- onboarding.test.ts: vi.importActual path
- test-helpers.ts: test/mocks/baileys.js path
- monitor-inbox.test-harness.ts: incomplete media/store mock
- login.test.ts: hardcoded source file path
- message-action-runner.media.test.ts: vi.mock/importActual path

(cherry picked from commit 1650571)
@alexey-pelykh alexey-pelykh merged commit 032d9eb into main Mar 28, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/16505718e8-whatsapp-extensions-move branch March 28, 2026 17:59
alexey-pelykh added a commit that referenced this pull request Mar 28, 2026
Moves WhatsApp adapter from src/web/ to extensions/whatsapp/src/,
converting src/web/ files into thin re-export shims.

Completes the structural move that #2032 left incomplete (43 src/web/
files not converted to shims, 63 extensions/whatsapp/src/ files missing).

Cherry-picked-from: openclaw/openclaw@1650571
Co-authored-by: scoootscooob <[email protected]>
alexey-pelykh added a commit that referenced this pull request Mar 28, 2026
Moves WhatsApp adapter from src/web/ to extensions/whatsapp/src/,
converting src/web/ files into thin re-export shims.

Completes the structural move that #2032 left incomplete (43 src/web/
files not converted to shims, 63 extensions/whatsapp/src/ files missing).

Cherry-picked-from: openclaw/openclaw@1650571
Co-authored-by: scoootscooob <[email protected]>
alexey-pelykh added a commit that referenced this pull request Mar 28, 2026
* Cherry-pick 1650571: complete WhatsApp extensions-move

Moves WhatsApp adapter from src/web/ to extensions/whatsapp/src/,
converting src/web/ files into thin re-export shims.

Completes the structural move that #2032 left incomplete (43 src/web/
files not converted to shims, 63 extensions/whatsapp/src/ files missing).

Cherry-picked-from: openclaw/openclaw@1650571
Co-authored-by: scoootscooob <[email protected]>

* fix: resolve typecheck errors from WhatsApp extensions-move rebase

- Restore auto-reply.test-harness.ts exports lost in conflict resolution
- Adapt heartbeat-runner.ts to fork's heartbeat API (no ackMaxChars)
- Remove onHeartbeatStrip from process-message.ts (not in fork's types)
- Restore WebChannelHealthState type in auto-reply/types.ts
- Delete 3 src/web/ test files referencing deleted modules (moved to extensions/)
- Revert subpaths.test.ts changes (upstream API additions not in fork)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

---------

Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
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.

Cherry-pick: extensions-move WhatsApp (155 files)

2 participants