skillscan

package
v0.3.0-beta.22 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package skillscan discovers skill definition files under filesystem roots.

Index

Constants

View Source
const (
	// SkillFileName is the canonical skill definition filename.
	SkillFileName = "SKILL.md"
	// MaxCandidates bounds the number of definitions discovered from one root.
	MaxCandidates = 300
	// MaxEntries bounds the number of filesystem entries visited under one root.
	MaxEntries = 20_000
)

Variables

This section is empty.

Functions

func ScanFS

func ScanFS(fsys fs.FS, root string) ([]string, error)

ScanFS discovers skill definitions below root in an fs.FS source.

Types

type DirectoryResult

type DirectoryResult struct {
	Paths     []string
	Snapshots map[string]filesnap.Snapshot
	RealPaths map[string]string
	Stats     RootScanStats
}

DirectoryResult is the filesystem discovery result for one root.

func ScanDirectory

func ScanDirectory(root string) (DirectoryResult, error)

ScanDirectory discovers skill definitions below root. It resolves the root itself, never follows nested directory symlinks, and excludes definitions whose resolved path escapes root.

func ScanDirectoryWithin

func ScanDirectoryWithin(root string, trustedRoots []string) (DirectoryResult, error)

ScanDirectoryWithin discovers definitions while allowing first-level links to resolve only inside the supplied projection roots.

type RootScanStats

type RootScanStats struct {
	Exists       bool
	Readable     bool
	ScannedCount int
	Truncated    bool
	SkippedLinks []SkippedLink
}

RootScanStats reports non-fatal scan state for one physical source root.

type SkippedLink struct {
	Path   string
	Reason string
}

SkippedLink records one first-level link rejected by the scanner.

Jump to

Keyboard shortcuts

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