Documentation
¶
Index ¶
- type Adapter
- func (f *Adapter) List(ctx context.Context, workspace collection.CollectionRef) ([]WorkspaceSkill, error)
- func (f *Adapter) Load(ctx context.Context, workspace collection.CollectionRef, ...) (SkillLoadPlan, error)
- func (f *Adapter) LoadAll(ctx context.Context, workspace collection.CollectionRef) (SkillLoadPlan, error)
- func (f *Adapter) LoadArtifact(ctx context.Context, ref artifact.ArtifactRef) (WorkspaceSkill, error)
- type ArtifactResourceReader
- type SkillArgument
- type SkillLoadPlan
- type SkillSummary
- type StoreLoader
- type WorkspaceDataSource
- type WorkspaceSkill
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶
func NewAdapter( query WorkspaceDataSource, runtimePolicy artifactadapter.SourceUsePolicy, resourceAPI ArtifactResourceReader, ) (*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) LoadAll ¶ added in v0.2.21
func (f *Adapter) LoadAll( ctx context.Context, workspace collection.CollectionRef, ) (SkillLoadPlan, error)
LoadAll resolves every currently runtime-eligible Workspace Skill. It is used by the Skill catalog bridge, which must fail closed when one selected runtime registration cannot be materialized.
func (*Adapter) LoadArtifact ¶
func (f *Adapter) LoadArtifact( ctx context.Context, ref artifact.ArtifactRef, ) (WorkspaceSkill, error)
type ArtifactResourceReader ¶ added in v0.2.21
type SkillArgument ¶
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 SkillSummary ¶
type SkillSummary struct {
SchemaVersion string `json:"schemaVersion"`
ID artifact.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 StoreLoader ¶
type StoreLoader struct {
// contains filtered or unexported fields
}
StoreLoader adapts Workspace-owned Artifact projection to the generic Artifact Skill router. Runtime does not import Workspace and cannot infer Workspace ownership from a reference shape.
func NewStoreLoader ¶
func NewStoreLoader(adapter *Adapter) (*StoreLoader, error)
func (*StoreLoader) ListCollectionSkills ¶
func (r *StoreLoader) ListCollectionSkills( ctx context.Context, workspace collection.CollectionRef, ) ([]skillAggregate.ResolvedArtifactSkill, error)
func (*StoreLoader) ResolveArtifactSkill ¶
func (r *StoreLoader) ResolveArtifactSkill( ctx context.Context, ref artifact.ArtifactRef, ) (skillAggregate.ResolvedArtifactSkill, error)
type WorkspaceDataSource ¶ added in v0.2.21
type WorkspaceDataSource interface {
Catalog(
ctx context.Context,
workspace collection.CollectionRef,
) (workspaceDomain.CatalogView, error)
ResolveArtifact(
ctx context.Context,
ref artifact.ArtifactRef,
) (workspaceDomain.Workspace, workspaceDomain.Resource, error)
ComposeLoadPlanFromCatalog(
view workspaceDomain.CatalogView,
artifactRefs []artifact.ArtifactRef,
) (workspaceDomain.LoadPlan, error)
}
type WorkspaceSkill ¶
type WorkspaceSkill struct {
Workspace collection.CollectionRef `json:"workspace"`
Artifact artifact.ArtifactRef `json:"artifact"`
DefinitionDigest cryptoutil.Digest `json:"definitionDigest"`
SourceID source.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:"-"`
}
Click to show internal directories.
Click to hide internal directories.