Documentation
¶
Overview ¶
Package doctor provides health check diagnostics for start configuration.
Index ¶
- Constants
- type BuildInfo
- type CheckResult
- type Options
- type Report
- type Reporter
- type SchemaSet
- type SectionResult
- func CheckAgents(cfgValue cue.Value) SectionResult
- func CheckCache() SectionResult
- func CheckConfiguration(paths config.Paths) SectionResult
- func CheckContexts(cfgValue cue.Value) SectionResult
- func CheckEnvironment(paths config.Paths) SectionResult
- func CheckIntro() SectionResult
- func CheckRoles(cfgValue cue.Value) SectionResult
- func CheckSchemaValidation(paths config.Paths, schemas SchemaSet) SectionResult
- func CheckSettings(paths config.Paths, cfgValue cue.Value) SectionResult
- func CheckTasks(cfgValue cue.Value) SectionResult
- func CheckVersion(info BuildInfo) SectionResult
- type Status
Constants ¶
const IssuesURL = "https://github.com/start-cli/start/issues"
IssuesURL is the issues URL for the project.
const RepoURL = "https://github.com/start-cli/start"
RepoURL is the repository URL for the project.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Version string
Commit string
BuildDate string
GoVersion string
Platform string
IndexVersion string // Registry index version (empty if unavailable)
IndexPath string // Configured library_index path (empty if using built-in default)
}
BuildInfo holds version and build information.
func DefaultBuildInfo ¶
func DefaultBuildInfo() BuildInfo
DefaultBuildInfo returns build info with runtime defaults.
type CheckResult ¶
type CheckResult struct {
Status Status `json:"status"`
Label string `json:"label"` // Short label (e.g., "claude", "agents.cue")
Message string `json:"message"` // Detail message (e.g., "/usr/local/bin/claude", "NOT FOUND")
Fix string `json:"fix,omitempty"` // Suggested fix action
Details []string `json:"details,omitempty"` // Additional details for verbose mode
Indent int `json:"-"` // Additional indentation level (0 = normal, 1+ = nested)
NoIcon bool `json:"-"` // Suppress status icon for this result
}
CheckResult holds the result of a single check item.
type Report ¶
type Report struct {
Sections []SectionResult `json:"sections"`
}
Report holds the complete diagnostic report.
func (Report) ErrorCount ¶
ErrorCount returns the number of failures in the report.
func (Report) Issues ¶
func (r Report) Issues() []CheckResult
Issues returns all check results that are failures or warnings.
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter handles output formatting for doctor results.
func NewReporter ¶
NewReporter creates a new reporter.
type SchemaSet ¶
type SchemaSet struct {
Agent cue.Value // #Agent definition
Role cue.Value // #Role definition
Context cue.Value // #Context definition
Task cue.Value // #Task definition
Settings cue.Value // #Settings definition
}
SchemaSet holds parsed CUE schema definitions for validation.
type SectionResult ¶
type SectionResult struct {
Name string `json:"name"`
Results []CheckResult `json:"results"`
Summary string `json:"summary,omitempty"` // Optional summary (e.g., "2 configured")
NoIcons bool `json:"-"` // If true, don't show status icons (for info-only sections)
}
SectionResult holds the results for a check section.
func CheckAgents ¶
func CheckAgents(cfgValue cue.Value) SectionResult
CheckAgents validates configured agent binaries are available.
func CheckCache ¶
func CheckCache() SectionResult
CheckCache checks the registry index cache status.
func CheckConfiguration ¶
func CheckConfiguration(paths config.Paths) SectionResult
CheckConfiguration validates CUE configuration files.
func CheckContexts ¶
func CheckContexts(cfgValue cue.Value) SectionResult
CheckContexts validates configured context files exist.
func CheckEnvironment ¶
func CheckEnvironment(paths config.Paths) SectionResult
CheckEnvironment validates runtime environment.
func CheckIntro ¶
func CheckIntro() SectionResult
CheckIntro returns the intro section with repository info.
func CheckRoles ¶
func CheckRoles(cfgValue cue.Value) SectionResult
CheckRoles validates configured role files exist.
func CheckSchemaValidation ¶
func CheckSchemaValidation(paths config.Paths, schemas SchemaSet) SectionResult
CheckSchemaValidation validates config files against CUE schemas.
func CheckSettings ¶
func CheckSettings(paths config.Paths, cfgValue cue.Value) SectionResult
CheckSettings resolves and displays all settings with their sources, and validates specific settings (default_agent, shell).
func CheckTasks ¶
func CheckTasks(cfgValue cue.Value) SectionResult
CheckTasks validates configured task files exist.
func CheckVersion ¶
func CheckVersion(info BuildInfo) SectionResult
CheckVersion returns the version section with build info.