Commit Graph

27 Commits

Author SHA1 Message Date
Accusys 4b694a1c2d remove: Portal project (Core Team 不再維護前端)
- 移除 portal/ 目錄 (Vue 3 + Tauri 前端)
- 更新 AGENTS.md 移除 Portal 相關說明
- 更新代碼註釋移除 Portal 引用
- 前端開發統一由 Studio Team 負責

參考: docs_v1.0/OPERATIONS/GUI_ARCHITECTURE_REVIEW.md
2026-09-30 18:59:40 +08:00
Accusys 6bac60bcf8 feat: add rust_register CLI tool
新增功能:
- 獨立的 register CLI 工具
- 不依賴 API 和 Worker
- 直接註冊視頻文件到數據庫

特性:
- ✅ 元數據提取 (ffprobe)
- ✅ Birth UUID 計算
- ✅ Force 模式 (覆蓋已存在)
- ✅ 詳細輸出模式
- ✅ 錯誤處理

使用方法:
```bash
# 註冊文件
rust_register /path/to/video.mp4

# 強制重新註冊
rust_register /path/to/video.mp4 --force

# 詳細輸出
rust_register /path/to/video.mp4 --verbose
```

功能:
1. 文件驗證
2. UUID 計算 (birth UUID)
3. 元數據提取 (duration, resolution, fps)
4. 數據庫插入
5. Force 模式 (自動 unregister)

元數據:
- Duration: 8.80s
- Resolution: 1920x1080
- FPS: 59.94
- Total frames: 527

優勢:
- 同步執行(無需等待 Worker)
- 獨立運行(無需 API Server)
- 詳細輸出(便於調試)

文檔:
- docs_v1.0/OPERATIONS/Rust_Register_CLI_Tool.md

測試:
- ✅ 編譯成功
- ✅ 基本註冊測試通過
- ✅ Force 模式測試通過
- ✅ Verbose 模式測試通過

Binary:
- target/debug/rust_register
2026-09-28 19:27:43 +08:00
Accusys 06397e5957 feat: add rust_unregister CLI tool
新增功能:
- 獨立的 unregister CLI 工具
- 不依賴 API 和 Worker
- 直接刪除數據庫、文件、Qdrant、Redis

特性:
- ✅ 完整刪除功能
- ✅ Dry-run 模式
- ✅ 詳細輸出模式
- ✅ 錯誤處理

使用方法:
```bash
# 模擬刪除
rust_unregister --uuid <uuid> --dry-run

# 實際刪除
rust_unregister --uuid <uuid> --verbose
```

刪除內容:
1. 數據庫記錄 (19 個表)
2. 輸出文件
3. Qdrant 向量 (7 個 collections + workspace)
4. Redis keys

優勢:
- 同步執行(無需等待 Worker)
- 獨立運行(無需 API Server)
- 詳細輸出(便於調試)

文檔:
- docs_v1.0/OPERATIONS/Rust_Unregister_CLI_Tool.md

測試:
- ✅ 編譯成功
- ✅ Dry-run 測試通過
- ✅ Help 信息正確

Binary:
- target/debug/rust_unregister (27MB)
2026-09-28 18:51:55 +08:00
Accusys 835772ba73 fix: add face tracking to Swift processor path
- Add track_faces() call to Swift Face processor path
- Previously only in Python processor path
- Now all paths execute face tracking
- Test successful: 212/212 faces have trace_id
- 9 traces detected in test video (020.mp4)
2026-09-27 02:58:47 +08:00
Accusys 357e585399 fix: Face processor now saves status and total_faces to face.json 2026-09-26 23:06:11 +08:00
Accusys 7c54c7b7e7 feat(cleanup): add orphan vector cleanup bin + Studio scene VLM search design suggestions
- src/bin/cleanup_orphan_vectors.rs: one-time tool to scan per-file Qdrant
  collections (rule1/_faces/_scenes/_vlm/_seeds/face_embeddings/speaker),
  dry-run support, delete points whose file_uuid is no longer registered.
  Used to remove 53,122 orphan vectors across all production collections.
- docs: scene VLM search design suggestions for Studio team (8868 proxy)
2026-09-23 19:28:11 +08:00
Accusys 9f12e835b8 feat: add TraceArtifacts phase + VLM waits for all key_frame.jpg
- Add TraceArtifacts phase to TkgPhase enum (phase 18)
- Report progress as key_frame.jpg/key_face.jpg are created
- VLM trigger now polls until ALL key_frame.jpg files exist
  (was: started after TKG build, before artifacts were ready)
- Add iron rule to AGENTS.md: ask before removing data

Tested: Gamma 8 (27 traces) → 27/27 VLM summaries completed
2026-08-24 19:13:11 +08:00
Accusys 476a31ecc6 feat: P5 VLM Summary pipeline integration + trace_profile vlm_summary field
- Add src/core/processor/vlm_summary.rs: VLM + Embedding pipeline stage
  * Reads key_frame.jpg → Ollama llava:7b → vlm_description
  * Writes DB (vlm_description, vlm_model, vlm_embedding) + on-disk JSON
  * EmbeddingGemma → Qdrant upsert (chunk_type=vlm_summary)
  * Non-blocking: errors logged, does not prevent job completion
  * Redis progress tracking: vlm_summary stage N/M traces

- Add src/bin/backfill_trace_vlm.rs: manual backfill binary
  * Supports --file-uuid, --force, --limit flags
  * Concurrency: 2 parallel VLM calls

- Add vlm_embedding JSONB column to trace_profiles (schema + migration)
- Add vlm_summary field to FaceTraceProfile struct
- Add P5 trigger in job_worker.rs (has_face + no-face paths)
- Add VLM monitoring to ingestion_complete() (non-blocking)
- Update .env / .env.development: VISION_URL → Ollama 11434
2026-08-22 09:52:04 +08:00
Accusys 9244dbc853 fix: rebuild key_face.jpg for KOBA file with VFR-correct frames
- Force rebuilt all 37 traces for file 5e207a246fd6a2a65ee0a267440465ee
- Used select=eq(n\,frame) for VFR compatibility
- Each trace now uses best face (highest confidence) frame
2026-08-07 16:46:22 +08:00
Accusys ca8b910d59 fix: schema.rs COALESCE加固 + rebuild_trace_thumbs tool
- schema.rs: ON CONFLICT 加入 COALESCE 避免 edge case 把回填值打回 NULL
- rebuild_trace_thumbs: 從 Qdrant _faces 找 best face 重建 key_face.jpg
- 已完成 61/10184 traces(工具運作中,大檔案需較長時間)
2026-08-07 15:55:30 +08:00
Accusys b52777ac03 feat: add backfill_trace_profiles tool + backfill 8250 traces avg_confidence
- Created src/bin/backfill_trace_profiles.rs
- Queries Qdrant _faces once per file (optimized)
- Calculates avg confidence per trace
- Updates trace_profiles.avg_confidence and tkg_nodes.properties
- Backfilled 8250/9877 NULL traces (remaining 102 are edge cases without Qdrant data)
2026-08-07 14:26:39 +08:00
Accusys 3d13a06bd9 feat: face fix deployment + trace_* regeneration + executor stderr filter fix
- swift_face.swift: frame rounding (.rounded()), conf 0.75, min_size 64
- trace_* directories regenerated for KOBA (37 traces, start_frame 5307)
- executor.rs: stderr filter now logs all non-empty stderr (was discarding)
- VAD not skippable in ASRX (main_fixed.py Step 2 always runs)
- Step 2.5 sentence boundary refinement added
- Cluster agent async endpoints + similarity transparency
- Keyword search: relationship text extraction, priority ordering
- Face fix handoff doc for Studio team
2026-08-05 00:13:50 +08:00
Accusys 85d5e1fe51 feat: trace_id i64→i32 fix, OCR search filter, Rule1 OCR trigger
- Fix trace_id SQL type mismatch: i64 → i32 in profile.rs structs and queries
- Add /ocr /asr /asrx search filter suffix to keyword/semantic/smart search
- Fix fetch_ocr_texts to handle both OCR data formats (string array + object array)
- Add has_ocr trigger for Rule1 chunk ingestion in job_worker.rs
- Add search_bm25 chunk_type filter parameter
- Fix single-frame video clip duration (0-frame → 1-frame minimum)
- Re-run Rule1 for 14 files with stuck OCR in pre_chunks
2026-07-30 19:34:35 +08:00
Accusys 17e4e15860 feat: add Vision LLM integration (CLIP + Qwen3-VL cascade)
- Add Qwen3-VL dynamic management (start/stop/status CLI)
- Add CLIP + Qwen3-VL cascade detection strategy
- Add Vision CLI commands (vision start/stop/status, detect)
- Add cascade_vision processor module
- Add clip processor module
- Add qwen_vl_manager module

Changes:
- scripts/start_qwen3vl.sh, stop_qwen3vl.sh: Qwen3-VL management scripts
- src/core/vision/: Qwen3-VL manager module
- src/core/processor/cascade_vision.rs: CLIP + Qwen3-VL cascade logic
- src/core/processor/clip.rs: CLIP classification and detection
- src/api/clip_api.rs: CLIP API endpoints
- src/cli/vision.rs: Vision CLI implementation
- src/cli/args.rs: Add Vision and Detect commands
- src/main.rs: Integrate Vision CLI
- src/core/mod.rs: Add vision module
- src/core/processor/mod.rs: Add cascade_vision module
2026-06-13 16:25:52 +08:00
Accusys e1572907ae feat: ASRX hybrid pipeline, identity history, worker fixes, checkpoint system 2026-06-02 07:13:23 +08:00
Accusys bebaa743ed feat: trace-level matching, health watcher/worker status, timezone config 2026-05-21 01:08:30 +08:00
Accusys 67ca846ccd feat: ASR output frame numbers + rename start/end to start_time/end_time
- Python: asr_processor.py detects FPS from CUT/ffprobe (no fallback), outputs start_frame/end_frame
- Rust: All AsrSegment structs use start_time/end_time with #[serde(alias)] for backward compat
- store_asr_chunks: prefers ASR output frames, falls back to time-based conversion
- Added backward compatibility test for old JSON format (start/end)

Breaking change: ffprobe/CUT FPS failure now aborts instead of using default 24fps
2026-05-19 13:22:38 +08:00
Accusys df47ed1417 feat: identity inactive cleanup — migration script + release.rs excludes status='inactive'
- New SQL migration: mark auto identities with no face references as inactive
- release.rs identities export now filters out status='inactive'
2026-05-14 14:46:30 +08:00
Accusys edb0e0bf7a fix: bundle vec0.dylib in package + deploy install (4/4 M4 items) 2026-05-13 20:46:29 +08:00
Accusys ffc30d7377 M4 handover: coordinate fixes, detector registry, deploy v2, YOLOv8s, identity lifecycle
- Fix swift_pose/swift_ocr Y-flip bugs (BUG-003~006)
- Add heuristic_scene module + post-processing trigger (replaces Places365)
- YOLOv5nu → YOLOv8s CoreML (+33% detections, +390% scene indicators)
- Per-table SQL export (split 4.7GB single file → 478MB max per table)
- Version/build check in deploy.sh (compare /health vs file_info.json)
- Add file_uuid column to identities table + backfill
- Identity pre-clean step in deploy (avoids UNIQUE conflicts on re-deploy)
- Stranger_xxx naming fix with UUID context
- Add DETECTOR_REGISTRY.md (25 detectors), DETECTOR_SELECTION_SOP.md
- Update SPATIAL_COORDINATE_REGISTRY.md (P layer, 6-layer architecture)
- New IDENTITY_LIFECYCLE.md
- M4 response docs for deploy_script_fix and 111614 test report
2026-05-13 20:00:47 +08:00
Accusys c0c0e6e8ea feat: self-contained deploy/verify scripts in release package
- Add deploy.sh: imports data.sql, copies video, copies output files, verifies
- Add verify.sh: checks file integrity + DB/offline status
- Both scripts included in tar.gz via release package command
- Package now deployable standalone without release CLI
2026-05-13 04:35:43 +08:00
Accusys bbf8e64752 feat: offline report from SQLite, no PostgreSQL needed
- Add render_offline_report.py — reads .sqlite directly
- Reports include: DB contents, TKG breakdown, density histogram,
  trace timeline, top identities, identity details card
- Supports --identity filter (like online mode)
- Add release visualize-offline <sqlite> [-i identity] [-o output]
- Works with exported .sqlite from export_sqlite.py
- Uses sqlite-vec vec0 tables for vector metadata
2026-05-13 03:10:59 +08:00
Accusys 2992a0e650 feat: service inventory, ERP reports, sqlite-vec integration, visualize tool
- Add SERVICE_INVENTORY_V1.0.0.md (25 source-verified tools, 3.7GB)
- Add ERP_SELECTION_REPORT.md (Odoo CE vs ERPNext comparison)
- Add SFTPGO_ODOO_REPLACEMENT.md (SFTPGo migration plan)
- Add SERVICE_GO_GITEA_BUILD.md (Go compiler + Gitea build report)
- Add release visualize command (face trace heatmap + identity filter)
- Add sqlite-vec integration (160MB SQLite with vec0 vector tables)
- Add export_identities.py, export_sqlite.py, render_face_heatmap.py
- Add Go, Gitea, Rust/Cargo, Swift, yt-dlp, SQLite, sqlite-vec to service CLI
- Fix package to include identities and identity_bindings in data.sql
- Update release list to show all deployed video stats
- Add V1.0.0 YAML frontmatter to all docs (DOCS_STANDARD compliant)
2026-05-13 02:37:45 +08:00
Warren e75c4d6f07 cleanup: remove dead code and duplicate docs
- Remove session-ses_2f27.md (161KB raw session log)
- Remove 49 ROOT_* duplicate files across REFERENCE/
- Remove 14 duplicate files between REFERENCE/ root and history/
- Remove asr_legacy.rs (dead code, replaced by asr.rs)
- Remove src/core/worker/ (duplicate JobWorker)
- Remove src/core/layers/ (empty directory)
- Remove 4 .bak files in src/
- Remove 7 dead private methods in worker/processor.rs
- Remove backup directory from git tracking
2026-05-04 01:31:21 +08:00
Warren 2b23d1cfbd feat: update core API, database layer, and worker modules
- Remove unused imports (n8n_search, universal_search, Client, Arc, etc.)
- Update API endpoints for identity, face recognition, search
- Fix postgres_db.rs search_videos parent_uuid column
- Add snapshot API and identity agent API
- Clean up backup files (.bak, .bak2)
2026-04-30 15:07:02 +08:00
Warren 1f84e5469f feat: backup architecture docs, source code, and scripts 2026-04-25 17:15:45 +08:00
Warren 82955504f3 feat: 新增 Job Worker 系統與 API 文檔全面更新 2026-03-26 16:16:34 +08:00