artifactbuiltin

package
v0.2.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RegistrySchemaVersion = "v1"
)

Variables

This section is empty.

Functions

This section is empty.

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

type Installer

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

func NewInstaller

func NewInstaller(
	dependencies InstallerDependencies,
) (*Installer, error)

func (*Installer) BuiltInIDs

func (i *Installer) BuiltInIDs() []string

func (*Installer) BuiltInName

func (*Installer) BuiltInName() string

func (*Installer) BuiltInPackageScopes

func (i *Installer) BuiltInPackageScopes() []basespec.Locator

func (*Installer) CommitBuiltInHydration

func (i *Installer) CommitBuiltInHydration(
	ctx context.Context,
) error

CommitBuiltInHydration records completion only after BootstrapRegistry has successfully installed every registered built-in family.

func (*Installer) Ensure

func (i *Installer) Ensure(
	ctx context.Context,
) error

func (*Installer) EnsureBuiltInArtifacts

func (i *Installer) EnsureBuiltInArtifacts(
	ctx context.Context,
) error

func (*Installer) EnsureBuiltInBundles

func (i *Installer) EnsureBuiltInBundles(
	ctx context.Context,
) ([]skillBundle.Bundle, error)

func (*Installer) PrepareBuiltInHydration

func (i *Installer) PrepareBuiltInHydration(
	ctx context.Context,
) error

PrepareBuiltInHydration runs before generic topology creation. A changed binary-owned registry or package removes the previous hydration first, so the normal strict create APIs only ever see an empty topology or an exact replay of the current binary's desired state.

type InstallerDependencies

type InstallerDependencies struct {
	Skills          skillInstaller
	BuiltInTopology builtin.Registry
	SkillRegistry   Registry
	Packages        fs.FS
	Hydrator        TopologyHydrator
}

type Registry

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

Registry is the non-portable registration manifest for embedded Agent Skills. It is not a portable Skill Bundle definition and is never exported.

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

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 TopologyHydrator

type TopologyHydrator interface {
	topology.HydrationStore

	ResetTopologyHydration(
		ctx context.Context,
		installerName string,
		rootID basespec.RootID,
	) error
}

TopologyHydrator is intentionally narrower than system.Components. It gives the built-in installer durable desired-state storage and a trusted, root-scoped replacement operation without coupling artifactbuiltin to the concrete Artifact Store composition.

Jump to

Keyboard shortcuts

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