feat: harden gateway with policy engine, secure tools, and governance docs

This commit is contained in:
Latte committed 2026-02-14 16:06:43 +01:00
1 parent e17d34e6d7
commit 5969892af3
55 files changed
+4711 -1587

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
"""Request context utilities for correlation and logging."""
from __future__ import annotations
from contextvars import ContextVar
_REQUEST_ID: ContextVar[str] = ContextVar("request_id", default="-")
def set_request_id(request_id: str) -> None:
"""Store request id in context-local state."""
_REQUEST_ID.set(request_id)
def get_request_id() -> str:
"""Get current request id from context-local state."""
return _REQUEST_ID.get()