drift

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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

func CheckVersionDrift(sessionID string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL