Skip to content

feat: dev snippet fronted#36784

Merged
FFXN merged 58 commits into
deploy/devfrom
feat/dev-snippet-fronted
May 28, 2026
Merged

feat: dev snippet fronted#36784
FFXN merged 58 commits into
deploy/devfrom
feat/dev-snippet-fronted

Conversation

@FFXN
Copy link
Copy Markdown
Contributor

@FFXN FFXN commented May 28, 2026

Important

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

Summary

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 added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

lyzno1 and others added 30 commits May 26, 2026 02:33
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…e group (#36595)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…§8) (#36644)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
… tests (#36658)

Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…red (#36227)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: wangxiaolei <fatelei@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Signed-off-by: EvanYao826 <155432245+EvanYao826@users.noreply.github.com>
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. feat:webapp Ready-to-use AI web app. Also the "Preview" / "Debug & Preview" inside the orchestrate page. javascript labels May 28, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-05-28 09:33:22.705948821 +0000
+++ /tmp/pyrefly_pr.txt	2026-05-28 09:33:08.437908641 +0000
@@ -1,7 +1,5 @@
 ERROR `str` is not assignable to `Literal['advanced-chat', 'agent-chat', 'all', 'channel', 'chat', 'completion', 'workflow']` [bad-assignment]
   --> controllers/console/app/app.py:69:104
-ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
-   --> controllers/console/app/app.py:584:13
 ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
   --> controllers/console/auth/email_register.py:86:108
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
@@ -569,7 +567,7 @@
 ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
   --> schedule/queue_monitor_task.py:14:21
 ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
-    --> services/account_service.py:1355:13
+    --> services/account_service.py:1383:13
 ERROR `+` is not supported between `str` and `dict[Unknown, Unknown]` [unsupported-operation]
    --> services/app_service.py:519:53
 ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -616,6 +614,14 @@
    --> tasks/regenerate_summary_index_task.py:277:60
 ERROR Class member `AsyncWorkflowCFSPlanScheduler.plan` overrides parent class `CFSPlanScheduler` in an inconsistent manner [bad-override-mutable-attribute]
   --> tasks/workflow_cfs_scheduler/cfs_scheduler.py:19:5
+ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
+  --> tests/helpers/legacy_model_type_migration.py:64:16
+ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
+  --> tests/helpers/legacy_model_type_migration.py:80:16
+ERROR Argument `dict[_KeyType, Any]` is not assignable to parameter `object` with type `dict[str, object]` in function `list.append` [bad-argument-type]
+   --> tests/helpers/legacy_model_type_migration.py:138:23
+ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
+   --> tests/helpers/legacy_model_type_migration.py:182:13
 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/integration_tests/controllers/openapi/conftest.py:35:43
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
@@ -700,6 +706,26 @@
    --> tests/integration_tests/model_runtime/__mock/plugin_model.py:235:9
 ERROR `unpatch` may be uninitialized [unbound-name]
   --> tests/integration_tests/plugin/__mock/http.py:67:9
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:231:59
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:257:59
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:267:59
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:269:49
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:287:63
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:330:63
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:371:63
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:393:59
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:419:59
+ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
+   --> tests/integration_tests/services/test_node_output_inspector_service.py:468:63
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:621:21
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
@@ -1956,6 +1982,8 @@
    --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:857:21
 ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
   --> tests/test_containers_integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
+ERROR Argument `dict[str, object]` is not assignable to parameter `configs` with type `Mapping[str, LayerConfigInput] | None` in function `agenton.compositor.core.Compositor._create_run` [bad-argument-type]
+  --> tests/unit_tests/clients/agent_backend/test_cleanup_composition_compositor_integration.py:97:17
 ERROR Cannot index into `bool` [bad-index]
   --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
 ERROR Cannot index into `float` [bad-index]
@@ -1968,8 +1996,6 @@
   --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
 ERROR `None` is not subscriptable [unsupported-operation]
   --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR Cannot index into `object` [bad-index]
-   --> tests/unit_tests/clients/agent_backend/test_request_builder.py:132:12
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_clean_expired_messages.py:33:9
 ERROR Expected a callable, got `None` [not-callable]
@@ -1978,6 +2004,30 @@
   --> tests/unit_tests/commands/test_clean_expired_messages.py:94:9
 ERROR Expected a callable, got `None` [not-callable]
    --> tests/unit_tests/commands/test_clean_expired_messages.py:176:9
+ERROR Generator function should return `Generator` [bad-return]
+  --> tests/unit_tests/commands/test_legacy_model_type_migration.py:36:38
+ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:204:13
+ERROR Object of class `object` has no attribute `callback` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:383:5
+ERROR Object of class `object` has no attribute `callback` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:444:5
+ERROR Object of class `TextIOBase` has no attribute `name` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:457:17
+ERROR Class `object` has no class attribute `__table__` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:541:48
+ERROR Class `object` has no class attribute `__table__` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:620:48
+ERROR Class `object` has no class attribute `__table__` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:723:48
+ERROR Class `object` has no class attribute `__table__` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:801:48
+ERROR Class `object` has no class attribute `__table__` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:856:42
+ERROR Argument `object` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1226:44
+ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1250:57
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_reset_encrypt_key_pair.py:18:9
 ERROR Object of class `ModuleType` has no attribute `upgrade` [missing-attribute]
@@ -2090,22 +2140,6 @@
   --> tests/unit_tests/controllers/console/test_workspace_members.py:16:5
 ERROR `SimpleNamespace` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
   --> tests/unit_tests/controllers/console/test_workspace_members.py:73:43
-ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:119:24
-ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:183:16
-ERROR Object of class `Exception` has no attribute `description` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:184:56
-ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:263:28
-ERROR Object of class `Exception` has no attribute `description` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:264:67
-ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:288:28
-ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:364:28
-ERROR Object of class `Exception` has no attribute `description` [missing-attribute]
-   --> tests/unit_tests/controllers/console/test_wraps.py:365:48
 ERROR `SimpleNamespace` is not assignable to attribute `db` with type `SQLAlchemy` [bad-assignment]
   --> tests/unit_tests/controllers/files/test_image_preview.py:23:17
 ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
@@ -2174,58 +2208,6 @@
    --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:342:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
    --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:348:36
-ERROR Object of class `Step` has no attribute `_mounters` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/auth/test_composition.py:52:31
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
- --> tests/unit_tests/controllers/openapi/auth/test_context.py:5:34
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_context.py:19:34
-ERROR `frozenset[str]` is not assignable to attribute `scopes` with type `frozenset[Scope]` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_context.py:20:18
-ERROR Argument `Literal['x']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_pipeline.py:18:65
-ERROR Argument `Literal['x']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_pipeline.py:34:61
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `scope` with type `Scope` in function `controllers.openapi.auth.pipeline.Pipeline.guard` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_pipeline.py:49:27
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_app_resolver.py:13:35
-ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_app_resolver.py:63:12
-ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_app_resolver.py:64:12
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:14:32
-ERROR `str | Unknown` is not assignable to attribute `account_id` with type `UUID | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:17:20
-ERROR `SimpleNamespace` is not assignable to attribute `app` with type `App | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:18:13
-ERROR `SimpleNamespace` is not assignable to attribute `tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:19:16
-ERROR Argument `() -> SimpleNamespace` is not assignable to parameter `resolve_strategy` with type `() -> AppAuthzStrategy` in function `controllers.openapi.auth.steps.AppAuthzCheck.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:70:23
-ERROR Argument `() -> SimpleNamespace` is not assignable to parameter `resolve_strategy` with type `() -> AppAuthzStrategy` in function `controllers.openapi.auth.steps.AppAuthzCheck.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:76:19
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_bearer.py:22:35
-ERROR Argument `Literal['apps:read']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_layer0.py:18:32
-ERROR `SimpleNamespace | None` is not assignable to attribute `tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_layer0.py:21:16
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:15:32
-ERROR `SimpleNamespace` is not assignable to attribute `app` with type `App | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:19:13
-ERROR `SimpleNamespace` is not assignable to attribute `tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:20:16
-ERROR Argument `test_caller_mount_dispatches_by_subject_type.Fake` is not assignable to parameter `*mounters` with type `CallerMounter` in function `controllers.openapi.auth.steps.CallerMount.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:68:9
-ERROR Argument `test_caller_mount_dispatches_by_subject_type.Fake` is not assignable to parameter `*mounters` with type `CallerMounter` in function `controllers.openapi.auth.steps.CallerMount.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:69:9
-ERROR `in` is not supported between `Literal['wrong_surface']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/auth/test_surface_gate.py:93:20
-ERROR `in` is not supported between `Literal['/openapi/v1/apps']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/auth/test_surface_gate.py:96:20
 ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
   --> tests/unit_tests/controllers/openapi/test_account.py:40:12
 ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
@@ -2282,6 +2264,28 @@
   --> tests/unit_tests/controllers/openapi/test_workspaces.py:49:12
 ERROR `in` is not supported between `Literal['GET']` and `None` [not-iterable]
   --> tests/unit_tests/controllers/openapi/test_workspaces.py:50:12
+ERROR Could not find name `AuthData` [unknown-name]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:107:42
+ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:176:12
+ERROR `in` is not supported between `Literal['POST']` and `None` [not-iterable]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:177:12
+ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:182:12
+ERROR `in` is not supported between `Literal['GET']` and `None` [not-iterable]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:183:12
+ERROR `in` is not supported between `Literal['POST']` and `None` [not-iterable]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:184:12
+ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:189:12
+ERROR `in` is not supported between `Literal['DELETE']` and `None` [not-iterable]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:190:12
+ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:195:12
+ERROR `in` is not supported between `Literal['PUT']` and `None` [not-iterable]
+   --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:196:12
+ERROR Object of class `NoneType` has no attribute `json`
+ERROR Object of class `NoneType` has no attribute `json`
 ERROR Cannot index into `Iterable[bytes]` [bad-index]
    --> tests/unit_tests/controllers/service_api/app/test_audio.py:190:16
 ERROR Cannot index into `Response` [bad-index]
@@ -3218,67 +3222,71 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState | None` in function `core.app.apps.base_app_queue_manager.AppQueueManager.graph_runtime_state` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/test_base_app_queue_manager.py:70:39
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.recalc_llm_max_tokens` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_base_app_runner.py:64:38
+  --> tests/unit_tests/core/app/apps/test_base_app_runner.py:82:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.recalc_llm_max_tokens` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_base_app_runner.py:87:45
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:105:45
 ERROR Argument `_QueueRecorder` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner.direct_output` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_base_app_runner.py:97:27
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:115:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_generate_entity` with type `EasyUIBasedAppGenerateEntity` in function `core.app.apps.base_app_runner.AppRunner.direct_output` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_base_app_runner.py:98:33
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:116:33
 ERROR Argument `_QueueRecorder` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:119:27
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:137:27
 ERROR Argument `list[str]` is not assignable to parameter `invoke_result` with type `Generator[Any] | LLMResult` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:131:31
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:149:31
 ERROR Argument `_QueueRecorder` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:132:31
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:150:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_record` with type `App` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:150:24
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:168:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:151:26
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:169:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_record` with type `App` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:180:24
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:198:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:181:26
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:199:26
 ERROR Object of class `object` has no attribute `role_prefix` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:191:16
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:209:16
 ERROR Object of class `object` has no attribute `role_prefix` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:192:16
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:210:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_record` with type `App` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:215:24
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:233:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:216:26
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:234:26
 ERROR Argument `object` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:225:20
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:243:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_record` with type `App` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:232:28
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:250:28
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:233:30
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:251:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_record` with type `App` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:241:28
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:259:28
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity` in function `core.app.apps.base_app_runner.AppRunner.organize_prompt_messages` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:242:30
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:260:30
 ERROR Argument `_QueueRecorder` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:277:27
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:295:27
 ERROR Object of class `NoneType` has no attribute `message` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:284:16
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:302:16
 ERROR Argument `_QueueRecorder` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result_stream` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:322:27
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:340:27
 ERROR Object of class `NoneType` has no attribute `usage` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:331:16
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:349:16
+ERROR Argument `_ClosableStream` is not assignable to parameter `invoke_result` with type `Generator[LLMResultChunk]` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result_stream` [bad-argument-type]
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:367:31
+ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner._handle_invoke_result_stream` [bad-argument-type]
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:368:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `content` with type `ImagePromptMessageContent` in function `core.app.apps.base_app_runner.AppRunner._handle_multimodal_image_content` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:360:21
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:400:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner._handle_multimodal_image_content` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:364:27
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:404:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `EasyUIBasedAppGenerateEntity` in function `core.app.apps.base_app_runner.AppRunner.check_hosting_moderation` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:383:41
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:423:41
 ERROR Argument `_QueueRecorder` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.base_app_runner.AppRunner.check_hosting_moderation` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:384:27
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:424:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_generate_entity` with type `AppGenerateEntity` in function `core.app.apps.base_app_runner.AppRunner.moderation_for_inputs` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:419:33
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:459:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_record` with type `App` in function `core.app.apps.base_app_runner.AppRunner.query_app_annotations_to_reply` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:435:24
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:475:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.apps.base_app_runner.AppRunner.query_app_annotations_to_reply` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:436:21
+   --> tests/unit_tests/core/app/apps/test_base_app_runner.py:476:21
 ERROR `Literal['generated-conversation-id']` is not assignable to attribute `id` with type `Never` [bad-assignment]
   --> tests/unit_tests/core/app/apps/test_message_based_app_generator.py:93:22
 ERROR `Literal['generated-message-id']` is not assignable to attribute `id` with type `Never` [bad-assignment]
@@ -5609,6 +5617,50 @@
    --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:711:27
 ERROR Argument `Iterator[Unknown]` is not assignable to parameter `messages` with type `Generator[ToolInvokeMessage]` in function `core.workflow.nodes.agent.message_transformer.AgentMessageTransformer.transform` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/agent/test_message_transformer.py:15:26
+ERROR Cannot index into `bool` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `float` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `int` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `list[JsonValue]` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `bool` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `float` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `int` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `list[JsonValue]` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:150:12
+ERROR `not in` is not supported between `Literal['region']` and `bool` [not-iterable]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:151:12
+ERROR `not in` is not supported between `Literal['region']` and `float` [not-iterable]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:151:12
+ERROR `not in` is not supported between `Literal['region']` and `int` [not-iterable]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:151:12
+ERROR `not in` is not supported between `Literal['region']` and `None` [not-iterable]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_plugin_tools_builder.py:151:12
+ERROR Argument `object` is not assignable to parameter `status` with type `Literal['cancelled', 'failed', 'paused', 'running', 'succeeded']` in function `dify_agent.protocol.schemas.RunStatusResponse.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_session_cleanup_layer.py:121:20
+ERROR Class member `_WaitableFakeAgentBackendRunClient.stream_events` overrides parent class `FakeAgentBackendRunClient` in an inconsistent manner [bad-override]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_session_cleanup_layer.py:133:9
+ERROR Argument `_WaitableFakeAgentBackendRunClient` is not assignable to parameter `agent_backend_client` with type `AgentBackendRunClient | None` in function `core.workflow.nodes.agent_v2.session_cleanup_layer.WorkflowAgentSessionCleanupLayer.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_session_cleanup_layer.py:154:30
+ERROR Argument `_WaitableFakeAgentBackendRunClient` is not assignable to parameter `agent_backend_client` with type `AgentBackendRunClient | None` in function `core.workflow.nodes.agent_v2.session_cleanup_layer.WorkflowAgentSessionCleanupLayer.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_session_cleanup_layer.py:360:30
+ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
+  --> tests/unit_tests/core/workflow/nodes/agent_v2/test_session_store.py:66:5
+ERROR Object of class `FromClause` has no attribute `drop` [missing-attribute]
+  --> tests/unit_tests/core/workflow/nodes/agent_v2/test_session_store.py:71:5
 ERROR Class member `_Version1._get_retry_config` overrides parent class `Node` in an inconsistent manner [bad-override]
   --> tests/unit_tests/core/workflow/nodes/base/test_get_node_type_classes_mapping.py:53:13
 ERROR Expected 1 positional argument, got 2 in function `graphon.nodes.code.code_node.CodeNode._check_boolean` [bad-argument-count]
@@ -6056,13 +6108,13 @@
 ERROR `SimpleNamespace` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
    --> tests/unit_tests/libs/test_login.py:247:35
 ERROR Argument `Literal['apps:read']` is not assignable to parameter `scope` with type `Scope` in function `libs.oauth_bearer.require_scope` [bad-argument-type]
-  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:61:20
+  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:62:20
 ERROR Argument `Literal['apps:write']` is not assignable to parameter `scope` with type `Scope` in function `libs.oauth_bearer.require_scope` [bad-argument-type]
-  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:70:20
+  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:71:20
 ERROR Argument `Literal['apps:write']` is not assignable to parameter `scope` with type `Scope` in function `libs.oauth_bearer.require_scope` [bad-argument-type]
-  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:81:20
+  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:82:20
 ERROR Argument `Literal['apps:read']` is not assignable to parameter `scope` with type `Scope` in function `libs.oauth_bearer.require_scope` [bad-argument-type]
-  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:90:20
+  --> tests/unit_tests/libs/test_oauth_bearer_require_scope.py:91:20
 ERROR Argument `_FakeRedis` is not assignable to parameter `redis_client` with type `_RateLimiterRedisClient` in function `libs.helper.RateLimiter.__init__` [bad-argument-type]
   --> tests/unit_tests/libs/test_rate_limiter.py:44:22
 ERROR Argument `dict[@_, @_]` is not assignable to parameter `headers` with type `Message` in function `python_http_client.exceptions.HTTPError.__init__` [bad-argument-type]
@@ -6572,6 +6624,48 @@
   --> tests/unit_tests/services/tools/test_builtin_tools_manage_service.py:91:89
 ERROR Object of class `Mapping` has no attribute `startswith` [missing-attribute]
    --> tests/unit_tests/services/tools/test_tools_transform_service.py:464:16
+ERROR Object of class `Iterator` has no attribute `close` [missing-attribute]
+   --> tests/unit_tests/services/workflow/test_inspector_events.py:181:9
+ERROR Object of class `Iterator` has no attribute `close` [missing-attribute]
+   --> tests/unit_tests/services/workflow/test_inspector_events.py:200:9
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:152:53
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:164:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:177:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.node_detail` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:186:43
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.output_preview` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:199:27
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:218:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:233:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:248:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:260:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:282:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:318:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:336:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:355:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:384:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.output_preview` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:408:23
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:435:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:454:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:476:60
+ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
+   --> tests/unit_tests/services/workflow/test_node_output_inspector_service.py:498:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 45.65% 46.00% +0.35%
Strict coverage 45.17% 45.53% +0.36%
Typed symbols 24,208 24,788 +580
Untyped symbols 29,129 29,400 +271
Modules 2724 2754 +30

@FFXN FFXN merged commit 107bba0 into deploy/dev May 28, 2026
4 checks passed
@FFXN FFXN deleted the feat/dev-snippet-fronted branch May 28, 2026 09:34
@dosubot
Copy link
Copy Markdown

dosubot Bot commented May 28, 2026

Related Knowledge

1 document with suggested updates is ready for review.

dify

Dify Agent Server 模块分析 (Commit 55f95dbc)
View Suggested Changes
@@ -202,8 +202,8 @@
 
 ```python
 class MyLayerDeps(LayerDeps):
-    plugin: DifyPluginLayer      # 必须依赖
-    output: OutputLayer | None   # 可选依赖
+    execution_context: DifyExecutionContextLayer  # 必须依赖
+    output: OutputLayer | None                    # 可选依赖
 ```
 
 依赖在 `Compositor` 构建 `CompositorRun` 时直接解析并绑定为 Layer 实例引用,无需依赖注入容器或查找 API。
@@ -232,11 +232,11 @@
 
 [[23]](https://github.com/langgenius/dify/blob/7210f856c9c07ae03d7c2e5def96c949efee6397/dify-agent/src/dify_agent/layers/dify_plugin/plugin_layer.py)
 
-**`DifyPluginLayer`**(type_id: `dify.plugin`):共享的 Plugin Daemon 租户/用户上下文层,携带 `tenant_id` 和 `user_id`,不持有 HTTP 客户端。Plugin Daemon URL 和 API Key 由服务端 Provider 工厂注入,确保这些敏感配置不出现在公开的 HTTP 请求体中。该层作为共享依赖被 LLM 和工具层复用,具体的 `plugin_id` 由业务层(LLM、工具)各自携带 [[24]](https://github.com/langgenius/dify/blob/7210f856c9c07ae03d7c2e5def96c949efee6397/dify-agent/src/dify_agent/layers/dify_plugin/plugin_layer.py#L1-L11)。
-
-**`DifyPluginLLMLayer`**(type_id: `dify.plugin.llm`):依赖 `DifyPluginLayer`,持有插件包 ID(`plugin_id`)、模型提供者(`model_provider`)、模型名称(`model`)和模型凭证配置。其 `get_model()` 方法接受共享的 `httpx.AsyncClient`,返回 Pydantic AI 兼容的模型实例。
-
-**`DifyPluginToolsLayer`**(type_id: `dify.plugin.tools`):插件工具暴露层,将 API 侧预备的插件工具声明注册为 Pydantic AI 工具。API 侧负责解析 daemon 声明、合并参数和生成模型可见 JSON schema;Agent 侧负责验证隐藏输入、应用默认值、调用 daemon 并转换响应。配置包含工具列表(`DifyPluginToolConfig`),每个工具携带自己的 `plugin_id`、提供者名称(`provider`)、daemon 工具名称(`tool_name`)、凭证类型(`credential_type`)、运行时隐藏参数(`runtime_parameters`)以及 API 预备的参数声明(`parameters`、`parameters_json_schema`)。
+**`DifyExecutionContextLayer`**(type_id: `dify.execution_context`):Dify 专用的执行上下文层,携带 `tenant_id`、`app_id`、`workflow_id`、`workflow_run_id`、`node_id`、`node_execution_id`、`conversation_id`、`agent_id`、`agent_config_version_id` 等可观察性字段,以及 `invoke_from` 和 `trace_id`。该层不持有 HTTP 客户端或 Plugin Daemon 配置,仅作为元数据上下文被 LLM 和工具层依赖。
+
+**`DifyPluginLLMLayer`**(type_id: `dify.plugin.llm`):依赖 `DifyExecutionContextLayer`,持有插件包 ID(`plugin_id`)、模型提供者(`model_provider`)、模型名称(`model`)和模型凭证配置。其 `get_model()` 方法接受共享的 `httpx.AsyncClient`,返回 Pydantic AI 兼容的模型实例。
+
+**`DifyPluginToolsLayer`**(type_id: `dify.plugin.tools`):依赖 `DifyExecutionContextLayer`,插件工具暴露层,将 API 侧预备的插件工具声明注册为 Pydantic AI 工具。API 侧负责解析 daemon 声明、合并参数和生成模型可见 JSON schema;Agent 侧负责验证隐藏输入、应用默认值、调用 daemon 并转换响应。配置包含工具列表(`DifyPluginToolConfig`),每个工具携带自己的 `plugin_id`、提供者名称(`provider`)、daemon 工具名称(`tool_name`)、凭证类型(`credential_type`)、运行时隐藏参数(`runtime_parameters`)以及 API 预备的参数声明(`parameters`、`parameters_json_schema`)。
 
 #### 4. Output Layer
 

[Accept] [Edit] [Decline]

How did I do? Any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat:webapp Ready-to-use AI web app. Also the "Preview" / "Debug & Preview" inside the orchestrate page. size:XXL This PR changes 1000+ lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.