From b16a119e1efbb1040ff4ebdfd0992a639b576443 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Sat, 25 Jul 2026 16:20:55 +0530 Subject: [PATCH] fix: graph syntax error and type conversion --- graph/graph.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/graph/graph.go b/graph/graph.go index c867b12..c7dc5e1 100644 --- a/graph/graph.go +++ b/graph/graph.go @@ -9,7 +9,13 @@ // nodes, edges, and shared state. package graph -// NodeType classifies a node by its role in agent orchestration. +import ( + "fmt" + "strings" + "time" +) + +// NodeType represents the specific type/behavior of a node in the graph type NodeType string const ( @@ -27,12 +33,6 @@ const ( NodeTypeRouter NodeType = "router" ) -import ( - "fmt" - "strings" - "time" -) - // NodeKind classifies a node by the ecosystem view to which it belongs. type NodeKind string @@ -226,7 +226,7 @@ func (s NodeSpec) Validate() error { if strings.TrimSpace(s.ID) == "" { return fmt.Errorf("graph: node spec ID is required") } - if _, err := ParseNodeType(s.Type); err != nil { + if _, err := ParseNodeType(string(s.Type)); err != nil { return err } return nil