openclaw/extensions/plivo/index.ts
Narayan Vyas 40538b5a30 feat(channels): add Plivo SMS/MMS channel extension
Add a new channel extension for Plivo SMS/MMS messaging, enabling
universal phone-based access to Clawdbot from any device.

Features:
- Two-way SMS messaging via Plivo API
- MMS media support (images, videos, documents)
- Quick command shortcuts (e.g., "cal" -> "show my calendar")
- Auto-configuration of Plivo webhooks on startup
- Multi-account support
- DM policies (pairing, allowlist, open)

Implements ideas 3.1, 3.3, 3.4, 3.7 from PLIVO_INTEGRATION_IDEAS.md:
- 3.1 SMS Channel Adapter
- 3.3 Quick Commands via SMS
- 3.4 MMS Media Sharing
- 3.7 Critical Alerts via SMS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:36:22 -08:00

46 lines
1.2 KiB
TypeScript

/**
* Plivo SMS Channel Extension for Clawdbot
*
* This extension provides SMS/MMS messaging capabilities via Plivo,
* enabling universal phone-based access to your AI assistant.
*
* Features:
* - Two-way SMS messaging
* - MMS media support (images, videos, documents)
* - Quick command shortcuts (e.g., "cal" -> "show my calendar")
* - Auto-configuration of Plivo webhooks
* - Multi-account support
*/
import { plivoPlugin } from "./src/channel.js";
import { setPlivoRuntime } from "./src/runtime.js";
// Plugin definition for Clawdbot
const plugin = {
id: "plivo",
name: "Plivo SMS",
description: "SMS/MMS channel via Plivo - Universal phone access to your AI assistant",
register(api: {
runtime: unknown;
registerChannel: (opts: { plugin: typeof plivoPlugin }) => void;
}) {
// Store runtime reference for access in adapters
setPlivoRuntime(api.runtime);
// Register the Plivo channel
api.registerChannel({ plugin: plivoPlugin });
},
};
export default plugin;
// Re-export types and utilities for external use
export { plivoPlugin } from "./src/channel.js";
export type {
PlivoConfig,
PlivoAccountConfig,
PlivoResolvedAccount,
QuickCommand,
} from "./src/types.js";