viettranx
dabb1eaa11
feat(vault): workspace rescan endpoint with symlink-safe walker
Add POST /v1/agents/{agentID}/vault/rescan to backfill vault_documents
from filesystem. Walks agent workspace, registers missing/changed files,
publishes enrichment events for async summarize + embed + link classify.
Backend:
- SafeWalkWorkspace: symlink-safe walker with exclusion patterns,
resource limits (5K files, 500MB, 50MB/file), context deadline
- RescanWorkspace: hash-based dedup, path-based scope detection
(teams/{id}/ → team scope), idempotent via UpsertDocument ON CONFLICT
- Per-agent mutex (409 Conflict for concurrent rescans)
- Tenant-scoped workspace resolution (config.TenantWorkspace)
- Enrichment worker: semaphore-based parallel summarize (max 3 concurrent)
- Media files without summary skip LLM summarize, embed title+path only
- DRY: export InferTitle/InferDocType from vault pkg, remove from interceptor
- Auto-register text uploads in vault via onTextUploaded callback
Frontend:
- Rescan button in vault page header (FolderSync icon)
- Toast with result counts, 409 warning, error handling
- i18n strings for en/vi/zh
Security: skip all symlinks, boundary checks, per-file size limit,
tenant isolation via server-side workspace resolution.
2026-04-10 13:28:44 +07:00
..
2026-03-27 09:35:57 +07:00
2026-03-10 00:09:15 +07:00
2026-03-06 18:51:11 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-10 00:09:15 +07:00
2026-03-10 00:09:15 +07:00
2026-04-07 12:12:44 +07:00
2026-03-30 21:36:09 +07:00
2026-03-30 21:36:09 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-27 09:28:42 +07:00
2026-04-09 23:15:08 +07:00
2026-04-09 21:15:19 +07:00
2026-03-31 11:45:16 +07:00
2026-03-31 23:14:39 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 23:15:08 +07:00
2026-04-09 23:15:08 +07:00
2026-03-30 15:20:01 +07:00
2026-03-23 08:08:23 +07:00
2026-03-31 23:14:39 +07:00
2026-03-30 15:19:43 +07:00
2026-04-10 13:28:44 +07:00
2026-03-04 10:11:17 +07:00
2026-04-09 21:15:19 +07:00
2026-04-10 10:13:58 +07:00
2026-03-27 09:28:42 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-04 13:18:57 +07:00
2026-04-10 13:28:44 +07:00
2026-04-10 12:00:34 +07:00
2026-04-10 13:28:44 +07:00
2026-04-05 07:25:55 +07:00
2026-02-22 14:58:07 +07:00
2026-02-22 14:58:07 +07:00
2026-04-09 21:15:19 +07:00
2026-03-19 13:35:57 +07:00
2026-03-19 13:35:57 +07:00
2026-04-08 13:35:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-19 13:35:57 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-31 11:45:16 +07:00
2026-04-09 21:15:19 +07:00
2026-03-25 18:24:36 +07:00
2026-04-09 21:15:19 +07:00
2026-02-22 14:58:07 +07:00
2026-04-04 06:58:15 +07:00
2026-04-10 13:28:44 +07:00
2026-04-10 13:28:44 +07:00
2026-03-07 20:51:39 +07:00
2026-03-11 07:27:38 +07:00
2026-03-09 22:28:18 +07:00
2026-04-09 21:15:19 +07:00
2026-03-10 00:09:15 +07:00
2026-03-07 00:46:29 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-06 18:51:11 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-07 20:51:39 +07:00