Commit Graph

901 Commits

Author SHA1 Message Date
FFXN
3e5b4640d6 fix(api): fix CI 2026-09-04 22:17:16 +08:00
Stephen Zhou
57a283d88c
Merge remote-tracking branch 'origin/main' into deploy/konwledge
# Conflicts:
#	web/features/new-rag/__tests__/add-source-page.spec.tsx
#	web/features/new-rag/__tests__/document-detail-page.spec.tsx
#	web/features/new-rag/add-source-page.tsx
#	web/features/new-rag/components/add-source-exit-dialog.tsx
#	web/features/new-rag/crawl-selection-form.tsx
#	web/features/new-rag/document-chunk-tree.tsx
#	web/features/new-rag/document-detail-header.tsx
#	web/features/new-rag/document-detail-page.tsx
#	web/features/new-rag/document-detail-status.tsx
#	web/features/new-rag/document-list.tsx
#	web/features/new-rag/documents-page.tsx
#	web/features/new-rag/documents/__tests__/page.spec.tsx
#	web/features/new-rag/knowledge-space-shell.tsx
#	web/features/new-rag/new-knowledge-list.tsx
#	web/features/new-rag/processing-tasks-drawer.tsx
#	web/features/new-rag/sources-page.tsx
#	web/features/new-rag/sources/create/__tests__/website-crawl-preview.spec.tsx
#	web/features/new-rag/sources/create/website-crawl-preview.tsx
2026-09-04 21:22:37 +08:00
Asuka Minato
08c7a2c5f3
test: migrate application generation sessions and ORM models to SQLite (#40509) 2026-09-04 12:16:31 +00:00
Stephen Zhou
38457f27fb
Merge remote-tracking branch 'origin/main' into deploy/konwledge
# Conflicts:
#	.agents/skills/how-to-write-component/references/data.md
#	.agents/skills/how-to-write-component/references/ownership.md
#	api/controllers/inner_api/__init__.py
#	api/tests/test_containers_integration_tests/services/test_account_service.py
#	api/tests/unit_tests/services/test_account_service.py
#	packages/iconify-collections/custom-public/icons.json
#	packages/iconify-collections/custom-public/info.json
#	web/features/new-rag/__tests__/new-knowledge-list.spec.tsx
#	web/features/new-rag/components/knowledge-space-card.tsx
#	web/features/new-rag/document-chunk-tree.tsx
#	web/features/tag-management/components/tag-search-content.tsx
#	web/features/tag-management/components/tag-selector.tsx
#	web/service/client.spec.ts
2026-09-04 19:42:31 +08:00
Stephen Zhou
6aba69326e
fix(knowledge-fs): show v2 workflow citations 2026-09-04 19:21:59 +08:00
Jyong
b79b8a879b feat(knowledge-fs): record and count every knowledge space query
Workflow KnowledgeFS retrieval nodes ran through `retrieval-tests`, which
never wrote an AnswerTrace or an overview event, so their queries were
missing from the retrieval history and from the space overview; the history
also only ever showed each member their own traces.

- AnswerTrace gains a `source` (retrieval_test | workflow | service_api |
  agent | mcp; migration 0051_answer_trace_source) derived from the
  Capability v2 caller kind. The retrieval-tests route records one trace per
  run (stages, evidence bundle, profile metadata), returns its id as
  `answerTraceId`, and the workflow node's failed-retrieval capture attaches
  to that trace instead of creating a second record.
- The quality trace list exposes and filters by `source`; traces from other
  caller kinds are visible to any current reader of the space, and counts and
  scores fall back to the evidence embedded in the trace when no bundle row
  exists.
- Overview accounting: retrieval-tests and Research tasks now emit
  `query.requested`, and the Research job state machine emits
  `query.completed` / `query.failed` on terminal stages (wired for both the
  in-process gateway and the durable runtime), so query volume, answer rate
  and outcomes include every caller. Activity details keep `source` and
  `taskKind`.
- Console and service trace routes accept a `source` filter; the retrieval
  test page shows a source badge and an all / retrieval tests / workflow
  filter, with translations for every locale.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-04 05:48:17 -04:00
Asuka Minato
7128456d57
test: migrate core agent runner sessions and ORM models to SQLite (#40508) 2026-09-04 08:50:33 +00:00
Stephen Zhou
876aab708e
fix(knowledge-fs): track workflow retrieval outcomes 2026-09-04 16:50:09 +08:00
eux
7919df7ef5
fix(api): skip invalid markdown image URLs (#41343) 2026-09-04 08:17:33 +00:00
Sourav Rajvi
e0673077a7
fix: close unclosed think tags around agent tool calls (#41764)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-04 07:23:34 +00:00
zyssyz123
a702b3bb2b
fix(agent): surface missing tool credentials (#41726) 2026-09-03 08:53:55 +00:00
Stephen Zhou
42cb6519ea
Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-03 16:32:30 +08:00
非法操作
ba1d5ba172
refactor(api): centralize remote file handling (#41627) 2026-09-03 06:00:13 +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
zyssyz123
688107c3e5
fix(api): bound suggested question generation latency (#41705) 2026-09-03 05:02:09 +00: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
Yunlu Wen
b1eafb0d82
fix: validate rule for provider scoped credentials (#41659) 2026-09-02 10:07:44 +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
Jyong
222d09f474 feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04: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
Byron.wang
c4ea406586
refactor(api): decouple system features and web adapters (#40772)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-01 11:50:52 +00:00
Asuka Minato
980a9d4ed4
test: migrate dataset retrieval sessions and ORM models to SQLite (#40548) 2026-09-01 09:28:33 +00:00
Asuka Minato
c45e5386fb
test: migrate agent-v2 workflow sessions and ORM models to SQLite (#40514) 2026-09-01 09:25:46 +00:00
Stephen Zhou
ecd41aed3f
Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-01 09:45:49 +08:00
zyssyz123
762019a160
fix(workflow): block manual runs for trigger workflows (#41519)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-31 09:30:52 +00:00
Asuka Minato
f8f71fdc68
test: migrate audit findings sessions and ORM models to SQLite (#40551) 2026-08-31 05:55:38 +00:00
Asuka Minato
5db79a77e4
test: migrate advanced chat generator sessions and ORM models to SQLite (#40585) 2026-08-31 05:51:30 +00:00
zyssyz123
ad86351cc1
fix(agent): reject incompatible session snapshots (#41447) 2026-08-31 02:26:07 +00:00
Weike Zhang
02f9b3ca7c
refactor: pass db.session explicitly in instruction_modify_workflow (#37403) (#40827) 2026-08-30 00:48:00 +00:00
Asuka Minato
2bdcbe96c5
test: enforce centralized config overrides (#40869) 2026-08-29 14:05:35 +00:00
Asuka Minato
3824323fe7
test: centralize core and service config overrides (#40868) 2026-08-29 14:05:34 +00:00
Asuka Minato
92110e1982
test: centralize controller and storage config overrides (#40867) 2026-08-28 14:47:17 +00:00
Stephen Zhou
9098955a77
Merge remote-tracking branch 'origin/main' into deploy/konwledge
# Conflicts:
#	api/tests/unit_tests/controllers/console/test_knowledge_fs_proxy.py
#	api/tests/unit_tests/services/test_knowledge_fs_proxy.py
#	web/app/components/workflow-app/hooks/use-available-nodes-meta-data.ts
2026-08-28 14:50:39 +08:00
-LAN-
458c96d5ba
fix(api): preserve tracing configuration boundaries (#41403) 2026-08-27 22:11:32 +08:00
QuantumGhost
3e12f0b9fb
fix(api): ignore broken pipe during app stop checks 🤖🤖🤖 (#41356) 2026-08-27 06:39:06 +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
-LAN-
82520c144f
fix(api): migrate legacy model types during upgrade (#41326) 2026-08-27 02:00:33 +00:00
wangxiaolei
0047522b0d
feat: add command cli to migration rbac scope to automatic_include_workspace_members (#41304) 2026-08-26 09:10:22 +00:00
Byron.wang
30e6069851
refactor(api): thin OAuth controllers and extract application services (#40692) 2026-08-26 07:33:37 +00:00
Taranum Wasu
6e0e32848e
fix(human-input): align backend timeout handle with frontend DSL (#40746)
Co-authored-by: Taranum01 <50813317+Taranum01@users.noreply.github.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
2026-08-26 06:47:14 +00:00
林玮 (Jade Lin)
960018253b
feat(api): track credit usage contexts (#41181)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-25 10:21:32 +00:00
Asuka Minato
ed9d3801ba
test: move pure integration cases to unit tests (#40705)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-25 06:19:48 +00:00
Asuka Minato
f3bb73b671
test: centralize app and account config overrides (#40860) 2026-08-25 06:19:35 +00:00
zyssyz123
4847447635
fix(agent): allow saving model-less inline Agent drafts (#41147) 2026-08-24 07:57:14 +00:00
wangxiaolei
0024a845f7
feat: support agent skill (#39675)
Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: 起岚 <155608604+xiaoyaoqilan@users.noreply.github.com>
Co-authored-by: Parman Mohammadalizadeh <prmma23@gmail.com>
Co-authored-by: Escape0707 <tothesong@gmail.com>
Co-authored-by: Xin Zhang <zhangxin@dify.ai>
Co-authored-by: iridescentWen <66297467+iridescentWen@users.noreply.github.com>
Co-authored-by: Bond Zhu <37842169+MRZHUH@users.noreply.github.com>
Co-authored-by: KVOJJJin <jzongcode@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: 非法操作 <hjlarry@163.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: Chester <superdiao6@gmail.com>
Co-authored-by: WH-2099 <wh2099@pm.me>
Co-authored-by: Jony <619963502@qq.com>
Co-authored-by: Jony <13896935+zyz619963502zyz@users.noreply.github.com>
Co-authored-by: Harsh Kashyap <harsh.kashyap2001@gmail.com>
Co-authored-by: Harsh Kashyap <Harsh23Kashyap@users.noreply.github.com>
Co-authored-by: kenwoodjw <blackxin55+@gmail.com>
Co-authored-by: csurong <csurong1@gmail.com>
Co-authored-by: caosurong <surong.cao@thinkingdata.cn>
Co-authored-by: Taranum Wasu <81034301+Taranum01@users.noreply.github.com>
Co-authored-by: Taranum01 <50813317+Taranum01@users.noreply.github.com>
Co-authored-by: Pranav Agarwal <agarwalpranav0711@gmail.com>
Co-authored-by: Stephen Zhou <hi@hyoban.cc>
Co-authored-by: zl86790 <marshal_li_b@163.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
Co-authored-by: yunlu.wen <yunlu.wen@dify.ai>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2026-08-24 05:29:14 +00:00
Asuka Minato
bda6bf3fee
test: migrate trigger and webhook sessions and ORM models to SQLite (#40594) 2026-08-24 04:01:02 +00:00
AsperforMias
3f7e6cdcb4
fix(tts): propagate and validate actual audio MIME (#41043)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-08-24 03:38:09 +00:00
Benjamin
ea6c15b68e
fix: fall back to the batch API when the global plugin manifest is empty (#41107)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 03:33:23 +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
lei_lei
ab34f9ae09
fix(workflow): honor stop between non-streaming nodes (#41090)
Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: crazywoola <427733928@qq.com>
2026-08-24 02:51:20 +00:00