|
|
ddf0eb8147
|
fix(local-tool): KL520 首次 connect 跳過不必要的 device reset
使用者 Windows 上 connect KL520 耗時 60+ 秒且前端收到 504 timeout。
根因分析(從 log 逐行推斷):
1. server 啟動後首次 connect → needsReset=true → restartBridge()
2. reset 送出 → KL520 reboot → 退回 KDP2 Loader 模式(USB Boot 裝置,
reset = firmware 從 RAM 清掉)
3. USB 重新枚舉 8 秒 → 新 bridge process → 嘗試 reconnect
4. Loader 模式的 connect_devices_without_check 不穩定 → attempt 1 fail
(16 秒 timeout) → attempt 2 成功 (4 秒)
5. 載 firmware fw_scpu.bin → 31 秒
6. firmware loaded → 再次 reboot → 5 秒後 reconnect
7. 總時:8 + 16 + 4 + 31 + 5 = 64 秒 > 前端 60 秒 HTTP timeout → 504
但 KL520 是 USB Boot 裝置,每次斷電 firmware + model 就會清掉,connect
時本來就是 clean state。server 啟動後主動 reset 是多餘的——它把完整
firmware 砍掉再重載一次,浪費 60 秒且 Loader 模式 connect 不穩定。
這個 reset 邏輯最初是為 KL720 設計的:KL720 是 flash-based 裝置,
firmware 和 model 保留在 flash,reset 清 stale model 才有意義。
修法:needsReset 條件加上 chipType == "KL720"。KL520 跳過 reset,
直接使用已有的 firmware。如果 KL520 真的有殘留 model 要清(理論上
不會因為它是 RAM-based),下次 load_model 前的 restartBridge 會處理。
修復後 KL520 connect 預期時間:2-5 秒(一次 connect + set_timeout)。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-16 22:49:01 +08:00 |
|
|
|
abbe9d4c0b
|
fix(local-tool): DeviceGroup.__del__ access violation 全面修復
上一個 commit (a6a121a) 只修了 script 結束時的 cleanup,但使用者仍在
connect 重試路徑看到 access violation:
connect attempt 1 failed → 新 connect attempt 2 → GC 回收 attempt 1
的舊 DeviceGroup → __del__ → kp_disconnect_devices 對已失效的 native
handle → OSError: access violation
根因:`_device_group = None` 只是清掉 Python reference,舊物件的 __del__
會延遲到下一次 GC cycle(可能發生在新 connect call 的 allocation 時),
此時 native handle 已 invalid。
修法:
- 新增 `_clear_device_group()` helper:先 kp.core.disconnect_devices 把
native handle 正常釋放(errors silenced),再設 None
- 全檔搜 `_device_group = None` 共 12 處,除了初始宣告(L40)和兩個 helper
自身(_clear_device_group / _cleanup)以外全部替換為 _clear_device_group()
- 涵蓋所有 code path:connect retry / firmware load reconnect / disconnect
handler / reset handler / error fallback
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-16 17:20:12 +08:00 |
|
|
|
a6a121ae86
|
fix(local-tool): suppress KneronPLUS DeviceGroup.__del__ access violation
Windows 上 bridge script 結束時 Python GC 呼叫 DeviceGroup.__del__ →
kp_disconnect_devices 對已釋放的 native handle 操作 → OSError: access
violation reading 0x00...0C。這是 KneronPLUS SDK 的 destructor 沒做
null check 的已知問題,不影響功能但會印嚇人的 stack trace 到 stderr。
修法:
- 新增 _cleanup() 函式:明確 kp.core.disconnect_devices + 把
_device_group 設 None(讓 __del__ 成 no-op)
- atexit.register(_cleanup) 確保 interpreter 關閉前 cleanup
- main() return 後也同步呼叫一次(belt-and-suspenders)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-16 15:40:30 +08:00 |
|
|
|
4f9a193782
|
chore(local-tool): 移除模型 FPS/latency/accuracy 預估值
使用者要求拿掉 FPS 預估數字(未經實測,不準確)。
- docs/LOCAL-TOOL-SPEC.md: 模型表格移除 FPS 欄位
- server/data/models.json: 7 個模型全部移除 fps / latencyMs / accuracy 欄位
前端 model-detail / model-card 有讀這些欄位的 UI,移除後會顯示 — 或不顯示
該列,不需要額外前端改動(已有 null/undefined fallback)。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-16 15:01:25 +08:00 |
|
|
|
9793a2efc1
|
chore(local-tool): models.json 只保留有實體 .nef 的 7 個預設模型
使用者要求:前端模型庫只保留有適配裝置的模型(KL520 4 個 + KL720 3 個)。
原本 models.json 有 15 筆:
- 8 筆 ONNX framework 的 demo 模型(yolov5-face-detection /
imagenet-classification / person-detection / vehicle-classification /
hand-gesture-recognition / coco-object-detection / face-mask-detection /
license-plate-detection)— 都沒有實體 .nef 檔,是 placeholder metadata
- 7 筆 NEF framework 的實體模型(每個都有 filePath 指向 data/nef/)
現在只保留 7 筆實體模型:
KL520(4 個):
- kl520-yolov5-detection (yolov5 no-upsample 640x640)
- kl520-fcos-detection (fcos-drk53s 512x512)
- kl520-ssd-face-detection (ssd_fd_lm 320x240)
- kl520-tiny-yolov3 (tiny_yolo_v3 416x416)
KL720(3 個):
- kl720-yolov5-detection (yolov5 no-upsample 640x640)
- kl720-resnet18-classification (resnet18 224x224)
- kl720-fcos-detection (fcos-drk53s 512x512)
server/data/models.json 是 runtime 讀取,三平台(macOS/Windows/Linux)
共用同一份,改一次三平台全部生效。
驗證:
- python3 json.load 解析正常,7 筆 entries
- 每筆 filePath 指向的 .nef 實體檔都存在於 server/data/nef/{kl520,kl720}/
- 檔案大小:1-13 MB,合計 ~64 MB
- macOS dmg 重 build 163MB OK
- Bundle 內 Contents/Resources/data/models.json 更新為 7 筆
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-16 08:44:16 +08:00 |
|
|
|
d7cddf364b
|
fix(local-tool): 拆 built-in / user data dir — 修預設模型永遠載入 0 個
M8-10a smoke test 抓到 M1 就潛藏的 P0 latent bug:server 預設 dataDir =
<binary>/data,bundle 內解析成 Contents/Resources/bin/data/(空目錄),
實際 models.json + 8 個 .nef 住在 Contents/Resources/data/(上一層)。
Wails 又傳 --data-dir 成 user home(writable),同樣沒 models.json。
結果任何正式啟動路徑下 /api/models 都回 total: 0,M1-M7 smoke 從沒
跑過這個 endpoint 才漏抓。
修法:把「read-only bundle 內資料」和「writable user 資料」語意拆開。
- 新增 findFirstExisting(candidates, sentinel) helper
- 新增 resolveBuiltInDataDir:①VISIONA_BUNDLE_LIB_DIR/data(AppImage)
②<base>/data ③<base>/../data ④<base>/../Resources/data
⑤<base>/../lib/visiona-local/data(Linux FHS)。命中條件是
models.json 存在為 regular file,避開 Wails build artifact 留下的
空 data/ 目錄
- main() 拆 builtInDataDir(modelRepo + flash.Service 用)與 dataDir
(custom-models / sentinel / logs 用),職責分明
- flash.NewService 改吃 builtInDataDir — 它要解析 models.json 裡的
相對路徑 "data/nef/kl520/xxx.nef",來源是 bundle 不是 user home
- resolveBridgeScript 同步修(同樣的技術債一起清),候選 env var 優先
+ FHS fallback,避免 Linux AppImage 上 kneron_bridge.py 也找不到
- fallback 全 filepath.Abs 化,log.Printf 印嘗試過的路徑清單便於除錯
驗證(build / vet / test + smoke)全綠:
- macOS bundle:/api/models → 15 models ✅
- dev mode(server/ 下 go run):15 models ✅
- Linux AppImage 模擬 + env var:命中候選 1 ✅
- Linux AppImage 模擬 + 無 env var:命中候選 5(FHS)✅
- 全不命中:log 印完整 tried 清單 + server 不 crash ✅
Reviewer 兩輪通過。第一輪抓到 Linux AppImage 未覆蓋(Major-1)+ 2 Minor
+ 2 Suggestion;第二輪確認全部處理到位、新發現兩項非阻擋風格建議列為
技術債。報告見 .autoflow/05-implementation/reviews/review-m8-10a-*.md。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-15 20:23:25 +08:00 |
|
|
|
8cd5751ce3
|
feat(local-tool): M8 重構 — Wails 控制台 + 瀏覽器 Web UI(R5 決策)
依 R5 五輪決策把 visionA-local 從「Wails 內嵌 Next.js」重構為「Wails
本機伺服器控制台 + 瀏覽器 Web UI」模式(類比 Docker Desktop / Ollama)。
程式碼變動
- M8-1 砍 yt-dlp 全套(後端 resolver / URL handler / 前端 URL tab /
Makefile vendor / installer / bootstrap / CI workflow,-555 行)
- M8-2 砍 Mock 模式全套(driver/mock、mock_camera、Settings runtimeMode、
VISIONA_MOCK 環境變數,-528 行)
- M8-3 ffmpeg 從 GPL 切換到 LGPL 混合方案:Windows/Linux 用 BtbN 現成
LGPL binary,macOS 自 build minimal decoder-only 進 git
(vendor/ffmpeg/macos/ffmpeg 5.7MB + ffprobe 5.6MB,比 GPL 版省 85% 空間)
- M8-4 Wails Server Controller:state machine、log ring buffer 2000 行、
preferences.json atomic write、boot-id、Gin SkipPaths、shutdown 7+1 秒、
notify_*.go 三平台 OS 通知、watchServer 改 Error state 不 os.Exit
- M8-4b 啟動階段管線 R5-E:6 階段進度 event、20s soft / 60s hard timeout、
stage 5/6 skip 規則、sentinel file、RestartStartupSequence 5 步驟
- M8-5 Wails 控制台 vanilla HTML/JS/CSS(9 檔 ~2012 行)取代 M7-B splash:
state 視覺、log panel、startup progress panel、Stage 6 manual CTA
pulse、shutdown modal、Settings、Dark Mode、i18n 中英雙語
- M8-6 上傳影片副檔名擴充(mp4/avi/mov/mpeg/mpg)
- M8-7 Web UI Server Offline Overlay(role=alertdialog + focus trap +
wsEverConnected 容錯 + Page Visibility)
- M8-8 CORS middleware(127.0.0.1/localhost only + suffix attack 防護)+
ws/origin.go 獨立 WebSocket CheckOrigin 避 package cycle
- MAJ-4 server:shutdown-imminent WebSocket broadcast 機制
(/ws/system endpoint + notifyShutdownImminent helper)
- M8-9 Boot-ID + 瀏覽器 tab 自動重連(sessionStorage loop guard)
品質
- ~105+ 新 unit test + race detector (-count=2) 全綠
- 10 個 milestone 全部通過 Reviewer 審查
- 三方 v2 + v2.1 文件(PRD / Design Spec / TDD)+ 交叉互審紀錄
收錄在 .autoflow/
交付前待處理(M8-10)
- 重跑 make payload-macos 把舊 GPL 77MB binary 換成新 LGPL
- 三平台 end-to-end build 驗證
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-15 17:57:54 +08:00 |
|
|
|
c0317225ca
|
feat(local-tool): yt-dlp 錯誤訊息友善化 + 載入逾時提示
ResolveWithYTDLP 改善:
- 新增 friendlyYTDLPError() 把 yt-dlp 的技術性 stderr 訊息轉成繁中提示
- 涵蓋 9 種常見失敗原因:
年齡限制 / 私人影片 / 已移除 / 版權 / 直播 / 首播 / DRM / 頻率限制 / 無格式
- 錯誤訊息同時附上原始 stderr(方便 debug)
- yt-dlp 未安裝時改用繁中提示
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-13 00:56:15 +08:00 |
|
|
|
00192d3d1e
|
fix(local-tool): yt-dlp / ffmpeg 找不到 — VISIONA_BUNDLE_BIN_DIR 加到 PATH
根因:Go 1.19+ Windows 的 exec.LookPath 不再搜尋 current directory,
而 exec.Command("yt-dlp") / exec.Command("ffmpeg") 只走 LookPath。
Wails app 有設 VISIONA_BUNDLE_BIN_DIR 環境變數指向 {app}\bin\,
但 server 的 deps/checker.go 只在 startup 檢查時用它,沒把它加到 PATH。
修法:server main.go 啟動時把 VISIONA_BUNDLE_BIN_DIR prepend 到 PATH。
這一次解決三個問題:
- yt-dlp: cannot run executable found relative to current directory
- ffmpeg 攝影機列舉找不到 ffmpeg binary
- ffmpeg camera capture 也找不到
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 23:32:02 +08:00 |
|
|
|
96dee565b3
|
fix(local-tool): 補上 Kneron KL520/KL720 韌體檔案
根因:KL520 在 USB Boot 模式下(fw=KDP2 Loader)需要先載入韌體到 RAM
才能接受模型載入。kneron_bridge.py connect 流程會自動呼叫
kp.core.load_firmware_from_file(),但前提是找到韌體檔案:
scripts/firmware/KL520/fw_scpu.bin + fw_ncpu.bin
scripts/firmware/KL720/fw_scpu.bin + fw_ncpu.bin
這些檔案在 M1 從 edge-ai-platform 搬程式碼時漏了,補入。
Makefile 的 payload-windows/linux/macos 的 cp -R server/scripts/
會自動帶入 firmware/ 子目錄。
KL520: scpu 51KB + ncpu 39KB
KL720: scpu 128KB + ncpu 2.0MB
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 23:11:47 +08:00 |
|
|
|
aa324cef42
|
fix(local-tool): flash 模型檔案找不到 — 相對路徑未解析
根因:models.json 的 filePath 是相對路徑("data/nef/kl520/xxx.nef"),
但 server working directory 是 {app}\bin\(app.go 設 cmd.Dir = binary 目錄),
所以 server 在 {app}\bin\data\nef\ 找 .nef 檔,找不到。
實際位置:{app}\data\nef\(installer 裝的位置),對應 server 的 --data-dir
由 Wails app 傳入的 %APPDATA%\visiona-local(或 fallback 到 <exe>/../data)。
修法:
- flash.NewService 新增 dataDir 參數
- StartFlash 中把相對 filePath 用 dataDir 拼接成絕對路徑:
"data/nef/..." → 去掉 "data/" 前綴 → dataDir + "/nef/..."
- main.go 傳 dataDir 給 flash.NewService
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 22:03:28 +08:00 |
|
|
|
3c6971febd
|
fix(local-tool): Review M1-M4 + m5 修復 — flash 生命週期 + store 隔離
Review 問題修復:
M1(寫已關閉 channel panic):
- flash service goroutine 改成先等 driver.Flash() 返回,再寫 error 訊息,最後 close
- driver.Flash 返回後保證不再寫 progressCh,消除 race condition
M2(FlashTask 永不清除 memory leak):
- service.go 新增 CleanupTask(taskID) 公開方法
- device_handler.go 的 goroutine 在 `for range progressCh` 結束後呼叫 CleanupTask
M3(同裝置重複 flash taskID 衝突):
- ProgressTracker.Create 改成:舊 task 未完成時返回 nil
- StartFlash 檢查 nil → 回傳 "flash already in progress" 錯誤
M4(前端 flash store 全域不區分 deviceId):
- flash-store.ts 新增 activeDeviceId 欄位
- updateProgress 改接 (deviceId, progress),比對 activeDeviceId 防止混裝
- use-flash-progress.ts 的 WebSocket callback 傳入 deviceId
m5(flash_ws.go 雙重 conn.Close):
- read pump goroutine 移除 defer conn.Close(),由外層 defer 統一關閉
額外修復(S4):
- modelPath 為空時直接回 error 而非傳無效路徑給 driver
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 20:16:24 +08:00 |
|
|
|
44711753ae
|
feat(local-tool): 推論功能完整搬入 — flash 模組 + workspace 推論介面
## 後端(Phase 1)
新增 flash 模組(從 edge-ai-platform 搬入):
- server/internal/flash/service.go:StartFlash + 模型相容性檢查 + 晶片 NEF 解析
- server/internal/flash/progress.go:Flash 進度追蹤器
- server/internal/api/ws/flash_ws.go:WebSocket 推送 flash 進度
- device_handler.go:新增 FlashDevice method + flashSvc 欄位
- router.go:新增 POST /api/devices/:id/flash + WS /ws/devices/:id/flash-progress
- main.go:初始化 flash.NewService 並傳入 router
推論/攝影機/MJPEG/inference WebSocket 之前 M1 已搬好,不需改動。
Python bridge (kneron_bridge.py) 與 edge-ai-platform 完全相同,不需改動。
## 前端 store + hooks(Phase 2)
- stores/flash-store.ts(新):Zustand store — startFlash / updateProgress / retryFlash / reset
- hooks/use-flash-progress.ts(新):WebSocket hook 接收 flash 進度
inference-store / camera-store / inference types / use-inference-stream / use-websocket
之前 M1 已搬好,不需改動。
## 前端 UI 元件(Phase 3)
- components/devices/flash-dialog.tsx(新):模型載入對話框 + 硬體相容性檢查
- components/devices/flash-progress.tsx(新):Flash 進度條 + 錯誤重試
camera-inference-view / camera-feed / camera-overlay / source-selector /
inference-panel / performance-metrics / classification-result / confidence-slider /
video-progress / batch-image-thumbnails 之前 M1 已搬好。
## 前端頁面整合(Phase 4)
- workspace/page.tsx:繁中硬編碼、顯示已載入模型名稱
- workspace/[deviceId]/workspace-client.tsx:加入 FlashDialog 按鈕 + 繁中硬編碼
- devices/[id]/device-detail-client.tsx:加入 FlashDialog + 「進入工作區」按鈕(模型已載入才顯示)
- device-card.tsx:已連線 + 模型已載入時顯示「工作區」快捷按鈕
## 使用者操作流程
裝置列表 → 連線 → 管理 → 載入模型 → 進入工作區 → 選攝影機/圖片/影片 → 開始推論 → 看 bounding box / FPS / latency
或:裝置列表 → 工作區(已有模型)→ 直接推論
## 不搬的東西
- cluster/* 全部不搬(已砍 cluster 功能)
- relay / tunnel 相關不搬
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 20:07:09 +08:00 |
|
|
|
819885c85d
|
fix(local-tool): SPA fallback 改用 Next.js dynamic route shell HTML
根因:點模型卡片 → /models/yolov5-face-detection → server SPA fallback
固定回傳根路徑 /index.html(儀表板) → Next.js CSR router 初始化時
pathname 對不上 → 使用者被跳回儀表板。
修法:spaFallback handler 改成三層 fallback:
1. 精確檔案(/models/index.html 等)
2. Next.js dynamic route shell(把最後一段替換為 _ → /models/_/index.html)
這是 generateStaticParams 產的 placeholder 頁面,Next.js CSR 會從 URL
讀真正的 param 值
3. 根目錄 /index.html(最終 fallback)
這修好了:
- 模型詳情頁 /models/:id 不再跳回儀表板
- 裝置詳情頁 /devices/:id 同理
- 工作區裝置頁 /workspace/:deviceId 同理
- Sidebar active 狀態也會正確(因為 pathname 匹配了)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 19:44:25 +08:00 |
|
|
|
d1ff55005a
|
debug(local-tool): driver install verbose 輸出 + 安裝後自我驗證
- Python script 對每個 PID install 後 capture traceback,不再 swallow
- 裝完立刻 scan_devices() 驗證 SDK 能不能開 handle,印 is_connectable
- 安裝結果完整寫到 server.stderr.log(而不是只回錯誤摘要)
- 判斷 DONE 標記 + 至少一個 OK 才算成功
這讓我們能清楚看到 libwdi 到底是「沒權限 / DLL 載入失敗 / 綁定成功但
裝置 is_connectable 還是 False(代表 driver 層級 OK 但裝置需要重插)」
哪一種情境,而不是只看到籠統的「error 28」。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 07:38:43 +08:00 |
|
|
|
4902cb5531
|
feat(local-tool): Kneron WinUSB driver 透過 KneronPLUS SDK libwdi 安裝
根因:
KP_ERROR_CONNECT_FAILED (error code 28) — Kneron USB 裝置預設沒綁定
WinUSB driver,SDK 無法開 handle。原 .iss 的 pnputil /add-driver 做法
需要 .cat 簽章(Windows 10/11 driver signing enforcement),我們沒有。
參考 edge-ai-platform/installer/platform_windows.go 的 installKneronDriverViaSDK:
KneronPLUS SDK 內建 libwdi wrapper — kp.core.install_driver_for_windows(pid)
libwdi 會自動用臨時自簽憑證,不需要 .cat 檔,只需要 UAC 提權。
實作:
- server/internal/api/handlers/system_driver_windows.go(新):
組 Python script → kp.core.install_driver_for_windows 對 KL520/KL720/KL720_LEGACY →
PowerShell Start-Process -Verb RunAs 提權執行 → 結果寫 temp 檔讀回
- server/internal/api/handlers/system_driver_other.go(新):非 Windows stub
- system_handler.go: NewSystemHandler 新增 pythonBin 參數 + InstallDriver handler
先判斷 runtime.GOOS==windows 才執行
- router.go: 新增 POST /system/install-driver
- main.go: 解析 pythonBin(VISIONA_PYTHON env var → cfg.PythonBin)傳入
前端:
- frontend/src/app/devices/page.tsx:Windows only 多一個「安裝 USB Driver」按鈕
(用 navigator.userAgent 判斷平台)
- frontend/src/stores/device-store.ts:connect 失敗訊息偵測 winusb / error 28 /
KP_ERROR_CONNECT_FAILED 特徵字串,回一條明確的繁中提示引導使用者去點按鈕
Wails app 端:
- visiona-local/app.go: 新增 InstallKneronDriver() binding 作為備用入口(目前前端沒用到,
因為前端跑在 http://127.0.0.1 不是 wails://,但保留給未來 splash 階段觸發用)
- visiona-local/platform_{windows,darwin,linux}.go: installKneronWinUSBDriver 平台實作
/ 跨平台 stub
.iss:
- 移除 pnputil /add-driver 的 [Run] entry(它是 silent-fail 的 dead code,
因為沒 .cat 簽章)
- 新增註解說明:driver 安裝改由 app 端呼叫 libwdi 完成
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 05:25:32 +08:00 |
|
|
|
f8533a6b04
|
fix(local-tool): sidebar icon + Wails Windows icon.ico + 掃裝置路徑修復
sidebar E icon:
- frontend/src/components/layout/sidebar.tsx 左上角的 "E" 方塊換成 <img> 指向
/visiona-logo.png,從 frontend/public/visiona-logo.png serve
Wails 桌面/工作列 icon:
- 把 branding/icon.ico 複製到 visiona-local/build/windows/icon.ico
- Wails v2 Windows build 偵測到這個檔案就會直接用它當 exe embedded icon,
不再從 appicon.png 自動 resize(解析度更好)
掃裝置根因修復:
1. server main.go:新增 resolveBridgeScript() 智慧找 kneron_bridge.py
- 優先 <exe>/scripts/kneron_bridge.py
- fallback <exe>/../scripts/... 對應 Windows installer 的 {app}\bin\ + {app}\scripts\ 佈局
- fallback <exe>/../Resources/scripts/... 對應 macOS app bundle
2. server kneron/detector.go:ResolvePython 重寫
- 最高優先:VISIONA_PYTHON 環境變數(由 Wails 殼層注入)
- 加入 visiona-local 新路徑:%APPDATA%\visiona-local\runtime\venv、
~/Library/Application Support/visiona-local/runtime/venv、
~/.local/share/visiona-local/runtime/venv
- 保留 edge-ai-platform 舊路徑作為 legacy fallback
3. visiona-local/app.go:spawn server 時 export VISIONA_PYTHON=<pyBin>
讓 detector 直接用 Wails 殼層已經 resolve 好的 python interpreter,
不再自己獨立去找造成不一致。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-12 04:59:23 +08:00 |
|
|
|
c54f16fca0
|
Initial commit: visionA monorepo with local-tool subproject
local-tool/: visionA-local desktop app
- M1: Wails shell + Go server + Next.js UI + Mock mode (macOS dmg ready)
- M2: i18n (zh-TW/en) + Settings 4-tab refactor
- M3: Embedded Python 3.12 runtime (python-build-standalone) + KneronPLUS wheels
- M4: Windows Inno Setup script (build on Windows runner)
- M5: Linux AppImage script + udev rule (build on Linux runner)
- M6: ffmpeg (GPL, pending legal review) + yt-dlp bundled
- Lifecycle: watchServer health check, fatal native dialog,
Wails IPC raise endpoint, stale process cleanup
.autoflow/: full PRD / Design Spec / Architecture / Testing docs
(4 rounds tri-party discussion + cross review)
.github/workflows/: macOS / Windows / Linux build CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-11 22:10:38 +08:00 |
|