- 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>
22 lines
627 B
TypeScript
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; |