Skip to content

feat(api): add end-user tool credential configuration - #44406

Open
linw1995 wants to merge 5 commits into
linw/snp-911-end-user-authfrom
linw/snp-964-tool-node-end-user-config
Open

linw1995 wants to merge 5 commits into
linw/snp-911-end-user-authfrom
linw/snp-964-tool-node-end-user-config

Conversation

@linw1995

@linw1995 linw1995 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Add Tool Node credential configuration for SNP-964, including multiple enabled authentication methods, end-user descriptions, and test references. Authentication requirements are independent per node, including nodes from the same provider. Reuse from Node explicitly references directly configured Workspace or EndUser authentication on the same plugin, provider, and tool.

Preserve unfinished drafts, validate complete configurations through graph checks, and strip test references from ordinary DSL exports. Runtime resolution follows in SNP-965; until then, reject EndUser and reuse execution to prevent workspace credential fallback.

@github-actions github-actions Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-10-20 10:22:09.811977752 +0000
+++ /tmp/pyrefly_pr.txt	2026-10-20 10:22:00.963919502 +0000
@@ -4591,13 +4591,13 @@
 ERROR Object of class `ModuleType` has no attribute `TraceTask` [missing-attribute]
   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:36:9
 ERROR Object of class `object` has no attribute `parent_trace_context` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:189:12
+   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:227:12
 ERROR Object of class `object` has no attribute `trace_session_id` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:230:12
+   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:268:12
 ERROR Argument `object` is not assignable to parameter `message` with type `ToolInvokeMessage.BlobChunkMessage | ToolInvokeMessage.BlobMessage | ToolInvokeMessage.FileMessage | ToolInvokeMessage.JsonMessage | ToolInvokeMessage.LogMessage | ToolInvokeMessage.RetrieverResourceMessage | ToolInvokeMessage.TextMessage | ToolInvokeMessage.VariableMessage | None` in function `core.workflow.node_runtime.DifyToolNodeRuntime._convert_message_payload` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:320:48
+   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:358:48
 ERROR Argument `object` is not assignable to parameter `message` with type `ToolInvokeMessage.BlobChunkMessage | ToolInvokeMessage.BlobMessage | ToolInvokeMessage.FileMessage | ToolInvokeMessage.JsonMessage | ToolInvokeMessage.LogMessage | ToolInvokeMessage.RetrieverResourceMessage | ToolInvokeMessage.TextMessage | ToolInvokeMessage.VariableMessage | None` in function `core.workflow.node_runtime.DifyToolNodeRuntime._convert_message_payload` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:327:42
+   --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node_runtime.py:365:42
 ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
 ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
@@ -5439,11 +5439,11 @@
 ERROR `dict[str, str]` is not assignable to dict value type `list[Unknown] | str` [bad-assignment]
    --> tests/unit_tests/services/test_workflow_service.py:208:30
 ERROR `dict[@_, @_]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-assignment]
-    --> tests/unit_tests/services/test_workflow_service.py:3591:54
+    --> tests/unit_tests/services/test_workflow_service.py:3726:54
 ERROR Argument `Literal['invalid']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-    --> tests/unit_tests/services/test_workflow_service.py:3637:20
+    --> tests/unit_tests/services/test_workflow_service.py:3772:20
 ERROR Argument `dict[str, str | dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.workflow_service.WorkflowService._build_human_input_node_for_debugging` [bad-argument-type]
-    --> tests/unit_tests/services/test_workflow_service.py:3668:65
+    --> tests/unit_tests/services/test_workflow_service.py:3803:65
 ERROR Object of class `MCPToolProvider` has no attribute `provider_icon` [missing-attribute]
   --> tests/unit_tests/services/tools/test_mcp_tools_transform.py:71:5
 ERROR Object of class `MCPToolProvider` has no attribute `masked_server_url` [missing-attribute]

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 75.50% 75.52% +0.02%
Strict coverage 75.17% 75.19% +0.02%
Typed symbols 62,799 62,868 +69
Untyped symbols 20,470 20,469 -1
Modules 3813 3815 +2

@linw1995
linw1995 marked this pull request as ready for review October 20, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant