Feature/line support#21
Merged
Merged
Conversation
added 3 commits
February 12, 2026 14:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Discord 전용이었던 봇에 LINE 메신저 플랫폼 지원을 추가. Platform Adapter 패턴으로 기존 코드를 대규모 리팩토링 없이 확장.
Architecture
기존: Discord Message → Command → SessionManager → AI CLI
↓
Discord 응답
변경: Discord / LINE Message
↓
PlatformAdapter (추상화 레이어)
↓
Cross-Platform Command (공통 비즈니스 로직)
↓
SessionManager → AI CLI
↓
PlatformAdapter → Discord 응답 / LINE Push Message
Key Changes
src/platform/— 플랫폼 추상화 레이어 신규 생성PlatformAdapter인터페이스:reply(),replyRich(),askQuestion(),showTyping()등DiscordAdapter: 기존 Discord 유틸(버튼, Embed, 타이핑)을 어댑터로 래핑LineAdapter: LINE Flex Message, Quick Reply, Push Message API 구현src/commands/cross/— 크로스 플랫폼 커맨드 5개 추출 (ask, session, exec, status, help)src/lineBot.ts— LINE 웹훅 서버 (HTTP + 서명 검증 + 커맨드 라우팅)src/sessions/*.ts—sendMessage()시그니처를PlatformMessage + PlatformAdapter로 변경src/config.ts— LINE 환경 변수 추가src/utils/security.ts—isAllowedLineUser()추가Platform Modes
LINE 동작 방식
replyToken으로 "처리 중..." 응답 → AI 결과는pushMessageAPI로 전송