openclaw/extensions/lark/index.ts
devsh e89378a0e7 feat(lark): add Feishu/Lark channel plugin with security fixes
- Initialize runtime in register() to fix 'runtime not initialized' error
- Move clawdbot from dependencies to devDependencies/peerDependencies
- Add security adapter with DM policy (pairing, allowlist, open)
- Add pairing adapter for user approval flow
- Add status adapter for health checks and diagnostics
- Add groups adapter for mention/tool policy resolution
- Add reload config prefixes for hot reload support
- Add outbound chunker for long messages
- Fix verification token enforcement in webhook handler
- Add allowFrom validation before processing messages
- Add comprehensive input validation in webhook handler
- Improve type safety and error handling throughout
2026-01-26 17:29:10 +08:00

19 lines
538 B
TypeScript

import type { ClawdbotPluginApi } from "clawdbot/plugin-sdk";
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
import { larkPlugin } from "./src/channel.js";
import { setLarkRuntime } from "./src/runtime.js";
const plugin = {
id: "lark",
name: "Feishu / Lark",
description: "Feishu / Lark channel plugin (Open Platform)",
configSchema: emptyPluginConfigSchema(),
register(api: ClawdbotPluginApi) {
setLarkRuntime(api.runtime);
api.registerChannel({ plugin: larkPlugin });
},
};
export default plugin;