Documentation
¶
Index ¶
- func Tools(registry *Registry, installer *Installer, workDir string) []agentsdk.Tool
- type FilterOption
- type InstallTool
- func (t *InstallTool) Description() string
- func (t *InstallTool) Execute(_ context.Context, input json.RawMessage, workDir string) (agentsdk.ToolResult, error)
- func (t *InstallTool) InputSchema() json.RawMessage
- func (t *InstallTool) IsEnabled(ctx *agentsdk.RunContext) bool
- func (t *InstallTool) IsReadOnly() bool
- func (t *InstallTool) Name() string
- func (t *InstallTool) NeedsApproval() bool
- func (t *InstallTool) TimeoutSeconds() int
- type Installer
- type ListInstalledTool
- func (t *ListInstalledTool) Description() string
- func (t *ListInstalledTool) Execute(_ context.Context, _ json.RawMessage, workDir string) (agentsdk.ToolResult, error)
- func (t *ListInstalledTool) InputSchema() json.RawMessage
- func (t *ListInstalledTool) IsEnabled(_ *agentsdk.RunContext) bool
- func (t *ListInstalledTool) IsReadOnly() bool
- func (t *ListInstalledTool) Name() string
- func (t *ListInstalledTool) NeedsApproval() bool
- func (t *ListInstalledTool) TimeoutSeconds() int
- type MCPServerConfig
- type Registry
- type SearchTool
- func (t *SearchTool) Description() string
- func (t *SearchTool) Execute(_ context.Context, input json.RawMessage, _ string) (agentsdk.ToolResult, error)
- func (t *SearchTool) InputSchema() json.RawMessage
- func (t *SearchTool) IsEnabled(_ *agentsdk.RunContext) bool
- func (t *SearchTool) IsReadOnly() bool
- func (t *SearchTool) Name() string
- func (t *SearchTool) NeedsApproval() bool
- func (t *SearchTool) TimeoutSeconds() int
- type SkillEntry
- type SkillSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FilterOption ¶
type FilterOption func(*filterConfig)
FilterOption configures skill filtering.
func WithCategory ¶
func WithCategory(cat string) FilterOption
WithCategory filters skills by category.
func WithTags ¶
func WithTags(tags ...string) FilterOption
WithTags filters skills that have any of the given tags.
func WithVerifiedOnly ¶
func WithVerifiedOnly() FilterOption
WithVerifiedOnly filters to only verified skills.
type InstallTool ¶
InstallTool installs a skill from the catalog into the workspace's .mcp.json.
func (*InstallTool) Description ¶
func (t *InstallTool) Description() string
func (*InstallTool) Execute ¶
func (t *InstallTool) Execute(_ context.Context, input json.RawMessage, workDir string) (agentsdk.ToolResult, error)
func (*InstallTool) InputSchema ¶
func (t *InstallTool) InputSchema() json.RawMessage
func (*InstallTool) IsEnabled ¶
func (t *InstallTool) IsEnabled(ctx *agentsdk.RunContext) bool
func (*InstallTool) IsReadOnly ¶
func (t *InstallTool) IsReadOnly() bool
func (*InstallTool) Name ¶
func (t *InstallTool) Name() string
func (*InstallTool) NeedsApproval ¶
func (t *InstallTool) NeedsApproval() bool
func (*InstallTool) TimeoutSeconds ¶
func (t *InstallTool) TimeoutSeconds() int
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer manages skill installation in workspaces via .mcp.json.
func NewInstaller ¶
NewInstaller creates an installer backed by the given registry.
func (*Installer) Install ¶
Install adds the named skill's MCP server config to the workspace's .mcp.json.
The entry's allowEnv is seeded from the skill's requiresEnvVars so that credential-looking variables the server genuinely needs pass the SDK's credential env filter once the host supplies them (via the entry's env map or a host-level secret mechanism). If an entry with the same name already exists, its hardening fields (allowEnv, allowedTools, enabled, env) are preserved and merged rather than silently clobbered.
func (*Installer) ListInstalled ¶
ListInstalled returns the names of skills currently configured in .mcp.json.
type ListInstalledTool ¶
ListInstalledTool lists skills currently installed in the workspace.
func (*ListInstalledTool) Description ¶
func (t *ListInstalledTool) Description() string
func (*ListInstalledTool) Execute ¶
func (t *ListInstalledTool) Execute(_ context.Context, _ json.RawMessage, workDir string) (agentsdk.ToolResult, error)
func (*ListInstalledTool) InputSchema ¶
func (t *ListInstalledTool) InputSchema() json.RawMessage
func (*ListInstalledTool) IsEnabled ¶
func (t *ListInstalledTool) IsEnabled(_ *agentsdk.RunContext) bool
func (*ListInstalledTool) IsReadOnly ¶
func (t *ListInstalledTool) IsReadOnly() bool
func (*ListInstalledTool) Name ¶
func (t *ListInstalledTool) Name() string
func (*ListInstalledTool) NeedsApproval ¶
func (t *ListInstalledTool) NeedsApproval() bool
func (*ListInstalledTool) TimeoutSeconds ¶
func (t *ListInstalledTool) TimeoutSeconds() int
type MCPServerConfig ¶
type MCPServerConfig struct {
Type string `json:"type"`
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
MCPServerConfig defines how to run an MCP server.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages the skill catalog for discovery and installation.
func NewRegistry ¶
NewRegistry creates a registry loaded with the default embedded catalog.
func NewRegistryFromEntries ¶
func NewRegistryFromEntries(entries []SkillEntry) *Registry
NewRegistryFromEntries creates a registry from provided entries.
func (*Registry) Categories ¶
Categories returns all unique categories in the catalog.
func (*Registry) Get ¶
func (r *Registry) Get(name string) (*SkillEntry, bool)
Get returns a skill by name, or nil if not found.
func (*Registry) List ¶
func (r *Registry) List(opts ...FilterOption) []SkillEntry
List returns all skills, optionally filtered.
func (*Registry) Search ¶
func (r *Registry) Search(query string) []SkillEntry
Search finds skills matching a query string against name, description, and tags.
type SearchTool ¶
type SearchTool struct {
Registry *Registry
}
SearchTool searches the skill catalog by query, category, or tag.
func (*SearchTool) Description ¶
func (t *SearchTool) Description() string
func (*SearchTool) Execute ¶
func (t *SearchTool) Execute(_ context.Context, input json.RawMessage, _ string) (agentsdk.ToolResult, error)
func (*SearchTool) InputSchema ¶
func (t *SearchTool) InputSchema() json.RawMessage
func (*SearchTool) IsEnabled ¶
func (t *SearchTool) IsEnabled(_ *agentsdk.RunContext) bool
func (*SearchTool) IsReadOnly ¶
func (t *SearchTool) IsReadOnly() bool
func (*SearchTool) Name ¶
func (t *SearchTool) Name() string
func (*SearchTool) NeedsApproval ¶
func (t *SearchTool) NeedsApproval() bool
func (*SearchTool) TimeoutSeconds ¶
func (t *SearchTool) TimeoutSeconds() int
type SkillEntry ¶
type SkillEntry struct {
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
Version string `json:"version"`
Source SkillSource `json:"source"`
MCPConfig MCPServerConfig `json:"mcpConfig"`
Tags []string `json:"tags,omitempty"`
Verified bool `json:"verified"`
RequiresEnvVars []string `json:"requiresEnvVars,omitempty"`
}
SkillEntry represents a single skill in the catalog.
func LoadDefaultCatalog ¶
func LoadDefaultCatalog() ([]SkillEntry, error)
LoadDefaultCatalog parses the embedded default skill catalog.
type SkillSource ¶
type SkillSource struct {
Repository string `json:"repository,omitempty"`
Ref string `json:"ref,omitempty"`
URL string `json:"url,omitempty"`
}
SkillSource identifies where a skill package comes from.