Documentation
¶
Index ¶
- func AskHandler(_ *cmdctx.Ctx) error
- func DebugUpdateCheckHandler(_ *cmdctx.Ctx) error
- func GetModuleHandler(ctx *cmdctx.Ctx) error
- func GetNounHandler(ctx *cmdctx.Ctx) error
- func GetPluginHandler(ctx *cmdctx.Ctx) error
- func InstallCLIHandler(ctx *cmdctx.Ctx) error
- func InstallModuleHandler(ctx *cmdctx.Ctx) error
- func InstallPluginHandler(ctx *cmdctx.Ctx) error
- func ListModulesFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
- func ListNounsFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
- func ListPluginsFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
- func RenderNounBlock(module string, nouns []string, r cmdctx.Resolver) string
- func UninstalledRegistryPlugins(seen map[string]bool) []spec.ModuleMeta
- func VersionHandler(_ *cmdctx.Ctx) error
- type GithubPluginRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskHandler ¶
func DebugUpdateCheckHandler ¶
func GetModuleHandler ¶
func GetNounHandler ¶
func GetPluginHandler ¶
GetPluginHandler shows the same domain-model output as GetModuleHandler, but only for modules that are plugins (see ModuleMeta.IsPlugin) — a plugin is a module in every respect that matters for grammar/rendering.
func InstallCLIHandler ¶
func InstallModuleHandler ¶
InstallModuleHandler installs a module that ships as a plugin, or enables a module_type: hidden module that's already compiled in. "module" is the feature-area axis and "plugin" is the deployment-type axis; a module that isn't compiled in is installed exactly like any other plugin, so this hands off to the one install path rather than duplicating it.
func InstallPluginHandler ¶
InstallPluginHandler installs a plugin from a tarball URL, a local tarball, a local binary, an owner/repo[/prefix] GitHub ref, or a bare registry name. All forms funnel into the same routine: get a binary on disk → identity gate (--identity) → install into ~/.harness/bin → capture grammar (--spec) → write <name>.spec.yaml with the host-owned provenance block. Core is the only writer of spec files.
func ListModulesFetchFn ¶
func ListModulesFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
func ListNounsFetchFn ¶
func ListNounsFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
func ListPluginsFetchFn ¶
func ListPluginsFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
ListPluginsFetchFn lists installed plugins: modules whose spec carries a binary_path (dynamically installed, vs. compiled-in builtins). Trusts the spec's provenance for version/source/installed_at — never execs the binary.
func RenderNounBlock ¶
RenderNounBlock builds the indented noun list for {{nouns}} substitution. Each line: noun, short_desc, comma-separated verbs (with :variant suffixes for variants).
func UninstalledRegistryPlugins ¶
func UninstalledRegistryPlugins(seen map[string]bool) []spec.ModuleMeta
UninstalledRegistryPlugins returns registry-known plugins that aren't in seen (keyed by module name), as ModuleMeta stubs carrying only Name/Type/Desc. Registry plugins aren't loaded until installed, so they're otherwise absent from GetModuleMetas() — this is how callers like `list module` and the no-args `harness` summary surface them as available-but-not-installed.
func VersionHandler ¶
Types ¶
type GithubPluginRef ¶
type GithubPluginRef struct {
GithubRepo string
TagPrefix string
PkgName string
// Desc is a one-line summary shown in `list module`/`list plugin` for
// registry plugins that aren't installed — the module's own spec (and its
// module_desc) isn't loaded until install, so this is the only
// description available before then.
Desc string
}
GithubPluginRef identifies a plugin release on GitHub: the "owner/repo" it publishes to, and the tag prefix its releases are published under ("" means core's own bare "vX.Y.Z" convention rather than "{TagPrefix}/vX.Y.Z"). PkgName is the release package name when already known — always true for a registry entry. For a ref parsed from owner/repo[/prefix] syntax it starts empty and is either discovered from the release's own assets, or supplied via --plugin-name.