Documentation
¶
Overview ¶
Package builtin bundles embedded resources (skills, souls, sub-agents, templates) that Anna ships with its binary. Runtime code accesses them through Registry, not by walking the filesystem directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureBuiltinSkills ¶
EnsureBuiltinSkills extracts builtin skills once per (process, skillsDir) for callers that need a lazy, idempotent fallback outside normal app startup.
func ExtractSkills ¶
ExtractSkills writes every builtin skill directory into skillsDir. Each detected skill root (including nested paths like system/foo) is replaced atomically; other entries in skillsDir are preserved.
func ExtractSubAgents ¶
ExtractSubAgents writes builtin sub-agent preset files into agentsDir. Individual files are overwritten; other content in agentsDir is preserved.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is the read-only catalog of builtin resources, keyed by Kind and ID.
func Load ¶
Load walks sourceFS and parses every supported resource kind it finds. sourceFS must have subdirectories matching Kind.subdir() for each kind to load. Missing subdirectories are silently skipped (useful for tests with partial fixtures).
type Resource ¶
type Resource struct {
Kind Kind
ID string
Name string
Description string
Tags []string
Metadata map[string]any
Content string
Hash string
}
Resource is one builtin entry of a given Kind. Content is the markdown body with frontmatter stripped. Metadata holds kind-specific frontmatter fields (anything beyond name/description/tags).