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 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.
Click to show internal directories.
Click to hide internal directories.