upstream

package
v0.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package upstream checks the latest published releases of the curated engines (and the CLI itself) against what is installed locally.

Read-only by design: it reports what is outdated, it never updates. The update itself is always a human decision — la IA propone, tú decides.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(v string) string

Normalize strips the leading "v" and surrounding noise so "v0.4.0", "0.4.0" and "multiversa v0.4.0 (abc, date)" compare as equals when they carry the same semver core.

func UpdateAvailable

func UpdateAvailable(installed, latest string) bool

UpdateAvailable reports whether latest is a different version than installed. Unknown or non-numeric installed versions (e.g. the bare "instalado" marker) never claim an update — the report shows the latest release and lets the human judge.

Types

type Component

type Component struct {
	ID        string // registry id, e.g. "engram"
	Name      string // display name
	Repo      string // https://github.com/{owner}/{name}
	Installed string // locally detected version, "" if unknown/not installed
}

Component is one watched project: a curated engine or the CLI itself.

type ReleaseInfo

type ReleaseInfo struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Repo            string `json:"repo"`
	Installed       string `json:"installed,omitempty"`
	Latest          string `json:"latest,omitempty"`
	ReleaseURL      string `json:"release_url,omitempty"`
	PublishedAt     string `json:"published_at,omitempty"`
	UpdateAvailable bool   `json:"update_available"`
	Error           string `json:"error,omitempty"` // per-component failure, never fatal
}

ReleaseInfo is the per-component result of a release check. It is the unit of the multiversa.updates/v1 payload.

func Check

func Check(components []Component, timeout time.Duration) []ReleaseInfo

Check queries the latest release of every component in parallel. A failing component reports its own Error; the check never aborts — partial data beats none, same posture as detect.

Jump to

Keyboard shortcuts

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