Help us shape the future of Go! Take the 2026 Go Developer Survey

agentskills

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package agentskills resolves the skills obol installs into Hermes agents: the stack-operation skills embedded in the binary, plus opt-in skills from a pinned ObolNetwork/skills release (installed with `obol agent skills add`).

Index

Constants

View Source
const (
	Release       = "v1.8.0"
	ContentSHA256 = "45a34d5ac230bef54233114a78f3cb17f27e2977b7723f235bb3014965b73f06"
)

Pinned ObolNetwork/skills release for opt-in skills. ContentSHA256 is the digest of the release's skills/ tree (see treeDigest), not of the tarball: GitHub archive bytes are not guaranteed stable, file contents are. Bump both together; `go test ./internal/agentskills -run TestPinnedRelease` with OBOL_SKILLS_VERIFY_PIN=1 prints the digest of the pinned tag.

View Source
const SourceEnv = "OBOL_SKILLS_SOURCE"

SourceEnv points at a local ObolNetwork/skills checkout (or any directory with a skills/ subdirectory) to use instead of the pinned release, e.g. to try unreleased skill edits. No digest check is done on it.

Variables

View Source
var Retired = []string{
	"addresses", "bridging", "building-blocks", "concepts", "gas", "indexing",
	"l2s", "standards", "wallets", "why", "distributed-validators", "monetize-guide",
	"autoresearch", "autoresearch-coordinator", "autoresearch-worker",
}

Retired lists skills that earlier obol versions embedded and installed into every agent. Agents synced before the manifest existed still have them; Sync removes these on the first sync that lacks a manifest.

Functions

func Added

func Added(cfg *config.Config, agent string) ([]string, error)

Added returns the opt-in skills recorded for agent, sorted.

func Available

func Available(cfg *config.Config) ([]string, error)

Available returns the opt-in skills in the pinned ObolNetwork/skills release (or OBOL_SKILLS_SOURCE), sorted. It may download the release.

func DefaultAgentSet

func DefaultAgentSet(cfg *config.Config, agent string) ([]string, error)

DefaultAgentSet is the full skill set for the stack-managed default agent: every built-in skill plus its recorded opt-in skills.

func Embedded

func Embedded() []string

Embedded returns the skills built into this obol binary, sorted.

func IsEmbedded

func IsEmbedded(name string) bool

IsEmbedded reports whether name is built into this binary.

func RecordPath

func RecordPath(cfg *config.Config, agent string) string

RecordPath is $CONFIG_DIR/skills/<agent>.yaml.

func SetAdded

func SetAdded(cfg *config.Config, agent string, names []string) error

SetAdded records the opt-in skills for agent (deduplicated, sorted).

func Sync

func Sync(cfg *config.Config, dst string, names []string) error

Sync makes dst hold exactly names among the skills obol manages: it writes names, removes skills obol installed previously (per the manifest, or Retired when there is none yet) that are no longer wanted, and records the new set. Directories obol never installed are left alone.

If opt-in skills can't be fetched, the built-in ones are still synced, the opt-in ones keep whatever copy dst already has, and a *PartialError is returned.

func Write

func Write(cfg *config.Config, dst string, names []string) error

Write installs the named skills into dst, overwriting their files. Embedded names come from the binary; any other name is resolved from the pinned ObolNetwork/skills release, fetched on demand. Unknown names fail.

Types

type PartialError

type PartialError struct {
	Skills []string
	Err    error
}

PartialError reports opt-in skills that could not be (re)installed, e.g. because GitHub was unreachable. Built-in skills were synced and existing copies of the failed skills were kept, so callers should warn, not fail.

func (*PartialError) Error

func (e *PartialError) Error() string

func (*PartialError) Unwrap

func (e *PartialError) Unwrap() error

Jump to

Keyboard shortcuts

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