21 lines
442 B
Go
21 lines
442 B
Go
package armory
|
|
|
|
import (
|
|
"context"
|
|
|
|
"ai-agent-scaffold-go/internal/domain/agent/model"
|
|
"ai-agent-scaffold-go/internal/domain/shared/tree"
|
|
)
|
|
|
|
type RootNode struct {
|
|
next Handler
|
|
}
|
|
|
|
func NewRootNode(next Handler) RootNode {
|
|
return RootNode{next: next}
|
|
}
|
|
|
|
func (n RootNode) Apply(ctx context.Context, command model.ArmoryCommand, dynamic *DynamicContext) (model.RegisteredAgent, error) {
|
|
return tree.Route(ctx, n.next, command, dynamic)
|
|
}
|