Platform bundle: marketing publish, IT ops, packaging, agents mesh.

Volledige Foodlinkk Command Center uitbreiding met social automatisering,
reclamefolder filters, Proxmox monitoring en documentatie.
This commit is contained in:
Aissa
2026-06-09 00:41:27 +00:00
commit 5d60d33db1
212 changed files with 30044 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""Log Tools API mutations to agent_events."""
from __future__ import annotations
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from app.middleware import log_agent_event
class AgentLoggingMiddleware(BaseHTTPMiddleware):
async def dispatch(self, request: Request, call_next):
response = await call_next(request)
if request.method in ("POST", "PUT", "PATCH", "DELETE") and response.status_code < 400:
path = request.url.path
if path.startswith(("/research", "/recommendations", "/retail", "/events")):
try:
log_agent_event(
agent_name="tools_api",
event_type="api_call",
title=f"{request.method} {path}",
channel="api",
metadata={"status": response.status_code},
)
except Exception:
pass
return response