Documentation
¶
Overview ¶
Package registry holds the agent modules hopsesh was built with and checks that each one's Spec is complete.
Index ¶
- func As[T any](m agent.Module) (T, bool)
- type BinaryData
- type CloudData
- type CodeData
- type FeedData
- type Registry
- func (r *Registry) All() []agent.Module
- func (r *Registry) ByName(name string) (agent.ID, bool)
- func (r *Registry) Cloud(name string) (agent.Module, agent.Cloud, bool)
- func (r *Registry) Get(id agent.ID) (agent.Module, bool)
- func (r *Registry) IDs() []agent.ID
- func (r *Registry) LoginEnv() []string
- func (r *Registry) Specs() []agent.Spec
- func (r *Registry) Worktrees() []string
- type RootData
- type SpecData
- type WatchData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*Registry) Cloud ¶ added in v0.4.0
Cloud returns the module that reaches a cloud, and the cloud.
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.
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).