registry

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package registry holds the agent modules hopsesh was built with and checks that each one's Spec is complete.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As[T any](m agent.Module) (T, bool)

As returns a module's optional capability.

Types

type BinaryData added in v0.4.0

type BinaryData struct {
	Name        string              `json:"name"`
	Candidates  map[string][]string `json:"candidates"`
	VersionArgs []string            `json:"versionArgs"`
}

BinaryData is a program the module may run.

type CloudData added in v0.4.0

type CloudData struct {
	Name         string            `json:"name"`
	Title        string            `json:"title"`
	Driver       string            `json:"driver"`
	Tested       []string          `json:"tested"`
	Hosts        []string          `json:"hosts"`
	Up           agent.Fidelity    `json:"up"`
	Down         agent.Fidelity    `json:"down"`
	CodeUp       []agent.CodeWay   `json:"codeUp"`
	CodeDown     []agent.CodeWay   `json:"codeDown"`
	Needs        []agent.Need      `json:"needs"`
	VendorPrefix string            `json:"vendorPrefix,omitempty"`
	Problems     map[string]string `json:"problems"`
	Unset        []string          `json:"unset"`
	Noun         string            `json:"noun,omitempty"`
	Limits       []string          `json:"limits"`
	Summary      bool              `json:"summary"`
	EnvHint      string            `json:"envHint,omitempty"`
	BriefBranch  bool              `json:"briefBranch"`
	NoFollowUp   string            `json:"noFollowUp,omitempty"`
	SignIn       []string          `json:"signIn"`
	Watch        WatchData         `json:"watch"`
}

CloudData is a vendor cloud the module reaches (agent.Cloud).

type CodeData added in v0.4.0

type CodeData struct {
	Repo     string   `json:"repo"`
	Paths    []string `json:"paths"`
	Canaries []string `json:"canaries"`
}

CodeData is part of an upstream repository whose commits and canaries are watched.

type FeedData added in v0.4.0

type FeedData struct {
	Kind agent.FeedKind `json:"kind"`
	URL  string         `json:"url,omitempty"`
	Repo string         `json:"repo,omitempty"`
	Tag  string         `json:"tag,omitempty"`
}

FeedData is one changelog or release feed.

type Registry

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

Registry is the set of agent modules.

func New

func New(mods ...agent.Module) (*Registry, error)

New checks and registers modules (in display order).

func (*Registry) All

func (r *Registry) All() []agent.Module

All returns every module.

func (*Registry) ByName

func (r *Registry) ByName(name string) (agent.ID, bool)

ByName returns the id of a module by its display name ("Claude Code").

func (*Registry) Cloud added in v0.4.0

func (r *Registry) Cloud(name string) (agent.Module, agent.Cloud, bool)

Cloud returns the module that reaches a cloud, and the cloud.

func (*Registry) Get

func (r *Registry) Get(id agent.ID) (agent.Module, bool)

Get returns a module by id.

func (*Registry) IDs

func (r *Registry) IDs() []agent.ID

IDs returns the module ids, sorted.

func (*Registry) LoginEnv

func (r *Registry) LoginEnv() []string

LoginEnv lists every variable the modules need from a login shell.

func (*Registry) Specs

func (r *Registry) Specs() []agent.Spec

Specs returns every module's Spec.

func (*Registry) Worktrees

func (r *Registry) Worktrees() []string

Worktrees lists every module's agent-managed worktree folders.

type RootData added in v0.4.0

type RootData struct {
	Name    string            `json:"name"`
	Env     []string          `json:"env"`
	Default map[string]string `json:"default"`
}

RootData is one of the agent's data folders.

type SpecData added in v0.4.0

type SpecData struct {
	Accounts           *agent.ProfileSpec  `json:"accounts,omitempty"`
	DesktopScheme      string              `json:"desktopScheme,omitempty"`
	ID                 agent.ID            `json:"id"`
	Name               string              `json:"name"`
	Vendor             string              `json:"vendor"`
	Stability          agent.Stability     `json:"stability"`
	Tested             []string            `json:"tested"`
	Binaries           []BinaryData        `json:"binaries"`
	Roots              []RootData          `json:"roots"`
	LoginEnv           []string            `json:"loginEnv"`
	Secrets            []string            `json:"secrets"`
	Worktrees          []string            `json:"worktrees"`
	Instructions       []string            `json:"instructions"`
	GlobalInstructions []string            `json:"globalInstructions"`
	Tools              string              `json:"tools,omitempty"`
	Features           []agent.Capability  `json:"features"`
	Experimental       []agent.Capability  `json:"experimental"`
	DesktopApps        map[string][]string `json:"desktopApps"`
	Clouds             []CloudData         `json:"clouds"`
	TerminalEnv        []string            `json:"terminalEnv"`
}

SpecData is a module's Spec as data, for `hopsesh agents --json` and the test bundle's agents.json: what the module declares, with the field names the JSON outputs use. The mark (Icon.SVG) is left out; Icon.Apps is desktopApps.

func Data added in v0.4.0

func Data(s agent.Spec) SpecData

Data returns s as data. Lists and maps are never null, so a reader can iterate them.

type WatchData added in v0.4.0

type WatchData struct {
	Surface  string     `json:"surface"`
	Docs     []string   `json:"docs"`
	Feeds    []FeedData `json:"feeds"`
	Grep     string     `json:"grep"`
	Help     [][]string `json:"help"`
	Relies   []string   `json:"relies"`
	Issues   []string   `json:"issues"`
	Searches []string   `json:"searches"`
	Code     *CodeData  `json:"code,omitempty"`
}

WatchData is what the weekly upstream-drift check watches for a cloud (agent.Watch).

Jump to

Keyboard shortcuts

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