# 每日 Profile 记忆与异常巡检 HTML 看板

这个项目由 IT profile 的每日 cron `daily-profile-memory-and-anomaly-audit` 刷新，生成一个可手机查看的静态 HTML 运维看板。

## 入口

- 公开看板：<https://wwyl.yipeng.online/detail-pages/hermes-profile-audit-a49833a87c60/>
- 本地 HTML：`deliverables/index.html`
- 数据快照：`deliverables/profile_audit_dashboard_data.json`
- 每日原始巡检摘要：`work/raw_reports/YYYY-MM-DD.md`
- 定时脚本：`/Users/bot1/.hermes/profiles/it/scripts/daily_profile_audit_dashboard.py`
- Cron：`daily-profile-memory-and-anomaly-audit`（`a49833a87c60`），每天 07:00，`no_agent=true`
- 云端目录：`wwyl-cloud:/srv/detail-pages/public/hermes-profile-audit-a49833a87c60/`

## 刷新方式

```bash
python3 -m py_compile /Users/bot1/.hermes/profiles/it/scripts/daily_profile_audit_dashboard.py
python3 /Users/bot1/.hermes/profiles/it/scripts/daily_profile_audit_dashboard.py
```

该脚本会现场读取 Bot/Profile 状态、Bot 1/Bot 2/云服务器基础电脑状态、NAS 基本运行状态与存储容量，刷新本地 HTML/JSON，并同步到公开链接。

## 当前看板内容

- 顶部“一眼摘要”：profile 数、红/黄/绿评级、临界记忆、24h 硬错误、超时观察、bot2 可达状态。
- 机器基础状态：Bot 1、Bot 2、云服务器的内存、根分区存储容量和可用量。
- NAS 基本状态：`root_for_ai` SMB 挂载是否正常、当前发现 IP、存储已用/总量/可用量；如果 NAS 因 IP 变化或未挂载导致不可用，脚本会尝试发现当前 IP 并重新挂载到 `/Users/bot1/Volumes/root_for_ai`。
- 今日需要优先关注：只突出记忆临界或硬错误偏高等高优先级问题。
- 完整 Profile 明细：移动端表格内横向滑动，不撑破页面。

## NAS 巡检合并说明

用户要求不再单独开 NAS 定时任务。NAS 检查已合并到每天 07:00 的 Profile 巡检脚本内；独立 cron `daily-nas-health-check-and-auto-remount` 已删除。

可保留 `/Users/bot1/.hermes/profiles/it/scripts/daily_nas_health_check.py` 作为 helper，被 7 点主脚本调用。它只做健康检查、局域网 IP 发现和 SMB 重新挂载，不单独发定时报告。

## 安全边界

- 不修改 profile 配置、不重启 gateway、不清理 memory、不改 LaunchAgent。
- NAS 自动修复只限：发现当前 NAS IP、验证 `root_for_ai` SMB 共享、重新挂载到固定本地路径。
- 不写入、移动、删除、覆盖 NAS 上的用户资料/业务资料；不改 `03_用户资料`；不改共享知识库内容。
- 不在页面或数据文件中加入 token、cookie、app secret、数据库密码、auth.json 内容或任何连接串。
