stack

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package stack defines the Engine interface and a registry of curated engines. Multiversa orchestrates these engines; it does not author them. See internal/credits for canonical attribution.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented      = errors.New("not implemented yet")
	ErrAgplConsentRequired = errors.New("AGPL-3.0 disclaimer not acknowledged — MiroFish must be invoked external-only")
)

Functions

func Prereqs added in v0.8.0

func Prereqs(e Engine, version string) []string

Prereqs lists the prerequisite of every strategy, in preference order — i.e. what the user could install to unblock this engine. Deduplicated.

func Registry

func Registry() map[string]Engine

Registry returns the canonical map of supported engines.

Types

type CodeGraph

type CodeGraph struct{}

func (CodeGraph) Author

func (CodeGraph) Author() string

func (CodeGraph) DisplayName

func (CodeGraph) DisplayName() string

func (CodeGraph) ID

func (CodeGraph) ID() string

func (CodeGraph) Install

func (c CodeGraph) Install(version string) error

func (CodeGraph) License

func (CodeGraph) License() string

func (CodeGraph) OptIn

func (CodeGraph) OptIn() bool

func (CodeGraph) Repo

func (CodeGraph) Repo() string

func (CodeGraph) Status

func (c CodeGraph) Status() (Status, error)

func (CodeGraph) Strategies added in v0.8.0

func (c CodeGraph) Strategies(version string) []Strategy

Strategies: pnpm only. npm is banned across the Multiversa stack — see docs and the project-rules-pnpm-only memory note.

func (CodeGraph) Uninstall

func (c CodeGraph) Uninstall() error

type Engine

type Engine interface {
	ID() string
	DisplayName() string
	Author() string
	Repo() string
	License() string
	OptIn() bool

	// Strategies returns every way this engine can be installed, in
	// preference order. The first whose Prereq is on PATH wins — that is
	// what lets Engram install on a machine without Homebrew. Never empty.
	// Use PickStrategy to resolve one against the current machine.
	Strategies(version string) []Strategy

	// Install is a convenience wrapper around PickStrategy. Most callers
	// should use PickStrategy + exec.Run directly so they can stream
	// progress and show which route was taken.
	Install(version string) error

	// Status checks whether the engine is already present locally.
	Status() (Status, error)

	// Uninstall removes the engine (best-effort).
	Uninstall() error
}

Engine is the contract every curated engine must satisfy.

func List

func List() []Engine

List returns the engines in canonical display order.

func Resolve

func Resolve(id string) (Engine, error)

Resolve returns the Engine for the given id, or an error.

type Engram

type Engram struct{}

func (Engram) Author

func (Engram) Author() string

func (Engram) DisplayName

func (Engram) DisplayName() string

func (Engram) ID

func (Engram) ID() string

func (Engram) Install

func (e Engram) Install(version string) error

func (Engram) License

func (Engram) License() string

func (Engram) OptIn

func (Engram) OptIn() bool

func (Engram) Repo

func (Engram) Repo() string

func (Engram) Status

func (e Engram) Status() (Status, error)

func (Engram) Strategies added in v0.8.0

func (e Engram) Strategies(version string) []Strategy

Strategies: Homebrew first (the upstream-blessed route on macOS), then `go install`. Engram is a Go binary — see the module path below — so the second route works anywhere the Go toolchain is present, which is what makes Engram installable on Linux without Homebrew.

func (Engram) Uninstall

func (e Engram) Uninstall() error

type GentleAI

type GentleAI struct{}

func (GentleAI) Author

func (GentleAI) Author() string

func (GentleAI) DisplayName

func (GentleAI) DisplayName() string

func (GentleAI) ID

func (GentleAI) ID() string

func (GentleAI) Install

func (g GentleAI) Install(version string) error

func (GentleAI) License

func (GentleAI) License() string

func (GentleAI) OptIn

func (GentleAI) OptIn() bool

func (GentleAI) Repo

func (GentleAI) Repo() string

func (GentleAI) Status

func (g GentleAI) Status() (Status, error)

Status probes both binary names: Homebrew installs `gentle`, while `go install` names the binary after its cmd/ directory, `gentle-ai`. Checking only one made a correctly installed engine report as missing.

func (GentleAI) Strategies added in v0.8.0

func (g GentleAI) Strategies(version string) []Strategy

Strategies: Homebrew first, then `go install`. Like Engram, gentle-ai is a Go binary, so the toolchain route unblocks Linux machines without brew.

func (GentleAI) Uninstall

func (g GentleAI) Uninstall() error

type GentlePi

type GentlePi struct{}

func (GentlePi) Author

func (GentlePi) Author() string

func (GentlePi) DisplayName

func (GentlePi) DisplayName() string

func (GentlePi) ID

func (GentlePi) ID() string

func (GentlePi) Install

func (g GentlePi) Install(version string) error

func (GentlePi) License

func (GentlePi) License() string

func (GentlePi) OptIn

func (GentlePi) OptIn() bool

func (GentlePi) Repo

func (GentlePi) Repo() string

func (GentlePi) Status

func (g GentlePi) Status() (Status, error)

Status cannot probe the PATH: the gentle-pi npm package declares no `bin` at all — it is a development harness (SDD/OpenSpec, subagents, TDD evidence), not a CLI. Looking for a `gentle-pi` executable therefore always failed, reporting a correctly installed engine as missing. Ask the package manager that owns it instead.

func (GentlePi) Strategies added in v0.8.0

func (g GentlePi) Strategies(version string) []Strategy

Strategies: pnpm only. npm is banned across the Multiversa stack — see docs and the project-rules-pnpm-only memory note.

func (GentlePi) Uninstall

func (g GentlePi) Uninstall() error

type Graphify

type Graphify struct{}

func (Graphify) Author

func (Graphify) Author() string

func (Graphify) DisplayName

func (Graphify) DisplayName() string

func (Graphify) ID

func (Graphify) ID() string

func (Graphify) Install

func (g Graphify) Install(version string) error

func (Graphify) License

func (Graphify) License() string

func (Graphify) OptIn

func (Graphify) OptIn() bool

func (Graphify) Repo

func (Graphify) Repo() string

func (Graphify) Status

func (g Graphify) Status() (Status, error)

func (Graphify) Strategies added in v0.8.0

func (g Graphify) Strategies(version string) []Strategy

Strategies: pipx only. Graphify is a Python package and pipx is the one route upstream documents; a bare `pip install` would leak into the system interpreter, so it is deliberately not offered.

func (Graphify) Uninstall

func (g Graphify) Uninstall() error

type MiroFish

type MiroFish struct {
	AgplAcknowledged bool
}

MiroFish is invoked external-only because of AGPL-3.0. Multiversa never embeds, vendors, forks, or `go install`s MiroFish source. We pull the upstream container image and treat it as a separate service.

func (MiroFish) Author

func (MiroFish) Author() string

func (MiroFish) DisplayName

func (MiroFish) DisplayName() string

func (MiroFish) ID

func (MiroFish) ID() string

func (MiroFish) Install

func (m MiroFish) Install(version string) error

func (MiroFish) License

func (MiroFish) License() string

func (MiroFish) OptIn

func (MiroFish) OptIn() bool

func (MiroFish) Repo

func (MiroFish) Repo() string

func (MiroFish) Status

func (m MiroFish) Status() (Status, error)

func (MiroFish) Strategies added in v0.8.0

func (m MiroFish) Strategies(version string) []Strategy

Strategies: docker only, and deliberately so. AGPL-3.0 means MiroFish is never embedded, vendored, forked or `go install`ed — a source-building route must not be added here. It stays an external service.

func (MiroFish) Uninstall

func (m MiroFish) Uninstall() error

type PrereqError added in v0.8.0

type PrereqError struct {
	Engine  string
	Options []string
}

PrereqError reports that no strategy is viable because none of their prerequisites are on PATH. It names every option so the user can pick.

func (*PrereqError) Error added in v0.8.0

func (e *PrereqError) Error() string

type Status

type Status struct {
	Installed bool
	Version   string
	Path      string
}

Status is the local installation state of an engine.

type Strategy added in v0.8.0

type Strategy struct {
	// Prereq is the external tool required on PATH ("brew", "pipx", "pnpm",
	// "go", "docker"). Empty means the command needs nothing extra.
	// NOTE: Multiversa policy bans npm — pnpm only.
	Prereq string

	// Cmd is the install command (program + args), run via internal/exec.Run.
	Cmd []string

	// Note is a short human explanation of when this route applies. It is
	// shown when this is the strategy that got picked.
	Note string
}

Strategy is one way to install an engine: the external tool it needs on PATH plus the command that uses it. Engines declare several in preference order, so a machine without Homebrew can still install a Go binary. An engine with a single strategy behaves exactly as it did before.

func PickStrategy added in v0.8.0

func PickStrategy(e Engine, version string) (Strategy, bool)

PickStrategy returns the first strategy whose prerequisite is available. When none is viable it returns the preferred (first) strategy and false, so callers can still show the user what would have run.

Jump to

Keyboard shortcuts

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