From ca73689099b94c26aacbc89c167cd51107f48a65 Mon Sep 17 00:00:00 2001 From: PeninsulaInd Date: Wed, 4 Mar 2026 22:30:46 -0600 Subject: [PATCH] Add /api/system/briefing/force endpoint to trigger morning briefing on demand Co-Authored-By: Claude Opus 4.6 --- cheddahbot/api.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cheddahbot/api.py b/cheddahbot/api.py index c3bbd98..190206a 100644 --- a/cheddahbot/api.py +++ b/cheddahbot/api.py @@ -562,6 +562,15 @@ async def force_loop_run(): return {"status": "ok", "message": "Force pulse sent to heartbeat and poll loops"} +@router.post("/system/briefing/force") +async def force_briefing(): + """Force the morning briefing to send now (won't block tomorrow's).""" + if not _scheduler: + return {"status": "error", "message": "Scheduler not available"} + _scheduler.force_briefing() + return {"status": "ok", "message": "Briefing force-triggered"} + + @router.post("/cache/clear") async def clear_cache(): """Clear the ClickUp data cache."""