Skip to content

refactor(api): add Workflow API gateways and credential readers - #43692

Open
41tair wants to merge 41 commits into
refactor/api-76-10-7from
refactor/api-76-10-8
Open

41tair wants to merge 41 commits into
refactor/api-76-10-7from
refactor/api-76-10-8

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

Add Workflow API gateways and credential readers.

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

@github-actions github-actions Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 8, 2026
@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 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 81.50% 82.14% +0.64%
Strict coverage 81.15% 81.80% +0.65%
Typed symbols 85,534 91,086 +5,552
Untyped symbols 19,495 19,884 +389
Modules 4396 4663 +267

@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:06.808078136 +0000
+++ /tmp/pyrefly_pr.txt	2026-10-31 15:07:45.003868855 +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: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:429:5
+   --> 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]
@@ -184,6 +188,8 @@
    --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:153:35
 ERROR Argument `Any | None` is not assignable to parameter `cluster_response` with type `Mapping[str, Any]` in function `TidbService.extract_qdrant_endpoint` [bad-argument-type]
    --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:154:75
+ERROR Missing argument `self` in function `services.tools.workflow_tools_manage_service.WorkflowToolManageService.create_workflow_tool` [missing-argument]
+   --> services/app/console_gateway.py:472:55
 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/controllers/console/app/test_chat_conversation_status_count_api.py:75:16
 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]
@@ -249,77 +255,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
 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 +341,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]
@@ -801,9 +807,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:40: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:49: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]
@@ -1221,123 +1227,123 @@
 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/tools/test_mcp_tools_manage_service.py:72:20
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:752:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:754:20
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:753:32
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:755:32
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:754:32
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:756:32
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:763:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:765:20
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:764:34
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:766:34
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:778:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:780:20
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:779:16
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:781:16
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:787:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:789:20
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:795:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:797:20
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:804:33
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:806:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:805:16
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:807:16
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:109:38
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:111:38
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:113:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:115:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:188:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:190:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:208:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:210:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:223:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:225:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:257:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:259:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:273:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:275:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:290:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:292:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:323:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:325:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:340:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:342:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:369:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:371:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:395:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:397:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:425:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:427:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:442:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:444:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:459:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:461:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:494:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:496:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:510:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:512:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:546:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:548:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:559:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:561:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:592:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:594:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:606:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:608:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:624:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:626:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:625:30
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:627:30
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:671:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:673:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:683:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:685:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:704:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:706:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:705:30
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:707:30
 ERROR Object of class `NoneType` has no attribute `name` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:715:16
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:717:16
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:743:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:745:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:760:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:762:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:790:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:792:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:804:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:806:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:813:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:815:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:814:30
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:816:30
 ERROR Object of class `NoneType` has no attribute `name` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:827:16
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:829:16
 ERROR Object of class `NoneType` has no attribute `updated_at` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:828:16
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:830:16
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:892:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:894:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:970:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:972:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1014:27
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1016:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1031:51
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1033:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1055:23
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1057:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1066:54
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1068:54
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1071:77
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1073:77
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1088:83
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1090:83
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1102:80
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1104:80
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1114:79
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1116:79
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1126:78
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1128:78
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1139:23
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1141:23
 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/workflow/test_workflow_converter.py:107: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]
@@ -1664,16 +1670,6 @@
    --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:832:25
 ERROR Argument `dict[str, str | dict[str, dict[Unknown, Unknown] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:859:21
-ERROR Class member `StaticRepo.get_form` overrides parent class `HumanInputFormRepository` in an inconsistent manner [bad-override]
-   --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:137:9
-ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
-   --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:205:32
-ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
-   --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:209:14
-ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
-   --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:221:32
-ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
-   --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:225:14
 ERROR Argument `SSRFProxy` is not assignable to parameter `http_client` with type `HttpClientProtocol` in function `graphon.nodes.http_request.executor.Executor.__init__` [bad-argument-type]
   --> tests/e2e_tests/contracts/core/workflow/nodes/http_request/test_http_request_executor.py:64:21
 ERROR Argument `SSRFProxy` is not assignable to parameter `http_client` with type `HttpClientProtocol` in function `graphon.nodes.http_request.executor.Executor.__init__` [bad-argument-type]
@@ -1767,13 +1763,13 @@
 ERROR Argument `ModelInstance` is not assignable to parameter `model_instance` with type `LLMProtocol` in function `graphon.nodes.llm.llm_utils.fetch_prompt_messages` [bad-argument-type]
     --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_llm_utils.py:1070:28
 ERROR Argument `Iterator[LLMResultChunk | LLMResultChunkWithStructuredOutput]` is not assignable to parameter `invoke_result` with type `Generator[LLMResultChunk | LLMStructuredOutput] | LLMResult` in function `graphon.nodes.llm.node.LLMNode.handle_invoke_result` [bad-argument-type]
-    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1630:31
+    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1634:31
 ERROR Argument `Generator[None, Unknown]` is not assignable to parameter `invoke_result` with type `Generator[LLMResultChunk | LLMStructuredOutput] | LLMResult` in function `graphon.nodes.llm.node.LLMNode.handle_invoke_result` [bad-argument-type]
-    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1671:31
+    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1675:31
 ERROR Missing argument `run_context` in function `core.app.llm.model_access.DifyCredentialsProvider.__init__` [missing-argument]
-    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1863:32
+    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1867:32
 ERROR Missing argument `run_context` in function `core.app.llm.model_access.DifyModelFactory.__init__` [missing-argument]
-    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1866:25
+    --> tests/e2e_tests/contracts/core/workflow/nodes/llm/test_node.py:1870:25
 ERROR Object of class `NoneType` has no attribute `assert_called_once_with` [missing-attribute]
    --> tests/e2e_tests/contracts/core/workflow/nodes/test_document_extractor_node.py:217:9
 ERROR Object of class `NoneType` has no attribute `assert_called_once_with` [missing-attribute]
@@ -1797,13 +1793,13 @@
 ERROR Argument `Iterator[ToolRuntimeMessage]` is not assignable to parameter `messages` with type `Generator[ToolRuntimeMessage]` in function `graphon.nodes.tool.tool_node.ToolNode._transform_message` [bad-argument-type]
    --> tests/e2e_tests/contracts/core/workflow/nodes/tool/test_tool_node.py:141:18
 ERROR `-` is not supported between `None` and `datetime` [unsupported-operation]
-  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:64:21
+  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:59:21
 ERROR `-` is not supported between `None` and `datetime` [unsupported-operation]
-  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:75:21
+  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:70:21
 ERROR `<=` is not supported between `datetime` and `None` [unsupported-operation]
-   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:120:16
+   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:115:16
 ERROR `<=` is not supported between `None` and `datetime` [unsupported-operation]
-   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:120:16
+   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:115:16
 ERROR `*` is not supported between `float` and `str` [unsupported-operation]
   --> tests/e2e_tests/knowledge_fs_vector/test_backends.py:54:37
 ERROR `*` is not supported between `str` and `float` [unsupported-operation]
@@ -1986,44 +1982,48 @@
     --> tests/helpers/unit/services/document_service_validation.py:1388:9
 ERROR Object of class `NoneType` has no attribute `segmentation` [missing-attribute]
     --> tests/helpers/unit/services/document_service_validation.py:1464:9
+ERROR Argument `() -> MagicMock` is not assignable to parameter `retrieval` with type `DatasetRetrievalFactory` in function `services.hit_testing_service.HitTestingService.retrieve` [bad-argument-type]
+   --> tests/helpers/unit/services/hit_service.py:295:27
+ERROR Argument `() -> MagicMock` is not assignable to parameter `retrieval` with type `DatasetRetrievalFactory` in function `services.hit_testing_service.HitTestingService.retrieve` [bad-argument-type]
+   --> tests/helpers/unit/services/hit_service.py:344:27
 ERROR Cannot index into `list[Unknown]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:423:20
+   --> tests/helpers/unit/services/hit_service.py:450:20
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:423:20
+   --> tests/helpers/unit/services/hit_service.py:450:20
 ERROR Argument `dict[str, str] | list[Unknown] | object` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/helpers/unit/services/hit_service.py:424:24
+   --> tests/helpers/unit/services/hit_service.py:451:24
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:425:20
+   --> tests/helpers/unit/services/hit_service.py:452:20
 ERROR Cannot index into `str` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:425:20
+   --> tests/helpers/unit/services/hit_service.py:452:20
 ERROR Cannot index into `dict[str, str]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:425:38
+   --> tests/helpers/unit/services/hit_service.py:452:38
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:426:20
+   --> tests/helpers/unit/services/hit_service.py:453:20
 ERROR Cannot index into `str` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:426:20
+   --> tests/helpers/unit/services/hit_service.py:453:20
 ERROR Cannot index into `dict[str, str]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:426:38
+   --> tests/helpers/unit/services/hit_service.py:453:38
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:427:20
+   --> tests/helpers/unit/services/hit_service.py:454:20
 ERROR Cannot index into `str` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:427:20
+   --> tests/helpers/unit/services/hit_service.py:454:20
 ERROR Cannot index into `dict[str, str]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:427:38
+   --> tests/helpers/unit/services/hit_service.py:454:38
 ERROR Cannot index into `list[Unknown]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:457:16
+   --> tests/helpers/unit/services/hit_service.py:489:16
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:457:16
+   --> tests/helpers/unit/services/hit_service.py:489:16
 ERROR Cannot index into `list[Unknown]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:497:20
+   --> tests/helpers/unit/services/hit_service.py:529:20
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:497:20
+   --> tests/helpers/unit/services/hit_service.py:529:20
 ERROR Argument `dict[str, str] | list[Unknown] | object` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/helpers/unit/services/hit_service.py:498:24
+   --> tests/helpers/unit/services/hit_service.py:530:24
 ERROR Cannot index into `list[Unknown]` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:536:20
+   --> tests/helpers/unit/services/hit_service.py:568:20
 ERROR Cannot index into `object` [bad-index]
-   --> tests/helpers/unit/services/hit_service.py:536:20
+   --> tests/helpers/unit/services/hit_service.py:568:20
 ERROR Cannot extend final class `DifyNodeFactory` [invalid-inheritance]
   --> tests/helpers/workflow/mock_factory.py:36:23
 ERROR Class member `MockNodeFactory.create_node` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
@@ -2110,14 +2110,10 @@
    --> tests/helpers/workflow/mock_nodes.py:755:52
 ERROR Cannot set item in `dict[str, str]` [unsupported-operation]
    --> tests/helpers/workflow/mock_nodes.py:757:52
-ERROR Argument `Sequence[type[EngineEvent]]` is not assignable to parameter `expected_sequence` with type `list[type[EngineEvent]]` in function `TableTestRunner._validate_event_sequence` [bad-argument-type]
-   --> tests/helpers/workflow/table_runner.py:336:21
-ERROR `graph` is uninitialized [unbound-name]
-   --> tests/helpers/workflow/table_runner.py:389:23
-ERROR `graph_runtime_state` is uninitialized [unbound-name]
-   --> tests/helpers/workflow/table_runner.py:390:37
 WARN `URLError` is already caught earlier in this `try` statement, so it never matches here [unreachable-except-clause]
    --> tests/pytest_dify.py:155:34
+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/test_containers_integration_tests/repositories/agent/test_workflow_binding_locking.py:50:14
 ERROR Object of class `object` has no attribute `package` [missing-attribute]
    --> tests/unit_tests/commands/test_data_migration.py:218:16
 ERROR Object of class `object` has no attribute `options_override` [missing-attribute]
@@ -2169,21 +2165,21 @@
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
    --> tests/unit_tests/controllers/console/app/test_app.py:173:13
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_app.py:665:55
+   --> tests/unit_tests/controllers/console/app/test_app.py:661:55
 ERROR Object of class `App` has no attribute `create_user_name` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_app.py:759:5
+   --> tests/unit_tests/controllers/console/app/test_app.py:755:5
 ERROR Object of class `App` has no attribute `permission_keys` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_app.py:761:5
+   --> tests/unit_tests/controllers/console/app/test_app.py:757:5
 ERROR Object of class `App` has no attribute `permission_keys` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_app.py:959:82
+   --> tests/unit_tests/controllers/console/app/test_app.py:955:82
 ERROR Object of class `App` has no attribute `permission_keys` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_app.py:990:9
+   --> tests/unit_tests/controllers/console/app/test_app.py:986:9
 ERROR Object of class `App` has no attribute `permission_keys` [missing-attribute]
-    --> tests/unit_tests/controllers/console/app/test_app.py:1003:37
+   --> tests/unit_tests/controllers/console/app/test_app.py:999:37
 ERROR Object of class `App` has no attribute `permission_keys` [missing-attribute]
-    --> tests/unit_tests/controllers/console/app/test_app.py:1075:9
+    --> tests/unit_tests/controllers/console/app/test_app.py:1071:9
 ERROR `str` is not assignable to dict key `strategy` with type `bool | list[Unknown]` [bad-assignment]
-    --> tests/unit_tests/controllers/console/app/test_app.py:1113:38
+    --> tests/unit_tests/controllers/console/app/test_app.py:1109:38
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `SQLCoreOperations[str] | str` in function `models.model.App.__init__` [bad-argument-type]
    --> tests/unit_tests/controllers/console/app/test_app_import.py:135:31
 ERROR Cannot index into `object` [bad-index]
@@ -2303,11 +2299,15 @@
 ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
    --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_datasource_auth.py:828:33
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
-  --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:83:9
+  --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:99:9
 ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:303:25
+   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:319:25
 ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:334:25
+   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:350:25
+ERROR Object of class `object` has no attribute `id` [missing-attribute]
+   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:515:12
+ERROR Object of class `object` has no attribute `kind` [missing-attribute]
+   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:516:12
 ERROR Unexpected keyword argument `created_at` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [unexpected-keyword]
    --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline_workflow.py:876:9
 ERROR Argument `datetime | None` is not assignable to parameter `value` with type `SQLCoreOperations[datetime] | datetime` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
@@ -2401,13 +2401,13 @@
 ERROR Generator function should return `Generator` [bad-return]
   --> tests/unit_tests/controllers/console/tag/test_tags.py:66:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form._jsonify_form_definition` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/test_human_input_form.py:94:41
+  --> tests/unit_tests/controllers/console/test_human_input_form.py:93:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form.ConsoleHumanInputFormApi._ensure_console_access` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/test_human_input_form.py:105:57
+   --> tests/unit_tests/controllers/console/test_human_input_form.py:104:57
 ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/test_human_input_form.py:131:22
+   --> tests/unit_tests/controllers/console/test_human_input_form.py:130:22
 ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/test_human_input_form.py:152:22
+   --> tests/unit_tests/controllers/console/test_human_input_form.py:151:22
 ERROR Type `Response` is not iterable [not-iterable]
    --> tests/unit_tests/controllers/console/test_wraps.py:306:17
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
@@ -2429,7 +2429,7 @@
 ERROR `in` is not supported between `Literal['knowledge-retrieval']` and `object` [not-iterable]
    --> tests/unit_tests/controllers/console/workspace/test_snippets.py:213:12
 WARN Call to deprecated overload `contextlib.contextmanager` [deprecated]
-  --> tests/unit_tests/controllers/inner_api/knowledge/test_retrieval.py:59:1
+  --> tests/unit_tests/controllers/inner_api/knowledge/test_retrieval.py:72:1
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
    --> tests/unit_tests/controllers/inner_api/plugin/test_wraps.py:292:40
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
\n\n... (truncated) ...

@41tair
41tair added this pull request to stack #43700 October 8, 2026 10:47
@41tair
41tair force-pushed the refactor/api-76-10-8 branch from 1f5f85e to ab4ee86 Compare October 9, 2026 05:25
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.28467% with 530 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.10%. Comparing base (9f1dcbd) to head (3fbc1c4).

Files with missing lines Patch % Lines
api/fields/workflow_fields.py 0.00% 108 Missing ⚠️
api/services/workflow/definition_gateway.py 0.00% 85 Missing ⚠️
api/services/human_input/debug_service.py 0.00% 80 Missing ⚠️
api/services/tools/agent_invocation_gateway.py 0.00% 49 Missing ⚠️
api/services/tools/agent_configuration.py 0.00% 35 Missing ⚠️
api/services/workflow/conversion_service.py 0.00% 33 Missing ⚠️
api/services/workflow/node_execution_extras.py 0.00% 27 Missing ⚠️
...repositories/workflow/node_execution_repository.py 0.00% 20 Missing ⚠️
api/services/tools/plugin_invocation.py 0.00% 20 Missing ⚠️
api/services/workflow/access_gateway.py 0.00% 19 Missing ⚠️
... and 6 more
Additional details and impacted files
@@                   Coverage Diff                    @@
##           refactor/api-76-10-7   #43692      +/-   ##
========================================================
- Coverage                 40.13%   40.10%   -0.04%     
========================================================
  Files                      6276     6289      +13     
  Lines                    389341   389855     +514     
  Branches                  81228    81276      +48     
========================================================
+ Hits                     156265   156345      +80     
- Misses                   229135   229554     +419     
- Partials                   3941     3956      +15     
Flag Coverage Δ
api 56.23% <3.28%> (-0.10%) ⬇️

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)
@@ -520,7 +520,7 @@
 
 #### 9. Dify Core Tools Layer
 
-**`DifyCoreToolsLayer`**(type_id: `dify.core_tools`,PR #38162 新增):API 路由的 agent 可访问工具层,用于必须在 Dify API 服务边界内执行的提供者家族。该层将 API 准备的工具声明解析为 Pydantic AI 工具,工具调用委托给 `POST /inner/api/agent/tools/invoke` 端点,使凭证和提供者本地状态保留在 API 进程中。该层依赖 `DifyExecutionContextLayer` 获取调用者身份,通过 `DifyCoreToolsClient` 与内部 API 通信。配置包含工具列表(`DifyCoreToolConfig`),每个工具携带 `name`(或 `tool_name`)、`description`、`parameters_json_schema`(API 准备的模型可见 schema)以及 `runtime_parameters`(隐藏参数)。工具调用策略:配置错误返回"工具不可用"观察;可重试失败(超时、连接失败、HTTP 429/502)返回 `TEMPORARY_UNAVAILABLE_OBSERVATION`;不可重试失败(如 app_not_found、credential_invalid、tool_not_found)返回特定错误文本。该层在层图中位于 plugin tools 层之后,作为工具执行链的一部分。
+**`DifyCoreToolsLayer`**(type_id: `dify.core_tools`,PR #38162 新增):API 路由的 agent 可访问工具层,用于必须在 Dify API 服务边界内执行的提供者家族。该层将 API 准备的工具声明解析为 Pydantic AI 工具,工具调用委托给 `POST /inner/api/agent/tools/invoke` 端点,使凭证和提供者本地状态保留在 API 进程中。该层依赖 `DifyExecutionContextLayer` 获取调用者身份,通过 `DifyCoreToolsClient` 与内部 API 通信。配置包含工具列表(`DifyCoreToolConfig`),每个工具携带 `name`(或 `tool_name`)、`description`、`parameters_json_schema`(API 准备的模型可见 schema)以及 `runtime_parameters`(隐藏参数)。工具调用策略:配置错误返回"工具不可用"观察;可重试失败(超时、连接失败、HTTP 429/502)返回 `TEMPORARY_UNAVAILABLE_OBSERVATION`;不可重试失败(如 app_not_found、agent_tool_credential_invalid、agent_tool_declaration_not_found)返回特定错误文本。API 端由 `AgentToolInvocationGateway`(`api/services/tools/agent_invocation_gateway.py`)处理该端点调用,并将错误映射为 `AgentToolInnerServiceError`:`ToolProviderNotFoundError` → `agent_tool_declaration_not_found`(404);`ToolProviderCredentialValidationError` → `agent_tool_credential_invalid`(422);`ToolParameterValidationError` → `tool_parameters_invalid`(422);`ToolInvokeError`/`ToolNotFoundError`/`ToolNotSupportedError` → `agent_tool_invoke_failed`(422);`ValueError("app not found")` → `app_not_found`(404),其他 `ValueError` → `agent_tool_invoke_failed`(422);其余异常 → `agent_tool_invoke_unexpected_error`(500)。成功响应返回 `messages`、`observation`(工具响应的字符串形式)和 `metadata`(`provider_type`、`provider_id`、`tool_name`)。该层在层图中位于 plugin tools 层之后,作为工具执行链的一部分。
 
 #### 10. Dify Knowledge Base Layer
 

Accept · Edit · Decline


Leave Feedback Ask Dosu about dify

@autofix-ci
autofix-ci Bot requested a review from crazywoola as a code owner October 27, 2026 05:32
@github-actions github-actions Bot added the web This relates to changes on the web. label Oct 27, 2026
@github-actions github-actions Bot removed the web This relates to changes on the web. label Oct 31, 2026
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