Skip to content

constants

View on pkg.go.dev

import "github.com/thesimonho/warden/constants"

Package constants defines shared values used across Warden’s packages. It has no imports and no logic — any package can depend on it safely.

ContainerHomeDir is the home directory for ContainerUser inside containers.

const ContainerHomeDir = "/home/" + ContainerUser

ContainerUser is the non-root user inside project containers. All terminal processes (tmux, the agent, bash) run as this user.

const ContainerUser = "warden"

TmuxSessionPrefix is prepended to worktree IDs to form tmux session names.

const TmuxSessionPrefix = "warden-"

AllAgentTypes lists all supported agent type identifiers in display order.

var AllAgentTypes = []AgentType{AgentClaudeCode, AgentCodex}

func TmuxSessionName(worktreeID string) string

TmuxSessionName returns the tmux session name for a worktree.

AgentType identifies an AI coding agent supported by Warden. Used as the database column value and WARDEN_AGENT_TYPE env var.

type AgentType string

const (
// AgentClaudeCode identifies Anthropic's Claude Code CLI.
AgentClaudeCode AgentType = "claude-code"
// AgentCodex identifies OpenAI's Codex CLI.
AgentCodex AgentType = "codex"
// DefaultAgentType is the agent type used when none is specified.
DefaultAgentType = AgentClaudeCode
)

func (t AgentType) String() string

String returns the string representation of the agent type.

func (t AgentType) Valid() bool

Valid reports whether the agent type is a known supported type.

Generated by gomarkdoc