Skip to content

[plugins] Phase 1: oci/plugins package (THV-0077) #131

@JAORMX

Description

@JAORMX

Goal: Add an oci/plugins package mirroring oci/skills file-for-file, built on the shared oci/artifact primitives from Phase 0.

Deliverables:

  • oci/plugins/mediatypes.goArtifactTypePlugin = "dev.toolhive.plugins.v1"; dev.toolhive.plugins.* labels/annotations (.name, .description, .version, .license, .files, .components, .requires); PluginConfig + PluginConfigFromImageConfig. .components JSON inventory and .requires are plugin-specific additions.
  • oci/plugins/interfaces.goRegistryClient (Push/Pull), PluginPackager.
  • oci/plugins/packager.go — index → per-platform manifest → config + single plugin.tar.gz layer, using oci/artifact.
  • oci/plugins/registry.go — ORAS push/pull + Docker credential auth.
  • oci/plugins/store.go — local store rooted at toolhive/plugins under xdg.DataHome.
  • oci/plugins/mocks/ via go:generate mockgen.

Dependency/gate: depends on Phase 0 merged. Precedes GATE-C2 (tag toolhive-core, e.g. v0.0.26; bump toolhive/go.mod). Nothing in Phase 2 compiles before C2.

Testing/exit gate: packager determinism (identical bundle → identical digest under SOURCE_DATE_EPOCH); config round-trip; store put/get.

Part of stacklok/toolhive#5525
Refs RFC PR stacklok/toolhive-rfcs#77

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestneeds-triageIssue needs initial triage by a maintainer

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions