diff --git a/ideas/250929_happybell80_multi_ai_cli_integration.md b/ideas/250929_happybell80_multi_ai_cli_integration.md index 4904277..a76acb2 100644 --- a/ideas/250929_happybell80_multi_ai_cli_integration.md +++ b/ideas/250929_happybell80_multi_ai_cli_integration.md @@ -126,6 +126,10 @@ tmux attach -t ai-panel - **인터페이스**: healthcheck() | ask()->async iterator | cancel() | resume() - **모드**: PTY/STDIO 모드 지원 - **정규화**: ANSI 제거, 프롬프트 재출현, 타임아웃 규칙 내장 +- **pexpect 패턴**: + - Claude: "❯" 프롬프트, timeout=30 + - Gemini: ">" 프롬프트, timeout=25 + - Codex: ">>>" 프롬프트, timeout=20 ### 파싱 규칙 - **종료 판단**: 프롬프트 패턴 + 침묵 타임아웃 + 길이 상한 @@ -142,6 +146,10 @@ tmux attach -t ai-panel - **세션 파일 위치**: strace/fs_usage로 CLI가 읽는 파일 추적 - **인증 오류 감지**: "Session expired", "Please log in" 패턴 매칭 - **헬스 체크**: claude me, gemini whoami로 세션 상태 확인 +- **세션 파일 권한**: + - ~/.config/claude: 600 (user read/write only) + - ~/.config/gemini: 600 (user read/write only) + - ~/.config/codex: 600 (user read/write only) ### 입출력 제어 - **pexpect 사용**: pty 모듈보다 안정적, 패턴 매칭 우수 @@ -188,6 +196,7 @@ tmux attach -t ai-panel ### 51123 nginx 프록시 - location /multi-ai/ → proxy_pass http://51124:8888/ - WebSocket 지원 헤더 설정 필요 +- root_path 프리픽스 설정: FastAPI(root_path="/multi-ai") ## 실현 가능성 평가