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.
func Creator ¶ added in v1.132.0
func Creator(ctx context.Context, toolset latest.Toolset, _ string, runConfig *config.RuntimeConfig, _ string) (tools.ToolSet, error)
Creator builds this toolset from its YAML declaration. It matches teamloader.ToolsetCreator so it can be registered directly:
teamloader.NewToolsetRegistry(map[string]teamloader.ToolsetCreator{"openapi": openapi.Creator})
Types ¶
type Option ¶ added in v1.65.0
type Option func(*ToolSet)
Option configures an openapi ToolSet.
func WithAllowPrivateIPs ¶ added in v1.65.0
WithAllowPrivateIPs disables SSRF dial-time protection on both the spec fetch and the generated tools' HTTP calls. Operators opt in via `allow_private_ips: true` when the spec or its servers legitimately target internal services. Tests use this to talk to httptest.NewServer.
func WithExpander ¶ added in v1.67.0
func WithTimeout ¶ added in v1.65.0
WithTimeout overrides the default HTTP client timeout (see httpclient.DefaultToolHTTPTimeout) used both for fetching the spec and for the generated tools' HTTP calls.
type ToolSet ¶ added in v1.60.0
type ToolSet struct {
// contains filtered or unexported fields
}
ToolSet generates HTTP tools from an OpenAPI specification.
func (*ToolSet) Instructions ¶ added in v1.60.0
Instructions returns usage instructions for the OpenAPI toolset.