← Back to PRs

#9939: feat(spixi): Add Spixi channel integration.

by subsubl open 2026-02-05 22:22 View on GitHub →
gateway size: XL
feat: Spixi Channel Integration (Post-Quantum Secure Messaging) ### 🚀 Feature: Spixi Channel Support This PR integrates **Spixi**, a decentralized, privacy-first, post-quantum secure messaging channel (via the Ixian Platform), into OpenClaw. It enables AI agents to communicate securely over the Ixian Network with full session persistence and bi-directional messaging capabilities. ### Key Capabilities - **Secure Messaging**: Full inbound/outbound support via local MQTT bridge (default port `1883`). - **Friend Management**: - **Auto-Accept**: Whitelist-based auto-acceptance of friend requests (`allowFrom` config). - **Manual Tools**: Agent tools (`spixi_accept_contact`) for programmatic contact management. - **Sync**: Automatic contact list synchronization on startup. ### How to Test 1. Configure `spixi` in `openclaw.yaml`: ```yaml channels: spixi: accounts: main: mqttHost: "127.0.0.1" mqttPort: 1883 myWalletAddress: "YOUR_WALLET_ADDRESS" allowFrom: ["FRIEND_WALLET_ADDRESS"] ``` 2. Start the gateway. 3. Send a message from Spixi Client to the bot. 4. Verify the agent replies. ### AI/Vibe-Coded PR 🤖 **Degree of Testing**: - [X] **Fully Tested**: Verified end-to-end messaging, friend requests, and session persistence. **Context**: - [x] I understand what this code does - [x] Generated with Google Antigravity <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR adds Spixi as a new messaging channel for OpenClaw, enabling decentralized P2P messaging via the Ixian network through a local MQTT bridge and QuIXI API. The integration includes friend management (auto-accept, add, sync), inbound/outbound messaging, session persistence, and onboarding flows. Key concerns: - **Reply routing is hardcoded to Spixi** in `server.impl.ts` — the generic `createChannelMessageHandler` uses `(runtime as any).channel.spixi.sendMessage` to route replies, meaning any other channel using this handler will silently drop replies. - **Global mutable `defaultBaseUrl`** in `runtime.ts` creates a race condition for multi-account configurations with different `quixiApiUrl` values. - **Message text sent via GET query parameters** in `sendMessage` will truncate or fail for long agent replies due to URL length limits. - **Wildcard `"*"` in `allowFrom`** is not handled during friend request auto-accept, inconsistent with the codebase convention. - **MQTT message parameter typed incorrectly** as `mqtt.Packet` instead of `Buffer`. <h3>Confidence Score: 2/5</h3> - This PR has several functional issues that will cause runtime failures or silent data loss in common scenarios. - Score of 2 reflects multiple issues: the onReply callback is hardcoded to Spixi which prevents the generic message handler from being reusable, the global mutable baseUrl creates race conditions for multi-account setups, message text in GET query params will silently truncate long agent responses, the wildcard allowFrom handling is inconsistent with codebase conventions, and the MQTT message type is incorrect. Several of these issues were also flagged in previous review threads (sendPolicy, unused imports, type mismatches) which remain unresolved. - Pay close attention to `src/gateway/server.impl.ts` (hardcoded Spixi reply routing), `extensions/spixi/src/runtime.ts` (global mutable state, GET query params), and `extensions/spixi/src/channel.ts` (MQTT typing, wildcard handling). <sub>Last reviewed commit: 3203fd3</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs