Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransportStreamableHTTP = "streamable_http"
	TransportStdio          = "stdio"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code      string
	Message   string
	Retryable bool
	Details   map[string]any
	Cause     error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Manager

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

func NewManager

func NewManager(agentDockHome string, provided ...*envstore.Store) (*Manager, error)

func (*Manager) Add

func (m *Manager) Add(cfg ServerConfig) (ServerSummary, error)

func (*Manager) Call

func (m *Manager) Call(ctx context.Context, qualifiedName string, arguments map[string]any) (map[string]any, error)

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) EnabledIndex

func (m *Manager) EnabledIndex() []ServerSummary

func (*Manager) Inspect

func (m *Manager) Inspect(name string) (ServerConfig, ServerSummary, error)

func (*Manager) InspectTool

func (m *Manager) InspectTool(ctx context.Context, qualifiedName string) (string, Tool, error)

func (*Manager) List

func (m *Manager) List() []ServerSummary

func (*Manager) Refresh

func (m *Manager) Refresh(ctx context.Context, name string) (ServerSummary, []ToolSummary, error)

func (*Manager) Remove

func (m *Manager) Remove(name string) error

func (*Manager) Search

func (m *Manager) Search(ctx context.Context, query, server string, limit int) ([]ToolSummary, error)

func (*Manager) SetEnabled

func (m *Manager) SetEnabled(name string, enabled bool) (ServerSummary, error)

type ServerConfig

type ServerConfig struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Transport   string            `json:"transport"`
	URL         string            `json:"url,omitempty"`
	Command     string            `json:"command,omitempty"`
	Args        []string          `json:"args,omitempty"`
	Cwd         string            `json:"cwd,omitempty"`
	HeaderEnv   map[string]string `json:"header_env,omitempty"`
	EnvFromEnv  map[string]string `json:"env_from_env,omitempty"`
	RuntimeEnv  map[string]string `json:"-"`
	Enabled     bool              `json:"enabled"`
	TimeoutMS   int               `json:"timeout_ms,omitempty"`
}

type ServerSummary

type ServerSummary struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Transport   string `json:"transport"`
	Enabled     bool   `json:"enabled"`
	Status      string `json:"status"`
	ToolCount   int    `json:"tool_count"`
	LastError   string `json:"last_error,omitempty"`
	RefreshedAt string `json:"refreshed_at,omitempty"`
}

type Tool

type Tool struct {
	Name         string         `json:"name"`
	Title        string         `json:"title,omitempty"`
	Description  string         `json:"description,omitempty"`
	InputSchema  map[string]any `json:"inputSchema"`
	OutputSchema map[string]any `json:"outputSchema,omitempty"`
	Annotations  map[string]any `json:"annotations,omitempty"`
	// contains filtered or unexported fields
}

type ToolSummary

type ToolSummary struct {
	Name          string `json:"name"`
	QualifiedName string `json:"qualified_name"`
	Title         string `json:"title,omitempty"`
	Description   string `json:"description,omitempty"`
	Server        string `json:"server"`
}

Jump to

Keyboard shortcuts

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