hub

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Agent types
	AgentTypeGeneral = "general"
	AgentTypeOpenAI  = "openai"

	// General agents
	AgentEngineering = "Engineering"
	AgentDesign      = "Design"

	// OpenAI agents
	AgentGPT           = "GPT"
	AgentGPT5Codex     = "GPT-5 Codex"
	AgentGPT51CodexMax = "GPT-5.1 Codex Max"
	AgentGPT52Codex    = "GPT-5.2 Codex"
	AgentGPT51         = "GPT-5.1"
	AgentGPT52         = "GPT-5.2"
)
View Source
const (
	DefaultCheckInterval = 1 * time.Hour
)

Variables

This section is empty.

Functions

func NewUpdater

func NewUpdater(metadataFile, localStandardAgentsDir, localStandardCommandsDir string) (*ghrelease.Updater, error)

Types

type Agent

type Agent struct {
	Name         string   `yaml:"name" validate:"required"`
	Type         string   `yaml:"type"`
	Description  string   `yaml:"description" validate:"required"`
	Tools        []string `yaml:"tools"`
	SystemPrompt string   `yaml:"-" validate:"required"`
}

type Command added in v0.0.6

type Command struct {
	Name        string `yaml:"name" validate:"required"`
	Description string `yaml:"description" validate:"required"`
	Prompt      string `yaml:"-" validate:"required"`
}

type Hub

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

func New

func New(opts Options) (*Hub, error)

func (*Hub) Agent added in v0.0.4

func (h *Hub) Agent(name string) (*Agent, error)

func (*Hub) Agents

func (h *Hub) Agents() []*Agent

func (*Hub) AgentsByType added in v0.0.7

func (h *Hub) AgentsByType(agentType string) []*Agent

func (*Hub) Close

func (h *Hub) Close() error

func (*Hub) Command added in v0.0.6

func (h *Hub) Command(name string) (*Command, error)

func (*Hub) Commands added in v0.0.6

func (h *Hub) Commands() []*Command

func (*Hub) ForceUpdate

func (h *Hub) ForceUpdate() error

type Loader

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

func NewLoader

func NewLoader(localStandardAgentsDir string, localUserAgentsDirs []string, localStandardCommandsDir string, localUserCommandsDirs []string) *Loader

func (*Loader) Load

func (l *Loader) Load() (map[string]*Agent, map[string]*Command, error)

type Options

type Options struct {
	LocalStandardAgentsDir   string
	LocalUserAgentsDirs      []string
	LocalStandardCommandsDir string
	LocalUserCommandsDirs    []string
	MetadataFile             string
	AutoUpdate               bool
	CheckInterval            time.Duration
}

Jump to

Keyboard shortcuts

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