tools

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 17 Imported by: 1 module, 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

This section is empty.

Functions

func WithGeneration

func WithGeneration(ctx context.Context, generation uint64) context.Context

Types

type Controller

type Controller interface {
	internaltypes.Controller

	// ListAll returns a copy of the cached tools of every running plugin.
	ListAll() map[string]PluginTools

	// CallTool invokes a plugin tool. connection is nil for plugin-scoped tools.
	CallTool(
		ctx context.Context,
		pluginID string,
		connection *sdktypes.Connection,
		name string,
		arguments json.RawMessage,
	) (*sdktools.Result, error)

	// OnChange registers fn to run (outside the controller lock) after every
	// cache change: plugin start, stop or shutdown.
	OnChange(fn func())
}

Controller caches every running plugin's tools and dispatches calls.

func NewController

func NewController(logger logging.Logger, boundary *invocation.Boundary) Controller

type PluginTools

type PluginTools struct {
	Meta       config.PluginMeta
	Tools      []sdktools.Descriptor
	Generation uint64
}

PluginTools is the cached tool list of one running plugin.

type Provider

type Provider = sdktools.Provider

Provider is the SDK tools provider dispensed from a plugin backend.

Jump to

Keyboard shortcuts

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