Commit Graph

4 Commits

Author SHA1 Message Date
Variet Worker
58a421f5a6 fix: 전체 시스템 감사 — 6건 수정 (보안 + 안정성)
Bug 1 (만료됨 스팸): Collector 시작 시 기존 pending skip
Bug 2 (pending 미삭제): Gateway에서 response 소비 시 pending도 삭제
Bug 3 (재시작 중복): Bug 1로 해결

Security 1: API 요청 1MB 크기 제한 (client_max_size)
Security 2: IP별 rate limiting (10 req/s)
Security 3: _commands 메모리 누수 방지 (TTL 30분)
2026-03-11 22:42:05 +09:00
Variet Worker
7eca0763c9 fix(collector): 기능 누락 3건 수정 — Discord 명령어/채팅/등록 중계
Gap 1: Discord→Extension 명령어 깨짐
  - bot.py: _write_command() 래퍼 — gateway.push_command()도 호출
  - main.py: bot.gateway 연결
  - 슬래시 명령어 + on_message 모두 _write_command 사용

Gap 2: Chat snapshot 미전달
  - collector.py: _forward_chat_snapshots_loop 추가

Gap 3: Session registration 미전달
  - collector.py: _forward_registrations_loop 추가
2026-03-11 22:31:08 +09:00
Variet Worker
3d75825bba feat(collector): brain event 중계 추가 — Watcher 이벤트를 Gateway로 전달
- collector.py: _forward_events_loop — BrainEvent를 JSON으로 serialize하여 /api/event POST
- gateway.py: /api/event 엔드포인트 — 수신한 이벤트를 bot event_queue에 주입
- main.py: event_queue를 CollectorBridge에 전달

이제 task.md, implementation_plan, walkthrough 변경사항이 Collector→Gateway→Discord 경로로 전달됨
2026-03-11 22:24:48 +09:00
Variet Worker
95c2905e14 feat(collector): RemoteTransport + CollectorBridge 구현 — Collector↔Gateway HTTP 통신 완성
- bridge.py RemoteTransport: HTTP 클라이언트, API Key auth, Gateway API 매핑
- collector.py CollectorBridge: 3개 async loop (pending 전달, response 폴링, commands 폴링)
- main.py: BOT_MODE=remote → CollectorBridge 실행 (Discord bot 없이)
- config.py: GATEWAY_API_KEY 설정
- .env.example: 모든 설정 항목 업데이트
2026-03-11 20:10:45 +09:00