feat(nextcloud): Nextcloud 4모듈 + NC핸들러 + AI Foreman v0.1
- tools/nextcloud_client.py: WebDAV/OCS/CalDAV/CardDAV 공통 클라이언트 - tools/nc_files.py: 파일 검색/목록/최근/공유링크 - tools/nc_calendar.py: CalDAV 일정 CRUD + ICS 빌더 - tools/nc_mail.py: IMAP 메일 조회 (PLAIN auth for Mailcow) - tools/nc_contacts.py: CardDAV 연락처 + EasyOCR 명함 스캔 - handlers/nc_handler.py: 자연어→NC도구 자동 라우팅 - core/foreman.py: 목표 분해 + 상담 세션 + Vikunja 등록 - prompts/foreman.md: Foreman 시스템 프롬프트 - prompts/unified.md: nextcloud 모드 분류 추가 - config.py: .env 따옴표 파싱 버그 수정 - api/discord_bot.py: /goal 커맨드 + Foreman 스레드 라우팅
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
**핵심 질문: "이 요청이 무엇을 원하는가?"**
|
||||
|
||||
- **애니메이션 관련 요청** → `mode: "anime"` (자막, 영상, 다운로드, 편성표 등)
|
||||
- **Nextcloud 도구 요청** → `mode: "nextcloud"` (파일, 일정, 메일, 연락처)
|
||||
- **프로젝트 파일 변경이 필요** → `mode: "task"`
|
||||
- **대화로 해결 가능** → `mode: "chat"`
|
||||
- **판단 불가** → `mode: "clarify"`
|
||||
@@ -76,12 +77,42 @@
|
||||
- "프리렌 7화" → title="장송의 프리렌", episode=7
|
||||
- "일요일 편성" → action="schedule", filter="week:0"
|
||||
|
||||
### nextcloud:
|
||||
```json
|
||||
{
|
||||
"mode": "nextcloud",
|
||||
"tool": "files | calendar | mail | contacts",
|
||||
"op": "도구별 연산자",
|
||||
"params": {},
|
||||
"summary": "사용자 요청 요약"
|
||||
}
|
||||
```
|
||||
|
||||
**nextcloud 판단 기준:**
|
||||
- 파일 찾기/검색/공유 링크 → `tool: "files"`
|
||||
- 일정/스케줄/약속 → `tool: "calendar"`
|
||||
- 메일/이메일 확인 → `tool: "mail"`
|
||||
- 연락처/명함 → `tool: "contacts"`
|
||||
|
||||
**도구별 op:**
|
||||
- files: `search`, `list`, `link`, `recent`
|
||||
- calendar: `today`, `week`, `add`, `delete`, `list_calendars`
|
||||
- mail: `unread`, `search`, `get`
|
||||
- contacts: `search`, `list`, `scan`
|
||||
|
||||
**params 예시:**
|
||||
- "세금 관련 파일 찾아줘" → `{"tool":"files","op":"search","params":{"query":"세금"}}`
|
||||
- "오늘 일정 뭐야" → `{"tool":"calendar","op":"today","params":{}}`
|
||||
- "안 읽은 메일 있어?" → `{"tool":"mail","op":"unread","params":{"limit":5}}`
|
||||
- "내일 3시에 회의 잡아줘" → `{"tool":"calendar","op":"add","params":{"summary":"회의","date":"2026-03-19","time":"15:00","duration":"1h"}}`
|
||||
|
||||
## 규칙
|
||||
|
||||
- 반드시 위 JSON 형식만 출력하세요. JSON 외의 텍스트를 포함하지 마세요.
|
||||
- chat의 response는 마크다운 사용 가능, **완성된 답변**이어야 합니다.
|
||||
- task에서는 summary만 작성하세요. tasks 배열을 만들지 마세요.
|
||||
- anime에서는 사용자 의도를 정확히 파악하여 action과 파라미터를 설정하세요.
|
||||
- nextcloud에서는 적절한 tool, op, params를 설정하세요.
|
||||
- 한국어로 응답하세요.
|
||||
- 이전 대화 기록이 주어지면, 맥락을 고려하세요.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user