kernel

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 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 AgentPathsFromManifest added in v0.7.0

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

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

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 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 Agent added in v0.7.0

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

Agent is a minimal typed view of an agent 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) (*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 []Agent `yaml:"agents"`
}

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

Jump to

Keyboard shortcuts

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