File size: 516 Bytes
2e818da
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import time
from enum import Enum
from typing import Any, Dict
from pydantic import BaseModel, Field


class JournalEventType(str, Enum):
    CHAT_TURN = "chat_turn"
    FLASHCARD_GRADE = "flashcard_grade"
    QUIZ_SUBMIT = "quiz_submit"
    FEYNMAN_TURN = "feynman_turn"
    NODE_OPENED = "node_opened"
    DEEP_DIVE = "deep_dive"


class JournalEntry(BaseModel):
    project_id: str
    node_id: str
    event_type: JournalEventType
    data: Dict[str, Any]
    timestamp: float = Field(default_factory=time.time)