Documentation
¶
Index ¶
- type Installed
- type ListProvidedSkillsRequest
- type ListProvidedSkillsResponse
- type ListProvidedSkillsResponseBody
- type Origin
- type Provider
- type RenderProvidedSkillRequest
- type RenderProvidedSkillRequestBody
- type RenderProvidedSkillResponse
- type RenderRequest
- type RenderedSkill
- type Scope
- type Skill
- type SkillRuntime
- func (s *SkillRuntime) AgentSkillsRuntime() *agentskills.Runtime
- func (s *SkillRuntime) Close()
- func (s *SkillRuntime) CloseSkillSession(ctx context.Context, req *spec.CloseSkillSessionRequest) (*spec.CloseSkillSessionResponse, error)
- func (s *SkillRuntime) CreateSkillSession(ctx context.Context, req *spec.CreateSkillSessionRequest) (*spec.CreateSkillSessionResponse, error)
- func (s *SkillRuntime) GetSkillsPrompt(ctx context.Context, req *spec.GetSkillsPromptRequest) (*spec.GetSkillsPromptResponse, error)
- func (s *SkillRuntime) InvokeSkillTool(ctx context.Context, req *spec.InvokeSkillToolRequest) (*spec.InvokeSkillToolResponse, error)
- func (s *SkillRuntime) ListRuntimeSkills(ctx context.Context, req *spec.ListRuntimeSkillsRequest) (*spec.ListRuntimeSkillsResponse, error)
- func (s *SkillRuntime) ManagedWorkspaceRefs() []collection.CollectionRef
- func (s *SkillRuntime) RemoveWorkspace(ctx context.Context, workspace collection.CollectionRef) error
- func (s *SkillRuntime) RenderSkill(ctx context.Context, req *spec.RenderSkillRequest) (*spec.RenderSkillResponse, error)
- func (s *SkillRuntime) RequestInstalledResync()
- func (s *SkillRuntime) RequestWorkspaceRemoval(workspace collection.CollectionRef)
- func (s *SkillRuntime) RequestWorkspaceResync(workspace collection.CollectionRef)
- func (s *SkillRuntime) ResyncInstalled(ctx context.Context) error
- func (s *SkillRuntime) ResyncWorkspace(ctx context.Context, workspace collection.CollectionRef) error
- func (s *SkillRuntime) RunScriptsEnabled() bool
- func (s *SkillRuntime) Store() *skillstore.SkillStore
- type SkillRuntimeOption
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Installed ¶
type Installed struct {
// contains filtered or unexported fields
}
func NewInstalled ¶
func NewInstalled(value *skillstore.SkillStore, runtime *SkillRuntime) (*Installed, error)
func (*Installed) Render ¶
func (p *Installed) Render(ctx context.Context, request RenderRequest) (RenderedSkill, error)
type ListProvidedSkillsRequest ¶
type ListProvidedSkillsRequest struct {
Workspace *collection.CollectionRef `json:"workspace,omitempty"`
}
type ListProvidedSkillsResponse ¶
type ListProvidedSkillsResponse struct {
Body *ListProvidedSkillsResponseBody
}
type ListProvidedSkillsResponseBody ¶
type ListProvidedSkillsResponseBody struct {
Skills []Skill `json:"skills"`
}
type Provider ¶
type Provider interface {
Owns(ref skillruntimeSpec.SkillRef) bool
List(ctx context.Context, scope Scope) ([]Skill, error)
Render(ctx context.Context, request RenderRequest) (RenderedSkill, error)
}
type RenderProvidedSkillRequest ¶
type RenderProvidedSkillRequest struct {
Body *RenderProvidedSkillRequestBody
}
type RenderProvidedSkillRequestBody ¶
type RenderProvidedSkillRequestBody struct {
Workspace *collection.CollectionRef `json:"workspace,omitempty"`
Ref skillruntimeSpec.SkillRef `json:"ref" required:"true"`
Arguments map[string]string `json:"arguments,omitempty"`
}
type RenderProvidedSkillResponse ¶
type RenderProvidedSkillResponse struct {
Body *RenderedSkill
}
type RenderRequest ¶
type RenderRequest struct {
Scope Scope `json:"scope"`
Ref skillruntimeSpec.SkillRef `json:"ref"`
Arguments map[string]string `json:"arguments,omitempty"`
}
type RenderedSkill ¶
type RenderedSkill struct {
Skill Skill `json:"skill"`
Available bool `json:"available"`
Text string `json:"text,omitempty"`
Insert agentskillsSpec.SkillInsert `json:"insert,omitempty"`
Arguments []agentskillsSpec.SkillArgument `json:"arguments,omitempty"`
AppliedArguments map[string]string `json:"appliedArguments,omitempty"`
Diagnostics []diagnostic.Diagnostic `json:"diagnostics,omitempty"`
}
type Scope ¶
type Scope struct {
Workspace *collection.CollectionRef `json:"workspace,omitempty"`
}
type Skill ¶
type Skill struct {
Ref skillruntimeSpec.SkillRef `json:"ref"`
Origin Origin `json:"origin"`
InstalledRef *skillstoreSpec.SkillRef `json:"installedRef,omitempty"`
Workspace *collection.CollectionRef `json:"workspace,omitempty"`
ArtifactRevision uint64 `json:"artifactRevision,omitempty"`
Name string `json:"name"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
Insert agentskillsSpec.SkillInsert `json:"insert"`
Arguments []agentskillsSpec.SkillArgument `json:"arguments,omitempty"`
Tags []string `json:"tags,omitempty"`
Enabled bool `json:"enabled"`
Available bool `json:"available"`
RuntimeAllowed bool `json:"runtimeAllowed"`
BuiltIn bool `json:"builtIn"`
CatalogCurrent bool `json:"catalogCurrent"`
State string `json:"state,omitempty"`
DefinitionDigest string `json:"definitionDigest,omitempty"`
SourceID basespec.SourceID `json:"sourceID,omitempty"`
Locator basespec.Locator `json:"locator,omitempty"`
Diagnostics []diagnostic.Diagnostic `json:"diagnostics,omitempty"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
}
type SkillRuntime ¶
type SkillRuntime struct {
// contains filtered or unexported fields
}
SkillRuntime owns the in-memory Agent Skills catalog, provider lifecycle, sessions, prompt generation, rendering, and tool invocation.
func NewSkillRuntime ¶
func NewSkillRuntime( store *skillstore.SkillStore, opts ...SkillRuntimeOption, ) (*SkillRuntime, error)
func (*SkillRuntime) AgentSkillsRuntime ¶
func (s *SkillRuntime) AgentSkillsRuntime() *agentskills.Runtime
func (*SkillRuntime) Close ¶ added in v0.2.13
func (s *SkillRuntime) Close()
Close stops derived-state reconciliation before the owning Skill Store is closed. Runtime registration is process-local, so no durable mutation occurs during shutdown.
func (*SkillRuntime) CloseSkillSession ¶
func (s *SkillRuntime) CloseSkillSession( ctx context.Context, req *spec.CloseSkillSessionRequest, ) (*spec.CloseSkillSessionResponse, error)
func (*SkillRuntime) CreateSkillSession ¶
func (s *SkillRuntime) CreateSkillSession( ctx context.Context, req *spec.CreateSkillSessionRequest, ) (*spec.CreateSkillSessionResponse, error)
func (*SkillRuntime) GetSkillsPrompt ¶
func (s *SkillRuntime) GetSkillsPrompt( ctx context.Context, req *spec.GetSkillsPromptRequest, ) (*spec.GetSkillsPromptResponse, error)
func (*SkillRuntime) InvokeSkillTool ¶
func (s *SkillRuntime) InvokeSkillTool( ctx context.Context, req *spec.InvokeSkillToolRequest, ) (*spec.InvokeSkillToolResponse, error)
func (*SkillRuntime) ListRuntimeSkills ¶
func (s *SkillRuntime) ListRuntimeSkills( ctx context.Context, req *spec.ListRuntimeSkillsRequest, ) (*spec.ListRuntimeSkillsResponse, error)
func (*SkillRuntime) ManagedWorkspaceRefs ¶ added in v0.2.13
func (s *SkillRuntime) ManagedWorkspaceRefs() []collection.CollectionRef
ManagedWorkspaceRefs returns the process-local Workspace partitions that currently have derived Agent Skills runtime state. Application composition uses this to remove a partition after a Workspace was retired or purged through a generic Artifact Store lifecycle operation.
func (*SkillRuntime) RemoveWorkspace ¶
func (s *SkillRuntime) RemoveWorkspace( ctx context.Context, workspace collection.CollectionRef, ) error
func (*SkillRuntime) RenderSkill ¶
func (s *SkillRuntime) RenderSkill( ctx context.Context, req *spec.RenderSkillRequest, ) (*spec.RenderSkillResponse, error)
func (*SkillRuntime) RequestInstalledResync ¶ added in v0.2.13
func (s *SkillRuntime) RequestInstalledResync()
RequestInstalledResync schedules one coalesced reconciliation of the legacy standalone Skill Store partition. It intentionally does not make a durable Skill Store mutation fail after persistence has committed.
func (*SkillRuntime) RequestWorkspaceRemoval ¶ added in v0.2.13
func (s *SkillRuntime) RequestWorkspaceRemoval( workspace collection.CollectionRef, )
RequestWorkspaceRemoval schedules removal of one retired Workspace's derived Agent Skills runtime partition.
func (*SkillRuntime) RequestWorkspaceResync ¶ added in v0.2.13
func (s *SkillRuntime) RequestWorkspaceResync( workspace collection.CollectionRef, )
RequestWorkspaceResync schedules one coalesced rebuild of a Workspace's derived Agent Skills runtime partition. Durable Workspace mutations must not wait for this rebuild or report its transient failures as metadata failures.
func (*SkillRuntime) ResyncInstalled ¶
func (s *SkillRuntime) ResyncInstalled(ctx context.Context) error
ResyncInstalled updates only the installed desired partition. Runtime ownership is tracked independently from provider type because installed and Workspace filesystem skills both intentionally use provider type "fs".
func (*SkillRuntime) ResyncWorkspace ¶
func (s *SkillRuntime) ResyncWorkspace( ctx context.Context, workspace collection.CollectionRef, ) error
func (*SkillRuntime) RunScriptsEnabled ¶
func (s *SkillRuntime) RunScriptsEnabled() bool
RunScriptsEnabled reports the effective shared filesystem-provider policy. Inference composition uses this value only to decide whether skills-runscript is advertised to the model.
func (*SkillRuntime) Store ¶
func (s *SkillRuntime) Store() *skillstore.SkillStore
type SkillRuntimeOption ¶
type SkillRuntimeOption func(*skillRuntimeOptions) error
func WithRunScripts ¶
func WithRunScripts(enabled bool) SkillRuntimeOption
WithRunScripts configures the shared filesystem-provider execution policy. Workspace filesystem skills and installed filesystem skills always use this same provider and therefore this same policy.
func WithRuntime ¶
func WithRuntime(value *agentskills.Runtime) SkillRuntimeOption
func WithWorkspaceSkillAdapter ¶
func WithWorkspaceSkillAdapter( value *skilladapter.Adapter, ) SkillRuntimeOption
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
func NewWorkspace ¶
func NewWorkspace( runtime *SkillRuntime, ) (*Workspace, error)
func (*Workspace) Render ¶
func (p *Workspace) Render( ctx context.Context, request RenderRequest, ) (RenderedSkill, error)