Add calendar agent (CalDAV + ICS), wire into daily briefing

This commit is contained in:
2026-04-13 02:34:52 +00:00
parent 26156543f6
commit 852d329379
2 changed files with 287 additions and 8 deletions
+10 -8
View File
@@ -33,14 +33,16 @@ def collect_sections(config):
print(f" Weather failed: {e}", file=sys.stderr)
sections.append(("Weather", "## Weather\n\n*Weather data unavailable.*\n", f"error: {e}"))
# --- Future sub-agents go here ---
# Each can receive config params as needed
# try:
# from calendar_agent import run as calendar_run
# md, summary = calendar_run(calendar_id=config.get("calendar_id"))
# sections.append(("Calendar", md, summary))
# except Exception as e:
# sections.append(("Calendar", "## Calendar\n\n*Unavailable.*\n", f"error: {e}"))
# --- Calendar ---
calendars = config.get("calendars", [])
try:
from calendar_agent import run as calendar_run
md, summary = calendar_run(calendars_config=calendars)
sections.append(("Calendar", md, summary))
print(f" Calendar: {summary}")
except Exception as e:
print(f" Calendar failed: {e}", file=sys.stderr)
sections.append(("Calendar", "## Calendar\n\n*Calendar data unavailable.*\n", f"error: {e}"))
return sections