Jyong
79116d8c4b
feat(knowledge-fs): scope dataset API keys by knowledge base type
...
Legacy knowledge bases (`datasets`) and KnowledgeFS spaces
(`knowledge_fs_control_spaces`) live in different tables, so a dataset API
key binding could only ever name a legacy dataset and the KnowledgeFS service
API never consulted bindings at all: a key scoped to specific knowledge bases
still reached every KnowledgeFS space in the workspace.
- Bindings carry a `resource_type` (`dataset` | `knowledge_fs_space`) and a
nullable `control_space_id` (migration 9a4e7d1c2b60, existing rows stay
`dataset`), with a CHECK that exactly one id column matches the type.
- `dataset_api_key_service` exposes the key scope by kind, validates and
binds KnowledgeFS spaces (tenant-owned, not deleting/deleted), and cleans up
keys scoped only to a space when its deletion is requested. The orphan-key
cleanup is now NULL-safe so a space binding keeps a key alive.
- Legacy dataset routes only honour `dataset` bindings; the KnowledgeFS
authorization service only honours `knowledge_fs_space` bindings and raises
a scope error that the service API maps to 403 (unknown keys stay 401).
- Console key creation accepts `knowledge_space_ids`; list/create responses
return them next to `dataset_ids`.
- The web scope picker lists KnowledgeFS spaces alongside legacy datasets
when KnowledgeFS is enabled and submits the ids by kind; the scope column
counts both.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-03 05:59:39 -04:00
FFXN
5b7f15f2b1
test(knowledge-fs): add tests for dataset upgrade API with disabled knowledge FS
2026-09-03 17:20:56 +08:00
Stephen Zhou
45bee40955
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/controllers/console/datasets/datasets.py
# api/tests/unit_tests/controllers/console/datasets/test_datasets.py
2026-09-02 21:56:53 +08:00
YungLe
3cd1fc098c
feat: allow knowledge base API keys to be scoped to a single dataset ( #37569 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-02 10:30:42 +00:00
Stephen Zhou
cd7e1be7cb
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/services/feature_service.py
# api/tests/unit_tests/controllers/console/workspace/test_members.py
# api/tests/unit_tests/core/workflow/nodes/agent_v2/test_validators.py
# api/tests/unit_tests/services/test_system_feature_service_knowledge_fs.py
# pnpm-lock.yaml
2026-09-02 10:31:10 +08:00
Asuka Minato
7978352262
test: migrate dataset download sessions and ORM models to SQLite ( #40630 )
2026-09-01 09:28:50 +00:00
Stephen Zhou
5770ebdba8
fix(knowledge-fs): reconcile main merge regressions
2026-09-01 10:10:52 +08:00
Stephen Zhou
ecd41aed3f
Merge remote-tracking branch 'origin/main' into deploy/konwledge
2026-09-01 09:45:49 +08:00
Asuka Minato
9398482b53
test: migrate console dataset sessions and ORM models to SQLite ( #40521 )
2026-08-31 05:55:12 +00:00
Asuka Minato
2bdcbe96c5
test: enforce centralized config overrides ( #40869 )
2026-08-29 14:05:35 +00:00
Asuka Minato
92110e1982
test: centralize controller and storage config overrides ( #40867 )
2026-08-28 14:47:17 +00:00
Stephen Zhou
30ed0907f3
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/controllers/console/app/site.py
# api/controllers/console/datasets/datasets.py
# api/core/plugin/backwards_invocation/model.py
# api/core/rag/rerank/rerank_model.py
# api/tests/test_containers_integration_tests/controllers/console/auth/test_oauth_server.py
# api/tests/unit_tests/core/plugin/test_backwards_invocation_model.py
# api/tests/unit_tests/tasks/test_batch_clean_document_task.py
# packages/contracts/generated/api/service/orpc.gen.ts
# web/app/components/datasets/rename-modal/index.tsx
# web/app/components/header/account-setting/model-provider-page/model-selector/popup-layout.tsx
# web/features/tag-management/components/tag-search-content.tsx
2026-08-27 10:06:48 +08:00
Wu Tianwei
73dd8739ef
feat: optimize resource access config logic ( #41164 )
...
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-26 07:18:57 +00:00
Asuka Minato
48315be2b1
test: migrate RAG variable controller sessions and ORM models to SQLite ( #40609 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-25 06:20:48 +00:00
Stephen Zhou
0564b75187
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/tests/unit_tests/commands/test_generate_swagger_specs.py
# api/tests/unit_tests/controllers/console/app/test_agent_manage_guard.py
# api/tests/unit_tests/extensions/test_ext_login.py
# packages/dify-ui/src/alert-dialog/index.tsx
# web/app/components/datasets/external-api/external-api-modal/index.tsx
# web/app/components/datasets/list/dataset-card/components/operations-dropdown.tsx
# web/features/new-rag/document-list.tsx
# web/features/new-rag/sources-page.tsx
2026-08-24 11:03:38 +08:00
Asuka Minato
92978f6d9f
test: migrate console dataset segment sessions and ORM models to SQLite ( #40515 )
...
Co-authored-by: Byron.wang <byron@dify.ai>
2026-08-21 06:50:14 +00:00
Stephen Zhou
e6fe2cd5d7
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/tests/unit_tests/controllers/inner_api/test_auth_wraps.py
# api/tests/unit_tests/services/test_async_workflow_service.py
# web/features/new-rag/__tests__/new-knowledge-list.spec.tsx
2026-08-21 10:39:39 +08:00
盐粒 Yanli
013b328555
fix(agent): complete ownership-aware deletion lifecycle ( #40888 )
...
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-08-20 07:48:02 +00:00
林玮 (Jade Lin)
602a646dbd
fix(api): enforce dataset document ownership ( #40989 )
2026-08-20 03:24:45 +00:00
FFXN
0175a17908
feat(knowledge-fs): add upgrade job listing API
2026-08-19 15:12:21 +08:00
FFXN
76eeebcece
feat(knowledge-fs): Legacy knowledge base allows multiple migrations
2026-08-19 13:21:52 +08:00
FFXN
1ef3379d5a
feat(knowledge-fs): implement KnowledgeFS upgrade discovery and idempotency handling
2026-08-18 14:41:04 +08:00
Stephen Zhou
52cfbea82b
Merge branch 'deploy/konwledge' of https://github.com/langgenius/dify into deploy/konwledge
2026-08-18 10:55:50 +08:00
Stephen Zhou
d9b51a409d
Merge remote-tracking branch 'origin/main' into deploy/konwledge
2026-08-18 10:54:19 +08:00
FFXN
b022413a1f
Merge remote-tracking branch 'origin/deploy/konwledge' into deploy/konwledge
...
# Conflicts:
# api/controllers/console/datasets/datasets.py
# api/extensions/ext_celery.py
2026-08-17 17:46:18 +08:00
FFXN
c7cf9db996
feat(knowledge_fs): Upgrade the old version of the knowledge base to the new version of the knowledge base
2026-08-17 17:36:43 +08:00
Stephen Zhou
b25d20b665
fix(web): align legacy knowledge filters (WTA-2054)
2026-08-17 12:18:43 +08:00
YungLe
219596c4df
feat(plugin-auth): visibility picker for OAuth credentials ( #39840 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com>
Co-authored-by: twwu <twwu@dify.ai>
2026-08-17 02:41:26 +00:00
Stephen Zhou
cc3f901598
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/extensions/ext_celery.py
# api/tests/unit_tests/controllers/console/auth/test_oauth_server.py
# lint.config.ts
# packages/contracts/knowledge-fs-contract.test.mjs
# vite.config.ts
# web/features/new-rag/__tests__/document-detail-page.spec.tsx
# web/features/new-rag/__tests__/knowledge-space-shell.spec.tsx
# web/features/new-rag/__tests__/processing-task-events.spec.ts
# web/features/new-rag/create-knowledge-page.tsx
# web/features/new-rag/document-detail-page.tsx
# web/features/new-rag/knowledge-space-shell.tsx
2026-08-17 09:50:10 +08:00
Asuka Minato
1651bcc774
test: migrate residual controller sessions and ORM models to SQLite ( #40606 )
...
Co-authored-by: Byron Wang <byron@dify.ai>
2026-08-15 15:15:11 +00:00
酒诗
b6319c819c
chore: dep inject for model in dataset document actions ( #40787 )
...
Co-authored-by: geneachina <geneachina@gmail.com>
2026-08-14 11:08:21 +00:00
WH-2099
62a544a146
fix(api): enforce RAG draft variable access boundaries ( #40745 )
2026-08-14 10:07:22 +00:00
Stephen Zhou
01254dcdb6
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/tests/unit_tests/controllers/web/test_wraps.py
# api/tests/unit_tests/extensions/otel/test_runtime.py
# web/app/components/header/account-setting/model-provider-page/model-selector/index.tsx
2026-08-14 10:59:24 +08:00
WH-2099
c1bde25bcc
fix(api): remove unsafe Bedrock test endpoint ( #40742 )
2026-08-13 19:47:13 +00:00
Asuka Minato
fbd38753fa
test: migrate residual controller ORM identities to real models ( #40661 )
2026-08-13 05:18:44 +00:00
Stephen Zhou
c259666e69
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/core/plugin/backwards_invocation/model.py
# web/features/deployments/shared/components/unsupported-dsl-nodes-alert.tsx
2026-08-13 10:22:32 +08:00
wangxiaolei
eeaaf11a51
fix: fix create dataset with document miss rbac operation ( #40599 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-12 08:57:43 +00:00
WH-2099
af382be837
fix(api): bind remaining RAG resources to owners ( #40503 )
2026-08-12 06:05:16 +00:00
Stephen Zhou
574461604d
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/commands/system.py
# api/controllers/console/init_validate.py
# api/controllers/console/workspace/account.py
# api/controllers/console/wraps.py
# api/controllers/openapi/auth/data.py
# api/core/hosting_configuration.py
# api/core/provider_manager.py
# api/core/rag/retrieval/dataset_retrieval.py
# api/services/workspace_service.py
# api/tasks/workflow_cfs_scheduler/entities.py
# api/tests/test_containers_integration_tests/controllers/console/auth/test_password_reset.py
# api/tests/test_containers_integration_tests/services/test_feature_service.py
# api/tests/unit_tests/controllers/console/auth/test_account_activation.py
# api/tests/unit_tests/controllers/openapi/auth/test_data.py
# api/tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py
# api/tests/unit_tests/extensions/otel/test_retrieval_tracing.py
# api/tests/unit_tests/services/test_feature_service_knowledge_fs.py
# dev/start-worker
# packages/contracts/console.ts
# packages/contracts/package.json
# packages/iconify-collections/custom-public/icons.json
# web/app/components/workflow/__tests__/index.spec.tsx
# web/app/components/workflow/index.tsx
# web/features/new-rag/document-chunk-tree.tsx
# web/service/fetch.spec.ts
2026-08-12 10:33:29 +08:00
WH-2099
ef8544b173
fix(api): bind dataset operations to owners ( #40149 )
2026-08-11 16:37:14 +00:00
Jyong
14e5afa54d
Update application components and supporting logic
2026-08-11 05:52:22 -04:00
Asuka Minato
08008f6305
test: migrate controller sessions to SQLite ( #40083 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-11 08:29:40 +00:00
Likalikali
e09eee8fd1
refactor: replace manual model_validate with @model_validate in datasets controllers ( #40236 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-09 08:25:27 +00:00
Likalikali
5ebb389d26
refactor: replace manual model_validate with @model_validate in rag_pipeline controllers ( #40237 )
2026-08-09 08:22:50 +00:00
Asuka Minato
5a84cde198
test: move RAG pipeline workflow coverage to unit tests ( #38937 )
2026-08-08 12:00:32 +00:00
Likalikali
3e8c0fdcef
chore: dep inject for model in website crawl api ( #40156 )
2026-08-07 12:40:12 +00:00
Likalikali
a279be91a8
chore: dep inject for model in datasets document and web human input … ( #40151 )
2026-08-07 11:15:43 +00:00
Asuka Minato
1a69435fff
test: use sqlite3 session in test_external_dataset_service ( #38696 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-06 08:27:37 +00:00
Elliot Bai
cf88aef710
feat: support TiDB Vector full-text and hybrid search ( #38112 )
...
Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: bkidy <bkidyy.macmini@gmail.com>
2026-08-06 07:08:42 +00:00
Asuka Minato
479a5613a8
test: use real ORM models in dataset service tests ( #40018 )
2026-08-06 04:14:12 +00:00