feat(whatsapp): GoWA REST 네이티브 도구 — 채팅 읽기·전송 (INT-2323)#97
Merged
Conversation
INT-2319(메신저) 분해 B. WhatsApp 송수신을 GoWA(go-whatsapp-web-multidevice) REST 서버 래퍼로. lharries/whatsapp-mcp(방치·405 깨짐) 대신 GoWA 채택 — 활발히 유지·맥/윈 사전빌드 단일 바이너리. - pipeline/tools_whatsapp.py: whatsapp_list_chats / whatsapp_read_messages / whatsapp_send_message. GoWA REST(기본 localhost:3777, env VEGA_WHATSAPP_GOWA_URL) 호출. v8 멀티디바이스 X-Device-Id 자동 해결(_resolve_device, 캐시). send는 번호에 @s.whatsapp.net 자동 부착(그룹 @g.us·풀 jid 보존). results dict/list 방어 파싱. stdlib urllib, 30s 타임아웃. - tools.py: WHATSAPP 스키마·함수 병합(import 실패 안전 skip) + read 2종을 _LIGHT_ALLOWED_TOOLS에 추가(INT-1894 load=light 축소 함정 재발 방지, send 제외). - tool_registry.py: _whatsapp_check(/app/devices 3s 프로브) + WORKSPACE_TOOLSETS "whatsapp". 검증: 테스트 28종 + 회귀 80 passed. mutation(@s.whatsapp.net 자동부착 무력화→ 빨간불) 확인. 실서버 실측(GoWA 3777 페어링됨): device 해결·list_chats· read_messages·send 왕복 확인(발송 msg_id가 read로 되읽힘). 주의: GoWA REST 서버가 상시 기동돼 있어야 도구 동작(카카오 kmsg=외부 MCP와 달리 로컬 REST 의존). 배포 시 사이드카 자동 기동은 별도 작업. WhatsApp 비공식 프로토콜=계정 밴 가능(수신-응답형 low). 채널봇(왓츠앱→VEGA)은 INT-2328(wishlist).
수동 기동 불편 해소 — VEGA 백엔드가 GoWA REST 서버 수명주기를 관리. - pipeline/whatsapp_sidecar.py: opt-in(VEGA_WHATSAPP_SIDECAR, 기본 off) 시에만 GoWA 바이너리를 subprocess로 기동. 이미 서빙 중(수동 기동/이전 run)이면 skip, 바이너리 부재/비실행이면 안전 skip. start_new_session로 프로세스 그룹 분리. 경로 override VEGA_WHATSAPP_GOWA_BIN, 포트 VEGA_WHATSAPP_GOWA_PORT(기본 3777, tools_whatsapp URL과 동기). - web/server.py lifespan: startup에서 start()(실패해도 기동 안 막음), shutdown에서 stop()(VEGA가 띄운 것만 종료, 수동 서버엔 no-op). 기본 off라 비공식 프로토콜 서버가 사용자 opt-in 없이 안 뜬다. 켜면 whatsapp_* 도구가 수동 기동 없이 동작. 검증: 사이드카 테스트 6종(opt-in 게이트·이미 서빙 skip·바이너리 검사·spawn 인자 rest --port·stop 종료·미기동 no-op). mutation(is_enabled 항상 True→2 빨간불) 확인. 배포 시 바이너리 번들(Tauri 사이드카)은 별도(A만, B 미포함).
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.
INT-2319(메신저 MCP) 분해 B — WhatsApp 송수신을 GoWA(go-whatsapp-web-multidevice) REST 래퍼로.
lharries/whatsapp-mcp(15개월 방치, 405 연결 깨짐) 대신 활발히 유지되는 GoWA 채택(맥/윈 사전빌드 단일 바이너리).도구 (pipeline/tools_whatsapp.py)
whatsapp_list_chats/whatsapp_read_messages/whatsapp_send_messageVEGA_WHATSAPP_GOWA_URL, 기본localhost:3777). v8 멀티디바이스X-Device-Id자동 해결. send 번호에@s.whatsapp.net자동 부착(그룹@g.us보존)._whatsapp_check(/app/devices 프로브) + WORKSPACE_TOOLSETS 등록. read 2종_LIGHT_ALLOWED_TOOLS추가(INT-1894 재발 방지).검증
주의