connectorservice

package
v1.0.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 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

View Source
const (
	KindBuiltin = "builtin"
	KindMCP     = "mcp"
	KindOpenAPI = "openapi"

	ScopeEverywhere = "everywhere"
	ScopeWorkspace  = "workspace"
	ScopeSession    = "session"
	ScopeAgent      = "agent"

	StatusReady       = "ready"
	StatusNeedsSignIn = "needs_sign_in"
	StatusUnavailable = "unavailable"
)

Variables

This section is empty.

Functions

func AllMCPServers

func AllMCPServers(ctx context.Context, store runtimetypes.Store) ([]*runtimetypes.MCPServer, error)

func AllRemoteTools

func AllRemoteTools(ctx context.Context, store runtimetypes.Store) ([]*runtimetypes.RemoteTools, error)

func Allowlist

func Allowlist(ctx context.Context, store runtimetypes.Store, cwd, sessionID string, sessionNames []string) ([]string, error)

func Disabled

func Disabled(ctx context.Context, store runtimetypes.Store, sessionID string) []string

func ForgetSession

func ForgetSession(ctx context.Context, store runtimetypes.Store, sessionID string)

func SessionHidden

func SessionHidden(ctx context.Context, store runtimetypes.Store, sessionID string) []string

func SetEnabled

func SetEnabled(ctx context.Context, store runtimetypes.Store, sessionID, name string, enabled bool) error

func SetHidden

func SetHidden(ctx context.Context, store runtimetypes.Store, workspace, connector string, tools []string) error

func SetSessionToolHidden

func SetSessionToolHidden(ctx context.Context, store runtimetypes.Store, sessionID, connector, tool string, hidden bool) error

Types

type Connector

type Connector struct {
	Name             string              `json:"name"`
	Label            string              `json:"label"`
	Kind             string              `json:"kind"`
	ID               string              `json:"id,omitempty"`
	Transport        string              `json:"transport,omitempty"`
	Command          string              `json:"command,omitempty"`
	Args             []string            `json:"args,omitempty"`
	URL              string              `json:"url,omitempty"`
	AuthType         string              `json:"authType,omitempty"`
	Scope            string              `json:"scope"`
	Workspace        string              `json:"workspace,omitempty"`
	Status           string              `json:"status"`
	Problem          string              `json:"problem,omitempty"`
	Tools            []Tool              `json:"tools"`
	Enabled          *bool               `json:"enabled,omitempty"`
	Hidden           map[string][]string `json:"hidden,omitempty"`
	HiddenBySettings []string            `json:"hiddenBySettings,omitempty"`
	HiddenInChat     []string            `json:"hiddenInChat,omitempty"`
}

type Filter

type Filter struct {
	Cwd          string
	SessionNames []string
	SessionID    string
	Session      bool
}

type HiddenTools

type HiddenTools struct {
	Everywhere []string            `json:"everywhere"`
	Workspaces map[string][]string `json:"workspaces"`
}

func ListHidden

func ListHidden(ctx context.Context, store runtimetypes.Store) HiddenTools

type Service

type Service interface {
	List(ctx context.Context, f Filter) ([]Connector, error)
	Check(ctx context.Context, name string) (Connector, error)
}

func New

type Tool

type Tool struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

Jump to

Keyboard shortcuts

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