Documentation
¶
Overview ¶
Package freshness compares an index's manifest against the live git HEAD of its source tree. Used by both `ckv freshness` (CLI) and the MCP `cks.ops.get_freshness` tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct {
IndexedHead string `json:"indexed_head"`
CurrentHead string `json:"current_head"`
ChangedFiles []string `json:"changed_files,omitempty"`
Stale bool `json:"stale"`
Fresh bool `json:"fresh"`
Warnings []string `json:"warnings,omitempty"`
}
Report is the on-the-wire shape consumed by JSON output + MCP tool.
func Check ¶
Check runs `git rev-parse HEAD` and `git diff --name-only` against srcRoot. Stale is true iff CurrentHead != IndexedHead. ChangedFiles is populated only when both heads are present and the diff succeeds; transient git errors surface as warnings rather than hard failures (callers may still want a Report indicating "git unavailable").
Click to show internal directories.
Click to hide internal directories.