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 추가
This commit is contained in:
Variet Worker
2026-03-11 22:31:08 +09:00
parent 3d75825bba
commit 7eca0763c9
3 changed files with 71 additions and 6 deletions

View File

@@ -107,6 +107,7 @@ async def main():
from gateway import GatewayAPI
gateway_port = int(os.environ.get('GATEWAY_PORT', '8585'))
gateway = GatewayAPI(bot, port=gateway_port, api_key=Config.GATEWAY_API_KEY)
bot.gateway = gateway # Enable _write_command → gateway.push_command
await gateway.start()
logger.info(f"Gateway API running on port {gateway_port}")