skillsvc

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package skillsvc provides the default implementation of skills.SkillService.

Index

Constants

View Source
const LocalBuildAnnotation = "dev.stacklok.toolhive.local-build"

LocalBuildAnnotation marks a tag in the local OCI store as produced by `thv skill build` rather than an OCI pull (install, content preview). The value is always "true" when set; absence means "not a local build".

The annotation is stamped at the descriptor level inside the store's root index.json, not on the manifest content. Two properties follow from that:

  1. Push resolves the artifact by digest, which returns a plain descriptor (oras-go's oci.Store strips annotations when the reference is a digest), so the marker never crosses the wire.
  2. Pull calls Store.Tag with the pulled digest, which also resolves by digest before tagging, so pulled tags inherit no annotations and stay invisible to ListBuilds.

The key is reverse-DNS namespaced so it composes with other locally-built artifact types (containers, MCP server images) in the future.

Variables

This section is empty.

Functions

func New

func New(store storage.SkillStore, opts ...Option) skills.SkillService

New creates a new SkillService backed by the given store.

Types

type Option added in v0.10.0

type Option func(*service)

Option configures the skill service.

func WithGitResolver added in v0.13.0

func WithGitResolver(gr gitresolver.Resolver) Option

WithGitResolver sets the git resolver for git:// skill installations.

func WithGroupManager added in v0.11.1

func WithGroupManager(mgr groups.Manager) Option

WithGroupManager sets the group manager for skill group membership.

func WithInstaller added in v0.10.0

func WithInstaller(inst skills.Installer) Option

WithInstaller sets the installer for filesystem operations.

func WithOCIStore added in v0.10.1

func WithOCIStore(store *ociskills.Store) Option

WithOCIStore sets the local OCI store for skill artifacts.

func WithPackager added in v0.10.1

func WithPackager(p ociskills.SkillPackager) Option

WithPackager sets the skill packager for building OCI artifacts.

func WithPathResolver added in v0.10.0

func WithPathResolver(pr skills.PathResolver) Option

WithPathResolver sets the path resolver for skill installations.

func WithRegistryClient added in v0.10.1

func WithRegistryClient(rc ociskills.RegistryClient) Option

WithRegistryClient sets the registry client for push/pull operations.

func WithSkillLookup added in v0.12.5

func WithSkillLookup(sl SkillLookup) Option

WithSkillLookup sets the registry-based skill lookup for name resolution.

type SkillLookup added in v0.12.5

type SkillLookup interface {
	SearchSkills(query string) ([]regtypes.Skill, error)
}

SkillLookup resolves a plain skill name against a registry/index. registry.Provider implicitly satisfies this interface.

Jump to

Keyboard shortcuts

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