Expand description
Declarative command metadata used for help and policy resolution. Declarative command metadata shared by help, completion, and plugin layers.
This module exists to describe commands in a neutral in-memory form before any one presentation or transport layer gets involved. Help rendering, completion tree building, and plugin describe payloads can all consume the same structure instead of each inventing their own command model.
In broad terms:
crate::core::command_def::CommandDefdescribes one command node plus nested subcommandscrate::core::command_def::ArgDefandcrate::core::command_def::FlagDefdescribe the user-facing invocation surfacecrate::core::command_def::CommandPolicyDefcarries the coarse visibility/auth requirements that travel with a command definition
Contract:
- this module owns declarative command shape, not runtime dispatch
- the types here should stay presentation-neutral and broadly reusable
- richer runtime policy evaluation lives in
crate::core::command_policy, not here
Structs§
- ArgDef
- Positional argument definition for a command.
- Command
Def - Declarative command description used for help, completion, and plugin metadata.
- Command
Policy Def - Simplified policy description attached to a
CommandDef. - FlagDef
- Flag or option definition for a command.
- Value
Choice - Suggested value for an argument or flag.
Enums§
- Value
Kind - Semantic type hint for argument and option values.