← Back to PRs

#21015: # feat(xmpp): Complete XMPP Channel Implementation

by toughworm open 2026-02-19 15:07 View on GitHub →
size: XL
# feat(xmpp): Complete XMPP Channel Implementation ## Summary This PR introduces a fully functional XMPP channel plugin for OpenClaw, built from scratch to support seamless integration with the main agent. It includes implementation of key XMPP extensions for a modern messaging experience. ## Key Features - **Core Messaging**: Bidirectional message routing between XMPP clients and the OpenClaw agent. - **XEP-0184 (Message Delivery Receipts)**: Automatically requests and acknowledges message delivery to ensure reliability. - **XEP-0085 (Chat State Notifications)**: Sends "composing" states when the agent is processing a response, providing real-time feedback to users. - **XEP-0363 (HTTP File Upload)**: - Enables file sharing by uploading local files to the XMPP server's HTTP upload service. - Implements slot request, file upload (PUT), and URL sharing. - Includes robust error handling and fallback to Out-of-Band Data (XEP-0066) for file URLs. - Validates file sizes against server-provided limits. - **XEP-0066 (Out of Band Data)**: Parses inbound OOB data to handle file attachments from XMPP clients correctly. ## Technical Details - **Dependency Management**: - Locked `ws` dependency to `^7.5.9` for compatibility and security updates. - Removed duplicate `@xmpp/client` dependency to prevent conflicts. - **Configuration**: - Renamed `clawdbot.plugin.json` to `openclaw.plugin.json` in `smart-model-router` to strictly follow project naming conventions. - Updated internal state directory from `.clawdbot` to `.openclaw` for consistency. ## Verification - **Manual Testing**: Verified messaging flow, receipt checks, chat state indicators, and file upload/download functionality with a standard XMPP client (e.g., Gajim/Conversations). - **CI Checks**: - `pnpm format` & `pnpm lint` passed. - `pnpm check:docs` passed. - `pnpm check` passed locally. <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR adds two new plugin extensions: a complete XMPP channel implementation and a smart model router. However, there are critical blocking issues that prevent the code from functioning. **Critical Issues:** - **XMPP extension is incomplete**: Missing required files `runtime.ts`, `types.ts`, and `index.ts` that are imported throughout the codebase. The extension will fail to load and all imports will break at runtime. - **smart-model-router has incorrect branding**: Uses "moltbot"/"Moltbot" naming throughout instead of "openclaw"/"OpenClaw", violating project naming conventions (AGENTS.md:80). - **Path inconsistency**: smart-model-router documentation claims `.clawdbot` to `.openclaw` migration but still references `.clawdbot` in SKILL.md. - **Missing error handling**: StateManager.save() doesn't create the parent directory, will fail on first run if `~/.openclaw` doesn't exist. **Positive aspects:** - XMPP implementation shows good structure with proper XEP support (XEP-0184, XEP-0085, XEP-0363, XEP-0066) - Comprehensive configuration schema with Zod validation - Proper error handling and logging patterns in the client code - Smart model router has well-documented skill definitions The XMPP extension cannot be merged until the missing files are added. The smart-model-router needs a complete rename from "moltbot" to "openclaw" throughout. <h3>Confidence Score: 0/5</h3> - This PR cannot be merged - it contains critical missing files that will cause runtime failures - The XMPP extension is missing 3 critical files (runtime.ts, types.ts, index.ts) that are imported throughout the code. This will cause immediate import failures. The smart-model-router also has pervasive naming issues using "moltbot" instead of "openclaw". These are blocking issues that make the code non-functional. - All XMPP extension files require the missing runtime.ts, types.ts, and index.ts. All smart-model-router files need "moltbot" → "openclaw" renaming. <sub>Last reviewed commit: ba02617</sub> <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs