jim800121chen 78c1343e9a fix(visionA-frontend): conversion init multipart 對齊 converter 規格 — ref_images + model_id
Phase 0.8b stage e2e 連環 2 個跨層 schema mismatch(5/2 寫 frontend 時對 converter spec 沒驗、5/16 stage e2e 第一次跑通才暴露)。

Bug #5 ref_images field name PHP-style 不對齊
- 現象:converter multer LIMIT_UNEXPECTED_FILE、visionA 透傳 → 400 validation_failed
- 原因:frontend `form.append('ref_images[]', img)`、converter `uploader.fields([{name:'ref_images',...}])`(Express/multer 標準、無 [])
- 修法:frontend `form.append('ref_images', img)`(FormData 多筆同 key、multer 自動收成陣列)

Bug #6 model_id 用 taskName 當值、converter 要 integer
- 現象(修完 Bug #5 後暴露):converter validator → 400 validation_error 「model_id 必須為非負整數」
- 原因:frontend `args.taskName ?? args.file.name` → 字串 "input" / "yolov5s_test";
       converter validator (`createJob.js:153-164`) 規定 integer 1-65535(KTC tool 內部 model 編號)
- 修法:新增 `generateConverterModelId()` helper(Math.random 1-65535)、每次 init 自動生成;
       taskName 留給 visionA UX(promote 後 model store 的 name),與 converter model_id 解耦

驗證:
- pnpm test src/lib/api/conversion.test 22/22 pass
- pnpm build 通過
- stage redeploy 兩次(commit ce6a657 後跑出 Bug #5、fix Bug #5 deploy 後跑出 Bug #6、fix Bug #6 已 deploy)

剩餘 e2e 待 user browser 真實上傳 ONNX file 驗證。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 11:21:23 +08:00

visionA

Innovedus visionA monorepo — Edge AI 開發平台(離線版 + 雲端版)。

開發環境快速啟動

make dev-up         # 起 backend + Member CenterOIDC+ Postgres
make frontend-dev   # 另開 terminal起 frontend dev serverpnpm dev
# 開瀏覽器 http://localhost:3000

完整流程(含 OAuth client 手動註冊、port 對照、疑難排解)見 docs/DEV-SETUP.md。 其他 targetmake help

子專案

專案 角色 狀態
local-tool/ 離線版 桌面工具Wails + Go + Next.js 穩定維護
visionA-frontend/ 雲端版 web 前端Next.js Phase 0 雛形
visionA-backend/ 雲端版後端Go雙 binaryapi-server + remote-proxy Phase 0 雛形
local-agent/ visionA Agent — 雲端版 local 端代理Wails + Go + Next.js Phase 0.5 雛形

架構關係

離線模式local-tool 單獨)
  使用者瀏覽器 → localhost:3721 (local-tool server) → Kneron 裝置

雲端模式visionA 雲端版 + visionA Agent
  使用者瀏覽器 → visionA-frontend (CDN) → visionA-backend (api-server)
                                                ↓ internal HTTP
                                       visionA-backend (remote-proxy)
                                                ↓ WebSocket + yamux tunnel
                                       使用者電腦上的 visionA Agent
                                                ↓ 本機 HTTP
                                       Agent 的內部 server → Kneron 裝置

兩種模式可在同一台電腦共存local-tool 和 visionA Agent 獨立安裝、不衝突)。

產品線原則

  1. local-tool 不動,需要時 fork
  2. 雲端 vs 本機差異只在前端部署位置
  3. 雲端 agent 的 server ≈ local-tool 的 server(差別在沒本機操作 UI
  4. 雲端 web UI 先抄 local-tool,之後再加新功能

文件

完整產品文件見 .autoflow/

License

TBD內部使用

Description
No description provided
Readme 120 MiB
Languages
Go 54.6%
TypeScript 33.4%
Python 3.8%
Makefile 1.8%
JavaScript 1.8%
Other 4.6%