Files
MemRelay/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/Checkpoint 2026-11-06 21-44-23 UTC [1030958878].md
T
memrelay 75ba66072c create: Checkpoint 2026-11-06 21:44:23 UTC [1030958878]
MemRelay-Operation: checkpoint-save:ckpt-host-agent-impl-done-20261107-0545
MemRelay-Resource: 25f13511-3553-4a94-a186-7e54b64a7c39
2026-11-07 05:44:25 +08:00

40 lines
2.7 KiB
Markdown
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.
---
title: Checkpoint 2026-11-06 21:44:23 UTC [1030958878]
type: checkpoint
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/checkpoint-2026-11-06-21-44-23-utc-1030958878
stable_id: 25f13511-3553-4a94-a186-7e54b64a7c39
scope: project
memory_type: checkpoint
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: ckpt-host-agent-impl-done-20261107-0545
created_at: '2026-11-06T21:44:23.301374+00:00'
updated_at: '2026-11-06T21:44:23.301374+00:00'
tags:
- host-agent
- checkpoint
---
# 宿主机代理与首页优化:三端实现完成,进入本地联调
分支 feat/host-agent,工作区未提交。
## 已完成
- Go 代理 plugins/MetrixHostAgent(module metrix/hostagent):WS 连接/重连/心跳、指标每 2 秒、统一 NTP 模型(chrony/timesyncd/ntpd/ntpsec/openntpd/busybox/none)、ntp.* 任务、time.set、打包 scripts/build.ps1 + packaging/install.sh/uninstall.sh。go test 通过。
- 前端 web/src/modules/host/:首页性能卡、公告可收缩、服务器时间去时区 + 静默同步按钮(无任何提示)、系统设置「宿主机」页签(适配器编辑、自定义流程编辑器、预览/测试)。typecheck/smoke/build 通过(构建输出到临时目录)。
- 后端 server/app/modules/host/:表 host_settings/host_upstream_adapters/host_time_sync_records;权限 action:host:read|time_sync|manage;上游插件框架(iKuai、自定义 HTTP 流程、自动识别);代理 hub;后台异步同步任务;审计。新增 23 个测试,全量 130 通过 2 跳过。新增依赖 tzdata。新增错误码 error.hostNtpServerInvalid、error.hostTimeSourceInvalid。管理类修改接口需网页登录态。环境变量 METRIX_HOST_AGENT_URL 可覆盖 connect_url。
## 契约
Temp/host-agent/CONTRACT.md(WS /api/host-agent/connect,Bearer mha_ token,关闭码 4401/4409)。
## 下一步
1. 本地联调(进行中):8133/5181 临时实例 + 假 iKuai + 假通用设备 + dry_run 代理,浏览器验证三种同步方式、首页零提示、不卡页面;修复跨端不一致;提交并推送 feat/host-agent(不合并 main)。
2. 生产发布:部署 Metrix、生成代理令牌存入密码库、安装代理、NTP 服务器保持 192.127.115.1 不改、自动识别 iKuai、用密码库「iKuai 管理面板」配置适配器、实际同步一次并核对。
3. 提交推送后开始 Metrix 全面代码审查(不含 plugins),输出 Temp/review/Metrix-代码审查报告.md;CapacityReport 审查报告进行中。
## 注意
- 本地 8131 实例(PID 20204)服务 web/dist,不要停。
- 不提交 plugins/InterferenceETL 子模块指针、Temp、dist、密钥。
- 修改 iKuai 时间会影响生产。