Commit Graph

8013 Commits

Author SHA1 Message Date
Jyong
afa771dcac feat(knowledge-fs): keep query images with retrieval test history
Query images attached to a retrieval test vanished as soon as the run's
history record was selected, and were never shown again after a reload,
because nothing persisted them: the gateway dropped `queryImages` when writing
`answer_traces`, the console trace/research responses had no image field, and
the composer cleared its images on every record selection.

- knowledge-fs: add a nullable JSON `query_images` column to `answer_traces`
  (migration 0049 for postgres and tidb), persist and read it in the answer
  trace repository, and expose `queryImages` on quality trace list items.
- api: enrich trace and research task responses with
  `KnowledgeFSQueryImageResponse`, resolving file names and short-lived signed
  preview URLs only for files the acting account still owns; regenerate the
  console and service contracts.
- web: keep composer images scoped to the selected record like the query
  text, remember images per run in this session, fall back to persisted
  previews (with a labelled placeholder when the file is gone), show them in
  the result panel and as a count on history records, and carry them into
  retests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-02 09:17:36 -04:00
Stephen Zhou
2b16c5baf1
fix(knowledge-fs): refresh contract subtree lock 2026-09-02 20:33:15 +08:00
FFXN
46c345401f fix(knowledge-fs): cap object-list page size and enforce entity name length limits 2026-09-02 19:18:18 +08:00
FFXN
567f4f5ab4 fix(knowledge-fs): enhance source import handling and error recovery for remote updates 2026-09-02 18:38:38 +08:00
FFXN
1e8814838f Merge remote-tracking branch 'origin/deploy/konwledge' into deploy/konwledge 2026-09-02 18:08:26 +08:00
FFXN
9dd7e3f5f8 fix(knowledge-fs): repair sync policy version handling to accommodate concurrent updates 2026-09-02 18:07:57 +08: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
d3162a67b4
test(knowledge-fs): cover query image validation 2026-09-02 14:22:56 +08:00
Stephen Zhou
df17fc4f2a
fix(knowledge-fs): align query image types 2026-09-02 14:06:14 +08:00
Jyong
049a4c514e fix(knowledge-fs): show task object titles 2026-09-02 01:43:16 -04:00
Jyong
222d09f474 feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
FFXN
b55ec59d37 fix(knowledge-fs): handle source selection mismatch and improve error handling, make source selection replacement durable. 2026-09-02 12:56:37 +08:00
Stephen Zhou
1b4bc1ca2e
test(auth): align password reset policy mock 2026-09-02 10:39:43 +08: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
dependabot[bot]
334a3043bc
chore(deps): bump pypdf from 6.15.0 to 6.16.1 in /api (#41607)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 01:56:41 +00:00
Xiyuan Chen
93dae7d8a0
fix(rbac): let agent.manage operate every agent page (#41583)
Co-authored-by: yunlu.wen <yunlu.wen@dify.ai>
2026-09-02 01:45:42 +00:00
dependabot[bot]
a3dbf9293a
chore(deps-dev): bump nltk from 3.10.0 to 3.10.3 in /api (#41602)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 01:20:41 +00:00
Jyong
a15ca672a1 fix(knowledge-fs): align retrieval test timeout 2026-09-01 13:51:15 -04:00
Jyong
2ad192fce7 fix(knowledge-fs): harden research retrieval execution 2026-09-01 13:26:43 -04:00
FFXN
66a93d5dfb fix(knowledge-fs): update subtreeTree hash in lock file 2026-09-01 20:17:51 +08:00
FFXN
2e6af36f77 fix(knowledge-fs): ensure balanced parentheses in SQL query for document retrieval 2026-09-01 20:02:36 +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
FFXN
aff51ae6f3 fix(knowledge-fs): retry source selection CAS conflicts and log workflow errors 2026-09-01 19:32:54 +08:00
Jyong
dbcc3a11e5 fix(knowledge-fs): type retrieval lease clock 2026-09-01 05:37:51 -04:00
Asuka Minato
7978352262
test: migrate dataset download sessions and ORM models to SQLite (#40630) 2026-09-01 09:28:50 +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
d337c59916
test: migrate workspace member sessions and ORM models to SQLite (#40523) 2026-09-01 09:27:46 +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
Jyong
7876f6e670 fix(knowledge-fs): scope child deletion conflicts 2026-09-01 05:18:38 -04:00
yyh
8e064ffe98
chore: upgrade Node.js runtime to 24 LTS (#41573) 2026-09-01 06:57:38 +00:00
Keith
566b8857dd
refactor(models): remove legacy db.session property wrappers on Dataset (#41569) 2026-09-01 06:28:24 +00:00
elyar1124
3ed28dce33
refactor(models): pass session into DocumentSegment and AppDatasetJoin accessors (#41568) 2026-09-01 06:24:04 +00:00
Eddy ZHANG
6411d6235c
refactor(service_api): dep-inject query params with @model_validate (#41562) 2026-09-01 05:55:50 +00:00
Eddy ZHANG
1977355dd1
refactor(console): dep-inject model provider payloads with @model_validate (#41539) 2026-09-01 04:24:45 +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
Stephen Zhou
484d4c3e68
test(knowledge-fs): cover rbac role tag resolution 2026-09-01 10:29:57 +08: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
Jyong
4f3a2952d6 perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
FFXN
2bcfc139c3 fix(knowledge-fs): add SOURCE_DOCUMENT_COMPILATION_FAILED error code and update DTOs 2026-08-31 18:19:23 +08:00
FFXN
f80f30e964 Merge remote-tracking branch 'origin/deploy/konwledge' into deploy/konwledge
# Conflicts:
#	api/knowledge-fs-contract.lock.json
2026-08-31 18:13:27 +08:00
FFXN
8c472c217b fix(knowledge-fs): add SOURCE_DOCUMENT_COMPILATION_FAILED error code and update DTOs 2026-08-31 18:12:42 +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
1952cff091
test: migrate model and agent sessions to SQLite (#40087) 2026-08-31 05:57:40 +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
9398482b53
test: migrate console dataset sessions and ORM models to SQLite (#40521) 2026-08-31 05:55:12 +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
Stephen Zhou
9abfd110cc
fix(knowledge-fs): refresh contract subtree lock 2026-08-31 13:08:59 +08:00
Byron.wang
d25e2b51fc
refactor(api): decouple onboarding and notification services (#40759)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: hjlarry <hjlarry@163.com>
2026-08-31 04:37:07 +00:00
Wu Tianwei
7167d7d662
fix(rbac): grant agent access to all legacy roles (#41511) 2026-08-31 03:33:09 +00:00