feat: DEVONthink 제거 + 모닝 브리핑 추가

- DEVONthink 의존성 제거 → kb_writer 전환 (news_digest, inbox_processor, mail pipeline)
- devonthink_bridge.py, plist 삭제
- morning_briefing.py 신규 (매일 07:30, 일정·메일·보고·뉴스 → Synology Chat)
- intent_service.py 분류기 프롬프트 개선 + 키워드 fallback
- migrate-v5.sql (news_digest_log kb_path 컬럼)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-19 14:12:38 +09:00
parent fd8925637d
commit 782caf5130
15 changed files with 479 additions and 240 deletions

View File

@@ -1,6 +1,6 @@
# Progress — syn-chat-bot
> 최종 업데이트: 2026-03-17
> 최종 업데이트: 2026-03-19
## Phase별 구현 현황
@@ -30,30 +30,37 @@
- `fetch()`/`$http.request()``require('http')`/`require('https')` 패턴 전환
- `NODE_FUNCTION_ALLOW_BUILTIN=crypto,http,https,url` 설정
### Phase 5-6: Calendar/Mail/DEVONthink/OmniFocus/News (커밋 `612933c`, 2026-03-14)
### Phase 5-6: Calendar/Mail/OmniFocus/News (커밋 `612933c`, 2026-03-14)
- 분류기 v3: calendar, reminder, mail, note intent 추가
- caldav_bridge.py (:8092) — CalDAV REST 래퍼 (Synology Calendar CRUD)
- devonthink_bridge.py (:8093) — DEVONthink AppleScript 래퍼
- inbox_processor.py — OmniFocus Inbox 폴링 (LaunchAgent, 5분 간격)
- news_digest.py — RSS 뉴스 번역·요약 (LaunchAgent, 매일 07:00)
- Mail Processing Pipeline (7노드) — IMAP 폴링 → Qwen 분류 → mail_logs
- 메인 파이프라인 51노드로 확장 (calendar/mail/note 핸들러)
### DEVONthink 제거 + 모닝 브리핑 (2026-03-19)
- DEVONthink 의존성 제거 → kb_writer로 전환 (news_digest, inbox_processor, mail pipeline)
- devonthink_bridge.py 삭제 (macOS AppleScript 의존성 제거)
- morning_briefing.py — 모닝 브리핑 (LaunchAgent, 매일 07:30)
- 일정(CalDAV), 메일(mail_logs), 보고(field_reports), 뉴스(Karakeep) → Synology Chat
- migrate-v5.sql — news_digest_log에 kb_path 컬럼 추가
---
## 파일 인벤토리
### Python 서비스 (6개, 1,227줄)
### Python 서비스 (6개)
| 파일 | 줄수 | 포트/실행 | 역할 |
|------|------|----------|------|
| `caldav_bridge.py` | 269 | :8092 | CalDAV REST 래퍼 |
| `chat_bridge.py` | 293 | :8091 | DSM Chat API 브릿지 |
| `devonthink_bridge.py` | 125 | :8093 | DEVONthink AppleScript 래퍼 |
| `heic_converter.py` | 25 | :8090 | HEIC→JPEG 변환 |
| `inbox_processor.py` | 225 | LaunchAgent 5분 | OmniFocus Inbox 폴링 |
| `news_digest.py` | 290 | LaunchAgent 07:00 | 뉴스 번역·요약 |
| 파일 | 포트/실행 | 역할 |
|------|----------|------|
| `caldav_bridge.py` | :8092 | CalDAV REST 래퍼 |
| `chat_bridge.py` | :8091 | DSM Chat API 브릿지 |
| `heic_converter.py` | :8090 | HEIC→JPEG 변환 |
| `inbox_processor.py` | LaunchAgent 5분 | OmniFocus Inbox 폴링 |
| `news_digest.py` | LaunchAgent 07:00 | 뉴스 번역·요약 |
| `morning_briefing.py` | LaunchAgent 07:30 | 모닝 브리핑 |
### LaunchAgent plist (6개)
@@ -61,10 +68,10 @@
|------|--------|
| `com.syn-chat-bot.caldav-bridge.plist` | caldav_bridge |
| `com.syn-chat-bot.chat-bridge.plist` | chat_bridge |
| `com.syn-chat-bot.devonthink-bridge.plist` | devonthink_bridge |
| `com.syn-chat-bot.heic-converter.plist` | heic_converter |
| `com.syn-chat-bot.inbox-processor.plist` | inbox_processor |
| `com.syn-chat-bot.news-digest.plist` | news_digest |
| `com.syn-chat-bot.morning-briefing.plist` | morning_briefing |
### n8n 워크플로우 (2개)
@@ -80,6 +87,7 @@
| `init/init.sql` | 초기 스키마 (5테이블) |
| `init/migrate-v2.sql` | v2 마이그레이션 (7테이블 추가) |
| `init/migrate-v3.sql` | v3 마이그레이션 (calendar_events 확장) |
| `init/migrate-v5.sql` | v5 마이그레이션 (DEVONthink→kb_writer 전환) |
### 기타
@@ -120,7 +128,6 @@ pip install caldav aiohttp
### 3. macOS 앱 설정
- **DEVONthink 4**: 설치 + 데이터베이스 열기 (AppleScript 접근 허용)
- **OmniFocus**: 설치 + Inbox 사용 설정
- **Ollama (맥미니)**: `ollama pull bge-m3 && ollama pull bge-reranker-v2-m3`
@@ -175,7 +182,6 @@ bash manage_services.sh load
curl http://localhost:8090/health # heic_converter
curl http://localhost:8091/health # chat_bridge
curl http://localhost:8092/health # caldav_bridge
curl http://localhost:8093/health # devonthink_bridge
# Docker 상태
docker compose ps
@@ -195,4 +201,4 @@ docker exec bot-postgres psql -U bot chatbot -c '\dt'
- [ ] CalDAV 양방향 동기화
- [ ] 메일 발송 (SMTP via MailPlus)
- [ ] reminder 실구현 (알림 시간에 Synology Chat 푸시)
- [ ] DEVONthink 검색 결과 RAG 연동
- [ ] 모닝 브리핑 고도화 (주간 요약, 커스텀 섹션)