-
Notifications
You must be signed in to change notification settings - Fork 1
Add org.opencontainers.image.title annotation to skill layer descriptors #70
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
When pulling a published skill artifact with oras pull, the layer is skipped because it lacks the org.opencontainers.image.title annotation:
Skipped pulling layers without file name in "org.opencontainers.image.title"
Use 'oras copy ghcr.io/stacklok/toolhive/skills/toolhive-cli-user:latest --to-oci-layout <layout-dir>' to pull all layers.
oras pull uses this annotation to determine the output filename for each layer. Without it, ORAS has no way to know what to name the file, so it skips the layer entirely.
Root cause
In oci/skills/packager.go, the createManifest function builds the layer descriptor without any annotations:
Layers: []ocispec.Descriptor{
{
MediaType: ocispec.MediaTypeImageLayerGzip,
Digest: layerDigest,
Size: int64(len(layerBytes)),
},
},Proposed fix
Add org.opencontainers.image.title to the layer descriptor:
Layers: []ocispec.Descriptor{
{
MediaType: ocispec.MediaTypeImageLayerGzip,
Digest: layerDigest,
Size: int64(len(layerBytes)),
Annotations: map[string]string{
ocispec.AnnotationTitle: "skill.tar.gz",
},
},
},This is a one-line change in packager.go and aligns with the OCI image spec and ORAS conventions for pullable artifacts.
Workaround
Until this is fixed, users can inspect skill artifacts using:
oras copy <ref> --to-oci-layout <dir>to get the full OCI layoutoras blob fetch <ref>@<digest> --output skill.tar.gzto fetch the layer by digest
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working