Help us shape the future of Go! Take the 2026 Go Developer Survey

skill

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ToolManage = "skill_manage"

Variables

This section is empty.

Functions

func InputSchema added in v0.8.2

func InputSchema(name string) (map[string]any, bool)

func ManageInputSchema added in v0.9.0

func ManageInputSchema() map[string]any

func ManageOutputSchema added in v0.9.0

func ManageOutputSchema() map[string]any

func ManagedSkillRef added in v0.9.0

func ManagedSkillRef(name string) string

func OutputSchema added in v0.8.2

func OutputSchema(name string) (map[string]any, bool)

func PluginSkillRef added in v0.9.0

func PluginSkillRef(pluginName, name string) string

func SharedSkillRef added in v0.9.0

func SharedSkillRef(name string) string

Types

type CapabilityItem

type CapabilityItem struct {
	Name          string
	Description   string
	File          string
	SkillRef      string
	SourceType    string
	SourceID      string
	PluginName    string
	ContentDigest string
}

type ManageRequest added in v0.9.0

type ManageRequest struct {
	Action   string  `json:"action"`
	Skill    string  `json:"skill,omitempty"`
	SkillRef string  `json:"skill_ref,omitempty"`
	Key      string  `json:"key,omitempty"`
	Value    *string `json:"value,omitempty"`
	Source   string  `json:"source,omitempty"`
	Digest   string  `json:"digest,omitempty"`
	Purge    bool    `json:"purge,omitempty"`
}

ManageRequest is the stable skill_manage input contract.

type ResolvedSkill added in v0.9.0

type ResolvedSkill struct {
	Name          string
	SkillRef      string
	SourceType    string
	SourceID      string
	PluginName    string
	Root          string
	ContentDigest string
}

type Result

type Result = toolcore.Result

type Service

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

func New

func New(cfg config.Config, ws *workspace.Workspace, envs *envstore.Store, pluginManagers ...*plugins.Manager) (*Service, error)

func (*Service) Acquire added in v0.9.0

func (s *Service) Acquire(ctx context.Context, skillRef string) (ResolvedSkill, func(), error)

func (*Service) CapabilityItems

func (s *Service) CapabilityItems() ([]CapabilityItem, error)

func (*Service) InstallLocalArchive added in v1.1.0

func (s *Service) InstallLocalArchive(ctx context.Context, archive, digest string) (skills.InstallResult, error)

InstallLocalArchive 把已经通过预检的 ZIP 交给现有 Skill 安装器。 摘要校验、包结构校验和同内容 no-op 都留在 Manager.Install。

func (*Service) Manage added in v0.9.0

func (s *Service) Manage(ctx context.Context, request ManageRequest) (Result, error)

func (*Service) ManagedPackageRoot added in v1.1.0

func (s *Service) ManagedPackageRoot(name string) (string, error)

ManagedPackageRoot 返回已安装受管 Skill 的包目录。 只按受管名称查找,不接受调用方传入的文件系统路径。

func (*Service) ResolveResource

func (s *Service) ResolveResource(ctx context.Context, raw string) (string, string, func(), error)

func (*Service) RuntimeCount added in v1.0.0

func (s *Service) RuntimeCount() (int, error)

RuntimeCount 只读取已安装索引,不校验 Skill 包、计算 digest 或遍历文件。 概览只需要“已安装多少个”,完整可用性与文件信息仍由 RuntimeSkills 负责。

func (*Service) RuntimeSkill

func (s *Service) RuntimeSkill(skill string) (Result, error)

func (*Service) RuntimeSkillFile

func (s *Service) RuntimeSkillFile(skill, relativePath string) (Result, error)

RuntimeSkillFile only reads regular UTF-8 text files inside current managed Skill content.

func (*Service) RuntimeSkillFiles

func (s *Service) RuntimeSkillFiles(skill string) (Result, error)

RuntimeSkillFiles returns the current managed Skill package file list.

func (*Service) RuntimeSkills

func (s *Service) RuntimeSkills() (Result, error)

func (*Service) ValidateLocalArchive added in v1.1.0

func (s *Service) ValidateLocalArchive(ctx context.Context, archive, digest string) (skills.ValidateResult, error)

ValidateLocalArchive 用现有 Skill 安装器预检设备暂存的 ZIP,不写入受管目录。

func (*Service) WorkspaceSkillRef added in v0.9.0

func (s *Service) WorkspaceSkillRef(workspaceRoot, name string) (skillRef, sourceID string, err error)

type ToolError

type ToolError = toolcore.ToolError

Jump to

Keyboard shortcuts

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