toolsproviderservice

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTools = errors.New("invalid remote tools data")
)

Functions

This section is empty.

Types

type LocalTools

type LocalTools struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Type        string            `json:"type"`
	Tools       []taskengine.Tool `json:"tools,omitempty"`
	// Source is builtin (in-process), mcp (persisted MCP server), or remote (HTTP tools in DB).
	Source string `json:"source,omitempty"`
	// UnavailableReason is set when tools could not be loaded (e.g. unreachable MCP); other tools still list.
	UnavailableReason string `json:"unavailableReason,omitempty"`
}

type Service

type Service interface {
	Create(ctx context.Context, tools *runtimetypes.RemoteTools) error
	Get(ctx context.Context, id string) (*runtimetypes.RemoteTools, error)
	GetByName(ctx context.Context, name string) (*runtimetypes.RemoteTools, error)
	Update(ctx context.Context, tools *runtimetypes.RemoteTools) error
	Delete(ctx context.Context, id string) error
	List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.RemoteTools, error)
	GetSchemasForSupportedTools(ctx context.Context) (map[string]*openapi3.T, error)
	ListLocalTools(ctx context.Context) ([]LocalTools, error)
}

Service defines the interface for managing remote tools and querying tools capabilities.

func New

func New(dbInstance libdb.DBManager, toolsRegistry taskengine.ToolsProvider, tracker libtracker.ActivityTracker) Service

New creates a new service instance. tracker may be nil (no-op tracking).

func WithActivityTracker

func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service

WithActivityTracker wraps a Service with activity tracking functionality.

Jump to

Keyboard shortcuts

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