Files
MoFin/specs/dashboard.json
T

61 lines
2.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"module": "dashboard",
"version": "1.0",
"purpose": "MoFin 管理门户。独立 Flask 应用(端口 8899),统一展示系统健康状态、模块 spec 帮助和监控数据。",
"human_help": {
"title": "Dashboard — 管理门户",
"description": [
"MoFin 统一管理面板,提供系统健康状态总览和各模块的帮助文档。",
"采用深色主题 Web UI,与 AgentsMeeting Dashboard 一致的视觉风格。",
"访问地址: http://192.168.1.246:8899"
],
"usage": [
"打开浏览器访问 http://192.168.1.246:8899",
"F 健康 Tab — 查看所有服务运行状态和健康管线数据",
"G 规范 Tab — 查看开发规范文档",
"点击 ? 按钮 — 查看面向人类的模块帮助",
"点击 § 按钮 — 查看面向 AI 的接口约束文档"
],
"troubleshooting": [
"Dashboard 不响应 → ssh 246 'sudo systemctl restart mofin-dashboard'",
"F Tab 无数据 → 检查 crontab 中健康检查任务是否运行",
"Spec 加载失败 → 检查 specs/ 目录权限和 JSON 格式"
]
},
"ai_spec": {
"apis": [
{"method": "GET", "path": "/api/health", "returns": "{status:'ok', uptime:N}"},
{"method": "GET", "path": "/api/services", "returns": "{services[{name, type, port, status}]} — 所有注册服务的运行状态"},
{"method": "GET", "path": "/api/expected", "returns": "{expected[{name, port, expected, critical}], actual{name:status}} — 期望状态矩阵"},
{"method": "GET", "path": "/api/monitor", "returns": "{tier1{summary{ok,total}}, tier2{summary{ok,total}}, tasks[{name,status}]} — 聚合监控数据"},
{"method": "GET", "path": "/api/module-spec/<module>", "returns": "specs/{module}.json 内容"}
],
"dependencies": [
"specs/ 目录 — 所有模块的 spec JSON 文件",
"agents_health_check.py — Tier1 健康检查(生成 last_health_check.json",
"agents_daily_health.py — Tier2 日检(生成 last_daily_health.json",
"server.py :8899 — 业务 APIDashboard 通过 HTTP 检测其可达性)"
],
"constraints": [
"Dashboard 部署在 Linux 246 上,端口 8899",
"通过 systemd 守护(mofin-dashboard.service",
"不依赖 server.py :8899(可独立运行)",
"前端 5 秒轮询 /api/services + /api/expected",
"?§ 按钮通过 /api/module-spec/<module> 读取 spec JSON"
],
"must_not": [
"不要修改 server.py :8899 来集成 Dashboard(保持独立)",
"不要在 Dashboard 中硬编码业务数据(只做监控和文档展示)",
"不要移除 ?§ 按钮系统(这是 spec 可视化的核心)"
],
"related_files": [
"dashboard.py — Flask 后端",
"templates/dashboard.html — 前端",
"specs/ — Spec 文件目录",
"gateway/logs/ — 运行时日志"
]
}
}