skilladapter

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultWorkspaceSkillRoot basespec.Locator = ".flexigpt/skills"

Variables

This section is empty.

Functions

func DefaultSkillRoots added in v0.2.11

func DefaultSkillRoots() []basespec.Locator

Types

type Adapter

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

func NewAdapter

func NewAdapter(
	query *artifactadapter.QueryService,
	runtimePolicy artifactadapter.SourceUsePolicy,
	sourceRuntime source.Runtime,
) (*Adapter, error)

func (*Adapter) List

func (f *Adapter) List(
	ctx context.Context,
	workspace collection.CollectionRef,
) ([]WorkspaceSkill, error)

func (*Adapter) Load

func (f *Adapter) Load(
	ctx context.Context,
	workspace collection.CollectionRef,
	artifactRefs []artifact.ArtifactRef,
) (SkillLoadPlan, error)

func (*Adapter) LoadArtifact added in v0.2.13

func (f *Adapter) LoadArtifact(
	ctx context.Context,
	ref artifact.ArtifactRef,
) (WorkspaceSkill, error)

type ConventionRegistry added in v0.2.11

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

func NewConventionRegistry added in v0.2.11

func NewConventionRegistry(
	roots ...basespec.Locator,
) (*ConventionRegistry, error)

func (*ConventionRegistry) DiscoveryProfile added in v0.2.11

func (r *ConventionRegistry) DiscoveryProfile() spec.DiscoveryProfile

func (*ConventionRegistry) ExpectedName added in v0.2.11

func (r *ConventionRegistry) ExpectedName(
	locator basespec.Locator,
) (string, bool)

func (*ConventionRegistry) Match added in v0.2.11

Match accepts SKILL.md beneath any configured Skill root. The Skill can be nested at any depth, but SKILL.md must belong to a containing Skill directory and cannot sit directly at the configured root.

func (*ConventionRegistry) Roots added in v0.2.11

type SkillArgument

type SkillArgument struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Default     string `json:"default,omitempty"`
}

type SkillLoadPlan

type SkillLoadPlan struct {
	Workspace       collection.CollectionRef `json:"workspace"`
	CatalogRevision uint64                   `json:"catalogRevision"`
	Skills          []WorkspaceSkill         `json:"skills"`
	Diagnostics     []diagnostic.Diagnostic  `json:"diagnostics,omitempty"`
}

type SkillRootConvention added in v0.2.11

type SkillRootConvention struct {
	Root      basespec.Locator
	Recursive bool
}

type SkillSummary

type SkillSummary struct {
	SchemaVersion string              `json:"schemaVersion"`
	ID            basespec.ArtifactID `json:"id"`
	Slug          string              `json:"slug"`
	Name          string              `json:"name"`
	DisplayName   string              `json:"displayName"`
	Description   string              `json:"description"`
	Tags          []string            `json:"tags,omitempty"`
	Insert        string              `json:"insert"`
	Arguments     []SkillArgument     `json:"arguments,omitempty"`
	IsEnabled     bool                `json:"isEnabled"`
	CreatedAt     time.Time           `json:"createdAt"`
	ModifiedAt    time.Time           `json:"modifiedAt"`
}

type WorkspaceSkill

type WorkspaceSkill struct {
	Workspace        collection.CollectionRef `json:"workspace"`
	Artifact         artifact.ArtifactRef     `json:"artifact"`
	DefinitionDigest cryptoutil.Digest        `json:"definitionDigest"`
	SourceID         basespec.SourceID        `json:"sourceID"`
	Locator          basespec.Locator         `json:"locator"`
	Skill            SkillSummary             `json:"skill"`
	MarkdownBody     string                   `json:"markdownBody,omitempty"`
	ArtifactRevision uint64                   `json:"artifactRevision"`
	State            artifact.State           `json:"state"`
	CatalogCurrent   bool                     `json:"catalogCurrent"`
	WorkspaceEnabled bool                     `json:"-"`
	RuntimeDisabled  bool                     `json:"runtimeDisabled"`
	Diagnostics      []diagnostic.Diagnostic  `json:"diagnostics,omitempty"`

	ProjectionValid     bool              `json:"-"`
	RuntimePathBacked   bool              `json:"-"`
	SourceContentDigest cryptoutil.Digest `json:"-"`
	SourceGeneration    string            `json:"-"`
	RuntimeLocation     string            `json:"-"`
}

Jump to

Keyboard shortcuts

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