MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / AddTransition

Method AddTransition

go/engine/node.go:100–106  ·  view source on GitHub ↗
(port string, tr Transition)

Source from the content-addressed store, hash-verified

98
99func (b *LinearNode) ID() string { return b.id }
100func (b *LinearNode) AddTransition(port string, tr Transition) error {
101 if _, ok := b.transitions[port]; ok {
102 return fmt.Errorf("node %s: duplicate transition on port %s", b.id, port)
103 }
104 b.transitions[port] = tr
105 return nil
106}
107
108// Next applies the outgoing transition's side effects (e.g. AgentTask prompt
109// evaluation) against the scope and returns the target node ID. Returns

Callers 2

TestLinearNode_NextFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestLinearNode_NextFunction · 0.76