iconsulting/packages/admin-client/src/shared
hailin 5034ef4a70 feat(admin): add System Supervisor — global system status chat interface
Add a "系统总监" (System Supervisor) feature that provides admins with
a natural language chat interface to query the entire iConsulting system's
operational status, including all 7 specialist agents, directives, token
usage, conversation statistics, and system health.

Backend:
- SystemSupervisorChatService: Haiku 4.5 with 7 read-only tools
  - get_agent_configs: list all 7 agent model/parameter configs
  - get_agent_execution_stats: execution counts, success rates, latency
  - get_directives_summary: assessment + collection directive overview
  - get_token_usage_stats: token consumption and cost by model
  - get_conversation_stats: conversation counts, conversion rates, stages
  - get_evaluation_rules: quality gate rule configuration
  - get_system_health: circuit breakers, Redis, service availability
- AdminSupervisorController: POST /conversations/admin/supervisor/chat
- Registered in AgentsModule (provider + export) and ConversationModule
- Added AgentExecutionORM to TypeOrmModule.forFeature in AgentsModule

Frontend (admin-client):
- features/supervisor/ with Clean Architecture layers:
  - infrastructure/supervisor.api.ts: HTTP client
  - application/useSupervisor.ts: React Query mutation hook
  - presentation/pages/SupervisorPage.tsx: full-page chat UI
- Quick action buttons: 系统概况, Agent统计, 成本报告, 健康检查
- Route: /supervisor, menu icon: EyeOutlined (between 收集指令 and 数据分析)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:49:57 -08:00
..
components feat(admin): add System Supervisor — global system status chat interface 2026-02-08 20:49:57 -08:00
hooks refactor(admin-client): implement 3-layer Clean Architecture for frontend 2026-01-24 22:17:48 -08:00
utils fix(admin-client): add x-admin-id header for super admin API requests 2026-01-26 08:53:40 -08:00