Commit Graph

3792 Commits

Author SHA1 Message Date
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
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
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
Stephen Zhou
df17fc4f2a
fix(knowledge-fs): align query image types 2026-09-02 14:06:14 +08: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
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
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
lin
1264d29a4f
chore: remove unnecessary type conversions (#41454) 2026-08-29 07:04:18 +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
FFXN
18155535cf refactor(knowledge_fs): replace credential service with dataset API key authorization. Remove the API token feature at the space level for knowledgeFs. 2026-08-26 15:40:18 +08:00
Byron.wang
30e6069851
refactor(api): thin OAuth controllers and extract application services (#40692) 2026-08-26 07:33:37 +00:00
林玮 (Jade Lin)
8c9f248520
fix(api): attribute Skill Builder credit usage (#41290) 2026-08-26 07:02:45 +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
Stephen Zhou
1c6f0a0388
fix(api): restore Service API OpenAPI semantics (#41274) 2026-08-26 05:05:36 +00:00
Stephen Zhou
92016aa139
fix(api): align Service API OpenAPI contract (#41248)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-25 10:54: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
Xiyuan Chen
28a4859218
fix(api): respect configured model params in prompt generator (#41165) 2026-08-24 09:02:34 +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
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
盐粒 Yanli
35a4533889
refactor(agent): simplify Agent v2 output contract (#41062)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-21 11:55:25 +00:00
Blackoutta
3a8fbcbd02
feat(trace): add provider-neutral unified tracing (#39451)
Co-authored-by: EvoX <evox@evomap.ai>
2026-08-21 11:28:18 +00:00
mesrop2008
23150c2319
fix(api): attach exc_info=True to logger.warning sites that drop the traceback (#41068) 2026-08-21 11:20:42 +00:00
Yunlu Wen
373f33fd3b
fix: add missing metrics back and enhance typing (#40935)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-21 09:46:45 +00:00
zl86790
9d8dacd0c8
fix(api): prevent dropped workflow_started events in Redis Streams (#40964)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
2026-08-21 03:46:50 +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
hyhyf
e425e18fca
fix: add MESSAGE_TRACE task on chat pipline error events (#39129)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-20 13:44:22 +00:00
Stephen Zhou
db8c40b23e
Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-08-20 10:11:26 +08:00
Jyong
91006dfd2e feat(workflow): unify KnowledgeFS recall settings 2026-08-19 05:12:12 -04:00