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

This commit is contained in:
2026-02-14 16:05:56 +01:00
parent e17d34e6d7
commit 5969892af3
55 changed files with 4711 additions and 1587 deletions

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()