- Add agent context isolation API, RBAC, resolver, audit, dashboard modules - Deploy context isolation policy config - Fix OpenAPI workspace permissions (chown aiman:gitops) - Update ChatGPT actions API with new internals - Add CMD files for group/owner isolation and permission fix - Archive completed command files
24 lines
620 B
Python
24 lines
620 B
Python
"""Audit context resolution decisions."""
|
|
|
|
from datetime import datetime, timezone
|
|
from typing import Any
|
|
|
|
|
|
def utc_now():
|
|
return datetime.now(timezone.utc).isoformat()
|
|
|
|
|
|
class AgentContextAudit:
|
|
def record(self, context: dict[str, Any]) -> dict[str, Any]:
|
|
return {
|
|
"event": "context_loaded",
|
|
"agent_id": context.get("agent_id"),
|
|
"user_id": context.get("user_id"),
|
|
"group_id": context.get("group_id"),
|
|
"layers": [x.get("name") for x in context.get("layers", [])],
|
|
"timestamp": utc_now(),
|
|
}
|
|
|
|
|
|
__all__ = ["AgentContextAudit"]
|