implement JellyStat API for watch history, genre summary, and user summary; add PostgreSQL connection pool and update requirements

This commit is contained in:
2026-05-25 13:54:30 +02:00
parent 4b87b817a8
commit 0151c8210e
10 changed files with 743 additions and 35 deletions
+5 -2
View File
@@ -118,8 +118,8 @@ async def execute_tool(
if t.get("function", {}).get("name") == tool_name:
# --- Auth gate ---
if s.requires_auth and discord_user_id is not None:
from core import auth_store
from auth import get_auth_service
from src import auth_store
from gateway.auth import get_auth_service
missing: list[str] = []
for svc in s.requires_auth:
if not auth_store.is_authenticated(discord_user_id, svc):
@@ -134,6 +134,9 @@ async def execute_tool(
+ " ".join(f"Send `/login {m}` in a DM to get started." for m in missing)
)
# --- End auth gate ---
# Inject discord_user_id so skills can resolve external user IDs
if discord_user_id is not None:
args = {**args, "_discord_user_id": discord_user_id}
try:
result = await s.execute(tool_name, args)
if not result.success: