api

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToolSet added in v1.60.0

func CreateToolSet(ctx context.Context, toolset latest.Toolset, runConfig *config.RuntimeConfig) (tools.ToolSet, error)

CreateToolSet is used by the tools registry.

Types

type Option added in v1.65.0

type Option func(*ToolSet)

Option configures an api ToolSet.

func WithAllowPrivateIPs added in v1.65.0

func WithAllowPrivateIPs(allow bool) Option

WithAllowPrivateIPs disables SSRF dial-time protection so the api tool may dial loopback / RFC1918 / link-local addresses. Operators opt in via `allow_private_ips: true` when the configured endpoint legitimately targets internal services. Tests use this to talk to httptest.NewServer.

func WithTimeout added in v1.65.0

func WithTimeout(d time.Duration) Option

WithTimeout overrides the default 30s HTTP client timeout.

type ToolSet added in v1.60.0

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

func New added in v1.60.0

func New(apiConfig latest.APIToolConfig, expander *js.Expander, opts ...Option) *ToolSet

func (*ToolSet) Instructions added in v1.60.0

func (t *ToolSet) Instructions() string

func (*ToolSet) Tools added in v1.60.0

func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error)

Jump to

Keyboard shortcuts

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