sequenceDiagram
    participant U as 管理员(组长)
    participant FE as frontend-admin
    participant API as /api/agents/login
    participant Redis as Redis
    participant DB as PostgreSQL

    U->>FE: 输入 user_id + name 登录
    FE->>API: POST /api/agents/login
    API->>DB: 查询 Agent (user_id)
    DB-->>API: Agent 记录（含 role 字段）
    API->>Redis: 存储 token → user_id 映射
    API-->>FE: {agent_info, token, role: "admin"}
    FE->>FE: 检查 role === "admin"
    FE->>FE: 存储 admin_token 到 localStorage
    FE->>FE: 跳转到 /admin/dashboard
