agent

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentNames = []string{"claude", "codex", "opencode"}

AgentNames is the list of all supported agent names.

Functions

func DisplayName

func DisplayName(name string) string

DisplayName returns the human-readable name for an agent.

func IsValidAgent

func IsValidAgent(name string) bool

IsValidAgent returns true if the name is a known agent.

func Register

func Register(a Agent)

Register adds an agent to the registry.

Types

type Agent

type Agent interface {
	Name() string
	DisplayName() string
	GetLatestVersion() (string, error)
	GetInstalledVersion(rt container.Runtime, img string) (string, error)
	GetDockerfileInstall(buildCtx string) (string, error)
	GetFullDockerfile(version string) (string, error)
	HostConfigPaths() []string
	ContainerMounts(cfgDir string) []Mount
	DetectHostConfig() (string, error)
	ImportConfig(src, dst string) error
}

Agent is the interface that all agent implementations must satisfy.

func Get

func Get(name string) Agent

Get returns the agent implementation for a name.

type Claude

type Claude struct{}

Claude implements the Agent interface for Claude Code.

func (*Claude) ContainerMounts

func (c *Claude) ContainerMounts(cfgDir string) []Mount

func (*Claude) DetectHostConfig

func (c *Claude) DetectHostConfig() (string, error)

func (*Claude) DisplayName

func (c *Claude) DisplayName() string

func (*Claude) GetDockerfileInstall

func (c *Claude) GetDockerfileInstall(buildCtx string) (string, error)

func (*Claude) GetFullDockerfile

func (c *Claude) GetFullDockerfile(version string) (string, error)

func (*Claude) GetInstalledVersion

func (c *Claude) GetInstalledVersion(rt container.Runtime, img string) (string, error)

func (*Claude) GetLatestVersion

func (c *Claude) GetLatestVersion() (string, error)

func (*Claude) HostConfigPaths

func (c *Claude) HostConfigPaths() []string

func (*Claude) ImportConfig

func (c *Claude) ImportConfig(src, dst string) error

func (*Claude) Name

func (c *Claude) Name() string

type Codex

type Codex struct{}

Codex implements the Agent interface for OpenAI Codex.

func (*Codex) BinaryName

func (c *Codex) BinaryName() string

BinaryName returns the platform-specific binary tarball name.

func (*Codex) ContainerMounts

func (c *Codex) ContainerMounts(cfgDir string) []Mount

func (*Codex) DetectHostConfig

func (c *Codex) DetectHostConfig() (string, error)

func (*Codex) DisplayName

func (c *Codex) DisplayName() string

func (*Codex) GetDockerfileInstall

func (c *Codex) GetDockerfileInstall(buildCtx string) (string, error)

func (*Codex) GetFullDockerfile

func (c *Codex) GetFullDockerfile(version string) (string, error)

func (*Codex) GetInstalledVersion

func (c *Codex) GetInstalledVersion(rt container.Runtime, img string) (string, error)

func (*Codex) GetLatestVersion

func (c *Codex) GetLatestVersion() (string, error)

func (*Codex) HostConfigPaths

func (c *Codex) HostConfigPaths() []string

func (*Codex) ImportConfig

func (c *Codex) ImportConfig(src, dst string) error

func (*Codex) Name

func (c *Codex) Name() string

type Mount

type Mount struct {
	Source string
	Target string
}

Mount describes a volume mount for a container.

type OpenCode

type OpenCode struct{}

OpenCode implements the Agent interface for OpenCode.

func (*OpenCode) BinaryName

func (o *OpenCode) BinaryName() string

BinaryName returns the platform-specific binary tarball name (musl build for Alpine).

func (*OpenCode) ContainerMounts

func (o *OpenCode) ContainerMounts(cfgDir string) []Mount

func (*OpenCode) DetectHostConfig

func (o *OpenCode) DetectHostConfig() (string, error)

func (*OpenCode) DisplayName

func (o *OpenCode) DisplayName() string

func (*OpenCode) GetDockerfileInstall

func (o *OpenCode) GetDockerfileInstall(buildCtx string) (string, error)

func (*OpenCode) GetFullDockerfile

func (o *OpenCode) GetFullDockerfile(version string) (string, error)

GetFullDockerfile returns the complete Dockerfile for OpenCode. Builds on exitbox-base with pre-downloaded musl binary (same pattern as Claude/Codex).

func (*OpenCode) GetInstalledVersion

func (o *OpenCode) GetInstalledVersion(rt container.Runtime, img string) (string, error)

func (*OpenCode) GetLatestVersion

func (o *OpenCode) GetLatestVersion() (string, error)

func (*OpenCode) HostConfigPaths

func (o *OpenCode) HostConfigPaths() []string

func (*OpenCode) ImportConfig

func (o *OpenCode) ImportConfig(src, dst string) error

func (*OpenCode) Name

func (o *OpenCode) Name() string

Jump to

Keyboard shortcuts

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