Add Webex bot integration as a channel plugin supporting: - Bot token authentication via Webex Developer Portal - Webhook-based message receiving (messages:created events) - HMAC-SHA1 signature verification for webhook security - Direct message and group/space messaging - Media attachment support (images, files) - Pairing mode for DM authorization - Multi-account support Includes: - Full onboarding wizard for bot configuration - Probe functionality for connection testing - Channel status reporting - Documentation at docs/channels/webex.md - GitHub labeler configuration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
/**
|
|
* Moltbot Webex channel plugin
|
|
*
|
|
* Provides integration with Cisco Webex for enterprise messaging.
|
|
*/
|
|
|
|
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
|
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
|
import { webexPlugin } from "./src/channel.js";
|
|
import { handleWebexWebhookRequest } from "./src/monitor.js";
|
|
import { setWebexRuntime } from "./src/runtime.js";
|
|
|
|
const plugin = {
|
|
id: "webex",
|
|
name: "Webex",
|
|
description: "Moltbot Webex channel plugin for enterprise messaging",
|
|
configSchema: emptyPluginConfigSchema(),
|
|
|
|
register(api: MoltbotPluginApi) {
|
|
// Set runtime for plugin modules
|
|
setWebexRuntime(api.runtime);
|
|
|
|
// Register channel plugin
|
|
api.registerChannel({
|
|
plugin: webexPlugin,
|
|
});
|
|
|
|
// Register HTTP handler for webhooks
|
|
api.registerHttpHandler(handleWebexWebhookRequest);
|
|
},
|
|
};
|
|
|
|
export default plugin;
|
|
|
|
// Re-export types for external use
|
|
export type {
|
|
ResolvedWebexAccount,
|
|
WebexAccountConfig,
|
|
WebexConfig,
|
|
WebexDmConfig,
|
|
WebexMessage,
|
|
WebexPerson,
|
|
WebexRoom,
|
|
WebexRoomConfig,
|
|
WebexWebhookEvent,
|
|
} from "./src/types.js";
|
|
|
|
// Re-export functions for external use
|
|
export { getWebexMe, probeWebex, sendWebexMessage } from "./src/api.js";
|
|
export { resolveWebexAccount } from "./src/accounts.js";
|
|
export { handleWebexWebhookRequest } from "./src/monitor.js";
|