Documentation
¶
Overview ¶
Package drift detects version drift across VERSION, plugin, and marketplace files and reports stale context entries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckVersionDrift ¶
CheckVersionDrift compares VERSION, plugin.json, and marketplace.json. If any differ, it emits a relay box listing the drift. Silent when all match.
Parameters:
- sessionID: Session identifier
Returns:
- string: JSON hook response to print, or empty string if no drift
func FormatStaleEntries ¶
func FormatStaleEntries(entries []entity.StaleEntry) string
FormatStaleEntries builds the display text for stale files.
Groups entries by review URL. Entries without a URL get the generic "touch to mark as reviewed" footer. Entries with URLs get a "Review against: <url>" line after their group.
Parameters:
- entries: stale file entries to format
Returns:
- string: formatted multi-line text for display
func ReadMarketplaceVersion ¶
func ReadMarketplaceVersion() string
ReadMarketplaceVersion parses .claude-plugin/marketplace.json and returns plugins[0].version, or empty string if the file is missing or malformed.
Returns:
- string: Version string or empty string
func ReadVersionFile ¶
func ReadVersionFile() string
ReadVersionFile reads and trims the VERSION file from the project root.
Returns:
- string: Version string or empty string
Types ¶
type MarketplaceManifest ¶
type MarketplaceManifest struct {
Plugins []struct {
Version string `json:"version"`
} `json:"plugins"`
}
MarketplaceManifest is the structure of .claude-plugin/marketplace.json.