skilladapter

package
v0.2.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactSupport

func ArtifactSupport() engine.ArtifactSupport

func DefaultSkillRoots added in v0.2.11

func DefaultSkillRoots() []artifactstore.Locator

func DiscoveryProfile

func DiscoveryProfile() engine.DiscoveryProfile

func DiscoveryProfileWithConventions added in v0.2.11

func DiscoveryProfileWithConventions(
	registry *ConventionRegistry,
) engine.DiscoveryProfile

func ValidateSkillDefinition added in v0.2.11

func ValidateSkillDefinition(
	value definition.Definition,
) error

Types

type Adapter

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

func NewAdapter

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

func (*Adapter) List

func (f *Adapter) List(
	ctx context.Context,
	rootID artifactstore.RootID,
) ([]WorkspaceSkill, error)

func (*Adapter) Load

func (f *Adapter) Load(
	ctx context.Context,
	rootID artifactstore.RootID,
	recordIDs []artifactstore.RecordID,
) (SkillLoadPlan, 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 ...artifactstore.Locator,
) (*ConventionRegistry, error)

func (*ConventionRegistry) DiscoveryProfile added in v0.2.11

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

func (*ConventionRegistry) ExpectedName added in v0.2.11

func (r *ConventionRegistry) ExpectedName(
	locator artifactstore.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 SkillDecoder

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

func NewSkillDecoder

func NewSkillDecoder() *SkillDecoder

func NewSkillDecoderWithConventions added in v0.2.11

func NewSkillDecoderWithConventions(
	registry *ConventionRegistry,
) (*SkillDecoder, error)

func (*SkillDecoder) Decode

func (*SkillDecoder) ID

func (*SkillDecoder) Recognize

func (d *SkillDecoder) Recognize(
	_ context.Context,
	candidate discovery.Candidate,
) discovery.Recognition

type SkillLoadPlan

type SkillLoadPlan struct {
	RootID          artifactstore.RootID       `json:"rootID"`
	CatalogRevision uint64                     `json:"catalogRevision"`
	Skills          []WorkspaceSkill           `json:"skills"`
	Diagnostics     []artifactstore.Diagnostic `json:"diagnostics,omitempty"`
}

type SkillRootConvention added in v0.2.11

type SkillRootConvention struct {
	Root      artifactstore.Locator
	Recursive bool
}

type SkillSummary

type SkillSummary struct {
	SchemaVersion string                 `json:"schemaVersion"`
	ID            artifactstore.RecordID `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 {
	RootID           artifactstore.RootID       `json:"rootID"`
	RecordID         artifactstore.RecordID     `json:"recordID"`
	DefinitionDigest artifactstore.Digest       `json:"definitionDigest"`
	SourceID         artifactstore.SourceID     `json:"sourceID"`
	Locator          artifactstore.Locator      `json:"locator"`
	Skill            SkillSummary               `json:"skill"`
	MarkdownBody     string                     `json:"markdownBody,omitempty"`
	Priority         int                        `json:"priority"`
	RecordRevision   uint64                     `json:"recordRevision"`
	State            record.State               `json:"state"`
	CatalogCurrent   bool                       `json:"catalogCurrent"`
	RuntimeAllowed   bool                       `json:"runtimeAllowed"`
	Diagnostics      []artifactstore.Diagnostic `json:"diagnostics,omitempty"`
	RuntimeLocation  string                     `json:"-"`
}

Jump to

Keyboard shortcuts

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