Documentation
¶
Index ¶
- Constants
- func LoadInstalledMCPServers(workspaceDir string) ([]config.MCPServer, []string)
- type InstallResult
- type InstalledDB
- type InstalledMCP
- type InstalledPlugin
- type InstalledSkill
- type Installer
- func (inst *Installer) Install(ctx context.Context, name string) (*InstallResult, error)
- func (inst *Installer) InstallMCP(ctx context.Context, name string) error
- func (inst *Installer) InstallPlugin(ctx context.Context, name string) error
- func (inst *Installer) List() ([]InstalledSkill, error)
- func (inst *Installer) ListMCPs() ([]InstalledMCP, error)
- func (inst *Installer) ListPlugins() ([]InstalledPlugin, error)
- func (inst *Installer) Uninstall(name string) error
- func (inst *Installer) UninstallMCP(name string) error
- func (inst *Installer) UninstallPlugin(name string) error
- func (inst *Installer) Update(ctx context.Context) ([]string, error)
- func (inst *Installer) UpdateMCPs(ctx context.Context) ([]string, error)
- func (inst *Installer) UpdatePlugins(ctx context.Context) ([]string, error)
- type MCPEntry
- type MCPManifest
- type PluginEntry
- type Registry
- func (r *Registry) FetchFile(ctx context.Context, entry *RegistryEntry, relPath string) ([]byte, error)
- func (r *Registry) FetchIndex(ctx context.Context) (*RegistryIndex, error)
- func (r *Registry) FetchMCPFile(ctx context.Context, entry *MCPEntry, relPath string) ([]byte, error)
- func (r *Registry) FetchPluginFile(ctx context.Context, entry *PluginEntry, relPath string) ([]byte, error)
- func (r *Registry) FetchSkillContent(ctx context.Context, entry *RegistryEntry) ([]byte, error)
- func (r *Registry) FindByName(ctx context.Context, name string) (*RegistryEntry, error)
- func (r *Registry) FindMCPByName(ctx context.Context, name string) (*MCPEntry, error)
- func (r *Registry) FindPluginByName(ctx context.Context, name string) (*PluginEntry, error)
- func (r *Registry) Search(ctx context.Context, query string) ([]RegistryEntry, error)
- func (r *Registry) SearchMCPServers(ctx context.Context, query string) ([]MCPEntry, error)
- func (r *Registry) SearchPlugins(ctx context.Context, query string) ([]PluginEntry, error)
- type RegistryEntry
- type RegistryFile
- type RegistryFiles
- type RegistryIndex
Constants ¶
const ( DefaultRegistryURL = "https://raw.githubusercontent.com/devlikebear/tars-skills/main/registry.json" DefaultSkillBaseURL = "https://raw.githubusercontent.com/devlikebear/tars-skills/main" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InstallResult ¶ added in v0.7.1
type InstallResult struct {
RequiresPlugin string // non-empty if the skill depends on a plugin
}
InstallResult contains the result of a skill installation.
type InstalledDB ¶
type InstalledDB struct {
Skills []InstalledSkill `json:"skills"`
Plugins []InstalledPlugin `json:"plugins,omitempty"`
MCPs []InstalledMCP `json:"mcps,omitempty"`
}
InstalledDB tracks installed hub skills and plugins.
type InstalledMCP ¶ added in v0.9.0
type InstalledMCP struct {
Name string `json:"name"`
Version string `json:"version"`
Source string `json:"source"`
Dir string `json:"dir"`
Manifest string `json:"manifest"`
}
InstalledMCP tracks a managed MCP package that has been installed locally.
type InstalledPlugin ¶ added in v0.7.1
type InstalledPlugin struct {
Name string `json:"name"`
Version string `json:"version"`
Source string `json:"source"`
Dir string `json:"dir"`
}
InstalledPlugin tracks a plugin that has been installed locally.
type InstalledSkill ¶
type InstalledSkill struct {
Name string `json:"name"`
Version string `json:"version"`
Source string `json:"source"` // "tars-hub" or "openclaw"
Dir string `json:"dir"`
}
InstalledSkill tracks a skill that has been installed locally.
type Installer ¶
Installer handles installing and managing hub skills.
func NewInstaller ¶
NewInstaller creates an installer for the given workspace.
func (*Installer) InstallMCP ¶ added in v0.9.0
InstallMCP downloads and installs an MCP package from the registry.
func (*Installer) InstallPlugin ¶ added in v0.7.1
InstallPlugin downloads and installs a plugin from the registry.
func (*Installer) List ¶
func (inst *Installer) List() ([]InstalledSkill, error)
List returns all installed hub skills.
func (*Installer) ListMCPs ¶ added in v0.9.0
func (inst *Installer) ListMCPs() ([]InstalledMCP, error)
ListMCPs returns all installed hub MCP packages.
func (*Installer) ListPlugins ¶ added in v0.7.1
func (inst *Installer) ListPlugins() ([]InstalledPlugin, error)
ListPlugins returns all installed hub plugins.
func (*Installer) UninstallMCP ¶ added in v0.9.0
UninstallMCP removes an installed MCP package.
func (*Installer) UninstallPlugin ¶ added in v0.7.1
UninstallPlugin removes an installed plugin.
func (*Installer) UpdateMCPs ¶ added in v0.9.0
UpdateMCPs re-installs all installed MCP packages with the latest version.
type MCPEntry ¶ added in v0.9.0
type MCPEntry struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Author string `json:"author"`
Tags []string `json:"tags"`
Path string `json:"path"`
Manifest string `json:"manifest,omitempty"`
Files []RegistryFile `json:"files"`
}
MCPEntry describes a managed MCP package in the registry.
type MCPManifest ¶ added in v0.9.0
type PluginEntry ¶ added in v0.7.1
type PluginEntry struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Author string `json:"author"`
Tags []string `json:"tags"`
Path string `json:"path"`
Files RegistryFiles `json:"files"`
}
PluginEntry describes a plugin in the registry.
type Registry ¶
Registry fetches and searches the remote skill registry.
func (*Registry) FetchFile ¶
func (r *Registry) FetchFile(ctx context.Context, entry *RegistryEntry, relPath string) ([]byte, error)
FetchFile downloads a companion file relative to the skill's path.
func (*Registry) FetchIndex ¶
func (r *Registry) FetchIndex(ctx context.Context) (*RegistryIndex, error)
FetchIndex downloads and parses registry.json.
func (*Registry) FetchMCPFile ¶ added in v0.9.0
func (r *Registry) FetchMCPFile(ctx context.Context, entry *MCPEntry, relPath string) ([]byte, error)
FetchMCPFile downloads a file relative to the MCP package path.
func (*Registry) FetchPluginFile ¶ added in v0.7.1
func (r *Registry) FetchPluginFile(ctx context.Context, entry *PluginEntry, relPath string) ([]byte, error)
FetchPluginFile downloads a file relative to the plugin's path.
func (*Registry) FetchSkillContent ¶
FetchSkillContent downloads the SKILL.md for the given entry.
func (*Registry) FindByName ¶
FindByName returns the exact-match entry.
func (*Registry) FindMCPByName ¶ added in v0.9.0
FindMCPByName returns the exact-match MCP entry.
func (*Registry) FindPluginByName ¶ added in v0.7.1
FindPluginByName returns the exact-match plugin entry.
func (*Registry) Search ¶
Search returns entries matching the query (substring match on name, description, tags).
func (*Registry) SearchMCPServers ¶ added in v0.9.0
SearchMCPServers returns MCP entries matching the query.
func (*Registry) SearchPlugins ¶ added in v0.7.1
SearchPlugins returns plugin entries matching the query.
type RegistryEntry ¶
type RegistryEntry struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Author string `json:"author"`
Tags []string `json:"tags"`
Path string `json:"path"`
UserInvocable bool `json:"user_invocable"`
RequiresPlugin string `json:"requires_plugin,omitempty"`
Files RegistryFiles `json:"files,omitempty"`
}
RegistryEntry describes a single skill in the registry.
type RegistryFile ¶ added in v0.9.0
RegistryFile describes a downloadable file and its checksum.
type RegistryFiles ¶ added in v0.15.0
type RegistryFiles []RegistryFile
RegistryFiles accepts both legacy path arrays and checksum-bearing file objects.
func (RegistryFiles) Paths ¶ added in v0.15.0
func (files RegistryFiles) Paths() []string
func (*RegistryFiles) UnmarshalJSON ¶ added in v0.15.0
func (files *RegistryFiles) UnmarshalJSON(data []byte) error
type RegistryIndex ¶
type RegistryIndex struct {
Version int `json:"version"`
Skills []RegistryEntry `json:"skills"`
Plugins []PluginEntry `json:"plugins,omitempty"`
MCPServers []MCPEntry `json:"mcp_servers,omitempty"`
}
RegistryIndex is the top-level structure of registry.json.