Add weather caching, useless-tip redirect, clock widget, and IAM Bedrock auth

- Cache the latest fetched tomorrow weather and expose it via /api/system/weather/latest
- Add a header Clock widget showing date/time plus the cached weather summary
- Redirect useless-talk mentions from the weather bot to the useless-tips webhook
- Switch Bedrock auth from bearer token to standard IAM access key/secret

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 15:15:11 +09:00
co-authored by Claude Sonnet 4.6
parent 4a08ba29fa
commit 4e837d1419
8 changed files with 160 additions and 4 deletions
+7
View File
@@ -3,6 +3,7 @@ import psutil
from pydantic import BaseModel
from app.core.scheduler import send_useless_tip, send_weather_laundry_notification
from app.core.weather_cache import get_latest as get_latest_weather
router = APIRouter(prefix="/api/system", tags=["system"])
@@ -61,3 +62,9 @@ async def test_useless_tip():
"""どうでもいいtips→Discord通知を手動で即時実行する(動作確認用)"""
await send_useless_tip()
return {"status": "sent"}
@router.get("/weather/latest")
async def get_latest_weather_data():
"""直近で取得した明日の天気データを返す(未取得ならnull)"""
return get_latest_weather()