feat(daemon/p04): fyne 托盤殼 + collector 看守器(CP-1 第6關產品化,leo 定 fyne)

leo 2026-07-21 回「fyne」。交付「可交付的殼」:
- collector/supervisor(純 stdlib,無 fyne):看守 collector direct 子行程、串 stdout JSON 出
  狀態(看守中/上次同步/出錯自動重試/已暫停)、崩潰重起、Stop 同步等 loop 收掉(修 Stop→Start
  換資料夾時舊 loop 覆寫新狀態的 race)。**sandbox `go test -race ./... 全綠(6 測,含 race)**,
  既有 collector 測試零回歸。
- collector/cmd/arcrun-tray(獨立 module,隔開 fyne CGo 依賴):選單列/系統匣 icon+狀態+
  選資料夾(原生對話框)/暫停·繼續/打開資料夾;關窗縮背景;watch_folder 預設 ~/ArcrunRAG 避開
  ~/Documents 的 TCC 禁區;wires supervisor。

誠實界定(mindset §7):
- **in-process vs 子行程**:leo 偏好 in-process,但 collector 是 package main,真 in-process 需抽核心成
  library(動已驗引擎有回歸風險)→ 本版走子行程看守(collector 零改、崩潰隔離),行為對用戶相同;
  in-process 抽取列可選後續,待 leo 裁。
- **fyne GUI 沙箱編不了**(CGo+GL)→ build/簽章/TCC 授權=leo/地端真機做(紅線②③);
  fyne API 細節以首次真機 build 為準。README 附建置/簽章/TCC 交接。
This commit is contained in:
cloud-worker
2026-07-21 09:27:55 +00:00
parent ad34a87210
commit 9e356e3d99
5 changed files with 666 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
// 獨立 module:把 fyneCGo/GL)依賴與純 stdlib 的 collector module 隔開,
// 讓 collector 模組維持 `go test ./...` 可在無 GUI 環境驗證。
// 本 module 在 Mac/Windows 真機 buildleo/地端):`go mod tidy && fyne package`。
module arcrun-rag/collector/cmd/arcrun-tray
go 1.22
require (
arcrun-rag/collector v0.0.0
fyne.io/fyne/v2 v2.5.3
)
// 複用同 repo 的 supervisor 套件(純 stdlib)。
replace arcrun-rag/collector => ../../