refactor: Migrate existing nodes (Function/Tool/start + test nodes) to new Node interface#984
Open
hanorik wants to merge 1 commit into
Open
refactor: Migrate existing nodes (Function/Tool/start + test nodes) to new Node interface#984hanorik wants to merge 1 commit into
hanorik wants to merge 1 commit into
Conversation
…o new Node interface
wolo-lab
approved these changes
Jun 8, 2026
| } else { | ||
| typedInput, ok := input.(IN) | ||
| if !ok { | ||
| // Fallback to the json-like input types that cannot be converted by the standard type assertion. |
There was a problem hiding this comment.
I think keeping it doesn't have drawbacks and makes the code more user friendly (e.g. no need to change workflow/agent_node_test.go and you can revert changes in TestToolNode_WorkflowIntegration at workflow/tool_node_test.go:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the workflow system's node architecture to adopt the new
Nodeinterface, delegating schema routing and config management toBaseNode, and consolidating validation in the scheduler.Key Changes
*FunctionNode,*ToolNode, and*startNodeto satisfy the newNodeinterface by routing schemas and configurations throughBaseNode.dummyNode,cancelObservingNode,retryTestNode, etc.) to satisfy the new interface, primarily viaBaseNodeembedding.wrappedFnandrunToolpaths infunction_node.goandtool_node.go). Input validation is now exclusively handled by the scheduler.tool_node_test.goandagent_node_test.go) to accommodate new constructors and ensure input validation is invoked prior to running nodes where required.Verification
go test ./workflow/...