feat(t103): daemon 偵測雲端過舊+托盤更新入口——連動閉環

每輪 GET /health 取 bundle_version(5s timeout 失敗靜默);空或日期<minCloudBuilt
→ 托盤「⚠ 知識庫需要更新(點我)」開 install.arcrun.dev;結果進 status.json。
兩模組 go test 全綠(總管親跑)。leo:「daemon 和雲端是連動的」——自此用戶只看托盤。
(實作=子 CC;驗證+commit=總管)
This commit is contained in:
2026-07-28 16:15:12 +08:00
parent ef74c69023
commit f8450815d3
5 changed files with 139 additions and 0 deletions
+4
View File
@@ -355,10 +355,14 @@ func RunDirectOnce(cfg *DirectConfig, dryRun bool) ([]DirectResult, int, *Trigge
// t91:每輪寫狀態檔(只有 extractor 模式才有意義的計數;direct 雲端萃模式 extracted_ok=0)。
if !dryRun && cfg.Manifest != "" {
// t103:每輪順手 GET /health 取雲端版本(5s timeout,失敗靜默)。
cloudVer, cloudOK := fetchCloudVersion(cfg.CypherURL)
st := SyncStatus{
LastSync: time.Now().Format(time.RFC3339),
ExtractorOK: extractorOK,
ExtractorError: extractorError,
CloudVersion: cloudVer,
CloudCheckOK: cloudOK,
}
if cfg.Extractor != "" {
for _, r := range results {