WeKnora/internal/utils
zaqqmm 19542f2a1d
feat(datasource): add Seafile data source connector (#3616)
* fix(datasource): omit last_sync_cursor from the data source list response

The settings page polls GET /datasource every few seconds during a sync,
and connector cursors can grow to megabytes. No list consumer reads the
cursor, so NewDataSourceResponses now blanks it; detail, create and
update responses still return it through NewDataSourceResponse.

* feat(datasource): add Seafile connector with fingerprint-based incremental sync

Sync folders and files from one Seafile library per data source. The
connector walks the selected scope one directory level at a time,
downloads files through the link + fileserver flow without credentials,
and reconciles deletions against a per-file oid/mtime/size fingerprint
cursor that is checkpointed every 50 mutations.

- resource ids are "<repo_id>:<path>"; ancestors collapse, one library
- per-file failures become coded error items and keep the path pending
- directory failures and Retry-After > 60s abort without deletions
- forced full runs keep the old cursor as a deletion baseline
- API token never reaches cursors, metadata, logs or error text
- share the supported import extension set through internal/utils

* feat(datasource): add Seafile frontend connector and docs

Wire the Seafile data source into the editor dialog, channel labels
and the five locales, and document how to connect a Seafile 10.0.1
library.

- connector definition with base_url + API token fields and icon
- picker guard: one library per data source, at least one selection
- "library" resource type and icon in the lazy tree
- channel label in the knowledge base filter, document views and chat
- i18n for labels, guide steps and the eight seafile_* sync error codes
- website-docs integration guide, data source and extension point doc
  updates, and Seafile in the README data source lists

---------

Co-authored-by: zaqqmm <q-zhang10@qq.com>
2026-10-08 16:18:09 +08:00
..
crypto.go feat(crypto): AES-GCM at-rest for MCP and DataSource credentials with graceful key-rotation handling 2026-05-17 15:27:52 +08:00
crypto_test.go fix(crypto): fail loudly when encrypted DB fields cannot be decrypted 2026-04-30 15:17:56 +08:00
debug.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
extraheaders.go refactor(asr): move the wire format into protocol packages, and cover every vendor whose docs offer ASR (#3503) 2026-09-21 13:25:27 +08:00
extraheaders_test.go refactor(asr): move the wire format into protocol packages, and cover every vendor whose docs offer ASR (#3503) 2026-09-21 13:25:27 +08:00
filesize.go refactor(skills): improve skill bundle size handling and error management 2026-09-02 15:08:05 +08:00
filesize_test.go fix(skills): raise skill zip cap and keep uninstall progress stable 2026-09-02 15:08:05 +08:00
fileutil.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
httputil.go fix(multimodal): bound remote image downloads by the file size limit (#3906) 2026-10-08 13:14:04 +08:00
httputil_test.go fix(multimodal): bound remote image downloads by the file size limit (#3906) 2026-10-08 13:14:04 +08:00
import_filetypes.go feat(datasource): add Seafile data source connector (#3616) 2026-10-08 16:18:09 +08:00
import_filetypes_test.go feat(datasource): add Seafile data source connector (#3616) 2026-10-08 16:18:09 +08:00
inject.go refactor: remove unused private Go helpers 2026-09-17 15:51:51 +08:00
inject_test.go fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
json.go feat: Add DataSchema tool for retrieving schema information from CSV and Excel files 2025-12-29 20:03:51 +08:00
log_sanitize.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
mysql_ssrf.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
oidc_state.go fix(security): close six open GHSA findings from security triage 2026-07-02 15:03:53 +08:00
oidc_state_test.go fix(security): close six open GHSA findings from security triage 2026-07-02 15:03:53 +08:00
presign.go fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
presign_test.go fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
query_and_redirect_boundaries_test.go fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
security.go feat(security): add a whitelist-only outbound mode that refuses before DNS (#3393) 2026-09-23 12:02:06 +08:00
security_path_test.go fix(security): reject traversal in local prefixes, task IDs, and wiki sort 2026-09-07 11:23:45 +08:00
security_redirect_test.go fix(security): close six open GHSA findings from security triage 2026-07-02 15:03:53 +08:00
security_test.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
security_transport_test.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
security_whitelist_only_test.go feat(security): add a whitelist-only outbound mode that refuses before DNS (#3393) 2026-09-23 12:02:06 +08:00
shell_assignment.go feat(localsandbox): add host OS sandbox core and macOS Seatbelt backend (#3472) 2026-09-21 13:24:05 +08:00
shell_assignment_test.go feat(localsandbox): add host OS sandbox core and macOS Seatbelt backend (#3472) 2026-09-21 13:24:05 +08:00
ssrf_outbound_cache.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
ssrf_outbound_cache_test.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
storage_error.go feat(storage): improve storage connectivity error handling and multi-instance support 2026-07-15 14:54:39 +08:00
taskid.go fix(security): reject traversal in local prefixes, task IDs, and wiki sort 2026-09-07 11:23:45 +08:00
taskid_test.go fix(security): reject traversal in local prefixes, task IDs, and wiki sort 2026-09-07 11:23:45 +08:00