store

package
v0.2.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactRouter added in v0.2.20

type ArtifactRouter struct {
	// contains filtered or unexported fields
}

func NewArtifactRouter added in v0.2.20

func NewArtifactRouter(
	store artifactAPI.ConsumerAPI,
) (*ArtifactRouter, error)

func (*ArtifactRouter) CollectionForArtifact added in v0.2.20

func (r *ArtifactRouter) CollectionForArtifact(
	ctx context.Context,
	ref artifact.ArtifactRef,
) (collection.CollectionRef, error)

CollectionForArtifact resolves durable ownership without projecting or opening the Skill source. Batch reconciliation can then load the owning Collection once rather than first performing an expensive single-Skill projection.

func (*ArtifactRouter) ListCollectionSkills added in v0.2.20

func (r *ArtifactRouter) ListCollectionSkills(
	ctx context.Context,
	ref collection.CollectionRef,
) ([]ResolvedArtifactSkill, error)

func (*ArtifactRouter) Register added in v0.2.20

func (r *ArtifactRouter) Register(
	kind basespec.CollectionKind,
	loader ArtifactSkillLoader,
) error

func (*ArtifactRouter) ResolveArtifactSkill added in v0.2.20

func (r *ArtifactRouter) ResolveArtifactSkill(
	ctx context.Context,
	ref artifact.ArtifactRef,
) (ResolvedArtifactSkill, error)

type ArtifactSkillLoader added in v0.2.20

type ArtifactSkillLoader interface {
	ResolveArtifactSkill(
		ctx context.Context,
		ref artifact.ArtifactRef,
	) (ResolvedArtifactSkill, error)

	ListCollectionSkills(
		ctx context.Context,
		ref collection.CollectionRef,
	) ([]ResolvedArtifactSkill, error)
}

ArtifactSkillLoader is implemented by feature adapters. It does not decide ownership from a durable reference shape. ArtifactRouter resolves ownership from the Artifact Record and its current Collection membership first.

type ResolvedArtifactSkill added in v0.2.20

type ResolvedArtifactSkill struct {
	Artifact   artifact.ArtifactRef     `json:"artifact"`
	Collection collection.CollectionRef `json:"collection"`
	Definition provider.SkillDef        `json:"definition"`
	Version    string                   `json:"version"`
}

func (ResolvedArtifactSkill) Validate added in v0.2.20

func (s ResolvedArtifactSkill) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL