Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
Loading