Skip to content

refactor(api): remove superseded Workflow node implementations - #43695

Open
41tair wants to merge 39 commits into
refactor/api-76-10from
refactor/api-76-10-12
Open

41tair wants to merge 39 commits into
refactor/api-76-10from
refactor/api-76-10-12

Conversation

@41tair

@41tair 41tair commented Oct 8, 2026

Copy link
Copy Markdown
Member

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

part of #39993

Remove superseded Workflow node implementations.

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've verified the change and added or updated tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and vp staged (frontend) to appease the lint gods

From Codex

@ghfind-review ghfind-review Bot added the review: top ghfind author score; see https://ghfind.com label Oct 8, 2026
@github-actions github-actions Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-10-31 15:08:14.424280780 +0000
+++ /tmp/pyrefly_pr.txt	2026-10-31 15:07:58.048171380 +0000
@@ -111,45 +111,49 @@
 ERROR Argument `list[Document | SimpleNamespace]` is not assignable to parameter `documents` with type `list[Document]` in function `dify_vdb_pgvector.pgvector.PGVector.add_texts` [bad-argument-type]
    --> providers/vdb/vdb-pgvector/tests/unit_tests/src/dify_vdb_pgvector/test_pgvector.py:392:28
 ERROR Object of class `ModuleType` has no attribute `QdrantClient` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:108:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:111:5
 ERROR Object of class `ModuleType` has no attribute `FilterSelector` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:109:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:112:5
 ERROR Object of class `ModuleType` has no attribute `HnswConfigDiff` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:110:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:113:5
 ERROR Object of class `ModuleType` has no attribute `PayloadSchemaType` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:111:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:114:5
 ERROR Object of class `ModuleType` has no attribute `TextIndexParams` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:112:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:115:5
 ERROR Object of class `ModuleType` has no attribute `TextIndexType` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:113:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:116:5
 ERROR Object of class `ModuleType` has no attribute `TokenizerType` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:114:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:117:5
 ERROR Object of class `ModuleType` has no attribute `VectorParams` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:115:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:118:5
 ERROR Object of class `ModuleType` has no attribute `Distance` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:116:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:119:5
 ERROR Object of class `ModuleType` has no attribute `PointStruct` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:117:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:120:5
 ERROR Object of class `ModuleType` has no attribute `Filter` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:118:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:121:5
 ERROR Object of class `ModuleType` has no attribute `FieldCondition` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:119:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:122:5
 ERROR Object of class `ModuleType` has no attribute `MatchValue` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:120:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:123:5
 ERROR Object of class `ModuleType` has no attribute `MatchAny` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:121:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:124:5
 ERROR Object of class `ModuleType` has no attribute `MatchText` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:122:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:125:5
 ERROR Object of class `ModuleType` has no attribute `UnexpectedResponse` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:123:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:126:5
 ERROR Object of class `ModuleType` has no attribute `models` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:125:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:128:5
 ERROR Object of class `ModuleType` has no attribute `QdrantLocal` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:126:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:129:5
 ERROR Object of class `ModuleType` has no attribute `qdrant_local` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:127:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:130:5
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:387:16
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:429:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:411:5
+ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:451:5
 ERROR Object of class `ModuleType` has no attribute `VECTOR` [missing-attribute]
   --> providers/vdb/vdb-relyt/tests/unit_tests/src/dify_vdb_relyt/test_relyt_vector.py:24:5
 ERROR Argument `Index | None` is not assignable to parameter `index` with type `Index` in function `tcvectordb.rpc.model.collection.RPCCollection.__init__` [bad-argument-type]
@@ -249,77 +253,77 @@
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/controllers/web/test_wraps.py:237:18
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:38:23
+  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:45:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:53:27
+  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:60:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:73:60
+  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:80:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:78:39
+  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:85:39
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:99:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:106:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:111:27
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:118:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:130:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:137:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:153:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:160:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:165:27
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:172:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:184:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:191:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:207:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:214:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:219:27
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:226:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:238:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:245:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:271:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:278:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:282:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:289:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:317:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:324:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:328:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:335:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:359:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:366:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:364:39
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:371:39
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:386:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:393:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:412:27
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:419:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:424:27
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:431:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:444:60
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:451:64
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:471:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:478:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:481:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:488:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:499:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:506:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:540:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:547:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:550:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:557:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:588:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:595:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:598:23
+   --> tests/e2e_tests/containers/core/rag/retrieval/test_dataset_retrieval_integration.py:605:23
 ERROR Argument `str` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/core/workflow/test_human_input_resume_node_execution.py:187:23
+   --> tests/e2e_tests/containers/core/workflow/test_human_input_resume_node_execution.py:188:23
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:48:14
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:49:14
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:58:14
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:59:14
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:59:19
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:60:19
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:77:14
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:78:14
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:82:16
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:83:16
 ERROR Returned type `int | str` is not assignable to declared return type `str` [bad-return]
    --> tests/e2e_tests/containers/libs/broadcast_channel/redis/test_sharded_channel.py:367:16
 ERROR Object of class `TypeEngine` has no attribute `length` [missing-attribute]
@@ -335,59 +339,59 @@
 ERROR Argument `Literal['workflow-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowNodeExecutionTriggeredFrom] | WorkflowNodeExecutionTriggeredFrom` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_api_workflow_node_execution_repository.py:39:24
 ERROR Generator function should return `Generator` [bad-return]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_api_workflow_run_repository.py:150:56
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_api_workflow_run_repository.py:143:56
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:103:14
+  --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:97:14
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:104:19
+  --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:98:19
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:125:14
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:119:14
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:130:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:124:16
 ERROR Object of class `HumanInputFormReference` has no attribute `submitted` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:348:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:342:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:350:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:344:16
 ERROR Object of class `object` has no attribute `action_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:351:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:345:16
 ERROR Object of class `object` has no attribute `action_text` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:352:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:346:16
 ERROR Object of class `object` has no attribute `rendered_content` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:353:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:347:16
 ERROR Object of class `object` has no attribute `node_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:354:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:348:16
 ERROR Object of class `object` has no attribute `node_title` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:355:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:349:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:386:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:380:16
 ERROR Object of class `object` has no attribute `submitted_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:387:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:381:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:474:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:468:16
 ERROR Object of class `object` has no attribute `submitted_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:475:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:469:16
 ERROR Object of class `object` has no attribute `rendered_content` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:476:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:470:16
 ERROR Object of class `HumanInputFormReference` has no attribute `submitted` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:517:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:511:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_definition` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:519:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:513:16
 ERROR Object of class `object` has no attribute `form_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:521:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:515:16
 ERROR Object of class `object` has no attribute `node_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:522:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:516:16
 ERROR Object of class `object` has no attribute `node_title` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:523:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:517:16
 ERROR Object of class `object` has no attribute `form_content` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:524:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:518:16
 ERROR Object of class `object` has no attribute `display_in_ui` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:525:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:519:16
 ERROR Object of class `object` has no attribute `form_token` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:526:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:520:16
 ERROR Object of class `object` has no attribute `resolved_default_values` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:527:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:521:16
 ERROR Object of class `object` has no attribute `expiration_time` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:528:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:522:16
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
    --> tests/e2e_tests/containers/repositories/test_sqlalchemy_workflow_node_execution_repository.py:184:23
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
@@ -426,6 +430,10 @@
     --> tests/e2e_tests/containers/services/document_service_status.py:1265:16
 ERROR `None` is not subscriptable [unsupported-operation]
     --> tests/e2e_tests/containers/services/document_service_status.py:1266:16
+WARN No attribute `ToolManager` in module `services.agent_service` [missing-attribute-patch-target]
+  --> tests/e2e_tests/containers/services/test_agent_service.py:26:19
+WARN No attribute `AgentConfigManager` in module `services.agent_service` [missing-attribute-patch-target]
+  --> tests/e2e_tests/containers/services/test_agent_service.py:27:19
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/e2e_tests/containers/services/test_agent_service.py:135:38
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -436,6 +444,12 @@
    --> tests/e2e_tests/containers/services/test_agent_service.py:204:32
 ERROR Argument `float` is not assignable to parameter `answer_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:206:31
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:297:18
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:357:13
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:373:13
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:407:20
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -444,6 +458,8 @@
    --> tests/e2e_tests/containers/services/test_agent_service.py:443:32
 ERROR Argument `float` is not assignable to parameter `answer_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:445:31
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:454:18
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:479:20
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -452,8 +468,14 @@
    --> tests/e2e_tests/containers/services/test_agent_service.py:515:32
 ERROR Argument `float` is not assignable to parameter `answer_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:517:31
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:526:18
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:564:24
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:570:18
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:593:18
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:623:20
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -462,98 +484,112 @@
    --> tests/e2e_tests/containers/services/test_agent_service.py:643:32
 ERROR Argument `float` is not assignable to parameter `answer_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:645:31
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:655:13
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:673:13
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:793:24
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:799:18
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:892:18
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:919:18
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:953:24
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:959:18
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_agent_service.py:993:24
+ERROR Class `AgentService` has no class attribute `get_agent_logs` [missing-attribute]
+   --> tests/e2e_tests/containers/services/test_agent_service.py:999:18
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `access_mode` with type `str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `has_draft_trigger` with type `bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `is_starred` with type `bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `tenant_id` with type `SQLCoreOperations[str] | str` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `name` with type `SQLCoreOperations[str] | str` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `enable_site` with type `SQLCoreOperations[bool] | bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `enable_api` with type `SQLCoreOperations[bool] | bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `id` with type `SQLCoreOperations[str] | str` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `description` with type `SQLCoreOperations[str] | str` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `icon` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `icon_background` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `app_model_config_id` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `workflow_id` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `status` with type `AppStatus | SQLCoreOperations[AppStatus]` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `api_rpm` with type `SQLCoreOperations[int] | int` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `api_rph` with type `SQLCoreOperations[int] | int` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `is_demo` with type `SQLCoreOperations[bool] | bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `is_public` with type `SQLCoreOperations[bool] | bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `is_universal` with type `SQLCoreOperations[bool] | bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `tracing` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `max_active_requests` with type `SQLCoreOperations[int | None] | int | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `created_by` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `maintainer` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `updated_by` with type `SQLCoreOperations[str | None] | str | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
 ERROR Unpacked keyword argument `AppMode | IconType | bool | str | Any` is not assignable to parameter `use_icon_as_answer_icon` with type `SQLCoreOperations[bool] | bool` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:109:15
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:112:15
+WARN No attribute `WorkflowService` in module `services.app_dsl_service` [missing-attribute-patch-target]
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:129:19
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:185:42
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:190:42
 ERROR Argument `Literal['simple']` is not assignable to parameter `prompt_type` with type `PromptType | SQLCoreOperations[PromptType]` in function `models.model.AppModelConfig.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:974:25
+   --> tests/e2e_tests/containers/services/test_app_dsl_service.py:972:25
+ERROR Argument `Workflow` is not assignable to parameter `workflow` with type `WorkflowBindingScope` in function `services.agent.dsl_service.AgentDslService.import_workflow_packages` [bad-argument-type]
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1065:22
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `services.app_service.AppService.create_app` [bad-argument-type]
-    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1123:13
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1121:13
 ERROR Argument `Literal['workflow']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1263:20
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1261:20
 ERROR Argument `Literal['workflow']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1296:20
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1294:20
 ERROR Argument `Literal['workflow']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1336:20
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1334:20
+ERROR No attribute `WorkflowService` in module `services.app_dsl_service` [missing-attribute]
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1397:29
 ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `dsl_dependencies` with type `list[PluginDependency]` in function `services.app_dsl_service.AppDslService.get_leaked_dependencies` [bad-argument-type]
-    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1618:73
+    --> tests/e2e_tests/containers/services/test_app_dsl_service.py:1616:73
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:196:38
+   --> tests/e2e_tests/containers/services/test_app_generate_service.py:219:38
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.workflow.Workflow.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:223:24
+   --> tests/e2e_tests/containers/services/test_app_generate_service.py:246:24
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:497:23
+   --> tests/e2e_tests/containers/services/test_app_generate_service.py:599:23
 ERROR Argument `Literal['invalid_mode']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:576:20
+   --> tests/e2e_tests/containers/services/test_app_generate_service.py:692:20
 WARN Module `sqlalchemy.exc` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:583:41
-ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `args` with type `LoopNodeRunPayload` in function `services.app_generate_service.AppGenerateService.generate_single_loop` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:837:18
-ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `args` with type `LoopNodeRunPayload` in function `services.app_generate_service.AppGenerateService.generate_single_loop` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:869:18
-ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `args` with type `LoopNodeRunPayload` in function `services.app_generate_service.AppGenerateService.generate_single_loop` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_app_generate_service.py:900:22
+   --> tests/e2e_tests/containers/services/test_app_generate_service.py:699:41
 ERROR Argument `Literal['agent-chat']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-    --> tests/e2e_tests/containers/services/test_app_generate_service.py:1017:20
+    --> tests/e2e_tests/containers/services/test_app_generate_service.py:1215:20
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
   --> tests/e2e_tests/containers/services/test_app_service.py:86:38
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -719,17 +755,17 @@
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_dataset_service_create_dataset.py:36:18
 ERROR Argument `str` is not assignable to parameter `data_source_type` with type `DataSourceType | SQLCoreOperations[DataSourceType]` in function `models.dataset.Document.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_dataset_service_document.py:71:30
+  --> tests/e2e_tests/containers/services/test_dataset_service_document.py:73:30
 ERROR Argument `str` is not assignable to parameter `doc_form` with type `IndexStructureType | SQLCoreOperations[IndexStructureType]` in function `models.dataset.Document.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_dataset_service_document.py:77:22
+  --> tests/e2e_tests/containers/services/test_dataset_service_document.py:79:22
 ERROR Argument `str` is not assignable to parameter `value` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_dataset_service_document.py:79:36
+  --> tests/e2e_tests/containers/services/test_dataset_service_document.py:81:36
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_dataset_service_permissions.py:40:20
+  --> tests/e2e_tests/containers/services/test_dataset_service_permissions.py:41:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_dataset_service_permissions.py:42:58
+  --> tests/e2e_tests/containers/services/test_dataset_service_permissions.py:43:58
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_dataset_service_permissions.py:69:20
+  --> tests/e2e_tests/containers/services/test_dataset_service_permissions.py:70:20
 ERROR Argument `str` is not assignable to parameter `value` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_document_service_display_status.py:50:32
 ERROR Argument `Literal['completed']` is not assignable to parameter `value` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
@@ -801,9 +837,9 @@
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_file_service.py:76:20
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:45:18
+  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:41:18
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:54:19
+  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:50:19
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_message_export_service.py:53:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1039,15 +1075,9 @@
 ERROR Argument `str` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/test_model_provider_service.py:184:24
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_schedule_service.py:30:20
+  --> tests/e2e_tests/containers/services/test_schedule_service.py:32:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_schedule_service.py:32:58
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_schedule_service.py:319:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_schedule_service.py:353:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_schedule_service.py:382:22
+  --> tests/e2e_tests/containers/services/test_schedule_service.py:34:58
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_webapp_auth_service.py:45:14
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
@@ -1055,13 +1085,11 @@
 ERROR Argument `Literal['workflow']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_webhook_service.py:62:14
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:68:72
+  --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:69:72
 ERROR Argument `Literal['workflow']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:90:18
+  --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:91:18
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:91:23
-ERROR Class `WebhookServiceRelationshipFactory` has no class attribute `_read_cache` [missing-attribute]
-   --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:544:26
+  --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:92:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/e2e_tests/containers/services/test_workflow_app_service.py:126:38
 ERROR Argument `Literal['app-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowRunTriggeredFrom] | WorkflowRunTriggeredFrom` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
@@ -1127,233 +1155,223 @@
 ERROR Argument `Literal['succeeded']` is not assignable to parameter `status` with type `SQLCoreOperations[WorkflowExecutionStatus] | WorkflowExecutionStatus` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
     --> tests/e2e_tests/containers/services/test_workflow_app_service.py:1493:28
 ERROR Argument `Literal['workflow']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:72:20
+  --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:73:20
 ERROR Argument `Literal['emoji']` is not assignable to parameter `value` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:73:25
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_draft_variables_by_selectors` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:269:99
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.list_variables_without_values` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:307:89
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.list_node_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:358:71
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.list_conversation_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:400:70
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.delete_user_workflow_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:578:64
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.list_conversation_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:633:75
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.delete_user_workflow_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:638:64
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.delete_node_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:709:64
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService._get_conversation_id_from_draft_variable` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:797:86
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService._get_conversation_id_from_draft_variable` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:813:86
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.list_system_variables` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:854:64
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_conversation_variable` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:901:97
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_system_variable` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:905:89
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_node_variable` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:909:102
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_conversation_variable` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:927:105
-ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_\n\n... (truncated) ...

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 81.50% 82.15% +0.65%
Strict coverage 81.15% 81.81% +0.66%
Typed symbols 85,534 90,892 +5,358
Untyped symbols 19,495 19,828 +333
Modules 4396 4663 +267

@41tair
41tair added this pull request to stack #43700 October 8, 2026 10:47
@github-actions github-actions Bot added the web This relates to changes on the web. label Oct 8, 2026
@github-actions github-actions Bot removed the web This relates to changes on the web. label Oct 8, 2026
@41tair
41tair force-pushed the refactor/api-76-10-12 branch from 9b7e837 to 7509a7a Compare October 9, 2026 06:14
@41tair
41tair force-pushed the refactor/api-76-10-12 branch from 7509a7a to fd7d053 Compare October 9, 2026 06:21
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.89381% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.60%. Comparing base (ea45e19) to head (1d749c8).

Files with missing lines Patch % Lines
api/core/tools/workflow_as_tool/tool.py 42.10% 22 Missing ⚠️
api/repositories/knowledge/retrieval_repository.py 0.00% 15 Missing ⚠️
...core/app/apps/agent_app/runtime_request_builder.py 0.00% 9 Missing ⚠️
...workflow/execution/adapters/agent_v2/agent_node.py 22.22% 7 Missing ⚠️
api/core/app/apps/agent_app/app_generator.py 0.00% 5 Missing ⚠️
.../services/agent/legacy_workflow_publish_service.py 0.00% 5 Missing ⚠️
api/core/app/apps/pipeline/pipeline_runner.py 0.00% 3 Missing ⚠️
api/core/app/apps/workflow_app_runner.py 0.00% 3 Missing ⚠️
api/services/app_dsl_service.py 50.00% 3 Missing ⚠️
api/core/app/apps/advanced_chat/app_generator.py 0.00% 2 Missing ⚠️
... and 7 more

❌ Your project check has failed because the head coverage (64.60%) is below the adjusted base coverage (75.24%). You can increase the head coverage or adjust the Removed Code Behavior.

❗ There is a different number of reports uploaded between BASE (ea45e19) and HEAD (1d749c8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (ea45e19) HEAD (1d749c8)
api 2 1
Additional details and impacted files
@@                   Coverage Diff                   @@
##           refactor/api-76-10   #43695       +/-   ##
=======================================================
- Coverage               75.97%   64.60%   -11.38%     
=======================================================
  Files                    6377     6263      -114     
  Lines                  402835   382407    -20428     
  Branches                82170    80134     -2036     
=======================================================
- Hits                   306044   247035    -59009     
- Misses                  90973   132888    +41915     
+ Partials                 5818     2484     -3334     
Flag Coverage Δ
api 51.31% <23.89%> (-20.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@41tair
41tair removed this pull request from stack #43700 October 9, 2026 09:41
@41tair
41tair added this pull request to stack #43755 October 9, 2026 09:42
@41tair
41tair marked this pull request as ready for review October 9, 2026 09:49
@dosubot

dosubot Bot commented Oct 9, 2026

Copy link
Copy Markdown

📄 Knowledge review

✏️ Suggested updates

1 page suggestion needs review.

Page Library Status
Dify Agent Server 模块分析 (Commit 55f95dbc) dify 🟡 Review
📝 Dify Agent Server 模块分析 (Commit 55f95db)
@@ -112,8 +112,8 @@
 
 Agent v2 节点现已集成新的 Dify 拥有的 HITL 实体和回调:
 
-- `api/core/workflow/nodes/agent_v2/agent_node.py`:使用 `DifyHITLCallback` 构建人工输入暂停,通过 `default_session_binding` 转换暂停原因为 graphon `HitlRequired`
-- `api/core/workflow/nodes/agent_v2/ask_human_hitl.py` 和 `ask_human_resume.py`:与新的 `HumanInputRequired` 暂停原因和表单实体协作
+- `api/services/workflow/execution/adapters/agent_v2/agent_node.py`:使用 `DifyHITLCallback` 构建人工输入暂停,通过 `default_session_binding` 转换暂停原因为 graphon `HitlRequired`
+- `api/services/workflow/execution/adapters/agent_v2/ask_human_hitl.py` 和 `ask_human_resume.py`:与新的 `HumanInputRequired` 暂停原因和表单实体协作
 
 ### Repository 和 Service 层变更
 
@@ -555,11 +555,12 @@
 - 请求体:`InnerKnowledgeRetrieveRequest`(含调用者上下文、数据集 ID、查询、检索配置、元数据过滤、附件 ID)
 - 响应体:`InnerKnowledgeRetrieveResponse`(含检索结果和 LLM 使用统计)
 
-**工作流集成**(`api/core/workflow/nodes/agent_v2/runtime_request_builder.py`):
+**工作流集成**(`api/services/workflow/execution/adapters/agent_v2/runtime_request_builder.py`):
 
 - `build_knowledge_layer_config()`:从 Agent Soul 配置构建知识层配置,仅在配置了有效数据集 ID 时生成层
 - 当前实现强制使用 `multiple` 检索模式,`top_k` 默认为 4(配置缺失时),`score_threshold` 仅在 Agent Soul 显式启用时转发(通过 `query_config.score_threshold_enabled` 和 `query_config.score_threshold` 字段)
 - 层通过 `AgentBackendWorkflowNodeRunInput` 的 `knowledge` 字段注入到运行时请求
+- Agent App 的运行时请求构建器(`api/core/app/apps/agent_app/runtime_request_builder.py`)从同一适配器包导入这些构建函数,并要求显式注入 `dify_tools_builder`(无默认值)
 
 **设计原理**:知识层将 Agent 知识检索从"工具调用声明"升级为"运行时基础设施层",通过固定工具身份(`knowledge_base_search`)和配置驱动控制,确保 API 端 Agent Soul 映射的稳定性。层依赖执行上下文获取完整调用者身份(`tenant_id`、`user_id`、`user_from`、`app_id`、`invoke_from` 五个必需字段),使知识检索能够在工作流和 Agent App 两种调用场景下复用相同的权限和可观察性基础设施。
 

Accept · Edit · Decline


Leave Feedback Ask Dosu about dify

# Conflicts:
#	api/core/repositories/human_input_repository.py
#	api/core/workflow/node_runtime.py
#	api/core/workflow/nodes/agent/agent_node.py
#	api/core/workflow/nodes/agent_v2/agent_node.py
#	api/core/workflow/nodes/agent_v2/runtime_request_builder.py
#	api/core/workflow/workflow_entry.py
#	api/services/workflow/execution/adapters/agent_message_transformer.py
@41tair
41tair requested a review from WH-2099 as a code owner October 27, 2026 05:07
41tair added 11 commits October 27, 2026 13:19
# Conflicts:
#	api/.importlinter
#	api/core/app/apps/advanced_chat/app_generator.py
#	api/core/app/apps/pipeline/pipeline_generator.py
#	api/core/app/apps/workflow/app_generator.py
#	api/core/app/apps/workflow/app_runner.py
#	api/core/app/apps/workflow_app_runner.py
#	api/core/plugin/backwards_invocation/app.py
#	api/core/tools/workflow_as_tool/tool.py
#	api/core/workflow/node_factory.py
#	api/core/workflow/node_runtime.py
#	api/core/workflow/nodes/human_input/boundary.py
#	api/core/workflow/nodes/human_input/callback.py
#	api/core/workflow/workflow_tool_container_handler.py
#	api/tests/unit_tests/services/agent/test_workflow_publish_service.py
#	api/tests/unit_tests/services/test_workflow_run_agg.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: top ghfind author score; see https://ghfind.com size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant