Routines
RoutineEngineV2 — 두 가지 트리거
LVIS의 routine 엔진은 src/routines/v2/routine-engine-v2.ts 의 단일 구현 (v2-only). 트리거는 'shutdown' 과 'schedule' 두 가지만 존재. 각 루틴 발사는 dedicated ConversationLoop 인스턴스를 새로 만들어 interactive 메인 루프와 isolation.
src/routines/v2/routine-engine-v2.ts
trigger: shutdown | schedule
per-fire fresh loop
schedule
cron-like 식 사용. evaluator:
src/routines/cron-evaluator.ts. 예: 매일 09:00, 매주 금요일 17:00.shutdown
호스트가 종료 직전에 발사. 일일 정리 / 데일리 백업 / 보고용으로 활용.
이벤트/조합 트리거는 routine 이 아니라 detector 가 담당
이메일 도착 · 미팅 종료 같은 이벤트 기반 자동화는 routine 이 아니라 Work Assistant 의 detector 가 담당합니다. Routine 은 “시간 또는 종료 시점” 두 가지 트리거만 갖는 단순한 엔진.
루틴 등록 (목업)
Routine — schedule type 예시
Trigger
trigger: "schedule"
cron: "0 9 * * 1-5"
Conversation seed
- user: “데일리 브리핑 정리해줘”
- → work_assistant_generate_daily_briefing
- → 결과를 채팅 본문 카드로 표시
발사 단계
- 01
등록 — UI 또는 plugin manifest
사용자가 RoutinePanel 에서 추가하거나, plugin manifest 가 capability
routine-provider+ 추천 routine 을 함께 제공. - 02
Scheduler 등록
src/main/routines-scheduler.ts가 시간 트리거를 OS timer 로 예약. shutdown 트리거는 호스트 lifecycle hook 에 등록. - 03
Per-fire fresh ConversationLoop
isolation발사 시점에 새 ConversationLoop 인스턴스 생성. interactive 메인 루프와 메모리 / 권한 / TODO 가 isolation.
- 04
세션 기록
~/.lvis/routine/sessions/<routineId>/<firedAt>.jsonl에 한 발사의 message stream + tool calls JSONL 로 append. - 05
결과 노출
완료 시 채팅 본문에 “루틴 실행 완료” 카드. 실패 시 audit log + 다음 발사는 정상.
‘Q9 isolation lock’ 이름은 코드에 없다
과거 문서 / CLAUDE.md 가 “Q9 isolation lock” 이라고 부르는 개념은 코드의 “per-fire fresh ConversationLoop” 패턴 (
routine-engine-v2.ts:5-7 주석) 으로 구현되어 있습니다. 리터럴 Q9 라는 식별자는 소스에 등장하지 않습니다.