feat: implement business node specifications and enhance workflow editor with node specs support

This commit is contained in:
mlogclub
2026-08-16 21:27:45 +08:00
parent 16a0d6f5bd
commit ad971370cf
17 changed files with 397 additions and 22 deletions
@@ -2,6 +2,22 @@ package registry
import "testing"
func TestDefaultRegistryMarksOnlyRuntimeSupportedNodesExecutable(t *testing.T) {
registry := DefaultRegistry()
for _, nodeType := range []string{NodeTypeCreateTicket, NodeTypeHumanConfirm, NodeTypeSendReply, NodeTypeLLM} {
spec, ok := registry.Get(nodeType)
if !ok || !spec.Executable {
t.Fatalf("expected %s to be executable, got %#v", nodeType, spec)
}
}
for _, nodeType := range []string{NodeTypeHTTP, NodeTypeCode, NodeTypeLoop} {
spec, ok := registry.Get(nodeType)
if !ok || spec.Executable {
t.Fatalf("expected %s to be unavailable in server runtime, got %#v", nodeType, spec)
}
}
}
func TestDefaultRegistryVariablesHaveBusinessLabels(t *testing.T) {
for _, spec := range DefaultRegistry().List() {
for _, variable := range append(spec.InputSchema, spec.OutputSchema...) {