Documentation
¶
Overview ¶
Package schema provides a self-describing schema registry for glean-cli commands. Each command registers a CommandSchema describing its flags, required fields, defaults, and an example invocation. The `glean schema` command exposes this registry to callers (human or agent) without needing documentation in context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalList ¶
MarshalList returns JSON for all registered schemas, keyed by command name.
func Register ¶
func Register(s CommandSchema)
Register adds a CommandSchema to the global registry. Call this from each command's init or constructor.
Types ¶
type CommandSchema ¶
type CommandSchema struct {
Command string `json:"command"`
Description string `json:"description"`
Flags map[string]FlagSchema `json:"flags"`
Example string `json:"example"`
}
CommandSchema describes one glean command for agent introspection.
func Get ¶
func Get(command string) (CommandSchema, error)
Get returns the schema for a single command, or an error if not found.
Click to show internal directories.
Click to hide internal directories.