Documentation
¶
Overview ¶
Package skillsvc provides the default implementation of skills.SkillService.
Index ¶
- Constants
- func New(store storage.SkillStore, opts ...Option) skills.SkillService
- type Option
- func WithGitResolver(gr gitresolver.Resolver) Option
- func WithGroupManager(mgr groups.Manager) Option
- func WithInstaller(inst skills.Installer) Option
- func WithOCIStore(store *ociskills.Store) Option
- func WithPackager(p ociskills.SkillPackager) Option
- func WithPathResolver(pr skills.PathResolver) Option
- func WithRegistryClient(rc ociskills.RegistryClient) Option
- func WithSkillLookup(sl SkillLookup) Option
- type SkillLookup
Constants ¶
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:
- 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.
- 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
WithGroupManager sets the group manager for skill group membership.
func WithInstaller ¶ added in v0.10.0
WithInstaller sets the installer for filesystem operations.
func WithOCIStore ¶ added in v0.10.1
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.