1.8 KiB
1.8 KiB
LINE Channel Adapter Checklist
Date: 2026-02-16
Scope: Close the first item in the LINE/Feishu/Zalo channel gap set by implementing LINE.
Goal
Add a production-safe LINE channel adapter with webhook ingress, signature verification, outbound send path, mention/allowlist gating, and daemon/gateway wiring.
Implemented
- Added new LINE adapter:
src/channels/line/adapter.tssrc/channels/line/index.ts
- Added webhook ingress on gateway:
POST /line/eventsrouted to adapter handler.
- Added daemon registration:
- config-driven adapter creation in
registerChannels() - gateway webhook handler binding via
setLineHandler()
- config-driven adapter creation in
- Added config schema:
line.channel_access_tokenline.channel_secretline.allowed_source_idsline.require_mentionline.mention_name
- Added service discovery listing:
linechannel now appears insystem.services.
- Added docs/config examples:
README.mdconfig/default.yaml
Security/Safety
- Verifies
x-line-signatureusing HMAC-SHA256 +channel_secret. - Applies source allowlist (
allowed_source_ids) when configured. - Applies mention gating (
require_mention+mention_name) for group/room contexts.
Tests
src/channels/line/adapter.test.ts- inbound signature validation
- mention gating behavior
- outbound push API call
- invalid signature rejection
src/daemon/channels.test.ts- LINE adapter registration + gateway handler binding.
src/config/schema.test.ts- LINE config parsing/defaults.
src/gateway/handlers/services.test.ts- LINE service presence in discovery output.
Validation Run
pnpm test:run src/channels/line/adapter.test.ts src/daemon/channels.test.ts src/config/schema.test.ts src/gateway/handlers/services.test.ts
pnpm typecheck
pnpm build