Add LINE channel adapter with webhook ingress and gating
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# 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.ts`
|
||||
- `src/channels/line/index.ts`
|
||||
- Added webhook ingress on gateway:
|
||||
- `POST /line/events` routed to adapter handler.
|
||||
- Added daemon registration:
|
||||
- config-driven adapter creation in `registerChannels()`
|
||||
- gateway webhook handler binding via `setLineHandler()`
|
||||
- Added config schema:
|
||||
- `line.channel_access_token`
|
||||
- `line.channel_secret`
|
||||
- `line.allowed_source_ids`
|
||||
- `line.require_mention`
|
||||
- `line.mention_name`
|
||||
- Added service discovery listing:
|
||||
- `line` channel now appears in `system.services`.
|
||||
- Added docs/config examples:
|
||||
- `README.md`
|
||||
- `config/default.yaml`
|
||||
|
||||
## Security/Safety
|
||||
|
||||
- Verifies `x-line-signature` using 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
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
+29
-3
@@ -594,6 +594,32 @@
|
||||
],
|
||||
"test_status": "pnpm test:run src/gateway/protocol.test.ts src/gateway/handlers/node.test.ts src/gateway/server.test.ts src/gateway/auth.test.ts src/gateway/handlers/handlers.test.ts src/config/schema.test.ts + pnpm typecheck + pnpm build passing"
|
||||
},
|
||||
"line-channel-adapter": {
|
||||
"file": "2026-02-16-line-channel-adapter-checklist.md",
|
||||
"status": "completed",
|
||||
"date": "2026-02-16",
|
||||
"updated": "2026-02-16",
|
||||
"summary": "Implemented LINE channel adapter with webhook ingress (`/line/events`), HMAC signature validation, mention/allowlist gating, outbound push messaging, daemon registration/wiring, and services discovery visibility.",
|
||||
"files_created": [
|
||||
"docs/plans/2026-02-16-line-channel-adapter-checklist.md",
|
||||
"src/channels/line/adapter.ts",
|
||||
"src/channels/line/adapter.test.ts",
|
||||
"src/channels/line/index.ts"
|
||||
],
|
||||
"files_modified": [
|
||||
"src/channels/index.ts",
|
||||
"src/daemon/channels.ts",
|
||||
"src/daemon/channels.test.ts",
|
||||
"src/config/schema.ts",
|
||||
"src/config/schema.test.ts",
|
||||
"src/gateway/server.ts",
|
||||
"src/gateway/handlers/services.ts",
|
||||
"src/gateway/handlers/services.test.ts",
|
||||
"README.md",
|
||||
"config/default.yaml"
|
||||
],
|
||||
"test_status": "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 passing"
|
||||
},
|
||||
"qmd-backend": {
|
||||
"file": "2026-02-16-qmd-backend-checklist.md",
|
||||
"status": "completed",
|
||||
@@ -3155,7 +3181,7 @@
|
||||
}
|
||||
},
|
||||
"overall_progress": {
|
||||
"total_test_count": 1795,
|
||||
"total_test_count": 1802,
|
||||
"all_tests_passing": true,
|
||||
"p0_completion": "3/3 (100%)",
|
||||
"p1_completion": "4/4 (100%)",
|
||||
@@ -3170,12 +3196,12 @@
|
||||
"tier2_completion": "4/4 (100%) — inbound webhooks, vector memory search, Dockerfile, heartbeat monitor",
|
||||
"tier3_completion": "5/5 (100%) — lane queue, credential redaction, web UI token dashboard, xAI (Grok) provider, Voyage AI embeddings",
|
||||
"tier4_completion": "4/4 (100%) — gateway lock, shell completion, Tailscale Serve/Funnel, DM pairing codes",
|
||||
"feature_gap_scorecard": "123/128 match (96%), 0 partial (0%), 5 missing (4%)",
|
||||
"feature_gap_scorecard": "124/128 match (97%), 0 partial (0%), 4 missing (3%)",
|
||||
"operator_dx_milestone": "Phase 3 (Live Ops Dashboard): 2/2 plans complete — milestone done",
|
||||
"gmail_auth_cli": "flynn gmail-auth command implemented with OAuth2 flow, doctor check, config routed to Telegram",
|
||||
"native_audio_support": "completed — smart routing for native audio (Gemini/OpenAI/GitHub) vs Whisper transcription fallback",
|
||||
"remaining_phases_completion": "Phase 1: 3/3 (100%) — context levels, command registry, memory structure. Phase 2: 3/3 (100%) — component registry, confidence routing, history index. Phase 3: 2/2 (100%) — adaptive memory/compaction, truthfulness/autonomy hardening",
|
||||
"next_up": "OpenClaw gap: LINE/Feishu/Zalo channel adapter set (open next scoped implementation checklist)"
|
||||
"next_up": "OpenClaw gap: Feishu channel adapter (open next scoped implementation checklist)"
|
||||
},
|
||||
"soul_md_and_cron_create": {
|
||||
"date": "2026-02-11",
|
||||
|
||||
Reference in New Issue
Block a user