Commit Graph

117 Commits

Author SHA1 Message Date
ericwyuan
06e1e5a307 docs: update PROGRESS.md with chat proxy, Tailscale status, E2E results 2026-08-20 00:03:57 +08:00
ericwyuan
94a8805045 feat: FAM-Edge chat proxy + PyMySQL migration for FAM-UI + config update
- FAM-Edge: add /api/edge/chat proxy endpoint forwarding to local Ollama
  (Ollama port 11434 not exposed externally, FAM-Edge acts as reverse proxy)
- FAM-Core config: edge_url and ollama_url switched from Tailscale IP to
  Oracle public IP (Tailscale firewall blocking between NAS and Oracle)
- FAM-UI: migrate mysql.connector to PyMySQL (same as FAM-Core)
- FAM-UI: cursor(dictionary=True) replaced with cursorclass=DictCursor
- End-to-end chat verified: FAM-Core -> FAM-Edge proxy -> Ollama -> response
  Answer: 今天没有观察到张三 (no events in DB yet, expected)
2026-08-19 23:59:28 +08:00
ericwyuan
c8cd2f2665 fix: MariaDB JSON path compat for name_member + FAM-Core API verified
- name_member(): replace MySQL-only JSON_REPLACE/JSON_CONTAINS with wildcard
  JSON paths (unsupported in MariaDB 10.11) with Python-side JSON parsing
- FAM-Core venv rebuilt with Python 3.10.20 on NAS
- All API endpoints tested: health, status, member list, unnamed, naming
- POST /api/member/name: 人物A successfully named to 张三
- PROGRESS.md updated with full test results and task completion
2026-08-19 23:48:35 +08:00
ericwyuan
66b499725d [deploy] FAM-Core + FAM-Edge 服务启动 + Tailscale 跨服务器验证
- FAM-Core (NAS:8000): gunicorn 启动成功, scheduler+dispatcher 运行中
- FAM-Edge (Oracle:5000): gunicorn 启动成功, ollama 健康检查通过
- Tailscale 跨服务器连通: Oracle→NAS FAM-Core health=ok
- config.yaml 同步到 Oracle, FAM-Edge /health 返回 healthy_models=[ollama]
- PROGRESS.md 更新服务运行状态表
2026-08-19 23:32:35 +08:00
ericwyuan
47658fa068 [deploy] PyMySQL 替换 + Tailscale 组网 + config.yaml + 路径修复
- db_layer.py: mysql-connector-python(19MB) → PyMySQL(45KB), 去掉连接池
- config_loader.py: 修复路径解析 (2级→3级 dirname), FAM-Core + FAM-Edge 均修复
- Tailscale 组网完成: Oracle=100.74.137.126, NAS=100.70.234.39, 互通验证通过
- NAS Python 依赖: flask/gunicorn/pymysql/PyYAML 全部安装成功
- NAS 代码部署: /volume1/web/sentinel-home-ai/, FAM-Core 7 模块导入 PASS
- NAS DB 连接验证: PyMySQL → MariaDB 10.11.11, 6 张表可见, PASS
- config.yaml 创建: FAM-Core + FAM-Edge + FAM-UI (Tailscale IP + 密码)
- requirements.txt: mysql-connector-python → PyMySQL
2026-08-19 23:27:28 +08:00
ericwyuan
e5ac667586 [deploy] NAS MariaDB DDL 执行 + Tailscale 状态 + README 更新
- NAS MariaDB 10.11.11 确认可用, root 密码 iLoveJava5!
- DDL 执行成功: sentinel_home_ai 库 + 6 张表 (process_tasks, monitor_events, daily_summaries, event_details, chat_history, family_members)
- NAS Tailscale 已运行, IP: 100.70.234.39
- Oracle Tailscale 1.102.2 已安装, 待用户认证
- README 新增 MariaDB 密码 + Tailscale IP + NAS 型号信息
- PROGRESS.md 更新全部环境状态
2026-08-19 23:08:21 +08:00
ericwyuan
50d83539f6 [deploy] Oracle 环境部署 + 模型基准测试 + OllamaAdapter 优化
- Oracle 依赖安装: flask/gunicorn/requests/PyYAML/opencv/numpy 全部成功
- FAM-Edge 全部 8 个模块导入验证 PASS
- llava-phi3 基准测试: 冷启动 109s, 预热无限制 13.35s, 预热+num_predict=30 仅 4.34s PASS
- OllamaAdapter 新增 num_predict 可配置参数 (默认 500)
- config.yaml.example 新增 num_predict 配置项
- 创建 PROGRESS.md 进度追踪文档
2026-08-19 23:01:21 +08:00
ericwyuan
c1bfac59df fix(requirements): 移除 google-generativeai/openai 硬依赖 - 代码用 requests 直接调 REST API,兼容 Python 3.8 2026-08-19 22:50:30 +08:00
ericwyuan
ba905d2f84 [1.1] 服务器访问信息 - NAS/Oracle SSH 凭证 + Gitea 账号记录到 README 2026-08-19 22:46:31 +08:00
ericwyuan
c45464c3e2 [补全] 各模块 __init__.py 导出 - 确保import链路完整 2026-08-19 22:37:47 +08:00
ericwyuan
5e4587bdc2 [3.5补充] Storage-Cleaner - finally清理逻辑 + 超期残留目录清理 2026-08-19 22:35:50 +08:00
ericwyuan
d741ade9b7 [6.0] 部署脚本与文档 - start_core/edge/ui.sh + DEPLOY.md 部署指南 2026-08-19 22:27:47 +08:00
ericwyuan
4cfb327455 [4.1-5.4] FAM-UI Streamlit - 事件列表/筛选/明细/AI对话/对话历史/成员命名/统计图表 + 配置 2026-08-19 22:26:56 +08:00
ericwyuan
cdd1f21d4c [3.1-3.5] FAM-Edge 全链路 - API-Gateway/Video-Preprocessor/AI-Orchestrator/模型适配器(基类+Ollama+Gemini)/熔断器/JSON解析容错 + 配置 2026-08-19 22:25:38 +08:00
ericwyuan
da6b1c8d39 [2.1-2.5] FAM-Core 六个子模块 - Scheduler/Dispatcher/Event-Receiver/Chat-Handler/Member-Manager/Video-Server + DB层 + 配置 2026-08-19 22:21:31 +08:00
ericwyuan
d6d294bbbe [1.2] 数据库 DDL - 六张表完整建表 + 初始化脚本 2026-08-19 22:18:22 +08:00
ericwyuan
3a315c7129 [1.0] 项目初始化 - 目录结构 + README + .gitignore 2026-08-19 22:17:23 +08:00