- 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
48 lines
1.4 KiB
Python
48 lines
1.4 KiB
Python
"""Web UI model for context isolation visibility."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
|
|
class AgentContextDashboard:
|
|
def overview(self, contexts: list[dict[str, Any]] | None = None) -> dict[str, Any]:
|
|
contexts = contexts or []
|
|
return {
|
|
"module": "agent-context-isolation",
|
|
"route": "/admin/ai-evolution/context",
|
|
"title": "Agent Context Isolation",
|
|
"panels": [
|
|
{
|
|
"name": "agent-routing",
|
|
"title": "Agent 路由",
|
|
"data": contexts,
|
|
},
|
|
{
|
|
"name": "context-layers",
|
|
"title": "Context 来源层级",
|
|
"layers": [
|
|
"safety_policy",
|
|
"owner_policy",
|
|
"group_policy",
|
|
"role_policy",
|
|
"user_profile",
|
|
"session_context",
|
|
"agent_default",
|
|
],
|
|
},
|
|
{
|
|
"name": "audit",
|
|
"title": "Context 审计",
|
|
"events": [
|
|
"context_loaded",
|
|
"profile_updated",
|
|
"agent_selected",
|
|
],
|
|
},
|
|
],
|
|
}
|
|
|
|
|
|
__all__ = ["AgentContextDashboard"]
|