Documentation
¶
Index ¶
- func AgentImageDockerfilePath() (string, error)
- func AgentImageHash() (string, error)
- func BuiltinImageNames() []string
- func BuiltinTemplateNames() []string
- func ComposeBaseArgs(name string) ([]string, string, error)
- func ComposePath(name string) (string, error)
- func ContainerDir(name string) (string, error)
- func ContainersRoot() (string, error)
- func CreateWorkspace(name string, opts CreateOptions) (string, error)
- func DockerPS(ctx context.Context, runner Runner, stderr io.Writer) ([]byte, error)
- func Exec(ctx context.Context, runner Runner, name string, cmdArgs []string, ...) error
- func ImageDir(name string) (string, error)
- func ImagesRoot() (string, error)
- func IsBuiltinTemplate(name string) bool
- func PrintList(entries []ListEntry, w io.Writer) error
- func ProjectName(name string) string
- func Rebuild(ctx context.Context, runner Runner, name string, stdout, stderr io.Writer) error
- func Remove(ctx context.Context, runner Runner, name string, stdout, stderr io.Writer) error
- func RenderTemplateContent(data []byte, values PlaceholderValues) ([]byte, error)
- func ResolveTemplateValues(desc *TemplateDescriptor, provided map[string]string, noInput bool, ...) (map[string]string, error)
- func SafeName(name string) string
- func Shell(ctx context.Context, runner Runner, name string, stdin io.Reader, ...) error
- func ShellWithOptions(ctx context.Context, runner Runner, name string, opts ShellOptions, ...) error
- func Start(ctx context.Context, runner Runner, name string, stdout, stderr io.Writer) error
- func Stop(ctx context.Context, runner Runner, name string, stdout, stderr io.Writer) error
- func ValidateName(name string) error
- type ComposeInfo
- type CreateOptions
- type ExecRecipe
- type Hints
- type ImageSyncResult
- type ListEntry
- type OSRunner
- type PlaceholderValues
- type RunOptions
- type Runner
- type ServiceInfo
- type ShellOptions
- type Template
- type TemplateCondition
- type TemplateDescriptor
- type TemplateFile
- type TemplatePrompt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentImageDockerfilePath ¶
AgentImageDockerfilePath returns the stable managed legacy Arch Dockerfile path for the built-in agent runtime image.
func AgentImageHash ¶
AgentImageHash returns a deterministic short hex fingerprint of the embedded agent image build context. The hash changes whenever any embedded file under images/agent is added, removed, renamed, or modified. It is suffixed onto the agent image tag so changes to embedded content force a fresh image instead of silently reusing a cached tag.
func BuiltinImageNames ¶
func BuiltinImageNames() []string
BuiltinImageNames returns supported managed image asset names.
func BuiltinTemplateNames ¶
func BuiltinTemplateNames() []string
BuiltinTemplateNames returns the built-in contain template names.
func ComposePath ¶
ComposePath returns the canonical compose.yaml path for a named contain workspace.
func ContainerDir ¶
ContainerDir returns the configuration directory for a named contain workspace.
func ContainersRoot ¶
ContainersRoot returns the global directory containing named contain workspaces.
func CreateWorkspace ¶
func CreateWorkspace(name string, opts CreateOptions) (string, error)
CreateWorkspace renders the selected template into the named global contain workspace directory. Existing targets are never overwritten.
func ImagesRoot ¶
ImagesRoot returns the directory containing managed contain image assets.
func IsBuiltinTemplate ¶
IsBuiltinTemplate reports whether name is a built-in contain template.
func ProjectName ¶
ProjectName returns the deterministic Docker Compose project name for a contain workspace.
func Rebuild ¶
Rebuild rebuilds workspace images without cache, pulls newer base images where Compose can, and recreates containers while preserving volumes/networks.
func Remove ¶
Remove permanently deletes a contain workspace: Compose resources are brought down with volumes removed, then the workspace definition directory is deleted.
func RenderTemplateContent ¶
func RenderTemplateContent(data []byte, values PlaceholderValues) ([]byte, error)
RenderTemplateContent applies simple placeholder substitution to data.
func ResolveTemplateValues ¶
func SafeName ¶
SafeName returns the deterministic name fragment used for Docker Compose project names and Docker resource names. It is tolerant so callers can use it in error paths, but valid workspace names should be checked with ValidateName.
func ShellWithOptions ¶ added in v0.0.193
func ValidateName ¶
ValidateName validates a contain workspace name. Names are intentionally limited to simple path-safe characters because they are used as directory names below the global containers root.
Types ¶
type ComposeInfo ¶
type ComposeInfo struct {
Path string
Services map[string]ServiceInfo
Hints Hints
Invalid bool
InvalidReason string
}
func ReadComposeInfo ¶
func ReadComposeInfo(path string) (ComposeInfo, error)
ReadComposeInfo lightly parses the Compose file for term-llm hints, service names, and labels. It intentionally does not fully validate Compose.
func (ComposeInfo) DefaultService ¶
func (i ComposeInfo) DefaultService() string
func (ComposeInfo) DefaultUser ¶ added in v0.0.193
func (i ComposeInfo) DefaultUser(service string) string
func (ComposeInfo) Shell ¶
func (i ComposeInfo) Shell() string
type CreateOptions ¶
type ExecRecipe ¶ added in v0.0.195
type ImageSyncResult ¶
type ListEntry ¶
func Definitions ¶
Definitions scans global contain workspace definitions without consulting Docker.
type PlaceholderValues ¶
func NewPlaceholderValues ¶
func NewPlaceholderValues(name, cwd, configDir, containersDir, composePath string) PlaceholderValues
NewPlaceholderValues builds the supported replacement values for contain templates.
type RunOptions ¶
type ServiceInfo ¶
type ShellOptions ¶ added in v0.0.193
type ShellOptions struct {
User string
}
type Template ¶
type Template struct {
Name string
Source string
Builtin bool
Descriptor *TemplateDescriptor
Files []TemplateFile
}
func LoadTemplate ¶
LoadTemplate resolves a built-in, single-file, or directory template.
type TemplateCondition ¶
type TemplateDescriptor ¶
type TemplateDescriptor struct {
Version int `yaml:"version"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Prompts []TemplatePrompt `yaml:"prompts"`
}