feat: update DigestConfig with typed annotations and apple_health source

Add List[str] type annotations to DigestSectionConfig and DigestConfig
fields. Add apple_health to default health section sources.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jon Saad-Falcon
2026-04-02 12:27:34 -07:00
co-authored by Claude Opus 4.6
parent d73014d6bb
commit a5a9171e83
+8 -6
View File
@@ -14,7 +14,7 @@ import shutil
import subprocess
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, Optional
from typing import Any, Dict, List, Optional
try:
import tomllib # Python 3.11+
@@ -1239,9 +1239,9 @@ class SkillsConfig:
class DigestSectionConfig:
"""Configuration for a single digest section."""
sources: list = field(default_factory=list)
sources: List[str] = field(default_factory=list)
max_items: int = 10
priority_contacts: list = field(default_factory=list)
priority_contacts: List[str] = field(default_factory=list)
@dataclass
@@ -1252,10 +1252,10 @@ class DigestConfig:
schedule: str = "0 6 * * *"
timezone: str = "America/Los_Angeles"
persona: str = "jarvis"
sections: list = field(
sections: List[str] = field(
default_factory=lambda: ["messages", "calendar", "health", "world"]
)
optional_sections: list = field(
optional_sections: List[str] = field(
default_factory=lambda: ["github", "financial", "music", "fitness"]
)
voice_id: str = ""
@@ -1269,7 +1269,9 @@ class DigestConfig:
default_factory=lambda: DigestSectionConfig(sources=["gcalendar"])
)
health: DigestSectionConfig = field(
default_factory=lambda: DigestSectionConfig(sources=["oura"])
default_factory=lambda: DigestSectionConfig(
sources=["oura", "apple_health"]
)
)
world: DigestSectionConfig = field(
default_factory=lambda: DigestSectionConfig(sources=[])