Files
openclaw/TASKS.md
T
hyowons 549545bde6 Initial commit: OpenClaw 워크스페이스 버전관리 시작
설정·스크립트·스킬·문서·큐레이션 메모리 추적.
시크릿(credentials/identity)·런타임 상태(state/logs/sessions/sqlite)·
백업(clobbered/bak)·dream 캐시는 .gitignore로 제외.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 15:10:57 +09:00

62 lines
6.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenClaw 작업 레지스트리
각 작업의 **단일 진입점 명령**과 **트리거**를 한 줄로 매핑한다.
> 사용자 또는 에이전트가 "지금 X 한 번 실행해줘"라고 했을 때 — **이 표의 명령만 실행하면 된다.**
> cron/launchd 트리거를 만지지 마라. 트리거는 "언제"이고 명령은 "무엇"이다. 두 개는 별개다.
---
## 1. 단순 스크립트 작업 (LLM 불필요 — launchd 단독 운영)
| 작업 | 진입점 명령 | 트리거 |
|---|---|---|
| **OpenClaw Gateway** | `openclaw gateway --port 18789` | launchd `ai.openclaw.gateway` (상시) |
| **비하이브 웹뷰** | `python3 ~/.openclaw/agents/stock/workspace/scripts/behive_web.py serve` | launchd `ai.openclaw.stock.behive-web` (상시) |
| **후잉 동기화** | `python3 ~/.openclaw/agents/budget/workspace/skills/whooing-sync/scripts/whooing_sync.py` | launchd `ai.openclaw.budget.whooing-sync` (매 15분). 매 사이클 끝에 **가희 잔액 리마인더·자동분개** 모듈(`gahee_reminder.run`)도 함께 호출 — 매월 25일 10:00 KST 이후 첫 사이클에서 가희님께 iMessage 1회 발신, 이후 답신 폴링 → 텍스트면 후잉 가희주머니 차액 자동 분개, 이미지면 텔레그램 알림만 |
| **주식 브리핑 메일** | `python3 ~/.openclaw/agents/stock/workspace/scripts/stock_portfolio_report.py send` | launchd `ai.openclaw.stock.briefing` (평일 20:10) |
| **증권잔액 → 골디 inbox** | `python3 ~/.openclaw/agents/stock/workspace/scripts/send_balance_to_budget.py` | launchd `ai.openclaw.stock.send-balance` (매월 1일 04:30) |
| **골디 inbox 처리** (단독) | `python3 ~/.openclaw/agents/budget/workspace/skills/monthly-settlement/scripts/inbox_handler.py [--dry-run]` | 트리거 없음 — 월간결산 cron 진입부에서 자동 호출. 수동 점검·재처리용 |
| **워치리스트 모니터링** | `python3 ~/.openclaw/agents/stock/workspace/scripts/watchlist_monitor.py check` | launchd `ai.openclaw.stock.watchlist-monitor` (평일 0915시 매 15분) |
| **공모주 캘린더 동기화** | `python3 ~/.openclaw/agents/stock/workspace/scripts/ipo_calendar_sync.py` | launchd `ai.openclaw.stock.ipo-calendar-sync` (매월 1일 09:00) |
| **휴장일 동기화** | `python3 ~/.openclaw/agents/stock/workspace/scripts/holiday_sync.py [--show]` | launchd `ai.openclaw.stock.holiday-sync` (매주 일요일 03:00) |
| **매매 기록 적재** | `python3 ~/.openclaw/agents/stock/workspace/scripts/trade_journal.py {collect\|seed\|show\|query} ...` | launchd `ai.openclaw.stock.trade-journal` (평일 21:00 — NXT 야간 마감 후 ka10170 4계좌 적재). `seed`는 적재 시작일 이전 보유분을 현재 평단가로 1회 시드 (idempotent) |
| **Claude Code 원격 세션** (on-demand, 다중) | `python3 ~/.openclaw/workspace/skills/claude-code-session/scripts/session_tool.py {profile\|session} ...` (legacy 단일: `ensure_session.sh {open\|close\|status}`) | 세션 plist는 `~/Library/LaunchAgents/ai.claude-session.<profile>-<N>.plist`로 ephemeral, 레거시 단일은 `ai.openclaw.claude-remote-control`. 모두 RunAtLoad=false, KeepAlive=false. 클로 `claude-code-session` 스킬이 자연어 라우팅. |
수동 실행: 진입점 명령만 그대로 터미널에서 실행하면 된다. launchctl 만지지 마라.
---
## 2. LLM 자연어 작업 (OpenClaw cron — `cron/jobs.json`)
LLM이 자막 요약·뉴스 평문 생성·결산 보고서 등 본문을 만들어야 하는 작업만 여기 남는다.
| 작업 | 진입점 (사람이 시키는 한 마디) | 트리거 |
|---|---|---|
| **오전 브리핑** (main/클로) | "오전 브리핑 메일 보내줘" → cron payload의 step 그대로 실행 | OpenClaw cron `56d66b54` (매일 07:00) |
| **오후 브리핑** (main/클로) | "오후 브리핑 메일 보내줘" → cron payload의 step 그대로 실행 | OpenClaw cron `9d2c105f` (매일 19:00) |
| **비하이브 종목분석 요약** (stock/레이) | "비하이브 신규 영상 점검해줘" → cron payload의 step 그대로 실행 | OpenClaw cron `747e1013` (평일 07/12/18시) |
| **월간 결산** (budget/골디) | "월간 결산 돌려줘" → cron payload의 step 그대로 실행 | OpenClaw cron `08e9a978` (매월 1일 05:00) |
수동 실행: 사용자가 해당 에이전트에게 작업 이름만 말하면, 에이전트는 `jobs.json`의 동일 ID 페이로드 step을 그대로 따라 실행한다. **cron 활성화 여부·스케줄 시간을 만지는 작업은 트리거 변경 요청이 명시적으로 있을 때만.**
---
## 3. 운영 원칙 — 트리거 vs 작업 분리
1. **트리거(언제)와 작업(무엇)은 별개다.** "지금 X 실행"은 항상 §1·§2의 진입점 명령만 실행. cron/launchd 등록·해제·재실행은 별도 요청.
2. **payload에 "매일 X시 자동 실행" 같은 자가묘사 메타 문구를 넣지 마라.** 페이로드는 "무엇을 어떻게"만 담는다. "언제"는 schedule 필드가 단일 진실 공급원.
3. **새 트리거를 만들 땐 단순 스크립트면 launchd, LLM이 본문을 생성해야 하면 OpenClaw cron.** 이중 등록 금지. 이관 시 한쪽 완전 제거.
4. **Disabled 좀비 잡 즉시 제거.** `enabled:false`로 두지 말고 jobs.json에서 빼라. 검색에 잡혀서 혼선 유발.
5. **트리거 추가/이관/제거는 담당 에이전트의 MEMORY.md에 반드시 기록.**
---
## 4. 알려진 이슈 / 진단 절차
- **bonjour 광고 stuck → gateway crash 루프** (2026-04-28 한 차례 발생, 현재는 정상)
- 증상: `~/.openclaw/logs/stability/``*unhandled_rejection.json` 누적, gateway PID 계속 변경, `openclaw cron list``gateway closed (1006)` 응답
- 원인: LAN의 mDNS 이름 충돌(`openclaw.local` 또는 `... (OpenClaw)` 서비스명) + OpenClaw bonjour 모듈의 catch 누락 코드 path
- 1차 조치: `sudo killall -HUP mDNSResponder` + `launchctl kickstart -k gui/$UID/ai.openclaw.gateway`. 이걸로 보통 풀린다 (mDNS 리셋 후 OpenClaw가 graceful handler로 들어가 이름에 `(2)` suffix 붙여 재광고)
- 2차 조치 (재발 시): `openclaw config set plugins.entries.bonjour.enabled false` + gateway 재시작. 비활성 시 잃는 것은 `openclaw.local` 로컬 디스커버리만, 텔레그램·gateway·Tailscale serve·cron 모두 정상