feat(tools): 애니메이션 자동화 파이프라인 구현

- tools/anissia_client.py: Anissia API 클라이언트 (편성표/자막)
- tools/nyaa_client.py: Nyaa.si RSS 토렌트 검색
- tools/qbit_client.py: qBittorrent Web API 클라이언트
- tools/subtitle_downloader.py: Google Drive/Tistory/Naver 자막 파서
- tools/title_matcher.py: 제목 매칭 + NAS 폴더명 생성
- tools/anime_pipeline.py: 전체 파이프라인 오케스트레이터
- tools/nas_scanner.py: NAS 폴더/파일 스캔
- prompts/unified.md: anime 모드 추가 (AI 평문 의도 분류)
- api/discord_bot.py: AI 평문 anime 핸들러 + /anime 슬래시 커맨드
- config.py: qBittorrent/NAS 설정 추가
- .agents/: agent_guide 워크플로우 통합
- docs/devlog: 세션 기록
This commit is contained in:
2026-03-08 16:07:16 +09:00
parent 49ee5f397c
commit c92433b0b1
36 changed files with 3663 additions and 128 deletions

View File

@@ -97,7 +97,7 @@ class GeminiCaller:
# 텍스트 모드 (분류/리뷰/총평)
# ──────────────────────────────────────────
async def call(self, role: str, context: str, timeout: int = 120) -> str:
async def call(self, role: str, context: str, timeout: int = 300) -> str:
"""역할별 프롬프트로 텍스트 생성.
파일 접근 없이 텍스트만 주고받는 역할에 사용.
@@ -150,7 +150,8 @@ class GeminiCaller:
return result
except asyncio.TimeoutError:
raise GeminiCallError(f"Gemini timeout ({timeout}s) -- role={role}")
logger.error(f"Gemini [{role}] 타임아웃 ({timeout}s) — 입력 {len(full_input)}")
raise GeminiCallError(f"Gemini 응답 시간 초과 ({timeout}초). 요청이 너무 복잡할 수 있습니다.")
except FileNotFoundError:
raise GeminiCallError("gemini CLI를 찾을 수 없습니다.")
except Exception as e:
@@ -162,7 +163,7 @@ class GeminiCaller:
async def call_agent(
self, role: str, context: str, cwd: str,
timeout: int = 300,
timeout: int = 600,
) -> str:
"""에이전트 모드 — 프로젝트 디렉토리에서 실행.
@@ -173,7 +174,7 @@ class GeminiCaller:
role: 프롬프트 역할 (coder)
context: 작업 지시 (태스크 설명)
cwd: 프로젝트 루트 경로 (여기서 Gemini 실행)
timeout: 타임아웃 (에이전트는 더 길게 — 기본 5분)
timeout: 타임아웃 (에이전트는 더 길게 — 기본 10분)
"""
async with _semaphore:
return await self._call_agent_impl(role, context, cwd, timeout)
@@ -197,7 +198,8 @@ class GeminiCaller:
f"=== IMPORTANT ===\n"
f"프로젝트 루트: {cwd}\n"
f"파일을 직접 생성/수정하세요. 코드블록으로 출력하지 말고, 실제 파일로 저장하세요.\n"
f"작업 완료 후 변경한 파일 목록을 간단히 출력하세요."
f"작업 완료 후 변경한 파일 목록을 간단히 출력하세요.\n"
f"모든 응답, 주석, 문서는 반드시 한국어로 작성하세요."
)
try:
@@ -225,8 +227,9 @@ class GeminiCaller:
return result
except asyncio.TimeoutError:
logger.error(f"Gemini [{role}] agent 타임아웃 ({timeout}s) — cwd={cwd}")
raise GeminiCallError(
f"Gemini agent timeout ({timeout}s) -- role={role}, cwd={cwd}"
f"Gemini 에이전트 응답 시간 초과 ({timeout}초). 작업이 너무 복잡할 수 있습니다."
)
except FileNotFoundError:
raise GeminiCallError("gemini CLI를 찾을 수 없습니다.")