Skip to content

Add OCI skills store, interfaces, and mocks#19

Merged
JAORMX merged 1 commit intomainfrom
oci-skills-store
Feb 6, 2026
Merged

Add OCI skills store, interfaces, and mocks#19
JAORMX merged 1 commit intomainfrom
oci-skills-store

Conversation

@JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Feb 6, 2026

Summary

  • Add local OCI artifact storage (Store) with content-addressed blob/manifest storage and tag resolution
  • Define RegistryClient and SkillPackager interfaces with mockgen-generated mocks (stubs for TASK-003/TASK-004)
  • Use github.com/adrg/xdg for XDG base directory resolution; StoreRoot(dataHome) provides DI for testability
  • Refactor GetIndex/IsIndex to use unexported getManifest helper to avoid sync.RWMutex re-entrancy risk
  • Add github.com/opencontainers/go-digest dependency for content-addressed storage

This is PR 2 of 2 for stacklok/toolhive-core#14. Builds on the media types from PR 1 (#17, merged).

Part of epic: stacklok/stacklok-epics#239

Test plan

  • task lint — 0 issues
  • task test — all pass with -race
  • task license-check — SPDX headers valid
  • task gen — mock generation succeeds
  • task tidy — go.mod clean
  • Reviewer: verify store root uses toolhive/skills path segments
  • Reviewer: confirm no t.Setenv usage (DI via StoreRoot parameter)

🤖 Generated with Claude Code

Introduce local OCI artifact storage (Store), registry/packager
interfaces (RegistryClient, SkillPackager), and generated mocks for
the oci/skills package. The store provides content-addressed blob and
manifest storage with tag resolution.

Uses adrg/xdg for XDG base directory resolution and dependency
injection via StoreRoot(dataHome) for testability.

Ref: #14

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JAORMX JAORMX requested review from jhrozek and rdimitrov February 6, 2026 13:23
@JAORMX JAORMX merged commit 1b6a967 into main Feb 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants