Documentation
¶
Overview ¶
Package tools is the canonical action layer. Every mutating action — whether triggered by a UI button, the command palette, or a future NL provider — routes through Registry.Execute, which validates arguments and entity references before running the handler. Safety lives here, in the base.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownTool = errors.New("unknown tool")
ErrUnknownTool is returned when a tool name is not registered.
Functions ¶
This section is empty.
Types ¶
type EntityRef ¶
type EntityRef struct {
Param string // argument key holding the id/name
Kind string // "container", "image", "volume", "network", "stack"
}
EntityRef declares that one argument references a live entity that must exist before the handler runs. The executor enforces existence via the resolver.
type EntityResolver ¶
EntityResolver checks whether a referenced entity exists in live state.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the tool set and the optional entity resolver.
func NewRegistry ¶
func NewRegistry(resolver EntityResolver) *Registry
func (*Registry) Execute ¶
Execute validates and runs a tool call. This is the single execution path.