(port string, tr Transition)
| 98 | |
| 99 | func (b *LinearNode) ID() string { return b.id } |
| 100 | func (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 |
no outgoing calls