Documentation
¶
Index ¶
- func BuildContainerEnv(cfg *EnvConfig) []string
- func BuildContainerMounts(cfg *MountConfig) []mount.Mount
- func ValidateMountTargets(cfg *MountConfig) error
- func ValidateRequiredArtifacts(outDir string, requiredArtifacts []v1.Artifact) error
- type AgentConfigMode
- type ContainerConfig
- type EnvConfig
- type MountConfig
- type Runtime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildContainerEnv ¶
BuildContainerEnv assembles the environment variables for a container This function is pure and deterministic - no Docker client interaction
func BuildContainerMounts ¶
func BuildContainerMounts(cfg *MountConfig) []mount.Mount
BuildContainerMounts assembles the Docker mounts configuration This function is pure and deterministic - no Docker client interaction
func ValidateMountTargets ¶
func ValidateMountTargets(cfg *MountConfig) error
ValidateMountTargets validates that all mount sources exist This function is pure and deterministic - no Docker client interaction
func ValidateRequiredArtifacts ¶
ValidateRequiredArtifacts checks that all required artifacts are present This function is pure and deterministic - no Docker client interaction
Types ¶
type AgentConfigMode ¶
type AgentConfigMode string
AgentConfigMode represents the mode for mounting agent-specific configuration from the host into the container. This replaces the boolean UseLocalClaudeConfig with more flexible behavior.
const ( // AgentConfigModeAuto automatically mounts host config if it exists // and appears compatible (not headless/container Claude), // and silently skips if it doesn't exist or is incompatible. AgentConfigModeAuto AgentConfigMode = "auto" // AgentConfigModeYes always attempts to mount the host config, // and emits a warning if the config directory doesn't exist. // Use with caution as it may mount incompatible configs. AgentConfigModeYes AgentConfigMode = "yes" // AgentConfigModeNo never mounts the host config. // This is the default behavior to prevent accidental credential exposure. AgentConfigModeNo AgentConfigMode = "no" )
func ParseAgentConfigMode ¶
func ParseAgentConfigMode(s string) (AgentConfigMode, error)
ParseAgentConfigMode parses a string into an AgentConfigMode. Case-insensitive. Returns error for invalid values.
func (AgentConfigMode) ShouldMount ¶
func (m AgentConfigMode) ShouldMount(dirExists bool) bool
ShouldMount determines whether to mount the config based on the mode and whether the config directory exists.
func (AgentConfigMode) String ¶
func (m AgentConfigMode) String() string
String returns the string representation of the mode.
func (AgentConfigMode) WarnIfMissing ¶
func (m AgentConfigMode) WarnIfMissing() bool
WarnIfMissing returns true if a warning should be emitted when the config directory doesn't exist.
type ContainerConfig ¶
type ContainerConfig struct {
BaseImage string // e.g., golang:1.22 (The toolchain)
AgentBundle string // Required path to agent bundle archive (.tar.gz)
Workspace string
InputPath string // Path to input directory (contains spec.yaml, context/, prompts/)
OutDir string
Env map[string]string
Cmd []string // Optional command override
// Workspace preparation options
WorkspaceStrategy string // Workspace preparation strategy (e.g., "git-clone", "snapshot")
WorkspaceHistory workspace.HistoryMode // How much git history to include
WorkspaceRef string // Git ref to checkout (optional)
WorkspaceIsTemporary bool // true if workspace is a temporary directory (vs user-provided)
// Agent config mount mode
AgentConfigMode string // Agent config mount mode: "auto", "yes", "no"
// Git configuration (already resolved by caller)
// These values are pre-resolved using git.ResolveConfig() with proper priority:
// host git config > ProjectConfig > env vars > defaults
GitAuthorName string // Git author name for commits
GitAuthorEmail string // Git author email for commits
// Skills configuration
Skills []string // Paths to skill directories to include
}
type MountConfig ¶
type MountConfig struct {
SnapshotDir string
InputPath string // Path to input directory (contains spec.yaml, context/, prompts/)
OutDir string
LocalClaudeConfigDir string // Path to host ~/.claude directory (optional, for mounting)
}
MountConfig represents the mount configuration for a container