iconsulting/packages/services/conversation-service
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
..
src feat(admin): add System Supervisor — global system status chat interface 2026-02-08 20:49:57 -08:00
Dockerfile fix(docker): copy shared module AFTER npm install to prevent wipe 2026-01-26 03:41:16 -08:00
nest-cli.json Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
package.json feat(agents): add 4-layer response quality control — structured outputs, LLM judge, smart truncation 2026-02-07 01:01:05 -08:00
tsconfig.json Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00