Add calendar agent (CalDAV + ICS), wire into daily briefing
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user