Commit Graph

4030 Commits

Author SHA1 Message Date
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
Stephen Zhou
cbfd1f69ee
refactor(knowledge-fs): split translations into dedicated namespace 2026-09-03 17:37:59 +08:00
Stephen Zhou
e691e0bf1d
Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-03 16:33:04 +08:00
Stephen Zhou
42cb6519ea
Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-03 16:32:30 +08:00
yyh
e982a3de33
test(web): remove workspace switcher browser test (#41728) 2026-09-03 08:06:17 +00:00
Zhu Lei
612a929907
fix(web): stringify object editor values before Monaco createModel (#41719) 2026-09-03 07:51:41 +00:00
Stephen Zhou
29acaabc6a
chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
Jingyi
642ad2fffe
fix(web): align workspace switcher states and semantics (#41713) 2026-09-03 07:18:49 +00:00
Benjamin
8f7cca3ae2
fix(web): guard LLM node model_selector against persisted null (#41707) 2026-09-03 06:20:48 +00:00
Jyong
57d03faa98 fix(workflow): let the KnowledgeFS retrieval node run on text or image alone
The KnowledgeFS retrieval node treated the query text as mandatory even though
a query image is a complete input on its own. Text and image are now
alternatives: the node needs at least one of them, never both.

- web: drop the required mark from the query text field; the checklist fails
  only when neither variable is bound (new i18n message in every locale).
- api: make `query_variable_selector` optional with a model-level rule that
  one of the two selectors must be set, and only map the query variable when
  it is bound. At runtime an empty text without images is a configuration
  error; an image-only query retrieves with an empty text, merges spaces on
  their own scores instead of a text reranker, skips automatic metadata
  extraction, and skips the text-based failed-query capture.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-03 01:52:19 -04:00
yyh
59021616d4
refactor(web): migrate legacy form controls to Dify UI (#41682) 2026-09-03 03:50:23 +00:00
Wu Tianwei
b0b495d243
feat(web): make markdown form field name length configurable (#41697) 2026-09-03 03:21:10 +00:00
Stephen Zhou
69fa1e1018
lint tailwind 2026-09-03 11:00:41 +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
Stephen Zhou
5df6fc4ca0
style(workflow): format available node filter 2026-09-02 20:51:23 +08:00
Stephen Zhou
2f8dd177d3
fix(knowledge-fs): stabilize research result streaming 2026-09-02 20:10:24 +08:00
yyh
bc716020c7
perf(web): load Zendesk on support intent (#41653) 2026-09-02 10:32:47 +00: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
yyh
7664ad7149
fix(web): align avatar file extension with output type (#41662) 2026-09-02 10:22:59 +00:00
yyh
e577c007a0
fix(web): stabilize Home and Studio route titles (#41654) 2026-09-02 09:03:58 +00:00
yyh
02855848ea
perf(web): downsample static account avatars (#41655) 2026-09-02 09:02:46 +00:00
Jyong
0340784d57 feat(knowledge-fs): add automatic metadata filtering to retrieval node
Bring the LLM-driven "automatic" metadata filtering mode from the legacy
Knowledge Retrieval node to the KnowledgeFS retrieval node
(knowledge-retrieval-v2).

Backend:
- Accept `automatic` in `metadata_filtering_mode` and add
  `metadata_model_config` to the node entity.
- Add `automatic_metadata_filter.py`, which reuses the legacy metadata
  filter prompt templates, invokes the configured model, parses the JSON
  answer and normalises operators/values against the KnowledgeFS
  metadata catalog before building custom metadata conditions.
- Resolve the shared metadata catalog across the selected spaces through
  the new `list_metadata_fields` app execution capability (paginated),
  fail closed on missing/unavailable models and catalog admission errors,
  fail open on extraction errors, and expose the outcome via
  `metrics.metadata_filtering` and `llm_usage`.
- Inject the default extractor from the node factory.
- Fix an unescaped brace in the legacy completion prompt template that
  broke `.format()`.

Frontend:
- Offer disabled/automatic/manual modes, normalise unknown persisted
  modes to disabled, store the automatic model and completion params,
  render the model selector through the shared MetadataFilter, and
  require a model when saving in automatic mode.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WnUM1CdV5LpcxZEQ2vu9Xc
2026-09-02 02:55:12 -04:00
Wu Tianwei
82d86dcf98
feat: app access point permission (#41631)
Co-authored-by: fatelei <fatelei@gmail.com>
2026-09-02 06:34:33 +00:00
yyh
183741b5f7
refactor(web): migrate webapp email code inputs (#41634) 2026-09-02 06:22:21 +00:00
yyh
de3f3714ae
refactor(web): migrate webapp reset password inputs (#41633) 2026-09-02 06:22:20 +00:00
yyh
415e999cef
refactor(web): migrate console reset password inputs (#41632) 2026-09-02 06:22:19 +00:00
Jyong
222d09f474 feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
Joel
c25b439d8b
fix: improve snippets list accessibility (#41579)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2026-09-02 04:39:17 +00:00
yyh
88c64a8db9
refactor(web): migrate access point mutations (#41614) 2026-09-02 03:17:03 +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
yyh
ea98d38c3d
refactor(web): migrate webhook table input (#41612) 2026-09-02 01:44:52 +00:00
yyh
18ac946e2b
refactor(web): migrate dataset settings name input (#41611) 2026-09-02 01:44:51 +00:00
yyh
baf629dd36
refactor(web): migrate external API selection input (#41610) 2026-09-02 01:44:51 +00:00
Stephen Zhou
8780803f2d
refactor(knowledge-fs): decompose quality page 2026-09-01 22:59:24 +08:00
Stephen Zhou
73e449c3ef
fix(workflow): allow KnowledgeFS top n up to 100 2026-09-01 20:22:56 +08:00
Stephen Zhou
3c7e197afe
fix(workflow): reset KnowledgeFS rerank override 2026-09-01 20:07:55 +08:00
Stephen Zhou
a7a16c1335
fix(web): resolve marketplace plugin ids before install 2026-09-01 18:25:08 +08:00
Stephen Zhou
75a7f4e5ba
refactor(knowledge-fs): reuse dataset chunk image list 2026-09-01 17:22:44 +08:00
QuantumGhost
d6e4f48526
fix(web): merge workflow tool outputs from all End nodes (#41517)
Co-authored-by: twwu <twwu@dify.ai>
2026-09-01 08:50:37 +00:00
QuantumGhost
27c2f058fe
fix(web): publish workflow before creating tool (#41528) 2026-09-01 07:52:07 +00:00
Joel
770b83d9cc
fix: handle published workflow request failures in access points (#41572) 2026-09-01 06:37:25 +00:00
Joel
fdca3e2a1a
chore: enforce titles on CSS-truncated elements (#41438) 2026-09-01 06:18:53 +00:00
yyh
520e5e2beb
chore(deps): upgrade workspace dependencies (#41564) 2026-09-01 04:19:06 +00:00
Joel
5cbc42cd38
chore: Revert "feat: use app.acl.access_point_manage to control access point page access" (#41563) 2026-09-01 03:46:03 +00:00
yyh
765e6338d2
fix(plugin): prevent install dialog error overflow (#41561) 2026-09-01 03:34:23 +00:00
Stephen Zhou
ecd41aed3f
Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-01 09:45:49 +08:00
yyh
8f2ff3a8fb
refactor(plugins): migrate credential rename input (#41552) 2026-09-01 01:44:44 +00:00
yyh
f92f7e92c3
refactor(workflow): migrate email subject input (#41551) 2026-09-01 01:44:43 +00:00
yyh
72458d5750
refactor(workflow): migrate schedule cron input (#41550) 2026-09-01 01:44:43 +00:00
Xiyuan Chen
ce801f4445
fix(web): hide Open in Explore for SSO-restricted apps (#41518)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2026-09-01 01:10:03 +00:00