How eitaar/dsh-whatsapp-connector works
DSH WhatsApp Connector links WhatsApp Web to a local DeepSeek Harness. The main flow is browser setup and QR provisioning, host RPC, controller-managed WhatsApp runtime/session, inbound message and file handling, Harness session execution, then streamed replies and artifacts delivered back through WhatsApp. The README also documents access policies, bot/session/workspace and Agent Preset controls, model and reasoning commands, approvals, batch input, and file transfer. Unsampled runtime modules are represented at their exact paths; edges are limited to relationships evidenced by the README or source index.
Main entry points: whatsapp-runtime.mjs WhatsApp Runtime · harness-client.mjs Harness Client · production.mjs WhatsApp Production · whatsapp-controller.mjs Bot Controller
Components 29
Settings UI
- Connector Settings
plugin-src/client/channels/whatsapp/index.js - Client Plugin
plugin-src/client/index.js - WhatsApp RPC Client
plugin-src/client/channels/whatsapp/api.js - Workspace Editor
plugin-src/client/workspace-editor.js
Plugin Host
- Host RPC
plugin-src/host/channels/whatsapp/rpc.mjs - Host Plugin
plugin-src/host/index.mjs - WhatsApp Production
plugin-src/host/channels/whatsapp/production.mjs - Connection Supervisor
plugin-src/host/channels/shared/connection-supervisor.mjs
WhatsApp Runtime
- Bot Controller
src/channels/whatsapp/whatsapp-controller.mjs - WhatsApp Runtime
src/channels/whatsapp/whatsapp-runtime.mjs - Web Session
src/channels/whatsapp/whatsapp-web-session.mjs - Bot Configuration
src/channels/whatsapp/config-store.mjs - Session State
src/channels/whatsapp/state-store.mjs - WhatsApp Bridge
src/channels/whatsapp/whatsapp-bridge.mjs
Harness Workflow
- Session Coordinator
plugin-src/host/harness-session-coordinator.mjs - Harness Client
src/channels/shared/harness-client.mjs - WhatsApp Harness Adapter
src/channels/whatsapp/harness-client.mjs
Shared Features
- Workspace Store
src/channels/shared/bot-workspace-store.mjs - Agent Presets
src/channels/shared/agent-preset.mjs - Inbound Files
src/channels/shared/inbound-file.mjs - Artifact Handling
src/channels/shared/semantic/artifact.mjs - Bot Commands
src/channels/shared/model-command.mjs - Interactive Approvals
src/channels/shared/harness-approval.mjs - Host Translations
src/channels/shared/i18n.mjs
Other components
- Operator
- WhatsApp User
- Browser
- WhatsApp Web
- DeepSeek Harness
Connections 35
- Operator → Browser: opens settings
README.md - Browser → Connector Settings: configures bot
README.md - Client Plugin → Connector Settings: registers settings
plugin-src/client/index.js - Connector Settings → WhatsApp RPC Client: calls endpoints
plugin-src/client/channels/whatsapp/index.js - Connector Settings → Workspace Editor: edits workspace
plugin-src/client/channels/whatsapp/index.js - WhatsApp RPC Client → Host RPC: sends RPC
- Host RPC → Bot Controller: manages bots
plugin-src/host/channels/whatsapp/rpc.mjs - Host Plugin → WhatsApp Production: registers runtime
plugin-src/host/index.mjs - WhatsApp Production → Connection Supervisor: uses supervision
plugin-src/host/channels/whatsapp/production.mjs - WhatsApp Production → Bot Controller: constructs controller
plugin-src/host/channels/whatsapp/production.mjs - Bot Controller → Bot Configuration: reads and saves
src/channels/whatsapp/whatsapp-controller.mjs - Bot Controller → WhatsApp Runtime: starts and stops
- WhatsApp Runtime → Web Session: uses session
- WhatsApp Runtime → WhatsApp Bridge: routes messages
- WhatsApp Runtime → Session State: persists state
- Web Session → WhatsApp Web: connects
README.md - WhatsApp User → WhatsApp Web: sends messages
README.md - WhatsApp Web → WhatsApp Runtime: delivers messages
- WhatsApp Runtime → Session Coordinator: coordinates sessions
- Session Coordinator → Harness Client: coordinates actions
plugin-src/host/harness-session-coordinator.mjs - Harness Client → DeepSeek Harness: uses Harness RPC
README.md - Harness Client → Inbound Files: stages files
src/channels/shared/harness-client.mjs - Session Coordinator → Inbound Files: stages ingress
plugin-src/host/harness-session-coordinator.mjs - WhatsApp Runtime → WhatsApp Harness Adapter: uses adapter
- WhatsApp Harness Adapter → Harness Client: extends client
src/channels/whatsapp/harness-client.mjs - Harness Client → WhatsApp Runtime: streams replies
- WhatsApp Runtime → WhatsApp Web: edits progress messages
README.md - Workspace Store → Agent Presets: uses presets
src/channels/shared/bot-workspace-store.mjs - WhatsApp Production → Workspace Store: configures storage
plugin-src/host/channels/whatsapp/production.mjs - WhatsApp Production → Agent Presets: configures presets
plugin-src/host/channels/whatsapp/production.mjs - Harness Client → Artifact Handling: handles artifacts
src/channels/shared/harness-client.mjs - WhatsApp Runtime → Bot Commands: supports commands
README.md - WhatsApp Runtime → Interactive Approvals: supports approvals
README.md - Bot Controller → Host Translations: translates messages
src/channels/whatsapp/whatsapp-controller.mjs - WhatsApp Runtime → WhatsApp Web: applies access policy
README.md