agentskill

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ManifestFileName = ".manifest.json"

ManifestFileName is the name of the manifest file written alongside installed skill files.

View Source
const SiteSkillName = "markata-go-site"

SiteSkillName is the default bundled skill name for markata-go sites.

Variables

This section is empty.

Functions

func ListFiles

func ListFiles() ([]string, error)

ListFiles returns all bundled skill files with slash-separated relative paths.

func SiteSkill

func SiteSkill() (fs.FS, error)

SiteSkill returns the embedded filesystem for the bundled markata-go site skill.

func WriteManifest

func WriteManifest(m *Manifest, dir string) error

WriteManifest serializes the manifest to JSON and writes it to the given directory.

Types

type DriftEntry

type DriftEntry struct {
	Path   string
	Status FileStatus
}

DriftEntry describes the drift state of a single file.

type DriftReport

type DriftReport struct {
	InstalledVersion string
	CurrentVersion   string
	VersionMismatch  bool
	Files            []DriftEntry
}

DriftReport holds the comparison between installed and bundled skill files.

func ComputeDrift

func ComputeDrift(installed *Manifest, skillDir, currentVersion string) (*DriftReport, error)

ComputeDrift compares an installed skill directory against the current bundled skill.

func (*DriftReport) HasDrift

func (r *DriftReport) HasDrift() bool

HasDrift returns true if any file is not in the ok state.

func (*DriftReport) IssueCount

func (r *DriftReport) IssueCount() int

IssueCount returns the number of files that are not ok.

type FileStatus

type FileStatus string

FileStatus describes the drift state of a single file.

const (
	FileOK       FileStatus = "ok"
	FileModified FileStatus = "modified"
	FileNew      FileStatus = "new"
	FileMissing  FileStatus = "missing"
)

type Manifest

type Manifest struct {
	Version     string            `json:"version"`
	InstalledAt time.Time         `json:"installed_at"`
	Target      string            `json:"target"`
	Scope       string            `json:"scope,omitempty"`
	Files       map[string]string `json:"files"`
}

Manifest records the state of an installed skill for drift detection.

func ComputeBundledManifest

func ComputeBundledManifest(version, target, scope string) (*Manifest, error)

ComputeBundledManifest builds a Manifest from the current bundled skill files. The version, target, and scope fields are set by the caller.

func ReadManifest

func ReadManifest(dir string) (*Manifest, error)

ReadManifest reads and parses a manifest file from the given skill directory.

Jump to

Keyboard shortcuts

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