metadata

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaVersion = "v1"
)

Variables

This section is empty.

Functions

func ResolveBuiltInSkill

func ResolveBuiltInSkill(
	collectionLogicalName string,
	skillLogicalName string,
) (artifact.ArtifactRef, error)

ResolveBuiltInSkill resolves only protected application metadata. It does not inspect user Roots, shareable packages, SQLite paths, or Source state.

func ResolveBuiltInSkillReference

func ResolveBuiltInSkillReference(
	reference SkillReference,
) (artifact.ArtifactRef, error)

Types

type Artifact

type Artifact struct {
	ID      basespec.ArtifactID `json:"id"`
	Member  basespec.Locator    `json:"member"`
	Enabled bool                `json:"enabled"`
}

type Collection

type Collection struct {
	ID        basespec.CollectionID `json:"id"`
	Payload   basespec.Locator      `json:"payload"`
	Enabled   bool                  `json:"enabled"`
	Artifacts []Artifact            `json:"artifacts"`
}

type HydratedArtifact

type HydratedArtifact struct {
	Registration      Artifact
	Member            definition.ContentRef
	SkillDefinition   definition.Definition
	EmbeddedDirectory basespec.Locator
	SourceDirectory   basespec.Locator
}

type HydratedCollection

type HydratedCollection struct {
	Registration          Collection
	Definition            definition.CollectionDefinition
	SourceScope           basespec.Locator
	ExpectedMemberDigests map[basespec.Locator]cryptoutil.Digest
	Artifacts             []HydratedArtifact
}

type HydratedRegistry

type HydratedRegistry struct {
	Registry    Registry
	Collections []HydratedCollection
}

func (HydratedRegistry) OrderedCollections

func (r HydratedRegistry) OrderedCollections() []HydratedCollection

func (HydratedRegistry) ResolveSkill

func (r HydratedRegistry) ResolveSkill(
	collectionName basespec.LogicalName,
	skillName basespec.LogicalName,
) (artifact.ArtifactRef, error)

type Registry

type Registry struct {
	SchemaVersion string       `json:"schemaVersion"`
	Root          Root         `json:"root"`
	Source        Source       `json:"source"`
	Collections   []Collection `json:"collections"`
}

Registry is application metadata. It is never a portable Skill package manifest and must never be serialized into an export payload.

func LoadRegistry

func LoadRegistry() (Registry, error)

func (Registry) Hydrate

func (r Registry) Hydrate(packages fs.FS) (HydratedRegistry, error)

Hydrate converts embedded portable Collection source descriptors into canonical, integrity-pinned Collection Definitions. The checked-in source descriptor may omit digest fields; this function computes them exclusively from the embedded package bytes before any local installation occurs.

func (Registry) OrderedCollections

func (r Registry) OrderedCollections() []Collection

func (Registry) Validate

func (r Registry) Validate() error

func (Registry) ValidatePackageLocations

func (r Registry) ValidatePackageLocations(packages fs.FS) error

type Root

type Root struct {
	ID          basespec.RootID `json:"id"`
	DisplayName string          `json:"displayName"`
	Description string          `json:"description,omitempty"`
}

type SkillReference

type SkillReference struct {
	Collection basespec.LogicalName `json:"collection"`
	Skill      basespec.LogicalName `json:"skill"`
}

SkillReference is a portable semantic built-in reference. It deliberately contains no Artifact Store IDs, package location, enablement, revision, or installation-specific metadata.

func (SkillReference) Validate

func (r SkillReference) Validate() error

type Source

type Source struct {
	ID          basespec.SourceID   `json:"id"`
	Kind        basespec.SourceKind `json:"kind"`
	DisplayName string              `json:"displayName"`
	Enabled     bool                `json:"enabled"`
}

Jump to

Keyboard shortcuts

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