kernel

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

scaffold: generated from docs/specs/init-subcommand.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentsRepo added in v0.3.0

func AgentsRepo(targetDir string) (string, error)

AgentsRepo reads AGENTS.md from targetDir and returns the repository field from its frontmatter, or an error if the file is absent or malformed.

func ComponentPathsFromManifest added in v0.10.0

func ComponentPathsFromManifest(manifestPath string) ([]string, error)

ComponentPathsFromManifest reads a manifest.yml file and returns the path value for each declared agent, workflow, and skill. Empty or whitespace-only paths are skipped. An error is returned only when the file cannot be read or parsed.

func ManifestRepo added in v0.3.0

func ManifestRepo(targetDir string) (string, error)

manifestRepo reads .agentic/manifest.yml from targetDir and returns the kernel.repository value, or an error if absent or unreadable.

Types

type Component added in v0.10.0

type Component struct {
	Name string `yaml:"name"`
	Path string `yaml:"path"`
}

Component is a minimal typed view of an agent, workflow, or skill entry in .agentic/manifest.yml.

type KernelInfo

type KernelInfo struct {
	Version      string
	Title        string
	Repository   string
	Organization string
	License      string
	CacheDir     string
	// AgentPaths contains the path values of all agents declared in the upstream
	// manifest (e.g. ".agentic/agents/kernel"). Used by sync to derive which
	// per-agent subdirs are user-owned and must not be overwritten.
	AgentPaths []string
}

KernelInfo holds metadata parsed from the upstream AGENTS.md frontmatter and the path to the local temp cache of fetched files.

func Fetch

func Fetch(ctx context.Context, client *github.Client, owner, repo string, reporter ProgressReporter) (*KernelInfo, error)

Fetch retrieves the upstream kernel from GitHub, writes all relevant files to a temporary directory, and returns a KernelInfo with metadata and the cache path. On any failure the temp dir is removed and the error is returned verbatim. The caller is responsible for os.RemoveAll(k.CacheDir) when done.

type Manifest added in v0.3.0

type Manifest struct {
	Kernel struct {
		Repository string `yaml:"repository"`
		Version    string `yaml:"version"`
	} `yaml:"kernel"`
	Agents    []Component `yaml:"agents"`
	Workflows []Component `yaml:"workflows"`
	Skills    []Component `yaml:"skills"`
}

Manifest is a minimal typed view of .agentic/manifest.yml sufficient for sync operations. Unknown/user fields are preserved in the raw decoded map.

type ProgressReporter added in v0.10.0

type ProgressReporter interface {
	Start(title string, total int)
	Inc()
	Finish(message string)
}

ProgressReporter defines an interface for tracking the progress of kernel fetching.

Jump to

Keyboard shortcuts

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