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