Plugin · MS-Graph
Microsoft 365 — Outlook 메일 + 캘린더 통합
lvis-plugin-email + lvis-plugin-calendar 가 통합된 단일 플러그인. v0.3.28. MSAL OAuth + Electron safeStorage 토큰. 31개 도구 (mail/calendar 영역) + 폴링 watcher + 충돌 감지 + ICS 초대 처리.
로그인 흐름
- 01
로그인 트리거 — msgraph_auth
msgraph_auth사이드바 outlook-control 카드의
🔐 Microsoft 365 로그인클릭 →msgraph_auth도구 호출. - 02
MS OAuth 동의 (MSAL)
기본 scope 5개 동시 요청:
User.Read,offline_access,Mail.ReadWrite,Mail.Send,Calendars.ReadWrite(src/auth/config.ts:30-36). - 03
토큰 저장 — Electron safeStorage
safeStorageOS keychain 이 아니라 Electron
safeStorage로 암호화 base64 저장. 파일 경로:<pluginDataDir>/auth/token-<env>.json—external/corporate환경 분리 (src/auth/token-store.ts). - 04
재로그인 → 같은 토큰 캐시 재사용
이후 MS Graph API 호출은 캐시된 토큰 자동 refresh + 만료 시 재로그인 카드.
- 05
로그아웃 — msgraph_signout
msgraph_signoutsignOutAll()가 모든 환경의 토큰/캐시 삭제 + MSALremoveAccount→ms-graph.auth.changedemit. 원격 revoke 는 없음 (public client 제약).
제공 도구 — 31개
다음은 plugin.json:10-43 에 등록된 전체 도구 목록입니다. 카테고리 (read/write) 는 toolSchemas.<tool>.category 로 선언.
# Mail
msgraph_email_list · msgraph_email_list_sent · msgraph_email_read
msgraph_email_reply · msgraph_email_create_event · msgraph_email_analyze
msgraph_email_start_watcher · msgraph_email_get_notifications
msgraph_email_get_sent_replies · msgraph_email_get_sent_reply
msgraph_email_open_url · msgraph_email_open_inbox · msgraph_email_compose_url
# Calendar
msgraph_calendar_list · msgraph_calendar_today · msgraph_calendar_get
msgraph_calendar_create · msgraph_calendar_update · msgraph_calendar_delete
msgraph_calendar_append_body · msgraph_calendar_create_invite_event
msgraph_calendar_detect_patterns · msgraph_calendar_find_by_correlation_key
msgraph_calendar_find_by_time_range · msgraph_calendar_start_watcher
msgraph_calendar_open_url · msgraph_calendar_open_viewer
# Auth · env
msgraph_auth · msgraph_signout · msgraph_status
msgraph_list_environments · msgraph_set_environmentsafeStorage 사용 가능 여부를 확인하고 사용 가능하면 암호화 base64, 아니면plain: 프리픽스 fallback (token-store.ts:7-95). 파일은 0o600.lvis-plugin-email (archived 2026-04-28) + lvis-plugin-calendar (archived 2026-04-30) 가 ms-graph 하나로 통합. 토큰 마이그레이션은 src/auth/migrator.ts 가 호스트-소유 path → plugin-소유 path 로 1회 이전.