runtime

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRequest = errors.New("invalid Skill runtime request")
	ErrClosed         = errors.New("skill runtime is closed")
)

Functions

This section is empty.

Types

type CatalogID added in v0.2.20

type CatalogID string

CatalogID identifies one independently replaceable runtime catalog. It has no Artifact Store semantics.

type CatalogSource added in v0.2.20

type CatalogSource interface {
	Skills(
		ctx context.Context,
		catalogID CatalogID,
	) ([]SkillRegistration, error)
}

CatalogSource is owned by the runtime package and implemented by a data layer. CatalogID is opaque to runtime. Runtime only receives the Skill registrations needed to reconcile Agent Skills state.

type CloseSkillSessionRequest

type CloseSkillSessionRequest struct {
	SessionID agentskillsRuntimeSpec.SessionID `path:"sessionID" required:"true"`
}

type CloseSkillSessionResponse

type CloseSkillSessionResponse struct{}

type CreateSkillSessionRequest

type CreateSkillSessionRequest struct {
	Body *CreateSkillSessionRequestBody
}

type CreateSkillSessionRequestBody

type CreateSkillSessionRequestBody struct {
	CloseSessionID agentskillsRuntimeSpec.SessionID `json:"closeSessionID,omitempty"`

	MaxActivePerSession int `json:"maxActivePerSession,omitempty"`

	// Nil means unrestricted and causes no allowed-skills option to be
	// installed. A non-nil empty slice means no skill is allowed.
	AllowedSkills []provider.SkillDef `json:"allowedSkills,omitempty"`
	ActiveSkills  []provider.SkillDef `json:"activeSkills,omitempty"`
}

type CreateSkillSessionResponse

type CreateSkillSessionResponse struct {
	Body *CreateSkillSessionResponseBody
}

type CreateSkillSessionResponseBody

type CreateSkillSessionResponseBody struct {
	SessionID    agentskillsRuntimeSpec.SessionID `json:"sessionID"`
	ActiveSkills []provider.SkillDef              `json:"activeSkills"`
}

type GetSkillsPromptRequest

type GetSkillsPromptRequest struct {
	Body *GetSkillsPromptRequestBody
}

type GetSkillsPromptRequestBody

type GetSkillsPromptRequestBody struct {
	Filter *SkillPromptFilter `json:"filter,omitempty"`
}

type GetSkillsPromptResponse

type GetSkillsPromptResponse struct {
	Body *GetSkillsPromptResponseBody
}

type GetSkillsPromptResponseBody

type GetSkillsPromptResponseBody struct {
	Prompt string `json:"prompt"`
}

type InvokeSkillToolRequest

type InvokeSkillToolRequest struct {
	Body *InvokeSkillToolRequestBody
}

type InvokeSkillToolRequestBody

type InvokeSkillToolRequestBody struct {
	SessionID agentskillsRuntimeSpec.SessionID `json:"sessionID"      required:"true"`
	ToolName  string                           `json:"toolName"       required:"true"`
	Args      string                           `json:"args,omitempty"`
}

type InvokeSkillToolResponse

type InvokeSkillToolResponse struct {
	Body *InvokeSkillToolResponseBody
}

type InvokeSkillToolResponseBody

type InvokeSkillToolResponseBody struct {
	Outputs      []llmtoolsSpec.ToolOutputUnion `json:"outputs,omitempty"`
	Meta         map[string]any                 `json:"meta,omitempty"`
	IsBuiltIn    bool                           `json:"isBuiltIn"`
	IsError      bool                           `json:"isError,omitempty"`
	ErrorMessage string                         `json:"errorMessage,omitempty"`
}

type ListSkillsRequest added in v0.2.20

type ListSkillsRequest struct {
	Body *ListSkillsRequestBody
}

type ListSkillsRequestBody added in v0.2.20

type ListSkillsRequestBody struct {
	Filter *SkillListFilter `json:"filter,omitempty"`
}

type ListSkillsResponse added in v0.2.20

type ListSkillsResponse struct {
	Body *ListSkillsResponseBody
}

type ListSkillsResponseBody added in v0.2.20

type ListSkillsResponseBody struct {
	Skills []agentskillsRuntimeSpec.SkillRecord `json:"skills"`
}

type Option added in v0.2.20

type Option func(*options) error

func WithAgentRuntime added in v0.2.20

func WithAgentRuntime(value *agentskillsRuntime.Runtime) Option

func WithCatalogSource added in v0.2.20

func WithCatalogSource(value CatalogSource) Option

func WithRunScripts

func WithRunScripts(enabled bool) Option

type RemoveCatalogRequest added in v0.2.20

type RemoveCatalogRequest struct {
	CatalogID CatalogID `json:"catalogID"`
}

type RemoveCatalogResponse added in v0.2.20

type RemoveCatalogResponse struct{}

type RenderSkillRequest

type RenderSkillRequest struct {
	Body *RenderSkillRequestBody
}

type RenderSkillRequestBody

type RenderSkillRequestBody struct {
	Definition provider.SkillDef `json:"definition"          required:"true"`
	Arguments  map[string]string `json:"arguments,omitempty"`
}

type RenderSkillResponse

type RenderSkillResponse struct {
	Body *agentskillsRuntime.RenderSkillOut
}

type Service added in v0.2.20

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

Service is an application-facing wrapper over agentskills-go/runtime. It deliberately contains no Artifact Store identity or persistence type.

func New added in v0.2.20

func New(opts ...Option) (*Service, error)

func (*Service) Close added in v0.2.20

func (s *Service) Close(ctx context.Context) error

func (*Service) CloseSession added in v0.2.20

func (s *Service) CloseSession(
	ctx context.Context,
	sessionID agentskillsRuntimeSpec.SessionID,
) error

func (*Service) CloseSkillSession added in v0.2.20

func (s *Service) CloseSkillSession(
	ctx context.Context,
	req *CloseSkillSessionRequest,
) (*CloseSkillSessionResponse, error)

func (*Service) CreateSkillSession added in v0.2.20

func (s *Service) CreateSkillSession(
	ctx context.Context,
	req *CreateSkillSessionRequest,
) (*CreateSkillSessionResponse, error)

func (*Service) GetSkillsPrompt added in v0.2.20

func (s *Service) GetSkillsPrompt(
	ctx context.Context,
	req *GetSkillsPromptRequest,
) (*GetSkillsPromptResponse, error)

func (*Service) InvokeSkillTool added in v0.2.20

func (s *Service) InvokeSkillTool(
	ctx context.Context,
	req *InvokeSkillToolRequest,
) (*InvokeSkillToolResponse, error)

func (*Service) IsRegistered added in v0.2.20

func (s *Service) IsRegistered(value SkillRegistration) bool

func (*Service) ListAgentSkills added in v0.2.20

func (*Service) ListSkills added in v0.2.20

func (s *Service) ListSkills(
	ctx context.Context,
	req *ListSkillsRequest,
) (*ListSkillsResponse, error)

func (*Service) NewSession added in v0.2.20

func (*Service) NewSessionRegistry added in v0.2.20

func (s *Service) NewSessionRegistry(
	ctx context.Context,
	sessionID agentskillsRuntimeSpec.SessionID,
	opts ...llmtools.RegistryOption,
) (*llmtools.Registry, error)

func (*Service) RemoveCatalog added in v0.2.20

func (s *Service) RemoveCatalog(
	ctx context.Context,
	id CatalogID,
) error

func (*Service) RenderAgentSkill added in v0.2.20

func (*Service) RenderSkill added in v0.2.20

func (s *Service) RenderSkill(
	ctx context.Context,
	req *RenderSkillRequest,
) (*RenderSkillResponse, error)

func (*Service) SkillsPrompt added in v0.2.20

func (s *Service) SkillsPrompt(
	ctx context.Context,
	filter *agentskillsRuntime.SkillFilter,
) (string, error)

func (*Service) SupportsRunScript added in v0.2.20

func (s *Service) SupportsRunScript() bool

func (*Service) SyncCatalog added in v0.2.20

func (s *Service) SyncCatalog(
	ctx context.Context,
	id CatalogID,
) error

SyncCatalog pulls the current registrations from the configured runtime-owned CatalogSource. No catalog data is accepted from Wails callers.

type SkillListFilter added in v0.2.20

type SkillListFilter struct {
	Types          []string               `json:"types,omitempty"`
	NamePrefix     string                 `json:"namePrefix,omitempty"`
	LocationPrefix string                 `json:"locationPrefix,omitempty"`
	AllowSkills    []provider.SkillDef    `json:"allowSkills,omitempty"`
	Inserts        []document.SkillInsert `json:"inserts,omitempty"`

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

type SkillPromptFilter added in v0.2.20

type SkillPromptFilter struct {
	Types          []string            `json:"types,omitempty"`
	NamePrefix     string              `json:"namePrefix,omitempty"`
	LocationPrefix string              `json:"locationPrefix,omitempty"`
	AllowSkills    []provider.SkillDef `json:"allowSkills,omitempty"`

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

type SkillRegistration added in v0.2.20

type SkillRegistration struct {
	Definition provider.SkillDef `json:"definition"`
	Revision   string            `json:"revision,omitempty"`
}

SkillRegistration is the runtime-owned registration input for one Skill.

type SyncCatalogRequest added in v0.2.20

type SyncCatalogRequest struct {
	CatalogID CatalogID `json:"catalogID"`
}

type SyncCatalogResponse added in v0.2.20

type SyncCatalogResponse struct{}

Jump to

Keyboard shortcuts

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