tools

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClawHubRegistry added in v0.2.9

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

func NewClawHubRegistry added in v0.2.9

func NewClawHubRegistry(cfg ClawHubRegistryConfig) *ClawHubRegistry

func (*ClawHubRegistry) Install added in v0.2.9

func (*ClawHubRegistry) Search added in v0.2.9

func (c *ClawHubRegistry) Search(ctx context.Context, query string, limit int) ([]SkillSearchResult, error)

type ClawHubRegistryConfig added in v0.2.9

type ClawHubRegistryConfig struct {
	BaseURL          string
	AuthToken        string
	SearchPath       string
	SkillsPath       string
	DownloadPath     string
	TimeoutSec       int
	MaxZipBytes      int64
	MaxResponseBytes int64
}

type Context

type Context struct {
	Channel    string
	ChatID     string
	SessionKey string
}

type Registry

type Registry struct {
	WorkspaceDir        string
	RestrictToWorkspace bool
	ExecTimeout         time.Duration

	// If non-empty, only these tools are exposed and executable.
	// Unknown tool names are ignored.
	AllowTools []string

	BraveAPIKey             string
	WebFetchAllowedDomains  []string
	WebFetchBlockedDomains  []string
	WebFetchMaxResponse     int64
	WebFetchTimeout         time.Duration
	Outbound                func(ctx context.Context, msg bus.OutboundMessage) error
	Spawn                   func(ctx context.Context, task, label, originChannel, originChatID string) (string, error)
	Cron                    *cron.Service
	ReadSkill               func(name string) (string, bool)
	SkillRegistry           SkillRegistry
	SkillSearchDefaultLimit int
	MemorySearch            memory.SearchManager
	// contains filtered or unexported fields
}

func (*Registry) Definitions

func (r *Registry) Definitions() []llm.ToolDefinition

func (*Registry) Execute

func (r *Registry) Execute(ctx context.Context, tctx Context, name string, args json.RawMessage) (string, error)

type SkillInstallRequest added in v0.2.9

type SkillInstallRequest struct {
	Slug         string
	RegistryName string
	Version      string
	Force        bool
	WorkspaceDir string
}

type SkillInstallResult added in v0.2.9

type SkillInstallResult struct {
	RegistryName     string
	Slug             string
	Version          string
	Summary          string
	InstallPath      string
	IsSuspicious     bool
	IsMalwareBlocked bool
}

type SkillRegistry added in v0.2.9

type SkillRegistry interface {
	Search(ctx context.Context, query string, limit int) ([]SkillSearchResult, error)
	Install(ctx context.Context, req SkillInstallRequest) (SkillInstallResult, error)
}

type SkillSearchResult added in v0.2.9

type SkillSearchResult struct {
	Score        float64
	Slug         string
	DisplayName  string
	Summary      string
	Version      string
	RegistryName string
}

Jump to

Keyboard shortcuts

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