Documentation
¶
Overview ¶
Package settings hosts the `da settings` command tree. It splits out from the parent commands/ package per plan root-command-decomposition (t10b), mirroring the agents/ and skills/ subpackages. Canonical list/show/remove flows route through commands/internal/cmdutil so the rules/mcp/settings trio share one implementation of the resource-command shape.
Index ¶
- func NewCmd(deps Deps) *cobra.Command
- func NewListCmd(deps Deps) *cobra.Command
- func NewRemoveCmd(deps Deps) *cobra.Command
- func NewShowCmd(deps Deps) *cobra.Command
- func RunList(scope string) error
- func RunRemove(deps Deps, scope, name string) error
- func RunShow(deps Deps, scope, name string) error
- type Deps
- type GlobalFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶
NewCmd builds the `da settings` command tree from injected dependencies. Mirrors agents.NewAgentsCmd / skills.NewSkillsCmd: helpers come from Deps so the subpackage stays independent of the parent commands/ package. The cobra-tree assembly lives in cmdutil so mcp/settings/rules share one implementation; the per-resource description lives in a single CanonicalFileSpec built by canonicalSpec (see list.go).
func NewListCmd ¶
NewListCmd / NewShowCmd / NewRemoveCmd build each subcommand standalone.
func NewRemoveCmd ¶
func NewShowCmd ¶
func RunList ¶
RunList prints canonical settings entries for a scope. No Deps needed because no hint-driven errors fire in the list path — list surfaces only info messages via cmdutil.
Types ¶
type Deps ¶
type Deps struct {
Flags GlobalFlags
ErrorWithHints func(message string, hints ...string) error
UsageError func(message string, hints ...string) error
MaximumNArgsWithHints func(n int, hints ...string) cobra.PositionalArgs
ExactArgsWithHints func(n int, hints ...string) cobra.PositionalArgs
}
Deps carries UX helpers from the commands package without an import cycle. Mirrors agents.Deps / skills.Deps so the extracted subpackages share the same wiring shape. Only fields actually consumed by settings subcommands are present.
type GlobalFlags ¶
GlobalFlags mirrors the subset of commands.Flags used by settings subcommands. Kept as a parallel type to commands.GlobalFlags so the settings subpackage has no import on the parent commands/ package.