Do not allow create WorkflowTool from workflows containing HumanInput nodes (vibe-kanban 9e27ac53)

The HumanInput node will pause the execution of workflow if execution, while WorkflowTool works in a blocking manner. (Receiving arguments and returning results once finished). The two mode are inherently incompatible.

The goal of this change is to forbid workflows containing HumanInput node being published as WorkflowTool.

Please check the current implementation and propose a solution.
This commit is contained in:
QuantumGhost
2026-01-21 16:29:49 +08:00
parent 05f9ea4220
commit 67c7ca7da7
6 changed files with 340 additions and 1 deletions

View File

@ -1,3 +1,5 @@
from libs.exception import BaseHTTPException
from core.tools.entities.tool_entities import ToolInvokeMeta
@ -37,6 +39,12 @@ class ToolCredentialPolicyViolationError(ValueError):
pass
class WorkflowToolHumanInputNotSupportedError(BaseHTTPException):
error_code = "workflow_tool_human_input_not_supported"
description = "Workflow with Human Input nodes cannot be published as a workflow tool."
code = 400
class ToolEngineInvokeError(Exception):
meta: ToolInvokeMeta