Documentation
¶
Index ¶
- Constants
- Variables
- type Artifact
- type Client
- func (c *Client) Pull(ctx context.Context, ref string) (Artifact, error)
- func (c *Client) PullIndex(ctx context.Context, ref string) (Index, error)
- func (c *Client) Push(ctx context.Context, ref string, art Artifact) (Descriptor, error)
- func (c *Client) PushIndex(ctx context.Context, ref string, index Index) (Descriptor, error)
- func (c *Client) Resolve(ctx context.Context, ref string) (Descriptor, error)
- type Config
- type Descriptor
- type Index
- type IndexEntry
- type Reference
Constants ¶
const ( MediaTypeSkillArtifact = "application/vnd.agentskills.skill.v1" MediaTypeSkillConfig = "application/vnd.agentskills.skill.config.v1+json" MediaTypeSkillContent = "application/vnd.agentskills.skill.content.v1.tar+gzip" MediaTypeCollection = "application/vnd.agentskills.collection.v1" AnnotationSkillName = "io.agentskills.skill.name" AnnotationSkillCompatibility = "io.agentskills.skill.compatibility" AnnotationSkillRef = "io.agentskills.skill.ref" AnnotationCollectionName = "io.agentskills.collection.name" )
const SupportedSchemaVersion = "1"
SupportedSchemaVersion is the only schemaVersion this implementation understands. Per §4.2, clients must reject unknown values rather than guessing at forward compatibility.
Variables ¶
var ( ErrInvalidConfig = errors.New("invalid skill config") ErrUnsupportedSchemaVer = fmt.Errorf("%w: unsupported schemaVersion", ErrInvalidConfig) ErrInvalidName = fmt.Errorf("%w: invalid name", ErrInvalidConfig) ErrFieldTooLong = fmt.Errorf("%w: field exceeds maximum length", ErrInvalidConfig) )
Validation errors. Sentinels so callers can branch with errors.Is.
var ( ErrNotFound = errors.New("skill: artifact not found") ErrNotSkill = errors.New("skill: artifact is not a skill.v1") )
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
Config Config
Content io.ReadCloser
Digest string
Tag string
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) PullIndex ¶
PullIndex fetches a Skills Collection (an OCI Image Index per §5.1) and returns its parsed contents. The skill artifacts the index references are not pulled — only the index itself.
func (*Client) Push ¶
Push uploads a packed skill Artifact to the registry at ref. The ref must include a tag; that tag becomes the skill's version in the published config (spec §4.2).
type Config ¶
type Config struct {
SchemaVersion string `json:"schemaVersion"`
Name string `json:"name"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
License string `json:"license,omitempty"`
Compatibility string `json:"compatibility,omitempty"`
AllowedTools []string `json:"allowedTools,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
4.2 https://github.com/ThomasVitale/agents-skills-oci-artifacts-spec#42-config-object-schema
type Descriptor ¶
type Index ¶
type Index struct {
Annotations map[string]string `json:"annotations,omitempty"`
Manifests []IndexEntry `json:"manifests"`
}
type IndexEntry ¶
type IndexEntry struct {
Name string `json:"name"` // from io.agentskills.skill.name
Ref string `json:"ref"` // from io.agentskills.skill.ref
Version string `json:"version,omitempty"` // from io.agentskills.skill.Version
Description string `json:"description,omitempty"` // from io.agentskills.skill.description
Digest string `json:"digest"`
Size int64 `json:"size,omitempty"`
}