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
- Variables
- func Added(cfg *config.Config, agent string) ([]string, error)
- func Available(cfg *config.Config) ([]string, error)
- func DefaultAgentSet(cfg *config.Config, agent string) ([]string, error)
- func Embedded() []string
- func IsEmbedded(name string) bool
- func RecordPath(cfg *config.Config, agent string) string
- func SetAdded(cfg *config.Config, agent string, names []string) error
- func Sync(cfg *config.Config, dst string, names []string) error
- func Write(cfg *config.Config, dst string, names []string) error
- type PartialError
Constants ¶
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.
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 ¶
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 Available ¶
Available returns the opt-in skills in the pinned ObolNetwork/skills release (or OBOL_SKILLS_SOURCE), sorted. It may download the release.
func DefaultAgentSet ¶
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 ¶
IsEmbedded reports whether name is built into this binary.
func RecordPath ¶
RecordPath is $CONFIG_DIR/skills/<agent>.yaml.
func Sync ¶
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.
Types ¶
type PartialError ¶
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