// Package domain contains pure domain models with no external dependencies. // These types represent the core business concepts of the application. package domain // ProjectID is a strongly-typed identifier for projects. type ProjectID string // Project represents a claudebox project that can execute commands. type Project struct { ID ProjectID Name string Description string PodName string Status ProjectStatus Workspace string } // ProjectStatus represents the current state of a project's pod. type ProjectStatus string const ( ProjectStatusRunning ProjectStatus = "running" ProjectStatusPending ProjectStatus = "pending" ProjectStatusFailed ProjectStatus = "failed" ProjectStatusNotFound ProjectStatus = "not_found" ProjectStatusUnknown ProjectStatus = "unknown" ProjectStatusError ProjectStatus = "error" ) // IsAvailable returns true if the project can accept commands. func (s ProjectStatus) IsAvailable() bool { return s == ProjectStatusRunning } // IsTerminal returns true if the status is a final state. func (s ProjectStatus) IsTerminal() bool { return s == ProjectStatusFailed || s == ProjectStatusNotFound } // K8s label and annotation constants for project discovery. // Pods with these labels are discovered as rdev projects. const ( // LabelProject marks a pod as an rdev project when set to "true". LabelProject = "rdev.orchard9.ai/project" // LabelName specifies the project name (used as project ID). LabelName = "rdev.orchard9.ai/name" // LabelWorkspace specifies the workspace path inside the pod. LabelWorkspace = "rdev.orchard9.ai/workspace" // AnnotDescription provides a human-readable description of the project. AnnotDescription = "rdev.orchard9.ai/description" )