modules

package
v0.11.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatUpdateReport

func FormatUpdateReport(results []*UpdateResult) string

FormatUpdateReport produces a human-readable update summary.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles module discovery, checking, and updating.

func NewManager

func NewManager(overkillHome string) (*Manager, error)

NewManager loads or creates the modules manifest.

func (*Manager) CheckAll

func (m *Manager) CheckAll() (map[string]string, []string)

CheckAll checks all modules for available updates. GitHub-sourced modules that return [NOT IMPLEMENTED] are noted in the result map with a "(not yet implemented)" suffix so the CLI can surface them without treating the check as a fatal error.

func (*Manager) CheckForUpdates

func (m *Manager) CheckForUpdates(name string) (string, bool, error)

CheckForUpdates checks a single module for available updates. Returns (latestVersion, needsUpdate, error).

func (*Manager) Get

func (m *Manager) Get(name string) *Module

Get returns a module by name.

func (*Manager) List

func (m *Manager) List() []*Module

List returns all tracked modules sorted by name.

func (*Manager) Update

func (m *Manager) Update(name string) (*UpdateResult, error)

Update updates a single module to its latest version.

func (*Manager) UpdateAll

func (m *Manager) UpdateAll() ([]*UpdateResult, error)

UpdateAll updates all modules with AutoUpdate enabled.

type Manifest

type Manifest struct {
	Modules map[string]*Module `toml:"modules"`
}

Manifest is the modules.toml file.

type Module

type Module struct {
	Name        string     `toml:"-"`           // key in the map
	Source      Source     `toml:"source"`      // github, go-module, git
	Repo        string     `toml:"repo"`        // GitHub: "owner/repo"
	Path        string     `toml:"path"`        // filesystem path under ~/.overkill/
	Version     string     `toml:"version"`     // current installed version
	Type        ModuleType `toml:"type"`        // skill, dependency, plugin
	Description string     `toml:"description"` // human-readable
	AutoUpdate  bool       `toml:"auto_update"` // update with --all
	LastCheck   time.Time  `toml:"last_check"`  // when we last checked for updates
}

Module represents one tracked module in the manifest.

type ModuleType

type ModuleType string

ModuleType classifies what kind of module this is.

const (
	TypeSkill      ModuleType = "skill"
	TypeDependency ModuleType = "dependency"
	TypePlugin     ModuleType = "plugin"
)

type Source

type Source string

Source indicates where a module comes from.

const (
	SourceGitHub   Source = "github"
	SourceGoModule Source = "go-module"
	SourceGit      Source = "git"
)

type UpdateResult

type UpdateResult struct {
	Module      string `json:"module"`
	FromVersion string `json:"from_version"`
	ToVersion   string `json:"to_version"`
	Updated     bool   `json:"updated"`
	Error       string `json:"error,omitempty"`
	Skipped     bool   `json:"skipped"`
	Reason      string `json:"reason,omitempty"`
}

UpdateResult describes what happened during an update.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL