openclaw/extensions/line/index.ts
edenfunf d7cfa542d5 feat(line): add onboarding support for LINE Messaging API
- Created lineOnboardingAdapter with interactive setup flow
- Added Channel Access Token and Channel Secret input with validation
- Included webhook configuration instructions (ngrok/Tailscale)
- Implemented User ID allowFrom management with format validation
- Exported lineOnboardingAdapter from plugin-sdk
- Connected onboarding adapter to LINE channel plugin

This enables seamless LINE bot setup through 'moltbot onboard' wizard,
resolving the 'line does not support onboarding yet' message.

Tested with:
- Local development via ngrok
- Token/Secret validation
- Webhook signature verification
- Full message send/receive flow
- dmPolicy modes (open/allowlist/pairing)

Co-authored-by: Claude <claude@anthropic.com>
2026-01-30 03:39:50 +08:00

22 lines
627 B
TypeScript

import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
import { linePlugin } from "./src/channel.js";
import { registerLineCardCommand } from "./src/card-command.js";
import { setLineRuntime } from "./src/runtime.js";
const plugin = {
id: "line",
name: "LINE",
description: "LINE Messaging API channel plugin",
configSchema: emptyPluginConfigSchema(),
register(api: MoltbotPluginApi) {
setLineRuntime(api.runtime);
api.registerChannel({
plugin: linePlugin
});
registerLineCardCommand(api);
},
};
export default plugin;