Add context isolation Web UI dashboard model
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
"""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"]
|
||||||
Reference in New Issue
Block a user