aggregate

package
v0.2.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrArtifactSkillSelectionRequired = errors.New(
	"artifact skill selection is required",
)

Functions

func CollectionCatalogID

func CollectionCatalogID(
	ref collection.CollectionRef,
) (skillRuntime.CatalogID, error)

Types

type ArtifactReader added in v0.2.21

type ArtifactReader interface {
	Get(
		ctx context.Context,
		ref artifact.ArtifactRef,
	) (artifact.Artifact, error)
}

type ArtifactRouter added in v0.2.21

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

func NewArtifactRouter added in v0.2.21

func NewArtifactRouter(
	artifacts ArtifactReader,
	collections CollectionReader,
) (*ArtifactRouter, error)

func (*ArtifactRouter) CollectionForArtifact added in v0.2.21

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.21

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

func (*ArtifactRouter) Register added in v0.2.21

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

func (*ArtifactRouter) ResolveArtifactSkill added in v0.2.21

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

type ArtifactSkillFilter

type ArtifactSkillFilter struct {
	Types          []string               `json:"types,omitempty"`
	Inserts        []document.SkillInsert `json:"inserts,omitempty"`
	NamePrefix     string                 `json:"namePrefix,omitempty"`
	LocationPrefix string                 `json:"locationPrefix,omitempty"`
	AllowArtifacts []artifact.ArtifactRef `json:"allowArtifacts,omitempty"`

	SessionID agentskillsRuntimeSpec.SessionID     `json:"sessionID,omitempty"`
	Activity  agentskillsRuntimeSpec.SkillActivity `json:"activity,omitempty"`
}

ArtifactSkillFilter is an internal Artifact Store to Agent Skills bridge filter. It is not a Wails transport API.

type ArtifactSkillLoader added in v0.2.21

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 ArtifactSkillSummary

type ArtifactSkillSummary struct {
	Artifact     artifact.ArtifactRef
	IsEnabled    bool
	Insert       document.SkillInsert
	HasArguments bool
	HasResources bool
}

ArtifactSkillSummary is the runtime-derived summary used by durable Artifact selection validation. It contains no native path or process-local SkillDef identity.

type BundleLoader added in v0.2.21

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

func NewBundleLoader added in v0.2.21

func NewBundleLoader(
	source RuntimeSkillSource,
) (*BundleLoader, error)

func (*BundleLoader) ListCollectionSkills added in v0.2.21

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

func (*BundleLoader) ResolveArtifactSkill added in v0.2.21

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

type BundleResolver added in v0.2.21

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

BundleResolver resolves Skill Bundle Artifacts into runtime registrations. Bundle validation remains owned by consumerapi through BundleReader.

func NewBundleResolver added in v0.2.21

func NewBundleResolver(
	bundles skillConsumerAPI.BundleReader,
	artifacts compositionapi.ArtifactAPI,
	catalogs compositionapi.CatalogAPI,
	resources compositionapi.ResourceAPI,
) (*BundleResolver, error)

func (*BundleResolver) ListResolvedSkills added in v0.2.21

func (r *BundleResolver) ListResolvedSkills(
	ctx context.Context,
	bundle collection.CollectionRef,
) ([]ResolvedSkill, error)

ListResolvedSkills is deliberately fail-closed. A collection reconciliation must not retain a previous runtime definition when a current Artifact can no longer be projected.

func (*BundleResolver) ResolveSkill added in v0.2.21

func (r *BundleResolver) ResolveSkill(
	ctx context.Context,
	ref artifact.ArtifactRef,
) (ResolvedSkill, error)

ResolveSkill resolves one Artifact-backed Skill Bundle member.

It verifies Artifact membership, Collection kind, Collection and Artifact enablement, catalog currentness, definition compatibility, and the source snapshot generation. Source adapters and MapStore remain responsible for their own containment and filesystem behavior.

type CatalogSource

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

CatalogSource adapts Artifact Store Collections to the runtime-owned CatalogSource contract. Runtime treats CatalogID as an opaque string.

func NewCatalogSource

func NewCatalogSource(
	router *ArtifactRouter,
) (*CatalogSource, error)

func (*CatalogSource) Skills

type CollectionReader added in v0.2.21

type CollectionReader interface {
	Get(
		ctx context.Context,
		ref collection.CollectionRef,
	) (collection.Collection, error)
}

type ResolvedArtifactSkill added in v0.2.21

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.21

func (s ResolvedArtifactSkill) Validate() error

type ResolvedSkill added in v0.2.21

type ResolvedSkill struct {
	Artifact   artifact.ArtifactRef
	Collection collection.CollectionRef

	Name     string
	Location string
	Version  string
}

ResolvedSkill is the typed Skill Bundle handoff to application composition. It is not persisted and is never exposed as a durable runtime identity.

type RuntimeSkillSource added in v0.2.21

type RuntimeSkillSource interface {
	ResolveSkill(
		ctx context.Context,
		ref artifact.ArtifactRef,
	) (ResolvedSkill, error)

	ListResolvedSkills(
		ctx context.Context,
		ref collection.CollectionRef,
	) ([]ResolvedSkill, error)
}

type Service

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

Service is an internal Artifact Store to Agent Skills bridge.

Wails runtime APIs belong to SkillRuntimeWrapper. This service exists only where backend callers hold ArtifactRef identities and need them translated into runtime-owned SkillDef identities.

func New

func New(
	resolver *ArtifactRouter,
	runtimeService *skillRuntime.Service,
) (*Service, error)

func (*Service) Close

func (s *Service) Close()

func (*Service) DescribeArtifactSkill

func (s *Service) DescribeArtifactSkill(
	ctx context.Context,
	ref artifact.ArtifactRef,
) (ArtifactSkillSummary, error)

func (*Service) GetArtifactSkillsPrompt

func (s *Service) GetArtifactSkillsPrompt(
	ctx context.Context,
	filter ArtifactSkillFilter,
) (string, error)

GetArtifactSkillsPrompt resolves Artifact Store allow-list entries before delegating prompt generation to the Agent Skills runtime.

An empty AllowArtifacts list intentionally preserves native runtime semantics: all currently registered Skills are eligible.

func (*Service) ListArtifactSkillRefs

func (s *Service) ListArtifactSkillRefs(
	ctx context.Context,
	filter ArtifactSkillFilter,
) ([]artifact.ArtifactRef, error)

ListArtifactSkillRefs returns Artifact identities corresponding to the selected runtime view. An explicit Artifact allow-list is required because the Agent Skills runtime deliberately does not know Artifact identities.

func (*Service) ResolveArtifactSkill added in v0.2.21

func (s *Service) ResolveArtifactSkill(
	ctx context.Context,
	ref artifact.ArtifactRef,
) (ResolvedArtifactSkill, error)

ResolveArtifactSkill resolves one durable Artifact identity into its runtime-native SkillDef and ensures that the owning runtime catalog has been synchronized before returning it.

func (*Service) RunScriptsEnabled

func (s *Service) RunScriptsEnabled() bool

Jump to

Keyboard shortcuts

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