[kimi] Break up _dispatch_via_gitea() into helper functions (#1136) (#1183)

This commit is contained in:
2026-03-23 21:40:17 +00:00
parent 74bf0606a9
commit 7aa48b4e22
26 changed files with 195 additions and 115 deletions

View File

@@ -9,6 +9,7 @@ from .database import Base # Assuming a shared Base in models/database.py
class TaskState(StrEnum):
"""Enumeration of possible task lifecycle states."""
LATER = "LATER"
NEXT = "NEXT"
NOW = "NOW"
@@ -18,6 +19,7 @@ class TaskState(StrEnum):
class TaskCertainty(StrEnum):
"""Enumeration of task time-certainty levels."""
FUZZY = "FUZZY" # An intention without a time
SOFT = "SOFT" # A flexible task with a time
HARD = "HARD" # A fixed meeting/appointment
@@ -25,6 +27,7 @@ class TaskCertainty(StrEnum):
class Task(Base):
"""SQLAlchemy model representing a CALM task."""
__tablename__ = "tasks"
id = Column(Integer, primary_key=True, index=True)
@@ -56,6 +59,7 @@ class Task(Base):
class JournalEntry(Base):
"""SQLAlchemy model for a daily journal entry with MITs and reflections."""
__tablename__ = "journal_entries"
id = Column(Integer, primary_key=True, index=True)

View File

@@ -15,6 +15,7 @@ router = APIRouter(prefix="/discord", tags=["discord"])
class TokenPayload(BaseModel):
"""Request payload containing a Discord bot token."""
token: str

View File

@@ -8,6 +8,7 @@ router = APIRouter(prefix="/telegram", tags=["telegram"])
class TokenPayload(BaseModel):
"""Request payload containing a Telegram bot token."""
token: str

View File

@@ -52,6 +52,7 @@ def _get_db() -> Generator[sqlite3.Connection, None, None]:
class _EnumLike:
"""Lightweight enum-like wrapper for string values used in templates."""
def __init__(self, v: str):
self.value = v

View File

@@ -24,6 +24,7 @@ TRACKED_AGENTS = frozenset({"hermes", "kimi", "manus", "claude", "gemini"})
class PeriodType(StrEnum):
"""Scorecard reporting period type."""
daily = "daily"
weekly = "weekly"